Use gnulib's strerror_r on MinGW
[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
ed2a2229 700SYSTEM_GDBINIT_DIR
81ecdfbb 701SYSTEM_GDBINIT
81ecdfbb
RW
702TARGET_SYSTEM_ROOT
703CONFIG_LDFLAGS
f6528abd 704RDYNAMIC
81ecdfbb 705ALLOCA
58bfce93
MM
706LTLIBIPT
707LIBIPT
708HAVE_LIBIPT
62f29fda
TT
709SRCHIGH_CFLAGS
710SRCHIGH_LIBS
4df42755
DE
711HAVE_GUILE_FALSE
712HAVE_GUILE_TRUE
ed3ef339
DE
713GUILE_LIBS
714GUILE_CPPFLAGS
e76c5d17
DE
715GUILD_TARGET_FLAG
716GUILD
ed3ef339 717pkg_config_prog_path
4df42755
DE
718HAVE_PYTHON_FALSE
719HAVE_PYTHON_TRUE
ac534cba
JB
720PYTHON_LIBS
721PYTHON_CPPFLAGS
81ecdfbb 722PYTHON_CFLAGS
ec685c5e 723python_prog_path
2400729e
UW
724LTLIBMPFR
725LIBMPFR
726HAVE_LIBMPFR
81ecdfbb
RW
727LTLIBEXPAT
728LIBEXPAT
729HAVE_LIBEXPAT
b8e0a31c 730JIT_READER_DIR
f997c383 731TARGET_PTR
39037522 732READLINE_TEXI_INCFLAG
81ecdfbb
RW
733READLINE_CFLAGS
734READLINE_DEPS
735READLINE
016a3251
DD
736LTLIBICONV
737LIBICONV
711a72d3
L
738zlibinc
739zlibdir
81ecdfbb
RW
740MIG
741WINDRES
742DLLTOOL
c971b7fa 743AR
81ecdfbb
RW
744YFLAGS
745YACC
c971b7fa 746RANLIB
81ecdfbb 747LN_S
c971b7fa
PA
748INSTALL_DATA
749INSTALL_SCRIPT
750INSTALL_PROGRAM
751AWK
81ecdfbb
RW
752REPORT_BUGS_TEXI
753REPORT_BUGS_TO
754PKGVERSION
44cee4fd 755CODESIGN_CERT
b292c783 756HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
757TARGET_OBS
758subdirs
759GDB_DATADIR
760DEBUGDIR
5048e516
JK
761MAKEINFO_EXTRA_FLAGS
762MAKEINFOFLAGS
763MAKEINFO
81ecdfbb 764PACKAGE
81ecdfbb
RW
765CATOBJEXT
766GENCAT
767INSTOBJEXT
768DATADIRNAME
769CATALOGS
770POSUB
771GMSGFMT
772XGETTEXT
773INCINTL
774LIBINTL_DEP
775LIBINTL
776USE_NLS
81ecdfbb
RW
777CCDEPMODE
778DEPDIR
779am__leading_dot
0bcda685
PA
780CXX_DIALECT
781HAVE_CXX11
4869db5e
RM
782INSTALL_STRIP_PROGRAM
783STRIP
784install_sh
81ecdfbb
RW
785target_os
786target_vendor
787target_cpu
788target
789host_os
790host_vendor
791host_cpu
792host
793build_os
794build_vendor
795build_cpu
796build
c971b7fa
PA
797EGREP
798GREP
799CPP
3bc3d82a
PA
800ac_ct_CXX
801CXXFLAGS
802CXX
81ecdfbb
RW
803OBJEXT
804EXEEXT
805ac_ct_CC
806CPPFLAGS
807LDFLAGS
808CFLAGS
809CC
810MAINT
811MAINTAINER_MODE_FALSE
812MAINTAINER_MODE_TRUE
813target_alias
814host_alias
815build_alias
816LIBS
817ECHO_T
818ECHO_N
819ECHO_C
820DEFS
821mandir
822localedir
823libdir
824psdir
825pdfdir
826dvidir
827htmldir
828infodir
829docdir
830oldincludedir
831includedir
832localstatedir
833sharedstatedir
834sysconfdir
835datadir
836datarootdir
837libexecdir
838sbindir
839bindir
840program_transform_name
841prefix
842exec_prefix
843PACKAGE_URL
844PACKAGE_BUGREPORT
845PACKAGE_STRING
846PACKAGE_VERSION
847PACKAGE_TARNAME
848PACKAGE_NAME
849PATH_SEPARATOR
850SHELL'
2b351b19 851ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
852ac_user_opts='
853enable_option_checking
854enable_maintainer_mode
da2f07f1
JK
855enable_plugins
856enable_largefile
81ecdfbb
RW
857with_separate_debug_dir
858with_gdb_datadir
859with_relocated_sources
7349ff92 860with_auto_load_dir
bccbefd2 861with_auto_load_safe_path
81ecdfbb
RW
862enable_targets
863enable_64_bit_bfd
81ecdfbb
RW
864enable_gdbmi
865enable_tui
866enable_gdbtk
05e7c244 867with_libunwind_ia64
81ecdfbb
RW
868with_curses
869enable_profiling
44cee4fd 870enable_codesign
81ecdfbb
RW
871with_pkgversion
872with_bugurl
711a72d3 873with_system_zlib
016a3251
DD
874with_gnu_ld
875enable_rpath
81ecdfbb 876with_libiconv_prefix
478aac75 877with_iconv_bin
81ecdfbb 878with_system_readline
b8e0a31c 879with_jit_reader_dir
81ecdfbb 880with_expat
81ecdfbb 881with_libexpat_prefix
2400729e
UW
882with_mpfr
883with_libmpfr_prefix
81ecdfbb 884with_python
ed3ef339 885with_guile
189b8c2e 886enable_source_highlight
58bfce93
MM
887with_intel_pt
888with_libipt_prefix
81ecdfbb
RW
889with_included_regex
890with_sysroot
891with_system_gdbinit
ed2a2229 892with_system_gdbinit_dir
81ecdfbb
RW
893enable_werror
894enable_build_warnings
895enable_gdb_build_warnings
f35d5ade 896enable_ubsan
608e2dbb
TT
897with_lzma
898with_liblzma_prefix
81ecdfbb
RW
899with_tcl
900with_tk
901with_x
902enable_sim
496c0e1b 903enable_gdbserver
393fd4c3
YQ
904with_babeltrace
905with_libbabeltrace_prefix
ccb1ba62
CB
906with_xxhash
907with_libxxhash_prefix
8ecfd7bd 908enable_unit_tests
81ecdfbb
RW
909'
910 ac_precious_vars='build_alias
911host_alias
912target_alias
913CC
914CFLAGS
915LDFLAGS
916LIBS
917CPPFLAGS
3bc3d82a
PA
918CXX
919CXXFLAGS
920CCC
81ecdfbb 921CPP
f06e05e0
JK
922MAKEINFO
923MAKEINFOFLAGS
81ecdfbb
RW
924YACC
925YFLAGS
926XMKMF'
5ae98d25 927ac_subdirs_all='testsuite
81ecdfbb 928gdbtk
81ecdfbb 929gdbserver'
c906108c
SS
930
931# Initialize some variables set by options.
bec39cab
AC
932ac_init_help=
933ac_init_version=false
81ecdfbb
RW
934ac_unrecognized_opts=
935ac_unrecognized_sep=
c906108c
SS
936# The variables have the same names as the options, with
937# dashes changed to underlines.
bec39cab 938cache_file=/dev/null
c906108c 939exec_prefix=NONE
c906108c 940no_create=
c906108c
SS
941no_recursion=
942prefix=NONE
943program_prefix=NONE
944program_suffix=NONE
945program_transform_name=s,x,x,
946silent=
947site=
948srcdir=
c906108c
SS
949verbose=
950x_includes=NONE
951x_libraries=NONE
bec39cab
AC
952
953# Installation directory options.
954# These are left unexpanded so users can "make install exec_prefix=/foo"
955# and all the variables that are supposed to be based on exec_prefix
956# by default will actually change.
957# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 958# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
959bindir='${exec_prefix}/bin'
960sbindir='${exec_prefix}/sbin'
961libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
962datarootdir='${prefix}/share'
963datadir='${datarootdir}'
c906108c
SS
964sysconfdir='${prefix}/etc'
965sharedstatedir='${prefix}/com'
966localstatedir='${prefix}/var'
c906108c
SS
967includedir='${prefix}/include'
968oldincludedir='/usr/include'
81ecdfbb
RW
969docdir='${datarootdir}/doc/${PACKAGE}'
970infodir='${datarootdir}/info'
971htmldir='${docdir}'
972dvidir='${docdir}'
973pdfdir='${docdir}'
974psdir='${docdir}'
975libdir='${exec_prefix}/lib'
976localedir='${datarootdir}/locale'
977mandir='${datarootdir}/man'
c906108c 978
c906108c 979ac_prev=
81ecdfbb 980ac_dashdash=
c906108c
SS
981for ac_option
982do
c906108c
SS
983 # If the previous option needs an argument, assign it.
984 if test -n "$ac_prev"; then
81ecdfbb 985 eval $ac_prev=\$ac_option
c906108c
SS
986 ac_prev=
987 continue
988 fi
989
81ecdfbb 990 case $ac_option in
d0ac1c44
SM
991 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
992 *=) ac_optarg= ;;
993 *) ac_optarg=yes ;;
81ecdfbb 994 esac
c906108c
SS
995
996 # Accept the important Cygnus configure options, so we can diagnose typos.
997
81ecdfbb
RW
998 case $ac_dashdash$ac_option in
999 --)
1000 ac_dashdash=yes ;;
c906108c
SS
1001
1002 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1003 ac_prev=bindir ;;
1004 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1005 bindir=$ac_optarg ;;
c906108c
SS
1006
1007 -build | --build | --buil | --bui | --bu)
bec39cab 1008 ac_prev=build_alias ;;
c906108c 1009 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1010 build_alias=$ac_optarg ;;
c906108c
SS
1011
1012 -cache-file | --cache-file | --cache-fil | --cache-fi \
1013 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1014 ac_prev=cache_file ;;
1015 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1016 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1017 cache_file=$ac_optarg ;;
1018
1019 --config-cache | -C)
1020 cache_file=config.cache ;;
c906108c 1021
81ecdfbb 1022 -datadir | --datadir | --datadi | --datad)
c906108c 1023 ac_prev=datadir ;;
81ecdfbb 1024 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1025 datadir=$ac_optarg ;;
c906108c 1026
81ecdfbb
RW
1027 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1028 | --dataroo | --dataro | --datar)
1029 ac_prev=datarootdir ;;
1030 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1031 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1032 datarootdir=$ac_optarg ;;
1033
c906108c 1034 -disable-* | --disable-*)
81ecdfbb 1035 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1036 # Reject names that are not valid shell variable names.
81ecdfbb 1037 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1038 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1039 ac_useropt_orig=$ac_useropt
1040 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1041 case $ac_user_opts in
1042 *"
1043"enable_$ac_useropt"
1044"*) ;;
1045 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1046 ac_unrecognized_sep=', ';;
1047 esac
1048 eval enable_$ac_useropt=no ;;
1049
1050 -docdir | --docdir | --docdi | --doc | --do)
1051 ac_prev=docdir ;;
1052 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1053 docdir=$ac_optarg ;;
1054
1055 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1056 ac_prev=dvidir ;;
1057 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1058 dvidir=$ac_optarg ;;
c906108c
SS
1059
1060 -enable-* | --enable-*)
81ecdfbb 1061 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1062 # Reject names that are not valid shell variable names.
81ecdfbb 1063 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1064 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1065 ac_useropt_orig=$ac_useropt
1066 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1067 case $ac_user_opts in
1068 *"
1069"enable_$ac_useropt"
1070"*) ;;
1071 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1072 ac_unrecognized_sep=', ';;
b4e70030 1073 esac
81ecdfbb 1074 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1075
1076 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1077 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1078 | --exec | --exe | --ex)
1079 ac_prev=exec_prefix ;;
1080 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1081 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1082 | --exec=* | --exe=* | --ex=*)
bec39cab 1083 exec_prefix=$ac_optarg ;;
c906108c
SS
1084
1085 -gas | --gas | --ga | --g)
1086 # Obsolete; use --with-gas.
1087 with_gas=yes ;;
1088
bec39cab
AC
1089 -help | --help | --hel | --he | -h)
1090 ac_init_help=long ;;
1091 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1092 ac_init_help=recursive ;;
1093 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1094 ac_init_help=short ;;
c906108c
SS
1095
1096 -host | --host | --hos | --ho)
bec39cab 1097 ac_prev=host_alias ;;
c906108c 1098 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1099 host_alias=$ac_optarg ;;
c906108c 1100
81ecdfbb
RW
1101 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1102 ac_prev=htmldir ;;
1103 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1104 | --ht=*)
1105 htmldir=$ac_optarg ;;
1106
c906108c
SS
1107 -includedir | --includedir | --includedi | --included | --include \
1108 | --includ | --inclu | --incl | --inc)
1109 ac_prev=includedir ;;
1110 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1111 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1112 includedir=$ac_optarg ;;
c906108c
SS
1113
1114 -infodir | --infodir | --infodi | --infod | --info | --inf)
1115 ac_prev=infodir ;;
1116 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1117 infodir=$ac_optarg ;;
c906108c
SS
1118
1119 -libdir | --libdir | --libdi | --libd)
1120 ac_prev=libdir ;;
1121 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1122 libdir=$ac_optarg ;;
c906108c
SS
1123
1124 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1125 | --libexe | --libex | --libe)
1126 ac_prev=libexecdir ;;
1127 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1128 | --libexe=* | --libex=* | --libe=*)
bec39cab 1129 libexecdir=$ac_optarg ;;
c906108c 1130
81ecdfbb
RW
1131 -localedir | --localedir | --localedi | --localed | --locale)
1132 ac_prev=localedir ;;
1133 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1134 localedir=$ac_optarg ;;
1135
c906108c 1136 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1137 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1138 ac_prev=localstatedir ;;
1139 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1140 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1141 localstatedir=$ac_optarg ;;
c906108c
SS
1142
1143 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1144 ac_prev=mandir ;;
1145 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1146 mandir=$ac_optarg ;;
c906108c
SS
1147
1148 -nfp | --nfp | --nf)
1149 # Obsolete; use --without-fp.
1150 with_fp=no ;;
1151
1152 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1153 | --no-cr | --no-c | -n)
c906108c
SS
1154 no_create=yes ;;
1155
1156 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1157 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1158 no_recursion=yes ;;
1159
1160 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1161 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1162 | --oldin | --oldi | --old | --ol | --o)
1163 ac_prev=oldincludedir ;;
1164 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1165 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1166 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1167 oldincludedir=$ac_optarg ;;
c906108c
SS
1168
1169 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1170 ac_prev=prefix ;;
1171 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1172 prefix=$ac_optarg ;;
c906108c
SS
1173
1174 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1175 | --program-pre | --program-pr | --program-p)
1176 ac_prev=program_prefix ;;
1177 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1178 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1179 program_prefix=$ac_optarg ;;
c906108c
SS
1180
1181 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1182 | --program-suf | --program-su | --program-s)
1183 ac_prev=program_suffix ;;
1184 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1185 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1186 program_suffix=$ac_optarg ;;
c906108c
SS
1187
1188 -program-transform-name | --program-transform-name \
1189 | --program-transform-nam | --program-transform-na \
1190 | --program-transform-n | --program-transform- \
1191 | --program-transform | --program-transfor \
1192 | --program-transfo | --program-transf \
1193 | --program-trans | --program-tran \
1194 | --progr-tra | --program-tr | --program-t)
1195 ac_prev=program_transform_name ;;
1196 -program-transform-name=* | --program-transform-name=* \
1197 | --program-transform-nam=* | --program-transform-na=* \
1198 | --program-transform-n=* | --program-transform-=* \
1199 | --program-transform=* | --program-transfor=* \
1200 | --program-transfo=* | --program-transf=* \
1201 | --program-trans=* | --program-tran=* \
1202 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1203 program_transform_name=$ac_optarg ;;
c906108c 1204
81ecdfbb
RW
1205 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1206 ac_prev=pdfdir ;;
1207 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1208 pdfdir=$ac_optarg ;;
1209
1210 -psdir | --psdir | --psdi | --psd | --ps)
1211 ac_prev=psdir ;;
1212 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1213 psdir=$ac_optarg ;;
1214
c906108c
SS
1215 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1216 | -silent | --silent | --silen | --sile | --sil)
1217 silent=yes ;;
1218
1219 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1220 ac_prev=sbindir ;;
1221 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1222 | --sbi=* | --sb=*)
bec39cab 1223 sbindir=$ac_optarg ;;
c906108c
SS
1224
1225 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1226 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1227 | --sharedst | --shareds | --shared | --share | --shar \
1228 | --sha | --sh)
1229 ac_prev=sharedstatedir ;;
1230 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1231 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1232 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1233 | --sha=* | --sh=*)
bec39cab 1234 sharedstatedir=$ac_optarg ;;
c906108c
SS
1235
1236 -site | --site | --sit)
1237 ac_prev=site ;;
1238 -site=* | --site=* | --sit=*)
bec39cab 1239 site=$ac_optarg ;;
3ace7edb 1240
c906108c
SS
1241 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1242 ac_prev=srcdir ;;
1243 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1244 srcdir=$ac_optarg ;;
c906108c
SS
1245
1246 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1247 | --syscon | --sysco | --sysc | --sys | --sy)
1248 ac_prev=sysconfdir ;;
1249 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1250 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1251 sysconfdir=$ac_optarg ;;
c906108c
SS
1252
1253 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1254 ac_prev=target_alias ;;
c906108c 1255 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1256 target_alias=$ac_optarg ;;
c906108c
SS
1257
1258 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1259 verbose=yes ;;
1260
bec39cab
AC
1261 -version | --version | --versio | --versi | --vers | -V)
1262 ac_init_version=: ;;
c906108c
SS
1263
1264 -with-* | --with-*)
81ecdfbb 1265 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1266 # Reject names that are not valid shell variable names.
81ecdfbb 1267 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1268 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1269 ac_useropt_orig=$ac_useropt
1270 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1271 case $ac_user_opts in
1272 *"
1273"with_$ac_useropt"
1274"*) ;;
1275 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1276 ac_unrecognized_sep=', ';;
b4e70030 1277 esac
81ecdfbb 1278 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1279
1280 -without-* | --without-*)
81ecdfbb 1281 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1282 # Reject names that are not valid shell variable names.
81ecdfbb 1283 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1284 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1285 ac_useropt_orig=$ac_useropt
1286 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1287 case $ac_user_opts in
1288 *"
1289"with_$ac_useropt"
1290"*) ;;
1291 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1292 ac_unrecognized_sep=', ';;
1293 esac
1294 eval with_$ac_useropt=no ;;
c906108c
SS
1295
1296 --x)
1297 # Obsolete; use --with-x.
1298 with_x=yes ;;
1299
1300 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1301 | --x-incl | --x-inc | --x-in | --x-i)
1302 ac_prev=x_includes ;;
1303 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1304 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1305 x_includes=$ac_optarg ;;
c906108c
SS
1306
1307 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1308 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1309 ac_prev=x_libraries ;;
1310 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1311 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1312 x_libraries=$ac_optarg ;;
c906108c 1313
d0ac1c44
SM
1314 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1315Try \`$0 --help' for more information"
c906108c
SS
1316 ;;
1317
bec39cab
AC
1318 *=*)
1319 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1320 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1321 case $ac_envvar in #(
1322 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1323 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1324 esac
1325 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1326 export $ac_envvar ;;
1327
c906108c 1328 *)
bec39cab 1329 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1330 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1331 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1332 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1333 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1334 ;;
1335
1336 esac
1337done
1338
1339if test -n "$ac_prev"; then
bec39cab 1340 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1341 as_fn_error $? "missing argument to $ac_option"
c906108c 1342fi
c906108c 1343
81ecdfbb
RW
1344if test -n "$ac_unrecognized_opts"; then
1345 case $enable_option_checking in
1346 no) ;;
d0ac1c44 1347 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1348 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1349 esac
81ecdfbb 1350fi
b4e70030 1351
81ecdfbb
RW
1352# Check all directory arguments for consistency.
1353for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1354 datadir sysconfdir sharedstatedir localstatedir includedir \
1355 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1356 libdir localedir mandir
b4e70030 1357do
81ecdfbb
RW
1358 eval ac_val=\$$ac_var
1359 # Remove trailing slashes.
1360 case $ac_val in
1361 */ )
1362 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1363 eval $ac_var=\$ac_val;;
1364 esac
1365 # Be sure to have absolute directory names.
b4e70030 1366 case $ac_val in
81ecdfbb
RW
1367 [\\/$]* | ?:[\\/]* ) continue;;
1368 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1369 esac
d0ac1c44 1370 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1371done
1372
bec39cab
AC
1373# There might be people who depend on the old broken behavior: `$host'
1374# used to hold the argument of --host etc.
1375# FIXME: To remove some day.
1376build=$build_alias
1377host=$host_alias
1378target=$target_alias
1379
1380# FIXME: To remove some day.
1381if test "x$host_alias" != x; then
1382 if test "x$build_alias" = x; then
1383 cross_compiling=maybe
bec39cab
AC
1384 elif test "x$build_alias" != "x$host_alias"; then
1385 cross_compiling=yes
1386 fi
1387fi
c906108c 1388
bec39cab
AC
1389ac_tool_prefix=
1390test -n "$host_alias" && ac_tool_prefix=$host_alias-
1391
1392test "$silent" = yes && exec 6>/dev/null
c906108c 1393
c906108c 1394
81ecdfbb
RW
1395ac_pwd=`pwd` && test -n "$ac_pwd" &&
1396ac_ls_di=`ls -di .` &&
1397ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1398 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1399test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1400 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1401
1402
c906108c
SS
1403# Find the source files, if location was not specified.
1404if test -z "$srcdir"; then
1405 ac_srcdir_defaulted=yes
81ecdfbb
RW
1406 # Try the directory containing this script, then the parent directory.
1407 ac_confdir=`$as_dirname -- "$as_myself" ||
1408$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1409 X"$as_myself" : 'X\(//\)[^/]' \| \
1410 X"$as_myself" : 'X\(//\)$' \| \
1411 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1412$as_echo X"$as_myself" |
1413 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1414 s//\1/
1415 q
1416 }
1417 /^X\(\/\/\)[^/].*/{
1418 s//\1/
1419 q
1420 }
1421 /^X\(\/\/\)$/{
1422 s//\1/
1423 q
1424 }
1425 /^X\(\/\).*/{
1426 s//\1/
1427 q
1428 }
1429 s/.*/./; q'`
c906108c 1430 srcdir=$ac_confdir
81ecdfbb 1431 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1432 srcdir=..
1433 fi
1434else
1435 ac_srcdir_defaulted=no
1436fi
81ecdfbb
RW
1437if test ! -r "$srcdir/$ac_unique_file"; then
1438 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1439 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1440fi
1441ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1442ac_abs_confdir=`(
d0ac1c44 1443 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1444 pwd)`
1445# When building in place, set srcdir=.
1446if test "$ac_abs_confdir" = "$ac_pwd"; then
1447 srcdir=.
1448fi
1449# Remove unnecessary trailing slashes from srcdir.
1450# Double slashes in file names in object file debugging info
1451# mess up M-x gdb in Emacs.
1452case $srcdir in
1453*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1454esac
1455for ac_var in $ac_precious_vars; do
1456 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1457 eval ac_env_${ac_var}_value=\$${ac_var}
1458 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1459 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1460done
c906108c 1461
bec39cab
AC
1462#
1463# Report the --help message.
1464#
1465if test "$ac_init_help" = "long"; then
1466 # Omit some internal or obsolete options to make the list less imposing.
1467 # This message is too long to be a string in the A/UX 3.1 sh.
1468 cat <<_ACEOF
1469\`configure' configures this package to adapt to many kinds of systems.
1470
1471Usage: $0 [OPTION]... [VAR=VALUE]...
1472
1473To assign environment variables (e.g., CC, CFLAGS...), specify them as
1474VAR=VALUE. See below for descriptions of some of the useful variables.
1475
1476Defaults for the options are specified in brackets.
1477
1478Configuration:
1479 -h, --help display this help and exit
1480 --help=short display options specific to this package
1481 --help=recursive display the short help of all the included packages
1482 -V, --version display version information and exit
d0ac1c44 1483 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1484 --cache-file=FILE cache test results in FILE [disabled]
1485 -C, --config-cache alias for \`--cache-file=config.cache'
1486 -n, --no-create do not create output files
1487 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1488
bec39cab
AC
1489Installation directories:
1490 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1491 [$ac_default_prefix]
bec39cab 1492 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1493 [PREFIX]
bec39cab
AC
1494
1495By default, \`make install' will install all the files in
1496\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1497an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1498for instance \`--prefix=\$HOME'.
1499
1500For better control, use the options below.
1501
1502Fine tuning of the installation directories:
81ecdfbb
RW
1503 --bindir=DIR user executables [EPREFIX/bin]
1504 --sbindir=DIR system admin executables [EPREFIX/sbin]
1505 --libexecdir=DIR program executables [EPREFIX/libexec]
1506 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1507 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1508 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1509 --libdir=DIR object code libraries [EPREFIX/lib]
1510 --includedir=DIR C header files [PREFIX/include]
1511 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1512 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1513 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1514 --infodir=DIR info documentation [DATAROOTDIR/info]
1515 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1516 --mandir=DIR man documentation [DATAROOTDIR/man]
1517 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1518 --htmldir=DIR html documentation [DOCDIR]
1519 --dvidir=DIR dvi documentation [DOCDIR]
1520 --pdfdir=DIR pdf documentation [DOCDIR]
1521 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1522_ACEOF
1523
1524 cat <<\_ACEOF
1525
9009e1ae
MR
1526Program names:
1527 --program-prefix=PREFIX prepend PREFIX to installed program names
1528 --program-suffix=SUFFIX append SUFFIX to installed program names
1529 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1530
bec39cab
AC
1531X features:
1532 --x-includes=DIR X include files are in DIR
1533 --x-libraries=DIR X library files are in DIR
1534
1535System types:
1536 --build=BUILD configure for building on BUILD [guessed]
1537 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1538 --target=TARGET configure for building compilers for TARGET [HOST]
1539_ACEOF
1540fi
1541
1542if test -n "$ac_init_help"; then
1543
1544 cat <<\_ACEOF
1545
1546Optional Features:
81ecdfbb 1547 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1548 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1549 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1550 --enable-maintainer-mode
1551 enable make rules and dependencies not useful (and
1552 sometimes confusing) to the casual installer
2974be62 1553 --enable-plugins Enable support for plugins
da2f07f1 1554 --disable-largefile omit support for large files
a1220294
TT
1555 --enable-targets=TARGETS
1556 alternative target configurations
c0993dbe 1557 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1558 --disable-gdbmi disable machine-interface (MI)
1559 --enable-tui enable full-screen terminal user interface (TUI)
1560 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1561 --enable-profiling enable profiling of GDB
44cee4fd 1562 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1563 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1564 --enable-source-highlight
1565 enable source-highlight for source listings
a1220294 1566 --enable-werror treat compile warnings as errors
32c1c914 1567 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1568 --enable-gdb-build-warnings
32c1c914 1569 enable GDB specific build-time compiler warnings if
a1220294 1570 gcc is used
f35d5ade 1571 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1572 --enable-sim link gdb with simulator
496c0e1b
JB
1573 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1574 is auto)
8ecfd7bd
SDJ
1575 --enable-unit-tests Enable the inclusion of unit tests when compiling
1576 GDB
bec39cab
AC
1577
1578Optional Packages:
1579 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1580 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1581 --with-separate-debug-dir=PATH
32c1c914 1582 look for global separate debug info in this path
62e4f60c 1583 [LIBDIR/debug]
b14b1491
TT
1584 --with-gdb-datadir=PATH look for global separate data files in this path
1585 [DATADIR/gdb]
29b0e8a2 1586 --with-relocated-sources=PATH
32c1c914 1587 automatically relocate this path for source files
7349ff92 1588 --with-auto-load-dir=PATH
aff139ff 1589 directories from which to load auto-loaded scripts
1564a261 1590 [$debugdir:$datadir/auto-load]
bccbefd2 1591 --with-auto-load-safe-path=PATH
aff139ff 1592 directories safe to hold auto-loaded files
7349ff92 1593 [--with-auto-load-dir]
bccbefd2
JK
1594 --without-auto-load-safe-path
1595 do not restrict auto-loaded files locations
05e7c244 1596 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1597 --with-curses use the curses library instead of the termcap
1598 library
c16158bc
JM
1599 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1600 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1601 --with-system-zlib use installed libz
016a3251
DD
1602 --with-gnu-ld assume the C compiler uses GNU ld default=no
1603 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1604 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1605 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1606 --with-system-readline use installed readline library
b8e0a31c
SD
1607 --with-jit-reader-dir=PATH
1608 directory to load the JIT readers from
5c39566f 1609 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1610 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1611 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1612 --with-mpfr include MPFR support (auto/yes/no)
1613 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1614 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1615 --with-python[=PYTHON] include python support
1616 (auto/yes/no/<python-program>)
ed3ef339
DE
1617 --with-guile[=GUILE] include guile support
1618 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1619 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1620 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1621 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1622 --without-included-regex
1623 don't use included regex; this is the default on
1624 systems with version 2 of the GNU C library (use
1625 with caution on other system)
81ecdfbb 1626 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1627 --with-system-gdbinit=PATH
32c1c914 1628 automatically load a system-wide gdbinit file
ed2a2229
CB
1629 --with-system-gdbinit-dir=PATH
1630 automatically load system-wide gdbinit files from
1631 this directory
608e2dbb
TT
1632 --with-lzma support lzma compression (auto/yes/no)
1633 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1634 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1635 --with-tcl directory containing tcl configuration (tclConfig.sh)
1636 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1637 --with-x use the X Window System
393fd4c3
YQ
1638 --with-babeltrace include babeltrace support (auto/yes/no)
1639 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1640 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
ccb1ba62
CB
1641 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1642 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1643 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
bec39cab
AC
1644
1645Some influential environment variables:
1646 CC C compiler command
1647 CFLAGS C compiler flags
1648 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1649 nonstandard directory <lib dir>
81ecdfbb 1650 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1651 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1652 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1653 CXX C++ compiler command
1654 CXXFLAGS C++ compiler flags
bec39cab 1655 CPP C preprocessor
f06e05e0
JK
1656 MAKEINFO Parent configure detects if it is of sufficient version.
1657 MAKEINFOFLAGS
1658 Parameters for MAKEINFO.
d0ac1c44
SM
1659 YACC The `Yet Another Compiler Compiler' implementation to use.
1660 Defaults to the first program found out of: `bison -y', `byacc',
1661 `yacc'.
81ecdfbb
RW
1662 YFLAGS The list of arguments that will be passed by default to $YACC.
1663 This script will default YFLAGS to the empty string to avoid a
1664 default value of `-d' given by some make applications.
1665 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1666
1667Use these variables to override the choices made by `configure' or to help
1668it to find libraries and programs with nonstandard names/locations.
1669
81ecdfbb 1670Report bugs to the package provider.
bec39cab 1671_ACEOF
81ecdfbb 1672ac_status=$?
bec39cab
AC
1673fi
1674
1675if test "$ac_init_help" = "recursive"; then
1676 # If there are subdirs, report their specific --help.
bec39cab 1677 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1678 test -d "$ac_dir" ||
1679 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1680 continue
bec39cab
AC
1681 ac_builddir=.
1682
81ecdfbb
RW
1683case "$ac_dir" in
1684.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1685*)
1686 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1687 # A ".." for each directory in $ac_dir_suffix.
1688 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1689 case $ac_top_builddir_sub in
1690 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1691 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1692 esac ;;
1693esac
1694ac_abs_top_builddir=$ac_pwd
1695ac_abs_builddir=$ac_pwd$ac_dir_suffix
1696# for backward compatibility:
1697ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1698
1699case $srcdir in
81ecdfbb 1700 .) # We are building in place.
bec39cab 1701 ac_srcdir=.
81ecdfbb
RW
1702 ac_top_srcdir=$ac_top_builddir_sub
1703 ac_abs_top_srcdir=$ac_pwd ;;
1704 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1705 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1706 ac_top_srcdir=$srcdir
1707 ac_abs_top_srcdir=$srcdir ;;
1708 *) # Relative name.
1709 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1710 ac_top_srcdir=$ac_top_build_prefix$srcdir
1711 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1712esac
81ecdfbb 1713ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1714
81ecdfbb
RW
1715 cd "$ac_dir" || { ac_status=$?; continue; }
1716 # Check for guested configure.
1717 if test -f "$ac_srcdir/configure.gnu"; then
1718 echo &&
1719 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1720 elif test -f "$ac_srcdir/configure"; then
1721 echo &&
1722 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1723 else
81ecdfbb
RW
1724 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1725 fi || ac_status=$?
1726 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1727 done
1728fi
1729
81ecdfbb 1730test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1731if $ac_init_version; then
1732 cat <<\_ACEOF
81ecdfbb 1733configure
d0ac1c44 1734generated by GNU Autoconf 2.69
bec39cab 1735
d0ac1c44 1736Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1737This configure script is free software; the Free Software Foundation
1738gives unlimited permission to copy, distribute and modify it.
1739_ACEOF
81ecdfbb 1740 exit
bec39cab 1741fi
bec39cab 1742
81ecdfbb
RW
1743## ------------------------ ##
1744## Autoconf initialization. ##
1745## ------------------------ ##
bec39cab 1746
81ecdfbb
RW
1747# ac_fn_c_try_compile LINENO
1748# --------------------------
1749# Try to compile conftest.$ac_ext, and return whether this succeeded.
1750ac_fn_c_try_compile ()
1751{
1752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1753 rm -f conftest.$ac_objext
1754 if { { ac_try="$ac_compile"
1755case "(($ac_try" in
1756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1757 *) ac_try_echo=$ac_try;;
1758esac
1759eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1760$as_echo "$ac_try_echo"; } >&5
1761 (eval "$ac_compile") 2>conftest.err
1762 ac_status=$?
1763 if test -s conftest.err; then
1764 grep -v '^ *+' conftest.err >conftest.er1
1765 cat conftest.er1 >&5
1766 mv -f conftest.er1 conftest.err
1767 fi
1768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1769 test $ac_status = 0; } && {
1770 test -z "$ac_c_werror_flag" ||
1771 test ! -s conftest.err
1772 } && test -s conftest.$ac_objext; then :
1773 ac_retval=0
1774else
1775 $as_echo "$as_me: failed program was:" >&5
1776sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1777
81ecdfbb
RW
1778 ac_retval=1
1779fi
d0ac1c44
SM
1780 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1781 as_fn_set_status $ac_retval
81ecdfbb
RW
1782
1783} # ac_fn_c_try_compile
1784
3bc3d82a
PA
1785# ac_fn_cxx_try_compile LINENO
1786# ----------------------------
1787# Try to compile conftest.$ac_ext, and return whether this succeeded.
1788ac_fn_cxx_try_compile ()
1789{
1790 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1791 rm -f conftest.$ac_objext
1792 if { { ac_try="$ac_compile"
1793case "(($ac_try" in
1794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1795 *) ac_try_echo=$ac_try;;
1796esac
1797eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1798$as_echo "$ac_try_echo"; } >&5
1799 (eval "$ac_compile") 2>conftest.err
1800 ac_status=$?
1801 if test -s conftest.err; then
1802 grep -v '^ *+' conftest.err >conftest.er1
1803 cat conftest.er1 >&5
1804 mv -f conftest.er1 conftest.err
1805 fi
1806 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1807 test $ac_status = 0; } && {
1808 test -z "$ac_cxx_werror_flag" ||
1809 test ! -s conftest.err
1810 } && test -s conftest.$ac_objext; then :
1811 ac_retval=0
1812else
1813 $as_echo "$as_me: failed program was:" >&5
1814sed 's/^/| /' conftest.$ac_ext >&5
1815
1816 ac_retval=1
1817fi
d0ac1c44
SM
1818 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1819 as_fn_set_status $ac_retval
3bc3d82a
PA
1820
1821} # ac_fn_cxx_try_compile
1822
81ecdfbb
RW
1823# ac_fn_c_try_cpp LINENO
1824# ----------------------
1825# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1826ac_fn_c_try_cpp ()
bec39cab 1827{
81ecdfbb
RW
1828 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1829 if { { ac_try="$ac_cpp conftest.$ac_ext"
1830case "(($ac_try" in
1831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1832 *) ac_try_echo=$ac_try;;
1833esac
1834eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1835$as_echo "$ac_try_echo"; } >&5
1836 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1837 ac_status=$?
1838 if test -s conftest.err; then
1839 grep -v '^ *+' conftest.err >conftest.er1
1840 cat conftest.er1 >&5
1841 mv -f conftest.er1 conftest.err
1842 fi
1843 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1844 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1845 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1846 test ! -s conftest.err
1847 }; then :
1848 ac_retval=0
1849else
1850 $as_echo "$as_me: failed program was:" >&5
1851sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1852
81ecdfbb
RW
1853 ac_retval=1
1854fi
d0ac1c44
SM
1855 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1856 as_fn_set_status $ac_retval
bec39cab 1857
81ecdfbb 1858} # ac_fn_c_try_cpp
bec39cab 1859
81ecdfbb
RW
1860# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1861# -------------------------------------------------------
1862# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1863# the include files in INCLUDES and setting the cache variable VAR
1864# accordingly.
1865ac_fn_c_check_header_mongrel ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1868 if eval \${$3+:} false; then :
81ecdfbb
RW
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1870$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1871if eval \${$3+:} false; then :
81ecdfbb
RW
1872 $as_echo_n "(cached) " >&6
1873fi
1874eval ac_res=\$$3
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1876$as_echo "$ac_res" >&6; }
1877else
1878 # Is the header compilable?
1879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1880$as_echo_n "checking $2 usability... " >&6; }
1881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1882/* end confdefs.h. */
1883$4
1884#include <$2>
1885_ACEOF
1886if ac_fn_c_try_compile "$LINENO"; then :
1887 ac_header_compiler=yes
1888else
1889 ac_header_compiler=no
1890fi
1891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1893$as_echo "$ac_header_compiler" >&6; }
bec39cab 1894
81ecdfbb
RW
1895# Is the header present?
1896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1897$as_echo_n "checking $2 presence... " >&6; }
1898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1899/* end confdefs.h. */
1900#include <$2>
1901_ACEOF
1902if ac_fn_c_try_cpp "$LINENO"; then :
1903 ac_header_preproc=yes
1904else
1905 ac_header_preproc=no
1906fi
d0ac1c44 1907rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1909$as_echo "$ac_header_preproc" >&6; }
bec39cab 1910
81ecdfbb
RW
1911# So? What about this header?
1912case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1913 yes:no: )
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1915$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1917$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1918 ;;
1919 no:yes:* )
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1921$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1923$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1925$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1927$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1929$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1930 ;;
1931esac
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1933$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1934if eval \${$3+:} false; then :
81ecdfbb
RW
1935 $as_echo_n "(cached) " >&6
1936else
1937 eval "$3=\$ac_header_compiler"
1938fi
1939eval ac_res=\$$3
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1941$as_echo "$ac_res" >&6; }
1942fi
d0ac1c44 1943 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1944
81ecdfbb 1945} # ac_fn_c_check_header_mongrel
bec39cab 1946
81ecdfbb
RW
1947# ac_fn_c_try_run LINENO
1948# ----------------------
1949# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1950# that executables *can* be run.
1951ac_fn_c_try_run ()
1952{
1953 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954 if { { ac_try="$ac_link"
1955case "(($ac_try" in
1956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1957 *) ac_try_echo=$ac_try;;
1958esac
1959eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1960$as_echo "$ac_try_echo"; } >&5
1961 (eval "$ac_link") 2>&5
1962 ac_status=$?
1963 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1964 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1965 { { case "(($ac_try" in
1966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967 *) ac_try_echo=$ac_try;;
1968esac
1969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970$as_echo "$ac_try_echo"; } >&5
1971 (eval "$ac_try") 2>&5
1972 ac_status=$?
1973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1974 test $ac_status = 0; }; }; then :
1975 ac_retval=0
1976else
1977 $as_echo "$as_me: program exited with status $ac_status" >&5
1978 $as_echo "$as_me: failed program was:" >&5
1979sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1980
81ecdfbb
RW
1981 ac_retval=$ac_status
1982fi
1983 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1984 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1985 as_fn_set_status $ac_retval
bec39cab 1986
81ecdfbb 1987} # ac_fn_c_try_run
bec39cab 1988
81ecdfbb
RW
1989# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1990# -------------------------------------------------------
1991# Tests whether HEADER exists and can be compiled using the include files in
1992# INCLUDES, setting the cache variable VAR accordingly.
1993ac_fn_c_check_header_compile ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1997$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1998if eval \${$3+:} false; then :
81ecdfbb
RW
1999 $as_echo_n "(cached) " >&6
2000else
2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002/* end confdefs.h. */
2003$4
2004#include <$2>
bec39cab 2005_ACEOF
81ecdfbb
RW
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 eval "$3=yes"
2008else
2009 eval "$3=no"
2010fi
2011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2012fi
2013eval ac_res=\$$3
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015$as_echo "$ac_res" >&6; }
d0ac1c44 2016 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2017
81ecdfbb 2018} # ac_fn_c_check_header_compile
bec39cab 2019
2974be62
AM
2020# ac_fn_c_try_link LINENO
2021# -----------------------
2022# Try to link conftest.$ac_ext, and return whether this succeeded.
2023ac_fn_c_try_link ()
2024{
2025 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2026 rm -f conftest.$ac_objext conftest$ac_exeext
2027 if { { ac_try="$ac_link"
2028case "(($ac_try" in
2029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2030 *) ac_try_echo=$ac_try;;
2031esac
2032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2033$as_echo "$ac_try_echo"; } >&5
2034 (eval "$ac_link") 2>conftest.err
2035 ac_status=$?
2036 if test -s conftest.err; then
2037 grep -v '^ *+' conftest.err >conftest.er1
2038 cat conftest.er1 >&5
2039 mv -f conftest.er1 conftest.err
2040 fi
2041 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2042 test $ac_status = 0; } && {
2043 test -z "$ac_c_werror_flag" ||
2044 test ! -s conftest.err
2045 } && test -s conftest$ac_exeext && {
2046 test "$cross_compiling" = yes ||
d0ac1c44 2047 test -x conftest$ac_exeext
2974be62
AM
2048 }; then :
2049 ac_retval=0
2050else
2051 $as_echo "$as_me: failed program was:" >&5
2052sed 's/^/| /' conftest.$ac_ext >&5
2053
2054 ac_retval=1
2055fi
2056 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2057 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2058 # interfere with the next link command; also delete a directory that is
2059 # left behind by Apple's compiler. We do this before executing the actions.
2060 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2061 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2062 as_fn_set_status $ac_retval
2974be62
AM
2063
2064} # ac_fn_c_try_link
2065
81ecdfbb
RW
2066# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2067# --------------------------------------------
2068# Tries to find the compile-time value of EXPR in a program that includes
2069# INCLUDES, setting VAR accordingly. Returns whether the value could be
2070# computed
2071ac_fn_c_compute_int ()
2072{
2073 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2074 if test "$cross_compiling" = yes; then
2075 # Depending upon the size, compute the lo and hi bounds.
2076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077/* end confdefs.h. */
2078$4
2079int
2080main ()
2081{
2082static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2083test_array [0] = 0;
2084return test_array [0];
bec39cab 2085
81ecdfbb
RW
2086 ;
2087 return 0;
2088}
2089_ACEOF
2090if ac_fn_c_try_compile "$LINENO"; then :
2091 ac_lo=0 ac_mid=0
2092 while :; do
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2100test_array [0] = 0;
2101return test_array [0];
bec39cab 2102
81ecdfbb
RW
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid; break
2109else
2110 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2111 if test $ac_lo -le $ac_mid; then
2112 ac_lo= ac_hi=
2113 break
2114 fi
2115 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2116fi
81ecdfbb
RW
2117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118 done
c906108c 2119else
81ecdfbb
RW
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123int
2124main ()
2125{
2126static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2127test_array [0] = 0;
2128return test_array [0];
bec39cab 2129
81ecdfbb
RW
2130 ;
2131 return 0;
2132}
2133_ACEOF
2134if ac_fn_c_try_compile "$LINENO"; then :
2135 ac_hi=-1 ac_mid=-1
2136 while :; do
2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138/* end confdefs.h. */
2139$4
2140int
2141main ()
2142{
2143static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2144test_array [0] = 0;
2145return test_array [0];
bec39cab 2146
81ecdfbb
RW
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_compile "$LINENO"; then :
2152 ac_lo=$ac_mid; break
2153else
2154 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2155 if test $ac_mid -le $ac_hi; then
2156 ac_lo= ac_hi=
2157 break
2158 fi
2159 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2160fi
2161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2162 done
2163else
2164 ac_lo= ac_hi=
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167fi
2168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2169# Binary search between lo and hi bounds.
2170while test "x$ac_lo" != "x$ac_hi"; do
2171 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2173/* end confdefs.h. */
2174$4
2175int
2176main ()
2177{
2178static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2179test_array [0] = 0;
2180return test_array [0];
bec39cab 2181
81ecdfbb
RW
2182 ;
2183 return 0;
2184}
2185_ACEOF
2186if ac_fn_c_try_compile "$LINENO"; then :
2187 ac_hi=$ac_mid
2188else
2189 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2190fi
2191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192done
2193case $ac_lo in #((
2194?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2195'') ac_retval=1 ;;
2196esac
2197 else
2198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2199/* end confdefs.h. */
2200$4
2201static long int longval () { return $2; }
2202static unsigned long int ulongval () { return $2; }
2203#include <stdio.h>
2204#include <stdlib.h>
2205int
2206main ()
2207{
bec39cab 2208
81ecdfbb
RW
2209 FILE *f = fopen ("conftest.val", "w");
2210 if (! f)
2211 return 1;
2212 if (($2) < 0)
2213 {
2214 long int i = longval ();
2215 if (i != ($2))
2216 return 1;
2217 fprintf (f, "%ld", i);
2218 }
2219 else
2220 {
2221 unsigned long int i = ulongval ();
2222 if (i != ($2))
2223 return 1;
2224 fprintf (f, "%lu", i);
2225 }
2226 /* Do not output a trailing newline, as this causes \r\n confusion
2227 on some platforms. */
2228 return ferror (f) || fclose (f) != 0;
bec39cab 2229
81ecdfbb
RW
2230 ;
2231 return 0;
2232}
2233_ACEOF
2234if ac_fn_c_try_run "$LINENO"; then :
2235 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2236else
2237 ac_retval=1
2238fi
2239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2240 conftest.$ac_objext conftest.beam conftest.$ac_ext
2241rm -f conftest.val
bec39cab 2242
81ecdfbb 2243 fi
d0ac1c44
SM
2244 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2245 as_fn_set_status $ac_retval
bec39cab 2246
81ecdfbb 2247} # ac_fn_c_compute_int
bec39cab 2248
55a8c076
YQ
2249# ac_fn_c_check_func LINENO FUNC VAR
2250# ----------------------------------
2251# Tests whether FUNC exists, setting the cache variable VAR accordingly
2252ac_fn_c_check_func ()
81ecdfbb
RW
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2256$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2257if eval \${$3+:} false; then :
81ecdfbb
RW
2258 $as_echo_n "(cached) " >&6
2259else
81ecdfbb
RW
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
55a8c076
YQ
2262/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2263 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2264#define $2 innocuous_$2
2265
2266/* System header to define __stub macros and hopefully few prototypes,
2267 which can conflict with char $2 (); below.
2268 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2269 <limits.h> exists even on freestanding compilers. */
2270
2271#ifdef __STDC__
2272# include <limits.h>
2273#else
2274# include <assert.h>
2275#endif
2276
2277#undef $2
2278
2279/* Override any GCC internal prototype to avoid an error.
2280 Use char because int might match the return type of a GCC
2281 builtin and then its argument prototype would still apply. */
2282#ifdef __cplusplus
2283extern "C"
2284#endif
2285char $2 ();
2286/* The GNU C library defines this for functions which it implements
2287 to always fail with ENOSYS. Some functions are actually named
2288 something starting with __ and the normal name is an alias. */
2289#if defined __stub_$2 || defined __stub___$2
2290choke me
2291#endif
2292
2293int
2294main ()
2295{
2296return $2 ();
2297 ;
2298 return 0;
2299}
2300_ACEOF
2301if ac_fn_c_try_link "$LINENO"; then :
2302 eval "$3=yes"
2303else
2304 eval "$3=no"
2305fi
2306rm -f core conftest.err conftest.$ac_objext \
2307 conftest$ac_exeext conftest.$ac_ext
2308fi
2309eval ac_res=\$$3
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2311$as_echo "$ac_res" >&6; }
d0ac1c44 2312 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2313
2314} # ac_fn_c_check_func
2315
c56ccc05
MM
2316# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2317# ----------------------------------------------------
2318# Tries to find if the field MEMBER exists in type AGGR, after including
2319# INCLUDES, setting cache variable VAR accordingly.
2320ac_fn_c_check_member ()
2321{
2322 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2324$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2325if eval \${$4+:} false; then :
c56ccc05
MM
2326 $as_echo_n "(cached) " >&6
2327else
2328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h. */
2330$5
2331int
2332main ()
2333{
2334static $2 ac_aggr;
2335if (ac_aggr.$3)
2336return 0;
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341if ac_fn_c_try_compile "$LINENO"; then :
2342 eval "$4=yes"
2343else
2344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2345/* end confdefs.h. */
2346$5
2347int
2348main ()
2349{
2350static $2 ac_aggr;
2351if (sizeof ac_aggr.$3)
2352return 0;
2353 ;
2354 return 0;
2355}
2356_ACEOF
2357if ac_fn_c_try_compile "$LINENO"; then :
2358 eval "$4=yes"
2359else
2360 eval "$4=no"
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363fi
2364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2365fi
2366eval ac_res=\$$4
2367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2368$as_echo "$ac_res" >&6; }
d0ac1c44 2369 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2370
2371} # ac_fn_c_check_member
2372
07697489
PA
2373# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2374# -------------------------------------------
2375# Tests whether TYPE exists after having included INCLUDES, setting cache
2376# variable VAR accordingly.
2377ac_fn_c_check_type ()
2378{
2379 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2381$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2382if eval \${$3+:} false; then :
07697489
PA
2383 $as_echo_n "(cached) " >&6
2384else
2385 eval "$3=no"
2386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2387/* end confdefs.h. */
2388$4
2389int
2390main ()
2391{
2392if (sizeof ($2))
2393 return 0;
2394 ;
2395 return 0;
2396}
2397_ACEOF
2398if ac_fn_c_try_compile "$LINENO"; then :
2399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2400/* end confdefs.h. */
2401$4
2402int
2403main ()
2404{
2405if (sizeof (($2)))
2406 return 0;
2407 ;
2408 return 0;
2409}
2410_ACEOF
2411if ac_fn_c_try_compile "$LINENO"; then :
2412
2413else
2414 eval "$3=yes"
2415fi
2416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2417fi
2418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2419fi
2420eval ac_res=\$$3
2421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2422$as_echo "$ac_res" >&6; }
d0ac1c44 2423 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2424
2425} # ac_fn_c_check_type
2426
d0ac1c44
SM
2427# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2428# ---------------------------------------------
2429# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2430# accordingly.
770d76d7
PA
2431ac_fn_c_check_decl ()
2432{
2433 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2434 as_decl_name=`echo $2|sed 's/ *(.*//'`
2435 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2437$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2438if eval \${$3+:} false; then :
770d76d7
PA
2439 $as_echo_n "(cached) " >&6
2440else
2441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2442/* end confdefs.h. */
2443$4
2444int
2445main ()
2446{
2447#ifndef $as_decl_name
2448#ifdef __cplusplus
2449 (void) $as_decl_use;
2450#else
2451 (void) $as_decl_name;
2452#endif
2453#endif
2454
2455 ;
2456 return 0;
2457}
2458_ACEOF
2459if ac_fn_c_try_compile "$LINENO"; then :
2460 eval "$3=yes"
2461else
2462 eval "$3=no"
2463fi
2464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2465fi
2466eval ac_res=\$$3
2467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2468$as_echo "$ac_res" >&6; }
d0ac1c44 2469 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2470
2471} # ac_fn_c_check_decl
f35d5ade
TT
2472
2473# ac_fn_cxx_try_link LINENO
2474# -------------------------
2475# Try to link conftest.$ac_ext, and return whether this succeeded.
2476ac_fn_cxx_try_link ()
2477{
2478 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2479 rm -f conftest.$ac_objext conftest$ac_exeext
2480 if { { ac_try="$ac_link"
2481case "(($ac_try" in
2482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2483 *) ac_try_echo=$ac_try;;
2484esac
2485eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2486$as_echo "$ac_try_echo"; } >&5
2487 (eval "$ac_link") 2>conftest.err
2488 ac_status=$?
2489 if test -s conftest.err; then
2490 grep -v '^ *+' conftest.err >conftest.er1
2491 cat conftest.er1 >&5
2492 mv -f conftest.er1 conftest.err
2493 fi
2494 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2495 test $ac_status = 0; } && {
2496 test -z "$ac_cxx_werror_flag" ||
2497 test ! -s conftest.err
2498 } && test -s conftest$ac_exeext && {
2499 test "$cross_compiling" = yes ||
2500 test -x conftest$ac_exeext
2501 }; then :
2502 ac_retval=0
2503else
2504 $as_echo "$as_me: failed program was:" >&5
2505sed 's/^/| /' conftest.$ac_ext >&5
2506
2507 ac_retval=1
2508fi
2509 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2510 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2511 # interfere with the next link command; also delete a directory that is
2512 # left behind by Apple's compiler. We do this before executing the actions.
2513 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2514 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2515 as_fn_set_status $ac_retval
2516
2517} # ac_fn_cxx_try_link
81ecdfbb
RW
2518cat >config.log <<_ACEOF
2519This file contains any messages produced by compilers while
2520running configure, to aid debugging if configure makes a mistake.
d5af19ba 2521
81ecdfbb 2522It was created by $as_me, which was
d0ac1c44 2523generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2524
81ecdfbb 2525 $ $0 $@
413ccac7 2526
81ecdfbb
RW
2527_ACEOF
2528exec 5>>config.log
2529{
2530cat <<_ASUNAME
2531## --------- ##
2532## Platform. ##
2533## --------- ##
413ccac7 2534
81ecdfbb
RW
2535hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2536uname -m = `(uname -m) 2>/dev/null || echo unknown`
2537uname -r = `(uname -r) 2>/dev/null || echo unknown`
2538uname -s = `(uname -s) 2>/dev/null || echo unknown`
2539uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2540
81ecdfbb
RW
2541/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2542/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2543
81ecdfbb
RW
2544/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2545/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2546/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2547/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2548/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2549/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2550/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2551
81ecdfbb 2552_ASUNAME
bec39cab 2553
bec39cab
AC
2554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2555for as_dir in $PATH
2556do
2557 IFS=$as_save_IFS
2558 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2559 $as_echo "PATH: $as_dir"
2560 done
2561IFS=$as_save_IFS
bec39cab 2562
81ecdfbb 2563} >&5
bec39cab 2564
81ecdfbb 2565cat >&5 <<_ACEOF
bec39cab 2566
bec39cab 2567
81ecdfbb
RW
2568## ----------- ##
2569## Core tests. ##
2570## ----------- ##
2571
2572_ACEOF
2573
2574
2575# Keep a trace of the command line.
2576# Strip out --no-create and --no-recursion so they do not pile up.
2577# Strip out --silent because we don't want to record it for future runs.
2578# Also quote any args containing shell meta-characters.
2579# Make two passes to allow for proper duplicate-argument suppression.
2580ac_configure_args=
2581ac_configure_args0=
2582ac_configure_args1=
2583ac_must_keep_next=false
2584for ac_pass in 1 2
2585do
2586 for ac_arg
2587 do
2588 case $ac_arg in
2589 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2590 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2591 | -silent | --silent | --silen | --sile | --sil)
2592 continue ;;
2593 *\'*)
2594 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2595 esac
2596 case $ac_pass in
2597 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2598 2)
2599 as_fn_append ac_configure_args1 " '$ac_arg'"
2600 if test $ac_must_keep_next = true; then
2601 ac_must_keep_next=false # Got value, back to normal.
2602 else
2603 case $ac_arg in
2604 *=* | --config-cache | -C | -disable-* | --disable-* \
2605 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2606 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2607 | -with-* | --with-* | -without-* | --without-* | --x)
2608 case "$ac_configure_args0 " in
2609 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2610 esac
2611 ;;
2612 -* ) ac_must_keep_next=true ;;
2613 esac
2614 fi
2615 as_fn_append ac_configure_args " '$ac_arg'"
2616 ;;
2617 esac
2618 done
2619done
2620{ ac_configure_args0=; unset ac_configure_args0;}
2621{ ac_configure_args1=; unset ac_configure_args1;}
2622
2623# When interrupted or exit'd, cleanup temporary files, and complete
2624# config.log. We remove comments because anyway the quotes in there
2625# would cause problems or look ugly.
2626# WARNING: Use '\'' to represent an apostrophe within the trap.
2627# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2628trap 'exit_status=$?
2629 # Save into config.log some information that might help in debugging.
2630 {
2631 echo
2632
d0ac1c44 2633 $as_echo "## ---------------- ##
81ecdfbb 2634## Cache variables. ##
d0ac1c44 2635## ---------------- ##"
81ecdfbb
RW
2636 echo
2637 # The following way of writing the cache mishandles newlines in values,
2638(
2639 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2640 eval ac_val=\$$ac_var
2641 case $ac_val in #(
2642 *${as_nl}*)
2643 case $ac_var in #(
2644 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2645$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2646 esac
2647 case $ac_var in #(
2648 _ | IFS | as_nl) ;; #(
2649 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2650 *) { eval $ac_var=; unset $ac_var;} ;;
2651 esac ;;
2652 esac
2653 done
2654 (set) 2>&1 |
2655 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2656 *${as_nl}ac_space=\ *)
2657 sed -n \
2658 "s/'\''/'\''\\\\'\'''\''/g;
2659 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2660 ;; #(
2661 *)
2662 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2663 ;;
2664 esac |
2665 sort
2666)
2667 echo
2668
d0ac1c44 2669 $as_echo "## ----------------- ##
81ecdfbb 2670## Output variables. ##
d0ac1c44 2671## ----------------- ##"
81ecdfbb
RW
2672 echo
2673 for ac_var in $ac_subst_vars
2674 do
2675 eval ac_val=\$$ac_var
2676 case $ac_val in
2677 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2678 esac
2679 $as_echo "$ac_var='\''$ac_val'\''"
2680 done | sort
2681 echo
2682
2683 if test -n "$ac_subst_files"; then
d0ac1c44 2684 $as_echo "## ------------------- ##
81ecdfbb 2685## File substitutions. ##
d0ac1c44 2686## ------------------- ##"
81ecdfbb
RW
2687 echo
2688 for ac_var in $ac_subst_files
2689 do
2690 eval ac_val=\$$ac_var
2691 case $ac_val in
2692 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2693 esac
2694 $as_echo "$ac_var='\''$ac_val'\''"
2695 done | sort
2696 echo
2697 fi
2698
2699 if test -s confdefs.h; then
d0ac1c44 2700 $as_echo "## ----------- ##
81ecdfbb 2701## confdefs.h. ##
d0ac1c44 2702## ----------- ##"
81ecdfbb
RW
2703 echo
2704 cat confdefs.h
2705 echo
2706 fi
2707 test "$ac_signal" != 0 &&
2708 $as_echo "$as_me: caught signal $ac_signal"
2709 $as_echo "$as_me: exit $exit_status"
2710 } >&5
2711 rm -f core *.core core.conftest.* &&
2712 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2713 exit $exit_status
2714' 0
2715for ac_signal in 1 2 13 15; do
2716 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2717done
2718ac_signal=0
2719
2720# confdefs.h avoids OS command line length limits that DEFS can exceed.
2721rm -f -r conftest* confdefs.h
2722
2723$as_echo "/* confdefs.h */" > confdefs.h
2724
2725# Predefined preprocessor variables.
2726
2727cat >>confdefs.h <<_ACEOF
2728#define PACKAGE_NAME "$PACKAGE_NAME"
2729_ACEOF
2730
2731cat >>confdefs.h <<_ACEOF
2732#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2733_ACEOF
2734
2735cat >>confdefs.h <<_ACEOF
2736#define PACKAGE_VERSION "$PACKAGE_VERSION"
2737_ACEOF
2738
2739cat >>confdefs.h <<_ACEOF
2740#define PACKAGE_STRING "$PACKAGE_STRING"
2741_ACEOF
2742
2743cat >>confdefs.h <<_ACEOF
2744#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2745_ACEOF
2746
2747cat >>confdefs.h <<_ACEOF
2748#define PACKAGE_URL "$PACKAGE_URL"
2749_ACEOF
2750
2751
2752# Let the site file select an alternate cache file if it wants to.
2753# Prefer an explicitly selected file to automatically selected ones.
2754ac_site_file1=NONE
2755ac_site_file2=NONE
2756if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2757 # We do not want a PATH search for config.site.
2758 case $CONFIG_SITE in #((
2759 -*) ac_site_file1=./$CONFIG_SITE;;
2760 */*) ac_site_file1=$CONFIG_SITE;;
2761 *) ac_site_file1=./$CONFIG_SITE;;
2762 esac
81ecdfbb
RW
2763elif test "x$prefix" != xNONE; then
2764 ac_site_file1=$prefix/share/config.site
2765 ac_site_file2=$prefix/etc/config.site
2766else
2767 ac_site_file1=$ac_default_prefix/share/config.site
2768 ac_site_file2=$ac_default_prefix/etc/config.site
2769fi
2770for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2771do
2772 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2773 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2775$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2776 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2777 . "$ac_site_file" \
2778 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2780as_fn_error $? "failed to load site script $ac_site_file
2781See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2782 fi
2783done
2784
2785if test -r "$cache_file"; then
d0ac1c44
SM
2786 # Some versions of bash will fail to source /dev/null (special files
2787 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2788 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2789 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2790$as_echo "$as_me: loading cache $cache_file" >&6;}
2791 case $cache_file in
2792 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2793 *) . "./$cache_file";;
2794 esac
2795 fi
2796else
2797 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2798$as_echo "$as_me: creating cache $cache_file" >&6;}
2799 >$cache_file
bec39cab
AC
2800fi
2801
d0ac1c44
SM
2802as_fn_append ac_header_list " stdlib.h"
2803as_fn_append ac_header_list " unistd.h"
2804as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2805# Check that the precious variables saved in the cache have kept the same
2806# value.
2807ac_cache_corrupted=false
2808for ac_var in $ac_precious_vars; do
2809 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2810 eval ac_new_set=\$ac_env_${ac_var}_set
2811 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2812 eval ac_new_val=\$ac_env_${ac_var}_value
2813 case $ac_old_set,$ac_new_set in
2814 set,)
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2816$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2817 ac_cache_corrupted=: ;;
2818 ,set)
2819 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2820$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2821 ac_cache_corrupted=: ;;
2822 ,);;
2823 *)
2824 if test "x$ac_old_val" != "x$ac_new_val"; then
2825 # differences in whitespace do not lead to failure.
2826 ac_old_val_w=`echo x $ac_old_val`
2827 ac_new_val_w=`echo x $ac_new_val`
2828 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2829 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2830$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2831 ac_cache_corrupted=:
2832 else
2833 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2834$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2835 eval $ac_var=\$ac_old_val
2836 fi
2837 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2838$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2839 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2840$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2841 fi;;
2842 esac
2843 # Pass precious variables to config.status.
2844 if test "$ac_new_set" = set; then
2845 case $ac_new_val in
2846 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2847 *) ac_arg=$ac_var=$ac_new_val ;;
2848 esac
2849 case " $ac_configure_args " in
2850 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2851 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2852 esac
2853 fi
2854done
2855if $ac_cache_corrupted; then
2856 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2857$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2858 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2859$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2860 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2861fi
2862## -------------------- ##
2863## Main body of script. ##
2864## -------------------- ##
2865
2866ac_ext=c
2867ac_cpp='$CPP $CPPFLAGS'
2868ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2869ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2870ac_compiler_gnu=$ac_cv_c_compiler_gnu
2871
2872
2873
2874
2875
2876ac_config_headers="$ac_config_headers config.h:config.in"
2877
2878
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2880$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2881 # Check whether --enable-maintainer-mode was given.
2882if test "${enable_maintainer_mode+set}" = set; then :
2883 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2884else
2885 USE_MAINTAINER_MODE=no
2886fi
2887
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2889$as_echo "$USE_MAINTAINER_MODE" >&6; }
2890 if test $USE_MAINTAINER_MODE = yes; then
2891 MAINTAINER_MODE_TRUE=
2892 MAINTAINER_MODE_FALSE='#'
2893else
2894 MAINTAINER_MODE_TRUE='#'
2895 MAINTAINER_MODE_FALSE=
2896fi
2897
2898 MAINT=$MAINTAINER_MODE_TRUE
2899
2900
2901
17ef446e 2902# Set the 'development' global.
270c9937 2903. $srcdir/../bfd/development.sh
f5f1cdb6 2904
81ecdfbb
RW
2905ac_ext=c
2906ac_cpp='$CPP $CPPFLAGS'
2907ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2908ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2909ac_compiler_gnu=$ac_cv_c_compiler_gnu
2910if test -n "$ac_tool_prefix"; then
2911 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2912set dummy ${ac_tool_prefix}gcc; ac_word=$2
2913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2914$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2915if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2916 $as_echo_n "(cached) " >&6
c906108c
SS
2917else
2918 if test -n "$CC"; then
2919 ac_cv_prog_CC="$CC" # Let the user override the test.
2920else
bec39cab
AC
2921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2922for as_dir in $PATH
2923do
2924 IFS=$as_save_IFS
2925 test -z "$as_dir" && as_dir=.
81ecdfbb 2926 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2928 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2930 break 2
2931 fi
2932done
81ecdfbb
RW
2933 done
2934IFS=$as_save_IFS
bec39cab 2935
c906108c
SS
2936fi
2937fi
bec39cab 2938CC=$ac_cv_prog_CC
c906108c 2939if test -n "$CC"; then
81ecdfbb
RW
2940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2941$as_echo "$CC" >&6; }
c906108c 2942else
81ecdfbb
RW
2943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2944$as_echo "no" >&6; }
c906108c
SS
2945fi
2946
81ecdfbb 2947
b4e70030
JB
2948fi
2949if test -z "$ac_cv_prog_CC"; then
2950 ac_ct_CC=$CC
81ecdfbb
RW
2951 # Extract the first word of "gcc", so it can be a program name with args.
2952set dummy gcc; ac_word=$2
2953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2954$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2955if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2956 $as_echo_n "(cached) " >&6
b4e70030
JB
2957else
2958 if test -n "$ac_ct_CC"; then
2959 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2960else
2961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2962for as_dir in $PATH
2963do
2964 IFS=$as_save_IFS
2965 test -z "$as_dir" && as_dir=.
81ecdfbb 2966 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2968 ac_cv_prog_ac_ct_CC="gcc"
2969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2970 break 2
4e8d927d 2971 fi
b4e70030 2972done
81ecdfbb
RW
2973 done
2974IFS=$as_save_IFS
b4e70030
JB
2975
2976fi
2977fi
2978ac_ct_CC=$ac_cv_prog_ac_ct_CC
2979if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2981$as_echo "$ac_ct_CC" >&6; }
b4e70030 2982else
81ecdfbb
RW
2983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2984$as_echo "no" >&6; }
b4e70030
JB
2985fi
2986
81ecdfbb
RW
2987 if test "x$ac_ct_CC" = x; then
2988 CC=""
2989 else
2990 case $cross_compiling:$ac_tool_warned in
2991yes:)
2992{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2993$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2994ac_tool_warned=yes ;;
2995esac
2996 CC=$ac_ct_CC
2997 fi
b4e70030
JB
2998else
2999 CC="$ac_cv_prog_CC"
3000fi
3001
c906108c 3002if test -z "$CC"; then
81ecdfbb
RW
3003 if test -n "$ac_tool_prefix"; then
3004 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3005set dummy ${ac_tool_prefix}cc; ac_word=$2
3006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3007$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3008if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3009 $as_echo_n "(cached) " >&6
c906108c
SS
3010else
3011 if test -n "$CC"; then
3012 ac_cv_prog_CC="$CC" # Let the user override the test.
3013else
bec39cab
AC
3014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3015for as_dir in $PATH
3016do
3017 IFS=$as_save_IFS
3018 test -z "$as_dir" && as_dir=.
81ecdfbb 3019 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3020 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3021 ac_cv_prog_CC="${ac_tool_prefix}cc"
3022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3023 break 2
3024 fi
3025done
81ecdfbb
RW
3026 done
3027IFS=$as_save_IFS
3028
3029fi
3030fi
3031CC=$ac_cv_prog_CC
3032if test -n "$CC"; then
3033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3034$as_echo "$CC" >&6; }
3035else
3036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3037$as_echo "no" >&6; }
3038fi
3039
3040
3041 fi
3042fi
3043if test -z "$CC"; then
3044 # Extract the first word of "cc", so it can be a program name with args.
3045set dummy cc; ac_word=$2
3046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3047$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3048if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3049 $as_echo_n "(cached) " >&6
3050else
3051 if test -n "$CC"; then
3052 ac_cv_prog_CC="$CC" # Let the user override the test.
3053else
3054 ac_prog_rejected=no
3055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3056for as_dir in $PATH
3057do
3058 IFS=$as_save_IFS
3059 test -z "$as_dir" && as_dir=.
3060 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3062 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3063 ac_prog_rejected=yes
3064 continue
3065 fi
3066 ac_cv_prog_CC="cc"
3067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3068 break 2
3069 fi
3070done
3071 done
3072IFS=$as_save_IFS
bec39cab 3073
c906108c
SS
3074if test $ac_prog_rejected = yes; then
3075 # We found a bogon in the path, so make sure we never use it.
3076 set dummy $ac_cv_prog_CC
3077 shift
bec39cab 3078 if test $# != 0; then
c906108c
SS
3079 # We chose a different compiler from the bogus one.
3080 # However, it has the same basename, so the bogon will be chosen
3081 # first if we set CC to just the basename; use the full file name.
3082 shift
bec39cab 3083 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3084 fi
3085fi
3086fi
3087fi
bec39cab 3088CC=$ac_cv_prog_CC
c906108c 3089if test -n "$CC"; then
81ecdfbb
RW
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3091$as_echo "$CC" >&6; }
c906108c 3092else
81ecdfbb
RW
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3094$as_echo "no" >&6; }
c906108c
SS
3095fi
3096
81ecdfbb 3097
bec39cab
AC
3098fi
3099if test -z "$CC"; then
3100 if test -n "$ac_tool_prefix"; then
81ecdfbb 3101 for ac_prog in cl.exe
bec39cab
AC
3102 do
3103 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3104set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3106$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3107if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3108 $as_echo_n "(cached) " >&6
c906108c
SS
3109else
3110 if test -n "$CC"; then
3111 ac_cv_prog_CC="$CC" # Let the user override the test.
3112else
bec39cab
AC
3113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3114for as_dir in $PATH
3115do
3116 IFS=$as_save_IFS
3117 test -z "$as_dir" && as_dir=.
81ecdfbb 3118 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3119 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3120 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3122 break 2
3123 fi
3124done
81ecdfbb
RW
3125 done
3126IFS=$as_save_IFS
bec39cab 3127
c906108c
SS
3128fi
3129fi
bec39cab 3130CC=$ac_cv_prog_CC
c906108c 3131if test -n "$CC"; then
81ecdfbb
RW
3132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3133$as_echo "$CC" >&6; }
c906108c 3134else
81ecdfbb
RW
3135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3136$as_echo "no" >&6; }
c906108c 3137fi
bec39cab 3138
81ecdfbb 3139
bec39cab
AC
3140 test -n "$CC" && break
3141 done
3142fi
3143if test -z "$CC"; then
3144 ac_ct_CC=$CC
81ecdfbb 3145 for ac_prog in cl.exe
bec39cab
AC
3146do
3147 # Extract the first word of "$ac_prog", so it can be a program name with args.
3148set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3150$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3151if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3152 $as_echo_n "(cached) " >&6
bec39cab
AC
3153else
3154 if test -n "$ac_ct_CC"; then
3155 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3156else
3157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3158for as_dir in $PATH
3159do
3160 IFS=$as_save_IFS
3161 test -z "$as_dir" && as_dir=.
81ecdfbb 3162 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3163 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3164 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3165 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3166 break 2
c906108c 3167 fi
bec39cab 3168done
81ecdfbb
RW
3169 done
3170IFS=$as_save_IFS
bec39cab
AC
3171
3172fi
3173fi
3174ac_ct_CC=$ac_cv_prog_ac_ct_CC
3175if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3177$as_echo "$ac_ct_CC" >&6; }
bec39cab 3178else
81ecdfbb
RW
3179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3180$as_echo "no" >&6; }
c906108c
SS
3181fi
3182
81ecdfbb 3183
bec39cab
AC
3184 test -n "$ac_ct_CC" && break
3185done
c906108c 3186
81ecdfbb
RW
3187 if test "x$ac_ct_CC" = x; then
3188 CC=""
3189 else
3190 case $cross_compiling:$ac_tool_warned in
3191yes:)
3192{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3193$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3194ac_tool_warned=yes ;;
3195esac
3196 CC=$ac_ct_CC
3197 fi
bec39cab
AC
3198fi
3199
3200fi
3201
3202
81ecdfbb
RW
3203test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3204$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3205as_fn_error $? "no acceptable C compiler found in \$PATH
3206See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3207
3208# Provide some information about the compiler.
81ecdfbb
RW
3209$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3210set X $ac_compile
3211ac_compiler=$2
3212for ac_option in --version -v -V -qversion; do
3213 { { ac_try="$ac_compiler $ac_option >&5"
3214case "(($ac_try" in
3215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3216 *) ac_try_echo=$ac_try;;
3217esac
3218eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3219$as_echo "$ac_try_echo"; } >&5
3220 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3221 ac_status=$?
81ecdfbb
RW
3222 if test -s conftest.err; then
3223 sed '10a\
3224... rest of stderr output deleted ...
3225 10q' conftest.err >conftest.er1
3226 cat conftest.er1 >&5
81ecdfbb 3227 fi
d0ac1c44 3228 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3229 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3230 test $ac_status = 0; }
3231done
bec39cab 3232
81ecdfbb 3233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3234/* end confdefs.h. */
3235
3236int
3237main ()
3238{
3239
3240 ;
3241 return 0;
3242}
3243_ACEOF
3244ac_clean_files_save=$ac_clean_files
d0ac1c44 3245ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3246# Try to create an executable without -o first, disregard a.out.
3247# It will help us diagnose broken compilers, and finding out an intuition
3248# of exeext.
d0ac1c44
SM
3249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3250$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3251ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3252
3253# The possible output files:
3254ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3255
3256ac_rmfiles=
3257for ac_file in $ac_files
3258do
3259 case $ac_file in
3260 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3261 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3262 esac
3263done
3264rm -f $ac_rmfiles
3265
3266if { { ac_try="$ac_link_default"
3267case "(($ac_try" in
3268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3269 *) ac_try_echo=$ac_try;;
3270esac
3271eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3272$as_echo "$ac_try_echo"; } >&5
3273 (eval "$ac_link_default") 2>&5
3274 ac_status=$?
3275 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3276 test $ac_status = 0; }; then :
3277 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3278# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3279# in a Makefile. We should not override ac_cv_exeext if it was cached,
3280# so that the user can short-circuit this test for compilers unknown to
3281# Autoconf.
3282for ac_file in $ac_files ''
bec39cab
AC
3283do
3284 test -f "$ac_file" || continue
3285 case $ac_file in
81ecdfbb 3286 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3287 ;;
3288 [ab].out )
3289 # We found the default executable, but exeext='' is most
3290 # certainly right.
3291 break;;
3292 *.* )
81ecdfbb
RW
3293 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3294 then :; else
3295 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3296 fi
3297 # We set ac_cv_exeext here because the later test for it is not
3298 # safe: cross compilers may not add the suffix if given an `-o'
3299 # argument, so we may need to know it at that point already.
3300 # Even if this section looks crufty: it has the advantage of
3301 # actually working.
b4e70030
JB
3302 break;;
3303 * )
3304 break;;
bec39cab
AC
3305 esac
3306done
81ecdfbb
RW
3307test "$ac_cv_exeext" = no && ac_cv_exeext=
3308
bec39cab 3309else
81ecdfbb
RW
3310 ac_file=''
3311fi
81ecdfbb 3312if test -z "$ac_file"; then :
d0ac1c44
SM
3313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3314$as_echo "no" >&6; }
3315$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3316sed 's/^/| /' conftest.$ac_ext >&5
3317
81ecdfbb
RW
3318{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3320as_fn_error 77 "C compiler cannot create executables
3321See \`config.log' for more details" "$LINENO" 5; }
3322else
3323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3324$as_echo "yes" >&6; }
bec39cab 3325fi
d0ac1c44
SM
3326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3327$as_echo_n "checking for C compiler default output file name... " >&6; }
3328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3329$as_echo "$ac_file" >&6; }
b4e70030 3330ac_exeext=$ac_cv_exeext
b4e70030 3331
d0ac1c44 3332rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3333ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3335$as_echo_n "checking for suffix of executables... " >&6; }
3336if { { ac_try="$ac_link"
3337case "(($ac_try" in
3338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3339 *) ac_try_echo=$ac_try;;
3340esac
3341eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3342$as_echo "$ac_try_echo"; } >&5
3343 (eval "$ac_link") 2>&5
bec39cab 3344 ac_status=$?
81ecdfbb
RW
3345 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3346 test $ac_status = 0; }; then :
b4e70030
JB
3347 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3348# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3349# work properly (i.e., refer to `conftest.exe'), while it won't with
3350# `rm'.
3351for ac_file in conftest.exe conftest conftest.*; do
3352 test -f "$ac_file" || continue
3353 case $ac_file in
81ecdfbb 3354 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3355 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3356 break;;
3357 * ) break;;
3358 esac
3359done
c906108c 3360else
81ecdfbb
RW
3361 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3362$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3363as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3364See \`config.log' for more details" "$LINENO" 5; }
c906108c 3365fi
d0ac1c44 3366rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3368$as_echo "$ac_cv_exeext" >&6; }
c906108c 3369
b4e70030 3370rm -f conftest.$ac_ext
bec39cab
AC
3371EXEEXT=$ac_cv_exeext
3372ac_exeext=$EXEEXT
d0ac1c44
SM
3373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3374/* end confdefs.h. */
3375#include <stdio.h>
3376int
3377main ()
3378{
3379FILE *f = fopen ("conftest.out", "w");
3380 return ferror (f) || fclose (f) != 0;
3381
3382 ;
3383 return 0;
3384}
3385_ACEOF
3386ac_clean_files="$ac_clean_files conftest.out"
3387# Check that the compiler produces executables we can run. If not, either
3388# the compiler is broken, or we cross compile.
3389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3390$as_echo_n "checking whether we are cross compiling... " >&6; }
3391if test "$cross_compiling" != yes; then
3392 { { ac_try="$ac_link"
3393case "(($ac_try" in
3394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3395 *) ac_try_echo=$ac_try;;
3396esac
3397eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3398$as_echo "$ac_try_echo"; } >&5
3399 (eval "$ac_link") 2>&5
3400 ac_status=$?
3401 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3402 test $ac_status = 0; }
3403 if { ac_try='./conftest$ac_cv_exeext'
3404 { { case "(($ac_try" in
3405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3406 *) ac_try_echo=$ac_try;;
3407esac
3408eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3409$as_echo "$ac_try_echo"; } >&5
3410 (eval "$ac_try") 2>&5
3411 ac_status=$?
3412 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3413 test $ac_status = 0; }; }; then
3414 cross_compiling=no
3415 else
3416 if test "$cross_compiling" = maybe; then
3417 cross_compiling=yes
3418 else
3419 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3420$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3421as_fn_error $? "cannot run C compiled programs.
3422If you meant to cross compile, use \`--host'.
3423See \`config.log' for more details" "$LINENO" 5; }
3424 fi
3425 fi
3426fi
3427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3428$as_echo "$cross_compiling" >&6; }
3429
3430rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3431ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3433$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3434if ${ac_cv_objext+:} false; then :
81ecdfbb 3435 $as_echo_n "(cached) " >&6
bec39cab 3436else
81ecdfbb 3437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3438/* end confdefs.h. */
3439
3440int
3441main ()
3442{
3443
3444 ;
3445 return 0;
3446}
3447_ACEOF
3448rm -f conftest.o conftest.obj
81ecdfbb
RW
3449if { { ac_try="$ac_compile"
3450case "(($ac_try" in
3451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3452 *) ac_try_echo=$ac_try;;
3453esac
3454eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3455$as_echo "$ac_try_echo"; } >&5
3456 (eval "$ac_compile") 2>&5
3457 ac_status=$?
3458 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3459 test $ac_status = 0; }; then :
3460 for ac_file in conftest.o conftest.obj conftest.*; do
3461 test -f "$ac_file" || continue;
bec39cab 3462 case $ac_file in
81ecdfbb 3463 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3464 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3465 break;;
3466 esac
3467done
c906108c 3468else
81ecdfbb 3469 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3470sed 's/^/| /' conftest.$ac_ext >&5
3471
81ecdfbb
RW
3472{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3473$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3474as_fn_error $? "cannot compute suffix of object files: cannot compile
3475See \`config.log' for more details" "$LINENO" 5; }
c906108c 3476fi
b4e70030 3477rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3478fi
81ecdfbb
RW
3479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3480$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3481OBJEXT=$ac_cv_objext
3482ac_objext=$OBJEXT
81ecdfbb
RW
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3484$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3485if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3486 $as_echo_n "(cached) " >&6
c906108c 3487else
81ecdfbb 3488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3489/* end confdefs.h. */
3490
3491int
3492main ()
3493{
3494#ifndef __GNUC__
3495 choke me
3496#endif
3497
3498 ;
3499 return 0;
3500}
3501_ACEOF
81ecdfbb 3502if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3503 ac_compiler_gnu=yes
3504else
81ecdfbb 3505 ac_compiler_gnu=no
bec39cab 3506fi
81ecdfbb 3507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3508ac_cv_c_compiler_gnu=$ac_compiler_gnu
3509
3510fi
81ecdfbb
RW
3511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3512$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3513if test $ac_compiler_gnu = yes; then
3514 GCC=yes
3515else
3516 GCC=
3517fi
bec39cab
AC
3518ac_test_CFLAGS=${CFLAGS+set}
3519ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3521$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3522if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3523 $as_echo_n "(cached) " >&6
bec39cab 3524else
81ecdfbb
RW
3525 ac_save_c_werror_flag=$ac_c_werror_flag
3526 ac_c_werror_flag=yes
3527 ac_cv_prog_cc_g=no
3528 CFLAGS="-g"
3529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3530/* end confdefs.h. */
3531
3532int
3533main ()
3534{
3535
3536 ;
3537 return 0;
3538}
3539_ACEOF
81ecdfbb 3540if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3541 ac_cv_prog_cc_g=yes
3542else
81ecdfbb
RW
3543 CFLAGS=""
3544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3545/* end confdefs.h. */
3546
3547int
3548main ()
3549{
3550
3551 ;
3552 return 0;
3553}
3554_ACEOF
3555if ac_fn_c_try_compile "$LINENO"; then :
3556
3557else
3558 ac_c_werror_flag=$ac_save_c_werror_flag
3559 CFLAGS="-g"
3560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3561/* end confdefs.h. */
3562
3563int
3564main ()
3565{
c906108c 3566
81ecdfbb
RW
3567 ;
3568 return 0;
3569}
3570_ACEOF
3571if ac_fn_c_try_compile "$LINENO"; then :
3572 ac_cv_prog_cc_g=yes
3573fi
3574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3575fi
3576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3577fi
81ecdfbb
RW
3578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3579 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3580fi
81ecdfbb
RW
3581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3582$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3583if test "$ac_test_CFLAGS" = set; then
bec39cab 3584 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3585elif test $ac_cv_prog_cc_g = yes; then
3586 if test "$GCC" = yes; then
3587 CFLAGS="-g -O2"
3588 else
3589 CFLAGS="-g"
3590 fi
3591else
3592 if test "$GCC" = yes; then
3593 CFLAGS="-O2"
3594 else
3595 CFLAGS=
3596 fi
3597fi
81ecdfbb
RW
3598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3599$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3600if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3601 $as_echo_n "(cached) " >&6
bec39cab 3602else
81ecdfbb 3603 ac_cv_prog_cc_c89=no
bec39cab 3604ac_save_CC=$CC
81ecdfbb 3605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3606/* end confdefs.h. */
c906108c
SS
3607#include <stdarg.h>
3608#include <stdio.h>
d0ac1c44 3609struct stat;
c906108c
SS
3610/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3611struct buf { int x; };
3612FILE * (*rcsopen) (struct buf *, struct stat *, int);
3613static char *e (p, i)
3614 char **p;
3615 int i;
3616{
3617 return p[i];
3618}
3619static char *f (char * (*g) (char **, int), char **p, ...)
3620{
3621 char *s;
3622 va_list v;
3623 va_start (v,p);
3624 s = g (p, va_arg (v,int));
3625 va_end (v);
3626 return s;
3627}
bec39cab
AC
3628
3629/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3630 function prototypes and stuff, but not '\xHH' hex character constants.
3631 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3632 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3633 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3634 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3635 that's true only with -std. */
bec39cab
AC
3636int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3637
81ecdfbb
RW
3638/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3639 inside strings and character constants. */
3640#define FOO(x) 'x'
3641int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3642
c906108c
SS
3643int test (int i, double x);
3644struct s1 {int (*f) (int a);};
3645struct s2 {int (*f) (double a);};
3646int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3647int argc;
3648char **argv;
bec39cab
AC
3649int
3650main ()
3651{
c906108c 3652return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3653 ;
3654 return 0;
3655}
3656_ACEOF
81ecdfbb
RW
3657for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3658 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3659do
3660 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3661 if ac_fn_c_try_compile "$LINENO"; then :
3662 ac_cv_prog_cc_c89=$ac_arg
c906108c 3663fi
81ecdfbb
RW
3664rm -f core conftest.err conftest.$ac_objext
3665 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3666done
81ecdfbb 3667rm -f conftest.$ac_ext
bec39cab 3668CC=$ac_save_CC
c906108c
SS
3669
3670fi
81ecdfbb
RW
3671# AC_CACHE_VAL
3672case "x$ac_cv_prog_cc_c89" in
3673 x)
3674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3675$as_echo "none needed" >&6; } ;;
3676 xno)
3677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3678$as_echo "unsupported" >&6; } ;;
bec39cab 3679 *)
81ecdfbb
RW
3680 CC="$CC $ac_cv_prog_cc_c89"
3681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3682$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3683esac
81ecdfbb 3684if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3685
b4e70030
JB
3686fi
3687
bec39cab
AC
3688ac_ext=c
3689ac_cpp='$CPP $CPPFLAGS'
3690ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3691ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3692ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3693
3bc3d82a
PA
3694ac_ext=cpp
3695ac_cpp='$CXXCPP $CPPFLAGS'
3696ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3697ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3698ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3699if test -z "$CXX"; then
3700 if test -n "$CCC"; then
3701 CXX=$CCC
3702 else
3703 if test -n "$ac_tool_prefix"; then
3704 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3705 do
3706 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3707set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3709$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3710if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3711 $as_echo_n "(cached) " >&6
3712else
3713 if test -n "$CXX"; then
3714 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3715else
3716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3717for as_dir in $PATH
3718do
3719 IFS=$as_save_IFS
3720 test -z "$as_dir" && as_dir=.
3721 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3723 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3725 break 2
3726 fi
3727done
3728 done
3729IFS=$as_save_IFS
3730
3731fi
3732fi
3733CXX=$ac_cv_prog_CXX
3734if test -n "$CXX"; then
3735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3736$as_echo "$CXX" >&6; }
3737else
3738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3739$as_echo "no" >&6; }
3740fi
3741
3742
3743 test -n "$CXX" && break
3744 done
3745fi
3746if test -z "$CXX"; then
3747 ac_ct_CXX=$CXX
3748 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3749do
3750 # Extract the first word of "$ac_prog", so it can be a program name with args.
3751set dummy $ac_prog; ac_word=$2
3752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3753$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3754if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3755 $as_echo_n "(cached) " >&6
3756else
3757 if test -n "$ac_ct_CXX"; then
3758 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3759else
3760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3761for as_dir in $PATH
3762do
3763 IFS=$as_save_IFS
3764 test -z "$as_dir" && as_dir=.
3765 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3767 ac_cv_prog_ac_ct_CXX="$ac_prog"
3768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3769 break 2
3770 fi
3771done
3772 done
3773IFS=$as_save_IFS
3774
3775fi
3776fi
3777ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3778if test -n "$ac_ct_CXX"; then
3779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3780$as_echo "$ac_ct_CXX" >&6; }
3781else
3782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3783$as_echo "no" >&6; }
3784fi
3785
3786
3787 test -n "$ac_ct_CXX" && break
3788done
3789
3790 if test "x$ac_ct_CXX" = x; then
3791 CXX="g++"
3792 else
3793 case $cross_compiling:$ac_tool_warned in
3794yes:)
3795{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3797ac_tool_warned=yes ;;
3798esac
3799 CXX=$ac_ct_CXX
3800 fi
3801fi
3802
3803 fi
3804fi
3805# Provide some information about the compiler.
3806$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3807set X $ac_compile
3808ac_compiler=$2
3809for ac_option in --version -v -V -qversion; do
3810 { { ac_try="$ac_compiler $ac_option >&5"
3811case "(($ac_try" in
3812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3813 *) ac_try_echo=$ac_try;;
3814esac
3815eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3816$as_echo "$ac_try_echo"; } >&5
3817 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3818 ac_status=$?
3819 if test -s conftest.err; then
3820 sed '10a\
3821... rest of stderr output deleted ...
3822 10q' conftest.err >conftest.er1
3823 cat conftest.er1 >&5
3bc3d82a 3824 fi
d0ac1c44 3825 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3827 test $ac_status = 0; }
3828done
3829
3830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3831$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3832if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3833 $as_echo_n "(cached) " >&6
3834else
3835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3836/* end confdefs.h. */
3837
3838int
3839main ()
3840{
3841#ifndef __GNUC__
3842 choke me
3843#endif
3844
3845 ;
3846 return 0;
3847}
3848_ACEOF
3849if ac_fn_cxx_try_compile "$LINENO"; then :
3850 ac_compiler_gnu=yes
3851else
3852 ac_compiler_gnu=no
3853fi
3854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3855ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3856
3857fi
3858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3859$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3860if test $ac_compiler_gnu = yes; then
3861 GXX=yes
3862else
3863 GXX=
3864fi
3865ac_test_CXXFLAGS=${CXXFLAGS+set}
3866ac_save_CXXFLAGS=$CXXFLAGS
3867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3868$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3869if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3870 $as_echo_n "(cached) " >&6
3871else
3872 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3873 ac_cxx_werror_flag=yes
3874 ac_cv_prog_cxx_g=no
3875 CXXFLAGS="-g"
3876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3877/* end confdefs.h. */
3878
3879int
3880main ()
3881{
3882
3883 ;
3884 return 0;
3885}
3886_ACEOF
3887if ac_fn_cxx_try_compile "$LINENO"; then :
3888 ac_cv_prog_cxx_g=yes
3889else
3890 CXXFLAGS=""
3891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3892/* end confdefs.h. */
3893
3894int
3895main ()
3896{
3897
3898 ;
3899 return 0;
3900}
3901_ACEOF
3902if ac_fn_cxx_try_compile "$LINENO"; then :
3903
3904else
3905 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3906 CXXFLAGS="-g"
3907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3908/* end confdefs.h. */
3909
3910int
3911main ()
3912{
3913
3914 ;
3915 return 0;
3916}
3917_ACEOF
3918if ac_fn_cxx_try_compile "$LINENO"; then :
3919 ac_cv_prog_cxx_g=yes
3920fi
3921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3922fi
3923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3924fi
3925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3926 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3927fi
3928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3929$as_echo "$ac_cv_prog_cxx_g" >&6; }
3930if test "$ac_test_CXXFLAGS" = set; then
3931 CXXFLAGS=$ac_save_CXXFLAGS
3932elif test $ac_cv_prog_cxx_g = yes; then
3933 if test "$GXX" = yes; then
3934 CXXFLAGS="-g -O2"
3935 else
3936 CXXFLAGS="-g"
3937 fi
3938else
3939 if test "$GXX" = yes; then
3940 CXXFLAGS="-O2"
3941 else
3942 CXXFLAGS=
3943 fi
3944fi
3945ac_ext=c
3946ac_cpp='$CPP $CPPFLAGS'
3947ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3948ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3949ac_compiler_gnu=$ac_cv_c_compiler_gnu
3950
3951
60ca704f 3952
bec39cab
AC
3953ac_ext=c
3954ac_cpp='$CPP $CPPFLAGS'
3955ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3956ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3957ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3959$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3960# On Suns, sometimes $CPP names a directory.
3961if test -n "$CPP" && test -d "$CPP"; then
3962 CPP=
8bb2c122 3963fi
bec39cab 3964if test -z "$CPP"; then
d0ac1c44 3965 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 3966 $as_echo_n "(cached) " >&6
bec39cab
AC
3967else
3968 # Double quotes because CPP needs to be expanded
3969 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3970 do
3971 ac_preproc_ok=false
3972for ac_c_preproc_warn_flag in '' yes
3973do
3974 # Use a header file that comes with gcc, so configuring glibc
3975 # with a fresh cross-compiler works.
3976 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3977 # <limits.h> exists even on freestanding compilers.
3978 # On the NeXT, cc -E runs the code through the compiler's parser,
3979 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3981/* end confdefs.h. */
3982#ifdef __STDC__
3983# include <limits.h>
3984#else
3985# include <assert.h>
3986#endif
3987 Syntax error
3988_ACEOF
81ecdfbb 3989if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3990
81ecdfbb 3991else
bec39cab
AC
3992 # Broken: fails on valid input.
3993continue
3994fi
d0ac1c44 3995rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3996
81ecdfbb 3997 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3998 # can be detected and how.
81ecdfbb 3999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4000/* end confdefs.h. */
4001#include <ac_nonexistent.h>
4002_ACEOF
81ecdfbb 4003if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4004 # Broken: success on invalid input.
4005continue
8bb2c122 4006else
bec39cab
AC
4007 # Passes both tests.
4008ac_preproc_ok=:
4009break
8bb2c122 4010fi
d0ac1c44 4011rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4012
bec39cab
AC
4013done
4014# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4015rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4016if $ac_preproc_ok; then :
bec39cab
AC
4017 break
4018fi
8bb2c122 4019
bec39cab
AC
4020 done
4021 ac_cv_prog_CPP=$CPP
ddc9cd0f 4022
c906108c 4023fi
bec39cab
AC
4024 CPP=$ac_cv_prog_CPP
4025else
4026 ac_cv_prog_CPP=$CPP
c906108c 4027fi
81ecdfbb
RW
4028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4029$as_echo "$CPP" >&6; }
bec39cab
AC
4030ac_preproc_ok=false
4031for ac_c_preproc_warn_flag in '' yes
4032do
4033 # Use a header file that comes with gcc, so configuring glibc
4034 # with a fresh cross-compiler works.
4035 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4036 # <limits.h> exists even on freestanding compilers.
4037 # On the NeXT, cc -E runs the code through the compiler's parser,
4038 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4040/* end confdefs.h. */
4041#ifdef __STDC__
4042# include <limits.h>
4043#else
4044# include <assert.h>
4045#endif
4046 Syntax error
4047_ACEOF
81ecdfbb 4048if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4049
81ecdfbb 4050else
bec39cab
AC
4051 # Broken: fails on valid input.
4052continue
4053fi
d0ac1c44 4054rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4055
81ecdfbb 4056 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4057 # can be detected and how.
81ecdfbb 4058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4059/* end confdefs.h. */
4060#include <ac_nonexistent.h>
4061_ACEOF
81ecdfbb 4062if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4063 # Broken: success on invalid input.
4064continue
c906108c 4065else
bec39cab
AC
4066 # Passes both tests.
4067ac_preproc_ok=:
4068break
c906108c 4069fi
d0ac1c44 4070rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4071
bec39cab
AC
4072done
4073# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4074rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4075if $ac_preproc_ok; then :
4076
c906108c 4077else
81ecdfbb
RW
4078 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4079$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4080as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4081See \`config.log' for more details" "$LINENO" 5; }
c906108c 4082fi
c906108c 4083
bec39cab
AC
4084ac_ext=c
4085ac_cpp='$CPP $CPPFLAGS'
4086ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4087ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4088ac_compiler_gnu=$ac_cv_c_compiler_gnu
4089
4090
81ecdfbb
RW
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4092$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4093if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4094 $as_echo_n "(cached) " >&6
4e8d927d 4095else
81ecdfbb
RW
4096 if test -z "$GREP"; then
4097 ac_path_GREP_found=false
4098 # Loop through the user's path and test for each of PROGNAME-LIST
4099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4100for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4101do
4102 IFS=$as_save_IFS
4103 test -z "$as_dir" && as_dir=.
4104 for ac_prog in grep ggrep; do
4105 for ac_exec_ext in '' $ac_executable_extensions; do
4106 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4107 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4108# Check for GNU ac_path_GREP and select it if it is found.
4109 # Check for GNU $ac_path_GREP
4110case `"$ac_path_GREP" --version 2>&1` in
4111*GNU*)
4112 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4113*)
4114 ac_count=0
4115 $as_echo_n 0123456789 >"conftest.in"
4116 while :
4117 do
4118 cat "conftest.in" "conftest.in" >"conftest.tmp"
4119 mv "conftest.tmp" "conftest.in"
4120 cp "conftest.in" "conftest.nl"
4121 $as_echo 'GREP' >> "conftest.nl"
4122 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4123 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4124 as_fn_arith $ac_count + 1 && ac_count=$as_val
4125 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4126 # Best one so far, save it but keep looking for a better one
4127 ac_cv_path_GREP="$ac_path_GREP"
4128 ac_path_GREP_max=$ac_count
bec39cab 4129 fi
81ecdfbb
RW
4130 # 10*(2^10) chars as input seems more than enough
4131 test $ac_count -gt 10 && break
4132 done
4133 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4134esac
bec39cab 4135
81ecdfbb
RW
4136 $ac_path_GREP_found && break 3
4137 done
4138 done
4139 done
4140IFS=$as_save_IFS
4141 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4142 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4143 fi
c906108c 4144else
81ecdfbb 4145 ac_cv_path_GREP=$GREP
c906108c 4146fi
c906108c 4147
81ecdfbb
RW
4148fi
4149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4150$as_echo "$ac_cv_path_GREP" >&6; }
4151 GREP="$ac_cv_path_GREP"
c906108c 4152
c906108c 4153
81ecdfbb
RW
4154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4155$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4156if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4157 $as_echo_n "(cached) " >&6
783e057b 4158else
81ecdfbb
RW
4159 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4160 then ac_cv_path_EGREP="$GREP -E"
4161 else
4162 if test -z "$EGREP"; then
4163 ac_path_EGREP_found=false
4164 # Loop through the user's path and test for each of PROGNAME-LIST
4165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4166for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4167do
4168 IFS=$as_save_IFS
4169 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4170 for ac_prog in egrep; do
4171 for ac_exec_ext in '' $ac_executable_extensions; do
4172 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4173 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4174# Check for GNU ac_path_EGREP and select it if it is found.
4175 # Check for GNU $ac_path_EGREP
4176case `"$ac_path_EGREP" --version 2>&1` in
4177*GNU*)
4178 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4179*)
4180 ac_count=0
4181 $as_echo_n 0123456789 >"conftest.in"
4182 while :
4183 do
4184 cat "conftest.in" "conftest.in" >"conftest.tmp"
4185 mv "conftest.tmp" "conftest.in"
4186 cp "conftest.in" "conftest.nl"
4187 $as_echo 'EGREP' >> "conftest.nl"
4188 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4189 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4190 as_fn_arith $ac_count + 1 && ac_count=$as_val
4191 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4192 # Best one so far, save it but keep looking for a better one
4193 ac_cv_path_EGREP="$ac_path_EGREP"
4194 ac_path_EGREP_max=$ac_count
4195 fi
4196 # 10*(2^10) chars as input seems more than enough
4197 test $ac_count -gt 10 && break
4198 done
4199 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4200esac
bec39cab 4201
81ecdfbb
RW
4202 $ac_path_EGREP_found && break 3
4203 done
4204 done
4205 done
4206IFS=$as_save_IFS
4207 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4208 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4209 fi
783e057b 4210else
81ecdfbb 4211 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4212fi
4213
81ecdfbb 4214 fi
783e057b 4215fi
81ecdfbb
RW
4216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4217$as_echo "$ac_cv_path_EGREP" >&6; }
4218 EGREP="$ac_cv_path_EGREP"
4219
783e057b 4220
81ecdfbb
RW
4221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4222$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4223if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4224 $as_echo_n "(cached) " >&6
783e057b 4225else
81ecdfbb 4226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4227/* end confdefs.h. */
783e057b 4228#include <stdlib.h>
bec39cab 4229#include <stdarg.h>
783e057b
DJ
4230#include <string.h>
4231#include <float.h>
c906108c 4232
bec39cab
AC
4233int
4234main ()
4235{
c906108c 4236
bec39cab
AC
4237 ;
4238 return 0;
4239}
4240_ACEOF
81ecdfbb 4241if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4242 ac_cv_header_stdc=yes
c906108c 4243else
81ecdfbb 4244 ac_cv_header_stdc=no
c906108c 4245fi
81ecdfbb 4246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4247
783e057b
DJ
4248if test $ac_cv_header_stdc = yes; then
4249 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4251/* end confdefs.h. */
4252#include <string.h>
c906108c 4253
783e057b
DJ
4254_ACEOF
4255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4256 $EGREP "memchr" >/dev/null 2>&1; then :
4257
c906108c 4258else
783e057b 4259 ac_cv_header_stdc=no
c906108c 4260fi
783e057b 4261rm -f conftest*
c906108c
SS
4262
4263fi
4264
783e057b
DJ
4265if test $ac_cv_header_stdc = yes; then
4266 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4268/* end confdefs.h. */
4269#include <stdlib.h>
bec39cab 4270
783e057b
DJ
4271_ACEOF
4272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4273 $EGREP "free" >/dev/null 2>&1; then :
4274
bec39cab 4275else
783e057b 4276 ac_cv_header_stdc=no
bec39cab 4277fi
783e057b 4278rm -f conftest*
bec39cab
AC
4279
4280fi
bec39cab 4281
783e057b
DJ
4282if test $ac_cv_header_stdc = yes; then
4283 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4284 if test "$cross_compiling" = yes; then :
783e057b 4285 :
bec39cab 4286else
81ecdfbb 4287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4288/* end confdefs.h. */
4289#include <ctype.h>
81ecdfbb 4290#include <stdlib.h>
783e057b
DJ
4291#if ((' ' & 0x0FF) == 0x020)
4292# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4293# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4294#else
4295# define ISLOWER(c) \
4296 (('a' <= (c) && (c) <= 'i') \
4297 || ('j' <= (c) && (c) <= 'r') \
4298 || ('s' <= (c) && (c) <= 'z'))
4299# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4300#endif
4301
4302#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4303int
4304main ()
4305{
4306 int i;
4307 for (i = 0; i < 256; i++)
4308 if (XOR (islower (i), ISLOWER (i))
4309 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4310 return 2;
4311 return 0;
783e057b
DJ
4312}
4313_ACEOF
81ecdfbb 4314if ac_fn_c_try_run "$LINENO"; then :
783e057b 4315
81ecdfbb
RW
4316else
4317 ac_cv_header_stdc=no
783e057b 4318fi
81ecdfbb
RW
4319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4320 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4321fi
81ecdfbb 4322
783e057b
DJ
4323fi
4324fi
81ecdfbb
RW
4325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4326$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4327if test $ac_cv_header_stdc = yes; then
4328
81ecdfbb 4329$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4330
4331fi
4332
4333# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4334for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4335 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4336do :
4337 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4338ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4339"
d0ac1c44 4340if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4341 cat >>confdefs.h <<_ACEOF
81ecdfbb 4342#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4343_ACEOF
4344
4345fi
4346
4347done
4348
4349
4350
81ecdfbb 4351 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4352if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4353 MINIX=yes
4354else
4355 MINIX=
4356fi
4357
4358
4359 if test "$MINIX" = yes; then
4360
81ecdfbb 4361$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4362
4363
81ecdfbb 4364$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4365
4366
81ecdfbb 4367$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4368
4369 fi
4370
4371
81ecdfbb
RW
4372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4373$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4374if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4375 $as_echo_n "(cached) " >&6
783e057b 4376else
81ecdfbb 4377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4378/* end confdefs.h. */
4379
d0ac1c44
SM
4380# define __EXTENSIONS__ 1
4381 $ac_includes_default
783e057b
DJ
4382int
4383main ()
4384{
4385
4386 ;
4387 return 0;
4388}
4389_ACEOF
81ecdfbb 4390if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4391 ac_cv_safe_to_define___extensions__=yes
4392else
81ecdfbb 4393 ac_cv_safe_to_define___extensions__=no
783e057b 4394fi
81ecdfbb 4395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4396fi
81ecdfbb
RW
4397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4398$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4399 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4400 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4401
81ecdfbb 4402 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4403
81ecdfbb 4404 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4405
81ecdfbb 4406 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4407
81ecdfbb 4408 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4409
4410
c971b7fa
PA
4411ac_aux_dir=
4412for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4413 if test -f "$ac_dir/install-sh"; then
4414 ac_aux_dir=$ac_dir
4415 ac_install_sh="$ac_aux_dir/install-sh -c"
4416 break
4417 elif test -f "$ac_dir/install.sh"; then
4418 ac_aux_dir=$ac_dir
4419 ac_install_sh="$ac_aux_dir/install.sh -c"
4420 break
4421 elif test -f "$ac_dir/shtool"; then
4422 ac_aux_dir=$ac_dir
4423 ac_install_sh="$ac_aux_dir/shtool install -c"
4424 break
4425 fi
c971b7fa
PA
4426done
4427if test -z "$ac_aux_dir"; then
d0ac1c44 4428 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4429fi
770d76d7 4430
c971b7fa
PA
4431# These three variables are undocumented and unsupported,
4432# and are intended to be withdrawn in a future Autoconf release.
4433# They can cause serious problems if a builder's source tree is in a directory
4434# whose full name contains unusual characters.
4435ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4436ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4437ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4438
770d76d7 4439
c971b7fa
PA
4440# Make sure we can run config.sub.
4441$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4442 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4443
c971b7fa
PA
4444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4445$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4446if ${ac_cv_build+:} false; then :
c971b7fa 4447 $as_echo_n "(cached) " >&6
770d76d7 4448else
c971b7fa
PA
4449 ac_build_alias=$build_alias
4450test "x$ac_build_alias" = x &&
4451 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4452test "x$ac_build_alias" = x &&
d0ac1c44 4453 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4454ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4455 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4456
770d76d7 4457fi
c971b7fa
PA
4458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4459$as_echo "$ac_cv_build" >&6; }
4460case $ac_cv_build in
4461*-*-*) ;;
d0ac1c44 4462*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4463esac
c971b7fa
PA
4464build=$ac_cv_build
4465ac_save_IFS=$IFS; IFS='-'
4466set x $ac_cv_build
4467shift
4468build_cpu=$1
4469build_vendor=$2
4470shift; shift
4471# Remember, the first character of IFS is used to create $*,
4472# except with old shells:
4473build_os=$*
4474IFS=$ac_save_IFS
4475case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4476
4477
c971b7fa
PA
4478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4479$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4480if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4481 $as_echo_n "(cached) " >&6
4482else
c971b7fa
PA
4483 if test "x$host_alias" = x; then
4484 ac_cv_host=$ac_cv_build
81ecdfbb 4485else
c971b7fa 4486 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4487 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4488fi
81ecdfbb
RW
4489
4490fi
c971b7fa
PA
4491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4492$as_echo "$ac_cv_host" >&6; }
4493case $ac_cv_host in
4494*-*-*) ;;
d0ac1c44 4495*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4496esac
c971b7fa
PA
4497host=$ac_cv_host
4498ac_save_IFS=$IFS; IFS='-'
4499set x $ac_cv_host
4500shift
4501host_cpu=$1
4502host_vendor=$2
4503shift; shift
4504# Remember, the first character of IFS is used to create $*,
4505# except with old shells:
4506host_os=$*
4507IFS=$ac_save_IFS
4508case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4509
4510
4511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4512$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4513if ${ac_cv_target+:} false; then :
3388710e
JM
4514 $as_echo_n "(cached) " >&6
4515else
4516 if test "x$target_alias" = x; then
4517 ac_cv_target=$ac_cv_host
4518else
4519 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4520 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4521fi
4522
4523fi
4524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4525$as_echo "$ac_cv_target" >&6; }
4526case $ac_cv_target in
4527*-*-*) ;;
d0ac1c44 4528*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4529esac
4530target=$ac_cv_target
4531ac_save_IFS=$IFS; IFS='-'
4532set x $ac_cv_target
4533shift
4534target_cpu=$1
4535target_vendor=$2
4536shift; shift
4537# Remember, the first character of IFS is used to create $*,
4538# except with old shells:
4539target_os=$*
4540IFS=$ac_save_IFS
4541case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4542
4543
4544# The aliases save the names the user supplied, while $host etc.
4545# will get canonicalized.
4546test -n "$target_alias" &&
4547 test "$program_prefix$program_suffix$program_transform_name" = \
4548 NONENONEs,x,x, &&
4549 program_prefix=${target_alias}-
4550
4551# The tests for host and target for $enable_largefile require
4552# canonical names.
4553
4554
81ecdfbb 4555
da2f07f1
JK
4556# As the $enable_largefile decision depends on --enable-plugins we must set it
4557# even in directories otherwise not depending on the $plugins option.
4558
4559
2974be62
AM
4560 maybe_plugins=no
4561 for ac_header in dlfcn.h
4562do :
4563 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4564"
d0ac1c44 4565if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4566 cat >>confdefs.h <<_ACEOF
4567#define HAVE_DLFCN_H 1
4568_ACEOF
4569 maybe_plugins=yes
4570fi
4571
4572done
4573
4574 for ac_header in windows.h
4575do :
4576 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4577"
d0ac1c44 4578if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4579 cat >>confdefs.h <<_ACEOF
4580#define HAVE_WINDOWS_H 1
4581_ACEOF
4582 maybe_plugins=yes
4583fi
4584
4585done
4586
4587
4588 # Check whether --enable-plugins was given.
da2f07f1
JK
4589if test "${enable_plugins+set}" = set; then :
4590 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4591 no) plugins=no ;;
4592 *) plugins=yes
4593 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4594 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4595 fi ;;
4596 esac
da2f07f1 4597else
2974be62
AM
4598 plugins=$maybe_plugins
4599
da2f07f1
JK
4600fi
4601
2974be62 4602 if test "$plugins" = "yes"; then
458412c3
TT
4603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4604$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4605if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4606 $as_echo_n "(cached) " >&6
4607else
4608 ac_func_search_save_LIBS=$LIBS
4609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4610/* end confdefs.h. */
4611
4612/* Override any GCC internal prototype to avoid an error.
4613 Use char because int might match the return type of a GCC
4614 builtin and then its argument prototype would still apply. */
4615#ifdef __cplusplus
4616extern "C"
4617#endif
458412c3 4618char dlsym ();
2974be62
AM
4619int
4620main ()
4621{
458412c3 4622return dlsym ();
2974be62
AM
4623 ;
4624 return 0;
4625}
4626_ACEOF
4627for ac_lib in '' dl; do
4628 if test -z "$ac_lib"; then
4629 ac_res="none required"
4630 else
4631 ac_res=-l$ac_lib
4632 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4633 fi
4634 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4635 ac_cv_search_dlsym=$ac_res
2974be62
AM
4636fi
4637rm -f core conftest.err conftest.$ac_objext \
4638 conftest$ac_exeext
d0ac1c44 4639 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4640 break
4641fi
4642done
d0ac1c44 4643if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4644
4645else
458412c3 4646 ac_cv_search_dlsym=no
2974be62
AM
4647fi
4648rm conftest.$ac_ext
4649LIBS=$ac_func_search_save_LIBS
4650fi
458412c3
TT
4651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4652$as_echo "$ac_cv_search_dlsym" >&6; }
4653ac_res=$ac_cv_search_dlsym
2974be62
AM
4654if test "$ac_res" != no; then :
4655 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4656
4657fi
4658
4659 fi
da2f07f1
JK
4660
4661
4662case "${host}" in
4663 sparc-*-solaris*|i[3-7]86-*-solaris*)
4664 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4665 # are mutually exclusive; and without procfs support, the bfd/ elf module
4666 # cannot provide certain routines such as elfcore_write_prpsinfo
4667 # or elfcore_write_prstatus. So unless the user explicitly requested
4668 # large-file support through the --enable-largefile switch, disable
4669 # large-file support in favor of procfs support.
4670 test "${target}" = "${host}" -a "x$plugins" = xno \
4671 && : ${enable_largefile="no"}
4672 ;;
4673esac
4674
4675# Check whether --enable-largefile was given.
4676if test "${enable_largefile+set}" = set; then :
4677 enableval=$enable_largefile;
4678fi
4679
4680if test "$enable_largefile" != no; then
4681
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4683$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4684if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4685 $as_echo_n "(cached) " >&6
4686else
4687 ac_cv_sys_largefile_CC=no
4688 if test "$GCC" != yes; then
4689 ac_save_CC=$CC
4690 while :; do
4691 # IRIX 6.2 and later do not support large files by default,
4692 # so use the C compiler's -n32 option if that helps.
4693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4694/* end confdefs.h. */
4695#include <sys/types.h>
4696 /* Check that off_t can represent 2**63 - 1 correctly.
4697 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4698 since some C++ compilers masquerading as C compilers
4699 incorrectly reject 9223372036854775807. */
4700#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4701 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4702 && LARGE_OFF_T % 2147483647 == 1)
4703 ? 1 : -1];
4704int
4705main ()
4706{
4707
4708 ;
4709 return 0;
4710}
4711_ACEOF
4712 if ac_fn_c_try_compile "$LINENO"; then :
4713 break
4714fi
4715rm -f core conftest.err conftest.$ac_objext
4716 CC="$CC -n32"
4717 if ac_fn_c_try_compile "$LINENO"; then :
4718 ac_cv_sys_largefile_CC=' -n32'; break
4719fi
4720rm -f core conftest.err conftest.$ac_objext
4721 break
4722 done
4723 CC=$ac_save_CC
4724 rm -f conftest.$ac_ext
4725 fi
4726fi
4727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4728$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4729 if test "$ac_cv_sys_largefile_CC" != no; then
4730 CC=$CC$ac_cv_sys_largefile_CC
4731 fi
4732
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4734$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4735if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4736 $as_echo_n "(cached) " >&6
4737else
4738 while :; do
4739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4740/* end confdefs.h. */
4741#include <sys/types.h>
4742 /* Check that off_t can represent 2**63 - 1 correctly.
4743 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4744 since some C++ compilers masquerading as C compilers
4745 incorrectly reject 9223372036854775807. */
4746#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4747 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4748 && LARGE_OFF_T % 2147483647 == 1)
4749 ? 1 : -1];
4750int
4751main ()
4752{
4753
4754 ;
4755 return 0;
4756}
4757_ACEOF
4758if ac_fn_c_try_compile "$LINENO"; then :
4759 ac_cv_sys_file_offset_bits=no; break
4760fi
4761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4763/* end confdefs.h. */
4764#define _FILE_OFFSET_BITS 64
4765#include <sys/types.h>
4766 /* Check that off_t can represent 2**63 - 1 correctly.
4767 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4768 since some C++ compilers masquerading as C compilers
4769 incorrectly reject 9223372036854775807. */
4770#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4771 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4772 && LARGE_OFF_T % 2147483647 == 1)
4773 ? 1 : -1];
4774int
4775main ()
4776{
4777
4778 ;
4779 return 0;
4780}
4781_ACEOF
4782if ac_fn_c_try_compile "$LINENO"; then :
4783 ac_cv_sys_file_offset_bits=64; break
4784fi
4785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4786 ac_cv_sys_file_offset_bits=unknown
4787 break
4788done
4789fi
4790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4791$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4792case $ac_cv_sys_file_offset_bits in #(
4793 no | unknown) ;;
4794 *)
4795cat >>confdefs.h <<_ACEOF
4796#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4797_ACEOF
4798;;
4799esac
4800rm -rf conftest*
4801 if test $ac_cv_sys_file_offset_bits = unknown; then
4802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4803$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4804if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4805 $as_echo_n "(cached) " >&6
4806else
4807 while :; do
4808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4809/* end confdefs.h. */
4810#include <sys/types.h>
4811 /* Check that off_t can represent 2**63 - 1 correctly.
4812 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4813 since some C++ compilers masquerading as C compilers
4814 incorrectly reject 9223372036854775807. */
4815#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4816 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4817 && LARGE_OFF_T % 2147483647 == 1)
4818 ? 1 : -1];
4819int
4820main ()
4821{
4822
4823 ;
4824 return 0;
4825}
4826_ACEOF
4827if ac_fn_c_try_compile "$LINENO"; then :
4828 ac_cv_sys_large_files=no; break
4829fi
4830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4832/* end confdefs.h. */
4833#define _LARGE_FILES 1
4834#include <sys/types.h>
4835 /* Check that off_t can represent 2**63 - 1 correctly.
4836 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4837 since some C++ compilers masquerading as C compilers
4838 incorrectly reject 9223372036854775807. */
4839#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4840 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4841 && LARGE_OFF_T % 2147483647 == 1)
4842 ? 1 : -1];
4843int
4844main ()
4845{
4846
4847 ;
4848 return 0;
4849}
4850_ACEOF
4851if ac_fn_c_try_compile "$LINENO"; then :
4852 ac_cv_sys_large_files=1; break
4853fi
4854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4855 ac_cv_sys_large_files=unknown
4856 break
4857done
4858fi
4859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4860$as_echo "$ac_cv_sys_large_files" >&6; }
4861case $ac_cv_sys_large_files in #(
4862 no | unknown) ;;
4863 *)
4864cat >>confdefs.h <<_ACEOF
4865#define _LARGE_FILES $ac_cv_sys_large_files
4866_ACEOF
4867;;
4868esac
4869rm -rf conftest*
4870 fi
d0ac1c44
SM
4871
4872
da2f07f1
JK
4873fi
4874
4875
4876
81ecdfbb
RW
4877
4878
4879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4880$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4881if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4882 $as_echo_n "(cached) " >&6
4883else
4884 am_cv_prog_cc_stdc=no
4885ac_save_CC="$CC"
4886# Don't try gcc -ansi; that turns off useful extensions and
4887# breaks some systems' header files.
4888# AIX -qlanglvl=ansi
4889# Ultrix and OSF/1 -std1
4890# HP-UX 10.20 and later -Ae
4891# HP-UX older versions -Aa -D_HPUX_SOURCE
4892# SVR4 -Xc -D__EXTENSIONS__
4893for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4894do
783e057b 4895 CC="$ac_save_CC $ac_arg"
81ecdfbb 4896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4897/* end confdefs.h. */
4898#include <stdarg.h>
4899#include <stdio.h>
4900#include <sys/types.h>
4901#include <sys/stat.h>
4902/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4903struct buf { int x; };
4904FILE * (*rcsopen) (struct buf *, struct stat *, int);
4905static char *e (p, i)
4906 char **p;
4907 int i;
4908{
4909 return p[i];
4910}
4911static char *f (char * (*g) (char **, int), char **p, ...)
4912{
4913 char *s;
4914 va_list v;
4915 va_start (v,p);
4916 s = g (p, va_arg (v,int));
4917 va_end (v);
4918 return s;
4919}
4920int test (int i, double x);
4921struct s1 {int (*f) (int a);};
4922struct s2 {int (*f) (double a);};
4923int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4924int argc;
4925char **argv;
4926
4927int
4928main ()
4929{
4930
4931return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4932
4933 ;
4934 return 0;
4935}
4936_ACEOF
81ecdfbb 4937if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4938 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4939fi
81ecdfbb 4940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4941done
4942CC="$ac_save_CC"
4943
4944fi
4945
4946if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4948$as_echo "none needed" >&6; }
783e057b 4949else
81ecdfbb
RW
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4951$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4952fi
4953case "x$am_cv_prog_cc_stdc" in
4954 x|xno) ;;
4955 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4956esac
4957
d0ac1c44
SM
4958# Expand $ac_aux_dir to an absolute path.
4959am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 4960
d0ac1c44 4961if test x"${install_sh+set}" != xset; then
4869db5e
RM
4962 case $am_aux_dir in
4963 *\ * | *\ *)
4964 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4965 *)
4966 install_sh="\${SHELL} $am_aux_dir/install-sh"
4967 esac
4968fi
4969
d0ac1c44
SM
4970# Installed binaries are usually stripped using 'strip' when the user
4971# run "make install-strip". However 'strip' might not be the right
4869db5e 4972# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 4973# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
4974if test "$cross_compiling" != no; then
4975 if test -n "$ac_tool_prefix"; then
4976 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4977set dummy ${ac_tool_prefix}strip; ac_word=$2
4978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4980if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
4981 $as_echo_n "(cached) " >&6
4982else
4983 if test -n "$STRIP"; then
4984 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4985else
4986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4987for as_dir in $PATH
4988do
4989 IFS=$as_save_IFS
4990 test -z "$as_dir" && as_dir=.
4991 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4992 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4993 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4995 break 2
4996 fi
4997done
4998 done
4999IFS=$as_save_IFS
5000
5001fi
5002fi
5003STRIP=$ac_cv_prog_STRIP
5004if test -n "$STRIP"; then
5005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5006$as_echo "$STRIP" >&6; }
5007else
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5009$as_echo "no" >&6; }
5010fi
5011
5012
5013fi
5014if test -z "$ac_cv_prog_STRIP"; then
5015 ac_ct_STRIP=$STRIP
5016 # Extract the first word of "strip", so it can be a program name with args.
5017set dummy strip; ac_word=$2
5018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5019$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5020if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5021 $as_echo_n "(cached) " >&6
5022else
5023 if test -n "$ac_ct_STRIP"; then
5024 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5025else
5026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5027for as_dir in $PATH
5028do
5029 IFS=$as_save_IFS
5030 test -z "$as_dir" && as_dir=.
5031 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5032 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5033 ac_cv_prog_ac_ct_STRIP="strip"
5034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5035 break 2
5036 fi
5037done
5038 done
5039IFS=$as_save_IFS
5040
5041fi
5042fi
5043ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5044if test -n "$ac_ct_STRIP"; then
5045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5046$as_echo "$ac_ct_STRIP" >&6; }
5047else
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5049$as_echo "no" >&6; }
5050fi
5051
5052 if test "x$ac_ct_STRIP" = x; then
5053 STRIP=":"
5054 else
5055 case $cross_compiling:$ac_tool_warned in
5056yes:)
5057{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5058$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5059ac_tool_warned=yes ;;
5060esac
5061 STRIP=$ac_ct_STRIP
5062 fi
5063else
5064 STRIP="$ac_cv_prog_STRIP"
5065fi
5066
5067fi
5068INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5069
783e057b
DJ
5070
5071ac_aux_dir=
81ecdfbb 5072for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5073 if test -f "$ac_dir/install-sh"; then
5074 ac_aux_dir=$ac_dir
5075 ac_install_sh="$ac_aux_dir/install-sh -c"
5076 break
5077 elif test -f "$ac_dir/install.sh"; then
5078 ac_aux_dir=$ac_dir
5079 ac_install_sh="$ac_aux_dir/install.sh -c"
5080 break
5081 elif test -f "$ac_dir/shtool"; then
5082 ac_aux_dir=$ac_dir
5083 ac_install_sh="$ac_aux_dir/shtool install -c"
5084 break
5085 fi
783e057b
DJ
5086done
5087if test -z "$ac_aux_dir"; then
d0ac1c44 5088 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5089fi
81ecdfbb
RW
5090
5091# These three variables are undocumented and unsupported,
5092# and are intended to be withdrawn in a future Autoconf release.
5093# They can cause serious problems if a builder's source tree is in a directory
5094# whose full name contains unusual characters.
5095ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5096ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5097ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5098
783e057b 5099
783e057b 5100
9009e1ae
MR
5101test "$program_prefix" != NONE &&
5102 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5103# Use a double $ so make ignores it.
5104test "$program_suffix" != NONE &&
5105 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5106# Double any \ or $.
5107# By default was `s,x,x', remove it if useless.
5108ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5109program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5110
81ecdfbb 5111
0bcda685
PA
5112# We require a C++11 compiler. Check if one is available, and if
5113# necessary, set CXX_DIALECT to some -std=xxx switch.
5114
41260ac2 5115 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5116 ac_ext=cpp
5117ac_cpp='$CXXCPP $CPPFLAGS'
5118ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5119ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5120ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5121 CXX_DIALECT=""
5122 ac_success=no
5123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5124$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5125if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5126 $as_echo_n "(cached) " >&6
5127else
5128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5129/* end confdefs.h. */
5130
5131
5132// If the compiler admits that it is not ready for C++11, why torture it?
5133// Hopefully, this will speed up the test.
5134
5135#ifndef __cplusplus
5136
5137#error "This is not a C++ compiler"
5138
5139#elif __cplusplus < 201103L
5140
5141#error "This is not a C++11 compiler"
5142
5143#else
5144
5145namespace cxx11
5146{
5147
5148 namespace test_static_assert
5149 {
5150
5151 template <typename T>
5152 struct check
5153 {
5154 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5155 };
5156
5157 }
5158
5159 namespace test_final_override
5160 {
5161
5162 struct Base
5163 {
5164 virtual void f() {}
5165 };
5166
5167 struct Derived : public Base
5168 {
5169 virtual void f() override {}
5170 };
5171
5172 }
5173
5174 namespace test_double_right_angle_brackets
5175 {
5176
5177 template < typename T >
5178 struct check {};
5179
5180 typedef check<void> single_type;
5181 typedef check<check<void>> double_type;
5182 typedef check<check<check<void>>> triple_type;
5183 typedef check<check<check<check<void>>>> quadruple_type;
5184
5185 }
5186
5187 namespace test_decltype
5188 {
5189
5190 int
5191 f()
5192 {
5193 int a = 1;
5194 decltype(a) b = 2;
5195 return a + b;
5196 }
5197
5198 }
5199
5200 namespace test_type_deduction
5201 {
5202
5203 template < typename T1, typename T2 >
5204 struct is_same
5205 {
5206 static const bool value = false;
5207 };
5208
5209 template < typename T >
5210 struct is_same<T, T>
5211 {
5212 static const bool value = true;
5213 };
5214
5215 template < typename T1, typename T2 >
5216 auto
5217 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5218 {
5219 return a1 + a2;
5220 }
5221
5222 int
5223 test(const int c, volatile int v)
5224 {
5225 static_assert(is_same<int, decltype(0)>::value == true, "");
5226 static_assert(is_same<int, decltype(c)>::value == false, "");
5227 static_assert(is_same<int, decltype(v)>::value == false, "");
5228 auto ac = c;
5229 auto av = v;
5230 auto sumi = ac + av + 'x';
5231 auto sumf = ac + av + 1.0;
5232 static_assert(is_same<int, decltype(ac)>::value == true, "");
5233 static_assert(is_same<int, decltype(av)>::value == true, "");
5234 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5235 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5236 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5237 return (sumf > 0.0) ? sumi : add(c, v);
5238 }
5239
5240 }
5241
5242 namespace test_noexcept
5243 {
5244
5245 int f() { return 0; }
5246 int g() noexcept { return 0; }
5247
5248 static_assert(noexcept(f()) == false, "");
5249 static_assert(noexcept(g()) == true, "");
5250
5251 }
5252
5253 namespace test_constexpr
5254 {
5255
5256 template < typename CharT >
5257 unsigned long constexpr
5258 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5259 {
5260 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5261 }
5262
5263 template < typename CharT >
5264 unsigned long constexpr
5265 strlen_c(const CharT *const s) noexcept
5266 {
5267 return strlen_c_r(s, 0UL);
5268 }
5269
5270 static_assert(strlen_c("") == 0UL, "");
5271 static_assert(strlen_c("1") == 1UL, "");
5272 static_assert(strlen_c("example") == 7UL, "");
5273 static_assert(strlen_c("another\0example") == 7UL, "");
5274
5275 }
5276
5277 namespace test_rvalue_references
5278 {
5279
5280 template < int N >
5281 struct answer
5282 {
5283 static constexpr int value = N;
5284 };
5285
5286 answer<1> f(int&) { return answer<1>(); }
5287 answer<2> f(const int&) { return answer<2>(); }
5288 answer<3> f(int&&) { return answer<3>(); }
5289
5290 void
5291 test()
5292 {
5293 int i = 0;
5294 const int c = 0;
5295 static_assert(decltype(f(i))::value == 1, "");
5296 static_assert(decltype(f(c))::value == 2, "");
5297 static_assert(decltype(f(0))::value == 3, "");
5298 }
5299
5300 }
5301
5302 namespace test_uniform_initialization
5303 {
5304
5305 struct test
5306 {
5307 static const int zero {};
5308 static const int one {1};
5309 };
5310
5311 static_assert(test::zero == 0, "");
5312 static_assert(test::one == 1, "");
5313
5314 }
5315
5316 namespace test_lambdas
5317 {
5318
5319 void
5320 test1()
5321 {
5322 auto lambda1 = [](){};
5323 auto lambda2 = lambda1;
5324 lambda1();
5325 lambda2();
5326 }
5327
5328 int
5329 test2()
5330 {
5331 auto a = [](int i, int j){ return i + j; }(1, 2);
5332 auto b = []() -> int { return '0'; }();
5333 auto c = [=](){ return a + b; }();
5334 auto d = [&](){ return c; }();
5335 auto e = [a, &b](int x) mutable {
5336 const auto identity = [](int y){ return y; };
5337 for (auto i = 0; i < a; ++i)
5338 a += b--;
5339 return x + identity(a + b);
5340 }(0);
5341 return a + b + c + d + e;
5342 }
5343
5344 int
5345 test3()
5346 {
5347 const auto nullary = [](){ return 0; };
5348 const auto unary = [](int x){ return x; };
5349 using nullary_t = decltype(nullary);
5350 using unary_t = decltype(unary);
5351 const auto higher1st = [](nullary_t f){ return f(); };
5352 const auto higher2nd = [unary](nullary_t f1){
5353 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5354 };
5355 return higher1st(nullary) + higher2nd(nullary)(unary);
5356 }
5357
5358 }
5359
5360 namespace test_variadic_templates
5361 {
5362
5363 template <int...>
5364 struct sum;
5365
5366 template <int N0, int... N1toN>
5367 struct sum<N0, N1toN...>
5368 {
5369 static constexpr auto value = N0 + sum<N1toN...>::value;
5370 };
5371
5372 template <>
5373 struct sum<>
5374 {
5375 static constexpr auto value = 0;
5376 };
5377
5378 static_assert(sum<>::value == 0, "");
5379 static_assert(sum<1>::value == 1, "");
5380 static_assert(sum<23>::value == 23, "");
5381 static_assert(sum<1, 2>::value == 3, "");
5382 static_assert(sum<5, 5, 11>::value == 21, "");
5383 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5384
5385 }
5386
5387 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5388 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5389 // because of this.
5390 namespace test_template_alias_sfinae
5391 {
5392
5393 struct foo {};
5394
5395 template<typename T>
5396 using member = typename T::member_type;
5397
5398 template<typename T>
5399 void func(...) {}
5400
5401 template<typename T>
5402 void func(member<T>*) {}
5403
5404 void test();
5405
5406 void test() { func<foo>(0); }
5407
5408 }
5409
5410} // namespace cxx11
5411
5412#endif // __cplusplus >= 201103L
5413
5414
5415
5416_ACEOF
5417if ac_fn_cxx_try_compile "$LINENO"; then :
5418 ax_cv_cxx_compile_cxx11=yes
5419else
5420 ax_cv_cxx_compile_cxx11=no
5421fi
5422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5423fi
5424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5425$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5426 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5427 ac_success=yes
5428 fi
5429
5430 if test x$ac_success = xno; then
41260ac2
SM
5431 for alternative in ${ax_cxx_compile_alternatives}; do
5432 switch="-std=gnu++${alternative}"
0bcda685
PA
5433 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5435$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5436if eval \${$cachevar+:} false; then :
0bcda685
PA
5437 $as_echo_n "(cached) " >&6
5438else
5439 ac_save_CXX="$CXX"
5440 CXX="$CXX $switch"
5441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5442/* end confdefs.h. */
5443
5444
5445// If the compiler admits that it is not ready for C++11, why torture it?
5446// Hopefully, this will speed up the test.
5447
5448#ifndef __cplusplus
5449
5450#error "This is not a C++ compiler"
5451
5452#elif __cplusplus < 201103L
5453
5454#error "This is not a C++11 compiler"
5455
5456#else
5457
5458namespace cxx11
5459{
5460
5461 namespace test_static_assert
5462 {
5463
5464 template <typename T>
5465 struct check
5466 {
5467 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5468 };
5469
5470 }
5471
5472 namespace test_final_override
5473 {
5474
5475 struct Base
5476 {
5477 virtual void f() {}
5478 };
5479
5480 struct Derived : public Base
5481 {
5482 virtual void f() override {}
5483 };
5484
5485 }
5486
5487 namespace test_double_right_angle_brackets
5488 {
5489
5490 template < typename T >
5491 struct check {};
5492
5493 typedef check<void> single_type;
5494 typedef check<check<void>> double_type;
5495 typedef check<check<check<void>>> triple_type;
5496 typedef check<check<check<check<void>>>> quadruple_type;
5497
5498 }
5499
5500 namespace test_decltype
5501 {
5502
5503 int
5504 f()
5505 {
5506 int a = 1;
5507 decltype(a) b = 2;
5508 return a + b;
5509 }
5510
5511 }
5512
5513 namespace test_type_deduction
5514 {
5515
5516 template < typename T1, typename T2 >
5517 struct is_same
5518 {
5519 static const bool value = false;
5520 };
5521
5522 template < typename T >
5523 struct is_same<T, T>
5524 {
5525 static const bool value = true;
5526 };
5527
5528 template < typename T1, typename T2 >
5529 auto
5530 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5531 {
5532 return a1 + a2;
5533 }
5534
5535 int
5536 test(const int c, volatile int v)
5537 {
5538 static_assert(is_same<int, decltype(0)>::value == true, "");
5539 static_assert(is_same<int, decltype(c)>::value == false, "");
5540 static_assert(is_same<int, decltype(v)>::value == false, "");
5541 auto ac = c;
5542 auto av = v;
5543 auto sumi = ac + av + 'x';
5544 auto sumf = ac + av + 1.0;
5545 static_assert(is_same<int, decltype(ac)>::value == true, "");
5546 static_assert(is_same<int, decltype(av)>::value == true, "");
5547 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5548 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5549 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5550 return (sumf > 0.0) ? sumi : add(c, v);
5551 }
5552
5553 }
5554
5555 namespace test_noexcept
5556 {
5557
5558 int f() { return 0; }
5559 int g() noexcept { return 0; }
5560
5561 static_assert(noexcept(f()) == false, "");
5562 static_assert(noexcept(g()) == true, "");
5563
5564 }
5565
5566 namespace test_constexpr
5567 {
5568
5569 template < typename CharT >
5570 unsigned long constexpr
5571 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5572 {
5573 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5574 }
5575
5576 template < typename CharT >
5577 unsigned long constexpr
5578 strlen_c(const CharT *const s) noexcept
5579 {
5580 return strlen_c_r(s, 0UL);
5581 }
5582
5583 static_assert(strlen_c("") == 0UL, "");
5584 static_assert(strlen_c("1") == 1UL, "");
5585 static_assert(strlen_c("example") == 7UL, "");
5586 static_assert(strlen_c("another\0example") == 7UL, "");
5587
5588 }
5589
5590 namespace test_rvalue_references
5591 {
5592
5593 template < int N >
5594 struct answer
5595 {
5596 static constexpr int value = N;
5597 };
5598
5599 answer<1> f(int&) { return answer<1>(); }
5600 answer<2> f(const int&) { return answer<2>(); }
5601 answer<3> f(int&&) { return answer<3>(); }
5602
5603 void
5604 test()
5605 {
5606 int i = 0;
5607 const int c = 0;
5608 static_assert(decltype(f(i))::value == 1, "");
5609 static_assert(decltype(f(c))::value == 2, "");
5610 static_assert(decltype(f(0))::value == 3, "");
5611 }
5612
5613 }
5614
5615 namespace test_uniform_initialization
5616 {
5617
5618 struct test
5619 {
5620 static const int zero {};
5621 static const int one {1};
5622 };
5623
5624 static_assert(test::zero == 0, "");
5625 static_assert(test::one == 1, "");
5626
5627 }
5628
5629 namespace test_lambdas
5630 {
5631
5632 void
5633 test1()
5634 {
5635 auto lambda1 = [](){};
5636 auto lambda2 = lambda1;
5637 lambda1();
5638 lambda2();
5639 }
5640
5641 int
5642 test2()
5643 {
5644 auto a = [](int i, int j){ return i + j; }(1, 2);
5645 auto b = []() -> int { return '0'; }();
5646 auto c = [=](){ return a + b; }();
5647 auto d = [&](){ return c; }();
5648 auto e = [a, &b](int x) mutable {
5649 const auto identity = [](int y){ return y; };
5650 for (auto i = 0; i < a; ++i)
5651 a += b--;
5652 return x + identity(a + b);
5653 }(0);
5654 return a + b + c + d + e;
5655 }
5656
5657 int
5658 test3()
5659 {
5660 const auto nullary = [](){ return 0; };
5661 const auto unary = [](int x){ return x; };
5662 using nullary_t = decltype(nullary);
5663 using unary_t = decltype(unary);
5664 const auto higher1st = [](nullary_t f){ return f(); };
5665 const auto higher2nd = [unary](nullary_t f1){
5666 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5667 };
5668 return higher1st(nullary) + higher2nd(nullary)(unary);
5669 }
5670
5671 }
5672
5673 namespace test_variadic_templates
5674 {
5675
5676 template <int...>
5677 struct sum;
5678
5679 template <int N0, int... N1toN>
5680 struct sum<N0, N1toN...>
5681 {
5682 static constexpr auto value = N0 + sum<N1toN...>::value;
5683 };
5684
5685 template <>
5686 struct sum<>
5687 {
5688 static constexpr auto value = 0;
5689 };
5690
5691 static_assert(sum<>::value == 0, "");
5692 static_assert(sum<1>::value == 1, "");
5693 static_assert(sum<23>::value == 23, "");
5694 static_assert(sum<1, 2>::value == 3, "");
5695 static_assert(sum<5, 5, 11>::value == 21, "");
5696 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5697
5698 }
5699
5700 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5701 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5702 // because of this.
5703 namespace test_template_alias_sfinae
5704 {
5705
5706 struct foo {};
5707
5708 template<typename T>
5709 using member = typename T::member_type;
5710
5711 template<typename T>
5712 void func(...) {}
5713
5714 template<typename T>
5715 void func(member<T>*) {}
5716
5717 void test();
5718
5719 void test() { func<foo>(0); }
5720
5721 }
5722
5723} // namespace cxx11
5724
5725#endif // __cplusplus >= 201103L
5726
5727
5728
5729_ACEOF
5730if ac_fn_cxx_try_compile "$LINENO"; then :
5731 eval $cachevar=yes
5732else
5733 eval $cachevar=no
5734fi
5735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5736 CXX="$ac_save_CXX"
5737fi
5738eval ac_res=\$$cachevar
5739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5740$as_echo "$ac_res" >&6; }
5741 if eval test x\$$cachevar = xyes; then
5742 CXX_DIALECT="$switch"
5743 ac_success=yes
5744 break
5745 fi
5746 done
5747 fi
5748
5749 if test x$ac_success = xno; then
41260ac2
SM
5750 for alternative in ${ax_cxx_compile_alternatives}; do
5751 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5752 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5754$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5755if eval \${$cachevar+:} false; then :
0bcda685
PA
5756 $as_echo_n "(cached) " >&6
5757else
5758 ac_save_CXX="$CXX"
41260ac2
SM
5759 CXX="$CXX $switch"
5760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5761/* end confdefs.h. */
5762
5763
5764// If the compiler admits that it is not ready for C++11, why torture it?
5765// Hopefully, this will speed up the test.
5766
5767#ifndef __cplusplus
5768
5769#error "This is not a C++ compiler"
5770
5771#elif __cplusplus < 201103L
5772
5773#error "This is not a C++11 compiler"
5774
5775#else
5776
5777namespace cxx11
5778{
5779
5780 namespace test_static_assert
5781 {
5782
5783 template <typename T>
5784 struct check
5785 {
5786 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5787 };
5788
5789 }
5790
5791 namespace test_final_override
5792 {
5793
5794 struct Base
5795 {
5796 virtual void f() {}
5797 };
5798
5799 struct Derived : public Base
5800 {
5801 virtual void f() override {}
5802 };
5803
5804 }
5805
5806 namespace test_double_right_angle_brackets
5807 {
5808
5809 template < typename T >
5810 struct check {};
5811
5812 typedef check<void> single_type;
5813 typedef check<check<void>> double_type;
5814 typedef check<check<check<void>>> triple_type;
5815 typedef check<check<check<check<void>>>> quadruple_type;
5816
5817 }
5818
5819 namespace test_decltype
5820 {
5821
5822 int
5823 f()
5824 {
5825 int a = 1;
5826 decltype(a) b = 2;
5827 return a + b;
5828 }
5829
5830 }
5831
5832 namespace test_type_deduction
5833 {
5834
5835 template < typename T1, typename T2 >
5836 struct is_same
5837 {
5838 static const bool value = false;
5839 };
5840
5841 template < typename T >
5842 struct is_same<T, T>
5843 {
5844 static const bool value = true;
5845 };
5846
5847 template < typename T1, typename T2 >
5848 auto
5849 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5850 {
5851 return a1 + a2;
5852 }
5853
5854 int
5855 test(const int c, volatile int v)
5856 {
5857 static_assert(is_same<int, decltype(0)>::value == true, "");
5858 static_assert(is_same<int, decltype(c)>::value == false, "");
5859 static_assert(is_same<int, decltype(v)>::value == false, "");
5860 auto ac = c;
5861 auto av = v;
5862 auto sumi = ac + av + 'x';
5863 auto sumf = ac + av + 1.0;
5864 static_assert(is_same<int, decltype(ac)>::value == true, "");
5865 static_assert(is_same<int, decltype(av)>::value == true, "");
5866 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5867 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5868 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5869 return (sumf > 0.0) ? sumi : add(c, v);
5870 }
5871
5872 }
5873
5874 namespace test_noexcept
5875 {
5876
5877 int f() { return 0; }
5878 int g() noexcept { return 0; }
5879
5880 static_assert(noexcept(f()) == false, "");
5881 static_assert(noexcept(g()) == true, "");
5882
5883 }
5884
5885 namespace test_constexpr
5886 {
5887
5888 template < typename CharT >
5889 unsigned long constexpr
5890 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5891 {
5892 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5893 }
5894
5895 template < typename CharT >
5896 unsigned long constexpr
5897 strlen_c(const CharT *const s) noexcept
5898 {
5899 return strlen_c_r(s, 0UL);
5900 }
5901
5902 static_assert(strlen_c("") == 0UL, "");
5903 static_assert(strlen_c("1") == 1UL, "");
5904 static_assert(strlen_c("example") == 7UL, "");
5905 static_assert(strlen_c("another\0example") == 7UL, "");
5906
5907 }
5908
5909 namespace test_rvalue_references
5910 {
5911
5912 template < int N >
5913 struct answer
5914 {
5915 static constexpr int value = N;
5916 };
5917
5918 answer<1> f(int&) { return answer<1>(); }
5919 answer<2> f(const int&) { return answer<2>(); }
5920 answer<3> f(int&&) { return answer<3>(); }
5921
5922 void
5923 test()
5924 {
5925 int i = 0;
5926 const int c = 0;
5927 static_assert(decltype(f(i))::value == 1, "");
5928 static_assert(decltype(f(c))::value == 2, "");
5929 static_assert(decltype(f(0))::value == 3, "");
5930 }
5931
5932 }
5933
5934 namespace test_uniform_initialization
5935 {
5936
5937 struct test
5938 {
5939 static const int zero {};
5940 static const int one {1};
5941 };
5942
5943 static_assert(test::zero == 0, "");
5944 static_assert(test::one == 1, "");
5945
5946 }
5947
5948 namespace test_lambdas
5949 {
5950
5951 void
5952 test1()
5953 {
5954 auto lambda1 = [](){};
5955 auto lambda2 = lambda1;
5956 lambda1();
5957 lambda2();
5958 }
5959
5960 int
5961 test2()
5962 {
5963 auto a = [](int i, int j){ return i + j; }(1, 2);
5964 auto b = []() -> int { return '0'; }();
5965 auto c = [=](){ return a + b; }();
5966 auto d = [&](){ return c; }();
5967 auto e = [a, &b](int x) mutable {
5968 const auto identity = [](int y){ return y; };
5969 for (auto i = 0; i < a; ++i)
5970 a += b--;
5971 return x + identity(a + b);
5972 }(0);
5973 return a + b + c + d + e;
5974 }
5975
5976 int
5977 test3()
5978 {
5979 const auto nullary = [](){ return 0; };
5980 const auto unary = [](int x){ return x; };
5981 using nullary_t = decltype(nullary);
5982 using unary_t = decltype(unary);
5983 const auto higher1st = [](nullary_t f){ return f(); };
5984 const auto higher2nd = [unary](nullary_t f1){
5985 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5986 };
5987 return higher1st(nullary) + higher2nd(nullary)(unary);
5988 }
5989
5990 }
5991
5992 namespace test_variadic_templates
5993 {
5994
5995 template <int...>
5996 struct sum;
5997
5998 template <int N0, int... N1toN>
5999 struct sum<N0, N1toN...>
6000 {
6001 static constexpr auto value = N0 + sum<N1toN...>::value;
6002 };
6003
6004 template <>
6005 struct sum<>
6006 {
6007 static constexpr auto value = 0;
6008 };
6009
6010 static_assert(sum<>::value == 0, "");
6011 static_assert(sum<1>::value == 1, "");
6012 static_assert(sum<23>::value == 23, "");
6013 static_assert(sum<1, 2>::value == 3, "");
6014 static_assert(sum<5, 5, 11>::value == 21, "");
6015 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6016
6017 }
6018
6019 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6020 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6021 // because of this.
6022 namespace test_template_alias_sfinae
6023 {
6024
6025 struct foo {};
6026
6027 template<typename T>
6028 using member = typename T::member_type;
6029
6030 template<typename T>
6031 void func(...) {}
6032
6033 template<typename T>
6034 void func(member<T>*) {}
6035
6036 void test();
6037
6038 void test() { func<foo>(0); }
6039
6040 }
6041
6042} // namespace cxx11
6043
6044#endif // __cplusplus >= 201103L
6045
6046
6047
6048_ACEOF
6049if ac_fn_cxx_try_compile "$LINENO"; then :
6050 eval $cachevar=yes
6051else
6052 eval $cachevar=no
6053fi
6054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6055 CXX="$ac_save_CXX"
0bcda685
PA
6056fi
6057eval ac_res=\$$cachevar
6058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6059$as_echo "$ac_res" >&6; }
41260ac2
SM
6060 if eval test x\$$cachevar = xyes; then
6061 CXX_DIALECT="$switch"
6062 ac_success=yes
6063 break
6064 fi
6065 done
6066 if test x$ac_success = xyes; then
0bcda685
PA
6067 break
6068 fi
6069 done
6070 fi
6071 ac_ext=c
6072ac_cpp='$CPP $CPPFLAGS'
6073ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6074ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6075ac_compiler_gnu=$ac_cv_c_compiler_gnu
6076
6077 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6078 if test x$ac_success = xno; then
d0ac1c44 6079 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6080 fi
6081 fi
6082 if test x$ac_success = xno; then
6083 HAVE_CXX11=0
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6085$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6086 else
6087 HAVE_CXX11=1
6088
6089$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6090
6091 fi
6092
6093
6094
6095
a417dc56
RW
6096# Dependency checking.
6097rm -rf .tst 2>/dev/null
6098mkdir .tst 2>/dev/null
6099if test -d .tst; then
6100 am__leading_dot=.
6101else
6102 am__leading_dot=_
6103fi
6104rmdir .tst 2>/dev/null
6105
6106DEPDIR="${am__leading_dot}deps"
6107
81ecdfbb 6108ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6109
6110
6111depcc="$CC" am_compiler_list=
6112
6113am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6115$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6116if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6117 $as_echo_n "(cached) " >&6
a417dc56
RW
6118else
6119 if test -f "$am_depcomp"; then
6120 # We make a subdir and do the tests there. Otherwise we can end up
6121 # making bogus files that we don't know about and never remove. For
6122 # instance it was reported that on HP-UX the gcc test will end up
6123 # making a dummy file named `D' -- because `-MD' means `put the output
6124 # in D'.
6125 mkdir conftest.dir
6126 # Copy depcomp to subdir because otherwise we won't find it if we're
6127 # using a relative directory.
6128 cp "$am_depcomp" conftest.dir
6129 cd conftest.dir
6130 # We will build objects and dependencies in a subdirectory because
6131 # it helps to detect inapplicable dependency modes. For instance
6132 # both Tru64's cc and ICC support -MD to output dependencies as a
6133 # side effect of compilation, but ICC will put the dependencies in
6134 # the current directory while Tru64 will put them in the object
6135 # directory.
6136 mkdir sub
6137
6138 am_cv_CC_dependencies_compiler_type=none
6139 if test "$am_compiler_list" = ""; then
6140 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6141 fi
6142 for depmode in $am_compiler_list; do
6143 if test $depmode = none; then break; fi
6144
81ecdfbb 6145 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6146 # Setup a source with many dependencies, because some compilers
6147 # like to wrap large dependency lists on column 80 (with \), and
6148 # we should not choose a depcomp mode which is confused by this.
6149 #
6150 # We need to recreate these files for each test, as the compiler may
6151 # overwrite some of them when testing with obscure command lines.
6152 # This happens at least with the AIX C compiler.
6153 : > sub/conftest.c
6154 for i in 1 2 3 4 5 6; do
6155 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6156 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6157 # Solaris 8's {/usr,}/bin/sh.
6158 touch sub/conftst$i.h
6159 done
6160 echo "include sub/conftest.Po" > confmf
6161
6162 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6163 # mode. It turns out that the SunPro C++ compiler does not properly
6164 # handle `-M -o', and we need to detect this.
6165 depcmd="depmode=$depmode \
6166 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6167 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6168 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6169 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6170 if env $depcmd > conftest.err 2>&1 &&
6171 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6172 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6173 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6174 # icc doesn't choke on unknown options, it will just issue warnings
6175 # or remarks (even with -Werror). So we grep stderr for any message
6176 # that says an option was ignored or not supported.
6177 # When given -MP, icc 7.0 and 7.1 complain thusly:
6178 # icc: Command line warning: ignoring option '-M'; no argument required
6179 # The diagnosis changed in icc 8.0:
6180 # icc: Command line remark: option '-MP' not supported
6181 if (grep 'ignoring option' conftest.err ||
6182 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6183 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6184 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6185 break
6186 fi
6187 fi
81ecdfbb 6188 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6189 sed -e 's/^/| /' < conftest.err >&5
6190 done
6191
6192 cd ..
6193 rm -rf conftest.dir
6194else
6195 am_cv_CC_dependencies_compiler_type=none
6196fi
6197
6198fi
81ecdfbb
RW
6199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6200$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6201if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6202then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6203else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6204
6205fi
6206
6207
c971b7fa
PA
6208
6209CONFIG_OBS=
6210CONFIG_DEPS=
6211CONFIG_SRCS=
6212ENABLE_CFLAGS=
6213
6214CONFIG_ALL=
6215CONFIG_CLEAN=
6216CONFIG_INSTALL=
6217CONFIG_UNINSTALL=
6218
6219# If we haven't got the data from the intl directory,
6220# assume NLS is disabled.
6221USE_NLS=no
6222LIBINTL=
6223LIBINTL_DEP=
6224INCINTL=
6225XGETTEXT=
6226GMSGFMT=
6227POSUB=
783e057b
DJ
6228
6229if test -f ../intl/config.intl; then
6230 . ../intl/config.intl
6231fi
81ecdfbb
RW
6232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6233$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6234if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6236$as_echo "no" >&6; }
783e057b 6237else
81ecdfbb
RW
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6239$as_echo "yes" >&6; }
783e057b 6240
81ecdfbb 6241$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6242
6243
81ecdfbb
RW
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6245$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6246 # Look for .po and .gmo files in the source directory.
6247 CATALOGS=
6248 XLINGUAS=
6249 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6250 # If there aren't any .gmo files the shell will give us the
6251 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6252 # weeded out.
6253 case "$cat" in *\**)
6254 continue;;
6255 esac
6256 # The quadruple backslash is collapsed to a double backslash
6257 # by the backticks, then collapsed again by the double quotes,
6258 # leaving us with one backslash in the sed expression (right
6259 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6260 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6261 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6262 # The user is allowed to set LINGUAS to a list of languages to
6263 # install catalogs for. If it's empty that means "all of them."
6264 if test "x$LINGUAS" = x; then
6265 CATALOGS="$CATALOGS $cat"
6266 XLINGUAS="$XLINGUAS $lang"
6267 else
6268 case "$LINGUAS" in *$lang*)
6269 CATALOGS="$CATALOGS $cat"
6270 XLINGUAS="$XLINGUAS $lang"
6271 ;;
6272 esac
e28b3332
DJ
6273 fi
6274 done
c971b7fa
PA
6275 LINGUAS="$XLINGUAS"
6276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6277$as_echo "$LINGUAS" >&6; }
6278
6279
6280 DATADIRNAME=share
6281
6282 INSTOBJEXT=.mo
6283
6284 GENCAT=gencat
6285
6286 CATOBJEXT=.gmo
e28b3332 6287
e28b3332
DJ
6288fi
6289
c971b7fa
PA
6290localedir='${datadir}/locale'
6291
6292
6293if test x"$USE_NLS" = xyes; then
6294 CONFIG_ALL="$CONFIG_ALL all-po"
6295 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6296 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6297 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6298fi
e28b3332 6299
c971b7fa
PA
6300PACKAGE=gdb
6301
6302cat >>confdefs.h <<_ACEOF
6303#define PACKAGE "$PACKAGE"
6304_ACEOF
6305
6306
6307
6308# We never need to detect it in this sub-configure.
6309# But preserve it for config.status --recheck.
6310
6311
6312
6313MAKEINFO_EXTRA_FLAGS=""
6314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6315$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6316if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6317 $as_echo_n "(cached) " >&6
6318else
6319 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6320 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6321 gdb_cv_have_makeinfo_click=yes
6322 else
6323 gdb_cv_have_makeinfo_click=no
6324 fi
6325fi
6326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6327$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6328if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6329 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6330fi
e28b3332
DJ
6331
6332
bec39cab
AC
6333
6334
81ecdfbb
RW
6335# Check whether --with-separate-debug-dir was given.
6336if test "${with_separate_debug_dir+set}" = set; then :
6337 withval=$with_separate_debug_dir;
b14b1491
TT
6338 DEBUGDIR=$withval
6339else
6340 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6341fi
6342
20e95c23 6343
783e057b
DJ
6344 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6345 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6346 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6347 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6348
783e057b
DJ
6349cat >>confdefs.h <<_ACEOF
6350#define DEBUGDIR "$ac_define_dir"
20e95c23 6351_ACEOF
20e95c23 6352
20e95c23 6353
20e95c23 6354
0c4a4063 6355
b14b1491
TT
6356 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6357 if test "x$prefix" = xNONE; then
6358 test_prefix=/usr/local
6359 else
6360 test_prefix=$prefix
6361 fi
783e057b 6362 else
b14b1491 6363 test_prefix=$exec_prefix
783e057b 6364 fi
b14b1491
TT
6365 value=0
6366 case ${ac_define_dir} in
6367 "${test_prefix}"|"${test_prefix}/"*|\
6368 '${exec_prefix}'|'${exec_prefix}/'*)
6369 value=1
6370 ;;
6371 esac
6372
6373cat >>confdefs.h <<_ACEOF
6374#define DEBUGDIR_RELOCATABLE $value
6375_ACEOF
6376
6377
6378
0c4a4063 6379
f83d8a90
DE
6380# We can't pass paths as command line arguments.
6381# Mingw32 tries to be clever and will convert the paths for us.
6382# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6383# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6384# This breaks GDB's relocatable path conversions since paths passed in
6385# config.h would not get so translated, the path prefixes no longer match.
6386
6387 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6388 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6389 ac_define_dir=`eval echo $bindir`
6390 ac_define_dir=`eval echo $ac_define_dir`
6391
6392cat >>confdefs.h <<_ACEOF
6393#define BINDIR "$ac_define_dir"
6394_ACEOF
6395
6396
6397
b14b1491
TT
6398# GDB's datadir relocation
6399
6400
6401
81ecdfbb
RW
6402# Check whether --with-gdb-datadir was given.
6403if test "${with_gdb_datadir+set}" = set; then :
6404 withval=$with_gdb_datadir;
b14b1491 6405 GDB_DATADIR=$withval
20e95c23 6406else
b14b1491 6407 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6408fi
6409
20e95c23 6410
b14b1491
TT
6411 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6412 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6413 ac_define_dir=`eval echo $GDB_DATADIR`
6414 ac_define_dir=`eval echo $ac_define_dir`
6415
6416cat >>confdefs.h <<_ACEOF
6417#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6418_ACEOF
6419
b14b1491
TT
6420
6421
0c4a4063 6422
b14b1491
TT
6423 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6424 if test "x$prefix" = xNONE; then
6425 test_prefix=/usr/local
6426 else
6427 test_prefix=$prefix
6428 fi
6429 else
6430 test_prefix=$exec_prefix
6431 fi
6432 value=0
6433 case ${ac_define_dir} in
6434 "${test_prefix}"|"${test_prefix}/"*|\
6435 '${exec_prefix}'|'${exec_prefix}/'*)
6436 value=1
6437 ;;
6438 esac
6439
6440cat >>confdefs.h <<_ACEOF
6441#define GDB_DATADIR_RELOCATABLE $value
6442_ACEOF
6443
6444
783e057b 6445
20e95c23 6446
0c4a4063 6447
81ecdfbb
RW
6448# Check whether --with-relocated-sources was given.
6449if test "${with_relocated_sources+set}" = set; then :
6450 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6451
6452 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6453 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6454 ac_define_dir=`eval echo $reloc_srcdir`
6455 ac_define_dir=`eval echo $ac_define_dir`
6456
6457cat >>confdefs.h <<_ACEOF
6458#define RELOC_SRCDIR "$ac_define_dir"
6459_ACEOF
6460
6461
6462
81ecdfbb
RW
6463fi
6464
29b0e8a2 6465
7349ff92
JK
6466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6467$as_echo_n "checking for default auto-load directory... " >&6; }
6468
6469# Check whether --with-auto-load-dir was given.
6470if test "${with_auto_load_dir+set}" = set; then :
6471 withval=$with_auto_load_dir;
6472else
1564a261 6473 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6474fi
6475
2861ee4f 6476escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6477
6478 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6479 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6480 ac_define_dir=`eval echo $escape_dir`
6481 ac_define_dir=`eval echo $ac_define_dir`
6482
6483cat >>confdefs.h <<_ACEOF
6484#define AUTO_LOAD_DIR "$ac_define_dir"
6485_ACEOF
6486
6487
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6489$as_echo "$with_auto_load_dir" >&6; }
6490
bccbefd2
JK
6491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6492$as_echo_n "checking for default auto-load safe-path... " >&6; }
6493
6494# Check whether --with-auto-load-safe-path was given.
6495if test "${with_auto_load_safe_path+set}" = set; then :
6496 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6497 with_auto_load_safe_path="/"
6498 fi
bccbefd2 6499else
7349ff92 6500 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6501fi
6502
2861ee4f 6503escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6504
6505 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6506 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6507 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6508 ac_define_dir=`eval echo $ac_define_dir`
6509
6510cat >>confdefs.h <<_ACEOF
6dea1fbd 6511#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6512_ACEOF
6513
6514
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6516$as_echo "$with_auto_load_safe_path" >&6; }
6517
29b0e8a2 6518
20e95c23 6519
5ae98d25 6520subdirs="$subdirs testsuite"
20e95c23
DJ
6521
6522
783e057b 6523# Check whether to support alternative target configurations
81ecdfbb
RW
6524# Check whether --enable-targets was given.
6525if test "${enable_targets+set}" = set; then :
6526 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6527 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6528 ;;
6529 no) enable_targets= ;;
6530 *) enable_targets=$enableval ;;
6531esac
81ecdfbb
RW
6532fi
6533
20e95c23 6534
783e057b 6535# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6536# Check whether --enable-64-bit-bfd was given.
6537if test "${enable_64_bit_bfd+set}" = set; then :
6538 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6539 yes) want64=true ;;
6540 no) want64=false ;;
d0ac1c44 6541 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6542esac
6543else
6544 want64=false
81ecdfbb
RW
6545fi
6546
783e057b
DJ
6547# Provide defaults for some variables set by the per-host and per-target
6548# configuration.
6549gdb_host_obs=posix-hdep.o
20e95c23 6550
783e057b
DJ
6551if test "${target}" = "${host}"; then
6552 gdb_native=yes
6553else
6554 gdb_native=no
6555fi
20e95c23 6556
783e057b 6557. $srcdir/configure.host
20e95c23 6558
783e057b 6559# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6560
783e057b
DJ
6561TARGET_OBS=
6562all_targets=
b292c783 6563HAVE_NATIVE_GCORE_TARGET=
20e95c23 6564
783e057b 6565for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6566do
783e057b
DJ
6567 if test "$targ_alias" = "all"; then
6568 all_targets=true
6569 else
6570 # Canonicalize the secondary target names.
6571 result=`$ac_config_sub $targ_alias 2>/dev/null`
6572 if test -n "$result"; then
6573 targ=$result
6574 else
6575 targ=$targ_alias
6576 fi
20e95c23 6577
783e057b 6578 . ${srcdir}/configure.tgt
20e95c23 6579
bf307134 6580 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6581 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6582fi
6583
783e057b
DJ
6584 # Target-specific object files
6585 for i in ${gdb_target_obs}; do
6586 case " $TARGET_OBS " in
6587 *" ${i} "*) ;;
6588 *)
6589 TARGET_OBS="$TARGET_OBS ${i}"
6590 ;;
6591 esac
6592 done
20e95c23 6593
783e057b
DJ
6594 # Check whether this target needs 64-bit CORE_ADDR
6595 if test x${want64} = xfalse; then
6596 . ${srcdir}/../bfd/config.bfd
6597 fi
b292c783
JK
6598
6599 # Check whether this target is native and supports gcore.
6600 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6601 && $gdb_have_gcore; then
6602 HAVE_NATIVE_GCORE_TARGET=1
6603 fi
783e057b 6604 fi
20e95c23
DJ
6605done
6606
783e057b
DJ
6607if test x${all_targets} = xtrue; then
6608
6609 # We want all 64-bit targets if we either:
6610 # - run on a 64-bit host or
6611 # - already require 64-bit support for some other target or
6612 # - the --enable-64-bit-bfd option was supplied
6613 # Otherwise we only support all 32-bit targets.
6614 #
6615 # NOTE: This test must be in sync with the corresponding
6616 # tests in BFD!
20e95c23 6617
783e057b 6618 if test x${want64} = xfalse; then
81ecdfbb
RW
6619 # The cast to long int works around a bug in the HP C Compiler
6620# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6621# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6622# This bug is HP SR number 8606223364.
6623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6624$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6625if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6626 $as_echo_n "(cached) " >&6
c0993dbe 6627else
81ecdfbb 6628 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6629
81ecdfbb
RW
6630else
6631 if test "$ac_cv_type_long" = yes; then
6632 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6634as_fn_error 77 "cannot compute sizeof (long)
6635See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6636 else
6637 ac_cv_sizeof_long=0
6638 fi
c0993dbe 6639fi
81ecdfbb 6640
c0993dbe 6641fi
81ecdfbb
RW
6642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6643$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6644
c0993dbe 6645
c0993dbe 6646
c0993dbe
UW
6647cat >>confdefs.h <<_ACEOF
6648#define SIZEOF_LONG $ac_cv_sizeof_long
6649_ACEOF
6650
6651
6652 if test "x${ac_cv_sizeof_long}" = "x8"; then
6653 want64=true
6654 fi
6655 fi
6656 if test x${want64} = xtrue; then
6657 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6658 else
6659 TARGET_OBS='$(ALL_TARGET_OBS)'
6660 fi
6661fi
6662
6663
6664
b292c783 6665
c0993dbe
UW
6666# For other settings, only the main target counts.
6667gdb_sim=
6668gdb_osabi=
6669build_gdbserver=
6670targ=$target; . ${srcdir}/configure.tgt
6671
6672# Fetch the default architecture and default target vector from BFD.
6673targ=$target; . $srcdir/../bfd/config.bfd
6674
6675# We only want the first architecture, so strip off the others if
6676# there is more than one.
6677targ_archs=`echo $targ_archs | sed 's/ .*//'`
6678
6679if test "x$targ_archs" != x; then
6680
6681cat >>confdefs.h <<_ACEOF
6682#define DEFAULT_BFD_ARCH $targ_archs
6683_ACEOF
6684
6685fi
6686if test "x$targ_defvec" != x; then
6687
6688cat >>confdefs.h <<_ACEOF
6689#define DEFAULT_BFD_VEC $targ_defvec
6690_ACEOF
6691
6692fi
6693
c0993dbe 6694# Enable MI.
81ecdfbb
RW
6695# Check whether --enable-gdbmi was given.
6696if test "${enable_gdbmi+set}" = set; then :
6697 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6698 yes | no)
6699 ;;
6700 *)
d0ac1c44 6701 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6702 esac
6703else
6704 enable_gdbmi=yes
81ecdfbb
RW
6705fi
6706
c0993dbe
UW
6707if test x"$enable_gdbmi" = xyes; then
6708 if test -d $srcdir/mi; then
6709 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6710 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6711 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6712 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6713 fi
6714fi
6715
6716# Enable TUI.
81ecdfbb
RW
6717# Check whether --enable-tui was given.
6718if test "${enable_tui+set}" = set; then :
6719 enableval=$enable_tui; case $enableval in
3ca64bd3 6720 yes | no | auto)
c0993dbe
UW
6721 ;;
6722 *)
d0ac1c44 6723 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6724 esac
6725else
3ca64bd3 6726 enable_tui=auto
81ecdfbb
RW
6727fi
6728
c0993dbe
UW
6729
6730# Enable gdbtk.
81ecdfbb
RW
6731# Check whether --enable-gdbtk was given.
6732if test "${enable_gdbtk+set}" = set; then :
6733 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6734 yes | no)
6735 ;;
6736 *)
d0ac1c44 6737 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6738 esac
6739else
5062cc19 6740 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6741 enable_gdbtk=yes
6742 else
6743 enable_gdbtk=no
6744 fi
81ecdfbb
RW
6745fi
6746
c0993dbe
UW
6747# We unconditionally disable gdbtk tests on selected platforms.
6748case $host_os in
6749 go32* | windows*)
81ecdfbb
RW
6750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6751$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6752 enable_gdbtk=no ;;
6753esac
6754
05e7c244 6755# Libunwind support for ia64.
bec39cab 6756
05e7c244
JK
6757
6758# Check whether --with-libunwind-ia64 was given.
6759if test "${with_libunwind_ia64+set}" = set; then :
6760 withval=$with_libunwind_ia64;
bec39cab 6761else
05e7c244
JK
6762 with_libunwind_ia64=auto
6763fi
bec39cab 6764
05e7c244
JK
6765
6766# Backward compatibility option.
6767if test "${with_libunwind+set}" = set; then
6768 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6769 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6770 fi
6771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6772$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6773 with_libunwind_ia64="$with_libunwind"
6774fi
6775
6776case "$with_libunwind_ia64" in
6777 yes | no)
6778 ;;
6779 auto)
6780 for ac_header in libunwind-ia64.h
81ecdfbb 6781do :
b54a8fd7 6782 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6783if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6784 cat >>confdefs.h <<_ACEOF
b54a8fd7 6785#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6786_ACEOF
6787
6788fi
6789
6790done
6791
05e7c244
JK
6792 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6793 ;;
6794 *)
d0ac1c44 6795 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6796 ;;
6797esac
bec39cab 6798
05e7c244 6799if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6800 for ac_header in libunwind-ia64.h
81ecdfbb 6801do :
b54a8fd7 6802 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6803if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6804 cat >>confdefs.h <<_ACEOF
b54a8fd7 6805#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6806_ACEOF
6807
6808fi
6809
6810done
6811
05e7c244 6812 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6813 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6814 fi
6815 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6816 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6817 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6818fi
6819
cb01cfba
JB
6820opt_curses=no
6821
81ecdfbb
RW
6822# Check whether --with-curses was given.
6823if test "${with_curses+set}" = set; then :
6824 withval=$with_curses; opt_curses=$withval
6825fi
6826
cb01cfba 6827
76a39ba7 6828prefer_curses=no
cb01cfba 6829if test "$opt_curses" = "yes"; then
76a39ba7 6830 prefer_curses=yes
cb01cfba
JB
6831fi
6832
a9322a30 6833# Profiling support.
81ecdfbb
RW
6834# Check whether --enable-profiling was given.
6835if test "${enable_profiling+set}" = set; then :
6836 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6837 yes | no)
6838 ;;
6839 *)
d0ac1c44 6840 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6841 esac
6842else
6843 enable_profiling=no
81ecdfbb 6844fi
bec39cab 6845
a9322a30
TT
6846
6847for ac_func in monstartup _mcleanup
81ecdfbb
RW
6848do :
6849 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6850ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6851if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6852 cat >>confdefs.h <<_ACEOF
6853#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6854_ACEOF
a9322a30 6855
81ecdfbb
RW
6856fi
6857done
a9322a30 6858
81ecdfbb
RW
6859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6860$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6861if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6862 $as_echo_n "(cached) " >&6
6863else
6864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6865/* end confdefs.h. */
6866#include <stdlib.h>
6867extern char _etext;
a9322a30
TT
6868
6869int
6870main ()
6871{
6872free (&_etext);
6873 ;
6874 return 0;
6875}
bec39cab 6876_ACEOF
81ecdfbb 6877if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6878 ac_cv_var__etext=yes
bec39cab 6879else
81ecdfbb 6880 ac_cv_var__etext=no
bec39cab 6881fi
81ecdfbb
RW
6882rm -f core conftest.err conftest.$ac_objext \
6883 conftest$ac_exeext conftest.$ac_ext
bec39cab 6884fi
81ecdfbb
RW
6885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6886$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6887if test $ac_cv_var__etext = yes; then
60ca704f 6888
81ecdfbb 6889$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6890
bec39cab 6891fi
81ecdfbb
RW
6892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6893$as_echo_n "checking for etext... " >&6; }
d0ac1c44 6894if ${ac_cv_var_etext+:} false; then :
81ecdfbb 6895 $as_echo_n "(cached) " >&6
bec39cab 6896else
81ecdfbb 6897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6898/* end confdefs.h. */
a9322a30
TT
6899#include <stdlib.h>
6900extern char etext;
bec39cab
AC
6901
6902int
6903main ()
6904{
a9322a30 6905free (&etext);
bec39cab
AC
6906 ;
6907 return 0;
6908}
6909_ACEOF
81ecdfbb 6910if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6911 ac_cv_var_etext=yes
bec39cab 6912else
81ecdfbb 6913 ac_cv_var_etext=no
bec39cab 6914fi
81ecdfbb
RW
6915rm -f core conftest.err conftest.$ac_objext \
6916 conftest$ac_exeext conftest.$ac_ext
bec39cab 6917fi
81ecdfbb
RW
6918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6919$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6920if test $ac_cv_var_etext = yes; then
6921
81ecdfbb 6922$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6923
6924fi
a9322a30
TT
6925if test "$enable_profiling" = yes ; then
6926 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
d0ac1c44 6927 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6928 fi
6929 PROFILE_CFLAGS=-pg
6930 OLD_CFLAGS="$CFLAGS"
6931 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6932
81ecdfbb
RW
6933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6934$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 6935if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 6936 $as_echo_n "(cached) " >&6
bec39cab 6937else
81ecdfbb 6938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6939/* end confdefs.h. */
bec39cab
AC
6940
6941int
6942main ()
6943{
a9322a30 6944int x;
bec39cab
AC
6945 ;
6946 return 0;
6947}
6948_ACEOF
81ecdfbb 6949if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6950 ac_cv_cc_supports_pg=yes
bec39cab 6951else
81ecdfbb 6952 ac_cv_cc_supports_pg=no
bec39cab 6953fi
81ecdfbb 6954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6955fi
81ecdfbb
RW
6956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6957$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6958
a9322a30 6959 if test $ac_cv_cc_supports_pg = no; then
d0ac1c44 6960 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6961 fi
bec39cab 6962
a9322a30 6963 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6964fi
6965
44cee4fd
TT
6966CODESIGN_CERT=
6967# Check whether --enable-codesign was given.
6968if test "${enable_codesign+set}" = set; then :
6969 enableval=$enable_codesign; CODESIGN_CERT=$enableval
6970fi
6971
6972
6973
c16158bc
JM
6974
6975
81ecdfbb
RW
6976# Check whether --with-pkgversion was given.
6977if test "${with_pkgversion+set}" = set; then :
6978 withval=$with_pkgversion; case "$withval" in
d0ac1c44 6979 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6980 no) PKGVERSION= ;;
6981 *) PKGVERSION="($withval) " ;;
6982 esac
6983else
6984 PKGVERSION="(GDB) "
6985
81ecdfbb 6986fi
c16158bc
JM
6987
6988
6989
6990
81ecdfbb
RW
6991
6992# Check whether --with-bugurl was given.
6993if test "${with_bugurl+set}" = set; then :
6994 withval=$with_bugurl; case "$withval" in
d0ac1c44 6995 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6996 no) BUGURL=
6997 ;;
6998 *) BUGURL="$withval"
6999 ;;
7000 esac
7001else
7002 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7003
81ecdfbb
RW
7004fi
7005
c16158bc
JM
7006 case ${BUGURL} in
7007 "")
7008 REPORT_BUGS_TO=
7009 REPORT_BUGS_TEXI=
7010 ;;
7011 *)
7012 REPORT_BUGS_TO="<$BUGURL>"
7013 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7014 ;;
7015 esac;
7016
7017
7018
7019
7020cat >>confdefs.h <<_ACEOF
7021#define PKGVERSION "$PKGVERSION"
7022_ACEOF
7023
7024
7025cat >>confdefs.h <<_ACEOF
7026#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7027_ACEOF
7028
7029
bec39cab
AC
7030# --------------------- #
7031# Checks for programs. #
7032# --------------------- #
7033
7034for ac_prog in gawk mawk nawk awk
7035do
7036 # Extract the first word of "$ac_prog", so it can be a program name with args.
7037set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7039$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7040if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7041 $as_echo_n "(cached) " >&6
bec39cab
AC
7042else
7043 if test -n "$AWK"; then
7044 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7045else
7046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7047for as_dir in $PATH
7048do
7049 IFS=$as_save_IFS
7050 test -z "$as_dir" && as_dir=.
81ecdfbb 7051 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7053 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7055 break 2
7056 fi
7057done
81ecdfbb
RW
7058 done
7059IFS=$as_save_IFS
bec39cab
AC
7060
7061fi
7062fi
7063AWK=$ac_cv_prog_AWK
7064if test -n "$AWK"; then
81ecdfbb
RW
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7066$as_echo "$AWK" >&6; }
bec39cab 7067else
81ecdfbb
RW
7068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7069$as_echo "no" >&6; }
bec39cab
AC
7070fi
7071
bec39cab 7072
81ecdfbb 7073 test -n "$AWK" && break
bec39cab
AC
7074done
7075
c971b7fa
PA
7076# Find a good install program. We prefer a C program (faster),
7077# so one script is as good as another. But avoid the broken or
7078# incompatible versions:
7079# SysV /etc/install, /usr/sbin/install
7080# SunOS /usr/etc/install
7081# IRIX /sbin/install
7082# AIX /bin/install
7083# AmigaOS /C/install, which installs bootblocks on floppy discs
7084# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7085# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7086# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7087# OS/2's system install, which has a completely different semantic
7088# ./install, which can be erroneously created by make from ./install.sh.
7089# Reject install programs that cannot install multiple files.
7090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7091$as_echo_n "checking for a BSD-compatible install... " >&6; }
7092if test -z "$INSTALL"; then
d0ac1c44 7093if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7094 $as_echo_n "(cached) " >&6
7095else
7096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7097for as_dir in $PATH
7098do
7099 IFS=$as_save_IFS
7100 test -z "$as_dir" && as_dir=.
7101 # Account for people who put trailing slashes in PATH elements.
7102case $as_dir/ in #((
7103 ./ | .// | /[cC]/* | \
7104 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7105 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7106 /usr/ucb/* ) ;;
7107 *)
7108 # OSF1 and SCO ODT 3.0 have their own names for install.
7109 # Don't use installbsd from OSF since it installs stuff as root
7110 # by default.
7111 for ac_prog in ginstall scoinst install; do
7112 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7113 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7114 if test $ac_prog = install &&
7115 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7116 # AIX install. It has an incompatible calling convention.
7117 :
7118 elif test $ac_prog = install &&
7119 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7120 # program-specific install script used by HP pwplus--don't use.
7121 :
7122 else
7123 rm -rf conftest.one conftest.two conftest.dir
7124 echo one > conftest.one
7125 echo two > conftest.two
7126 mkdir conftest.dir
7127 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7128 test -s conftest.one && test -s conftest.two &&
7129 test -s conftest.dir/conftest.one &&
7130 test -s conftest.dir/conftest.two
7131 then
7132 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7133 break 3
7134 fi
7135 fi
7136 fi
7137 done
7138 done
7139 ;;
7140esac
7141
7142 done
7143IFS=$as_save_IFS
7144
7145rm -rf conftest.one conftest.two conftest.dir
7146
7147fi
7148 if test "${ac_cv_path_install+set}" = set; then
7149 INSTALL=$ac_cv_path_install
7150 else
7151 # As a last resort, use the slow shell script. Don't cache a
7152 # value for INSTALL within a source directory, because that will
7153 # break other packages using the cache if that directory is
7154 # removed, or if the value is a relative name.
7155 INSTALL=$ac_install_sh
7156 fi
7157fi
7158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7159$as_echo "$INSTALL" >&6; }
7160
7161# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7162# It thinks the first close brace ends the variable substitution.
7163test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7164
7165test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7166
7167test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7168
81ecdfbb
RW
7169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7170$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7171LN_S=$as_ln_s
7172if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7174$as_echo "yes" >&6; }
bec39cab 7175else
81ecdfbb
RW
7176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7177$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7178fi
7179
7180if test -n "$ac_tool_prefix"; then
7181 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7182set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7184$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7185if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7186 $as_echo_n "(cached) " >&6
bec39cab
AC
7187else
7188 if test -n "$RANLIB"; then
7189 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7190else
7191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7192for as_dir in $PATH
7193do
7194 IFS=$as_save_IFS
7195 test -z "$as_dir" && as_dir=.
81ecdfbb 7196 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7197 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7198 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7199 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7200 break 2
7201 fi
7202done
81ecdfbb
RW
7203 done
7204IFS=$as_save_IFS
bec39cab
AC
7205
7206fi
7207fi
7208RANLIB=$ac_cv_prog_RANLIB
7209if test -n "$RANLIB"; then
81ecdfbb
RW
7210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7211$as_echo "$RANLIB" >&6; }
bec39cab 7212else
81ecdfbb
RW
7213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7214$as_echo "no" >&6; }
bec39cab
AC
7215fi
7216
81ecdfbb 7217
bec39cab
AC
7218fi
7219if test -z "$ac_cv_prog_RANLIB"; then
7220 ac_ct_RANLIB=$RANLIB
7221 # Extract the first word of "ranlib", so it can be a program name with args.
7222set dummy ranlib; ac_word=$2
81ecdfbb
RW
7223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7224$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7225if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7226 $as_echo_n "(cached) " >&6
bec39cab
AC
7227else
7228 if test -n "$ac_ct_RANLIB"; then
7229 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7230else
7231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7232for as_dir in $PATH
7233do
7234 IFS=$as_save_IFS
7235 test -z "$as_dir" && as_dir=.
81ecdfbb 7236 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7237 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7238 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7239 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7240 break 2
7241 fi
7242done
81ecdfbb
RW
7243 done
7244IFS=$as_save_IFS
bec39cab 7245
bec39cab
AC
7246fi
7247fi
7248ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7249if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7251$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7252else
81ecdfbb
RW
7253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7254$as_echo "no" >&6; }
bec39cab
AC
7255fi
7256
81ecdfbb
RW
7257 if test "x$ac_ct_RANLIB" = x; then
7258 RANLIB=":"
7259 else
7260 case $cross_compiling:$ac_tool_warned in
7261yes:)
7262{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7263$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7264ac_tool_warned=yes ;;
7265esac
7266 RANLIB=$ac_ct_RANLIB
7267 fi
bec39cab
AC
7268else
7269 RANLIB="$ac_cv_prog_RANLIB"
7270fi
7271
7272for ac_prog in 'bison -y' byacc
7273do
7274 # Extract the first word of "$ac_prog", so it can be a program name with args.
7275set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7277$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7278if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7279 $as_echo_n "(cached) " >&6
bec39cab
AC
7280else
7281 if test -n "$YACC"; then
7282 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7283else
7284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7285for as_dir in $PATH
7286do
7287 IFS=$as_save_IFS
7288 test -z "$as_dir" && as_dir=.
81ecdfbb 7289 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7290 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7291 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7292 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7293 break 2
7294 fi
7295done
81ecdfbb
RW
7296 done
7297IFS=$as_save_IFS
bec39cab
AC
7298
7299fi
7300fi
7301YACC=$ac_cv_prog_YACC
7302if test -n "$YACC"; then
81ecdfbb
RW
7303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7304$as_echo "$YACC" >&6; }
bec39cab 7305else
81ecdfbb
RW
7306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7307$as_echo "no" >&6; }
bec39cab
AC
7308fi
7309
81ecdfbb 7310
bec39cab
AC
7311 test -n "$YACC" && break
7312done
7313test -n "$YACC" || YACC="yacc"
7314
7315
7316if test -n "$ac_tool_prefix"; then
7317 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7318set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7320$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7321if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7322 $as_echo_n "(cached) " >&6
bec39cab
AC
7323else
7324 if test -n "$AR"; then
7325 ac_cv_prog_AR="$AR" # Let the user override the test.
7326else
7327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7328for as_dir in $PATH
7329do
7330 IFS=$as_save_IFS
7331 test -z "$as_dir" && as_dir=.
81ecdfbb 7332 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7333 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7334 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7336 break 2
7337 fi
7338done
81ecdfbb
RW
7339 done
7340IFS=$as_save_IFS
bec39cab
AC
7341
7342fi
7343fi
7344AR=$ac_cv_prog_AR
7345if test -n "$AR"; then
81ecdfbb
RW
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7347$as_echo "$AR" >&6; }
bec39cab 7348else
81ecdfbb
RW
7349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7350$as_echo "no" >&6; }
bec39cab
AC
7351fi
7352
81ecdfbb 7353
bec39cab
AC
7354fi
7355if test -z "$ac_cv_prog_AR"; then
7356 ac_ct_AR=$AR
7357 # Extract the first word of "ar", so it can be a program name with args.
7358set dummy ar; ac_word=$2
81ecdfbb
RW
7359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7360$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7361if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7362 $as_echo_n "(cached) " >&6
bec39cab
AC
7363else
7364 if test -n "$ac_ct_AR"; then
7365 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7366else
7367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7368for as_dir in $PATH
7369do
7370 IFS=$as_save_IFS
7371 test -z "$as_dir" && as_dir=.
81ecdfbb 7372 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7373 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7374 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7375 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7376 break 2
7377 fi
7378done
81ecdfbb
RW
7379 done
7380IFS=$as_save_IFS
bec39cab
AC
7381
7382fi
7383fi
7384ac_ct_AR=$ac_cv_prog_ac_ct_AR
7385if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7387$as_echo "$ac_ct_AR" >&6; }
bec39cab 7388else
81ecdfbb
RW
7389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7390$as_echo "no" >&6; }
bec39cab
AC
7391fi
7392
81ecdfbb
RW
7393 if test "x$ac_ct_AR" = x; then
7394 AR=""
7395 else
7396 case $cross_compiling:$ac_tool_warned in
7397yes:)
7398{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7399$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7400ac_tool_warned=yes ;;
7401esac
7402 AR=$ac_ct_AR
7403 fi
bec39cab
AC
7404else
7405 AR="$ac_cv_prog_AR"
7406fi
7407
7408if test -n "$ac_tool_prefix"; then
7409 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7410set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7412$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7413if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7414 $as_echo_n "(cached) " >&6
bec39cab
AC
7415else
7416 if test -n "$DLLTOOL"; then
7417 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7418else
7419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7420for as_dir in $PATH
7421do
7422 IFS=$as_save_IFS
7423 test -z "$as_dir" && as_dir=.
81ecdfbb 7424 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7425 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7426 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7427 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7428 break 2
7429 fi
7430done
81ecdfbb
RW
7431 done
7432IFS=$as_save_IFS
bec39cab
AC
7433
7434fi
7435fi
7436DLLTOOL=$ac_cv_prog_DLLTOOL
7437if test -n "$DLLTOOL"; then
81ecdfbb
RW
7438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7439$as_echo "$DLLTOOL" >&6; }
bec39cab 7440else
81ecdfbb
RW
7441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7442$as_echo "no" >&6; }
bec39cab
AC
7443fi
7444
81ecdfbb 7445
bec39cab
AC
7446fi
7447if test -z "$ac_cv_prog_DLLTOOL"; then
7448 ac_ct_DLLTOOL=$DLLTOOL
7449 # Extract the first word of "dlltool", so it can be a program name with args.
7450set dummy dlltool; ac_word=$2
81ecdfbb
RW
7451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7452$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7453if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7454 $as_echo_n "(cached) " >&6
bec39cab
AC
7455else
7456 if test -n "$ac_ct_DLLTOOL"; then
7457 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7458else
7459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7460for as_dir in $PATH
7461do
7462 IFS=$as_save_IFS
7463 test -z "$as_dir" && as_dir=.
81ecdfbb 7464 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7465 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7466 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7467 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7468 break 2
7469 fi
7470done
81ecdfbb
RW
7471 done
7472IFS=$as_save_IFS
bec39cab
AC
7473
7474fi
7475fi
7476ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7477if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7479$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7480else
81ecdfbb
RW
7481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7482$as_echo "no" >&6; }
bec39cab
AC
7483fi
7484
81ecdfbb
RW
7485 if test "x$ac_ct_DLLTOOL" = x; then
7486 DLLTOOL=""
7487 else
7488 case $cross_compiling:$ac_tool_warned in
7489yes:)
7490{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7491$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7492ac_tool_warned=yes ;;
7493esac
7494 DLLTOOL=$ac_ct_DLLTOOL
7495 fi
bec39cab
AC
7496else
7497 DLLTOOL="$ac_cv_prog_DLLTOOL"
7498fi
7499
7500if test -n "$ac_tool_prefix"; then
7501 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7502set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7504$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7505if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7506 $as_echo_n "(cached) " >&6
bec39cab
AC
7507else
7508 if test -n "$WINDRES"; then
7509 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7510else
7511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7512for as_dir in $PATH
7513do
7514 IFS=$as_save_IFS
7515 test -z "$as_dir" && as_dir=.
81ecdfbb 7516 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7517 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7518 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7519 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7520 break 2
7521 fi
7522done
81ecdfbb
RW
7523 done
7524IFS=$as_save_IFS
bec39cab
AC
7525
7526fi
7527fi
7528WINDRES=$ac_cv_prog_WINDRES
7529if test -n "$WINDRES"; then
81ecdfbb
RW
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7531$as_echo "$WINDRES" >&6; }
bec39cab 7532else
81ecdfbb
RW
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7534$as_echo "no" >&6; }
bec39cab
AC
7535fi
7536
81ecdfbb 7537
bec39cab
AC
7538fi
7539if test -z "$ac_cv_prog_WINDRES"; then
7540 ac_ct_WINDRES=$WINDRES
7541 # Extract the first word of "windres", so it can be a program name with args.
7542set dummy windres; ac_word=$2
81ecdfbb
RW
7543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7544$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7545if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7546 $as_echo_n "(cached) " >&6
bec39cab
AC
7547else
7548 if test -n "$ac_ct_WINDRES"; then
7549 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7550else
7551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7552for as_dir in $PATH
7553do
7554 IFS=$as_save_IFS
7555 test -z "$as_dir" && as_dir=.
81ecdfbb 7556 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7557 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7558 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7559 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7560 break 2
7561 fi
7562done
81ecdfbb
RW
7563 done
7564IFS=$as_save_IFS
bec39cab
AC
7565
7566fi
7567fi
7568ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7569if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7571$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7572else
81ecdfbb
RW
7573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7574$as_echo "no" >&6; }
c906108c 7575fi
bec39cab 7576
81ecdfbb
RW
7577 if test "x$ac_ct_WINDRES" = x; then
7578 WINDRES=""
7579 else
7580 case $cross_compiling:$ac_tool_warned in
7581yes:)
7582{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7583$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7584ac_tool_warned=yes ;;
7585esac
7586 WINDRES=$ac_ct_WINDRES
7587 fi
c906108c 7588else
bec39cab 7589 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7590fi
7591
bec39cab 7592
036c3acb
TS
7593case $host_os in
7594 gnu*)
7595 # Needed for GNU Hurd hosts.
7596 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7597 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7598set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7600$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7601if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7602 $as_echo_n "(cached) " >&6
c906108c 7603else
bec39cab
AC
7604 if test -n "$MIG"; then
7605 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7606else
7607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7608for as_dir in $PATH
7609do
7610 IFS=$as_save_IFS
7611 test -z "$as_dir" && as_dir=.
81ecdfbb 7612 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7613 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7614 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7616 break 2
7617 fi
7618done
81ecdfbb
RW
7619 done
7620IFS=$as_save_IFS
bec39cab 7621
c906108c 7622fi
bec39cab
AC
7623fi
7624MIG=$ac_cv_prog_MIG
7625if test -n "$MIG"; then
81ecdfbb
RW
7626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7627$as_echo "$MIG" >&6; }
c906108c 7628else
81ecdfbb
RW
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7630$as_echo "no" >&6; }
c906108c
SS
7631fi
7632
81ecdfbb 7633
bec39cab
AC
7634fi
7635if test -z "$ac_cv_prog_MIG"; then
7636 ac_ct_MIG=$MIG
7637 # Extract the first word of "mig", so it can be a program name with args.
7638set dummy mig; ac_word=$2
81ecdfbb
RW
7639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7640$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7641if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7642 $as_echo_n "(cached) " >&6
bec39cab
AC
7643else
7644 if test -n "$ac_ct_MIG"; then
7645 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7646else
7647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7648for as_dir in $PATH
7649do
7650 IFS=$as_save_IFS
7651 test -z "$as_dir" && as_dir=.
81ecdfbb 7652 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7654 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7656 break 2
7657 fi
7658done
81ecdfbb
RW
7659 done
7660IFS=$as_save_IFS
c906108c 7661
bec39cab
AC
7662fi
7663fi
7664ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7665if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7667$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7668else
81ecdfbb
RW
7669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7670$as_echo "no" >&6; }
bec39cab 7671fi
c906108c 7672
81ecdfbb
RW
7673 if test "x$ac_ct_MIG" = x; then
7674 MIG=""
7675 else
7676 case $cross_compiling:$ac_tool_warned in
7677yes:)
7678{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7679$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7680ac_tool_warned=yes ;;
7681esac
7682 MIG=$ac_ct_MIG
7683 fi
bec39cab
AC
7684else
7685 MIG="$ac_cv_prog_MIG"
7686fi
c906108c 7687
036c3acb 7688 if test x"$MIG" = x; then
d0ac1c44 7689 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7690 fi
7691 ;;
7692esac
c906108c 7693
bec39cab
AC
7694# ---------------------- #
7695# Checks for libraries. #
7696# ---------------------- #
c906108c 7697
bec39cab 7698# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7700$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7701if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7702 $as_echo_n "(cached) " >&6
bec39cab
AC
7703else
7704 ac_check_lib_save_LIBS=$LIBS
7705LIBS="-lm $LIBS"
81ecdfbb 7706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7707/* end confdefs.h. */
c906108c 7708
c906108c 7709
bec39cab
AC
7710int
7711main ()
7712{
81ecdfbb 7713return main ();
bec39cab
AC
7714 ;
7715 return 0;
7716}
7717_ACEOF
81ecdfbb 7718if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7719 ac_cv_lib_m_main=yes
7720else
81ecdfbb 7721 ac_cv_lib_m_main=no
bec39cab 7722fi
81ecdfbb
RW
7723rm -f core conftest.err conftest.$ac_objext \
7724 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7725LIBS=$ac_check_lib_save_LIBS
7726fi
81ecdfbb
RW
7727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7728$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7729if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7730 cat >>confdefs.h <<_ACEOF
7731#define HAVE_LIBM 1
7732_ACEOF
7733
7734 LIBS="-lm $LIBS"
c906108c 7735
c906108c 7736fi
bec39cab
AC
7737
7738
bec39cab 7739# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7741$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7742if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7743 $as_echo_n "(cached) " >&6
bec39cab
AC
7744else
7745 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7747/* end confdefs.h. */
ddc9cd0f 7748
81ecdfbb
RW
7749/* Override any GCC internal prototype to avoid an error.
7750 Use char because int might match the return type of a GCC
7751 builtin and then its argument prototype would still apply. */
bec39cab
AC
7752#ifdef __cplusplus
7753extern "C"
7754#endif
bec39cab
AC
7755char gethostbyname ();
7756int
7757main ()
7758{
81ecdfbb 7759return gethostbyname ();
bec39cab
AC
7760 ;
7761 return 0;
7762}
7763_ACEOF
81ecdfbb
RW
7764for ac_lib in '' nsl; do
7765 if test -z "$ac_lib"; then
7766 ac_res="none required"
7767 else
7768 ac_res=-l$ac_lib
b4e70030 7769 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7770 fi
7771 if ac_fn_c_try_link "$LINENO"; then :
7772 ac_cv_search_gethostbyname=$ac_res
7773fi
7774rm -f core conftest.err conftest.$ac_objext \
7775 conftest$ac_exeext
d0ac1c44 7776 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7777 break
7778fi
7779done
d0ac1c44 7780if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7781
bec39cab 7782else
81ecdfbb 7783 ac_cv_search_gethostbyname=no
bec39cab 7784fi
81ecdfbb 7785rm conftest.$ac_ext
bec39cab
AC
7786LIBS=$ac_func_search_save_LIBS
7787fi
81ecdfbb
RW
7788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7789$as_echo "$ac_cv_search_gethostbyname" >&6; }
7790ac_res=$ac_cv_search_gethostbyname
7791if test "$ac_res" != no; then :
7792 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7793
bec39cab 7794fi
96baa820 7795
c906108c 7796
b4e70030 7797# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7799$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7800if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7801 $as_echo_n "(cached) " >&6
b4e70030
JB
7802else
7803 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7805/* end confdefs.h. */
7806
81ecdfbb
RW
7807/* Override any GCC internal prototype to avoid an error.
7808 Use char because int might match the return type of a GCC
7809 builtin and then its argument prototype would still apply. */
b4e70030
JB
7810#ifdef __cplusplus
7811extern "C"
7812#endif
b4e70030
JB
7813char socketpair ();
7814int
7815main ()
7816{
81ecdfbb 7817return socketpair ();
b4e70030
JB
7818 ;
7819 return 0;
7820}
7821_ACEOF
81ecdfbb
RW
7822for ac_lib in '' socket; do
7823 if test -z "$ac_lib"; then
7824 ac_res="none required"
7825 else
7826 ac_res=-l$ac_lib
b4e70030 7827 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7828 fi
7829 if ac_fn_c_try_link "$LINENO"; then :
7830 ac_cv_search_socketpair=$ac_res
7831fi
7832rm -f core conftest.err conftest.$ac_objext \
7833 conftest$ac_exeext
d0ac1c44 7834 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7835 break
7836fi
7837done
d0ac1c44 7838if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7839
b4e70030 7840else
81ecdfbb 7841 ac_cv_search_socketpair=no
b4e70030 7842fi
81ecdfbb 7843rm conftest.$ac_ext
b4e70030
JB
7844LIBS=$ac_func_search_save_LIBS
7845fi
81ecdfbb
RW
7846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7847$as_echo "$ac_cv_search_socketpair" >&6; }
7848ac_res=$ac_cv_search_socketpair
7849if test "$ac_res" != no; then :
7850 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7851
7852fi
7853
7854
233a11ab 7855# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7856
711a72d3 7857 # Use the system's zlib library.
39f3de7c
L
7858 zlibdir="-L\$(top_builddir)/../zlib"
7859 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7860
711a72d3
L
7861# Check whether --with-system-zlib was given.
7862if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7863 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7864 zlibdir=
7865 zlibinc=
7866 fi
b040ad30 7867
233a11ab 7868fi
233a11ab 7869
233a11ab 7870
233a11ab 7871
b040ad30 7872
233a11ab 7873
25268153 7874# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7875# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7877$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7878if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7879 $as_echo_n "(cached) " >&6
7880else
7881 ac_func_search_save_LIBS=$LIBS
7882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7883/* end confdefs.h. */
7884
7885/* Override any GCC internal prototype to avoid an error.
7886 Use char because int might match the return type of a GCC
7887 builtin and then its argument prototype would still apply. */
7888#ifdef __cplusplus
7889extern "C"
7890#endif
7891char kinfo_getvmmap ();
7892int
7893main ()
7894{
7895return kinfo_getvmmap ();
7896 ;
7897 return 0;
7898}
7899_ACEOF
37773e78 7900for ac_lib in '' util util-freebsd; do
25268153
JB
7901 if test -z "$ac_lib"; then
7902 ac_res="none required"
7903 else
7904 ac_res=-l$ac_lib
7905 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7906 fi
7907 if ac_fn_c_try_link "$LINENO"; then :
7908 ac_cv_search_kinfo_getvmmap=$ac_res
7909fi
7910rm -f core conftest.err conftest.$ac_objext \
7911 conftest$ac_exeext
d0ac1c44 7912 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7913 break
7914fi
7915done
d0ac1c44 7916if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7917
7918else
7919 ac_cv_search_kinfo_getvmmap=no
7920fi
7921rm conftest.$ac_ext
7922LIBS=$ac_func_search_save_LIBS
7923fi
7924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7925$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7926ac_res=$ac_cv_search_kinfo_getvmmap
7927if test "$ac_res" != no; then :
7928 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7929
7930$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7931
7932fi
7933
7934
92fce24d
JB
7935# fbsd-nat.c can also use kinfo_getfile.
7936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
7937$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
d0ac1c44 7938if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7939 $as_echo_n "(cached) " >&6
7940else
7941 ac_func_search_save_LIBS=$LIBS
7942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7943/* end confdefs.h. */
7944
7945/* Override any GCC internal prototype to avoid an error.
7946 Use char because int might match the return type of a GCC
7947 builtin and then its argument prototype would still apply. */
7948#ifdef __cplusplus
7949extern "C"
7950#endif
7951char kinfo_getfile ();
7952int
7953main ()
7954{
7955return kinfo_getfile ();
7956 ;
7957 return 0;
7958}
7959_ACEOF
7960for ac_lib in '' util util-freebsd; do
7961 if test -z "$ac_lib"; then
7962 ac_res="none required"
7963 else
7964 ac_res=-l$ac_lib
7965 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7966 fi
7967 if ac_fn_c_try_link "$LINENO"; then :
7968 ac_cv_search_kinfo_getfile=$ac_res
7969fi
7970rm -f core conftest.err conftest.$ac_objext \
7971 conftest$ac_exeext
d0ac1c44 7972 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7973 break
7974fi
7975done
d0ac1c44 7976if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7977
7978else
7979 ac_cv_search_kinfo_getfile=no
7980fi
7981rm conftest.$ac_ext
7982LIBS=$ac_func_search_save_LIBS
7983fi
7984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
7985$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
7986ac_res=$ac_cv_search_kinfo_getfile
7987if test "$ac_res" != no; then :
7988 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7989
7990$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
7991
7992fi
7993
7994
77f120bf 7995
016a3251
DD
7996 if test "X$prefix" = "XNONE"; then
7997 acl_final_prefix="$ac_default_prefix"
7998 else
7999 acl_final_prefix="$prefix"
8000 fi
8001 if test "X$exec_prefix" = "XNONE"; then
8002 acl_final_exec_prefix='${prefix}'
8003 else
8004 acl_final_exec_prefix="$exec_prefix"
8005 fi
8006 acl_save_prefix="$prefix"
8007 prefix="$acl_final_prefix"
8008 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8009 prefix="$acl_save_prefix"
8010
8011
8012# Check whether --with-gnu-ld was given.
8013if test "${with_gnu_ld+set}" = set; then :
8014 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8015else
8016 with_gnu_ld=no
8017fi
8018
8019# Prepare PATH_SEPARATOR.
8020# The user is always right.
8021if test "${PATH_SEPARATOR+set}" != set; then
8022 echo "#! /bin/sh" >conf$$.sh
8023 echo "exit 0" >>conf$$.sh
8024 chmod +x conf$$.sh
8025 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8026 PATH_SEPARATOR=';'
8027 else
8028 PATH_SEPARATOR=:
8029 fi
8030 rm -f conf$$.sh
8031fi
8032ac_prog=ld
8033if test "$GCC" = yes; then
8034 # Check if gcc -print-prog-name=ld gives a path.
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8036$as_echo_n "checking for ld used by GCC... " >&6; }
8037 case $host in
8038 *-*-mingw*)
8039 # gcc leaves a trailing carriage return which upsets mingw
8040 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8041 *)
8042 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8043 esac
8044 case $ac_prog in
8045 # Accept absolute paths.
8046 [\\/]* | [A-Za-z]:[\\/]*)
8047 re_direlt='/[^/][^/]*/\.\./'
8048 # Canonicalize the path of ld
8049 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8050 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8051 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8052 done
8053 test -z "$LD" && LD="$ac_prog"
8054 ;;
8055 "")
8056 # If it fails, then pretend we aren't using GCC.
8057 ac_prog=ld
8058 ;;
8059 *)
8060 # If it is relative, then search for the first ld in PATH.
8061 with_gnu_ld=unknown
8062 ;;
8063 esac
8064elif test "$with_gnu_ld" = yes; then
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8066$as_echo_n "checking for GNU ld... " >&6; }
8067else
8068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8069$as_echo_n "checking for non-GNU ld... " >&6; }
8070fi
d0ac1c44 8071if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8072 $as_echo_n "(cached) " >&6
8073else
8074 if test -z "$LD"; then
8075 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8076 for ac_dir in $PATH; do
8077 test -z "$ac_dir" && ac_dir=.
8078 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8079 acl_cv_path_LD="$ac_dir/$ac_prog"
8080 # Check to see if the program is GNU ld. I'd rather use --version,
8081 # but apparently some GNU ld's only accept -v.
8082 # Break only if it was the GNU/non-GNU ld that we prefer.
8083 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8084 test "$with_gnu_ld" != no && break
8085 else
8086 test "$with_gnu_ld" != yes && break
8087 fi
8088 fi
8089 done
8090 IFS="$ac_save_ifs"
8091else
8092 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8093fi
8094fi
8095
8096LD="$acl_cv_path_LD"
8097if test -n "$LD"; then
8098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8099$as_echo "$LD" >&6; }
8100else
8101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8102$as_echo "no" >&6; }
8103fi
d0ac1c44 8104test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8106$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8107if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8108 $as_echo_n "(cached) " >&6
8109else
8110 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8111if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8112 acl_cv_prog_gnu_ld=yes
8113else
8114 acl_cv_prog_gnu_ld=no
8115fi
8116fi
8117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8118$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8119with_gnu_ld=$acl_cv_prog_gnu_ld
8120
8121
8122
8123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8124$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8125if ${acl_cv_rpath+:} false; then :
016a3251
DD
8126 $as_echo_n "(cached) " >&6
8127else
8128
8129 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8130 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8131 . ./conftest.sh
8132 rm -f ./conftest.sh
8133 acl_cv_rpath=done
8134
8135fi
8136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8137$as_echo "$acl_cv_rpath" >&6; }
8138 wl="$acl_cv_wl"
8139 libext="$acl_cv_libext"
8140 shlibext="$acl_cv_shlibext"
8141 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8142 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8143 hardcode_direct="$acl_cv_hardcode_direct"
8144 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8145 # Check whether --enable-rpath was given.
8146if test "${enable_rpath+set}" = set; then :
8147 enableval=$enable_rpath; :
8148else
8149 enable_rpath=yes
8150fi
8151
8152
8153
8154
8155
8156
8157
8158
8159 use_additional=yes
8160
8161 acl_save_prefix="$prefix"
8162 prefix="$acl_final_prefix"
8163 acl_save_exec_prefix="$exec_prefix"
8164 exec_prefix="$acl_final_exec_prefix"
8165
8166 eval additional_includedir=\"$includedir\"
8167 eval additional_libdir=\"$libdir\"
8168
8169 exec_prefix="$acl_save_exec_prefix"
8170 prefix="$acl_save_prefix"
77f120bf 8171
6c7a06a3 8172
81ecdfbb
RW
8173# Check whether --with-libiconv-prefix was given.
8174if test "${with_libiconv_prefix+set}" = set; then :
8175 withval=$with_libiconv_prefix;
016a3251
DD
8176 if test "X$withval" = "Xno"; then
8177 use_additional=no
8178 else
8179 if test "X$withval" = "X"; then
8180
8181 acl_save_prefix="$prefix"
8182 prefix="$acl_final_prefix"
8183 acl_save_exec_prefix="$exec_prefix"
8184 exec_prefix="$acl_final_exec_prefix"
8185
8186 eval additional_includedir=\"$includedir\"
8187 eval additional_libdir=\"$libdir\"
8188
8189 exec_prefix="$acl_save_exec_prefix"
8190 prefix="$acl_save_prefix"
8191
8192 else
8193 additional_includedir="$withval/include"
8194 additional_libdir="$withval/lib"
8195 fi
8196 fi
6c7a06a3 8197
81ecdfbb
RW
8198fi
8199
016a3251
DD
8200 LIBICONV=
8201 LTLIBICONV=
8202 INCICONV=
8203 rpathdirs=
8204 ltrpathdirs=
8205 names_already_handled=
8206 names_next_round='iconv '
8207 while test -n "$names_next_round"; do
8208 names_this_round="$names_next_round"
8209 names_next_round=
8210 for name in $names_this_round; do
8211 already_handled=
8212 for n in $names_already_handled; do
8213 if test "$n" = "$name"; then
8214 already_handled=yes
8215 break
8216 fi
8217 done
8218 if test -z "$already_handled"; then
8219 names_already_handled="$names_already_handled $name"
8220 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8221 eval value=\"\$HAVE_LIB$uppername\"
8222 if test -n "$value"; then
8223 if test "$value" = yes; then
8224 eval value=\"\$LIB$uppername\"
8225 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8226 eval value=\"\$LTLIB$uppername\"
8227 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8228 else
8229 :
8230 fi
8231 else
8232 found_dir=
8233 found_la=
8234 found_so=
8235 found_a=
8236 if test $use_additional = yes; then
8237 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8238 found_dir="$additional_libdir"
8239 found_so="$additional_libdir/lib$name.$shlibext"
8240 if test -f "$additional_libdir/lib$name.la"; then
8241 found_la="$additional_libdir/lib$name.la"
8242 fi
8243 else
8244 if test -f "$additional_libdir/lib$name.$libext"; then
8245 found_dir="$additional_libdir"
8246 found_a="$additional_libdir/lib$name.$libext"
8247 if test -f "$additional_libdir/lib$name.la"; then
8248 found_la="$additional_libdir/lib$name.la"
8249 fi
8250 fi
8251 fi
8252 fi
8253 if test "X$found_dir" = "X"; then
8254 for x in $LDFLAGS $LTLIBICONV; do
8255
8256 acl_save_prefix="$prefix"
8257 prefix="$acl_final_prefix"
8258 acl_save_exec_prefix="$exec_prefix"
8259 exec_prefix="$acl_final_exec_prefix"
8260 eval x=\"$x\"
8261 exec_prefix="$acl_save_exec_prefix"
8262 prefix="$acl_save_prefix"
8263
8264 case "$x" in
8265 -L*)
8266 dir=`echo "X$x" | sed -e 's/^X-L//'`
8267 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8268 found_dir="$dir"
8269 found_so="$dir/lib$name.$shlibext"
8270 if test -f "$dir/lib$name.la"; then
8271 found_la="$dir/lib$name.la"
8272 fi
8273 else
8274 if test -f "$dir/lib$name.$libext"; then
8275 found_dir="$dir"
8276 found_a="$dir/lib$name.$libext"
8277 if test -f "$dir/lib$name.la"; then
8278 found_la="$dir/lib$name.la"
8279 fi
8280 fi
8281 fi
8282 ;;
8283 esac
8284 if test "X$found_dir" != "X"; then
8285 break
8286 fi
8287 done
8288 fi
8289 if test "X$found_dir" != "X"; then
8290 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8291 if test "X$found_so" != "X"; then
8292 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8293 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8294 else
8295 haveit=
8296 for x in $ltrpathdirs; do
8297 if test "X$x" = "X$found_dir"; then
8298 haveit=yes
8299 break
8300 fi
8301 done
8302 if test -z "$haveit"; then
8303 ltrpathdirs="$ltrpathdirs $found_dir"
8304 fi
8305 if test "$hardcode_direct" = yes; then
8306 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8307 else
8308 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8309 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8310 haveit=
8311 for x in $rpathdirs; do
8312 if test "X$x" = "X$found_dir"; then
8313 haveit=yes
8314 break
8315 fi
8316 done
8317 if test -z "$haveit"; then
8318 rpathdirs="$rpathdirs $found_dir"
8319 fi
8320 else
8321 haveit=
8322 for x in $LDFLAGS $LIBICONV; do
8323
8324 acl_save_prefix="$prefix"
8325 prefix="$acl_final_prefix"
8326 acl_save_exec_prefix="$exec_prefix"
8327 exec_prefix="$acl_final_exec_prefix"
8328 eval x=\"$x\"
8329 exec_prefix="$acl_save_exec_prefix"
8330 prefix="$acl_save_prefix"
8331
8332 if test "X$x" = "X-L$found_dir"; then
8333 haveit=yes
8334 break
8335 fi
8336 done
8337 if test -z "$haveit"; then
8338 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8339 fi
8340 if test "$hardcode_minus_L" != no; then
8341 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8342 else
8343 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8344 fi
8345 fi
8346 fi
8347 fi
8348 else
8349 if test "X$found_a" != "X"; then
8350 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8351 else
8352 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8353 fi
8354 fi
8355 additional_includedir=
8356 case "$found_dir" in
8357 */lib | */lib/)
8358 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8359 additional_includedir="$basedir/include"
8360 ;;
8361 esac
8362 if test "X$additional_includedir" != "X"; then
8363 if test "X$additional_includedir" != "X/usr/include"; then
8364 haveit=
8365 if test "X$additional_includedir" = "X/usr/local/include"; then
8366 if test -n "$GCC"; then
8367 case $host_os in
8368 linux*) haveit=yes;;
8369 esac
8370 fi
8371 fi
8372 if test -z "$haveit"; then
8373 for x in $CPPFLAGS $INCICONV; do
8374
8375 acl_save_prefix="$prefix"
8376 prefix="$acl_final_prefix"
8377 acl_save_exec_prefix="$exec_prefix"
8378 exec_prefix="$acl_final_exec_prefix"
8379 eval x=\"$x\"
8380 exec_prefix="$acl_save_exec_prefix"
8381 prefix="$acl_save_prefix"
8382
8383 if test "X$x" = "X-I$additional_includedir"; then
8384 haveit=yes
8385 break
8386 fi
8387 done
8388 if test -z "$haveit"; then
8389 if test -d "$additional_includedir"; then
8390 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8391 fi
8392 fi
8393 fi
8394 fi
8395 fi
8396 if test -n "$found_la"; then
8397 save_libdir="$libdir"
8398 case "$found_la" in
8399 */* | *\\*) . "$found_la" ;;
8400 *) . "./$found_la" ;;
8401 esac
8402 libdir="$save_libdir"
8403 for dep in $dependency_libs; do
8404 case "$dep" in
8405 -L*)
8406 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8407 if test "X$additional_libdir" != "X/usr/lib"; then
8408 haveit=
8409 if test "X$additional_libdir" = "X/usr/local/lib"; then
8410 if test -n "$GCC"; then
8411 case $host_os in
8412 linux*) haveit=yes;;
8413 esac
8414 fi
8415 fi
8416 if test -z "$haveit"; then
8417 haveit=
8418 for x in $LDFLAGS $LIBICONV; do
8419
8420 acl_save_prefix="$prefix"
8421 prefix="$acl_final_prefix"
8422 acl_save_exec_prefix="$exec_prefix"
8423 exec_prefix="$acl_final_exec_prefix"
8424 eval x=\"$x\"
8425 exec_prefix="$acl_save_exec_prefix"
8426 prefix="$acl_save_prefix"
8427
8428 if test "X$x" = "X-L$additional_libdir"; then
8429 haveit=yes
8430 break
8431 fi
8432 done
8433 if test -z "$haveit"; then
8434 if test -d "$additional_libdir"; then
8435 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8436 fi
8437 fi
8438 haveit=
8439 for x in $LDFLAGS $LTLIBICONV; do
8440
8441 acl_save_prefix="$prefix"
8442 prefix="$acl_final_prefix"
8443 acl_save_exec_prefix="$exec_prefix"
8444 exec_prefix="$acl_final_exec_prefix"
8445 eval x=\"$x\"
8446 exec_prefix="$acl_save_exec_prefix"
8447 prefix="$acl_save_prefix"
8448
8449 if test "X$x" = "X-L$additional_libdir"; then
8450 haveit=yes
8451 break
8452 fi
8453 done
8454 if test -z "$haveit"; then
8455 if test -d "$additional_libdir"; then
8456 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8457 fi
8458 fi
8459 fi
8460 fi
8461 ;;
8462 -R*)
8463 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8464 if test "$enable_rpath" != no; then
8465 haveit=
8466 for x in $rpathdirs; do
8467 if test "X$x" = "X$dir"; then
8468 haveit=yes
8469 break
8470 fi
8471 done
8472 if test -z "$haveit"; then
8473 rpathdirs="$rpathdirs $dir"
8474 fi
8475 haveit=
8476 for x in $ltrpathdirs; do
8477 if test "X$x" = "X$dir"; then
8478 haveit=yes
8479 break
8480 fi
8481 done
8482 if test -z "$haveit"; then
8483 ltrpathdirs="$ltrpathdirs $dir"
8484 fi
8485 fi
8486 ;;
8487 -l*)
8488 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8489 ;;
8490 *.la)
8491 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8492 ;;
8493 *)
8494 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8495 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8496 ;;
8497 esac
8498 done
8499 fi
8500 else
8501 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8502 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8503 fi
8504 fi
8505 fi
8506 done
8507 done
8508 if test "X$rpathdirs" != "X"; then
8509 if test -n "$hardcode_libdir_separator"; then
8510 alldirs=
8511 for found_dir in $rpathdirs; do
8512 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8513 done
8514 acl_save_libdir="$libdir"
8515 libdir="$alldirs"
8516 eval flag=\"$hardcode_libdir_flag_spec\"
8517 libdir="$acl_save_libdir"
8518 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8519 else
8520 for found_dir in $rpathdirs; do
8521 acl_save_libdir="$libdir"
8522 libdir="$found_dir"
8523 eval flag=\"$hardcode_libdir_flag_spec\"
8524 libdir="$acl_save_libdir"
8525 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8526 done
8527 fi
8528 fi
8529 if test "X$ltrpathdirs" != "X"; then
8530 for found_dir in $ltrpathdirs; do
8531 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8532 done
8533 fi
8534
8535
8536
8537
8538
6c7a06a3 8539
6c7a06a3 8540
81ecdfbb
RW
8541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8542$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8543if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8544 $as_echo_n "(cached) " >&6
d542061a 8545else
6c7a06a3
TT
8546
8547 am_cv_func_iconv="no, consider installing GNU libiconv"
8548 am_cv_lib_iconv=no
016a3251
DD
8549 am_save_CPPFLAGS="$CPPFLAGS"
8550 CPPFLAGS="$CPPFLAGS $INCICONV"
8551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8552/* end confdefs.h. */
6c7a06a3
TT
8553#include <stdlib.h>
8554#include <iconv.h>
d542061a
UW
8555int
8556main ()
8557{
6c7a06a3 8558iconv_t cd = iconv_open("","");
016a3251
DD
8559 iconv(cd,NULL,NULL,NULL,NULL);
8560 iconv_close(cd);
d542061a
UW
8561 ;
8562 return 0;
8563}
8564_ACEOF
81ecdfbb 8565if ac_fn_c_try_link "$LINENO"; then :
016a3251 8566 am_cv_func_iconv=yes
d542061a 8567fi
81ecdfbb
RW
8568rm -f core conftest.err conftest.$ac_objext \
8569 conftest$ac_exeext conftest.$ac_ext
016a3251 8570 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8571
016a3251
DD
8572 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8573 for _libs in .libs _libs; do
8574 am_save_CPPFLAGS="$CPPFLAGS"
8575 am_save_LIBS="$LIBS"
8576 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8577 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8579/* end confdefs.h. */
6c7a06a3
TT
8580#include <stdlib.h>
8581#include <iconv.h>
d542061a
UW
8582int
8583main ()
8584{
6c7a06a3 8585iconv_t cd = iconv_open("","");
016a3251
DD
8586 iconv(cd,NULL,NULL,NULL,NULL);
8587 iconv_close(cd);
d542061a
UW
8588 ;
8589 return 0;
8590}
8591_ACEOF
81ecdfbb 8592if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8593 INCICONV="-I../libiconv/include"
8594 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8595 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8596 am_cv_lib_iconv=yes
8597 am_cv_func_iconv=yes
d542061a 8598fi
81ecdfbb
RW
8599rm -f core conftest.err conftest.$ac_objext \
8600 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8601 CPPFLAGS="$am_save_CPPFLAGS"
8602 LIBS="$am_save_LIBS"
8603 if test "$am_cv_func_iconv" = "yes"; then
8604 break
8605 fi
8606 done
77f120bf 8607 fi
94ae1714 8608
4edb1e84 8609 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8610 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8611 am_save_LIBS="$LIBS"
5d762de0 8612 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8613 LIBS="$LIBS $LIBICONV"
81ecdfbb 8614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8615/* end confdefs.h. */
6c7a06a3
TT
8616#include <stdlib.h>
8617#include <iconv.h>
bec39cab
AC
8618int
8619main ()
8620{
6c7a06a3
TT
8621iconv_t cd = iconv_open("","");
8622 iconv(cd,NULL,NULL,NULL,NULL);
8623 iconv_close(cd);
bec39cab
AC
8624 ;
8625 return 0;
8626}
8627_ACEOF
81ecdfbb 8628if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8629 am_cv_lib_iconv=yes
6c7a06a3 8630 am_cv_func_iconv=yes
627af7ea 8631fi
81ecdfbb
RW
8632rm -f core conftest.err conftest.$ac_objext \
8633 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8634 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8635 LIBS="$am_save_LIBS"
6c7a06a3
TT
8636 fi
8637
8638fi
81ecdfbb
RW
8639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8640$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8641 if test "$am_cv_func_iconv" = yes; then
8642
8643$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8644
016a3251 8645 fi
fc3b640d 8646 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8647
8648 for element in $INCICONV; do
8649 haveit=
8650 for x in $CPPFLAGS; do
8651
8652 acl_save_prefix="$prefix"
8653 prefix="$acl_final_prefix"
8654 acl_save_exec_prefix="$exec_prefix"
8655 exec_prefix="$acl_final_exec_prefix"
8656 eval x=\"$x\"
8657 exec_prefix="$acl_save_exec_prefix"
8658 prefix="$acl_save_prefix"
8659
8660 if test "X$x" = "X$element"; then
8661 haveit=yes
8662 break
8663 fi
8664 done
8665 if test -z "$haveit"; then
8666 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8667 fi
8668 done
8669
8670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8671$as_echo_n "checking how to link with libiconv... " >&6; }
8672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8673$as_echo "$LIBICONV" >&6; }
94ae1714 8674 else
016a3251
DD
8675 LIBICONV=
8676 LTLIBICONV=
fc3b640d 8677 fi
94ae1714 8678
6c7a06a3 8679
6c7a06a3 8680
016a3251 8681 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8683$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8684 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8685 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8686else
8687
81ecdfbb 8688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8689/* end confdefs.h. */
8690
6c7a06a3
TT
8691#include <stdlib.h>
8692#include <iconv.h>
8693extern
b4e70030 8694#ifdef __cplusplus
6c7a06a3 8695"C"
b4e70030 8696#endif
6c7a06a3
TT
8697#if defined(__STDC__) || defined(__cplusplus)
8698size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8699#else
8700size_t iconv();
8701#endif
8702
b4e70030
JB
8703int
8704main ()
8705{
6c7a06a3 8706
b4e70030
JB
8707 ;
8708 return 0;
8709}
8710_ACEOF
81ecdfbb 8711if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8712 am_cv_proto_iconv_arg1=""
4e8d927d 8713else
81ecdfbb 8714 am_cv_proto_iconv_arg1="const"
b4e70030 8715fi
81ecdfbb 8716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8717 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);"
8718fi
8719
8720 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8722 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8723$as_echo "${ac_t:-
8724 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8725
8726cat >>confdefs.h <<_ACEOF
8727#define ICONV_CONST $am_cv_proto_iconv_arg1
8728_ACEOF
8729
8730 fi
6c7a06a3
TT
8731
8732
478aac75
DE
8733# GDB may fork/exec the iconv program to get the list of supported character
8734# sets. Allow the user to specify where to find it.
8735# There are several factors affecting the choice of option name:
8736# - There is already --with-libiconv-prefix but we can't use it, it specifies
8737# the build-time location of libiconv files.
8738# - The program we need to find is iconv, which comes with glibc. The user
8739# doesn't necessarily have libiconv installed. Therefore naming this
8740# --with-libiconv-foo feels wrong.
8741# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8742# defined to work on directories not files (though it really doesn't know
8743# the difference).
8744# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8745# with --with-libiconv-prefix.
8746# Putting these together is why the option name is --with-iconv-bin.
8747
8748
8749# Check whether --with-iconv-bin was given.
8750if test "${with_iconv_bin+set}" = set; then :
8751 withval=$with_iconv_bin; iconv_bin="${withval}"
8752
8753cat >>confdefs.h <<_ACEOF
8754#define ICONV_BIN "${iconv_bin}"
8755_ACEOF
8756
8757
8758 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8759 if test "x$prefix" = xNONE; then
8760 test_prefix=/usr/local
8761 else
8762 test_prefix=$prefix
8763 fi
8764 else
8765 test_prefix=$exec_prefix
8766 fi
8767 value=0
8768 case ${iconv_bin} in
8769 "${test_prefix}"|"${test_prefix}/"*|\
8770 '${exec_prefix}'|'${exec_prefix}/'*)
8771 value=1
8772 ;;
8773 esac
8774
8775cat >>confdefs.h <<_ACEOF
8776#define ICONV_BIN_RELOCATABLE $value
8777_ACEOF
8778
8779
8780
8781fi
8782
8783
cb01cfba 8784# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8785if test x"$enable_tui" != xno; then
cb01cfba
JB
8786 prefer_curses=yes
8787fi
8788
8789curses_found=no
8790if test x"$prefer_curses" = xyes; then
8791 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8792 # curses library because the latter might not provide all the
8793 # functionality we need. However, this leads to problems on systems
8794 # where the linker searches /usr/local/lib, but the compiler doesn't
8795 # search /usr/local/include, if ncurses is installed in /usr/local. A
8796 # default installation of ncurses on alpha*-dec-osf* will lead to such
8797 # a situation.
81ecdfbb
RW
8798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8799$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8800if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8801 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8802else
8803 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8805/* end confdefs.h. */
8806
81ecdfbb
RW
8807/* Override any GCC internal prototype to avoid an error.
8808 Use char because int might match the return type of a GCC
8809 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8810#ifdef __cplusplus
8811extern "C"
8812#endif
6c7a06a3
TT
8813char waddstr ();
8814int
8815main ()
8816{
81ecdfbb 8817return waddstr ();
6c7a06a3
TT
8818 ;
8819 return 0;
8820}
8821_ACEOF
5007d765 8822for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8823 if test -z "$ac_lib"; then
8824 ac_res="none required"
8825 else
8826 ac_res=-l$ac_lib
8827 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8828 fi
8829 if ac_fn_c_try_link "$LINENO"; then :
8830 ac_cv_search_waddstr=$ac_res
8831fi
8832rm -f core conftest.err conftest.$ac_objext \
8833 conftest$ac_exeext
d0ac1c44 8834 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8835 break
8836fi
8837done
d0ac1c44 8838if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8839
6c7a06a3 8840else
81ecdfbb
RW
8841 ac_cv_search_waddstr=no
8842fi
8843rm conftest.$ac_ext
8844LIBS=$ac_func_search_save_LIBS
8845fi
8846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8847$as_echo "$ac_cv_search_waddstr" >&6; }
8848ac_res=$ac_cv_search_waddstr
8849if test "$ac_res" != no; then :
8850 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8851
8852fi
8853
8854
cb01cfba
JB
8855 if test "$ac_cv_search_waddstr" != no; then
8856 curses_found=yes
8857 fi
8858fi
8859
8860# Check whether we should enable the TUI, but only do so if we really
8861# can.
8862if test x"$enable_tui" != xno; then
8863 if test -d $srcdir/tui; then
8864 if test "$curses_found" != no; then
6c7a06a3
TT
8865 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8866 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8867 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8868 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8869 else
8870 if test x"$enable_tui" = xyes; then
d0ac1c44 8871 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8872 else
81ecdfbb
RW
8873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8874$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8875 fi
8876 fi
8877 fi
8878fi
8879
8880# Since GDB uses Readline, we need termcap functionality. In many
8881# cases this will be provided by the curses library, but some systems
96fe4562 8882# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8883
8884case $host_os in
8885 cygwin*)
8886 if test -d $srcdir/libtermcap; then
8887 LIBS="../libtermcap/libtermcap.a $LIBS"
8888 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8889 fi ;;
8890 go32* | *djgpp*)
8891 ac_cv_search_tgetent="none required"
8892 ;;
6c7a06a3
TT
8893esac
8894
8895# These are the libraries checked by Readline.
81ecdfbb
RW
8896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8897$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 8898if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 8899 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8900else
8901 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8903/* end confdefs.h. */
8904
81ecdfbb
RW
8905/* Override any GCC internal prototype to avoid an error.
8906 Use char because int might match the return type of a GCC
8907 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8908#ifdef __cplusplus
8909extern "C"
8910#endif
6c7a06a3
TT
8911char tgetent ();
8912int
8913main ()
8914{
81ecdfbb 8915return tgetent ();
6c7a06a3
TT
8916 ;
8917 return 0;
8918}
8919_ACEOF
2578ecb1 8920for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
8921 if test -z "$ac_lib"; then
8922 ac_res="none required"
8923 else
8924 ac_res=-l$ac_lib
6c7a06a3 8925 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8926 fi
8927 if ac_fn_c_try_link "$LINENO"; then :
8928 ac_cv_search_tgetent=$ac_res
8929fi
8930rm -f core conftest.err conftest.$ac_objext \
8931 conftest$ac_exeext
d0ac1c44 8932 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
8933 break
8934fi
8935done
d0ac1c44 8936if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 8937
6c7a06a3 8938else
81ecdfbb 8939 ac_cv_search_tgetent=no
6c7a06a3 8940fi
81ecdfbb 8941rm conftest.$ac_ext
6c7a06a3
TT
8942LIBS=$ac_func_search_save_LIBS
8943fi
81ecdfbb
RW
8944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8945$as_echo "$ac_cv_search_tgetent" >&6; }
8946ac_res=$ac_cv_search_tgetent
8947if test "$ac_res" != no; then :
8948 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8949
06825bd1
MK
8950fi
8951
06825bd1 8952
bec39cab 8953if test "$ac_cv_search_tgetent" = no; then
7a85168d 8954 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8955fi
8956
3841debe 8957
81ecdfbb
RW
8958# Check whether --with-system-readline was given.
8959if test "${with_system_readline+set}" = set; then :
8960 withval=$with_system_readline;
8961fi
6a30b0a5 8962
6a30b0a5
AS
8963
8964if test "$with_system_readline" = yes; then
86c6b807
TT
8965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
8966$as_echo_n "checking whether system readline is new enough... " >&6; }
8967if ${gdb_cv_readline_ok+:} false; then :
8968 $as_echo_n "(cached) " >&6
8969else
8970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8971/* end confdefs.h. */
8972#include <stdio.h>
8973#include <readline/readline.h>
8974int
8975main ()
8976{
8977#if RL_VERSION_MAJOR < 7
8978# error "readline version 7 required"
8979#endif
8980 ;
8981 return 0;
8982}
8983_ACEOF
8984if ac_fn_c_try_compile "$LINENO"; then :
8985 gdb_cv_readline_ok=yes
8986else
8987 gdb_cv_readline_ok=no
8988fi
8989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8990fi
8991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
8992$as_echo "$gdb_cv_readline_ok" >&6; }
8993 if test "$gdb_cv_readline_ok" != yes; then
8994 as_fn_error $? "system readline is not new enough" "$LINENO" 5
8995 fi
8996
6a30b0a5
AS
8997 READLINE=-lreadline
8998 READLINE_DEPS=
8999 READLINE_CFLAGS=
39037522 9000 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9001else
9002 READLINE='$(READLINE_DIR)/libreadline.a'
9003 READLINE_DEPS='$(READLINE)'
9004 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9005 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9006fi
9007
9008
9009
9010
9011
f997c383
SD
9012# Generate jit-reader.h
9013
9014# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9015TARGET_PTR=
9016
9017# The cast to long int works around a bug in the HP C Compiler
9018# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9019# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9020# This bug is HP SR number 8606223364.
9021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9022$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9023if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9024 $as_echo_n "(cached) " >&6
9025else
9026 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9027
9028else
9029 if test "$ac_cv_type_unsigned_long_long" = yes; then
9030 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9032as_fn_error 77 "cannot compute sizeof (unsigned long long)
9033See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9034 else
9035 ac_cv_sizeof_unsigned_long_long=0
9036 fi
9037fi
9038
9039fi
9040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9041$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9042
9043
9044
9045cat >>confdefs.h <<_ACEOF
9046#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9047_ACEOF
9048
9049
9050# The cast to long int works around a bug in the HP C Compiler
9051# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9052# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9053# This bug is HP SR number 8606223364.
9054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9055$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9056if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9057 $as_echo_n "(cached) " >&6
9058else
9059 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9060
9061else
9062 if test "$ac_cv_type_unsigned_long" = yes; then
9063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9065as_fn_error 77 "cannot compute sizeof (unsigned long)
9066See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9067 else
9068 ac_cv_sizeof_unsigned_long=0
9069 fi
9070fi
9071
9072fi
9073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9074$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9075
9076
9077
9078cat >>confdefs.h <<_ACEOF
9079#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9080_ACEOF
9081
9082
9083# The cast to long int works around a bug in the HP C Compiler
9084# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9085# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9086# This bug is HP SR number 8606223364.
9087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9088$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9089if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9090 $as_echo_n "(cached) " >&6
9091else
9092 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9093
9094else
9095 if test "$ac_cv_type_unsigned___int128" = yes; then
9096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9098as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9099See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9100 else
9101 ac_cv_sizeof_unsigned___int128=0
9102 fi
9103fi
9104
9105fi
9106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9107$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9108
9109
9110
9111cat >>confdefs.h <<_ACEOF
9112#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9113_ACEOF
9114
9115
9116
9117if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9118 TARGET_PTR="unsigned long"
9119elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9120 TARGET_PTR="unsigned long long"
9121elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9122 TARGET_PTR="unsigned __int128"
9123else
9124 TARGET_PTR="unsigned long"
9125fi
9126
9127
9128ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9129
9130
a2d08b9e
SD
9131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9132$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9133if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9134 $as_echo_n "(cached) " >&6
9135else
9136 ac_func_search_save_LIBS=$LIBS
9137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9138/* end confdefs.h. */
9139
9140/* Override any GCC internal prototype to avoid an error.
9141 Use char because int might match the return type of a GCC
9142 builtin and then its argument prototype would still apply. */
9143#ifdef __cplusplus
9144extern "C"
9145#endif
9146char dlopen ();
9147int
9148main ()
9149{
9150return dlopen ();
9151 ;
9152 return 0;
9153}
9154_ACEOF
9155for ac_lib in '' dl; do
9156 if test -z "$ac_lib"; then
9157 ac_res="none required"
9158 else
9159 ac_res=-l$ac_lib
9160 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9161 fi
9162 if ac_fn_c_try_link "$LINENO"; then :
9163 ac_cv_search_dlopen=$ac_res
9164fi
9165rm -f core conftest.err conftest.$ac_objext \
9166 conftest$ac_exeext
d0ac1c44 9167 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9168 break
9169fi
9170done
d0ac1c44 9171if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9172
9173else
9174 ac_cv_search_dlopen=no
9175fi
9176rm conftest.$ac_ext
9177LIBS=$ac_func_search_save_LIBS
9178fi
9179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9180$as_echo "$ac_cv_search_dlopen" >&6; }
9181ac_res=$ac_cv_search_dlopen
9182if test "$ac_res" != no; then :
9183 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9184
9185fi
9186
9187
39037522 9188
b8e0a31c
SD
9189
9190# Check whether --with-jit-reader-dir was given.
9191if test "${with_jit_reader_dir+set}" = set; then :
9192 withval=$with_jit_reader_dir;
9193 JIT_READER_DIR=$withval
9194else
9195 JIT_READER_DIR=${libdir}/gdb
9196fi
9197
9198
9199 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9200 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9201 ac_define_dir=`eval echo $JIT_READER_DIR`
9202 ac_define_dir=`eval echo $ac_define_dir`
9203
9204cat >>confdefs.h <<_ACEOF
9205#define JIT_READER_DIR "$ac_define_dir"
9206_ACEOF
9207
9208
9209
9210
9211 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9212 if test "x$prefix" = xNONE; then
9213 test_prefix=/usr/local
9214 else
9215 test_prefix=$prefix
9216 fi
9217 else
9218 test_prefix=$exec_prefix
9219 fi
9220 value=0
9221 case ${ac_define_dir} in
9222 "${test_prefix}"|"${test_prefix}/"*|\
9223 '${exec_prefix}'|'${exec_prefix}/'*)
9224 value=1
9225 ;;
9226 esac
9227
9228cat >>confdefs.h <<_ACEOF
9229#define JIT_READER_DIR_RELOCATABLE $value
9230_ACEOF
9231
9232
9233
9234
9235
81ecdfbb
RW
9236# Check whether --with-expat was given.
9237if test "${with_expat+set}" = set; then :
9238 withval=$with_expat;
5c39566f
DJ
9239else
9240 with_expat=auto
81ecdfbb
RW
9241fi
9242
9243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9244$as_echo_n "checking whether to use expat... " >&6; }
9245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9246$as_echo "$with_expat" >&6; }
5c39566f
DJ
9247
9248if test "${with_expat}" = no; then
81ecdfbb
RW
9249 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9250$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9251 HAVE_LIBEXPAT=no
9252else
9253
3841debe
DJ
9254
9255
9256
9257
9258
9259
9260
9261 use_additional=yes
9262
9263 acl_save_prefix="$prefix"
9264 prefix="$acl_final_prefix"
9265 acl_save_exec_prefix="$exec_prefix"
9266 exec_prefix="$acl_final_exec_prefix"
9267
9268 eval additional_includedir=\"$includedir\"
9269 eval additional_libdir=\"$libdir\"
9270
9271 exec_prefix="$acl_save_exec_prefix"
9272 prefix="$acl_save_prefix"
9273
9274
81ecdfbb
RW
9275# Check whether --with-libexpat-prefix was given.
9276if test "${with_libexpat_prefix+set}" = set; then :
9277 withval=$with_libexpat_prefix;
3841debe
DJ
9278 if test "X$withval" = "Xno"; then
9279 use_additional=no
9280 else
9281 if test "X$withval" = "X"; then
9282
9283 acl_save_prefix="$prefix"
9284 prefix="$acl_final_prefix"
9285 acl_save_exec_prefix="$exec_prefix"
9286 exec_prefix="$acl_final_exec_prefix"
9287
9288 eval additional_includedir=\"$includedir\"
9289 eval additional_libdir=\"$libdir\"
9290
9291 exec_prefix="$acl_save_exec_prefix"
9292 prefix="$acl_save_prefix"
9293
9294 else
9295 additional_includedir="$withval/include"
9296 additional_libdir="$withval/lib"
9297 fi
9298 fi
9299
81ecdfbb
RW
9300fi
9301
3841debe
DJ
9302 LIBEXPAT=
9303 LTLIBEXPAT=
9304 INCEXPAT=
9305 rpathdirs=
9306 ltrpathdirs=
9307 names_already_handled=
9308 names_next_round='expat '
9309 while test -n "$names_next_round"; do
9310 names_this_round="$names_next_round"
9311 names_next_round=
9312 for name in $names_this_round; do
9313 already_handled=
9314 for n in $names_already_handled; do
9315 if test "$n" = "$name"; then
9316 already_handled=yes
9317 break
9318 fi
9319 done
9320 if test -z "$already_handled"; then
9321 names_already_handled="$names_already_handled $name"
9322 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9323 eval value=\"\$HAVE_LIB$uppername\"
9324 if test -n "$value"; then
9325 if test "$value" = yes; then
9326 eval value=\"\$LIB$uppername\"
9327 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9328 eval value=\"\$LTLIB$uppername\"
9329 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9330 else
9331 :
9332 fi
9333 else
9334 found_dir=
9335 found_la=
9336 found_so=
9337 found_a=
9338 if test $use_additional = yes; then
9339 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9340 found_dir="$additional_libdir"
9341 found_so="$additional_libdir/lib$name.$shlibext"
9342 if test -f "$additional_libdir/lib$name.la"; then
9343 found_la="$additional_libdir/lib$name.la"
9344 fi
9345 else
9346 if test -f "$additional_libdir/lib$name.$libext"; then
9347 found_dir="$additional_libdir"
9348 found_a="$additional_libdir/lib$name.$libext"
9349 if test -f "$additional_libdir/lib$name.la"; then
9350 found_la="$additional_libdir/lib$name.la"
9351 fi
9352 fi
9353 fi
9354 fi
9355 if test "X$found_dir" = "X"; then
9356 for x in $LDFLAGS $LTLIBEXPAT; do
9357
9358 acl_save_prefix="$prefix"
9359 prefix="$acl_final_prefix"
9360 acl_save_exec_prefix="$exec_prefix"
9361 exec_prefix="$acl_final_exec_prefix"
9362 eval x=\"$x\"
9363 exec_prefix="$acl_save_exec_prefix"
9364 prefix="$acl_save_prefix"
9365
9366 case "$x" in
9367 -L*)
9368 dir=`echo "X$x" | sed -e 's/^X-L//'`
9369 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9370 found_dir="$dir"
9371 found_so="$dir/lib$name.$shlibext"
9372 if test -f "$dir/lib$name.la"; then
9373 found_la="$dir/lib$name.la"
9374 fi
9375 else
9376 if test -f "$dir/lib$name.$libext"; then
9377 found_dir="$dir"
9378 found_a="$dir/lib$name.$libext"
9379 if test -f "$dir/lib$name.la"; then
9380 found_la="$dir/lib$name.la"
9381 fi
9382 fi
9383 fi
9384 ;;
9385 esac
9386 if test "X$found_dir" != "X"; then
9387 break
9388 fi
9389 done
9390 fi
9391 if test "X$found_dir" != "X"; then
9392 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9393 if test "X$found_so" != "X"; then
9394 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9395 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9396 else
9397 haveit=
9398 for x in $ltrpathdirs; do
9399 if test "X$x" = "X$found_dir"; then
9400 haveit=yes
9401 break
9402 fi
9403 done
9404 if test -z "$haveit"; then
9405 ltrpathdirs="$ltrpathdirs $found_dir"
9406 fi
9407 if test "$hardcode_direct" = yes; then
9408 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9409 else
9410 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9411 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9412 haveit=
9413 for x in $rpathdirs; do
9414 if test "X$x" = "X$found_dir"; then
9415 haveit=yes
9416 break
9417 fi
9418 done
9419 if test -z "$haveit"; then
9420 rpathdirs="$rpathdirs $found_dir"
9421 fi
9422 else
9423 haveit=
9424 for x in $LDFLAGS $LIBEXPAT; do
9425
9426 acl_save_prefix="$prefix"
9427 prefix="$acl_final_prefix"
9428 acl_save_exec_prefix="$exec_prefix"
9429 exec_prefix="$acl_final_exec_prefix"
9430 eval x=\"$x\"
9431 exec_prefix="$acl_save_exec_prefix"
9432 prefix="$acl_save_prefix"
9433
9434 if test "X$x" = "X-L$found_dir"; then
9435 haveit=yes
9436 break
9437 fi
9438 done
9439 if test -z "$haveit"; then
9440 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9441 fi
9442 if test "$hardcode_minus_L" != no; then
9443 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9444 else
9445 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9446 fi
9447 fi
9448 fi
9449 fi
9450 else
9451 if test "X$found_a" != "X"; then
9452 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9453 else
9454 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9455 fi
9456 fi
9457 additional_includedir=
9458 case "$found_dir" in
9459 */lib | */lib/)
9460 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9461 additional_includedir="$basedir/include"
9462 ;;
9463 esac
9464 if test "X$additional_includedir" != "X"; then
9465 if test "X$additional_includedir" != "X/usr/include"; then
9466 haveit=
9467 if test "X$additional_includedir" = "X/usr/local/include"; then
9468 if test -n "$GCC"; then
9469 case $host_os in
9470 linux*) haveit=yes;;
9471 esac
9472 fi
9473 fi
9474 if test -z "$haveit"; then
9475 for x in $CPPFLAGS $INCEXPAT; do
9476
9477 acl_save_prefix="$prefix"
9478 prefix="$acl_final_prefix"
9479 acl_save_exec_prefix="$exec_prefix"
9480 exec_prefix="$acl_final_exec_prefix"
9481 eval x=\"$x\"
9482 exec_prefix="$acl_save_exec_prefix"
9483 prefix="$acl_save_prefix"
9484
9485 if test "X$x" = "X-I$additional_includedir"; then
9486 haveit=yes
9487 break
9488 fi
9489 done
9490 if test -z "$haveit"; then
9491 if test -d "$additional_includedir"; then
9492 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9493 fi
9494 fi
9495 fi
9496 fi
9497 fi
9498 if test -n "$found_la"; then
9499 save_libdir="$libdir"
9500 case "$found_la" in
9501 */* | *\\*) . "$found_la" ;;
9502 *) . "./$found_la" ;;
9503 esac
9504 libdir="$save_libdir"
9505 for dep in $dependency_libs; do
9506 case "$dep" in
9507 -L*)
9508 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9509 if test "X$additional_libdir" != "X/usr/lib"; then
9510 haveit=
9511 if test "X$additional_libdir" = "X/usr/local/lib"; then
9512 if test -n "$GCC"; then
9513 case $host_os in
9514 linux*) haveit=yes;;
9515 esac
9516 fi
9517 fi
9518 if test -z "$haveit"; then
9519 haveit=
9520 for x in $LDFLAGS $LIBEXPAT; do
9521
9522 acl_save_prefix="$prefix"
9523 prefix="$acl_final_prefix"
9524 acl_save_exec_prefix="$exec_prefix"
9525 exec_prefix="$acl_final_exec_prefix"
9526 eval x=\"$x\"
9527 exec_prefix="$acl_save_exec_prefix"
9528 prefix="$acl_save_prefix"
9529
9530 if test "X$x" = "X-L$additional_libdir"; then
9531 haveit=yes
9532 break
9533 fi
9534 done
9535 if test -z "$haveit"; then
9536 if test -d "$additional_libdir"; then
9537 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9538 fi
9539 fi
9540 haveit=
9541 for x in $LDFLAGS $LTLIBEXPAT; do
9542
9543 acl_save_prefix="$prefix"
9544 prefix="$acl_final_prefix"
9545 acl_save_exec_prefix="$exec_prefix"
9546 exec_prefix="$acl_final_exec_prefix"
9547 eval x=\"$x\"
9548 exec_prefix="$acl_save_exec_prefix"
9549 prefix="$acl_save_prefix"
9550
9551 if test "X$x" = "X-L$additional_libdir"; then
9552 haveit=yes
9553 break
9554 fi
9555 done
9556 if test -z "$haveit"; then
9557 if test -d "$additional_libdir"; then
9558 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9559 fi
9560 fi
9561 fi
9562 fi
9563 ;;
9564 -R*)
9565 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9566 if test "$enable_rpath" != no; then
9567 haveit=
9568 for x in $rpathdirs; do
9569 if test "X$x" = "X$dir"; then
9570 haveit=yes
9571 break
9572 fi
9573 done
9574 if test -z "$haveit"; then
9575 rpathdirs="$rpathdirs $dir"
9576 fi
9577 haveit=
9578 for x in $ltrpathdirs; do
9579 if test "X$x" = "X$dir"; then
9580 haveit=yes
9581 break
9582 fi
9583 done
9584 if test -z "$haveit"; then
9585 ltrpathdirs="$ltrpathdirs $dir"
9586 fi
9587 fi
9588 ;;
9589 -l*)
9590 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9591 ;;
9592 *.la)
9593 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9594 ;;
9595 *)
9596 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9597 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9598 ;;
81ecdfbb
RW
9599 esac
9600 done
9601 fi
9602 else
9603 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9604 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9605 fi
9606 fi
9607 fi
9608 done
9609 done
9610 if test "X$rpathdirs" != "X"; then
9611 if test -n "$hardcode_libdir_separator"; then
9612 alldirs=
9613 for found_dir in $rpathdirs; do
9614 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9615 done
9616 acl_save_libdir="$libdir"
9617 libdir="$alldirs"
9618 eval flag=\"$hardcode_libdir_flag_spec\"
9619 libdir="$acl_save_libdir"
9620 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9621 else
9622 for found_dir in $rpathdirs; do
9623 acl_save_libdir="$libdir"
9624 libdir="$found_dir"
9625 eval flag=\"$hardcode_libdir_flag_spec\"
9626 libdir="$acl_save_libdir"
9627 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9628 done
9629 fi
9630 fi
9631 if test "X$ltrpathdirs" != "X"; then
9632 for found_dir in $ltrpathdirs; do
9633 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9634 done
9635 fi
a9322a30
TT
9636
9637
81ecdfbb 9638 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9639
81ecdfbb
RW
9640 for element in $INCEXPAT; do
9641 haveit=
9642 for x in $CPPFLAGS; do
a9322a30 9643
81ecdfbb
RW
9644 acl_save_prefix="$prefix"
9645 prefix="$acl_final_prefix"
9646 acl_save_exec_prefix="$exec_prefix"
9647 exec_prefix="$acl_final_exec_prefix"
9648 eval x=\"$x\"
9649 exec_prefix="$acl_save_exec_prefix"
9650 prefix="$acl_save_prefix"
a8111142 9651
81ecdfbb
RW
9652 if test "X$x" = "X$element"; then
9653 haveit=yes
9654 break
9655 fi
9656 done
9657 if test -z "$haveit"; then
9658 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9659 fi
9660 done
a9322a30
TT
9661
9662
81ecdfbb
RW
9663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9664$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9665if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9666 $as_echo_n "(cached) " >&6
bec39cab 9667else
bec39cab 9668
81ecdfbb
RW
9669 ac_save_LIBS="$LIBS"
9670 LIBS="$LIBS $LIBEXPAT"
9671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9672/* end confdefs.h. */
81ecdfbb
RW
9673#include "expat.h"
9674int
9675main ()
9676{
9677XML_Parser p = XML_ParserCreate (0);
9678 ;
9679 return 0;
9680}
bec39cab 9681_ACEOF
81ecdfbb
RW
9682if ac_fn_c_try_link "$LINENO"; then :
9683 ac_cv_libexpat=yes
c906108c 9684else
81ecdfbb 9685 ac_cv_libexpat=no
bec39cab 9686fi
81ecdfbb
RW
9687rm -f core conftest.err conftest.$ac_objext \
9688 conftest$ac_exeext conftest.$ac_ext
9689 LIBS="$ac_save_LIBS"
c906108c 9690
95ca63c4 9691fi
81ecdfbb
RW
9692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9693$as_echo "$ac_cv_libexpat" >&6; }
9694 if test "$ac_cv_libexpat" = yes; then
9695 HAVE_LIBEXPAT=yes
bec39cab 9696
81ecdfbb 9697$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9698
81ecdfbb
RW
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9700$as_echo_n "checking how to link with libexpat... " >&6; }
9701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9702$as_echo "$LIBEXPAT" >&6; }
9703 else
9704 HAVE_LIBEXPAT=no
9705 CPPFLAGS="$ac_save_CPPFLAGS"
9706 LIBEXPAT=
9707 LTLIBEXPAT=
9708 fi
95ca63c4
CF
9709
9710
9711
7cb9022a
MK
9712
9713
bec39cab 9714
81ecdfbb
RW
9715 if test "$HAVE_LIBEXPAT" != yes; then
9716 if test "$with_expat" = yes; then
d0ac1c44 9717 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9718 else
9719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9720$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9721 fi
9722 else
9723 save_LIBS=$LIBS
9724 LIBS="$LIBS $LIBEXPAT"
9725 for ac_func in XML_StopParser
9726do :
9727 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9728if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9729 cat >>confdefs.h <<_ACEOF
81ecdfbb 9730#define HAVE_XML_STOPPARSER 1
bec39cab 9731_ACEOF
95ca63c4 9732
bec39cab 9733fi
bec39cab 9734done
95ca63c4 9735
81ecdfbb
RW
9736 LIBS=$save_LIBS
9737 fi
a9322a30
TT
9738fi
9739
2400729e
UW
9740
9741# Check whether --with-mpfr was given.
9742if test "${with_mpfr+set}" = set; then :
9743 withval=$with_mpfr;
9744else
9745 with_mpfr=auto
9746fi
9747
9748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9749$as_echo_n "checking whether to use MPFR... " >&6; }
9750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9751$as_echo "$with_mpfr" >&6; }
9752
9753if test "${with_mpfr}" = no; then
9754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9755$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9756 HAVE_LIBMPFR=no
9757else
9758
9759
9760
9761
9762
9763
9764
9765
9766 use_additional=yes
9767
9768 acl_save_prefix="$prefix"
9769 prefix="$acl_final_prefix"
9770 acl_save_exec_prefix="$exec_prefix"
9771 exec_prefix="$acl_final_exec_prefix"
9772
9773 eval additional_includedir=\"$includedir\"
9774 eval additional_libdir=\"$libdir\"
9775
9776 exec_prefix="$acl_save_exec_prefix"
9777 prefix="$acl_save_prefix"
9778
9779
9780# Check whether --with-libmpfr-prefix was given.
9781if test "${with_libmpfr_prefix+set}" = set; then :
9782 withval=$with_libmpfr_prefix;
9783 if test "X$withval" = "Xno"; then
9784 use_additional=no
9785 else
9786 if test "X$withval" = "X"; then
9787
9788 acl_save_prefix="$prefix"
9789 prefix="$acl_final_prefix"
9790 acl_save_exec_prefix="$exec_prefix"
9791 exec_prefix="$acl_final_exec_prefix"
9792
9793 eval additional_includedir=\"$includedir\"
9794 eval additional_libdir=\"$libdir\"
9795
9796 exec_prefix="$acl_save_exec_prefix"
9797 prefix="$acl_save_prefix"
9798
9799 else
9800 additional_includedir="$withval/include"
9801 additional_libdir="$withval/lib"
9802 fi
9803 fi
9804
9805fi
9806
9807 LIBMPFR=
9808 LTLIBMPFR=
9809 INCMPFR=
9810 rpathdirs=
9811 ltrpathdirs=
9812 names_already_handled=
da658607 9813 names_next_round='mpfr gmp'
2400729e
UW
9814 while test -n "$names_next_round"; do
9815 names_this_round="$names_next_round"
9816 names_next_round=
9817 for name in $names_this_round; do
9818 already_handled=
9819 for n in $names_already_handled; do
9820 if test "$n" = "$name"; then
9821 already_handled=yes
9822 break
9823 fi
9824 done
9825 if test -z "$already_handled"; then
9826 names_already_handled="$names_already_handled $name"
9827 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9828 eval value=\"\$HAVE_LIB$uppername\"
9829 if test -n "$value"; then
9830 if test "$value" = yes; then
9831 eval value=\"\$LIB$uppername\"
9832 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9833 eval value=\"\$LTLIB$uppername\"
9834 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9835 else
9836 :
9837 fi
9838 else
9839 found_dir=
9840 found_la=
9841 found_so=
9842 found_a=
9843 if test $use_additional = yes; then
9844 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9845 found_dir="$additional_libdir"
9846 found_so="$additional_libdir/lib$name.$shlibext"
9847 if test -f "$additional_libdir/lib$name.la"; then
9848 found_la="$additional_libdir/lib$name.la"
9849 fi
9850 else
9851 if test -f "$additional_libdir/lib$name.$libext"; then
9852 found_dir="$additional_libdir"
9853 found_a="$additional_libdir/lib$name.$libext"
9854 if test -f "$additional_libdir/lib$name.la"; then
9855 found_la="$additional_libdir/lib$name.la"
9856 fi
9857 fi
9858 fi
9859 fi
9860 if test "X$found_dir" = "X"; then
9861 for x in $LDFLAGS $LTLIBMPFR; do
9862
9863 acl_save_prefix="$prefix"
9864 prefix="$acl_final_prefix"
9865 acl_save_exec_prefix="$exec_prefix"
9866 exec_prefix="$acl_final_exec_prefix"
9867 eval x=\"$x\"
9868 exec_prefix="$acl_save_exec_prefix"
9869 prefix="$acl_save_prefix"
9870
9871 case "$x" in
9872 -L*)
9873 dir=`echo "X$x" | sed -e 's/^X-L//'`
9874 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9875 found_dir="$dir"
9876 found_so="$dir/lib$name.$shlibext"
9877 if test -f "$dir/lib$name.la"; then
9878 found_la="$dir/lib$name.la"
9879 fi
9880 else
9881 if test -f "$dir/lib$name.$libext"; then
9882 found_dir="$dir"
9883 found_a="$dir/lib$name.$libext"
9884 if test -f "$dir/lib$name.la"; then
9885 found_la="$dir/lib$name.la"
9886 fi
9887 fi
9888 fi
9889 ;;
9890 esac
9891 if test "X$found_dir" != "X"; then
9892 break
9893 fi
9894 done
9895 fi
9896 if test "X$found_dir" != "X"; then
9897 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9898 if test "X$found_so" != "X"; then
9899 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9900 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9901 else
9902 haveit=
9903 for x in $ltrpathdirs; do
9904 if test "X$x" = "X$found_dir"; then
9905 haveit=yes
9906 break
9907 fi
9908 done
9909 if test -z "$haveit"; then
9910 ltrpathdirs="$ltrpathdirs $found_dir"
9911 fi
9912 if test "$hardcode_direct" = yes; then
9913 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9914 else
9915 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9916 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9917 haveit=
9918 for x in $rpathdirs; do
9919 if test "X$x" = "X$found_dir"; then
9920 haveit=yes
9921 break
9922 fi
9923 done
9924 if test -z "$haveit"; then
9925 rpathdirs="$rpathdirs $found_dir"
9926 fi
9927 else
9928 haveit=
9929 for x in $LDFLAGS $LIBMPFR; do
9930
9931 acl_save_prefix="$prefix"
9932 prefix="$acl_final_prefix"
9933 acl_save_exec_prefix="$exec_prefix"
9934 exec_prefix="$acl_final_exec_prefix"
9935 eval x=\"$x\"
9936 exec_prefix="$acl_save_exec_prefix"
9937 prefix="$acl_save_prefix"
9938
9939 if test "X$x" = "X-L$found_dir"; then
9940 haveit=yes
9941 break
9942 fi
9943 done
9944 if test -z "$haveit"; then
9945 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9946 fi
9947 if test "$hardcode_minus_L" != no; then
9948 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9949 else
9950 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9951 fi
9952 fi
9953 fi
9954 fi
9955 else
9956 if test "X$found_a" != "X"; then
9957 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
9958 else
9959 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
9960 fi
9961 fi
9962 additional_includedir=
9963 case "$found_dir" in
9964 */lib | */lib/)
9965 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9966 additional_includedir="$basedir/include"
9967 ;;
9968 esac
9969 if test "X$additional_includedir" != "X"; then
9970 if test "X$additional_includedir" != "X/usr/include"; then
9971 haveit=
9972 if test "X$additional_includedir" = "X/usr/local/include"; then
9973 if test -n "$GCC"; then
9974 case $host_os in
9975 linux*) haveit=yes;;
9976 esac
9977 fi
9978 fi
9979 if test -z "$haveit"; then
9980 for x in $CPPFLAGS $INCMPFR; do
9981
9982 acl_save_prefix="$prefix"
9983 prefix="$acl_final_prefix"
9984 acl_save_exec_prefix="$exec_prefix"
9985 exec_prefix="$acl_final_exec_prefix"
9986 eval x=\"$x\"
9987 exec_prefix="$acl_save_exec_prefix"
9988 prefix="$acl_save_prefix"
9989
9990 if test "X$x" = "X-I$additional_includedir"; then
9991 haveit=yes
9992 break
9993 fi
9994 done
9995 if test -z "$haveit"; then
9996 if test -d "$additional_includedir"; then
9997 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
9998 fi
9999 fi
10000 fi
10001 fi
10002 fi
10003 if test -n "$found_la"; then
10004 save_libdir="$libdir"
10005 case "$found_la" in
10006 */* | *\\*) . "$found_la" ;;
10007 *) . "./$found_la" ;;
10008 esac
10009 libdir="$save_libdir"
10010 for dep in $dependency_libs; do
10011 case "$dep" in
10012 -L*)
10013 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10014 if test "X$additional_libdir" != "X/usr/lib"; then
10015 haveit=
10016 if test "X$additional_libdir" = "X/usr/local/lib"; then
10017 if test -n "$GCC"; then
10018 case $host_os in
10019 linux*) haveit=yes;;
10020 esac
10021 fi
10022 fi
10023 if test -z "$haveit"; then
10024 haveit=
10025 for x in $LDFLAGS $LIBMPFR; do
10026
10027 acl_save_prefix="$prefix"
10028 prefix="$acl_final_prefix"
10029 acl_save_exec_prefix="$exec_prefix"
10030 exec_prefix="$acl_final_exec_prefix"
10031 eval x=\"$x\"
10032 exec_prefix="$acl_save_exec_prefix"
10033 prefix="$acl_save_prefix"
10034
10035 if test "X$x" = "X-L$additional_libdir"; then
10036 haveit=yes
10037 break
10038 fi
10039 done
10040 if test -z "$haveit"; then
10041 if test -d "$additional_libdir"; then
10042 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10043 fi
10044 fi
10045 haveit=
10046 for x in $LDFLAGS $LTLIBMPFR; do
10047
10048 acl_save_prefix="$prefix"
10049 prefix="$acl_final_prefix"
10050 acl_save_exec_prefix="$exec_prefix"
10051 exec_prefix="$acl_final_exec_prefix"
10052 eval x=\"$x\"
10053 exec_prefix="$acl_save_exec_prefix"
10054 prefix="$acl_save_prefix"
10055
10056 if test "X$x" = "X-L$additional_libdir"; then
10057 haveit=yes
10058 break
10059 fi
10060 done
10061 if test -z "$haveit"; then
10062 if test -d "$additional_libdir"; then
10063 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10064 fi
10065 fi
10066 fi
10067 fi
10068 ;;
10069 -R*)
10070 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10071 if test "$enable_rpath" != no; then
10072 haveit=
10073 for x in $rpathdirs; do
10074 if test "X$x" = "X$dir"; then
10075 haveit=yes
10076 break
10077 fi
10078 done
10079 if test -z "$haveit"; then
10080 rpathdirs="$rpathdirs $dir"
10081 fi
10082 haveit=
10083 for x in $ltrpathdirs; do
10084 if test "X$x" = "X$dir"; then
10085 haveit=yes
10086 break
10087 fi
10088 done
10089 if test -z "$haveit"; then
10090 ltrpathdirs="$ltrpathdirs $dir"
10091 fi
10092 fi
10093 ;;
10094 -l*)
10095 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10096 ;;
10097 *.la)
10098 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10099 ;;
10100 *)
10101 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10102 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10103 ;;
10104 esac
10105 done
10106 fi
10107 else
10108 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10109 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10110 fi
10111 fi
10112 fi
10113 done
10114 done
10115 if test "X$rpathdirs" != "X"; then
10116 if test -n "$hardcode_libdir_separator"; then
10117 alldirs=
10118 for found_dir in $rpathdirs; do
10119 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10120 done
10121 acl_save_libdir="$libdir"
10122 libdir="$alldirs"
10123 eval flag=\"$hardcode_libdir_flag_spec\"
10124 libdir="$acl_save_libdir"
10125 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10126 else
10127 for found_dir in $rpathdirs; do
10128 acl_save_libdir="$libdir"
10129 libdir="$found_dir"
10130 eval flag=\"$hardcode_libdir_flag_spec\"
10131 libdir="$acl_save_libdir"
10132 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10133 done
10134 fi
10135 fi
10136 if test "X$ltrpathdirs" != "X"; then
10137 for found_dir in $ltrpathdirs; do
10138 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10139 done
10140 fi
10141
10142
10143 ac_save_CPPFLAGS="$CPPFLAGS"
10144
10145 for element in $INCMPFR; do
10146 haveit=
10147 for x in $CPPFLAGS; do
10148
10149 acl_save_prefix="$prefix"
10150 prefix="$acl_final_prefix"
10151 acl_save_exec_prefix="$exec_prefix"
10152 exec_prefix="$acl_final_exec_prefix"
10153 eval x=\"$x\"
10154 exec_prefix="$acl_save_exec_prefix"
10155 prefix="$acl_save_prefix"
10156
10157 if test "X$x" = "X$element"; then
10158 haveit=yes
10159 break
10160 fi
10161 done
10162 if test -z "$haveit"; then
10163 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10164 fi
10165 done
10166
10167
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10169$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10170if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10171 $as_echo_n "(cached) " >&6
10172else
10173
10174 ac_save_LIBS="$LIBS"
10175 LIBS="$LIBS $LIBMPFR"
10176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10177/* end confdefs.h. */
10178#include <mpfr.h>
10179int
10180main ()
10181{
10182mpfr_exp_t exp; mpfr_t x;
10183 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10184 ;
10185 return 0;
10186}
10187_ACEOF
10188if ac_fn_c_try_link "$LINENO"; then :
10189 ac_cv_libmpfr=yes
10190else
10191 ac_cv_libmpfr=no
10192fi
10193rm -f core conftest.err conftest.$ac_objext \
10194 conftest$ac_exeext conftest.$ac_ext
10195 LIBS="$ac_save_LIBS"
10196
10197fi
10198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10199$as_echo "$ac_cv_libmpfr" >&6; }
10200 if test "$ac_cv_libmpfr" = yes; then
10201 HAVE_LIBMPFR=yes
10202
10203$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10204
10205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10206$as_echo_n "checking how to link with libmpfr... " >&6; }
10207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10208$as_echo "$LIBMPFR" >&6; }
10209 else
10210 HAVE_LIBMPFR=no
10211 CPPFLAGS="$ac_save_CPPFLAGS"
10212 LIBMPFR=
10213 LTLIBMPFR=
10214 fi
10215
10216
10217
10218
10219
10220
10221 if test "$HAVE_LIBMPFR" != yes; then
10222 if test "$with_mpfr" = yes; then
d0ac1c44 10223 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10224 else
10225 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10226$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10227 fi
10228 fi
10229fi
10230
d344e670
DE
10231# --------------------- #
10232# Check for libpython. #
10233# --------------------- #
10234
a9322a30 10235
a9322a30
TT
10236
10237
ec685c5e 10238
0c4a4063 10239
81ecdfbb
RW
10240# Check whether --with-python was given.
10241if test "${with_python+set}" = set; then :
10242 withval=$with_python;
bec39cab 10243else
81ecdfbb 10244 with_python=auto
bec39cab 10245fi
bec39cab 10246
81ecdfbb
RW
10247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10248$as_echo_n "checking whether to use python... " >&6; }
10249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10250$as_echo "$with_python" >&6; }
9a156167 10251
81ecdfbb
RW
10252if test "${with_python}" = no; then
10253 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10254$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10255 have_libpython=no
bec39cab 10256else
81ecdfbb 10257 case "${with_python}" in
8c85a4e2 10258 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10259 if test -d ${with_python}; then
10260 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10261 python_prog="${with_python}/bin/python"
0c4a4063 10262 python_prefix=
9c4ea6c5
JB
10263 # If python does not exit ${with_python}/bin, then try in
10264 # ${with_python}. On Windows/MinGW, this is where the Python
10265 # executable is.
10266 if test ! -x "${python_prog}"; then
10267 python_prog="${with_python}/python"
10268 python_prefix=
10269 fi
e7a30f46 10270 if test ! -x "${python_prog}"; then
ec685c5e
DE
10271 # Fall back to gdb 7.0/7.1 behaviour.
10272 python_prog=missing
0c4a4063 10273 python_prefix=${with_python}
ec685c5e 10274 fi
e7a30f46 10275 elif test -x "${with_python}"; then
ec685c5e
DE
10276 # While we can't run python compiled for $host (unless host == build),
10277 # the user could write a script that provides the needed information,
10278 # so we support that.
ec685c5e 10279 python_prog=${with_python}
0c4a4063 10280 python_prefix=
ec685c5e 10281 else
d0ac1c44 10282 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10283 fi
81ecdfbb 10284 ;;
ec685c5e
DE
10285 */*)
10286 # Disallow --with-python=foo/bar.
d0ac1c44 10287 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10288 ;;
ec685c5e
DE
10289 *)
10290 # The user has either specified auto, yes, or the name of the python
10291 # program assumed to be in $PATH.
10292 python_prefix=
10293 case "${with_python}" in
10294 yes | auto)
10295 if test ${build} = ${host}; then
10296 # Extract the first word of "python", so it can be a program name with args.
10297set dummy python; ac_word=$2
10298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10299$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10300if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10301 $as_echo_n "(cached) " >&6
10302else
10303 case $python_prog_path in
10304 [\\/]* | ?:[\\/]*)
10305 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10306 ;;
10307 *)
10308 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10309for as_dir in $PATH
10310do
10311 IFS=$as_save_IFS
10312 test -z "$as_dir" && as_dir=.
10313 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10314 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10315 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10316 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10317 break 2
10318 fi
10319done
10320 done
10321IFS=$as_save_IFS
10322
10323 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10324 ;;
10325esac
10326fi
10327python_prog_path=$ac_cv_path_python_prog_path
10328if test -n "$python_prog_path"; then
10329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10330$as_echo "$python_prog_path" >&6; }
10331else
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10333$as_echo "no" >&6; }
10334fi
10335
10336
10337 if test "${python_prog_path}" = missing; then
10338 python_prog=missing
10339 else
10340 python_prog=${python_prog_path}
10341 fi
10342 else
10343 # Not much we can do except assume the cross-compiler will find the
10344 # right files.
10345 python_prog=missing
10346 fi
10347 ;;
10348 *)
10349 # While we can't run python compiled for $host (unless host == build),
10350 # the user could write a script that provides the needed information,
10351 # so we support that.
10352 python_prog="${with_python}"
10353 # Extract the first word of "${python_prog}", so it can be a program name with args.
10354set dummy ${python_prog}; ac_word=$2
10355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10356$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10357if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10358 $as_echo_n "(cached) " >&6
10359else
10360 case $python_prog_path in
10361 [\\/]* | ?:[\\/]*)
10362 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10363 ;;
10364 *)
10365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10366for as_dir in $PATH
10367do
10368 IFS=$as_save_IFS
10369 test -z "$as_dir" && as_dir=.
10370 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10371 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10372 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10373 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10374 break 2
10375 fi
10376done
10377 done
10378IFS=$as_save_IFS
10379
10380 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10381 ;;
10382esac
10383fi
10384python_prog_path=$ac_cv_path_python_prog_path
10385if test -n "$python_prog_path"; then
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10387$as_echo "$python_prog_path" >&6; }
10388else
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
10391fi
10392
10393
10394 if test "${python_prog_path}" = missing; then
d0ac1c44 10395 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10396 fi
10397 ;;
10398 esac
81ecdfbb
RW
10399 esac
10400
ec685c5e 10401 if test "${python_prog}" != missing; then
e7a30f46
DE
10402 # We have a python program to use, but it may be too old.
10403 # Don't flag an error for --with-python=auto (the default).
10404 have_python_config=yes
ec685c5e
DE
10405 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10406 if test $? != 0; then
e7a30f46
DE
10407 have_python_config=failed
10408 if test "${with_python}" != auto; then
d0ac1c44 10409 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10410 fi
ec685c5e
DE
10411 fi
10412 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10413 if test $? != 0; then
e7a30f46
DE
10414 have_python_config=failed
10415 if test "${with_python}" != auto; then
d0ac1c44 10416 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10417 fi
ec685c5e 10418 fi
0c4a4063
DE
10419 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10420 if test $? != 0; then
e7a30f46
DE
10421 have_python_config=failed
10422 if test "${with_python}" != auto; then
d0ac1c44 10423 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10424 fi
0c4a4063 10425 fi
ec685c5e 10426 else
ac534cba
JB
10427 # We do not have a python executable we can use to determine where
10428 # to find the Python headers and libs. We cannot guess the include
10429 # path from the python_prefix either, because that include path
10430 # depends on the Python version. So, there is nothing much we can
10431 # do except assume that the compiler will be able to find those files.
10432 python_includes=
10433 python_libs=
0c4a4063 10434 have_python_config=no
ec685c5e 10435 fi
bec39cab 10436
ec685c5e
DE
10437 # If we have python-config, only try the configuration it provides.
10438 # Otherwise fallback on the old way of trying different versions of
10439 # python in turn.
81ecdfbb 10440
ec685c5e
DE
10441 have_libpython=no
10442 if test "${have_python_config}" = yes; then
71737c43 10443
ec685c5e
DE
10444
10445 new_CPPFLAGS=${python_includes}
10446 new_LIBS=${python_libs}
71737c43
CB
10447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10448$as_echo_n "checking for python... " >&6; }
ec685c5e 10449 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10450 save_LIBS=$LIBS
ec685c5e 10451 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10452 LIBS="$new_LIBS $LIBS"
ec685c5e 10453 found_usable_python=no
81ecdfbb 10454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10455/* end confdefs.h. */
ac534cba 10456#include "Python.h"
81ecdfbb
RW
10457int
10458main ()
10459{
10460Py_Initialize ();
10461 ;
10462 return 0;
10463}
bec39cab 10464_ACEOF
81ecdfbb 10465if ac_fn_c_try_link "$LINENO"; then :
71737c43 10466 have_libpython=yes
ec685c5e 10467 found_usable_python=yes
ac534cba
JB
10468 PYTHON_CPPFLAGS=$new_CPPFLAGS
10469 PYTHON_LIBS=$new_LIBS
9a156167 10470fi
81ecdfbb
RW
10471rm -f core conftest.err conftest.$ac_objext \
10472 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10473 CPPFLAGS=$save_CPPFLAGS
10474 LIBS=$save_LIBS
ec685c5e
DE
10475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10476$as_echo "${found_usable_python}" >&6; }
9a156167 10477
e7a30f46 10478 elif test "${have_python_config}" != failed; then
ec685c5e 10479 if test "${have_libpython}" = no; then
9a156167 10480
420697bb
TT
10481
10482 new_CPPFLAGS=${python_includes}
bf27f0e2 10483 new_LIBS="-lpython2.7 ${python_libs}"
71737c43
CB
10484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10485$as_echo_n "checking for python... " >&6; }
420697bb
TT
10486 save_CPPFLAGS=$CPPFLAGS
10487 save_LIBS=$LIBS
10488 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10489 LIBS="$new_LIBS $LIBS"
420697bb
TT
10490 found_usable_python=no
10491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10492/* end confdefs.h. */
ac534cba 10493#include "Python.h"
420697bb
TT
10494int
10495main ()
10496{
10497Py_Initialize ();
10498 ;
10499 return 0;
10500}
10501_ACEOF
10502if ac_fn_c_try_link "$LINENO"; then :
71737c43 10503 have_libpython=yes
420697bb 10504 found_usable_python=yes
ac534cba
JB
10505 PYTHON_CPPFLAGS=$new_CPPFLAGS
10506 PYTHON_LIBS=$new_LIBS
420697bb
TT
10507fi
10508rm -f core conftest.err conftest.$ac_objext \
10509 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10510 CPPFLAGS=$save_CPPFLAGS
10511 LIBS=$save_LIBS
420697bb
TT
10512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10513$as_echo "${found_usable_python}" >&6; }
10514
10515 fi
10516 if test "${have_libpython}" = no; then
10517
ec685c5e
DE
10518
10519 new_CPPFLAGS=${python_includes}
bf27f0e2 10520 new_LIBS="-lpython2.6 ${python_libs}"
71737c43
CB
10521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10522$as_echo_n "checking for python... " >&6; }
ec685c5e
DE
10523 save_CPPFLAGS=$CPPFLAGS
10524 save_LIBS=$LIBS
10525 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10526 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10527 found_usable_python=no
10528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10529/* end confdefs.h. */
ac534cba 10530#include "Python.h"
ec685c5e
DE
10531int
10532main ()
10533{
10534Py_Initialize ();
10535 ;
10536 return 0;
10537}
10538_ACEOF
10539if ac_fn_c_try_link "$LINENO"; then :
71737c43 10540 have_libpython=yes
ec685c5e 10541 found_usable_python=yes
ac534cba
JB
10542 PYTHON_CPPFLAGS=$new_CPPFLAGS
10543 PYTHON_LIBS=$new_LIBS
ec685c5e 10544fi
81ecdfbb
RW
10545rm -f core conftest.err conftest.$ac_objext \
10546 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10547 CPPFLAGS=$save_CPPFLAGS
10548 LIBS=$save_LIBS
ec685c5e
DE
10549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10550$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10551
ec685c5e
DE
10552 fi
10553 fi
ec685c5e
DE
10554
10555 if test "${have_libpython}" = no; then
81ecdfbb
RW
10556 case "${with_python}" in
10557 yes)
d0ac1c44 10558 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10559 ;;
10560 auto)
10561 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10562$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10563 ;;
10564 *)
d0ac1c44 10565 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10566 ;;
10567 esac
0c4a4063
DE
10568 else
10569 if test -n "${python_prefix}"; then
10570
10571cat >>confdefs.h <<_ACEOF
10572#define WITH_PYTHON_PATH "${python_prefix}"
10573_ACEOF
10574
10575
10576 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10577 if test "x$prefix" = xNONE; then
10578 test_prefix=/usr/local
10579 else
10580 test_prefix=$prefix
10581 fi
10582 else
10583 test_prefix=$exec_prefix
10584 fi
10585 value=0
10586 case ${python_prefix} in
10587 "${test_prefix}"|"${test_prefix}/"*|\
10588 '${exec_prefix}'|'${exec_prefix}/'*)
10589 value=1
10590 ;;
10591 esac
10592
10593cat >>confdefs.h <<_ACEOF
10594#define PYTHON_PATH_RELOCATABLE $value
10595_ACEOF
10596
10597
10598 fi
81ecdfbb 10599 fi
436868fb 10600fi
436868fb 10601
ec685c5e 10602if test "${have_libpython}" != no; then
436868fb 10603
81ecdfbb 10604$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10605
81ecdfbb
RW
10606 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10607 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10608 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10609 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10610 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10611
81ecdfbb
RW
10612 # Flags needed to compile Python code (taken from python-config --cflags).
10613 # We cannot call python-config directly because it will output whatever was
10614 # used when compiling the Python interpreter itself, including flags which
10615 # would make the python-related objects be compiled differently from the
10616 # rest of GDB (e.g., -O2 and -fPIC).
10617 if test "${GCC}" = yes; then
ae292b3a
TT
10618 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10619 # Python headers recommend -DNDEBUG, but it's unclear if that just
10620 # refers to building Python itself. In release mode, though, it
10621 # doesn't hurt for the Python code in gdb to follow.
10622 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10623 fi
436868fb 10624
81ecdfbb
RW
10625 if test "x${tentative_python_cflags}" != x; then
10626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10627$as_echo_n "checking compiler flags for python code... " >&6; }
10628 for flag in ${tentative_python_cflags}; do
10629 # Check that the compiler accepts it
10630 saved_CFLAGS="$CFLAGS"
10631 CFLAGS="$CFLAGS $flag"
10632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10633/* end confdefs.h. */
81ecdfbb 10634
a9322a30
TT
10635int
10636main ()
10637{
a9322a30
TT
10638
10639 ;
10640 return 0;
10641}
bec39cab 10642_ACEOF
81ecdfbb
RW
10643if ac_fn_c_try_compile "$LINENO"; then :
10644 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10645fi
81ecdfbb
RW
10646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10647 CFLAGS="$saved_CFLAGS"
10648 done
10649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10650$as_echo "${PYTHON_CFLAGS}" >&6; }
10651 fi
043b6510 10652
c83393b9
JB
10653 # On x64 Windows, Python's include headers, and pyconfig.h in
10654 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10655 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10656 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10657 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10658 # The issue was reported to the Python community, but still isn't
10659 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10660
043b6510 10661 case "$gdb_host" in
c83393b9
JB
10662 mingw64)
10663 if test "${GCC}" = yes; then
10664 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10665 fi
10666 ;;
043b6510 10667 esac
81ecdfbb 10668else
6dddc817
DE
10669 # Even if Python support is not compiled in, we need to have this file
10670 # included so that the "python" command, et.al., still exists.
8fd8d003 10671 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10672 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10673fi
9a156167 10674
a4a1c157
PA
10675# Work around Python http://bugs.python.org/issue10112. See also
10676# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10677# no effect. Note that the only test after this that uses Python is
10678# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10679# run without -export-dynamic too.
10680PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10681
10682
ed3ef339
DE
10683
10684
4df42755
DE
10685 if test "${have_libpython}" != no; then
10686 HAVE_PYTHON_TRUE=
10687 HAVE_PYTHON_FALSE='#'
10688else
10689 HAVE_PYTHON_TRUE='#'
10690 HAVE_PYTHON_FALSE=
10691fi
10692
ed3ef339
DE
10693
10694# -------------------- #
10695# Check for libguile. #
10696# -------------------- #
10697
10698
e1402065
DE
10699
10700
10701
10702
10703# Check whether --with-guile was given.
10704if test "${with_guile+set}" = set; then :
10705 withval=$with_guile;
10706else
10707 with_guile=auto
10708fi
10709
10710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10711$as_echo_n "checking whether to use guile... " >&6; }
10712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10713$as_echo "$with_guile" >&6; }
10714
ed3ef339
DE
10715# Extract the first word of "pkg-config", so it can be a program name with args.
10716set dummy pkg-config; ac_word=$2
10717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10718$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10719if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10720 $as_echo_n "(cached) " >&6
10721else
10722 case $pkg_config_prog_path in
10723 [\\/]* | ?:[\\/]*)
10724 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10725 ;;
10726 *)
10727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10728for as_dir in $PATH
10729do
10730 IFS=$as_save_IFS
10731 test -z "$as_dir" && as_dir=.
10732 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10734 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10736 break 2
10737 fi
10738done
10739 done
10740IFS=$as_save_IFS
10741
10742 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10743 ;;
10744esac
10745fi
10746pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10747if test -n "$pkg_config_prog_path"; then
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10749$as_echo "$pkg_config_prog_path" >&6; }
10750else
10751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10752$as_echo "no" >&6; }
10753fi
10754
10755
10756
6e66f753 10757try_guile_versions="guile-2.0"
ed3ef339
DE
10758have_libguile=no
10759case "${with_guile}" in
10760no)
10761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10762$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10763 ;;
10764auto)
e1402065
DE
10765 if test "${pkg_config_prog_path}" = "missing"; then
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10767$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10768 else
ed3ef339
DE
10769
10770 pkg_config=${pkg_config_prog_path}
10771 guile_version_list=${try_guile_versions}
10772 flag_errors=no
10773
ed3ef339
DE
10774 found_usable_guile=checking
10775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10776$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10777 for guile_version in ${guile_version_list}; do
10778 ${pkg_config} --exists ${guile_version} 2>/dev/null
10779 if test $? != 0; then
10780 continue
10781 fi
10782 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10783 if test $? != 0; then
d0ac1c44 10784 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10785 fi
10786 new_LIBS=`${pkg_config} --libs ${guile_version}`
10787 if test $? != 0; then
d0ac1c44 10788 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10789 fi
10790 found_usable_guile=${guile_version}
10791 break
10792 done
10793 if test "${found_usable_guile}" = "checking"; then
10794 if test "${flag_errors}" = "yes"; then
d0ac1c44 10795 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10796 else
10797 found_usable_guile=no
10798 fi
10799 fi
10800 if test "${found_usable_guile}" != no; then
10801 save_CPPFLAGS=$CPPFLAGS
10802 save_LIBS=$LIBS
10803 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10804 LIBS="$LIBS $new_LIBS"
10805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10806/* end confdefs.h. */
10807#include "libguile.h"
10808int
10809main ()
10810{
10811scm_init_guile ();
10812 ;
10813 return 0;
10814}
10815_ACEOF
10816if ac_fn_c_try_link "$LINENO"; then :
10817 have_libguile=yes
10818 GUILE_CPPFLAGS=$new_CPPFLAGS
10819 GUILE_LIBS=$new_LIBS
10820else
10821 found_usable_guile=no
10822fi
10823rm -f core conftest.err conftest.$ac_objext \
10824 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10825 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10826if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10827
10828$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10829
10830
10831fi
10832
ed3ef339
DE
10833 CPPFLAGS=$save_CPPFLAGS
10834 LIBS=$save_LIBS
10835 if test "${found_usable_guile}" = no; then
10836 if test "${flag_errors}" = yes; then
10837 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10839as_fn_error $? "linking guile version ${guile_version} test program failed
10840See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10841 fi
10842 fi
10843 fi
10844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10845$as_echo "${found_usable_guile}" >&6; }
10846
e1402065 10847 fi
ed3ef339
DE
10848 ;;
10849yes)
e1402065 10850 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 10851 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 10852 fi
ed3ef339
DE
10853
10854 pkg_config=${pkg_config_prog_path}
10855 guile_version_list=${try_guile_versions}
10856 flag_errors=yes
10857
ed3ef339
DE
10858 found_usable_guile=checking
10859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10860$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10861 for guile_version in ${guile_version_list}; do
10862 ${pkg_config} --exists ${guile_version} 2>/dev/null
10863 if test $? != 0; then
10864 continue
10865 fi
10866 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10867 if test $? != 0; then
d0ac1c44 10868 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10869 fi
10870 new_LIBS=`${pkg_config} --libs ${guile_version}`
10871 if test $? != 0; then
d0ac1c44 10872 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10873 fi
10874 found_usable_guile=${guile_version}
10875 break
10876 done
10877 if test "${found_usable_guile}" = "checking"; then
10878 if test "${flag_errors}" = "yes"; then
d0ac1c44 10879 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10880 else
10881 found_usable_guile=no
10882 fi
10883 fi
10884 if test "${found_usable_guile}" != no; then
10885 save_CPPFLAGS=$CPPFLAGS
10886 save_LIBS=$LIBS
10887 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10888 LIBS="$LIBS $new_LIBS"
10889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10890/* end confdefs.h. */
10891#include "libguile.h"
10892int
10893main ()
10894{
10895scm_init_guile ();
10896 ;
10897 return 0;
10898}
10899_ACEOF
10900if ac_fn_c_try_link "$LINENO"; then :
10901 have_libguile=yes
10902 GUILE_CPPFLAGS=$new_CPPFLAGS
10903 GUILE_LIBS=$new_LIBS
10904else
10905 found_usable_guile=no
10906fi
10907rm -f core conftest.err conftest.$ac_objext \
10908 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10909 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10910if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10911
10912$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10913
10914
10915fi
10916
ed3ef339
DE
10917 CPPFLAGS=$save_CPPFLAGS
10918 LIBS=$save_LIBS
10919 if test "${found_usable_guile}" = no; then
10920 if test "${flag_errors}" = yes; then
10921 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10923as_fn_error $? "linking guile version ${guile_version} test program failed
10924See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10925 fi
10926 fi
10927 fi
10928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10929$as_echo "${found_usable_guile}" >&6; }
10930
10931 ;;
10932[\\/]* | ?:[\\/]*)
e1402065 10933 if test -x "${with_guile}"; then
ed3ef339
DE
10934
10935 pkg_config=${with_guile}
10936 guile_version_list=${try_guile_versions}
10937 flag_errors=yes
10938
ed3ef339
DE
10939 found_usable_guile=checking
10940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10941$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10942 for guile_version in ${guile_version_list}; do
10943 ${pkg_config} --exists ${guile_version} 2>/dev/null
10944 if test $? != 0; then
10945 continue
10946 fi
10947 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10948 if test $? != 0; then
d0ac1c44 10949 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10950 fi
10951 new_LIBS=`${pkg_config} --libs ${guile_version}`
10952 if test $? != 0; then
d0ac1c44 10953 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10954 fi
10955 found_usable_guile=${guile_version}
10956 break
10957 done
10958 if test "${found_usable_guile}" = "checking"; then
10959 if test "${flag_errors}" = "yes"; then
d0ac1c44 10960 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10961 else
10962 found_usable_guile=no
10963 fi
10964 fi
10965 if test "${found_usable_guile}" != no; then
10966 save_CPPFLAGS=$CPPFLAGS
10967 save_LIBS=$LIBS
10968 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10969 LIBS="$LIBS $new_LIBS"
10970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10971/* end confdefs.h. */
10972#include "libguile.h"
10973int
10974main ()
10975{
10976scm_init_guile ();
10977 ;
10978 return 0;
10979}
10980_ACEOF
10981if ac_fn_c_try_link "$LINENO"; then :
10982 have_libguile=yes
10983 GUILE_CPPFLAGS=$new_CPPFLAGS
10984 GUILE_LIBS=$new_LIBS
10985else
10986 found_usable_guile=no
10987fi
10988rm -f core conftest.err conftest.$ac_objext \
10989 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10990 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10991if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10992
10993$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10994
10995
10996fi
10997
ed3ef339
DE
10998 CPPFLAGS=$save_CPPFLAGS
10999 LIBS=$save_LIBS
11000 if test "${found_usable_guile}" = no; then
11001 if test "${flag_errors}" = yes; then
11002 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11004as_fn_error $? "linking guile version ${guile_version} test program failed
11005See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11006 fi
11007 fi
11008 fi
11009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11010$as_echo "${found_usable_guile}" >&6; }
11011
e1402065 11012 else
d0ac1c44 11013 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11014 fi
ed3ef339
DE
11015 ;;
11016"" | */*)
11017 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11018 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11019 ;;
11020*)
11021 # A space separate list of guile versions to try, in order.
e1402065 11022 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11023 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11024 fi
ed3ef339
DE
11025
11026 pkg_config=${pkg_config_prog_path}
11027 guile_version_list=${with_guile}
11028 flag_errors=yes
11029
ed3ef339
DE
11030 found_usable_guile=checking
11031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11032$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11033 for guile_version in ${guile_version_list}; do
11034 ${pkg_config} --exists ${guile_version} 2>/dev/null
11035 if test $? != 0; then
11036 continue
11037 fi
11038 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11039 if test $? != 0; then
d0ac1c44 11040 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11041 fi
11042 new_LIBS=`${pkg_config} --libs ${guile_version}`
11043 if test $? != 0; then
d0ac1c44 11044 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11045 fi
11046 found_usable_guile=${guile_version}
11047 break
11048 done
11049 if test "${found_usable_guile}" = "checking"; then
11050 if test "${flag_errors}" = "yes"; then
d0ac1c44 11051 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11052 else
11053 found_usable_guile=no
11054 fi
11055 fi
11056 if test "${found_usable_guile}" != no; then
11057 save_CPPFLAGS=$CPPFLAGS
11058 save_LIBS=$LIBS
11059 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11060 LIBS="$LIBS $new_LIBS"
11061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11062/* end confdefs.h. */
11063#include "libguile.h"
11064int
11065main ()
11066{
11067scm_init_guile ();
11068 ;
11069 return 0;
11070}
11071_ACEOF
11072if ac_fn_c_try_link "$LINENO"; then :
11073 have_libguile=yes
11074 GUILE_CPPFLAGS=$new_CPPFLAGS
11075 GUILE_LIBS=$new_LIBS
11076else
11077 found_usable_guile=no
11078fi
11079rm -f core conftest.err conftest.$ac_objext \
11080 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11081 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11082if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11083
11084$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11085
11086
11087fi
11088
ed3ef339
DE
11089 CPPFLAGS=$save_CPPFLAGS
11090 LIBS=$save_LIBS
11091 if test "${found_usable_guile}" = no; then
11092 if test "${flag_errors}" = yes; then
11093 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11094$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11095as_fn_error $? "linking guile version ${guile_version} test program failed
11096See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11097 fi
11098 fi
11099 fi
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11101$as_echo "${found_usable_guile}" >&6; }
11102
11103 ;;
11104esac
11105
e76c5d17 11106if test "${have_libguile}" != no; then
d342a0da
DE
11107 case "${with_guile}" in
11108 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11109
11110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11111$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11112if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11113 $as_echo_n "(cached) " >&6
11114else
d342a0da 11115 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11116
11117 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11118 # the 'guild' and 'bindir' variables. In that case, try to guess
11119 # what the program name is, at the risk of getting it wrong if
11120 # Guile was configured with '--program-suffix' or similar.
11121 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11122 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11123 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11124 fi
11125
11126fi
11127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11128$as_echo "$ac_cv_guild_program_name" >&6; }
11129
11130 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11131 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11132 fi
11133
11134 GUILD="$ac_cv_guild_program_name"
11135
11136
d342a0da
DE
11137 ;;
11138 *)
11139
11140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11141$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11142if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11143 $as_echo_n "(cached) " >&6
11144else
11145 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11146
11147 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11148 # the 'guild' and 'bindir' variables. In that case, try to guess
11149 # what the program name is, at the risk of getting it wrong if
11150 # Guile was configured with '--program-suffix' or similar.
11151 if test "x$ac_cv_guild_program_name" = "x"; then
11152 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11153 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11154 fi
11155
11156fi
11157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11158$as_echo "$ac_cv_guild_program_name" >&6; }
11159
11160 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11161 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11162 fi
11163
11164 GUILD="$ac_cv_guild_program_name"
11165
11166
11167 ;;
11168 esac
e76c5d17
DE
11169
11170
11171 if test "$cross_compiling" = no; then
11172 GUILD_TARGET_FLAG=
11173 else
11174 GUILD_TARGET_FLAG="--target=$host"
11175 fi
11176
11177
11178
11179
11180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11181$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11182if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11183 $as_echo_n "(cached) " >&6
11184else
11185 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11186 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11187 ac_cv_guild_ok=yes
11188 else
11189 ac_cv_guild_ok=no
11190 fi
11191fi
11192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11193$as_echo "$ac_cv_guild_ok" >&6; }
11194
11195 if test "$ac_cv_guild_ok" = no; then
11196 have_libguile=no
11197 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11198$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11199 fi
11200fi
11201
ed3ef339
DE
11202if test "${have_libguile}" != no; then
11203
11204$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11205
11206 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11207 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11208 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11209 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11210 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11211
11212 save_LIBS="$LIBS"
11213 save_CPPFLAGS="$CPPFLAGS"
11214 LIBS="$GUILE_LIBS"
11215 CPPFLAGS="$GUILE_CPPFLAGS"
11216 for ac_func in scm_new_smob
11217do :
11218 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11219if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11220 cat >>confdefs.h <<_ACEOF
11221#define HAVE_SCM_NEW_SMOB 1
11222_ACEOF
11223
11224fi
11225done
11226
11227 LIBS="$save_LIBS"
11228 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11229else
11230 # Even if Guile support is not compiled in, we need to have these files
11231 # included.
bd810fff 11232 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11233 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11234fi
9a156167 11235
ac534cba 11236
4df42755
DE
11237 if test "${have_libguile}" != no; then
11238 HAVE_GUILE_TRUE=
11239 HAVE_GUILE_FALSE='#'
11240else
11241 HAVE_GUILE_TRUE='#'
11242 HAVE_GUILE_FALSE=
11243fi
11244
ac534cba 11245
62f29fda
TT
11246# ---------------------------- #
11247# Check for source highlight. #
11248# ---------------------------- #
11249
11250SRCHIGH_LIBS=
11251SRCHIGH_CFLAGS=
189b8c2e
ST
11252
11253# Check whether --enable-source-highlight was given.
11254if test "${enable_source_highlight+set}" = set; then :
11255 enableval=$enable_source_highlight; case "${enableval}" in
11256 yes) enable_source_highlight=yes ;;
11257 no) enable_source_highlight=no ;;
11258 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11259esac
11260else
11261 enable_source_highlight=auto
11262fi
11263
11264
11265if test "${enable_source_highlight}" != "no"; then
11266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11267$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11268 if test "${pkg_config_prog_path}" = "missing"; then
11269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11270$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11271 if test "${enable_source_highlight}" = "yes"; then
11272 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11273 fi
11274 else
d806ea2d
TT
11275 case "$LDFLAGS" in
11276 *static-libstdc*)
11277 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11278 ;;
11279 esac
11280
189b8c2e 11281 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11282 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11283 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11284
11285$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11286
11287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11288$as_echo "yes" >&6; }
189b8c2e 11289 else
62f29fda
TT
11290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11291$as_echo "no" >&6; }
189b8c2e
ST
11292 if test "${enable_source_highlight}" = "yes"; then
11293 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11294 fi
11295 fi
11296 fi
62f29fda
TT
11297fi
11298
11299
11300
58bfce93
MM
11301
11302# Check whether --with-intel_pt was given.
11303if test "${with_intel_pt+set}" = set; then :
11304 withval=$with_intel_pt;
11305else
11306 with_intel_pt=auto
11307fi
11308
11309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11310$as_echo_n "checking whether to use intel pt... " >&6; }
11311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11312$as_echo "$with_intel_pt" >&6; }
11313
11314if test "${with_intel_pt}" = no; then
bc504a31
PA
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11316$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11317 HAVE_LIBIPT=no
11318else
5599c404
MM
11319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11320/* end confdefs.h. */
11321
11322#include <linux/perf_event.h>
11323#ifndef PERF_ATTR_SIZE_VER5
11324# error
11325#endif
11326
11327_ACEOF
11328if ac_fn_c_try_cpp "$LINENO"; then :
11329 perf_event=yes
11330else
11331 perf_event=no
11332fi
d0ac1c44 11333rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11334 if test "$perf_event" != yes; then
11335 if test "$with_intel_pt" = yes; then
d0ac1c44 11336 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11337 else
11338 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11339$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11340 fi
11341 fi
11342
58bfce93
MM
11343
11344
11345
11346
11347
11348
11349
11350
11351 use_additional=yes
11352
11353 acl_save_prefix="$prefix"
11354 prefix="$acl_final_prefix"
11355 acl_save_exec_prefix="$exec_prefix"
11356 exec_prefix="$acl_final_exec_prefix"
11357
11358 eval additional_includedir=\"$includedir\"
11359 eval additional_libdir=\"$libdir\"
11360
11361 exec_prefix="$acl_save_exec_prefix"
11362 prefix="$acl_save_prefix"
11363
11364
11365# Check whether --with-libipt-prefix was given.
11366if test "${with_libipt_prefix+set}" = set; then :
11367 withval=$with_libipt_prefix;
11368 if test "X$withval" = "Xno"; then
11369 use_additional=no
11370 else
11371 if test "X$withval" = "X"; then
11372
11373 acl_save_prefix="$prefix"
11374 prefix="$acl_final_prefix"
11375 acl_save_exec_prefix="$exec_prefix"
11376 exec_prefix="$acl_final_exec_prefix"
11377
11378 eval additional_includedir=\"$includedir\"
11379 eval additional_libdir=\"$libdir\"
11380
11381 exec_prefix="$acl_save_exec_prefix"
11382 prefix="$acl_save_prefix"
11383
11384 else
11385 additional_includedir="$withval/include"
11386 additional_libdir="$withval/lib"
11387 fi
11388 fi
11389
11390fi
11391
11392 LIBIPT=
11393 LTLIBIPT=
11394 INCIPT=
11395 rpathdirs=
11396 ltrpathdirs=
11397 names_already_handled=
11398 names_next_round='ipt '
11399 while test -n "$names_next_round"; do
11400 names_this_round="$names_next_round"
11401 names_next_round=
11402 for name in $names_this_round; do
11403 already_handled=
11404 for n in $names_already_handled; do
11405 if test "$n" = "$name"; then
11406 already_handled=yes
11407 break
11408 fi
11409 done
11410 if test -z "$already_handled"; then
11411 names_already_handled="$names_already_handled $name"
11412 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11413 eval value=\"\$HAVE_LIB$uppername\"
11414 if test -n "$value"; then
11415 if test "$value" = yes; then
11416 eval value=\"\$LIB$uppername\"
11417 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11418 eval value=\"\$LTLIB$uppername\"
11419 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11420 else
11421 :
11422 fi
11423 else
11424 found_dir=
11425 found_la=
11426 found_so=
11427 found_a=
11428 if test $use_additional = yes; then
11429 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11430 found_dir="$additional_libdir"
11431 found_so="$additional_libdir/lib$name.$shlibext"
11432 if test -f "$additional_libdir/lib$name.la"; then
11433 found_la="$additional_libdir/lib$name.la"
11434 fi
11435 else
11436 if test -f "$additional_libdir/lib$name.$libext"; then
11437 found_dir="$additional_libdir"
11438 found_a="$additional_libdir/lib$name.$libext"
11439 if test -f "$additional_libdir/lib$name.la"; then
11440 found_la="$additional_libdir/lib$name.la"
11441 fi
11442 fi
11443 fi
11444 fi
11445 if test "X$found_dir" = "X"; then
11446 for x in $LDFLAGS $LTLIBIPT; do
11447
11448 acl_save_prefix="$prefix"
11449 prefix="$acl_final_prefix"
11450 acl_save_exec_prefix="$exec_prefix"
11451 exec_prefix="$acl_final_exec_prefix"
11452 eval x=\"$x\"
11453 exec_prefix="$acl_save_exec_prefix"
11454 prefix="$acl_save_prefix"
11455
11456 case "$x" in
11457 -L*)
11458 dir=`echo "X$x" | sed -e 's/^X-L//'`
11459 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11460 found_dir="$dir"
11461 found_so="$dir/lib$name.$shlibext"
11462 if test -f "$dir/lib$name.la"; then
11463 found_la="$dir/lib$name.la"
11464 fi
11465 else
11466 if test -f "$dir/lib$name.$libext"; then
11467 found_dir="$dir"
11468 found_a="$dir/lib$name.$libext"
11469 if test -f "$dir/lib$name.la"; then
11470 found_la="$dir/lib$name.la"
11471 fi
11472 fi
11473 fi
11474 ;;
11475 esac
11476 if test "X$found_dir" != "X"; then
11477 break
11478 fi
11479 done
11480 fi
11481 if test "X$found_dir" != "X"; then
11482 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11483 if test "X$found_so" != "X"; then
11484 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11485 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11486 else
11487 haveit=
11488 for x in $ltrpathdirs; do
11489 if test "X$x" = "X$found_dir"; then
11490 haveit=yes
11491 break
11492 fi
11493 done
11494 if test -z "$haveit"; then
11495 ltrpathdirs="$ltrpathdirs $found_dir"
11496 fi
11497 if test "$hardcode_direct" = yes; then
11498 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11499 else
11500 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11501 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11502 haveit=
11503 for x in $rpathdirs; do
11504 if test "X$x" = "X$found_dir"; then
11505 haveit=yes
11506 break
11507 fi
11508 done
11509 if test -z "$haveit"; then
11510 rpathdirs="$rpathdirs $found_dir"
11511 fi
11512 else
11513 haveit=
11514 for x in $LDFLAGS $LIBIPT; do
11515
11516 acl_save_prefix="$prefix"
11517 prefix="$acl_final_prefix"
11518 acl_save_exec_prefix="$exec_prefix"
11519 exec_prefix="$acl_final_exec_prefix"
11520 eval x=\"$x\"
11521 exec_prefix="$acl_save_exec_prefix"
11522 prefix="$acl_save_prefix"
11523
11524 if test "X$x" = "X-L$found_dir"; then
11525 haveit=yes
11526 break
11527 fi
11528 done
11529 if test -z "$haveit"; then
11530 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11531 fi
11532 if test "$hardcode_minus_L" != no; then
11533 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11534 else
11535 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11536 fi
11537 fi
11538 fi
11539 fi
11540 else
11541 if test "X$found_a" != "X"; then
11542 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11543 else
11544 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11545 fi
11546 fi
11547 additional_includedir=
11548 case "$found_dir" in
11549 */lib | */lib/)
11550 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11551 additional_includedir="$basedir/include"
11552 ;;
11553 esac
11554 if test "X$additional_includedir" != "X"; then
11555 if test "X$additional_includedir" != "X/usr/include"; then
11556 haveit=
11557 if test "X$additional_includedir" = "X/usr/local/include"; then
11558 if test -n "$GCC"; then
11559 case $host_os in
11560 linux*) haveit=yes;;
11561 esac
11562 fi
11563 fi
11564 if test -z "$haveit"; then
11565 for x in $CPPFLAGS $INCIPT; do
11566
11567 acl_save_prefix="$prefix"
11568 prefix="$acl_final_prefix"
11569 acl_save_exec_prefix="$exec_prefix"
11570 exec_prefix="$acl_final_exec_prefix"
11571 eval x=\"$x\"
11572 exec_prefix="$acl_save_exec_prefix"
11573 prefix="$acl_save_prefix"
11574
11575 if test "X$x" = "X-I$additional_includedir"; then
11576 haveit=yes
11577 break
11578 fi
11579 done
11580 if test -z "$haveit"; then
11581 if test -d "$additional_includedir"; then
11582 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11583 fi
11584 fi
11585 fi
11586 fi
11587 fi
11588 if test -n "$found_la"; then
11589 save_libdir="$libdir"
11590 case "$found_la" in
11591 */* | *\\*) . "$found_la" ;;
11592 *) . "./$found_la" ;;
11593 esac
11594 libdir="$save_libdir"
11595 for dep in $dependency_libs; do
11596 case "$dep" in
11597 -L*)
11598 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11599 if test "X$additional_libdir" != "X/usr/lib"; then
11600 haveit=
11601 if test "X$additional_libdir" = "X/usr/local/lib"; then
11602 if test -n "$GCC"; then
11603 case $host_os in
11604 linux*) haveit=yes;;
11605 esac
11606 fi
11607 fi
11608 if test -z "$haveit"; then
11609 haveit=
11610 for x in $LDFLAGS $LIBIPT; do
11611
11612 acl_save_prefix="$prefix"
11613 prefix="$acl_final_prefix"
11614 acl_save_exec_prefix="$exec_prefix"
11615 exec_prefix="$acl_final_exec_prefix"
11616 eval x=\"$x\"
11617 exec_prefix="$acl_save_exec_prefix"
11618 prefix="$acl_save_prefix"
11619
11620 if test "X$x" = "X-L$additional_libdir"; then
11621 haveit=yes
11622 break
11623 fi
11624 done
11625 if test -z "$haveit"; then
11626 if test -d "$additional_libdir"; then
11627 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11628 fi
11629 fi
11630 haveit=
11631 for x in $LDFLAGS $LTLIBIPT; do
11632
11633 acl_save_prefix="$prefix"
11634 prefix="$acl_final_prefix"
11635 acl_save_exec_prefix="$exec_prefix"
11636 exec_prefix="$acl_final_exec_prefix"
11637 eval x=\"$x\"
11638 exec_prefix="$acl_save_exec_prefix"
11639 prefix="$acl_save_prefix"
11640
11641 if test "X$x" = "X-L$additional_libdir"; then
11642 haveit=yes
11643 break
11644 fi
11645 done
11646 if test -z "$haveit"; then
11647 if test -d "$additional_libdir"; then
11648 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11649 fi
11650 fi
11651 fi
11652 fi
11653 ;;
11654 -R*)
11655 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11656 if test "$enable_rpath" != no; then
11657 haveit=
11658 for x in $rpathdirs; do
11659 if test "X$x" = "X$dir"; then
11660 haveit=yes
11661 break
11662 fi
11663 done
11664 if test -z "$haveit"; then
11665 rpathdirs="$rpathdirs $dir"
11666 fi
11667 haveit=
11668 for x in $ltrpathdirs; do
11669 if test "X$x" = "X$dir"; then
11670 haveit=yes
11671 break
11672 fi
11673 done
11674 if test -z "$haveit"; then
11675 ltrpathdirs="$ltrpathdirs $dir"
11676 fi
11677 fi
11678 ;;
11679 -l*)
11680 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11681 ;;
11682 *.la)
11683 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11684 ;;
11685 *)
11686 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11687 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11688 ;;
11689 esac
11690 done
11691 fi
11692 else
11693 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11694 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11695 fi
11696 fi
11697 fi
11698 done
11699 done
11700 if test "X$rpathdirs" != "X"; then
11701 if test -n "$hardcode_libdir_separator"; then
11702 alldirs=
11703 for found_dir in $rpathdirs; do
11704 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11705 done
11706 acl_save_libdir="$libdir"
11707 libdir="$alldirs"
11708 eval flag=\"$hardcode_libdir_flag_spec\"
11709 libdir="$acl_save_libdir"
11710 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11711 else
11712 for found_dir in $rpathdirs; do
11713 acl_save_libdir="$libdir"
11714 libdir="$found_dir"
11715 eval flag=\"$hardcode_libdir_flag_spec\"
11716 libdir="$acl_save_libdir"
11717 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11718 done
11719 fi
11720 fi
11721 if test "X$ltrpathdirs" != "X"; then
11722 for found_dir in $ltrpathdirs; do
11723 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11724 done
11725 fi
11726
11727
11728 ac_save_CPPFLAGS="$CPPFLAGS"
11729
11730 for element in $INCIPT; do
11731 haveit=
11732 for x in $CPPFLAGS; do
11733
11734 acl_save_prefix="$prefix"
11735 prefix="$acl_final_prefix"
11736 acl_save_exec_prefix="$exec_prefix"
11737 exec_prefix="$acl_final_exec_prefix"
11738 eval x=\"$x\"
11739 exec_prefix="$acl_save_exec_prefix"
11740 prefix="$acl_save_prefix"
11741
11742 if test "X$x" = "X$element"; then
11743 haveit=yes
11744 break
11745 fi
11746 done
11747 if test -z "$haveit"; then
11748 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11749 fi
11750 done
11751
11752
11753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11754$as_echo_n "checking for libipt... " >&6; }
d0ac1c44 11755if ${ac_cv_libipt+:} false; then :
58bfce93
MM
11756 $as_echo_n "(cached) " >&6
11757else
11758
11759 ac_save_LIBS="$LIBS"
11760 LIBS="$LIBS $LIBIPT"
11761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11762/* end confdefs.h. */
11763#include "intel-pt.h"
11764int
11765main ()
11766{
11767pt_insn_alloc_decoder (0);
11768 ;
11769 return 0;
11770}
11771_ACEOF
11772if ac_fn_c_try_link "$LINENO"; then :
11773 ac_cv_libipt=yes
11774else
11775 ac_cv_libipt=no
11776fi
11777rm -f core conftest.err conftest.$ac_objext \
11778 conftest$ac_exeext conftest.$ac_ext
11779 LIBS="$ac_save_LIBS"
11780
11781fi
11782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11783$as_echo "$ac_cv_libipt" >&6; }
11784 if test "$ac_cv_libipt" = yes; then
11785 HAVE_LIBIPT=yes
11786
11787$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11788
11789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11790$as_echo_n "checking how to link with libipt... " >&6; }
11791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11792$as_echo "$LIBIPT" >&6; }
11793 else
11794 HAVE_LIBIPT=no
11795 CPPFLAGS="$ac_save_CPPFLAGS"
11796 LIBIPT=
11797 LTLIBIPT=
11798 fi
11799
11800
11801
11802
11803
11804
11805 if test "$HAVE_LIBIPT" != yes; then
11806 if test "$with_intel_pt" = yes; then
d0ac1c44 11807 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
11808 else
11809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11810$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11811 fi
c56ccc05
MM
11812 else
11813 save_LIBS=$LIBS
11814 LIBS="$LIBS $LIBIPT"
11815 for ac_func in pt_insn_event
11816do :
11817 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
d0ac1c44 11818if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
11819 cat >>confdefs.h <<_ACEOF
11820#define HAVE_PT_INSN_EVENT 1
11821_ACEOF
11822
11823fi
11824done
11825
11826 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
11827"
d0ac1c44 11828if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
11829
11830cat >>confdefs.h <<_ACEOF
11831#define HAVE_STRUCT_PT_INSN_ENABLED 1
11832_ACEOF
11833
11834
11835fi
11836ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
11837"
d0ac1c44 11838if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
11839
11840cat >>confdefs.h <<_ACEOF
11841#define HAVE_STRUCT_PT_INSN_RESYNCED 1
11842_ACEOF
11843
11844
11845fi
11846
11847 LIBS=$save_LIBS
58bfce93
MM
11848 fi
11849fi
11850
81ecdfbb
RW
11851# ------------------------- #
11852# Checks for header files. #
11853# ------------------------- #
c890192f 11854
81ecdfbb
RW
11855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11856$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 11857if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 11858 $as_echo_n "(cached) " >&6
bec39cab 11859else
81ecdfbb 11860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11861/* end confdefs.h. */
81ecdfbb
RW
11862#include <stdlib.h>
11863#include <stdarg.h>
11864#include <string.h>
11865#include <float.h>
11866
a9322a30
TT
11867int
11868main ()
11869{
a9322a30
TT
11870
11871 ;
11872 return 0;
11873}
bec39cab 11874_ACEOF
81ecdfbb
RW
11875if ac_fn_c_try_compile "$LINENO"; then :
11876 ac_cv_header_stdc=yes
bec39cab 11877else
81ecdfbb 11878 ac_cv_header_stdc=no
a9322a30 11879fi
81ecdfbb 11880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11881
81ecdfbb
RW
11882if test $ac_cv_header_stdc = yes; then
11883 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11885/* end confdefs.h. */
11886#include <string.h>
bec39cab 11887
81ecdfbb
RW
11888_ACEOF
11889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11890 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11891
bec39cab 11892else
81ecdfbb
RW
11893 ac_cv_header_stdc=no
11894fi
11895rm -f conftest*
11896
11897fi
11898
11899if test $ac_cv_header_stdc = yes; then
11900 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11902/* end confdefs.h. */
11903#include <stdlib.h>
11904
bec39cab 11905_ACEOF
81ecdfbb
RW
11906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11907 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11908
81ecdfbb
RW
11909else
11910 ac_cv_header_stdc=no
11911fi
11912rm -f conftest*
bec39cab 11913
bec39cab 11914fi
81ecdfbb
RW
11915
11916if test $ac_cv_header_stdc = yes; then
11917 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11918 if test "$cross_compiling" = yes; then :
11919 :
bec39cab 11920else
81ecdfbb 11921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11922/* end confdefs.h. */
81ecdfbb
RW
11923#include <ctype.h>
11924#include <stdlib.h>
11925#if ((' ' & 0x0FF) == 0x020)
11926# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11927# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11928#else
11929# define ISLOWER(c) \
11930 (('a' <= (c) && (c) <= 'i') \
11931 || ('j' <= (c) && (c) <= 'r') \
11932 || ('s' <= (c) && (c) <= 'z'))
11933# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11934#endif
11935
11936#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11937int
11938main ()
11939{
81ecdfbb
RW
11940 int i;
11941 for (i = 0; i < 256; i++)
11942 if (XOR (islower (i), ISLOWER (i))
11943 || toupper (i) != TOUPPER (i))
11944 return 2;
a9322a30
TT
11945 return 0;
11946}
bec39cab 11947_ACEOF
81ecdfbb
RW
11948if ac_fn_c_try_run "$LINENO"; then :
11949
bec39cab 11950else
81ecdfbb
RW
11951 ac_cv_header_stdc=no
11952fi
11953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11954 conftest.$ac_objext conftest.beam conftest.$ac_ext
11955fi
bec39cab 11956
bec39cab 11957fi
a9322a30 11958fi
81ecdfbb
RW
11959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11960$as_echo "$ac_cv_header_stdc" >&6; }
11961if test $ac_cv_header_stdc = yes; then
bec39cab 11962
81ecdfbb 11963$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11964
81ecdfbb 11965fi
bec39cab 11966
81ecdfbb 11967# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 11968for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
43b7e92b 11969 thread_db.h linux/elf.h \
81ecdfbb
RW
11970 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11971 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 11972 sys/reg.h sys/debugreg.h sys/select.h \
2d41fa11 11973 termios.h elf_hp.h
81ecdfbb
RW
11974do :
11975 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11976ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 11977if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 11978 cat >>confdefs.h <<_ACEOF
81ecdfbb 11979#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11980_ACEOF
c906108c 11981
bec39cab 11982fi
81ecdfbb
RW
11983
11984done
11985
81ecdfbb
RW
11986for ac_header in sys/user.h
11987do :
11988 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11989# include <sys/param.h>
a9322a30
TT
11990#endif
11991
81ecdfbb 11992"
d0ac1c44 11993if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
11994 cat >>confdefs.h <<_ACEOF
11995#define HAVE_SYS_USER_H 1
bec39cab 11996_ACEOF
bec39cab 11997
a9322a30 11998fi
bec39cab 11999
81ecdfbb 12000done
5ee754fc 12001
5ee754fc 12002
5007d765 12003for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12004do :
12005 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12006ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12007if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12008 cat >>confdefs.h <<_ACEOF
81ecdfbb 12009#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12010_ACEOF
5ee754fc
MK
12011
12012fi
12013
81ecdfbb 12014done
bec39cab 12015
81ecdfbb
RW
12016for ac_header in term.h
12017do :
12018 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12019# include <curses.h>
12020#endif
bec39cab 12021
81ecdfbb 12022"
d0ac1c44 12023if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12024 cat >>confdefs.h <<_ACEOF
12025#define HAVE_TERM_H 1
a8111142 12026_ACEOF
a8111142 12027
a8111142 12028fi
a8111142 12029
81ecdfbb 12030done
a8111142
TT
12031
12032
81ecdfbb
RW
12033# ------------------------- #
12034# Checks for declarations. #
12035# ------------------------- #
a9322a30 12036
07697489
PA
12037
12038 # Check for presence and size of long long.
12039 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 12040if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12041
12042cat >>confdefs.h <<_ACEOF
12043#define HAVE_LONG_LONG 1
12044_ACEOF
12045
12046# The cast to long int works around a bug in the HP C Compiler
12047# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12048# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12049# This bug is HP SR number 8606223364.
12050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12051$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 12052if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12053 $as_echo_n "(cached) " >&6
12054else
12055 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12056
12057else
12058 if test "$ac_cv_type_long_long" = yes; then
12059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
12061as_fn_error 77 "cannot compute sizeof (long long)
12062See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12063 else
12064 ac_cv_sizeof_long_long=0
12065 fi
12066fi
12067
12068fi
12069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12070$as_echo "$ac_cv_sizeof_long_long" >&6; }
12071
12072
12073
12074cat >>confdefs.h <<_ACEOF
12075#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12076_ACEOF
12077
12078
12079fi
12080
12081
d0ac1c44
SM
12082 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12083ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12084if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12085 ac_have_decl=1
12086else
12087 ac_have_decl=0
12088fi
12089
12090cat >>confdefs.h <<_ACEOF
12091#define HAVE_DECL_BASENAME $ac_have_decl
12092_ACEOF
12093ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 12094if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12095 ac_have_decl=1
12096else
12097 ac_have_decl=0
12098fi
12099
12100cat >>confdefs.h <<_ACEOF
12101#define HAVE_DECL_FFS $ac_have_decl
12102_ACEOF
12103ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 12104if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12105 ac_have_decl=1
12106else
12107 ac_have_decl=0
12108fi
12109
12110cat >>confdefs.h <<_ACEOF
12111#define HAVE_DECL_ASPRINTF $ac_have_decl
12112_ACEOF
12113ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 12114if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12115 ac_have_decl=1
12116else
12117 ac_have_decl=0
12118fi
12119
12120cat >>confdefs.h <<_ACEOF
12121#define HAVE_DECL_VASPRINTF $ac_have_decl
12122_ACEOF
12123ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12124if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12125 ac_have_decl=1
12126else
12127 ac_have_decl=0
12128fi
12129
12130cat >>confdefs.h <<_ACEOF
12131#define HAVE_DECL_SNPRINTF $ac_have_decl
12132_ACEOF
12133ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 12134if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12135 ac_have_decl=1
12136else
12137 ac_have_decl=0
12138fi
12139
12140cat >>confdefs.h <<_ACEOF
12141#define HAVE_DECL_VSNPRINTF $ac_have_decl
12142_ACEOF
12143
12144 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 12145if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
12146 ac_have_decl=1
12147else
12148 ac_have_decl=0
12149fi
12150
12151cat >>confdefs.h <<_ACEOF
12152#define HAVE_DECL_STRTOL $ac_have_decl
12153_ACEOF
12154ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 12155if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
12156 ac_have_decl=1
12157else
12158 ac_have_decl=0
12159fi
12160
12161cat >>confdefs.h <<_ACEOF
12162#define HAVE_DECL_STRTOUL $ac_have_decl
12163_ACEOF
12164ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 12165if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
12166 ac_have_decl=1
12167else
12168 ac_have_decl=0
12169fi
12170
12171cat >>confdefs.h <<_ACEOF
12172#define HAVE_DECL_STRTOLL $ac_have_decl
12173_ACEOF
12174ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 12175if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12176 ac_have_decl=1
12177else
12178 ac_have_decl=0
12179fi
12180
12181cat >>confdefs.h <<_ACEOF
12182#define HAVE_DECL_STRTOULL $ac_have_decl
12183_ACEOF
12184
12185 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 12186if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
12187 ac_have_decl=1
12188else
12189 ac_have_decl=0
12190fi
12191
12192cat >>confdefs.h <<_ACEOF
12193#define HAVE_DECL_STRVERSCMP $ac_have_decl
12194_ACEOF
12195
12196
12197
81ecdfbb 12198ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12199if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12200 ac_have_decl=1
12201else
12202 ac_have_decl=0
5ee754fc 12203fi
81ecdfbb
RW
12204
12205cat >>confdefs.h <<_ACEOF
12206#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12207_ACEOF
5ee754fc 12208
5ee754fc 12209
81ecdfbb
RW
12210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12211$as_echo_n "checking for LC_MESSAGES... " >&6; }
d0ac1c44 12212if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12213 $as_echo_n "(cached) " >&6
bec39cab 12214else
81ecdfbb 12215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12216/* end confdefs.h. */
81ecdfbb 12217#include <locale.h>
a9322a30
TT
12218int
12219main ()
12220{
81ecdfbb 12221return LC_MESSAGES
a9322a30
TT
12222 ;
12223 return 0;
12224}
bec39cab 12225_ACEOF
81ecdfbb
RW
12226if ac_fn_c_try_link "$LINENO"; then :
12227 am_cv_val_LC_MESSAGES=yes
bec39cab 12228else
81ecdfbb
RW
12229 am_cv_val_LC_MESSAGES=no
12230fi
12231rm -f core conftest.err conftest.$ac_objext \
12232 conftest$ac_exeext conftest.$ac_ext
12233fi
12234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12235$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12236 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12237
81ecdfbb
RW
12238$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12239
12240 fi
12241
12242
12243# ----------------------- #
12244# Checks for structures. #
12245# ----------------------- #
12246
12247ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 12248if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12249
12250cat >>confdefs.h <<_ACEOF
12251#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12252_ACEOF
7eb368b3 12253
81ecdfbb 12254
7eb368b3 12255fi
81ecdfbb 12256ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 12257if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12258
a9322a30
TT
12259cat >>confdefs.h <<_ACEOF
12260#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12261_ACEOF
12262
a9322a30 12263
7eb368b3
NR
12264fi
12265
7eb368b3 12266
a9322a30
TT
12267# ------------------ #
12268# Checks for types. #
12269# ------------------ #
7eb368b3 12270
81ecdfbb 12271ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12272#include <sys/socket.h>
12273
81ecdfbb 12274"
d0ac1c44 12275if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12276
a9322a30
TT
12277cat >>confdefs.h <<_ACEOF
12278#define HAVE_SOCKLEN_T 1
12279_ACEOF
12280
12281
12282fi
12283
12284
12285# ------------------------------------- #
12286# Checks for compiler characteristics. #
12287# ------------------------------------- #
12288
81ecdfbb
RW
12289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12290$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
d0ac1c44 12291if ${ac_cv_c_const+:} false; then :
81ecdfbb 12292 $as_echo_n "(cached) " >&6
a9322a30 12293else
81ecdfbb 12294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12295/* end confdefs.h. */
a9322a30
TT
12296
12297int
12298main ()
12299{
d0ac1c44 12300
a9322a30 12301#ifndef __cplusplus
d0ac1c44 12302 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12303 typedef int charset[2];
d0ac1c44 12304 const charset cs = { 0, 0 };
a9322a30 12305 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12306 char const *const *pcpcc;
12307 char **ppc;
a9322a30
TT
12308 /* NEC SVR4.0.2 mips cc rejects this. */
12309 struct point {int x, y;};
12310 static struct point const zero = {0,0};
12311 /* AIX XL C 1.02.0.0 rejects this.
12312 It does not let you subtract one const X* pointer from another in
12313 an arm of an if-expression whose if-part is not a constant
12314 expression */
12315 const char *g = "string";
81ecdfbb 12316 pcpcc = &g + (g ? g-g : 0);
a9322a30 12317 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12318 ++pcpcc;
12319 ppc = (char**) pcpcc;
12320 pcpcc = (char const *const *) ppc;
d0ac1c44
SM
12321 { /* SCO 3.2v4 cc rejects this sort of thing. */
12322 char tx;
12323 char *t = &tx;
a9322a30
TT
12324 char const *s = 0 ? (char *) 0 : (char const *) 0;
12325
12326 *t++ = 0;
81ecdfbb 12327 if (s) return 0;
a9322a30
TT
12328 }
12329 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12330 int x[] = {25, 17};
12331 const int *foo = &x[0];
12332 ++foo;
12333 }
12334 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12335 typedef const int *iptr;
12336 iptr p = 0;
12337 ++p;
12338 }
d0ac1c44 12339 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12340 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
d0ac1c44
SM
12341 struct s { int j; const int *ap[3]; } bx;
12342 struct s *b = &bx; b->j = 5;
a9322a30
TT
12343 }
12344 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12345 const int foo = 10;
81ecdfbb 12346 if (!foo) return 0;
a9322a30 12347 }
81ecdfbb 12348 return !cs[0] && !zero.x;
a9322a30
TT
12349#endif
12350
12351 ;
12352 return 0;
12353}
bec39cab 12354_ACEOF
81ecdfbb 12355if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12356 ac_cv_c_const=yes
5ee754fc 12357else
81ecdfbb 12358 ac_cv_c_const=no
5ee754fc 12359fi
81ecdfbb 12360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12361fi
81ecdfbb
RW
12362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12363$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12364if test $ac_cv_c_const = no; then
bec39cab 12365
81ecdfbb 12366$as_echo "#define const /**/" >>confdefs.h
bec39cab 12367
5ee754fc 12368fi
bec39cab 12369
81ecdfbb
RW
12370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12371$as_echo_n "checking for inline... " >&6; }
d0ac1c44 12372if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12373 $as_echo_n "(cached) " >&6
bec39cab 12374else
a9322a30
TT
12375 ac_cv_c_inline=no
12376for ac_kw in inline __inline__ __inline; do
81ecdfbb 12377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12378/* end confdefs.h. */
a9322a30
TT
12379#ifndef __cplusplus
12380typedef int foo_t;
12381static $ac_kw foo_t static_foo () {return 0; }
12382$ac_kw foo_t foo () {return 0; }
12383#endif
12384
bec39cab 12385_ACEOF
81ecdfbb
RW
12386if ac_fn_c_try_compile "$LINENO"; then :
12387 ac_cv_c_inline=$ac_kw
bec39cab 12388fi
81ecdfbb
RW
12389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12390 test "$ac_cv_c_inline" != no && break
a9322a30 12391done
bec39cab 12392
5ee754fc 12393fi
81ecdfbb
RW
12394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12395$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12396
a9322a30
TT
12397case $ac_cv_c_inline in
12398 inline | yes) ;;
12399 *)
12400 case $ac_cv_c_inline in
12401 no) ac_val=;;
12402 *) ac_val=$ac_cv_c_inline;;
12403 esac
12404 cat >>confdefs.h <<_ACEOF
12405#ifndef __cplusplus
12406#define inline $ac_val
12407#endif
12408_ACEOF
bec39cab
AC
12409 ;;
12410esac
bec39cab 12411
81ecdfbb
RW
12412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12413$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12414if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12415 $as_echo_n "(cached) " >&6
bec39cab 12416else
81ecdfbb
RW
12417 ac_cv_c_bigendian=unknown
12418 # See if we're dealing with a universal compiler.
12419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12420/* end confdefs.h. */
12421#ifndef __APPLE_CC__
12422 not a universal capable compiler
12423 #endif
12424 typedef int dummy;
12425
12426_ACEOF
12427if ac_fn_c_try_compile "$LINENO"; then :
12428
12429 # Check for potential -arch flags. It is not universal unless
12430 # there are at least two -arch flags with different values.
12431 ac_arch=
12432 ac_prev=
12433 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12434 if test -n "$ac_prev"; then
12435 case $ac_word in
12436 i?86 | x86_64 | ppc | ppc64)
12437 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12438 ac_arch=$ac_word
12439 else
12440 ac_cv_c_bigendian=universal
12441 break
12442 fi
12443 ;;
12444 esac
12445 ac_prev=
12446 elif test "x$ac_word" = "x-arch"; then
12447 ac_prev=arch
12448 fi
12449 done
12450fi
12451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12452 if test $ac_cv_c_bigendian = unknown; then
12453 # See if sys/param.h defines the BYTE_ORDER macro.
12454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12455/* end confdefs.h. */
a9322a30 12456#include <sys/types.h>
81ecdfbb 12457 #include <sys/param.h>
a9322a30
TT
12458
12459int
12460main ()
12461{
81ecdfbb
RW
12462#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12463 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12464 && LITTLE_ENDIAN)
12465 bogus endian macros
12466 #endif
a9322a30
TT
12467
12468 ;
12469 return 0;
12470}
bec39cab 12471_ACEOF
81ecdfbb 12472if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12473 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12475/* end confdefs.h. */
a9322a30 12476#include <sys/types.h>
81ecdfbb 12477 #include <sys/param.h>
a9322a30
TT
12478
12479int
12480main ()
12481{
12482#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12483 not big endian
12484 #endif
a9322a30
TT
12485
12486 ;
12487 return 0;
12488}
bec39cab 12489_ACEOF
81ecdfbb 12490if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12491 ac_cv_c_bigendian=yes
5ee754fc 12492else
81ecdfbb 12493 ac_cv_c_bigendian=no
5ee754fc 12494fi
81ecdfbb
RW
12495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12496fi
12497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12498 fi
12499 if test $ac_cv_c_bigendian = unknown; then
12500 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12502/* end confdefs.h. */
12503#include <limits.h>
bec39cab 12504
81ecdfbb
RW
12505int
12506main ()
12507{
12508#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12509 bogus endian macros
12510 #endif
12511
12512 ;
12513 return 0;
12514}
7eb368b3 12515_ACEOF
81ecdfbb
RW
12516if ac_fn_c_try_compile "$LINENO"; then :
12517 # It does; now see whether it defined to _BIG_ENDIAN or not.
12518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12519/* end confdefs.h. */
81ecdfbb
RW
12520#include <limits.h>
12521
7eb368b3
NR
12522int
12523main ()
12524{
81ecdfbb
RW
12525#ifndef _BIG_ENDIAN
12526 not big endian
12527 #endif
12528
7eb368b3
NR
12529 ;
12530 return 0;
12531}
12532_ACEOF
81ecdfbb 12533if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12534 ac_cv_c_bigendian=yes
81ecdfbb
RW
12535else
12536 ac_cv_c_bigendian=no
a9322a30 12537fi
81ecdfbb 12538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12539fi
81ecdfbb
RW
12540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12541 fi
12542 if test $ac_cv_c_bigendian = unknown; then
12543 # Compile a test program.
12544 if test "$cross_compiling" = yes; then :
12545 # Try to guess by grepping values from an object file.
12546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12547/* end confdefs.h. */
12548short int ascii_mm[] =
12549 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12550 short int ascii_ii[] =
12551 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12552 int use_ascii (int i) {
12553 return ascii_mm[i] + ascii_ii[i];
12554 }
12555 short int ebcdic_ii[] =
12556 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12557 short int ebcdic_mm[] =
12558 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12559 int use_ebcdic (int i) {
12560 return ebcdic_mm[i] + ebcdic_ii[i];
12561 }
12562 extern int foo;
7eb368b3 12563
81ecdfbb
RW
12564int
12565main ()
12566{
12567return use_ascii (foo) == use_ebcdic (foo);
12568 ;
12569 return 0;
12570}
12571_ACEOF
12572if ac_fn_c_try_compile "$LINENO"; then :
12573 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12574 ac_cv_c_bigendian=yes
12575 fi
12576 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12577 if test "$ac_cv_c_bigendian" = unknown; then
12578 ac_cv_c_bigendian=no
12579 else
12580 # finding both strings is unlikely to happen, but who knows?
12581 ac_cv_c_bigendian=unknown
12582 fi
12583 fi
7eb368b3 12584fi
81ecdfbb 12585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12586else
81ecdfbb 12587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12588/* end confdefs.h. */
81ecdfbb 12589$ac_includes_default
d3ea6809
MM
12590int
12591main ()
12592{
81ecdfbb
RW
12593
12594 /* Are we little or big endian? From Harbison&Steele. */
12595 union
12596 {
12597 long int l;
12598 char c[sizeof (long int)];
12599 } u;
12600 u.l = 1;
12601 return u.c[sizeof (long int) - 1] == 1;
12602
12603 ;
12604 return 0;
d3ea6809
MM
12605}
12606_ACEOF
81ecdfbb 12607if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12608 ac_cv_c_bigendian=no
d3ea6809 12609else
81ecdfbb 12610 ac_cv_c_bigendian=yes
d3ea6809 12611fi
81ecdfbb
RW
12612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12613 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12614fi
a9322a30 12615
81ecdfbb
RW
12616 fi
12617fi
12618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12619$as_echo "$ac_cv_c_bigendian" >&6; }
12620 case $ac_cv_c_bigendian in #(
12621 yes)
12622 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12623;; #(
12624 no)
12625 ;; #(
12626 universal)
12627
12628$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12629
12630 ;; #(
12631 *)
d0ac1c44 12632 as_fn_error $? "unknown endianness
81ecdfbb
RW
12633 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12634 esac
d3ea6809
MM
12635
12636
a9322a30
TT
12637# ------------------------------ #
12638# Checks for library functions. #
12639# ------------------------------ #
d3ea6809 12640
d0ac1c44
SM
12641
12642
12643
12644 for ac_header in $ac_header_list
81ecdfbb
RW
12645do :
12646 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
d0ac1c44
SM
12647ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12648"
12649if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12650 cat >>confdefs.h <<_ACEOF
81ecdfbb 12651#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12652_ACEOF
b757528f 12653
b757528f 12654fi
bec39cab 12655
a9322a30 12656done
a3828db0 12657
d0ac1c44
SM
12658
12659
12660
12661
12662
12663
12664
a9322a30 12665for ac_func in getpagesize
81ecdfbb
RW
12666do :
12667 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12668if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12669 cat >>confdefs.h <<_ACEOF
81ecdfbb 12670#define HAVE_GETPAGESIZE 1
bec39cab 12671_ACEOF
bcb3dc3d 12672
bcb3dc3d
MK
12673fi
12674done
12675
81ecdfbb
RW
12676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12677$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12678if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12679 $as_echo_n "(cached) " >&6
a9322a30 12680else
81ecdfbb 12681 if test "$cross_compiling" = yes; then :
a9322a30 12682 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12683else
81ecdfbb 12684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12685/* end confdefs.h. */
a9322a30
TT
12686$ac_includes_default
12687/* malloc might have been renamed as rpl_malloc. */
12688#undef malloc
bec39cab 12689
a9322a30
TT
12690/* Thanks to Mike Haertel and Jim Avera for this test.
12691 Here is a matrix of mmap possibilities:
12692 mmap private not fixed
12693 mmap private fixed at somewhere currently unmapped
12694 mmap private fixed at somewhere already mapped
12695 mmap shared not fixed
12696 mmap shared fixed at somewhere currently unmapped
12697 mmap shared fixed at somewhere already mapped
12698 For private mappings, we should verify that changes cannot be read()
12699 back from the file, nor mmap's back from the file at a different
12700 address. (There have been systems where private was not correctly
12701 implemented like the infamous i386 svr4.0, and systems where the
12702 VM page cache was not coherent with the file system buffer cache
12703 like early versions of FreeBSD and possibly contemporary NetBSD.)
12704 For shared mappings, we should conversely verify that changes get
12705 propagated back to all the places they're supposed to be.
bec39cab 12706
a9322a30
TT
12707 Grep wants private fixed already mapped.
12708 The main things grep needs to know about mmap are:
12709 * does it exist and is it safe to write into the mmap'd area
12710 * how to use it (BSD variants) */
8b9cf735 12711
a9322a30
TT
12712#include <fcntl.h>
12713#include <sys/mman.h>
8b9cf735 12714
81ecdfbb 12715#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12716char *malloc ();
a3828db0
MK
12717#endif
12718
a9322a30 12719/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12720#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12721# ifdef _SC_PAGESIZE
12722# define getpagesize() sysconf(_SC_PAGESIZE)
12723# else /* no _SC_PAGESIZE */
81ecdfbb 12724# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12725# include <sys/param.h>
12726# ifdef EXEC_PAGESIZE
12727# define getpagesize() EXEC_PAGESIZE
12728# else /* no EXEC_PAGESIZE */
12729# ifdef NBPG
12730# define getpagesize() NBPG * CLSIZE
12731# ifndef CLSIZE
12732# define CLSIZE 1
12733# endif /* no CLSIZE */
12734# else /* no NBPG */
12735# ifdef NBPC
12736# define getpagesize() NBPC
12737# else /* no NBPC */
12738# ifdef PAGESIZE
12739# define getpagesize() PAGESIZE
12740# endif /* PAGESIZE */
12741# endif /* no NBPC */
12742# endif /* no NBPG */
12743# endif /* no EXEC_PAGESIZE */
12744# else /* no HAVE_SYS_PARAM_H */
12745# define getpagesize() 8192 /* punt totally */
12746# endif /* no HAVE_SYS_PARAM_H */
12747# endif /* no _SC_PAGESIZE */
12748
12749#endif /* no HAVE_GETPAGESIZE */
12750
bec39cab
AC
12751int
12752main ()
12753{
a9322a30 12754 char *data, *data2, *data3;
d0ac1c44 12755 const char *cdata2;
a9322a30 12756 int i, pagesize;
d0ac1c44 12757 int fd, fd2;
a9322a30
TT
12758
12759 pagesize = getpagesize ();
12760
12761 /* First, make a file with some known garbage in it. */
12762 data = (char *) malloc (pagesize);
12763 if (!data)
81ecdfbb 12764 return 1;
a9322a30
TT
12765 for (i = 0; i < pagesize; ++i)
12766 *(data + i) = rand ();
12767 umask (0);
12768 fd = creat ("conftest.mmap", 0600);
12769 if (fd < 0)
d0ac1c44 12770 return 2;
a9322a30 12771 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 12772 return 3;
a9322a30
TT
12773 close (fd);
12774
d0ac1c44
SM
12775 /* Next, check that the tail of a page is zero-filled. File must have
12776 non-zero length, otherwise we risk SIGBUS for entire page. */
12777 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12778 if (fd2 < 0)
12779 return 4;
12780 cdata2 = "";
12781 if (write (fd2, cdata2, 1) != 1)
12782 return 5;
12783 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12784 if (data2 == MAP_FAILED)
12785 return 6;
12786 for (i = 0; i < pagesize; ++i)
12787 if (*(data2 + i))
12788 return 7;
12789 close (fd2);
12790 if (munmap (data2, pagesize))
12791 return 8;
12792
a9322a30
TT
12793 /* Next, try to mmap the file at a fixed address which already has
12794 something else allocated at it. If we can, also make sure that
12795 we see the same garbage. */
12796 fd = open ("conftest.mmap", O_RDWR);
12797 if (fd < 0)
d0ac1c44 12798 return 9;
a9322a30
TT
12799 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12800 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 12801 return 10;
a9322a30
TT
12802 for (i = 0; i < pagesize; ++i)
12803 if (*(data + i) != *(data2 + i))
d0ac1c44 12804 return 11;
a9322a30
TT
12805
12806 /* Finally, make sure that changes to the mapped area do not
12807 percolate back to the file as seen by read(). (This is a bug on
12808 some variants of i386 svr4.0.) */
12809 for (i = 0; i < pagesize; ++i)
12810 *(data2 + i) = *(data2 + i) + 1;
12811 data3 = (char *) malloc (pagesize);
12812 if (!data3)
d0ac1c44 12813 return 12;
a9322a30 12814 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 12815 return 13;
a9322a30
TT
12816 for (i = 0; i < pagesize; ++i)
12817 if (*(data + i) != *(data3 + i))
d0ac1c44 12818 return 14;
a9322a30 12819 close (fd);
81ecdfbb 12820 return 0;
bec39cab
AC
12821}
12822_ACEOF
81ecdfbb 12823if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12824 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12825else
81ecdfbb 12826 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12827fi
81ecdfbb
RW
12828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12829 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12830fi
81ecdfbb 12831
a9322a30 12832fi
81ecdfbb
RW
12833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12834$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12835if test $ac_cv_func_mmap_fixed_mapped = yes; then
12836
81ecdfbb 12837$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12838
086ec9eb 12839fi
d0ac1c44 12840rm -f conftest.mmap conftest.txt
a3828db0 12841
81ecdfbb 12842ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 12843if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 12844
a9322a30
TT
12845else
12846
12847cat >>confdefs.h <<_ACEOF
12848#define pid_t int
bec39cab 12849_ACEOF
086ec9eb
MK
12850
12851fi
12852
81ecdfbb
RW
12853for ac_header in vfork.h
12854do :
12855 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 12856if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 12857 cat >>confdefs.h <<_ACEOF
81ecdfbb 12858#define HAVE_VFORK_H 1
bec39cab 12859_ACEOF
c906108c
SS
12860
12861fi
a9322a30 12862
a3828db0 12863done
c906108c 12864
a9322a30 12865for ac_func in fork vfork
81ecdfbb
RW
12866do :
12867 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12868ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 12869if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 12870 cat >>confdefs.h <<_ACEOF
81ecdfbb 12871#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12872_ACEOF
b83266a0 12873
97bf5e38 12874fi
a3828db0 12875done
b83266a0 12876
a9322a30 12877if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12879$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 12880if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 12881 $as_echo_n "(cached) " >&6
a9322a30 12882else
81ecdfbb 12883 if test "$cross_compiling" = yes; then :
a9322a30
TT
12884 ac_cv_func_fork_works=cross
12885else
81ecdfbb
RW
12886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12887/* end confdefs.h. */
12888$ac_includes_default
12889int
12890main ()
12891{
12892
12893 /* By Ruediger Kuhlmann. */
12894 return fork () < 0;
12895
12896 ;
12897 return 0;
12898}
a9322a30 12899_ACEOF
81ecdfbb 12900if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12901 ac_cv_func_fork_works=yes
12902else
81ecdfbb 12903 ac_cv_func_fork_works=no
a9322a30 12904fi
81ecdfbb
RW
12905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12906 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12907fi
81ecdfbb 12908
a9322a30 12909fi
81ecdfbb
RW
12910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12911$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12912
12913else
12914 ac_cv_func_fork_works=$ac_cv_func_fork
12915fi
12916if test "x$ac_cv_func_fork_works" = xcross; then
12917 case $host in
12918 *-*-amigaos* | *-*-msdosdjgpp*)
12919 # Override, as these systems have only a dummy fork() stub
12920 ac_cv_func_fork_works=no
12921 ;;
12922 *)
12923 ac_cv_func_fork_works=yes
12924 ;;
12925 esac
81ecdfbb
RW
12926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12927$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12928fi
12929ac_cv_func_vfork_works=$ac_cv_func_vfork
12930if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12932$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 12933if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 12934 $as_echo_n "(cached) " >&6
a9322a30 12935else
81ecdfbb 12936 if test "$cross_compiling" = yes; then :
a9322a30
TT
12937 ac_cv_func_vfork_works=cross
12938else
81ecdfbb 12939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12940/* end confdefs.h. */
12941/* Thanks to Paul Eggert for this test. */
81ecdfbb 12942$ac_includes_default
a9322a30 12943#include <sys/wait.h>
81ecdfbb 12944#ifdef HAVE_VFORK_H
a9322a30
TT
12945# include <vfork.h>
12946#endif
12947/* On some sparc systems, changes by the child to local and incoming
12948 argument registers are propagated back to the parent. The compiler
12949 is told about this with #include <vfork.h>, but some compilers
12950 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12951 static variable whose address is put into a register that is
12952 clobbered by the vfork. */
12953static void
12954#ifdef __cplusplus
12955sparc_address_test (int arg)
12956# else
12957sparc_address_test (arg) int arg;
12958#endif
12959{
12960 static pid_t child;
12961 if (!child) {
12962 child = vfork ();
12963 if (child < 0) {
12964 perror ("vfork");
12965 _exit(2);
12966 }
12967 if (!child) {
12968 arg = getpid();
12969 write(-1, "", 0);
12970 _exit (arg);
12971 }
12972 }
12973}
12974
12975int
12976main ()
12977{
12978 pid_t parent = getpid ();
12979 pid_t child;
12980
12981 sparc_address_test (0);
12982
12983 child = vfork ();
12984
12985 if (child == 0) {
12986 /* Here is another test for sparc vfork register problems. This
12987 test uses lots of local variables, at least as many local
12988 variables as main has allocated so far including compiler
12989 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12990 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12991 reuse the register of parent for one of the local variables,
12992 since it will think that parent can't possibly be used any more
12993 in this routine. Assigning to the local variable will thus
12994 munge parent in the parent process. */
12995 pid_t
12996 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12997 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12998 /* Convince the compiler that p..p7 are live; otherwise, it might
12999 use the same hardware register for all 8 local variables. */
13000 if (p != p1 || p != p2 || p != p3 || p != p4
13001 || p != p5 || p != p6 || p != p7)
13002 _exit(1);
13003
13004 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13005 from child file descriptors. If the child closes a descriptor
13006 before it execs or exits, this munges the parent's descriptor
13007 as well. Test for this by closing stdout in the child. */
13008 _exit(close(fileno(stdout)) != 0);
13009 } else {
13010 int status;
13011 struct stat st;
13012
13013 while (wait(&status) != child)
13014 ;
81ecdfbb 13015 return (
a9322a30
TT
13016 /* Was there some problem with vforking? */
13017 child < 0
13018
13019 /* Did the child fail? (This shouldn't happen.) */
13020 || status
13021
13022 /* Did the vfork/compiler bug occur? */
13023 || parent != getpid()
13024
13025 /* Did the file descriptor bug occur? */
13026 || fstat(fileno(stdout), &st) != 0
13027 );
13028 }
13029}
13030_ACEOF
81ecdfbb 13031if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13032 ac_cv_func_vfork_works=yes
13033else
81ecdfbb 13034 ac_cv_func_vfork_works=no
a9322a30 13035fi
81ecdfbb
RW
13036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13037 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13038fi
81ecdfbb 13039
a9322a30 13040fi
81ecdfbb
RW
13041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13042$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13043
13044fi;
13045if test "x$ac_cv_func_fork_works" = xcross; then
13046 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13047 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13048$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13049fi
13050
13051if test "x$ac_cv_func_vfork_works" = xyes; then
13052
81ecdfbb 13053$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13054
13055else
13056
81ecdfbb 13057$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13058
13059fi
13060if test "x$ac_cv_func_fork_works" = xyes; then
13061
81ecdfbb 13062$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13063
13064fi
13065
cdf43629 13066for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13067 pipe poll pread pread64 pwrite resize_term \
e671cd59 13068 sbrk getpgid setpgid setpgrp setsid \
c12d372d 13069 sigaction sigsetmask socketpair \
110ed339 13070 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13071 setrlimit getrlimit posix_madvise waitpid \
e48f6033 13072 ptrace64 sigaltstack setns use_default_colors
81ecdfbb
RW
13073do :
13074 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13075ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13076if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13077 cat >>confdefs.h <<_ACEOF
81ecdfbb 13078#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13079_ACEOF
13080
13081fi
13082done
13083
13084
81ecdfbb
RW
13085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13086$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13087if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13088 $as_echo_n "(cached) " >&6
6c7a06a3 13089else
81ecdfbb 13090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13091/* end confdefs.h. */
13092#include <langinfo.h>
13093int
13094main ()
13095{
13096char* cs = nl_langinfo(CODESET);
bec39cab
AC
13097 ;
13098 return 0;
13099}
13100_ACEOF
81ecdfbb 13101if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13102 am_cv_langinfo_codeset=yes
a4db0f07 13103else
81ecdfbb 13104 am_cv_langinfo_codeset=no
a4db0f07 13105fi
81ecdfbb
RW
13106rm -f core conftest.err conftest.$ac_objext \
13107 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13108
a4db0f07 13109fi
81ecdfbb
RW
13110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13111$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13112 if test $am_cv_langinfo_codeset = yes; then
13113
81ecdfbb 13114$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13115
6c7a06a3 13116 fi
c906108c 13117
d0ac1c44
SM
13118ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13119if test "x$ac_cv_type_size_t" = xyes; then :
13120
13121else
13122
13123cat >>confdefs.h <<_ACEOF
13124#define size_t unsigned int
13125_ACEOF
13126
13127fi
13128
06825bd1 13129
3266f10b
TT
13130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13131$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 13132if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13133 $as_echo_n "(cached) " >&6
13134else
13135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13136/* end confdefs.h. */
13137#include <stdlib.h>
13138#include <stdarg.h>
13139#include <string.h>
13140#include <float.h>
13141
13142int
13143main ()
13144{
13145
13146 ;
13147 return 0;
13148}
13149_ACEOF
13150if ac_fn_c_try_compile "$LINENO"; then :
13151 ac_cv_header_stdc=yes
13152else
13153 ac_cv_header_stdc=no
13154fi
13155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13156
13157if test $ac_cv_header_stdc = yes; then
13158 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13160/* end confdefs.h. */
13161#include <string.h>
13162
13163_ACEOF
13164if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13165 $EGREP "memchr" >/dev/null 2>&1; then :
13166
13167else
13168 ac_cv_header_stdc=no
13169fi
13170rm -f conftest*
13171
13172fi
13173
13174if test $ac_cv_header_stdc = yes; then
13175 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13177/* end confdefs.h. */
13178#include <stdlib.h>
13179
13180_ACEOF
13181if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13182 $EGREP "free" >/dev/null 2>&1; then :
13183
13184else
13185 ac_cv_header_stdc=no
13186fi
13187rm -f conftest*
13188
13189fi
13190
13191if test $ac_cv_header_stdc = yes; then
13192 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13193 if test "$cross_compiling" = yes; then :
13194 :
13195else
13196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13197/* end confdefs.h. */
13198#include <ctype.h>
13199#include <stdlib.h>
13200#if ((' ' & 0x0FF) == 0x020)
13201# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13202# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13203#else
13204# define ISLOWER(c) \
13205 (('a' <= (c) && (c) <= 'i') \
13206 || ('j' <= (c) && (c) <= 'r') \
13207 || ('s' <= (c) && (c) <= 'z'))
13208# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13209#endif
13210
13211#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13212int
13213main ()
13214{
13215 int i;
13216 for (i = 0; i < 256; i++)
13217 if (XOR (islower (i), ISLOWER (i))
13218 || toupper (i) != TOUPPER (i))
13219 return 2;
13220 return 0;
13221}
13222_ACEOF
13223if ac_fn_c_try_run "$LINENO"; then :
13224
13225else
13226 ac_cv_header_stdc=no
13227fi
13228rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13229 conftest.$ac_objext conftest.beam conftest.$ac_ext
13230fi
13231
13232fi
13233fi
13234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13235$as_echo "$ac_cv_header_stdc" >&6; }
13236if test $ac_cv_header_stdc = yes; then
13237
13238$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13239
3266f10b
TT
13240fi
13241
13242 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13243# for constant arguments. Useless!
13244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13245$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 13246if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13247 $as_echo_n "(cached) " >&6
13248else
13249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13250/* end confdefs.h. */
13251#include <alloca.h>
13252int
13253main ()
13254{
13255char *p = (char *) alloca (2 * sizeof (int));
13256 if (p) return 0;
13257 ;
13258 return 0;
13259}
13260_ACEOF
13261if ac_fn_c_try_link "$LINENO"; then :
13262 ac_cv_working_alloca_h=yes
13263else
13264 ac_cv_working_alloca_h=no
13265fi
13266rm -f core conftest.err conftest.$ac_objext \
13267 conftest$ac_exeext conftest.$ac_ext
13268fi
13269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13270$as_echo "$ac_cv_working_alloca_h" >&6; }
13271if test $ac_cv_working_alloca_h = yes; then
13272
13273$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13274
13275fi
13276
13277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13278$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 13279if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13280 $as_echo_n "(cached) " >&6
13281else
13282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13283/* end confdefs.h. */
13284#ifdef __GNUC__
13285# define alloca __builtin_alloca
13286#else
13287# ifdef _MSC_VER
13288# include <malloc.h>
13289# define alloca _alloca
13290# else
13291# ifdef HAVE_ALLOCA_H
13292# include <alloca.h>
13293# else
13294# ifdef _AIX
13295 #pragma alloca
13296# else
13297# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 13298void *alloca (size_t);
3266f10b
TT
13299# endif
13300# endif
13301# endif
13302# endif
13303#endif
13304
13305int
13306main ()
13307{
13308char *p = (char *) alloca (1);
13309 if (p) return 0;
13310 ;
13311 return 0;
13312}
13313_ACEOF
13314if ac_fn_c_try_link "$LINENO"; then :
13315 ac_cv_func_alloca_works=yes
13316else
13317 ac_cv_func_alloca_works=no
13318fi
13319rm -f core conftest.err conftest.$ac_objext \
13320 conftest$ac_exeext conftest.$ac_ext
13321fi
13322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13323$as_echo "$ac_cv_func_alloca_works" >&6; }
13324
13325if test $ac_cv_func_alloca_works = yes; then
13326
13327$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13328
13329else
13330 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13331# that cause trouble. Some versions do not even contain alloca or
13332# contain a buggy version. If you still want to use their alloca,
13333# use ar to extract alloca.o from them instead of compiling alloca.c.
13334
13335ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13336
13337$as_echo "#define C_ALLOCA 1" >>confdefs.h
13338
13339
13340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13341$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 13342if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13343 $as_echo_n "(cached) " >&6
13344else
13345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13346/* end confdefs.h. */
13347#if defined CRAY && ! defined CRAY2
13348webecray
13349#else
13350wenotbecray
13351#endif
13352
13353_ACEOF
13354if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13355 $EGREP "webecray" >/dev/null 2>&1; then :
13356 ac_cv_os_cray=yes
13357else
13358 ac_cv_os_cray=no
13359fi
13360rm -f conftest*
13361
13362fi
13363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13364$as_echo "$ac_cv_os_cray" >&6; }
13365if test $ac_cv_os_cray = yes; then
13366 for ac_func in _getb67 GETB67 getb67; do
13367 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13368ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13369if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13370
13371cat >>confdefs.h <<_ACEOF
13372#define CRAY_STACKSEG_END $ac_func
13373_ACEOF
13374
13375 break
13376fi
13377
13378 done
13379fi
13380
13381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13382$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 13383if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13384 $as_echo_n "(cached) " >&6
13385else
13386 if test "$cross_compiling" = yes; then :
13387 ac_cv_c_stack_direction=0
13388else
13389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13390/* end confdefs.h. */
13391$ac_includes_default
13392int
d0ac1c44 13393find_stack_direction (int *addr, int depth)
3266f10b 13394{
d0ac1c44
SM
13395 int dir, dummy = 0;
13396 if (! addr)
13397 addr = &dummy;
13398 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13399 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13400 return dir + dummy;
3266f10b
TT
13401}
13402
13403int
d0ac1c44 13404main (int argc, char **argv)
3266f10b 13405{
d0ac1c44 13406 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13407}
13408_ACEOF
13409if ac_fn_c_try_run "$LINENO"; then :
13410 ac_cv_c_stack_direction=1
13411else
13412 ac_cv_c_stack_direction=-1
13413fi
13414rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13415 conftest.$ac_objext conftest.beam conftest.$ac_ext
13416fi
13417
13418fi
13419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13420$as_echo "$ac_cv_c_stack_direction" >&6; }
13421cat >>confdefs.h <<_ACEOF
13422#define STACK_DIRECTION $ac_cv_c_stack_direction
13423_ACEOF
13424
13425
13426fi
13427
13428
13429
13430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13431$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13432if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13433 $as_echo_n "(cached) " >&6
13434else
13435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13436/* end confdefs.h. */
13437#include <langinfo.h>
13438int
13439main ()
13440{
13441char* cs = nl_langinfo(CODESET);
13442 ;
13443 return 0;
13444}
13445_ACEOF
13446if ac_fn_c_try_link "$LINENO"; then :
13447 am_cv_langinfo_codeset=yes
13448else
13449 am_cv_langinfo_codeset=no
13450fi
13451rm -f core conftest.err conftest.$ac_objext \
13452 conftest$ac_exeext conftest.$ac_ext
13453
13454fi
13455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13456$as_echo "$am_cv_langinfo_codeset" >&6; }
13457 if test $am_cv_langinfo_codeset = yes; then
13458
13459$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13460
13461 fi
13462
13463
2d41fa11 13464 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
13465do :
13466 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13467ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13468if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13469 cat >>confdefs.h <<_ACEOF
13470#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13471_ACEOF
13472
13473fi
13474
13475done
13476
13477
c12d372d 13478 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
5abebf3c 13479 sigprocmask
3266f10b
TT
13480do :
13481 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13482ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13483if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13484 cat >>confdefs.h <<_ACEOF
13485#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13486_ACEOF
13487
13488fi
13489done
13490
13491
13492 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
d0ac1c44 13493if test "x$ac_cv_have_decl_strerror" = xyes; then :
3266f10b
TT
13494 ac_have_decl=1
13495else
13496 ac_have_decl=0
13497fi
13498
13499cat >>confdefs.h <<_ACEOF
13500#define HAVE_DECL_STRERROR $ac_have_decl
13501_ACEOF
13502ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 13503if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13504 ac_have_decl=1
13505else
13506 ac_have_decl=0
13507fi
13508
13509cat >>confdefs.h <<_ACEOF
13510#define HAVE_DECL_STRSTR $ac_have_decl
13511_ACEOF
13512
13513
e9bcb658
GB
13514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13515$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 13516if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
13517 $as_echo_n "(cached) " >&6
13518else
13519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13520/* end confdefs.h. */
13521
13522#include <setjmp.h>
13523
13524int
13525main ()
13526{
13527sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13528 ;
13529 return 0;
13530}
13531_ACEOF
13532if ac_fn_c_try_compile "$LINENO"; then :
13533 gdb_cv_func_sigsetjmp=yes
13534else
13535 gdb_cv_func_sigsetjmp=no
13536fi
13537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13538fi
13539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13540$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13541if test $gdb_cv_func_sigsetjmp = yes; then
13542
13543$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13544
13545fi
13546
3266f10b 13547
54019719
PA
13548# Check the return and argument types of ptrace.
13549
13550
54019719
PA
13551for ac_header in sys/ptrace.h ptrace.h
13552do :
13553 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13554ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13555if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
13556 cat >>confdefs.h <<_ACEOF
13557#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13558_ACEOF
13559
13560fi
13561
13562done
13563
13564
a3828db0 13565gdb_ptrace_headers='
4ff70b84 13566#include <sys/types.h>
a3828db0
MK
13567#if HAVE_SYS_PTRACE_H
13568# include <sys/ptrace.h>
13569#endif
13570#if HAVE_UNISTD_H
13571# include <unistd.h>
13572#endif
13573'
13574# There is no point in checking if we don't have a prototype.
9b30624b 13575ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 13576"
d0ac1c44 13577if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 13578 ac_have_decl=1
06825bd1 13579else
81ecdfbb 13580 ac_have_decl=0
06825bd1 13581fi
06825bd1 13582
a3828db0 13583cat >>confdefs.h <<_ACEOF
81ecdfbb 13584#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13585_ACEOF
81ecdfbb 13586if test $ac_have_decl = 1; then :
bec39cab 13587
a3828db0 13588else
a3828db0
MK
13589
13590 : ${gdb_cv_func_ptrace_ret='int'}
13591 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13592
06825bd1
MK
13593fi
13594
064ef605
DJ
13595# Check return type. Varargs (used on GNU/Linux) conflict with the
13596# empty argument list, so check for that explicitly.
81ecdfbb
RW
13597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13598$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 13599if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 13600 $as_echo_n "(cached) " >&6
bec39cab 13601else
81ecdfbb 13602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13603/* end confdefs.h. */
a3828db0 13604$gdb_ptrace_headers
bec39cab
AC
13605int
13606main ()
13607{
064ef605
DJ
13608extern long ptrace (enum __ptrace_request, ...);
13609 ;
13610 return 0;
13611}
13612_ACEOF
9b30624b 13613if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13614 gdb_cv_func_ptrace_ret='long'
13615else
81ecdfbb 13616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13617/* end confdefs.h. */
13618$gdb_ptrace_headers
13619int
13620main ()
13621{
a3828db0 13622extern int ptrace ();
bec39cab
AC
13623 ;
13624 return 0;
13625}
13626_ACEOF
9b30624b 13627if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13628 gdb_cv_func_ptrace_ret='int'
70f9f479 13629else
81ecdfbb 13630 gdb_cv_func_ptrace_ret='long'
70f9f479 13631fi
81ecdfbb 13632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13633fi
81ecdfbb 13634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13635fi
81ecdfbb
RW
13636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13637$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13638
a3828db0
MK
13639cat >>confdefs.h <<_ACEOF
13640#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13641_ACEOF
70f9f479 13642
a3828db0 13643# Check argument types.
81ecdfbb
RW
13644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13645$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 13646if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 13647 $as_echo_n "(cached) " >&6
bec39cab 13648else
a3828db0 13649
81ecdfbb 13650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13651/* end confdefs.h. */
13652$gdb_ptrace_headers
13653int
13654main ()
13655{
13656extern long ptrace (enum __ptrace_request, ...);
13657 ;
13658 return 0;
13659}
13660_ACEOF
9b30624b 13661if ac_fn_c_try_compile "$LINENO"; then :
54019719 13662 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13663else
064ef605 13664
a3828db0
MK
13665for gdb_arg1 in 'int' 'long'; do
13666 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13667 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13668 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13670/* end confdefs.h. */
a3828db0 13671$gdb_ptrace_headers
bec39cab
AC
13672int
13673main ()
13674{
a3828db0
MK
13675
13676extern $gdb_cv_func_ptrace_ret
13677 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13678
bec39cab
AC
13679 ;
13680 return 0;
13681}
13682_ACEOF
9b30624b 13683if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13684 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13685 break 4;
5c7f2947 13686fi
81ecdfbb 13687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13688 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13690/* end confdefs.h. */
a3828db0 13691$gdb_ptrace_headers
bec39cab
AC
13692int
13693main ()
13694{
a3828db0
MK
13695
13696extern $gdb_cv_func_ptrace_ret
13697 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13698
bec39cab
AC
13699 ;
13700 return 0;
13701}
13702_ACEOF
9b30624b 13703if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13704
13705gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13706 break 5;
78434e59 13707fi
81ecdfbb 13708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13709 done
13710 done
13711 done
13712 done
13713done
13714# Provide a safe default value.
13715: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13716
064ef605 13717fi
81ecdfbb 13718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13719fi
81ecdfbb
RW
13720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13721$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13722ac_save_IFS=$IFS; IFS=','
13723set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13724IFS=$ac_save_IFS
13725shift
bec39cab 13726
54019719
PA
13727cat >>confdefs.h <<_ACEOF
13728#define PTRACE_TYPE_ARG1 $1
13729_ACEOF
13730
13731
a3828db0
MK
13732cat >>confdefs.h <<_ACEOF
13733#define PTRACE_TYPE_ARG3 $3
13734_ACEOF
13735
96d7229d
LM
13736
13737cat >>confdefs.h <<_ACEOF
13738#define PTRACE_TYPE_ARG4 $4
13739_ACEOF
13740
a3828db0
MK
13741if test -n "$5"; then
13742
13743cat >>confdefs.h <<_ACEOF
13744#define PTRACE_TYPE_ARG5 $5
bec39cab 13745_ACEOF
78434e59
MK
13746
13747fi
13748
54019719 13749
a3828db0 13750if test "$cross_compiling" = no; then
81ecdfbb
RW
13751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13752$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13753if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13754 $as_echo_n "(cached) " >&6
a3828db0 13755else
81ecdfbb 13756 if test "$cross_compiling" = yes; then :
d0ac1c44 13757 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13758else
81ecdfbb 13759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13760/* end confdefs.h. */
81ecdfbb 13761$ac_includes_default
bec39cab
AC
13762int
13763main ()
13764{
a3828db0
MK
13765/* If this system has a BSD-style setpgrp which takes arguments,
13766 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13767 exit successfully. */
81ecdfbb 13768 return setpgrp (1,1) != -1;
bec39cab
AC
13769 ;
13770 return 0;
13771}
13772_ACEOF
81ecdfbb 13773if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13774 ac_cv_func_setpgrp_void=no
c906108c 13775else
81ecdfbb 13776 ac_cv_func_setpgrp_void=yes
c906108c 13777fi
81ecdfbb
RW
13778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13779 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13780fi
81ecdfbb 13781
a3828db0 13782fi
81ecdfbb
RW
13783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13784$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13785if test $ac_cv_func_setpgrp_void = yes; then
13786
81ecdfbb 13787$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13788
13789fi
a3828db0
MK
13790
13791else
81ecdfbb
RW
13792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13793$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13794if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13795 $as_echo_n "(cached) " >&6
97bf5e38 13796else
81ecdfbb 13797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13798/* end confdefs.h. */
a3828db0
MK
13799
13800#include <unistd.h>
13801
bec39cab
AC
13802int
13803main ()
13804{
a3828db0
MK
13805
13806 if (setpgrp(1,1) == -1)
13807 exit (0);
13808 else
13809 exit (1);
13810
bec39cab
AC
13811 ;
13812 return 0;
13813}
13814_ACEOF
81ecdfbb 13815if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13816 ac_cv_func_setpgrp_void=no
c906108c 13817else
81ecdfbb 13818 ac_cv_func_setpgrp_void=yes
c906108c 13819fi
81ecdfbb 13820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13821fi
81ecdfbb
RW
13822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13823$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13824if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13825 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13826
a3828db0 13827fi
c906108c
SS
13828fi
13829
db1ff28b
JK
13830# Assume we'll default to using the included libiberty regex.
13831gdb_use_included_regex=yes
13832
13833# However, if the system regex is GNU regex, then default to *not*
13834# using the included regex.
13835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13836$as_echo_n "checking for GNU regex... " >&6; }
d0ac1c44 13837if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
13838 $as_echo_n "(cached) " >&6
13839else
13840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13841/* end confdefs.h. */
13842#include <gnu-versions.h>
13843int
13844main ()
13845{
13846#define REGEX_INTERFACE_VERSION 1
13847#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13848# error "Version mismatch"
13849#endif
13850 ;
13851 return 0;
13852}
13853_ACEOF
13854if ac_fn_c_try_compile "$LINENO"; then :
13855 gdb_cv_have_gnu_regex=yes
13856else
13857 gdb_cv_have_gnu_regex=no
13858fi
13859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13860fi
13861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13862$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13863if test $gdb_cv_have_gnu_regex = yes; then
13864 gdb_use_included_regex=no
13865fi
13866
13867
13868# Check whether --with-included-regex was given.
13869if test "${with_included_regex+set}" = set; then :
13870 withval=$with_included_regex; gdb_with_regex=$withval
13871else
13872 gdb_with_regex=$gdb_use_included_regex
13873fi
13874
13875if test "$gdb_with_regex" = yes; then
13876
13877$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13878
13879fi
13880
81ecdfbb
RW
13881# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13882ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13883#include <sys/proc.h>
13884
13885"
d0ac1c44 13886if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 13887
5c45e068 13888cat >>confdefs.h <<_ACEOF
a3828db0 13889#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13890_ACEOF
c906108c 13891
5c45e068 13892
97bf5e38 13893fi
c906108c 13894
5c45e068 13895
a3828db0 13896# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13898$as_echo_n "checking for struct lwp... " >&6; }
d0ac1c44 13899if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 13900 $as_echo_n "(cached) " >&6
bec39cab 13901else
81ecdfbb 13902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13903/* end confdefs.h. */
a3828db0 13904#include <sys/param.h>
c49fbc6c 13905#define _KMEMUSER
a3828db0 13906#include <sys/lwp.h>
bec39cab
AC
13907int
13908main ()
13909{
a3828db0 13910struct lwp l;
bec39cab
AC
13911 ;
13912 return 0;
13913}
13914_ACEOF
81ecdfbb 13915if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13916 gdb_cv_struct_lwp=yes
c906108c 13917else
81ecdfbb 13918 gdb_cv_struct_lwp=no
c906108c 13919fi
81ecdfbb 13920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13921fi
81ecdfbb
RW
13922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13923$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13924if test $gdb_cv_struct_lwp = yes; then
c906108c 13925
81ecdfbb 13926$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13927
97bf5e38 13928fi
c906108c 13929
a3828db0 13930# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13932$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
d0ac1c44 13933if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 13934 $as_echo_n "(cached) " >&6
bec39cab 13935else
81ecdfbb 13936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13937/* end confdefs.h. */
a3828db0
MK
13938#include <sys/types.h>
13939#include <machine/reg.h>
bec39cab
AC
13940int
13941main ()
13942{
a3828db0 13943struct reg r;
bec39cab
AC
13944 ;
13945 return 0;
13946}
13947_ACEOF
81ecdfbb 13948if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13949 gdb_cv_struct_reg=yes
27ca5dad 13950else
81ecdfbb 13951 gdb_cv_struct_reg=no
27ca5dad 13952fi
81ecdfbb 13953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13954fi
81ecdfbb
RW
13955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13956$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13957if test $gdb_cv_struct_reg = yes; then
bec39cab 13958
81ecdfbb 13959$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13960
13961fi
97bf5e38 13962
a3828db0
MK
13963# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13964# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
13965ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
13966#include <machine/reg.h>
81ecdfbb 13967"
d0ac1c44 13968if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
13969
13970cat >>confdefs.h <<_ACEOF
a3828db0 13971#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13972_ACEOF
3862412b 13973
5c45e068 13974
97bf5e38 13975fi
a6e69c1f
JB
13976ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
13977#include <machine/reg.h>
81ecdfbb 13978"
d0ac1c44 13979if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
13980
13981cat >>confdefs.h <<_ACEOF
a3828db0 13982#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13983_ACEOF
3862412b 13984
5c45e068 13985
97bf5e38 13986fi
3862412b 13987
5c45e068 13988
6fea9e18
L
13989# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
13990# Older amd64 Linux's don't have the fs_base and gs_base members of
13991# `struct user_regs_struct'.
f517c180
EA
13992ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
13993#include <sys/user.h>
6fea9e18 13994"
d0ac1c44 13995if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
13996
13997cat >>confdefs.h <<_ACEOF
13998#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
13999_ACEOF
14000
14001
14002fi
f517c180
EA
14003ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14004#include <sys/user.h>
6fea9e18 14005"
d0ac1c44 14006if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14007
14008cat >>confdefs.h <<_ACEOF
14009#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14010_ACEOF
14011
14012
14013fi
14014
14015
a3828db0 14016# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14018$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14019if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14020 $as_echo_n "(cached) " >&6
451928c5 14021else
81ecdfbb 14022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14023/* end confdefs.h. */
a3828db0 14024#include <sys/ptrace.h>
bec39cab
AC
14025int
14026main ()
14027{
a3828db0 14028PTRACE_GETREGS;
bec39cab
AC
14029 ;
14030 return 0;
14031}
14032_ACEOF
81ecdfbb 14033if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14034 gdb_cv_have_ptrace_getregs=yes
451928c5 14035else
81ecdfbb 14036 gdb_cv_have_ptrace_getregs=no
451928c5 14037fi
81ecdfbb 14038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14039fi
14040
81ecdfbb
RW
14041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14042$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14043if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14044
81ecdfbb 14045$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14046
97bf5e38 14047fi
451928c5 14048
a3828db0 14049# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14051$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14052if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14053 $as_echo_n "(cached) " >&6
451928c5 14054else
81ecdfbb 14055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14056/* end confdefs.h. */
a3828db0 14057#include <sys/ptrace.h>
bec39cab
AC
14058int
14059main ()
14060{
a3828db0 14061PTRACE_GETFPXREGS;
bec39cab
AC
14062 ;
14063 return 0;
14064}
14065_ACEOF
81ecdfbb 14066if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14067 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14068else
81ecdfbb 14069 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14070fi
81ecdfbb 14071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14072fi
14073
81ecdfbb
RW
14074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14075$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14076if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14077
81ecdfbb 14078$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14079
97bf5e38 14080fi
451928c5 14081
a3828db0 14082# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14084$as_echo_n "checking for PT_GETDBREGS... " >&6; }
d0ac1c44 14085if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 14086 $as_echo_n "(cached) " >&6
3862412b 14087else
81ecdfbb 14088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14089/* end confdefs.h. */
a3828db0
MK
14090#include <sys/types.h>
14091#include <sys/ptrace.h>
bec39cab
AC
14092int
14093main ()
14094{
a3828db0 14095PT_GETDBREGS;
bec39cab
AC
14096 ;
14097 return 0;
14098}
14099_ACEOF
81ecdfbb 14100if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14101 gdb_cv_have_pt_getdbregs=yes
3862412b 14102else
81ecdfbb 14103 gdb_cv_have_pt_getdbregs=no
3862412b 14104fi
81ecdfbb 14105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14106fi
14107
81ecdfbb
RW
14108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14109$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14110if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14111
81ecdfbb 14112$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14113
97bf5e38 14114fi
3862412b 14115
a3828db0 14116# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14118$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
d0ac1c44 14119if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 14120 $as_echo_n "(cached) " >&6
3862412b 14121else
81ecdfbb 14122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14123/* end confdefs.h. */
a3828db0
MK
14124#include <sys/types.h>
14125#include <sys/ptrace.h>
bec39cab
AC
14126int
14127main ()
14128{
a3828db0 14129PT_GETXMMREGS;
bec39cab
AC
14130 ;
14131 return 0;
14132}
14133_ACEOF
81ecdfbb 14134if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14135 gdb_cv_have_pt_getxmmregs=yes
3862412b 14136else
81ecdfbb 14137 gdb_cv_have_pt_getxmmregs=no
3862412b 14138fi
81ecdfbb 14139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14140fi
14141
81ecdfbb
RW
14142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14143$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14144if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14145
81ecdfbb 14146$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14147
97bf5e38 14148fi
3862412b 14149
6e9567fe
JB
14150# See if <sys/ptrace.h> supports LWP names on FreeBSD
14151# Older FreeBSD versions don't have the pl_tdname member of
14152# `struct ptrace_lwpinfo'.
14153ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14154"
d0ac1c44 14155if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
14156
14157cat >>confdefs.h <<_ACEOF
14158#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14159_ACEOF
14160
14161
14162fi
14163
14164
e6cdd38e
JB
14165# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14166# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14167# FreeBSD 10.3.
14168ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14169"
d0ac1c44 14170if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
14171
14172cat >>confdefs.h <<_ACEOF
14173#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14174_ACEOF
14175
14176
14177fi
14178
6e9567fe 14179
97bf5e38 14180if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14182$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14183 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 14184 $as_echo_n "(cached) " >&6
596c9d4b 14185else
81ecdfbb 14186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14187/* end confdefs.h. */
596c9d4b
KB
14188
14189#define _SYSCALL32
d30c5336
JK
14190/* Needed for new procfs interface on sparc-solaris. */
14191#define _STRUCTURED_PROC 1
596c9d4b 14192#include <sys/procfs.h>
bec39cab
AC
14193int
14194main ()
14195{
97bf5e38 14196gregset_t avar
bec39cab
AC
14197 ;
14198 return 0;
14199}
14200_ACEOF
81ecdfbb 14201if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14202 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14203else
81ecdfbb 14204 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14205
596c9d4b 14206fi
81ecdfbb 14207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14208fi
14209
97bf5e38 14210 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14211
81ecdfbb 14212$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14213
14214 fi
81ecdfbb
RW
14215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14216$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14217
81ecdfbb
RW
14218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14219$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14220 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14221 $as_echo_n "(cached) " >&6
d84dd0c5 14222else
81ecdfbb 14223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14224/* end confdefs.h. */
97bf5e38
MK
14225
14226#define _SYSCALL32
d30c5336
JK
14227/* Needed for new procfs interface on sparc-solaris. */
14228#define _STRUCTURED_PROC 1
d84dd0c5 14229#include <sys/procfs.h>
bec39cab
AC
14230int
14231main ()
14232{
97bf5e38 14233fpregset_t avar
bec39cab
AC
14234 ;
14235 return 0;
14236}
14237_ACEOF
81ecdfbb 14238if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14239 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14240else
81ecdfbb 14241 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14242
d84dd0c5 14243fi
81ecdfbb 14244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14245fi
14246
97bf5e38 14247 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14248
81ecdfbb 14249$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14250
97bf5e38 14251 fi
81ecdfbb
RW
14252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14253$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14254
81ecdfbb
RW
14255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14256$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14257 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 14258 $as_echo_n "(cached) " >&6
c906108c 14259else
81ecdfbb 14260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14261/* end confdefs.h. */
c906108c 14262
97bf5e38 14263#define _SYSCALL32
d30c5336
JK
14264/* Needed for new procfs interface on sparc-solaris. */
14265#define _STRUCTURED_PROC 1
97bf5e38 14266#include <sys/procfs.h>
bec39cab
AC
14267int
14268main ()
14269{
97bf5e38 14270prgregset_t avar
bec39cab
AC
14271 ;
14272 return 0;
14273}
14274_ACEOF
81ecdfbb 14275if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14276 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14277else
81ecdfbb 14278 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14279
c906108c 14280fi
81ecdfbb 14281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14282fi
14283
97bf5e38 14284 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14285
81ecdfbb 14286$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14287
97bf5e38 14288 fi
81ecdfbb
RW
14289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14290$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14291
81ecdfbb
RW
14292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14293$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14294 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14295 $as_echo_n "(cached) " >&6
d45fe813 14296else
81ecdfbb 14297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14298/* end confdefs.h. */
97bf5e38
MK
14299
14300#define _SYSCALL32
d30c5336
JK
14301/* Needed for new procfs interface on sparc-solaris. */
14302#define _STRUCTURED_PROC 1
97bf5e38 14303#include <sys/procfs.h>
bec39cab
AC
14304int
14305main ()
14306{
97bf5e38 14307prfpregset_t avar
bec39cab
AC
14308 ;
14309 return 0;
14310}
14311_ACEOF
81ecdfbb 14312if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14313 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14314else
81ecdfbb 14315 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14316
d45fe813 14317fi
81ecdfbb 14318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14319fi
14320
97bf5e38 14321 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14322
81ecdfbb 14323$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14324
97bf5e38 14325 fi
81ecdfbb
RW
14326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14327$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14328
81ecdfbb
RW
14329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14330$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
d0ac1c44 14331 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 14332 $as_echo_n "(cached) " >&6
d45fe813 14333else
81ecdfbb 14334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14335/* end confdefs.h. */
97bf5e38
MK
14336
14337#define _SYSCALL32
d30c5336
JK
14338/* Needed for new procfs interface on sparc-solaris. */
14339#define _STRUCTURED_PROC 1
97bf5e38 14340#include <sys/procfs.h>
bec39cab
AC
14341int
14342main ()
14343{
97bf5e38 14344prgregset32_t avar
bec39cab
AC
14345 ;
14346 return 0;
14347}
14348_ACEOF
81ecdfbb 14349if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14350 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14351else
81ecdfbb 14352 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14353
d45fe813 14354fi
81ecdfbb 14355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14356fi
14357
97bf5e38 14358 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14359
81ecdfbb 14360$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14361
97bf5e38 14362 fi
81ecdfbb
RW
14363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14364$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14365
81ecdfbb
RW
14366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14367$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 14368 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14369 $as_echo_n "(cached) " >&6
d45fe813 14370else
81ecdfbb 14371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14372/* end confdefs.h. */
97bf5e38 14373
d45fe813 14374#define _SYSCALL32
d30c5336
JK
14375/* Needed for new procfs interface on sparc-solaris. */
14376#define _STRUCTURED_PROC 1
97bf5e38 14377#include <sys/procfs.h>
bec39cab
AC
14378int
14379main ()
14380{
97bf5e38 14381lwpid_t avar
bec39cab
AC
14382 ;
14383 return 0;
14384}
14385_ACEOF
81ecdfbb 14386if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14387 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14388else
81ecdfbb 14389 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14390
d45fe813 14391fi
81ecdfbb 14392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14393fi
14394
97bf5e38 14395 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14396
81ecdfbb 14397$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14398
97bf5e38 14399 fi
81ecdfbb
RW
14400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14401$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14402
81ecdfbb
RW
14403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14404$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 14405 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14406 $as_echo_n "(cached) " >&6
c906108c 14407else
81ecdfbb 14408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14409/* end confdefs.h. */
c906108c 14410
97bf5e38 14411#define _SYSCALL32
d30c5336
JK
14412/* Needed for new procfs interface on sparc-solaris. */
14413#define _STRUCTURED_PROC 1
97bf5e38 14414#include <sys/procfs.h>
bec39cab
AC
14415int
14416main ()
14417{
97bf5e38 14418psaddr_t avar
bec39cab
AC
14419 ;
14420 return 0;
14421}
14422_ACEOF
81ecdfbb 14423if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14424 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14425else
81ecdfbb 14426 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14427
c906108c 14428fi
81ecdfbb 14429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14430fi
14431
97bf5e38 14432 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14433
81ecdfbb 14434$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14435
97bf5e38 14436 fi
81ecdfbb
RW
14437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14438$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14439
43b7e92b
GB
14440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14441$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14442 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14443 $as_echo_n "(cached) " >&6
14444else
14445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14446/* end confdefs.h. */
14447
14448#define _SYSCALL32
14449/* Needed for new procfs interface on sparc-solaris. */
14450#define _STRUCTURED_PROC 1
14451#include <sys/procfs.h>
14452int
14453main ()
14454{
14455elf_fpregset_t avar
14456 ;
14457 return 0;
14458}
14459_ACEOF
14460if ac_fn_c_try_compile "$LINENO"; then :
14461 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14462else
14463 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14464
14465fi
14466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14467fi
14468
14469 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14470
14471$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14472
14473 fi
14474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14475$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14476
c906108c 14477fi
c906108c 14478
bc8bcb4b 14479# Check if the compiler supports the `long long' type.
c906108c 14480
81ecdfbb
RW
14481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14482$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 14483if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 14484 $as_echo_n "(cached) " >&6
97bf5e38 14485else
81ecdfbb 14486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14487/* end confdefs.h. */
bc8bcb4b 14488extern long long foo;
bec39cab
AC
14489int
14490main ()
14491{
bc8bcb4b 14492switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14493 ;
14494 return 0;
14495}
14496_ACEOF
81ecdfbb 14497if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14498 gdb_cv_c_long_long=yes
14499else
81ecdfbb 14500 gdb_cv_c_long_long=no
97bf5e38 14501fi
81ecdfbb 14502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14503fi
81ecdfbb
RW
14504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14505$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14506if test $gdb_cv_c_long_long != yes; then
14507 # libdecnumber requires long long.
d0ac1c44 14508 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14509fi
14510
bc8bcb4b 14511# Check if the compiler and runtime support printing long longs.
97bf5e38 14512
81ecdfbb
RW
14513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14514$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 14515if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 14516 $as_echo_n "(cached) " >&6
97bf5e38 14517else
81ecdfbb 14518 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14519 gdb_cv_printf_has_long_long=no
14520else
81ecdfbb 14521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14522/* end confdefs.h. */
bc8bcb4b
MK
14523$ac_includes_default
14524int
14525main ()
14526{
14527char buf[32];
97bf5e38
MK
14528 long long l = 0;
14529 l = (l << 16) + 0x0123;
14530 l = (l << 16) + 0x4567;
14531 l = (l << 16) + 0x89ab;
14532 l = (l << 16) + 0xcdef;
14533 sprintf (buf, "0x%016llx", l);
14534 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14535 ;
14536 return 0;
c906108c 14537}
bec39cab 14538_ACEOF
81ecdfbb 14539if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14540 gdb_cv_printf_has_long_long=yes
14541else
81ecdfbb 14542 gdb_cv_printf_has_long_long=no
97bf5e38 14543fi
81ecdfbb
RW
14544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14545 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14546fi
81ecdfbb 14547
97bf5e38 14548fi
81ecdfbb
RW
14549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14550$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14551if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14552
81ecdfbb 14553$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14554
14555fi
97bf5e38 14556
1a619819
LM
14557# Check if the compiler and runtime support printing decfloats.
14558
81ecdfbb
RW
14559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14560$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 14561if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 14562 $as_echo_n "(cached) " >&6
1a619819 14563else
81ecdfbb 14564 if test "$cross_compiling" = yes; then :
1a619819
LM
14565 gdb_cv_printf_has_decfloat=no
14566else
81ecdfbb 14567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14568/* end confdefs.h. */
14569$ac_includes_default
14570int
14571main ()
14572{
14573char buf[64];
14574 _Decimal32 d32 = 1.2345df;
14575 _Decimal64 d64 = 1.2345dd;
14576 _Decimal128 d128 = 1.2345dl;
14577 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14578 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14579 ;
14580 return 0;
14581}
14582_ACEOF
81ecdfbb 14583if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14584 gdb_cv_printf_has_decfloat=yes
14585else
81ecdfbb 14586 gdb_cv_printf_has_decfloat=no
1a619819 14587fi
81ecdfbb
RW
14588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14589 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14590fi
81ecdfbb 14591
1a619819 14592fi
81ecdfbb
RW
14593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14594$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14595if test $gdb_cv_printf_has_decfloat = yes; then
14596
81ecdfbb 14597$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14598
14599fi
14600
bc8bcb4b
MK
14601# Check if the compiler supports the `long double' type. We can't use
14602# AC_C_LONG_DOUBLE because that one does additional checks on the
14603# constants defined in <float.h> that fail on some systems,
14604# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14605
81ecdfbb
RW
14606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14607$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 14608if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 14609 $as_echo_n "(cached) " >&6
97bf5e38 14610else
81ecdfbb 14611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14612/* end confdefs.h. */
97bf5e38 14613long double foo;
bec39cab 14614_ACEOF
81ecdfbb 14615if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14616 gdb_cv_c_long_double=yes
97bf5e38 14617else
81ecdfbb 14618 gdb_cv_c_long_double=no
97bf5e38 14619fi
81ecdfbb 14620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14621fi
81ecdfbb
RW
14622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14623$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14624if test $gdb_cv_c_long_double = yes; then
c906108c 14625
81ecdfbb 14626$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14627
14628fi
14629
bc8bcb4b 14630# Check if the compiler and runtime support printing long doubles.
97bf5e38 14631
81ecdfbb
RW
14632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14633$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 14634if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 14635 $as_echo_n "(cached) " >&6
97bf5e38 14636else
81ecdfbb 14637 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14638 gdb_cv_printf_has_long_double=no
14639else
81ecdfbb 14640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14641/* end confdefs.h. */
bc8bcb4b
MK
14642$ac_includes_default
14643int
14644main ()
14645{
14646char buf[16];
97bf5e38
MK
14647 long double f = 3.141592653;
14648 sprintf (buf, "%Lg", f);
14649 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14650 ;
14651 return 0;
97bf5e38 14652}
bec39cab 14653_ACEOF
81ecdfbb 14654if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14655 gdb_cv_printf_has_long_double=yes
c906108c 14656else
81ecdfbb 14657 gdb_cv_printf_has_long_double=no
c906108c 14658fi
81ecdfbb
RW
14659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14660 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14661fi
81ecdfbb 14662
c906108c 14663fi
81ecdfbb
RW
14664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14665$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14666if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14667
81ecdfbb 14668$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14669
14670fi
97bf5e38 14671
bc8bcb4b 14672# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14673
81ecdfbb
RW
14674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14675$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 14676if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 14677 $as_echo_n "(cached) " >&6
97bf5e38 14678else
81ecdfbb 14679 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14680 gdb_cv_scanf_has_long_double=no
14681else
81ecdfbb 14682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14683/* end confdefs.h. */
bc8bcb4b
MK
14684#include <stdio.h>
14685int
14686main ()
14687{
14688char *buf = "3.141592653";
97bf5e38
MK
14689 long double f = 0;
14690 sscanf (buf, "%Lg", &f);
14691 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14692 ;
14693 return 0;
97bf5e38 14694}
bec39cab 14695_ACEOF
81ecdfbb 14696if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14697 gdb_cv_scanf_has_long_double=yes
14698else
81ecdfbb 14699 gdb_cv_scanf_has_long_double=no
97bf5e38 14700fi
81ecdfbb
RW
14701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14702 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14703fi
81ecdfbb 14704
c906108c 14705fi
81ecdfbb
RW
14706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14707$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14708if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14709
81ecdfbb 14710$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14711
14712fi
c906108c 14713
438013df
AO
14714case ${host_os} in
14715aix*)
81ecdfbb
RW
14716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14717$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 14718if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 14719 $as_echo_n "(cached) " >&6
438013df 14720else
bec39cab 14721
438013df
AO
14722 SAVE_LDFLAGS=$LDFLAGS
14723
14724 case $GCC in
14725 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14726 *) gdb_cv_bigtoc=-bbigtoc ;;
14727 esac
14728
14729 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14731/* end confdefs.h. */
438013df 14732
bec39cab
AC
14733int
14734main ()
14735{
438013df 14736int i;
bec39cab
AC
14737 ;
14738 return 0;
14739}
14740_ACEOF
81ecdfbb 14741if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14742
81ecdfbb
RW
14743else
14744 gdb_cv_bigtoc=
438013df 14745fi
81ecdfbb
RW
14746rm -f core conftest.err conftest.$ac_objext \
14747 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14748 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14749
bec39cab 14750fi
81ecdfbb
RW
14751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14752$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14753 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14754 ;;
14755esac
14756
38f6b338 14757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14758$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14759dynamic_list=false
14760if test "${gdb_native}" = yes; then
14761 # The dynamically loaded libthread_db needs access to symbols in the gdb
14762 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14763 # may not be supported there.
14764 old_LDFLAGS="$LDFLAGS"
14765 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14766 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14767 LDFLAGS="$LDFLAGS $RDYNAMIC"
14768 if test "${have_libpython}" = no; then
14769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14770/* end confdefs.h. */
14771
14772int
14773main ()
14774{
14775
14776 ;
14777 return 0;
14778}
14779_ACEOF
14780if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14781 dynamic_list=true
14782fi
14783rm -f core conftest.err conftest.$ac_objext \
14784 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14785 else
14786 # Workaround http://bugs.python.org/issue4434 where static
14787 # libpythonX.Y.a would get its symbols required for
14788 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14789 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
14790
14791 # Note the workaround for Python
14792 # http://bugs.python.org/issue10112 earlier has removed
14793 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
14794 # here too, as otherwise it'd make this -Wl,--dynamic-list test
14795 # always pass.
38f6b338
JK
14796 old_CFLAGS="$CFLAGS"
14797 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
14798 old_LIBS="$LIBS"
14799 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
14800 old_CPPFLAGS="$CPPFLAGS"
14801 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 14802 if test "$cross_compiling" = yes; then :
3bebe2f2 14803 true
f6528abd 14804else
3bebe2f2
JK
14805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14806/* end confdefs.h. */
1b4f615e 14807#include "Python.h"
3bebe2f2
JK
14808int
14809main ()
14810{
14811int err;
38f6b338
JK
14812 Py_Initialize ();
14813 err = PyRun_SimpleString ("import itertools\n");
14814 Py_Finalize ();
14815 return err == 0 ? 0 : 1;
3bebe2f2
JK
14816 ;
14817 return 0;
14818}
14819_ACEOF
14820if ac_fn_c_try_run "$LINENO"; then :
14821 dynamic_list=true
14822fi
14823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14824 conftest.$ac_objext conftest.beam conftest.$ac_ext
14825fi
14826
8c1fb155 14827 LIBS="$old_LIBS"
38f6b338 14828 CFLAGS="$old_CFLAGS"
1b4f615e 14829 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
14830 fi
14831 LDFLAGS="$old_LDFLAGS"
14832fi
14833if $dynamic_list; then
14834 found="-Wl,--dynamic-list"
14835 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14836else
38f6b338
JK
14837 found="-rdynamic"
14838 RDYNAMIC="-rdynamic"
f6528abd 14839fi
f6528abd 14840
38f6b338 14841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14842$as_echo "$found" >&6; }
0407b3f1 14843
f6528abd 14844
0407b3f1 14845if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14846 case ${host_os} in
d92419e5 14847 aix*)
81ecdfbb
RW
14848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14849$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 14850 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 14851 $as_echo_n "(cached) " >&6
bec39cab 14852else
81ecdfbb 14853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14854/* end confdefs.h. */
d92419e5 14855#include <sys/pthdebug.h>
bec39cab
AC
14856int
14857main ()
14858{
d92419e5
JB
14859#ifndef PTHDB_VERSION_3
14860 #error
14861 #endif
bec39cab
AC
14862 ;
14863 return 0;
14864}
14865_ACEOF
81ecdfbb 14866if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14867 gdb_cv_have_aix_thread_debug=yes
14868else
81ecdfbb 14869 gdb_cv_have_aix_thread_debug=no
d92419e5 14870fi
81ecdfbb 14871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14872fi
14873
81ecdfbb
RW
14874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14875$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14876 if test $gdb_cv_have_aix_thread_debug = yes; then
14877 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14878 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 14879 LIBS="$LIBS -lpthdebug"
d645e32e
JB
14880
14881 # Older versions of AIX do not provide the declaration for
14882 # the getthrds function (it appears that it was introduced
14883 # with AIX 6.x).
14884 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14885"
d0ac1c44 14886if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
14887 ac_have_decl=1
14888else
14889 ac_have_decl=0
14890fi
14891
14892cat >>confdefs.h <<_ACEOF
14893#define HAVE_DECL_GETTHRDS $ac_have_decl
14894_ACEOF
14895
d92419e5
JB
14896 fi
14897 ;;
c906108c 14898 esac
bec39cab 14899
c906108c
SS
14900fi
14901
3f47be5c 14902if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14904$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 14905if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 14906 $as_echo_n "(cached) " >&6
bec39cab 14907else
81ecdfbb 14908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14909/* end confdefs.h. */
3f47be5c 14910#include <thread_db.h>
bec39cab
AC
14911int
14912main ()
14913{
3f47be5c 14914int i = TD_NOTALLOC;
bec39cab
AC
14915 ;
14916 return 0;
14917}
14918_ACEOF
81ecdfbb 14919if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14920 gdb_cv_thread_db_h_has_td_notalloc=yes
14921else
81ecdfbb 14922 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14923
3f47be5c 14924fi
81ecdfbb 14925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14926
bec39cab 14927fi
81ecdfbb
RW
14928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14929$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14931$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 14932if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 14933 $as_echo_n "(cached) " >&6
59f80f10 14934else
81ecdfbb 14935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14936/* end confdefs.h. */
14937#include <thread_db.h>
14938int
14939main ()
14940{
14941int i = TD_VERSION;
14942 ;
14943 return 0;
14944}
14945_ACEOF
81ecdfbb 14946if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14947 gdb_cv_thread_db_h_has_td_version=yes
14948else
81ecdfbb 14949 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14950
14951fi
81ecdfbb 14952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14953
14954fi
81ecdfbb
RW
14955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14956$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14958$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 14959if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 14960 $as_echo_n "(cached) " >&6
59f80f10 14961else
81ecdfbb 14962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14963/* end confdefs.h. */
14964#include <thread_db.h>
14965int
14966main ()
14967{
14968int i = TD_NOTLS;
14969 ;
14970 return 0;
14971}
14972_ACEOF
81ecdfbb 14973if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14974 gdb_cv_thread_db_h_has_td_notls=yes
14975else
81ecdfbb 14976 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14977
14978fi
81ecdfbb 14979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14980
14981fi
81ecdfbb
RW
14982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14983$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14984fi
14985if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14986
81ecdfbb 14987$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14988
59f80f10
DJ
14989fi
14990if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14991
81ecdfbb 14992$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14993
14994fi
14995if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14996
81ecdfbb 14997$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14998
3f47be5c
EZ
14999fi
15000
81ecdfbb
RW
15001ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15002"
d0ac1c44 15003if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15004 ac_have_decl=1
10568435 15005else
81ecdfbb 15006 ac_have_decl=0
10568435 15007fi
10568435
JK
15008
15009cat >>confdefs.h <<_ACEOF
81ecdfbb 15010#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15011_ACEOF
15012
15013
81ecdfbb
RW
15014if test "$cross_compiling" = yes; then :
15015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15016/* end confdefs.h. */
15017#include <sys/personality.h>
15018int
15019main ()
15020{
15021
15022# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15023# define ADDR_NO_RANDOMIZE 0x0040000
15024# endif
15025 /* Test the flag could be set and stays set. */
15026 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15027 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15028 return 1
15029 ;
15030 return 0;
15031}
15032_ACEOF
81ecdfbb 15033if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15034 have_personality=true
15035else
81ecdfbb 15036 have_personality=false
10568435 15037fi
81ecdfbb
RW
15038rm -f core conftest.err conftest.$ac_objext \
15039 conftest$ac_exeext conftest.$ac_ext
10568435 15040else
81ecdfbb 15041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15042/* end confdefs.h. */
15043#include <sys/personality.h>
15044int
15045main ()
15046{
15047
15048# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15049# define ADDR_NO_RANDOMIZE 0x0040000
15050# endif
15051 /* Test the flag could be set and stays set. */
15052 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15053 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15054 return 1
15055 ;
15056 return 0;
15057}
15058_ACEOF
81ecdfbb 15059if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15060 have_personality=true
15061else
81ecdfbb 15062 have_personality=false
10568435 15063fi
81ecdfbb
RW
15064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15065 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15066fi
81ecdfbb 15067
10568435
JK
15068if $have_personality
15069then
15070
81ecdfbb 15071$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15072
15073fi
15074
e655c1a2
PA
15075case $host_os in
15076 go32* | *djgpp*)
15077 gdbinit=gdb.ini
15078 ;;
15079 *)
15080 gdbinit=.gdbinit
15081 ;;
15082esac
15083
15084cat >>confdefs.h <<_ACEOF
15085#define GDBINIT "$gdbinit"
15086_ACEOF
15087
15088
fb40c209 15089
f83d8a90
DE
15090# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15091# except that the argument to --with-sysroot is optional.
15092# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15093if test "x$with_sysroot" = xyes; then
15094 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15095fi
bec39cab 15096
81ecdfbb
RW
15097# Check whether --with-sysroot was given.
15098if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15099 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15100else
15101 TARGET_SYSTEM_ROOT=
15102fi
030292b7 15103
030292b7 15104
f83d8a90
DE
15105 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15106 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15107 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15108 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15109
f83d8a90
DE
15110cat >>confdefs.h <<_ACEOF
15111#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15112_ACEOF
bec39cab 15113
030292b7 15114
b14b1491 15115
f83d8a90
DE
15116
15117 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15118 if test "x$prefix" = xNONE; then
15119 test_prefix=/usr/local
15120 else
15121 test_prefix=$prefix
15122 fi
15123 else
15124 test_prefix=$exec_prefix
15125 fi
15126 value=0
15127 case ${ac_define_dir} in
15128 "${test_prefix}"|"${test_prefix}/"*|\
15129 '${exec_prefix}'|'${exec_prefix}/'*)
15130 value=1
15131 ;;
15132 esac
15133
15134cat >>confdefs.h <<_ACEOF
15135#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15136_ACEOF
030292b7
DJ
15137
15138
15139
16e7150e 15140
16e7150e 15141
81ecdfbb
RW
15142# Check whether --with-system-gdbinit was given.
15143if test "${with_system_gdbinit+set}" = set; then :
15144 withval=$with_system_gdbinit;
b14b1491
TT
15145 SYSTEM_GDBINIT=$withval
15146else
15147 SYSTEM_GDBINIT=
81ecdfbb
RW
15148fi
15149
16e7150e
JG
15150
15151 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15152 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15153 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15154 ac_define_dir=`eval echo $ac_define_dir`
15155
15156cat >>confdefs.h <<_ACEOF
15157#define SYSTEM_GDBINIT "$ac_define_dir"
15158_ACEOF
15159
15160
15161
0c4a4063 15162
b14b1491
TT
15163 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15164 if test "x$prefix" = xNONE; then
15165 test_prefix=/usr/local
15166 else
15167 test_prefix=$prefix
15168 fi
15169 else
15170 test_prefix=$exec_prefix
15171 fi
15172 value=0
15173 case ${ac_define_dir} in
15174 "${test_prefix}"|"${test_prefix}/"*|\
15175 '${exec_prefix}'|'${exec_prefix}/'*)
15176 value=1
15177 ;;
15178 esac
16e7150e 15179
b14b1491
TT
15180cat >>confdefs.h <<_ACEOF
15181#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15182_ACEOF
15183
b14b1491 15184
16e7150e 15185
0c4a4063 15186
b835bb52 15187
ed2a2229
CB
15188# Check whether --with-system-gdbinit-dir was given.
15189if test "${with_system_gdbinit_dir+set}" = set; then :
15190 withval=$with_system_gdbinit_dir;
15191 SYSTEM_GDBINIT_DIR=$withval
15192else
15193 SYSTEM_GDBINIT_DIR=
15194fi
15195
15196
15197 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15198 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15199 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
15200 ac_define_dir=`eval echo $ac_define_dir`
15201
15202cat >>confdefs.h <<_ACEOF
15203#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
15204_ACEOF
15205
15206
15207
15208
15209 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15210 if test "x$prefix" = xNONE; then
15211 test_prefix=/usr/local
15212 else
15213 test_prefix=$prefix
15214 fi
15215 else
15216 test_prefix=$exec_prefix
15217 fi
15218 value=0
15219 case ${ac_define_dir} in
15220 "${test_prefix}"|"${test_prefix}/"*|\
15221 '${exec_prefix}'|'${exec_prefix}/'*)
15222 value=1
15223 ;;
15224 esac
15225
15226cat >>confdefs.h <<_ACEOF
15227#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
15228_ACEOF
15229
15230
15231
15232
15233
81ecdfbb
RW
15234# Check whether --enable-werror was given.
15235if test "${enable_werror+set}" = set; then :
15236 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15237 yes | y) ERROR_ON_WARNING="yes" ;;
15238 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 15239 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15240 esac
81ecdfbb
RW
15241fi
15242
094a342e 15243
9a084706
PA
15244# Enable -Werror by default when using gcc. Turn it off for releases.
15245if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15246 ERROR_ON_WARNING=yes
15247fi
15248
15249WERROR_CFLAGS=""
15250if test "${ERROR_ON_WARNING}" = yes ; then
15251 WERROR_CFLAGS="-Werror"
15252fi
15253
cf6de44d 15254# The options we'll try to enable.
aac331e4 15255build_warnings="-Wall -Wpointer-arith \
a0de763e 15256-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 15257-Wno-switch -Wno-char-subscripts \
cf6de44d 15258-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 15259-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 15260-Wno-mismatched-tags \
632e107b 15261-Wno-error=deprecated-register \
85e26832 15262-Wsuggest-override \
1a34f210 15263-Wimplicit-fallthrough=3 \
96643e35 15264-Wduplicated-cond \
33a6bc35
TT
15265-Wshadow=local \
15266-Wdeprecated-copy \
15267-Wdeprecated-copy-dtor \
15268-Wredundant-move"
3bc3d82a 15269
3526781e 15270case "${host}" in
4fa7574e
RO
15271 *-*-mingw32*)
15272 # Enable -Wno-format by default when using gcc on mingw since many
15273 # GCC versions complain about %I64.
15274 build_warnings="$build_warnings -Wno-format" ;;
15275 *-*-solaris*)
15276 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15277 # doesn't understand.
15278 build_warnings="$build_warnings -Wno-unknown-pragmas"
15279 # Solaris 11 <unistd.h> marks vfork deprecated.
15280 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
15281 *)
15282 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
15283 # but there's a special case for this below.
15284 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15285esac
15286
81ecdfbb
RW
15287# Check whether --enable-build-warnings was given.
15288if test "${enable_build_warnings+set}" = set; then :
15289 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15290 yes) ;;
15291 no) build_warnings="-w";;
15292 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15293 build_warnings="${build_warnings} ${t}";;
15294 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15295 build_warnings="${t} ${build_warnings}";;
15296 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15297esac
d4f3574e 15298if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15299 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15300fi
81ecdfbb
RW
15301fi
15302# Check whether --enable-gdb-build-warnings was given.
15303if test "${enable_gdb_build_warnings+set}" = set; then :
15304 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15305 yes) ;;
15306 no) build_warnings="-w";;
15307 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15308 build_warnings="${build_warnings} ${t}";;
15309 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15310 build_warnings="${t} ${build_warnings}";;
15311 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15312esac
15313if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15314 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15315fi
81ecdfbb 15316fi
3bc3d82a
PA
15317
15318# The set of warnings supported by a C++ compiler is not the same as
15319# of the C compiler.
cf6de44d 15320ac_ext=cpp
3bc3d82a
PA
15321ac_cpp='$CXXCPP $CPPFLAGS'
15322ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15323ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15324ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15325
3bc3d82a 15326
81ecdfbb 15327WARN_CFLAGS=""
c906108c
SS
15328if test "x${build_warnings}" != x -a "x$GCC" = xyes
15329then
81ecdfbb
RW
15330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15331$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15332 # Separate out the -Werror flag as some files just cannot be
15333 # compiled with it enabled.
15334 for w in ${build_warnings}; do
7544db95
PA
15335 # GCC does not complain about -Wno-unknown-warning. Invert
15336 # and test -Wunknown-warning instead.
15337 case $w in
15338 -Wno-*)
15339 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
15340 -Wformat-nonliteral)
15341 # gcc requires -Wformat before -Wformat-nonliteral
15342 # will work, so stick them together.
15343 w="-Wformat $w"
15344 wtest="$w"
15345 ;;
7544db95
PA
15346 *)
15347 wtest=$w ;;
15348 esac
15349
746a987d
AC
15350 case $w in
15351 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15352 *)
15353 # Check whether GCC accepts it.
4536bbc6 15354 saved_CFLAGS="$CFLAGS"
3e019bdc 15355 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15356 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15357 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
15358 if test "x$w" = "x-Wunused-variable"; then
15359 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
15360 # fixed in GCC 4.9. This test is derived from the gdb
15361 # source code that triggered this bug in GCC.
15362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15363/* end confdefs.h. */
15364struct scoped_restore_base {};
15365 struct scoped_restore_tmpl : public scoped_restore_base {
15366 ~scoped_restore_tmpl() {}
15367 };
15368int
15369main ()
15370{
15371const scoped_restore_base &b = scoped_restore_tmpl();
15372 ;
15373 return 0;
15374}
15375_ACEOF
15376if ac_fn_cxx_try_compile "$LINENO"; then :
15377 WARN_CFLAGS="${WARN_CFLAGS} $w"
15378fi
15379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15380 else
15381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15382/* end confdefs.h. */
4536bbc6 15383
bec39cab
AC
15384int
15385main ()
15386{
4536bbc6 15387
bec39cab
AC
15388 ;
15389 return 0;
15390}
15391_ACEOF
3bc3d82a 15392if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15393 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15394fi
81ecdfbb 15395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 15396 fi
4536bbc6 15397 CFLAGS="$saved_CFLAGS"
3bc3d82a 15398 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15399 esac
15400 done
81ecdfbb
RW
15401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15402$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15403fi
15404
15405
104c1213 15406
cf6de44d 15407ac_ext=c
3bc3d82a
PA
15408ac_cpp='$CPP $CPPFLAGS'
15409ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15410ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15411ac_compiler_gnu=$ac_cv_c_compiler_gnu
15412
3bc3d82a 15413
b835bb52 15414
f35d5ade
TT
15415# Check whether --enable-ubsan was given.
15416if test "${enable_ubsan+set}" = set; then :
15417 enableval=$enable_ubsan;
15418else
eff98030 15419 enable_ubsan=no
f35d5ade
TT
15420fi
15421
15422if test "x$enable_ubsan" = xauto; then
15423 if $development; then
15424 enable_ubsan=yes
15425 fi
15426fi
15427ac_ext=cpp
15428ac_cpp='$CXXCPP $CPPFLAGS'
15429ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15430ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15431ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15432
15433if test "x$enable_ubsan" = xyes; then
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
15435$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
15436 saved_CXXFLAGS="$CXXFLAGS"
15437 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15439/* end confdefs.h. */
15440
15441int
15442main ()
15443{
15444
15445 ;
15446 return 0;
15447}
15448_ACEOF
15449if ac_fn_cxx_try_link "$LINENO"; then :
15450 enable_ubsan=yes
15451else
15452 enable_ubsan=no
15453fi
15454rm -f core conftest.err conftest.$ac_objext \
15455 conftest$ac_exeext conftest.$ac_ext
15456 CXXFLAGS="$saved_CXXFLAGS"
15457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
15458$as_echo "$enable_ubsan" >&6; }
15459 if test "x$enable_ubsan" = xyes; then
15460 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15461 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
15462 fi
15463fi
15464ac_ext=c
15465ac_cpp='$CPP $CPPFLAGS'
15466ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15467ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15468ac_compiler_gnu=$ac_cv_c_compiler_gnu
15469
15470
15471
7a292a7a 15472# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15474$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 15475if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 15476 $as_echo_n "(cached) " >&6
bec39cab 15477else
81ecdfbb 15478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15479/* end confdefs.h. */
7a292a7a
SS
15480
15481#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15482lose
15483#endif
bec39cab 15484_ACEOF
7a292a7a 15485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15486 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15487 gdb_cv_os_cygwin=yes
15488else
7a292a7a
SS
15489 gdb_cv_os_cygwin=no
15490fi
15491rm -f conftest*
15492
15493fi
81ecdfbb
RW
15494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15495$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15496
aff38e61 15497
3eb25fda 15498SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15499case ${host} in
95cbc983
AC
15500 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15501 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15502 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 15503 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
15504esac
15505
15506
cd0fc7c3
SS
15507# libreadline needs libuser32.a in a cygwin environment
15508WIN32LIBS=
15509if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15510 WIN32LIBS="-luser32"
15511 case "${target}" in
15512 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15513 ;;
15514 esac
cd0fc7c3 15515fi
c906108c 15516
b4505029
MM
15517# The ser-tcp.c module requires sockets.
15518case ${host} in
15519 *mingw32*)
15520
81ecdfbb 15521$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15522
15523 WIN32LIBS="$WIN32LIBS -lws2_32"
15524 ;;
15525esac
15526
7a292a7a 15527
31d99776 15528# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15529
15530 OLD_CFLAGS=$CFLAGS
15531 OLD_LDFLAGS=$LDFLAGS
15532 OLD_LIBS=$LIBS
15533 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15534 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15535 # always want our bfd.
15536 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15537 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15538 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15539 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15540 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 15542$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 15543if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 15544 $as_echo_n "(cached) " >&6
31d99776 15545else
81ecdfbb 15546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15547/* end confdefs.h. */
15548#include <stdlib.h>
def63ff0
TT
15549 #include "bfd.h"
15550 #include "elf-bfd.h"
31d99776
DJ
15551
15552int
15553main ()
15554{
def63ff0 15555return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15556 ;
15557 return 0;
15558}
15559_ACEOF
81ecdfbb 15560if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15561 gdb_cv_var_elf=yes
15562else
81ecdfbb 15563 gdb_cv_var_elf=no
31d99776 15564fi
81ecdfbb
RW
15565rm -f core conftest.err conftest.$ac_objext \
15566 conftest$ac_exeext conftest.$ac_ext
31d99776 15567fi
81ecdfbb
RW
15568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15569$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15570 CFLAGS=$OLD_CFLAGS
15571 LDFLAGS=$OLD_LDFLAGS
15572 LIBS=$OLD_LIBS
31d99776 15573if test $gdb_cv_var_elf = yes; then
d4777acb 15574 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15575
81ecdfbb 15576$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15577
075ff26d
JK
15578 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15579 if test "$plugins" = "yes"; then
a48b32c0
L
15580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15581$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 15582if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15583 $as_echo_n "(cached) " >&6
15584else
15585 ac_func_search_save_LIBS=$LIBS
15586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15587/* end confdefs.h. */
15588
15589/* Override any GCC internal prototype to avoid an error.
15590 Use char because int might match the return type of a GCC
15591 builtin and then its argument prototype would still apply. */
15592#ifdef __cplusplus
15593extern "C"
15594#endif
15595char dlopen ();
15596int
15597main ()
15598{
15599return dlopen ();
15600 ;
15601 return 0;
15602}
15603_ACEOF
15604for ac_lib in '' dl; do
15605 if test -z "$ac_lib"; then
15606 ac_res="none required"
15607 else
15608 ac_res=-l$ac_lib
15609 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15610 fi
15611 if ac_fn_c_try_link "$LINENO"; then :
15612 ac_cv_search_dlopen=$ac_res
15613fi
15614rm -f core conftest.err conftest.$ac_objext \
15615 conftest$ac_exeext
d0ac1c44 15616 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15617 break
15618fi
15619done
d0ac1c44 15620if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15621
15622else
15623 ac_cv_search_dlopen=no
15624fi
15625rm conftest.$ac_ext
15626LIBS=$ac_func_search_save_LIBS
15627fi
15628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15629$as_echo "$ac_cv_search_dlopen" >&6; }
15630ac_res=$ac_cv_search_dlopen
15631if test "$ac_res" != no; then :
15632 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15633
15634fi
15635
075ff26d 15636 fi
31d99776 15637fi
31d99776 15638
4f05add4
TT
15639# Add macho support to GDB, but only if BFD includes it.
15640
15641 OLD_CFLAGS=$CFLAGS
15642 OLD_LDFLAGS=$LDFLAGS
15643 OLD_LIBS=$LIBS
15644 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15645 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15646 # always want our bfd.
15647 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15648 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15649 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15650 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15651 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15653$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 15654if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
15655 $as_echo_n "(cached) " >&6
15656else
15657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15658/* end confdefs.h. */
15659#include <stdlib.h>
15660 #include "bfd.h"
15661 #include "mach-o.h"
15662
15663int
15664main ()
15665{
15666return bfd_mach_o_lookup_command (NULL, 0, NULL);
15667 ;
15668 return 0;
15669}
15670_ACEOF
15671if ac_fn_c_try_link "$LINENO"; then :
15672 gdb_cv_var_macho=yes
15673else
15674 gdb_cv_var_macho=no
15675fi
15676rm -f core conftest.err conftest.$ac_objext \
15677 conftest$ac_exeext conftest.$ac_ext
15678fi
15679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15680$as_echo "$gdb_cv_var_macho" >&6; }
15681 CFLAGS=$OLD_CFLAGS
15682 LDFLAGS=$OLD_LDFLAGS
15683 LIBS=$OLD_LIBS
15684if test $gdb_cv_var_macho = yes; then
15685 CONFIG_OBS="$CONFIG_OBS machoread.o"
15686fi
15687
121ce6e5
DJ
15688# Add any host-specific objects to GDB.
15689CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15690
608e2dbb
TT
15691# If building on ELF, look for lzma support for embedded compressed debug info.
15692if test $gdb_cv_var_elf = yes; then
15693
15694# Check whether --with-lzma was given.
15695if test "${with_lzma+set}" = set; then :
15696 withval=$with_lzma;
15697else
15698 with_lzma=auto
15699fi
15700
15701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15702$as_echo_n "checking whether to use lzma... " >&6; }
15703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15704$as_echo "$with_lzma" >&6; }
15705
15706 if test "${with_lzma}" != no; then
15707
15708
15709
15710
15711
15712
15713
15714
15715 use_additional=yes
15716
15717 acl_save_prefix="$prefix"
15718 prefix="$acl_final_prefix"
15719 acl_save_exec_prefix="$exec_prefix"
15720 exec_prefix="$acl_final_exec_prefix"
15721
15722 eval additional_includedir=\"$includedir\"
15723 eval additional_libdir=\"$libdir\"
15724
15725 exec_prefix="$acl_save_exec_prefix"
15726 prefix="$acl_save_prefix"
15727
15728
15729# Check whether --with-liblzma-prefix was given.
15730if test "${with_liblzma_prefix+set}" = set; then :
15731 withval=$with_liblzma_prefix;
15732 if test "X$withval" = "Xno"; then
15733 use_additional=no
15734 else
15735 if test "X$withval" = "X"; then
15736
15737 acl_save_prefix="$prefix"
15738 prefix="$acl_final_prefix"
15739 acl_save_exec_prefix="$exec_prefix"
15740 exec_prefix="$acl_final_exec_prefix"
15741
15742 eval additional_includedir=\"$includedir\"
15743 eval additional_libdir=\"$libdir\"
15744
15745 exec_prefix="$acl_save_exec_prefix"
15746 prefix="$acl_save_prefix"
15747
15748 else
15749 additional_includedir="$withval/include"
15750 additional_libdir="$withval/lib"
15751 fi
15752 fi
15753
15754fi
15755
15756 LIBLZMA=
15757 LTLIBLZMA=
15758 INCLZMA=
15759 rpathdirs=
15760 ltrpathdirs=
15761 names_already_handled=
15762 names_next_round='lzma '
15763 while test -n "$names_next_round"; do
15764 names_this_round="$names_next_round"
15765 names_next_round=
15766 for name in $names_this_round; do
15767 already_handled=
15768 for n in $names_already_handled; do
15769 if test "$n" = "$name"; then
15770 already_handled=yes
15771 break
15772 fi
15773 done
15774 if test -z "$already_handled"; then
15775 names_already_handled="$names_already_handled $name"
15776 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15777 eval value=\"\$HAVE_LIB$uppername\"
15778 if test -n "$value"; then
15779 if test "$value" = yes; then
15780 eval value=\"\$LIB$uppername\"
15781 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15782 eval value=\"\$LTLIB$uppername\"
15783 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15784 else
15785 :
15786 fi
15787 else
15788 found_dir=
15789 found_la=
15790 found_so=
15791 found_a=
15792 if test $use_additional = yes; then
15793 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15794 found_dir="$additional_libdir"
15795 found_so="$additional_libdir/lib$name.$shlibext"
15796 if test -f "$additional_libdir/lib$name.la"; then
15797 found_la="$additional_libdir/lib$name.la"
15798 fi
15799 else
15800 if test -f "$additional_libdir/lib$name.$libext"; then
15801 found_dir="$additional_libdir"
15802 found_a="$additional_libdir/lib$name.$libext"
15803 if test -f "$additional_libdir/lib$name.la"; then
15804 found_la="$additional_libdir/lib$name.la"
15805 fi
15806 fi
15807 fi
15808 fi
15809 if test "X$found_dir" = "X"; then
15810 for x in $LDFLAGS $LTLIBLZMA; do
15811
15812 acl_save_prefix="$prefix"
15813 prefix="$acl_final_prefix"
15814 acl_save_exec_prefix="$exec_prefix"
15815 exec_prefix="$acl_final_exec_prefix"
15816 eval x=\"$x\"
15817 exec_prefix="$acl_save_exec_prefix"
15818 prefix="$acl_save_prefix"
15819
15820 case "$x" in
15821 -L*)
15822 dir=`echo "X$x" | sed -e 's/^X-L//'`
15823 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15824 found_dir="$dir"
15825 found_so="$dir/lib$name.$shlibext"
15826 if test -f "$dir/lib$name.la"; then
15827 found_la="$dir/lib$name.la"
15828 fi
15829 else
15830 if test -f "$dir/lib$name.$libext"; then
15831 found_dir="$dir"
15832 found_a="$dir/lib$name.$libext"
15833 if test -f "$dir/lib$name.la"; then
15834 found_la="$dir/lib$name.la"
15835 fi
15836 fi
15837 fi
15838 ;;
15839 esac
15840 if test "X$found_dir" != "X"; then
15841 break
15842 fi
15843 done
15844 fi
15845 if test "X$found_dir" != "X"; then
15846 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15847 if test "X$found_so" != "X"; then
15848 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15849 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15850 else
15851 haveit=
15852 for x in $ltrpathdirs; do
15853 if test "X$x" = "X$found_dir"; then
15854 haveit=yes
15855 break
15856 fi
15857 done
15858 if test -z "$haveit"; then
15859 ltrpathdirs="$ltrpathdirs $found_dir"
15860 fi
15861 if test "$hardcode_direct" = yes; then
15862 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15863 else
15864 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15865 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15866 haveit=
15867 for x in $rpathdirs; do
15868 if test "X$x" = "X$found_dir"; then
15869 haveit=yes
15870 break
15871 fi
15872 done
15873 if test -z "$haveit"; then
15874 rpathdirs="$rpathdirs $found_dir"
15875 fi
15876 else
15877 haveit=
15878 for x in $LDFLAGS $LIBLZMA; do
15879
15880 acl_save_prefix="$prefix"
15881 prefix="$acl_final_prefix"
15882 acl_save_exec_prefix="$exec_prefix"
15883 exec_prefix="$acl_final_exec_prefix"
15884 eval x=\"$x\"
15885 exec_prefix="$acl_save_exec_prefix"
15886 prefix="$acl_save_prefix"
15887
15888 if test "X$x" = "X-L$found_dir"; then
15889 haveit=yes
15890 break
15891 fi
15892 done
15893 if test -z "$haveit"; then
15894 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15895 fi
15896 if test "$hardcode_minus_L" != no; then
15897 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15898 else
15899 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15900 fi
15901 fi
15902 fi
15903 fi
15904 else
15905 if test "X$found_a" != "X"; then
15906 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15907 else
15908 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15909 fi
15910 fi
15911 additional_includedir=
15912 case "$found_dir" in
15913 */lib | */lib/)
15914 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15915 additional_includedir="$basedir/include"
15916 ;;
15917 esac
15918 if test "X$additional_includedir" != "X"; then
15919 if test "X$additional_includedir" != "X/usr/include"; then
15920 haveit=
15921 if test "X$additional_includedir" = "X/usr/local/include"; then
15922 if test -n "$GCC"; then
15923 case $host_os in
15924 linux*) haveit=yes;;
15925 esac
15926 fi
15927 fi
15928 if test -z "$haveit"; then
15929 for x in $CPPFLAGS $INCLZMA; do
15930
15931 acl_save_prefix="$prefix"
15932 prefix="$acl_final_prefix"
15933 acl_save_exec_prefix="$exec_prefix"
15934 exec_prefix="$acl_final_exec_prefix"
15935 eval x=\"$x\"
15936 exec_prefix="$acl_save_exec_prefix"
15937 prefix="$acl_save_prefix"
15938
15939 if test "X$x" = "X-I$additional_includedir"; then
15940 haveit=yes
15941 break
15942 fi
15943 done
15944 if test -z "$haveit"; then
15945 if test -d "$additional_includedir"; then
15946 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15947 fi
15948 fi
15949 fi
15950 fi
15951 fi
15952 if test -n "$found_la"; then
15953 save_libdir="$libdir"
15954 case "$found_la" in
15955 */* | *\\*) . "$found_la" ;;
15956 *) . "./$found_la" ;;
15957 esac
15958 libdir="$save_libdir"
15959 for dep in $dependency_libs; do
15960 case "$dep" in
15961 -L*)
15962 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15963 if test "X$additional_libdir" != "X/usr/lib"; then
15964 haveit=
15965 if test "X$additional_libdir" = "X/usr/local/lib"; then
15966 if test -n "$GCC"; then
15967 case $host_os in
15968 linux*) haveit=yes;;
15969 esac
15970 fi
15971 fi
15972 if test -z "$haveit"; then
15973 haveit=
15974 for x in $LDFLAGS $LIBLZMA; do
15975
15976 acl_save_prefix="$prefix"
15977 prefix="$acl_final_prefix"
15978 acl_save_exec_prefix="$exec_prefix"
15979 exec_prefix="$acl_final_exec_prefix"
15980 eval x=\"$x\"
15981 exec_prefix="$acl_save_exec_prefix"
15982 prefix="$acl_save_prefix"
15983
15984 if test "X$x" = "X-L$additional_libdir"; then
15985 haveit=yes
15986 break
15987 fi
15988 done
15989 if test -z "$haveit"; then
15990 if test -d "$additional_libdir"; then
15991 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
15992 fi
15993 fi
15994 haveit=
15995 for x in $LDFLAGS $LTLIBLZMA; do
15996
15997 acl_save_prefix="$prefix"
15998 prefix="$acl_final_prefix"
15999 acl_save_exec_prefix="$exec_prefix"
16000 exec_prefix="$acl_final_exec_prefix"
16001 eval x=\"$x\"
16002 exec_prefix="$acl_save_exec_prefix"
16003 prefix="$acl_save_prefix"
16004
16005 if test "X$x" = "X-L$additional_libdir"; then
16006 haveit=yes
16007 break
16008 fi
16009 done
16010 if test -z "$haveit"; then
16011 if test -d "$additional_libdir"; then
16012 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16013 fi
16014 fi
16015 fi
16016 fi
16017 ;;
16018 -R*)
16019 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16020 if test "$enable_rpath" != no; then
16021 haveit=
16022 for x in $rpathdirs; do
16023 if test "X$x" = "X$dir"; then
16024 haveit=yes
16025 break
16026 fi
16027 done
16028 if test -z "$haveit"; then
16029 rpathdirs="$rpathdirs $dir"
16030 fi
16031 haveit=
16032 for x in $ltrpathdirs; do
16033 if test "X$x" = "X$dir"; then
16034 haveit=yes
16035 break
16036 fi
16037 done
16038 if test -z "$haveit"; then
16039 ltrpathdirs="$ltrpathdirs $dir"
16040 fi
16041 fi
16042 ;;
16043 -l*)
16044 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16045 ;;
16046 *.la)
16047 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16048 ;;
16049 *)
16050 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16051 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16052 ;;
16053 esac
16054 done
16055 fi
16056 else
16057 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16058 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16059 fi
16060 fi
16061 fi
16062 done
16063 done
16064 if test "X$rpathdirs" != "X"; then
16065 if test -n "$hardcode_libdir_separator"; then
16066 alldirs=
16067 for found_dir in $rpathdirs; do
16068 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16069 done
16070 acl_save_libdir="$libdir"
16071 libdir="$alldirs"
16072 eval flag=\"$hardcode_libdir_flag_spec\"
16073 libdir="$acl_save_libdir"
16074 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16075 else
16076 for found_dir in $rpathdirs; do
16077 acl_save_libdir="$libdir"
16078 libdir="$found_dir"
16079 eval flag=\"$hardcode_libdir_flag_spec\"
16080 libdir="$acl_save_libdir"
16081 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16082 done
16083 fi
16084 fi
16085 if test "X$ltrpathdirs" != "X"; then
16086 for found_dir in $ltrpathdirs; do
16087 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16088 done
16089 fi
16090
16091
16092 ac_save_CPPFLAGS="$CPPFLAGS"
16093
16094 for element in $INCLZMA; do
16095 haveit=
16096 for x in $CPPFLAGS; do
16097
16098 acl_save_prefix="$prefix"
16099 prefix="$acl_final_prefix"
16100 acl_save_exec_prefix="$exec_prefix"
16101 exec_prefix="$acl_final_exec_prefix"
16102 eval x=\"$x\"
16103 exec_prefix="$acl_save_exec_prefix"
16104 prefix="$acl_save_prefix"
16105
16106 if test "X$x" = "X$element"; then
16107 haveit=yes
16108 break
16109 fi
16110 done
16111 if test -z "$haveit"; then
16112 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16113 fi
16114 done
16115
16116
16117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16118$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16119if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16120 $as_echo_n "(cached) " >&6
16121else
16122
16123 ac_save_LIBS="$LIBS"
16124 LIBS="$LIBS $LIBLZMA"
16125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16126/* end confdefs.h. */
16127#include "lzma.h"
16128int
16129main ()
16130{
16131lzma_index_iter iter;
16132 lzma_index_iter_init (&iter, 0);
16133 lzma_mf_is_supported (LZMA_MF_HC3);
16134 ;
16135 return 0;
16136}
16137_ACEOF
16138if ac_fn_c_try_link "$LINENO"; then :
16139 ac_cv_liblzma=yes
16140else
16141 ac_cv_liblzma=no
16142fi
16143rm -f core conftest.err conftest.$ac_objext \
16144 conftest$ac_exeext conftest.$ac_ext
16145 LIBS="$ac_save_LIBS"
16146
16147fi
16148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16149$as_echo "$ac_cv_liblzma" >&6; }
16150 if test "$ac_cv_liblzma" = yes; then
16151 HAVE_LIBLZMA=yes
16152
16153$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16154
16155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16156$as_echo_n "checking how to link with liblzma... " >&6; }
16157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16158$as_echo "$LIBLZMA" >&6; }
16159 else
16160 HAVE_LIBLZMA=no
16161 CPPFLAGS="$ac_save_CPPFLAGS"
16162 LIBLZMA=
16163 LTLIBLZMA=
16164 fi
16165
16166
16167
16168
16169
16170
16171 if test "$HAVE_LIBLZMA" != yes; then
16172 if test "$with_lzma" = yes; then
d0ac1c44 16173 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
16174 fi
16175 fi
16176 fi
16177fi
16178
3fc11d3e
JM
16179LIBGUI="../libgui/src/libgui.a"
16180GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16181
16182
7a292a7a 16183
3fc11d3e
JM
16184WIN32LDAPP=
16185
16186
16187
d91670b9 16188case "${host}" in
686a5eed 16189*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16190 configdir="win"
16191 ;;
16192*)
16193 configdir="unix"
16194 ;;
16195esac
3fc11d3e
JM
16196
16197GDBTKLIBS=
16198if test "${enable_gdbtk}" = "yes"; then
16199
d1c3b63a
KS
16200 # Gdbtk must have an absolute path to srcdir in order to run
16201 # properly when not installed.
16202 here=`pwd`
16203 cd ${srcdir}
16204 GDBTK_SRC_DIR=`pwd`
16205 cd $here
16206
bec39cab 16207
5062cc19
KS
16208 #
16209 # Ok, lets find the tcl configuration
16210 # First, look for one uninstalled.
16211 # the alternative search directory is invoked by --with-tcl
16212 #
3fc11d3e 16213
5062cc19
KS
16214 if test x"${no_tcl}" = x ; then
16215 # we reset no_tcl in case something fails here
16216 no_tcl=true
bec39cab 16217
81ecdfbb
RW
16218# Check whether --with-tcl was given.
16219if test "${with_tcl+set}" = set; then :
16220 withval=$with_tcl; with_tclconfig=${withval}
16221fi
16222
16223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16224$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 16225 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 16226 $as_echo_n "(cached) " >&6
3fc11d3e 16227else
bec39cab 16228
3fc11d3e 16229
5062cc19
KS
16230 # First check to see if --with-tcl was specified.
16231 case "${host}" in
16232 *-*-cygwin*) platDir="win" ;;
16233 *) platDir="unix" ;;
16234 esac
16235 if test x"${with_tclconfig}" != x ; then
16236 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16237 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16238 else
d0ac1c44 16239 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16240 fi
16241 fi
16242
16243 # then check for a private Tcl installation
16244 if test x"${ac_cv_c_tclconfig}" = x ; then
16245 for i in \
16246 ../tcl \
16247 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16248 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16249 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16250 ../../tcl \
16251 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16252 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16253 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16254 ../../../tcl \
16255 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16256 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16257 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16258 if test -f "$i/$platDir/tclConfig.sh" ; then
16259 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16260 break
16261 fi
16262 done
16263 fi
16264
16265 # on Darwin, check in Framework installation locations
16266 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16267 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16268 `ls -d /Library/Frameworks 2>/dev/null` \
16269 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16270 `ls -d /System/Library/Frameworks 2>/dev/null` \
16271 ; do
16272 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16273 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16274 break
16275 fi
16276 done
16277 fi
16278
16279 # check in a few common install locations
16280 if test x"${ac_cv_c_tclconfig}" = x ; then
16281 for i in `ls -d ${libdir} 2>/dev/null` \
16282 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16283 `ls -d ${prefix}/lib 2>/dev/null` \
16284 `ls -d /usr/local/lib 2>/dev/null` \
16285 `ls -d /usr/contrib/lib 2>/dev/null` \
16286 `ls -d /usr/lib 2>/dev/null` \
16287 ; do
16288 if test -f "$i/tclConfig.sh" ; then
16289 ac_cv_c_tclconfig=`(cd $i; pwd)`
16290 break
16291 fi
16292 done
16293 fi
3fc11d3e 16294
5062cc19
KS
16295 # check in a few other private locations
16296 if test x"${ac_cv_c_tclconfig}" = x ; then
16297 for i in \
16298 ${srcdir}/../tcl \
16299 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16300 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16301 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16302 if test -f "$i/$platDir/tclConfig.sh" ; then
16303 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16304 break
16305 fi
16306 done
16307 fi
bec39cab 16308
3fc11d3e
JM
16309fi
16310
5062cc19
KS
16311
16312 if test x"${ac_cv_c_tclconfig}" = x ; then
16313 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16314 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16315$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16316 else
16317 no_tcl=
16318 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16320$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16321 fi
16322 fi
3fc11d3e 16323
bec39cab 16324
85541719
DE
16325 # If $no_tk is nonempty, then we can't do Tk, and there is no
16326 # point to doing Tcl.
bec39cab 16327
5062cc19
KS
16328 #
16329 # Ok, lets find the tk configuration
16330 # First, look for one uninstalled.
16331 # the alternative search directory is invoked by --with-tk
16332 #
3fc11d3e 16333
5062cc19
KS
16334 if test x"${no_tk}" = x ; then
16335 # we reset no_tk in case something fails here
16336 no_tk=true
bec39cab 16337
81ecdfbb
RW
16338# Check whether --with-tk was given.
16339if test "${with_tk+set}" = set; then :
16340 withval=$with_tk; with_tkconfig=${withval}
16341fi
16342
16343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16344$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 16345 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 16346 $as_echo_n "(cached) " >&6
bec39cab 16347else
3fc11d3e
JM
16348
16349
5062cc19
KS
16350 # First check to see if --with-tkconfig was specified.
16351 if test x"${with_tkconfig}" != x ; then
16352 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16353 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16354 else
d0ac1c44 16355 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16356 fi
16357 fi
3fc11d3e 16358
5062cc19
KS
16359 # then check for a private Tk library
16360 case "${host}" in
16361 *-*-cygwin*) platDir="win" ;;
16362 *) platDir="unix" ;;
16363 esac
16364 if test x"${ac_cv_c_tkconfig}" = x ; then
16365 for i in \
16366 ../tk \
16367 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16368 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16369 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16370 ../../tk \
16371 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16372 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16373 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16374 ../../../tk \
16375 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16376 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16377 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16378 if test -f "$i/$platDir/tkConfig.sh" ; then
16379 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16380 break
16381 fi
16382 done
16383 fi
16384
16385 # on Darwin, check in Framework installation locations
16386 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16387 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16388 `ls -d /Library/Frameworks 2>/dev/null` \
16389 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16390 `ls -d /System/Library/Frameworks 2>/dev/null` \
16391 ; do
16392 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16393 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16394 break
16395 fi
16396 done
16397 fi
16398
16399 # check in a few common install locations
16400 if test x"${ac_cv_c_tkconfig}" = x ; then
16401 for i in `ls -d ${libdir} 2>/dev/null` \
16402 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16403 `ls -d ${prefix}/lib 2>/dev/null` \
16404 `ls -d /usr/local/lib 2>/dev/null` \
16405 `ls -d /usr/contrib/lib 2>/dev/null` \
16406 `ls -d /usr/lib 2>/dev/null` \
16407 ; do
16408 if test -f "$i/tkConfig.sh" ; then
16409 ac_cv_c_tkconfig=`(cd $i; pwd)`
16410 break
16411 fi
16412 done
16413 fi
16414 # check in a few other private locations
16415 if test x"${ac_cv_c_tkconfig}" = x ; then
16416 for i in \
16417 ${srcdir}/../tk \
16418 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16419 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16420 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16421 if test -f "$i/$platDir/tkConfig.sh" ; then
16422 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16423 break
16424 fi
16425 done
16426 fi
3fc11d3e 16427
3fc11d3e
JM
16428fi
16429
16430
5062cc19
KS
16431 if test x"${ac_cv_c_tkconfig}" = x ; then
16432 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16433 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16434$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16435 else
16436 no_tk=
16437 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16439$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16440 fi
3fc11d3e 16441 fi
dd2504ab 16442
dd2504ab 16443
85541719
DE
16444 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16445
81ecdfbb
RW
16446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16447$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16448
16449 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16451$as_echo "loading" >&6; }
85541719
DE
16452 . ${TCL_BIN_DIR}/tclConfig.sh
16453 else
81ecdfbb
RW
16454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16455$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16456 fi
16457
16458 # eval is required to do the TCL_DBGX substitution
16459 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16460 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16461
16462 # If the TCL_BIN_DIR is the build directory (not the install directory),
16463 # then set the common variable name to the value of the build variables.
16464 # For example, the variable TCL_LIB_SPEC will be set to the value
16465 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16466 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16467 # installed and uninstalled version of Tcl.
16468 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16469 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16470 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16471 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16472 elif test "`uname -s`" = "Darwin"; then
16473 # If Tcl was built as a framework, attempt to use the libraries
16474 # from the framework at the given location so that linking works
a68ffae9 16475 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16476 case ${TCL_DEFS} in
16477 *TCL_FRAMEWORK*)
16478 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16479 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16480 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16481 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16482 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16483 break
16484 fi
16485 done
16486 fi
16487 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16488 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16489 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16490 fi
16491 ;;
16492 esac
16493 fi
16494
16495 # eval is required to do the TCL_DBGX substitution
16496 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16497 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16498 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16499 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515 # Check for in-tree tcl
16516 here=`pwd`
16517 cd ${srcdir}/..
16518 topdir=`pwd`
16519 cd ${here}
16520
16521 intree="no"
16522 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16523 intree="yes"
16524 fi
16525
16526 # Find Tcl private headers
16527 if test x"${intree}" = xno; then
16528
81ecdfbb
RW
16529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16530$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16531 private_dir=""
16532 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16533 if test -f ${dir}/tclInt.h ; then
16534 private_dir=${dir}
16535 fi
16536
16537 if test x"${private_dir}" = x; then
d0ac1c44 16538 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16539 else
16540 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16542$as_echo "${private_dir}" >&6; }
85541719
DE
16543 fi
16544
16545 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16546 TCL_LIBRARY="${TCL_LIB_SPEC}"
16547 TCL_DEPS=""
16548 else
16549 # If building tcl in the same src tree, private headers
16550 # are not needed, but we need to be sure to use the right
16551 # headers library
16552 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16553 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16554 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16555 fi
16556
16557
16558
16559
16560
81ecdfbb
RW
16561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16562$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16563
5062cc19 16564 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16566$as_echo "loading" >&6; }
5062cc19 16567 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16568 else
81ecdfbb
RW
16569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16570$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16571 fi
bec39cab 16572
5062cc19
KS
16573 # eval is required to do the TK_DBGX substitution
16574 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16575 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16576
16577 # If the TK_BIN_DIR is the build directory (not the install directory),
16578 # then set the common variable name to the value of the build variables.
16579 # For example, the variable TK_LIB_SPEC will be set to the value
16580 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16581 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16582 # installed and uninstalled version of Tcl.
85541719 16583 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16584 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16585 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16586 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16587 elif test "`uname -s`" = "Darwin"; then
16588 # If Tk was built as a framework, attempt to use the libraries
16589 # from the framework at the given location so that linking works
a68ffae9 16590 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16591 case ${TK_DEFS} in
16592 *TK_FRAMEWORK*)
85541719 16593 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16594 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16595 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16596 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16597 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16598 break
16599 fi
16600 done
16601 fi
85541719 16602 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16603 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16604 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16605 fi
16606 ;;
16607 esac
3fc11d3e
JM
16608 fi
16609
5062cc19
KS
16610 # eval is required to do the TK_DBGX substitution
16611 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16612 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16613 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16614 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16615
3fc11d3e
JM
16616
16617
bec39cab
AC
16618
16619
16620
16621
16622
16623
16624
3fc11d3e 16625
3fc11d3e 16626
bec39cab 16627
bec39cab 16628
85541719
DE
16629 # Check for in-tree Tk
16630 intree="no"
16631 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16632 intree="yes"
16633 fi
3fc11d3e 16634
85541719
DE
16635 # Find Tk private headers
16636 if test x"${intree}" = xno; then
3fc11d3e 16637
81ecdfbb
RW
16638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16639$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16640 private_dir=""
16641 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16642 if test -f ${dir}/tkInt.h; then
16643 private_dir=${dir}
3fc11d3e 16644 fi
bec39cab 16645
5062cc19 16646 if test x"${private_dir}" = x; then
d0ac1c44 16647 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16648 else
5062cc19 16649 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16651$as_echo "${private_dir}" >&6; }
3fc11d3e 16652 fi
3fc11d3e 16653
85541719
DE
16654 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16655 TK_LIBRARY=${TK_LIB_SPEC}
16656 TK_DEPS=""
16657 else
16658 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16659 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16660 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16661 fi
3fc11d3e
JM
16662
16663
3fc11d3e
JM
16664
16665
3fc11d3e 16666
85541719 16667 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16668
85541719
DE
16669 # Include some libraries that Tcl and Tk want.
16670 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16671 # Yes, the ordering seems wrong here. But it isn't.
16672 # TK_LIBS is the list of libraries that need to be linked
16673 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16674 # were in LIBS then any link tests after this point would
16675 # try to include things like `$(LIBGUI)', which wouldn't work.
16676 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16677
85541719
DE
16678 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16679 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16680 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16681 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16682 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16683 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16684 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16685
85541719
DE
16686 if test x$gdb_cv_os_cygwin = xyes; then
16687 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16688 WIN32LDAPP="-Wl,--subsystem,console"
16689 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16690 fi
ffc6a242 16691
81ecdfbb 16692 subdirs="$subdirs gdbtk"
3ace7edb 16693
85541719 16694 fi
3fc11d3e
JM
16695fi
16696
16697
16698
16699
16700
16701
16702
16703
81ecdfbb
RW
16704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16705$as_echo_n "checking for X... " >&6; }
bec39cab 16706
c906108c 16707
81ecdfbb
RW
16708# Check whether --with-x was given.
16709if test "${with_x+set}" = set; then :
16710 withval=$with_x;
16711fi
c906108c
SS
16712
16713# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16714if test "x$with_x" = xno; then
16715 # The user explicitly disabled X.
16716 have_x=disabled
16717else
81ecdfbb 16718 case $x_includes,$x_libraries in #(
d0ac1c44
SM
16719 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16720 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 16721 $as_echo_n "(cached) " >&6
c906108c
SS
16722else
16723 # One or both of the vars are not set, and there is no cached value.
bec39cab 16724ac_x_includes=no ac_x_libraries=no
81ecdfbb 16725rm -f -r conftest.dir
bec39cab
AC
16726if mkdir conftest.dir; then
16727 cd conftest.dir
bec39cab 16728 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16729incroot:
16730 @echo incroot='${INCROOT}'
16731usrlibdir:
16732 @echo usrlibdir='${USRLIBDIR}'
16733libdir:
16734 @echo libdir='${LIBDIR}'
16735_ACEOF
16736 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 16737 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
16738 for ac_var in incroot usrlibdir libdir; do
16739 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16740 done
c906108c 16741 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16742 for ac_extension in a so sl dylib la dll; do
16743 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16744 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16745 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16746 fi
16747 done
16748 # Screen out bogus values from the imake configuration. They are
16749 # bogus both because they are the default anyway, and because
16750 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16751 case $ac_im_incroot in
81ecdfbb 16752 /usr/include) ac_x_includes= ;;
bec39cab 16753 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16754 esac
bec39cab 16755 case $ac_im_usrlibdir in
81ecdfbb 16756 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16757 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16758 esac
16759 fi
16760 cd ..
81ecdfbb 16761 rm -f -r conftest.dir
c906108c
SS
16762fi
16763
bec39cab
AC
16764# Standard set of common directories for X headers.
16765# Check X11 before X11Rn because it is often a symlink to the current release.
16766ac_x_header_dirs='
16767/usr/X11/include
81ecdfbb 16768/usr/X11R7/include
bec39cab
AC
16769/usr/X11R6/include
16770/usr/X11R5/include
16771/usr/X11R4/include
16772
16773/usr/include/X11
81ecdfbb 16774/usr/include/X11R7
bec39cab
AC
16775/usr/include/X11R6
16776/usr/include/X11R5
16777/usr/include/X11R4
16778
16779/usr/local/X11/include
81ecdfbb 16780/usr/local/X11R7/include
bec39cab
AC
16781/usr/local/X11R6/include
16782/usr/local/X11R5/include
16783/usr/local/X11R4/include
16784
16785/usr/local/include/X11
81ecdfbb 16786/usr/local/include/X11R7
bec39cab
AC
16787/usr/local/include/X11R6
16788/usr/local/include/X11R5
16789/usr/local/include/X11R4
16790
16791/usr/X386/include
16792/usr/x386/include
16793/usr/XFree86/include/X11
16794
16795/usr/include
16796/usr/local/include
16797/usr/unsupported/include
16798/usr/athena/include
16799/usr/local/x11r5/include
16800/usr/lpp/Xamples/include
16801
16802/usr/openwin/include
16803/usr/openwin/share/include'
16804
16805if test "$ac_x_includes" = no; then
81ecdfbb 16806 # Guess where to find include files, by looking for Xlib.h.
c906108c 16807 # First, try using that file with no special directory specified.
81ecdfbb 16808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16809/* end confdefs.h. */
81ecdfbb 16810#include <X11/Xlib.h>
bec39cab 16811_ACEOF
81ecdfbb 16812if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16813 # We can compile using X headers with no special include directory.
16814ac_x_includes=
16815else
bec39cab 16816 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16817 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16818 ac_x_includes=$ac_dir
16819 break
16820 fi
16821done
c906108c 16822fi
d0ac1c44 16823rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 16824fi # $ac_x_includes = no
c906108c 16825
bec39cab 16826if test "$ac_x_libraries" = no; then
c906108c 16827 # Check for the libraries.
c906108c
SS
16828 # See if we find them without any special options.
16829 # Don't add to $LIBS permanently.
bec39cab 16830 ac_save_LIBS=$LIBS
81ecdfbb
RW
16831 LIBS="-lX11 $LIBS"
16832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16833/* end confdefs.h. */
81ecdfbb 16834#include <X11/Xlib.h>
bec39cab
AC
16835int
16836main ()
16837{
81ecdfbb 16838XrmInitialize ()
bec39cab
AC
16839 ;
16840 return 0;
16841}
16842_ACEOF
81ecdfbb 16843if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16844 LIBS=$ac_save_LIBS
c906108c
SS
16845# We can link X programs with no special library path.
16846ac_x_libraries=
16847else
81ecdfbb
RW
16848 LIBS=$ac_save_LIBS
16849for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16850do
bec39cab 16851 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16852 for ac_extension in a so sl dylib la dll; do
16853 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16854 ac_x_libraries=$ac_dir
16855 break 2
16856 fi
16857 done
16858done
16859fi
81ecdfbb
RW
16860rm -f core conftest.err conftest.$ac_objext \
16861 conftest$ac_exeext conftest.$ac_ext
bec39cab 16862fi # $ac_x_libraries = no
c906108c 16863
81ecdfbb
RW
16864case $ac_x_includes,$ac_x_libraries in #(
16865 no,* | *,no | *\'*)
16866 # Didn't find X, or a directory has "'" in its name.
16867 ac_cv_have_x="have_x=no";; #(
16868 *)
16869 # Record where we found X for the cache.
16870 ac_cv_have_x="have_x=yes\
16871 ac_x_includes='$ac_x_includes'\
16872 ac_x_libraries='$ac_x_libraries'"
16873esac
c906108c 16874fi
81ecdfbb
RW
16875;; #(
16876 *) have_x=yes;;
16877 esac
c906108c
SS
16878 eval "$ac_cv_have_x"
16879fi # $with_x != no
16880
16881if test "$have_x" != yes; then
81ecdfbb
RW
16882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16883$as_echo "$have_x" >&6; }
c906108c
SS
16884 no_x=yes
16885else
16886 # If each of the values was on the command line, it overrides each guess.
16887 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16888 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16889 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16890 ac_cv_have_x="have_x=yes\
16891 ac_x_includes='$x_includes'\
16892 ac_x_libraries='$x_libraries'"
16893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16894$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16895fi
16896
16897
bec39cab 16898# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16899# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16900# This code just checks for a few cases where we'd like to ignore those
16901# definitions, even when they're present in the '.mt' file. These cases
16902# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16903# not part of the source tree.
7a292a7a 16904#
81ecdfbb
RW
16905# Check whether --enable-sim was given.
16906if test "${enable_sim+set}" = set; then :
16907 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16908 echo "enableval = ${enableval}";
16909 case "${enableval}" in
16910 yes) ignore_sim=false ;;
16911 no) ignore_sim=true ;;
16912 *) ignore_sim=false ;;
16913 esac
16914else
16915 ignore_sim=false
81ecdfbb
RW
16916fi
16917
7a292a7a
SS
16918
16919if test ! -d "${srcdir}/../sim"; then
16920 ignore_sim=true
16921fi
16922
9b624dbe
UW
16923SIM=
16924SIM_OBS=
16925if test "${ignore_sim}" = "false"; then
16926 if test x"${gdb_sim}" != x ; then
16927 SIM="${gdb_sim}"
16928 SIM_OBS="remote-sim.o"
60ca704f 16929
81ecdfbb 16930$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16931
976102cd
PA
16932
16933 # Some tdep code should only be compiled in when the ppc sim is
16934 # built. PR sim/13418.
16935 case $target in
16936 powerpc*-*-*)
16937
16938$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16939
16940 ;;
16941 esac
9b624dbe 16942 fi
7a292a7a
SS
16943fi
16944
16945
16946
c906108c
SS
16947
16948
16949
16950
16951
16952
dfcd3bfb 16953
e56ac5c3
AC
16954
16955
b3a90332
AC
16956
16957
c35f4ffc 16958# List of host floatformats.
bec39cab
AC
16959
16960cat >>confdefs.h <<_ACEOF
c35f4ffc 16961#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16962_ACEOF
c35f4ffc 16963
bec39cab
AC
16964
16965cat >>confdefs.h <<_ACEOF
c35f4ffc 16966#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16967_ACEOF
16968
c35f4ffc 16969
bec39cab 16970cat >>confdefs.h <<_ACEOF
c35f4ffc 16971#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16972_ACEOF
c35f4ffc
AC
16973
16974
c906108c
SS
16975# target_subdir is used by the testsuite to find the target libraries.
16976target_subdir=
16977if test "${host}" != "${target}"; then
16978 target_subdir="${target_alias}/"
16979fi
16980
16981
21ea5acd 16982# Import nat definitions.
2b351b19 16983nat_makefile_frag=/dev/null
771b4502 16984if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
16985 . ${srcdir}/configure.nat
16986 nativefile=$NAT_FILE
c906108c 16987fi
c906108c 16988
c906108c
SS
16989
16990
16991
21ea5acd
SDJ
16992
16993
16994
16995
16996
c906108c
SS
16997
16998
b00a8037 16999if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17000
17001cat >>confdefs.h <<_ACEOF
b00a8037 17002#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17003_ACEOF
b00a8037
DJ
17004
17005fi
17006
496c0e1b
JB
17007# Check whether --enable-gdbserver was given.
17008if test "${enable_gdbserver+set}" = set; then :
17009 enableval=$enable_gdbserver; case "${enableval}" in
17010 yes| no|auto) ;;
d0ac1c44 17011 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17012esac
17013else
17014 enable_gdbserver=auto
17015fi
17016
17017
17018# We only build gdbserver automatically in a native configuration, and
17019# only if the user did not explicitly disable its build.
17020if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17022$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17023 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17025$as_echo "yes" >&6; }
17026 subdirs="$subdirs gdbserver"
3ace7edb 17027
496c0e1b 17028 gdbserver_build_enabled=yes
8dcde887 17029 else
81ecdfbb
RW
17030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17031$as_echo "no" >&6; }
8dcde887
MK
17032 fi
17033fi
17034
496c0e1b
JB
17035# If the user explicitly request the gdbserver to be built, verify that
17036# we were in fact able to enable it.
17037if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17038 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17039fi
17040
393fd4c3
YQ
17041# Check for babeltrace and babeltrace-ctf
17042
17043# Check whether --with-babeltrace was given.
17044if test "${with_babeltrace+set}" = set; then :
17045 withval=$with_babeltrace;
17046else
17047 with_babeltrace=auto
17048fi
17049
17050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17051$as_echo_n "checking whether to use babeltrace... " >&6; }
17052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17053$as_echo "$with_babeltrace" >&6; }
17054
17055if test "x$with_babeltrace" = "xno"; then
17056 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17057$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17058else
17059 # Append -Werror to CFLAGS so that configure can catch the warning
17060 # "assignment from incompatible pointer type", which is related to
17061 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17062 # in GDB, while babeltrace 1.0.3 is broken.
17063 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17064 # safe to save and restore CFLAGS here.
17065 saved_CFLAGS=$CFLAGS
17066 CFLAGS="$CFLAGS -Werror"
17067
17068
17069
17070
17071
17072
17073
17074
17075 use_additional=yes
17076
17077 acl_save_prefix="$prefix"
17078 prefix="$acl_final_prefix"
17079 acl_save_exec_prefix="$exec_prefix"
17080 exec_prefix="$acl_final_exec_prefix"
17081
17082 eval additional_includedir=\"$includedir\"
17083 eval additional_libdir=\"$libdir\"
17084
17085 exec_prefix="$acl_save_exec_prefix"
17086 prefix="$acl_save_prefix"
17087
17088
17089# Check whether --with-libbabeltrace-prefix was given.
17090if test "${with_libbabeltrace_prefix+set}" = set; then :
17091 withval=$with_libbabeltrace_prefix;
17092 if test "X$withval" = "Xno"; then
17093 use_additional=no
17094 else
17095 if test "X$withval" = "X"; then
17096
17097 acl_save_prefix="$prefix"
17098 prefix="$acl_final_prefix"
17099 acl_save_exec_prefix="$exec_prefix"
17100 exec_prefix="$acl_final_exec_prefix"
17101
17102 eval additional_includedir=\"$includedir\"
17103 eval additional_libdir=\"$libdir\"
17104
17105 exec_prefix="$acl_save_exec_prefix"
17106 prefix="$acl_save_prefix"
17107
17108 else
17109 additional_includedir="$withval/include"
17110 additional_libdir="$withval/lib"
17111 fi
17112 fi
17113
17114fi
17115
17116 LIBBABELTRACE=
17117 LTLIBBABELTRACE=
17118 INCBABELTRACE=
17119 rpathdirs=
17120 ltrpathdirs=
17121 names_already_handled=
17122 names_next_round='babeltrace babeltrace-ctf'
17123 while test -n "$names_next_round"; do
17124 names_this_round="$names_next_round"
17125 names_next_round=
17126 for name in $names_this_round; do
17127 already_handled=
17128 for n in $names_already_handled; do
17129 if test "$n" = "$name"; then
17130 already_handled=yes
17131 break
17132 fi
17133 done
17134 if test -z "$already_handled"; then
17135 names_already_handled="$names_already_handled $name"
17136 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17137 eval value=\"\$HAVE_LIB$uppername\"
17138 if test -n "$value"; then
17139 if test "$value" = yes; then
17140 eval value=\"\$LIB$uppername\"
17141 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17142 eval value=\"\$LTLIB$uppername\"
17143 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17144 else
17145 :
17146 fi
17147 else
17148 found_dir=
17149 found_la=
17150 found_so=
17151 found_a=
17152 if test $use_additional = yes; then
17153 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17154 found_dir="$additional_libdir"
17155 found_so="$additional_libdir/lib$name.$shlibext"
17156 if test -f "$additional_libdir/lib$name.la"; then
17157 found_la="$additional_libdir/lib$name.la"
17158 fi
17159 else
17160 if test -f "$additional_libdir/lib$name.$libext"; then
17161 found_dir="$additional_libdir"
17162 found_a="$additional_libdir/lib$name.$libext"
17163 if test -f "$additional_libdir/lib$name.la"; then
17164 found_la="$additional_libdir/lib$name.la"
17165 fi
17166 fi
17167 fi
17168 fi
17169 if test "X$found_dir" = "X"; then
17170 for x in $LDFLAGS $LTLIBBABELTRACE; do
17171
17172 acl_save_prefix="$prefix"
17173 prefix="$acl_final_prefix"
17174 acl_save_exec_prefix="$exec_prefix"
17175 exec_prefix="$acl_final_exec_prefix"
17176 eval x=\"$x\"
17177 exec_prefix="$acl_save_exec_prefix"
17178 prefix="$acl_save_prefix"
17179
17180 case "$x" in
17181 -L*)
17182 dir=`echo "X$x" | sed -e 's/^X-L//'`
17183 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17184 found_dir="$dir"
17185 found_so="$dir/lib$name.$shlibext"
17186 if test -f "$dir/lib$name.la"; then
17187 found_la="$dir/lib$name.la"
17188 fi
17189 else
17190 if test -f "$dir/lib$name.$libext"; then
17191 found_dir="$dir"
17192 found_a="$dir/lib$name.$libext"
17193 if test -f "$dir/lib$name.la"; then
17194 found_la="$dir/lib$name.la"
17195 fi
17196 fi
17197 fi
17198 ;;
17199 esac
17200 if test "X$found_dir" != "X"; then
17201 break
17202 fi
17203 done
17204 fi
17205 if test "X$found_dir" != "X"; then
17206 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17207 if test "X$found_so" != "X"; then
17208 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17209 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17210 else
17211 haveit=
17212 for x in $ltrpathdirs; do
17213 if test "X$x" = "X$found_dir"; then
17214 haveit=yes
17215 break
17216 fi
17217 done
17218 if test -z "$haveit"; then
17219 ltrpathdirs="$ltrpathdirs $found_dir"
17220 fi
17221 if test "$hardcode_direct" = yes; then
17222 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17223 else
17224 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17225 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17226 haveit=
17227 for x in $rpathdirs; do
17228 if test "X$x" = "X$found_dir"; then
17229 haveit=yes
17230 break
17231 fi
17232 done
17233 if test -z "$haveit"; then
17234 rpathdirs="$rpathdirs $found_dir"
17235 fi
17236 else
17237 haveit=
17238 for x in $LDFLAGS $LIBBABELTRACE; do
17239
17240 acl_save_prefix="$prefix"
17241 prefix="$acl_final_prefix"
17242 acl_save_exec_prefix="$exec_prefix"
17243 exec_prefix="$acl_final_exec_prefix"
17244 eval x=\"$x\"
17245 exec_prefix="$acl_save_exec_prefix"
17246 prefix="$acl_save_prefix"
17247
17248 if test "X$x" = "X-L$found_dir"; then
17249 haveit=yes
17250 break
17251 fi
17252 done
17253 if test -z "$haveit"; then
17254 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17255 fi
17256 if test "$hardcode_minus_L" != no; then
17257 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17258 else
17259 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17260 fi
17261 fi
17262 fi
17263 fi
17264 else
17265 if test "X$found_a" != "X"; then
17266 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17267 else
17268 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17269 fi
17270 fi
17271 additional_includedir=
17272 case "$found_dir" in
17273 */lib | */lib/)
17274 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17275 additional_includedir="$basedir/include"
17276 ;;
17277 esac
17278 if test "X$additional_includedir" != "X"; then
17279 if test "X$additional_includedir" != "X/usr/include"; then
17280 haveit=
17281 if test "X$additional_includedir" = "X/usr/local/include"; then
17282 if test -n "$GCC"; then
17283 case $host_os in
17284 linux*) haveit=yes;;
17285 esac
17286 fi
17287 fi
17288 if test -z "$haveit"; then
17289 for x in $CPPFLAGS $INCBABELTRACE; do
17290
17291 acl_save_prefix="$prefix"
17292 prefix="$acl_final_prefix"
17293 acl_save_exec_prefix="$exec_prefix"
17294 exec_prefix="$acl_final_exec_prefix"
17295 eval x=\"$x\"
17296 exec_prefix="$acl_save_exec_prefix"
17297 prefix="$acl_save_prefix"
17298
17299 if test "X$x" = "X-I$additional_includedir"; then
17300 haveit=yes
17301 break
17302 fi
17303 done
17304 if test -z "$haveit"; then
17305 if test -d "$additional_includedir"; then
17306 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17307 fi
17308 fi
17309 fi
17310 fi
17311 fi
17312 if test -n "$found_la"; then
17313 save_libdir="$libdir"
17314 case "$found_la" in
17315 */* | *\\*) . "$found_la" ;;
17316 *) . "./$found_la" ;;
17317 esac
17318 libdir="$save_libdir"
17319 for dep in $dependency_libs; do
17320 case "$dep" in
17321 -L*)
17322 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17323 if test "X$additional_libdir" != "X/usr/lib"; then
17324 haveit=
17325 if test "X$additional_libdir" = "X/usr/local/lib"; then
17326 if test -n "$GCC"; then
17327 case $host_os in
17328 linux*) haveit=yes;;
17329 esac
17330 fi
17331 fi
17332 if test -z "$haveit"; then
17333 haveit=
17334 for x in $LDFLAGS $LIBBABELTRACE; do
17335
17336 acl_save_prefix="$prefix"
17337 prefix="$acl_final_prefix"
17338 acl_save_exec_prefix="$exec_prefix"
17339 exec_prefix="$acl_final_exec_prefix"
17340 eval x=\"$x\"
17341 exec_prefix="$acl_save_exec_prefix"
17342 prefix="$acl_save_prefix"
17343
17344 if test "X$x" = "X-L$additional_libdir"; then
17345 haveit=yes
17346 break
17347 fi
17348 done
17349 if test -z "$haveit"; then
17350 if test -d "$additional_libdir"; then
17351 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17352 fi
17353 fi
17354 haveit=
17355 for x in $LDFLAGS $LTLIBBABELTRACE; do
17356
17357 acl_save_prefix="$prefix"
17358 prefix="$acl_final_prefix"
17359 acl_save_exec_prefix="$exec_prefix"
17360 exec_prefix="$acl_final_exec_prefix"
17361 eval x=\"$x\"
17362 exec_prefix="$acl_save_exec_prefix"
17363 prefix="$acl_save_prefix"
17364
17365 if test "X$x" = "X-L$additional_libdir"; then
17366 haveit=yes
17367 break
17368 fi
17369 done
17370 if test -z "$haveit"; then
17371 if test -d "$additional_libdir"; then
17372 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17373 fi
17374 fi
17375 fi
17376 fi
17377 ;;
17378 -R*)
17379 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17380 if test "$enable_rpath" != no; then
17381 haveit=
17382 for x in $rpathdirs; do
17383 if test "X$x" = "X$dir"; then
17384 haveit=yes
17385 break
17386 fi
17387 done
17388 if test -z "$haveit"; then
17389 rpathdirs="$rpathdirs $dir"
17390 fi
17391 haveit=
17392 for x in $ltrpathdirs; do
17393 if test "X$x" = "X$dir"; then
17394 haveit=yes
17395 break
17396 fi
17397 done
17398 if test -z "$haveit"; then
17399 ltrpathdirs="$ltrpathdirs $dir"
17400 fi
17401 fi
17402 ;;
17403 -l*)
17404 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17405 ;;
17406 *.la)
17407 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17408 ;;
17409 *)
17410 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17411 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17412 ;;
17413 esac
17414 done
17415 fi
17416 else
17417 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17418 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17419 fi
17420 fi
17421 fi
17422 done
17423 done
17424 if test "X$rpathdirs" != "X"; then
17425 if test -n "$hardcode_libdir_separator"; then
17426 alldirs=
17427 for found_dir in $rpathdirs; do
17428 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17429 done
17430 acl_save_libdir="$libdir"
17431 libdir="$alldirs"
17432 eval flag=\"$hardcode_libdir_flag_spec\"
17433 libdir="$acl_save_libdir"
17434 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17435 else
17436 for found_dir in $rpathdirs; do
17437 acl_save_libdir="$libdir"
17438 libdir="$found_dir"
17439 eval flag=\"$hardcode_libdir_flag_spec\"
17440 libdir="$acl_save_libdir"
17441 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17442 done
17443 fi
17444 fi
17445 if test "X$ltrpathdirs" != "X"; then
17446 for found_dir in $ltrpathdirs; do
17447 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17448 done
17449 fi
17450
17451
17452 ac_save_CPPFLAGS="$CPPFLAGS"
17453
17454 for element in $INCBABELTRACE; do
17455 haveit=
17456 for x in $CPPFLAGS; do
17457
17458 acl_save_prefix="$prefix"
17459 prefix="$acl_final_prefix"
17460 acl_save_exec_prefix="$exec_prefix"
17461 exec_prefix="$acl_final_exec_prefix"
17462 eval x=\"$x\"
17463 exec_prefix="$acl_save_exec_prefix"
17464 prefix="$acl_save_prefix"
17465
17466 if test "X$x" = "X$element"; then
17467 haveit=yes
17468 break
17469 fi
17470 done
17471 if test -z "$haveit"; then
17472 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17473 fi
17474 done
17475
17476
17477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17478$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 17479if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
17480 $as_echo_n "(cached) " >&6
17481else
17482
17483 ac_save_LIBS="$LIBS"
17484 LIBS="$LIBS $LIBBABELTRACE"
17485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17486/* end confdefs.h. */
17487#include <babeltrace/babeltrace.h>
17488 #include <babeltrace/ctf/events.h>
17489 #include <babeltrace/ctf/iterator.h>
17490int
17491main ()
17492{
17493struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17494 struct bt_ctf_event *event = NULL;
17495 const struct bt_definition *scope;
17496
13cdc2af 17497 pos->type = BT_SEEK_BEGIN;
65c749e7 17498 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17499 scope = bt_ctf_get_top_level_scope (event,
17500 BT_STREAM_EVENT_HEADER);
17501 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17502
17503 ;
17504 return 0;
17505}
17506_ACEOF
17507if ac_fn_c_try_link "$LINENO"; then :
17508 ac_cv_libbabeltrace=yes
17509else
17510 ac_cv_libbabeltrace=no
17511fi
17512rm -f core conftest.err conftest.$ac_objext \
17513 conftest$ac_exeext conftest.$ac_ext
17514 LIBS="$ac_save_LIBS"
17515
17516fi
17517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17518$as_echo "$ac_cv_libbabeltrace" >&6; }
17519 if test "$ac_cv_libbabeltrace" = yes; then
17520 HAVE_LIBBABELTRACE=yes
17521
17522$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17523
17524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17525$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17527$as_echo "$LIBBABELTRACE" >&6; }
17528 else
17529 HAVE_LIBBABELTRACE=no
17530 CPPFLAGS="$ac_save_CPPFLAGS"
17531 LIBBABELTRACE=
17532 LTLIBBABELTRACE=
17533 fi
17534
17535
17536
17537
17538
17539
17540 CFLAGS=$saved_CFLAGS
17541
17542 if test "$HAVE_LIBBABELTRACE" != yes; then
17543 if test "$with_babeltrace" = yes; then
d0ac1c44 17544 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
17545 else
17546 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17547$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17548 fi
17549 fi
17550fi
17551
ccb1ba62
CB
17552# Check for xxhash
17553
17554# Check whether --with-xxhash was given.
17555if test "${with_xxhash+set}" = set; then :
17556 withval=$with_xxhash;
17557else
17558 with_xxhash=auto
17559fi
17560
17561
17562if test "x$with_xxhash" != "xno"; then
17563
17564
17565
17566
17567
17568
17569
17570
17571 use_additional=yes
17572
17573 acl_save_prefix="$prefix"
17574 prefix="$acl_final_prefix"
17575 acl_save_exec_prefix="$exec_prefix"
17576 exec_prefix="$acl_final_exec_prefix"
17577
17578 eval additional_includedir=\"$includedir\"
17579 eval additional_libdir=\"$libdir\"
17580
17581 exec_prefix="$acl_save_exec_prefix"
17582 prefix="$acl_save_prefix"
17583
17584
17585# Check whether --with-libxxhash-prefix was given.
17586if test "${with_libxxhash_prefix+set}" = set; then :
17587 withval=$with_libxxhash_prefix;
17588 if test "X$withval" = "Xno"; then
17589 use_additional=no
17590 else
17591 if test "X$withval" = "X"; then
17592
17593 acl_save_prefix="$prefix"
17594 prefix="$acl_final_prefix"
17595 acl_save_exec_prefix="$exec_prefix"
17596 exec_prefix="$acl_final_exec_prefix"
17597
17598 eval additional_includedir=\"$includedir\"
17599 eval additional_libdir=\"$libdir\"
17600
17601 exec_prefix="$acl_save_exec_prefix"
17602 prefix="$acl_save_prefix"
17603
17604 else
17605 additional_includedir="$withval/include"
17606 additional_libdir="$withval/lib"
17607 fi
17608 fi
17609
17610fi
17611
17612 LIBXXHASH=
17613 LTLIBXXHASH=
17614 INCXXHASH=
17615 rpathdirs=
17616 ltrpathdirs=
17617 names_already_handled=
17618 names_next_round='xxhash '
17619 while test -n "$names_next_round"; do
17620 names_this_round="$names_next_round"
17621 names_next_round=
17622 for name in $names_this_round; do
17623 already_handled=
17624 for n in $names_already_handled; do
17625 if test "$n" = "$name"; then
17626 already_handled=yes
17627 break
17628 fi
17629 done
17630 if test -z "$already_handled"; then
17631 names_already_handled="$names_already_handled $name"
17632 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17633 eval value=\"\$HAVE_LIB$uppername\"
17634 if test -n "$value"; then
17635 if test "$value" = yes; then
17636 eval value=\"\$LIB$uppername\"
17637 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
17638 eval value=\"\$LTLIB$uppername\"
17639 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
17640 else
17641 :
17642 fi
17643 else
17644 found_dir=
17645 found_la=
17646 found_so=
17647 found_a=
17648 if test $use_additional = yes; then
17649 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17650 found_dir="$additional_libdir"
17651 found_so="$additional_libdir/lib$name.$shlibext"
17652 if test -f "$additional_libdir/lib$name.la"; then
17653 found_la="$additional_libdir/lib$name.la"
17654 fi
17655 else
17656 if test -f "$additional_libdir/lib$name.$libext"; then
17657 found_dir="$additional_libdir"
17658 found_a="$additional_libdir/lib$name.$libext"
17659 if test -f "$additional_libdir/lib$name.la"; then
17660 found_la="$additional_libdir/lib$name.la"
17661 fi
17662 fi
17663 fi
17664 fi
17665 if test "X$found_dir" = "X"; then
17666 for x in $LDFLAGS $LTLIBXXHASH; do
17667
17668 acl_save_prefix="$prefix"
17669 prefix="$acl_final_prefix"
17670 acl_save_exec_prefix="$exec_prefix"
17671 exec_prefix="$acl_final_exec_prefix"
17672 eval x=\"$x\"
17673 exec_prefix="$acl_save_exec_prefix"
17674 prefix="$acl_save_prefix"
17675
17676 case "$x" in
17677 -L*)
17678 dir=`echo "X$x" | sed -e 's/^X-L//'`
17679 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17680 found_dir="$dir"
17681 found_so="$dir/lib$name.$shlibext"
17682 if test -f "$dir/lib$name.la"; then
17683 found_la="$dir/lib$name.la"
17684 fi
17685 else
17686 if test -f "$dir/lib$name.$libext"; then
17687 found_dir="$dir"
17688 found_a="$dir/lib$name.$libext"
17689 if test -f "$dir/lib$name.la"; then
17690 found_la="$dir/lib$name.la"
17691 fi
17692 fi
17693 fi
17694 ;;
17695 esac
17696 if test "X$found_dir" != "X"; then
17697 break
17698 fi
17699 done
17700 fi
17701 if test "X$found_dir" != "X"; then
17702 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
17703 if test "X$found_so" != "X"; then
17704 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17705 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
17706 else
17707 haveit=
17708 for x in $ltrpathdirs; do
17709 if test "X$x" = "X$found_dir"; then
17710 haveit=yes
17711 break
17712 fi
17713 done
17714 if test -z "$haveit"; then
17715 ltrpathdirs="$ltrpathdirs $found_dir"
17716 fi
17717 if test "$hardcode_direct" = yes; then
17718 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
17719 else
17720 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17721 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
17722 haveit=
17723 for x in $rpathdirs; do
17724 if test "X$x" = "X$found_dir"; then
17725 haveit=yes
17726 break
17727 fi
17728 done
17729 if test -z "$haveit"; then
17730 rpathdirs="$rpathdirs $found_dir"
17731 fi
17732 else
17733 haveit=
17734 for x in $LDFLAGS $LIBXXHASH; do
17735
17736 acl_save_prefix="$prefix"
17737 prefix="$acl_final_prefix"
17738 acl_save_exec_prefix="$exec_prefix"
17739 exec_prefix="$acl_final_exec_prefix"
17740 eval x=\"$x\"
17741 exec_prefix="$acl_save_exec_prefix"
17742 prefix="$acl_save_prefix"
17743
17744 if test "X$x" = "X-L$found_dir"; then
17745 haveit=yes
17746 break
17747 fi
17748 done
17749 if test -z "$haveit"; then
17750 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
17751 fi
17752 if test "$hardcode_minus_L" != no; then
17753 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
17754 else
17755 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
17756 fi
17757 fi
17758 fi
17759 fi
17760 else
17761 if test "X$found_a" != "X"; then
17762 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
17763 else
17764 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
17765 fi
17766 fi
17767 additional_includedir=
17768 case "$found_dir" in
17769 */lib | */lib/)
17770 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17771 additional_includedir="$basedir/include"
17772 ;;
17773 esac
17774 if test "X$additional_includedir" != "X"; then
17775 if test "X$additional_includedir" != "X/usr/include"; then
17776 haveit=
17777 if test "X$additional_includedir" = "X/usr/local/include"; then
17778 if test -n "$GCC"; then
17779 case $host_os in
17780 linux*) haveit=yes;;
17781 esac
17782 fi
17783 fi
17784 if test -z "$haveit"; then
17785 for x in $CPPFLAGS $INCXXHASH; do
17786
17787 acl_save_prefix="$prefix"
17788 prefix="$acl_final_prefix"
17789 acl_save_exec_prefix="$exec_prefix"
17790 exec_prefix="$acl_final_exec_prefix"
17791 eval x=\"$x\"
17792 exec_prefix="$acl_save_exec_prefix"
17793 prefix="$acl_save_prefix"
17794
17795 if test "X$x" = "X-I$additional_includedir"; then
17796 haveit=yes
17797 break
17798 fi
17799 done
17800 if test -z "$haveit"; then
17801 if test -d "$additional_includedir"; then
17802 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
17803 fi
17804 fi
17805 fi
17806 fi
17807 fi
17808 if test -n "$found_la"; then
17809 save_libdir="$libdir"
17810 case "$found_la" in
17811 */* | *\\*) . "$found_la" ;;
17812 *) . "./$found_la" ;;
17813 esac
17814 libdir="$save_libdir"
17815 for dep in $dependency_libs; do
17816 case "$dep" in
17817 -L*)
17818 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17819 if test "X$additional_libdir" != "X/usr/lib"; then
17820 haveit=
17821 if test "X$additional_libdir" = "X/usr/local/lib"; then
17822 if test -n "$GCC"; then
17823 case $host_os in
17824 linux*) haveit=yes;;
17825 esac
17826 fi
17827 fi
17828 if test -z "$haveit"; then
17829 haveit=
17830 for x in $LDFLAGS $LIBXXHASH; do
17831
17832 acl_save_prefix="$prefix"
17833 prefix="$acl_final_prefix"
17834 acl_save_exec_prefix="$exec_prefix"
17835 exec_prefix="$acl_final_exec_prefix"
17836 eval x=\"$x\"
17837 exec_prefix="$acl_save_exec_prefix"
17838 prefix="$acl_save_prefix"
17839
17840 if test "X$x" = "X-L$additional_libdir"; then
17841 haveit=yes
17842 break
17843 fi
17844 done
17845 if test -z "$haveit"; then
17846 if test -d "$additional_libdir"; then
17847 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
17848 fi
17849 fi
17850 haveit=
17851 for x in $LDFLAGS $LTLIBXXHASH; do
17852
17853 acl_save_prefix="$prefix"
17854 prefix="$acl_final_prefix"
17855 acl_save_exec_prefix="$exec_prefix"
17856 exec_prefix="$acl_final_exec_prefix"
17857 eval x=\"$x\"
17858 exec_prefix="$acl_save_exec_prefix"
17859 prefix="$acl_save_prefix"
17860
17861 if test "X$x" = "X-L$additional_libdir"; then
17862 haveit=yes
17863 break
17864 fi
17865 done
17866 if test -z "$haveit"; then
17867 if test -d "$additional_libdir"; then
17868 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
17869 fi
17870 fi
17871 fi
17872 fi
17873 ;;
17874 -R*)
17875 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17876 if test "$enable_rpath" != no; then
17877 haveit=
17878 for x in $rpathdirs; do
17879 if test "X$x" = "X$dir"; then
17880 haveit=yes
17881 break
17882 fi
17883 done
17884 if test -z "$haveit"; then
17885 rpathdirs="$rpathdirs $dir"
17886 fi
17887 haveit=
17888 for x in $ltrpathdirs; do
17889 if test "X$x" = "X$dir"; then
17890 haveit=yes
17891 break
17892 fi
17893 done
17894 if test -z "$haveit"; then
17895 ltrpathdirs="$ltrpathdirs $dir"
17896 fi
17897 fi
17898 ;;
17899 -l*)
17900 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17901 ;;
17902 *.la)
17903 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17904 ;;
17905 *)
17906 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
17907 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
17908 ;;
17909 esac
17910 done
17911 fi
17912 else
17913 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
17914 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
17915 fi
17916 fi
17917 fi
17918 done
17919 done
17920 if test "X$rpathdirs" != "X"; then
17921 if test -n "$hardcode_libdir_separator"; then
17922 alldirs=
17923 for found_dir in $rpathdirs; do
17924 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17925 done
17926 acl_save_libdir="$libdir"
17927 libdir="$alldirs"
17928 eval flag=\"$hardcode_libdir_flag_spec\"
17929 libdir="$acl_save_libdir"
17930 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
17931 else
17932 for found_dir in $rpathdirs; do
17933 acl_save_libdir="$libdir"
17934 libdir="$found_dir"
17935 eval flag=\"$hardcode_libdir_flag_spec\"
17936 libdir="$acl_save_libdir"
17937 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
17938 done
17939 fi
17940 fi
17941 if test "X$ltrpathdirs" != "X"; then
17942 for found_dir in $ltrpathdirs; do
17943 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
17944 done
17945 fi
17946
17947
17948 ac_save_CPPFLAGS="$CPPFLAGS"
17949
17950 for element in $INCXXHASH; do
17951 haveit=
17952 for x in $CPPFLAGS; do
17953
17954 acl_save_prefix="$prefix"
17955 prefix="$acl_final_prefix"
17956 acl_save_exec_prefix="$exec_prefix"
17957 exec_prefix="$acl_final_exec_prefix"
17958 eval x=\"$x\"
17959 exec_prefix="$acl_save_exec_prefix"
17960 prefix="$acl_save_prefix"
17961
17962 if test "X$x" = "X$element"; then
17963 haveit=yes
17964 break
17965 fi
17966 done
17967 if test -z "$haveit"; then
17968 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17969 fi
17970 done
17971
17972
17973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
17974$as_echo_n "checking for libxxhash... " >&6; }
17975if ${ac_cv_libxxhash+:} false; then :
17976 $as_echo_n "(cached) " >&6
17977else
17978
17979 ac_save_LIBS="$LIBS"
17980 LIBS="$LIBS $LIBXXHASH"
17981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17982/* end confdefs.h. */
17983#include <xxhash.h>
17984int
17985main ()
17986{
17987XXH32("foo", 3, 0);
17988
17989 ;
17990 return 0;
17991}
17992_ACEOF
17993if ac_fn_c_try_link "$LINENO"; then :
17994 ac_cv_libxxhash=yes
17995else
17996 ac_cv_libxxhash=no
17997fi
17998rm -f core conftest.err conftest.$ac_objext \
17999 conftest$ac_exeext conftest.$ac_ext
18000 LIBS="$ac_save_LIBS"
18001
18002fi
18003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
18004$as_echo "$ac_cv_libxxhash" >&6; }
18005 if test "$ac_cv_libxxhash" = yes; then
18006 HAVE_LIBXXHASH=yes
18007
18008$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
18009
18010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
18011$as_echo_n "checking how to link with libxxhash... " >&6; }
18012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
18013$as_echo "$LIBXXHASH" >&6; }
18014 else
18015 HAVE_LIBXXHASH=no
18016 CPPFLAGS="$ac_save_CPPFLAGS"
18017 LIBXXHASH=
18018 LTLIBXXHASH=
18019 fi
18020
18021
18022
18023
18024
18025
18026 if test "$HAVE_LIBXXHASH" != yes; then
18027 if test "$with_xxhash" = yes; then
18028 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
18029 fi
18030 fi
18031 if test "x$with_xxhash" = "xauto"; then
18032 with_xxhash="$HAVE_LIBXXHASH"
18033 fi
18034fi
18035
18036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
18037$as_echo_n "checking whether to use xxhash... " >&6; }
18038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
18039$as_echo "$with_xxhash" >&6; }
18040
a0a461e5 18041NM_H=
c906108c
SS
18042rm -f nm.h
18043if test "${nativefile}" != ""; then
0f475e27
AC
18044 case "${nativefile}" in
18045 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
18046 * ) GDB_NM_FILE="${nativefile}"
18047 esac
a0a461e5
TT
18048 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
18049
60ca704f
SE
18050
18051cat >>confdefs.h <<_ACEOF
b78960be 18052#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 18053_ACEOF
5a2402b8 18054
a0a461e5 18055 NM_H=nm.h
c906108c 18056fi
5a2402b8
AC
18057
18058
a0a461e5 18059
e3487908
GKB
18060for ac_prog in xsltproc
18061do
18062 # Extract the first word of "$ac_prog", so it can be a program name with args.
18063set dummy $ac_prog; ac_word=$2
18064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18065$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 18066if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
18067 $as_echo_n "(cached) " >&6
18068else
18069 case $XSLTPROC in
18070 [\\/]* | ?:[\\/]*)
18071 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18072 ;;
18073 *)
18074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18075for as_dir in $PATH
18076do
18077 IFS=$as_save_IFS
18078 test -z "$as_dir" && as_dir=.
18079 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 18080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
18081 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18083 break 2
18084 fi
18085done
18086 done
18087IFS=$as_save_IFS
18088
18089 ;;
18090esac
18091fi
18092XSLTPROC=$ac_cv_path_XSLTPROC
18093if test -n "$XSLTPROC"; then
18094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18095$as_echo "$XSLTPROC" >&6; }
18096else
18097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18098$as_echo "no" >&6; }
18099fi
18100
18101
18102 test -n "$XSLTPROC" && break
18103done
18104test -n "$XSLTPROC" || XSLTPROC="missing"
18105
18106if test "x$USE_MAINTAINER_MODE" = xyes; then
18107 if test "${XSLTPROC}" = missing; then
d0ac1c44 18108 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
18109 fi
18110fi
18111
18112
c906108c
SS
18113
18114
c906108c 18115
81ecdfbb 18116$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 18117
bec39cab 18118
8ecfd7bd
SDJ
18119
18120# Check whether we will enable the inclusion of unit tests when
18121# compiling GDB.
18122#
18123# The default value of this option changes depending whether we're on
18124# development mode (in which case it's "true") or not (in which case
18125# it's "false").
18126# Check whether --enable-unit-tests was given.
18127if test "${enable_unit_tests+set}" = set; then :
18128 enableval=$enable_unit_tests; case "${enableval}" in
18129 yes) enable_unittests=true ;;
18130 no) enable_unittests=false ;;
18131 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
18132esac
18133else
18134 enable_unittests=$development
18135fi
18136
18137
18138if $enable_unittests; then
dcd1f979
TT
18139
18140$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
18141
8ecfd7bd 18142
268a13a5
TT
18143 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) gdbsupport/selftest.o selftest-arch.o"
18144 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) gdbsupport/selftest.c selftest-arch.c"
8ecfd7bd 18145
dcd1f979
TT
18146fi
18147
b292c783 18148
8ecfd7bd 18149
f6a88844
JM
18150 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
18151 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
18152 if test "x$GDB_TRANSFORM_NAME" = x; then
18153 GDB_TRANSFORM_NAME=gdb
18154 fi
18155
18156
18157
18158 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
18159 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
18160 if test "x$GCORE_TRANSFORM_NAME" = x; then
18161 GCORE_TRANSFORM_NAME=gcore
18162 fi
18163
b292c783
JK
18164
18165ac_config_files="$ac_config_files gcore"
18166
141ec9f6 18167ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 18168
89a34d1b 18169
bec39cab
AC
18170cat >confcache <<\_ACEOF
18171# This file is a shell script that caches the results of configure
18172# tests run on this system so they can be shared between configure
18173# scripts and configure runs, see configure's option --config-cache.
18174# It is not useful on other systems. If it contains results you don't
18175# want to keep, you may remove or edit it.
18176#
18177# config.status only pays attention to the cache file if you give it
18178# the --recheck option to rerun configure.
18179#
18180# `ac_cv_env_foo' variables (set or unset) will be overridden when
18181# loading this file, other *unset* `ac_cv_foo' will be assigned the
18182# following values.
18183
18184_ACEOF
18185
18186# The following way of writing the cache mishandles newlines in values,
18187# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 18188# So, we kill variables containing newlines.
bec39cab
AC
18189# Ultrix sh set writes to stderr and can't be redirected directly,
18190# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
18191(
18192 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18193 eval ac_val=\$$ac_var
18194 case $ac_val in #(
18195 *${as_nl}*)
18196 case $ac_var in #(
18197 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18198$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18199 esac
18200 case $ac_var in #(
18201 _ | IFS | as_nl) ;; #(
18202 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18203 *) { eval $ac_var=; unset $ac_var;} ;;
18204 esac ;;
18205 esac
18206 done
18207
bec39cab 18208 (set) 2>&1 |
81ecdfbb
RW
18209 case $as_nl`(ac_space=' '; set) 2>&1` in #(
18210 *${as_nl}ac_space=\ *)
18211 # `set' does not quote correctly, so add quotes: double-quote
18212 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
18213 sed -n \
18214 "s/'/'\\\\''/g;
18215 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 18216 ;; #(
bec39cab
AC
18217 *)
18218 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 18219 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 18220 ;;
81ecdfbb
RW
18221 esac |
18222 sort
18223) |
bec39cab 18224 sed '
81ecdfbb 18225 /^ac_cv_env_/b end
bec39cab 18226 t clear
81ecdfbb 18227 :clear
bec39cab
AC
18228 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18229 t end
81ecdfbb
RW
18230 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18231 :end' >>confcache
18232if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18233 if test -w "$cache_file"; then
d0ac1c44 18234 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
18235 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18236$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
18237 if test ! -f "$cache_file" || test -h "$cache_file"; then
18238 cat confcache >"$cache_file"
18239 else
18240 case $cache_file in #(
18241 */* | ?:*)
18242 mv -f confcache "$cache_file"$$ &&
18243 mv -f "$cache_file"$$ "$cache_file" ;; #(
18244 *)
18245 mv -f confcache "$cache_file" ;;
18246 esac
18247 fi
18248 fi
bec39cab 18249 else
81ecdfbb
RW
18250 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18251$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
18252 fi
18253fi
18254rm -f confcache
18255
18256test "x$prefix" = xNONE && prefix=$ac_default_prefix
18257# Let make expand exec_prefix.
18258test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18259
bec39cab
AC
18260DEFS=-DHAVE_CONFIG_H
18261
18262ac_libobjs=
18263ac_ltlibobjs=
d0ac1c44 18264U=
bec39cab
AC
18265for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18266 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
18267 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18268 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18269 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
18270 # will be set to the directory where LIBOBJS objects are built.
18271 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18272 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
18273done
18274LIBOBJS=$ac_libobjs
18275
18276LTLIBOBJS=$ac_ltlibobjs
18277
18278
85981d60 18279if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 18280 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 18281Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 18282fi
4df42755 18283if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 18284 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
18285Usually this means the macro was only invoked conditionally." "$LINENO" 5
18286fi
18287if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 18288 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
18289Usually this means the macro was only invoked conditionally." "$LINENO" 5
18290fi
81ecdfbb
RW
18291
18292
d0ac1c44 18293: "${CONFIG_STATUS=./config.status}"
81ecdfbb 18294ac_write_fail=0
bec39cab
AC
18295ac_clean_files_save=$ac_clean_files
18296ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
18297{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18298$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18299as_write_fail=0
18300cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
18301#! $SHELL
18302# Generated by $as_me.
18303# Run this file to recreate the current configuration.
18304# Compiler output produced by configure, useful for debugging
18305# configure, is in config.log if it exists.
18306
18307debug=false
18308ac_cs_recheck=false
18309ac_cs_silent=false
bec39cab 18310
81ecdfbb
RW
18311SHELL=\${CONFIG_SHELL-$SHELL}
18312export SHELL
18313_ASEOF
18314cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18315## -------------------- ##
18316## M4sh Initialization. ##
18317## -------------------- ##
18318
18319# Be more Bourne compatible
18320DUALCASE=1; export DUALCASE # for MKS sh
18321if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18322 emulate sh
18323 NULLCMD=:
81ecdfbb 18324 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
18325 # is contrary to our usage. Disable this feature.
18326 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
18327 setopt NO_GLOB_SUBST
18328else
18329 case `(set -o) 2>/dev/null` in #(
18330 *posix*) :
18331 set -o posix ;; #(
18332 *) :
18333 ;;
18334esac
bec39cab 18335fi
bec39cab 18336
81ecdfbb
RW
18337
18338as_nl='
18339'
18340export as_nl
18341# Printing a long string crashes Solaris 7 /usr/bin/printf.
18342as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18343as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18344as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18345# Prefer a ksh shell builtin over an external printf program on Solaris,
18346# but without wasting forks for bash or zsh.
18347if test -z "$BASH_VERSION$ZSH_VERSION" \
18348 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18349 as_echo='print -r --'
18350 as_echo_n='print -rn --'
18351elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18352 as_echo='printf %s\n'
18353 as_echo_n='printf %s'
18354else
18355 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18356 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18357 as_echo_n='/usr/ucb/echo -n'
18358 else
18359 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18360 as_echo_n_body='eval
18361 arg=$1;
18362 case $arg in #(
18363 *"$as_nl"*)
18364 expr "X$arg" : "X\\(.*\\)$as_nl";
18365 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18366 esac;
18367 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18368 '
18369 export as_echo_n_body
18370 as_echo_n='sh -c $as_echo_n_body as_echo'
18371 fi
18372 export as_echo_body
18373 as_echo='sh -c $as_echo_body as_echo'
18374fi
18375
18376# The user is always right.
18377if test "${PATH_SEPARATOR+set}" != set; then
18378 PATH_SEPARATOR=:
18379 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18380 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18381 PATH_SEPARATOR=';'
18382 }
bec39cab
AC
18383fi
18384
18385
81ecdfbb
RW
18386# IFS
18387# We need space, tab and new line, in precisely that order. Quoting is
18388# there to prevent editors from complaining about space-tab.
18389# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18390# splitting by setting IFS to empty value.)
18391IFS=" "" $as_nl"
18392
18393# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 18394as_myself=
81ecdfbb
RW
18395case $0 in #((
18396 *[\\/]* ) as_myself=$0 ;;
18397 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18398for as_dir in $PATH
18399do
18400 IFS=$as_save_IFS
18401 test -z "$as_dir" && as_dir=.
18402 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18403 done
18404IFS=$as_save_IFS
18405
18406 ;;
18407esac
18408# We did not find ourselves, most probably we were run as `sh COMMAND'
18409# in which case we are not to be found in the path.
18410if test "x$as_myself" = x; then
18411 as_myself=$0
18412fi
18413if test ! -f "$as_myself"; then
18414 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18415 exit 1
18416fi
18417
18418# Unset variables that we do not need and which cause bugs (e.g. in
18419# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18420# suppresses any "Segmentation fault" message there. '((' could
18421# trigger a bug in pdksh 5.2.14.
18422for as_var in BASH_ENV ENV MAIL MAILPATH
18423do eval test x\${$as_var+set} = xset \
18424 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18425done
bec39cab
AC
18426PS1='$ '
18427PS2='> '
18428PS4='+ '
18429
18430# NLS nuisances.
81ecdfbb
RW
18431LC_ALL=C
18432export LC_ALL
18433LANGUAGE=C
18434export LANGUAGE
18435
18436# CDPATH.
18437(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18438
18439
d0ac1c44
SM
18440# as_fn_error STATUS ERROR [LINENO LOG_FD]
18441# ----------------------------------------
81ecdfbb
RW
18442# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18443# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 18444# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
18445as_fn_error ()
18446{
d0ac1c44
SM
18447 as_status=$1; test $as_status -eq 0 && as_status=1
18448 if test "$4"; then
18449 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18450 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 18451 fi
d0ac1c44 18452 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
18453 as_fn_exit $as_status
18454} # as_fn_error
18455
18456
18457# as_fn_set_status STATUS
18458# -----------------------
18459# Set $? to STATUS, without forking.
18460as_fn_set_status ()
18461{
18462 return $1
18463} # as_fn_set_status
18464
18465# as_fn_exit STATUS
18466# -----------------
18467# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18468as_fn_exit ()
18469{
18470 set +e
18471 as_fn_set_status $1
18472 exit $1
18473} # as_fn_exit
18474
18475# as_fn_unset VAR
18476# ---------------
18477# Portably unset VAR.
18478as_fn_unset ()
18479{
18480 { eval $1=; unset $1;}
18481}
18482as_unset=as_fn_unset
18483# as_fn_append VAR VALUE
18484# ----------------------
18485# Append the text in VALUE to the end of the definition contained in VAR. Take
18486# advantage of any shell optimizations that allow amortized linear growth over
18487# repeated appends, instead of the typical quadratic growth present in naive
18488# implementations.
18489if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18490 eval 'as_fn_append ()
18491 {
18492 eval $1+=\$2
18493 }'
18494else
18495 as_fn_append ()
18496 {
18497 eval $1=\$$1\$2
18498 }
18499fi # as_fn_append
18500
18501# as_fn_arith ARG...
18502# ------------------
18503# Perform arithmetic evaluation on the ARGs, and store the result in the
18504# global $as_val. Take advantage of shells that can avoid forks. The arguments
18505# must be portable across $(()) and expr.
18506if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18507 eval 'as_fn_arith ()
18508 {
18509 as_val=$(( $* ))
18510 }'
18511else
18512 as_fn_arith ()
18513 {
18514 as_val=`expr "$@" || test $? -eq 1`
18515 }
18516fi # as_fn_arith
bec39cab 18517
81ecdfbb
RW
18518
18519if expr a : '\(a\)' >/dev/null 2>&1 &&
18520 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18521 as_expr=expr
18522else
18523 as_expr=false
18524fi
18525
81ecdfbb 18526if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18527 as_basename=basename
18528else
18529 as_basename=false
18530fi
18531
81ecdfbb
RW
18532if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18533 as_dirname=dirname
18534else
18535 as_dirname=false
18536fi
bec39cab 18537
81ecdfbb 18538as_me=`$as_basename -- "$0" ||
bec39cab
AC
18539$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18540 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18541 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18542$as_echo X/"$0" |
18543 sed '/^.*\/\([^/][^/]*\)\/*$/{
18544 s//\1/
18545 q
18546 }
18547 /^X\/\(\/\/\)$/{
18548 s//\1/
18549 q
18550 }
18551 /^X\/\(\/\).*/{
18552 s//\1/
18553 q
18554 }
18555 s/.*/./; q'`
b4e70030 18556
b4e70030
JB
18557# Avoid depending upon Character Ranges.
18558as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18559as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18560as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18561as_cr_digits='0123456789'
18562as_cr_alnum=$as_cr_Letters$as_cr_digits
18563
81ecdfbb
RW
18564ECHO_C= ECHO_N= ECHO_T=
18565case `echo -n x` in #(((((
18566-n*)
18567 case `echo 'xy\c'` in
18568 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18569 xy) ECHO_C='\c';;
18570 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18571 ECHO_T=' ';;
18572 esac;;
18573*)
18574 ECHO_N='-n';;
bec39cab
AC
18575esac
18576
81ecdfbb
RW
18577rm -f conf$$ conf$$.exe conf$$.file
18578if test -d conf$$.dir; then
18579 rm -f conf$$.dir/conf$$.file
bec39cab 18580else
81ecdfbb
RW
18581 rm -f conf$$.dir
18582 mkdir conf$$.dir 2>/dev/null
bec39cab 18583fi
81ecdfbb
RW
18584if (echo >conf$$.file) 2>/dev/null; then
18585 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18586 as_ln_s='ln -s'
81ecdfbb
RW
18587 # ... but there are two gotchas:
18588 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18589 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 18590 # In both cases, we have to default to `cp -pR'.
81ecdfbb 18591 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 18592 as_ln_s='cp -pR'
81ecdfbb
RW
18593 elif ln conf$$.file conf$$ 2>/dev/null; then
18594 as_ln_s=ln
18595 else
d0ac1c44 18596 as_ln_s='cp -pR'
b4e70030 18597 fi
bec39cab 18598else
d0ac1c44 18599 as_ln_s='cp -pR'
bec39cab 18600fi
81ecdfbb
RW
18601rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18602rmdir conf$$.dir 2>/dev/null
18603
18604
18605# as_fn_mkdir_p
18606# -------------
18607# Create "$as_dir" as a directory, including parents if necessary.
18608as_fn_mkdir_p ()
18609{
18610
18611 case $as_dir in #(
18612 -*) as_dir=./$as_dir;;
18613 esac
18614 test -d "$as_dir" || eval $as_mkdir_p || {
18615 as_dirs=
18616 while :; do
18617 case $as_dir in #(
18618 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18619 *) as_qdir=$as_dir;;
18620 esac
18621 as_dirs="'$as_qdir' $as_dirs"
18622 as_dir=`$as_dirname -- "$as_dir" ||
18623$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18624 X"$as_dir" : 'X\(//\)[^/]' \| \
18625 X"$as_dir" : 'X\(//\)$' \| \
18626 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18627$as_echo X"$as_dir" |
18628 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18629 s//\1/
18630 q
18631 }
18632 /^X\(\/\/\)[^/].*/{
18633 s//\1/
18634 q
18635 }
18636 /^X\(\/\/\)$/{
18637 s//\1/
18638 q
18639 }
18640 /^X\(\/\).*/{
18641 s//\1/
18642 q
18643 }
18644 s/.*/./; q'`
18645 test -d "$as_dir" && break
18646 done
18647 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 18648 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 18649
bec39cab 18650
81ecdfbb 18651} # as_fn_mkdir_p
bec39cab 18652if mkdir -p . 2>/dev/null; then
81ecdfbb 18653 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18654else
18655 test -d ./-p && rmdir ./-p
18656 as_mkdir_p=false
18657fi
18658
d0ac1c44
SM
18659
18660# as_fn_executable_p FILE
18661# -----------------------
18662# Test if FILE is an executable regular file.
18663as_fn_executable_p ()
18664{
18665 test -f "$1" && test -x "$1"
18666} # as_fn_executable_p
18667as_test_x='test -x'
18668as_executable_p=as_fn_executable_p
bec39cab
AC
18669
18670# Sed expression to map a string onto a valid CPP name.
18671as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18672
18673# Sed expression to map a string onto a valid variable name.
18674as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18675
18676
bec39cab 18677exec 6>&1
81ecdfbb
RW
18678## ----------------------------------- ##
18679## Main body of $CONFIG_STATUS script. ##
18680## ----------------------------------- ##
18681_ASEOF
18682test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18683
18684cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18685# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18686# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18687# values after options handling.
18688ac_log="
bec39cab 18689This file was extended by $as_me, which was
d0ac1c44 18690generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
18691
18692 CONFIG_FILES = $CONFIG_FILES
18693 CONFIG_HEADERS = $CONFIG_HEADERS
18694 CONFIG_LINKS = $CONFIG_LINKS
18695 CONFIG_COMMANDS = $CONFIG_COMMANDS
18696 $ $0 $@
18697
81ecdfbb
RW
18698on `(hostname || uname -n) 2>/dev/null | sed 1q`
18699"
18700
bec39cab
AC
18701_ACEOF
18702
81ecdfbb
RW
18703case $ac_config_files in *"
18704"*) set x $ac_config_files; shift; ac_config_files=$*;;
18705esac
234b45d4 18706
81ecdfbb
RW
18707case $ac_config_headers in *"
18708"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18709esac
b4e70030 18710
b4e70030 18711
81ecdfbb
RW
18712cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18713# Files that config.status was made for.
18714config_files="$ac_config_files"
18715config_headers="$ac_config_headers"
18716config_links="$ac_config_links"
18717config_commands="$ac_config_commands"
234b45d4 18718
81ecdfbb 18719_ACEOF
b4e70030 18720
81ecdfbb 18721cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18722ac_cs_usage="\
81ecdfbb
RW
18723\`$as_me' instantiates files and other configuration actions
18724from templates according to the current configuration. Unless the files
18725and actions are specified as TAGs, all are instantiated by default.
234b45d4 18726
81ecdfbb 18727Usage: $0 [OPTION]... [TAG]...
234b45d4 18728
bec39cab 18729 -h, --help print this help, then exit
81ecdfbb 18730 -V, --version print version number and configuration settings, then exit
d0ac1c44 18731 --config print configuration, then exit
81ecdfbb
RW
18732 -q, --quiet, --silent
18733 do not print progress messages
bec39cab
AC
18734 -d, --debug don't remove temporary files
18735 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18736 --file=FILE[:TEMPLATE]
18737 instantiate the configuration file FILE
18738 --header=FILE[:TEMPLATE]
18739 instantiate the configuration header FILE
234b45d4 18740
bec39cab
AC
18741Configuration files:
18742$config_files
234b45d4 18743
bec39cab
AC
18744Configuration headers:
18745$config_headers
234b45d4 18746
bec39cab
AC
18747Configuration links:
18748$config_links
234b45d4 18749
bec39cab
AC
18750Configuration commands:
18751$config_commands
18752
81ecdfbb 18753Report bugs to the package provider."
b4e70030 18754
81ecdfbb
RW
18755_ACEOF
18756cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18757ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
18758ac_cs_version="\\
18759config.status
d0ac1c44
SM
18760configured by $0, generated by GNU Autoconf 2.69,
18761 with options \\"\$ac_cs_config\\"
bec39cab 18762
d0ac1c44 18763Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
18764This config.status script is free software; the Free Software Foundation
18765gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18766
18767ac_pwd='$ac_pwd'
18768srcdir='$srcdir'
18769INSTALL='$INSTALL'
81ecdfbb
RW
18770AWK='$AWK'
18771test -n "\$AWK" || AWK=awk
bec39cab
AC
18772_ACEOF
18773
81ecdfbb
RW
18774cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18775# The default lists apply if the user does not specify any file.
bec39cab
AC
18776ac_need_defaults=:
18777while test $# != 0
18778do
18779 case $1 in
d0ac1c44 18780 --*=?*)
81ecdfbb
RW
18781 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18782 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18783 ac_shift=:
c906108c 18784 ;;
d0ac1c44
SM
18785 --*=)
18786 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18787 ac_optarg=
18788 ac_shift=:
18789 ;;
81ecdfbb 18790 *)
bec39cab
AC
18791 ac_option=$1
18792 ac_optarg=$2
18793 ac_shift=shift
c906108c 18794 ;;
bec39cab 18795 esac
c906108c 18796
bec39cab
AC
18797 case $ac_option in
18798 # Handling of the options.
bec39cab
AC
18799 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18800 ac_cs_recheck=: ;;
81ecdfbb
RW
18801 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18802 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
18803 --config | --confi | --conf | --con | --co | --c )
18804 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 18805 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18806 debug=: ;;
18807 --file | --fil | --fi | --f )
18808 $ac_shift
81ecdfbb
RW
18809 case $ac_optarg in
18810 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 18811 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
18812 esac
18813 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18814 ac_need_defaults=false;;
18815 --header | --heade | --head | --hea )
18816 $ac_shift
81ecdfbb
RW
18817 case $ac_optarg in
18818 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18819 esac
18820 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18821 ac_need_defaults=false;;
81ecdfbb
RW
18822 --he | --h)
18823 # Conflict between --help and --header
d0ac1c44 18824 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
18825Try \`$0 --help' for more information.";;
18826 --help | --hel | -h )
18827 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18828 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18829 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18830 ac_cs_silent=: ;;
c906108c 18831
bec39cab 18832 # This is an error.
d0ac1c44 18833 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 18834Try \`$0 --help' for more information." ;;
c906108c 18835
81ecdfbb
RW
18836 *) as_fn_append ac_config_targets " $1"
18837 ac_need_defaults=false ;;
c906108c 18838
bec39cab
AC
18839 esac
18840 shift
18841done
c906108c 18842
bec39cab 18843ac_configure_extra_args=
c906108c 18844
bec39cab
AC
18845if $ac_cs_silent; then
18846 exec 6>/dev/null
18847 ac_configure_extra_args="$ac_configure_extra_args --silent"
18848fi
c906108c 18849
bec39cab 18850_ACEOF
81ecdfbb 18851cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18852if \$ac_cs_recheck; then
d0ac1c44 18853 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
18854 shift
18855 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18856 CONFIG_SHELL='$SHELL'
18857 export CONFIG_SHELL
18858 exec "\$@"
bec39cab
AC
18859fi
18860
18861_ACEOF
81ecdfbb
RW
18862cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18863exec 5>>config.log
18864{
18865 echo
18866 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18867## Running $as_me. ##
18868_ASBOX
18869 $as_echo "$ac_log"
18870} >&5
bec39cab 18871
81ecdfbb
RW
18872_ACEOF
18873cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18874#
81ecdfbb 18875# INIT-COMMANDS
c906108c 18876#
a417dc56 18877ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 18878GDB_NM_FILE=$GDB_NM_FILE
b4e70030 18879
bec39cab
AC
18880_ACEOF
18881
81ecdfbb 18882cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18883
81ecdfbb 18884# Handling of arguments.
bec39cab 18885for ac_config_target in $ac_config_targets
c906108c 18886do
81ecdfbb
RW
18887 case $ac_config_target in
18888 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18889 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18890 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 18891 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 18892 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18893 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18894 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 18895 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 18896 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18897 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 18898
d0ac1c44 18899 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18900 esac
18901done
18902
81ecdfbb 18903
bec39cab
AC
18904# If the user did not use the arguments to specify the items to instantiate,
18905# then the envvar interface is used. Set only those that are not.
18906# We use the long form for the default assignment because of an extremely
18907# bizarre bug on SunOS 4.1.3.
18908if $ac_need_defaults; then
18909 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18910 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18911 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18912 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18913fi
18914
b4e70030 18915# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18916# simply because there is no reason against having it here, and in addition,
b4e70030 18917# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18918# Hook for its removal unless debugging.
18919# Note that there is a small window in which the directory will not be cleaned:
18920# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18921$debug ||
18922{
d0ac1c44 18923 tmp= ac_tmp=
81ecdfbb 18924 trap 'exit_status=$?
d0ac1c44
SM
18925 : "${ac_tmp:=$tmp}"
18926 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
18927' 0
18928 trap 'as_fn_exit 1' 1 2 13 15
18929}
18930# Create a (secure) tmp directory for tmp files.
18931
18932{
18933 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 18934 test -d "$tmp"
81ecdfbb
RW
18935} ||
18936{
18937 tmp=./conf$$-$RANDOM
18938 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
18939} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18940ac_tmp=$tmp
81ecdfbb
RW
18941
18942# Set up the scripts for CONFIG_FILES section.
18943# No need to generate them if there are no CONFIG_FILES.
18944# This happens for instance with `./config.status config.h'.
18945if test -n "$CONFIG_FILES"; then
18946
18947if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18948 ac_cs_awk_getline=:
18949 ac_cs_awk_pipe_init=
18950 ac_cs_awk_read_file='
18951 while ((getline aline < (F[key])) > 0)
18952 print(aline)
18953 close(F[key])'
18954 ac_cs_awk_pipe_fini=
18955else
18956 ac_cs_awk_getline=false
18957 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18958 ac_cs_awk_read_file='
18959 print "|#_!!_#|"
18960 print "cat " F[key] " &&"
18961 '$ac_cs_awk_pipe_init
18962 # The final `:' finishes the AND list.
18963 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18964fi
18965ac_cr=`echo X | tr X '\015'`
18966# On cygwin, bash can eat \r inside `` if the user requested igncr.
18967# But we know of no other shell where ac_cr would be empty at this
18968# point, so we can use a bashism as a fallback.
18969if test "x$ac_cr" = x; then
18970 eval ac_cr=\$\'\\r\'
18971fi
18972ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18973if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 18974 ac_cs_awk_cr='\\r'
81ecdfbb
RW
18975else
18976 ac_cs_awk_cr=$ac_cr
18977fi
18978
d0ac1c44 18979echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
18980_ACEOF
18981
18982# Create commands to substitute file output variables.
18983{
18984 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 18985 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
18986 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18987 echo "_ACAWK" &&
18988 echo "_ACEOF"
18989} >conf$$files.sh &&
18990. ./conf$$files.sh ||
d0ac1c44 18991 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18992rm -f conf$$files.sh
18993
18994{
18995 echo "cat >conf$$subs.awk <<_ACEOF" &&
18996 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18997 echo "_ACEOF"
18998} >conf$$subs.sh ||
d0ac1c44
SM
18999 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19000ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
19001ac_delim='%!_!# '
19002for ac_last_try in false false false false false :; do
19003 . ./conf$$subs.sh ||
d0ac1c44 19004 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19005
19006 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19007 if test $ac_delim_n = $ac_delim_num; then
19008 break
19009 elif $ac_last_try; then
d0ac1c44 19010 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19011 else
19012 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19013 fi
19014done
19015rm -f conf$$subs.sh
19016
19017cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 19018cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
19019_ACEOF
19020sed -n '
19021h
19022s/^/S["/; s/!.*/"]=/
19023p
19024g
19025s/^[^!]*!//
19026:repl
19027t repl
19028s/'"$ac_delim"'$//
19029t delim
19030:nl
19031h
d0ac1c44 19032s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
19033t more1
19034s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19035p
19036n
19037b repl
19038:more1
19039s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19040p
19041g
19042s/.\{148\}//
19043t nl
19044:delim
19045h
d0ac1c44 19046s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
19047t more2
19048s/["\\]/\\&/g; s/^/"/; s/$/"/
19049p
19050b
19051:more2
19052s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19053p
19054g
19055s/.\{148\}//
19056t delim
19057' <conf$$subs.awk | sed '
19058/^[^""]/{
19059 N
19060 s/\n//
19061}
19062' >>$CONFIG_STATUS || ac_write_fail=1
19063rm -f conf$$subs.awk
19064cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19065_ACAWK
d0ac1c44 19066cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
19067 for (key in S) S_is_set[key] = 1
19068 FS = "\a"
19069 \$ac_cs_awk_pipe_init
19070}
19071{
19072 line = $ 0
19073 nfields = split(line, field, "@")
19074 substed = 0
19075 len = length(field[1])
19076 for (i = 2; i < nfields; i++) {
19077 key = field[i]
19078 keylen = length(key)
19079 if (S_is_set[key]) {
19080 value = S[key]
19081 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19082 len += length(value) + length(field[++i])
19083 substed = 1
19084 } else
19085 len += 1 + keylen
19086 }
19087 if (nfields == 3 && !substed) {
19088 key = field[2]
19089 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
19090 \$ac_cs_awk_read_file
19091 next
19092 }
19093 }
19094 print line
b4e70030 19095}
81ecdfbb
RW
19096\$ac_cs_awk_pipe_fini
19097_ACAWK
19098_ACEOF
19099cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19100if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19101 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19102else
19103 cat
d0ac1c44
SM
19104fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19105 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
19106_ACEOF
19107
d0ac1c44
SM
19108# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19109# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
19110# trailing colons and then remove the whole line if VPATH becomes empty
19111# (actually we leave an empty line to preserve line numbers).
19112if test "x$srcdir" = x.; then
d0ac1c44
SM
19113 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19114h
19115s///
19116s/^/:/
19117s/[ ]*$/:/
19118s/:\$(srcdir):/:/g
19119s/:\${srcdir}:/:/g
19120s/:@srcdir@:/:/g
19121s/^:*//
81ecdfbb 19122s/:*$//
d0ac1c44
SM
19123x
19124s/\(=[ ]*\).*/\1/
19125G
19126s/\n//
81ecdfbb
RW
19127s/^[^=]*=[ ]*$//
19128}'
19129fi
19130
19131cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19132fi # test -n "$CONFIG_FILES"
19133
19134# Set up the scripts for CONFIG_HEADERS section.
19135# No need to generate them if there are no CONFIG_HEADERS.
19136# This happens for instance with `./config.status Makefile'.
19137if test -n "$CONFIG_HEADERS"; then
d0ac1c44 19138cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
19139BEGIN {
19140_ACEOF
19141
19142# Transform confdefs.h into an awk script `defines.awk', embedded as
19143# here-document in config.status, that substitutes the proper values into
19144# config.h.in to produce config.h.
4e8d927d 19145
81ecdfbb
RW
19146# Create a delimiter string that does not exist in confdefs.h, to ease
19147# handling of long lines.
19148ac_delim='%!_!# '
19149for ac_last_try in false false :; do
d0ac1c44
SM
19150 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19151 if test -z "$ac_tt"; then
81ecdfbb
RW
19152 break
19153 elif $ac_last_try; then
d0ac1c44 19154 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
19155 else
19156 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19157 fi
19158done
4e8d927d 19159
81ecdfbb
RW
19160# For the awk script, D is an array of macro values keyed by name,
19161# likewise P contains macro parameters if any. Preserve backslash
19162# newline sequences.
19163
19164ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19165sed -n '
19166s/.\{148\}/&'"$ac_delim"'/g
19167t rset
19168:rset
19169s/^[ ]*#[ ]*define[ ][ ]*/ /
19170t def
19171d
19172:def
19173s/\\$//
19174t bsnl
19175s/["\\]/\\&/g
19176s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19177D["\1"]=" \3"/p
19178s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
19179d
19180:bsnl
19181s/["\\]/\\&/g
19182s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19183D["\1"]=" \3\\\\\\n"\\/p
19184t cont
19185s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19186t cont
19187d
19188:cont
19189n
19190s/.\{148\}/&'"$ac_delim"'/g
19191t clear
19192:clear
19193s/\\$//
19194t bsnlc
19195s/["\\]/\\&/g; s/^/"/; s/$/"/p
19196d
19197:bsnlc
19198s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19199b cont
19200' <confdefs.h | sed '
19201s/'"$ac_delim"'/"\\\
19202"/g' >>$CONFIG_STATUS || ac_write_fail=1
19203
19204cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19205 for (key in D) D_is_set[key] = 1
19206 FS = "\a"
19207}
19208/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19209 line = \$ 0
19210 split(line, arg, " ")
19211 if (arg[1] == "#") {
19212 defundef = arg[2]
19213 mac1 = arg[3]
19214 } else {
19215 defundef = substr(arg[1], 2)
19216 mac1 = arg[2]
19217 }
19218 split(mac1, mac2, "(") #)
19219 macro = mac2[1]
19220 prefix = substr(line, 1, index(line, defundef) - 1)
19221 if (D_is_set[macro]) {
19222 # Preserve the white space surrounding the "#".
19223 print prefix "define", macro P[macro] D[macro]
19224 next
19225 } else {
19226 # Replace #undef with comments. This is necessary, for example,
19227 # in the case of _POSIX_SOURCE, which is predefined and required
19228 # on some systems where configure will not decide to define it.
19229 if (defundef == "undef") {
19230 print "/*", prefix defundef, macro, "*/"
19231 next
19232 }
19233 }
b4e70030 19234}
81ecdfbb
RW
19235{ print }
19236_ACAWK
b4e70030 19237_ACEOF
81ecdfbb 19238cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 19239 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 19240fi # test -n "$CONFIG_HEADERS"
4e8d927d 19241
4e8d927d 19242
81ecdfbb
RW
19243eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
19244shift
19245for ac_tag
19246do
19247 case $ac_tag in
19248 :[FHLC]) ac_mode=$ac_tag; continue;;
19249 esac
19250 case $ac_mode$ac_tag in
19251 :[FHL]*:*);;
d0ac1c44 19252 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
19253 :[FH]-) ac_tag=-:-;;
19254 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19255 esac
19256 ac_save_IFS=$IFS
19257 IFS=:
19258 set x $ac_tag
19259 IFS=$ac_save_IFS
19260 shift
19261 ac_file=$1
19262 shift
4e8d927d 19263
81ecdfbb
RW
19264 case $ac_mode in
19265 :L) ac_source=$1;;
19266 :[FH])
19267 ac_file_inputs=
19268 for ac_f
19269 do
19270 case $ac_f in
d0ac1c44 19271 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
19272 *) # Look for the file first in the build tree, then in the source tree
19273 # (if the path is not absolute). The absolute path cannot be DOS-style,
19274 # because $ac_f cannot contain `:'.
19275 test -f "$ac_f" ||
19276 case $ac_f in
19277 [\\/$]*) false;;
19278 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19279 esac ||
d0ac1c44 19280 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
19281 esac
19282 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19283 as_fn_append ac_file_inputs " '$ac_f'"
19284 done
19285
19286 # Let's still pretend it is `configure' which instantiates (i.e., don't
19287 # use $as_me), people would be surprised to read:
19288 # /* config.h. Generated by config.status. */
19289 configure_input='Generated from '`
19290 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19291 `' by configure.'
19292 if test x"$ac_file" != x-; then
19293 configure_input="$ac_file. $configure_input"
19294 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19295$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 19296 fi
81ecdfbb
RW
19297 # Neutralize special characters interpreted by sed in replacement strings.
19298 case $configure_input in #(
19299 *\&* | *\|* | *\\* )
19300 ac_sed_conf_input=`$as_echo "$configure_input" |
19301 sed 's/[\\\\&|]/\\\\&/g'`;; #(
19302 *) ac_sed_conf_input=$configure_input;;
19303 esac
4e8d927d 19304
81ecdfbb 19305 case $ac_tag in
d0ac1c44
SM
19306 *:-:* | *:-) cat >"$ac_tmp/stdin" \
19307 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
19308 esac
19309 ;;
c906108c
SS
19310 esac
19311
81ecdfbb 19312 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
19313$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19314 X"$ac_file" : 'X\(//\)[^/]' \| \
19315 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
19316 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19317$as_echo X"$ac_file" |
19318 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19319 s//\1/
19320 q
19321 }
19322 /^X\(\/\/\)[^/].*/{
19323 s//\1/
19324 q
19325 }
19326 /^X\(\/\/\)$/{
19327 s//\1/
19328 q
19329 }
19330 /^X\(\/\).*/{
19331 s//\1/
19332 q
19333 }
19334 s/.*/./; q'`
19335 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19336 ac_builddir=.
19337
81ecdfbb
RW
19338case "$ac_dir" in
19339.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19340*)
19341 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19342 # A ".." for each directory in $ac_dir_suffix.
19343 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19344 case $ac_top_builddir_sub in
19345 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19346 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19347 esac ;;
19348esac
19349ac_abs_top_builddir=$ac_pwd
19350ac_abs_builddir=$ac_pwd$ac_dir_suffix
19351# for backward compatibility:
19352ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19353
19354case $srcdir in
81ecdfbb 19355 .) # We are building in place.
bec39cab 19356 ac_srcdir=.
81ecdfbb
RW
19357 ac_top_srcdir=$ac_top_builddir_sub
19358 ac_abs_top_srcdir=$ac_pwd ;;
19359 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19360 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19361 ac_top_srcdir=$srcdir
19362 ac_abs_top_srcdir=$srcdir ;;
19363 *) # Relative name.
19364 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19365 ac_top_srcdir=$ac_top_build_prefix$srcdir
19366 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19367esac
81ecdfbb 19368ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 19369
c906108c 19370
81ecdfbb
RW
19371 case $ac_mode in
19372 :F)
19373 #
19374 # CONFIG_FILE
19375 #
c906108c 19376
bec39cab
AC
19377 case $INSTALL in
19378 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 19379 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 19380 esac
81ecdfbb 19381_ACEOF
121ce6e5 19382
81ecdfbb
RW
19383cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19384# If the template does not know about datarootdir, expand it.
19385# FIXME: This hack should be removed a few years after 2.60.
19386ac_datarootdir_hack=; ac_datarootdir_seen=
19387ac_sed_dataroot='
19388/datarootdir/ {
19389 p
19390 q
19391}
19392/@datadir@/p
19393/@docdir@/p
19394/@infodir@/p
19395/@localedir@/p
19396/@mandir@/p'
19397case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19398*datarootdir*) ac_datarootdir_seen=yes;;
19399*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19400 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19401$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19402_ACEOF
19403cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19404 ac_datarootdir_hack='
19405 s&@datadir@&$datadir&g
19406 s&@docdir@&$docdir&g
19407 s&@infodir@&$infodir&g
19408 s&@localedir@&$localedir&g
19409 s&@mandir@&$mandir&g
19410 s&\\\${datarootdir}&$datarootdir&g' ;;
19411esac
4e8d927d 19412_ACEOF
81ecdfbb
RW
19413
19414# Neutralize VPATH when `$srcdir' = `.'.
19415# Shell code in configure.ac might set extrasub.
19416# FIXME: do we really want to maintain this feature?
19417cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19418ac_sed_extra="$ac_vpsub
bec39cab
AC
19419$extrasub
19420_ACEOF
81ecdfbb 19421cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
19422:t
19423/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
19424s|@configure_input@|$ac_sed_conf_input|;t t
19425s&@top_builddir@&$ac_top_builddir_sub&;t t
19426s&@top_build_prefix@&$ac_top_build_prefix&;t t
19427s&@srcdir@&$ac_srcdir&;t t
19428s&@abs_srcdir@&$ac_abs_srcdir&;t t
19429s&@top_srcdir@&$ac_top_srcdir&;t t
19430s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19431s&@builddir@&$ac_builddir&;t t
19432s&@abs_builddir@&$ac_abs_builddir&;t t
19433s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19434s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
19435$ac_datarootdir_hack
19436"
19437eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19438if $ac_cs_awk_getline; then
d0ac1c44 19439 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 19440else
d0ac1c44
SM
19441 $AWK -f "$ac_tmp/subs.awk" | $SHELL
19442fi \
19443 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19444
19445test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
19446 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19447 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19448 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 19449 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19450which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 19451$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19452which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 19453
d0ac1c44 19454 rm -f "$ac_tmp/stdin"
bec39cab 19455 case $ac_file in
d0ac1c44
SM
19456 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19457 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 19458 esac \
d0ac1c44 19459 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19460 ;;
19461 :H)
19462 #
19463 # CONFIG_HEADER
19464 #
bec39cab 19465 if test x"$ac_file" != x-; then
81ecdfbb
RW
19466 {
19467 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19468 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19469 } >"$ac_tmp/config.h" \
19470 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19471 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
19472 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19473$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 19474 else
81ecdfbb 19475 rm -f "$ac_file"
d0ac1c44
SM
19476 mv "$ac_tmp/config.h" "$ac_file" \
19477 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
19478 fi
19479 else
81ecdfbb 19480 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19481 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19482 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 19483 fi
81ecdfbb
RW
19484 ;;
19485 :L)
19486 #
19487 # CONFIG_LINK
19488 #
c906108c 19489
81ecdfbb
RW
19490 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19491 :
b4e70030 19492 else
81ecdfbb
RW
19493 # Prefer the file from the source tree if names are identical.
19494 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19495 ac_source=$srcdir/$ac_source
19496 fi
b4e70030 19497
81ecdfbb
RW
19498 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19499$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 19500
81ecdfbb 19501 if test ! -r "$ac_source"; then
d0ac1c44 19502 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
19503 fi
19504 rm -f "$ac_file"
bec39cab 19505
81ecdfbb 19506 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 19507 case $ac_source in
81ecdfbb
RW
19508 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19509 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19510 esac
19511 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19512 ln "$ac_source" "$ac_file" 2>/dev/null ||
19513 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 19514 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
19515 fi
19516 ;;
19517 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19518$as_echo "$as_me: executing $ac_file commands" >&6;}
19519 ;;
c906108c 19520 esac
b4e70030 19521
bec39cab 19522
81ecdfbb 19523 case $ac_file$ac_mode in
c5adaa19 19524 "config.h":H) echo > stamp-h ;;
81ecdfbb 19525 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 19526 "nm.h":L) echo > stamp-nmh ;;
b292c783 19527 "gcore":F) chmod +x gcore ;;
81ecdfbb 19528
bec39cab 19529 esac
81ecdfbb 19530done # for ac_tag
c906108c 19531
bec39cab 19532
81ecdfbb 19533as_fn_exit 0
bec39cab 19534_ACEOF
bec39cab
AC
19535ac_clean_files=$ac_clean_files_save
19536
81ecdfbb 19537test $ac_write_fail = 0 ||
d0ac1c44 19538 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 19539
bec39cab
AC
19540
19541# configure is writing to config.log, and then calls config.status.
19542# config.status does its own redirection, appending to config.log.
19543# Unfortunately, on DOS this fails, as config.log is still kept open
19544# by configure, so config.status won't be able to write to it; its
19545# output is simply discarded. So we exec the FD to /dev/null,
19546# effectively closing config.log, so it can be properly (re)opened and
19547# appended to by config.status. When coming back to configure, we
19548# need to make the FD available again.
19549if test "$no_create" != yes; then
19550 ac_cs_success=:
19551 ac_config_status_args=
19552 test "$silent" = yes &&
19553 ac_config_status_args="$ac_config_status_args --quiet"
19554 exec 5>/dev/null
19555 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19556 exec 5>>config.log
19557 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19558 # would make configure fail if this is the last instruction.
d0ac1c44 19559 $ac_cs_success || as_fn_exit 1
bec39cab 19560fi
c906108c 19561
bec39cab 19562#
81ecdfbb 19563# CONFIG_SUBDIRS section.
bec39cab 19564#
c906108c
SS
19565if test "$no_recursion" != yes; then
19566
81ecdfbb
RW
19567 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19568 # so they do not pile up.
c906108c
SS
19569 ac_sub_configure_args=
19570 ac_prev=
fdc59709
PB
19571 eval "set x $ac_configure_args"
19572 shift
19573 for ac_arg
19574 do
c906108c
SS
19575 if test -n "$ac_prev"; then
19576 ac_prev=
19577 continue
19578 fi
bec39cab 19579 case $ac_arg in
c906108c
SS
19580 -cache-file | --cache-file | --cache-fil | --cache-fi \
19581 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19582 ac_prev=cache_file ;;
19583 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19584 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19585 | --c=*)
19586 ;;
19587 --config-cache | -C)
c906108c
SS
19588 ;;
19589 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19590 ac_prev=srcdir ;;
19591 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19592 ;;
bec39cab
AC
19593 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19594 ac_prev=prefix ;;
19595 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19596 ;;
81ecdfbb
RW
19597 --disable-option-checking)
19598 ;;
fdc59709
PB
19599 *)
19600 case $ac_arg in
81ecdfbb 19601 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19602 esac
81ecdfbb 19603 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19604 esac
19605 done
19606
bec39cab
AC
19607 # Always prepend --prefix to ensure using the same prefix
19608 # in subdir configurations.
fdc59709
PB
19609 ac_arg="--prefix=$prefix"
19610 case $ac_arg in
81ecdfbb 19611 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19612 esac
81ecdfbb
RW
19613 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19614
19615 # Pass --silent
19616 if test "$silent" = yes; then
19617 ac_sub_configure_args="--silent $ac_sub_configure_args"
19618 fi
19619
19620 # Always prepend --disable-option-checking to silence warnings, since
19621 # different subdirs can have different --enable and --with options.
19622 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19623
b4e70030 19624 ac_popdir=`pwd`
bec39cab 19625 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19626
19627 # Do not complain, so a configure script can configure whichever
19628 # parts of a large source tree are present.
fdc59709 19629 test -d "$srcdir/$ac_dir" || continue
c906108c 19630
81ecdfbb
RW
19631 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19632 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19633 $as_echo "$ac_msg" >&6
19634 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19635 ac_builddir=.
19636
81ecdfbb
RW
19637case "$ac_dir" in
19638.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19639*)
19640 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19641 # A ".." for each directory in $ac_dir_suffix.
19642 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19643 case $ac_top_builddir_sub in
19644 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19645 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19646 esac ;;
19647esac
19648ac_abs_top_builddir=$ac_pwd
19649ac_abs_builddir=$ac_pwd$ac_dir_suffix
19650# for backward compatibility:
19651ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19652
19653case $srcdir in
81ecdfbb 19654 .) # We are building in place.
bec39cab 19655 ac_srcdir=.
81ecdfbb
RW
19656 ac_top_srcdir=$ac_top_builddir_sub
19657 ac_abs_top_srcdir=$ac_pwd ;;
19658 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19659 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19660 ac_top_srcdir=$srcdir
19661 ac_abs_top_srcdir=$srcdir ;;
19662 *) # Relative name.
19663 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19664 ac_top_srcdir=$ac_top_build_prefix$srcdir
19665 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19666esac
81ecdfbb 19667ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19668
c906108c 19669
fdc59709 19670 cd "$ac_dir"
c906108c
SS
19671
19672 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19673 if test -f "$ac_srcdir/configure.gnu"; then
19674 ac_sub_configure=$ac_srcdir/configure.gnu
19675 elif test -f "$ac_srcdir/configure"; then
19676 ac_sub_configure=$ac_srcdir/configure
19677 elif test -f "$ac_srcdir/configure.in"; then
19678 # This should be Cygnus configure.
19679 ac_sub_configure=$ac_aux_dir/configure
c906108c 19680 else
81ecdfbb
RW
19681 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19682$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19683 ac_sub_configure=
19684 fi
19685
19686 # The recursion is here.
19687 if test -n "$ac_sub_configure"; then
c906108c 19688 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19689 case $cache_file in
19690 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19691 *) # Relative name.
19692 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19693 esac
c906108c 19694
81ecdfbb
RW
19695 { $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
19696$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19697 # The eval makes quoting arguments work.
fdc59709
PB
19698 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19699 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 19700 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19701 fi
19702
fdc59709 19703 cd "$ac_popdir"
c906108c
SS
19704 done
19705fi
81ecdfbb
RW
19706if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19707 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19708$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19709fi
c906108c 19710
This page took 4.967246 seconds and 4 git commands to generate.