Move gnulib to top level
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 90as_myself=
81ecdfbb
RW
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
81ecdfbb
RW
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 211do
81ecdfbb
RW
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
81ecdfbb
RW
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 266 else
81ecdfbb
RW
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
bec39cab 271 fi
81ecdfbb
RW
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
bec39cab 301
81ecdfbb
RW
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
81ecdfbb
RW
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
81ecdfbb
RW
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
421 as_expr=expr
422else
423 as_expr=false
424fi
425
81ecdfbb 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
427 as_basename=basename
428else
429 as_basename=false
430fi
431
81ecdfbb
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
bec39cab 437
81ecdfbb 438as_me=`$as_basename -- "$0" ||
bec39cab
AC
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
bec39cab 456
b4e70030
JB
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 463
bec39cab 464
81ecdfbb
RW
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
bec39cab 474 sed '
81ecdfbb
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
bec39cab 479 N
81ecdfbb
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 482 t loop
81ecdfbb 483 s/-\n.*//
bec39cab 484 ' >$as_me.lineno &&
81ecdfbb
RW
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab 487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
bec39cab
AC
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
bec39cab
AC
496 # Exit status is that of the last command.
497 exit
498}
499
81ecdfbb
RW
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
bec39cab
AC
511esac
512
81ecdfbb
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
bec39cab 516else
81ecdfbb
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
bec39cab 519fi
81ecdfbb
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 522 as_ln_s='ln -s'
81ecdfbb
RW
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
81ecdfbb 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
81ecdfbb
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
b4e70030 533 fi
bec39cab 534else
d0ac1c44 535 as_ln_s='cp -pR'
bec39cab 536fi
81ecdfbb
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
bec39cab
AC
539
540if mkdir -p . 2>/dev/null; then
81ecdfbb 541 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
bec39cab
AC
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c906108c 559
bec39cab 560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
bec39cab
AC
565#
566# Initializations.
567#
c906108c 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
b4e70030 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab
AC
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
81ecdfbb 622enable_option_checking=no
d0ac1c44 623ac_header_list=
c971b7fa 624ac_subst_vars='LTLIBOBJS
81ecdfbb 625LIBOBJS
b292c783
JK
626GCORE_TRANSFORM_NAME
627GDB_TRANSFORM_NAME
e3487908 628XSLTPROC
81ecdfbb 629GDB_NM_FILE
393fd4c3
YQ
630LTLIBBABELTRACE
631LIBBABELTRACE
632HAVE_LIBBABELTRACE
21ea5acd
SDJ
633HAVE_NATIVE_GCORE_HOST
634NAT_GENERATED_FILES
635XM_CLIBS
636MH_CFLAGS
637LOADLIBES
638NAT_CDEPS
639NATDEPFILES
640NAT_FILE
81ecdfbb
RW
641target_subdir
642CONFIG_UNINSTALL
643CONFIG_INSTALL
644CONFIG_CLEAN
645CONFIG_ALL
646CONFIG_SRCS
647CONFIG_DEPS
648CONFIG_OBS
649PROFILE_CFLAGS
650ENABLE_CFLAGS
651SIM_OBS
652SIM
653XMKMF
654GDBTK_SRC_DIR
655GDBTK_CFLAGS
656GDBTKLIBS
657X_LIBS
658X_LDFLAGS
659X_CFLAGS
660TK_XINCLUDES
661TK_DEPS
662TK_LIBRARY
663TK_INCLUDE
664TK_STUB_LIB_SPEC
665TK_STUB_LIB_FLAG
666TK_STUB_LIB_FILE
667TK_LIB_SPEC
668TK_LIB_FLAG
669TK_LIB_FILE
670TK_SRC_DIR
671TK_BIN_DIR
672TK_VERSION
673TCL_DEPS
674TCL_LIBRARY
675TCL_INCLUDE
676TCL_STUB_LIB_SPEC
677TCL_STUB_LIB_FLAG
678TCL_STUB_LIB_FILE
679TCL_LIB_SPEC
680TCL_LIB_FLAG
681TCL_LIB_FILE
682TCL_SRC_DIR
683TCL_BIN_DIR
684TCL_PATCH_LEVEL
685TCL_VERSION
686WIN32LDAPP
687GUI_CFLAGS_X
688LIBGUI
608e2dbb
TT
689LTLIBLZMA
690LIBLZMA
691HAVE_LIBLZMA
81ecdfbb
RW
692WIN32LIBS
693SER_HARDWIRE
694WERROR_CFLAGS
695WARN_CFLAGS
696SYSTEM_GDBINIT
81ecdfbb
RW
697TARGET_SYSTEM_ROOT
698CONFIG_LDFLAGS
f6528abd 699RDYNAMIC
81ecdfbb 700ALLOCA
58bfce93
MM
701LTLIBIPT
702LIBIPT
703HAVE_LIBIPT
62f29fda
TT
704SRCHIGH_CFLAGS
705SRCHIGH_LIBS
4df42755
DE
706HAVE_GUILE_FALSE
707HAVE_GUILE_TRUE
ed3ef339
DE
708GUILE_LIBS
709GUILE_CPPFLAGS
e76c5d17
DE
710GUILD_TARGET_FLAG
711GUILD
ed3ef339 712pkg_config_prog_path
4df42755
DE
713HAVE_PYTHON_FALSE
714HAVE_PYTHON_TRUE
ac534cba
JB
715PYTHON_LIBS
716PYTHON_CPPFLAGS
81ecdfbb 717PYTHON_CFLAGS
ec685c5e 718python_prog_path
2400729e
UW
719LTLIBMPFR
720LIBMPFR
721HAVE_LIBMPFR
81ecdfbb
RW
722LTLIBEXPAT
723LIBEXPAT
724HAVE_LIBEXPAT
b8e0a31c 725JIT_READER_DIR
f997c383 726TARGET_PTR
39037522 727READLINE_TEXI_INCFLAG
81ecdfbb
RW
728READLINE_CFLAGS
729READLINE_DEPS
730READLINE
016a3251
DD
731LTLIBICONV
732LIBICONV
711a72d3
L
733zlibinc
734zlibdir
81ecdfbb
RW
735MIG
736WINDRES
737DLLTOOL
c971b7fa 738AR
81ecdfbb
RW
739YFLAGS
740YACC
c971b7fa 741RANLIB
81ecdfbb 742LN_S
c971b7fa
PA
743INSTALL_DATA
744INSTALL_SCRIPT
745INSTALL_PROGRAM
746AWK
81ecdfbb
RW
747REPORT_BUGS_TEXI
748REPORT_BUGS_TO
749PKGVERSION
44cee4fd 750CODESIGN_CERT
b292c783 751HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
752TARGET_OBS
753subdirs
754GDB_DATADIR
755DEBUGDIR
5048e516
JK
756MAKEINFO_EXTRA_FLAGS
757MAKEINFOFLAGS
758MAKEINFO
81ecdfbb 759PACKAGE
81ecdfbb
RW
760CATOBJEXT
761GENCAT
762INSTOBJEXT
763DATADIRNAME
764CATALOGS
765POSUB
766GMSGFMT
767XGETTEXT
768INCINTL
769LIBINTL_DEP
770LIBINTL
771USE_NLS
81ecdfbb
RW
772CCDEPMODE
773DEPDIR
774am__leading_dot
0bcda685
PA
775CXX_DIALECT
776HAVE_CXX11
4869db5e
RM
777INSTALL_STRIP_PROGRAM
778STRIP
779install_sh
81ecdfbb
RW
780target_os
781target_vendor
782target_cpu
783target
784host_os
785host_vendor
786host_cpu
787host
788build_os
789build_vendor
790build_cpu
791build
c971b7fa
PA
792EGREP
793GREP
794CPP
3bc3d82a
PA
795ac_ct_CXX
796CXXFLAGS
797CXX
81ecdfbb
RW
798OBJEXT
799EXEEXT
800ac_ct_CC
801CPPFLAGS
802LDFLAGS
803CFLAGS
804CC
805MAINT
806MAINTAINER_MODE_FALSE
807MAINTAINER_MODE_TRUE
808target_alias
809host_alias
810build_alias
811LIBS
812ECHO_T
813ECHO_N
814ECHO_C
815DEFS
816mandir
817localedir
818libdir
819psdir
820pdfdir
821dvidir
822htmldir
823infodir
824docdir
825oldincludedir
826includedir
827localstatedir
828sharedstatedir
829sysconfdir
830datadir
831datarootdir
832libexecdir
833sbindir
834bindir
835program_transform_name
836prefix
837exec_prefix
838PACKAGE_URL
839PACKAGE_BUGREPORT
840PACKAGE_STRING
841PACKAGE_VERSION
842PACKAGE_TARNAME
843PACKAGE_NAME
844PATH_SEPARATOR
845SHELL'
2b351b19 846ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
847ac_user_opts='
848enable_option_checking
849enable_maintainer_mode
da2f07f1
JK
850enable_plugins
851enable_largefile
81ecdfbb
RW
852with_separate_debug_dir
853with_gdb_datadir
854with_relocated_sources
7349ff92 855with_auto_load_dir
bccbefd2 856with_auto_load_safe_path
81ecdfbb
RW
857enable_targets
858enable_64_bit_bfd
81ecdfbb
RW
859enable_gdbmi
860enable_tui
861enable_gdbtk
05e7c244 862with_libunwind_ia64
81ecdfbb
RW
863with_curses
864enable_profiling
44cee4fd 865enable_codesign
81ecdfbb
RW
866with_pkgversion
867with_bugurl
711a72d3 868with_system_zlib
016a3251
DD
869with_gnu_ld
870enable_rpath
81ecdfbb 871with_libiconv_prefix
478aac75 872with_iconv_bin
81ecdfbb 873with_system_readline
b8e0a31c 874with_jit_reader_dir
81ecdfbb 875with_expat
81ecdfbb 876with_libexpat_prefix
2400729e
UW
877with_mpfr
878with_libmpfr_prefix
81ecdfbb 879with_python
ed3ef339 880with_guile
189b8c2e 881enable_source_highlight
a8db4212 882enable_libmcheck
58bfce93
MM
883with_intel_pt
884with_libipt_prefix
81ecdfbb
RW
885with_included_regex
886with_sysroot
887with_system_gdbinit
888enable_werror
889enable_build_warnings
890enable_gdb_build_warnings
f35d5ade 891enable_ubsan
608e2dbb
TT
892with_lzma
893with_liblzma_prefix
81ecdfbb
RW
894with_tcl
895with_tk
896with_x
897enable_sim
496c0e1b 898enable_gdbserver
393fd4c3
YQ
899with_babeltrace
900with_libbabeltrace_prefix
8ecfd7bd 901enable_unit_tests
81ecdfbb
RW
902'
903 ac_precious_vars='build_alias
904host_alias
905target_alias
906CC
907CFLAGS
908LDFLAGS
909LIBS
910CPPFLAGS
3bc3d82a
PA
911CXX
912CXXFLAGS
913CCC
81ecdfbb 914CPP
f06e05e0
JK
915MAKEINFO
916MAKEINFOFLAGS
81ecdfbb
RW
917YACC
918YFLAGS
919XMKMF'
5ae98d25 920ac_subdirs_all='testsuite
81ecdfbb 921gdbtk
81ecdfbb 922gdbserver'
c906108c
SS
923
924# Initialize some variables set by options.
bec39cab
AC
925ac_init_help=
926ac_init_version=false
81ecdfbb
RW
927ac_unrecognized_opts=
928ac_unrecognized_sep=
c906108c
SS
929# The variables have the same names as the options, with
930# dashes changed to underlines.
bec39cab 931cache_file=/dev/null
c906108c 932exec_prefix=NONE
c906108c 933no_create=
c906108c
SS
934no_recursion=
935prefix=NONE
936program_prefix=NONE
937program_suffix=NONE
938program_transform_name=s,x,x,
939silent=
940site=
941srcdir=
c906108c
SS
942verbose=
943x_includes=NONE
944x_libraries=NONE
bec39cab
AC
945
946# Installation directory options.
947# These are left unexpanded so users can "make install exec_prefix=/foo"
948# and all the variables that are supposed to be based on exec_prefix
949# by default will actually change.
950# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 951# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
952bindir='${exec_prefix}/bin'
953sbindir='${exec_prefix}/sbin'
954libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
955datarootdir='${prefix}/share'
956datadir='${datarootdir}'
c906108c
SS
957sysconfdir='${prefix}/etc'
958sharedstatedir='${prefix}/com'
959localstatedir='${prefix}/var'
c906108c
SS
960includedir='${prefix}/include'
961oldincludedir='/usr/include'
81ecdfbb
RW
962docdir='${datarootdir}/doc/${PACKAGE}'
963infodir='${datarootdir}/info'
964htmldir='${docdir}'
965dvidir='${docdir}'
966pdfdir='${docdir}'
967psdir='${docdir}'
968libdir='${exec_prefix}/lib'
969localedir='${datarootdir}/locale'
970mandir='${datarootdir}/man'
c906108c 971
c906108c 972ac_prev=
81ecdfbb 973ac_dashdash=
c906108c
SS
974for ac_option
975do
c906108c
SS
976 # If the previous option needs an argument, assign it.
977 if test -n "$ac_prev"; then
81ecdfbb 978 eval $ac_prev=\$ac_option
c906108c
SS
979 ac_prev=
980 continue
981 fi
982
81ecdfbb 983 case $ac_option in
d0ac1c44
SM
984 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
985 *=) ac_optarg= ;;
986 *) ac_optarg=yes ;;
81ecdfbb 987 esac
c906108c
SS
988
989 # Accept the important Cygnus configure options, so we can diagnose typos.
990
81ecdfbb
RW
991 case $ac_dashdash$ac_option in
992 --)
993 ac_dashdash=yes ;;
c906108c
SS
994
995 -bindir | --bindir | --bindi | --bind | --bin | --bi)
996 ac_prev=bindir ;;
997 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 998 bindir=$ac_optarg ;;
c906108c
SS
999
1000 -build | --build | --buil | --bui | --bu)
bec39cab 1001 ac_prev=build_alias ;;
c906108c 1002 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1003 build_alias=$ac_optarg ;;
c906108c
SS
1004
1005 -cache-file | --cache-file | --cache-fil | --cache-fi \
1006 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1007 ac_prev=cache_file ;;
1008 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1009 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1010 cache_file=$ac_optarg ;;
1011
1012 --config-cache | -C)
1013 cache_file=config.cache ;;
c906108c 1014
81ecdfbb 1015 -datadir | --datadir | --datadi | --datad)
c906108c 1016 ac_prev=datadir ;;
81ecdfbb 1017 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1018 datadir=$ac_optarg ;;
c906108c 1019
81ecdfbb
RW
1020 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1021 | --dataroo | --dataro | --datar)
1022 ac_prev=datarootdir ;;
1023 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1024 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1025 datarootdir=$ac_optarg ;;
1026
c906108c 1027 -disable-* | --disable-*)
81ecdfbb 1028 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1029 # Reject names that are not valid shell variable names.
81ecdfbb 1030 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1031 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1032 ac_useropt_orig=$ac_useropt
1033 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1034 case $ac_user_opts in
1035 *"
1036"enable_$ac_useropt"
1037"*) ;;
1038 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1039 ac_unrecognized_sep=', ';;
1040 esac
1041 eval enable_$ac_useropt=no ;;
1042
1043 -docdir | --docdir | --docdi | --doc | --do)
1044 ac_prev=docdir ;;
1045 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1046 docdir=$ac_optarg ;;
1047
1048 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1049 ac_prev=dvidir ;;
1050 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1051 dvidir=$ac_optarg ;;
c906108c
SS
1052
1053 -enable-* | --enable-*)
81ecdfbb 1054 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1055 # Reject names that are not valid shell variable names.
81ecdfbb 1056 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1057 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1058 ac_useropt_orig=$ac_useropt
1059 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1060 case $ac_user_opts in
1061 *"
1062"enable_$ac_useropt"
1063"*) ;;
1064 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1065 ac_unrecognized_sep=', ';;
b4e70030 1066 esac
81ecdfbb 1067 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1068
1069 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1070 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1071 | --exec | --exe | --ex)
1072 ac_prev=exec_prefix ;;
1073 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1074 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1075 | --exec=* | --exe=* | --ex=*)
bec39cab 1076 exec_prefix=$ac_optarg ;;
c906108c
SS
1077
1078 -gas | --gas | --ga | --g)
1079 # Obsolete; use --with-gas.
1080 with_gas=yes ;;
1081
bec39cab
AC
1082 -help | --help | --hel | --he | -h)
1083 ac_init_help=long ;;
1084 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1085 ac_init_help=recursive ;;
1086 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1087 ac_init_help=short ;;
c906108c
SS
1088
1089 -host | --host | --hos | --ho)
bec39cab 1090 ac_prev=host_alias ;;
c906108c 1091 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1092 host_alias=$ac_optarg ;;
c906108c 1093
81ecdfbb
RW
1094 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1095 ac_prev=htmldir ;;
1096 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1097 | --ht=*)
1098 htmldir=$ac_optarg ;;
1099
c906108c
SS
1100 -includedir | --includedir | --includedi | --included | --include \
1101 | --includ | --inclu | --incl | --inc)
1102 ac_prev=includedir ;;
1103 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1104 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1105 includedir=$ac_optarg ;;
c906108c
SS
1106
1107 -infodir | --infodir | --infodi | --infod | --info | --inf)
1108 ac_prev=infodir ;;
1109 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1110 infodir=$ac_optarg ;;
c906108c
SS
1111
1112 -libdir | --libdir | --libdi | --libd)
1113 ac_prev=libdir ;;
1114 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1115 libdir=$ac_optarg ;;
c906108c
SS
1116
1117 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1118 | --libexe | --libex | --libe)
1119 ac_prev=libexecdir ;;
1120 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1121 | --libexe=* | --libex=* | --libe=*)
bec39cab 1122 libexecdir=$ac_optarg ;;
c906108c 1123
81ecdfbb
RW
1124 -localedir | --localedir | --localedi | --localed | --locale)
1125 ac_prev=localedir ;;
1126 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1127 localedir=$ac_optarg ;;
1128
c906108c 1129 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1130 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1131 ac_prev=localstatedir ;;
1132 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1133 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1134 localstatedir=$ac_optarg ;;
c906108c
SS
1135
1136 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1137 ac_prev=mandir ;;
1138 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1139 mandir=$ac_optarg ;;
c906108c
SS
1140
1141 -nfp | --nfp | --nf)
1142 # Obsolete; use --without-fp.
1143 with_fp=no ;;
1144
1145 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1146 | --no-cr | --no-c | -n)
c906108c
SS
1147 no_create=yes ;;
1148
1149 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1150 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1151 no_recursion=yes ;;
1152
1153 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1154 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1155 | --oldin | --oldi | --old | --ol | --o)
1156 ac_prev=oldincludedir ;;
1157 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1158 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1159 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1160 oldincludedir=$ac_optarg ;;
c906108c
SS
1161
1162 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1163 ac_prev=prefix ;;
1164 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1165 prefix=$ac_optarg ;;
c906108c
SS
1166
1167 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1168 | --program-pre | --program-pr | --program-p)
1169 ac_prev=program_prefix ;;
1170 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1171 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1172 program_prefix=$ac_optarg ;;
c906108c
SS
1173
1174 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1175 | --program-suf | --program-su | --program-s)
1176 ac_prev=program_suffix ;;
1177 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1178 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1179 program_suffix=$ac_optarg ;;
c906108c
SS
1180
1181 -program-transform-name | --program-transform-name \
1182 | --program-transform-nam | --program-transform-na \
1183 | --program-transform-n | --program-transform- \
1184 | --program-transform | --program-transfor \
1185 | --program-transfo | --program-transf \
1186 | --program-trans | --program-tran \
1187 | --progr-tra | --program-tr | --program-t)
1188 ac_prev=program_transform_name ;;
1189 -program-transform-name=* | --program-transform-name=* \
1190 | --program-transform-nam=* | --program-transform-na=* \
1191 | --program-transform-n=* | --program-transform-=* \
1192 | --program-transform=* | --program-transfor=* \
1193 | --program-transfo=* | --program-transf=* \
1194 | --program-trans=* | --program-tran=* \
1195 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1196 program_transform_name=$ac_optarg ;;
c906108c 1197
81ecdfbb
RW
1198 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1199 ac_prev=pdfdir ;;
1200 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1201 pdfdir=$ac_optarg ;;
1202
1203 -psdir | --psdir | --psdi | --psd | --ps)
1204 ac_prev=psdir ;;
1205 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1206 psdir=$ac_optarg ;;
1207
c906108c
SS
1208 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1209 | -silent | --silent | --silen | --sile | --sil)
1210 silent=yes ;;
1211
1212 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1213 ac_prev=sbindir ;;
1214 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1215 | --sbi=* | --sb=*)
bec39cab 1216 sbindir=$ac_optarg ;;
c906108c
SS
1217
1218 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1219 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1220 | --sharedst | --shareds | --shared | --share | --shar \
1221 | --sha | --sh)
1222 ac_prev=sharedstatedir ;;
1223 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1224 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1225 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1226 | --sha=* | --sh=*)
bec39cab 1227 sharedstatedir=$ac_optarg ;;
c906108c
SS
1228
1229 -site | --site | --sit)
1230 ac_prev=site ;;
1231 -site=* | --site=* | --sit=*)
bec39cab 1232 site=$ac_optarg ;;
3ace7edb 1233
c906108c
SS
1234 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1235 ac_prev=srcdir ;;
1236 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1237 srcdir=$ac_optarg ;;
c906108c
SS
1238
1239 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1240 | --syscon | --sysco | --sysc | --sys | --sy)
1241 ac_prev=sysconfdir ;;
1242 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1243 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1244 sysconfdir=$ac_optarg ;;
c906108c
SS
1245
1246 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1247 ac_prev=target_alias ;;
c906108c 1248 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1249 target_alias=$ac_optarg ;;
c906108c
SS
1250
1251 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1252 verbose=yes ;;
1253
bec39cab
AC
1254 -version | --version | --versio | --versi | --vers | -V)
1255 ac_init_version=: ;;
c906108c
SS
1256
1257 -with-* | --with-*)
81ecdfbb 1258 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1259 # Reject names that are not valid shell variable names.
81ecdfbb 1260 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1261 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1262 ac_useropt_orig=$ac_useropt
1263 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1264 case $ac_user_opts in
1265 *"
1266"with_$ac_useropt"
1267"*) ;;
1268 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1269 ac_unrecognized_sep=', ';;
b4e70030 1270 esac
81ecdfbb 1271 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1272
1273 -without-* | --without-*)
81ecdfbb 1274 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1275 # Reject names that are not valid shell variable names.
81ecdfbb 1276 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1277 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1278 ac_useropt_orig=$ac_useropt
1279 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1280 case $ac_user_opts in
1281 *"
1282"with_$ac_useropt"
1283"*) ;;
1284 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1285 ac_unrecognized_sep=', ';;
1286 esac
1287 eval with_$ac_useropt=no ;;
c906108c
SS
1288
1289 --x)
1290 # Obsolete; use --with-x.
1291 with_x=yes ;;
1292
1293 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1294 | --x-incl | --x-inc | --x-in | --x-i)
1295 ac_prev=x_includes ;;
1296 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1297 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1298 x_includes=$ac_optarg ;;
c906108c
SS
1299
1300 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1301 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1302 ac_prev=x_libraries ;;
1303 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1304 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1305 x_libraries=$ac_optarg ;;
c906108c 1306
d0ac1c44
SM
1307 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1308Try \`$0 --help' for more information"
c906108c
SS
1309 ;;
1310
bec39cab
AC
1311 *=*)
1312 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1313 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1314 case $ac_envvar in #(
1315 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1316 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1317 esac
1318 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1319 export $ac_envvar ;;
1320
c906108c 1321 *)
bec39cab 1322 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1323 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1324 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1325 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1326 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1327 ;;
1328
1329 esac
1330done
1331
1332if test -n "$ac_prev"; then
bec39cab 1333 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1334 as_fn_error $? "missing argument to $ac_option"
c906108c 1335fi
c906108c 1336
81ecdfbb
RW
1337if test -n "$ac_unrecognized_opts"; then
1338 case $enable_option_checking in
1339 no) ;;
d0ac1c44 1340 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1341 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1342 esac
81ecdfbb 1343fi
b4e70030 1344
81ecdfbb
RW
1345# Check all directory arguments for consistency.
1346for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1347 datadir sysconfdir sharedstatedir localstatedir includedir \
1348 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1349 libdir localedir mandir
b4e70030 1350do
81ecdfbb
RW
1351 eval ac_val=\$$ac_var
1352 # Remove trailing slashes.
1353 case $ac_val in
1354 */ )
1355 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1356 eval $ac_var=\$ac_val;;
1357 esac
1358 # Be sure to have absolute directory names.
b4e70030 1359 case $ac_val in
81ecdfbb
RW
1360 [\\/$]* | ?:[\\/]* ) continue;;
1361 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1362 esac
d0ac1c44 1363 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1364done
1365
bec39cab
AC
1366# There might be people who depend on the old broken behavior: `$host'
1367# used to hold the argument of --host etc.
1368# FIXME: To remove some day.
1369build=$build_alias
1370host=$host_alias
1371target=$target_alias
1372
1373# FIXME: To remove some day.
1374if test "x$host_alias" != x; then
1375 if test "x$build_alias" = x; then
1376 cross_compiling=maybe
bec39cab
AC
1377 elif test "x$build_alias" != "x$host_alias"; then
1378 cross_compiling=yes
1379 fi
1380fi
c906108c 1381
bec39cab
AC
1382ac_tool_prefix=
1383test -n "$host_alias" && ac_tool_prefix=$host_alias-
1384
1385test "$silent" = yes && exec 6>/dev/null
c906108c 1386
c906108c 1387
81ecdfbb
RW
1388ac_pwd=`pwd` && test -n "$ac_pwd" &&
1389ac_ls_di=`ls -di .` &&
1390ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1391 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1392test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1393 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1394
1395
c906108c
SS
1396# Find the source files, if location was not specified.
1397if test -z "$srcdir"; then
1398 ac_srcdir_defaulted=yes
81ecdfbb
RW
1399 # Try the directory containing this script, then the parent directory.
1400 ac_confdir=`$as_dirname -- "$as_myself" ||
1401$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1402 X"$as_myself" : 'X\(//\)[^/]' \| \
1403 X"$as_myself" : 'X\(//\)$' \| \
1404 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1405$as_echo X"$as_myself" |
1406 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1407 s//\1/
1408 q
1409 }
1410 /^X\(\/\/\)[^/].*/{
1411 s//\1/
1412 q
1413 }
1414 /^X\(\/\/\)$/{
1415 s//\1/
1416 q
1417 }
1418 /^X\(\/\).*/{
1419 s//\1/
1420 q
1421 }
1422 s/.*/./; q'`
c906108c 1423 srcdir=$ac_confdir
81ecdfbb 1424 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1425 srcdir=..
1426 fi
1427else
1428 ac_srcdir_defaulted=no
1429fi
81ecdfbb
RW
1430if test ! -r "$srcdir/$ac_unique_file"; then
1431 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1432 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1433fi
1434ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1435ac_abs_confdir=`(
d0ac1c44 1436 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1437 pwd)`
1438# When building in place, set srcdir=.
1439if test "$ac_abs_confdir" = "$ac_pwd"; then
1440 srcdir=.
1441fi
1442# Remove unnecessary trailing slashes from srcdir.
1443# Double slashes in file names in object file debugging info
1444# mess up M-x gdb in Emacs.
1445case $srcdir in
1446*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1447esac
1448for ac_var in $ac_precious_vars; do
1449 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1450 eval ac_env_${ac_var}_value=\$${ac_var}
1451 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1452 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1453done
c906108c 1454
bec39cab
AC
1455#
1456# Report the --help message.
1457#
1458if test "$ac_init_help" = "long"; then
1459 # Omit some internal or obsolete options to make the list less imposing.
1460 # This message is too long to be a string in the A/UX 3.1 sh.
1461 cat <<_ACEOF
1462\`configure' configures this package to adapt to many kinds of systems.
1463
1464Usage: $0 [OPTION]... [VAR=VALUE]...
1465
1466To assign environment variables (e.g., CC, CFLAGS...), specify them as
1467VAR=VALUE. See below for descriptions of some of the useful variables.
1468
1469Defaults for the options are specified in brackets.
1470
1471Configuration:
1472 -h, --help display this help and exit
1473 --help=short display options specific to this package
1474 --help=recursive display the short help of all the included packages
1475 -V, --version display version information and exit
d0ac1c44 1476 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1477 --cache-file=FILE cache test results in FILE [disabled]
1478 -C, --config-cache alias for \`--cache-file=config.cache'
1479 -n, --no-create do not create output files
1480 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1481
bec39cab
AC
1482Installation directories:
1483 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1484 [$ac_default_prefix]
bec39cab 1485 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1486 [PREFIX]
bec39cab
AC
1487
1488By default, \`make install' will install all the files in
1489\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1490an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1491for instance \`--prefix=\$HOME'.
1492
1493For better control, use the options below.
1494
1495Fine tuning of the installation directories:
81ecdfbb
RW
1496 --bindir=DIR user executables [EPREFIX/bin]
1497 --sbindir=DIR system admin executables [EPREFIX/sbin]
1498 --libexecdir=DIR program executables [EPREFIX/libexec]
1499 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1500 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1501 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1502 --libdir=DIR object code libraries [EPREFIX/lib]
1503 --includedir=DIR C header files [PREFIX/include]
1504 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1505 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1506 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1507 --infodir=DIR info documentation [DATAROOTDIR/info]
1508 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1509 --mandir=DIR man documentation [DATAROOTDIR/man]
1510 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1511 --htmldir=DIR html documentation [DOCDIR]
1512 --dvidir=DIR dvi documentation [DOCDIR]
1513 --pdfdir=DIR pdf documentation [DOCDIR]
1514 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1515_ACEOF
1516
1517 cat <<\_ACEOF
1518
9009e1ae
MR
1519Program names:
1520 --program-prefix=PREFIX prepend PREFIX to installed program names
1521 --program-suffix=SUFFIX append SUFFIX to installed program names
1522 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1523
bec39cab
AC
1524X features:
1525 --x-includes=DIR X include files are in DIR
1526 --x-libraries=DIR X library files are in DIR
1527
1528System types:
1529 --build=BUILD configure for building on BUILD [guessed]
1530 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1531 --target=TARGET configure for building compilers for TARGET [HOST]
1532_ACEOF
1533fi
1534
1535if test -n "$ac_init_help"; then
1536
1537 cat <<\_ACEOF
1538
1539Optional Features:
81ecdfbb 1540 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1541 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1542 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1543 --enable-maintainer-mode
1544 enable make rules and dependencies not useful (and
1545 sometimes confusing) to the casual installer
2974be62 1546 --enable-plugins Enable support for plugins
da2f07f1 1547 --disable-largefile omit support for large files
a1220294
TT
1548 --enable-targets=TARGETS
1549 alternative target configurations
c0993dbe 1550 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1551 --disable-gdbmi disable machine-interface (MI)
1552 --enable-tui enable full-screen terminal user interface (TUI)
1553 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1554 --enable-profiling enable profiling of GDB
44cee4fd 1555 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1556 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1557 --enable-source-highlight
1558 enable source-highlight for source listings
17ef446e 1559 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1560 --enable-werror treat compile warnings as errors
32c1c914 1561 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1562 --enable-gdb-build-warnings
32c1c914 1563 enable GDB specific build-time compiler warnings if
a1220294 1564 gcc is used
f35d5ade 1565 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1566 --enable-sim link gdb with simulator
496c0e1b
JB
1567 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1568 is auto)
8ecfd7bd
SDJ
1569 --enable-unit-tests Enable the inclusion of unit tests when compiling
1570 GDB
bec39cab
AC
1571
1572Optional Packages:
1573 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1574 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1575 --with-separate-debug-dir=PATH
32c1c914 1576 look for global separate debug info in this path
62e4f60c 1577 [LIBDIR/debug]
b14b1491
TT
1578 --with-gdb-datadir=PATH look for global separate data files in this path
1579 [DATADIR/gdb]
29b0e8a2 1580 --with-relocated-sources=PATH
32c1c914 1581 automatically relocate this path for source files
7349ff92 1582 --with-auto-load-dir=PATH
aff139ff 1583 directories from which to load auto-loaded scripts
1564a261 1584 [$debugdir:$datadir/auto-load]
bccbefd2 1585 --with-auto-load-safe-path=PATH
aff139ff 1586 directories safe to hold auto-loaded files
7349ff92 1587 [--with-auto-load-dir]
bccbefd2
JK
1588 --without-auto-load-safe-path
1589 do not restrict auto-loaded files locations
05e7c244 1590 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1591 --with-curses use the curses library instead of the termcap
1592 library
c16158bc
JM
1593 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1594 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1595 --with-system-zlib use installed libz
016a3251
DD
1596 --with-gnu-ld assume the C compiler uses GNU ld default=no
1597 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1598 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1599 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1600 --with-system-readline use installed readline library
b8e0a31c
SD
1601 --with-jit-reader-dir=PATH
1602 directory to load the JIT readers from
5c39566f 1603 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1604 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1605 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1606 --with-mpfr include MPFR support (auto/yes/no)
1607 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1608 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1609 --with-python[=PYTHON] include python support
1610 (auto/yes/no/<python-program>)
ed3ef339
DE
1611 --with-guile[=GUILE] include guile support
1612 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1613 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1614 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1615 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1616 --without-included-regex
1617 don't use included regex; this is the default on
1618 systems with version 2 of the GNU C library (use
1619 with caution on other system)
81ecdfbb 1620 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1621 --with-system-gdbinit=PATH
32c1c914 1622 automatically load a system-wide gdbinit file
608e2dbb
TT
1623 --with-lzma support lzma compression (auto/yes/no)
1624 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1625 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1626 --with-tcl directory containing tcl configuration (tclConfig.sh)
1627 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1628 --with-x use the X Window System
393fd4c3
YQ
1629 --with-babeltrace include babeltrace support (auto/yes/no)
1630 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1631 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1632
1633Some influential environment variables:
1634 CC C compiler command
1635 CFLAGS C compiler flags
1636 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1637 nonstandard directory <lib dir>
81ecdfbb 1638 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1639 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1640 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1641 CXX C++ compiler command
1642 CXXFLAGS C++ compiler flags
bec39cab 1643 CPP C preprocessor
f06e05e0
JK
1644 MAKEINFO Parent configure detects if it is of sufficient version.
1645 MAKEINFOFLAGS
1646 Parameters for MAKEINFO.
d0ac1c44
SM
1647 YACC The `Yet Another Compiler Compiler' implementation to use.
1648 Defaults to the first program found out of: `bison -y', `byacc',
1649 `yacc'.
81ecdfbb
RW
1650 YFLAGS The list of arguments that will be passed by default to $YACC.
1651 This script will default YFLAGS to the empty string to avoid a
1652 default value of `-d' given by some make applications.
1653 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1654
1655Use these variables to override the choices made by `configure' or to help
1656it to find libraries and programs with nonstandard names/locations.
1657
81ecdfbb 1658Report bugs to the package provider.
bec39cab 1659_ACEOF
81ecdfbb 1660ac_status=$?
bec39cab
AC
1661fi
1662
1663if test "$ac_init_help" = "recursive"; then
1664 # If there are subdirs, report their specific --help.
bec39cab 1665 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1666 test -d "$ac_dir" ||
1667 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1668 continue
bec39cab
AC
1669 ac_builddir=.
1670
81ecdfbb
RW
1671case "$ac_dir" in
1672.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1673*)
1674 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1675 # A ".." for each directory in $ac_dir_suffix.
1676 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1677 case $ac_top_builddir_sub in
1678 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1679 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1680 esac ;;
1681esac
1682ac_abs_top_builddir=$ac_pwd
1683ac_abs_builddir=$ac_pwd$ac_dir_suffix
1684# for backward compatibility:
1685ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1686
1687case $srcdir in
81ecdfbb 1688 .) # We are building in place.
bec39cab 1689 ac_srcdir=.
81ecdfbb
RW
1690 ac_top_srcdir=$ac_top_builddir_sub
1691 ac_abs_top_srcdir=$ac_pwd ;;
1692 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1693 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1694 ac_top_srcdir=$srcdir
1695 ac_abs_top_srcdir=$srcdir ;;
1696 *) # Relative name.
1697 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1698 ac_top_srcdir=$ac_top_build_prefix$srcdir
1699 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1700esac
81ecdfbb 1701ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1702
81ecdfbb
RW
1703 cd "$ac_dir" || { ac_status=$?; continue; }
1704 # Check for guested configure.
1705 if test -f "$ac_srcdir/configure.gnu"; then
1706 echo &&
1707 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1708 elif test -f "$ac_srcdir/configure"; then
1709 echo &&
1710 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1711 else
81ecdfbb
RW
1712 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1713 fi || ac_status=$?
1714 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1715 done
1716fi
1717
81ecdfbb 1718test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1719if $ac_init_version; then
1720 cat <<\_ACEOF
81ecdfbb 1721configure
d0ac1c44 1722generated by GNU Autoconf 2.69
bec39cab 1723
d0ac1c44 1724Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1725This configure script is free software; the Free Software Foundation
1726gives unlimited permission to copy, distribute and modify it.
1727_ACEOF
81ecdfbb 1728 exit
bec39cab 1729fi
bec39cab 1730
81ecdfbb
RW
1731## ------------------------ ##
1732## Autoconf initialization. ##
1733## ------------------------ ##
bec39cab 1734
81ecdfbb
RW
1735# ac_fn_c_try_compile LINENO
1736# --------------------------
1737# Try to compile conftest.$ac_ext, and return whether this succeeded.
1738ac_fn_c_try_compile ()
1739{
1740 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1741 rm -f conftest.$ac_objext
1742 if { { ac_try="$ac_compile"
1743case "(($ac_try" in
1744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1745 *) ac_try_echo=$ac_try;;
1746esac
1747eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1748$as_echo "$ac_try_echo"; } >&5
1749 (eval "$ac_compile") 2>conftest.err
1750 ac_status=$?
1751 if test -s conftest.err; then
1752 grep -v '^ *+' conftest.err >conftest.er1
1753 cat conftest.er1 >&5
1754 mv -f conftest.er1 conftest.err
1755 fi
1756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1757 test $ac_status = 0; } && {
1758 test -z "$ac_c_werror_flag" ||
1759 test ! -s conftest.err
1760 } && test -s conftest.$ac_objext; then :
1761 ac_retval=0
1762else
1763 $as_echo "$as_me: failed program was:" >&5
1764sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1765
81ecdfbb
RW
1766 ac_retval=1
1767fi
d0ac1c44
SM
1768 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1769 as_fn_set_status $ac_retval
81ecdfbb
RW
1770
1771} # ac_fn_c_try_compile
1772
3bc3d82a
PA
1773# ac_fn_cxx_try_compile LINENO
1774# ----------------------------
1775# Try to compile conftest.$ac_ext, and return whether this succeeded.
1776ac_fn_cxx_try_compile ()
1777{
1778 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1779 rm -f conftest.$ac_objext
1780 if { { ac_try="$ac_compile"
1781case "(($ac_try" in
1782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1783 *) ac_try_echo=$ac_try;;
1784esac
1785eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1786$as_echo "$ac_try_echo"; } >&5
1787 (eval "$ac_compile") 2>conftest.err
1788 ac_status=$?
1789 if test -s conftest.err; then
1790 grep -v '^ *+' conftest.err >conftest.er1
1791 cat conftest.er1 >&5
1792 mv -f conftest.er1 conftest.err
1793 fi
1794 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1795 test $ac_status = 0; } && {
1796 test -z "$ac_cxx_werror_flag" ||
1797 test ! -s conftest.err
1798 } && test -s conftest.$ac_objext; then :
1799 ac_retval=0
1800else
1801 $as_echo "$as_me: failed program was:" >&5
1802sed 's/^/| /' conftest.$ac_ext >&5
1803
1804 ac_retval=1
1805fi
d0ac1c44
SM
1806 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1807 as_fn_set_status $ac_retval
3bc3d82a
PA
1808
1809} # ac_fn_cxx_try_compile
1810
81ecdfbb
RW
1811# ac_fn_c_try_cpp LINENO
1812# ----------------------
1813# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1814ac_fn_c_try_cpp ()
bec39cab 1815{
81ecdfbb
RW
1816 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817 if { { ac_try="$ac_cpp conftest.$ac_ext"
1818case "(($ac_try" in
1819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1820 *) ac_try_echo=$ac_try;;
1821esac
1822eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1823$as_echo "$ac_try_echo"; } >&5
1824 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1825 ac_status=$?
1826 if test -s conftest.err; then
1827 grep -v '^ *+' conftest.err >conftest.er1
1828 cat conftest.er1 >&5
1829 mv -f conftest.er1 conftest.err
1830 fi
1831 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1832 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1833 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1834 test ! -s conftest.err
1835 }; then :
1836 ac_retval=0
1837else
1838 $as_echo "$as_me: failed program was:" >&5
1839sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1840
81ecdfbb
RW
1841 ac_retval=1
1842fi
d0ac1c44
SM
1843 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1844 as_fn_set_status $ac_retval
bec39cab 1845
81ecdfbb 1846} # ac_fn_c_try_cpp
bec39cab 1847
81ecdfbb
RW
1848# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1849# -------------------------------------------------------
1850# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1851# the include files in INCLUDES and setting the cache variable VAR
1852# accordingly.
1853ac_fn_c_check_header_mongrel ()
1854{
1855 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1856 if eval \${$3+:} false; then :
81ecdfbb
RW
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1858$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1859if eval \${$3+:} false; then :
81ecdfbb
RW
1860 $as_echo_n "(cached) " >&6
1861fi
1862eval ac_res=\$$3
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1864$as_echo "$ac_res" >&6; }
1865else
1866 # Is the header compilable?
1867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1868$as_echo_n "checking $2 usability... " >&6; }
1869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1870/* end confdefs.h. */
1871$4
1872#include <$2>
1873_ACEOF
1874if ac_fn_c_try_compile "$LINENO"; then :
1875 ac_header_compiler=yes
1876else
1877 ac_header_compiler=no
1878fi
1879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1881$as_echo "$ac_header_compiler" >&6; }
bec39cab 1882
81ecdfbb
RW
1883# Is the header present?
1884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1885$as_echo_n "checking $2 presence... " >&6; }
1886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887/* end confdefs.h. */
1888#include <$2>
1889_ACEOF
1890if ac_fn_c_try_cpp "$LINENO"; then :
1891 ac_header_preproc=yes
1892else
1893 ac_header_preproc=no
1894fi
d0ac1c44 1895rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1897$as_echo "$ac_header_preproc" >&6; }
bec39cab 1898
81ecdfbb
RW
1899# So? What about this header?
1900case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1901 yes:no: )
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1903$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1905$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1906 ;;
1907 no:yes:* )
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1909$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1911$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1913$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1915$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&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 ;;
1919esac
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1921$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1922if eval \${$3+:} false; then :
81ecdfbb
RW
1923 $as_echo_n "(cached) " >&6
1924else
1925 eval "$3=\$ac_header_compiler"
1926fi
1927eval ac_res=\$$3
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929$as_echo "$ac_res" >&6; }
1930fi
d0ac1c44 1931 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1932
81ecdfbb 1933} # ac_fn_c_check_header_mongrel
bec39cab 1934
81ecdfbb
RW
1935# ac_fn_c_try_run LINENO
1936# ----------------------
1937# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1938# that executables *can* be run.
1939ac_fn_c_try_run ()
1940{
1941 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942 if { { ac_try="$ac_link"
1943case "(($ac_try" in
1944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1945 *) ac_try_echo=$ac_try;;
1946esac
1947eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1948$as_echo "$ac_try_echo"; } >&5
1949 (eval "$ac_link") 2>&5
1950 ac_status=$?
1951 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1952 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1953 { { case "(($ac_try" in
1954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1955 *) ac_try_echo=$ac_try;;
1956esac
1957eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1958$as_echo "$ac_try_echo"; } >&5
1959 (eval "$ac_try") 2>&5
1960 ac_status=$?
1961 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962 test $ac_status = 0; }; }; then :
1963 ac_retval=0
1964else
1965 $as_echo "$as_me: program exited with status $ac_status" >&5
1966 $as_echo "$as_me: failed program was:" >&5
1967sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1968
81ecdfbb
RW
1969 ac_retval=$ac_status
1970fi
1971 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1972 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1973 as_fn_set_status $ac_retval
bec39cab 1974
81ecdfbb 1975} # ac_fn_c_try_run
bec39cab 1976
81ecdfbb
RW
1977# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1978# -------------------------------------------------------
1979# Tests whether HEADER exists and can be compiled using the include files in
1980# INCLUDES, setting the cache variable VAR accordingly.
1981ac_fn_c_check_header_compile ()
1982{
1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1985$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1986if eval \${$3+:} false; then :
81ecdfbb
RW
1987 $as_echo_n "(cached) " >&6
1988else
1989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1990/* end confdefs.h. */
1991$4
1992#include <$2>
bec39cab 1993_ACEOF
81ecdfbb
RW
1994if ac_fn_c_try_compile "$LINENO"; then :
1995 eval "$3=yes"
1996else
1997 eval "$3=no"
1998fi
1999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2000fi
2001eval ac_res=\$$3
2002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2003$as_echo "$ac_res" >&6; }
d0ac1c44 2004 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2005
81ecdfbb 2006} # ac_fn_c_check_header_compile
bec39cab 2007
2974be62
AM
2008# ac_fn_c_try_link LINENO
2009# -----------------------
2010# Try to link conftest.$ac_ext, and return whether this succeeded.
2011ac_fn_c_try_link ()
2012{
2013 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014 rm -f conftest.$ac_objext conftest$ac_exeext
2015 if { { ac_try="$ac_link"
2016case "(($ac_try" in
2017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2018 *) ac_try_echo=$ac_try;;
2019esac
2020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2021$as_echo "$ac_try_echo"; } >&5
2022 (eval "$ac_link") 2>conftest.err
2023 ac_status=$?
2024 if test -s conftest.err; then
2025 grep -v '^ *+' conftest.err >conftest.er1
2026 cat conftest.er1 >&5
2027 mv -f conftest.er1 conftest.err
2028 fi
2029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2030 test $ac_status = 0; } && {
2031 test -z "$ac_c_werror_flag" ||
2032 test ! -s conftest.err
2033 } && test -s conftest$ac_exeext && {
2034 test "$cross_compiling" = yes ||
d0ac1c44 2035 test -x conftest$ac_exeext
2974be62
AM
2036 }; then :
2037 ac_retval=0
2038else
2039 $as_echo "$as_me: failed program was:" >&5
2040sed 's/^/| /' conftest.$ac_ext >&5
2041
2042 ac_retval=1
2043fi
2044 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2045 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2046 # interfere with the next link command; also delete a directory that is
2047 # left behind by Apple's compiler. We do this before executing the actions.
2048 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2049 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2050 as_fn_set_status $ac_retval
2974be62
AM
2051
2052} # ac_fn_c_try_link
2053
81ecdfbb
RW
2054# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2055# --------------------------------------------
2056# Tries to find the compile-time value of EXPR in a program that includes
2057# INCLUDES, setting VAR accordingly. Returns whether the value could be
2058# computed
2059ac_fn_c_compute_int ()
2060{
2061 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2062 if test "$cross_compiling" = yes; then
2063 # Depending upon the size, compute the lo and hi bounds.
2064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2065/* end confdefs.h. */
2066$4
2067int
2068main ()
2069{
2070static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2071test_array [0] = 0;
2072return test_array [0];
bec39cab 2073
81ecdfbb
RW
2074 ;
2075 return 0;
2076}
2077_ACEOF
2078if ac_fn_c_try_compile "$LINENO"; then :
2079 ac_lo=0 ac_mid=0
2080 while :; do
2081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2082/* end confdefs.h. */
2083$4
2084int
2085main ()
2086{
2087static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2088test_array [0] = 0;
2089return test_array [0];
bec39cab 2090
81ecdfbb
RW
2091 ;
2092 return 0;
2093}
2094_ACEOF
2095if ac_fn_c_try_compile "$LINENO"; then :
2096 ac_hi=$ac_mid; break
2097else
2098 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2099 if test $ac_lo -le $ac_mid; then
2100 ac_lo= ac_hi=
2101 break
2102 fi
2103 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2104fi
81ecdfbb
RW
2105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2106 done
c906108c 2107else
81ecdfbb
RW
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111int
2112main ()
2113{
2114static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2115test_array [0] = 0;
2116return test_array [0];
bec39cab 2117
81ecdfbb
RW
2118 ;
2119 return 0;
2120}
2121_ACEOF
2122if ac_fn_c_try_compile "$LINENO"; then :
2123 ac_hi=-1 ac_mid=-1
2124 while :; do
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h. */
2127$4
2128int
2129main ()
2130{
2131static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2132test_array [0] = 0;
2133return test_array [0];
bec39cab 2134
81ecdfbb
RW
2135 ;
2136 return 0;
2137}
2138_ACEOF
2139if ac_fn_c_try_compile "$LINENO"; then :
2140 ac_lo=$ac_mid; break
2141else
2142 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2143 if test $ac_mid -le $ac_hi; then
2144 ac_lo= ac_hi=
2145 break
2146 fi
2147 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150 done
2151else
2152 ac_lo= ac_hi=
2153fi
2154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2155fi
2156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2157# Binary search between lo and hi bounds.
2158while test "x$ac_lo" != "x$ac_hi"; do
2159 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2161/* end confdefs.h. */
2162$4
2163int
2164main ()
2165{
2166static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2167test_array [0] = 0;
2168return test_array [0];
bec39cab 2169
81ecdfbb
RW
2170 ;
2171 return 0;
2172}
2173_ACEOF
2174if ac_fn_c_try_compile "$LINENO"; then :
2175 ac_hi=$ac_mid
2176else
2177 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2178fi
2179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2180done
2181case $ac_lo in #((
2182?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2183'') ac_retval=1 ;;
2184esac
2185 else
2186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187/* end confdefs.h. */
2188$4
2189static long int longval () { return $2; }
2190static unsigned long int ulongval () { return $2; }
2191#include <stdio.h>
2192#include <stdlib.h>
2193int
2194main ()
2195{
bec39cab 2196
81ecdfbb
RW
2197 FILE *f = fopen ("conftest.val", "w");
2198 if (! f)
2199 return 1;
2200 if (($2) < 0)
2201 {
2202 long int i = longval ();
2203 if (i != ($2))
2204 return 1;
2205 fprintf (f, "%ld", i);
2206 }
2207 else
2208 {
2209 unsigned long int i = ulongval ();
2210 if (i != ($2))
2211 return 1;
2212 fprintf (f, "%lu", i);
2213 }
2214 /* Do not output a trailing newline, as this causes \r\n confusion
2215 on some platforms. */
2216 return ferror (f) || fclose (f) != 0;
bec39cab 2217
81ecdfbb
RW
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_run "$LINENO"; then :
2223 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2224else
2225 ac_retval=1
2226fi
2227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2228 conftest.$ac_objext conftest.beam conftest.$ac_ext
2229rm -f conftest.val
bec39cab 2230
81ecdfbb 2231 fi
d0ac1c44
SM
2232 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2233 as_fn_set_status $ac_retval
bec39cab 2234
81ecdfbb 2235} # ac_fn_c_compute_int
bec39cab 2236
55a8c076
YQ
2237# ac_fn_c_check_func LINENO FUNC VAR
2238# ----------------------------------
2239# Tests whether FUNC exists, setting the cache variable VAR accordingly
2240ac_fn_c_check_func ()
81ecdfbb
RW
2241{
2242 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2244$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2245if eval \${$3+:} false; then :
81ecdfbb
RW
2246 $as_echo_n "(cached) " >&6
2247else
81ecdfbb
RW
2248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2249/* end confdefs.h. */
55a8c076
YQ
2250/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2251 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2252#define $2 innocuous_$2
2253
2254/* System header to define __stub macros and hopefully few prototypes,
2255 which can conflict with char $2 (); below.
2256 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2257 <limits.h> exists even on freestanding compilers. */
2258
2259#ifdef __STDC__
2260# include <limits.h>
2261#else
2262# include <assert.h>
2263#endif
2264
2265#undef $2
2266
2267/* Override any GCC internal prototype to avoid an error.
2268 Use char because int might match the return type of a GCC
2269 builtin and then its argument prototype would still apply. */
2270#ifdef __cplusplus
2271extern "C"
2272#endif
2273char $2 ();
2274/* The GNU C library defines this for functions which it implements
2275 to always fail with ENOSYS. Some functions are actually named
2276 something starting with __ and the normal name is an alias. */
2277#if defined __stub_$2 || defined __stub___$2
2278choke me
2279#endif
2280
2281int
2282main ()
2283{
2284return $2 ();
2285 ;
2286 return 0;
2287}
2288_ACEOF
2289if ac_fn_c_try_link "$LINENO"; then :
2290 eval "$3=yes"
2291else
2292 eval "$3=no"
2293fi
2294rm -f core conftest.err conftest.$ac_objext \
2295 conftest$ac_exeext conftest.$ac_ext
2296fi
2297eval ac_res=\$$3
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2299$as_echo "$ac_res" >&6; }
d0ac1c44 2300 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2301
2302} # ac_fn_c_check_func
2303
c56ccc05
MM
2304# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2305# ----------------------------------------------------
2306# Tries to find if the field MEMBER exists in type AGGR, after including
2307# INCLUDES, setting cache variable VAR accordingly.
2308ac_fn_c_check_member ()
2309{
2310 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2312$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2313if eval \${$4+:} false; then :
c56ccc05
MM
2314 $as_echo_n "(cached) " >&6
2315else
2316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317/* end confdefs.h. */
2318$5
2319int
2320main ()
2321{
2322static $2 ac_aggr;
2323if (ac_aggr.$3)
2324return 0;
2325 ;
2326 return 0;
2327}
2328_ACEOF
2329if ac_fn_c_try_compile "$LINENO"; then :
2330 eval "$4=yes"
2331else
2332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333/* end confdefs.h. */
2334$5
2335int
2336main ()
2337{
2338static $2 ac_aggr;
2339if (sizeof ac_aggr.$3)
2340return 0;
2341 ;
2342 return 0;
2343}
2344_ACEOF
2345if ac_fn_c_try_compile "$LINENO"; then :
2346 eval "$4=yes"
2347else
2348 eval "$4=no"
2349fi
2350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2351fi
2352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2353fi
2354eval ac_res=\$$4
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2356$as_echo "$ac_res" >&6; }
d0ac1c44 2357 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2358
2359} # ac_fn_c_check_member
2360
07697489
PA
2361# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2362# -------------------------------------------
2363# Tests whether TYPE exists after having included INCLUDES, setting cache
2364# variable VAR accordingly.
2365ac_fn_c_check_type ()
2366{
2367 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2369$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2370if eval \${$3+:} false; then :
07697489
PA
2371 $as_echo_n "(cached) " >&6
2372else
2373 eval "$3=no"
2374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2375/* end confdefs.h. */
2376$4
2377int
2378main ()
2379{
2380if (sizeof ($2))
2381 return 0;
2382 ;
2383 return 0;
2384}
2385_ACEOF
2386if ac_fn_c_try_compile "$LINENO"; then :
2387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2388/* end confdefs.h. */
2389$4
2390int
2391main ()
2392{
2393if (sizeof (($2)))
2394 return 0;
2395 ;
2396 return 0;
2397}
2398_ACEOF
2399if ac_fn_c_try_compile "$LINENO"; then :
2400
2401else
2402 eval "$3=yes"
2403fi
2404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405fi
2406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2407fi
2408eval ac_res=\$$3
2409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2410$as_echo "$ac_res" >&6; }
d0ac1c44 2411 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2412
2413} # ac_fn_c_check_type
2414
d0ac1c44
SM
2415# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2416# ---------------------------------------------
2417# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2418# accordingly.
770d76d7
PA
2419ac_fn_c_check_decl ()
2420{
2421 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422 as_decl_name=`echo $2|sed 's/ *(.*//'`
2423 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2425$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2426if eval \${$3+:} false; then :
770d76d7
PA
2427 $as_echo_n "(cached) " >&6
2428else
2429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2430/* end confdefs.h. */
2431$4
2432int
2433main ()
2434{
2435#ifndef $as_decl_name
2436#ifdef __cplusplus
2437 (void) $as_decl_use;
2438#else
2439 (void) $as_decl_name;
2440#endif
2441#endif
2442
2443 ;
2444 return 0;
2445}
2446_ACEOF
2447if ac_fn_c_try_compile "$LINENO"; then :
2448 eval "$3=yes"
2449else
2450 eval "$3=no"
2451fi
2452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2453fi
2454eval ac_res=\$$3
2455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2456$as_echo "$ac_res" >&6; }
d0ac1c44 2457 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2458
2459} # ac_fn_c_check_decl
f35d5ade
TT
2460
2461# ac_fn_cxx_try_link LINENO
2462# -------------------------
2463# Try to link conftest.$ac_ext, and return whether this succeeded.
2464ac_fn_cxx_try_link ()
2465{
2466 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2467 rm -f conftest.$ac_objext conftest$ac_exeext
2468 if { { ac_try="$ac_link"
2469case "(($ac_try" in
2470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2471 *) ac_try_echo=$ac_try;;
2472esac
2473eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2474$as_echo "$ac_try_echo"; } >&5
2475 (eval "$ac_link") 2>conftest.err
2476 ac_status=$?
2477 if test -s conftest.err; then
2478 grep -v '^ *+' conftest.err >conftest.er1
2479 cat conftest.er1 >&5
2480 mv -f conftest.er1 conftest.err
2481 fi
2482 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2483 test $ac_status = 0; } && {
2484 test -z "$ac_cxx_werror_flag" ||
2485 test ! -s conftest.err
2486 } && test -s conftest$ac_exeext && {
2487 test "$cross_compiling" = yes ||
2488 test -x conftest$ac_exeext
2489 }; then :
2490 ac_retval=0
2491else
2492 $as_echo "$as_me: failed program was:" >&5
2493sed 's/^/| /' conftest.$ac_ext >&5
2494
2495 ac_retval=1
2496fi
2497 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2498 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2499 # interfere with the next link command; also delete a directory that is
2500 # left behind by Apple's compiler. We do this before executing the actions.
2501 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2502 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2503 as_fn_set_status $ac_retval
2504
2505} # ac_fn_cxx_try_link
81ecdfbb
RW
2506cat >config.log <<_ACEOF
2507This file contains any messages produced by compilers while
2508running configure, to aid debugging if configure makes a mistake.
d5af19ba 2509
81ecdfbb 2510It was created by $as_me, which was
d0ac1c44 2511generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2512
81ecdfbb 2513 $ $0 $@
413ccac7 2514
81ecdfbb
RW
2515_ACEOF
2516exec 5>>config.log
2517{
2518cat <<_ASUNAME
2519## --------- ##
2520## Platform. ##
2521## --------- ##
413ccac7 2522
81ecdfbb
RW
2523hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2524uname -m = `(uname -m) 2>/dev/null || echo unknown`
2525uname -r = `(uname -r) 2>/dev/null || echo unknown`
2526uname -s = `(uname -s) 2>/dev/null || echo unknown`
2527uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2528
81ecdfbb
RW
2529/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2530/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2531
81ecdfbb
RW
2532/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2533/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2534/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2535/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2536/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2537/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2538/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2539
81ecdfbb 2540_ASUNAME
bec39cab 2541
bec39cab
AC
2542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2543for as_dir in $PATH
2544do
2545 IFS=$as_save_IFS
2546 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2547 $as_echo "PATH: $as_dir"
2548 done
2549IFS=$as_save_IFS
bec39cab 2550
81ecdfbb 2551} >&5
bec39cab 2552
81ecdfbb 2553cat >&5 <<_ACEOF
bec39cab 2554
bec39cab 2555
81ecdfbb
RW
2556## ----------- ##
2557## Core tests. ##
2558## ----------- ##
2559
2560_ACEOF
2561
2562
2563# Keep a trace of the command line.
2564# Strip out --no-create and --no-recursion so they do not pile up.
2565# Strip out --silent because we don't want to record it for future runs.
2566# Also quote any args containing shell meta-characters.
2567# Make two passes to allow for proper duplicate-argument suppression.
2568ac_configure_args=
2569ac_configure_args0=
2570ac_configure_args1=
2571ac_must_keep_next=false
2572for ac_pass in 1 2
2573do
2574 for ac_arg
2575 do
2576 case $ac_arg in
2577 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2578 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2579 | -silent | --silent | --silen | --sile | --sil)
2580 continue ;;
2581 *\'*)
2582 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2583 esac
2584 case $ac_pass in
2585 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2586 2)
2587 as_fn_append ac_configure_args1 " '$ac_arg'"
2588 if test $ac_must_keep_next = true; then
2589 ac_must_keep_next=false # Got value, back to normal.
2590 else
2591 case $ac_arg in
2592 *=* | --config-cache | -C | -disable-* | --disable-* \
2593 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2594 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2595 | -with-* | --with-* | -without-* | --without-* | --x)
2596 case "$ac_configure_args0 " in
2597 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2598 esac
2599 ;;
2600 -* ) ac_must_keep_next=true ;;
2601 esac
2602 fi
2603 as_fn_append ac_configure_args " '$ac_arg'"
2604 ;;
2605 esac
2606 done
2607done
2608{ ac_configure_args0=; unset ac_configure_args0;}
2609{ ac_configure_args1=; unset ac_configure_args1;}
2610
2611# When interrupted or exit'd, cleanup temporary files, and complete
2612# config.log. We remove comments because anyway the quotes in there
2613# would cause problems or look ugly.
2614# WARNING: Use '\'' to represent an apostrophe within the trap.
2615# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2616trap 'exit_status=$?
2617 # Save into config.log some information that might help in debugging.
2618 {
2619 echo
2620
d0ac1c44 2621 $as_echo "## ---------------- ##
81ecdfbb 2622## Cache variables. ##
d0ac1c44 2623## ---------------- ##"
81ecdfbb
RW
2624 echo
2625 # The following way of writing the cache mishandles newlines in values,
2626(
2627 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2628 eval ac_val=\$$ac_var
2629 case $ac_val in #(
2630 *${as_nl}*)
2631 case $ac_var in #(
2632 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2633$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2634 esac
2635 case $ac_var in #(
2636 _ | IFS | as_nl) ;; #(
2637 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2638 *) { eval $ac_var=; unset $ac_var;} ;;
2639 esac ;;
2640 esac
2641 done
2642 (set) 2>&1 |
2643 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2644 *${as_nl}ac_space=\ *)
2645 sed -n \
2646 "s/'\''/'\''\\\\'\'''\''/g;
2647 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2648 ;; #(
2649 *)
2650 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2651 ;;
2652 esac |
2653 sort
2654)
2655 echo
2656
d0ac1c44 2657 $as_echo "## ----------------- ##
81ecdfbb 2658## Output variables. ##
d0ac1c44 2659## ----------------- ##"
81ecdfbb
RW
2660 echo
2661 for ac_var in $ac_subst_vars
2662 do
2663 eval ac_val=\$$ac_var
2664 case $ac_val in
2665 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2666 esac
2667 $as_echo "$ac_var='\''$ac_val'\''"
2668 done | sort
2669 echo
2670
2671 if test -n "$ac_subst_files"; then
d0ac1c44 2672 $as_echo "## ------------------- ##
81ecdfbb 2673## File substitutions. ##
d0ac1c44 2674## ------------------- ##"
81ecdfbb
RW
2675 echo
2676 for ac_var in $ac_subst_files
2677 do
2678 eval ac_val=\$$ac_var
2679 case $ac_val in
2680 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2681 esac
2682 $as_echo "$ac_var='\''$ac_val'\''"
2683 done | sort
2684 echo
2685 fi
2686
2687 if test -s confdefs.h; then
d0ac1c44 2688 $as_echo "## ----------- ##
81ecdfbb 2689## confdefs.h. ##
d0ac1c44 2690## ----------- ##"
81ecdfbb
RW
2691 echo
2692 cat confdefs.h
2693 echo
2694 fi
2695 test "$ac_signal" != 0 &&
2696 $as_echo "$as_me: caught signal $ac_signal"
2697 $as_echo "$as_me: exit $exit_status"
2698 } >&5
2699 rm -f core *.core core.conftest.* &&
2700 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2701 exit $exit_status
2702' 0
2703for ac_signal in 1 2 13 15; do
2704 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2705done
2706ac_signal=0
2707
2708# confdefs.h avoids OS command line length limits that DEFS can exceed.
2709rm -f -r conftest* confdefs.h
2710
2711$as_echo "/* confdefs.h */" > confdefs.h
2712
2713# Predefined preprocessor variables.
2714
2715cat >>confdefs.h <<_ACEOF
2716#define PACKAGE_NAME "$PACKAGE_NAME"
2717_ACEOF
2718
2719cat >>confdefs.h <<_ACEOF
2720#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2721_ACEOF
2722
2723cat >>confdefs.h <<_ACEOF
2724#define PACKAGE_VERSION "$PACKAGE_VERSION"
2725_ACEOF
2726
2727cat >>confdefs.h <<_ACEOF
2728#define PACKAGE_STRING "$PACKAGE_STRING"
2729_ACEOF
2730
2731cat >>confdefs.h <<_ACEOF
2732#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2733_ACEOF
2734
2735cat >>confdefs.h <<_ACEOF
2736#define PACKAGE_URL "$PACKAGE_URL"
2737_ACEOF
2738
2739
2740# Let the site file select an alternate cache file if it wants to.
2741# Prefer an explicitly selected file to automatically selected ones.
2742ac_site_file1=NONE
2743ac_site_file2=NONE
2744if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2745 # We do not want a PATH search for config.site.
2746 case $CONFIG_SITE in #((
2747 -*) ac_site_file1=./$CONFIG_SITE;;
2748 */*) ac_site_file1=$CONFIG_SITE;;
2749 *) ac_site_file1=./$CONFIG_SITE;;
2750 esac
81ecdfbb
RW
2751elif test "x$prefix" != xNONE; then
2752 ac_site_file1=$prefix/share/config.site
2753 ac_site_file2=$prefix/etc/config.site
2754else
2755 ac_site_file1=$ac_default_prefix/share/config.site
2756 ac_site_file2=$ac_default_prefix/etc/config.site
2757fi
2758for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2759do
2760 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2761 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2763$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2764 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2765 . "$ac_site_file" \
2766 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2768as_fn_error $? "failed to load site script $ac_site_file
2769See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2770 fi
2771done
2772
2773if test -r "$cache_file"; then
d0ac1c44
SM
2774 # Some versions of bash will fail to source /dev/null (special files
2775 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2776 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2778$as_echo "$as_me: loading cache $cache_file" >&6;}
2779 case $cache_file in
2780 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2781 *) . "./$cache_file";;
2782 esac
2783 fi
2784else
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2786$as_echo "$as_me: creating cache $cache_file" >&6;}
2787 >$cache_file
bec39cab
AC
2788fi
2789
d0ac1c44
SM
2790as_fn_append ac_header_list " stdlib.h"
2791as_fn_append ac_header_list " unistd.h"
2792as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2793# Check that the precious variables saved in the cache have kept the same
2794# value.
2795ac_cache_corrupted=false
2796for ac_var in $ac_precious_vars; do
2797 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2798 eval ac_new_set=\$ac_env_${ac_var}_set
2799 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2800 eval ac_new_val=\$ac_env_${ac_var}_value
2801 case $ac_old_set,$ac_new_set in
2802 set,)
2803 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2804$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2805 ac_cache_corrupted=: ;;
2806 ,set)
2807 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2808$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2809 ac_cache_corrupted=: ;;
2810 ,);;
2811 *)
2812 if test "x$ac_old_val" != "x$ac_new_val"; then
2813 # differences in whitespace do not lead to failure.
2814 ac_old_val_w=`echo x $ac_old_val`
2815 ac_new_val_w=`echo x $ac_new_val`
2816 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2817 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2818$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2819 ac_cache_corrupted=:
2820 else
2821 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2822$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2823 eval $ac_var=\$ac_old_val
2824 fi
2825 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2826$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2828$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2829 fi;;
2830 esac
2831 # Pass precious variables to config.status.
2832 if test "$ac_new_set" = set; then
2833 case $ac_new_val in
2834 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2835 *) ac_arg=$ac_var=$ac_new_val ;;
2836 esac
2837 case " $ac_configure_args " in
2838 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2839 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2840 esac
2841 fi
2842done
2843if $ac_cache_corrupted; then
2844 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2846 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2847$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2848 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2849fi
2850## -------------------- ##
2851## Main body of script. ##
2852## -------------------- ##
2853
2854ac_ext=c
2855ac_cpp='$CPP $CPPFLAGS'
2856ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2857ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2858ac_compiler_gnu=$ac_cv_c_compiler_gnu
2859
2860
2861
2862
2863
2864ac_config_headers="$ac_config_headers config.h:config.in"
2865
2866
2867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2868$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2869 # Check whether --enable-maintainer-mode was given.
2870if test "${enable_maintainer_mode+set}" = set; then :
2871 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2872else
2873 USE_MAINTAINER_MODE=no
2874fi
2875
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2877$as_echo "$USE_MAINTAINER_MODE" >&6; }
2878 if test $USE_MAINTAINER_MODE = yes; then
2879 MAINTAINER_MODE_TRUE=
2880 MAINTAINER_MODE_FALSE='#'
2881else
2882 MAINTAINER_MODE_TRUE='#'
2883 MAINTAINER_MODE_FALSE=
2884fi
2885
2886 MAINT=$MAINTAINER_MODE_TRUE
2887
2888
2889
17ef446e 2890# Set the 'development' global.
270c9937 2891. $srcdir/../bfd/development.sh
f5f1cdb6 2892
81ecdfbb
RW
2893ac_ext=c
2894ac_cpp='$CPP $CPPFLAGS'
2895ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2896ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2897ac_compiler_gnu=$ac_cv_c_compiler_gnu
2898if test -n "$ac_tool_prefix"; then
2899 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2900set dummy ${ac_tool_prefix}gcc; ac_word=$2
2901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2902$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2903if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2904 $as_echo_n "(cached) " >&6
c906108c
SS
2905else
2906 if test -n "$CC"; then
2907 ac_cv_prog_CC="$CC" # Let the user override the test.
2908else
bec39cab
AC
2909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2910for as_dir in $PATH
2911do
2912 IFS=$as_save_IFS
2913 test -z "$as_dir" && as_dir=.
81ecdfbb 2914 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2915 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2916 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2918 break 2
2919 fi
2920done
81ecdfbb
RW
2921 done
2922IFS=$as_save_IFS
bec39cab 2923
c906108c
SS
2924fi
2925fi
bec39cab 2926CC=$ac_cv_prog_CC
c906108c 2927if test -n "$CC"; then
81ecdfbb
RW
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2929$as_echo "$CC" >&6; }
c906108c 2930else
81ecdfbb
RW
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2932$as_echo "no" >&6; }
c906108c
SS
2933fi
2934
81ecdfbb 2935
b4e70030
JB
2936fi
2937if test -z "$ac_cv_prog_CC"; then
2938 ac_ct_CC=$CC
81ecdfbb
RW
2939 # Extract the first word of "gcc", so it can be a program name with args.
2940set dummy gcc; ac_word=$2
2941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2942$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2943if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2944 $as_echo_n "(cached) " >&6
b4e70030
JB
2945else
2946 if test -n "$ac_ct_CC"; then
2947 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2948else
2949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2950for as_dir in $PATH
2951do
2952 IFS=$as_save_IFS
2953 test -z "$as_dir" && as_dir=.
81ecdfbb 2954 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2956 ac_cv_prog_ac_ct_CC="gcc"
2957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2958 break 2
4e8d927d 2959 fi
b4e70030 2960done
81ecdfbb
RW
2961 done
2962IFS=$as_save_IFS
b4e70030
JB
2963
2964fi
2965fi
2966ac_ct_CC=$ac_cv_prog_ac_ct_CC
2967if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2969$as_echo "$ac_ct_CC" >&6; }
b4e70030 2970else
81ecdfbb
RW
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2972$as_echo "no" >&6; }
b4e70030
JB
2973fi
2974
81ecdfbb
RW
2975 if test "x$ac_ct_CC" = x; then
2976 CC=""
2977 else
2978 case $cross_compiling:$ac_tool_warned in
2979yes:)
2980{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2981$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2982ac_tool_warned=yes ;;
2983esac
2984 CC=$ac_ct_CC
2985 fi
b4e70030
JB
2986else
2987 CC="$ac_cv_prog_CC"
2988fi
2989
c906108c 2990if test -z "$CC"; then
81ecdfbb
RW
2991 if test -n "$ac_tool_prefix"; then
2992 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2993set dummy ${ac_tool_prefix}cc; ac_word=$2
2994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2995$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2996if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2997 $as_echo_n "(cached) " >&6
c906108c
SS
2998else
2999 if test -n "$CC"; then
3000 ac_cv_prog_CC="$CC" # Let the user override the test.
3001else
bec39cab
AC
3002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3003for as_dir in $PATH
3004do
3005 IFS=$as_save_IFS
3006 test -z "$as_dir" && as_dir=.
81ecdfbb 3007 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3008 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3009 ac_cv_prog_CC="${ac_tool_prefix}cc"
3010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3011 break 2
3012 fi
3013done
81ecdfbb
RW
3014 done
3015IFS=$as_save_IFS
3016
3017fi
3018fi
3019CC=$ac_cv_prog_CC
3020if test -n "$CC"; then
3021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3022$as_echo "$CC" >&6; }
3023else
3024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3025$as_echo "no" >&6; }
3026fi
3027
3028
3029 fi
3030fi
3031if test -z "$CC"; then
3032 # Extract the first word of "cc", so it can be a program name with args.
3033set dummy cc; ac_word=$2
3034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3035$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3036if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3037 $as_echo_n "(cached) " >&6
3038else
3039 if test -n "$CC"; then
3040 ac_cv_prog_CC="$CC" # Let the user override the test.
3041else
3042 ac_prog_rejected=no
3043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3044for as_dir in $PATH
3045do
3046 IFS=$as_save_IFS
3047 test -z "$as_dir" && as_dir=.
3048 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3049 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3050 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3051 ac_prog_rejected=yes
3052 continue
3053 fi
3054 ac_cv_prog_CC="cc"
3055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3056 break 2
3057 fi
3058done
3059 done
3060IFS=$as_save_IFS
bec39cab 3061
c906108c
SS
3062if test $ac_prog_rejected = yes; then
3063 # We found a bogon in the path, so make sure we never use it.
3064 set dummy $ac_cv_prog_CC
3065 shift
bec39cab 3066 if test $# != 0; then
c906108c
SS
3067 # We chose a different compiler from the bogus one.
3068 # However, it has the same basename, so the bogon will be chosen
3069 # first if we set CC to just the basename; use the full file name.
3070 shift
bec39cab 3071 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3072 fi
3073fi
3074fi
3075fi
bec39cab 3076CC=$ac_cv_prog_CC
c906108c 3077if test -n "$CC"; then
81ecdfbb
RW
3078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3079$as_echo "$CC" >&6; }
c906108c 3080else
81ecdfbb
RW
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3082$as_echo "no" >&6; }
c906108c
SS
3083fi
3084
81ecdfbb 3085
bec39cab
AC
3086fi
3087if test -z "$CC"; then
3088 if test -n "$ac_tool_prefix"; then
81ecdfbb 3089 for ac_prog in cl.exe
bec39cab
AC
3090 do
3091 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3092set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3094$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3095if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3096 $as_echo_n "(cached) " >&6
c906108c
SS
3097else
3098 if test -n "$CC"; then
3099 ac_cv_prog_CC="$CC" # Let the user override the test.
3100else
bec39cab
AC
3101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3102for as_dir in $PATH
3103do
3104 IFS=$as_save_IFS
3105 test -z "$as_dir" && as_dir=.
81ecdfbb 3106 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3108 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3110 break 2
3111 fi
3112done
81ecdfbb
RW
3113 done
3114IFS=$as_save_IFS
bec39cab 3115
c906108c
SS
3116fi
3117fi
bec39cab 3118CC=$ac_cv_prog_CC
c906108c 3119if test -n "$CC"; then
81ecdfbb
RW
3120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3121$as_echo "$CC" >&6; }
c906108c 3122else
81ecdfbb
RW
3123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3124$as_echo "no" >&6; }
c906108c 3125fi
bec39cab 3126
81ecdfbb 3127
bec39cab
AC
3128 test -n "$CC" && break
3129 done
3130fi
3131if test -z "$CC"; then
3132 ac_ct_CC=$CC
81ecdfbb 3133 for ac_prog in cl.exe
bec39cab
AC
3134do
3135 # Extract the first word of "$ac_prog", so it can be a program name with args.
3136set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3138$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3139if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3140 $as_echo_n "(cached) " >&6
bec39cab
AC
3141else
3142 if test -n "$ac_ct_CC"; then
3143 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3144else
3145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3146for as_dir in $PATH
3147do
3148 IFS=$as_save_IFS
3149 test -z "$as_dir" && as_dir=.
81ecdfbb 3150 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3151 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3152 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3153 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3154 break 2
c906108c 3155 fi
bec39cab 3156done
81ecdfbb
RW
3157 done
3158IFS=$as_save_IFS
bec39cab
AC
3159
3160fi
3161fi
3162ac_ct_CC=$ac_cv_prog_ac_ct_CC
3163if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3165$as_echo "$ac_ct_CC" >&6; }
bec39cab 3166else
81ecdfbb
RW
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3168$as_echo "no" >&6; }
c906108c
SS
3169fi
3170
81ecdfbb 3171
bec39cab
AC
3172 test -n "$ac_ct_CC" && break
3173done
c906108c 3174
81ecdfbb
RW
3175 if test "x$ac_ct_CC" = x; then
3176 CC=""
3177 else
3178 case $cross_compiling:$ac_tool_warned in
3179yes:)
3180{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3181$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3182ac_tool_warned=yes ;;
3183esac
3184 CC=$ac_ct_CC
3185 fi
bec39cab
AC
3186fi
3187
3188fi
3189
3190
81ecdfbb
RW
3191test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3193as_fn_error $? "no acceptable C compiler found in \$PATH
3194See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3195
3196# Provide some information about the compiler.
81ecdfbb
RW
3197$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3198set X $ac_compile
3199ac_compiler=$2
3200for ac_option in --version -v -V -qversion; do
3201 { { ac_try="$ac_compiler $ac_option >&5"
3202case "(($ac_try" in
3203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3204 *) ac_try_echo=$ac_try;;
3205esac
3206eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3207$as_echo "$ac_try_echo"; } >&5
3208 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3209 ac_status=$?
81ecdfbb
RW
3210 if test -s conftest.err; then
3211 sed '10a\
3212... rest of stderr output deleted ...
3213 10q' conftest.err >conftest.er1
3214 cat conftest.er1 >&5
81ecdfbb 3215 fi
d0ac1c44 3216 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3217 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3218 test $ac_status = 0; }
3219done
bec39cab 3220
81ecdfbb 3221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3222/* end confdefs.h. */
3223
3224int
3225main ()
3226{
3227
3228 ;
3229 return 0;
3230}
3231_ACEOF
3232ac_clean_files_save=$ac_clean_files
d0ac1c44 3233ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3234# Try to create an executable without -o first, disregard a.out.
3235# It will help us diagnose broken compilers, and finding out an intuition
3236# of exeext.
d0ac1c44
SM
3237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3238$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3239ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3240
3241# The possible output files:
3242ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3243
3244ac_rmfiles=
3245for ac_file in $ac_files
3246do
3247 case $ac_file in
3248 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3249 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3250 esac
3251done
3252rm -f $ac_rmfiles
3253
3254if { { ac_try="$ac_link_default"
3255case "(($ac_try" in
3256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3257 *) ac_try_echo=$ac_try;;
3258esac
3259eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3260$as_echo "$ac_try_echo"; } >&5
3261 (eval "$ac_link_default") 2>&5
3262 ac_status=$?
3263 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3264 test $ac_status = 0; }; then :
3265 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3266# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3267# in a Makefile. We should not override ac_cv_exeext if it was cached,
3268# so that the user can short-circuit this test for compilers unknown to
3269# Autoconf.
3270for ac_file in $ac_files ''
bec39cab
AC
3271do
3272 test -f "$ac_file" || continue
3273 case $ac_file in
81ecdfbb 3274 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3275 ;;
3276 [ab].out )
3277 # We found the default executable, but exeext='' is most
3278 # certainly right.
3279 break;;
3280 *.* )
81ecdfbb
RW
3281 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3282 then :; else
3283 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3284 fi
3285 # We set ac_cv_exeext here because the later test for it is not
3286 # safe: cross compilers may not add the suffix if given an `-o'
3287 # argument, so we may need to know it at that point already.
3288 # Even if this section looks crufty: it has the advantage of
3289 # actually working.
b4e70030
JB
3290 break;;
3291 * )
3292 break;;
bec39cab
AC
3293 esac
3294done
81ecdfbb
RW
3295test "$ac_cv_exeext" = no && ac_cv_exeext=
3296
bec39cab 3297else
81ecdfbb
RW
3298 ac_file=''
3299fi
81ecdfbb 3300if test -z "$ac_file"; then :
d0ac1c44
SM
3301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3302$as_echo "no" >&6; }
3303$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3304sed 's/^/| /' conftest.$ac_ext >&5
3305
81ecdfbb
RW
3306{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3307$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3308as_fn_error 77 "C compiler cannot create executables
3309See \`config.log' for more details" "$LINENO" 5; }
3310else
3311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3312$as_echo "yes" >&6; }
bec39cab 3313fi
d0ac1c44
SM
3314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3315$as_echo_n "checking for C compiler default output file name... " >&6; }
3316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3317$as_echo "$ac_file" >&6; }
b4e70030 3318ac_exeext=$ac_cv_exeext
b4e70030 3319
d0ac1c44 3320rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3321ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3323$as_echo_n "checking for suffix of executables... " >&6; }
3324if { { ac_try="$ac_link"
3325case "(($ac_try" in
3326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3327 *) ac_try_echo=$ac_try;;
3328esac
3329eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3330$as_echo "$ac_try_echo"; } >&5
3331 (eval "$ac_link") 2>&5
bec39cab 3332 ac_status=$?
81ecdfbb
RW
3333 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3334 test $ac_status = 0; }; then :
b4e70030
JB
3335 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3336# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3337# work properly (i.e., refer to `conftest.exe'), while it won't with
3338# `rm'.
3339for ac_file in conftest.exe conftest conftest.*; do
3340 test -f "$ac_file" || continue
3341 case $ac_file in
81ecdfbb 3342 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3343 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3344 break;;
3345 * ) break;;
3346 esac
3347done
c906108c 3348else
81ecdfbb
RW
3349 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3350$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3351as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3352See \`config.log' for more details" "$LINENO" 5; }
c906108c 3353fi
d0ac1c44 3354rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3356$as_echo "$ac_cv_exeext" >&6; }
c906108c 3357
b4e70030 3358rm -f conftest.$ac_ext
bec39cab
AC
3359EXEEXT=$ac_cv_exeext
3360ac_exeext=$EXEEXT
d0ac1c44
SM
3361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3362/* end confdefs.h. */
3363#include <stdio.h>
3364int
3365main ()
3366{
3367FILE *f = fopen ("conftest.out", "w");
3368 return ferror (f) || fclose (f) != 0;
3369
3370 ;
3371 return 0;
3372}
3373_ACEOF
3374ac_clean_files="$ac_clean_files conftest.out"
3375# Check that the compiler produces executables we can run. If not, either
3376# the compiler is broken, or we cross compile.
3377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3378$as_echo_n "checking whether we are cross compiling... " >&6; }
3379if test "$cross_compiling" != yes; then
3380 { { ac_try="$ac_link"
3381case "(($ac_try" in
3382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3383 *) ac_try_echo=$ac_try;;
3384esac
3385eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3386$as_echo "$ac_try_echo"; } >&5
3387 (eval "$ac_link") 2>&5
3388 ac_status=$?
3389 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3390 test $ac_status = 0; }
3391 if { ac_try='./conftest$ac_cv_exeext'
3392 { { case "(($ac_try" in
3393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3394 *) ac_try_echo=$ac_try;;
3395esac
3396eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3397$as_echo "$ac_try_echo"; } >&5
3398 (eval "$ac_try") 2>&5
3399 ac_status=$?
3400 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3401 test $ac_status = 0; }; }; then
3402 cross_compiling=no
3403 else
3404 if test "$cross_compiling" = maybe; then
3405 cross_compiling=yes
3406 else
3407 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3409as_fn_error $? "cannot run C compiled programs.
3410If you meant to cross compile, use \`--host'.
3411See \`config.log' for more details" "$LINENO" 5; }
3412 fi
3413 fi
3414fi
3415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3416$as_echo "$cross_compiling" >&6; }
3417
3418rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3419ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3421$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3422if ${ac_cv_objext+:} false; then :
81ecdfbb 3423 $as_echo_n "(cached) " >&6
bec39cab 3424else
81ecdfbb 3425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3426/* end confdefs.h. */
3427
3428int
3429main ()
3430{
3431
3432 ;
3433 return 0;
3434}
3435_ACEOF
3436rm -f conftest.o conftest.obj
81ecdfbb
RW
3437if { { ac_try="$ac_compile"
3438case "(($ac_try" in
3439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3440 *) ac_try_echo=$ac_try;;
3441esac
3442eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3443$as_echo "$ac_try_echo"; } >&5
3444 (eval "$ac_compile") 2>&5
3445 ac_status=$?
3446 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3447 test $ac_status = 0; }; then :
3448 for ac_file in conftest.o conftest.obj conftest.*; do
3449 test -f "$ac_file" || continue;
bec39cab 3450 case $ac_file in
81ecdfbb 3451 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3452 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3453 break;;
3454 esac
3455done
c906108c 3456else
81ecdfbb 3457 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3458sed 's/^/| /' conftest.$ac_ext >&5
3459
81ecdfbb
RW
3460{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3462as_fn_error $? "cannot compute suffix of object files: cannot compile
3463See \`config.log' for more details" "$LINENO" 5; }
c906108c 3464fi
b4e70030 3465rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3466fi
81ecdfbb
RW
3467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3468$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3469OBJEXT=$ac_cv_objext
3470ac_objext=$OBJEXT
81ecdfbb
RW
3471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3472$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3473if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3474 $as_echo_n "(cached) " >&6
c906108c 3475else
81ecdfbb 3476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3477/* end confdefs.h. */
3478
3479int
3480main ()
3481{
3482#ifndef __GNUC__
3483 choke me
3484#endif
3485
3486 ;
3487 return 0;
3488}
3489_ACEOF
81ecdfbb 3490if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3491 ac_compiler_gnu=yes
3492else
81ecdfbb 3493 ac_compiler_gnu=no
bec39cab 3494fi
81ecdfbb 3495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3496ac_cv_c_compiler_gnu=$ac_compiler_gnu
3497
3498fi
81ecdfbb
RW
3499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3500$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3501if test $ac_compiler_gnu = yes; then
3502 GCC=yes
3503else
3504 GCC=
3505fi
bec39cab
AC
3506ac_test_CFLAGS=${CFLAGS+set}
3507ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3509$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3510if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3511 $as_echo_n "(cached) " >&6
bec39cab 3512else
81ecdfbb
RW
3513 ac_save_c_werror_flag=$ac_c_werror_flag
3514 ac_c_werror_flag=yes
3515 ac_cv_prog_cc_g=no
3516 CFLAGS="-g"
3517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3518/* end confdefs.h. */
3519
3520int
3521main ()
3522{
3523
3524 ;
3525 return 0;
3526}
3527_ACEOF
81ecdfbb 3528if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3529 ac_cv_prog_cc_g=yes
3530else
81ecdfbb
RW
3531 CFLAGS=""
3532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3533/* end confdefs.h. */
3534
3535int
3536main ()
3537{
3538
3539 ;
3540 return 0;
3541}
3542_ACEOF
3543if ac_fn_c_try_compile "$LINENO"; then :
3544
3545else
3546 ac_c_werror_flag=$ac_save_c_werror_flag
3547 CFLAGS="-g"
3548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3549/* end confdefs.h. */
3550
3551int
3552main ()
3553{
c906108c 3554
81ecdfbb
RW
3555 ;
3556 return 0;
3557}
3558_ACEOF
3559if ac_fn_c_try_compile "$LINENO"; then :
3560 ac_cv_prog_cc_g=yes
3561fi
3562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3563fi
3564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3565fi
81ecdfbb
RW
3566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3567 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3568fi
81ecdfbb
RW
3569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3570$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3571if test "$ac_test_CFLAGS" = set; then
bec39cab 3572 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3573elif test $ac_cv_prog_cc_g = yes; then
3574 if test "$GCC" = yes; then
3575 CFLAGS="-g -O2"
3576 else
3577 CFLAGS="-g"
3578 fi
3579else
3580 if test "$GCC" = yes; then
3581 CFLAGS="-O2"
3582 else
3583 CFLAGS=
3584 fi
3585fi
81ecdfbb
RW
3586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3587$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3588if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3589 $as_echo_n "(cached) " >&6
bec39cab 3590else
81ecdfbb 3591 ac_cv_prog_cc_c89=no
bec39cab 3592ac_save_CC=$CC
81ecdfbb 3593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3594/* end confdefs.h. */
c906108c
SS
3595#include <stdarg.h>
3596#include <stdio.h>
d0ac1c44 3597struct stat;
c906108c
SS
3598/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3599struct buf { int x; };
3600FILE * (*rcsopen) (struct buf *, struct stat *, int);
3601static char *e (p, i)
3602 char **p;
3603 int i;
3604{
3605 return p[i];
3606}
3607static char *f (char * (*g) (char **, int), char **p, ...)
3608{
3609 char *s;
3610 va_list v;
3611 va_start (v,p);
3612 s = g (p, va_arg (v,int));
3613 va_end (v);
3614 return s;
3615}
bec39cab
AC
3616
3617/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3618 function prototypes and stuff, but not '\xHH' hex character constants.
3619 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3620 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3621 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3622 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3623 that's true only with -std. */
bec39cab
AC
3624int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3625
81ecdfbb
RW
3626/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3627 inside strings and character constants. */
3628#define FOO(x) 'x'
3629int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3630
c906108c
SS
3631int test (int i, double x);
3632struct s1 {int (*f) (int a);};
3633struct s2 {int (*f) (double a);};
3634int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3635int argc;
3636char **argv;
bec39cab
AC
3637int
3638main ()
3639{
c906108c 3640return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3641 ;
3642 return 0;
3643}
3644_ACEOF
81ecdfbb
RW
3645for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3646 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3647do
3648 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3649 if ac_fn_c_try_compile "$LINENO"; then :
3650 ac_cv_prog_cc_c89=$ac_arg
c906108c 3651fi
81ecdfbb
RW
3652rm -f core conftest.err conftest.$ac_objext
3653 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3654done
81ecdfbb 3655rm -f conftest.$ac_ext
bec39cab 3656CC=$ac_save_CC
c906108c
SS
3657
3658fi
81ecdfbb
RW
3659# AC_CACHE_VAL
3660case "x$ac_cv_prog_cc_c89" in
3661 x)
3662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3663$as_echo "none needed" >&6; } ;;
3664 xno)
3665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3666$as_echo "unsupported" >&6; } ;;
bec39cab 3667 *)
81ecdfbb
RW
3668 CC="$CC $ac_cv_prog_cc_c89"
3669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3670$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3671esac
81ecdfbb 3672if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3673
b4e70030
JB
3674fi
3675
bec39cab
AC
3676ac_ext=c
3677ac_cpp='$CPP $CPPFLAGS'
3678ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3679ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3680ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3681
3bc3d82a
PA
3682ac_ext=cpp
3683ac_cpp='$CXXCPP $CPPFLAGS'
3684ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3685ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3686ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3687if test -z "$CXX"; then
3688 if test -n "$CCC"; then
3689 CXX=$CCC
3690 else
3691 if test -n "$ac_tool_prefix"; then
3692 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3693 do
3694 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3695set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3697$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3698if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3699 $as_echo_n "(cached) " >&6
3700else
3701 if test -n "$CXX"; then
3702 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3703else
3704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3705for as_dir in $PATH
3706do
3707 IFS=$as_save_IFS
3708 test -z "$as_dir" && as_dir=.
3709 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3711 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3713 break 2
3714 fi
3715done
3716 done
3717IFS=$as_save_IFS
3718
3719fi
3720fi
3721CXX=$ac_cv_prog_CXX
3722if test -n "$CXX"; then
3723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3724$as_echo "$CXX" >&6; }
3725else
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3727$as_echo "no" >&6; }
3728fi
3729
3730
3731 test -n "$CXX" && break
3732 done
3733fi
3734if test -z "$CXX"; then
3735 ac_ct_CXX=$CXX
3736 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3737do
3738 # Extract the first word of "$ac_prog", so it can be a program name with args.
3739set dummy $ac_prog; ac_word=$2
3740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3741$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3742if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3743 $as_echo_n "(cached) " >&6
3744else
3745 if test -n "$ac_ct_CXX"; then
3746 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3747else
3748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3749for as_dir in $PATH
3750do
3751 IFS=$as_save_IFS
3752 test -z "$as_dir" && as_dir=.
3753 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3754 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3755 ac_cv_prog_ac_ct_CXX="$ac_prog"
3756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3757 break 2
3758 fi
3759done
3760 done
3761IFS=$as_save_IFS
3762
3763fi
3764fi
3765ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3766if test -n "$ac_ct_CXX"; then
3767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3768$as_echo "$ac_ct_CXX" >&6; }
3769else
3770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3771$as_echo "no" >&6; }
3772fi
3773
3774
3775 test -n "$ac_ct_CXX" && break
3776done
3777
3778 if test "x$ac_ct_CXX" = x; then
3779 CXX="g++"
3780 else
3781 case $cross_compiling:$ac_tool_warned in
3782yes:)
3783{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3784$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3785ac_tool_warned=yes ;;
3786esac
3787 CXX=$ac_ct_CXX
3788 fi
3789fi
3790
3791 fi
3792fi
3793# Provide some information about the compiler.
3794$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3795set X $ac_compile
3796ac_compiler=$2
3797for ac_option in --version -v -V -qversion; do
3798 { { ac_try="$ac_compiler $ac_option >&5"
3799case "(($ac_try" in
3800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3801 *) ac_try_echo=$ac_try;;
3802esac
3803eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3804$as_echo "$ac_try_echo"; } >&5
3805 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3806 ac_status=$?
3807 if test -s conftest.err; then
3808 sed '10a\
3809... rest of stderr output deleted ...
3810 10q' conftest.err >conftest.er1
3811 cat conftest.er1 >&5
3bc3d82a 3812 fi
d0ac1c44 3813 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3815 test $ac_status = 0; }
3816done
3817
3818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3819$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3820if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3821 $as_echo_n "(cached) " >&6
3822else
3823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3824/* end confdefs.h. */
3825
3826int
3827main ()
3828{
3829#ifndef __GNUC__
3830 choke me
3831#endif
3832
3833 ;
3834 return 0;
3835}
3836_ACEOF
3837if ac_fn_cxx_try_compile "$LINENO"; then :
3838 ac_compiler_gnu=yes
3839else
3840 ac_compiler_gnu=no
3841fi
3842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3843ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3844
3845fi
3846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3847$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3848if test $ac_compiler_gnu = yes; then
3849 GXX=yes
3850else
3851 GXX=
3852fi
3853ac_test_CXXFLAGS=${CXXFLAGS+set}
3854ac_save_CXXFLAGS=$CXXFLAGS
3855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3856$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3857if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3858 $as_echo_n "(cached) " >&6
3859else
3860 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3861 ac_cxx_werror_flag=yes
3862 ac_cv_prog_cxx_g=no
3863 CXXFLAGS="-g"
3864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3865/* end confdefs.h. */
3866
3867int
3868main ()
3869{
3870
3871 ;
3872 return 0;
3873}
3874_ACEOF
3875if ac_fn_cxx_try_compile "$LINENO"; then :
3876 ac_cv_prog_cxx_g=yes
3877else
3878 CXXFLAGS=""
3879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3880/* end confdefs.h. */
3881
3882int
3883main ()
3884{
3885
3886 ;
3887 return 0;
3888}
3889_ACEOF
3890if ac_fn_cxx_try_compile "$LINENO"; then :
3891
3892else
3893 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3894 CXXFLAGS="-g"
3895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3896/* end confdefs.h. */
3897
3898int
3899main ()
3900{
3901
3902 ;
3903 return 0;
3904}
3905_ACEOF
3906if ac_fn_cxx_try_compile "$LINENO"; then :
3907 ac_cv_prog_cxx_g=yes
3908fi
3909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3910fi
3911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3912fi
3913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3914 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3915fi
3916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3917$as_echo "$ac_cv_prog_cxx_g" >&6; }
3918if test "$ac_test_CXXFLAGS" = set; then
3919 CXXFLAGS=$ac_save_CXXFLAGS
3920elif test $ac_cv_prog_cxx_g = yes; then
3921 if test "$GXX" = yes; then
3922 CXXFLAGS="-g -O2"
3923 else
3924 CXXFLAGS="-g"
3925 fi
3926else
3927 if test "$GXX" = yes; then
3928 CXXFLAGS="-O2"
3929 else
3930 CXXFLAGS=
3931 fi
3932fi
3933ac_ext=c
3934ac_cpp='$CPP $CPPFLAGS'
3935ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3936ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3937ac_compiler_gnu=$ac_cv_c_compiler_gnu
3938
3939
60ca704f 3940
bec39cab
AC
3941ac_ext=c
3942ac_cpp='$CPP $CPPFLAGS'
3943ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3944ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3945ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3947$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3948# On Suns, sometimes $CPP names a directory.
3949if test -n "$CPP" && test -d "$CPP"; then
3950 CPP=
8bb2c122 3951fi
bec39cab 3952if test -z "$CPP"; then
d0ac1c44 3953 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 3954 $as_echo_n "(cached) " >&6
bec39cab
AC
3955else
3956 # Double quotes because CPP needs to be expanded
3957 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3958 do
3959 ac_preproc_ok=false
3960for ac_c_preproc_warn_flag in '' yes
3961do
3962 # Use a header file that comes with gcc, so configuring glibc
3963 # with a fresh cross-compiler works.
3964 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3965 # <limits.h> exists even on freestanding compilers.
3966 # On the NeXT, cc -E runs the code through the compiler's parser,
3967 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3969/* end confdefs.h. */
3970#ifdef __STDC__
3971# include <limits.h>
3972#else
3973# include <assert.h>
3974#endif
3975 Syntax error
3976_ACEOF
81ecdfbb 3977if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3978
81ecdfbb 3979else
bec39cab
AC
3980 # Broken: fails on valid input.
3981continue
3982fi
d0ac1c44 3983rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3984
81ecdfbb 3985 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3986 # can be detected and how.
81ecdfbb 3987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3988/* end confdefs.h. */
3989#include <ac_nonexistent.h>
3990_ACEOF
81ecdfbb 3991if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3992 # Broken: success on invalid input.
3993continue
8bb2c122 3994else
bec39cab
AC
3995 # Passes both tests.
3996ac_preproc_ok=:
3997break
8bb2c122 3998fi
d0ac1c44 3999rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4000
bec39cab
AC
4001done
4002# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4003rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4004if $ac_preproc_ok; then :
bec39cab
AC
4005 break
4006fi
8bb2c122 4007
bec39cab
AC
4008 done
4009 ac_cv_prog_CPP=$CPP
ddc9cd0f 4010
c906108c 4011fi
bec39cab
AC
4012 CPP=$ac_cv_prog_CPP
4013else
4014 ac_cv_prog_CPP=$CPP
c906108c 4015fi
81ecdfbb
RW
4016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4017$as_echo "$CPP" >&6; }
bec39cab
AC
4018ac_preproc_ok=false
4019for ac_c_preproc_warn_flag in '' yes
4020do
4021 # Use a header file that comes with gcc, so configuring glibc
4022 # with a fresh cross-compiler works.
4023 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4024 # <limits.h> exists even on freestanding compilers.
4025 # On the NeXT, cc -E runs the code through the compiler's parser,
4026 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4028/* end confdefs.h. */
4029#ifdef __STDC__
4030# include <limits.h>
4031#else
4032# include <assert.h>
4033#endif
4034 Syntax error
4035_ACEOF
81ecdfbb 4036if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4037
81ecdfbb 4038else
bec39cab
AC
4039 # Broken: fails on valid input.
4040continue
4041fi
d0ac1c44 4042rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4043
81ecdfbb 4044 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4045 # can be detected and how.
81ecdfbb 4046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4047/* end confdefs.h. */
4048#include <ac_nonexistent.h>
4049_ACEOF
81ecdfbb 4050if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4051 # Broken: success on invalid input.
4052continue
c906108c 4053else
bec39cab
AC
4054 # Passes both tests.
4055ac_preproc_ok=:
4056break
c906108c 4057fi
d0ac1c44 4058rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4059
bec39cab
AC
4060done
4061# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4062rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4063if $ac_preproc_ok; then :
4064
c906108c 4065else
81ecdfbb
RW
4066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4068as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4069See \`config.log' for more details" "$LINENO" 5; }
c906108c 4070fi
c906108c 4071
bec39cab
AC
4072ac_ext=c
4073ac_cpp='$CPP $CPPFLAGS'
4074ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4075ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4076ac_compiler_gnu=$ac_cv_c_compiler_gnu
4077
4078
81ecdfbb
RW
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4080$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4081if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4082 $as_echo_n "(cached) " >&6
4e8d927d 4083else
81ecdfbb
RW
4084 if test -z "$GREP"; then
4085 ac_path_GREP_found=false
4086 # Loop through the user's path and test for each of PROGNAME-LIST
4087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4088for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4089do
4090 IFS=$as_save_IFS
4091 test -z "$as_dir" && as_dir=.
4092 for ac_prog in grep ggrep; do
4093 for ac_exec_ext in '' $ac_executable_extensions; do
4094 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4095 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4096# Check for GNU ac_path_GREP and select it if it is found.
4097 # Check for GNU $ac_path_GREP
4098case `"$ac_path_GREP" --version 2>&1` in
4099*GNU*)
4100 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4101*)
4102 ac_count=0
4103 $as_echo_n 0123456789 >"conftest.in"
4104 while :
4105 do
4106 cat "conftest.in" "conftest.in" >"conftest.tmp"
4107 mv "conftest.tmp" "conftest.in"
4108 cp "conftest.in" "conftest.nl"
4109 $as_echo 'GREP' >> "conftest.nl"
4110 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4111 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4112 as_fn_arith $ac_count + 1 && ac_count=$as_val
4113 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4114 # Best one so far, save it but keep looking for a better one
4115 ac_cv_path_GREP="$ac_path_GREP"
4116 ac_path_GREP_max=$ac_count
bec39cab 4117 fi
81ecdfbb
RW
4118 # 10*(2^10) chars as input seems more than enough
4119 test $ac_count -gt 10 && break
4120 done
4121 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4122esac
bec39cab 4123
81ecdfbb
RW
4124 $ac_path_GREP_found && break 3
4125 done
4126 done
4127 done
4128IFS=$as_save_IFS
4129 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4130 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4131 fi
c906108c 4132else
81ecdfbb 4133 ac_cv_path_GREP=$GREP
c906108c 4134fi
c906108c 4135
81ecdfbb
RW
4136fi
4137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4138$as_echo "$ac_cv_path_GREP" >&6; }
4139 GREP="$ac_cv_path_GREP"
c906108c 4140
c906108c 4141
81ecdfbb
RW
4142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4143$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4144if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4145 $as_echo_n "(cached) " >&6
783e057b 4146else
81ecdfbb
RW
4147 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4148 then ac_cv_path_EGREP="$GREP -E"
4149 else
4150 if test -z "$EGREP"; then
4151 ac_path_EGREP_found=false
4152 # Loop through the user's path and test for each of PROGNAME-LIST
4153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4154for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4155do
4156 IFS=$as_save_IFS
4157 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4158 for ac_prog in egrep; do
4159 for ac_exec_ext in '' $ac_executable_extensions; do
4160 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4161 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4162# Check for GNU ac_path_EGREP and select it if it is found.
4163 # Check for GNU $ac_path_EGREP
4164case `"$ac_path_EGREP" --version 2>&1` in
4165*GNU*)
4166 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4167*)
4168 ac_count=0
4169 $as_echo_n 0123456789 >"conftest.in"
4170 while :
4171 do
4172 cat "conftest.in" "conftest.in" >"conftest.tmp"
4173 mv "conftest.tmp" "conftest.in"
4174 cp "conftest.in" "conftest.nl"
4175 $as_echo 'EGREP' >> "conftest.nl"
4176 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4177 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4178 as_fn_arith $ac_count + 1 && ac_count=$as_val
4179 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4180 # Best one so far, save it but keep looking for a better one
4181 ac_cv_path_EGREP="$ac_path_EGREP"
4182 ac_path_EGREP_max=$ac_count
4183 fi
4184 # 10*(2^10) chars as input seems more than enough
4185 test $ac_count -gt 10 && break
4186 done
4187 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4188esac
bec39cab 4189
81ecdfbb
RW
4190 $ac_path_EGREP_found && break 3
4191 done
4192 done
4193 done
4194IFS=$as_save_IFS
4195 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4196 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4197 fi
783e057b 4198else
81ecdfbb 4199 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4200fi
4201
81ecdfbb 4202 fi
783e057b 4203fi
81ecdfbb
RW
4204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4205$as_echo "$ac_cv_path_EGREP" >&6; }
4206 EGREP="$ac_cv_path_EGREP"
4207
783e057b 4208
81ecdfbb
RW
4209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4210$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4211if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4212 $as_echo_n "(cached) " >&6
783e057b 4213else
81ecdfbb 4214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4215/* end confdefs.h. */
783e057b 4216#include <stdlib.h>
bec39cab 4217#include <stdarg.h>
783e057b
DJ
4218#include <string.h>
4219#include <float.h>
c906108c 4220
bec39cab
AC
4221int
4222main ()
4223{
c906108c 4224
bec39cab
AC
4225 ;
4226 return 0;
4227}
4228_ACEOF
81ecdfbb 4229if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4230 ac_cv_header_stdc=yes
c906108c 4231else
81ecdfbb 4232 ac_cv_header_stdc=no
c906108c 4233fi
81ecdfbb 4234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4235
783e057b
DJ
4236if test $ac_cv_header_stdc = yes; then
4237 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4239/* end confdefs.h. */
4240#include <string.h>
c906108c 4241
783e057b
DJ
4242_ACEOF
4243if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4244 $EGREP "memchr" >/dev/null 2>&1; then :
4245
c906108c 4246else
783e057b 4247 ac_cv_header_stdc=no
c906108c 4248fi
783e057b 4249rm -f conftest*
c906108c
SS
4250
4251fi
4252
783e057b
DJ
4253if test $ac_cv_header_stdc = yes; then
4254 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4256/* end confdefs.h. */
4257#include <stdlib.h>
bec39cab 4258
783e057b
DJ
4259_ACEOF
4260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4261 $EGREP "free" >/dev/null 2>&1; then :
4262
bec39cab 4263else
783e057b 4264 ac_cv_header_stdc=no
bec39cab 4265fi
783e057b 4266rm -f conftest*
bec39cab
AC
4267
4268fi
bec39cab 4269
783e057b
DJ
4270if test $ac_cv_header_stdc = yes; then
4271 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4272 if test "$cross_compiling" = yes; then :
783e057b 4273 :
bec39cab 4274else
81ecdfbb 4275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4276/* end confdefs.h. */
4277#include <ctype.h>
81ecdfbb 4278#include <stdlib.h>
783e057b
DJ
4279#if ((' ' & 0x0FF) == 0x020)
4280# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4281# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4282#else
4283# define ISLOWER(c) \
4284 (('a' <= (c) && (c) <= 'i') \
4285 || ('j' <= (c) && (c) <= 'r') \
4286 || ('s' <= (c) && (c) <= 'z'))
4287# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4288#endif
4289
4290#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4291int
4292main ()
4293{
4294 int i;
4295 for (i = 0; i < 256; i++)
4296 if (XOR (islower (i), ISLOWER (i))
4297 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4298 return 2;
4299 return 0;
783e057b
DJ
4300}
4301_ACEOF
81ecdfbb 4302if ac_fn_c_try_run "$LINENO"; then :
783e057b 4303
81ecdfbb
RW
4304else
4305 ac_cv_header_stdc=no
783e057b 4306fi
81ecdfbb
RW
4307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4308 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4309fi
81ecdfbb 4310
783e057b
DJ
4311fi
4312fi
81ecdfbb
RW
4313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4314$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4315if test $ac_cv_header_stdc = yes; then
4316
81ecdfbb 4317$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4318
4319fi
4320
4321# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4322for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4323 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4324do :
4325 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4326ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4327"
d0ac1c44 4328if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4329 cat >>confdefs.h <<_ACEOF
81ecdfbb 4330#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4331_ACEOF
4332
4333fi
4334
4335done
4336
4337
4338
81ecdfbb 4339 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4340if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4341 MINIX=yes
4342else
4343 MINIX=
4344fi
4345
4346
4347 if test "$MINIX" = yes; then
4348
81ecdfbb 4349$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4350
4351
81ecdfbb 4352$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4353
4354
81ecdfbb 4355$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4356
4357 fi
4358
4359
81ecdfbb
RW
4360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4361$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4362if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4363 $as_echo_n "(cached) " >&6
783e057b 4364else
81ecdfbb 4365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4366/* end confdefs.h. */
4367
d0ac1c44
SM
4368# define __EXTENSIONS__ 1
4369 $ac_includes_default
783e057b
DJ
4370int
4371main ()
4372{
4373
4374 ;
4375 return 0;
4376}
4377_ACEOF
81ecdfbb 4378if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4379 ac_cv_safe_to_define___extensions__=yes
4380else
81ecdfbb 4381 ac_cv_safe_to_define___extensions__=no
783e057b 4382fi
81ecdfbb 4383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4384fi
81ecdfbb
RW
4385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4386$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4387 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4388 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4389
81ecdfbb 4390 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4391
81ecdfbb 4392 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4393
81ecdfbb 4394 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4395
81ecdfbb 4396 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4397
4398
c971b7fa
PA
4399ac_aux_dir=
4400for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4401 if test -f "$ac_dir/install-sh"; then
4402 ac_aux_dir=$ac_dir
4403 ac_install_sh="$ac_aux_dir/install-sh -c"
4404 break
4405 elif test -f "$ac_dir/install.sh"; then
4406 ac_aux_dir=$ac_dir
4407 ac_install_sh="$ac_aux_dir/install.sh -c"
4408 break
4409 elif test -f "$ac_dir/shtool"; then
4410 ac_aux_dir=$ac_dir
4411 ac_install_sh="$ac_aux_dir/shtool install -c"
4412 break
4413 fi
c971b7fa
PA
4414done
4415if test -z "$ac_aux_dir"; then
d0ac1c44 4416 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4417fi
770d76d7 4418
c971b7fa
PA
4419# These three variables are undocumented and unsupported,
4420# and are intended to be withdrawn in a future Autoconf release.
4421# They can cause serious problems if a builder's source tree is in a directory
4422# whose full name contains unusual characters.
4423ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4424ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4425ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4426
770d76d7 4427
c971b7fa
PA
4428# Make sure we can run config.sub.
4429$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4430 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4431
c971b7fa
PA
4432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4433$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4434if ${ac_cv_build+:} false; then :
c971b7fa 4435 $as_echo_n "(cached) " >&6
770d76d7 4436else
c971b7fa
PA
4437 ac_build_alias=$build_alias
4438test "x$ac_build_alias" = x &&
4439 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4440test "x$ac_build_alias" = x &&
d0ac1c44 4441 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4442ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4443 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4444
770d76d7 4445fi
c971b7fa
PA
4446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4447$as_echo "$ac_cv_build" >&6; }
4448case $ac_cv_build in
4449*-*-*) ;;
d0ac1c44 4450*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4451esac
c971b7fa
PA
4452build=$ac_cv_build
4453ac_save_IFS=$IFS; IFS='-'
4454set x $ac_cv_build
4455shift
4456build_cpu=$1
4457build_vendor=$2
4458shift; shift
4459# Remember, the first character of IFS is used to create $*,
4460# except with old shells:
4461build_os=$*
4462IFS=$ac_save_IFS
4463case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4464
4465
c971b7fa
PA
4466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4467$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4468if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4469 $as_echo_n "(cached) " >&6
4470else
c971b7fa
PA
4471 if test "x$host_alias" = x; then
4472 ac_cv_host=$ac_cv_build
81ecdfbb 4473else
c971b7fa 4474 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4475 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4476fi
81ecdfbb
RW
4477
4478fi
c971b7fa
PA
4479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4480$as_echo "$ac_cv_host" >&6; }
4481case $ac_cv_host in
4482*-*-*) ;;
d0ac1c44 4483*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4484esac
c971b7fa
PA
4485host=$ac_cv_host
4486ac_save_IFS=$IFS; IFS='-'
4487set x $ac_cv_host
4488shift
4489host_cpu=$1
4490host_vendor=$2
4491shift; shift
4492# Remember, the first character of IFS is used to create $*,
4493# except with old shells:
4494host_os=$*
4495IFS=$ac_save_IFS
4496case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4497
4498
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4500$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4501if ${ac_cv_target+:} false; then :
3388710e
JM
4502 $as_echo_n "(cached) " >&6
4503else
4504 if test "x$target_alias" = x; then
4505 ac_cv_target=$ac_cv_host
4506else
4507 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4508 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4509fi
4510
4511fi
4512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4513$as_echo "$ac_cv_target" >&6; }
4514case $ac_cv_target in
4515*-*-*) ;;
d0ac1c44 4516*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4517esac
4518target=$ac_cv_target
4519ac_save_IFS=$IFS; IFS='-'
4520set x $ac_cv_target
4521shift
4522target_cpu=$1
4523target_vendor=$2
4524shift; shift
4525# Remember, the first character of IFS is used to create $*,
4526# except with old shells:
4527target_os=$*
4528IFS=$ac_save_IFS
4529case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4530
4531
4532# The aliases save the names the user supplied, while $host etc.
4533# will get canonicalized.
4534test -n "$target_alias" &&
4535 test "$program_prefix$program_suffix$program_transform_name" = \
4536 NONENONEs,x,x, &&
4537 program_prefix=${target_alias}-
4538
4539# The tests for host and target for $enable_largefile require
4540# canonical names.
4541
4542
81ecdfbb 4543
da2f07f1
JK
4544# As the $enable_largefile decision depends on --enable-plugins we must set it
4545# even in directories otherwise not depending on the $plugins option.
4546
4547
2974be62
AM
4548 maybe_plugins=no
4549 for ac_header in dlfcn.h
4550do :
4551 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4552"
d0ac1c44 4553if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4554 cat >>confdefs.h <<_ACEOF
4555#define HAVE_DLFCN_H 1
4556_ACEOF
4557 maybe_plugins=yes
4558fi
4559
4560done
4561
4562 for ac_header in windows.h
4563do :
4564 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4565"
d0ac1c44 4566if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4567 cat >>confdefs.h <<_ACEOF
4568#define HAVE_WINDOWS_H 1
4569_ACEOF
4570 maybe_plugins=yes
4571fi
4572
4573done
4574
4575
4576 # Check whether --enable-plugins was given.
da2f07f1
JK
4577if test "${enable_plugins+set}" = set; then :
4578 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4579 no) plugins=no ;;
4580 *) plugins=yes
4581 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4582 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4583 fi ;;
4584 esac
da2f07f1 4585else
2974be62
AM
4586 plugins=$maybe_plugins
4587
da2f07f1
JK
4588fi
4589
2974be62 4590 if test "$plugins" = "yes"; then
458412c3
TT
4591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4592$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4593if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4594 $as_echo_n "(cached) " >&6
4595else
4596 ac_func_search_save_LIBS=$LIBS
4597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4598/* end confdefs.h. */
4599
4600/* Override any GCC internal prototype to avoid an error.
4601 Use char because int might match the return type of a GCC
4602 builtin and then its argument prototype would still apply. */
4603#ifdef __cplusplus
4604extern "C"
4605#endif
458412c3 4606char dlsym ();
2974be62
AM
4607int
4608main ()
4609{
458412c3 4610return dlsym ();
2974be62
AM
4611 ;
4612 return 0;
4613}
4614_ACEOF
4615for ac_lib in '' dl; do
4616 if test -z "$ac_lib"; then
4617 ac_res="none required"
4618 else
4619 ac_res=-l$ac_lib
4620 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4621 fi
4622 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4623 ac_cv_search_dlsym=$ac_res
2974be62
AM
4624fi
4625rm -f core conftest.err conftest.$ac_objext \
4626 conftest$ac_exeext
d0ac1c44 4627 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4628 break
4629fi
4630done
d0ac1c44 4631if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4632
4633else
458412c3 4634 ac_cv_search_dlsym=no
2974be62
AM
4635fi
4636rm conftest.$ac_ext
4637LIBS=$ac_func_search_save_LIBS
4638fi
458412c3
TT
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4640$as_echo "$ac_cv_search_dlsym" >&6; }
4641ac_res=$ac_cv_search_dlsym
2974be62
AM
4642if test "$ac_res" != no; then :
4643 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4644
4645fi
4646
4647 fi
da2f07f1
JK
4648
4649
4650case "${host}" in
4651 sparc-*-solaris*|i[3-7]86-*-solaris*)
4652 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4653 # are mutually exclusive; and without procfs support, the bfd/ elf module
4654 # cannot provide certain routines such as elfcore_write_prpsinfo
4655 # or elfcore_write_prstatus. So unless the user explicitly requested
4656 # large-file support through the --enable-largefile switch, disable
4657 # large-file support in favor of procfs support.
4658 test "${target}" = "${host}" -a "x$plugins" = xno \
4659 && : ${enable_largefile="no"}
4660 ;;
4661esac
4662
4663# Check whether --enable-largefile was given.
4664if test "${enable_largefile+set}" = set; then :
4665 enableval=$enable_largefile;
4666fi
4667
4668if test "$enable_largefile" != no; then
4669
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4671$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4672if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4673 $as_echo_n "(cached) " >&6
4674else
4675 ac_cv_sys_largefile_CC=no
4676 if test "$GCC" != yes; then
4677 ac_save_CC=$CC
4678 while :; do
4679 # IRIX 6.2 and later do not support large files by default,
4680 # so use the C compiler's -n32 option if that helps.
4681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4682/* end confdefs.h. */
4683#include <sys/types.h>
4684 /* Check that off_t can represent 2**63 - 1 correctly.
4685 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4686 since some C++ compilers masquerading as C compilers
4687 incorrectly reject 9223372036854775807. */
4688#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4689 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4690 && LARGE_OFF_T % 2147483647 == 1)
4691 ? 1 : -1];
4692int
4693main ()
4694{
4695
4696 ;
4697 return 0;
4698}
4699_ACEOF
4700 if ac_fn_c_try_compile "$LINENO"; then :
4701 break
4702fi
4703rm -f core conftest.err conftest.$ac_objext
4704 CC="$CC -n32"
4705 if ac_fn_c_try_compile "$LINENO"; then :
4706 ac_cv_sys_largefile_CC=' -n32'; break
4707fi
4708rm -f core conftest.err conftest.$ac_objext
4709 break
4710 done
4711 CC=$ac_save_CC
4712 rm -f conftest.$ac_ext
4713 fi
4714fi
4715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4716$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4717 if test "$ac_cv_sys_largefile_CC" != no; then
4718 CC=$CC$ac_cv_sys_largefile_CC
4719 fi
4720
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4722$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4723if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4724 $as_echo_n "(cached) " >&6
4725else
4726 while :; do
4727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4728/* end confdefs.h. */
4729#include <sys/types.h>
4730 /* Check that off_t can represent 2**63 - 1 correctly.
4731 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4732 since some C++ compilers masquerading as C compilers
4733 incorrectly reject 9223372036854775807. */
4734#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4735 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4736 && LARGE_OFF_T % 2147483647 == 1)
4737 ? 1 : -1];
4738int
4739main ()
4740{
4741
4742 ;
4743 return 0;
4744}
4745_ACEOF
4746if ac_fn_c_try_compile "$LINENO"; then :
4747 ac_cv_sys_file_offset_bits=no; break
4748fi
4749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4751/* end confdefs.h. */
4752#define _FILE_OFFSET_BITS 64
4753#include <sys/types.h>
4754 /* Check that off_t can represent 2**63 - 1 correctly.
4755 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4756 since some C++ compilers masquerading as C compilers
4757 incorrectly reject 9223372036854775807. */
4758#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4759 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4760 && LARGE_OFF_T % 2147483647 == 1)
4761 ? 1 : -1];
4762int
4763main ()
4764{
4765
4766 ;
4767 return 0;
4768}
4769_ACEOF
4770if ac_fn_c_try_compile "$LINENO"; then :
4771 ac_cv_sys_file_offset_bits=64; break
4772fi
4773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4774 ac_cv_sys_file_offset_bits=unknown
4775 break
4776done
4777fi
4778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4779$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4780case $ac_cv_sys_file_offset_bits in #(
4781 no | unknown) ;;
4782 *)
4783cat >>confdefs.h <<_ACEOF
4784#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4785_ACEOF
4786;;
4787esac
4788rm -rf conftest*
4789 if test $ac_cv_sys_file_offset_bits = unknown; then
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4791$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4792if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4793 $as_echo_n "(cached) " >&6
4794else
4795 while :; do
4796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4797/* end confdefs.h. */
4798#include <sys/types.h>
4799 /* Check that off_t can represent 2**63 - 1 correctly.
4800 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4801 since some C++ compilers masquerading as C compilers
4802 incorrectly reject 9223372036854775807. */
4803#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4804 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4805 && LARGE_OFF_T % 2147483647 == 1)
4806 ? 1 : -1];
4807int
4808main ()
4809{
4810
4811 ;
4812 return 0;
4813}
4814_ACEOF
4815if ac_fn_c_try_compile "$LINENO"; then :
4816 ac_cv_sys_large_files=no; break
4817fi
4818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4820/* end confdefs.h. */
4821#define _LARGE_FILES 1
4822#include <sys/types.h>
4823 /* Check that off_t can represent 2**63 - 1 correctly.
4824 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4825 since some C++ compilers masquerading as C compilers
4826 incorrectly reject 9223372036854775807. */
4827#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4828 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4829 && LARGE_OFF_T % 2147483647 == 1)
4830 ? 1 : -1];
4831int
4832main ()
4833{
4834
4835 ;
4836 return 0;
4837}
4838_ACEOF
4839if ac_fn_c_try_compile "$LINENO"; then :
4840 ac_cv_sys_large_files=1; break
4841fi
4842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4843 ac_cv_sys_large_files=unknown
4844 break
4845done
4846fi
4847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4848$as_echo "$ac_cv_sys_large_files" >&6; }
4849case $ac_cv_sys_large_files in #(
4850 no | unknown) ;;
4851 *)
4852cat >>confdefs.h <<_ACEOF
4853#define _LARGE_FILES $ac_cv_sys_large_files
4854_ACEOF
4855;;
4856esac
4857rm -rf conftest*
4858 fi
d0ac1c44
SM
4859
4860
da2f07f1
JK
4861fi
4862
4863
4864
81ecdfbb
RW
4865
4866
4867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4868$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4869if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4870 $as_echo_n "(cached) " >&6
4871else
4872 am_cv_prog_cc_stdc=no
4873ac_save_CC="$CC"
4874# Don't try gcc -ansi; that turns off useful extensions and
4875# breaks some systems' header files.
4876# AIX -qlanglvl=ansi
4877# Ultrix and OSF/1 -std1
4878# HP-UX 10.20 and later -Ae
4879# HP-UX older versions -Aa -D_HPUX_SOURCE
4880# SVR4 -Xc -D__EXTENSIONS__
4881for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4882do
783e057b 4883 CC="$ac_save_CC $ac_arg"
81ecdfbb 4884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4885/* end confdefs.h. */
4886#include <stdarg.h>
4887#include <stdio.h>
4888#include <sys/types.h>
4889#include <sys/stat.h>
4890/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4891struct buf { int x; };
4892FILE * (*rcsopen) (struct buf *, struct stat *, int);
4893static char *e (p, i)
4894 char **p;
4895 int i;
4896{
4897 return p[i];
4898}
4899static char *f (char * (*g) (char **, int), char **p, ...)
4900{
4901 char *s;
4902 va_list v;
4903 va_start (v,p);
4904 s = g (p, va_arg (v,int));
4905 va_end (v);
4906 return s;
4907}
4908int test (int i, double x);
4909struct s1 {int (*f) (int a);};
4910struct s2 {int (*f) (double a);};
4911int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4912int argc;
4913char **argv;
4914
4915int
4916main ()
4917{
4918
4919return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4920
4921 ;
4922 return 0;
4923}
4924_ACEOF
81ecdfbb 4925if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4926 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4927fi
81ecdfbb 4928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4929done
4930CC="$ac_save_CC"
4931
4932fi
4933
4934if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4936$as_echo "none needed" >&6; }
783e057b 4937else
81ecdfbb
RW
4938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4939$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4940fi
4941case "x$am_cv_prog_cc_stdc" in
4942 x|xno) ;;
4943 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4944esac
4945
d0ac1c44
SM
4946# Expand $ac_aux_dir to an absolute path.
4947am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 4948
d0ac1c44 4949if test x"${install_sh+set}" != xset; then
4869db5e
RM
4950 case $am_aux_dir in
4951 *\ * | *\ *)
4952 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4953 *)
4954 install_sh="\${SHELL} $am_aux_dir/install-sh"
4955 esac
4956fi
4957
d0ac1c44
SM
4958# Installed binaries are usually stripped using 'strip' when the user
4959# run "make install-strip". However 'strip' might not be the right
4869db5e 4960# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 4961# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
4962if test "$cross_compiling" != no; then
4963 if test -n "$ac_tool_prefix"; then
4964 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4965set dummy ${ac_tool_prefix}strip; ac_word=$2
4966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4967$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4968if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
4969 $as_echo_n "(cached) " >&6
4970else
4971 if test -n "$STRIP"; then
4972 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4973else
4974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4975for as_dir in $PATH
4976do
4977 IFS=$as_save_IFS
4978 test -z "$as_dir" && as_dir=.
4979 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4980 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4981 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4983 break 2
4984 fi
4985done
4986 done
4987IFS=$as_save_IFS
4988
4989fi
4990fi
4991STRIP=$ac_cv_prog_STRIP
4992if test -n "$STRIP"; then
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4994$as_echo "$STRIP" >&6; }
4995else
4996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4997$as_echo "no" >&6; }
4998fi
4999
5000
5001fi
5002if test -z "$ac_cv_prog_STRIP"; then
5003 ac_ct_STRIP=$STRIP
5004 # Extract the first word of "strip", so it can be a program name with args.
5005set dummy strip; ac_word=$2
5006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5007$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5008if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5009 $as_echo_n "(cached) " >&6
5010else
5011 if test -n "$ac_ct_STRIP"; then
5012 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5013else
5014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5015for as_dir in $PATH
5016do
5017 IFS=$as_save_IFS
5018 test -z "$as_dir" && as_dir=.
5019 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5020 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5021 ac_cv_prog_ac_ct_STRIP="strip"
5022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5023 break 2
5024 fi
5025done
5026 done
5027IFS=$as_save_IFS
5028
5029fi
5030fi
5031ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5032if test -n "$ac_ct_STRIP"; then
5033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5034$as_echo "$ac_ct_STRIP" >&6; }
5035else
5036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5037$as_echo "no" >&6; }
5038fi
5039
5040 if test "x$ac_ct_STRIP" = x; then
5041 STRIP=":"
5042 else
5043 case $cross_compiling:$ac_tool_warned in
5044yes:)
5045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5047ac_tool_warned=yes ;;
5048esac
5049 STRIP=$ac_ct_STRIP
5050 fi
5051else
5052 STRIP="$ac_cv_prog_STRIP"
5053fi
5054
5055fi
5056INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5057
783e057b
DJ
5058
5059ac_aux_dir=
81ecdfbb 5060for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5061 if test -f "$ac_dir/install-sh"; then
5062 ac_aux_dir=$ac_dir
5063 ac_install_sh="$ac_aux_dir/install-sh -c"
5064 break
5065 elif test -f "$ac_dir/install.sh"; then
5066 ac_aux_dir=$ac_dir
5067 ac_install_sh="$ac_aux_dir/install.sh -c"
5068 break
5069 elif test -f "$ac_dir/shtool"; then
5070 ac_aux_dir=$ac_dir
5071 ac_install_sh="$ac_aux_dir/shtool install -c"
5072 break
5073 fi
783e057b
DJ
5074done
5075if test -z "$ac_aux_dir"; then
d0ac1c44 5076 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5077fi
81ecdfbb
RW
5078
5079# These three variables are undocumented and unsupported,
5080# and are intended to be withdrawn in a future Autoconf release.
5081# They can cause serious problems if a builder's source tree is in a directory
5082# whose full name contains unusual characters.
5083ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5084ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5085ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5086
783e057b 5087
783e057b 5088
9009e1ae
MR
5089test "$program_prefix" != NONE &&
5090 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5091# Use a double $ so make ignores it.
5092test "$program_suffix" != NONE &&
5093 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5094# Double any \ or $.
5095# By default was `s,x,x', remove it if useless.
5096ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5097program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5098
81ecdfbb 5099
0bcda685
PA
5100# We require a C++11 compiler. Check if one is available, and if
5101# necessary, set CXX_DIALECT to some -std=xxx switch.
5102
41260ac2 5103 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5104 ac_ext=cpp
5105ac_cpp='$CXXCPP $CPPFLAGS'
5106ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5107ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5108ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5109 CXX_DIALECT=""
5110 ac_success=no
5111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5112$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5113if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5114 $as_echo_n "(cached) " >&6
5115else
5116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5117/* end confdefs.h. */
5118
5119
5120// If the compiler admits that it is not ready for C++11, why torture it?
5121// Hopefully, this will speed up the test.
5122
5123#ifndef __cplusplus
5124
5125#error "This is not a C++ compiler"
5126
5127#elif __cplusplus < 201103L
5128
5129#error "This is not a C++11 compiler"
5130
5131#else
5132
5133namespace cxx11
5134{
5135
5136 namespace test_static_assert
5137 {
5138
5139 template <typename T>
5140 struct check
5141 {
5142 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5143 };
5144
5145 }
5146
5147 namespace test_final_override
5148 {
5149
5150 struct Base
5151 {
5152 virtual void f() {}
5153 };
5154
5155 struct Derived : public Base
5156 {
5157 virtual void f() override {}
5158 };
5159
5160 }
5161
5162 namespace test_double_right_angle_brackets
5163 {
5164
5165 template < typename T >
5166 struct check {};
5167
5168 typedef check<void> single_type;
5169 typedef check<check<void>> double_type;
5170 typedef check<check<check<void>>> triple_type;
5171 typedef check<check<check<check<void>>>> quadruple_type;
5172
5173 }
5174
5175 namespace test_decltype
5176 {
5177
5178 int
5179 f()
5180 {
5181 int a = 1;
5182 decltype(a) b = 2;
5183 return a + b;
5184 }
5185
5186 }
5187
5188 namespace test_type_deduction
5189 {
5190
5191 template < typename T1, typename T2 >
5192 struct is_same
5193 {
5194 static const bool value = false;
5195 };
5196
5197 template < typename T >
5198 struct is_same<T, T>
5199 {
5200 static const bool value = true;
5201 };
5202
5203 template < typename T1, typename T2 >
5204 auto
5205 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5206 {
5207 return a1 + a2;
5208 }
5209
5210 int
5211 test(const int c, volatile int v)
5212 {
5213 static_assert(is_same<int, decltype(0)>::value == true, "");
5214 static_assert(is_same<int, decltype(c)>::value == false, "");
5215 static_assert(is_same<int, decltype(v)>::value == false, "");
5216 auto ac = c;
5217 auto av = v;
5218 auto sumi = ac + av + 'x';
5219 auto sumf = ac + av + 1.0;
5220 static_assert(is_same<int, decltype(ac)>::value == true, "");
5221 static_assert(is_same<int, decltype(av)>::value == true, "");
5222 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5223 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5224 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5225 return (sumf > 0.0) ? sumi : add(c, v);
5226 }
5227
5228 }
5229
5230 namespace test_noexcept
5231 {
5232
5233 int f() { return 0; }
5234 int g() noexcept { return 0; }
5235
5236 static_assert(noexcept(f()) == false, "");
5237 static_assert(noexcept(g()) == true, "");
5238
5239 }
5240
5241 namespace test_constexpr
5242 {
5243
5244 template < typename CharT >
5245 unsigned long constexpr
5246 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5247 {
5248 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5249 }
5250
5251 template < typename CharT >
5252 unsigned long constexpr
5253 strlen_c(const CharT *const s) noexcept
5254 {
5255 return strlen_c_r(s, 0UL);
5256 }
5257
5258 static_assert(strlen_c("") == 0UL, "");
5259 static_assert(strlen_c("1") == 1UL, "");
5260 static_assert(strlen_c("example") == 7UL, "");
5261 static_assert(strlen_c("another\0example") == 7UL, "");
5262
5263 }
5264
5265 namespace test_rvalue_references
5266 {
5267
5268 template < int N >
5269 struct answer
5270 {
5271 static constexpr int value = N;
5272 };
5273
5274 answer<1> f(int&) { return answer<1>(); }
5275 answer<2> f(const int&) { return answer<2>(); }
5276 answer<3> f(int&&) { return answer<3>(); }
5277
5278 void
5279 test()
5280 {
5281 int i = 0;
5282 const int c = 0;
5283 static_assert(decltype(f(i))::value == 1, "");
5284 static_assert(decltype(f(c))::value == 2, "");
5285 static_assert(decltype(f(0))::value == 3, "");
5286 }
5287
5288 }
5289
5290 namespace test_uniform_initialization
5291 {
5292
5293 struct test
5294 {
5295 static const int zero {};
5296 static const int one {1};
5297 };
5298
5299 static_assert(test::zero == 0, "");
5300 static_assert(test::one == 1, "");
5301
5302 }
5303
5304 namespace test_lambdas
5305 {
5306
5307 void
5308 test1()
5309 {
5310 auto lambda1 = [](){};
5311 auto lambda2 = lambda1;
5312 lambda1();
5313 lambda2();
5314 }
5315
5316 int
5317 test2()
5318 {
5319 auto a = [](int i, int j){ return i + j; }(1, 2);
5320 auto b = []() -> int { return '0'; }();
5321 auto c = [=](){ return a + b; }();
5322 auto d = [&](){ return c; }();
5323 auto e = [a, &b](int x) mutable {
5324 const auto identity = [](int y){ return y; };
5325 for (auto i = 0; i < a; ++i)
5326 a += b--;
5327 return x + identity(a + b);
5328 }(0);
5329 return a + b + c + d + e;
5330 }
5331
5332 int
5333 test3()
5334 {
5335 const auto nullary = [](){ return 0; };
5336 const auto unary = [](int x){ return x; };
5337 using nullary_t = decltype(nullary);
5338 using unary_t = decltype(unary);
5339 const auto higher1st = [](nullary_t f){ return f(); };
5340 const auto higher2nd = [unary](nullary_t f1){
5341 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5342 };
5343 return higher1st(nullary) + higher2nd(nullary)(unary);
5344 }
5345
5346 }
5347
5348 namespace test_variadic_templates
5349 {
5350
5351 template <int...>
5352 struct sum;
5353
5354 template <int N0, int... N1toN>
5355 struct sum<N0, N1toN...>
5356 {
5357 static constexpr auto value = N0 + sum<N1toN...>::value;
5358 };
5359
5360 template <>
5361 struct sum<>
5362 {
5363 static constexpr auto value = 0;
5364 };
5365
5366 static_assert(sum<>::value == 0, "");
5367 static_assert(sum<1>::value == 1, "");
5368 static_assert(sum<23>::value == 23, "");
5369 static_assert(sum<1, 2>::value == 3, "");
5370 static_assert(sum<5, 5, 11>::value == 21, "");
5371 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5372
5373 }
5374
5375 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5376 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5377 // because of this.
5378 namespace test_template_alias_sfinae
5379 {
5380
5381 struct foo {};
5382
5383 template<typename T>
5384 using member = typename T::member_type;
5385
5386 template<typename T>
5387 void func(...) {}
5388
5389 template<typename T>
5390 void func(member<T>*) {}
5391
5392 void test();
5393
5394 void test() { func<foo>(0); }
5395
5396 }
5397
5398} // namespace cxx11
5399
5400#endif // __cplusplus >= 201103L
5401
5402
5403
5404_ACEOF
5405if ac_fn_cxx_try_compile "$LINENO"; then :
5406 ax_cv_cxx_compile_cxx11=yes
5407else
5408 ax_cv_cxx_compile_cxx11=no
5409fi
5410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5411fi
5412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5413$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5414 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5415 ac_success=yes
5416 fi
5417
5418 if test x$ac_success = xno; then
41260ac2
SM
5419 for alternative in ${ax_cxx_compile_alternatives}; do
5420 switch="-std=gnu++${alternative}"
0bcda685
PA
5421 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5423$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5424if eval \${$cachevar+:} false; then :
0bcda685
PA
5425 $as_echo_n "(cached) " >&6
5426else
5427 ac_save_CXX="$CXX"
5428 CXX="$CXX $switch"
5429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5430/* end confdefs.h. */
5431
5432
5433// If the compiler admits that it is not ready for C++11, why torture it?
5434// Hopefully, this will speed up the test.
5435
5436#ifndef __cplusplus
5437
5438#error "This is not a C++ compiler"
5439
5440#elif __cplusplus < 201103L
5441
5442#error "This is not a C++11 compiler"
5443
5444#else
5445
5446namespace cxx11
5447{
5448
5449 namespace test_static_assert
5450 {
5451
5452 template <typename T>
5453 struct check
5454 {
5455 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5456 };
5457
5458 }
5459
5460 namespace test_final_override
5461 {
5462
5463 struct Base
5464 {
5465 virtual void f() {}
5466 };
5467
5468 struct Derived : public Base
5469 {
5470 virtual void f() override {}
5471 };
5472
5473 }
5474
5475 namespace test_double_right_angle_brackets
5476 {
5477
5478 template < typename T >
5479 struct check {};
5480
5481 typedef check<void> single_type;
5482 typedef check<check<void>> double_type;
5483 typedef check<check<check<void>>> triple_type;
5484 typedef check<check<check<check<void>>>> quadruple_type;
5485
5486 }
5487
5488 namespace test_decltype
5489 {
5490
5491 int
5492 f()
5493 {
5494 int a = 1;
5495 decltype(a) b = 2;
5496 return a + b;
5497 }
5498
5499 }
5500
5501 namespace test_type_deduction
5502 {
5503
5504 template < typename T1, typename T2 >
5505 struct is_same
5506 {
5507 static const bool value = false;
5508 };
5509
5510 template < typename T >
5511 struct is_same<T, T>
5512 {
5513 static const bool value = true;
5514 };
5515
5516 template < typename T1, typename T2 >
5517 auto
5518 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5519 {
5520 return a1 + a2;
5521 }
5522
5523 int
5524 test(const int c, volatile int v)
5525 {
5526 static_assert(is_same<int, decltype(0)>::value == true, "");
5527 static_assert(is_same<int, decltype(c)>::value == false, "");
5528 static_assert(is_same<int, decltype(v)>::value == false, "");
5529 auto ac = c;
5530 auto av = v;
5531 auto sumi = ac + av + 'x';
5532 auto sumf = ac + av + 1.0;
5533 static_assert(is_same<int, decltype(ac)>::value == true, "");
5534 static_assert(is_same<int, decltype(av)>::value == true, "");
5535 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5536 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5537 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5538 return (sumf > 0.0) ? sumi : add(c, v);
5539 }
5540
5541 }
5542
5543 namespace test_noexcept
5544 {
5545
5546 int f() { return 0; }
5547 int g() noexcept { return 0; }
5548
5549 static_assert(noexcept(f()) == false, "");
5550 static_assert(noexcept(g()) == true, "");
5551
5552 }
5553
5554 namespace test_constexpr
5555 {
5556
5557 template < typename CharT >
5558 unsigned long constexpr
5559 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5560 {
5561 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5562 }
5563
5564 template < typename CharT >
5565 unsigned long constexpr
5566 strlen_c(const CharT *const s) noexcept
5567 {
5568 return strlen_c_r(s, 0UL);
5569 }
5570
5571 static_assert(strlen_c("") == 0UL, "");
5572 static_assert(strlen_c("1") == 1UL, "");
5573 static_assert(strlen_c("example") == 7UL, "");
5574 static_assert(strlen_c("another\0example") == 7UL, "");
5575
5576 }
5577
5578 namespace test_rvalue_references
5579 {
5580
5581 template < int N >
5582 struct answer
5583 {
5584 static constexpr int value = N;
5585 };
5586
5587 answer<1> f(int&) { return answer<1>(); }
5588 answer<2> f(const int&) { return answer<2>(); }
5589 answer<3> f(int&&) { return answer<3>(); }
5590
5591 void
5592 test()
5593 {
5594 int i = 0;
5595 const int c = 0;
5596 static_assert(decltype(f(i))::value == 1, "");
5597 static_assert(decltype(f(c))::value == 2, "");
5598 static_assert(decltype(f(0))::value == 3, "");
5599 }
5600
5601 }
5602
5603 namespace test_uniform_initialization
5604 {
5605
5606 struct test
5607 {
5608 static const int zero {};
5609 static const int one {1};
5610 };
5611
5612 static_assert(test::zero == 0, "");
5613 static_assert(test::one == 1, "");
5614
5615 }
5616
5617 namespace test_lambdas
5618 {
5619
5620 void
5621 test1()
5622 {
5623 auto lambda1 = [](){};
5624 auto lambda2 = lambda1;
5625 lambda1();
5626 lambda2();
5627 }
5628
5629 int
5630 test2()
5631 {
5632 auto a = [](int i, int j){ return i + j; }(1, 2);
5633 auto b = []() -> int { return '0'; }();
5634 auto c = [=](){ return a + b; }();
5635 auto d = [&](){ return c; }();
5636 auto e = [a, &b](int x) mutable {
5637 const auto identity = [](int y){ return y; };
5638 for (auto i = 0; i < a; ++i)
5639 a += b--;
5640 return x + identity(a + b);
5641 }(0);
5642 return a + b + c + d + e;
5643 }
5644
5645 int
5646 test3()
5647 {
5648 const auto nullary = [](){ return 0; };
5649 const auto unary = [](int x){ return x; };
5650 using nullary_t = decltype(nullary);
5651 using unary_t = decltype(unary);
5652 const auto higher1st = [](nullary_t f){ return f(); };
5653 const auto higher2nd = [unary](nullary_t f1){
5654 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5655 };
5656 return higher1st(nullary) + higher2nd(nullary)(unary);
5657 }
5658
5659 }
5660
5661 namespace test_variadic_templates
5662 {
5663
5664 template <int...>
5665 struct sum;
5666
5667 template <int N0, int... N1toN>
5668 struct sum<N0, N1toN...>
5669 {
5670 static constexpr auto value = N0 + sum<N1toN...>::value;
5671 };
5672
5673 template <>
5674 struct sum<>
5675 {
5676 static constexpr auto value = 0;
5677 };
5678
5679 static_assert(sum<>::value == 0, "");
5680 static_assert(sum<1>::value == 1, "");
5681 static_assert(sum<23>::value == 23, "");
5682 static_assert(sum<1, 2>::value == 3, "");
5683 static_assert(sum<5, 5, 11>::value == 21, "");
5684 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5685
5686 }
5687
5688 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5689 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5690 // because of this.
5691 namespace test_template_alias_sfinae
5692 {
5693
5694 struct foo {};
5695
5696 template<typename T>
5697 using member = typename T::member_type;
5698
5699 template<typename T>
5700 void func(...) {}
5701
5702 template<typename T>
5703 void func(member<T>*) {}
5704
5705 void test();
5706
5707 void test() { func<foo>(0); }
5708
5709 }
5710
5711} // namespace cxx11
5712
5713#endif // __cplusplus >= 201103L
5714
5715
5716
5717_ACEOF
5718if ac_fn_cxx_try_compile "$LINENO"; then :
5719 eval $cachevar=yes
5720else
5721 eval $cachevar=no
5722fi
5723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5724 CXX="$ac_save_CXX"
5725fi
5726eval ac_res=\$$cachevar
5727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5728$as_echo "$ac_res" >&6; }
5729 if eval test x\$$cachevar = xyes; then
5730 CXX_DIALECT="$switch"
5731 ac_success=yes
5732 break
5733 fi
5734 done
5735 fi
5736
5737 if test x$ac_success = xno; then
41260ac2
SM
5738 for alternative in ${ax_cxx_compile_alternatives}; do
5739 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5740 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5742$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5743if eval \${$cachevar+:} false; then :
0bcda685
PA
5744 $as_echo_n "(cached) " >&6
5745else
5746 ac_save_CXX="$CXX"
41260ac2
SM
5747 CXX="$CXX $switch"
5748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5749/* end confdefs.h. */
5750
5751
5752// If the compiler admits that it is not ready for C++11, why torture it?
5753// Hopefully, this will speed up the test.
5754
5755#ifndef __cplusplus
5756
5757#error "This is not a C++ compiler"
5758
5759#elif __cplusplus < 201103L
5760
5761#error "This is not a C++11 compiler"
5762
5763#else
5764
5765namespace cxx11
5766{
5767
5768 namespace test_static_assert
5769 {
5770
5771 template <typename T>
5772 struct check
5773 {
5774 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5775 };
5776
5777 }
5778
5779 namespace test_final_override
5780 {
5781
5782 struct Base
5783 {
5784 virtual void f() {}
5785 };
5786
5787 struct Derived : public Base
5788 {
5789 virtual void f() override {}
5790 };
5791
5792 }
5793
5794 namespace test_double_right_angle_brackets
5795 {
5796
5797 template < typename T >
5798 struct check {};
5799
5800 typedef check<void> single_type;
5801 typedef check<check<void>> double_type;
5802 typedef check<check<check<void>>> triple_type;
5803 typedef check<check<check<check<void>>>> quadruple_type;
5804
5805 }
5806
5807 namespace test_decltype
5808 {
5809
5810 int
5811 f()
5812 {
5813 int a = 1;
5814 decltype(a) b = 2;
5815 return a + b;
5816 }
5817
5818 }
5819
5820 namespace test_type_deduction
5821 {
5822
5823 template < typename T1, typename T2 >
5824 struct is_same
5825 {
5826 static const bool value = false;
5827 };
5828
5829 template < typename T >
5830 struct is_same<T, T>
5831 {
5832 static const bool value = true;
5833 };
5834
5835 template < typename T1, typename T2 >
5836 auto
5837 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5838 {
5839 return a1 + a2;
5840 }
5841
5842 int
5843 test(const int c, volatile int v)
5844 {
5845 static_assert(is_same<int, decltype(0)>::value == true, "");
5846 static_assert(is_same<int, decltype(c)>::value == false, "");
5847 static_assert(is_same<int, decltype(v)>::value == false, "");
5848 auto ac = c;
5849 auto av = v;
5850 auto sumi = ac + av + 'x';
5851 auto sumf = ac + av + 1.0;
5852 static_assert(is_same<int, decltype(ac)>::value == true, "");
5853 static_assert(is_same<int, decltype(av)>::value == true, "");
5854 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5855 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5856 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5857 return (sumf > 0.0) ? sumi : add(c, v);
5858 }
5859
5860 }
5861
5862 namespace test_noexcept
5863 {
5864
5865 int f() { return 0; }
5866 int g() noexcept { return 0; }
5867
5868 static_assert(noexcept(f()) == false, "");
5869 static_assert(noexcept(g()) == true, "");
5870
5871 }
5872
5873 namespace test_constexpr
5874 {
5875
5876 template < typename CharT >
5877 unsigned long constexpr
5878 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5879 {
5880 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5881 }
5882
5883 template < typename CharT >
5884 unsigned long constexpr
5885 strlen_c(const CharT *const s) noexcept
5886 {
5887 return strlen_c_r(s, 0UL);
5888 }
5889
5890 static_assert(strlen_c("") == 0UL, "");
5891 static_assert(strlen_c("1") == 1UL, "");
5892 static_assert(strlen_c("example") == 7UL, "");
5893 static_assert(strlen_c("another\0example") == 7UL, "");
5894
5895 }
5896
5897 namespace test_rvalue_references
5898 {
5899
5900 template < int N >
5901 struct answer
5902 {
5903 static constexpr int value = N;
5904 };
5905
5906 answer<1> f(int&) { return answer<1>(); }
5907 answer<2> f(const int&) { return answer<2>(); }
5908 answer<3> f(int&&) { return answer<3>(); }
5909
5910 void
5911 test()
5912 {
5913 int i = 0;
5914 const int c = 0;
5915 static_assert(decltype(f(i))::value == 1, "");
5916 static_assert(decltype(f(c))::value == 2, "");
5917 static_assert(decltype(f(0))::value == 3, "");
5918 }
5919
5920 }
5921
5922 namespace test_uniform_initialization
5923 {
5924
5925 struct test
5926 {
5927 static const int zero {};
5928 static const int one {1};
5929 };
5930
5931 static_assert(test::zero == 0, "");
5932 static_assert(test::one == 1, "");
5933
5934 }
5935
5936 namespace test_lambdas
5937 {
5938
5939 void
5940 test1()
5941 {
5942 auto lambda1 = [](){};
5943 auto lambda2 = lambda1;
5944 lambda1();
5945 lambda2();
5946 }
5947
5948 int
5949 test2()
5950 {
5951 auto a = [](int i, int j){ return i + j; }(1, 2);
5952 auto b = []() -> int { return '0'; }();
5953 auto c = [=](){ return a + b; }();
5954 auto d = [&](){ return c; }();
5955 auto e = [a, &b](int x) mutable {
5956 const auto identity = [](int y){ return y; };
5957 for (auto i = 0; i < a; ++i)
5958 a += b--;
5959 return x + identity(a + b);
5960 }(0);
5961 return a + b + c + d + e;
5962 }
5963
5964 int
5965 test3()
5966 {
5967 const auto nullary = [](){ return 0; };
5968 const auto unary = [](int x){ return x; };
5969 using nullary_t = decltype(nullary);
5970 using unary_t = decltype(unary);
5971 const auto higher1st = [](nullary_t f){ return f(); };
5972 const auto higher2nd = [unary](nullary_t f1){
5973 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5974 };
5975 return higher1st(nullary) + higher2nd(nullary)(unary);
5976 }
5977
5978 }
5979
5980 namespace test_variadic_templates
5981 {
5982
5983 template <int...>
5984 struct sum;
5985
5986 template <int N0, int... N1toN>
5987 struct sum<N0, N1toN...>
5988 {
5989 static constexpr auto value = N0 + sum<N1toN...>::value;
5990 };
5991
5992 template <>
5993 struct sum<>
5994 {
5995 static constexpr auto value = 0;
5996 };
5997
5998 static_assert(sum<>::value == 0, "");
5999 static_assert(sum<1>::value == 1, "");
6000 static_assert(sum<23>::value == 23, "");
6001 static_assert(sum<1, 2>::value == 3, "");
6002 static_assert(sum<5, 5, 11>::value == 21, "");
6003 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6004
6005 }
6006
6007 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6008 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6009 // because of this.
6010 namespace test_template_alias_sfinae
6011 {
6012
6013 struct foo {};
6014
6015 template<typename T>
6016 using member = typename T::member_type;
6017
6018 template<typename T>
6019 void func(...) {}
6020
6021 template<typename T>
6022 void func(member<T>*) {}
6023
6024 void test();
6025
6026 void test() { func<foo>(0); }
6027
6028 }
6029
6030} // namespace cxx11
6031
6032#endif // __cplusplus >= 201103L
6033
6034
6035
6036_ACEOF
6037if ac_fn_cxx_try_compile "$LINENO"; then :
6038 eval $cachevar=yes
6039else
6040 eval $cachevar=no
6041fi
6042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6043 CXX="$ac_save_CXX"
0bcda685
PA
6044fi
6045eval ac_res=\$$cachevar
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6047$as_echo "$ac_res" >&6; }
41260ac2
SM
6048 if eval test x\$$cachevar = xyes; then
6049 CXX_DIALECT="$switch"
6050 ac_success=yes
6051 break
6052 fi
6053 done
6054 if test x$ac_success = xyes; then
0bcda685
PA
6055 break
6056 fi
6057 done
6058 fi
6059 ac_ext=c
6060ac_cpp='$CPP $CPPFLAGS'
6061ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6062ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6063ac_compiler_gnu=$ac_cv_c_compiler_gnu
6064
6065 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6066 if test x$ac_success = xno; then
d0ac1c44 6067 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6068 fi
6069 fi
6070 if test x$ac_success = xno; then
6071 HAVE_CXX11=0
6072 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6073$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6074 else
6075 HAVE_CXX11=1
6076
6077$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6078
6079 fi
6080
6081
6082
6083
a417dc56
RW
6084# Dependency checking.
6085rm -rf .tst 2>/dev/null
6086mkdir .tst 2>/dev/null
6087if test -d .tst; then
6088 am__leading_dot=.
6089else
6090 am__leading_dot=_
6091fi
6092rmdir .tst 2>/dev/null
6093
6094DEPDIR="${am__leading_dot}deps"
6095
81ecdfbb 6096ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6097
6098
6099depcc="$CC" am_compiler_list=
6100
6101am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6103$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6104if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6105 $as_echo_n "(cached) " >&6
a417dc56
RW
6106else
6107 if test -f "$am_depcomp"; then
6108 # We make a subdir and do the tests there. Otherwise we can end up
6109 # making bogus files that we don't know about and never remove. For
6110 # instance it was reported that on HP-UX the gcc test will end up
6111 # making a dummy file named `D' -- because `-MD' means `put the output
6112 # in D'.
6113 mkdir conftest.dir
6114 # Copy depcomp to subdir because otherwise we won't find it if we're
6115 # using a relative directory.
6116 cp "$am_depcomp" conftest.dir
6117 cd conftest.dir
6118 # We will build objects and dependencies in a subdirectory because
6119 # it helps to detect inapplicable dependency modes. For instance
6120 # both Tru64's cc and ICC support -MD to output dependencies as a
6121 # side effect of compilation, but ICC will put the dependencies in
6122 # the current directory while Tru64 will put them in the object
6123 # directory.
6124 mkdir sub
6125
6126 am_cv_CC_dependencies_compiler_type=none
6127 if test "$am_compiler_list" = ""; then
6128 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6129 fi
6130 for depmode in $am_compiler_list; do
6131 if test $depmode = none; then break; fi
6132
81ecdfbb 6133 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6134 # Setup a source with many dependencies, because some compilers
6135 # like to wrap large dependency lists on column 80 (with \), and
6136 # we should not choose a depcomp mode which is confused by this.
6137 #
6138 # We need to recreate these files for each test, as the compiler may
6139 # overwrite some of them when testing with obscure command lines.
6140 # This happens at least with the AIX C compiler.
6141 : > sub/conftest.c
6142 for i in 1 2 3 4 5 6; do
6143 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6144 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6145 # Solaris 8's {/usr,}/bin/sh.
6146 touch sub/conftst$i.h
6147 done
6148 echo "include sub/conftest.Po" > confmf
6149
6150 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6151 # mode. It turns out that the SunPro C++ compiler does not properly
6152 # handle `-M -o', and we need to detect this.
6153 depcmd="depmode=$depmode \
6154 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6155 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6156 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6157 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6158 if env $depcmd > conftest.err 2>&1 &&
6159 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6160 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6161 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6162 # icc doesn't choke on unknown options, it will just issue warnings
6163 # or remarks (even with -Werror). So we grep stderr for any message
6164 # that says an option was ignored or not supported.
6165 # When given -MP, icc 7.0 and 7.1 complain thusly:
6166 # icc: Command line warning: ignoring option '-M'; no argument required
6167 # The diagnosis changed in icc 8.0:
6168 # icc: Command line remark: option '-MP' not supported
6169 if (grep 'ignoring option' conftest.err ||
6170 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6171 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6172 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6173 break
6174 fi
6175 fi
81ecdfbb 6176 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6177 sed -e 's/^/| /' < conftest.err >&5
6178 done
6179
6180 cd ..
6181 rm -rf conftest.dir
6182else
6183 am_cv_CC_dependencies_compiler_type=none
6184fi
6185
6186fi
81ecdfbb
RW
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6188$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6189if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6190then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6191else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6192
6193fi
6194
6195
c971b7fa
PA
6196
6197CONFIG_OBS=
6198CONFIG_DEPS=
6199CONFIG_SRCS=
6200ENABLE_CFLAGS=
6201
6202CONFIG_ALL=
6203CONFIG_CLEAN=
6204CONFIG_INSTALL=
6205CONFIG_UNINSTALL=
6206
6207# If we haven't got the data from the intl directory,
6208# assume NLS is disabled.
6209USE_NLS=no
6210LIBINTL=
6211LIBINTL_DEP=
6212INCINTL=
6213XGETTEXT=
6214GMSGFMT=
6215POSUB=
783e057b
DJ
6216
6217if test -f ../intl/config.intl; then
6218 . ../intl/config.intl
6219fi
81ecdfbb
RW
6220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6221$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6222if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6224$as_echo "no" >&6; }
783e057b 6225else
81ecdfbb
RW
6226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6227$as_echo "yes" >&6; }
783e057b 6228
81ecdfbb 6229$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6230
6231
81ecdfbb
RW
6232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6233$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6234 # Look for .po and .gmo files in the source directory.
6235 CATALOGS=
6236 XLINGUAS=
6237 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6238 # If there aren't any .gmo files the shell will give us the
6239 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6240 # weeded out.
6241 case "$cat" in *\**)
6242 continue;;
6243 esac
6244 # The quadruple backslash is collapsed to a double backslash
6245 # by the backticks, then collapsed again by the double quotes,
6246 # leaving us with one backslash in the sed expression (right
6247 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6248 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6249 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6250 # The user is allowed to set LINGUAS to a list of languages to
6251 # install catalogs for. If it's empty that means "all of them."
6252 if test "x$LINGUAS" = x; then
6253 CATALOGS="$CATALOGS $cat"
6254 XLINGUAS="$XLINGUAS $lang"
6255 else
6256 case "$LINGUAS" in *$lang*)
6257 CATALOGS="$CATALOGS $cat"
6258 XLINGUAS="$XLINGUAS $lang"
6259 ;;
6260 esac
e28b3332
DJ
6261 fi
6262 done
c971b7fa
PA
6263 LINGUAS="$XLINGUAS"
6264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6265$as_echo "$LINGUAS" >&6; }
6266
6267
6268 DATADIRNAME=share
6269
6270 INSTOBJEXT=.mo
6271
6272 GENCAT=gencat
6273
6274 CATOBJEXT=.gmo
e28b3332 6275
e28b3332
DJ
6276fi
6277
c971b7fa
PA
6278localedir='${datadir}/locale'
6279
6280
6281if test x"$USE_NLS" = xyes; then
6282 CONFIG_ALL="$CONFIG_ALL all-po"
6283 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6284 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6285 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6286fi
e28b3332 6287
c971b7fa
PA
6288PACKAGE=gdb
6289
6290cat >>confdefs.h <<_ACEOF
6291#define PACKAGE "$PACKAGE"
6292_ACEOF
6293
6294
6295
6296# We never need to detect it in this sub-configure.
6297# But preserve it for config.status --recheck.
6298
6299
6300
6301MAKEINFO_EXTRA_FLAGS=""
6302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6303$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6304if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6305 $as_echo_n "(cached) " >&6
6306else
6307 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6308 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6309 gdb_cv_have_makeinfo_click=yes
6310 else
6311 gdb_cv_have_makeinfo_click=no
6312 fi
6313fi
6314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6315$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6316if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6317 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6318fi
e28b3332
DJ
6319
6320
bec39cab
AC
6321
6322
81ecdfbb
RW
6323# Check whether --with-separate-debug-dir was given.
6324if test "${with_separate_debug_dir+set}" = set; then :
6325 withval=$with_separate_debug_dir;
b14b1491
TT
6326 DEBUGDIR=$withval
6327else
6328 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6329fi
6330
20e95c23 6331
783e057b
DJ
6332 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6333 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6334 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6335 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6336
783e057b
DJ
6337cat >>confdefs.h <<_ACEOF
6338#define DEBUGDIR "$ac_define_dir"
20e95c23 6339_ACEOF
20e95c23 6340
20e95c23 6341
20e95c23 6342
0c4a4063 6343
b14b1491
TT
6344 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6345 if test "x$prefix" = xNONE; then
6346 test_prefix=/usr/local
6347 else
6348 test_prefix=$prefix
6349 fi
783e057b 6350 else
b14b1491 6351 test_prefix=$exec_prefix
783e057b 6352 fi
b14b1491
TT
6353 value=0
6354 case ${ac_define_dir} in
6355 "${test_prefix}"|"${test_prefix}/"*|\
6356 '${exec_prefix}'|'${exec_prefix}/'*)
6357 value=1
6358 ;;
6359 esac
6360
6361cat >>confdefs.h <<_ACEOF
6362#define DEBUGDIR_RELOCATABLE $value
6363_ACEOF
6364
6365
6366
0c4a4063 6367
f83d8a90
DE
6368# We can't pass paths as command line arguments.
6369# Mingw32 tries to be clever and will convert the paths for us.
6370# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6371# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6372# This breaks GDB's relocatable path conversions since paths passed in
6373# config.h would not get so translated, the path prefixes no longer match.
6374
6375 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6376 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6377 ac_define_dir=`eval echo $bindir`
6378 ac_define_dir=`eval echo $ac_define_dir`
6379
6380cat >>confdefs.h <<_ACEOF
6381#define BINDIR "$ac_define_dir"
6382_ACEOF
6383
6384
6385
b14b1491
TT
6386# GDB's datadir relocation
6387
6388
6389
81ecdfbb
RW
6390# Check whether --with-gdb-datadir was given.
6391if test "${with_gdb_datadir+set}" = set; then :
6392 withval=$with_gdb_datadir;
b14b1491 6393 GDB_DATADIR=$withval
20e95c23 6394else
b14b1491 6395 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6396fi
6397
20e95c23 6398
b14b1491
TT
6399 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6400 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6401 ac_define_dir=`eval echo $GDB_DATADIR`
6402 ac_define_dir=`eval echo $ac_define_dir`
6403
6404cat >>confdefs.h <<_ACEOF
6405#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6406_ACEOF
6407
b14b1491
TT
6408
6409
0c4a4063 6410
b14b1491
TT
6411 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6412 if test "x$prefix" = xNONE; then
6413 test_prefix=/usr/local
6414 else
6415 test_prefix=$prefix
6416 fi
6417 else
6418 test_prefix=$exec_prefix
6419 fi
6420 value=0
6421 case ${ac_define_dir} in
6422 "${test_prefix}"|"${test_prefix}/"*|\
6423 '${exec_prefix}'|'${exec_prefix}/'*)
6424 value=1
6425 ;;
6426 esac
6427
6428cat >>confdefs.h <<_ACEOF
6429#define GDB_DATADIR_RELOCATABLE $value
6430_ACEOF
6431
6432
783e057b 6433
20e95c23 6434
0c4a4063 6435
81ecdfbb
RW
6436# Check whether --with-relocated-sources was given.
6437if test "${with_relocated_sources+set}" = set; then :
6438 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6439
6440 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6441 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6442 ac_define_dir=`eval echo $reloc_srcdir`
6443 ac_define_dir=`eval echo $ac_define_dir`
6444
6445cat >>confdefs.h <<_ACEOF
6446#define RELOC_SRCDIR "$ac_define_dir"
6447_ACEOF
6448
6449
6450
81ecdfbb
RW
6451fi
6452
29b0e8a2 6453
7349ff92
JK
6454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6455$as_echo_n "checking for default auto-load directory... " >&6; }
6456
6457# Check whether --with-auto-load-dir was given.
6458if test "${with_auto_load_dir+set}" = set; then :
6459 withval=$with_auto_load_dir;
6460else
1564a261 6461 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6462fi
6463
2861ee4f 6464escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6465
6466 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6467 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6468 ac_define_dir=`eval echo $escape_dir`
6469 ac_define_dir=`eval echo $ac_define_dir`
6470
6471cat >>confdefs.h <<_ACEOF
6472#define AUTO_LOAD_DIR "$ac_define_dir"
6473_ACEOF
6474
6475
6476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6477$as_echo "$with_auto_load_dir" >&6; }
6478
bccbefd2
JK
6479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6480$as_echo_n "checking for default auto-load safe-path... " >&6; }
6481
6482# Check whether --with-auto-load-safe-path was given.
6483if test "${with_auto_load_safe_path+set}" = set; then :
6484 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6485 with_auto_load_safe_path="/"
6486 fi
bccbefd2 6487else
7349ff92 6488 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6489fi
6490
2861ee4f 6491escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6492
6493 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6494 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6495 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6496 ac_define_dir=`eval echo $ac_define_dir`
6497
6498cat >>confdefs.h <<_ACEOF
6dea1fbd 6499#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6500_ACEOF
6501
6502
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6504$as_echo "$with_auto_load_safe_path" >&6; }
6505
29b0e8a2 6506
20e95c23 6507
5ae98d25 6508subdirs="$subdirs testsuite"
20e95c23
DJ
6509
6510
783e057b 6511# Check whether to support alternative target configurations
81ecdfbb
RW
6512# Check whether --enable-targets was given.
6513if test "${enable_targets+set}" = set; then :
6514 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6515 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6516 ;;
6517 no) enable_targets= ;;
6518 *) enable_targets=$enableval ;;
6519esac
81ecdfbb
RW
6520fi
6521
20e95c23 6522
783e057b 6523# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6524# Check whether --enable-64-bit-bfd was given.
6525if test "${enable_64_bit_bfd+set}" = set; then :
6526 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6527 yes) want64=true ;;
6528 no) want64=false ;;
d0ac1c44 6529 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6530esac
6531else
6532 want64=false
81ecdfbb
RW
6533fi
6534
783e057b
DJ
6535# Provide defaults for some variables set by the per-host and per-target
6536# configuration.
6537gdb_host_obs=posix-hdep.o
20e95c23 6538
783e057b
DJ
6539if test "${target}" = "${host}"; then
6540 gdb_native=yes
6541else
6542 gdb_native=no
6543fi
20e95c23 6544
783e057b 6545. $srcdir/configure.host
20e95c23 6546
fb23d554
SDJ
6547# Add in the common host objects.
6548. $srcdir/common/common.host
6549gdb_host_obs="$gdb_host_obs $common_host_obs"
6550
783e057b 6551# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6552
783e057b
DJ
6553TARGET_OBS=
6554all_targets=
b292c783 6555HAVE_NATIVE_GCORE_TARGET=
20e95c23 6556
783e057b 6557for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6558do
783e057b
DJ
6559 if test "$targ_alias" = "all"; then
6560 all_targets=true
6561 else
6562 # Canonicalize the secondary target names.
6563 result=`$ac_config_sub $targ_alias 2>/dev/null`
6564 if test -n "$result"; then
6565 targ=$result
6566 else
6567 targ=$targ_alias
6568 fi
20e95c23 6569
783e057b 6570 . ${srcdir}/configure.tgt
20e95c23 6571
bf307134 6572 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6573 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6574fi
6575
783e057b
DJ
6576 # Target-specific object files
6577 for i in ${gdb_target_obs}; do
6578 case " $TARGET_OBS " in
6579 *" ${i} "*) ;;
6580 *)
6581 TARGET_OBS="$TARGET_OBS ${i}"
6582 ;;
6583 esac
6584 done
20e95c23 6585
783e057b
DJ
6586 # Check whether this target needs 64-bit CORE_ADDR
6587 if test x${want64} = xfalse; then
6588 . ${srcdir}/../bfd/config.bfd
6589 fi
b292c783
JK
6590
6591 # Check whether this target is native and supports gcore.
6592 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6593 && $gdb_have_gcore; then
6594 HAVE_NATIVE_GCORE_TARGET=1
6595 fi
783e057b 6596 fi
20e95c23
DJ
6597done
6598
783e057b
DJ
6599if test x${all_targets} = xtrue; then
6600
6601 # We want all 64-bit targets if we either:
6602 # - run on a 64-bit host or
6603 # - already require 64-bit support for some other target or
6604 # - the --enable-64-bit-bfd option was supplied
6605 # Otherwise we only support all 32-bit targets.
6606 #
6607 # NOTE: This test must be in sync with the corresponding
6608 # tests in BFD!
20e95c23 6609
783e057b 6610 if test x${want64} = xfalse; then
81ecdfbb
RW
6611 # The cast to long int works around a bug in the HP C Compiler
6612# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6613# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6614# This bug is HP SR number 8606223364.
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6616$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6617if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6618 $as_echo_n "(cached) " >&6
c0993dbe 6619else
81ecdfbb 6620 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6621
81ecdfbb
RW
6622else
6623 if test "$ac_cv_type_long" = yes; then
6624 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6625$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6626as_fn_error 77 "cannot compute sizeof (long)
6627See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6628 else
6629 ac_cv_sizeof_long=0
6630 fi
c0993dbe 6631fi
81ecdfbb 6632
c0993dbe 6633fi
81ecdfbb
RW
6634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6635$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6636
c0993dbe 6637
c0993dbe 6638
c0993dbe
UW
6639cat >>confdefs.h <<_ACEOF
6640#define SIZEOF_LONG $ac_cv_sizeof_long
6641_ACEOF
6642
6643
6644 if test "x${ac_cv_sizeof_long}" = "x8"; then
6645 want64=true
6646 fi
6647 fi
6648 if test x${want64} = xtrue; then
6649 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6650 else
6651 TARGET_OBS='$(ALL_TARGET_OBS)'
6652 fi
6653fi
6654
6655
6656
b292c783 6657
c0993dbe
UW
6658# For other settings, only the main target counts.
6659gdb_sim=
6660gdb_osabi=
6661build_gdbserver=
6662targ=$target; . ${srcdir}/configure.tgt
6663
6664# Fetch the default architecture and default target vector from BFD.
6665targ=$target; . $srcdir/../bfd/config.bfd
6666
6667# We only want the first architecture, so strip off the others if
6668# there is more than one.
6669targ_archs=`echo $targ_archs | sed 's/ .*//'`
6670
6671if test "x$targ_archs" != x; then
6672
6673cat >>confdefs.h <<_ACEOF
6674#define DEFAULT_BFD_ARCH $targ_archs
6675_ACEOF
6676
6677fi
6678if test "x$targ_defvec" != x; then
6679
6680cat >>confdefs.h <<_ACEOF
6681#define DEFAULT_BFD_VEC $targ_defvec
6682_ACEOF
6683
6684fi
6685
c0993dbe 6686# Enable MI.
81ecdfbb
RW
6687# Check whether --enable-gdbmi was given.
6688if test "${enable_gdbmi+set}" = set; then :
6689 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6690 yes | no)
6691 ;;
6692 *)
d0ac1c44 6693 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6694 esac
6695else
6696 enable_gdbmi=yes
81ecdfbb
RW
6697fi
6698
c0993dbe
UW
6699if test x"$enable_gdbmi" = xyes; then
6700 if test -d $srcdir/mi; then
6701 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6702 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6703 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6704 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6705 fi
6706fi
6707
6708# Enable TUI.
81ecdfbb
RW
6709# Check whether --enable-tui was given.
6710if test "${enable_tui+set}" = set; then :
6711 enableval=$enable_tui; case $enableval in
3ca64bd3 6712 yes | no | auto)
c0993dbe
UW
6713 ;;
6714 *)
d0ac1c44 6715 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6716 esac
6717else
3ca64bd3 6718 enable_tui=auto
81ecdfbb
RW
6719fi
6720
c0993dbe
UW
6721
6722# Enable gdbtk.
81ecdfbb
RW
6723# Check whether --enable-gdbtk was given.
6724if test "${enable_gdbtk+set}" = set; then :
6725 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6726 yes | no)
6727 ;;
6728 *)
d0ac1c44 6729 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6730 esac
6731else
5062cc19 6732 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6733 enable_gdbtk=yes
6734 else
6735 enable_gdbtk=no
6736 fi
81ecdfbb
RW
6737fi
6738
c0993dbe
UW
6739# We unconditionally disable gdbtk tests on selected platforms.
6740case $host_os in
6741 go32* | windows*)
81ecdfbb
RW
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6743$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6744 enable_gdbtk=no ;;
6745esac
6746
05e7c244 6747# Libunwind support for ia64.
bec39cab 6748
05e7c244
JK
6749
6750# Check whether --with-libunwind-ia64 was given.
6751if test "${with_libunwind_ia64+set}" = set; then :
6752 withval=$with_libunwind_ia64;
bec39cab 6753else
05e7c244
JK
6754 with_libunwind_ia64=auto
6755fi
bec39cab 6756
05e7c244
JK
6757
6758# Backward compatibility option.
6759if test "${with_libunwind+set}" = set; then
6760 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6761 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6762 fi
6763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6764$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6765 with_libunwind_ia64="$with_libunwind"
6766fi
6767
6768case "$with_libunwind_ia64" in
6769 yes | no)
6770 ;;
6771 auto)
6772 for ac_header in libunwind-ia64.h
81ecdfbb 6773do :
b54a8fd7 6774 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6775if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6776 cat >>confdefs.h <<_ACEOF
b54a8fd7 6777#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6778_ACEOF
6779
6780fi
6781
6782done
6783
05e7c244
JK
6784 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6785 ;;
6786 *)
d0ac1c44 6787 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6788 ;;
6789esac
bec39cab 6790
05e7c244 6791if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6792 for ac_header in libunwind-ia64.h
81ecdfbb 6793do :
b54a8fd7 6794 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6795if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6796 cat >>confdefs.h <<_ACEOF
b54a8fd7 6797#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6798_ACEOF
6799
6800fi
6801
6802done
6803
05e7c244 6804 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6805 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6806 fi
6807 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6808 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6809 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6810fi
6811
cb01cfba
JB
6812opt_curses=no
6813
81ecdfbb
RW
6814# Check whether --with-curses was given.
6815if test "${with_curses+set}" = set; then :
6816 withval=$with_curses; opt_curses=$withval
6817fi
6818
cb01cfba 6819
76a39ba7 6820prefer_curses=no
cb01cfba 6821if test "$opt_curses" = "yes"; then
76a39ba7 6822 prefer_curses=yes
cb01cfba
JB
6823fi
6824
a9322a30 6825# Profiling support.
81ecdfbb
RW
6826# Check whether --enable-profiling was given.
6827if test "${enable_profiling+set}" = set; then :
6828 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6829 yes | no)
6830 ;;
6831 *)
d0ac1c44 6832 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6833 esac
6834else
6835 enable_profiling=no
81ecdfbb 6836fi
bec39cab 6837
a9322a30
TT
6838
6839for ac_func in monstartup _mcleanup
81ecdfbb
RW
6840do :
6841 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6842ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6843if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6844 cat >>confdefs.h <<_ACEOF
6845#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6846_ACEOF
a9322a30 6847
81ecdfbb
RW
6848fi
6849done
a9322a30 6850
81ecdfbb
RW
6851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6852$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6853if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6854 $as_echo_n "(cached) " >&6
6855else
6856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6857/* end confdefs.h. */
6858#include <stdlib.h>
6859extern char _etext;
a9322a30
TT
6860
6861int
6862main ()
6863{
6864free (&_etext);
6865 ;
6866 return 0;
6867}
bec39cab 6868_ACEOF
81ecdfbb 6869if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6870 ac_cv_var__etext=yes
bec39cab 6871else
81ecdfbb 6872 ac_cv_var__etext=no
bec39cab 6873fi
81ecdfbb
RW
6874rm -f core conftest.err conftest.$ac_objext \
6875 conftest$ac_exeext conftest.$ac_ext
bec39cab 6876fi
81ecdfbb
RW
6877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6878$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6879if test $ac_cv_var__etext = yes; then
60ca704f 6880
81ecdfbb 6881$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6882
bec39cab 6883fi
81ecdfbb
RW
6884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6885$as_echo_n "checking for etext... " >&6; }
d0ac1c44 6886if ${ac_cv_var_etext+:} false; then :
81ecdfbb 6887 $as_echo_n "(cached) " >&6
bec39cab 6888else
81ecdfbb 6889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6890/* end confdefs.h. */
a9322a30
TT
6891#include <stdlib.h>
6892extern char etext;
bec39cab
AC
6893
6894int
6895main ()
6896{
a9322a30 6897free (&etext);
bec39cab
AC
6898 ;
6899 return 0;
6900}
6901_ACEOF
81ecdfbb 6902if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6903 ac_cv_var_etext=yes
bec39cab 6904else
81ecdfbb 6905 ac_cv_var_etext=no
bec39cab 6906fi
81ecdfbb
RW
6907rm -f core conftest.err conftest.$ac_objext \
6908 conftest$ac_exeext conftest.$ac_ext
bec39cab 6909fi
81ecdfbb
RW
6910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6911$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6912if test $ac_cv_var_etext = yes; then
6913
81ecdfbb 6914$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6915
6916fi
a9322a30
TT
6917if test "$enable_profiling" = yes ; then
6918 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
d0ac1c44 6919 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6920 fi
6921 PROFILE_CFLAGS=-pg
6922 OLD_CFLAGS="$CFLAGS"
6923 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6924
81ecdfbb
RW
6925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6926$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 6927if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 6928 $as_echo_n "(cached) " >&6
bec39cab 6929else
81ecdfbb 6930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6931/* end confdefs.h. */
bec39cab
AC
6932
6933int
6934main ()
6935{
a9322a30 6936int x;
bec39cab
AC
6937 ;
6938 return 0;
6939}
6940_ACEOF
81ecdfbb 6941if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6942 ac_cv_cc_supports_pg=yes
bec39cab 6943else
81ecdfbb 6944 ac_cv_cc_supports_pg=no
bec39cab 6945fi
81ecdfbb 6946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6947fi
81ecdfbb
RW
6948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6949$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6950
a9322a30 6951 if test $ac_cv_cc_supports_pg = no; then
d0ac1c44 6952 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6953 fi
bec39cab 6954
a9322a30 6955 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6956fi
6957
44cee4fd
TT
6958CODESIGN_CERT=
6959# Check whether --enable-codesign was given.
6960if test "${enable_codesign+set}" = set; then :
6961 enableval=$enable_codesign; CODESIGN_CERT=$enableval
6962fi
6963
6964
6965
c16158bc
JM
6966
6967
81ecdfbb
RW
6968# Check whether --with-pkgversion was given.
6969if test "${with_pkgversion+set}" = set; then :
6970 withval=$with_pkgversion; case "$withval" in
d0ac1c44 6971 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6972 no) PKGVERSION= ;;
6973 *) PKGVERSION="($withval) " ;;
6974 esac
6975else
6976 PKGVERSION="(GDB) "
6977
81ecdfbb 6978fi
c16158bc
JM
6979
6980
6981
6982
81ecdfbb
RW
6983
6984# Check whether --with-bugurl was given.
6985if test "${with_bugurl+set}" = set; then :
6986 withval=$with_bugurl; case "$withval" in
d0ac1c44 6987 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6988 no) BUGURL=
6989 ;;
6990 *) BUGURL="$withval"
6991 ;;
6992 esac
6993else
6994 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6995
81ecdfbb
RW
6996fi
6997
c16158bc
JM
6998 case ${BUGURL} in
6999 "")
7000 REPORT_BUGS_TO=
7001 REPORT_BUGS_TEXI=
7002 ;;
7003 *)
7004 REPORT_BUGS_TO="<$BUGURL>"
7005 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7006 ;;
7007 esac;
7008
7009
7010
7011
7012cat >>confdefs.h <<_ACEOF
7013#define PKGVERSION "$PKGVERSION"
7014_ACEOF
7015
7016
7017cat >>confdefs.h <<_ACEOF
7018#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7019_ACEOF
7020
7021
bec39cab
AC
7022# --------------------- #
7023# Checks for programs. #
7024# --------------------- #
7025
7026for ac_prog in gawk mawk nawk awk
7027do
7028 # Extract the first word of "$ac_prog", so it can be a program name with args.
7029set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7031$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7032if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7033 $as_echo_n "(cached) " >&6
bec39cab
AC
7034else
7035 if test -n "$AWK"; then
7036 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7037else
7038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7039for as_dir in $PATH
7040do
7041 IFS=$as_save_IFS
7042 test -z "$as_dir" && as_dir=.
81ecdfbb 7043 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7045 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7047 break 2
7048 fi
7049done
81ecdfbb
RW
7050 done
7051IFS=$as_save_IFS
bec39cab
AC
7052
7053fi
7054fi
7055AWK=$ac_cv_prog_AWK
7056if test -n "$AWK"; then
81ecdfbb
RW
7057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7058$as_echo "$AWK" >&6; }
bec39cab 7059else
81ecdfbb
RW
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7061$as_echo "no" >&6; }
bec39cab
AC
7062fi
7063
bec39cab 7064
81ecdfbb 7065 test -n "$AWK" && break
bec39cab
AC
7066done
7067
c971b7fa
PA
7068# Find a good install program. We prefer a C program (faster),
7069# so one script is as good as another. But avoid the broken or
7070# incompatible versions:
7071# SysV /etc/install, /usr/sbin/install
7072# SunOS /usr/etc/install
7073# IRIX /sbin/install
7074# AIX /bin/install
7075# AmigaOS /C/install, which installs bootblocks on floppy discs
7076# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7077# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7078# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7079# OS/2's system install, which has a completely different semantic
7080# ./install, which can be erroneously created by make from ./install.sh.
7081# Reject install programs that cannot install multiple files.
7082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7083$as_echo_n "checking for a BSD-compatible install... " >&6; }
7084if test -z "$INSTALL"; then
d0ac1c44 7085if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7086 $as_echo_n "(cached) " >&6
7087else
7088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7089for as_dir in $PATH
7090do
7091 IFS=$as_save_IFS
7092 test -z "$as_dir" && as_dir=.
7093 # Account for people who put trailing slashes in PATH elements.
7094case $as_dir/ in #((
7095 ./ | .// | /[cC]/* | \
7096 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7097 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7098 /usr/ucb/* ) ;;
7099 *)
7100 # OSF1 and SCO ODT 3.0 have their own names for install.
7101 # Don't use installbsd from OSF since it installs stuff as root
7102 # by default.
7103 for ac_prog in ginstall scoinst install; do
7104 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7105 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7106 if test $ac_prog = install &&
7107 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7108 # AIX install. It has an incompatible calling convention.
7109 :
7110 elif test $ac_prog = install &&
7111 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7112 # program-specific install script used by HP pwplus--don't use.
7113 :
7114 else
7115 rm -rf conftest.one conftest.two conftest.dir
7116 echo one > conftest.one
7117 echo two > conftest.two
7118 mkdir conftest.dir
7119 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7120 test -s conftest.one && test -s conftest.two &&
7121 test -s conftest.dir/conftest.one &&
7122 test -s conftest.dir/conftest.two
7123 then
7124 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7125 break 3
7126 fi
7127 fi
7128 fi
7129 done
7130 done
7131 ;;
7132esac
7133
7134 done
7135IFS=$as_save_IFS
7136
7137rm -rf conftest.one conftest.two conftest.dir
7138
7139fi
7140 if test "${ac_cv_path_install+set}" = set; then
7141 INSTALL=$ac_cv_path_install
7142 else
7143 # As a last resort, use the slow shell script. Don't cache a
7144 # value for INSTALL within a source directory, because that will
7145 # break other packages using the cache if that directory is
7146 # removed, or if the value is a relative name.
7147 INSTALL=$ac_install_sh
7148 fi
7149fi
7150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7151$as_echo "$INSTALL" >&6; }
7152
7153# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7154# It thinks the first close brace ends the variable substitution.
7155test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7156
7157test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7158
7159test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7160
81ecdfbb
RW
7161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7162$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7163LN_S=$as_ln_s
7164if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7166$as_echo "yes" >&6; }
bec39cab 7167else
81ecdfbb
RW
7168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7169$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7170fi
7171
7172if test -n "$ac_tool_prefix"; then
7173 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7174set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7176$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7177if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7178 $as_echo_n "(cached) " >&6
bec39cab
AC
7179else
7180 if test -n "$RANLIB"; then
7181 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7182else
7183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7184for as_dir in $PATH
7185do
7186 IFS=$as_save_IFS
7187 test -z "$as_dir" && as_dir=.
81ecdfbb 7188 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7189 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7190 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7191 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7192 break 2
7193 fi
7194done
81ecdfbb
RW
7195 done
7196IFS=$as_save_IFS
bec39cab
AC
7197
7198fi
7199fi
7200RANLIB=$ac_cv_prog_RANLIB
7201if test -n "$RANLIB"; then
81ecdfbb
RW
7202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7203$as_echo "$RANLIB" >&6; }
bec39cab 7204else
81ecdfbb
RW
7205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7206$as_echo "no" >&6; }
bec39cab
AC
7207fi
7208
81ecdfbb 7209
bec39cab
AC
7210fi
7211if test -z "$ac_cv_prog_RANLIB"; then
7212 ac_ct_RANLIB=$RANLIB
7213 # Extract the first word of "ranlib", so it can be a program name with args.
7214set dummy ranlib; ac_word=$2
81ecdfbb
RW
7215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7216$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7217if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7218 $as_echo_n "(cached) " >&6
bec39cab
AC
7219else
7220 if test -n "$ac_ct_RANLIB"; then
7221 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7222else
7223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7224for as_dir in $PATH
7225do
7226 IFS=$as_save_IFS
7227 test -z "$as_dir" && as_dir=.
81ecdfbb 7228 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7229 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7230 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7231 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7232 break 2
7233 fi
7234done
81ecdfbb
RW
7235 done
7236IFS=$as_save_IFS
bec39cab 7237
bec39cab
AC
7238fi
7239fi
7240ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7241if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7243$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7244else
81ecdfbb
RW
7245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7246$as_echo "no" >&6; }
bec39cab
AC
7247fi
7248
81ecdfbb
RW
7249 if test "x$ac_ct_RANLIB" = x; then
7250 RANLIB=":"
7251 else
7252 case $cross_compiling:$ac_tool_warned in
7253yes:)
7254{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7255$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7256ac_tool_warned=yes ;;
7257esac
7258 RANLIB=$ac_ct_RANLIB
7259 fi
bec39cab
AC
7260else
7261 RANLIB="$ac_cv_prog_RANLIB"
7262fi
7263
7264for ac_prog in 'bison -y' byacc
7265do
7266 # Extract the first word of "$ac_prog", so it can be a program name with args.
7267set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7269$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7270if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7271 $as_echo_n "(cached) " >&6
bec39cab
AC
7272else
7273 if test -n "$YACC"; then
7274 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7275else
7276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7277for as_dir in $PATH
7278do
7279 IFS=$as_save_IFS
7280 test -z "$as_dir" && as_dir=.
81ecdfbb 7281 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7282 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7283 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7284 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7285 break 2
7286 fi
7287done
81ecdfbb
RW
7288 done
7289IFS=$as_save_IFS
bec39cab
AC
7290
7291fi
7292fi
7293YACC=$ac_cv_prog_YACC
7294if test -n "$YACC"; then
81ecdfbb
RW
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7296$as_echo "$YACC" >&6; }
bec39cab 7297else
81ecdfbb
RW
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7299$as_echo "no" >&6; }
bec39cab
AC
7300fi
7301
81ecdfbb 7302
bec39cab
AC
7303 test -n "$YACC" && break
7304done
7305test -n "$YACC" || YACC="yacc"
7306
7307
7308if test -n "$ac_tool_prefix"; then
7309 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7310set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7312$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7313if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7314 $as_echo_n "(cached) " >&6
bec39cab
AC
7315else
7316 if test -n "$AR"; then
7317 ac_cv_prog_AR="$AR" # Let the user override the test.
7318else
7319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7320for as_dir in $PATH
7321do
7322 IFS=$as_save_IFS
7323 test -z "$as_dir" && as_dir=.
81ecdfbb 7324 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7325 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7326 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7327 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7328 break 2
7329 fi
7330done
81ecdfbb
RW
7331 done
7332IFS=$as_save_IFS
bec39cab
AC
7333
7334fi
7335fi
7336AR=$ac_cv_prog_AR
7337if test -n "$AR"; then
81ecdfbb
RW
7338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7339$as_echo "$AR" >&6; }
bec39cab 7340else
81ecdfbb
RW
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7342$as_echo "no" >&6; }
bec39cab
AC
7343fi
7344
81ecdfbb 7345
bec39cab
AC
7346fi
7347if test -z "$ac_cv_prog_AR"; then
7348 ac_ct_AR=$AR
7349 # Extract the first word of "ar", so it can be a program name with args.
7350set dummy ar; ac_word=$2
81ecdfbb
RW
7351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7352$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7353if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7354 $as_echo_n "(cached) " >&6
bec39cab
AC
7355else
7356 if test -n "$ac_ct_AR"; then
7357 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7358else
7359as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7360for as_dir in $PATH
7361do
7362 IFS=$as_save_IFS
7363 test -z "$as_dir" && as_dir=.
81ecdfbb 7364 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7365 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7366 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7367 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7368 break 2
7369 fi
7370done
81ecdfbb
RW
7371 done
7372IFS=$as_save_IFS
bec39cab
AC
7373
7374fi
7375fi
7376ac_ct_AR=$ac_cv_prog_ac_ct_AR
7377if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7379$as_echo "$ac_ct_AR" >&6; }
bec39cab 7380else
81ecdfbb
RW
7381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7382$as_echo "no" >&6; }
bec39cab
AC
7383fi
7384
81ecdfbb
RW
7385 if test "x$ac_ct_AR" = x; then
7386 AR=""
7387 else
7388 case $cross_compiling:$ac_tool_warned in
7389yes:)
7390{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7391$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7392ac_tool_warned=yes ;;
7393esac
7394 AR=$ac_ct_AR
7395 fi
bec39cab
AC
7396else
7397 AR="$ac_cv_prog_AR"
7398fi
7399
7400if test -n "$ac_tool_prefix"; then
7401 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7402set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7404$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7405if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7406 $as_echo_n "(cached) " >&6
bec39cab
AC
7407else
7408 if test -n "$DLLTOOL"; then
7409 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7410else
7411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7412for as_dir in $PATH
7413do
7414 IFS=$as_save_IFS
7415 test -z "$as_dir" && as_dir=.
81ecdfbb 7416 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7417 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7418 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7420 break 2
7421 fi
7422done
81ecdfbb
RW
7423 done
7424IFS=$as_save_IFS
bec39cab
AC
7425
7426fi
7427fi
7428DLLTOOL=$ac_cv_prog_DLLTOOL
7429if test -n "$DLLTOOL"; then
81ecdfbb
RW
7430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7431$as_echo "$DLLTOOL" >&6; }
bec39cab 7432else
81ecdfbb
RW
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7434$as_echo "no" >&6; }
bec39cab
AC
7435fi
7436
81ecdfbb 7437
bec39cab
AC
7438fi
7439if test -z "$ac_cv_prog_DLLTOOL"; then
7440 ac_ct_DLLTOOL=$DLLTOOL
7441 # Extract the first word of "dlltool", so it can be a program name with args.
7442set dummy dlltool; ac_word=$2
81ecdfbb
RW
7443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7444$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7445if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7446 $as_echo_n "(cached) " >&6
bec39cab
AC
7447else
7448 if test -n "$ac_ct_DLLTOOL"; then
7449 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7450else
7451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7452for as_dir in $PATH
7453do
7454 IFS=$as_save_IFS
7455 test -z "$as_dir" && as_dir=.
81ecdfbb 7456 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7457 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7458 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7459 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7460 break 2
7461 fi
7462done
81ecdfbb
RW
7463 done
7464IFS=$as_save_IFS
bec39cab
AC
7465
7466fi
7467fi
7468ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7469if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7471$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7472else
81ecdfbb
RW
7473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7474$as_echo "no" >&6; }
bec39cab
AC
7475fi
7476
81ecdfbb
RW
7477 if test "x$ac_ct_DLLTOOL" = x; then
7478 DLLTOOL=""
7479 else
7480 case $cross_compiling:$ac_tool_warned in
7481yes:)
7482{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7483$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7484ac_tool_warned=yes ;;
7485esac
7486 DLLTOOL=$ac_ct_DLLTOOL
7487 fi
bec39cab
AC
7488else
7489 DLLTOOL="$ac_cv_prog_DLLTOOL"
7490fi
7491
7492if test -n "$ac_tool_prefix"; then
7493 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7494set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7496$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7497if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7498 $as_echo_n "(cached) " >&6
bec39cab
AC
7499else
7500 if test -n "$WINDRES"; then
7501 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7502else
7503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7504for as_dir in $PATH
7505do
7506 IFS=$as_save_IFS
7507 test -z "$as_dir" && as_dir=.
81ecdfbb 7508 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7509 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7510 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7511 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7512 break 2
7513 fi
7514done
81ecdfbb
RW
7515 done
7516IFS=$as_save_IFS
bec39cab
AC
7517
7518fi
7519fi
7520WINDRES=$ac_cv_prog_WINDRES
7521if test -n "$WINDRES"; then
81ecdfbb
RW
7522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7523$as_echo "$WINDRES" >&6; }
bec39cab 7524else
81ecdfbb
RW
7525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7526$as_echo "no" >&6; }
bec39cab
AC
7527fi
7528
81ecdfbb 7529
bec39cab
AC
7530fi
7531if test -z "$ac_cv_prog_WINDRES"; then
7532 ac_ct_WINDRES=$WINDRES
7533 # Extract the first word of "windres", so it can be a program name with args.
7534set dummy windres; ac_word=$2
81ecdfbb
RW
7535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7536$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7537if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7538 $as_echo_n "(cached) " >&6
bec39cab
AC
7539else
7540 if test -n "$ac_ct_WINDRES"; then
7541 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7542else
7543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7544for as_dir in $PATH
7545do
7546 IFS=$as_save_IFS
7547 test -z "$as_dir" && as_dir=.
81ecdfbb 7548 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7549 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7550 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7552 break 2
7553 fi
7554done
81ecdfbb
RW
7555 done
7556IFS=$as_save_IFS
bec39cab
AC
7557
7558fi
7559fi
7560ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7561if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7563$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7564else
81ecdfbb
RW
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7566$as_echo "no" >&6; }
c906108c 7567fi
bec39cab 7568
81ecdfbb
RW
7569 if test "x$ac_ct_WINDRES" = x; then
7570 WINDRES=""
7571 else
7572 case $cross_compiling:$ac_tool_warned in
7573yes:)
7574{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7575$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7576ac_tool_warned=yes ;;
7577esac
7578 WINDRES=$ac_ct_WINDRES
7579 fi
c906108c 7580else
bec39cab 7581 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7582fi
7583
bec39cab 7584
036c3acb
TS
7585case $host_os in
7586 gnu*)
7587 # Needed for GNU Hurd hosts.
7588 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7589 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7590set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7592$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7593if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7594 $as_echo_n "(cached) " >&6
c906108c 7595else
bec39cab
AC
7596 if test -n "$MIG"; then
7597 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7598else
7599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7600for as_dir in $PATH
7601do
7602 IFS=$as_save_IFS
7603 test -z "$as_dir" && as_dir=.
81ecdfbb 7604 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7606 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7607 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7608 break 2
7609 fi
7610done
81ecdfbb
RW
7611 done
7612IFS=$as_save_IFS
bec39cab 7613
c906108c 7614fi
bec39cab
AC
7615fi
7616MIG=$ac_cv_prog_MIG
7617if test -n "$MIG"; then
81ecdfbb
RW
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7619$as_echo "$MIG" >&6; }
c906108c 7620else
81ecdfbb
RW
7621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7622$as_echo "no" >&6; }
c906108c
SS
7623fi
7624
81ecdfbb 7625
bec39cab
AC
7626fi
7627if test -z "$ac_cv_prog_MIG"; then
7628 ac_ct_MIG=$MIG
7629 # Extract the first word of "mig", so it can be a program name with args.
7630set dummy mig; ac_word=$2
81ecdfbb
RW
7631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7632$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7633if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7634 $as_echo_n "(cached) " >&6
bec39cab
AC
7635else
7636 if test -n "$ac_ct_MIG"; then
7637 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7638else
7639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7640for as_dir in $PATH
7641do
7642 IFS=$as_save_IFS
7643 test -z "$as_dir" && as_dir=.
81ecdfbb 7644 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7646 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7648 break 2
7649 fi
7650done
81ecdfbb
RW
7651 done
7652IFS=$as_save_IFS
c906108c 7653
bec39cab
AC
7654fi
7655fi
7656ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7657if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7659$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7660else
81ecdfbb
RW
7661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7662$as_echo "no" >&6; }
bec39cab 7663fi
c906108c 7664
81ecdfbb
RW
7665 if test "x$ac_ct_MIG" = x; then
7666 MIG=""
7667 else
7668 case $cross_compiling:$ac_tool_warned in
7669yes:)
7670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7672ac_tool_warned=yes ;;
7673esac
7674 MIG=$ac_ct_MIG
7675 fi
bec39cab
AC
7676else
7677 MIG="$ac_cv_prog_MIG"
7678fi
c906108c 7679
036c3acb 7680 if test x"$MIG" = x; then
d0ac1c44 7681 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7682 fi
7683 ;;
7684esac
c906108c 7685
bec39cab
AC
7686# ---------------------- #
7687# Checks for libraries. #
7688# ---------------------- #
c906108c 7689
bec39cab 7690# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7692$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7693if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7694 $as_echo_n "(cached) " >&6
bec39cab
AC
7695else
7696 ac_check_lib_save_LIBS=$LIBS
7697LIBS="-lm $LIBS"
81ecdfbb 7698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7699/* end confdefs.h. */
c906108c 7700
c906108c 7701
bec39cab
AC
7702int
7703main ()
7704{
81ecdfbb 7705return main ();
bec39cab
AC
7706 ;
7707 return 0;
7708}
7709_ACEOF
81ecdfbb 7710if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7711 ac_cv_lib_m_main=yes
7712else
81ecdfbb 7713 ac_cv_lib_m_main=no
bec39cab 7714fi
81ecdfbb
RW
7715rm -f core conftest.err conftest.$ac_objext \
7716 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7717LIBS=$ac_check_lib_save_LIBS
7718fi
81ecdfbb
RW
7719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7720$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7721if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7722 cat >>confdefs.h <<_ACEOF
7723#define HAVE_LIBM 1
7724_ACEOF
7725
7726 LIBS="-lm $LIBS"
c906108c 7727
c906108c 7728fi
bec39cab
AC
7729
7730
bec39cab 7731# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7733$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7734if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7735 $as_echo_n "(cached) " >&6
bec39cab
AC
7736else
7737 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7739/* end confdefs.h. */
ddc9cd0f 7740
81ecdfbb
RW
7741/* Override any GCC internal prototype to avoid an error.
7742 Use char because int might match the return type of a GCC
7743 builtin and then its argument prototype would still apply. */
bec39cab
AC
7744#ifdef __cplusplus
7745extern "C"
7746#endif
bec39cab
AC
7747char gethostbyname ();
7748int
7749main ()
7750{
81ecdfbb 7751return gethostbyname ();
bec39cab
AC
7752 ;
7753 return 0;
7754}
7755_ACEOF
81ecdfbb
RW
7756for ac_lib in '' nsl; do
7757 if test -z "$ac_lib"; then
7758 ac_res="none required"
7759 else
7760 ac_res=-l$ac_lib
b4e70030 7761 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7762 fi
7763 if ac_fn_c_try_link "$LINENO"; then :
7764 ac_cv_search_gethostbyname=$ac_res
7765fi
7766rm -f core conftest.err conftest.$ac_objext \
7767 conftest$ac_exeext
d0ac1c44 7768 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7769 break
7770fi
7771done
d0ac1c44 7772if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7773
bec39cab 7774else
81ecdfbb 7775 ac_cv_search_gethostbyname=no
bec39cab 7776fi
81ecdfbb 7777rm conftest.$ac_ext
bec39cab
AC
7778LIBS=$ac_func_search_save_LIBS
7779fi
81ecdfbb
RW
7780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7781$as_echo "$ac_cv_search_gethostbyname" >&6; }
7782ac_res=$ac_cv_search_gethostbyname
7783if test "$ac_res" != no; then :
7784 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7785
bec39cab 7786fi
96baa820 7787
c906108c 7788
b4e70030 7789# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7791$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7792if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7793 $as_echo_n "(cached) " >&6
b4e70030
JB
7794else
7795 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7797/* end confdefs.h. */
7798
81ecdfbb
RW
7799/* Override any GCC internal prototype to avoid an error.
7800 Use char because int might match the return type of a GCC
7801 builtin and then its argument prototype would still apply. */
b4e70030
JB
7802#ifdef __cplusplus
7803extern "C"
7804#endif
b4e70030
JB
7805char socketpair ();
7806int
7807main ()
7808{
81ecdfbb 7809return socketpair ();
b4e70030
JB
7810 ;
7811 return 0;
7812}
7813_ACEOF
81ecdfbb
RW
7814for ac_lib in '' socket; do
7815 if test -z "$ac_lib"; then
7816 ac_res="none required"
7817 else
7818 ac_res=-l$ac_lib
b4e70030 7819 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7820 fi
7821 if ac_fn_c_try_link "$LINENO"; then :
7822 ac_cv_search_socketpair=$ac_res
7823fi
7824rm -f core conftest.err conftest.$ac_objext \
7825 conftest$ac_exeext
d0ac1c44 7826 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7827 break
7828fi
7829done
d0ac1c44 7830if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7831
b4e70030 7832else
81ecdfbb 7833 ac_cv_search_socketpair=no
b4e70030 7834fi
81ecdfbb 7835rm conftest.$ac_ext
b4e70030
JB
7836LIBS=$ac_func_search_save_LIBS
7837fi
81ecdfbb
RW
7838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7839$as_echo "$ac_cv_search_socketpair" >&6; }
7840ac_res=$ac_cv_search_socketpair
7841if test "$ac_res" != no; then :
7842 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7843
7844fi
7845
7846
233a11ab 7847# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7848
711a72d3 7849 # Use the system's zlib library.
39f3de7c
L
7850 zlibdir="-L\$(top_builddir)/../zlib"
7851 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7852
711a72d3
L
7853# Check whether --with-system-zlib was given.
7854if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7855 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7856 zlibdir=
7857 zlibinc=
7858 fi
b040ad30 7859
233a11ab 7860fi
233a11ab 7861
233a11ab 7862
233a11ab 7863
b040ad30 7864
233a11ab 7865
25268153 7866# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7867# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7869$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7870if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7871 $as_echo_n "(cached) " >&6
7872else
7873 ac_func_search_save_LIBS=$LIBS
7874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7875/* end confdefs.h. */
7876
7877/* Override any GCC internal prototype to avoid an error.
7878 Use char because int might match the return type of a GCC
7879 builtin and then its argument prototype would still apply. */
7880#ifdef __cplusplus
7881extern "C"
7882#endif
7883char kinfo_getvmmap ();
7884int
7885main ()
7886{
7887return kinfo_getvmmap ();
7888 ;
7889 return 0;
7890}
7891_ACEOF
37773e78 7892for ac_lib in '' util util-freebsd; do
25268153
JB
7893 if test -z "$ac_lib"; then
7894 ac_res="none required"
7895 else
7896 ac_res=-l$ac_lib
7897 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7898 fi
7899 if ac_fn_c_try_link "$LINENO"; then :
7900 ac_cv_search_kinfo_getvmmap=$ac_res
7901fi
7902rm -f core conftest.err conftest.$ac_objext \
7903 conftest$ac_exeext
d0ac1c44 7904 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7905 break
7906fi
7907done
d0ac1c44 7908if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7909
7910else
7911 ac_cv_search_kinfo_getvmmap=no
7912fi
7913rm conftest.$ac_ext
7914LIBS=$ac_func_search_save_LIBS
7915fi
7916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7917$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7918ac_res=$ac_cv_search_kinfo_getvmmap
7919if test "$ac_res" != no; then :
7920 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7921
7922$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7923
7924fi
7925
7926
92fce24d
JB
7927# fbsd-nat.c can also use kinfo_getfile.
7928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
7929$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
d0ac1c44 7930if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7931 $as_echo_n "(cached) " >&6
7932else
7933 ac_func_search_save_LIBS=$LIBS
7934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7935/* end confdefs.h. */
7936
7937/* Override any GCC internal prototype to avoid an error.
7938 Use char because int might match the return type of a GCC
7939 builtin and then its argument prototype would still apply. */
7940#ifdef __cplusplus
7941extern "C"
7942#endif
7943char kinfo_getfile ();
7944int
7945main ()
7946{
7947return kinfo_getfile ();
7948 ;
7949 return 0;
7950}
7951_ACEOF
7952for ac_lib in '' util util-freebsd; do
7953 if test -z "$ac_lib"; then
7954 ac_res="none required"
7955 else
7956 ac_res=-l$ac_lib
7957 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7958 fi
7959 if ac_fn_c_try_link "$LINENO"; then :
7960 ac_cv_search_kinfo_getfile=$ac_res
7961fi
7962rm -f core conftest.err conftest.$ac_objext \
7963 conftest$ac_exeext
d0ac1c44 7964 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7965 break
7966fi
7967done
d0ac1c44 7968if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7969
7970else
7971 ac_cv_search_kinfo_getfile=no
7972fi
7973rm conftest.$ac_ext
7974LIBS=$ac_func_search_save_LIBS
7975fi
7976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
7977$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
7978ac_res=$ac_cv_search_kinfo_getfile
7979if test "$ac_res" != no; then :
7980 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7981
7982$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
7983
7984fi
7985
7986
77f120bf 7987
016a3251
DD
7988 if test "X$prefix" = "XNONE"; then
7989 acl_final_prefix="$ac_default_prefix"
7990 else
7991 acl_final_prefix="$prefix"
7992 fi
7993 if test "X$exec_prefix" = "XNONE"; then
7994 acl_final_exec_prefix='${prefix}'
7995 else
7996 acl_final_exec_prefix="$exec_prefix"
7997 fi
7998 acl_save_prefix="$prefix"
7999 prefix="$acl_final_prefix"
8000 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8001 prefix="$acl_save_prefix"
8002
8003
8004# Check whether --with-gnu-ld was given.
8005if test "${with_gnu_ld+set}" = set; then :
8006 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8007else
8008 with_gnu_ld=no
8009fi
8010
8011# Prepare PATH_SEPARATOR.
8012# The user is always right.
8013if test "${PATH_SEPARATOR+set}" != set; then
8014 echo "#! /bin/sh" >conf$$.sh
8015 echo "exit 0" >>conf$$.sh
8016 chmod +x conf$$.sh
8017 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8018 PATH_SEPARATOR=';'
8019 else
8020 PATH_SEPARATOR=:
8021 fi
8022 rm -f conf$$.sh
8023fi
8024ac_prog=ld
8025if test "$GCC" = yes; then
8026 # Check if gcc -print-prog-name=ld gives a path.
8027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8028$as_echo_n "checking for ld used by GCC... " >&6; }
8029 case $host in
8030 *-*-mingw*)
8031 # gcc leaves a trailing carriage return which upsets mingw
8032 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8033 *)
8034 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8035 esac
8036 case $ac_prog in
8037 # Accept absolute paths.
8038 [\\/]* | [A-Za-z]:[\\/]*)
8039 re_direlt='/[^/][^/]*/\.\./'
8040 # Canonicalize the path of ld
8041 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8042 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8043 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8044 done
8045 test -z "$LD" && LD="$ac_prog"
8046 ;;
8047 "")
8048 # If it fails, then pretend we aren't using GCC.
8049 ac_prog=ld
8050 ;;
8051 *)
8052 # If it is relative, then search for the first ld in PATH.
8053 with_gnu_ld=unknown
8054 ;;
8055 esac
8056elif test "$with_gnu_ld" = yes; then
8057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8058$as_echo_n "checking for GNU ld... " >&6; }
8059else
8060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8061$as_echo_n "checking for non-GNU ld... " >&6; }
8062fi
d0ac1c44 8063if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8064 $as_echo_n "(cached) " >&6
8065else
8066 if test -z "$LD"; then
8067 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8068 for ac_dir in $PATH; do
8069 test -z "$ac_dir" && ac_dir=.
8070 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8071 acl_cv_path_LD="$ac_dir/$ac_prog"
8072 # Check to see if the program is GNU ld. I'd rather use --version,
8073 # but apparently some GNU ld's only accept -v.
8074 # Break only if it was the GNU/non-GNU ld that we prefer.
8075 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8076 test "$with_gnu_ld" != no && break
8077 else
8078 test "$with_gnu_ld" != yes && break
8079 fi
8080 fi
8081 done
8082 IFS="$ac_save_ifs"
8083else
8084 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8085fi
8086fi
8087
8088LD="$acl_cv_path_LD"
8089if test -n "$LD"; then
8090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8091$as_echo "$LD" >&6; }
8092else
8093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8094$as_echo "no" >&6; }
8095fi
d0ac1c44 8096test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8098$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8099if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8100 $as_echo_n "(cached) " >&6
8101else
8102 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8103if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8104 acl_cv_prog_gnu_ld=yes
8105else
8106 acl_cv_prog_gnu_ld=no
8107fi
8108fi
8109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8110$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8111with_gnu_ld=$acl_cv_prog_gnu_ld
8112
8113
8114
8115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8116$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8117if ${acl_cv_rpath+:} false; then :
016a3251
DD
8118 $as_echo_n "(cached) " >&6
8119else
8120
8121 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8122 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8123 . ./conftest.sh
8124 rm -f ./conftest.sh
8125 acl_cv_rpath=done
8126
8127fi
8128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8129$as_echo "$acl_cv_rpath" >&6; }
8130 wl="$acl_cv_wl"
8131 libext="$acl_cv_libext"
8132 shlibext="$acl_cv_shlibext"
8133 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8134 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8135 hardcode_direct="$acl_cv_hardcode_direct"
8136 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8137 # Check whether --enable-rpath was given.
8138if test "${enable_rpath+set}" = set; then :
8139 enableval=$enable_rpath; :
8140else
8141 enable_rpath=yes
8142fi
8143
8144
8145
8146
8147
8148
8149
8150
8151 use_additional=yes
8152
8153 acl_save_prefix="$prefix"
8154 prefix="$acl_final_prefix"
8155 acl_save_exec_prefix="$exec_prefix"
8156 exec_prefix="$acl_final_exec_prefix"
8157
8158 eval additional_includedir=\"$includedir\"
8159 eval additional_libdir=\"$libdir\"
8160
8161 exec_prefix="$acl_save_exec_prefix"
8162 prefix="$acl_save_prefix"
77f120bf 8163
6c7a06a3 8164
81ecdfbb
RW
8165# Check whether --with-libiconv-prefix was given.
8166if test "${with_libiconv_prefix+set}" = set; then :
8167 withval=$with_libiconv_prefix;
016a3251
DD
8168 if test "X$withval" = "Xno"; then
8169 use_additional=no
8170 else
8171 if test "X$withval" = "X"; then
8172
8173 acl_save_prefix="$prefix"
8174 prefix="$acl_final_prefix"
8175 acl_save_exec_prefix="$exec_prefix"
8176 exec_prefix="$acl_final_exec_prefix"
8177
8178 eval additional_includedir=\"$includedir\"
8179 eval additional_libdir=\"$libdir\"
8180
8181 exec_prefix="$acl_save_exec_prefix"
8182 prefix="$acl_save_prefix"
8183
8184 else
8185 additional_includedir="$withval/include"
8186 additional_libdir="$withval/lib"
8187 fi
8188 fi
6c7a06a3 8189
81ecdfbb
RW
8190fi
8191
016a3251
DD
8192 LIBICONV=
8193 LTLIBICONV=
8194 INCICONV=
8195 rpathdirs=
8196 ltrpathdirs=
8197 names_already_handled=
8198 names_next_round='iconv '
8199 while test -n "$names_next_round"; do
8200 names_this_round="$names_next_round"
8201 names_next_round=
8202 for name in $names_this_round; do
8203 already_handled=
8204 for n in $names_already_handled; do
8205 if test "$n" = "$name"; then
8206 already_handled=yes
8207 break
8208 fi
8209 done
8210 if test -z "$already_handled"; then
8211 names_already_handled="$names_already_handled $name"
8212 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8213 eval value=\"\$HAVE_LIB$uppername\"
8214 if test -n "$value"; then
8215 if test "$value" = yes; then
8216 eval value=\"\$LIB$uppername\"
8217 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8218 eval value=\"\$LTLIB$uppername\"
8219 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8220 else
8221 :
8222 fi
8223 else
8224 found_dir=
8225 found_la=
8226 found_so=
8227 found_a=
8228 if test $use_additional = yes; then
8229 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8230 found_dir="$additional_libdir"
8231 found_so="$additional_libdir/lib$name.$shlibext"
8232 if test -f "$additional_libdir/lib$name.la"; then
8233 found_la="$additional_libdir/lib$name.la"
8234 fi
8235 else
8236 if test -f "$additional_libdir/lib$name.$libext"; then
8237 found_dir="$additional_libdir"
8238 found_a="$additional_libdir/lib$name.$libext"
8239 if test -f "$additional_libdir/lib$name.la"; then
8240 found_la="$additional_libdir/lib$name.la"
8241 fi
8242 fi
8243 fi
8244 fi
8245 if test "X$found_dir" = "X"; then
8246 for x in $LDFLAGS $LTLIBICONV; do
8247
8248 acl_save_prefix="$prefix"
8249 prefix="$acl_final_prefix"
8250 acl_save_exec_prefix="$exec_prefix"
8251 exec_prefix="$acl_final_exec_prefix"
8252 eval x=\"$x\"
8253 exec_prefix="$acl_save_exec_prefix"
8254 prefix="$acl_save_prefix"
8255
8256 case "$x" in
8257 -L*)
8258 dir=`echo "X$x" | sed -e 's/^X-L//'`
8259 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8260 found_dir="$dir"
8261 found_so="$dir/lib$name.$shlibext"
8262 if test -f "$dir/lib$name.la"; then
8263 found_la="$dir/lib$name.la"
8264 fi
8265 else
8266 if test -f "$dir/lib$name.$libext"; then
8267 found_dir="$dir"
8268 found_a="$dir/lib$name.$libext"
8269 if test -f "$dir/lib$name.la"; then
8270 found_la="$dir/lib$name.la"
8271 fi
8272 fi
8273 fi
8274 ;;
8275 esac
8276 if test "X$found_dir" != "X"; then
8277 break
8278 fi
8279 done
8280 fi
8281 if test "X$found_dir" != "X"; then
8282 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8283 if test "X$found_so" != "X"; then
8284 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8285 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8286 else
8287 haveit=
8288 for x in $ltrpathdirs; do
8289 if test "X$x" = "X$found_dir"; then
8290 haveit=yes
8291 break
8292 fi
8293 done
8294 if test -z "$haveit"; then
8295 ltrpathdirs="$ltrpathdirs $found_dir"
8296 fi
8297 if test "$hardcode_direct" = yes; then
8298 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8299 else
8300 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8301 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8302 haveit=
8303 for x in $rpathdirs; do
8304 if test "X$x" = "X$found_dir"; then
8305 haveit=yes
8306 break
8307 fi
8308 done
8309 if test -z "$haveit"; then
8310 rpathdirs="$rpathdirs $found_dir"
8311 fi
8312 else
8313 haveit=
8314 for x in $LDFLAGS $LIBICONV; do
8315
8316 acl_save_prefix="$prefix"
8317 prefix="$acl_final_prefix"
8318 acl_save_exec_prefix="$exec_prefix"
8319 exec_prefix="$acl_final_exec_prefix"
8320 eval x=\"$x\"
8321 exec_prefix="$acl_save_exec_prefix"
8322 prefix="$acl_save_prefix"
8323
8324 if test "X$x" = "X-L$found_dir"; then
8325 haveit=yes
8326 break
8327 fi
8328 done
8329 if test -z "$haveit"; then
8330 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8331 fi
8332 if test "$hardcode_minus_L" != no; then
8333 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8334 else
8335 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8336 fi
8337 fi
8338 fi
8339 fi
8340 else
8341 if test "X$found_a" != "X"; then
8342 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8343 else
8344 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8345 fi
8346 fi
8347 additional_includedir=
8348 case "$found_dir" in
8349 */lib | */lib/)
8350 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8351 additional_includedir="$basedir/include"
8352 ;;
8353 esac
8354 if test "X$additional_includedir" != "X"; then
8355 if test "X$additional_includedir" != "X/usr/include"; then
8356 haveit=
8357 if test "X$additional_includedir" = "X/usr/local/include"; then
8358 if test -n "$GCC"; then
8359 case $host_os in
8360 linux*) haveit=yes;;
8361 esac
8362 fi
8363 fi
8364 if test -z "$haveit"; then
8365 for x in $CPPFLAGS $INCICONV; do
8366
8367 acl_save_prefix="$prefix"
8368 prefix="$acl_final_prefix"
8369 acl_save_exec_prefix="$exec_prefix"
8370 exec_prefix="$acl_final_exec_prefix"
8371 eval x=\"$x\"
8372 exec_prefix="$acl_save_exec_prefix"
8373 prefix="$acl_save_prefix"
8374
8375 if test "X$x" = "X-I$additional_includedir"; then
8376 haveit=yes
8377 break
8378 fi
8379 done
8380 if test -z "$haveit"; then
8381 if test -d "$additional_includedir"; then
8382 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8383 fi
8384 fi
8385 fi
8386 fi
8387 fi
8388 if test -n "$found_la"; then
8389 save_libdir="$libdir"
8390 case "$found_la" in
8391 */* | *\\*) . "$found_la" ;;
8392 *) . "./$found_la" ;;
8393 esac
8394 libdir="$save_libdir"
8395 for dep in $dependency_libs; do
8396 case "$dep" in
8397 -L*)
8398 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8399 if test "X$additional_libdir" != "X/usr/lib"; then
8400 haveit=
8401 if test "X$additional_libdir" = "X/usr/local/lib"; then
8402 if test -n "$GCC"; then
8403 case $host_os in
8404 linux*) haveit=yes;;
8405 esac
8406 fi
8407 fi
8408 if test -z "$haveit"; then
8409 haveit=
8410 for x in $LDFLAGS $LIBICONV; do
8411
8412 acl_save_prefix="$prefix"
8413 prefix="$acl_final_prefix"
8414 acl_save_exec_prefix="$exec_prefix"
8415 exec_prefix="$acl_final_exec_prefix"
8416 eval x=\"$x\"
8417 exec_prefix="$acl_save_exec_prefix"
8418 prefix="$acl_save_prefix"
8419
8420 if test "X$x" = "X-L$additional_libdir"; then
8421 haveit=yes
8422 break
8423 fi
8424 done
8425 if test -z "$haveit"; then
8426 if test -d "$additional_libdir"; then
8427 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8428 fi
8429 fi
8430 haveit=
8431 for x in $LDFLAGS $LTLIBICONV; do
8432
8433 acl_save_prefix="$prefix"
8434 prefix="$acl_final_prefix"
8435 acl_save_exec_prefix="$exec_prefix"
8436 exec_prefix="$acl_final_exec_prefix"
8437 eval x=\"$x\"
8438 exec_prefix="$acl_save_exec_prefix"
8439 prefix="$acl_save_prefix"
8440
8441 if test "X$x" = "X-L$additional_libdir"; then
8442 haveit=yes
8443 break
8444 fi
8445 done
8446 if test -z "$haveit"; then
8447 if test -d "$additional_libdir"; then
8448 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8449 fi
8450 fi
8451 fi
8452 fi
8453 ;;
8454 -R*)
8455 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8456 if test "$enable_rpath" != no; then
8457 haveit=
8458 for x in $rpathdirs; do
8459 if test "X$x" = "X$dir"; then
8460 haveit=yes
8461 break
8462 fi
8463 done
8464 if test -z "$haveit"; then
8465 rpathdirs="$rpathdirs $dir"
8466 fi
8467 haveit=
8468 for x in $ltrpathdirs; do
8469 if test "X$x" = "X$dir"; then
8470 haveit=yes
8471 break
8472 fi
8473 done
8474 if test -z "$haveit"; then
8475 ltrpathdirs="$ltrpathdirs $dir"
8476 fi
8477 fi
8478 ;;
8479 -l*)
8480 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8481 ;;
8482 *.la)
8483 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8484 ;;
8485 *)
8486 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8487 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8488 ;;
8489 esac
8490 done
8491 fi
8492 else
8493 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8494 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8495 fi
8496 fi
8497 fi
8498 done
8499 done
8500 if test "X$rpathdirs" != "X"; then
8501 if test -n "$hardcode_libdir_separator"; then
8502 alldirs=
8503 for found_dir in $rpathdirs; do
8504 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8505 done
8506 acl_save_libdir="$libdir"
8507 libdir="$alldirs"
8508 eval flag=\"$hardcode_libdir_flag_spec\"
8509 libdir="$acl_save_libdir"
8510 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8511 else
8512 for found_dir in $rpathdirs; do
8513 acl_save_libdir="$libdir"
8514 libdir="$found_dir"
8515 eval flag=\"$hardcode_libdir_flag_spec\"
8516 libdir="$acl_save_libdir"
8517 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8518 done
8519 fi
8520 fi
8521 if test "X$ltrpathdirs" != "X"; then
8522 for found_dir in $ltrpathdirs; do
8523 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8524 done
8525 fi
8526
8527
8528
8529
8530
6c7a06a3 8531
6c7a06a3 8532
81ecdfbb
RW
8533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8534$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8535if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8536 $as_echo_n "(cached) " >&6
d542061a 8537else
6c7a06a3
TT
8538
8539 am_cv_func_iconv="no, consider installing GNU libiconv"
8540 am_cv_lib_iconv=no
016a3251
DD
8541 am_save_CPPFLAGS="$CPPFLAGS"
8542 CPPFLAGS="$CPPFLAGS $INCICONV"
8543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8544/* end confdefs.h. */
6c7a06a3
TT
8545#include <stdlib.h>
8546#include <iconv.h>
d542061a
UW
8547int
8548main ()
8549{
6c7a06a3 8550iconv_t cd = iconv_open("","");
016a3251
DD
8551 iconv(cd,NULL,NULL,NULL,NULL);
8552 iconv_close(cd);
d542061a
UW
8553 ;
8554 return 0;
8555}
8556_ACEOF
81ecdfbb 8557if ac_fn_c_try_link "$LINENO"; then :
016a3251 8558 am_cv_func_iconv=yes
d542061a 8559fi
81ecdfbb
RW
8560rm -f core conftest.err conftest.$ac_objext \
8561 conftest$ac_exeext conftest.$ac_ext
016a3251 8562 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8563
016a3251
DD
8564 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8565 for _libs in .libs _libs; do
8566 am_save_CPPFLAGS="$CPPFLAGS"
8567 am_save_LIBS="$LIBS"
8568 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8569 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8571/* end confdefs.h. */
6c7a06a3
TT
8572#include <stdlib.h>
8573#include <iconv.h>
d542061a
UW
8574int
8575main ()
8576{
6c7a06a3 8577iconv_t cd = iconv_open("","");
016a3251
DD
8578 iconv(cd,NULL,NULL,NULL,NULL);
8579 iconv_close(cd);
d542061a
UW
8580 ;
8581 return 0;
8582}
8583_ACEOF
81ecdfbb 8584if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8585 INCICONV="-I../libiconv/include"
8586 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8587 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8588 am_cv_lib_iconv=yes
8589 am_cv_func_iconv=yes
d542061a 8590fi
81ecdfbb
RW
8591rm -f core conftest.err conftest.$ac_objext \
8592 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8593 CPPFLAGS="$am_save_CPPFLAGS"
8594 LIBS="$am_save_LIBS"
8595 if test "$am_cv_func_iconv" = "yes"; then
8596 break
8597 fi
8598 done
77f120bf 8599 fi
94ae1714 8600
4edb1e84 8601 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8602 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8603 am_save_LIBS="$LIBS"
5d762de0 8604 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8605 LIBS="$LIBS $LIBICONV"
81ecdfbb 8606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8607/* end confdefs.h. */
6c7a06a3
TT
8608#include <stdlib.h>
8609#include <iconv.h>
bec39cab
AC
8610int
8611main ()
8612{
6c7a06a3
TT
8613iconv_t cd = iconv_open("","");
8614 iconv(cd,NULL,NULL,NULL,NULL);
8615 iconv_close(cd);
bec39cab
AC
8616 ;
8617 return 0;
8618}
8619_ACEOF
81ecdfbb 8620if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8621 am_cv_lib_iconv=yes
6c7a06a3 8622 am_cv_func_iconv=yes
627af7ea 8623fi
81ecdfbb
RW
8624rm -f core conftest.err conftest.$ac_objext \
8625 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8626 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8627 LIBS="$am_save_LIBS"
6c7a06a3
TT
8628 fi
8629
8630fi
81ecdfbb
RW
8631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8632$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8633 if test "$am_cv_func_iconv" = yes; then
8634
8635$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8636
016a3251 8637 fi
fc3b640d 8638 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8639
8640 for element in $INCICONV; do
8641 haveit=
8642 for x in $CPPFLAGS; do
8643
8644 acl_save_prefix="$prefix"
8645 prefix="$acl_final_prefix"
8646 acl_save_exec_prefix="$exec_prefix"
8647 exec_prefix="$acl_final_exec_prefix"
8648 eval x=\"$x\"
8649 exec_prefix="$acl_save_exec_prefix"
8650 prefix="$acl_save_prefix"
8651
8652 if test "X$x" = "X$element"; then
8653 haveit=yes
8654 break
8655 fi
8656 done
8657 if test -z "$haveit"; then
8658 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8659 fi
8660 done
8661
8662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8663$as_echo_n "checking how to link with libiconv... " >&6; }
8664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8665$as_echo "$LIBICONV" >&6; }
94ae1714 8666 else
016a3251
DD
8667 LIBICONV=
8668 LTLIBICONV=
fc3b640d 8669 fi
94ae1714 8670
6c7a06a3 8671
6c7a06a3 8672
016a3251 8673 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8675$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8676 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8677 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8678else
8679
81ecdfbb 8680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8681/* end confdefs.h. */
8682
6c7a06a3
TT
8683#include <stdlib.h>
8684#include <iconv.h>
8685extern
b4e70030 8686#ifdef __cplusplus
6c7a06a3 8687"C"
b4e70030 8688#endif
6c7a06a3
TT
8689#if defined(__STDC__) || defined(__cplusplus)
8690size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8691#else
8692size_t iconv();
8693#endif
8694
b4e70030
JB
8695int
8696main ()
8697{
6c7a06a3 8698
b4e70030
JB
8699 ;
8700 return 0;
8701}
8702_ACEOF
81ecdfbb 8703if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8704 am_cv_proto_iconv_arg1=""
4e8d927d 8705else
81ecdfbb 8706 am_cv_proto_iconv_arg1="const"
b4e70030 8707fi
81ecdfbb 8708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8709 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);"
8710fi
8711
8712 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8714 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8715$as_echo "${ac_t:-
8716 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8717
8718cat >>confdefs.h <<_ACEOF
8719#define ICONV_CONST $am_cv_proto_iconv_arg1
8720_ACEOF
8721
8722 fi
6c7a06a3
TT
8723
8724
478aac75
DE
8725# GDB may fork/exec the iconv program to get the list of supported character
8726# sets. Allow the user to specify where to find it.
8727# There are several factors affecting the choice of option name:
8728# - There is already --with-libiconv-prefix but we can't use it, it specifies
8729# the build-time location of libiconv files.
8730# - The program we need to find is iconv, which comes with glibc. The user
8731# doesn't necessarily have libiconv installed. Therefore naming this
8732# --with-libiconv-foo feels wrong.
8733# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8734# defined to work on directories not files (though it really doesn't know
8735# the difference).
8736# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8737# with --with-libiconv-prefix.
8738# Putting these together is why the option name is --with-iconv-bin.
8739
8740
8741# Check whether --with-iconv-bin was given.
8742if test "${with_iconv_bin+set}" = set; then :
8743 withval=$with_iconv_bin; iconv_bin="${withval}"
8744
8745cat >>confdefs.h <<_ACEOF
8746#define ICONV_BIN "${iconv_bin}"
8747_ACEOF
8748
8749
8750 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8751 if test "x$prefix" = xNONE; then
8752 test_prefix=/usr/local
8753 else
8754 test_prefix=$prefix
8755 fi
8756 else
8757 test_prefix=$exec_prefix
8758 fi
8759 value=0
8760 case ${iconv_bin} in
8761 "${test_prefix}"|"${test_prefix}/"*|\
8762 '${exec_prefix}'|'${exec_prefix}/'*)
8763 value=1
8764 ;;
8765 esac
8766
8767cat >>confdefs.h <<_ACEOF
8768#define ICONV_BIN_RELOCATABLE $value
8769_ACEOF
8770
8771
8772
8773fi
8774
8775
cb01cfba 8776# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8777if test x"$enable_tui" != xno; then
cb01cfba
JB
8778 prefer_curses=yes
8779fi
8780
8781curses_found=no
8782if test x"$prefer_curses" = xyes; then
8783 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8784 # curses library because the latter might not provide all the
8785 # functionality we need. However, this leads to problems on systems
8786 # where the linker searches /usr/local/lib, but the compiler doesn't
8787 # search /usr/local/include, if ncurses is installed in /usr/local. A
8788 # default installation of ncurses on alpha*-dec-osf* will lead to such
8789 # a situation.
81ecdfbb
RW
8790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8791$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8792if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8793 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8794else
8795 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8797/* end confdefs.h. */
8798
81ecdfbb
RW
8799/* Override any GCC internal prototype to avoid an error.
8800 Use char because int might match the return type of a GCC
8801 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8802#ifdef __cplusplus
8803extern "C"
8804#endif
6c7a06a3
TT
8805char waddstr ();
8806int
8807main ()
8808{
81ecdfbb 8809return waddstr ();
6c7a06a3
TT
8810 ;
8811 return 0;
8812}
8813_ACEOF
5007d765 8814for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8815 if test -z "$ac_lib"; then
8816 ac_res="none required"
8817 else
8818 ac_res=-l$ac_lib
8819 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8820 fi
8821 if ac_fn_c_try_link "$LINENO"; then :
8822 ac_cv_search_waddstr=$ac_res
8823fi
8824rm -f core conftest.err conftest.$ac_objext \
8825 conftest$ac_exeext
d0ac1c44 8826 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8827 break
8828fi
8829done
d0ac1c44 8830if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8831
6c7a06a3 8832else
81ecdfbb
RW
8833 ac_cv_search_waddstr=no
8834fi
8835rm conftest.$ac_ext
8836LIBS=$ac_func_search_save_LIBS
8837fi
8838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8839$as_echo "$ac_cv_search_waddstr" >&6; }
8840ac_res=$ac_cv_search_waddstr
8841if test "$ac_res" != no; then :
8842 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8843
8844fi
8845
8846
cb01cfba
JB
8847 if test "$ac_cv_search_waddstr" != no; then
8848 curses_found=yes
8849 fi
8850fi
8851
8852# Check whether we should enable the TUI, but only do so if we really
8853# can.
8854if test x"$enable_tui" != xno; then
8855 if test -d $srcdir/tui; then
8856 if test "$curses_found" != no; then
6c7a06a3
TT
8857 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8858 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8859 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8860 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8861 else
8862 if test x"$enable_tui" = xyes; then
d0ac1c44 8863 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8864 else
81ecdfbb
RW
8865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8866$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8867 fi
8868 fi
8869 fi
8870fi
8871
8872# Since GDB uses Readline, we need termcap functionality. In many
8873# cases this will be provided by the curses library, but some systems
96fe4562 8874# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8875
8876case $host_os in
8877 cygwin*)
8878 if test -d $srcdir/libtermcap; then
8879 LIBS="../libtermcap/libtermcap.a $LIBS"
8880 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8881 fi ;;
8882 go32* | *djgpp*)
8883 ac_cv_search_tgetent="none required"
8884 ;;
6c7a06a3
TT
8885esac
8886
8887# These are the libraries checked by Readline.
81ecdfbb
RW
8888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8889$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 8890if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 8891 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8892else
8893 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8895/* end confdefs.h. */
8896
81ecdfbb
RW
8897/* Override any GCC internal prototype to avoid an error.
8898 Use char because int might match the return type of a GCC
8899 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8900#ifdef __cplusplus
8901extern "C"
8902#endif
6c7a06a3
TT
8903char tgetent ();
8904int
8905main ()
8906{
81ecdfbb 8907return tgetent ();
6c7a06a3
TT
8908 ;
8909 return 0;
8910}
8911_ACEOF
2578ecb1 8912for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
8913 if test -z "$ac_lib"; then
8914 ac_res="none required"
8915 else
8916 ac_res=-l$ac_lib
6c7a06a3 8917 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8918 fi
8919 if ac_fn_c_try_link "$LINENO"; then :
8920 ac_cv_search_tgetent=$ac_res
8921fi
8922rm -f core conftest.err conftest.$ac_objext \
8923 conftest$ac_exeext
d0ac1c44 8924 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
8925 break
8926fi
8927done
d0ac1c44 8928if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 8929
6c7a06a3 8930else
81ecdfbb 8931 ac_cv_search_tgetent=no
6c7a06a3 8932fi
81ecdfbb 8933rm conftest.$ac_ext
6c7a06a3
TT
8934LIBS=$ac_func_search_save_LIBS
8935fi
81ecdfbb
RW
8936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8937$as_echo "$ac_cv_search_tgetent" >&6; }
8938ac_res=$ac_cv_search_tgetent
8939if test "$ac_res" != no; then :
8940 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8941
06825bd1
MK
8942fi
8943
06825bd1 8944
bec39cab 8945if test "$ac_cv_search_tgetent" = no; then
7a85168d 8946 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8947fi
8948
3841debe 8949
81ecdfbb
RW
8950# Check whether --with-system-readline was given.
8951if test "${with_system_readline+set}" = set; then :
8952 withval=$with_system_readline;
8953fi
6a30b0a5 8954
6a30b0a5
AS
8955
8956if test "$with_system_readline" = yes; then
8957 READLINE=-lreadline
8958 READLINE_DEPS=
8959 READLINE_CFLAGS=
39037522 8960 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8961else
8962 READLINE='$(READLINE_DIR)/libreadline.a'
8963 READLINE_DEPS='$(READLINE)'
8964 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8965 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8966fi
8967
8968
8969
8970
8971
f997c383
SD
8972# Generate jit-reader.h
8973
8974# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8975TARGET_PTR=
8976
8977# The cast to long int works around a bug in the HP C Compiler
8978# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8979# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8980# This bug is HP SR number 8606223364.
8981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8982$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 8983if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
8984 $as_echo_n "(cached) " >&6
8985else
8986 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8987
8988else
8989 if test "$ac_cv_type_unsigned_long_long" = yes; then
8990 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
8992as_fn_error 77 "cannot compute sizeof (unsigned long long)
8993See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
8994 else
8995 ac_cv_sizeof_unsigned_long_long=0
8996 fi
8997fi
8998
8999fi
9000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9001$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9002
9003
9004
9005cat >>confdefs.h <<_ACEOF
9006#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9007_ACEOF
9008
9009
9010# The cast to long int works around a bug in the HP C Compiler
9011# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9012# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9013# This bug is HP SR number 8606223364.
9014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9015$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9016if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9017 $as_echo_n "(cached) " >&6
9018else
9019 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9020
9021else
9022 if test "$ac_cv_type_unsigned_long" = yes; then
9023 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9025as_fn_error 77 "cannot compute sizeof (unsigned long)
9026See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9027 else
9028 ac_cv_sizeof_unsigned_long=0
9029 fi
9030fi
9031
9032fi
9033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9034$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9035
9036
9037
9038cat >>confdefs.h <<_ACEOF
9039#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9040_ACEOF
9041
9042
9043# The cast to long int works around a bug in the HP C Compiler
9044# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9045# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9046# This bug is HP SR number 8606223364.
9047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9048$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9049if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9050 $as_echo_n "(cached) " >&6
9051else
9052 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9053
9054else
9055 if test "$ac_cv_type_unsigned___int128" = yes; then
9056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9058as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9059See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9060 else
9061 ac_cv_sizeof_unsigned___int128=0
9062 fi
9063fi
9064
9065fi
9066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9067$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9068
9069
9070
9071cat >>confdefs.h <<_ACEOF
9072#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9073_ACEOF
9074
9075
9076
9077if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9078 TARGET_PTR="unsigned long"
9079elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9080 TARGET_PTR="unsigned long long"
9081elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9082 TARGET_PTR="unsigned __int128"
9083else
9084 TARGET_PTR="unsigned long"
9085fi
9086
9087
9088ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9089
9090
a2d08b9e
SD
9091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9092$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9093if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9094 $as_echo_n "(cached) " >&6
9095else
9096 ac_func_search_save_LIBS=$LIBS
9097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9098/* end confdefs.h. */
9099
9100/* Override any GCC internal prototype to avoid an error.
9101 Use char because int might match the return type of a GCC
9102 builtin and then its argument prototype would still apply. */
9103#ifdef __cplusplus
9104extern "C"
9105#endif
9106char dlopen ();
9107int
9108main ()
9109{
9110return dlopen ();
9111 ;
9112 return 0;
9113}
9114_ACEOF
9115for ac_lib in '' dl; do
9116 if test -z "$ac_lib"; then
9117 ac_res="none required"
9118 else
9119 ac_res=-l$ac_lib
9120 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9121 fi
9122 if ac_fn_c_try_link "$LINENO"; then :
9123 ac_cv_search_dlopen=$ac_res
9124fi
9125rm -f core conftest.err conftest.$ac_objext \
9126 conftest$ac_exeext
d0ac1c44 9127 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9128 break
9129fi
9130done
d0ac1c44 9131if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9132
9133else
9134 ac_cv_search_dlopen=no
9135fi
9136rm conftest.$ac_ext
9137LIBS=$ac_func_search_save_LIBS
9138fi
9139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9140$as_echo "$ac_cv_search_dlopen" >&6; }
9141ac_res=$ac_cv_search_dlopen
9142if test "$ac_res" != no; then :
9143 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9144
9145fi
9146
9147
39037522 9148
b8e0a31c
SD
9149
9150# Check whether --with-jit-reader-dir was given.
9151if test "${with_jit_reader_dir+set}" = set; then :
9152 withval=$with_jit_reader_dir;
9153 JIT_READER_DIR=$withval
9154else
9155 JIT_READER_DIR=${libdir}/gdb
9156fi
9157
9158
9159 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9160 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9161 ac_define_dir=`eval echo $JIT_READER_DIR`
9162 ac_define_dir=`eval echo $ac_define_dir`
9163
9164cat >>confdefs.h <<_ACEOF
9165#define JIT_READER_DIR "$ac_define_dir"
9166_ACEOF
9167
9168
9169
9170
9171 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9172 if test "x$prefix" = xNONE; then
9173 test_prefix=/usr/local
9174 else
9175 test_prefix=$prefix
9176 fi
9177 else
9178 test_prefix=$exec_prefix
9179 fi
9180 value=0
9181 case ${ac_define_dir} in
9182 "${test_prefix}"|"${test_prefix}/"*|\
9183 '${exec_prefix}'|'${exec_prefix}/'*)
9184 value=1
9185 ;;
9186 esac
9187
9188cat >>confdefs.h <<_ACEOF
9189#define JIT_READER_DIR_RELOCATABLE $value
9190_ACEOF
9191
9192
9193
9194
9195
81ecdfbb
RW
9196# Check whether --with-expat was given.
9197if test "${with_expat+set}" = set; then :
9198 withval=$with_expat;
5c39566f
DJ
9199else
9200 with_expat=auto
81ecdfbb
RW
9201fi
9202
9203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9204$as_echo_n "checking whether to use expat... " >&6; }
9205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9206$as_echo "$with_expat" >&6; }
5c39566f
DJ
9207
9208if test "${with_expat}" = no; then
81ecdfbb
RW
9209 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9210$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9211 HAVE_LIBEXPAT=no
9212else
9213
3841debe
DJ
9214
9215
9216
9217
9218
9219
9220
9221 use_additional=yes
9222
9223 acl_save_prefix="$prefix"
9224 prefix="$acl_final_prefix"
9225 acl_save_exec_prefix="$exec_prefix"
9226 exec_prefix="$acl_final_exec_prefix"
9227
9228 eval additional_includedir=\"$includedir\"
9229 eval additional_libdir=\"$libdir\"
9230
9231 exec_prefix="$acl_save_exec_prefix"
9232 prefix="$acl_save_prefix"
9233
9234
81ecdfbb
RW
9235# Check whether --with-libexpat-prefix was given.
9236if test "${with_libexpat_prefix+set}" = set; then :
9237 withval=$with_libexpat_prefix;
3841debe
DJ
9238 if test "X$withval" = "Xno"; then
9239 use_additional=no
9240 else
9241 if test "X$withval" = "X"; then
9242
9243 acl_save_prefix="$prefix"
9244 prefix="$acl_final_prefix"
9245 acl_save_exec_prefix="$exec_prefix"
9246 exec_prefix="$acl_final_exec_prefix"
9247
9248 eval additional_includedir=\"$includedir\"
9249 eval additional_libdir=\"$libdir\"
9250
9251 exec_prefix="$acl_save_exec_prefix"
9252 prefix="$acl_save_prefix"
9253
9254 else
9255 additional_includedir="$withval/include"
9256 additional_libdir="$withval/lib"
9257 fi
9258 fi
9259
81ecdfbb
RW
9260fi
9261
3841debe
DJ
9262 LIBEXPAT=
9263 LTLIBEXPAT=
9264 INCEXPAT=
9265 rpathdirs=
9266 ltrpathdirs=
9267 names_already_handled=
9268 names_next_round='expat '
9269 while test -n "$names_next_round"; do
9270 names_this_round="$names_next_round"
9271 names_next_round=
9272 for name in $names_this_round; do
9273 already_handled=
9274 for n in $names_already_handled; do
9275 if test "$n" = "$name"; then
9276 already_handled=yes
9277 break
9278 fi
9279 done
9280 if test -z "$already_handled"; then
9281 names_already_handled="$names_already_handled $name"
9282 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9283 eval value=\"\$HAVE_LIB$uppername\"
9284 if test -n "$value"; then
9285 if test "$value" = yes; then
9286 eval value=\"\$LIB$uppername\"
9287 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9288 eval value=\"\$LTLIB$uppername\"
9289 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9290 else
9291 :
9292 fi
9293 else
9294 found_dir=
9295 found_la=
9296 found_so=
9297 found_a=
9298 if test $use_additional = yes; then
9299 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9300 found_dir="$additional_libdir"
9301 found_so="$additional_libdir/lib$name.$shlibext"
9302 if test -f "$additional_libdir/lib$name.la"; then
9303 found_la="$additional_libdir/lib$name.la"
9304 fi
9305 else
9306 if test -f "$additional_libdir/lib$name.$libext"; then
9307 found_dir="$additional_libdir"
9308 found_a="$additional_libdir/lib$name.$libext"
9309 if test -f "$additional_libdir/lib$name.la"; then
9310 found_la="$additional_libdir/lib$name.la"
9311 fi
9312 fi
9313 fi
9314 fi
9315 if test "X$found_dir" = "X"; then
9316 for x in $LDFLAGS $LTLIBEXPAT; do
9317
9318 acl_save_prefix="$prefix"
9319 prefix="$acl_final_prefix"
9320 acl_save_exec_prefix="$exec_prefix"
9321 exec_prefix="$acl_final_exec_prefix"
9322 eval x=\"$x\"
9323 exec_prefix="$acl_save_exec_prefix"
9324 prefix="$acl_save_prefix"
9325
9326 case "$x" in
9327 -L*)
9328 dir=`echo "X$x" | sed -e 's/^X-L//'`
9329 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9330 found_dir="$dir"
9331 found_so="$dir/lib$name.$shlibext"
9332 if test -f "$dir/lib$name.la"; then
9333 found_la="$dir/lib$name.la"
9334 fi
9335 else
9336 if test -f "$dir/lib$name.$libext"; then
9337 found_dir="$dir"
9338 found_a="$dir/lib$name.$libext"
9339 if test -f "$dir/lib$name.la"; then
9340 found_la="$dir/lib$name.la"
9341 fi
9342 fi
9343 fi
9344 ;;
9345 esac
9346 if test "X$found_dir" != "X"; then
9347 break
9348 fi
9349 done
9350 fi
9351 if test "X$found_dir" != "X"; then
9352 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9353 if test "X$found_so" != "X"; then
9354 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9355 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9356 else
9357 haveit=
9358 for x in $ltrpathdirs; do
9359 if test "X$x" = "X$found_dir"; then
9360 haveit=yes
9361 break
9362 fi
9363 done
9364 if test -z "$haveit"; then
9365 ltrpathdirs="$ltrpathdirs $found_dir"
9366 fi
9367 if test "$hardcode_direct" = yes; then
9368 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9369 else
9370 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9371 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9372 haveit=
9373 for x in $rpathdirs; do
9374 if test "X$x" = "X$found_dir"; then
9375 haveit=yes
9376 break
9377 fi
9378 done
9379 if test -z "$haveit"; then
9380 rpathdirs="$rpathdirs $found_dir"
9381 fi
9382 else
9383 haveit=
9384 for x in $LDFLAGS $LIBEXPAT; do
9385
9386 acl_save_prefix="$prefix"
9387 prefix="$acl_final_prefix"
9388 acl_save_exec_prefix="$exec_prefix"
9389 exec_prefix="$acl_final_exec_prefix"
9390 eval x=\"$x\"
9391 exec_prefix="$acl_save_exec_prefix"
9392 prefix="$acl_save_prefix"
9393
9394 if test "X$x" = "X-L$found_dir"; then
9395 haveit=yes
9396 break
9397 fi
9398 done
9399 if test -z "$haveit"; then
9400 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9401 fi
9402 if test "$hardcode_minus_L" != no; then
9403 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9404 else
9405 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9406 fi
9407 fi
9408 fi
9409 fi
9410 else
9411 if test "X$found_a" != "X"; then
9412 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9413 else
9414 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9415 fi
9416 fi
9417 additional_includedir=
9418 case "$found_dir" in
9419 */lib | */lib/)
9420 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9421 additional_includedir="$basedir/include"
9422 ;;
9423 esac
9424 if test "X$additional_includedir" != "X"; then
9425 if test "X$additional_includedir" != "X/usr/include"; then
9426 haveit=
9427 if test "X$additional_includedir" = "X/usr/local/include"; then
9428 if test -n "$GCC"; then
9429 case $host_os in
9430 linux*) haveit=yes;;
9431 esac
9432 fi
9433 fi
9434 if test -z "$haveit"; then
9435 for x in $CPPFLAGS $INCEXPAT; do
9436
9437 acl_save_prefix="$prefix"
9438 prefix="$acl_final_prefix"
9439 acl_save_exec_prefix="$exec_prefix"
9440 exec_prefix="$acl_final_exec_prefix"
9441 eval x=\"$x\"
9442 exec_prefix="$acl_save_exec_prefix"
9443 prefix="$acl_save_prefix"
9444
9445 if test "X$x" = "X-I$additional_includedir"; then
9446 haveit=yes
9447 break
9448 fi
9449 done
9450 if test -z "$haveit"; then
9451 if test -d "$additional_includedir"; then
9452 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9453 fi
9454 fi
9455 fi
9456 fi
9457 fi
9458 if test -n "$found_la"; then
9459 save_libdir="$libdir"
9460 case "$found_la" in
9461 */* | *\\*) . "$found_la" ;;
9462 *) . "./$found_la" ;;
9463 esac
9464 libdir="$save_libdir"
9465 for dep in $dependency_libs; do
9466 case "$dep" in
9467 -L*)
9468 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9469 if test "X$additional_libdir" != "X/usr/lib"; then
9470 haveit=
9471 if test "X$additional_libdir" = "X/usr/local/lib"; then
9472 if test -n "$GCC"; then
9473 case $host_os in
9474 linux*) haveit=yes;;
9475 esac
9476 fi
9477 fi
9478 if test -z "$haveit"; then
9479 haveit=
9480 for x in $LDFLAGS $LIBEXPAT; do
9481
9482 acl_save_prefix="$prefix"
9483 prefix="$acl_final_prefix"
9484 acl_save_exec_prefix="$exec_prefix"
9485 exec_prefix="$acl_final_exec_prefix"
9486 eval x=\"$x\"
9487 exec_prefix="$acl_save_exec_prefix"
9488 prefix="$acl_save_prefix"
9489
9490 if test "X$x" = "X-L$additional_libdir"; then
9491 haveit=yes
9492 break
9493 fi
9494 done
9495 if test -z "$haveit"; then
9496 if test -d "$additional_libdir"; then
9497 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9498 fi
9499 fi
9500 haveit=
9501 for x in $LDFLAGS $LTLIBEXPAT; do
9502
9503 acl_save_prefix="$prefix"
9504 prefix="$acl_final_prefix"
9505 acl_save_exec_prefix="$exec_prefix"
9506 exec_prefix="$acl_final_exec_prefix"
9507 eval x=\"$x\"
9508 exec_prefix="$acl_save_exec_prefix"
9509 prefix="$acl_save_prefix"
9510
9511 if test "X$x" = "X-L$additional_libdir"; then
9512 haveit=yes
9513 break
9514 fi
9515 done
9516 if test -z "$haveit"; then
9517 if test -d "$additional_libdir"; then
9518 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9519 fi
9520 fi
9521 fi
9522 fi
9523 ;;
9524 -R*)
9525 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9526 if test "$enable_rpath" != no; then
9527 haveit=
9528 for x in $rpathdirs; do
9529 if test "X$x" = "X$dir"; then
9530 haveit=yes
9531 break
9532 fi
9533 done
9534 if test -z "$haveit"; then
9535 rpathdirs="$rpathdirs $dir"
9536 fi
9537 haveit=
9538 for x in $ltrpathdirs; do
9539 if test "X$x" = "X$dir"; then
9540 haveit=yes
9541 break
9542 fi
9543 done
9544 if test -z "$haveit"; then
9545 ltrpathdirs="$ltrpathdirs $dir"
9546 fi
9547 fi
9548 ;;
9549 -l*)
9550 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9551 ;;
9552 *.la)
9553 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9554 ;;
9555 *)
9556 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9557 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9558 ;;
81ecdfbb
RW
9559 esac
9560 done
9561 fi
9562 else
9563 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9564 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9565 fi
9566 fi
9567 fi
9568 done
9569 done
9570 if test "X$rpathdirs" != "X"; then
9571 if test -n "$hardcode_libdir_separator"; then
9572 alldirs=
9573 for found_dir in $rpathdirs; do
9574 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9575 done
9576 acl_save_libdir="$libdir"
9577 libdir="$alldirs"
9578 eval flag=\"$hardcode_libdir_flag_spec\"
9579 libdir="$acl_save_libdir"
9580 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9581 else
9582 for found_dir in $rpathdirs; do
9583 acl_save_libdir="$libdir"
9584 libdir="$found_dir"
9585 eval flag=\"$hardcode_libdir_flag_spec\"
9586 libdir="$acl_save_libdir"
9587 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9588 done
9589 fi
9590 fi
9591 if test "X$ltrpathdirs" != "X"; then
9592 for found_dir in $ltrpathdirs; do
9593 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9594 done
9595 fi
a9322a30
TT
9596
9597
81ecdfbb 9598 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9599
81ecdfbb
RW
9600 for element in $INCEXPAT; do
9601 haveit=
9602 for x in $CPPFLAGS; do
a9322a30 9603
81ecdfbb
RW
9604 acl_save_prefix="$prefix"
9605 prefix="$acl_final_prefix"
9606 acl_save_exec_prefix="$exec_prefix"
9607 exec_prefix="$acl_final_exec_prefix"
9608 eval x=\"$x\"
9609 exec_prefix="$acl_save_exec_prefix"
9610 prefix="$acl_save_prefix"
a8111142 9611
81ecdfbb
RW
9612 if test "X$x" = "X$element"; then
9613 haveit=yes
9614 break
9615 fi
9616 done
9617 if test -z "$haveit"; then
9618 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9619 fi
9620 done
a9322a30
TT
9621
9622
81ecdfbb
RW
9623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9624$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9625if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9626 $as_echo_n "(cached) " >&6
bec39cab 9627else
bec39cab 9628
81ecdfbb
RW
9629 ac_save_LIBS="$LIBS"
9630 LIBS="$LIBS $LIBEXPAT"
9631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9632/* end confdefs.h. */
81ecdfbb
RW
9633#include "expat.h"
9634int
9635main ()
9636{
9637XML_Parser p = XML_ParserCreate (0);
9638 ;
9639 return 0;
9640}
bec39cab 9641_ACEOF
81ecdfbb
RW
9642if ac_fn_c_try_link "$LINENO"; then :
9643 ac_cv_libexpat=yes
c906108c 9644else
81ecdfbb 9645 ac_cv_libexpat=no
bec39cab 9646fi
81ecdfbb
RW
9647rm -f core conftest.err conftest.$ac_objext \
9648 conftest$ac_exeext conftest.$ac_ext
9649 LIBS="$ac_save_LIBS"
c906108c 9650
95ca63c4 9651fi
81ecdfbb
RW
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9653$as_echo "$ac_cv_libexpat" >&6; }
9654 if test "$ac_cv_libexpat" = yes; then
9655 HAVE_LIBEXPAT=yes
bec39cab 9656
81ecdfbb 9657$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9658
81ecdfbb
RW
9659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9660$as_echo_n "checking how to link with libexpat... " >&6; }
9661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9662$as_echo "$LIBEXPAT" >&6; }
9663 else
9664 HAVE_LIBEXPAT=no
9665 CPPFLAGS="$ac_save_CPPFLAGS"
9666 LIBEXPAT=
9667 LTLIBEXPAT=
9668 fi
95ca63c4
CF
9669
9670
9671
7cb9022a
MK
9672
9673
bec39cab 9674
81ecdfbb
RW
9675 if test "$HAVE_LIBEXPAT" != yes; then
9676 if test "$with_expat" = yes; then
d0ac1c44 9677 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9678 else
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9680$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9681 fi
9682 else
9683 save_LIBS=$LIBS
9684 LIBS="$LIBS $LIBEXPAT"
9685 for ac_func in XML_StopParser
9686do :
9687 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9688if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9689 cat >>confdefs.h <<_ACEOF
81ecdfbb 9690#define HAVE_XML_STOPPARSER 1
bec39cab 9691_ACEOF
95ca63c4 9692
bec39cab 9693fi
bec39cab 9694done
95ca63c4 9695
81ecdfbb
RW
9696 LIBS=$save_LIBS
9697 fi
a9322a30
TT
9698fi
9699
2400729e
UW
9700
9701# Check whether --with-mpfr was given.
9702if test "${with_mpfr+set}" = set; then :
9703 withval=$with_mpfr;
9704else
9705 with_mpfr=auto
9706fi
9707
9708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9709$as_echo_n "checking whether to use MPFR... " >&6; }
9710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9711$as_echo "$with_mpfr" >&6; }
9712
9713if test "${with_mpfr}" = no; then
9714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9715$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9716 HAVE_LIBMPFR=no
9717else
9718
9719
9720
9721
9722
9723
9724
9725
9726 use_additional=yes
9727
9728 acl_save_prefix="$prefix"
9729 prefix="$acl_final_prefix"
9730 acl_save_exec_prefix="$exec_prefix"
9731 exec_prefix="$acl_final_exec_prefix"
9732
9733 eval additional_includedir=\"$includedir\"
9734 eval additional_libdir=\"$libdir\"
9735
9736 exec_prefix="$acl_save_exec_prefix"
9737 prefix="$acl_save_prefix"
9738
9739
9740# Check whether --with-libmpfr-prefix was given.
9741if test "${with_libmpfr_prefix+set}" = set; then :
9742 withval=$with_libmpfr_prefix;
9743 if test "X$withval" = "Xno"; then
9744 use_additional=no
9745 else
9746 if test "X$withval" = "X"; then
9747
9748 acl_save_prefix="$prefix"
9749 prefix="$acl_final_prefix"
9750 acl_save_exec_prefix="$exec_prefix"
9751 exec_prefix="$acl_final_exec_prefix"
9752
9753 eval additional_includedir=\"$includedir\"
9754 eval additional_libdir=\"$libdir\"
9755
9756 exec_prefix="$acl_save_exec_prefix"
9757 prefix="$acl_save_prefix"
9758
9759 else
9760 additional_includedir="$withval/include"
9761 additional_libdir="$withval/lib"
9762 fi
9763 fi
9764
9765fi
9766
9767 LIBMPFR=
9768 LTLIBMPFR=
9769 INCMPFR=
9770 rpathdirs=
9771 ltrpathdirs=
9772 names_already_handled=
da658607 9773 names_next_round='mpfr gmp'
2400729e
UW
9774 while test -n "$names_next_round"; do
9775 names_this_round="$names_next_round"
9776 names_next_round=
9777 for name in $names_this_round; do
9778 already_handled=
9779 for n in $names_already_handled; do
9780 if test "$n" = "$name"; then
9781 already_handled=yes
9782 break
9783 fi
9784 done
9785 if test -z "$already_handled"; then
9786 names_already_handled="$names_already_handled $name"
9787 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9788 eval value=\"\$HAVE_LIB$uppername\"
9789 if test -n "$value"; then
9790 if test "$value" = yes; then
9791 eval value=\"\$LIB$uppername\"
9792 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9793 eval value=\"\$LTLIB$uppername\"
9794 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9795 else
9796 :
9797 fi
9798 else
9799 found_dir=
9800 found_la=
9801 found_so=
9802 found_a=
9803 if test $use_additional = yes; then
9804 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9805 found_dir="$additional_libdir"
9806 found_so="$additional_libdir/lib$name.$shlibext"
9807 if test -f "$additional_libdir/lib$name.la"; then
9808 found_la="$additional_libdir/lib$name.la"
9809 fi
9810 else
9811 if test -f "$additional_libdir/lib$name.$libext"; then
9812 found_dir="$additional_libdir"
9813 found_a="$additional_libdir/lib$name.$libext"
9814 if test -f "$additional_libdir/lib$name.la"; then
9815 found_la="$additional_libdir/lib$name.la"
9816 fi
9817 fi
9818 fi
9819 fi
9820 if test "X$found_dir" = "X"; then
9821 for x in $LDFLAGS $LTLIBMPFR; do
9822
9823 acl_save_prefix="$prefix"
9824 prefix="$acl_final_prefix"
9825 acl_save_exec_prefix="$exec_prefix"
9826 exec_prefix="$acl_final_exec_prefix"
9827 eval x=\"$x\"
9828 exec_prefix="$acl_save_exec_prefix"
9829 prefix="$acl_save_prefix"
9830
9831 case "$x" in
9832 -L*)
9833 dir=`echo "X$x" | sed -e 's/^X-L//'`
9834 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9835 found_dir="$dir"
9836 found_so="$dir/lib$name.$shlibext"
9837 if test -f "$dir/lib$name.la"; then
9838 found_la="$dir/lib$name.la"
9839 fi
9840 else
9841 if test -f "$dir/lib$name.$libext"; then
9842 found_dir="$dir"
9843 found_a="$dir/lib$name.$libext"
9844 if test -f "$dir/lib$name.la"; then
9845 found_la="$dir/lib$name.la"
9846 fi
9847 fi
9848 fi
9849 ;;
9850 esac
9851 if test "X$found_dir" != "X"; then
9852 break
9853 fi
9854 done
9855 fi
9856 if test "X$found_dir" != "X"; then
9857 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9858 if test "X$found_so" != "X"; then
9859 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9860 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9861 else
9862 haveit=
9863 for x in $ltrpathdirs; do
9864 if test "X$x" = "X$found_dir"; then
9865 haveit=yes
9866 break
9867 fi
9868 done
9869 if test -z "$haveit"; then
9870 ltrpathdirs="$ltrpathdirs $found_dir"
9871 fi
9872 if test "$hardcode_direct" = yes; then
9873 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9874 else
9875 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9876 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9877 haveit=
9878 for x in $rpathdirs; do
9879 if test "X$x" = "X$found_dir"; then
9880 haveit=yes
9881 break
9882 fi
9883 done
9884 if test -z "$haveit"; then
9885 rpathdirs="$rpathdirs $found_dir"
9886 fi
9887 else
9888 haveit=
9889 for x in $LDFLAGS $LIBMPFR; do
9890
9891 acl_save_prefix="$prefix"
9892 prefix="$acl_final_prefix"
9893 acl_save_exec_prefix="$exec_prefix"
9894 exec_prefix="$acl_final_exec_prefix"
9895 eval x=\"$x\"
9896 exec_prefix="$acl_save_exec_prefix"
9897 prefix="$acl_save_prefix"
9898
9899 if test "X$x" = "X-L$found_dir"; then
9900 haveit=yes
9901 break
9902 fi
9903 done
9904 if test -z "$haveit"; then
9905 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9906 fi
9907 if test "$hardcode_minus_L" != no; then
9908 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9909 else
9910 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9911 fi
9912 fi
9913 fi
9914 fi
9915 else
9916 if test "X$found_a" != "X"; then
9917 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
9918 else
9919 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
9920 fi
9921 fi
9922 additional_includedir=
9923 case "$found_dir" in
9924 */lib | */lib/)
9925 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9926 additional_includedir="$basedir/include"
9927 ;;
9928 esac
9929 if test "X$additional_includedir" != "X"; then
9930 if test "X$additional_includedir" != "X/usr/include"; then
9931 haveit=
9932 if test "X$additional_includedir" = "X/usr/local/include"; then
9933 if test -n "$GCC"; then
9934 case $host_os in
9935 linux*) haveit=yes;;
9936 esac
9937 fi
9938 fi
9939 if test -z "$haveit"; then
9940 for x in $CPPFLAGS $INCMPFR; do
9941
9942 acl_save_prefix="$prefix"
9943 prefix="$acl_final_prefix"
9944 acl_save_exec_prefix="$exec_prefix"
9945 exec_prefix="$acl_final_exec_prefix"
9946 eval x=\"$x\"
9947 exec_prefix="$acl_save_exec_prefix"
9948 prefix="$acl_save_prefix"
9949
9950 if test "X$x" = "X-I$additional_includedir"; then
9951 haveit=yes
9952 break
9953 fi
9954 done
9955 if test -z "$haveit"; then
9956 if test -d "$additional_includedir"; then
9957 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
9958 fi
9959 fi
9960 fi
9961 fi
9962 fi
9963 if test -n "$found_la"; then
9964 save_libdir="$libdir"
9965 case "$found_la" in
9966 */* | *\\*) . "$found_la" ;;
9967 *) . "./$found_la" ;;
9968 esac
9969 libdir="$save_libdir"
9970 for dep in $dependency_libs; do
9971 case "$dep" in
9972 -L*)
9973 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9974 if test "X$additional_libdir" != "X/usr/lib"; then
9975 haveit=
9976 if test "X$additional_libdir" = "X/usr/local/lib"; then
9977 if test -n "$GCC"; then
9978 case $host_os in
9979 linux*) haveit=yes;;
9980 esac
9981 fi
9982 fi
9983 if test -z "$haveit"; then
9984 haveit=
9985 for x in $LDFLAGS $LIBMPFR; do
9986
9987 acl_save_prefix="$prefix"
9988 prefix="$acl_final_prefix"
9989 acl_save_exec_prefix="$exec_prefix"
9990 exec_prefix="$acl_final_exec_prefix"
9991 eval x=\"$x\"
9992 exec_prefix="$acl_save_exec_prefix"
9993 prefix="$acl_save_prefix"
9994
9995 if test "X$x" = "X-L$additional_libdir"; then
9996 haveit=yes
9997 break
9998 fi
9999 done
10000 if test -z "$haveit"; then
10001 if test -d "$additional_libdir"; then
10002 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10003 fi
10004 fi
10005 haveit=
10006 for x in $LDFLAGS $LTLIBMPFR; do
10007
10008 acl_save_prefix="$prefix"
10009 prefix="$acl_final_prefix"
10010 acl_save_exec_prefix="$exec_prefix"
10011 exec_prefix="$acl_final_exec_prefix"
10012 eval x=\"$x\"
10013 exec_prefix="$acl_save_exec_prefix"
10014 prefix="$acl_save_prefix"
10015
10016 if test "X$x" = "X-L$additional_libdir"; then
10017 haveit=yes
10018 break
10019 fi
10020 done
10021 if test -z "$haveit"; then
10022 if test -d "$additional_libdir"; then
10023 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10024 fi
10025 fi
10026 fi
10027 fi
10028 ;;
10029 -R*)
10030 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10031 if test "$enable_rpath" != no; then
10032 haveit=
10033 for x in $rpathdirs; do
10034 if test "X$x" = "X$dir"; then
10035 haveit=yes
10036 break
10037 fi
10038 done
10039 if test -z "$haveit"; then
10040 rpathdirs="$rpathdirs $dir"
10041 fi
10042 haveit=
10043 for x in $ltrpathdirs; do
10044 if test "X$x" = "X$dir"; then
10045 haveit=yes
10046 break
10047 fi
10048 done
10049 if test -z "$haveit"; then
10050 ltrpathdirs="$ltrpathdirs $dir"
10051 fi
10052 fi
10053 ;;
10054 -l*)
10055 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10056 ;;
10057 *.la)
10058 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10059 ;;
10060 *)
10061 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10062 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10063 ;;
10064 esac
10065 done
10066 fi
10067 else
10068 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10069 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10070 fi
10071 fi
10072 fi
10073 done
10074 done
10075 if test "X$rpathdirs" != "X"; then
10076 if test -n "$hardcode_libdir_separator"; then
10077 alldirs=
10078 for found_dir in $rpathdirs; do
10079 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10080 done
10081 acl_save_libdir="$libdir"
10082 libdir="$alldirs"
10083 eval flag=\"$hardcode_libdir_flag_spec\"
10084 libdir="$acl_save_libdir"
10085 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10086 else
10087 for found_dir in $rpathdirs; do
10088 acl_save_libdir="$libdir"
10089 libdir="$found_dir"
10090 eval flag=\"$hardcode_libdir_flag_spec\"
10091 libdir="$acl_save_libdir"
10092 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10093 done
10094 fi
10095 fi
10096 if test "X$ltrpathdirs" != "X"; then
10097 for found_dir in $ltrpathdirs; do
10098 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10099 done
10100 fi
10101
10102
10103 ac_save_CPPFLAGS="$CPPFLAGS"
10104
10105 for element in $INCMPFR; do
10106 haveit=
10107 for x in $CPPFLAGS; do
10108
10109 acl_save_prefix="$prefix"
10110 prefix="$acl_final_prefix"
10111 acl_save_exec_prefix="$exec_prefix"
10112 exec_prefix="$acl_final_exec_prefix"
10113 eval x=\"$x\"
10114 exec_prefix="$acl_save_exec_prefix"
10115 prefix="$acl_save_prefix"
10116
10117 if test "X$x" = "X$element"; then
10118 haveit=yes
10119 break
10120 fi
10121 done
10122 if test -z "$haveit"; then
10123 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10124 fi
10125 done
10126
10127
10128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10129$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10130if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10131 $as_echo_n "(cached) " >&6
10132else
10133
10134 ac_save_LIBS="$LIBS"
10135 LIBS="$LIBS $LIBMPFR"
10136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10137/* end confdefs.h. */
10138#include <mpfr.h>
10139int
10140main ()
10141{
10142mpfr_exp_t exp; mpfr_t x;
10143 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10144 ;
10145 return 0;
10146}
10147_ACEOF
10148if ac_fn_c_try_link "$LINENO"; then :
10149 ac_cv_libmpfr=yes
10150else
10151 ac_cv_libmpfr=no
10152fi
10153rm -f core conftest.err conftest.$ac_objext \
10154 conftest$ac_exeext conftest.$ac_ext
10155 LIBS="$ac_save_LIBS"
10156
10157fi
10158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10159$as_echo "$ac_cv_libmpfr" >&6; }
10160 if test "$ac_cv_libmpfr" = yes; then
10161 HAVE_LIBMPFR=yes
10162
10163$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10164
10165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10166$as_echo_n "checking how to link with libmpfr... " >&6; }
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10168$as_echo "$LIBMPFR" >&6; }
10169 else
10170 HAVE_LIBMPFR=no
10171 CPPFLAGS="$ac_save_CPPFLAGS"
10172 LIBMPFR=
10173 LTLIBMPFR=
10174 fi
10175
10176
10177
10178
10179
10180
10181 if test "$HAVE_LIBMPFR" != yes; then
10182 if test "$with_mpfr" = yes; then
d0ac1c44 10183 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10184 else
10185 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10186$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10187 fi
10188 fi
10189fi
10190
d344e670
DE
10191# --------------------- #
10192# Check for libpython. #
10193# --------------------- #
10194
a9322a30 10195
a9322a30
TT
10196
10197
ec685c5e 10198
0c4a4063 10199
81ecdfbb
RW
10200# Check whether --with-python was given.
10201if test "${with_python+set}" = set; then :
10202 withval=$with_python;
bec39cab 10203else
81ecdfbb 10204 with_python=auto
bec39cab 10205fi
bec39cab 10206
81ecdfbb
RW
10207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10208$as_echo_n "checking whether to use python... " >&6; }
10209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10210$as_echo "$with_python" >&6; }
9a156167 10211
81ecdfbb
RW
10212if test "${with_python}" = no; then
10213 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10214$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10215 have_libpython=no
bec39cab 10216else
81ecdfbb 10217 case "${with_python}" in
8c85a4e2 10218 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10219 if test -d ${with_python}; then
10220 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10221 python_prog="${with_python}/bin/python"
0c4a4063 10222 python_prefix=
9c4ea6c5
JB
10223 # If python does not exit ${with_python}/bin, then try in
10224 # ${with_python}. On Windows/MinGW, this is where the Python
10225 # executable is.
10226 if test ! -x "${python_prog}"; then
10227 python_prog="${with_python}/python"
10228 python_prefix=
10229 fi
e7a30f46 10230 if test ! -x "${python_prog}"; then
ec685c5e
DE
10231 # Fall back to gdb 7.0/7.1 behaviour.
10232 python_prog=missing
0c4a4063 10233 python_prefix=${with_python}
ec685c5e 10234 fi
e7a30f46 10235 elif test -x "${with_python}"; then
ec685c5e
DE
10236 # While we can't run python compiled for $host (unless host == build),
10237 # the user could write a script that provides the needed information,
10238 # so we support that.
ec685c5e 10239 python_prog=${with_python}
0c4a4063 10240 python_prefix=
ec685c5e 10241 else
d0ac1c44 10242 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10243 fi
81ecdfbb 10244 ;;
ec685c5e
DE
10245 */*)
10246 # Disallow --with-python=foo/bar.
d0ac1c44 10247 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10248 ;;
ec685c5e
DE
10249 *)
10250 # The user has either specified auto, yes, or the name of the python
10251 # program assumed to be in $PATH.
10252 python_prefix=
10253 case "${with_python}" in
10254 yes | auto)
10255 if test ${build} = ${host}; then
10256 # Extract the first word of "python", so it can be a program name with args.
10257set dummy python; ac_word=$2
10258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10259$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10260if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10261 $as_echo_n "(cached) " >&6
10262else
10263 case $python_prog_path in
10264 [\\/]* | ?:[\\/]*)
10265 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10266 ;;
10267 *)
10268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10269for as_dir in $PATH
10270do
10271 IFS=$as_save_IFS
10272 test -z "$as_dir" && as_dir=.
10273 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10274 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10275 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10277 break 2
10278 fi
10279done
10280 done
10281IFS=$as_save_IFS
10282
10283 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10284 ;;
10285esac
10286fi
10287python_prog_path=$ac_cv_path_python_prog_path
10288if test -n "$python_prog_path"; then
10289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10290$as_echo "$python_prog_path" >&6; }
10291else
10292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10293$as_echo "no" >&6; }
10294fi
10295
10296
10297 if test "${python_prog_path}" = missing; then
10298 python_prog=missing
10299 else
10300 python_prog=${python_prog_path}
10301 fi
10302 else
10303 # Not much we can do except assume the cross-compiler will find the
10304 # right files.
10305 python_prog=missing
10306 fi
10307 ;;
10308 *)
10309 # While we can't run python compiled for $host (unless host == build),
10310 # the user could write a script that provides the needed information,
10311 # so we support that.
10312 python_prog="${with_python}"
10313 # Extract the first word of "${python_prog}", so it can be a program name with args.
10314set dummy ${python_prog}; ac_word=$2
10315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10316$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10317if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10318 $as_echo_n "(cached) " >&6
10319else
10320 case $python_prog_path in
10321 [\\/]* | ?:[\\/]*)
10322 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10323 ;;
10324 *)
10325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10326for as_dir in $PATH
10327do
10328 IFS=$as_save_IFS
10329 test -z "$as_dir" && as_dir=.
10330 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10331 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10332 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10333 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10334 break 2
10335 fi
10336done
10337 done
10338IFS=$as_save_IFS
10339
10340 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10341 ;;
10342esac
10343fi
10344python_prog_path=$ac_cv_path_python_prog_path
10345if test -n "$python_prog_path"; then
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10347$as_echo "$python_prog_path" >&6; }
10348else
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10350$as_echo "no" >&6; }
10351fi
10352
10353
10354 if test "${python_prog_path}" = missing; then
d0ac1c44 10355 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10356 fi
10357 ;;
10358 esac
81ecdfbb
RW
10359 esac
10360
ec685c5e 10361 if test "${python_prog}" != missing; then
e7a30f46
DE
10362 # We have a python program to use, but it may be too old.
10363 # Don't flag an error for --with-python=auto (the default).
10364 have_python_config=yes
ec685c5e
DE
10365 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10366 if test $? != 0; then
e7a30f46
DE
10367 have_python_config=failed
10368 if test "${with_python}" != auto; then
d0ac1c44 10369 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10370 fi
ec685c5e
DE
10371 fi
10372 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10373 if test $? != 0; then
e7a30f46
DE
10374 have_python_config=failed
10375 if test "${with_python}" != auto; then
d0ac1c44 10376 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10377 fi
ec685c5e 10378 fi
0c4a4063
DE
10379 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10380 if test $? != 0; then
e7a30f46
DE
10381 have_python_config=failed
10382 if test "${with_python}" != auto; then
d0ac1c44 10383 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10384 fi
0c4a4063 10385 fi
ec685c5e 10386 else
ac534cba
JB
10387 # We do not have a python executable we can use to determine where
10388 # to find the Python headers and libs. We cannot guess the include
10389 # path from the python_prefix either, because that include path
10390 # depends on the Python version. So, there is nothing much we can
10391 # do except assume that the compiler will be able to find those files.
10392 python_includes=
10393 python_libs=
0c4a4063 10394 have_python_config=no
ec685c5e 10395 fi
bec39cab 10396
ec685c5e
DE
10397 # If we have python-config, only try the configuration it provides.
10398 # Otherwise fallback on the old way of trying different versions of
10399 # python in turn.
81ecdfbb 10400
ec685c5e
DE
10401 have_libpython=no
10402 if test "${have_python_config}" = yes; then
c1039e3c
JB
10403 # Determine the Python version by extracting "-lpython<version>"
10404 # part of the python_libs. <version> is usually X.Y with X and Y
10405 # being decimal numbers, but can also be XY (seen on Windows).
10406 #
10407 # The extraction is performed using sed with a regular expression.
10408 # Initially, the regexp used was using the '?' quantifier to make
10409 # the dot in the version number optional. Unfortunately, this
10410 # does not work with non-GNU versions of sed because, because of
10411 # what looks like a limitation (the '?' quantifier does not work
10412 # with back-references). We work around this limitation by using
10413 # the '*' quantifier instead. It means that, in theory, we might
10414 # match unexpected version strings such as "-lpython2..7", but
10415 # this seems unlikely in practice. And even if that happens,
10416 # an error will be triggered later on, when checking that version
10417 # number.
ec685c5e 10418 python_version=`echo " ${python_libs} " \
c1039e3c 10419 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10420 case "${python_version}" in
10421 python*)
ec685c5e
DE
10422
10423 version=${python_version}
10424
10425 new_CPPFLAGS=${python_includes}
10426 new_LIBS=${python_libs}
81ecdfbb
RW
10427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10428$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10429 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10430 save_LIBS=$LIBS
ec685c5e 10431 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10432 LIBS="$new_LIBS $LIBS"
ec685c5e 10433 found_usable_python=no
81ecdfbb 10434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10435/* end confdefs.h. */
ac534cba 10436#include "Python.h"
81ecdfbb
RW
10437int
10438main ()
10439{
10440Py_Initialize ();
10441 ;
10442 return 0;
10443}
bec39cab 10444_ACEOF
81ecdfbb 10445if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10446 have_libpython=${version}
10447 found_usable_python=yes
ac534cba
JB
10448 PYTHON_CPPFLAGS=$new_CPPFLAGS
10449 PYTHON_LIBS=$new_LIBS
9a156167 10450fi
81ecdfbb
RW
10451rm -f core conftest.err conftest.$ac_objext \
10452 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10453 CPPFLAGS=$save_CPPFLAGS
10454 LIBS=$save_LIBS
ec685c5e
DE
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10456$as_echo "${found_usable_python}" >&6; }
9a156167 10457
0c4a4063
DE
10458 ;;
10459 *)
d0ac1c44 10460 as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10461 ;;
10462 esac
e7a30f46 10463 elif test "${have_python_config}" != failed; then
ec685c5e 10464 if test "${have_libpython}" = no; then
9a156167 10465
420697bb
TT
10466 version=python2.7
10467
10468 new_CPPFLAGS=${python_includes}
bf27f0e2 10469 new_LIBS="-lpython2.7 ${python_libs}"
420697bb
TT
10470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10471$as_echo_n "checking for ${version}... " >&6; }
10472 save_CPPFLAGS=$CPPFLAGS
10473 save_LIBS=$LIBS
10474 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10475 LIBS="$new_LIBS $LIBS"
420697bb
TT
10476 found_usable_python=no
10477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10478/* end confdefs.h. */
ac534cba 10479#include "Python.h"
420697bb
TT
10480int
10481main ()
10482{
10483Py_Initialize ();
10484 ;
10485 return 0;
10486}
10487_ACEOF
10488if ac_fn_c_try_link "$LINENO"; then :
10489 have_libpython=${version}
10490 found_usable_python=yes
ac534cba
JB
10491 PYTHON_CPPFLAGS=$new_CPPFLAGS
10492 PYTHON_LIBS=$new_LIBS
420697bb
TT
10493fi
10494rm -f core conftest.err conftest.$ac_objext \
10495 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10496 CPPFLAGS=$save_CPPFLAGS
10497 LIBS=$save_LIBS
420697bb
TT
10498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10499$as_echo "${found_usable_python}" >&6; }
10500
10501 fi
10502 if test "${have_libpython}" = no; then
10503
ec685c5e
DE
10504 version=python2.6
10505
10506 new_CPPFLAGS=${python_includes}
bf27f0e2 10507 new_LIBS="-lpython2.6 ${python_libs}"
ec685c5e
DE
10508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10509$as_echo_n "checking for ${version}... " >&6; }
10510 save_CPPFLAGS=$CPPFLAGS
10511 save_LIBS=$LIBS
10512 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10513 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10514 found_usable_python=no
10515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10516/* end confdefs.h. */
ac534cba 10517#include "Python.h"
ec685c5e
DE
10518int
10519main ()
10520{
10521Py_Initialize ();
10522 ;
10523 return 0;
10524}
10525_ACEOF
10526if ac_fn_c_try_link "$LINENO"; then :
10527 have_libpython=${version}
10528 found_usable_python=yes
ac534cba
JB
10529 PYTHON_CPPFLAGS=$new_CPPFLAGS
10530 PYTHON_LIBS=$new_LIBS
ec685c5e 10531fi
81ecdfbb
RW
10532rm -f core conftest.err conftest.$ac_objext \
10533 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10534 CPPFLAGS=$save_CPPFLAGS
10535 LIBS=$save_LIBS
ec685c5e
DE
10536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10537$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10538
ec685c5e
DE
10539 fi
10540 fi
9c4ea6c5 10541 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10542
10543$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10544
9c4ea6c5 10545 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10546
10547$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10548
81ecdfbb 10549 fi
ec685c5e
DE
10550
10551 if test "${have_libpython}" = no; then
81ecdfbb
RW
10552 case "${with_python}" in
10553 yes)
d0ac1c44 10554 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10555 ;;
10556 auto)
10557 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10558$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10559 ;;
10560 *)
d0ac1c44 10561 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10562 ;;
10563 esac
0c4a4063
DE
10564 else
10565 if test -n "${python_prefix}"; then
10566
10567cat >>confdefs.h <<_ACEOF
10568#define WITH_PYTHON_PATH "${python_prefix}"
10569_ACEOF
10570
10571
10572 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10573 if test "x$prefix" = xNONE; then
10574 test_prefix=/usr/local
10575 else
10576 test_prefix=$prefix
10577 fi
10578 else
10579 test_prefix=$exec_prefix
10580 fi
10581 value=0
10582 case ${python_prefix} in
10583 "${test_prefix}"|"${test_prefix}/"*|\
10584 '${exec_prefix}'|'${exec_prefix}/'*)
10585 value=1
10586 ;;
10587 esac
10588
10589cat >>confdefs.h <<_ACEOF
10590#define PYTHON_PATH_RELOCATABLE $value
10591_ACEOF
10592
10593
10594 fi
81ecdfbb 10595 fi
436868fb 10596fi
436868fb 10597
ec685c5e 10598if test "${have_libpython}" != no; then
436868fb 10599
81ecdfbb 10600$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10601
81ecdfbb
RW
10602 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10603 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10604 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10605 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10606 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10607
81ecdfbb
RW
10608 # Flags needed to compile Python code (taken from python-config --cflags).
10609 # We cannot call python-config directly because it will output whatever was
10610 # used when compiling the Python interpreter itself, including flags which
10611 # would make the python-related objects be compiled differently from the
10612 # rest of GDB (e.g., -O2 and -fPIC).
10613 if test "${GCC}" = yes; then
ae292b3a
TT
10614 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10615 # Python headers recommend -DNDEBUG, but it's unclear if that just
10616 # refers to building Python itself. In release mode, though, it
10617 # doesn't hurt for the Python code in gdb to follow.
10618 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10619 fi
436868fb 10620
81ecdfbb
RW
10621 if test "x${tentative_python_cflags}" != x; then
10622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10623$as_echo_n "checking compiler flags for python code... " >&6; }
10624 for flag in ${tentative_python_cflags}; do
10625 # Check that the compiler accepts it
10626 saved_CFLAGS="$CFLAGS"
10627 CFLAGS="$CFLAGS $flag"
10628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10629/* end confdefs.h. */
81ecdfbb 10630
a9322a30
TT
10631int
10632main ()
10633{
a9322a30
TT
10634
10635 ;
10636 return 0;
10637}
bec39cab 10638_ACEOF
81ecdfbb
RW
10639if ac_fn_c_try_compile "$LINENO"; then :
10640 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10641fi
81ecdfbb
RW
10642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10643 CFLAGS="$saved_CFLAGS"
10644 done
10645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10646$as_echo "${PYTHON_CFLAGS}" >&6; }
10647 fi
043b6510 10648
c83393b9
JB
10649 # On x64 Windows, Python's include headers, and pyconfig.h in
10650 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10651 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10652 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10653 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10654 # The issue was reported to the Python community, but still isn't
10655 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10656
043b6510 10657 case "$gdb_host" in
c83393b9
JB
10658 mingw64)
10659 if test "${GCC}" = yes; then
10660 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10661 fi
10662 ;;
043b6510 10663 esac
a8db4212
YPK
10664
10665 # Note that "python -m threading" cannot be used to check for
10666 # threading support due to a bug in Python 2.7.3
10667 # (http://bugs.python.org/issue15567).
10668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10669$as_echo_n "checking whether python supports threads... " >&6; }
10670 saved_CPPFLAGS="${CPPFLAGS}"
10671 CPPFLAGS="${PYTHON_CPPFLAGS}"
10672 # Note that the test is reversed so that python_has_threads=yes on
10673 # unexpected failures.
10674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10675/* end confdefs.h. */
10676
10677#include <Python.h>
10678#ifdef WITH_THREAD
10679# error
10680#endif
10681
10682_ACEOF
10683if ac_fn_c_try_cpp "$LINENO"; then :
10684 python_has_threads=no
10685else
10686 python_has_threads=yes
10687fi
d0ac1c44 10688rm -f conftest.err conftest.i conftest.$ac_ext
a8db4212
YPK
10689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10690$as_echo "${python_has_threads}" >&6; }
10691 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10692else
6dddc817
DE
10693 # Even if Python support is not compiled in, we need to have this file
10694 # included so that the "python" command, et.al., still exists.
8fd8d003 10695 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10696 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10697fi
9a156167 10698
a4a1c157
PA
10699# Work around Python http://bugs.python.org/issue10112. See also
10700# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10701# no effect. Note that the only test after this that uses Python is
10702# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10703# run without -export-dynamic too.
10704PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10705
10706
ed3ef339
DE
10707
10708
4df42755
DE
10709 if test "${have_libpython}" != no; then
10710 HAVE_PYTHON_TRUE=
10711 HAVE_PYTHON_FALSE='#'
10712else
10713 HAVE_PYTHON_TRUE='#'
10714 HAVE_PYTHON_FALSE=
10715fi
10716
ed3ef339
DE
10717
10718# -------------------- #
10719# Check for libguile. #
10720# -------------------- #
10721
10722
e1402065
DE
10723
10724
10725
10726
10727# Check whether --with-guile was given.
10728if test "${with_guile+set}" = set; then :
10729 withval=$with_guile;
10730else
10731 with_guile=auto
10732fi
10733
10734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10735$as_echo_n "checking whether to use guile... " >&6; }
10736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10737$as_echo "$with_guile" >&6; }
10738
ed3ef339
DE
10739# Extract the first word of "pkg-config", so it can be a program name with args.
10740set dummy pkg-config; ac_word=$2
10741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10742$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10743if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10744 $as_echo_n "(cached) " >&6
10745else
10746 case $pkg_config_prog_path in
10747 [\\/]* | ?:[\\/]*)
10748 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10749 ;;
10750 *)
10751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10752for as_dir in $PATH
10753do
10754 IFS=$as_save_IFS
10755 test -z "$as_dir" && as_dir=.
10756 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10758 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10760 break 2
10761 fi
10762done
10763 done
10764IFS=$as_save_IFS
10765
10766 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10767 ;;
10768esac
10769fi
10770pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10771if test -n "$pkg_config_prog_path"; then
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10773$as_echo "$pkg_config_prog_path" >&6; }
10774else
10775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776$as_echo "no" >&6; }
10777fi
10778
10779
10780
6e66f753 10781try_guile_versions="guile-2.0"
ed3ef339
DE
10782have_libguile=no
10783case "${with_guile}" in
10784no)
10785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10786$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10787 ;;
10788auto)
e1402065
DE
10789 if test "${pkg_config_prog_path}" = "missing"; then
10790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10791$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10792 else
ed3ef339
DE
10793
10794 pkg_config=${pkg_config_prog_path}
10795 guile_version_list=${try_guile_versions}
10796 flag_errors=no
10797
ed3ef339
DE
10798 found_usable_guile=checking
10799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10800$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10801 for guile_version in ${guile_version_list}; do
10802 ${pkg_config} --exists ${guile_version} 2>/dev/null
10803 if test $? != 0; then
10804 continue
10805 fi
10806 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10807 if test $? != 0; then
d0ac1c44 10808 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10809 fi
10810 new_LIBS=`${pkg_config} --libs ${guile_version}`
10811 if test $? != 0; then
d0ac1c44 10812 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10813 fi
10814 found_usable_guile=${guile_version}
10815 break
10816 done
10817 if test "${found_usable_guile}" = "checking"; then
10818 if test "${flag_errors}" = "yes"; then
d0ac1c44 10819 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10820 else
10821 found_usable_guile=no
10822 fi
10823 fi
10824 if test "${found_usable_guile}" != no; then
10825 save_CPPFLAGS=$CPPFLAGS
10826 save_LIBS=$LIBS
10827 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10828 LIBS="$LIBS $new_LIBS"
10829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10830/* end confdefs.h. */
10831#include "libguile.h"
10832int
10833main ()
10834{
10835scm_init_guile ();
10836 ;
10837 return 0;
10838}
10839_ACEOF
10840if ac_fn_c_try_link "$LINENO"; then :
10841 have_libguile=yes
10842 GUILE_CPPFLAGS=$new_CPPFLAGS
10843 GUILE_LIBS=$new_LIBS
10844else
10845 found_usable_guile=no
10846fi
10847rm -f core conftest.err conftest.$ac_objext \
10848 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10849 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10850if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10851
10852$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10853
10854
10855fi
10856
ed3ef339
DE
10857 CPPFLAGS=$save_CPPFLAGS
10858 LIBS=$save_LIBS
10859 if test "${found_usable_guile}" = no; then
10860 if test "${flag_errors}" = yes; then
10861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10863as_fn_error $? "linking guile version ${guile_version} test program failed
10864See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10865 fi
10866 fi
10867 fi
10868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10869$as_echo "${found_usable_guile}" >&6; }
10870
e1402065 10871 fi
ed3ef339
DE
10872 ;;
10873yes)
e1402065 10874 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 10875 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 10876 fi
ed3ef339
DE
10877
10878 pkg_config=${pkg_config_prog_path}
10879 guile_version_list=${try_guile_versions}
10880 flag_errors=yes
10881
ed3ef339
DE
10882 found_usable_guile=checking
10883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10884$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10885 for guile_version in ${guile_version_list}; do
10886 ${pkg_config} --exists ${guile_version} 2>/dev/null
10887 if test $? != 0; then
10888 continue
10889 fi
10890 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10891 if test $? != 0; then
d0ac1c44 10892 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10893 fi
10894 new_LIBS=`${pkg_config} --libs ${guile_version}`
10895 if test $? != 0; then
d0ac1c44 10896 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10897 fi
10898 found_usable_guile=${guile_version}
10899 break
10900 done
10901 if test "${found_usable_guile}" = "checking"; then
10902 if test "${flag_errors}" = "yes"; then
d0ac1c44 10903 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10904 else
10905 found_usable_guile=no
10906 fi
10907 fi
10908 if test "${found_usable_guile}" != no; then
10909 save_CPPFLAGS=$CPPFLAGS
10910 save_LIBS=$LIBS
10911 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10912 LIBS="$LIBS $new_LIBS"
10913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10914/* end confdefs.h. */
10915#include "libguile.h"
10916int
10917main ()
10918{
10919scm_init_guile ();
10920 ;
10921 return 0;
10922}
10923_ACEOF
10924if ac_fn_c_try_link "$LINENO"; then :
10925 have_libguile=yes
10926 GUILE_CPPFLAGS=$new_CPPFLAGS
10927 GUILE_LIBS=$new_LIBS
10928else
10929 found_usable_guile=no
10930fi
10931rm -f core conftest.err conftest.$ac_objext \
10932 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10933 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10934if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10935
10936$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10937
10938
10939fi
10940
ed3ef339
DE
10941 CPPFLAGS=$save_CPPFLAGS
10942 LIBS=$save_LIBS
10943 if test "${found_usable_guile}" = no; then
10944 if test "${flag_errors}" = yes; then
10945 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10946$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10947as_fn_error $? "linking guile version ${guile_version} test program failed
10948See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10949 fi
10950 fi
10951 fi
10952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10953$as_echo "${found_usable_guile}" >&6; }
10954
10955 ;;
10956[\\/]* | ?:[\\/]*)
e1402065 10957 if test -x "${with_guile}"; then
ed3ef339
DE
10958
10959 pkg_config=${with_guile}
10960 guile_version_list=${try_guile_versions}
10961 flag_errors=yes
10962
ed3ef339
DE
10963 found_usable_guile=checking
10964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10965$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10966 for guile_version in ${guile_version_list}; do
10967 ${pkg_config} --exists ${guile_version} 2>/dev/null
10968 if test $? != 0; then
10969 continue
10970 fi
10971 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10972 if test $? != 0; then
d0ac1c44 10973 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10974 fi
10975 new_LIBS=`${pkg_config} --libs ${guile_version}`
10976 if test $? != 0; then
d0ac1c44 10977 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10978 fi
10979 found_usable_guile=${guile_version}
10980 break
10981 done
10982 if test "${found_usable_guile}" = "checking"; then
10983 if test "${flag_errors}" = "yes"; then
d0ac1c44 10984 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10985 else
10986 found_usable_guile=no
10987 fi
10988 fi
10989 if test "${found_usable_guile}" != no; then
10990 save_CPPFLAGS=$CPPFLAGS
10991 save_LIBS=$LIBS
10992 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10993 LIBS="$LIBS $new_LIBS"
10994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10995/* end confdefs.h. */
10996#include "libguile.h"
10997int
10998main ()
10999{
11000scm_init_guile ();
11001 ;
11002 return 0;
11003}
11004_ACEOF
11005if ac_fn_c_try_link "$LINENO"; then :
11006 have_libguile=yes
11007 GUILE_CPPFLAGS=$new_CPPFLAGS
11008 GUILE_LIBS=$new_LIBS
11009else
11010 found_usable_guile=no
11011fi
11012rm -f core conftest.err conftest.$ac_objext \
11013 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11014 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11015if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11016
11017$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11018
11019
11020fi
11021
ed3ef339
DE
11022 CPPFLAGS=$save_CPPFLAGS
11023 LIBS=$save_LIBS
11024 if test "${found_usable_guile}" = no; then
11025 if test "${flag_errors}" = yes; then
11026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11028as_fn_error $? "linking guile version ${guile_version} test program failed
11029See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11030 fi
11031 fi
11032 fi
11033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11034$as_echo "${found_usable_guile}" >&6; }
11035
e1402065 11036 else
d0ac1c44 11037 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11038 fi
ed3ef339
DE
11039 ;;
11040"" | */*)
11041 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11042 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11043 ;;
11044*)
11045 # A space separate list of guile versions to try, in order.
e1402065 11046 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11047 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11048 fi
ed3ef339
DE
11049
11050 pkg_config=${pkg_config_prog_path}
11051 guile_version_list=${with_guile}
11052 flag_errors=yes
11053
ed3ef339
DE
11054 found_usable_guile=checking
11055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11056$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11057 for guile_version in ${guile_version_list}; do
11058 ${pkg_config} --exists ${guile_version} 2>/dev/null
11059 if test $? != 0; then
11060 continue
11061 fi
11062 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11063 if test $? != 0; then
d0ac1c44 11064 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11065 fi
11066 new_LIBS=`${pkg_config} --libs ${guile_version}`
11067 if test $? != 0; then
d0ac1c44 11068 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11069 fi
11070 found_usable_guile=${guile_version}
11071 break
11072 done
11073 if test "${found_usable_guile}" = "checking"; then
11074 if test "${flag_errors}" = "yes"; then
d0ac1c44 11075 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11076 else
11077 found_usable_guile=no
11078 fi
11079 fi
11080 if test "${found_usable_guile}" != no; then
11081 save_CPPFLAGS=$CPPFLAGS
11082 save_LIBS=$LIBS
11083 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11084 LIBS="$LIBS $new_LIBS"
11085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11086/* end confdefs.h. */
11087#include "libguile.h"
11088int
11089main ()
11090{
11091scm_init_guile ();
11092 ;
11093 return 0;
11094}
11095_ACEOF
11096if ac_fn_c_try_link "$LINENO"; then :
11097 have_libguile=yes
11098 GUILE_CPPFLAGS=$new_CPPFLAGS
11099 GUILE_LIBS=$new_LIBS
11100else
11101 found_usable_guile=no
11102fi
11103rm -f core conftest.err conftest.$ac_objext \
11104 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11105 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11106if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11107
11108$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11109
11110
11111fi
11112
ed3ef339
DE
11113 CPPFLAGS=$save_CPPFLAGS
11114 LIBS=$save_LIBS
11115 if test "${found_usable_guile}" = no; then
11116 if test "${flag_errors}" = yes; then
11117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11119as_fn_error $? "linking guile version ${guile_version} test program failed
11120See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11121 fi
11122 fi
11123 fi
11124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11125$as_echo "${found_usable_guile}" >&6; }
11126
11127 ;;
11128esac
11129
e76c5d17 11130if test "${have_libguile}" != no; then
d342a0da
DE
11131 case "${with_guile}" in
11132 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11133
11134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11135$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11136if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11137 $as_echo_n "(cached) " >&6
11138else
d342a0da 11139 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11140
11141 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11142 # the 'guild' and 'bindir' variables. In that case, try to guess
11143 # what the program name is, at the risk of getting it wrong if
11144 # Guile was configured with '--program-suffix' or similar.
11145 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11146 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11147 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11148 fi
11149
11150fi
11151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11152$as_echo "$ac_cv_guild_program_name" >&6; }
11153
11154 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11155 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11156 fi
11157
11158 GUILD="$ac_cv_guild_program_name"
11159
11160
d342a0da
DE
11161 ;;
11162 *)
11163
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11165$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11166if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11167 $as_echo_n "(cached) " >&6
11168else
11169 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11170
11171 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11172 # the 'guild' and 'bindir' variables. In that case, try to guess
11173 # what the program name is, at the risk of getting it wrong if
11174 # Guile was configured with '--program-suffix' or similar.
11175 if test "x$ac_cv_guild_program_name" = "x"; then
11176 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11177 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11178 fi
11179
11180fi
11181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11182$as_echo "$ac_cv_guild_program_name" >&6; }
11183
11184 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11185 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11186 fi
11187
11188 GUILD="$ac_cv_guild_program_name"
11189
11190
11191 ;;
11192 esac
e76c5d17
DE
11193
11194
11195 if test "$cross_compiling" = no; then
11196 GUILD_TARGET_FLAG=
11197 else
11198 GUILD_TARGET_FLAG="--target=$host"
11199 fi
11200
11201
11202
11203
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11205$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11206if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11207 $as_echo_n "(cached) " >&6
11208else
11209 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11210 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11211 ac_cv_guild_ok=yes
11212 else
11213 ac_cv_guild_ok=no
11214 fi
11215fi
11216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11217$as_echo "$ac_cv_guild_ok" >&6; }
11218
11219 if test "$ac_cv_guild_ok" = no; then
11220 have_libguile=no
11221 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11222$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11223 fi
11224fi
11225
ed3ef339
DE
11226if test "${have_libguile}" != no; then
11227
11228$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11229
11230 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11231 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11232 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11233 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11234 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11235
11236 save_LIBS="$LIBS"
11237 save_CPPFLAGS="$CPPFLAGS"
11238 LIBS="$GUILE_LIBS"
11239 CPPFLAGS="$GUILE_CPPFLAGS"
11240 for ac_func in scm_new_smob
11241do :
11242 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11243if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11244 cat >>confdefs.h <<_ACEOF
11245#define HAVE_SCM_NEW_SMOB 1
11246_ACEOF
11247
11248fi
11249done
11250
11251 LIBS="$save_LIBS"
11252 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11253else
11254 # Even if Guile support is not compiled in, we need to have these files
11255 # included.
bd810fff 11256 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11257 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11258fi
9a156167 11259
ac534cba 11260
4df42755
DE
11261 if test "${have_libguile}" != no; then
11262 HAVE_GUILE_TRUE=
11263 HAVE_GUILE_FALSE='#'
11264else
11265 HAVE_GUILE_TRUE='#'
11266 HAVE_GUILE_FALSE=
11267fi
11268
ac534cba 11269
62f29fda
TT
11270# ---------------------------- #
11271# Check for source highlight. #
11272# ---------------------------- #
11273
11274SRCHIGH_LIBS=
11275SRCHIGH_CFLAGS=
189b8c2e
ST
11276
11277# Check whether --enable-source-highlight was given.
11278if test "${enable_source_highlight+set}" = set; then :
11279 enableval=$enable_source_highlight; case "${enableval}" in
11280 yes) enable_source_highlight=yes ;;
11281 no) enable_source_highlight=no ;;
11282 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11283esac
11284else
11285 enable_source_highlight=auto
11286fi
11287
11288
11289if test "${enable_source_highlight}" != "no"; then
11290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11291$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11292 if test "${pkg_config_prog_path}" = "missing"; then
11293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11294$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11295 if test "${enable_source_highlight}" = "yes"; then
11296 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11297 fi
11298 else
11299 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11300 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11301 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11302
11303$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11304
11305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11306$as_echo "yes" >&6; }
189b8c2e 11307 else
62f29fda
TT
11308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11309$as_echo "no" >&6; }
189b8c2e
ST
11310 if test "${enable_source_highlight}" = "yes"; then
11311 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11312 fi
11313 fi
11314 fi
62f29fda
TT
11315fi
11316
11317
11318
d344e670
DE
11319# --------------------- #
11320# Check for libmcheck. #
11321# --------------------- #
11322
a8db4212
YPK
11323# Enable -lmcheck by default (it provides cheap-enough memory mangling),
11324# but turn it off if Python is enabled with threads, since -lmcheck is
11325# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11326# and for releases.
17ef446e
PA
11327if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11328 && $development; then
11329 libmcheck_default=yes
11330else
11331 libmcheck_default=no
a8db4212
YPK
11332fi
11333
17ef446e
PA
11334 # Check whether --enable-libmcheck was given.
11335if test "${enable_libmcheck+set}" = set; then :
11336 enableval=$enable_libmcheck; case "${enableval}" in
11337 yes | y) ENABLE_LIBMCHECK="yes" ;;
11338 no | n) ENABLE_LIBMCHECK="no" ;;
d0ac1c44 11339 *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
17ef446e
PA
11340 esac
11341fi
11342
11343
11344 if test -z "${ENABLE_LIBMCHECK}"; then
11345 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 11346 fi
17ef446e
PA
11347
11348 if test "$ENABLE_LIBMCHECK" = "yes" ; then
11349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212 11350$as_echo_n "checking for main in -lmcheck... " >&6; }
d0ac1c44 11351if ${ac_cv_lib_mcheck_main+:} false; then :
a8db4212
YPK
11352 $as_echo_n "(cached) " >&6
11353else
11354 ac_check_lib_save_LIBS=$LIBS
11355LIBS="-lmcheck $LIBS"
11356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11357/* end confdefs.h. */
11358
11359
11360int
11361main ()
11362{
11363return main ();
11364 ;
11365 return 0;
11366}
11367_ACEOF
11368if ac_fn_c_try_link "$LINENO"; then :
11369 ac_cv_lib_mcheck_main=yes
11370else
11371 ac_cv_lib_mcheck_main=no
11372fi
11373rm -f core conftest.err conftest.$ac_objext \
11374 conftest$ac_exeext conftest.$ac_ext
11375LIBS=$ac_check_lib_save_LIBS
11376fi
11377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11378$as_echo "$ac_cv_lib_mcheck_main" >&6; }
d0ac1c44 11379if test "x$ac_cv_lib_mcheck_main" = xyes; then :
a8db4212
YPK
11380 cat >>confdefs.h <<_ACEOF
11381#define HAVE_LIBMCHECK 1
11382_ACEOF
11383
11384 LIBS="-lmcheck $LIBS"
11385
11386fi
11387
17ef446e
PA
11388 fi
11389
11390
11391if test "$ENABLE_LIBMCHECK" = "yes" \
11392 -a "${have_libpython}" != "no" \
11393 -a "${python_has_threads}" = "yes" ; then
11394 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11395$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
11396fi
11397
58bfce93
MM
11398
11399# Check whether --with-intel_pt was given.
11400if test "${with_intel_pt+set}" = set; then :
11401 withval=$with_intel_pt;
11402else
11403 with_intel_pt=auto
11404fi
11405
11406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11407$as_echo_n "checking whether to use intel pt... " >&6; }
11408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11409$as_echo "$with_intel_pt" >&6; }
11410
11411if test "${with_intel_pt}" = no; then
bc504a31
PA
11412 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11413$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11414 HAVE_LIBIPT=no
11415else
5599c404
MM
11416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11417/* end confdefs.h. */
11418
11419#include <linux/perf_event.h>
11420#ifndef PERF_ATTR_SIZE_VER5
11421# error
11422#endif
11423
11424_ACEOF
11425if ac_fn_c_try_cpp "$LINENO"; then :
11426 perf_event=yes
11427else
11428 perf_event=no
11429fi
d0ac1c44 11430rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11431 if test "$perf_event" != yes; then
11432 if test "$with_intel_pt" = yes; then
d0ac1c44 11433 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11434 else
11435 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11436$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11437 fi
11438 fi
11439
58bfce93
MM
11440
11441
11442
11443
11444
11445
11446
11447
11448 use_additional=yes
11449
11450 acl_save_prefix="$prefix"
11451 prefix="$acl_final_prefix"
11452 acl_save_exec_prefix="$exec_prefix"
11453 exec_prefix="$acl_final_exec_prefix"
11454
11455 eval additional_includedir=\"$includedir\"
11456 eval additional_libdir=\"$libdir\"
11457
11458 exec_prefix="$acl_save_exec_prefix"
11459 prefix="$acl_save_prefix"
11460
11461
11462# Check whether --with-libipt-prefix was given.
11463if test "${with_libipt_prefix+set}" = set; then :
11464 withval=$with_libipt_prefix;
11465 if test "X$withval" = "Xno"; then
11466 use_additional=no
11467 else
11468 if test "X$withval" = "X"; then
11469
11470 acl_save_prefix="$prefix"
11471 prefix="$acl_final_prefix"
11472 acl_save_exec_prefix="$exec_prefix"
11473 exec_prefix="$acl_final_exec_prefix"
11474
11475 eval additional_includedir=\"$includedir\"
11476 eval additional_libdir=\"$libdir\"
11477
11478 exec_prefix="$acl_save_exec_prefix"
11479 prefix="$acl_save_prefix"
11480
11481 else
11482 additional_includedir="$withval/include"
11483 additional_libdir="$withval/lib"
11484 fi
11485 fi
11486
11487fi
11488
11489 LIBIPT=
11490 LTLIBIPT=
11491 INCIPT=
11492 rpathdirs=
11493 ltrpathdirs=
11494 names_already_handled=
11495 names_next_round='ipt '
11496 while test -n "$names_next_round"; do
11497 names_this_round="$names_next_round"
11498 names_next_round=
11499 for name in $names_this_round; do
11500 already_handled=
11501 for n in $names_already_handled; do
11502 if test "$n" = "$name"; then
11503 already_handled=yes
11504 break
11505 fi
11506 done
11507 if test -z "$already_handled"; then
11508 names_already_handled="$names_already_handled $name"
11509 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11510 eval value=\"\$HAVE_LIB$uppername\"
11511 if test -n "$value"; then
11512 if test "$value" = yes; then
11513 eval value=\"\$LIB$uppername\"
11514 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11515 eval value=\"\$LTLIB$uppername\"
11516 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11517 else
11518 :
11519 fi
11520 else
11521 found_dir=
11522 found_la=
11523 found_so=
11524 found_a=
11525 if test $use_additional = yes; then
11526 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11527 found_dir="$additional_libdir"
11528 found_so="$additional_libdir/lib$name.$shlibext"
11529 if test -f "$additional_libdir/lib$name.la"; then
11530 found_la="$additional_libdir/lib$name.la"
11531 fi
11532 else
11533 if test -f "$additional_libdir/lib$name.$libext"; then
11534 found_dir="$additional_libdir"
11535 found_a="$additional_libdir/lib$name.$libext"
11536 if test -f "$additional_libdir/lib$name.la"; then
11537 found_la="$additional_libdir/lib$name.la"
11538 fi
11539 fi
11540 fi
11541 fi
11542 if test "X$found_dir" = "X"; then
11543 for x in $LDFLAGS $LTLIBIPT; do
11544
11545 acl_save_prefix="$prefix"
11546 prefix="$acl_final_prefix"
11547 acl_save_exec_prefix="$exec_prefix"
11548 exec_prefix="$acl_final_exec_prefix"
11549 eval x=\"$x\"
11550 exec_prefix="$acl_save_exec_prefix"
11551 prefix="$acl_save_prefix"
11552
11553 case "$x" in
11554 -L*)
11555 dir=`echo "X$x" | sed -e 's/^X-L//'`
11556 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11557 found_dir="$dir"
11558 found_so="$dir/lib$name.$shlibext"
11559 if test -f "$dir/lib$name.la"; then
11560 found_la="$dir/lib$name.la"
11561 fi
11562 else
11563 if test -f "$dir/lib$name.$libext"; then
11564 found_dir="$dir"
11565 found_a="$dir/lib$name.$libext"
11566 if test -f "$dir/lib$name.la"; then
11567 found_la="$dir/lib$name.la"
11568 fi
11569 fi
11570 fi
11571 ;;
11572 esac
11573 if test "X$found_dir" != "X"; then
11574 break
11575 fi
11576 done
11577 fi
11578 if test "X$found_dir" != "X"; then
11579 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11580 if test "X$found_so" != "X"; then
11581 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11582 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11583 else
11584 haveit=
11585 for x in $ltrpathdirs; do
11586 if test "X$x" = "X$found_dir"; then
11587 haveit=yes
11588 break
11589 fi
11590 done
11591 if test -z "$haveit"; then
11592 ltrpathdirs="$ltrpathdirs $found_dir"
11593 fi
11594 if test "$hardcode_direct" = yes; then
11595 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11596 else
11597 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11598 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11599 haveit=
11600 for x in $rpathdirs; do
11601 if test "X$x" = "X$found_dir"; then
11602 haveit=yes
11603 break
11604 fi
11605 done
11606 if test -z "$haveit"; then
11607 rpathdirs="$rpathdirs $found_dir"
11608 fi
11609 else
11610 haveit=
11611 for x in $LDFLAGS $LIBIPT; do
11612
11613 acl_save_prefix="$prefix"
11614 prefix="$acl_final_prefix"
11615 acl_save_exec_prefix="$exec_prefix"
11616 exec_prefix="$acl_final_exec_prefix"
11617 eval x=\"$x\"
11618 exec_prefix="$acl_save_exec_prefix"
11619 prefix="$acl_save_prefix"
11620
11621 if test "X$x" = "X-L$found_dir"; then
11622 haveit=yes
11623 break
11624 fi
11625 done
11626 if test -z "$haveit"; then
11627 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11628 fi
11629 if test "$hardcode_minus_L" != no; then
11630 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11631 else
11632 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11633 fi
11634 fi
11635 fi
11636 fi
11637 else
11638 if test "X$found_a" != "X"; then
11639 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11640 else
11641 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11642 fi
11643 fi
11644 additional_includedir=
11645 case "$found_dir" in
11646 */lib | */lib/)
11647 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11648 additional_includedir="$basedir/include"
11649 ;;
11650 esac
11651 if test "X$additional_includedir" != "X"; then
11652 if test "X$additional_includedir" != "X/usr/include"; then
11653 haveit=
11654 if test "X$additional_includedir" = "X/usr/local/include"; then
11655 if test -n "$GCC"; then
11656 case $host_os in
11657 linux*) haveit=yes;;
11658 esac
11659 fi
11660 fi
11661 if test -z "$haveit"; then
11662 for x in $CPPFLAGS $INCIPT; do
11663
11664 acl_save_prefix="$prefix"
11665 prefix="$acl_final_prefix"
11666 acl_save_exec_prefix="$exec_prefix"
11667 exec_prefix="$acl_final_exec_prefix"
11668 eval x=\"$x\"
11669 exec_prefix="$acl_save_exec_prefix"
11670 prefix="$acl_save_prefix"
11671
11672 if test "X$x" = "X-I$additional_includedir"; then
11673 haveit=yes
11674 break
11675 fi
11676 done
11677 if test -z "$haveit"; then
11678 if test -d "$additional_includedir"; then
11679 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11680 fi
11681 fi
11682 fi
11683 fi
11684 fi
11685 if test -n "$found_la"; then
11686 save_libdir="$libdir"
11687 case "$found_la" in
11688 */* | *\\*) . "$found_la" ;;
11689 *) . "./$found_la" ;;
11690 esac
11691 libdir="$save_libdir"
11692 for dep in $dependency_libs; do
11693 case "$dep" in
11694 -L*)
11695 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11696 if test "X$additional_libdir" != "X/usr/lib"; then
11697 haveit=
11698 if test "X$additional_libdir" = "X/usr/local/lib"; then
11699 if test -n "$GCC"; then
11700 case $host_os in
11701 linux*) haveit=yes;;
11702 esac
11703 fi
11704 fi
11705 if test -z "$haveit"; then
11706 haveit=
11707 for x in $LDFLAGS $LIBIPT; do
11708
11709 acl_save_prefix="$prefix"
11710 prefix="$acl_final_prefix"
11711 acl_save_exec_prefix="$exec_prefix"
11712 exec_prefix="$acl_final_exec_prefix"
11713 eval x=\"$x\"
11714 exec_prefix="$acl_save_exec_prefix"
11715 prefix="$acl_save_prefix"
11716
11717 if test "X$x" = "X-L$additional_libdir"; then
11718 haveit=yes
11719 break
11720 fi
11721 done
11722 if test -z "$haveit"; then
11723 if test -d "$additional_libdir"; then
11724 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11725 fi
11726 fi
11727 haveit=
11728 for x in $LDFLAGS $LTLIBIPT; do
11729
11730 acl_save_prefix="$prefix"
11731 prefix="$acl_final_prefix"
11732 acl_save_exec_prefix="$exec_prefix"
11733 exec_prefix="$acl_final_exec_prefix"
11734 eval x=\"$x\"
11735 exec_prefix="$acl_save_exec_prefix"
11736 prefix="$acl_save_prefix"
11737
11738 if test "X$x" = "X-L$additional_libdir"; then
11739 haveit=yes
11740 break
11741 fi
11742 done
11743 if test -z "$haveit"; then
11744 if test -d "$additional_libdir"; then
11745 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11746 fi
11747 fi
11748 fi
11749 fi
11750 ;;
11751 -R*)
11752 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11753 if test "$enable_rpath" != no; then
11754 haveit=
11755 for x in $rpathdirs; do
11756 if test "X$x" = "X$dir"; then
11757 haveit=yes
11758 break
11759 fi
11760 done
11761 if test -z "$haveit"; then
11762 rpathdirs="$rpathdirs $dir"
11763 fi
11764 haveit=
11765 for x in $ltrpathdirs; do
11766 if test "X$x" = "X$dir"; then
11767 haveit=yes
11768 break
11769 fi
11770 done
11771 if test -z "$haveit"; then
11772 ltrpathdirs="$ltrpathdirs $dir"
11773 fi
11774 fi
11775 ;;
11776 -l*)
11777 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11778 ;;
11779 *.la)
11780 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11781 ;;
11782 *)
11783 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11784 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11785 ;;
11786 esac
11787 done
11788 fi
11789 else
11790 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11791 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11792 fi
11793 fi
11794 fi
11795 done
11796 done
11797 if test "X$rpathdirs" != "X"; then
11798 if test -n "$hardcode_libdir_separator"; then
11799 alldirs=
11800 for found_dir in $rpathdirs; do
11801 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11802 done
11803 acl_save_libdir="$libdir"
11804 libdir="$alldirs"
11805 eval flag=\"$hardcode_libdir_flag_spec\"
11806 libdir="$acl_save_libdir"
11807 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11808 else
11809 for found_dir in $rpathdirs; do
11810 acl_save_libdir="$libdir"
11811 libdir="$found_dir"
11812 eval flag=\"$hardcode_libdir_flag_spec\"
11813 libdir="$acl_save_libdir"
11814 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11815 done
11816 fi
11817 fi
11818 if test "X$ltrpathdirs" != "X"; then
11819 for found_dir in $ltrpathdirs; do
11820 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11821 done
11822 fi
11823
11824
11825 ac_save_CPPFLAGS="$CPPFLAGS"
11826
11827 for element in $INCIPT; do
11828 haveit=
11829 for x in $CPPFLAGS; do
11830
11831 acl_save_prefix="$prefix"
11832 prefix="$acl_final_prefix"
11833 acl_save_exec_prefix="$exec_prefix"
11834 exec_prefix="$acl_final_exec_prefix"
11835 eval x=\"$x\"
11836 exec_prefix="$acl_save_exec_prefix"
11837 prefix="$acl_save_prefix"
11838
11839 if test "X$x" = "X$element"; then
11840 haveit=yes
11841 break
11842 fi
11843 done
11844 if test -z "$haveit"; then
11845 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11846 fi
11847 done
11848
11849
11850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11851$as_echo_n "checking for libipt... " >&6; }
d0ac1c44 11852if ${ac_cv_libipt+:} false; then :
58bfce93
MM
11853 $as_echo_n "(cached) " >&6
11854else
11855
11856 ac_save_LIBS="$LIBS"
11857 LIBS="$LIBS $LIBIPT"
11858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11859/* end confdefs.h. */
11860#include "intel-pt.h"
11861int
11862main ()
11863{
11864pt_insn_alloc_decoder (0);
11865 ;
11866 return 0;
11867}
11868_ACEOF
11869if ac_fn_c_try_link "$LINENO"; then :
11870 ac_cv_libipt=yes
11871else
11872 ac_cv_libipt=no
11873fi
11874rm -f core conftest.err conftest.$ac_objext \
11875 conftest$ac_exeext conftest.$ac_ext
11876 LIBS="$ac_save_LIBS"
11877
11878fi
11879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11880$as_echo "$ac_cv_libipt" >&6; }
11881 if test "$ac_cv_libipt" = yes; then
11882 HAVE_LIBIPT=yes
11883
11884$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11885
11886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11887$as_echo_n "checking how to link with libipt... " >&6; }
11888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11889$as_echo "$LIBIPT" >&6; }
11890 else
11891 HAVE_LIBIPT=no
11892 CPPFLAGS="$ac_save_CPPFLAGS"
11893 LIBIPT=
11894 LTLIBIPT=
11895 fi
11896
11897
11898
11899
11900
11901
11902 if test "$HAVE_LIBIPT" != yes; then
11903 if test "$with_intel_pt" = yes; then
d0ac1c44 11904 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
11905 else
11906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11907$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11908 fi
c56ccc05
MM
11909 else
11910 save_LIBS=$LIBS
11911 LIBS="$LIBS $LIBIPT"
11912 for ac_func in pt_insn_event
11913do :
11914 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
d0ac1c44 11915if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
11916 cat >>confdefs.h <<_ACEOF
11917#define HAVE_PT_INSN_EVENT 1
11918_ACEOF
11919
11920fi
11921done
11922
11923 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
11924"
d0ac1c44 11925if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
11926
11927cat >>confdefs.h <<_ACEOF
11928#define HAVE_STRUCT_PT_INSN_ENABLED 1
11929_ACEOF
11930
11931
11932fi
11933ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
11934"
d0ac1c44 11935if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
11936
11937cat >>confdefs.h <<_ACEOF
11938#define HAVE_STRUCT_PT_INSN_RESYNCED 1
11939_ACEOF
11940
11941
11942fi
11943
11944 LIBS=$save_LIBS
58bfce93
MM
11945 fi
11946fi
11947
81ecdfbb
RW
11948# ------------------------- #
11949# Checks for header files. #
11950# ------------------------- #
c890192f 11951
81ecdfbb
RW
11952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11953$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 11954if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 11955 $as_echo_n "(cached) " >&6
bec39cab 11956else
81ecdfbb 11957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11958/* end confdefs.h. */
81ecdfbb
RW
11959#include <stdlib.h>
11960#include <stdarg.h>
11961#include <string.h>
11962#include <float.h>
11963
a9322a30
TT
11964int
11965main ()
11966{
a9322a30
TT
11967
11968 ;
11969 return 0;
11970}
bec39cab 11971_ACEOF
81ecdfbb
RW
11972if ac_fn_c_try_compile "$LINENO"; then :
11973 ac_cv_header_stdc=yes
bec39cab 11974else
81ecdfbb 11975 ac_cv_header_stdc=no
a9322a30 11976fi
81ecdfbb 11977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11978
81ecdfbb
RW
11979if test $ac_cv_header_stdc = yes; then
11980 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11982/* end confdefs.h. */
11983#include <string.h>
bec39cab 11984
81ecdfbb
RW
11985_ACEOF
11986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11987 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11988
bec39cab 11989else
81ecdfbb
RW
11990 ac_cv_header_stdc=no
11991fi
11992rm -f conftest*
11993
11994fi
11995
11996if test $ac_cv_header_stdc = yes; then
11997 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11999/* end confdefs.h. */
12000#include <stdlib.h>
12001
bec39cab 12002_ACEOF
81ecdfbb
RW
12003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12004 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 12005
81ecdfbb
RW
12006else
12007 ac_cv_header_stdc=no
12008fi
12009rm -f conftest*
bec39cab 12010
bec39cab 12011fi
81ecdfbb
RW
12012
12013if test $ac_cv_header_stdc = yes; then
12014 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12015 if test "$cross_compiling" = yes; then :
12016 :
bec39cab 12017else
81ecdfbb 12018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12019/* end confdefs.h. */
81ecdfbb
RW
12020#include <ctype.h>
12021#include <stdlib.h>
12022#if ((' ' & 0x0FF) == 0x020)
12023# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12024# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12025#else
12026# define ISLOWER(c) \
12027 (('a' <= (c) && (c) <= 'i') \
12028 || ('j' <= (c) && (c) <= 'r') \
12029 || ('s' <= (c) && (c) <= 'z'))
12030# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12031#endif
12032
12033#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12034int
12035main ()
12036{
81ecdfbb
RW
12037 int i;
12038 for (i = 0; i < 256; i++)
12039 if (XOR (islower (i), ISLOWER (i))
12040 || toupper (i) != TOUPPER (i))
12041 return 2;
a9322a30
TT
12042 return 0;
12043}
bec39cab 12044_ACEOF
81ecdfbb
RW
12045if ac_fn_c_try_run "$LINENO"; then :
12046
bec39cab 12047else
81ecdfbb
RW
12048 ac_cv_header_stdc=no
12049fi
12050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12051 conftest.$ac_objext conftest.beam conftest.$ac_ext
12052fi
bec39cab 12053
bec39cab 12054fi
a9322a30 12055fi
81ecdfbb
RW
12056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12057$as_echo "$ac_cv_header_stdc" >&6; }
12058if test $ac_cv_header_stdc = yes; then
bec39cab 12059
81ecdfbb 12060$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12061
81ecdfbb 12062fi
bec39cab 12063
81ecdfbb 12064# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12065for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
43b7e92b 12066 thread_db.h linux/elf.h \
81ecdfbb
RW
12067 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12068 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 12069 sys/reg.h sys/debugreg.h sys/select.h \
726e1356 12070 termios.h elf_hp.h \
9467110b 12071 dlfcn.h
81ecdfbb
RW
12072do :
12073 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12074ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12075if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12076 cat >>confdefs.h <<_ACEOF
81ecdfbb 12077#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12078_ACEOF
c906108c 12079
bec39cab 12080fi
81ecdfbb
RW
12081
12082done
12083
81ecdfbb
RW
12084for ac_header in sys/user.h
12085do :
12086 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12087# include <sys/param.h>
a9322a30
TT
12088#endif
12089
81ecdfbb 12090"
d0ac1c44 12091if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
12092 cat >>confdefs.h <<_ACEOF
12093#define HAVE_SYS_USER_H 1
bec39cab 12094_ACEOF
bec39cab 12095
a9322a30 12096fi
bec39cab 12097
81ecdfbb 12098done
5ee754fc 12099
5ee754fc 12100
5007d765 12101for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12102do :
12103 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12104ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12105if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12106 cat >>confdefs.h <<_ACEOF
81ecdfbb 12107#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12108_ACEOF
5ee754fc
MK
12109
12110fi
12111
81ecdfbb 12112done
bec39cab 12113
81ecdfbb
RW
12114for ac_header in term.h
12115do :
12116 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12117# include <curses.h>
12118#endif
bec39cab 12119
81ecdfbb 12120"
d0ac1c44 12121if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12122 cat >>confdefs.h <<_ACEOF
12123#define HAVE_TERM_H 1
a8111142 12124_ACEOF
a8111142 12125
a8111142 12126fi
a8111142 12127
81ecdfbb 12128done
a8111142
TT
12129
12130
81ecdfbb
RW
12131# ------------------------- #
12132# Checks for declarations. #
12133# ------------------------- #
a9322a30 12134
07697489
PA
12135
12136 # Check for presence and size of long long.
12137 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 12138if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12139
12140cat >>confdefs.h <<_ACEOF
12141#define HAVE_LONG_LONG 1
12142_ACEOF
12143
12144# The cast to long int works around a bug in the HP C Compiler
12145# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12146# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12147# This bug is HP SR number 8606223364.
12148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12149$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 12150if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12151 $as_echo_n "(cached) " >&6
12152else
12153 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12154
12155else
12156 if test "$ac_cv_type_long_long" = yes; then
12157 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
12159as_fn_error 77 "cannot compute sizeof (long long)
12160See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12161 else
12162 ac_cv_sizeof_long_long=0
12163 fi
12164fi
12165
12166fi
12167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12168$as_echo "$ac_cv_sizeof_long_long" >&6; }
12169
12170
12171
12172cat >>confdefs.h <<_ACEOF
12173#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12174_ACEOF
12175
12176
12177fi
12178
12179
d0ac1c44
SM
12180 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12181ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12182if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12183 ac_have_decl=1
12184else
12185 ac_have_decl=0
12186fi
12187
12188cat >>confdefs.h <<_ACEOF
12189#define HAVE_DECL_BASENAME $ac_have_decl
12190_ACEOF
12191ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 12192if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12193 ac_have_decl=1
12194else
12195 ac_have_decl=0
12196fi
12197
12198cat >>confdefs.h <<_ACEOF
12199#define HAVE_DECL_FFS $ac_have_decl
12200_ACEOF
12201ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 12202if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12203 ac_have_decl=1
12204else
12205 ac_have_decl=0
12206fi
12207
12208cat >>confdefs.h <<_ACEOF
12209#define HAVE_DECL_ASPRINTF $ac_have_decl
12210_ACEOF
12211ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 12212if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12213 ac_have_decl=1
12214else
12215 ac_have_decl=0
12216fi
12217
12218cat >>confdefs.h <<_ACEOF
12219#define HAVE_DECL_VASPRINTF $ac_have_decl
12220_ACEOF
12221ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12222if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12223 ac_have_decl=1
12224else
12225 ac_have_decl=0
12226fi
12227
12228cat >>confdefs.h <<_ACEOF
12229#define HAVE_DECL_SNPRINTF $ac_have_decl
12230_ACEOF
12231ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 12232if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12233 ac_have_decl=1
12234else
12235 ac_have_decl=0
12236fi
12237
12238cat >>confdefs.h <<_ACEOF
12239#define HAVE_DECL_VSNPRINTF $ac_have_decl
12240_ACEOF
12241
12242 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 12243if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
12244 ac_have_decl=1
12245else
12246 ac_have_decl=0
12247fi
12248
12249cat >>confdefs.h <<_ACEOF
12250#define HAVE_DECL_STRTOL $ac_have_decl
12251_ACEOF
12252ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 12253if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
12254 ac_have_decl=1
12255else
12256 ac_have_decl=0
12257fi
12258
12259cat >>confdefs.h <<_ACEOF
12260#define HAVE_DECL_STRTOUL $ac_have_decl
12261_ACEOF
12262ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 12263if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
12264 ac_have_decl=1
12265else
12266 ac_have_decl=0
12267fi
12268
12269cat >>confdefs.h <<_ACEOF
12270#define HAVE_DECL_STRTOLL $ac_have_decl
12271_ACEOF
12272ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 12273if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12274 ac_have_decl=1
12275else
12276 ac_have_decl=0
12277fi
12278
12279cat >>confdefs.h <<_ACEOF
12280#define HAVE_DECL_STRTOULL $ac_have_decl
12281_ACEOF
12282
12283 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 12284if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
12285 ac_have_decl=1
12286else
12287 ac_have_decl=0
12288fi
12289
12290cat >>confdefs.h <<_ACEOF
12291#define HAVE_DECL_STRVERSCMP $ac_have_decl
12292_ACEOF
12293
12294
12295
81ecdfbb 12296ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12297if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12298 ac_have_decl=1
12299else
12300 ac_have_decl=0
5ee754fc 12301fi
81ecdfbb
RW
12302
12303cat >>confdefs.h <<_ACEOF
12304#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12305_ACEOF
5ee754fc 12306
5ee754fc 12307
81ecdfbb
RW
12308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12309$as_echo_n "checking for LC_MESSAGES... " >&6; }
d0ac1c44 12310if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12311 $as_echo_n "(cached) " >&6
bec39cab 12312else
81ecdfbb 12313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12314/* end confdefs.h. */
81ecdfbb 12315#include <locale.h>
a9322a30
TT
12316int
12317main ()
12318{
81ecdfbb 12319return LC_MESSAGES
a9322a30
TT
12320 ;
12321 return 0;
12322}
bec39cab 12323_ACEOF
81ecdfbb
RW
12324if ac_fn_c_try_link "$LINENO"; then :
12325 am_cv_val_LC_MESSAGES=yes
bec39cab 12326else
81ecdfbb
RW
12327 am_cv_val_LC_MESSAGES=no
12328fi
12329rm -f core conftest.err conftest.$ac_objext \
12330 conftest$ac_exeext conftest.$ac_ext
12331fi
12332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12333$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12334 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12335
81ecdfbb
RW
12336$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12337
12338 fi
12339
12340
12341# ----------------------- #
12342# Checks for structures. #
12343# ----------------------- #
12344
12345ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 12346if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12347
12348cat >>confdefs.h <<_ACEOF
12349#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12350_ACEOF
7eb368b3 12351
81ecdfbb 12352
7eb368b3 12353fi
81ecdfbb 12354ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 12355if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12356
a9322a30
TT
12357cat >>confdefs.h <<_ACEOF
12358#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12359_ACEOF
12360
a9322a30 12361
7eb368b3
NR
12362fi
12363
7eb368b3 12364
a9322a30
TT
12365# ------------------ #
12366# Checks for types. #
12367# ------------------ #
7eb368b3 12368
81ecdfbb 12369ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12370#include <sys/socket.h>
12371
81ecdfbb 12372"
d0ac1c44 12373if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12374
a9322a30
TT
12375cat >>confdefs.h <<_ACEOF
12376#define HAVE_SOCKLEN_T 1
12377_ACEOF
12378
12379
12380fi
12381
12382
12383# ------------------------------------- #
12384# Checks for compiler characteristics. #
12385# ------------------------------------- #
12386
81ecdfbb
RW
12387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12388$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
d0ac1c44 12389if ${ac_cv_c_const+:} false; then :
81ecdfbb 12390 $as_echo_n "(cached) " >&6
a9322a30 12391else
81ecdfbb 12392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12393/* end confdefs.h. */
a9322a30
TT
12394
12395int
12396main ()
12397{
d0ac1c44 12398
a9322a30 12399#ifndef __cplusplus
d0ac1c44 12400 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12401 typedef int charset[2];
d0ac1c44 12402 const charset cs = { 0, 0 };
a9322a30 12403 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12404 char const *const *pcpcc;
12405 char **ppc;
a9322a30
TT
12406 /* NEC SVR4.0.2 mips cc rejects this. */
12407 struct point {int x, y;};
12408 static struct point const zero = {0,0};
12409 /* AIX XL C 1.02.0.0 rejects this.
12410 It does not let you subtract one const X* pointer from another in
12411 an arm of an if-expression whose if-part is not a constant
12412 expression */
12413 const char *g = "string";
81ecdfbb 12414 pcpcc = &g + (g ? g-g : 0);
a9322a30 12415 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12416 ++pcpcc;
12417 ppc = (char**) pcpcc;
12418 pcpcc = (char const *const *) ppc;
d0ac1c44
SM
12419 { /* SCO 3.2v4 cc rejects this sort of thing. */
12420 char tx;
12421 char *t = &tx;
a9322a30
TT
12422 char const *s = 0 ? (char *) 0 : (char const *) 0;
12423
12424 *t++ = 0;
81ecdfbb 12425 if (s) return 0;
a9322a30
TT
12426 }
12427 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12428 int x[] = {25, 17};
12429 const int *foo = &x[0];
12430 ++foo;
12431 }
12432 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12433 typedef const int *iptr;
12434 iptr p = 0;
12435 ++p;
12436 }
d0ac1c44 12437 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12438 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
d0ac1c44
SM
12439 struct s { int j; const int *ap[3]; } bx;
12440 struct s *b = &bx; b->j = 5;
a9322a30
TT
12441 }
12442 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12443 const int foo = 10;
81ecdfbb 12444 if (!foo) return 0;
a9322a30 12445 }
81ecdfbb 12446 return !cs[0] && !zero.x;
a9322a30
TT
12447#endif
12448
12449 ;
12450 return 0;
12451}
bec39cab 12452_ACEOF
81ecdfbb 12453if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12454 ac_cv_c_const=yes
5ee754fc 12455else
81ecdfbb 12456 ac_cv_c_const=no
5ee754fc 12457fi
81ecdfbb 12458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12459fi
81ecdfbb
RW
12460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12461$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12462if test $ac_cv_c_const = no; then
bec39cab 12463
81ecdfbb 12464$as_echo "#define const /**/" >>confdefs.h
bec39cab 12465
5ee754fc 12466fi
bec39cab 12467
81ecdfbb
RW
12468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12469$as_echo_n "checking for inline... " >&6; }
d0ac1c44 12470if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12471 $as_echo_n "(cached) " >&6
bec39cab 12472else
a9322a30
TT
12473 ac_cv_c_inline=no
12474for ac_kw in inline __inline__ __inline; do
81ecdfbb 12475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12476/* end confdefs.h. */
a9322a30
TT
12477#ifndef __cplusplus
12478typedef int foo_t;
12479static $ac_kw foo_t static_foo () {return 0; }
12480$ac_kw foo_t foo () {return 0; }
12481#endif
12482
bec39cab 12483_ACEOF
81ecdfbb
RW
12484if ac_fn_c_try_compile "$LINENO"; then :
12485 ac_cv_c_inline=$ac_kw
bec39cab 12486fi
81ecdfbb
RW
12487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12488 test "$ac_cv_c_inline" != no && break
a9322a30 12489done
bec39cab 12490
5ee754fc 12491fi
81ecdfbb
RW
12492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12493$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12494
a9322a30
TT
12495case $ac_cv_c_inline in
12496 inline | yes) ;;
12497 *)
12498 case $ac_cv_c_inline in
12499 no) ac_val=;;
12500 *) ac_val=$ac_cv_c_inline;;
12501 esac
12502 cat >>confdefs.h <<_ACEOF
12503#ifndef __cplusplus
12504#define inline $ac_val
12505#endif
12506_ACEOF
bec39cab
AC
12507 ;;
12508esac
bec39cab 12509
81ecdfbb
RW
12510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12511$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12512if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12513 $as_echo_n "(cached) " >&6
bec39cab 12514else
81ecdfbb
RW
12515 ac_cv_c_bigendian=unknown
12516 # See if we're dealing with a universal compiler.
12517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12518/* end confdefs.h. */
12519#ifndef __APPLE_CC__
12520 not a universal capable compiler
12521 #endif
12522 typedef int dummy;
12523
12524_ACEOF
12525if ac_fn_c_try_compile "$LINENO"; then :
12526
12527 # Check for potential -arch flags. It is not universal unless
12528 # there are at least two -arch flags with different values.
12529 ac_arch=
12530 ac_prev=
12531 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12532 if test -n "$ac_prev"; then
12533 case $ac_word in
12534 i?86 | x86_64 | ppc | ppc64)
12535 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12536 ac_arch=$ac_word
12537 else
12538 ac_cv_c_bigendian=universal
12539 break
12540 fi
12541 ;;
12542 esac
12543 ac_prev=
12544 elif test "x$ac_word" = "x-arch"; then
12545 ac_prev=arch
12546 fi
12547 done
12548fi
12549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12550 if test $ac_cv_c_bigendian = unknown; then
12551 # See if sys/param.h defines the BYTE_ORDER macro.
12552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12553/* end confdefs.h. */
a9322a30 12554#include <sys/types.h>
81ecdfbb 12555 #include <sys/param.h>
a9322a30
TT
12556
12557int
12558main ()
12559{
81ecdfbb
RW
12560#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12561 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12562 && LITTLE_ENDIAN)
12563 bogus endian macros
12564 #endif
a9322a30
TT
12565
12566 ;
12567 return 0;
12568}
bec39cab 12569_ACEOF
81ecdfbb 12570if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12571 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12573/* end confdefs.h. */
a9322a30 12574#include <sys/types.h>
81ecdfbb 12575 #include <sys/param.h>
a9322a30
TT
12576
12577int
12578main ()
12579{
12580#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12581 not big endian
12582 #endif
a9322a30
TT
12583
12584 ;
12585 return 0;
12586}
bec39cab 12587_ACEOF
81ecdfbb 12588if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12589 ac_cv_c_bigendian=yes
5ee754fc 12590else
81ecdfbb 12591 ac_cv_c_bigendian=no
5ee754fc 12592fi
81ecdfbb
RW
12593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12594fi
12595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12596 fi
12597 if test $ac_cv_c_bigendian = unknown; then
12598 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12600/* end confdefs.h. */
12601#include <limits.h>
bec39cab 12602
81ecdfbb
RW
12603int
12604main ()
12605{
12606#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12607 bogus endian macros
12608 #endif
12609
12610 ;
12611 return 0;
12612}
7eb368b3 12613_ACEOF
81ecdfbb
RW
12614if ac_fn_c_try_compile "$LINENO"; then :
12615 # It does; now see whether it defined to _BIG_ENDIAN or not.
12616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12617/* end confdefs.h. */
81ecdfbb
RW
12618#include <limits.h>
12619
7eb368b3
NR
12620int
12621main ()
12622{
81ecdfbb
RW
12623#ifndef _BIG_ENDIAN
12624 not big endian
12625 #endif
12626
7eb368b3
NR
12627 ;
12628 return 0;
12629}
12630_ACEOF
81ecdfbb 12631if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12632 ac_cv_c_bigendian=yes
81ecdfbb
RW
12633else
12634 ac_cv_c_bigendian=no
a9322a30 12635fi
81ecdfbb 12636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12637fi
81ecdfbb
RW
12638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12639 fi
12640 if test $ac_cv_c_bigendian = unknown; then
12641 # Compile a test program.
12642 if test "$cross_compiling" = yes; then :
12643 # Try to guess by grepping values from an object file.
12644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12645/* end confdefs.h. */
12646short int ascii_mm[] =
12647 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12648 short int ascii_ii[] =
12649 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12650 int use_ascii (int i) {
12651 return ascii_mm[i] + ascii_ii[i];
12652 }
12653 short int ebcdic_ii[] =
12654 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12655 short int ebcdic_mm[] =
12656 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12657 int use_ebcdic (int i) {
12658 return ebcdic_mm[i] + ebcdic_ii[i];
12659 }
12660 extern int foo;
7eb368b3 12661
81ecdfbb
RW
12662int
12663main ()
12664{
12665return use_ascii (foo) == use_ebcdic (foo);
12666 ;
12667 return 0;
12668}
12669_ACEOF
12670if ac_fn_c_try_compile "$LINENO"; then :
12671 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12672 ac_cv_c_bigendian=yes
12673 fi
12674 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12675 if test "$ac_cv_c_bigendian" = unknown; then
12676 ac_cv_c_bigendian=no
12677 else
12678 # finding both strings is unlikely to happen, but who knows?
12679 ac_cv_c_bigendian=unknown
12680 fi
12681 fi
7eb368b3 12682fi
81ecdfbb 12683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12684else
81ecdfbb 12685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12686/* end confdefs.h. */
81ecdfbb 12687$ac_includes_default
d3ea6809
MM
12688int
12689main ()
12690{
81ecdfbb
RW
12691
12692 /* Are we little or big endian? From Harbison&Steele. */
12693 union
12694 {
12695 long int l;
12696 char c[sizeof (long int)];
12697 } u;
12698 u.l = 1;
12699 return u.c[sizeof (long int) - 1] == 1;
12700
12701 ;
12702 return 0;
d3ea6809
MM
12703}
12704_ACEOF
81ecdfbb 12705if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12706 ac_cv_c_bigendian=no
d3ea6809 12707else
81ecdfbb 12708 ac_cv_c_bigendian=yes
d3ea6809 12709fi
81ecdfbb
RW
12710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12711 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12712fi
a9322a30 12713
81ecdfbb
RW
12714 fi
12715fi
12716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12717$as_echo "$ac_cv_c_bigendian" >&6; }
12718 case $ac_cv_c_bigendian in #(
12719 yes)
12720 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12721;; #(
12722 no)
12723 ;; #(
12724 universal)
12725
12726$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12727
12728 ;; #(
12729 *)
d0ac1c44 12730 as_fn_error $? "unknown endianness
81ecdfbb
RW
12731 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12732 esac
d3ea6809
MM
12733
12734
a9322a30
TT
12735# ------------------------------ #
12736# Checks for library functions. #
12737# ------------------------------ #
d3ea6809 12738
d0ac1c44
SM
12739
12740
12741
12742 for ac_header in $ac_header_list
81ecdfbb
RW
12743do :
12744 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
d0ac1c44
SM
12745ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12746"
12747if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12748 cat >>confdefs.h <<_ACEOF
81ecdfbb 12749#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12750_ACEOF
b757528f 12751
b757528f 12752fi
bec39cab 12753
a9322a30 12754done
a3828db0 12755
d0ac1c44
SM
12756
12757
12758
12759
12760
12761
12762
a9322a30 12763for ac_func in getpagesize
81ecdfbb
RW
12764do :
12765 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12766if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12767 cat >>confdefs.h <<_ACEOF
81ecdfbb 12768#define HAVE_GETPAGESIZE 1
bec39cab 12769_ACEOF
bcb3dc3d 12770
bcb3dc3d
MK
12771fi
12772done
12773
81ecdfbb
RW
12774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12775$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12776if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12777 $as_echo_n "(cached) " >&6
a9322a30 12778else
81ecdfbb 12779 if test "$cross_compiling" = yes; then :
a9322a30 12780 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12781else
81ecdfbb 12782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12783/* end confdefs.h. */
a9322a30
TT
12784$ac_includes_default
12785/* malloc might have been renamed as rpl_malloc. */
12786#undef malloc
bec39cab 12787
a9322a30
TT
12788/* Thanks to Mike Haertel and Jim Avera for this test.
12789 Here is a matrix of mmap possibilities:
12790 mmap private not fixed
12791 mmap private fixed at somewhere currently unmapped
12792 mmap private fixed at somewhere already mapped
12793 mmap shared not fixed
12794 mmap shared fixed at somewhere currently unmapped
12795 mmap shared fixed at somewhere already mapped
12796 For private mappings, we should verify that changes cannot be read()
12797 back from the file, nor mmap's back from the file at a different
12798 address. (There have been systems where private was not correctly
12799 implemented like the infamous i386 svr4.0, and systems where the
12800 VM page cache was not coherent with the file system buffer cache
12801 like early versions of FreeBSD and possibly contemporary NetBSD.)
12802 For shared mappings, we should conversely verify that changes get
12803 propagated back to all the places they're supposed to be.
bec39cab 12804
a9322a30
TT
12805 Grep wants private fixed already mapped.
12806 The main things grep needs to know about mmap are:
12807 * does it exist and is it safe to write into the mmap'd area
12808 * how to use it (BSD variants) */
8b9cf735 12809
a9322a30
TT
12810#include <fcntl.h>
12811#include <sys/mman.h>
8b9cf735 12812
81ecdfbb 12813#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12814char *malloc ();
a3828db0
MK
12815#endif
12816
a9322a30 12817/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12818#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12819# ifdef _SC_PAGESIZE
12820# define getpagesize() sysconf(_SC_PAGESIZE)
12821# else /* no _SC_PAGESIZE */
81ecdfbb 12822# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12823# include <sys/param.h>
12824# ifdef EXEC_PAGESIZE
12825# define getpagesize() EXEC_PAGESIZE
12826# else /* no EXEC_PAGESIZE */
12827# ifdef NBPG
12828# define getpagesize() NBPG * CLSIZE
12829# ifndef CLSIZE
12830# define CLSIZE 1
12831# endif /* no CLSIZE */
12832# else /* no NBPG */
12833# ifdef NBPC
12834# define getpagesize() NBPC
12835# else /* no NBPC */
12836# ifdef PAGESIZE
12837# define getpagesize() PAGESIZE
12838# endif /* PAGESIZE */
12839# endif /* no NBPC */
12840# endif /* no NBPG */
12841# endif /* no EXEC_PAGESIZE */
12842# else /* no HAVE_SYS_PARAM_H */
12843# define getpagesize() 8192 /* punt totally */
12844# endif /* no HAVE_SYS_PARAM_H */
12845# endif /* no _SC_PAGESIZE */
12846
12847#endif /* no HAVE_GETPAGESIZE */
12848
bec39cab
AC
12849int
12850main ()
12851{
a9322a30 12852 char *data, *data2, *data3;
d0ac1c44 12853 const char *cdata2;
a9322a30 12854 int i, pagesize;
d0ac1c44 12855 int fd, fd2;
a9322a30
TT
12856
12857 pagesize = getpagesize ();
12858
12859 /* First, make a file with some known garbage in it. */
12860 data = (char *) malloc (pagesize);
12861 if (!data)
81ecdfbb 12862 return 1;
a9322a30
TT
12863 for (i = 0; i < pagesize; ++i)
12864 *(data + i) = rand ();
12865 umask (0);
12866 fd = creat ("conftest.mmap", 0600);
12867 if (fd < 0)
d0ac1c44 12868 return 2;
a9322a30 12869 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 12870 return 3;
a9322a30
TT
12871 close (fd);
12872
d0ac1c44
SM
12873 /* Next, check that the tail of a page is zero-filled. File must have
12874 non-zero length, otherwise we risk SIGBUS for entire page. */
12875 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12876 if (fd2 < 0)
12877 return 4;
12878 cdata2 = "";
12879 if (write (fd2, cdata2, 1) != 1)
12880 return 5;
12881 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12882 if (data2 == MAP_FAILED)
12883 return 6;
12884 for (i = 0; i < pagesize; ++i)
12885 if (*(data2 + i))
12886 return 7;
12887 close (fd2);
12888 if (munmap (data2, pagesize))
12889 return 8;
12890
a9322a30
TT
12891 /* Next, try to mmap the file at a fixed address which already has
12892 something else allocated at it. If we can, also make sure that
12893 we see the same garbage. */
12894 fd = open ("conftest.mmap", O_RDWR);
12895 if (fd < 0)
d0ac1c44 12896 return 9;
a9322a30
TT
12897 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12898 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 12899 return 10;
a9322a30
TT
12900 for (i = 0; i < pagesize; ++i)
12901 if (*(data + i) != *(data2 + i))
d0ac1c44 12902 return 11;
a9322a30
TT
12903
12904 /* Finally, make sure that changes to the mapped area do not
12905 percolate back to the file as seen by read(). (This is a bug on
12906 some variants of i386 svr4.0.) */
12907 for (i = 0; i < pagesize; ++i)
12908 *(data2 + i) = *(data2 + i) + 1;
12909 data3 = (char *) malloc (pagesize);
12910 if (!data3)
d0ac1c44 12911 return 12;
a9322a30 12912 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 12913 return 13;
a9322a30
TT
12914 for (i = 0; i < pagesize; ++i)
12915 if (*(data + i) != *(data3 + i))
d0ac1c44 12916 return 14;
a9322a30 12917 close (fd);
81ecdfbb 12918 return 0;
bec39cab
AC
12919}
12920_ACEOF
81ecdfbb 12921if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12922 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12923else
81ecdfbb 12924 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12925fi
81ecdfbb
RW
12926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12927 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12928fi
81ecdfbb 12929
a9322a30 12930fi
81ecdfbb
RW
12931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12932$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12933if test $ac_cv_func_mmap_fixed_mapped = yes; then
12934
81ecdfbb 12935$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12936
086ec9eb 12937fi
d0ac1c44 12938rm -f conftest.mmap conftest.txt
a3828db0 12939
81ecdfbb 12940ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 12941if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 12942
a9322a30
TT
12943else
12944
12945cat >>confdefs.h <<_ACEOF
12946#define pid_t int
bec39cab 12947_ACEOF
086ec9eb
MK
12948
12949fi
12950
81ecdfbb
RW
12951for ac_header in vfork.h
12952do :
12953 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 12954if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 12955 cat >>confdefs.h <<_ACEOF
81ecdfbb 12956#define HAVE_VFORK_H 1
bec39cab 12957_ACEOF
c906108c
SS
12958
12959fi
a9322a30 12960
a3828db0 12961done
c906108c 12962
a9322a30 12963for ac_func in fork vfork
81ecdfbb
RW
12964do :
12965 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12966ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 12967if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 12968 cat >>confdefs.h <<_ACEOF
81ecdfbb 12969#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12970_ACEOF
b83266a0 12971
97bf5e38 12972fi
a3828db0 12973done
b83266a0 12974
a9322a30 12975if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12977$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 12978if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 12979 $as_echo_n "(cached) " >&6
a9322a30 12980else
81ecdfbb 12981 if test "$cross_compiling" = yes; then :
a9322a30
TT
12982 ac_cv_func_fork_works=cross
12983else
81ecdfbb
RW
12984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12985/* end confdefs.h. */
12986$ac_includes_default
12987int
12988main ()
12989{
12990
12991 /* By Ruediger Kuhlmann. */
12992 return fork () < 0;
12993
12994 ;
12995 return 0;
12996}
a9322a30 12997_ACEOF
81ecdfbb 12998if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12999 ac_cv_func_fork_works=yes
13000else
81ecdfbb 13001 ac_cv_func_fork_works=no
a9322a30 13002fi
81ecdfbb
RW
13003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13004 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13005fi
81ecdfbb 13006
a9322a30 13007fi
81ecdfbb
RW
13008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13009$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13010
13011else
13012 ac_cv_func_fork_works=$ac_cv_func_fork
13013fi
13014if test "x$ac_cv_func_fork_works" = xcross; then
13015 case $host in
13016 *-*-amigaos* | *-*-msdosdjgpp*)
13017 # Override, as these systems have only a dummy fork() stub
13018 ac_cv_func_fork_works=no
13019 ;;
13020 *)
13021 ac_cv_func_fork_works=yes
13022 ;;
13023 esac
81ecdfbb
RW
13024 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13025$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13026fi
13027ac_cv_func_vfork_works=$ac_cv_func_vfork
13028if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13030$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13031if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13032 $as_echo_n "(cached) " >&6
a9322a30 13033else
81ecdfbb 13034 if test "$cross_compiling" = yes; then :
a9322a30
TT
13035 ac_cv_func_vfork_works=cross
13036else
81ecdfbb 13037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13038/* end confdefs.h. */
13039/* Thanks to Paul Eggert for this test. */
81ecdfbb 13040$ac_includes_default
a9322a30 13041#include <sys/wait.h>
81ecdfbb 13042#ifdef HAVE_VFORK_H
a9322a30
TT
13043# include <vfork.h>
13044#endif
13045/* On some sparc systems, changes by the child to local and incoming
13046 argument registers are propagated back to the parent. The compiler
13047 is told about this with #include <vfork.h>, but some compilers
13048 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13049 static variable whose address is put into a register that is
13050 clobbered by the vfork. */
13051static void
13052#ifdef __cplusplus
13053sparc_address_test (int arg)
13054# else
13055sparc_address_test (arg) int arg;
13056#endif
13057{
13058 static pid_t child;
13059 if (!child) {
13060 child = vfork ();
13061 if (child < 0) {
13062 perror ("vfork");
13063 _exit(2);
13064 }
13065 if (!child) {
13066 arg = getpid();
13067 write(-1, "", 0);
13068 _exit (arg);
13069 }
13070 }
13071}
13072
13073int
13074main ()
13075{
13076 pid_t parent = getpid ();
13077 pid_t child;
13078
13079 sparc_address_test (0);
13080
13081 child = vfork ();
13082
13083 if (child == 0) {
13084 /* Here is another test for sparc vfork register problems. This
13085 test uses lots of local variables, at least as many local
13086 variables as main has allocated so far including compiler
13087 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13088 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13089 reuse the register of parent for one of the local variables,
13090 since it will think that parent can't possibly be used any more
13091 in this routine. Assigning to the local variable will thus
13092 munge parent in the parent process. */
13093 pid_t
13094 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13095 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13096 /* Convince the compiler that p..p7 are live; otherwise, it might
13097 use the same hardware register for all 8 local variables. */
13098 if (p != p1 || p != p2 || p != p3 || p != p4
13099 || p != p5 || p != p6 || p != p7)
13100 _exit(1);
13101
13102 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13103 from child file descriptors. If the child closes a descriptor
13104 before it execs or exits, this munges the parent's descriptor
13105 as well. Test for this by closing stdout in the child. */
13106 _exit(close(fileno(stdout)) != 0);
13107 } else {
13108 int status;
13109 struct stat st;
13110
13111 while (wait(&status) != child)
13112 ;
81ecdfbb 13113 return (
a9322a30
TT
13114 /* Was there some problem with vforking? */
13115 child < 0
13116
13117 /* Did the child fail? (This shouldn't happen.) */
13118 || status
13119
13120 /* Did the vfork/compiler bug occur? */
13121 || parent != getpid()
13122
13123 /* Did the file descriptor bug occur? */
13124 || fstat(fileno(stdout), &st) != 0
13125 );
13126 }
13127}
13128_ACEOF
81ecdfbb 13129if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13130 ac_cv_func_vfork_works=yes
13131else
81ecdfbb 13132 ac_cv_func_vfork_works=no
a9322a30 13133fi
81ecdfbb
RW
13134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13135 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13136fi
81ecdfbb 13137
a9322a30 13138fi
81ecdfbb
RW
13139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13140$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13141
13142fi;
13143if test "x$ac_cv_func_fork_works" = xcross; then
13144 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13145 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13146$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13147fi
13148
13149if test "x$ac_cv_func_vfork_works" = xyes; then
13150
81ecdfbb 13151$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13152
13153else
13154
81ecdfbb 13155$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13156
13157fi
13158if test "x$ac_cv_func_fork_works" = xyes; then
13159
81ecdfbb 13160$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13161
13162fi
13163
cdf43629 13164for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13165 pipe poll pread pread64 pwrite resize_term \
e671cd59 13166 sbrk getpgid setpgid setpgrp setsid \
9467110b 13167 sigaction sigprocmask sigsetmask socketpair \
110ed339 13168 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13169 setrlimit getrlimit posix_madvise waitpid \
1d1d0bf7 13170 ptrace64 sigaltstack setns use_default_colors
81ecdfbb
RW
13171do :
13172 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13173ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13174if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13175 cat >>confdefs.h <<_ACEOF
81ecdfbb 13176#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13177_ACEOF
13178
13179fi
13180done
13181
13182
81ecdfbb
RW
13183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13184$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13185if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13186 $as_echo_n "(cached) " >&6
6c7a06a3 13187else
81ecdfbb 13188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13189/* end confdefs.h. */
13190#include <langinfo.h>
13191int
13192main ()
13193{
13194char* cs = nl_langinfo(CODESET);
bec39cab
AC
13195 ;
13196 return 0;
13197}
13198_ACEOF
81ecdfbb 13199if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13200 am_cv_langinfo_codeset=yes
a4db0f07 13201else
81ecdfbb 13202 am_cv_langinfo_codeset=no
a4db0f07 13203fi
81ecdfbb
RW
13204rm -f core conftest.err conftest.$ac_objext \
13205 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13206
a4db0f07 13207fi
81ecdfbb
RW
13208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13209$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13210 if test $am_cv_langinfo_codeset = yes; then
13211
81ecdfbb 13212$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13213
6c7a06a3 13214 fi
c906108c 13215
d0ac1c44
SM
13216ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13217if test "x$ac_cv_type_size_t" = xyes; then :
13218
13219else
13220
13221cat >>confdefs.h <<_ACEOF
13222#define size_t unsigned int
13223_ACEOF
13224
13225fi
13226
06825bd1 13227
3266f10b
TT
13228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13229$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 13230if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13231 $as_echo_n "(cached) " >&6
13232else
13233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13234/* end confdefs.h. */
13235#include <stdlib.h>
13236#include <stdarg.h>
13237#include <string.h>
13238#include <float.h>
13239
13240int
13241main ()
13242{
13243
13244 ;
13245 return 0;
13246}
13247_ACEOF
13248if ac_fn_c_try_compile "$LINENO"; then :
13249 ac_cv_header_stdc=yes
13250else
13251 ac_cv_header_stdc=no
13252fi
13253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13254
13255if test $ac_cv_header_stdc = yes; then
13256 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13258/* end confdefs.h. */
13259#include <string.h>
13260
13261_ACEOF
13262if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13263 $EGREP "memchr" >/dev/null 2>&1; then :
13264
13265else
13266 ac_cv_header_stdc=no
13267fi
13268rm -f conftest*
13269
13270fi
13271
13272if test $ac_cv_header_stdc = yes; then
13273 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13275/* end confdefs.h. */
13276#include <stdlib.h>
13277
13278_ACEOF
13279if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13280 $EGREP "free" >/dev/null 2>&1; then :
13281
13282else
13283 ac_cv_header_stdc=no
13284fi
13285rm -f conftest*
13286
13287fi
13288
13289if test $ac_cv_header_stdc = yes; then
13290 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13291 if test "$cross_compiling" = yes; then :
13292 :
13293else
13294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13295/* end confdefs.h. */
13296#include <ctype.h>
13297#include <stdlib.h>
13298#if ((' ' & 0x0FF) == 0x020)
13299# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13300# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13301#else
13302# define ISLOWER(c) \
13303 (('a' <= (c) && (c) <= 'i') \
13304 || ('j' <= (c) && (c) <= 'r') \
13305 || ('s' <= (c) && (c) <= 'z'))
13306# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13307#endif
13308
13309#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13310int
13311main ()
13312{
13313 int i;
13314 for (i = 0; i < 256; i++)
13315 if (XOR (islower (i), ISLOWER (i))
13316 || toupper (i) != TOUPPER (i))
13317 return 2;
13318 return 0;
13319}
13320_ACEOF
13321if ac_fn_c_try_run "$LINENO"; then :
13322
13323else
13324 ac_cv_header_stdc=no
13325fi
13326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13327 conftest.$ac_objext conftest.beam conftest.$ac_ext
13328fi
13329
13330fi
13331fi
13332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13333$as_echo "$ac_cv_header_stdc" >&6; }
13334if test $ac_cv_header_stdc = yes; then
13335
13336$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13337
3266f10b
TT
13338fi
13339
13340 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13341# for constant arguments. Useless!
13342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13343$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 13344if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13345 $as_echo_n "(cached) " >&6
13346else
13347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13348/* end confdefs.h. */
13349#include <alloca.h>
13350int
13351main ()
13352{
13353char *p = (char *) alloca (2 * sizeof (int));
13354 if (p) return 0;
13355 ;
13356 return 0;
13357}
13358_ACEOF
13359if ac_fn_c_try_link "$LINENO"; then :
13360 ac_cv_working_alloca_h=yes
13361else
13362 ac_cv_working_alloca_h=no
13363fi
13364rm -f core conftest.err conftest.$ac_objext \
13365 conftest$ac_exeext conftest.$ac_ext
13366fi
13367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13368$as_echo "$ac_cv_working_alloca_h" >&6; }
13369if test $ac_cv_working_alloca_h = yes; then
13370
13371$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13372
13373fi
13374
13375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13376$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 13377if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13378 $as_echo_n "(cached) " >&6
13379else
13380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13381/* end confdefs.h. */
13382#ifdef __GNUC__
13383# define alloca __builtin_alloca
13384#else
13385# ifdef _MSC_VER
13386# include <malloc.h>
13387# define alloca _alloca
13388# else
13389# ifdef HAVE_ALLOCA_H
13390# include <alloca.h>
13391# else
13392# ifdef _AIX
13393 #pragma alloca
13394# else
13395# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 13396void *alloca (size_t);
3266f10b
TT
13397# endif
13398# endif
13399# endif
13400# endif
13401#endif
13402
13403int
13404main ()
13405{
13406char *p = (char *) alloca (1);
13407 if (p) return 0;
13408 ;
13409 return 0;
13410}
13411_ACEOF
13412if ac_fn_c_try_link "$LINENO"; then :
13413 ac_cv_func_alloca_works=yes
13414else
13415 ac_cv_func_alloca_works=no
13416fi
13417rm -f core conftest.err conftest.$ac_objext \
13418 conftest$ac_exeext conftest.$ac_ext
13419fi
13420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13421$as_echo "$ac_cv_func_alloca_works" >&6; }
13422
13423if test $ac_cv_func_alloca_works = yes; then
13424
13425$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13426
13427else
13428 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13429# that cause trouble. Some versions do not even contain alloca or
13430# contain a buggy version. If you still want to use their alloca,
13431# use ar to extract alloca.o from them instead of compiling alloca.c.
13432
13433ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13434
13435$as_echo "#define C_ALLOCA 1" >>confdefs.h
13436
13437
13438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13439$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 13440if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13441 $as_echo_n "(cached) " >&6
13442else
13443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13444/* end confdefs.h. */
13445#if defined CRAY && ! defined CRAY2
13446webecray
13447#else
13448wenotbecray
13449#endif
13450
13451_ACEOF
13452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13453 $EGREP "webecray" >/dev/null 2>&1; then :
13454 ac_cv_os_cray=yes
13455else
13456 ac_cv_os_cray=no
13457fi
13458rm -f conftest*
13459
13460fi
13461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13462$as_echo "$ac_cv_os_cray" >&6; }
13463if test $ac_cv_os_cray = yes; then
13464 for ac_func in _getb67 GETB67 getb67; do
13465 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13466ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13467if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13468
13469cat >>confdefs.h <<_ACEOF
13470#define CRAY_STACKSEG_END $ac_func
13471_ACEOF
13472
13473 break
13474fi
13475
13476 done
13477fi
13478
13479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13480$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 13481if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13482 $as_echo_n "(cached) " >&6
13483else
13484 if test "$cross_compiling" = yes; then :
13485 ac_cv_c_stack_direction=0
13486else
13487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13488/* end confdefs.h. */
13489$ac_includes_default
13490int
d0ac1c44 13491find_stack_direction (int *addr, int depth)
3266f10b 13492{
d0ac1c44
SM
13493 int dir, dummy = 0;
13494 if (! addr)
13495 addr = &dummy;
13496 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13497 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13498 return dir + dummy;
3266f10b
TT
13499}
13500
13501int
d0ac1c44 13502main (int argc, char **argv)
3266f10b 13503{
d0ac1c44 13504 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13505}
13506_ACEOF
13507if ac_fn_c_try_run "$LINENO"; then :
13508 ac_cv_c_stack_direction=1
13509else
13510 ac_cv_c_stack_direction=-1
13511fi
13512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13513 conftest.$ac_objext conftest.beam conftest.$ac_ext
13514fi
13515
13516fi
13517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13518$as_echo "$ac_cv_c_stack_direction" >&6; }
13519cat >>confdefs.h <<_ACEOF
13520#define STACK_DIRECTION $ac_cv_c_stack_direction
13521_ACEOF
13522
13523
13524fi
13525
13526
13527
13528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13529$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13530if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13531 $as_echo_n "(cached) " >&6
13532else
13533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13534/* end confdefs.h. */
13535#include <langinfo.h>
13536int
13537main ()
13538{
13539char* cs = nl_langinfo(CODESET);
13540 ;
13541 return 0;
13542}
13543_ACEOF
13544if ac_fn_c_try_link "$LINENO"; then :
13545 am_cv_langinfo_codeset=yes
13546else
13547 am_cv_langinfo_codeset=no
13548fi
13549rm -f core conftest.err conftest.$ac_objext \
13550 conftest$ac_exeext conftest.$ac_ext
13551
13552fi
13553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13554$as_echo "$am_cv_langinfo_codeset" >&6; }
13555 if test $am_cv_langinfo_codeset = yes; then
13556
13557$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13558
13559 fi
13560
13561
44122162 13562 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h
3266f10b
TT
13563do :
13564 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13565ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13566if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13567 cat >>confdefs.h <<_ACEOF
13568#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13569_ACEOF
13570
13571fi
13572
13573done
13574
13575
f348d89a 13576 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13577do :
13578 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13579ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13580if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13581 cat >>confdefs.h <<_ACEOF
13582#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13583_ACEOF
13584
13585fi
13586done
13587
13588
13589 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
d0ac1c44 13590if test "x$ac_cv_have_decl_strerror" = xyes; then :
3266f10b
TT
13591 ac_have_decl=1
13592else
13593 ac_have_decl=0
13594fi
13595
13596cat >>confdefs.h <<_ACEOF
13597#define HAVE_DECL_STRERROR $ac_have_decl
13598_ACEOF
13599ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 13600if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13601 ac_have_decl=1
13602else
13603 ac_have_decl=0
13604fi
13605
13606cat >>confdefs.h <<_ACEOF
13607#define HAVE_DECL_STRSTR $ac_have_decl
13608_ACEOF
13609
13610
e9bcb658
GB
13611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13612$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 13613if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
13614 $as_echo_n "(cached) " >&6
13615else
13616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13617/* end confdefs.h. */
13618
13619#include <setjmp.h>
13620
13621int
13622main ()
13623{
13624sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13625 ;
13626 return 0;
13627}
13628_ACEOF
13629if ac_fn_c_try_compile "$LINENO"; then :
13630 gdb_cv_func_sigsetjmp=yes
13631else
13632 gdb_cv_func_sigsetjmp=no
13633fi
13634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13635fi
13636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13637$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13638if test $gdb_cv_func_sigsetjmp = yes; then
13639
13640$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13641
13642fi
13643
3266f10b 13644
54019719
PA
13645# Check the return and argument types of ptrace.
13646
13647
54019719
PA
13648for ac_header in sys/ptrace.h ptrace.h
13649do :
13650 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13651ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13652if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
13653 cat >>confdefs.h <<_ACEOF
13654#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13655_ACEOF
13656
13657fi
13658
13659done
13660
13661
a3828db0 13662gdb_ptrace_headers='
4ff70b84 13663#include <sys/types.h>
a3828db0
MK
13664#if HAVE_SYS_PTRACE_H
13665# include <sys/ptrace.h>
13666#endif
13667#if HAVE_UNISTD_H
13668# include <unistd.h>
13669#endif
13670'
13671# There is no point in checking if we don't have a prototype.
9b30624b 13672ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 13673"
d0ac1c44 13674if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 13675 ac_have_decl=1
06825bd1 13676else
81ecdfbb 13677 ac_have_decl=0
06825bd1 13678fi
06825bd1 13679
a3828db0 13680cat >>confdefs.h <<_ACEOF
81ecdfbb 13681#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13682_ACEOF
81ecdfbb 13683if test $ac_have_decl = 1; then :
bec39cab 13684
a3828db0 13685else
a3828db0
MK
13686
13687 : ${gdb_cv_func_ptrace_ret='int'}
13688 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13689
06825bd1
MK
13690fi
13691
064ef605
DJ
13692# Check return type. Varargs (used on GNU/Linux) conflict with the
13693# empty argument list, so check for that explicitly.
81ecdfbb
RW
13694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13695$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 13696if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 13697 $as_echo_n "(cached) " >&6
bec39cab 13698else
81ecdfbb 13699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13700/* end confdefs.h. */
a3828db0 13701$gdb_ptrace_headers
bec39cab
AC
13702int
13703main ()
13704{
064ef605
DJ
13705extern long ptrace (enum __ptrace_request, ...);
13706 ;
13707 return 0;
13708}
13709_ACEOF
9b30624b 13710if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13711 gdb_cv_func_ptrace_ret='long'
13712else
81ecdfbb 13713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13714/* end confdefs.h. */
13715$gdb_ptrace_headers
13716int
13717main ()
13718{
a3828db0 13719extern int ptrace ();
bec39cab
AC
13720 ;
13721 return 0;
13722}
13723_ACEOF
9b30624b 13724if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13725 gdb_cv_func_ptrace_ret='int'
70f9f479 13726else
81ecdfbb 13727 gdb_cv_func_ptrace_ret='long'
70f9f479 13728fi
81ecdfbb 13729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13730fi
81ecdfbb 13731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13732fi
81ecdfbb
RW
13733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13734$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13735
a3828db0
MK
13736cat >>confdefs.h <<_ACEOF
13737#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13738_ACEOF
70f9f479 13739
a3828db0 13740# Check argument types.
81ecdfbb
RW
13741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13742$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 13743if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 13744 $as_echo_n "(cached) " >&6
bec39cab 13745else
a3828db0 13746
81ecdfbb 13747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13748/* end confdefs.h. */
13749$gdb_ptrace_headers
13750int
13751main ()
13752{
13753extern long ptrace (enum __ptrace_request, ...);
13754 ;
13755 return 0;
13756}
13757_ACEOF
9b30624b 13758if ac_fn_c_try_compile "$LINENO"; then :
54019719 13759 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13760else
064ef605 13761
a3828db0
MK
13762for gdb_arg1 in 'int' 'long'; do
13763 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13764 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13765 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13767/* end confdefs.h. */
a3828db0 13768$gdb_ptrace_headers
bec39cab
AC
13769int
13770main ()
13771{
a3828db0
MK
13772
13773extern $gdb_cv_func_ptrace_ret
13774 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13775
bec39cab
AC
13776 ;
13777 return 0;
13778}
13779_ACEOF
9b30624b 13780if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13781 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13782 break 4;
5c7f2947 13783fi
81ecdfbb 13784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13785 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13787/* end confdefs.h. */
a3828db0 13788$gdb_ptrace_headers
bec39cab
AC
13789int
13790main ()
13791{
a3828db0
MK
13792
13793extern $gdb_cv_func_ptrace_ret
13794 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13795
bec39cab
AC
13796 ;
13797 return 0;
13798}
13799_ACEOF
9b30624b 13800if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13801
13802gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13803 break 5;
78434e59 13804fi
81ecdfbb 13805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13806 done
13807 done
13808 done
13809 done
13810done
13811# Provide a safe default value.
13812: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13813
064ef605 13814fi
81ecdfbb 13815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13816fi
81ecdfbb
RW
13817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13818$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13819ac_save_IFS=$IFS; IFS=','
13820set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13821IFS=$ac_save_IFS
13822shift
bec39cab 13823
54019719
PA
13824cat >>confdefs.h <<_ACEOF
13825#define PTRACE_TYPE_ARG1 $1
13826_ACEOF
13827
13828
a3828db0
MK
13829cat >>confdefs.h <<_ACEOF
13830#define PTRACE_TYPE_ARG3 $3
13831_ACEOF
13832
96d7229d
LM
13833
13834cat >>confdefs.h <<_ACEOF
13835#define PTRACE_TYPE_ARG4 $4
13836_ACEOF
13837
a3828db0
MK
13838if test -n "$5"; then
13839
13840cat >>confdefs.h <<_ACEOF
13841#define PTRACE_TYPE_ARG5 $5
bec39cab 13842_ACEOF
78434e59
MK
13843
13844fi
13845
54019719 13846
a3828db0 13847if test "$cross_compiling" = no; then
81ecdfbb
RW
13848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13849$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13850if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13851 $as_echo_n "(cached) " >&6
a3828db0 13852else
81ecdfbb 13853 if test "$cross_compiling" = yes; then :
d0ac1c44 13854 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13855else
81ecdfbb 13856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13857/* end confdefs.h. */
81ecdfbb 13858$ac_includes_default
bec39cab
AC
13859int
13860main ()
13861{
a3828db0
MK
13862/* If this system has a BSD-style setpgrp which takes arguments,
13863 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13864 exit successfully. */
81ecdfbb 13865 return setpgrp (1,1) != -1;
bec39cab
AC
13866 ;
13867 return 0;
13868}
13869_ACEOF
81ecdfbb 13870if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13871 ac_cv_func_setpgrp_void=no
c906108c 13872else
81ecdfbb 13873 ac_cv_func_setpgrp_void=yes
c906108c 13874fi
81ecdfbb
RW
13875rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13876 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13877fi
81ecdfbb 13878
a3828db0 13879fi
81ecdfbb
RW
13880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13881$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13882if test $ac_cv_func_setpgrp_void = yes; then
13883
81ecdfbb 13884$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13885
13886fi
a3828db0
MK
13887
13888else
81ecdfbb
RW
13889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13890$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13891if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13892 $as_echo_n "(cached) " >&6
97bf5e38 13893else
81ecdfbb 13894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13895/* end confdefs.h. */
a3828db0
MK
13896
13897#include <unistd.h>
13898
bec39cab
AC
13899int
13900main ()
13901{
a3828db0
MK
13902
13903 if (setpgrp(1,1) == -1)
13904 exit (0);
13905 else
13906 exit (1);
13907
bec39cab
AC
13908 ;
13909 return 0;
13910}
13911_ACEOF
81ecdfbb 13912if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13913 ac_cv_func_setpgrp_void=no
c906108c 13914else
81ecdfbb 13915 ac_cv_func_setpgrp_void=yes
c906108c 13916fi
81ecdfbb 13917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13918fi
81ecdfbb
RW
13919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13920$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13921if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13922 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13923
a3828db0 13924fi
c906108c
SS
13925fi
13926
db1ff28b
JK
13927# Assume we'll default to using the included libiberty regex.
13928gdb_use_included_regex=yes
13929
13930# However, if the system regex is GNU regex, then default to *not*
13931# using the included regex.
13932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13933$as_echo_n "checking for GNU regex... " >&6; }
d0ac1c44 13934if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
13935 $as_echo_n "(cached) " >&6
13936else
13937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13938/* end confdefs.h. */
13939#include <gnu-versions.h>
13940int
13941main ()
13942{
13943#define REGEX_INTERFACE_VERSION 1
13944#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13945# error "Version mismatch"
13946#endif
13947 ;
13948 return 0;
13949}
13950_ACEOF
13951if ac_fn_c_try_compile "$LINENO"; then :
13952 gdb_cv_have_gnu_regex=yes
13953else
13954 gdb_cv_have_gnu_regex=no
13955fi
13956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13957fi
13958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13959$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13960if test $gdb_cv_have_gnu_regex = yes; then
13961 gdb_use_included_regex=no
13962fi
13963
13964
13965# Check whether --with-included-regex was given.
13966if test "${with_included_regex+set}" = set; then :
13967 withval=$with_included_regex; gdb_with_regex=$withval
13968else
13969 gdb_with_regex=$gdb_use_included_regex
13970fi
13971
13972if test "$gdb_with_regex" = yes; then
13973
13974$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13975
13976fi
13977
81ecdfbb
RW
13978# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13979ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13980#include <sys/proc.h>
13981
13982"
d0ac1c44 13983if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 13984
5c45e068 13985cat >>confdefs.h <<_ACEOF
a3828db0 13986#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13987_ACEOF
c906108c 13988
5c45e068 13989
97bf5e38 13990fi
c906108c 13991
5c45e068 13992
a3828db0 13993# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13995$as_echo_n "checking for struct lwp... " >&6; }
d0ac1c44 13996if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 13997 $as_echo_n "(cached) " >&6
bec39cab 13998else
81ecdfbb 13999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14000/* end confdefs.h. */
a3828db0 14001#include <sys/param.h>
c49fbc6c 14002#define _KMEMUSER
a3828db0 14003#include <sys/lwp.h>
bec39cab
AC
14004int
14005main ()
14006{
a3828db0 14007struct lwp l;
bec39cab
AC
14008 ;
14009 return 0;
14010}
14011_ACEOF
81ecdfbb 14012if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14013 gdb_cv_struct_lwp=yes
c906108c 14014else
81ecdfbb 14015 gdb_cv_struct_lwp=no
c906108c 14016fi
81ecdfbb 14017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14018fi
81ecdfbb
RW
14019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14020$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 14021if test $gdb_cv_struct_lwp = yes; then
c906108c 14022
81ecdfbb 14023$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 14024
97bf5e38 14025fi
c906108c 14026
a3828db0 14027# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
14028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14029$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
d0ac1c44 14030if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 14031 $as_echo_n "(cached) " >&6
bec39cab 14032else
81ecdfbb 14033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14034/* end confdefs.h. */
a3828db0
MK
14035#include <sys/types.h>
14036#include <machine/reg.h>
bec39cab
AC
14037int
14038main ()
14039{
a3828db0 14040struct reg r;
bec39cab
AC
14041 ;
14042 return 0;
14043}
14044_ACEOF
81ecdfbb 14045if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14046 gdb_cv_struct_reg=yes
27ca5dad 14047else
81ecdfbb 14048 gdb_cv_struct_reg=no
27ca5dad 14049fi
81ecdfbb 14050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14051fi
81ecdfbb
RW
14052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14053$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 14054if test $gdb_cv_struct_reg = yes; then
bec39cab 14055
81ecdfbb 14056$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14057
14058fi
97bf5e38 14059
a3828db0
MK
14060# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14061# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14062ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14063#include <machine/reg.h>
81ecdfbb 14064"
d0ac1c44 14065if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
14066
14067cat >>confdefs.h <<_ACEOF
a3828db0 14068#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14069_ACEOF
3862412b 14070
5c45e068 14071
97bf5e38 14072fi
a6e69c1f
JB
14073ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14074#include <machine/reg.h>
81ecdfbb 14075"
d0ac1c44 14076if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
14077
14078cat >>confdefs.h <<_ACEOF
a3828db0 14079#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14080_ACEOF
3862412b 14081
5c45e068 14082
97bf5e38 14083fi
3862412b 14084
5c45e068 14085
6fea9e18
L
14086# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14087# Older amd64 Linux's don't have the fs_base and gs_base members of
14088# `struct user_regs_struct'.
f517c180
EA
14089ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14090#include <sys/user.h>
6fea9e18 14091"
d0ac1c44 14092if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
14093
14094cat >>confdefs.h <<_ACEOF
14095#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14096_ACEOF
14097
14098
14099fi
f517c180
EA
14100ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14101#include <sys/user.h>
6fea9e18 14102"
d0ac1c44 14103if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14104
14105cat >>confdefs.h <<_ACEOF
14106#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14107_ACEOF
14108
14109
14110fi
14111
14112
a3828db0 14113# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14115$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14116if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14117 $as_echo_n "(cached) " >&6
451928c5 14118else
81ecdfbb 14119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14120/* end confdefs.h. */
a3828db0 14121#include <sys/ptrace.h>
bec39cab
AC
14122int
14123main ()
14124{
a3828db0 14125PTRACE_GETREGS;
bec39cab
AC
14126 ;
14127 return 0;
14128}
14129_ACEOF
81ecdfbb 14130if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14131 gdb_cv_have_ptrace_getregs=yes
451928c5 14132else
81ecdfbb 14133 gdb_cv_have_ptrace_getregs=no
451928c5 14134fi
81ecdfbb 14135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14136fi
14137
81ecdfbb
RW
14138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14139$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14140if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14141
81ecdfbb 14142$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14143
97bf5e38 14144fi
451928c5 14145
a3828db0 14146# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14148$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14149if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14150 $as_echo_n "(cached) " >&6
451928c5 14151else
81ecdfbb 14152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14153/* end confdefs.h. */
a3828db0 14154#include <sys/ptrace.h>
bec39cab
AC
14155int
14156main ()
14157{
a3828db0 14158PTRACE_GETFPXREGS;
bec39cab
AC
14159 ;
14160 return 0;
14161}
14162_ACEOF
81ecdfbb 14163if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14164 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14165else
81ecdfbb 14166 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14167fi
81ecdfbb 14168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14169fi
14170
81ecdfbb
RW
14171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14172$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14173if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14174
81ecdfbb 14175$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14176
97bf5e38 14177fi
451928c5 14178
a3828db0 14179# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14181$as_echo_n "checking for PT_GETDBREGS... " >&6; }
d0ac1c44 14182if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 14183 $as_echo_n "(cached) " >&6
3862412b 14184else
81ecdfbb 14185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14186/* end confdefs.h. */
a3828db0
MK
14187#include <sys/types.h>
14188#include <sys/ptrace.h>
bec39cab
AC
14189int
14190main ()
14191{
a3828db0 14192PT_GETDBREGS;
bec39cab
AC
14193 ;
14194 return 0;
14195}
14196_ACEOF
81ecdfbb 14197if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14198 gdb_cv_have_pt_getdbregs=yes
3862412b 14199else
81ecdfbb 14200 gdb_cv_have_pt_getdbregs=no
3862412b 14201fi
81ecdfbb 14202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14203fi
14204
81ecdfbb
RW
14205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14206$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14207if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14208
81ecdfbb 14209$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14210
97bf5e38 14211fi
3862412b 14212
a3828db0 14213# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14215$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
d0ac1c44 14216if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 14217 $as_echo_n "(cached) " >&6
3862412b 14218else
81ecdfbb 14219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14220/* end confdefs.h. */
a3828db0
MK
14221#include <sys/types.h>
14222#include <sys/ptrace.h>
bec39cab
AC
14223int
14224main ()
14225{
a3828db0 14226PT_GETXMMREGS;
bec39cab
AC
14227 ;
14228 return 0;
14229}
14230_ACEOF
81ecdfbb 14231if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14232 gdb_cv_have_pt_getxmmregs=yes
3862412b 14233else
81ecdfbb 14234 gdb_cv_have_pt_getxmmregs=no
3862412b 14235fi
81ecdfbb 14236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14237fi
14238
81ecdfbb
RW
14239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14240$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14241if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14242
81ecdfbb 14243$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14244
97bf5e38 14245fi
3862412b 14246
6e9567fe
JB
14247# See if <sys/ptrace.h> supports LWP names on FreeBSD
14248# Older FreeBSD versions don't have the pl_tdname member of
14249# `struct ptrace_lwpinfo'.
14250ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14251"
d0ac1c44 14252if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
14253
14254cat >>confdefs.h <<_ACEOF
14255#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14256_ACEOF
14257
14258
14259fi
14260
14261
e6cdd38e
JB
14262# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14263# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14264# FreeBSD 10.3.
14265ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14266"
d0ac1c44 14267if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
14268
14269cat >>confdefs.h <<_ACEOF
14270#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14271_ACEOF
14272
14273
14274fi
14275
6e9567fe 14276
97bf5e38 14277if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14279$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14280 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 14281 $as_echo_n "(cached) " >&6
596c9d4b 14282else
81ecdfbb 14283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14284/* end confdefs.h. */
596c9d4b
KB
14285
14286#define _SYSCALL32
d30c5336
JK
14287/* Needed for new procfs interface on sparc-solaris. */
14288#define _STRUCTURED_PROC 1
596c9d4b 14289#include <sys/procfs.h>
bec39cab
AC
14290int
14291main ()
14292{
97bf5e38 14293gregset_t avar
bec39cab
AC
14294 ;
14295 return 0;
14296}
14297_ACEOF
81ecdfbb 14298if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14299 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14300else
81ecdfbb 14301 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14302
596c9d4b 14303fi
81ecdfbb 14304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14305fi
14306
97bf5e38 14307 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14308
81ecdfbb 14309$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14310
14311 fi
81ecdfbb
RW
14312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14313$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14314
81ecdfbb
RW
14315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14316$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14317 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14318 $as_echo_n "(cached) " >&6
d84dd0c5 14319else
81ecdfbb 14320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14321/* end confdefs.h. */
97bf5e38
MK
14322
14323#define _SYSCALL32
d30c5336
JK
14324/* Needed for new procfs interface on sparc-solaris. */
14325#define _STRUCTURED_PROC 1
d84dd0c5 14326#include <sys/procfs.h>
bec39cab
AC
14327int
14328main ()
14329{
97bf5e38 14330fpregset_t avar
bec39cab
AC
14331 ;
14332 return 0;
14333}
14334_ACEOF
81ecdfbb 14335if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14336 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14337else
81ecdfbb 14338 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14339
d84dd0c5 14340fi
81ecdfbb 14341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14342fi
14343
97bf5e38 14344 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14345
81ecdfbb 14346$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14347
97bf5e38 14348 fi
81ecdfbb
RW
14349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14350$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14351
81ecdfbb
RW
14352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14353$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14354 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 14355 $as_echo_n "(cached) " >&6
c906108c 14356else
81ecdfbb 14357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14358/* end confdefs.h. */
c906108c 14359
97bf5e38 14360#define _SYSCALL32
d30c5336
JK
14361/* Needed for new procfs interface on sparc-solaris. */
14362#define _STRUCTURED_PROC 1
97bf5e38 14363#include <sys/procfs.h>
bec39cab
AC
14364int
14365main ()
14366{
97bf5e38 14367prgregset_t avar
bec39cab
AC
14368 ;
14369 return 0;
14370}
14371_ACEOF
81ecdfbb 14372if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14373 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14374else
81ecdfbb 14375 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14376
c906108c 14377fi
81ecdfbb 14378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14379fi
14380
97bf5e38 14381 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14382
81ecdfbb 14383$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14384
97bf5e38 14385 fi
81ecdfbb
RW
14386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14387$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14388
81ecdfbb
RW
14389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14390$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14391 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14392 $as_echo_n "(cached) " >&6
d45fe813 14393else
81ecdfbb 14394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14395/* end confdefs.h. */
97bf5e38
MK
14396
14397#define _SYSCALL32
d30c5336
JK
14398/* Needed for new procfs interface on sparc-solaris. */
14399#define _STRUCTURED_PROC 1
97bf5e38 14400#include <sys/procfs.h>
bec39cab
AC
14401int
14402main ()
14403{
97bf5e38 14404prfpregset_t avar
bec39cab
AC
14405 ;
14406 return 0;
14407}
14408_ACEOF
81ecdfbb 14409if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14410 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14411else
81ecdfbb 14412 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14413
d45fe813 14414fi
81ecdfbb 14415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14416fi
14417
97bf5e38 14418 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14419
81ecdfbb 14420$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14421
97bf5e38 14422 fi
81ecdfbb
RW
14423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14424$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14425
81ecdfbb
RW
14426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14427$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
d0ac1c44 14428 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 14429 $as_echo_n "(cached) " >&6
d45fe813 14430else
81ecdfbb 14431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14432/* end confdefs.h. */
97bf5e38
MK
14433
14434#define _SYSCALL32
d30c5336
JK
14435/* Needed for new procfs interface on sparc-solaris. */
14436#define _STRUCTURED_PROC 1
97bf5e38 14437#include <sys/procfs.h>
bec39cab
AC
14438int
14439main ()
14440{
97bf5e38 14441prgregset32_t avar
bec39cab
AC
14442 ;
14443 return 0;
14444}
14445_ACEOF
81ecdfbb 14446if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14447 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14448else
81ecdfbb 14449 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14450
d45fe813 14451fi
81ecdfbb 14452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14453fi
14454
97bf5e38 14455 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14456
81ecdfbb 14457$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14458
97bf5e38 14459 fi
81ecdfbb
RW
14460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14461$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14462
81ecdfbb
RW
14463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14464$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 14465 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14466 $as_echo_n "(cached) " >&6
d45fe813 14467else
81ecdfbb 14468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14469/* end confdefs.h. */
97bf5e38 14470
d45fe813 14471#define _SYSCALL32
d30c5336
JK
14472/* Needed for new procfs interface on sparc-solaris. */
14473#define _STRUCTURED_PROC 1
97bf5e38 14474#include <sys/procfs.h>
bec39cab
AC
14475int
14476main ()
14477{
97bf5e38 14478lwpid_t avar
bec39cab
AC
14479 ;
14480 return 0;
14481}
14482_ACEOF
81ecdfbb 14483if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14484 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14485else
81ecdfbb 14486 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14487
d45fe813 14488fi
81ecdfbb 14489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14490fi
14491
97bf5e38 14492 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14493
81ecdfbb 14494$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14495
97bf5e38 14496 fi
81ecdfbb
RW
14497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14498$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14499
81ecdfbb
RW
14500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14501$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 14502 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14503 $as_echo_n "(cached) " >&6
c906108c 14504else
81ecdfbb 14505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14506/* end confdefs.h. */
c906108c 14507
97bf5e38 14508#define _SYSCALL32
d30c5336
JK
14509/* Needed for new procfs interface on sparc-solaris. */
14510#define _STRUCTURED_PROC 1
97bf5e38 14511#include <sys/procfs.h>
bec39cab
AC
14512int
14513main ()
14514{
97bf5e38 14515psaddr_t avar
bec39cab
AC
14516 ;
14517 return 0;
14518}
14519_ACEOF
81ecdfbb 14520if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14521 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14522else
81ecdfbb 14523 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14524
c906108c 14525fi
81ecdfbb 14526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14527fi
14528
97bf5e38 14529 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14530
81ecdfbb 14531$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14532
97bf5e38 14533 fi
81ecdfbb
RW
14534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14535$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14536
43b7e92b
GB
14537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14538$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14539 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14540 $as_echo_n "(cached) " >&6
14541else
14542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14543/* end confdefs.h. */
14544
14545#define _SYSCALL32
14546/* Needed for new procfs interface on sparc-solaris. */
14547#define _STRUCTURED_PROC 1
14548#include <sys/procfs.h>
14549int
14550main ()
14551{
14552elf_fpregset_t avar
14553 ;
14554 return 0;
14555}
14556_ACEOF
14557if ac_fn_c_try_compile "$LINENO"; then :
14558 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14559else
14560 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14561
14562fi
14563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14564fi
14565
14566 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14567
14568$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14569
14570 fi
14571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14572$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14573
c906108c 14574fi
c906108c 14575
bc8bcb4b 14576# Check if the compiler supports the `long long' type.
c906108c 14577
81ecdfbb
RW
14578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14579$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 14580if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 14581 $as_echo_n "(cached) " >&6
97bf5e38 14582else
81ecdfbb 14583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14584/* end confdefs.h. */
bc8bcb4b 14585extern long long foo;
bec39cab
AC
14586int
14587main ()
14588{
bc8bcb4b 14589switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14590 ;
14591 return 0;
14592}
14593_ACEOF
81ecdfbb 14594if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14595 gdb_cv_c_long_long=yes
14596else
81ecdfbb 14597 gdb_cv_c_long_long=no
97bf5e38 14598fi
81ecdfbb 14599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14600fi
81ecdfbb
RW
14601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14602$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14603if test $gdb_cv_c_long_long != yes; then
14604 # libdecnumber requires long long.
d0ac1c44 14605 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14606fi
14607
bc8bcb4b 14608# Check if the compiler and runtime support printing long longs.
97bf5e38 14609
81ecdfbb
RW
14610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14611$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 14612if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 14613 $as_echo_n "(cached) " >&6
97bf5e38 14614else
81ecdfbb 14615 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14616 gdb_cv_printf_has_long_long=no
14617else
81ecdfbb 14618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14619/* end confdefs.h. */
bc8bcb4b
MK
14620$ac_includes_default
14621int
14622main ()
14623{
14624char buf[32];
97bf5e38
MK
14625 long long l = 0;
14626 l = (l << 16) + 0x0123;
14627 l = (l << 16) + 0x4567;
14628 l = (l << 16) + 0x89ab;
14629 l = (l << 16) + 0xcdef;
14630 sprintf (buf, "0x%016llx", l);
14631 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14632 ;
14633 return 0;
c906108c 14634}
bec39cab 14635_ACEOF
81ecdfbb 14636if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14637 gdb_cv_printf_has_long_long=yes
14638else
81ecdfbb 14639 gdb_cv_printf_has_long_long=no
97bf5e38 14640fi
81ecdfbb
RW
14641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14642 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14643fi
81ecdfbb 14644
97bf5e38 14645fi
81ecdfbb
RW
14646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14647$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14648if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14649
81ecdfbb 14650$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14651
14652fi
97bf5e38 14653
1a619819
LM
14654# Check if the compiler and runtime support printing decfloats.
14655
81ecdfbb
RW
14656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14657$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 14658if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 14659 $as_echo_n "(cached) " >&6
1a619819 14660else
81ecdfbb 14661 if test "$cross_compiling" = yes; then :
1a619819
LM
14662 gdb_cv_printf_has_decfloat=no
14663else
81ecdfbb 14664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14665/* end confdefs.h. */
14666$ac_includes_default
14667int
14668main ()
14669{
14670char buf[64];
14671 _Decimal32 d32 = 1.2345df;
14672 _Decimal64 d64 = 1.2345dd;
14673 _Decimal128 d128 = 1.2345dl;
14674 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14675 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14676 ;
14677 return 0;
14678}
14679_ACEOF
81ecdfbb 14680if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14681 gdb_cv_printf_has_decfloat=yes
14682else
81ecdfbb 14683 gdb_cv_printf_has_decfloat=no
1a619819 14684fi
81ecdfbb
RW
14685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14686 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14687fi
81ecdfbb 14688
1a619819 14689fi
81ecdfbb
RW
14690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14691$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14692if test $gdb_cv_printf_has_decfloat = yes; then
14693
81ecdfbb 14694$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14695
14696fi
14697
bc8bcb4b
MK
14698# Check if the compiler supports the `long double' type. We can't use
14699# AC_C_LONG_DOUBLE because that one does additional checks on the
14700# constants defined in <float.h> that fail on some systems,
14701# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14702
81ecdfbb
RW
14703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14704$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 14705if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 14706 $as_echo_n "(cached) " >&6
97bf5e38 14707else
81ecdfbb 14708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14709/* end confdefs.h. */
97bf5e38 14710long double foo;
bec39cab 14711_ACEOF
81ecdfbb 14712if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14713 gdb_cv_c_long_double=yes
97bf5e38 14714else
81ecdfbb 14715 gdb_cv_c_long_double=no
97bf5e38 14716fi
81ecdfbb 14717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14718fi
81ecdfbb
RW
14719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14720$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14721if test $gdb_cv_c_long_double = yes; then
c906108c 14722
81ecdfbb 14723$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14724
14725fi
14726
bc8bcb4b 14727# Check if the compiler and runtime support printing long doubles.
97bf5e38 14728
81ecdfbb
RW
14729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14730$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 14731if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 14732 $as_echo_n "(cached) " >&6
97bf5e38 14733else
81ecdfbb 14734 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14735 gdb_cv_printf_has_long_double=no
14736else
81ecdfbb 14737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14738/* end confdefs.h. */
bc8bcb4b
MK
14739$ac_includes_default
14740int
14741main ()
14742{
14743char buf[16];
97bf5e38
MK
14744 long double f = 3.141592653;
14745 sprintf (buf, "%Lg", f);
14746 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14747 ;
14748 return 0;
97bf5e38 14749}
bec39cab 14750_ACEOF
81ecdfbb 14751if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14752 gdb_cv_printf_has_long_double=yes
c906108c 14753else
81ecdfbb 14754 gdb_cv_printf_has_long_double=no
c906108c 14755fi
81ecdfbb
RW
14756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14757 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14758fi
81ecdfbb 14759
c906108c 14760fi
81ecdfbb
RW
14761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14762$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14763if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14764
81ecdfbb 14765$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14766
14767fi
97bf5e38 14768
bc8bcb4b 14769# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14770
81ecdfbb
RW
14771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14772$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 14773if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 14774 $as_echo_n "(cached) " >&6
97bf5e38 14775else
81ecdfbb 14776 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14777 gdb_cv_scanf_has_long_double=no
14778else
81ecdfbb 14779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14780/* end confdefs.h. */
bc8bcb4b
MK
14781#include <stdio.h>
14782int
14783main ()
14784{
14785char *buf = "3.141592653";
97bf5e38
MK
14786 long double f = 0;
14787 sscanf (buf, "%Lg", &f);
14788 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14789 ;
14790 return 0;
97bf5e38 14791}
bec39cab 14792_ACEOF
81ecdfbb 14793if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14794 gdb_cv_scanf_has_long_double=yes
14795else
81ecdfbb 14796 gdb_cv_scanf_has_long_double=no
97bf5e38 14797fi
81ecdfbb
RW
14798rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14799 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14800fi
81ecdfbb 14801
c906108c 14802fi
81ecdfbb
RW
14803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14804$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14805if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14806
81ecdfbb 14807$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14808
14809fi
c906108c 14810
438013df
AO
14811case ${host_os} in
14812aix*)
81ecdfbb
RW
14813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14814$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 14815if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 14816 $as_echo_n "(cached) " >&6
438013df 14817else
bec39cab 14818
438013df
AO
14819 SAVE_LDFLAGS=$LDFLAGS
14820
14821 case $GCC in
14822 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14823 *) gdb_cv_bigtoc=-bbigtoc ;;
14824 esac
14825
14826 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14828/* end confdefs.h. */
438013df 14829
bec39cab
AC
14830int
14831main ()
14832{
438013df 14833int i;
bec39cab
AC
14834 ;
14835 return 0;
14836}
14837_ACEOF
81ecdfbb 14838if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14839
81ecdfbb
RW
14840else
14841 gdb_cv_bigtoc=
438013df 14842fi
81ecdfbb
RW
14843rm -f core conftest.err conftest.$ac_objext \
14844 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14845 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14846
bec39cab 14847fi
81ecdfbb
RW
14848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14849$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14850 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14851 ;;
14852esac
14853
38f6b338 14854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14855$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14856dynamic_list=false
14857if test "${gdb_native}" = yes; then
14858 # The dynamically loaded libthread_db needs access to symbols in the gdb
14859 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14860 # may not be supported there.
14861 old_LDFLAGS="$LDFLAGS"
14862 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14863 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14864 LDFLAGS="$LDFLAGS $RDYNAMIC"
14865 if test "${have_libpython}" = no; then
14866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14867/* end confdefs.h. */
14868
14869int
14870main ()
14871{
14872
14873 ;
14874 return 0;
14875}
14876_ACEOF
14877if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14878 dynamic_list=true
14879fi
14880rm -f core conftest.err conftest.$ac_objext \
14881 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14882 else
14883 # Workaround http://bugs.python.org/issue4434 where static
14884 # libpythonX.Y.a would get its symbols required for
14885 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14886 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
14887
14888 # Note the workaround for Python
14889 # http://bugs.python.org/issue10112 earlier has removed
14890 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
14891 # here too, as otherwise it'd make this -Wl,--dynamic-list test
14892 # always pass.
38f6b338
JK
14893 old_CFLAGS="$CFLAGS"
14894 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
14895 old_LIBS="$LIBS"
14896 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
14897 old_CPPFLAGS="$CPPFLAGS"
14898 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 14899 if test "$cross_compiling" = yes; then :
3bebe2f2 14900 true
f6528abd 14901else
3bebe2f2
JK
14902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14903/* end confdefs.h. */
1b4f615e 14904#include "Python.h"
3bebe2f2
JK
14905int
14906main ()
14907{
14908int err;
38f6b338
JK
14909 Py_Initialize ();
14910 err = PyRun_SimpleString ("import itertools\n");
14911 Py_Finalize ();
14912 return err == 0 ? 0 : 1;
3bebe2f2
JK
14913 ;
14914 return 0;
14915}
14916_ACEOF
14917if ac_fn_c_try_run "$LINENO"; then :
14918 dynamic_list=true
14919fi
14920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14921 conftest.$ac_objext conftest.beam conftest.$ac_ext
14922fi
14923
8c1fb155 14924 LIBS="$old_LIBS"
38f6b338 14925 CFLAGS="$old_CFLAGS"
1b4f615e 14926 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
14927 fi
14928 LDFLAGS="$old_LDFLAGS"
14929fi
14930if $dynamic_list; then
14931 found="-Wl,--dynamic-list"
14932 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14933else
38f6b338
JK
14934 found="-rdynamic"
14935 RDYNAMIC="-rdynamic"
f6528abd 14936fi
f6528abd 14937
38f6b338 14938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14939$as_echo "$found" >&6; }
0407b3f1 14940
f6528abd 14941
0407b3f1 14942if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14943 case ${host_os} in
d92419e5 14944 aix*)
81ecdfbb
RW
14945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14946$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 14947 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 14948 $as_echo_n "(cached) " >&6
bec39cab 14949else
81ecdfbb 14950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14951/* end confdefs.h. */
d92419e5 14952#include <sys/pthdebug.h>
bec39cab
AC
14953int
14954main ()
14955{
d92419e5
JB
14956#ifndef PTHDB_VERSION_3
14957 #error
14958 #endif
bec39cab
AC
14959 ;
14960 return 0;
14961}
14962_ACEOF
81ecdfbb 14963if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14964 gdb_cv_have_aix_thread_debug=yes
14965else
81ecdfbb 14966 gdb_cv_have_aix_thread_debug=no
d92419e5 14967fi
81ecdfbb 14968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14969fi
14970
81ecdfbb
RW
14971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14972$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14973 if test $gdb_cv_have_aix_thread_debug = yes; then
14974 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14975 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 14976 LIBS="$LIBS -lpthdebug"
d645e32e
JB
14977
14978 # Older versions of AIX do not provide the declaration for
14979 # the getthrds function (it appears that it was introduced
14980 # with AIX 6.x).
14981 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14982"
d0ac1c44 14983if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
14984 ac_have_decl=1
14985else
14986 ac_have_decl=0
14987fi
14988
14989cat >>confdefs.h <<_ACEOF
14990#define HAVE_DECL_GETTHRDS $ac_have_decl
14991_ACEOF
14992
d92419e5
JB
14993 fi
14994 ;;
c906108c 14995 esac
bec39cab 14996
c906108c
SS
14997fi
14998
3f47be5c 14999if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15001$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 15002if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 15003 $as_echo_n "(cached) " >&6
bec39cab 15004else
81ecdfbb 15005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15006/* end confdefs.h. */
3f47be5c 15007#include <thread_db.h>
bec39cab
AC
15008int
15009main ()
15010{
3f47be5c 15011int i = TD_NOTALLOC;
bec39cab
AC
15012 ;
15013 return 0;
15014}
15015_ACEOF
81ecdfbb 15016if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15017 gdb_cv_thread_db_h_has_td_notalloc=yes
15018else
81ecdfbb 15019 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15020
3f47be5c 15021fi
81ecdfbb 15022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15023
bec39cab 15024fi
81ecdfbb
RW
15025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15026$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15028$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 15029if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 15030 $as_echo_n "(cached) " >&6
59f80f10 15031else
81ecdfbb 15032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15033/* end confdefs.h. */
15034#include <thread_db.h>
15035int
15036main ()
15037{
15038int i = TD_VERSION;
15039 ;
15040 return 0;
15041}
15042_ACEOF
81ecdfbb 15043if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15044 gdb_cv_thread_db_h_has_td_version=yes
15045else
81ecdfbb 15046 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15047
15048fi
81ecdfbb 15049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15050
15051fi
81ecdfbb
RW
15052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15053$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15055$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 15056if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15057 $as_echo_n "(cached) " >&6
59f80f10 15058else
81ecdfbb 15059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15060/* end confdefs.h. */
15061#include <thread_db.h>
15062int
15063main ()
15064{
15065int i = TD_NOTLS;
15066 ;
15067 return 0;
15068}
15069_ACEOF
81ecdfbb 15070if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15071 gdb_cv_thread_db_h_has_td_notls=yes
15072else
81ecdfbb 15073 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15074
15075fi
81ecdfbb 15076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15077
15078fi
81ecdfbb
RW
15079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15080$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15081fi
15082if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15083
81ecdfbb 15084$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15085
59f80f10
DJ
15086fi
15087if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15088
81ecdfbb 15089$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15090
15091fi
15092if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15093
81ecdfbb 15094$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15095
3f47be5c
EZ
15096fi
15097
81ecdfbb
RW
15098ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15099"
d0ac1c44 15100if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15101 ac_have_decl=1
10568435 15102else
81ecdfbb 15103 ac_have_decl=0
10568435 15104fi
10568435
JK
15105
15106cat >>confdefs.h <<_ACEOF
81ecdfbb 15107#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15108_ACEOF
15109
15110
81ecdfbb
RW
15111if test "$cross_compiling" = yes; then :
15112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15113/* end confdefs.h. */
15114#include <sys/personality.h>
15115int
15116main ()
15117{
15118
15119# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15120# define ADDR_NO_RANDOMIZE 0x0040000
15121# endif
15122 /* Test the flag could be set and stays set. */
15123 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15124 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15125 return 1
15126 ;
15127 return 0;
15128}
15129_ACEOF
81ecdfbb 15130if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15131 have_personality=true
15132else
81ecdfbb 15133 have_personality=false
10568435 15134fi
81ecdfbb
RW
15135rm -f core conftest.err conftest.$ac_objext \
15136 conftest$ac_exeext conftest.$ac_ext
10568435 15137else
81ecdfbb 15138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15139/* end confdefs.h. */
15140#include <sys/personality.h>
15141int
15142main ()
15143{
15144
15145# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15146# define ADDR_NO_RANDOMIZE 0x0040000
15147# endif
15148 /* Test the flag could be set and stays set. */
15149 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15150 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15151 return 1
15152 ;
15153 return 0;
15154}
15155_ACEOF
81ecdfbb 15156if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15157 have_personality=true
15158else
81ecdfbb 15159 have_personality=false
10568435 15160fi
81ecdfbb
RW
15161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15162 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15163fi
81ecdfbb 15164
10568435
JK
15165if $have_personality
15166then
15167
81ecdfbb 15168$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15169
15170fi
15171
e655c1a2
PA
15172case $host_os in
15173 go32* | *djgpp*)
15174 gdbinit=gdb.ini
15175 ;;
15176 *)
15177 gdbinit=.gdbinit
15178 ;;
15179esac
15180
15181cat >>confdefs.h <<_ACEOF
15182#define GDBINIT "$gdbinit"
15183_ACEOF
15184
15185
fb40c209 15186
f83d8a90
DE
15187# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15188# except that the argument to --with-sysroot is optional.
15189# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15190if test "x$with_sysroot" = xyes; then
15191 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15192fi
bec39cab 15193
81ecdfbb
RW
15194# Check whether --with-sysroot was given.
15195if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15196 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15197else
15198 TARGET_SYSTEM_ROOT=
15199fi
030292b7 15200
030292b7 15201
f83d8a90
DE
15202 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15203 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15204 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15205 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15206
f83d8a90
DE
15207cat >>confdefs.h <<_ACEOF
15208#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15209_ACEOF
bec39cab 15210
030292b7 15211
b14b1491 15212
f83d8a90
DE
15213
15214 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15215 if test "x$prefix" = xNONE; then
15216 test_prefix=/usr/local
15217 else
15218 test_prefix=$prefix
15219 fi
15220 else
15221 test_prefix=$exec_prefix
15222 fi
15223 value=0
15224 case ${ac_define_dir} in
15225 "${test_prefix}"|"${test_prefix}/"*|\
15226 '${exec_prefix}'|'${exec_prefix}/'*)
15227 value=1
15228 ;;
15229 esac
15230
15231cat >>confdefs.h <<_ACEOF
15232#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15233_ACEOF
030292b7
DJ
15234
15235
15236
16e7150e 15237
16e7150e 15238
81ecdfbb
RW
15239# Check whether --with-system-gdbinit was given.
15240if test "${with_system_gdbinit+set}" = set; then :
15241 withval=$with_system_gdbinit;
b14b1491
TT
15242 SYSTEM_GDBINIT=$withval
15243else
15244 SYSTEM_GDBINIT=
81ecdfbb
RW
15245fi
15246
16e7150e
JG
15247
15248 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15249 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15250 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15251 ac_define_dir=`eval echo $ac_define_dir`
15252
15253cat >>confdefs.h <<_ACEOF
15254#define SYSTEM_GDBINIT "$ac_define_dir"
15255_ACEOF
15256
15257
15258
0c4a4063 15259
b14b1491
TT
15260 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15261 if test "x$prefix" = xNONE; then
15262 test_prefix=/usr/local
15263 else
15264 test_prefix=$prefix
15265 fi
15266 else
15267 test_prefix=$exec_prefix
15268 fi
15269 value=0
15270 case ${ac_define_dir} in
15271 "${test_prefix}"|"${test_prefix}/"*|\
15272 '${exec_prefix}'|'${exec_prefix}/'*)
15273 value=1
15274 ;;
15275 esac
16e7150e 15276
b14b1491
TT
15277cat >>confdefs.h <<_ACEOF
15278#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15279_ACEOF
15280
b14b1491 15281
16e7150e 15282
0c4a4063 15283
b835bb52 15284
81ecdfbb
RW
15285# Check whether --enable-werror was given.
15286if test "${enable_werror+set}" = set; then :
15287 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15288 yes | y) ERROR_ON_WARNING="yes" ;;
15289 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 15290 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15291 esac
81ecdfbb
RW
15292fi
15293
094a342e 15294
9a084706
PA
15295# Enable -Werror by default when using gcc. Turn it off for releases.
15296if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15297 ERROR_ON_WARNING=yes
15298fi
15299
15300WERROR_CFLAGS=""
15301if test "${ERROR_ON_WARNING}" = yes ; then
15302 WERROR_CFLAGS="-Werror"
15303fi
15304
cf6de44d 15305# The options we'll try to enable.
aac331e4 15306build_warnings="-Wall -Wpointer-arith \
a0de763e 15307-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 15308-Wno-switch -Wno-char-subscripts \
cf6de44d 15309-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 15310-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 15311-Wno-mismatched-tags \
632e107b 15312-Wno-error=deprecated-register \
85e26832 15313-Wsuggest-override \
1a34f210 15314-Wimplicit-fallthrough=3 \
96643e35 15315-Wduplicated-cond \
33a6bc35
TT
15316-Wshadow=local \
15317-Wdeprecated-copy \
15318-Wdeprecated-copy-dtor \
15319-Wredundant-move"
3bc3d82a 15320
3526781e 15321case "${host}" in
4fa7574e
RO
15322 *-*-mingw32*)
15323 # Enable -Wno-format by default when using gcc on mingw since many
15324 # GCC versions complain about %I64.
15325 build_warnings="$build_warnings -Wno-format" ;;
15326 *-*-solaris*)
15327 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15328 # doesn't understand.
15329 build_warnings="$build_warnings -Wno-unknown-pragmas"
15330 # Solaris 11 <unistd.h> marks vfork deprecated.
15331 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
15332 *)
15333 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
15334 # but there's a special case for this below.
15335 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15336esac
15337
81ecdfbb
RW
15338# Check whether --enable-build-warnings was given.
15339if test "${enable_build_warnings+set}" = set; then :
15340 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15341 yes) ;;
15342 no) build_warnings="-w";;
15343 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15344 build_warnings="${build_warnings} ${t}";;
15345 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15346 build_warnings="${t} ${build_warnings}";;
15347 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15348esac
d4f3574e 15349if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15350 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15351fi
81ecdfbb
RW
15352fi
15353# Check whether --enable-gdb-build-warnings was given.
15354if test "${enable_gdb_build_warnings+set}" = set; then :
15355 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15356 yes) ;;
15357 no) build_warnings="-w";;
15358 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15359 build_warnings="${build_warnings} ${t}";;
15360 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15361 build_warnings="${t} ${build_warnings}";;
15362 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15363esac
15364if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15365 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15366fi
81ecdfbb 15367fi
3bc3d82a
PA
15368
15369# The set of warnings supported by a C++ compiler is not the same as
15370# of the C compiler.
cf6de44d 15371ac_ext=cpp
3bc3d82a
PA
15372ac_cpp='$CXXCPP $CPPFLAGS'
15373ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15374ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15375ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15376
3bc3d82a 15377
81ecdfbb 15378WARN_CFLAGS=""
c906108c
SS
15379if test "x${build_warnings}" != x -a "x$GCC" = xyes
15380then
81ecdfbb
RW
15381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15382$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15383 # Separate out the -Werror flag as some files just cannot be
15384 # compiled with it enabled.
15385 for w in ${build_warnings}; do
7544db95
PA
15386 # GCC does not complain about -Wno-unknown-warning. Invert
15387 # and test -Wunknown-warning instead.
15388 case $w in
15389 -Wno-*)
15390 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
15391 -Wformat-nonliteral)
15392 # gcc requires -Wformat before -Wformat-nonliteral
15393 # will work, so stick them together.
15394 w="-Wformat $w"
15395 wtest="$w"
15396 ;;
7544db95
PA
15397 *)
15398 wtest=$w ;;
15399 esac
15400
746a987d
AC
15401 case $w in
15402 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15403 *)
15404 # Check whether GCC accepts it.
4536bbc6 15405 saved_CFLAGS="$CFLAGS"
3e019bdc 15406 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15407 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15408 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
15409 if test "x$w" = "x-Wunused-variable"; then
15410 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
15411 # fixed in GCC 4.9. This test is derived from the gdb
15412 # source code that triggered this bug in GCC.
15413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15414/* end confdefs.h. */
15415struct scoped_restore_base {};
15416 struct scoped_restore_tmpl : public scoped_restore_base {
15417 ~scoped_restore_tmpl() {}
15418 };
15419int
15420main ()
15421{
15422const scoped_restore_base &b = scoped_restore_tmpl();
15423 ;
15424 return 0;
15425}
15426_ACEOF
15427if ac_fn_cxx_try_compile "$LINENO"; then :
15428 WARN_CFLAGS="${WARN_CFLAGS} $w"
15429fi
15430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15431 else
15432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15433/* end confdefs.h. */
4536bbc6 15434
bec39cab
AC
15435int
15436main ()
15437{
4536bbc6 15438
bec39cab
AC
15439 ;
15440 return 0;
15441}
15442_ACEOF
3bc3d82a 15443if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15444 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15445fi
81ecdfbb 15446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 15447 fi
4536bbc6 15448 CFLAGS="$saved_CFLAGS"
3bc3d82a 15449 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15450 esac
15451 done
81ecdfbb
RW
15452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15453$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15454fi
15455
15456
104c1213 15457
cf6de44d 15458ac_ext=c
3bc3d82a
PA
15459ac_cpp='$CPP $CPPFLAGS'
15460ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15461ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15462ac_compiler_gnu=$ac_cv_c_compiler_gnu
15463
3bc3d82a 15464
b835bb52 15465
f35d5ade
TT
15466# Check whether --enable-ubsan was given.
15467if test "${enable_ubsan+set}" = set; then :
15468 enableval=$enable_ubsan;
15469else
eff98030 15470 enable_ubsan=no
f35d5ade
TT
15471fi
15472
15473if test "x$enable_ubsan" = xauto; then
15474 if $development; then
15475 enable_ubsan=yes
15476 fi
15477fi
15478ac_ext=cpp
15479ac_cpp='$CXXCPP $CPPFLAGS'
15480ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15481ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15482ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15483
15484if test "x$enable_ubsan" = xyes; then
15485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
15486$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
15487 saved_CXXFLAGS="$CXXFLAGS"
15488 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15490/* end confdefs.h. */
15491
15492int
15493main ()
15494{
15495
15496 ;
15497 return 0;
15498}
15499_ACEOF
15500if ac_fn_cxx_try_link "$LINENO"; then :
15501 enable_ubsan=yes
15502else
15503 enable_ubsan=no
15504fi
15505rm -f core conftest.err conftest.$ac_objext \
15506 conftest$ac_exeext conftest.$ac_ext
15507 CXXFLAGS="$saved_CXXFLAGS"
15508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
15509$as_echo "$enable_ubsan" >&6; }
15510 if test "x$enable_ubsan" = xyes; then
15511 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15512 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
15513 fi
15514fi
15515ac_ext=c
15516ac_cpp='$CPP $CPPFLAGS'
15517ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15518ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15519ac_compiler_gnu=$ac_cv_c_compiler_gnu
15520
15521
15522
7a292a7a 15523# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15525$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 15526if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 15527 $as_echo_n "(cached) " >&6
bec39cab 15528else
81ecdfbb 15529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15530/* end confdefs.h. */
7a292a7a
SS
15531
15532#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15533lose
15534#endif
bec39cab 15535_ACEOF
7a292a7a 15536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15537 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15538 gdb_cv_os_cygwin=yes
15539else
7a292a7a
SS
15540 gdb_cv_os_cygwin=no
15541fi
15542rm -f conftest*
15543
15544fi
81ecdfbb
RW
15545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15546$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15547
aff38e61 15548
3eb25fda 15549SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15550case ${host} in
95cbc983
AC
15551 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15552 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15553 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 15554 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
15555esac
15556
15557
cd0fc7c3
SS
15558# libreadline needs libuser32.a in a cygwin environment
15559WIN32LIBS=
15560if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15561 WIN32LIBS="-luser32"
15562 case "${target}" in
15563 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15564 ;;
15565 esac
cd0fc7c3 15566fi
c906108c 15567
b4505029
MM
15568# The ser-tcp.c module requires sockets.
15569case ${host} in
15570 *mingw32*)
15571
81ecdfbb 15572$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15573
15574 WIN32LIBS="$WIN32LIBS -lws2_32"
15575 ;;
15576esac
15577
7a292a7a 15578
31d99776 15579# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15580
15581 OLD_CFLAGS=$CFLAGS
15582 OLD_LDFLAGS=$LDFLAGS
15583 OLD_LIBS=$LIBS
15584 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15585 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15586 # always want our bfd.
15587 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15588 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15589 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15590 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15591 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 15593$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 15594if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 15595 $as_echo_n "(cached) " >&6
31d99776 15596else
81ecdfbb 15597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15598/* end confdefs.h. */
15599#include <stdlib.h>
def63ff0
TT
15600 #include "bfd.h"
15601 #include "elf-bfd.h"
31d99776
DJ
15602
15603int
15604main ()
15605{
def63ff0 15606return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15607 ;
15608 return 0;
15609}
15610_ACEOF
81ecdfbb 15611if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15612 gdb_cv_var_elf=yes
15613else
81ecdfbb 15614 gdb_cv_var_elf=no
31d99776 15615fi
81ecdfbb
RW
15616rm -f core conftest.err conftest.$ac_objext \
15617 conftest$ac_exeext conftest.$ac_ext
31d99776 15618fi
81ecdfbb
RW
15619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15620$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15621 CFLAGS=$OLD_CFLAGS
15622 LDFLAGS=$OLD_LDFLAGS
15623 LIBS=$OLD_LIBS
31d99776 15624if test $gdb_cv_var_elf = yes; then
d4777acb 15625 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15626
81ecdfbb 15627$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15628
075ff26d
JK
15629 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15630 if test "$plugins" = "yes"; then
a48b32c0
L
15631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15632$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 15633if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15634 $as_echo_n "(cached) " >&6
15635else
15636 ac_func_search_save_LIBS=$LIBS
15637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15638/* end confdefs.h. */
15639
15640/* Override any GCC internal prototype to avoid an error.
15641 Use char because int might match the return type of a GCC
15642 builtin and then its argument prototype would still apply. */
15643#ifdef __cplusplus
15644extern "C"
15645#endif
15646char dlopen ();
15647int
15648main ()
15649{
15650return dlopen ();
15651 ;
15652 return 0;
15653}
15654_ACEOF
15655for ac_lib in '' dl; do
15656 if test -z "$ac_lib"; then
15657 ac_res="none required"
15658 else
15659 ac_res=-l$ac_lib
15660 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15661 fi
15662 if ac_fn_c_try_link "$LINENO"; then :
15663 ac_cv_search_dlopen=$ac_res
15664fi
15665rm -f core conftest.err conftest.$ac_objext \
15666 conftest$ac_exeext
d0ac1c44 15667 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15668 break
15669fi
15670done
d0ac1c44 15671if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15672
15673else
15674 ac_cv_search_dlopen=no
15675fi
15676rm conftest.$ac_ext
15677LIBS=$ac_func_search_save_LIBS
15678fi
15679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15680$as_echo "$ac_cv_search_dlopen" >&6; }
15681ac_res=$ac_cv_search_dlopen
15682if test "$ac_res" != no; then :
15683 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15684
15685fi
15686
075ff26d 15687 fi
31d99776 15688fi
31d99776 15689
4f05add4
TT
15690# Add macho support to GDB, but only if BFD includes it.
15691
15692 OLD_CFLAGS=$CFLAGS
15693 OLD_LDFLAGS=$LDFLAGS
15694 OLD_LIBS=$LIBS
15695 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15696 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15697 # always want our bfd.
15698 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15699 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15700 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15701 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15702 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15704$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 15705if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
15706 $as_echo_n "(cached) " >&6
15707else
15708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15709/* end confdefs.h. */
15710#include <stdlib.h>
15711 #include "bfd.h"
15712 #include "mach-o.h"
15713
15714int
15715main ()
15716{
15717return bfd_mach_o_lookup_command (NULL, 0, NULL);
15718 ;
15719 return 0;
15720}
15721_ACEOF
15722if ac_fn_c_try_link "$LINENO"; then :
15723 gdb_cv_var_macho=yes
15724else
15725 gdb_cv_var_macho=no
15726fi
15727rm -f core conftest.err conftest.$ac_objext \
15728 conftest$ac_exeext conftest.$ac_ext
15729fi
15730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15731$as_echo "$gdb_cv_var_macho" >&6; }
15732 CFLAGS=$OLD_CFLAGS
15733 LDFLAGS=$OLD_LDFLAGS
15734 LIBS=$OLD_LIBS
15735if test $gdb_cv_var_macho = yes; then
15736 CONFIG_OBS="$CONFIG_OBS machoread.o"
15737fi
15738
121ce6e5
DJ
15739# Add any host-specific objects to GDB.
15740CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15741
608e2dbb
TT
15742# If building on ELF, look for lzma support for embedded compressed debug info.
15743if test $gdb_cv_var_elf = yes; then
15744
15745# Check whether --with-lzma was given.
15746if test "${with_lzma+set}" = set; then :
15747 withval=$with_lzma;
15748else
15749 with_lzma=auto
15750fi
15751
15752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15753$as_echo_n "checking whether to use lzma... " >&6; }
15754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15755$as_echo "$with_lzma" >&6; }
15756
15757 if test "${with_lzma}" != no; then
15758
15759
15760
15761
15762
15763
15764
15765
15766 use_additional=yes
15767
15768 acl_save_prefix="$prefix"
15769 prefix="$acl_final_prefix"
15770 acl_save_exec_prefix="$exec_prefix"
15771 exec_prefix="$acl_final_exec_prefix"
15772
15773 eval additional_includedir=\"$includedir\"
15774 eval additional_libdir=\"$libdir\"
15775
15776 exec_prefix="$acl_save_exec_prefix"
15777 prefix="$acl_save_prefix"
15778
15779
15780# Check whether --with-liblzma-prefix was given.
15781if test "${with_liblzma_prefix+set}" = set; then :
15782 withval=$with_liblzma_prefix;
15783 if test "X$withval" = "Xno"; then
15784 use_additional=no
15785 else
15786 if test "X$withval" = "X"; then
15787
15788 acl_save_prefix="$prefix"
15789 prefix="$acl_final_prefix"
15790 acl_save_exec_prefix="$exec_prefix"
15791 exec_prefix="$acl_final_exec_prefix"
15792
15793 eval additional_includedir=\"$includedir\"
15794 eval additional_libdir=\"$libdir\"
15795
15796 exec_prefix="$acl_save_exec_prefix"
15797 prefix="$acl_save_prefix"
15798
15799 else
15800 additional_includedir="$withval/include"
15801 additional_libdir="$withval/lib"
15802 fi
15803 fi
15804
15805fi
15806
15807 LIBLZMA=
15808 LTLIBLZMA=
15809 INCLZMA=
15810 rpathdirs=
15811 ltrpathdirs=
15812 names_already_handled=
15813 names_next_round='lzma '
15814 while test -n "$names_next_round"; do
15815 names_this_round="$names_next_round"
15816 names_next_round=
15817 for name in $names_this_round; do
15818 already_handled=
15819 for n in $names_already_handled; do
15820 if test "$n" = "$name"; then
15821 already_handled=yes
15822 break
15823 fi
15824 done
15825 if test -z "$already_handled"; then
15826 names_already_handled="$names_already_handled $name"
15827 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15828 eval value=\"\$HAVE_LIB$uppername\"
15829 if test -n "$value"; then
15830 if test "$value" = yes; then
15831 eval value=\"\$LIB$uppername\"
15832 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15833 eval value=\"\$LTLIB$uppername\"
15834 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15835 else
15836 :
15837 fi
15838 else
15839 found_dir=
15840 found_la=
15841 found_so=
15842 found_a=
15843 if test $use_additional = yes; then
15844 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15845 found_dir="$additional_libdir"
15846 found_so="$additional_libdir/lib$name.$shlibext"
15847 if test -f "$additional_libdir/lib$name.la"; then
15848 found_la="$additional_libdir/lib$name.la"
15849 fi
15850 else
15851 if test -f "$additional_libdir/lib$name.$libext"; then
15852 found_dir="$additional_libdir"
15853 found_a="$additional_libdir/lib$name.$libext"
15854 if test -f "$additional_libdir/lib$name.la"; then
15855 found_la="$additional_libdir/lib$name.la"
15856 fi
15857 fi
15858 fi
15859 fi
15860 if test "X$found_dir" = "X"; then
15861 for x in $LDFLAGS $LTLIBLZMA; do
15862
15863 acl_save_prefix="$prefix"
15864 prefix="$acl_final_prefix"
15865 acl_save_exec_prefix="$exec_prefix"
15866 exec_prefix="$acl_final_exec_prefix"
15867 eval x=\"$x\"
15868 exec_prefix="$acl_save_exec_prefix"
15869 prefix="$acl_save_prefix"
15870
15871 case "$x" in
15872 -L*)
15873 dir=`echo "X$x" | sed -e 's/^X-L//'`
15874 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15875 found_dir="$dir"
15876 found_so="$dir/lib$name.$shlibext"
15877 if test -f "$dir/lib$name.la"; then
15878 found_la="$dir/lib$name.la"
15879 fi
15880 else
15881 if test -f "$dir/lib$name.$libext"; then
15882 found_dir="$dir"
15883 found_a="$dir/lib$name.$libext"
15884 if test -f "$dir/lib$name.la"; then
15885 found_la="$dir/lib$name.la"
15886 fi
15887 fi
15888 fi
15889 ;;
15890 esac
15891 if test "X$found_dir" != "X"; then
15892 break
15893 fi
15894 done
15895 fi
15896 if test "X$found_dir" != "X"; then
15897 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15898 if test "X$found_so" != "X"; then
15899 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15900 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15901 else
15902 haveit=
15903 for x in $ltrpathdirs; do
15904 if test "X$x" = "X$found_dir"; then
15905 haveit=yes
15906 break
15907 fi
15908 done
15909 if test -z "$haveit"; then
15910 ltrpathdirs="$ltrpathdirs $found_dir"
15911 fi
15912 if test "$hardcode_direct" = yes; then
15913 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15914 else
15915 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15916 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15917 haveit=
15918 for x in $rpathdirs; do
15919 if test "X$x" = "X$found_dir"; then
15920 haveit=yes
15921 break
15922 fi
15923 done
15924 if test -z "$haveit"; then
15925 rpathdirs="$rpathdirs $found_dir"
15926 fi
15927 else
15928 haveit=
15929 for x in $LDFLAGS $LIBLZMA; 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-L$found_dir"; then
15940 haveit=yes
15941 break
15942 fi
15943 done
15944 if test -z "$haveit"; then
15945 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15946 fi
15947 if test "$hardcode_minus_L" != no; then
15948 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15949 else
15950 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15951 fi
15952 fi
15953 fi
15954 fi
15955 else
15956 if test "X$found_a" != "X"; then
15957 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15958 else
15959 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15960 fi
15961 fi
15962 additional_includedir=
15963 case "$found_dir" in
15964 */lib | */lib/)
15965 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15966 additional_includedir="$basedir/include"
15967 ;;
15968 esac
15969 if test "X$additional_includedir" != "X"; then
15970 if test "X$additional_includedir" != "X/usr/include"; then
15971 haveit=
15972 if test "X$additional_includedir" = "X/usr/local/include"; then
15973 if test -n "$GCC"; then
15974 case $host_os in
15975 linux*) haveit=yes;;
15976 esac
15977 fi
15978 fi
15979 if test -z "$haveit"; then
15980 for x in $CPPFLAGS $INCLZMA; do
15981
15982 acl_save_prefix="$prefix"
15983 prefix="$acl_final_prefix"
15984 acl_save_exec_prefix="$exec_prefix"
15985 exec_prefix="$acl_final_exec_prefix"
15986 eval x=\"$x\"
15987 exec_prefix="$acl_save_exec_prefix"
15988 prefix="$acl_save_prefix"
15989
15990 if test "X$x" = "X-I$additional_includedir"; then
15991 haveit=yes
15992 break
15993 fi
15994 done
15995 if test -z "$haveit"; then
15996 if test -d "$additional_includedir"; then
15997 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15998 fi
15999 fi
16000 fi
16001 fi
16002 fi
16003 if test -n "$found_la"; then
16004 save_libdir="$libdir"
16005 case "$found_la" in
16006 */* | *\\*) . "$found_la" ;;
16007 *) . "./$found_la" ;;
16008 esac
16009 libdir="$save_libdir"
16010 for dep in $dependency_libs; do
16011 case "$dep" in
16012 -L*)
16013 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16014 if test "X$additional_libdir" != "X/usr/lib"; then
16015 haveit=
16016 if test "X$additional_libdir" = "X/usr/local/lib"; then
16017 if test -n "$GCC"; then
16018 case $host_os in
16019 linux*) haveit=yes;;
16020 esac
16021 fi
16022 fi
16023 if test -z "$haveit"; then
16024 haveit=
16025 for x in $LDFLAGS $LIBLZMA; do
16026
16027 acl_save_prefix="$prefix"
16028 prefix="$acl_final_prefix"
16029 acl_save_exec_prefix="$exec_prefix"
16030 exec_prefix="$acl_final_exec_prefix"
16031 eval x=\"$x\"
16032 exec_prefix="$acl_save_exec_prefix"
16033 prefix="$acl_save_prefix"
16034
16035 if test "X$x" = "X-L$additional_libdir"; then
16036 haveit=yes
16037 break
16038 fi
16039 done
16040 if test -z "$haveit"; then
16041 if test -d "$additional_libdir"; then
16042 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16043 fi
16044 fi
16045 haveit=
16046 for x in $LDFLAGS $LTLIBLZMA; do
16047
16048 acl_save_prefix="$prefix"
16049 prefix="$acl_final_prefix"
16050 acl_save_exec_prefix="$exec_prefix"
16051 exec_prefix="$acl_final_exec_prefix"
16052 eval x=\"$x\"
16053 exec_prefix="$acl_save_exec_prefix"
16054 prefix="$acl_save_prefix"
16055
16056 if test "X$x" = "X-L$additional_libdir"; then
16057 haveit=yes
16058 break
16059 fi
16060 done
16061 if test -z "$haveit"; then
16062 if test -d "$additional_libdir"; then
16063 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16064 fi
16065 fi
16066 fi
16067 fi
16068 ;;
16069 -R*)
16070 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16071 if test "$enable_rpath" != no; then
16072 haveit=
16073 for x in $rpathdirs; do
16074 if test "X$x" = "X$dir"; then
16075 haveit=yes
16076 break
16077 fi
16078 done
16079 if test -z "$haveit"; then
16080 rpathdirs="$rpathdirs $dir"
16081 fi
16082 haveit=
16083 for x in $ltrpathdirs; do
16084 if test "X$x" = "X$dir"; then
16085 haveit=yes
16086 break
16087 fi
16088 done
16089 if test -z "$haveit"; then
16090 ltrpathdirs="$ltrpathdirs $dir"
16091 fi
16092 fi
16093 ;;
16094 -l*)
16095 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16096 ;;
16097 *.la)
16098 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16099 ;;
16100 *)
16101 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16102 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16103 ;;
16104 esac
16105 done
16106 fi
16107 else
16108 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16109 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16110 fi
16111 fi
16112 fi
16113 done
16114 done
16115 if test "X$rpathdirs" != "X"; then
16116 if test -n "$hardcode_libdir_separator"; then
16117 alldirs=
16118 for found_dir in $rpathdirs; do
16119 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16120 done
16121 acl_save_libdir="$libdir"
16122 libdir="$alldirs"
16123 eval flag=\"$hardcode_libdir_flag_spec\"
16124 libdir="$acl_save_libdir"
16125 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16126 else
16127 for found_dir in $rpathdirs; do
16128 acl_save_libdir="$libdir"
16129 libdir="$found_dir"
16130 eval flag=\"$hardcode_libdir_flag_spec\"
16131 libdir="$acl_save_libdir"
16132 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16133 done
16134 fi
16135 fi
16136 if test "X$ltrpathdirs" != "X"; then
16137 for found_dir in $ltrpathdirs; do
16138 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16139 done
16140 fi
16141
16142
16143 ac_save_CPPFLAGS="$CPPFLAGS"
16144
16145 for element in $INCLZMA; do
16146 haveit=
16147 for x in $CPPFLAGS; do
16148
16149 acl_save_prefix="$prefix"
16150 prefix="$acl_final_prefix"
16151 acl_save_exec_prefix="$exec_prefix"
16152 exec_prefix="$acl_final_exec_prefix"
16153 eval x=\"$x\"
16154 exec_prefix="$acl_save_exec_prefix"
16155 prefix="$acl_save_prefix"
16156
16157 if test "X$x" = "X$element"; then
16158 haveit=yes
16159 break
16160 fi
16161 done
16162 if test -z "$haveit"; then
16163 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16164 fi
16165 done
16166
16167
16168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16169$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16170if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16171 $as_echo_n "(cached) " >&6
16172else
16173
16174 ac_save_LIBS="$LIBS"
16175 LIBS="$LIBS $LIBLZMA"
16176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16177/* end confdefs.h. */
16178#include "lzma.h"
16179int
16180main ()
16181{
16182lzma_index_iter iter;
16183 lzma_index_iter_init (&iter, 0);
16184 lzma_mf_is_supported (LZMA_MF_HC3);
16185 ;
16186 return 0;
16187}
16188_ACEOF
16189if ac_fn_c_try_link "$LINENO"; then :
16190 ac_cv_liblzma=yes
16191else
16192 ac_cv_liblzma=no
16193fi
16194rm -f core conftest.err conftest.$ac_objext \
16195 conftest$ac_exeext conftest.$ac_ext
16196 LIBS="$ac_save_LIBS"
16197
16198fi
16199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16200$as_echo "$ac_cv_liblzma" >&6; }
16201 if test "$ac_cv_liblzma" = yes; then
16202 HAVE_LIBLZMA=yes
16203
16204$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16205
16206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16207$as_echo_n "checking how to link with liblzma... " >&6; }
16208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16209$as_echo "$LIBLZMA" >&6; }
16210 else
16211 HAVE_LIBLZMA=no
16212 CPPFLAGS="$ac_save_CPPFLAGS"
16213 LIBLZMA=
16214 LTLIBLZMA=
16215 fi
16216
16217
16218
16219
16220
16221
16222 if test "$HAVE_LIBLZMA" != yes; then
16223 if test "$with_lzma" = yes; then
d0ac1c44 16224 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
16225 fi
16226 fi
16227 fi
16228fi
16229
3fc11d3e
JM
16230LIBGUI="../libgui/src/libgui.a"
16231GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16232
16233
7a292a7a 16234
3fc11d3e
JM
16235WIN32LDAPP=
16236
16237
16238
d91670b9 16239case "${host}" in
686a5eed 16240*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16241 configdir="win"
16242 ;;
16243*)
16244 configdir="unix"
16245 ;;
16246esac
3fc11d3e
JM
16247
16248GDBTKLIBS=
16249if test "${enable_gdbtk}" = "yes"; then
16250
d1c3b63a
KS
16251 # Gdbtk must have an absolute path to srcdir in order to run
16252 # properly when not installed.
16253 here=`pwd`
16254 cd ${srcdir}
16255 GDBTK_SRC_DIR=`pwd`
16256 cd $here
16257
bec39cab 16258
5062cc19
KS
16259 #
16260 # Ok, lets find the tcl configuration
16261 # First, look for one uninstalled.
16262 # the alternative search directory is invoked by --with-tcl
16263 #
3fc11d3e 16264
5062cc19
KS
16265 if test x"${no_tcl}" = x ; then
16266 # we reset no_tcl in case something fails here
16267 no_tcl=true
bec39cab 16268
81ecdfbb
RW
16269# Check whether --with-tcl was given.
16270if test "${with_tcl+set}" = set; then :
16271 withval=$with_tcl; with_tclconfig=${withval}
16272fi
16273
16274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16275$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 16276 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 16277 $as_echo_n "(cached) " >&6
3fc11d3e 16278else
bec39cab 16279
3fc11d3e 16280
5062cc19
KS
16281 # First check to see if --with-tcl was specified.
16282 case "${host}" in
16283 *-*-cygwin*) platDir="win" ;;
16284 *) platDir="unix" ;;
16285 esac
16286 if test x"${with_tclconfig}" != x ; then
16287 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16288 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16289 else
d0ac1c44 16290 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16291 fi
16292 fi
16293
16294 # then check for a private Tcl installation
16295 if test x"${ac_cv_c_tclconfig}" = x ; then
16296 for i in \
16297 ../tcl \
16298 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16299 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16300 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16301 ../../tcl \
16302 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16303 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16304 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16305 ../../../tcl \
16306 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16307 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16308 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16309 if test -f "$i/$platDir/tclConfig.sh" ; then
16310 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16311 break
16312 fi
16313 done
16314 fi
16315
16316 # on Darwin, check in Framework installation locations
16317 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16318 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16319 `ls -d /Library/Frameworks 2>/dev/null` \
16320 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16321 `ls -d /System/Library/Frameworks 2>/dev/null` \
16322 ; do
16323 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16324 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16325 break
16326 fi
16327 done
16328 fi
16329
16330 # check in a few common install locations
16331 if test x"${ac_cv_c_tclconfig}" = x ; then
16332 for i in `ls -d ${libdir} 2>/dev/null` \
16333 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16334 `ls -d ${prefix}/lib 2>/dev/null` \
16335 `ls -d /usr/local/lib 2>/dev/null` \
16336 `ls -d /usr/contrib/lib 2>/dev/null` \
16337 `ls -d /usr/lib 2>/dev/null` \
16338 ; do
16339 if test -f "$i/tclConfig.sh" ; then
16340 ac_cv_c_tclconfig=`(cd $i; pwd)`
16341 break
16342 fi
16343 done
16344 fi
3fc11d3e 16345
5062cc19
KS
16346 # check in a few other private locations
16347 if test x"${ac_cv_c_tclconfig}" = x ; then
16348 for i in \
16349 ${srcdir}/../tcl \
16350 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16351 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16352 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16353 if test -f "$i/$platDir/tclConfig.sh" ; then
16354 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16355 break
16356 fi
16357 done
16358 fi
bec39cab 16359
3fc11d3e
JM
16360fi
16361
5062cc19
KS
16362
16363 if test x"${ac_cv_c_tclconfig}" = x ; then
16364 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16365 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16366$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16367 else
16368 no_tcl=
16369 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16371$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16372 fi
16373 fi
3fc11d3e 16374
bec39cab 16375
85541719
DE
16376 # If $no_tk is nonempty, then we can't do Tk, and there is no
16377 # point to doing Tcl.
bec39cab 16378
5062cc19
KS
16379 #
16380 # Ok, lets find the tk configuration
16381 # First, look for one uninstalled.
16382 # the alternative search directory is invoked by --with-tk
16383 #
3fc11d3e 16384
5062cc19
KS
16385 if test x"${no_tk}" = x ; then
16386 # we reset no_tk in case something fails here
16387 no_tk=true
bec39cab 16388
81ecdfbb
RW
16389# Check whether --with-tk was given.
16390if test "${with_tk+set}" = set; then :
16391 withval=$with_tk; with_tkconfig=${withval}
16392fi
16393
16394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16395$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 16396 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 16397 $as_echo_n "(cached) " >&6
bec39cab 16398else
3fc11d3e
JM
16399
16400
5062cc19
KS
16401 # First check to see if --with-tkconfig was specified.
16402 if test x"${with_tkconfig}" != x ; then
16403 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16404 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16405 else
d0ac1c44 16406 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16407 fi
16408 fi
3fc11d3e 16409
5062cc19
KS
16410 # then check for a private Tk library
16411 case "${host}" in
16412 *-*-cygwin*) platDir="win" ;;
16413 *) platDir="unix" ;;
16414 esac
16415 if test x"${ac_cv_c_tkconfig}" = x ; then
16416 for i in \
16417 ../tk \
16418 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16419 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16420 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16421 ../../tk \
16422 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16423 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16424 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16425 ../../../tk \
16426 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16427 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16428 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16429 if test -f "$i/$platDir/tkConfig.sh" ; then
16430 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16431 break
16432 fi
16433 done
16434 fi
16435
16436 # on Darwin, check in Framework installation locations
16437 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16438 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16439 `ls -d /Library/Frameworks 2>/dev/null` \
16440 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16441 `ls -d /System/Library/Frameworks 2>/dev/null` \
16442 ; do
16443 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16444 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16445 break
16446 fi
16447 done
16448 fi
16449
16450 # check in a few common install locations
16451 if test x"${ac_cv_c_tkconfig}" = x ; then
16452 for i in `ls -d ${libdir} 2>/dev/null` \
16453 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16454 `ls -d ${prefix}/lib 2>/dev/null` \
16455 `ls -d /usr/local/lib 2>/dev/null` \
16456 `ls -d /usr/contrib/lib 2>/dev/null` \
16457 `ls -d /usr/lib 2>/dev/null` \
16458 ; do
16459 if test -f "$i/tkConfig.sh" ; then
16460 ac_cv_c_tkconfig=`(cd $i; pwd)`
16461 break
16462 fi
16463 done
16464 fi
16465 # check in a few other private locations
16466 if test x"${ac_cv_c_tkconfig}" = x ; then
16467 for i in \
16468 ${srcdir}/../tk \
16469 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16470 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16471 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16472 if test -f "$i/$platDir/tkConfig.sh" ; then
16473 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16474 break
16475 fi
16476 done
16477 fi
3fc11d3e 16478
3fc11d3e
JM
16479fi
16480
16481
5062cc19
KS
16482 if test x"${ac_cv_c_tkconfig}" = x ; then
16483 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16484 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16485$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16486 else
16487 no_tk=
16488 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16490$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16491 fi
3fc11d3e 16492 fi
dd2504ab 16493
dd2504ab 16494
85541719
DE
16495 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16496
81ecdfbb
RW
16497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16498$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16499
16500 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16502$as_echo "loading" >&6; }
85541719
DE
16503 . ${TCL_BIN_DIR}/tclConfig.sh
16504 else
81ecdfbb
RW
16505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16506$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16507 fi
16508
16509 # eval is required to do the TCL_DBGX substitution
16510 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16511 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16512
16513 # If the TCL_BIN_DIR is the build directory (not the install directory),
16514 # then set the common variable name to the value of the build variables.
16515 # For example, the variable TCL_LIB_SPEC will be set to the value
16516 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16517 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16518 # installed and uninstalled version of Tcl.
16519 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16520 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16521 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16522 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16523 elif test "`uname -s`" = "Darwin"; then
16524 # If Tcl was built as a framework, attempt to use the libraries
16525 # from the framework at the given location so that linking works
a68ffae9 16526 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16527 case ${TCL_DEFS} in
16528 *TCL_FRAMEWORK*)
16529 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16530 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16531 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16532 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16533 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16534 break
16535 fi
16536 done
16537 fi
16538 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16539 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16540 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16541 fi
16542 ;;
16543 esac
16544 fi
16545
16546 # eval is required to do the TCL_DBGX substitution
16547 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16548 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16549 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16550 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566 # Check for in-tree tcl
16567 here=`pwd`
16568 cd ${srcdir}/..
16569 topdir=`pwd`
16570 cd ${here}
16571
16572 intree="no"
16573 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16574 intree="yes"
16575 fi
16576
16577 # Find Tcl private headers
16578 if test x"${intree}" = xno; then
16579
81ecdfbb
RW
16580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16581$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16582 private_dir=""
16583 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16584 if test -f ${dir}/tclInt.h ; then
16585 private_dir=${dir}
16586 fi
16587
16588 if test x"${private_dir}" = x; then
d0ac1c44 16589 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16590 else
16591 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16593$as_echo "${private_dir}" >&6; }
85541719
DE
16594 fi
16595
16596 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16597 TCL_LIBRARY="${TCL_LIB_SPEC}"
16598 TCL_DEPS=""
16599 else
16600 # If building tcl in the same src tree, private headers
16601 # are not needed, but we need to be sure to use the right
16602 # headers library
16603 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16604 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16605 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16606 fi
16607
16608
16609
16610
16611
81ecdfbb
RW
16612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16613$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16614
5062cc19 16615 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16617$as_echo "loading" >&6; }
5062cc19 16618 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16619 else
81ecdfbb
RW
16620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16621$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16622 fi
bec39cab 16623
5062cc19
KS
16624 # eval is required to do the TK_DBGX substitution
16625 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16626 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16627
16628 # If the TK_BIN_DIR is the build directory (not the install directory),
16629 # then set the common variable name to the value of the build variables.
16630 # For example, the variable TK_LIB_SPEC will be set to the value
16631 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16632 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16633 # installed and uninstalled version of Tcl.
85541719 16634 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16635 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16636 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16637 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16638 elif test "`uname -s`" = "Darwin"; then
16639 # If Tk was built as a framework, attempt to use the libraries
16640 # from the framework at the given location so that linking works
a68ffae9 16641 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16642 case ${TK_DEFS} in
16643 *TK_FRAMEWORK*)
85541719 16644 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16645 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16646 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16647 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16648 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16649 break
16650 fi
16651 done
16652 fi
85541719 16653 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16654 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16655 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16656 fi
16657 ;;
16658 esac
3fc11d3e
JM
16659 fi
16660
5062cc19
KS
16661 # eval is required to do the TK_DBGX substitution
16662 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16663 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16664 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16665 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16666
3fc11d3e
JM
16667
16668
bec39cab
AC
16669
16670
16671
16672
16673
16674
16675
3fc11d3e 16676
3fc11d3e 16677
bec39cab 16678
bec39cab 16679
85541719
DE
16680 # Check for in-tree Tk
16681 intree="no"
16682 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16683 intree="yes"
16684 fi
3fc11d3e 16685
85541719
DE
16686 # Find Tk private headers
16687 if test x"${intree}" = xno; then
3fc11d3e 16688
81ecdfbb
RW
16689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16690$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16691 private_dir=""
16692 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16693 if test -f ${dir}/tkInt.h; then
16694 private_dir=${dir}
3fc11d3e 16695 fi
bec39cab 16696
5062cc19 16697 if test x"${private_dir}" = x; then
d0ac1c44 16698 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16699 else
5062cc19 16700 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16702$as_echo "${private_dir}" >&6; }
3fc11d3e 16703 fi
3fc11d3e 16704
85541719
DE
16705 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16706 TK_LIBRARY=${TK_LIB_SPEC}
16707 TK_DEPS=""
16708 else
16709 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16710 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16711 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16712 fi
3fc11d3e
JM
16713
16714
3fc11d3e
JM
16715
16716
3fc11d3e 16717
85541719 16718 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16719
85541719
DE
16720 # Include some libraries that Tcl and Tk want.
16721 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16722 # Yes, the ordering seems wrong here. But it isn't.
16723 # TK_LIBS is the list of libraries that need to be linked
16724 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16725 # were in LIBS then any link tests after this point would
16726 # try to include things like `$(LIBGUI)', which wouldn't work.
16727 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16728
85541719
DE
16729 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16730 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16731 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16732 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16733 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16734 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16735 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16736
85541719
DE
16737 if test x$gdb_cv_os_cygwin = xyes; then
16738 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16739 WIN32LDAPP="-Wl,--subsystem,console"
16740 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16741 fi
ffc6a242 16742
81ecdfbb 16743 subdirs="$subdirs gdbtk"
3ace7edb 16744
85541719 16745 fi
3fc11d3e
JM
16746fi
16747
16748
16749
16750
16751
16752
16753
16754
81ecdfbb
RW
16755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16756$as_echo_n "checking for X... " >&6; }
bec39cab 16757
c906108c 16758
81ecdfbb
RW
16759# Check whether --with-x was given.
16760if test "${with_x+set}" = set; then :
16761 withval=$with_x;
16762fi
c906108c
SS
16763
16764# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16765if test "x$with_x" = xno; then
16766 # The user explicitly disabled X.
16767 have_x=disabled
16768else
81ecdfbb 16769 case $x_includes,$x_libraries in #(
d0ac1c44
SM
16770 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16771 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 16772 $as_echo_n "(cached) " >&6
c906108c
SS
16773else
16774 # One or both of the vars are not set, and there is no cached value.
bec39cab 16775ac_x_includes=no ac_x_libraries=no
81ecdfbb 16776rm -f -r conftest.dir
bec39cab
AC
16777if mkdir conftest.dir; then
16778 cd conftest.dir
bec39cab 16779 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16780incroot:
16781 @echo incroot='${INCROOT}'
16782usrlibdir:
16783 @echo usrlibdir='${USRLIBDIR}'
16784libdir:
16785 @echo libdir='${LIBDIR}'
16786_ACEOF
16787 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 16788 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
16789 for ac_var in incroot usrlibdir libdir; do
16790 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16791 done
c906108c 16792 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16793 for ac_extension in a so sl dylib la dll; do
16794 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16795 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16796 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16797 fi
16798 done
16799 # Screen out bogus values from the imake configuration. They are
16800 # bogus both because they are the default anyway, and because
16801 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16802 case $ac_im_incroot in
81ecdfbb 16803 /usr/include) ac_x_includes= ;;
bec39cab 16804 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16805 esac
bec39cab 16806 case $ac_im_usrlibdir in
81ecdfbb 16807 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16808 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16809 esac
16810 fi
16811 cd ..
81ecdfbb 16812 rm -f -r conftest.dir
c906108c
SS
16813fi
16814
bec39cab
AC
16815# Standard set of common directories for X headers.
16816# Check X11 before X11Rn because it is often a symlink to the current release.
16817ac_x_header_dirs='
16818/usr/X11/include
81ecdfbb 16819/usr/X11R7/include
bec39cab
AC
16820/usr/X11R6/include
16821/usr/X11R5/include
16822/usr/X11R4/include
16823
16824/usr/include/X11
81ecdfbb 16825/usr/include/X11R7
bec39cab
AC
16826/usr/include/X11R6
16827/usr/include/X11R5
16828/usr/include/X11R4
16829
16830/usr/local/X11/include
81ecdfbb 16831/usr/local/X11R7/include
bec39cab
AC
16832/usr/local/X11R6/include
16833/usr/local/X11R5/include
16834/usr/local/X11R4/include
16835
16836/usr/local/include/X11
81ecdfbb 16837/usr/local/include/X11R7
bec39cab
AC
16838/usr/local/include/X11R6
16839/usr/local/include/X11R5
16840/usr/local/include/X11R4
16841
16842/usr/X386/include
16843/usr/x386/include
16844/usr/XFree86/include/X11
16845
16846/usr/include
16847/usr/local/include
16848/usr/unsupported/include
16849/usr/athena/include
16850/usr/local/x11r5/include
16851/usr/lpp/Xamples/include
16852
16853/usr/openwin/include
16854/usr/openwin/share/include'
16855
16856if test "$ac_x_includes" = no; then
81ecdfbb 16857 # Guess where to find include files, by looking for Xlib.h.
c906108c 16858 # First, try using that file with no special directory specified.
81ecdfbb 16859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16860/* end confdefs.h. */
81ecdfbb 16861#include <X11/Xlib.h>
bec39cab 16862_ACEOF
81ecdfbb 16863if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16864 # We can compile using X headers with no special include directory.
16865ac_x_includes=
16866else
bec39cab 16867 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16868 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16869 ac_x_includes=$ac_dir
16870 break
16871 fi
16872done
c906108c 16873fi
d0ac1c44 16874rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 16875fi # $ac_x_includes = no
c906108c 16876
bec39cab 16877if test "$ac_x_libraries" = no; then
c906108c 16878 # Check for the libraries.
c906108c
SS
16879 # See if we find them without any special options.
16880 # Don't add to $LIBS permanently.
bec39cab 16881 ac_save_LIBS=$LIBS
81ecdfbb
RW
16882 LIBS="-lX11 $LIBS"
16883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16884/* end confdefs.h. */
81ecdfbb 16885#include <X11/Xlib.h>
bec39cab
AC
16886int
16887main ()
16888{
81ecdfbb 16889XrmInitialize ()
bec39cab
AC
16890 ;
16891 return 0;
16892}
16893_ACEOF
81ecdfbb 16894if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16895 LIBS=$ac_save_LIBS
c906108c
SS
16896# We can link X programs with no special library path.
16897ac_x_libraries=
16898else
81ecdfbb
RW
16899 LIBS=$ac_save_LIBS
16900for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16901do
bec39cab 16902 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16903 for ac_extension in a so sl dylib la dll; do
16904 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16905 ac_x_libraries=$ac_dir
16906 break 2
16907 fi
16908 done
16909done
16910fi
81ecdfbb
RW
16911rm -f core conftest.err conftest.$ac_objext \
16912 conftest$ac_exeext conftest.$ac_ext
bec39cab 16913fi # $ac_x_libraries = no
c906108c 16914
81ecdfbb
RW
16915case $ac_x_includes,$ac_x_libraries in #(
16916 no,* | *,no | *\'*)
16917 # Didn't find X, or a directory has "'" in its name.
16918 ac_cv_have_x="have_x=no";; #(
16919 *)
16920 # Record where we found X for the cache.
16921 ac_cv_have_x="have_x=yes\
16922 ac_x_includes='$ac_x_includes'\
16923 ac_x_libraries='$ac_x_libraries'"
16924esac
c906108c 16925fi
81ecdfbb
RW
16926;; #(
16927 *) have_x=yes;;
16928 esac
c906108c
SS
16929 eval "$ac_cv_have_x"
16930fi # $with_x != no
16931
16932if test "$have_x" != yes; then
81ecdfbb
RW
16933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16934$as_echo "$have_x" >&6; }
c906108c
SS
16935 no_x=yes
16936else
16937 # If each of the values was on the command line, it overrides each guess.
16938 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16939 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16940 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16941 ac_cv_have_x="have_x=yes\
16942 ac_x_includes='$x_includes'\
16943 ac_x_libraries='$x_libraries'"
16944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16945$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16946fi
16947
16948
bec39cab 16949# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16950# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16951# This code just checks for a few cases where we'd like to ignore those
16952# definitions, even when they're present in the '.mt' file. These cases
16953# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16954# not part of the source tree.
7a292a7a 16955#
81ecdfbb
RW
16956# Check whether --enable-sim was given.
16957if test "${enable_sim+set}" = set; then :
16958 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16959 echo "enableval = ${enableval}";
16960 case "${enableval}" in
16961 yes) ignore_sim=false ;;
16962 no) ignore_sim=true ;;
16963 *) ignore_sim=false ;;
16964 esac
16965else
16966 ignore_sim=false
81ecdfbb
RW
16967fi
16968
7a292a7a
SS
16969
16970if test ! -d "${srcdir}/../sim"; then
16971 ignore_sim=true
16972fi
16973
9b624dbe
UW
16974SIM=
16975SIM_OBS=
16976if test "${ignore_sim}" = "false"; then
16977 if test x"${gdb_sim}" != x ; then
16978 SIM="${gdb_sim}"
16979 SIM_OBS="remote-sim.o"
60ca704f 16980
81ecdfbb 16981$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16982
976102cd
PA
16983
16984 # Some tdep code should only be compiled in when the ppc sim is
16985 # built. PR sim/13418.
16986 case $target in
16987 powerpc*-*-*)
16988
16989$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16990
16991 ;;
16992 esac
9b624dbe 16993 fi
7a292a7a
SS
16994fi
16995
16996
16997
c906108c
SS
16998
16999
17000
17001
17002
17003
dfcd3bfb 17004
e56ac5c3
AC
17005
17006
b3a90332
AC
17007
17008
c35f4ffc 17009# List of host floatformats.
bec39cab
AC
17010
17011cat >>confdefs.h <<_ACEOF
c35f4ffc 17012#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17013_ACEOF
c35f4ffc 17014
bec39cab
AC
17015
17016cat >>confdefs.h <<_ACEOF
c35f4ffc 17017#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17018_ACEOF
17019
c35f4ffc 17020
bec39cab 17021cat >>confdefs.h <<_ACEOF
c35f4ffc 17022#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17023_ACEOF
c35f4ffc
AC
17024
17025
c906108c
SS
17026# target_subdir is used by the testsuite to find the target libraries.
17027target_subdir=
17028if test "${host}" != "${target}"; then
17029 target_subdir="${target_alias}/"
17030fi
17031
17032
21ea5acd 17033# Import nat definitions.
2b351b19 17034nat_makefile_frag=/dev/null
771b4502 17035if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17036 . ${srcdir}/configure.nat
17037 nativefile=$NAT_FILE
c906108c 17038fi
c906108c 17039
c906108c
SS
17040
17041
17042
21ea5acd
SDJ
17043
17044
17045
17046
17047
c906108c
SS
17048
17049
b00a8037 17050if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17051
17052cat >>confdefs.h <<_ACEOF
b00a8037 17053#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17054_ACEOF
b00a8037
DJ
17055
17056fi
17057
496c0e1b
JB
17058# Check whether --enable-gdbserver was given.
17059if test "${enable_gdbserver+set}" = set; then :
17060 enableval=$enable_gdbserver; case "${enableval}" in
17061 yes| no|auto) ;;
d0ac1c44 17062 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17063esac
17064else
17065 enable_gdbserver=auto
17066fi
17067
17068
17069# We only build gdbserver automatically in a native configuration, and
17070# only if the user did not explicitly disable its build.
17071if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17073$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17074 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17076$as_echo "yes" >&6; }
17077 subdirs="$subdirs gdbserver"
3ace7edb 17078
496c0e1b 17079 gdbserver_build_enabled=yes
8dcde887 17080 else
81ecdfbb
RW
17081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17082$as_echo "no" >&6; }
8dcde887
MK
17083 fi
17084fi
17085
496c0e1b
JB
17086# If the user explicitly request the gdbserver to be built, verify that
17087# we were in fact able to enable it.
17088if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17089 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17090fi
17091
393fd4c3
YQ
17092# Check for babeltrace and babeltrace-ctf
17093
17094# Check whether --with-babeltrace was given.
17095if test "${with_babeltrace+set}" = set; then :
17096 withval=$with_babeltrace;
17097else
17098 with_babeltrace=auto
17099fi
17100
17101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17102$as_echo_n "checking whether to use babeltrace... " >&6; }
17103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17104$as_echo "$with_babeltrace" >&6; }
17105
17106if test "x$with_babeltrace" = "xno"; then
17107 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17108$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17109else
17110 # Append -Werror to CFLAGS so that configure can catch the warning
17111 # "assignment from incompatible pointer type", which is related to
17112 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17113 # in GDB, while babeltrace 1.0.3 is broken.
17114 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17115 # safe to save and restore CFLAGS here.
17116 saved_CFLAGS=$CFLAGS
17117 CFLAGS="$CFLAGS -Werror"
17118
17119
17120
17121
17122
17123
17124
17125
17126 use_additional=yes
17127
17128 acl_save_prefix="$prefix"
17129 prefix="$acl_final_prefix"
17130 acl_save_exec_prefix="$exec_prefix"
17131 exec_prefix="$acl_final_exec_prefix"
17132
17133 eval additional_includedir=\"$includedir\"
17134 eval additional_libdir=\"$libdir\"
17135
17136 exec_prefix="$acl_save_exec_prefix"
17137 prefix="$acl_save_prefix"
17138
17139
17140# Check whether --with-libbabeltrace-prefix was given.
17141if test "${with_libbabeltrace_prefix+set}" = set; then :
17142 withval=$with_libbabeltrace_prefix;
17143 if test "X$withval" = "Xno"; then
17144 use_additional=no
17145 else
17146 if test "X$withval" = "X"; then
17147
17148 acl_save_prefix="$prefix"
17149 prefix="$acl_final_prefix"
17150 acl_save_exec_prefix="$exec_prefix"
17151 exec_prefix="$acl_final_exec_prefix"
17152
17153 eval additional_includedir=\"$includedir\"
17154 eval additional_libdir=\"$libdir\"
17155
17156 exec_prefix="$acl_save_exec_prefix"
17157 prefix="$acl_save_prefix"
17158
17159 else
17160 additional_includedir="$withval/include"
17161 additional_libdir="$withval/lib"
17162 fi
17163 fi
17164
17165fi
17166
17167 LIBBABELTRACE=
17168 LTLIBBABELTRACE=
17169 INCBABELTRACE=
17170 rpathdirs=
17171 ltrpathdirs=
17172 names_already_handled=
17173 names_next_round='babeltrace babeltrace-ctf'
17174 while test -n "$names_next_round"; do
17175 names_this_round="$names_next_round"
17176 names_next_round=
17177 for name in $names_this_round; do
17178 already_handled=
17179 for n in $names_already_handled; do
17180 if test "$n" = "$name"; then
17181 already_handled=yes
17182 break
17183 fi
17184 done
17185 if test -z "$already_handled"; then
17186 names_already_handled="$names_already_handled $name"
17187 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17188 eval value=\"\$HAVE_LIB$uppername\"
17189 if test -n "$value"; then
17190 if test "$value" = yes; then
17191 eval value=\"\$LIB$uppername\"
17192 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17193 eval value=\"\$LTLIB$uppername\"
17194 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17195 else
17196 :
17197 fi
17198 else
17199 found_dir=
17200 found_la=
17201 found_so=
17202 found_a=
17203 if test $use_additional = yes; then
17204 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17205 found_dir="$additional_libdir"
17206 found_so="$additional_libdir/lib$name.$shlibext"
17207 if test -f "$additional_libdir/lib$name.la"; then
17208 found_la="$additional_libdir/lib$name.la"
17209 fi
17210 else
17211 if test -f "$additional_libdir/lib$name.$libext"; then
17212 found_dir="$additional_libdir"
17213 found_a="$additional_libdir/lib$name.$libext"
17214 if test -f "$additional_libdir/lib$name.la"; then
17215 found_la="$additional_libdir/lib$name.la"
17216 fi
17217 fi
17218 fi
17219 fi
17220 if test "X$found_dir" = "X"; then
17221 for x in $LDFLAGS $LTLIBBABELTRACE; do
17222
17223 acl_save_prefix="$prefix"
17224 prefix="$acl_final_prefix"
17225 acl_save_exec_prefix="$exec_prefix"
17226 exec_prefix="$acl_final_exec_prefix"
17227 eval x=\"$x\"
17228 exec_prefix="$acl_save_exec_prefix"
17229 prefix="$acl_save_prefix"
17230
17231 case "$x" in
17232 -L*)
17233 dir=`echo "X$x" | sed -e 's/^X-L//'`
17234 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17235 found_dir="$dir"
17236 found_so="$dir/lib$name.$shlibext"
17237 if test -f "$dir/lib$name.la"; then
17238 found_la="$dir/lib$name.la"
17239 fi
17240 else
17241 if test -f "$dir/lib$name.$libext"; then
17242 found_dir="$dir"
17243 found_a="$dir/lib$name.$libext"
17244 if test -f "$dir/lib$name.la"; then
17245 found_la="$dir/lib$name.la"
17246 fi
17247 fi
17248 fi
17249 ;;
17250 esac
17251 if test "X$found_dir" != "X"; then
17252 break
17253 fi
17254 done
17255 fi
17256 if test "X$found_dir" != "X"; then
17257 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17258 if test "X$found_so" != "X"; then
17259 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17260 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17261 else
17262 haveit=
17263 for x in $ltrpathdirs; do
17264 if test "X$x" = "X$found_dir"; then
17265 haveit=yes
17266 break
17267 fi
17268 done
17269 if test -z "$haveit"; then
17270 ltrpathdirs="$ltrpathdirs $found_dir"
17271 fi
17272 if test "$hardcode_direct" = yes; then
17273 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17274 else
17275 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17276 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17277 haveit=
17278 for x in $rpathdirs; do
17279 if test "X$x" = "X$found_dir"; then
17280 haveit=yes
17281 break
17282 fi
17283 done
17284 if test -z "$haveit"; then
17285 rpathdirs="$rpathdirs $found_dir"
17286 fi
17287 else
17288 haveit=
17289 for x in $LDFLAGS $LIBBABELTRACE; 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-L$found_dir"; then
17300 haveit=yes
17301 break
17302 fi
17303 done
17304 if test -z "$haveit"; then
17305 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17306 fi
17307 if test "$hardcode_minus_L" != no; then
17308 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17309 else
17310 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17311 fi
17312 fi
17313 fi
17314 fi
17315 else
17316 if test "X$found_a" != "X"; then
17317 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17318 else
17319 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17320 fi
17321 fi
17322 additional_includedir=
17323 case "$found_dir" in
17324 */lib | */lib/)
17325 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17326 additional_includedir="$basedir/include"
17327 ;;
17328 esac
17329 if test "X$additional_includedir" != "X"; then
17330 if test "X$additional_includedir" != "X/usr/include"; then
17331 haveit=
17332 if test "X$additional_includedir" = "X/usr/local/include"; then
17333 if test -n "$GCC"; then
17334 case $host_os in
17335 linux*) haveit=yes;;
17336 esac
17337 fi
17338 fi
17339 if test -z "$haveit"; then
17340 for x in $CPPFLAGS $INCBABELTRACE; do
17341
17342 acl_save_prefix="$prefix"
17343 prefix="$acl_final_prefix"
17344 acl_save_exec_prefix="$exec_prefix"
17345 exec_prefix="$acl_final_exec_prefix"
17346 eval x=\"$x\"
17347 exec_prefix="$acl_save_exec_prefix"
17348 prefix="$acl_save_prefix"
17349
17350 if test "X$x" = "X-I$additional_includedir"; then
17351 haveit=yes
17352 break
17353 fi
17354 done
17355 if test -z "$haveit"; then
17356 if test -d "$additional_includedir"; then
17357 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17358 fi
17359 fi
17360 fi
17361 fi
17362 fi
17363 if test -n "$found_la"; then
17364 save_libdir="$libdir"
17365 case "$found_la" in
17366 */* | *\\*) . "$found_la" ;;
17367 *) . "./$found_la" ;;
17368 esac
17369 libdir="$save_libdir"
17370 for dep in $dependency_libs; do
17371 case "$dep" in
17372 -L*)
17373 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17374 if test "X$additional_libdir" != "X/usr/lib"; then
17375 haveit=
17376 if test "X$additional_libdir" = "X/usr/local/lib"; then
17377 if test -n "$GCC"; then
17378 case $host_os in
17379 linux*) haveit=yes;;
17380 esac
17381 fi
17382 fi
17383 if test -z "$haveit"; then
17384 haveit=
17385 for x in $LDFLAGS $LIBBABELTRACE; do
17386
17387 acl_save_prefix="$prefix"
17388 prefix="$acl_final_prefix"
17389 acl_save_exec_prefix="$exec_prefix"
17390 exec_prefix="$acl_final_exec_prefix"
17391 eval x=\"$x\"
17392 exec_prefix="$acl_save_exec_prefix"
17393 prefix="$acl_save_prefix"
17394
17395 if test "X$x" = "X-L$additional_libdir"; then
17396 haveit=yes
17397 break
17398 fi
17399 done
17400 if test -z "$haveit"; then
17401 if test -d "$additional_libdir"; then
17402 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17403 fi
17404 fi
17405 haveit=
17406 for x in $LDFLAGS $LTLIBBABELTRACE; do
17407
17408 acl_save_prefix="$prefix"
17409 prefix="$acl_final_prefix"
17410 acl_save_exec_prefix="$exec_prefix"
17411 exec_prefix="$acl_final_exec_prefix"
17412 eval x=\"$x\"
17413 exec_prefix="$acl_save_exec_prefix"
17414 prefix="$acl_save_prefix"
17415
17416 if test "X$x" = "X-L$additional_libdir"; then
17417 haveit=yes
17418 break
17419 fi
17420 done
17421 if test -z "$haveit"; then
17422 if test -d "$additional_libdir"; then
17423 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17424 fi
17425 fi
17426 fi
17427 fi
17428 ;;
17429 -R*)
17430 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17431 if test "$enable_rpath" != no; then
17432 haveit=
17433 for x in $rpathdirs; do
17434 if test "X$x" = "X$dir"; then
17435 haveit=yes
17436 break
17437 fi
17438 done
17439 if test -z "$haveit"; then
17440 rpathdirs="$rpathdirs $dir"
17441 fi
17442 haveit=
17443 for x in $ltrpathdirs; do
17444 if test "X$x" = "X$dir"; then
17445 haveit=yes
17446 break
17447 fi
17448 done
17449 if test -z "$haveit"; then
17450 ltrpathdirs="$ltrpathdirs $dir"
17451 fi
17452 fi
17453 ;;
17454 -l*)
17455 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17456 ;;
17457 *.la)
17458 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17459 ;;
17460 *)
17461 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17462 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17463 ;;
17464 esac
17465 done
17466 fi
17467 else
17468 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17469 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17470 fi
17471 fi
17472 fi
17473 done
17474 done
17475 if test "X$rpathdirs" != "X"; then
17476 if test -n "$hardcode_libdir_separator"; then
17477 alldirs=
17478 for found_dir in $rpathdirs; do
17479 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17480 done
17481 acl_save_libdir="$libdir"
17482 libdir="$alldirs"
17483 eval flag=\"$hardcode_libdir_flag_spec\"
17484 libdir="$acl_save_libdir"
17485 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17486 else
17487 for found_dir in $rpathdirs; do
17488 acl_save_libdir="$libdir"
17489 libdir="$found_dir"
17490 eval flag=\"$hardcode_libdir_flag_spec\"
17491 libdir="$acl_save_libdir"
17492 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17493 done
17494 fi
17495 fi
17496 if test "X$ltrpathdirs" != "X"; then
17497 for found_dir in $ltrpathdirs; do
17498 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17499 done
17500 fi
17501
17502
17503 ac_save_CPPFLAGS="$CPPFLAGS"
17504
17505 for element in $INCBABELTRACE; do
17506 haveit=
17507 for x in $CPPFLAGS; do
17508
17509 acl_save_prefix="$prefix"
17510 prefix="$acl_final_prefix"
17511 acl_save_exec_prefix="$exec_prefix"
17512 exec_prefix="$acl_final_exec_prefix"
17513 eval x=\"$x\"
17514 exec_prefix="$acl_save_exec_prefix"
17515 prefix="$acl_save_prefix"
17516
17517 if test "X$x" = "X$element"; then
17518 haveit=yes
17519 break
17520 fi
17521 done
17522 if test -z "$haveit"; then
17523 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17524 fi
17525 done
17526
17527
17528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17529$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 17530if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
17531 $as_echo_n "(cached) " >&6
17532else
17533
17534 ac_save_LIBS="$LIBS"
17535 LIBS="$LIBS $LIBBABELTRACE"
17536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17537/* end confdefs.h. */
17538#include <babeltrace/babeltrace.h>
17539 #include <babeltrace/ctf/events.h>
17540 #include <babeltrace/ctf/iterator.h>
17541int
17542main ()
17543{
17544struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17545 struct bt_ctf_event *event = NULL;
17546 const struct bt_definition *scope;
17547
13cdc2af 17548 pos->type = BT_SEEK_BEGIN;
65c749e7 17549 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17550 scope = bt_ctf_get_top_level_scope (event,
17551 BT_STREAM_EVENT_HEADER);
17552 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17553
17554 ;
17555 return 0;
17556}
17557_ACEOF
17558if ac_fn_c_try_link "$LINENO"; then :
17559 ac_cv_libbabeltrace=yes
17560else
17561 ac_cv_libbabeltrace=no
17562fi
17563rm -f core conftest.err conftest.$ac_objext \
17564 conftest$ac_exeext conftest.$ac_ext
17565 LIBS="$ac_save_LIBS"
17566
17567fi
17568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17569$as_echo "$ac_cv_libbabeltrace" >&6; }
17570 if test "$ac_cv_libbabeltrace" = yes; then
17571 HAVE_LIBBABELTRACE=yes
17572
17573$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17574
17575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17576$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17578$as_echo "$LIBBABELTRACE" >&6; }
17579 else
17580 HAVE_LIBBABELTRACE=no
17581 CPPFLAGS="$ac_save_CPPFLAGS"
17582 LIBBABELTRACE=
17583 LTLIBBABELTRACE=
17584 fi
17585
17586
17587
17588
17589
17590
17591 CFLAGS=$saved_CFLAGS
17592
17593 if test "$HAVE_LIBBABELTRACE" != yes; then
17594 if test "$with_babeltrace" = yes; then
d0ac1c44 17595 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
17596 else
17597 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17598$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17599 fi
17600 fi
17601fi
17602
21ea5acd
SDJ
17603# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17604# empty version.
c906108c
SS
17605
17606files=
17607links=
5a2402b8 17608
c906108c
SS
17609rm -f nm.h
17610if test "${nativefile}" != ""; then
0f475e27
AC
17611 case "${nativefile}" in
17612 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17613 * ) GDB_NM_FILE="${nativefile}"
17614 esac
5a2402b8
AC
17615 files="${files} ${GDB_NM_FILE}"
17616 links="${links} nm.h"
60ca704f
SE
17617
17618cat >>confdefs.h <<_ACEOF
b78960be 17619#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17620_ACEOF
5a2402b8 17621
c906108c 17622fi
5a2402b8
AC
17623
17624
e3487908
GKB
17625for ac_prog in xsltproc
17626do
17627 # Extract the first word of "$ac_prog", so it can be a program name with args.
17628set dummy $ac_prog; ac_word=$2
17629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17630$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 17631if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
17632 $as_echo_n "(cached) " >&6
17633else
17634 case $XSLTPROC in
17635 [\\/]* | ?:[\\/]*)
17636 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17637 ;;
17638 *)
17639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17640for as_dir in $PATH
17641do
17642 IFS=$as_save_IFS
17643 test -z "$as_dir" && as_dir=.
17644 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 17645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
17646 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17648 break 2
17649 fi
17650done
17651 done
17652IFS=$as_save_IFS
17653
17654 ;;
17655esac
17656fi
17657XSLTPROC=$ac_cv_path_XSLTPROC
17658if test -n "$XSLTPROC"; then
17659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17660$as_echo "$XSLTPROC" >&6; }
17661else
17662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17663$as_echo "no" >&6; }
17664fi
17665
17666
17667 test -n "$XSLTPROC" && break
17668done
17669test -n "$XSLTPROC" || XSLTPROC="missing"
17670
17671if test "x$USE_MAINTAINER_MODE" = xyes; then
17672 if test "${XSLTPROC}" = missing; then
d0ac1c44 17673 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
17674 fi
17675fi
17676
17677
bec39cab
AC
17678ac_sources="$files"
17679ac_dests="$links"
17680while test -n "$ac_sources"; do
17681 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17682 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17683 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17684done
81ecdfbb 17685ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17686
17687
c906108c
SS
17688
17689
c906108c 17690
81ecdfbb 17691$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17692
bec39cab 17693
8ecfd7bd
SDJ
17694
17695# Check whether we will enable the inclusion of unit tests when
17696# compiling GDB.
17697#
17698# The default value of this option changes depending whether we're on
17699# development mode (in which case it's "true") or not (in which case
17700# it's "false").
17701# Check whether --enable-unit-tests was given.
17702if test "${enable_unit_tests+set}" = set; then :
17703 enableval=$enable_unit_tests; case "${enableval}" in
17704 yes) enable_unittests=true ;;
17705 no) enable_unittests=false ;;
17706 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
17707esac
17708else
17709 enable_unittests=$development
17710fi
17711
17712
17713if $enable_unittests; then
dcd1f979
TT
17714
17715$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17716
8ecfd7bd 17717
b5884fa7 17718 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o"
1e5ded6c 17719 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c"
8ecfd7bd 17720
dcd1f979
TT
17721fi
17722
b292c783 17723
8ecfd7bd 17724
f6a88844
JM
17725 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17726 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17727 if test "x$GDB_TRANSFORM_NAME" = x; then
17728 GDB_TRANSFORM_NAME=gdb
17729 fi
17730
17731
17732
17733 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17734 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17735 if test "x$GCORE_TRANSFORM_NAME" = x; then
17736 GCORE_TRANSFORM_NAME=gcore
17737 fi
17738
b292c783
JK
17739
17740ac_config_files="$ac_config_files gcore"
17741
141ec9f6 17742ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 17743
89a34d1b 17744
bec39cab
AC
17745cat >confcache <<\_ACEOF
17746# This file is a shell script that caches the results of configure
17747# tests run on this system so they can be shared between configure
17748# scripts and configure runs, see configure's option --config-cache.
17749# It is not useful on other systems. If it contains results you don't
17750# want to keep, you may remove or edit it.
17751#
17752# config.status only pays attention to the cache file if you give it
17753# the --recheck option to rerun configure.
17754#
17755# `ac_cv_env_foo' variables (set or unset) will be overridden when
17756# loading this file, other *unset* `ac_cv_foo' will be assigned the
17757# following values.
17758
17759_ACEOF
17760
17761# The following way of writing the cache mishandles newlines in values,
17762# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17763# So, we kill variables containing newlines.
bec39cab
AC
17764# Ultrix sh set writes to stderr and can't be redirected directly,
17765# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17766(
17767 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17768 eval ac_val=\$$ac_var
17769 case $ac_val in #(
17770 *${as_nl}*)
17771 case $ac_var in #(
17772 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17773$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17774 esac
17775 case $ac_var in #(
17776 _ | IFS | as_nl) ;; #(
17777 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17778 *) { eval $ac_var=; unset $ac_var;} ;;
17779 esac ;;
17780 esac
17781 done
17782
bec39cab 17783 (set) 2>&1 |
81ecdfbb
RW
17784 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17785 *${as_nl}ac_space=\ *)
17786 # `set' does not quote correctly, so add quotes: double-quote
17787 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17788 sed -n \
17789 "s/'/'\\\\''/g;
17790 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17791 ;; #(
bec39cab
AC
17792 *)
17793 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17794 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17795 ;;
81ecdfbb
RW
17796 esac |
17797 sort
17798) |
bec39cab 17799 sed '
81ecdfbb 17800 /^ac_cv_env_/b end
bec39cab 17801 t clear
81ecdfbb 17802 :clear
bec39cab
AC
17803 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17804 t end
81ecdfbb
RW
17805 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17806 :end' >>confcache
17807if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17808 if test -w "$cache_file"; then
d0ac1c44 17809 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
17810 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17811$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
17812 if test ! -f "$cache_file" || test -h "$cache_file"; then
17813 cat confcache >"$cache_file"
17814 else
17815 case $cache_file in #(
17816 */* | ?:*)
17817 mv -f confcache "$cache_file"$$ &&
17818 mv -f "$cache_file"$$ "$cache_file" ;; #(
17819 *)
17820 mv -f confcache "$cache_file" ;;
17821 esac
17822 fi
17823 fi
bec39cab 17824 else
81ecdfbb
RW
17825 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17826$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17827 fi
17828fi
17829rm -f confcache
17830
17831test "x$prefix" = xNONE && prefix=$ac_default_prefix
17832# Let make expand exec_prefix.
17833test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17834
bec39cab
AC
17835DEFS=-DHAVE_CONFIG_H
17836
17837ac_libobjs=
17838ac_ltlibobjs=
d0ac1c44 17839U=
bec39cab
AC
17840for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17841 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17842 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17843 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17844 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17845 # will be set to the directory where LIBOBJS objects are built.
17846 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17847 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17848done
17849LIBOBJS=$ac_libobjs
17850
17851LTLIBOBJS=$ac_ltlibobjs
17852
17853
85981d60 17854if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 17855 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 17856Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17857fi
4df42755 17858if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 17859 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
17860Usually this means the macro was only invoked conditionally." "$LINENO" 5
17861fi
17862if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 17863 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
17864Usually this means the macro was only invoked conditionally." "$LINENO" 5
17865fi
81ecdfbb
RW
17866
17867
d0ac1c44 17868: "${CONFIG_STATUS=./config.status}"
81ecdfbb 17869ac_write_fail=0
bec39cab
AC
17870ac_clean_files_save=$ac_clean_files
17871ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17872{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17873$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17874as_write_fail=0
17875cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17876#! $SHELL
17877# Generated by $as_me.
17878# Run this file to recreate the current configuration.
17879# Compiler output produced by configure, useful for debugging
17880# configure, is in config.log if it exists.
17881
17882debug=false
17883ac_cs_recheck=false
17884ac_cs_silent=false
bec39cab 17885
81ecdfbb
RW
17886SHELL=\${CONFIG_SHELL-$SHELL}
17887export SHELL
17888_ASEOF
17889cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17890## -------------------- ##
17891## M4sh Initialization. ##
17892## -------------------- ##
17893
17894# Be more Bourne compatible
17895DUALCASE=1; export DUALCASE # for MKS sh
17896if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17897 emulate sh
17898 NULLCMD=:
81ecdfbb 17899 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17900 # is contrary to our usage. Disable this feature.
17901 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17902 setopt NO_GLOB_SUBST
17903else
17904 case `(set -o) 2>/dev/null` in #(
17905 *posix*) :
17906 set -o posix ;; #(
17907 *) :
17908 ;;
17909esac
bec39cab 17910fi
bec39cab 17911
81ecdfbb
RW
17912
17913as_nl='
17914'
17915export as_nl
17916# Printing a long string crashes Solaris 7 /usr/bin/printf.
17917as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17918as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17919as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17920# Prefer a ksh shell builtin over an external printf program on Solaris,
17921# but without wasting forks for bash or zsh.
17922if test -z "$BASH_VERSION$ZSH_VERSION" \
17923 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17924 as_echo='print -r --'
17925 as_echo_n='print -rn --'
17926elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17927 as_echo='printf %s\n'
17928 as_echo_n='printf %s'
17929else
17930 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17931 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17932 as_echo_n='/usr/ucb/echo -n'
17933 else
17934 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17935 as_echo_n_body='eval
17936 arg=$1;
17937 case $arg in #(
17938 *"$as_nl"*)
17939 expr "X$arg" : "X\\(.*\\)$as_nl";
17940 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17941 esac;
17942 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17943 '
17944 export as_echo_n_body
17945 as_echo_n='sh -c $as_echo_n_body as_echo'
17946 fi
17947 export as_echo_body
17948 as_echo='sh -c $as_echo_body as_echo'
17949fi
17950
17951# The user is always right.
17952if test "${PATH_SEPARATOR+set}" != set; then
17953 PATH_SEPARATOR=:
17954 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17955 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17956 PATH_SEPARATOR=';'
17957 }
bec39cab
AC
17958fi
17959
17960
81ecdfbb
RW
17961# IFS
17962# We need space, tab and new line, in precisely that order. Quoting is
17963# there to prevent editors from complaining about space-tab.
17964# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17965# splitting by setting IFS to empty value.)
17966IFS=" "" $as_nl"
17967
17968# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 17969as_myself=
81ecdfbb
RW
17970case $0 in #((
17971 *[\\/]* ) as_myself=$0 ;;
17972 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17973for as_dir in $PATH
17974do
17975 IFS=$as_save_IFS
17976 test -z "$as_dir" && as_dir=.
17977 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17978 done
17979IFS=$as_save_IFS
17980
17981 ;;
17982esac
17983# We did not find ourselves, most probably we were run as `sh COMMAND'
17984# in which case we are not to be found in the path.
17985if test "x$as_myself" = x; then
17986 as_myself=$0
17987fi
17988if test ! -f "$as_myself"; then
17989 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17990 exit 1
17991fi
17992
17993# Unset variables that we do not need and which cause bugs (e.g. in
17994# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17995# suppresses any "Segmentation fault" message there. '((' could
17996# trigger a bug in pdksh 5.2.14.
17997for as_var in BASH_ENV ENV MAIL MAILPATH
17998do eval test x\${$as_var+set} = xset \
17999 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18000done
bec39cab
AC
18001PS1='$ '
18002PS2='> '
18003PS4='+ '
18004
18005# NLS nuisances.
81ecdfbb
RW
18006LC_ALL=C
18007export LC_ALL
18008LANGUAGE=C
18009export LANGUAGE
18010
18011# CDPATH.
18012(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18013
18014
d0ac1c44
SM
18015# as_fn_error STATUS ERROR [LINENO LOG_FD]
18016# ----------------------------------------
81ecdfbb
RW
18017# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18018# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 18019# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
18020as_fn_error ()
18021{
d0ac1c44
SM
18022 as_status=$1; test $as_status -eq 0 && as_status=1
18023 if test "$4"; then
18024 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18025 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 18026 fi
d0ac1c44 18027 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
18028 as_fn_exit $as_status
18029} # as_fn_error
18030
18031
18032# as_fn_set_status STATUS
18033# -----------------------
18034# Set $? to STATUS, without forking.
18035as_fn_set_status ()
18036{
18037 return $1
18038} # as_fn_set_status
18039
18040# as_fn_exit STATUS
18041# -----------------
18042# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18043as_fn_exit ()
18044{
18045 set +e
18046 as_fn_set_status $1
18047 exit $1
18048} # as_fn_exit
18049
18050# as_fn_unset VAR
18051# ---------------
18052# Portably unset VAR.
18053as_fn_unset ()
18054{
18055 { eval $1=; unset $1;}
18056}
18057as_unset=as_fn_unset
18058# as_fn_append VAR VALUE
18059# ----------------------
18060# Append the text in VALUE to the end of the definition contained in VAR. Take
18061# advantage of any shell optimizations that allow amortized linear growth over
18062# repeated appends, instead of the typical quadratic growth present in naive
18063# implementations.
18064if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18065 eval 'as_fn_append ()
18066 {
18067 eval $1+=\$2
18068 }'
18069else
18070 as_fn_append ()
18071 {
18072 eval $1=\$$1\$2
18073 }
18074fi # as_fn_append
18075
18076# as_fn_arith ARG...
18077# ------------------
18078# Perform arithmetic evaluation on the ARGs, and store the result in the
18079# global $as_val. Take advantage of shells that can avoid forks. The arguments
18080# must be portable across $(()) and expr.
18081if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18082 eval 'as_fn_arith ()
18083 {
18084 as_val=$(( $* ))
18085 }'
18086else
18087 as_fn_arith ()
18088 {
18089 as_val=`expr "$@" || test $? -eq 1`
18090 }
18091fi # as_fn_arith
bec39cab 18092
81ecdfbb
RW
18093
18094if expr a : '\(a\)' >/dev/null 2>&1 &&
18095 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18096 as_expr=expr
18097else
18098 as_expr=false
18099fi
18100
81ecdfbb 18101if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18102 as_basename=basename
18103else
18104 as_basename=false
18105fi
18106
81ecdfbb
RW
18107if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18108 as_dirname=dirname
18109else
18110 as_dirname=false
18111fi
bec39cab 18112
81ecdfbb 18113as_me=`$as_basename -- "$0" ||
bec39cab
AC
18114$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18115 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18116 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18117$as_echo X/"$0" |
18118 sed '/^.*\/\([^/][^/]*\)\/*$/{
18119 s//\1/
18120 q
18121 }
18122 /^X\/\(\/\/\)$/{
18123 s//\1/
18124 q
18125 }
18126 /^X\/\(\/\).*/{
18127 s//\1/
18128 q
18129 }
18130 s/.*/./; q'`
b4e70030 18131
b4e70030
JB
18132# Avoid depending upon Character Ranges.
18133as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18134as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18135as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18136as_cr_digits='0123456789'
18137as_cr_alnum=$as_cr_Letters$as_cr_digits
18138
81ecdfbb
RW
18139ECHO_C= ECHO_N= ECHO_T=
18140case `echo -n x` in #(((((
18141-n*)
18142 case `echo 'xy\c'` in
18143 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18144 xy) ECHO_C='\c';;
18145 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18146 ECHO_T=' ';;
18147 esac;;
18148*)
18149 ECHO_N='-n';;
bec39cab
AC
18150esac
18151
81ecdfbb
RW
18152rm -f conf$$ conf$$.exe conf$$.file
18153if test -d conf$$.dir; then
18154 rm -f conf$$.dir/conf$$.file
bec39cab 18155else
81ecdfbb
RW
18156 rm -f conf$$.dir
18157 mkdir conf$$.dir 2>/dev/null
bec39cab 18158fi
81ecdfbb
RW
18159if (echo >conf$$.file) 2>/dev/null; then
18160 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18161 as_ln_s='ln -s'
81ecdfbb
RW
18162 # ... but there are two gotchas:
18163 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18164 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 18165 # In both cases, we have to default to `cp -pR'.
81ecdfbb 18166 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 18167 as_ln_s='cp -pR'
81ecdfbb
RW
18168 elif ln conf$$.file conf$$ 2>/dev/null; then
18169 as_ln_s=ln
18170 else
d0ac1c44 18171 as_ln_s='cp -pR'
b4e70030 18172 fi
bec39cab 18173else
d0ac1c44 18174 as_ln_s='cp -pR'
bec39cab 18175fi
81ecdfbb
RW
18176rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18177rmdir conf$$.dir 2>/dev/null
18178
18179
18180# as_fn_mkdir_p
18181# -------------
18182# Create "$as_dir" as a directory, including parents if necessary.
18183as_fn_mkdir_p ()
18184{
18185
18186 case $as_dir in #(
18187 -*) as_dir=./$as_dir;;
18188 esac
18189 test -d "$as_dir" || eval $as_mkdir_p || {
18190 as_dirs=
18191 while :; do
18192 case $as_dir in #(
18193 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18194 *) as_qdir=$as_dir;;
18195 esac
18196 as_dirs="'$as_qdir' $as_dirs"
18197 as_dir=`$as_dirname -- "$as_dir" ||
18198$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18199 X"$as_dir" : 'X\(//\)[^/]' \| \
18200 X"$as_dir" : 'X\(//\)$' \| \
18201 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18202$as_echo X"$as_dir" |
18203 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18204 s//\1/
18205 q
18206 }
18207 /^X\(\/\/\)[^/].*/{
18208 s//\1/
18209 q
18210 }
18211 /^X\(\/\/\)$/{
18212 s//\1/
18213 q
18214 }
18215 /^X\(\/\).*/{
18216 s//\1/
18217 q
18218 }
18219 s/.*/./; q'`
18220 test -d "$as_dir" && break
18221 done
18222 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 18223 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 18224
bec39cab 18225
81ecdfbb 18226} # as_fn_mkdir_p
bec39cab 18227if mkdir -p . 2>/dev/null; then
81ecdfbb 18228 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18229else
18230 test -d ./-p && rmdir ./-p
18231 as_mkdir_p=false
18232fi
18233
d0ac1c44
SM
18234
18235# as_fn_executable_p FILE
18236# -----------------------
18237# Test if FILE is an executable regular file.
18238as_fn_executable_p ()
18239{
18240 test -f "$1" && test -x "$1"
18241} # as_fn_executable_p
18242as_test_x='test -x'
18243as_executable_p=as_fn_executable_p
bec39cab
AC
18244
18245# Sed expression to map a string onto a valid CPP name.
18246as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18247
18248# Sed expression to map a string onto a valid variable name.
18249as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18250
18251
bec39cab 18252exec 6>&1
81ecdfbb
RW
18253## ----------------------------------- ##
18254## Main body of $CONFIG_STATUS script. ##
18255## ----------------------------------- ##
18256_ASEOF
18257test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18258
18259cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18260# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18261# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18262# values after options handling.
18263ac_log="
bec39cab 18264This file was extended by $as_me, which was
d0ac1c44 18265generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
18266
18267 CONFIG_FILES = $CONFIG_FILES
18268 CONFIG_HEADERS = $CONFIG_HEADERS
18269 CONFIG_LINKS = $CONFIG_LINKS
18270 CONFIG_COMMANDS = $CONFIG_COMMANDS
18271 $ $0 $@
18272
81ecdfbb
RW
18273on `(hostname || uname -n) 2>/dev/null | sed 1q`
18274"
18275
bec39cab
AC
18276_ACEOF
18277
81ecdfbb
RW
18278case $ac_config_files in *"
18279"*) set x $ac_config_files; shift; ac_config_files=$*;;
18280esac
234b45d4 18281
81ecdfbb
RW
18282case $ac_config_headers in *"
18283"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18284esac
b4e70030 18285
b4e70030 18286
81ecdfbb
RW
18287cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18288# Files that config.status was made for.
18289config_files="$ac_config_files"
18290config_headers="$ac_config_headers"
18291config_links="$ac_config_links"
18292config_commands="$ac_config_commands"
234b45d4 18293
81ecdfbb 18294_ACEOF
b4e70030 18295
81ecdfbb 18296cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18297ac_cs_usage="\
81ecdfbb
RW
18298\`$as_me' instantiates files and other configuration actions
18299from templates according to the current configuration. Unless the files
18300and actions are specified as TAGs, all are instantiated by default.
234b45d4 18301
81ecdfbb 18302Usage: $0 [OPTION]... [TAG]...
234b45d4 18303
bec39cab 18304 -h, --help print this help, then exit
81ecdfbb 18305 -V, --version print version number and configuration settings, then exit
d0ac1c44 18306 --config print configuration, then exit
81ecdfbb
RW
18307 -q, --quiet, --silent
18308 do not print progress messages
bec39cab
AC
18309 -d, --debug don't remove temporary files
18310 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18311 --file=FILE[:TEMPLATE]
18312 instantiate the configuration file FILE
18313 --header=FILE[:TEMPLATE]
18314 instantiate the configuration header FILE
234b45d4 18315
bec39cab
AC
18316Configuration files:
18317$config_files
234b45d4 18318
bec39cab
AC
18319Configuration headers:
18320$config_headers
234b45d4 18321
bec39cab
AC
18322Configuration links:
18323$config_links
234b45d4 18324
bec39cab
AC
18325Configuration commands:
18326$config_commands
18327
81ecdfbb 18328Report bugs to the package provider."
b4e70030 18329
81ecdfbb
RW
18330_ACEOF
18331cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18332ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
18333ac_cs_version="\\
18334config.status
d0ac1c44
SM
18335configured by $0, generated by GNU Autoconf 2.69,
18336 with options \\"\$ac_cs_config\\"
bec39cab 18337
d0ac1c44 18338Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
18339This config.status script is free software; the Free Software Foundation
18340gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18341
18342ac_pwd='$ac_pwd'
18343srcdir='$srcdir'
18344INSTALL='$INSTALL'
81ecdfbb
RW
18345AWK='$AWK'
18346test -n "\$AWK" || AWK=awk
bec39cab
AC
18347_ACEOF
18348
81ecdfbb
RW
18349cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18350# The default lists apply if the user does not specify any file.
bec39cab
AC
18351ac_need_defaults=:
18352while test $# != 0
18353do
18354 case $1 in
d0ac1c44 18355 --*=?*)
81ecdfbb
RW
18356 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18357 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18358 ac_shift=:
c906108c 18359 ;;
d0ac1c44
SM
18360 --*=)
18361 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18362 ac_optarg=
18363 ac_shift=:
18364 ;;
81ecdfbb 18365 *)
bec39cab
AC
18366 ac_option=$1
18367 ac_optarg=$2
18368 ac_shift=shift
c906108c 18369 ;;
bec39cab 18370 esac
c906108c 18371
bec39cab
AC
18372 case $ac_option in
18373 # Handling of the options.
bec39cab
AC
18374 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18375 ac_cs_recheck=: ;;
81ecdfbb
RW
18376 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18377 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
18378 --config | --confi | --conf | --con | --co | --c )
18379 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 18380 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18381 debug=: ;;
18382 --file | --fil | --fi | --f )
18383 $ac_shift
81ecdfbb
RW
18384 case $ac_optarg in
18385 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 18386 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
18387 esac
18388 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18389 ac_need_defaults=false;;
18390 --header | --heade | --head | --hea )
18391 $ac_shift
81ecdfbb
RW
18392 case $ac_optarg in
18393 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18394 esac
18395 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18396 ac_need_defaults=false;;
81ecdfbb
RW
18397 --he | --h)
18398 # Conflict between --help and --header
d0ac1c44 18399 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
18400Try \`$0 --help' for more information.";;
18401 --help | --hel | -h )
18402 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18403 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18404 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18405 ac_cs_silent=: ;;
c906108c 18406
bec39cab 18407 # This is an error.
d0ac1c44 18408 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 18409Try \`$0 --help' for more information." ;;
c906108c 18410
81ecdfbb
RW
18411 *) as_fn_append ac_config_targets " $1"
18412 ac_need_defaults=false ;;
c906108c 18413
bec39cab
AC
18414 esac
18415 shift
18416done
c906108c 18417
bec39cab 18418ac_configure_extra_args=
c906108c 18419
bec39cab
AC
18420if $ac_cs_silent; then
18421 exec 6>/dev/null
18422 ac_configure_extra_args="$ac_configure_extra_args --silent"
18423fi
c906108c 18424
bec39cab 18425_ACEOF
81ecdfbb 18426cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18427if \$ac_cs_recheck; then
d0ac1c44 18428 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
18429 shift
18430 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18431 CONFIG_SHELL='$SHELL'
18432 export CONFIG_SHELL
18433 exec "\$@"
bec39cab
AC
18434fi
18435
18436_ACEOF
81ecdfbb
RW
18437cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18438exec 5>>config.log
18439{
18440 echo
18441 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18442## Running $as_me. ##
18443_ASBOX
18444 $as_echo "$ac_log"
18445} >&5
bec39cab 18446
81ecdfbb
RW
18447_ACEOF
18448cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18449#
81ecdfbb 18450# INIT-COMMANDS
c906108c 18451#
a417dc56 18452ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 18453
bec39cab
AC
18454_ACEOF
18455
81ecdfbb 18456cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18457
81ecdfbb 18458# Handling of arguments.
bec39cab 18459for ac_config_target in $ac_config_targets
c906108c 18460do
81ecdfbb
RW
18461 case $ac_config_target in
18462 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18463 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18464 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18465 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18466 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18467 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18468 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 18469 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 18470 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18471 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 18472
d0ac1c44 18473 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18474 esac
18475done
18476
81ecdfbb 18477
bec39cab
AC
18478# If the user did not use the arguments to specify the items to instantiate,
18479# then the envvar interface is used. Set only those that are not.
18480# We use the long form for the default assignment because of an extremely
18481# bizarre bug on SunOS 4.1.3.
18482if $ac_need_defaults; then
18483 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18484 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18485 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18486 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18487fi
18488
b4e70030 18489# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18490# simply because there is no reason against having it here, and in addition,
b4e70030 18491# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18492# Hook for its removal unless debugging.
18493# Note that there is a small window in which the directory will not be cleaned:
18494# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18495$debug ||
18496{
d0ac1c44 18497 tmp= ac_tmp=
81ecdfbb 18498 trap 'exit_status=$?
d0ac1c44
SM
18499 : "${ac_tmp:=$tmp}"
18500 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
18501' 0
18502 trap 'as_fn_exit 1' 1 2 13 15
18503}
18504# Create a (secure) tmp directory for tmp files.
18505
18506{
18507 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 18508 test -d "$tmp"
81ecdfbb
RW
18509} ||
18510{
18511 tmp=./conf$$-$RANDOM
18512 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
18513} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18514ac_tmp=$tmp
81ecdfbb
RW
18515
18516# Set up the scripts for CONFIG_FILES section.
18517# No need to generate them if there are no CONFIG_FILES.
18518# This happens for instance with `./config.status config.h'.
18519if test -n "$CONFIG_FILES"; then
18520
18521if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18522 ac_cs_awk_getline=:
18523 ac_cs_awk_pipe_init=
18524 ac_cs_awk_read_file='
18525 while ((getline aline < (F[key])) > 0)
18526 print(aline)
18527 close(F[key])'
18528 ac_cs_awk_pipe_fini=
18529else
18530 ac_cs_awk_getline=false
18531 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18532 ac_cs_awk_read_file='
18533 print "|#_!!_#|"
18534 print "cat " F[key] " &&"
18535 '$ac_cs_awk_pipe_init
18536 # The final `:' finishes the AND list.
18537 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18538fi
18539ac_cr=`echo X | tr X '\015'`
18540# On cygwin, bash can eat \r inside `` if the user requested igncr.
18541# But we know of no other shell where ac_cr would be empty at this
18542# point, so we can use a bashism as a fallback.
18543if test "x$ac_cr" = x; then
18544 eval ac_cr=\$\'\\r\'
18545fi
18546ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18547if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 18548 ac_cs_awk_cr='\\r'
81ecdfbb
RW
18549else
18550 ac_cs_awk_cr=$ac_cr
18551fi
18552
d0ac1c44 18553echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
18554_ACEOF
18555
18556# Create commands to substitute file output variables.
18557{
18558 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 18559 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
18560 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18561 echo "_ACAWK" &&
18562 echo "_ACEOF"
18563} >conf$$files.sh &&
18564. ./conf$$files.sh ||
d0ac1c44 18565 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18566rm -f conf$$files.sh
18567
18568{
18569 echo "cat >conf$$subs.awk <<_ACEOF" &&
18570 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18571 echo "_ACEOF"
18572} >conf$$subs.sh ||
d0ac1c44
SM
18573 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18574ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
18575ac_delim='%!_!# '
18576for ac_last_try in false false false false false :; do
18577 . ./conf$$subs.sh ||
d0ac1c44 18578 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18579
18580 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18581 if test $ac_delim_n = $ac_delim_num; then
18582 break
18583 elif $ac_last_try; then
d0ac1c44 18584 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18585 else
18586 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18587 fi
18588done
18589rm -f conf$$subs.sh
18590
18591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18592cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
18593_ACEOF
18594sed -n '
18595h
18596s/^/S["/; s/!.*/"]=/
18597p
18598g
18599s/^[^!]*!//
18600:repl
18601t repl
18602s/'"$ac_delim"'$//
18603t delim
18604:nl
18605h
d0ac1c44 18606s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18607t more1
18608s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18609p
18610n
18611b repl
18612:more1
18613s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18614p
18615g
18616s/.\{148\}//
18617t nl
18618:delim
18619h
d0ac1c44 18620s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18621t more2
18622s/["\\]/\\&/g; s/^/"/; s/$/"/
18623p
18624b
18625:more2
18626s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18627p
18628g
18629s/.\{148\}//
18630t delim
18631' <conf$$subs.awk | sed '
18632/^[^""]/{
18633 N
18634 s/\n//
18635}
18636' >>$CONFIG_STATUS || ac_write_fail=1
18637rm -f conf$$subs.awk
18638cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18639_ACAWK
d0ac1c44 18640cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
18641 for (key in S) S_is_set[key] = 1
18642 FS = "\a"
18643 \$ac_cs_awk_pipe_init
18644}
18645{
18646 line = $ 0
18647 nfields = split(line, field, "@")
18648 substed = 0
18649 len = length(field[1])
18650 for (i = 2; i < nfields; i++) {
18651 key = field[i]
18652 keylen = length(key)
18653 if (S_is_set[key]) {
18654 value = S[key]
18655 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18656 len += length(value) + length(field[++i])
18657 substed = 1
18658 } else
18659 len += 1 + keylen
18660 }
18661 if (nfields == 3 && !substed) {
18662 key = field[2]
18663 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18664 \$ac_cs_awk_read_file
18665 next
18666 }
18667 }
18668 print line
b4e70030 18669}
81ecdfbb
RW
18670\$ac_cs_awk_pipe_fini
18671_ACAWK
18672_ACEOF
18673cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18674if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18675 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18676else
18677 cat
d0ac1c44
SM
18678fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18679 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
18680_ACEOF
18681
d0ac1c44
SM
18682# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18683# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
18684# trailing colons and then remove the whole line if VPATH becomes empty
18685# (actually we leave an empty line to preserve line numbers).
18686if test "x$srcdir" = x.; then
d0ac1c44
SM
18687 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18688h
18689s///
18690s/^/:/
18691s/[ ]*$/:/
18692s/:\$(srcdir):/:/g
18693s/:\${srcdir}:/:/g
18694s/:@srcdir@:/:/g
18695s/^:*//
81ecdfbb 18696s/:*$//
d0ac1c44
SM
18697x
18698s/\(=[ ]*\).*/\1/
18699G
18700s/\n//
81ecdfbb
RW
18701s/^[^=]*=[ ]*$//
18702}'
18703fi
18704
18705cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18706fi # test -n "$CONFIG_FILES"
18707
18708# Set up the scripts for CONFIG_HEADERS section.
18709# No need to generate them if there are no CONFIG_HEADERS.
18710# This happens for instance with `./config.status Makefile'.
18711if test -n "$CONFIG_HEADERS"; then
d0ac1c44 18712cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
18713BEGIN {
18714_ACEOF
18715
18716# Transform confdefs.h into an awk script `defines.awk', embedded as
18717# here-document in config.status, that substitutes the proper values into
18718# config.h.in to produce config.h.
4e8d927d 18719
81ecdfbb
RW
18720# Create a delimiter string that does not exist in confdefs.h, to ease
18721# handling of long lines.
18722ac_delim='%!_!# '
18723for ac_last_try in false false :; do
d0ac1c44
SM
18724 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18725 if test -z "$ac_tt"; then
81ecdfbb
RW
18726 break
18727 elif $ac_last_try; then
d0ac1c44 18728 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
18729 else
18730 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18731 fi
18732done
4e8d927d 18733
81ecdfbb
RW
18734# For the awk script, D is an array of macro values keyed by name,
18735# likewise P contains macro parameters if any. Preserve backslash
18736# newline sequences.
18737
18738ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18739sed -n '
18740s/.\{148\}/&'"$ac_delim"'/g
18741t rset
18742:rset
18743s/^[ ]*#[ ]*define[ ][ ]*/ /
18744t def
18745d
18746:def
18747s/\\$//
18748t bsnl
18749s/["\\]/\\&/g
18750s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18751D["\1"]=" \3"/p
18752s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18753d
18754:bsnl
18755s/["\\]/\\&/g
18756s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18757D["\1"]=" \3\\\\\\n"\\/p
18758t cont
18759s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18760t cont
18761d
18762:cont
18763n
18764s/.\{148\}/&'"$ac_delim"'/g
18765t clear
18766:clear
18767s/\\$//
18768t bsnlc
18769s/["\\]/\\&/g; s/^/"/; s/$/"/p
18770d
18771:bsnlc
18772s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18773b cont
18774' <confdefs.h | sed '
18775s/'"$ac_delim"'/"\\\
18776"/g' >>$CONFIG_STATUS || ac_write_fail=1
18777
18778cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18779 for (key in D) D_is_set[key] = 1
18780 FS = "\a"
18781}
18782/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18783 line = \$ 0
18784 split(line, arg, " ")
18785 if (arg[1] == "#") {
18786 defundef = arg[2]
18787 mac1 = arg[3]
18788 } else {
18789 defundef = substr(arg[1], 2)
18790 mac1 = arg[2]
18791 }
18792 split(mac1, mac2, "(") #)
18793 macro = mac2[1]
18794 prefix = substr(line, 1, index(line, defundef) - 1)
18795 if (D_is_set[macro]) {
18796 # Preserve the white space surrounding the "#".
18797 print prefix "define", macro P[macro] D[macro]
18798 next
18799 } else {
18800 # Replace #undef with comments. This is necessary, for example,
18801 # in the case of _POSIX_SOURCE, which is predefined and required
18802 # on some systems where configure will not decide to define it.
18803 if (defundef == "undef") {
18804 print "/*", prefix defundef, macro, "*/"
18805 next
18806 }
18807 }
b4e70030 18808}
81ecdfbb
RW
18809{ print }
18810_ACAWK
b4e70030 18811_ACEOF
81ecdfbb 18812cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 18813 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 18814fi # test -n "$CONFIG_HEADERS"
4e8d927d 18815
4e8d927d 18816
81ecdfbb
RW
18817eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18818shift
18819for ac_tag
18820do
18821 case $ac_tag in
18822 :[FHLC]) ac_mode=$ac_tag; continue;;
18823 esac
18824 case $ac_mode$ac_tag in
18825 :[FHL]*:*);;
d0ac1c44 18826 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
18827 :[FH]-) ac_tag=-:-;;
18828 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18829 esac
18830 ac_save_IFS=$IFS
18831 IFS=:
18832 set x $ac_tag
18833 IFS=$ac_save_IFS
18834 shift
18835 ac_file=$1
18836 shift
4e8d927d 18837
81ecdfbb
RW
18838 case $ac_mode in
18839 :L) ac_source=$1;;
18840 :[FH])
18841 ac_file_inputs=
18842 for ac_f
18843 do
18844 case $ac_f in
d0ac1c44 18845 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
18846 *) # Look for the file first in the build tree, then in the source tree
18847 # (if the path is not absolute). The absolute path cannot be DOS-style,
18848 # because $ac_f cannot contain `:'.
18849 test -f "$ac_f" ||
18850 case $ac_f in
18851 [\\/$]*) false;;
18852 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18853 esac ||
d0ac1c44 18854 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
18855 esac
18856 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18857 as_fn_append ac_file_inputs " '$ac_f'"
18858 done
18859
18860 # Let's still pretend it is `configure' which instantiates (i.e., don't
18861 # use $as_me), people would be surprised to read:
18862 # /* config.h. Generated by config.status. */
18863 configure_input='Generated from '`
18864 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18865 `' by configure.'
18866 if test x"$ac_file" != x-; then
18867 configure_input="$ac_file. $configure_input"
18868 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18869$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18870 fi
81ecdfbb
RW
18871 # Neutralize special characters interpreted by sed in replacement strings.
18872 case $configure_input in #(
18873 *\&* | *\|* | *\\* )
18874 ac_sed_conf_input=`$as_echo "$configure_input" |
18875 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18876 *) ac_sed_conf_input=$configure_input;;
18877 esac
4e8d927d 18878
81ecdfbb 18879 case $ac_tag in
d0ac1c44
SM
18880 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18881 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
18882 esac
18883 ;;
c906108c
SS
18884 esac
18885
81ecdfbb 18886 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18887$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18888 X"$ac_file" : 'X\(//\)[^/]' \| \
18889 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18890 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18891$as_echo X"$ac_file" |
18892 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18893 s//\1/
18894 q
18895 }
18896 /^X\(\/\/\)[^/].*/{
18897 s//\1/
18898 q
18899 }
18900 /^X\(\/\/\)$/{
18901 s//\1/
18902 q
18903 }
18904 /^X\(\/\).*/{
18905 s//\1/
18906 q
18907 }
18908 s/.*/./; q'`
18909 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18910 ac_builddir=.
18911
81ecdfbb
RW
18912case "$ac_dir" in
18913.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18914*)
18915 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18916 # A ".." for each directory in $ac_dir_suffix.
18917 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18918 case $ac_top_builddir_sub in
18919 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18920 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18921 esac ;;
18922esac
18923ac_abs_top_builddir=$ac_pwd
18924ac_abs_builddir=$ac_pwd$ac_dir_suffix
18925# for backward compatibility:
18926ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18927
18928case $srcdir in
81ecdfbb 18929 .) # We are building in place.
bec39cab 18930 ac_srcdir=.
81ecdfbb
RW
18931 ac_top_srcdir=$ac_top_builddir_sub
18932 ac_abs_top_srcdir=$ac_pwd ;;
18933 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18934 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18935 ac_top_srcdir=$srcdir
18936 ac_abs_top_srcdir=$srcdir ;;
18937 *) # Relative name.
18938 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18939 ac_top_srcdir=$ac_top_build_prefix$srcdir
18940 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18941esac
81ecdfbb 18942ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 18943
c906108c 18944
81ecdfbb
RW
18945 case $ac_mode in
18946 :F)
18947 #
18948 # CONFIG_FILE
18949 #
c906108c 18950
bec39cab
AC
18951 case $INSTALL in
18952 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 18953 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 18954 esac
81ecdfbb 18955_ACEOF
121ce6e5 18956
81ecdfbb
RW
18957cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18958# If the template does not know about datarootdir, expand it.
18959# FIXME: This hack should be removed a few years after 2.60.
18960ac_datarootdir_hack=; ac_datarootdir_seen=
18961ac_sed_dataroot='
18962/datarootdir/ {
18963 p
18964 q
18965}
18966/@datadir@/p
18967/@docdir@/p
18968/@infodir@/p
18969/@localedir@/p
18970/@mandir@/p'
18971case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18972*datarootdir*) ac_datarootdir_seen=yes;;
18973*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18975$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18976_ACEOF
18977cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18978 ac_datarootdir_hack='
18979 s&@datadir@&$datadir&g
18980 s&@docdir@&$docdir&g
18981 s&@infodir@&$infodir&g
18982 s&@localedir@&$localedir&g
18983 s&@mandir@&$mandir&g
18984 s&\\\${datarootdir}&$datarootdir&g' ;;
18985esac
4e8d927d 18986_ACEOF
81ecdfbb
RW
18987
18988# Neutralize VPATH when `$srcdir' = `.'.
18989# Shell code in configure.ac might set extrasub.
18990# FIXME: do we really want to maintain this feature?
18991cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18992ac_sed_extra="$ac_vpsub
bec39cab
AC
18993$extrasub
18994_ACEOF
81ecdfbb 18995cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
18996:t
18997/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
18998s|@configure_input@|$ac_sed_conf_input|;t t
18999s&@top_builddir@&$ac_top_builddir_sub&;t t
19000s&@top_build_prefix@&$ac_top_build_prefix&;t t
19001s&@srcdir@&$ac_srcdir&;t t
19002s&@abs_srcdir@&$ac_abs_srcdir&;t t
19003s&@top_srcdir@&$ac_top_srcdir&;t t
19004s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19005s&@builddir@&$ac_builddir&;t t
19006s&@abs_builddir@&$ac_abs_builddir&;t t
19007s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19008s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
19009$ac_datarootdir_hack
19010"
19011eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19012if $ac_cs_awk_getline; then
d0ac1c44 19013 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 19014else
d0ac1c44
SM
19015 $AWK -f "$ac_tmp/subs.awk" | $SHELL
19016fi \
19017 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19018
19019test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
19020 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19021 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19022 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 19023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19024which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 19025$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19026which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 19027
d0ac1c44 19028 rm -f "$ac_tmp/stdin"
bec39cab 19029 case $ac_file in
d0ac1c44
SM
19030 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19031 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 19032 esac \
d0ac1c44 19033 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19034 ;;
19035 :H)
19036 #
19037 # CONFIG_HEADER
19038 #
bec39cab 19039 if test x"$ac_file" != x-; then
81ecdfbb
RW
19040 {
19041 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19042 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19043 } >"$ac_tmp/config.h" \
19044 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19045 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
19046 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19047$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 19048 else
81ecdfbb 19049 rm -f "$ac_file"
d0ac1c44
SM
19050 mv "$ac_tmp/config.h" "$ac_file" \
19051 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
19052 fi
19053 else
81ecdfbb 19054 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19055 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19056 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 19057 fi
81ecdfbb
RW
19058 ;;
19059 :L)
19060 #
19061 # CONFIG_LINK
19062 #
c906108c 19063
81ecdfbb
RW
19064 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19065 :
b4e70030 19066 else
81ecdfbb
RW
19067 # Prefer the file from the source tree if names are identical.
19068 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19069 ac_source=$srcdir/$ac_source
19070 fi
b4e70030 19071
81ecdfbb
RW
19072 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19073$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 19074
81ecdfbb 19075 if test ! -r "$ac_source"; then
d0ac1c44 19076 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
19077 fi
19078 rm -f "$ac_file"
bec39cab 19079
81ecdfbb 19080 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 19081 case $ac_source in
81ecdfbb
RW
19082 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19083 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19084 esac
19085 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19086 ln "$ac_source" "$ac_file" 2>/dev/null ||
19087 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 19088 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
19089 fi
19090 ;;
19091 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19092$as_echo "$as_me: executing $ac_file commands" >&6;}
19093 ;;
c906108c 19094 esac
b4e70030 19095
bec39cab 19096
81ecdfbb
RW
19097 case $ac_file$ac_mode in
19098 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 19099 "gcore":F) chmod +x gcore ;;
1e94266c
SM
19100 "Makefile":F)
19101case x$CONFIG_HEADERS in
19102xconfig.h:config.in)
19103echo > stamp-h ;;
19104esac
19105 ;;
19106 "gdb-gdb.gdb":F)
19107case x$CONFIG_HEADERS in
19108xconfig.h:config.in)
19109echo > stamp-h ;;
141ec9f6
SM
19110esac
19111 ;;
19112 "gdb-gdb.py":F)
19113case x$CONFIG_HEADERS in
19114xconfig.h:config.in)
19115echo > stamp-h ;;
1e94266c
SM
19116esac
19117 ;;
19118 "doc/Makefile":F)
19119case x$CONFIG_HEADERS in
19120xconfig.h:config.in)
19121echo > stamp-h ;;
19122esac
19123 ;;
19124 "data-directory/Makefile":F)
c906108c
SS
19125case x$CONFIG_HEADERS in
19126xconfig.h:config.in)
19127echo > stamp-h ;;
19128esac
bec39cab 19129 ;;
81ecdfbb 19130
bec39cab 19131 esac
81ecdfbb 19132done # for ac_tag
c906108c 19133
bec39cab 19134
81ecdfbb 19135as_fn_exit 0
bec39cab 19136_ACEOF
bec39cab
AC
19137ac_clean_files=$ac_clean_files_save
19138
81ecdfbb 19139test $ac_write_fail = 0 ||
d0ac1c44 19140 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 19141
bec39cab
AC
19142
19143# configure is writing to config.log, and then calls config.status.
19144# config.status does its own redirection, appending to config.log.
19145# Unfortunately, on DOS this fails, as config.log is still kept open
19146# by configure, so config.status won't be able to write to it; its
19147# output is simply discarded. So we exec the FD to /dev/null,
19148# effectively closing config.log, so it can be properly (re)opened and
19149# appended to by config.status. When coming back to configure, we
19150# need to make the FD available again.
19151if test "$no_create" != yes; then
19152 ac_cs_success=:
19153 ac_config_status_args=
19154 test "$silent" = yes &&
19155 ac_config_status_args="$ac_config_status_args --quiet"
19156 exec 5>/dev/null
19157 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19158 exec 5>>config.log
19159 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19160 # would make configure fail if this is the last instruction.
d0ac1c44 19161 $ac_cs_success || as_fn_exit 1
bec39cab 19162fi
c906108c 19163
bec39cab 19164#
81ecdfbb 19165# CONFIG_SUBDIRS section.
bec39cab 19166#
c906108c
SS
19167if test "$no_recursion" != yes; then
19168
81ecdfbb
RW
19169 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19170 # so they do not pile up.
c906108c
SS
19171 ac_sub_configure_args=
19172 ac_prev=
fdc59709
PB
19173 eval "set x $ac_configure_args"
19174 shift
19175 for ac_arg
19176 do
c906108c
SS
19177 if test -n "$ac_prev"; then
19178 ac_prev=
19179 continue
19180 fi
bec39cab 19181 case $ac_arg in
c906108c
SS
19182 -cache-file | --cache-file | --cache-fil | --cache-fi \
19183 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19184 ac_prev=cache_file ;;
19185 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19186 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19187 | --c=*)
19188 ;;
19189 --config-cache | -C)
c906108c
SS
19190 ;;
19191 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19192 ac_prev=srcdir ;;
19193 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19194 ;;
bec39cab
AC
19195 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19196 ac_prev=prefix ;;
19197 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19198 ;;
81ecdfbb
RW
19199 --disable-option-checking)
19200 ;;
fdc59709
PB
19201 *)
19202 case $ac_arg in
81ecdfbb 19203 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19204 esac
81ecdfbb 19205 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19206 esac
19207 done
19208
bec39cab
AC
19209 # Always prepend --prefix to ensure using the same prefix
19210 # in subdir configurations.
fdc59709
PB
19211 ac_arg="--prefix=$prefix"
19212 case $ac_arg in
81ecdfbb 19213 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19214 esac
81ecdfbb
RW
19215 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19216
19217 # Pass --silent
19218 if test "$silent" = yes; then
19219 ac_sub_configure_args="--silent $ac_sub_configure_args"
19220 fi
19221
19222 # Always prepend --disable-option-checking to silence warnings, since
19223 # different subdirs can have different --enable and --with options.
19224 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19225
b4e70030 19226 ac_popdir=`pwd`
bec39cab 19227 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19228
19229 # Do not complain, so a configure script can configure whichever
19230 # parts of a large source tree are present.
fdc59709 19231 test -d "$srcdir/$ac_dir" || continue
c906108c 19232
81ecdfbb
RW
19233 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19234 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19235 $as_echo "$ac_msg" >&6
19236 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19237 ac_builddir=.
19238
81ecdfbb
RW
19239case "$ac_dir" in
19240.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19241*)
19242 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19243 # A ".." for each directory in $ac_dir_suffix.
19244 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19245 case $ac_top_builddir_sub in
19246 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19247 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19248 esac ;;
19249esac
19250ac_abs_top_builddir=$ac_pwd
19251ac_abs_builddir=$ac_pwd$ac_dir_suffix
19252# for backward compatibility:
19253ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19254
19255case $srcdir in
81ecdfbb 19256 .) # We are building in place.
bec39cab 19257 ac_srcdir=.
81ecdfbb
RW
19258 ac_top_srcdir=$ac_top_builddir_sub
19259 ac_abs_top_srcdir=$ac_pwd ;;
19260 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19261 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19262 ac_top_srcdir=$srcdir
19263 ac_abs_top_srcdir=$srcdir ;;
19264 *) # Relative name.
19265 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19266 ac_top_srcdir=$ac_top_build_prefix$srcdir
19267 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19268esac
81ecdfbb 19269ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19270
c906108c 19271
fdc59709 19272 cd "$ac_dir"
c906108c
SS
19273
19274 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19275 if test -f "$ac_srcdir/configure.gnu"; then
19276 ac_sub_configure=$ac_srcdir/configure.gnu
19277 elif test -f "$ac_srcdir/configure"; then
19278 ac_sub_configure=$ac_srcdir/configure
19279 elif test -f "$ac_srcdir/configure.in"; then
19280 # This should be Cygnus configure.
19281 ac_sub_configure=$ac_aux_dir/configure
c906108c 19282 else
81ecdfbb
RW
19283 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19284$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19285 ac_sub_configure=
19286 fi
19287
19288 # The recursion is here.
19289 if test -n "$ac_sub_configure"; then
c906108c 19290 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19291 case $cache_file in
19292 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19293 *) # Relative name.
19294 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19295 esac
c906108c 19296
81ecdfbb
RW
19297 { $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
19298$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19299 # The eval makes quoting arguments work.
fdc59709
PB
19300 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19301 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 19302 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19303 fi
19304
fdc59709 19305 cd "$ac_popdir"
c906108c
SS
19306 done
19307fi
81ecdfbb
RW
19308if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19309 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19310$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19311fi
c906108c 19312
This page took 3.670165 seconds and 4 git commands to generate.