]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
Generated files
[thirdparty/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
63a9e923
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.
63a9e923 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
63a9e923
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
63a9e923
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 :
63a9e923
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"
63a9e923 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
63a9e923
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
63a9e923
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
63a9e923 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
63a9e923
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
63a9e923 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
63a9e923
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.
63a9e923 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 ||
63a9e923 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
63a9e923 532 as_ln_s='cp -pR'
b4e70030 533 fi
bec39cab 534else
63a9e923 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
63a9e923
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
63a9e923
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c906108c 559
bec39cab 560# Name of the host.
63a9e923 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
63a9e923 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
4df42755
DE
704HAVE_GUILE_FALSE
705HAVE_GUILE_TRUE
ed3ef339
DE
706GUILE_LIBS
707GUILE_CPPFLAGS
e76c5d17
DE
708GUILD_TARGET_FLAG
709GUILD
ed3ef339 710pkg_config_prog_path
4df42755
DE
711HAVE_PYTHON_FALSE
712HAVE_PYTHON_TRUE
ac534cba
JB
713PYTHON_LIBS
714PYTHON_CPPFLAGS
81ecdfbb 715PYTHON_CFLAGS
ec685c5e 716python_prog_path
2400729e
UW
717LTLIBMPFR
718LIBMPFR
719HAVE_LIBMPFR
81ecdfbb
RW
720LTLIBEXPAT
721LIBEXPAT
722HAVE_LIBEXPAT
b8e0a31c 723JIT_READER_DIR
f997c383 724TARGET_PTR
39037522 725READLINE_TEXI_INCFLAG
81ecdfbb
RW
726READLINE_CFLAGS
727READLINE_DEPS
728READLINE
016a3251
DD
729LTLIBICONV
730LIBICONV
711a72d3
L
731zlibinc
732zlibdir
81ecdfbb
RW
733MIG
734WINDRES
735DLLTOOL
c971b7fa 736AR
81ecdfbb
RW
737YFLAGS
738YACC
c971b7fa 739RANLIB
81ecdfbb 740LN_S
c971b7fa
PA
741INSTALL_DATA
742INSTALL_SCRIPT
743INSTALL_PROGRAM
744AWK
81ecdfbb
RW
745REPORT_BUGS_TEXI
746REPORT_BUGS_TO
747PKGVERSION
b292c783 748HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
749TARGET_OBS
750subdirs
751GDB_DATADIR
752DEBUGDIR
5048e516
JK
753MAKEINFO_EXTRA_FLAGS
754MAKEINFOFLAGS
755MAKEINFO
81ecdfbb
RW
756PACKAGE
757GNULIB_STDINT_H
81ecdfbb
RW
758CATOBJEXT
759GENCAT
760INSTOBJEXT
761DATADIRNAME
762CATALOGS
763POSUB
764GMSGFMT
765XGETTEXT
766INCINTL
767LIBINTL_DEP
768LIBINTL
769USE_NLS
81ecdfbb
RW
770CCDEPMODE
771DEPDIR
772am__leading_dot
0bcda685
PA
773CXX_DIALECT
774HAVE_CXX11
4869db5e
RM
775INSTALL_STRIP_PROGRAM
776STRIP
777install_sh
81ecdfbb
RW
778target_os
779target_vendor
780target_cpu
781target
782host_os
783host_vendor
784host_cpu
785host
786build_os
787build_vendor
788build_cpu
789build
c971b7fa
PA
790EGREP
791GREP
792CPP
3bc3d82a
PA
793ac_ct_CXX
794CXXFLAGS
795CXX
81ecdfbb
RW
796OBJEXT
797EXEEXT
798ac_ct_CC
799CPPFLAGS
800LDFLAGS
801CFLAGS
802CC
803MAINT
804MAINTAINER_MODE_FALSE
805MAINTAINER_MODE_TRUE
806target_alias
807host_alias
808build_alias
809LIBS
810ECHO_T
811ECHO_N
812ECHO_C
813DEFS
814mandir
815localedir
816libdir
817psdir
818pdfdir
819dvidir
820htmldir
821infodir
822docdir
823oldincludedir
824includedir
825localstatedir
826sharedstatedir
827sysconfdir
828datadir
829datarootdir
830libexecdir
831sbindir
832bindir
833program_transform_name
834prefix
835exec_prefix
836PACKAGE_URL
837PACKAGE_BUGREPORT
838PACKAGE_STRING
839PACKAGE_VERSION
840PACKAGE_TARNAME
841PACKAGE_NAME
842PATH_SEPARATOR
843SHELL'
2b351b19 844ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
845ac_user_opts='
846enable_option_checking
847enable_maintainer_mode
da2f07f1
JK
848enable_plugins
849enable_largefile
81ecdfbb
RW
850with_separate_debug_dir
851with_gdb_datadir
852with_relocated_sources
7349ff92 853with_auto_load_dir
bccbefd2 854with_auto_load_safe_path
81ecdfbb
RW
855enable_targets
856enable_64_bit_bfd
857enable_gdbcli
858enable_gdbmi
859enable_tui
860enable_gdbtk
05e7c244 861with_libunwind_ia64
81ecdfbb
RW
862with_curses
863enable_profiling
864with_pkgversion
865with_bugurl
711a72d3 866with_system_zlib
016a3251
DD
867with_gnu_ld
868enable_rpath
81ecdfbb 869with_libiconv_prefix
478aac75 870with_iconv_bin
81ecdfbb 871with_system_readline
b8e0a31c 872with_jit_reader_dir
81ecdfbb 873with_expat
81ecdfbb 874with_libexpat_prefix
2400729e
UW
875with_mpfr
876with_libmpfr_prefix
81ecdfbb 877with_python
ed3ef339 878with_guile
a8db4212 879enable_libmcheck
58bfce93
MM
880with_intel_pt
881with_libipt_prefix
81ecdfbb
RW
882with_included_regex
883with_sysroot
884with_system_gdbinit
885enable_werror
886enable_build_warnings
887enable_gdb_build_warnings
608e2dbb
TT
888with_lzma
889with_liblzma_prefix
81ecdfbb
RW
890with_tcl
891with_tk
892with_x
893enable_sim
894enable_multi_ice
496c0e1b 895enable_gdbserver
393fd4c3
YQ
896with_babeltrace
897with_libbabeltrace_prefix
81ecdfbb
RW
898'
899 ac_precious_vars='build_alias
900host_alias
901target_alias
902CC
903CFLAGS
904LDFLAGS
905LIBS
906CPPFLAGS
3bc3d82a
PA
907CXX
908CXXFLAGS
909CCC
81ecdfbb 910CPP
f06e05e0
JK
911MAKEINFO
912MAKEINFOFLAGS
81ecdfbb
RW
913YACC
914YFLAGS
915XMKMF'
5ae98d25 916ac_subdirs_all='testsuite
81ecdfbb
RW
917gdbtk
918multi-ice
919gdbserver'
c906108c
SS
920
921# Initialize some variables set by options.
bec39cab
AC
922ac_init_help=
923ac_init_version=false
81ecdfbb
RW
924ac_unrecognized_opts=
925ac_unrecognized_sep=
c906108c
SS
926# The variables have the same names as the options, with
927# dashes changed to underlines.
bec39cab 928cache_file=/dev/null
c906108c 929exec_prefix=NONE
c906108c 930no_create=
c906108c
SS
931no_recursion=
932prefix=NONE
933program_prefix=NONE
934program_suffix=NONE
935program_transform_name=s,x,x,
936silent=
937site=
938srcdir=
c906108c
SS
939verbose=
940x_includes=NONE
941x_libraries=NONE
bec39cab
AC
942
943# Installation directory options.
944# These are left unexpanded so users can "make install exec_prefix=/foo"
945# and all the variables that are supposed to be based on exec_prefix
946# by default will actually change.
947# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 948# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
949bindir='${exec_prefix}/bin'
950sbindir='${exec_prefix}/sbin'
951libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
952datarootdir='${prefix}/share'
953datadir='${datarootdir}'
c906108c
SS
954sysconfdir='${prefix}/etc'
955sharedstatedir='${prefix}/com'
956localstatedir='${prefix}/var'
c906108c
SS
957includedir='${prefix}/include'
958oldincludedir='/usr/include'
81ecdfbb
RW
959docdir='${datarootdir}/doc/${PACKAGE}'
960infodir='${datarootdir}/info'
961htmldir='${docdir}'
962dvidir='${docdir}'
963pdfdir='${docdir}'
964psdir='${docdir}'
965libdir='${exec_prefix}/lib'
966localedir='${datarootdir}/locale'
967mandir='${datarootdir}/man'
c906108c 968
c906108c 969ac_prev=
81ecdfbb 970ac_dashdash=
c906108c
SS
971for ac_option
972do
c906108c
SS
973 # If the previous option needs an argument, assign it.
974 if test -n "$ac_prev"; then
81ecdfbb 975 eval $ac_prev=\$ac_option
c906108c
SS
976 ac_prev=
977 continue
978 fi
979
81ecdfbb 980 case $ac_option in
63a9e923
SM
981 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
982 *=) ac_optarg= ;;
983 *) ac_optarg=yes ;;
81ecdfbb 984 esac
c906108c
SS
985
986 # Accept the important Cygnus configure options, so we can diagnose typos.
987
81ecdfbb
RW
988 case $ac_dashdash$ac_option in
989 --)
990 ac_dashdash=yes ;;
c906108c
SS
991
992 -bindir | --bindir | --bindi | --bind | --bin | --bi)
993 ac_prev=bindir ;;
994 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 995 bindir=$ac_optarg ;;
c906108c
SS
996
997 -build | --build | --buil | --bui | --bu)
bec39cab 998 ac_prev=build_alias ;;
c906108c 999 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1000 build_alias=$ac_optarg ;;
c906108c
SS
1001
1002 -cache-file | --cache-file | --cache-fil | --cache-fi \
1003 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1004 ac_prev=cache_file ;;
1005 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1006 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1007 cache_file=$ac_optarg ;;
1008
1009 --config-cache | -C)
1010 cache_file=config.cache ;;
c906108c 1011
81ecdfbb 1012 -datadir | --datadir | --datadi | --datad)
c906108c 1013 ac_prev=datadir ;;
81ecdfbb 1014 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1015 datadir=$ac_optarg ;;
c906108c 1016
81ecdfbb
RW
1017 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1018 | --dataroo | --dataro | --datar)
1019 ac_prev=datarootdir ;;
1020 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1021 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1022 datarootdir=$ac_optarg ;;
1023
c906108c 1024 -disable-* | --disable-*)
81ecdfbb 1025 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1026 # Reject names that are not valid shell variable names.
81ecdfbb 1027 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
63a9e923 1028 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1029 ac_useropt_orig=$ac_useropt
1030 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1031 case $ac_user_opts in
1032 *"
1033"enable_$ac_useropt"
1034"*) ;;
1035 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1036 ac_unrecognized_sep=', ';;
1037 esac
1038 eval enable_$ac_useropt=no ;;
1039
1040 -docdir | --docdir | --docdi | --doc | --do)
1041 ac_prev=docdir ;;
1042 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1043 docdir=$ac_optarg ;;
1044
1045 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1046 ac_prev=dvidir ;;
1047 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1048 dvidir=$ac_optarg ;;
c906108c
SS
1049
1050 -enable-* | --enable-*)
81ecdfbb 1051 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1052 # Reject names that are not valid shell variable names.
81ecdfbb 1053 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
63a9e923 1054 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1055 ac_useropt_orig=$ac_useropt
1056 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1057 case $ac_user_opts in
1058 *"
1059"enable_$ac_useropt"
1060"*) ;;
1061 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1062 ac_unrecognized_sep=', ';;
b4e70030 1063 esac
81ecdfbb 1064 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1065
1066 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1067 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1068 | --exec | --exe | --ex)
1069 ac_prev=exec_prefix ;;
1070 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1071 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1072 | --exec=* | --exe=* | --ex=*)
bec39cab 1073 exec_prefix=$ac_optarg ;;
c906108c
SS
1074
1075 -gas | --gas | --ga | --g)
1076 # Obsolete; use --with-gas.
1077 with_gas=yes ;;
1078
bec39cab
AC
1079 -help | --help | --hel | --he | -h)
1080 ac_init_help=long ;;
1081 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1082 ac_init_help=recursive ;;
1083 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1084 ac_init_help=short ;;
c906108c
SS
1085
1086 -host | --host | --hos | --ho)
bec39cab 1087 ac_prev=host_alias ;;
c906108c 1088 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1089 host_alias=$ac_optarg ;;
c906108c 1090
81ecdfbb
RW
1091 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1092 ac_prev=htmldir ;;
1093 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1094 | --ht=*)
1095 htmldir=$ac_optarg ;;
1096
c906108c
SS
1097 -includedir | --includedir | --includedi | --included | --include \
1098 | --includ | --inclu | --incl | --inc)
1099 ac_prev=includedir ;;
1100 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1101 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1102 includedir=$ac_optarg ;;
c906108c
SS
1103
1104 -infodir | --infodir | --infodi | --infod | --info | --inf)
1105 ac_prev=infodir ;;
1106 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1107 infodir=$ac_optarg ;;
c906108c
SS
1108
1109 -libdir | --libdir | --libdi | --libd)
1110 ac_prev=libdir ;;
1111 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1112 libdir=$ac_optarg ;;
c906108c
SS
1113
1114 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1115 | --libexe | --libex | --libe)
1116 ac_prev=libexecdir ;;
1117 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1118 | --libexe=* | --libex=* | --libe=*)
bec39cab 1119 libexecdir=$ac_optarg ;;
c906108c 1120
81ecdfbb
RW
1121 -localedir | --localedir | --localedi | --localed | --locale)
1122 ac_prev=localedir ;;
1123 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1124 localedir=$ac_optarg ;;
1125
c906108c 1126 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1127 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1128 ac_prev=localstatedir ;;
1129 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1130 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1131 localstatedir=$ac_optarg ;;
c906108c
SS
1132
1133 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1134 ac_prev=mandir ;;
1135 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1136 mandir=$ac_optarg ;;
c906108c
SS
1137
1138 -nfp | --nfp | --nf)
1139 # Obsolete; use --without-fp.
1140 with_fp=no ;;
1141
1142 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1143 | --no-cr | --no-c | -n)
c906108c
SS
1144 no_create=yes ;;
1145
1146 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1147 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1148 no_recursion=yes ;;
1149
1150 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1151 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1152 | --oldin | --oldi | --old | --ol | --o)
1153 ac_prev=oldincludedir ;;
1154 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1155 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1156 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1157 oldincludedir=$ac_optarg ;;
c906108c
SS
1158
1159 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1160 ac_prev=prefix ;;
1161 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1162 prefix=$ac_optarg ;;
c906108c
SS
1163
1164 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1165 | --program-pre | --program-pr | --program-p)
1166 ac_prev=program_prefix ;;
1167 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1168 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1169 program_prefix=$ac_optarg ;;
c906108c
SS
1170
1171 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1172 | --program-suf | --program-su | --program-s)
1173 ac_prev=program_suffix ;;
1174 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1175 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1176 program_suffix=$ac_optarg ;;
c906108c
SS
1177
1178 -program-transform-name | --program-transform-name \
1179 | --program-transform-nam | --program-transform-na \
1180 | --program-transform-n | --program-transform- \
1181 | --program-transform | --program-transfor \
1182 | --program-transfo | --program-transf \
1183 | --program-trans | --program-tran \
1184 | --progr-tra | --program-tr | --program-t)
1185 ac_prev=program_transform_name ;;
1186 -program-transform-name=* | --program-transform-name=* \
1187 | --program-transform-nam=* | --program-transform-na=* \
1188 | --program-transform-n=* | --program-transform-=* \
1189 | --program-transform=* | --program-transfor=* \
1190 | --program-transfo=* | --program-transf=* \
1191 | --program-trans=* | --program-tran=* \
1192 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1193 program_transform_name=$ac_optarg ;;
c906108c 1194
81ecdfbb
RW
1195 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1196 ac_prev=pdfdir ;;
1197 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1198 pdfdir=$ac_optarg ;;
1199
1200 -psdir | --psdir | --psdi | --psd | --ps)
1201 ac_prev=psdir ;;
1202 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1203 psdir=$ac_optarg ;;
1204
c906108c
SS
1205 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1206 | -silent | --silent | --silen | --sile | --sil)
1207 silent=yes ;;
1208
1209 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1210 ac_prev=sbindir ;;
1211 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1212 | --sbi=* | --sb=*)
bec39cab 1213 sbindir=$ac_optarg ;;
c906108c
SS
1214
1215 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1216 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1217 | --sharedst | --shareds | --shared | --share | --shar \
1218 | --sha | --sh)
1219 ac_prev=sharedstatedir ;;
1220 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1221 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1222 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1223 | --sha=* | --sh=*)
bec39cab 1224 sharedstatedir=$ac_optarg ;;
c906108c
SS
1225
1226 -site | --site | --sit)
1227 ac_prev=site ;;
1228 -site=* | --site=* | --sit=*)
bec39cab 1229 site=$ac_optarg ;;
3ace7edb 1230
c906108c
SS
1231 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1232 ac_prev=srcdir ;;
1233 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1234 srcdir=$ac_optarg ;;
c906108c
SS
1235
1236 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1237 | --syscon | --sysco | --sysc | --sys | --sy)
1238 ac_prev=sysconfdir ;;
1239 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1240 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1241 sysconfdir=$ac_optarg ;;
c906108c
SS
1242
1243 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1244 ac_prev=target_alias ;;
c906108c 1245 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1246 target_alias=$ac_optarg ;;
c906108c
SS
1247
1248 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1249 verbose=yes ;;
1250
bec39cab
AC
1251 -version | --version | --versio | --versi | --vers | -V)
1252 ac_init_version=: ;;
c906108c
SS
1253
1254 -with-* | --with-*)
81ecdfbb 1255 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1256 # Reject names that are not valid shell variable names.
81ecdfbb 1257 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
63a9e923 1258 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1259 ac_useropt_orig=$ac_useropt
1260 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1261 case $ac_user_opts in
1262 *"
1263"with_$ac_useropt"
1264"*) ;;
1265 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1266 ac_unrecognized_sep=', ';;
b4e70030 1267 esac
81ecdfbb 1268 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1269
1270 -without-* | --without-*)
81ecdfbb 1271 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1272 # Reject names that are not valid shell variable names.
81ecdfbb 1273 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
63a9e923 1274 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1275 ac_useropt_orig=$ac_useropt
1276 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1277 case $ac_user_opts in
1278 *"
1279"with_$ac_useropt"
1280"*) ;;
1281 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1282 ac_unrecognized_sep=', ';;
1283 esac
1284 eval with_$ac_useropt=no ;;
c906108c
SS
1285
1286 --x)
1287 # Obsolete; use --with-x.
1288 with_x=yes ;;
1289
1290 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1291 | --x-incl | --x-inc | --x-in | --x-i)
1292 ac_prev=x_includes ;;
1293 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1294 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1295 x_includes=$ac_optarg ;;
c906108c
SS
1296
1297 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1298 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1299 ac_prev=x_libraries ;;
1300 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1301 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1302 x_libraries=$ac_optarg ;;
c906108c 1303
63a9e923
SM
1304 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1305Try \`$0 --help' for more information"
c906108c
SS
1306 ;;
1307
bec39cab
AC
1308 *=*)
1309 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1310 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1311 case $ac_envvar in #(
1312 '' | [0-9]* | *[!_$as_cr_alnum]* )
63a9e923 1313 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1314 esac
1315 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1316 export $ac_envvar ;;
1317
c906108c 1318 *)
bec39cab 1319 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1320 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1321 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1322 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
63a9e923 1323 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1324 ;;
1325
1326 esac
1327done
1328
1329if test -n "$ac_prev"; then
bec39cab 1330 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
63a9e923 1331 as_fn_error $? "missing argument to $ac_option"
c906108c 1332fi
c906108c 1333
81ecdfbb
RW
1334if test -n "$ac_unrecognized_opts"; then
1335 case $enable_option_checking in
1336 no) ;;
63a9e923 1337 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1338 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1339 esac
81ecdfbb 1340fi
b4e70030 1341
81ecdfbb
RW
1342# Check all directory arguments for consistency.
1343for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1344 datadir sysconfdir sharedstatedir localstatedir includedir \
1345 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1346 libdir localedir mandir
b4e70030 1347do
81ecdfbb
RW
1348 eval ac_val=\$$ac_var
1349 # Remove trailing slashes.
1350 case $ac_val in
1351 */ )
1352 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1353 eval $ac_var=\$ac_val;;
1354 esac
1355 # Be sure to have absolute directory names.
b4e70030 1356 case $ac_val in
81ecdfbb
RW
1357 [\\/$]* | ?:[\\/]* ) continue;;
1358 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1359 esac
63a9e923 1360 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1361done
1362
bec39cab
AC
1363# There might be people who depend on the old broken behavior: `$host'
1364# used to hold the argument of --host etc.
1365# FIXME: To remove some day.
1366build=$build_alias
1367host=$host_alias
1368target=$target_alias
1369
1370# FIXME: To remove some day.
1371if test "x$host_alias" != x; then
1372 if test "x$build_alias" = x; then
1373 cross_compiling=maybe
bec39cab
AC
1374 elif test "x$build_alias" != "x$host_alias"; then
1375 cross_compiling=yes
1376 fi
1377fi
c906108c 1378
bec39cab
AC
1379ac_tool_prefix=
1380test -n "$host_alias" && ac_tool_prefix=$host_alias-
1381
1382test "$silent" = yes && exec 6>/dev/null
c906108c 1383
c906108c 1384
81ecdfbb
RW
1385ac_pwd=`pwd` && test -n "$ac_pwd" &&
1386ac_ls_di=`ls -di .` &&
1387ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
63a9e923 1388 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1389test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
63a9e923 1390 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1391
1392
c906108c
SS
1393# Find the source files, if location was not specified.
1394if test -z "$srcdir"; then
1395 ac_srcdir_defaulted=yes
81ecdfbb
RW
1396 # Try the directory containing this script, then the parent directory.
1397 ac_confdir=`$as_dirname -- "$as_myself" ||
1398$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1399 X"$as_myself" : 'X\(//\)[^/]' \| \
1400 X"$as_myself" : 'X\(//\)$' \| \
1401 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1402$as_echo X"$as_myself" |
1403 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1404 s//\1/
1405 q
1406 }
1407 /^X\(\/\/\)[^/].*/{
1408 s//\1/
1409 q
1410 }
1411 /^X\(\/\/\)$/{
1412 s//\1/
1413 q
1414 }
1415 /^X\(\/\).*/{
1416 s//\1/
1417 q
1418 }
1419 s/.*/./; q'`
c906108c 1420 srcdir=$ac_confdir
81ecdfbb 1421 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1422 srcdir=..
1423 fi
1424else
1425 ac_srcdir_defaulted=no
1426fi
81ecdfbb
RW
1427if test ! -r "$srcdir/$ac_unique_file"; then
1428 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
63a9e923 1429 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1430fi
1431ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1432ac_abs_confdir=`(
63a9e923 1433 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1434 pwd)`
1435# When building in place, set srcdir=.
1436if test "$ac_abs_confdir" = "$ac_pwd"; then
1437 srcdir=.
1438fi
1439# Remove unnecessary trailing slashes from srcdir.
1440# Double slashes in file names in object file debugging info
1441# mess up M-x gdb in Emacs.
1442case $srcdir in
1443*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1444esac
1445for ac_var in $ac_precious_vars; do
1446 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1447 eval ac_env_${ac_var}_value=\$${ac_var}
1448 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1449 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1450done
c906108c 1451
bec39cab
AC
1452#
1453# Report the --help message.
1454#
1455if test "$ac_init_help" = "long"; then
1456 # Omit some internal or obsolete options to make the list less imposing.
1457 # This message is too long to be a string in the A/UX 3.1 sh.
1458 cat <<_ACEOF
1459\`configure' configures this package to adapt to many kinds of systems.
1460
1461Usage: $0 [OPTION]... [VAR=VALUE]...
1462
1463To assign environment variables (e.g., CC, CFLAGS...), specify them as
1464VAR=VALUE. See below for descriptions of some of the useful variables.
1465
1466Defaults for the options are specified in brackets.
1467
1468Configuration:
1469 -h, --help display this help and exit
1470 --help=short display options specific to this package
1471 --help=recursive display the short help of all the included packages
1472 -V, --version display version information and exit
63a9e923 1473 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1474 --cache-file=FILE cache test results in FILE [disabled]
1475 -C, --config-cache alias for \`--cache-file=config.cache'
1476 -n, --no-create do not create output files
1477 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1478
bec39cab
AC
1479Installation directories:
1480 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1481 [$ac_default_prefix]
bec39cab 1482 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1483 [PREFIX]
bec39cab
AC
1484
1485By default, \`make install' will install all the files in
1486\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1487an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1488for instance \`--prefix=\$HOME'.
1489
1490For better control, use the options below.
1491
1492Fine tuning of the installation directories:
81ecdfbb
RW
1493 --bindir=DIR user executables [EPREFIX/bin]
1494 --sbindir=DIR system admin executables [EPREFIX/sbin]
1495 --libexecdir=DIR program executables [EPREFIX/libexec]
1496 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1497 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1498 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1499 --libdir=DIR object code libraries [EPREFIX/lib]
1500 --includedir=DIR C header files [PREFIX/include]
1501 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1502 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1503 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1504 --infodir=DIR info documentation [DATAROOTDIR/info]
1505 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1506 --mandir=DIR man documentation [DATAROOTDIR/man]
1507 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1508 --htmldir=DIR html documentation [DOCDIR]
1509 --dvidir=DIR dvi documentation [DOCDIR]
1510 --pdfdir=DIR pdf documentation [DOCDIR]
1511 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1512_ACEOF
1513
1514 cat <<\_ACEOF
1515
9009e1ae
MR
1516Program names:
1517 --program-prefix=PREFIX prepend PREFIX to installed program names
1518 --program-suffix=SUFFIX append SUFFIX to installed program names
1519 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1520
bec39cab
AC
1521X features:
1522 --x-includes=DIR X include files are in DIR
1523 --x-libraries=DIR X library files are in DIR
1524
1525System types:
1526 --build=BUILD configure for building on BUILD [guessed]
1527 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1528 --target=TARGET configure for building compilers for TARGET [HOST]
1529_ACEOF
1530fi
1531
1532if test -n "$ac_init_help"; then
1533
1534 cat <<\_ACEOF
1535
1536Optional Features:
81ecdfbb 1537 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1538 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1539 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
63a9e923
SM
1540 --enable-maintainer-mode
1541 enable make rules and dependencies not useful (and
1542 sometimes confusing) to the casual installer
2974be62 1543 --enable-plugins Enable support for plugins
da2f07f1 1544 --disable-largefile omit support for large files
a1220294
TT
1545 --enable-targets=TARGETS
1546 alternative target configurations
c0993dbe 1547 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1548 --disable-gdbcli disable command-line interface (CLI)
1549 --disable-gdbmi disable machine-interface (MI)
1550 --enable-tui enable full-screen terminal user interface (TUI)
1551 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1552 --enable-profiling enable profiling of GDB
3841debe 1553 --disable-rpath do not hardcode runtime library paths
17ef446e 1554 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1555 --enable-werror treat compile warnings as errors
32c1c914 1556 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1557 --enable-gdb-build-warnings
32c1c914 1558 enable GDB specific build-time compiler warnings if
a1220294 1559 gcc is used
32c1c914 1560 --enable-sim link gdb with simulator
bec39cab 1561 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1562 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1563 is auto)
bec39cab
AC
1564
1565Optional Packages:
1566 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1567 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1568 --with-separate-debug-dir=PATH
32c1c914 1569 look for global separate debug info in this path
62e4f60c 1570 [LIBDIR/debug]
b14b1491
TT
1571 --with-gdb-datadir=PATH look for global separate data files in this path
1572 [DATADIR/gdb]
29b0e8a2 1573 --with-relocated-sources=PATH
32c1c914 1574 automatically relocate this path for source files
7349ff92 1575 --with-auto-load-dir=PATH
aff139ff 1576 directories from which to load auto-loaded scripts
1564a261 1577 [$debugdir:$datadir/auto-load]
bccbefd2 1578 --with-auto-load-safe-path=PATH
aff139ff 1579 directories safe to hold auto-loaded files
7349ff92 1580 [--with-auto-load-dir]
bccbefd2
JK
1581 --without-auto-load-safe-path
1582 do not restrict auto-loaded files locations
05e7c244 1583 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1584 --with-curses use the curses library instead of the termcap
1585 library
c16158bc
JM
1586 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1587 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1588 --with-system-zlib use installed libz
016a3251
DD
1589 --with-gnu-ld assume the C compiler uses GNU ld default=no
1590 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1591 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1592 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1593 --with-system-readline use installed readline library
b8e0a31c
SD
1594 --with-jit-reader-dir=PATH
1595 directory to load the JIT readers from
5c39566f 1596 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1597 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1598 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1599 --with-mpfr include MPFR support (auto/yes/no)
1600 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1601 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1602 --with-python[=PYTHON] include python support
1603 (auto/yes/no/<python-program>)
ed3ef339
DE
1604 --with-guile[=GUILE] include guile support
1605 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1606 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1607 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1608 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1609 --without-included-regex
1610 don't use included regex; this is the default on
1611 systems with version 2 of the GNU C library (use
1612 with caution on other system)
81ecdfbb 1613 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1614 --with-system-gdbinit=PATH
32c1c914 1615 automatically load a system-wide gdbinit file
608e2dbb
TT
1616 --with-lzma support lzma compression (auto/yes/no)
1617 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1618 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1619 --with-tcl directory containing tcl configuration (tclConfig.sh)
1620 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1621 --with-x use the X Window System
393fd4c3
YQ
1622 --with-babeltrace include babeltrace support (auto/yes/no)
1623 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1624 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1625
1626Some influential environment variables:
1627 CC C compiler command
1628 CFLAGS C compiler flags
1629 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1630 nonstandard directory <lib dir>
81ecdfbb 1631 LIBS libraries to pass to the linker, e.g. -l<library>
63a9e923 1632 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1633 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1634 CXX C++ compiler command
1635 CXXFLAGS C++ compiler flags
bec39cab 1636 CPP C preprocessor
f06e05e0
JK
1637 MAKEINFO Parent configure detects if it is of sufficient version.
1638 MAKEINFOFLAGS
1639 Parameters for MAKEINFO.
63a9e923
SM
1640 YACC The `Yet Another Compiler Compiler' implementation to use.
1641 Defaults to the first program found out of: `bison -y', `byacc',
1642 `yacc'.
81ecdfbb
RW
1643 YFLAGS The list of arguments that will be passed by default to $YACC.
1644 This script will default YFLAGS to the empty string to avoid a
1645 default value of `-d' given by some make applications.
1646 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1647
1648Use these variables to override the choices made by `configure' or to help
1649it to find libraries and programs with nonstandard names/locations.
1650
81ecdfbb 1651Report bugs to the package provider.
bec39cab 1652_ACEOF
81ecdfbb 1653ac_status=$?
bec39cab
AC
1654fi
1655
1656if test "$ac_init_help" = "recursive"; then
1657 # If there are subdirs, report their specific --help.
bec39cab 1658 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1659 test -d "$ac_dir" ||
1660 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1661 continue
bec39cab
AC
1662 ac_builddir=.
1663
81ecdfbb
RW
1664case "$ac_dir" in
1665.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1666*)
1667 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1668 # A ".." for each directory in $ac_dir_suffix.
1669 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1670 case $ac_top_builddir_sub in
1671 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1672 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1673 esac ;;
1674esac
1675ac_abs_top_builddir=$ac_pwd
1676ac_abs_builddir=$ac_pwd$ac_dir_suffix
1677# for backward compatibility:
1678ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1679
1680case $srcdir in
81ecdfbb 1681 .) # We are building in place.
bec39cab 1682 ac_srcdir=.
81ecdfbb
RW
1683 ac_top_srcdir=$ac_top_builddir_sub
1684 ac_abs_top_srcdir=$ac_pwd ;;
1685 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1686 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1687 ac_top_srcdir=$srcdir
1688 ac_abs_top_srcdir=$srcdir ;;
1689 *) # Relative name.
1690 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1691 ac_top_srcdir=$ac_top_build_prefix$srcdir
1692 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1693esac
81ecdfbb 1694ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1695
81ecdfbb
RW
1696 cd "$ac_dir" || { ac_status=$?; continue; }
1697 # Check for guested configure.
1698 if test -f "$ac_srcdir/configure.gnu"; then
1699 echo &&
1700 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1701 elif test -f "$ac_srcdir/configure"; then
1702 echo &&
1703 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1704 else
81ecdfbb
RW
1705 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1706 fi || ac_status=$?
1707 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1708 done
1709fi
1710
81ecdfbb 1711test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1712if $ac_init_version; then
1713 cat <<\_ACEOF
81ecdfbb 1714configure
63a9e923 1715generated by GNU Autoconf 2.69
bec39cab 1716
63a9e923 1717Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1718This configure script is free software; the Free Software Foundation
1719gives unlimited permission to copy, distribute and modify it.
1720_ACEOF
81ecdfbb 1721 exit
bec39cab 1722fi
bec39cab 1723
81ecdfbb
RW
1724## ------------------------ ##
1725## Autoconf initialization. ##
1726## ------------------------ ##
bec39cab 1727
81ecdfbb
RW
1728# ac_fn_c_try_compile LINENO
1729# --------------------------
1730# Try to compile conftest.$ac_ext, and return whether this succeeded.
1731ac_fn_c_try_compile ()
1732{
1733 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1734 rm -f conftest.$ac_objext
1735 if { { ac_try="$ac_compile"
1736case "(($ac_try" in
1737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1738 *) ac_try_echo=$ac_try;;
1739esac
1740eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1741$as_echo "$ac_try_echo"; } >&5
1742 (eval "$ac_compile") 2>conftest.err
1743 ac_status=$?
1744 if test -s conftest.err; then
1745 grep -v '^ *+' conftest.err >conftest.er1
1746 cat conftest.er1 >&5
1747 mv -f conftest.er1 conftest.err
1748 fi
1749 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1750 test $ac_status = 0; } && {
1751 test -z "$ac_c_werror_flag" ||
1752 test ! -s conftest.err
1753 } && test -s conftest.$ac_objext; then :
1754 ac_retval=0
1755else
1756 $as_echo "$as_me: failed program was:" >&5
1757sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1758
81ecdfbb
RW
1759 ac_retval=1
1760fi
63a9e923
SM
1761 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1762 as_fn_set_status $ac_retval
81ecdfbb
RW
1763
1764} # ac_fn_c_try_compile
1765
3bc3d82a
PA
1766# ac_fn_cxx_try_compile LINENO
1767# ----------------------------
1768# Try to compile conftest.$ac_ext, and return whether this succeeded.
1769ac_fn_cxx_try_compile ()
1770{
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1772 rm -f conftest.$ac_objext
1773 if { { ac_try="$ac_compile"
1774case "(($ac_try" in
1775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776 *) ac_try_echo=$ac_try;;
1777esac
1778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779$as_echo "$ac_try_echo"; } >&5
1780 (eval "$ac_compile") 2>conftest.err
1781 ac_status=$?
1782 if test -s conftest.err; then
1783 grep -v '^ *+' conftest.err >conftest.er1
1784 cat conftest.er1 >&5
1785 mv -f conftest.er1 conftest.err
1786 fi
1787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1788 test $ac_status = 0; } && {
1789 test -z "$ac_cxx_werror_flag" ||
1790 test ! -s conftest.err
1791 } && test -s conftest.$ac_objext; then :
1792 ac_retval=0
1793else
1794 $as_echo "$as_me: failed program was:" >&5
1795sed 's/^/| /' conftest.$ac_ext >&5
1796
1797 ac_retval=1
1798fi
63a9e923
SM
1799 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1800 as_fn_set_status $ac_retval
3bc3d82a
PA
1801
1802} # ac_fn_cxx_try_compile
1803
81ecdfbb
RW
1804# ac_fn_c_try_cpp LINENO
1805# ----------------------
1806# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1807ac_fn_c_try_cpp ()
bec39cab 1808{
81ecdfbb
RW
1809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1810 if { { ac_try="$ac_cpp conftest.$ac_ext"
1811case "(($ac_try" in
1812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1813 *) ac_try_echo=$ac_try;;
1814esac
1815eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1816$as_echo "$ac_try_echo"; } >&5
1817 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1818 ac_status=$?
1819 if test -s conftest.err; then
1820 grep -v '^ *+' conftest.err >conftest.er1
1821 cat conftest.er1 >&5
1822 mv -f conftest.er1 conftest.err
1823 fi
1824 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63a9e923 1825 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1826 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1827 test ! -s conftest.err
1828 }; then :
1829 ac_retval=0
1830else
1831 $as_echo "$as_me: failed program was:" >&5
1832sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1833
81ecdfbb
RW
1834 ac_retval=1
1835fi
63a9e923
SM
1836 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1837 as_fn_set_status $ac_retval
bec39cab 1838
81ecdfbb 1839} # ac_fn_c_try_cpp
bec39cab 1840
81ecdfbb
RW
1841# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1842# -------------------------------------------------------
1843# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1844# the include files in INCLUDES and setting the cache variable VAR
1845# accordingly.
1846ac_fn_c_check_header_mongrel ()
1847{
1848 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
63a9e923 1849 if eval \${$3+:} false; then :
81ecdfbb
RW
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1851$as_echo_n "checking for $2... " >&6; }
63a9e923 1852if eval \${$3+:} false; then :
81ecdfbb
RW
1853 $as_echo_n "(cached) " >&6
1854fi
1855eval ac_res=\$$3
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1857$as_echo "$ac_res" >&6; }
1858else
1859 # Is the header compilable?
1860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1861$as_echo_n "checking $2 usability... " >&6; }
1862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1863/* end confdefs.h. */
1864$4
1865#include <$2>
1866_ACEOF
1867if ac_fn_c_try_compile "$LINENO"; then :
1868 ac_header_compiler=yes
1869else
1870 ac_header_compiler=no
1871fi
1872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1874$as_echo "$ac_header_compiler" >&6; }
bec39cab 1875
81ecdfbb
RW
1876# Is the header present?
1877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1878$as_echo_n "checking $2 presence... " >&6; }
1879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1880/* end confdefs.h. */
1881#include <$2>
1882_ACEOF
1883if ac_fn_c_try_cpp "$LINENO"; then :
1884 ac_header_preproc=yes
1885else
1886 ac_header_preproc=no
1887fi
63a9e923 1888rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1890$as_echo "$ac_header_preproc" >&6; }
bec39cab 1891
81ecdfbb
RW
1892# So? What about this header?
1893case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1894 yes:no: )
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1896$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1898$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1899 ;;
1900 no:yes:* )
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1902$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1904$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1906$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1908$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1910$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1911 ;;
1912esac
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1914$as_echo_n "checking for $2... " >&6; }
63a9e923 1915if eval \${$3+:} false; then :
81ecdfbb
RW
1916 $as_echo_n "(cached) " >&6
1917else
1918 eval "$3=\$ac_header_compiler"
1919fi
1920eval ac_res=\$$3
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1922$as_echo "$ac_res" >&6; }
1923fi
63a9e923 1924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1925
81ecdfbb 1926} # ac_fn_c_check_header_mongrel
bec39cab 1927
81ecdfbb
RW
1928# ac_fn_c_try_run LINENO
1929# ----------------------
1930# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1931# that executables *can* be run.
1932ac_fn_c_try_run ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 if { { ac_try="$ac_link"
1936case "(($ac_try" in
1937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1938 *) ac_try_echo=$ac_try;;
1939esac
1940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1941$as_echo "$ac_try_echo"; } >&5
1942 (eval "$ac_link") 2>&5
1943 ac_status=$?
1944 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1945 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1946 { { case "(($ac_try" in
1947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1948 *) ac_try_echo=$ac_try;;
1949esac
1950eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1951$as_echo "$ac_try_echo"; } >&5
1952 (eval "$ac_try") 2>&5
1953 ac_status=$?
1954 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1955 test $ac_status = 0; }; }; then :
1956 ac_retval=0
1957else
1958 $as_echo "$as_me: program exited with status $ac_status" >&5
1959 $as_echo "$as_me: failed program was:" >&5
1960sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1961
81ecdfbb
RW
1962 ac_retval=$ac_status
1963fi
1964 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
63a9e923
SM
1965 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1966 as_fn_set_status $ac_retval
bec39cab 1967
81ecdfbb 1968} # ac_fn_c_try_run
bec39cab 1969
81ecdfbb
RW
1970# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1971# -------------------------------------------------------
1972# Tests whether HEADER exists and can be compiled using the include files in
1973# INCLUDES, setting the cache variable VAR accordingly.
1974ac_fn_c_check_header_compile ()
1975{
1976 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1978$as_echo_n "checking for $2... " >&6; }
63a9e923 1979if eval \${$3+:} false; then :
81ecdfbb
RW
1980 $as_echo_n "(cached) " >&6
1981else
1982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1983/* end confdefs.h. */
1984$4
1985#include <$2>
bec39cab 1986_ACEOF
81ecdfbb
RW
1987if ac_fn_c_try_compile "$LINENO"; then :
1988 eval "$3=yes"
1989else
1990 eval "$3=no"
1991fi
1992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1993fi
1994eval ac_res=\$$3
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996$as_echo "$ac_res" >&6; }
63a9e923 1997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1998
81ecdfbb 1999} # ac_fn_c_check_header_compile
bec39cab 2000
2974be62
AM
2001# ac_fn_c_try_link LINENO
2002# -----------------------
2003# Try to link conftest.$ac_ext, and return whether this succeeded.
2004ac_fn_c_try_link ()
2005{
2006 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007 rm -f conftest.$ac_objext conftest$ac_exeext
2008 if { { ac_try="$ac_link"
2009case "(($ac_try" in
2010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2011 *) ac_try_echo=$ac_try;;
2012esac
2013eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2014$as_echo "$ac_try_echo"; } >&5
2015 (eval "$ac_link") 2>conftest.err
2016 ac_status=$?
2017 if test -s conftest.err; then
2018 grep -v '^ *+' conftest.err >conftest.er1
2019 cat conftest.er1 >&5
2020 mv -f conftest.er1 conftest.err
2021 fi
2022 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2023 test $ac_status = 0; } && {
2024 test -z "$ac_c_werror_flag" ||
2025 test ! -s conftest.err
2026 } && test -s conftest$ac_exeext && {
2027 test "$cross_compiling" = yes ||
63a9e923 2028 test -x conftest$ac_exeext
2974be62
AM
2029 }; then :
2030 ac_retval=0
2031else
2032 $as_echo "$as_me: failed program was:" >&5
2033sed 's/^/| /' conftest.$ac_ext >&5
2034
2035 ac_retval=1
2036fi
2037 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2038 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2039 # interfere with the next link command; also delete a directory that is
2040 # left behind by Apple's compiler. We do this before executing the actions.
2041 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
63a9e923
SM
2042 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2043 as_fn_set_status $ac_retval
2974be62
AM
2044
2045} # ac_fn_c_try_link
2046
81ecdfbb
RW
2047# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2048# --------------------------------------------
2049# Tries to find the compile-time value of EXPR in a program that includes
2050# INCLUDES, setting VAR accordingly. Returns whether the value could be
2051# computed
2052ac_fn_c_compute_int ()
2053{
2054 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2055 if test "$cross_compiling" = yes; then
2056 # Depending upon the size, compute the lo and hi bounds.
2057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) >= 0)];
63a9e923
SM
2064test_array [0] = 0;
2065return test_array [0];
bec39cab 2066
81ecdfbb
RW
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_lo=0 ac_mid=0
2073 while :; do
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) <= $ac_mid)];
63a9e923
SM
2081test_array [0] = 0;
2082return test_array [0];
bec39cab 2083
81ecdfbb
RW
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_hi=$ac_mid; break
2090else
2091 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2092 if test $ac_lo -le $ac_mid; then
2093 ac_lo= ac_hi=
2094 break
2095 fi
2096 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2097fi
81ecdfbb
RW
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099 done
c906108c 2100else
81ecdfbb
RW
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) < 0)];
63a9e923
SM
2108test_array [0] = 0;
2109return test_array [0];
bec39cab 2110
81ecdfbb
RW
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_hi=-1 ac_mid=-1
2117 while :; do
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121int
2122main ()
2123{
2124static int test_array [1 - 2 * !(($2) >= $ac_mid)];
63a9e923
SM
2125test_array [0] = 0;
2126return test_array [0];
bec39cab 2127
81ecdfbb
RW
2128 ;
2129 return 0;
2130}
2131_ACEOF
2132if ac_fn_c_try_compile "$LINENO"; then :
2133 ac_lo=$ac_mid; break
2134else
2135 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2136 if test $ac_mid -le $ac_hi; then
2137 ac_lo= ac_hi=
2138 break
2139 fi
2140 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2141fi
2142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 done
2144else
2145 ac_lo= ac_hi=
2146fi
2147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150# Binary search between lo and hi bounds.
2151while test "x$ac_lo" != "x$ac_hi"; do
2152 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2154/* end confdefs.h. */
2155$4
2156int
2157main ()
2158{
2159static int test_array [1 - 2 * !(($2) <= $ac_mid)];
63a9e923
SM
2160test_array [0] = 0;
2161return test_array [0];
bec39cab 2162
81ecdfbb
RW
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_compile "$LINENO"; then :
2168 ac_hi=$ac_mid
2169else
2170 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2171fi
2172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173done
2174case $ac_lo in #((
2175?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2176'') ac_retval=1 ;;
2177esac
2178 else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180/* end confdefs.h. */
2181$4
2182static long int longval () { return $2; }
2183static unsigned long int ulongval () { return $2; }
2184#include <stdio.h>
2185#include <stdlib.h>
2186int
2187main ()
2188{
bec39cab 2189
81ecdfbb
RW
2190 FILE *f = fopen ("conftest.val", "w");
2191 if (! f)
2192 return 1;
2193 if (($2) < 0)
2194 {
2195 long int i = longval ();
2196 if (i != ($2))
2197 return 1;
2198 fprintf (f, "%ld", i);
2199 }
2200 else
2201 {
2202 unsigned long int i = ulongval ();
2203 if (i != ($2))
2204 return 1;
2205 fprintf (f, "%lu", i);
2206 }
2207 /* Do not output a trailing newline, as this causes \r\n confusion
2208 on some platforms. */
2209 return ferror (f) || fclose (f) != 0;
bec39cab 2210
81ecdfbb
RW
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215if ac_fn_c_try_run "$LINENO"; then :
2216 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2217else
2218 ac_retval=1
2219fi
2220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2221 conftest.$ac_objext conftest.beam conftest.$ac_ext
2222rm -f conftest.val
bec39cab 2223
81ecdfbb 2224 fi
63a9e923
SM
2225 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2226 as_fn_set_status $ac_retval
bec39cab 2227
81ecdfbb 2228} # ac_fn_c_compute_int
bec39cab 2229
55a8c076
YQ
2230# ac_fn_c_check_func LINENO FUNC VAR
2231# ----------------------------------
2232# Tests whether FUNC exists, setting the cache variable VAR accordingly
2233ac_fn_c_check_func ()
81ecdfbb
RW
2234{
2235 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2237$as_echo_n "checking for $2... " >&6; }
63a9e923 2238if eval \${$3+:} false; then :
81ecdfbb
RW
2239 $as_echo_n "(cached) " >&6
2240else
81ecdfbb
RW
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
55a8c076
YQ
2243/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2244 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2245#define $2 innocuous_$2
2246
2247/* System header to define __stub macros and hopefully few prototypes,
2248 which can conflict with char $2 (); below.
2249 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2250 <limits.h> exists even on freestanding compilers. */
2251
2252#ifdef __STDC__
2253# include <limits.h>
2254#else
2255# include <assert.h>
2256#endif
2257
2258#undef $2
2259
2260/* Override any GCC internal prototype to avoid an error.
2261 Use char because int might match the return type of a GCC
2262 builtin and then its argument prototype would still apply. */
2263#ifdef __cplusplus
2264extern "C"
2265#endif
2266char $2 ();
2267/* The GNU C library defines this for functions which it implements
2268 to always fail with ENOSYS. Some functions are actually named
2269 something starting with __ and the normal name is an alias. */
2270#if defined __stub_$2 || defined __stub___$2
2271choke me
2272#endif
2273
2274int
2275main ()
2276{
2277return $2 ();
2278 ;
2279 return 0;
2280}
2281_ACEOF
2282if ac_fn_c_try_link "$LINENO"; then :
2283 eval "$3=yes"
2284else
2285 eval "$3=no"
2286fi
2287rm -f core conftest.err conftest.$ac_objext \
2288 conftest$ac_exeext conftest.$ac_ext
2289fi
2290eval ac_res=\$$3
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2292$as_echo "$ac_res" >&6; }
63a9e923 2293 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2294
2295} # ac_fn_c_check_func
2296
c56ccc05
MM
2297# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2298# ----------------------------------------------------
2299# Tries to find if the field MEMBER exists in type AGGR, after including
2300# INCLUDES, setting cache variable VAR accordingly.
2301ac_fn_c_check_member ()
2302{
2303 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2305$as_echo_n "checking for $2.$3... " >&6; }
63a9e923 2306if eval \${$4+:} false; then :
c56ccc05
MM
2307 $as_echo_n "(cached) " >&6
2308else
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
2311$5
2312int
2313main ()
2314{
2315static $2 ac_aggr;
2316if (ac_aggr.$3)
2317return 0;
2318 ;
2319 return 0;
2320}
2321_ACEOF
2322if ac_fn_c_try_compile "$LINENO"; then :
2323 eval "$4=yes"
2324else
2325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2326/* end confdefs.h. */
2327$5
2328int
2329main ()
2330{
2331static $2 ac_aggr;
2332if (sizeof ac_aggr.$3)
2333return 0;
2334 ;
2335 return 0;
2336}
2337_ACEOF
2338if ac_fn_c_try_compile "$LINENO"; then :
2339 eval "$4=yes"
2340else
2341 eval "$4=no"
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346fi
2347eval ac_res=\$$4
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349$as_echo "$ac_res" >&6; }
63a9e923 2350 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2351
2352} # ac_fn_c_check_member
2353
07697489
PA
2354# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2355# -------------------------------------------
2356# Tests whether TYPE exists after having included INCLUDES, setting cache
2357# variable VAR accordingly.
2358ac_fn_c_check_type ()
2359{
2360 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2362$as_echo_n "checking for $2... " >&6; }
63a9e923 2363if eval \${$3+:} false; then :
07697489
PA
2364 $as_echo_n "(cached) " >&6
2365else
2366 eval "$3=no"
2367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2368/* end confdefs.h. */
2369$4
2370int
2371main ()
2372{
2373if (sizeof ($2))
2374 return 0;
2375 ;
2376 return 0;
2377}
2378_ACEOF
2379if ac_fn_c_try_compile "$LINENO"; then :
2380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2381/* end confdefs.h. */
2382$4
2383int
2384main ()
2385{
2386if (sizeof (($2)))
2387 return 0;
2388 ;
2389 return 0;
2390}
2391_ACEOF
2392if ac_fn_c_try_compile "$LINENO"; then :
2393
2394else
2395 eval "$3=yes"
2396fi
2397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2398fi
2399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2400fi
2401eval ac_res=\$$3
2402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2403$as_echo "$ac_res" >&6; }
63a9e923 2404 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2405
2406} # ac_fn_c_check_type
2407
63a9e923
SM
2408# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2409# ---------------------------------------------
2410# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2411# accordingly.
770d76d7
PA
2412ac_fn_c_check_decl ()
2413{
2414 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2415 as_decl_name=`echo $2|sed 's/ *(.*//'`
2416 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2418$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
63a9e923 2419if eval \${$3+:} false; then :
770d76d7
PA
2420 $as_echo_n "(cached) " >&6
2421else
2422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2423/* end confdefs.h. */
2424$4
2425int
2426main ()
2427{
2428#ifndef $as_decl_name
2429#ifdef __cplusplus
2430 (void) $as_decl_use;
2431#else
2432 (void) $as_decl_name;
2433#endif
2434#endif
2435
2436 ;
2437 return 0;
2438}
2439_ACEOF
2440if ac_fn_c_try_compile "$LINENO"; then :
2441 eval "$3=yes"
2442else
2443 eval "$3=no"
2444fi
2445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2446fi
2447eval ac_res=\$$3
2448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2449$as_echo "$ac_res" >&6; }
63a9e923 2450 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2451
2452} # ac_fn_c_check_decl
81ecdfbb
RW
2453cat >config.log <<_ACEOF
2454This file contains any messages produced by compilers while
2455running configure, to aid debugging if configure makes a mistake.
d5af19ba 2456
81ecdfbb 2457It was created by $as_me, which was
63a9e923 2458generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2459
81ecdfbb 2460 $ $0 $@
413ccac7 2461
81ecdfbb
RW
2462_ACEOF
2463exec 5>>config.log
2464{
2465cat <<_ASUNAME
2466## --------- ##
2467## Platform. ##
2468## --------- ##
413ccac7 2469
81ecdfbb
RW
2470hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2471uname -m = `(uname -m) 2>/dev/null || echo unknown`
2472uname -r = `(uname -r) 2>/dev/null || echo unknown`
2473uname -s = `(uname -s) 2>/dev/null || echo unknown`
2474uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2475
81ecdfbb
RW
2476/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2477/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2478
81ecdfbb
RW
2479/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2480/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2481/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2482/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2483/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2484/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2485/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2486
81ecdfbb 2487_ASUNAME
bec39cab 2488
bec39cab
AC
2489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2490for as_dir in $PATH
2491do
2492 IFS=$as_save_IFS
2493 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2494 $as_echo "PATH: $as_dir"
2495 done
2496IFS=$as_save_IFS
bec39cab 2497
81ecdfbb 2498} >&5
bec39cab 2499
81ecdfbb 2500cat >&5 <<_ACEOF
bec39cab 2501
bec39cab 2502
81ecdfbb
RW
2503## ----------- ##
2504## Core tests. ##
2505## ----------- ##
2506
2507_ACEOF
2508
2509
2510# Keep a trace of the command line.
2511# Strip out --no-create and --no-recursion so they do not pile up.
2512# Strip out --silent because we don't want to record it for future runs.
2513# Also quote any args containing shell meta-characters.
2514# Make two passes to allow for proper duplicate-argument suppression.
2515ac_configure_args=
2516ac_configure_args0=
2517ac_configure_args1=
2518ac_must_keep_next=false
2519for ac_pass in 1 2
2520do
2521 for ac_arg
2522 do
2523 case $ac_arg in
2524 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2525 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2526 | -silent | --silent | --silen | --sile | --sil)
2527 continue ;;
2528 *\'*)
2529 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2530 esac
2531 case $ac_pass in
2532 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2533 2)
2534 as_fn_append ac_configure_args1 " '$ac_arg'"
2535 if test $ac_must_keep_next = true; then
2536 ac_must_keep_next=false # Got value, back to normal.
2537 else
2538 case $ac_arg in
2539 *=* | --config-cache | -C | -disable-* | --disable-* \
2540 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2541 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2542 | -with-* | --with-* | -without-* | --without-* | --x)
2543 case "$ac_configure_args0 " in
2544 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2545 esac
2546 ;;
2547 -* ) ac_must_keep_next=true ;;
2548 esac
2549 fi
2550 as_fn_append ac_configure_args " '$ac_arg'"
2551 ;;
2552 esac
2553 done
2554done
2555{ ac_configure_args0=; unset ac_configure_args0;}
2556{ ac_configure_args1=; unset ac_configure_args1;}
2557
2558# When interrupted or exit'd, cleanup temporary files, and complete
2559# config.log. We remove comments because anyway the quotes in there
2560# would cause problems or look ugly.
2561# WARNING: Use '\'' to represent an apostrophe within the trap.
2562# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2563trap 'exit_status=$?
2564 # Save into config.log some information that might help in debugging.
2565 {
2566 echo
2567
63a9e923 2568 $as_echo "## ---------------- ##
81ecdfbb 2569## Cache variables. ##
63a9e923 2570## ---------------- ##"
81ecdfbb
RW
2571 echo
2572 # The following way of writing the cache mishandles newlines in values,
2573(
2574 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2575 eval ac_val=\$$ac_var
2576 case $ac_val in #(
2577 *${as_nl}*)
2578 case $ac_var in #(
2579 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2580$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2581 esac
2582 case $ac_var in #(
2583 _ | IFS | as_nl) ;; #(
2584 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2585 *) { eval $ac_var=; unset $ac_var;} ;;
2586 esac ;;
2587 esac
2588 done
2589 (set) 2>&1 |
2590 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2591 *${as_nl}ac_space=\ *)
2592 sed -n \
2593 "s/'\''/'\''\\\\'\'''\''/g;
2594 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2595 ;; #(
2596 *)
2597 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2598 ;;
2599 esac |
2600 sort
2601)
2602 echo
2603
63a9e923 2604 $as_echo "## ----------------- ##
81ecdfbb 2605## Output variables. ##
63a9e923 2606## ----------------- ##"
81ecdfbb
RW
2607 echo
2608 for ac_var in $ac_subst_vars
2609 do
2610 eval ac_val=\$$ac_var
2611 case $ac_val in
2612 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2613 esac
2614 $as_echo "$ac_var='\''$ac_val'\''"
2615 done | sort
2616 echo
2617
2618 if test -n "$ac_subst_files"; then
63a9e923 2619 $as_echo "## ------------------- ##
81ecdfbb 2620## File substitutions. ##
63a9e923 2621## ------------------- ##"
81ecdfbb
RW
2622 echo
2623 for ac_var in $ac_subst_files
2624 do
2625 eval ac_val=\$$ac_var
2626 case $ac_val in
2627 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2628 esac
2629 $as_echo "$ac_var='\''$ac_val'\''"
2630 done | sort
2631 echo
2632 fi
2633
2634 if test -s confdefs.h; then
63a9e923 2635 $as_echo "## ----------- ##
81ecdfbb 2636## confdefs.h. ##
63a9e923 2637## ----------- ##"
81ecdfbb
RW
2638 echo
2639 cat confdefs.h
2640 echo
2641 fi
2642 test "$ac_signal" != 0 &&
2643 $as_echo "$as_me: caught signal $ac_signal"
2644 $as_echo "$as_me: exit $exit_status"
2645 } >&5
2646 rm -f core *.core core.conftest.* &&
2647 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2648 exit $exit_status
2649' 0
2650for ac_signal in 1 2 13 15; do
2651 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2652done
2653ac_signal=0
2654
2655# confdefs.h avoids OS command line length limits that DEFS can exceed.
2656rm -f -r conftest* confdefs.h
2657
2658$as_echo "/* confdefs.h */" > confdefs.h
2659
2660# Predefined preprocessor variables.
2661
2662cat >>confdefs.h <<_ACEOF
2663#define PACKAGE_NAME "$PACKAGE_NAME"
2664_ACEOF
2665
2666cat >>confdefs.h <<_ACEOF
2667#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2668_ACEOF
2669
2670cat >>confdefs.h <<_ACEOF
2671#define PACKAGE_VERSION "$PACKAGE_VERSION"
2672_ACEOF
2673
2674cat >>confdefs.h <<_ACEOF
2675#define PACKAGE_STRING "$PACKAGE_STRING"
2676_ACEOF
2677
2678cat >>confdefs.h <<_ACEOF
2679#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2680_ACEOF
2681
2682cat >>confdefs.h <<_ACEOF
2683#define PACKAGE_URL "$PACKAGE_URL"
2684_ACEOF
2685
2686
2687# Let the site file select an alternate cache file if it wants to.
2688# Prefer an explicitly selected file to automatically selected ones.
2689ac_site_file1=NONE
2690ac_site_file2=NONE
2691if test -n "$CONFIG_SITE"; then
63a9e923
SM
2692 # We do not want a PATH search for config.site.
2693 case $CONFIG_SITE in #((
2694 -*) ac_site_file1=./$CONFIG_SITE;;
2695 */*) ac_site_file1=$CONFIG_SITE;;
2696 *) ac_site_file1=./$CONFIG_SITE;;
2697 esac
81ecdfbb
RW
2698elif test "x$prefix" != xNONE; then
2699 ac_site_file1=$prefix/share/config.site
2700 ac_site_file2=$prefix/etc/config.site
2701else
2702 ac_site_file1=$ac_default_prefix/share/config.site
2703 ac_site_file2=$ac_default_prefix/etc/config.site
2704fi
2705for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2706do
2707 test "x$ac_site_file" = xNONE && continue
63a9e923 2708 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2710$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2711 sed 's/^/| /' "$ac_site_file" >&5
63a9e923
SM
2712 . "$ac_site_file" \
2713 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2714$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2715as_fn_error $? "failed to load site script $ac_site_file
2716See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2717 fi
2718done
2719
2720if test -r "$cache_file"; then
63a9e923
SM
2721 # Some versions of bash will fail to source /dev/null (special files
2722 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2723 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2725$as_echo "$as_me: loading cache $cache_file" >&6;}
2726 case $cache_file in
2727 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2728 *) . "./$cache_file";;
2729 esac
2730 fi
2731else
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2733$as_echo "$as_me: creating cache $cache_file" >&6;}
2734 >$cache_file
bec39cab
AC
2735fi
2736
63a9e923
SM
2737as_fn_append ac_header_list " stdlib.h"
2738as_fn_append ac_header_list " unistd.h"
2739as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2740# Check that the precious variables saved in the cache have kept the same
2741# value.
2742ac_cache_corrupted=false
2743for ac_var in $ac_precious_vars; do
2744 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2745 eval ac_new_set=\$ac_env_${ac_var}_set
2746 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2747 eval ac_new_val=\$ac_env_${ac_var}_value
2748 case $ac_old_set,$ac_new_set in
2749 set,)
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2751$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2752 ac_cache_corrupted=: ;;
2753 ,set)
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2755$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2756 ac_cache_corrupted=: ;;
2757 ,);;
2758 *)
2759 if test "x$ac_old_val" != "x$ac_new_val"; then
2760 # differences in whitespace do not lead to failure.
2761 ac_old_val_w=`echo x $ac_old_val`
2762 ac_new_val_w=`echo x $ac_new_val`
2763 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2765$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2766 ac_cache_corrupted=:
2767 else
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2769$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2770 eval $ac_var=\$ac_old_val
2771 fi
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2773$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2775$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2776 fi;;
2777 esac
2778 # Pass precious variables to config.status.
2779 if test "$ac_new_set" = set; then
2780 case $ac_new_val in
2781 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2782 *) ac_arg=$ac_var=$ac_new_val ;;
2783 esac
2784 case " $ac_configure_args " in
2785 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2786 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2787 esac
2788 fi
2789done
2790if $ac_cache_corrupted; then
2791 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2793 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2794$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
63a9e923 2795 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2796fi
2797## -------------------- ##
2798## Main body of script. ##
2799## -------------------- ##
2800
2801ac_ext=c
2802ac_cpp='$CPP $CPPFLAGS'
2803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2805ac_compiler_gnu=$ac_cv_c_compiler_gnu
2806
2807
2808
2809
2810
2811ac_config_headers="$ac_config_headers config.h:config.in"
2812
2813
2814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2815$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2816 # Check whether --enable-maintainer-mode was given.
2817if test "${enable_maintainer_mode+set}" = set; then :
2818 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2819else
2820 USE_MAINTAINER_MODE=no
2821fi
2822
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2824$as_echo "$USE_MAINTAINER_MODE" >&6; }
2825 if test $USE_MAINTAINER_MODE = yes; then
2826 MAINTAINER_MODE_TRUE=
2827 MAINTAINER_MODE_FALSE='#'
2828else
2829 MAINTAINER_MODE_TRUE='#'
2830 MAINTAINER_MODE_FALSE=
2831fi
2832
2833 MAINT=$MAINTAINER_MODE_TRUE
2834
2835
2836
17ef446e 2837# Set the 'development' global.
270c9937 2838. $srcdir/../bfd/development.sh
f5f1cdb6 2839
81ecdfbb
RW
2840ac_ext=c
2841ac_cpp='$CPP $CPPFLAGS'
2842ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2843ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2844ac_compiler_gnu=$ac_cv_c_compiler_gnu
2845if test -n "$ac_tool_prefix"; then
2846 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2847set dummy ${ac_tool_prefix}gcc; ac_word=$2
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2849$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 2850if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2851 $as_echo_n "(cached) " >&6
c906108c
SS
2852else
2853 if test -n "$CC"; then
2854 ac_cv_prog_CC="$CC" # Let the user override the test.
2855else
bec39cab
AC
2856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2857for as_dir in $PATH
2858do
2859 IFS=$as_save_IFS
2860 test -z "$as_dir" && as_dir=.
81ecdfbb 2861 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 2862 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2863 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2865 break 2
2866 fi
2867done
81ecdfbb
RW
2868 done
2869IFS=$as_save_IFS
bec39cab 2870
c906108c
SS
2871fi
2872fi
bec39cab 2873CC=$ac_cv_prog_CC
c906108c 2874if test -n "$CC"; then
81ecdfbb
RW
2875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2876$as_echo "$CC" >&6; }
c906108c 2877else
81ecdfbb
RW
2878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2879$as_echo "no" >&6; }
c906108c
SS
2880fi
2881
81ecdfbb 2882
b4e70030
JB
2883fi
2884if test -z "$ac_cv_prog_CC"; then
2885 ac_ct_CC=$CC
81ecdfbb
RW
2886 # Extract the first word of "gcc", so it can be a program name with args.
2887set dummy gcc; ac_word=$2
2888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2889$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 2890if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2891 $as_echo_n "(cached) " >&6
b4e70030
JB
2892else
2893 if test -n "$ac_ct_CC"; then
2894 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2895else
2896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2897for as_dir in $PATH
2898do
2899 IFS=$as_save_IFS
2900 test -z "$as_dir" && as_dir=.
81ecdfbb 2901 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 2902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2903 ac_cv_prog_ac_ct_CC="gcc"
2904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2905 break 2
4e8d927d 2906 fi
b4e70030 2907done
81ecdfbb
RW
2908 done
2909IFS=$as_save_IFS
b4e70030
JB
2910
2911fi
2912fi
2913ac_ct_CC=$ac_cv_prog_ac_ct_CC
2914if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2916$as_echo "$ac_ct_CC" >&6; }
b4e70030 2917else
81ecdfbb
RW
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2919$as_echo "no" >&6; }
b4e70030
JB
2920fi
2921
81ecdfbb
RW
2922 if test "x$ac_ct_CC" = x; then
2923 CC=""
2924 else
2925 case $cross_compiling:$ac_tool_warned in
2926yes:)
2927{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2928$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2929ac_tool_warned=yes ;;
2930esac
2931 CC=$ac_ct_CC
2932 fi
b4e70030
JB
2933else
2934 CC="$ac_cv_prog_CC"
2935fi
2936
c906108c 2937if test -z "$CC"; then
81ecdfbb
RW
2938 if test -n "$ac_tool_prefix"; then
2939 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2940set dummy ${ac_tool_prefix}cc; 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; }
63a9e923 2943if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2944 $as_echo_n "(cached) " >&6
c906108c
SS
2945else
2946 if test -n "$CC"; then
2947 ac_cv_prog_CC="$CC" # Let the user override the test.
2948else
bec39cab
AC
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
63a9e923 2955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2956 ac_cv_prog_CC="${ac_tool_prefix}cc"
2957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2958 break 2
2959 fi
2960done
81ecdfbb
RW
2961 done
2962IFS=$as_save_IFS
2963
2964fi
2965fi
2966CC=$ac_cv_prog_CC
2967if test -n "$CC"; then
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2969$as_echo "$CC" >&6; }
2970else
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2972$as_echo "no" >&6; }
2973fi
2974
2975
2976 fi
2977fi
2978if test -z "$CC"; then
2979 # Extract the first word of "cc", so it can be a program name with args.
2980set dummy cc; ac_word=$2
2981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2982$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 2983if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
2984 $as_echo_n "(cached) " >&6
2985else
2986 if test -n "$CC"; then
2987 ac_cv_prog_CC="$CC" # Let the user override the test.
2988else
2989 ac_prog_rejected=no
2990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2991for as_dir in $PATH
2992do
2993 IFS=$as_save_IFS
2994 test -z "$as_dir" && as_dir=.
2995 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 2996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2997 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2998 ac_prog_rejected=yes
2999 continue
3000 fi
3001 ac_cv_prog_CC="cc"
3002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3003 break 2
3004 fi
3005done
3006 done
3007IFS=$as_save_IFS
bec39cab 3008
c906108c
SS
3009if test $ac_prog_rejected = yes; then
3010 # We found a bogon in the path, so make sure we never use it.
3011 set dummy $ac_cv_prog_CC
3012 shift
bec39cab 3013 if test $# != 0; then
c906108c
SS
3014 # We chose a different compiler from the bogus one.
3015 # However, it has the same basename, so the bogon will be chosen
3016 # first if we set CC to just the basename; use the full file name.
3017 shift
bec39cab 3018 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3019 fi
3020fi
3021fi
3022fi
bec39cab 3023CC=$ac_cv_prog_CC
c906108c 3024if test -n "$CC"; then
81ecdfbb
RW
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3026$as_echo "$CC" >&6; }
c906108c 3027else
81ecdfbb
RW
3028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3029$as_echo "no" >&6; }
c906108c
SS
3030fi
3031
81ecdfbb 3032
bec39cab
AC
3033fi
3034if test -z "$CC"; then
3035 if test -n "$ac_tool_prefix"; then
81ecdfbb 3036 for ac_prog in cl.exe
bec39cab
AC
3037 do
3038 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3039set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3041$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 3042if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3043 $as_echo_n "(cached) " >&6
c906108c
SS
3044else
3045 if test -n "$CC"; then
3046 ac_cv_prog_CC="$CC" # Let the user override the test.
3047else
bec39cab
AC
3048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3049for as_dir in $PATH
3050do
3051 IFS=$as_save_IFS
3052 test -z "$as_dir" && as_dir=.
81ecdfbb 3053 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 3054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3055 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3057 break 2
3058 fi
3059done
81ecdfbb
RW
3060 done
3061IFS=$as_save_IFS
bec39cab 3062
c906108c
SS
3063fi
3064fi
bec39cab 3065CC=$ac_cv_prog_CC
c906108c 3066if test -n "$CC"; then
81ecdfbb
RW
3067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3068$as_echo "$CC" >&6; }
c906108c 3069else
81ecdfbb
RW
3070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3071$as_echo "no" >&6; }
c906108c 3072fi
bec39cab 3073
81ecdfbb 3074
bec39cab
AC
3075 test -n "$CC" && break
3076 done
3077fi
3078if test -z "$CC"; then
3079 ac_ct_CC=$CC
81ecdfbb 3080 for ac_prog in cl.exe
bec39cab
AC
3081do
3082 # Extract the first word of "$ac_prog", so it can be a program name with args.
3083set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3085$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 3086if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3087 $as_echo_n "(cached) " >&6
bec39cab
AC
3088else
3089 if test -n "$ac_ct_CC"; then
3090 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3091else
3092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3093for as_dir in $PATH
3094do
3095 IFS=$as_save_IFS
3096 test -z "$as_dir" && as_dir=.
81ecdfbb 3097 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 3098 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3099 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3100 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3101 break 2
c906108c 3102 fi
bec39cab 3103done
81ecdfbb
RW
3104 done
3105IFS=$as_save_IFS
bec39cab
AC
3106
3107fi
3108fi
3109ac_ct_CC=$ac_cv_prog_ac_ct_CC
3110if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3112$as_echo "$ac_ct_CC" >&6; }
bec39cab 3113else
81ecdfbb
RW
3114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3115$as_echo "no" >&6; }
c906108c
SS
3116fi
3117
81ecdfbb 3118
bec39cab
AC
3119 test -n "$ac_ct_CC" && break
3120done
c906108c 3121
81ecdfbb
RW
3122 if test "x$ac_ct_CC" = x; then
3123 CC=""
3124 else
3125 case $cross_compiling:$ac_tool_warned in
3126yes:)
3127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3129ac_tool_warned=yes ;;
3130esac
3131 CC=$ac_ct_CC
3132 fi
bec39cab
AC
3133fi
3134
3135fi
3136
3137
81ecdfbb
RW
3138test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
3140as_fn_error $? "no acceptable C compiler found in \$PATH
3141See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3142
3143# Provide some information about the compiler.
81ecdfbb
RW
3144$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3145set X $ac_compile
3146ac_compiler=$2
3147for ac_option in --version -v -V -qversion; do
3148 { { ac_try="$ac_compiler $ac_option >&5"
3149case "(($ac_try" in
3150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3151 *) ac_try_echo=$ac_try;;
3152esac
3153eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3154$as_echo "$ac_try_echo"; } >&5
3155 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3156 ac_status=$?
81ecdfbb
RW
3157 if test -s conftest.err; then
3158 sed '10a\
3159... rest of stderr output deleted ...
3160 10q' conftest.err >conftest.er1
3161 cat conftest.er1 >&5
81ecdfbb 3162 fi
63a9e923 3163 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3164 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3165 test $ac_status = 0; }
3166done
bec39cab 3167
81ecdfbb 3168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3169/* end confdefs.h. */
3170
3171int
3172main ()
3173{
3174
3175 ;
3176 return 0;
3177}
3178_ACEOF
3179ac_clean_files_save=$ac_clean_files
63a9e923 3180ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3181# Try to create an executable without -o first, disregard a.out.
3182# It will help us diagnose broken compilers, and finding out an intuition
3183# of exeext.
63a9e923
SM
3184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3185$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3186ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3187
3188# The possible output files:
3189ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3190
3191ac_rmfiles=
3192for ac_file in $ac_files
3193do
3194 case $ac_file in
3195 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3196 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3197 esac
3198done
3199rm -f $ac_rmfiles
3200
3201if { { ac_try="$ac_link_default"
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_link_default") 2>&5
3209 ac_status=$?
3210 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3211 test $ac_status = 0; }; then :
3212 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3213# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3214# in a Makefile. We should not override ac_cv_exeext if it was cached,
3215# so that the user can short-circuit this test for compilers unknown to
3216# Autoconf.
3217for ac_file in $ac_files ''
bec39cab
AC
3218do
3219 test -f "$ac_file" || continue
3220 case $ac_file in
81ecdfbb 3221 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3222 ;;
3223 [ab].out )
3224 # We found the default executable, but exeext='' is most
3225 # certainly right.
3226 break;;
3227 *.* )
81ecdfbb
RW
3228 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3229 then :; else
3230 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3231 fi
3232 # We set ac_cv_exeext here because the later test for it is not
3233 # safe: cross compilers may not add the suffix if given an `-o'
3234 # argument, so we may need to know it at that point already.
3235 # Even if this section looks crufty: it has the advantage of
3236 # actually working.
b4e70030
JB
3237 break;;
3238 * )
3239 break;;
bec39cab
AC
3240 esac
3241done
81ecdfbb
RW
3242test "$ac_cv_exeext" = no && ac_cv_exeext=
3243
bec39cab 3244else
81ecdfbb
RW
3245 ac_file=''
3246fi
81ecdfbb 3247if test -z "$ac_file"; then :
63a9e923
SM
3248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3249$as_echo "no" >&6; }
3250$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3251sed 's/^/| /' conftest.$ac_ext >&5
3252
81ecdfbb
RW
3253{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3254$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
3255as_fn_error 77 "C compiler cannot create executables
3256See \`config.log' for more details" "$LINENO" 5; }
3257else
3258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3259$as_echo "yes" >&6; }
bec39cab 3260fi
63a9e923
SM
3261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3262$as_echo_n "checking for C compiler default output file name... " >&6; }
3263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3264$as_echo "$ac_file" >&6; }
b4e70030 3265ac_exeext=$ac_cv_exeext
b4e70030 3266
63a9e923 3267rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3268ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3270$as_echo_n "checking for suffix of executables... " >&6; }
3271if { { ac_try="$ac_link"
3272case "(($ac_try" in
3273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3274 *) ac_try_echo=$ac_try;;
3275esac
3276eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3277$as_echo "$ac_try_echo"; } >&5
3278 (eval "$ac_link") 2>&5
bec39cab 3279 ac_status=$?
81ecdfbb
RW
3280 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3281 test $ac_status = 0; }; then :
b4e70030
JB
3282 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3283# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3284# work properly (i.e., refer to `conftest.exe'), while it won't with
3285# `rm'.
3286for ac_file in conftest.exe conftest conftest.*; do
3287 test -f "$ac_file" || continue
3288 case $ac_file in
81ecdfbb 3289 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3290 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3291 break;;
3292 * ) break;;
3293 esac
3294done
c906108c 3295else
81ecdfbb
RW
3296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3297$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
3298as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3299See \`config.log' for more details" "$LINENO" 5; }
c906108c 3300fi
63a9e923 3301rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3303$as_echo "$ac_cv_exeext" >&6; }
c906108c 3304
b4e70030 3305rm -f conftest.$ac_ext
bec39cab
AC
3306EXEEXT=$ac_cv_exeext
3307ac_exeext=$EXEEXT
63a9e923
SM
3308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3309/* end confdefs.h. */
3310#include <stdio.h>
3311int
3312main ()
3313{
3314FILE *f = fopen ("conftest.out", "w");
3315 return ferror (f) || fclose (f) != 0;
3316
3317 ;
3318 return 0;
3319}
3320_ACEOF
3321ac_clean_files="$ac_clean_files conftest.out"
3322# Check that the compiler produces executables we can run. If not, either
3323# the compiler is broken, or we cross compile.
3324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3325$as_echo_n "checking whether we are cross compiling... " >&6; }
3326if test "$cross_compiling" != yes; then
3327 { { ac_try="$ac_link"
3328case "(($ac_try" in
3329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3330 *) ac_try_echo=$ac_try;;
3331esac
3332eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3333$as_echo "$ac_try_echo"; } >&5
3334 (eval "$ac_link") 2>&5
3335 ac_status=$?
3336 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3337 test $ac_status = 0; }
3338 if { ac_try='./conftest$ac_cv_exeext'
3339 { { case "(($ac_try" in
3340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3341 *) ac_try_echo=$ac_try;;
3342esac
3343eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3344$as_echo "$ac_try_echo"; } >&5
3345 (eval "$ac_try") 2>&5
3346 ac_status=$?
3347 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3348 test $ac_status = 0; }; }; then
3349 cross_compiling=no
3350 else
3351 if test "$cross_compiling" = maybe; then
3352 cross_compiling=yes
3353 else
3354 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3355$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3356as_fn_error $? "cannot run C compiled programs.
3357If you meant to cross compile, use \`--host'.
3358See \`config.log' for more details" "$LINENO" 5; }
3359 fi
3360 fi
3361fi
3362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3363$as_echo "$cross_compiling" >&6; }
3364
3365rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3366ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3368$as_echo_n "checking for suffix of object files... " >&6; }
63a9e923 3369if ${ac_cv_objext+:} false; then :
81ecdfbb 3370 $as_echo_n "(cached) " >&6
bec39cab 3371else
81ecdfbb 3372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3373/* end confdefs.h. */
3374
3375int
3376main ()
3377{
3378
3379 ;
3380 return 0;
3381}
3382_ACEOF
3383rm -f conftest.o conftest.obj
81ecdfbb
RW
3384if { { ac_try="$ac_compile"
3385case "(($ac_try" in
3386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3387 *) ac_try_echo=$ac_try;;
3388esac
3389eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3390$as_echo "$ac_try_echo"; } >&5
3391 (eval "$ac_compile") 2>&5
3392 ac_status=$?
3393 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3394 test $ac_status = 0; }; then :
3395 for ac_file in conftest.o conftest.obj conftest.*; do
3396 test -f "$ac_file" || continue;
bec39cab 3397 case $ac_file in
81ecdfbb 3398 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3399 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3400 break;;
3401 esac
3402done
c906108c 3403else
81ecdfbb 3404 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3405sed 's/^/| /' conftest.$ac_ext >&5
3406
81ecdfbb
RW
3407{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
3409as_fn_error $? "cannot compute suffix of object files: cannot compile
3410See \`config.log' for more details" "$LINENO" 5; }
c906108c 3411fi
b4e70030 3412rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3413fi
81ecdfbb
RW
3414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3415$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3416OBJEXT=$ac_cv_objext
3417ac_objext=$OBJEXT
81ecdfbb
RW
3418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3419$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
63a9e923 3420if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3421 $as_echo_n "(cached) " >&6
c906108c 3422else
81ecdfbb 3423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3424/* end confdefs.h. */
3425
3426int
3427main ()
3428{
3429#ifndef __GNUC__
3430 choke me
3431#endif
3432
3433 ;
3434 return 0;
3435}
3436_ACEOF
81ecdfbb 3437if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3438 ac_compiler_gnu=yes
3439else
81ecdfbb 3440 ac_compiler_gnu=no
bec39cab 3441fi
81ecdfbb 3442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3443ac_cv_c_compiler_gnu=$ac_compiler_gnu
3444
3445fi
81ecdfbb
RW
3446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3447$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3448if test $ac_compiler_gnu = yes; then
3449 GCC=yes
3450else
3451 GCC=
3452fi
bec39cab
AC
3453ac_test_CFLAGS=${CFLAGS+set}
3454ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3456$as_echo_n "checking whether $CC accepts -g... " >&6; }
63a9e923 3457if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3458 $as_echo_n "(cached) " >&6
bec39cab 3459else
81ecdfbb
RW
3460 ac_save_c_werror_flag=$ac_c_werror_flag
3461 ac_c_werror_flag=yes
3462 ac_cv_prog_cc_g=no
3463 CFLAGS="-g"
3464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3465/* end confdefs.h. */
3466
3467int
3468main ()
3469{
3470
3471 ;
3472 return 0;
3473}
3474_ACEOF
81ecdfbb 3475if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3476 ac_cv_prog_cc_g=yes
3477else
81ecdfbb
RW
3478 CFLAGS=""
3479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3480/* end confdefs.h. */
3481
3482int
3483main ()
3484{
3485
3486 ;
3487 return 0;
3488}
3489_ACEOF
3490if ac_fn_c_try_compile "$LINENO"; then :
3491
3492else
3493 ac_c_werror_flag=$ac_save_c_werror_flag
3494 CFLAGS="-g"
3495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3496/* end confdefs.h. */
3497
3498int
3499main ()
3500{
c906108c 3501
81ecdfbb
RW
3502 ;
3503 return 0;
3504}
3505_ACEOF
3506if ac_fn_c_try_compile "$LINENO"; then :
3507 ac_cv_prog_cc_g=yes
3508fi
3509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3510fi
3511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3512fi
81ecdfbb
RW
3513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3514 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3515fi
81ecdfbb
RW
3516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3517$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3518if test "$ac_test_CFLAGS" = set; then
bec39cab 3519 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3520elif test $ac_cv_prog_cc_g = yes; then
3521 if test "$GCC" = yes; then
3522 CFLAGS="-g -O2"
3523 else
3524 CFLAGS="-g"
3525 fi
3526else
3527 if test "$GCC" = yes; then
3528 CFLAGS="-O2"
3529 else
3530 CFLAGS=
3531 fi
3532fi
81ecdfbb
RW
3533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3534$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
63a9e923 3535if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3536 $as_echo_n "(cached) " >&6
bec39cab 3537else
81ecdfbb 3538 ac_cv_prog_cc_c89=no
bec39cab 3539ac_save_CC=$CC
81ecdfbb 3540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3541/* end confdefs.h. */
c906108c
SS
3542#include <stdarg.h>
3543#include <stdio.h>
63a9e923 3544struct stat;
c906108c
SS
3545/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3546struct buf { int x; };
3547FILE * (*rcsopen) (struct buf *, struct stat *, int);
3548static char *e (p, i)
3549 char **p;
3550 int i;
3551{
3552 return p[i];
3553}
3554static char *f (char * (*g) (char **, int), char **p, ...)
3555{
3556 char *s;
3557 va_list v;
3558 va_start (v,p);
3559 s = g (p, va_arg (v,int));
3560 va_end (v);
3561 return s;
3562}
bec39cab
AC
3563
3564/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3565 function prototypes and stuff, but not '\xHH' hex character constants.
3566 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3567 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3568 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3569 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3570 that's true only with -std. */
bec39cab
AC
3571int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3572
81ecdfbb
RW
3573/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3574 inside strings and character constants. */
3575#define FOO(x) 'x'
3576int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3577
c906108c
SS
3578int test (int i, double x);
3579struct s1 {int (*f) (int a);};
3580struct s2 {int (*f) (double a);};
3581int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3582int argc;
3583char **argv;
bec39cab
AC
3584int
3585main ()
3586{
c906108c 3587return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3588 ;
3589 return 0;
3590}
3591_ACEOF
81ecdfbb
RW
3592for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3593 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3594do
3595 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3596 if ac_fn_c_try_compile "$LINENO"; then :
3597 ac_cv_prog_cc_c89=$ac_arg
c906108c 3598fi
81ecdfbb
RW
3599rm -f core conftest.err conftest.$ac_objext
3600 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3601done
81ecdfbb 3602rm -f conftest.$ac_ext
bec39cab 3603CC=$ac_save_CC
c906108c
SS
3604
3605fi
81ecdfbb
RW
3606# AC_CACHE_VAL
3607case "x$ac_cv_prog_cc_c89" in
3608 x)
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3610$as_echo "none needed" >&6; } ;;
3611 xno)
3612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3613$as_echo "unsupported" >&6; } ;;
bec39cab 3614 *)
81ecdfbb
RW
3615 CC="$CC $ac_cv_prog_cc_c89"
3616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3617$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3618esac
81ecdfbb 3619if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3620
b4e70030
JB
3621fi
3622
bec39cab
AC
3623ac_ext=c
3624ac_cpp='$CPP $CPPFLAGS'
3625ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3626ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3627ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3628
3bc3d82a
PA
3629ac_ext=cpp
3630ac_cpp='$CXXCPP $CPPFLAGS'
3631ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3632ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3633ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3634if test -z "$CXX"; then
3635 if test -n "$CCC"; then
3636 CXX=$CCC
3637 else
3638 if test -n "$ac_tool_prefix"; then
3639 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3640 do
3641 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3642set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3644$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 3645if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3646 $as_echo_n "(cached) " >&6
3647else
3648 if test -n "$CXX"; then
3649 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3650else
3651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3652for as_dir in $PATH
3653do
3654 IFS=$as_save_IFS
3655 test -z "$as_dir" && as_dir=.
3656 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 3657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3658 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3659 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3660 break 2
3661 fi
3662done
3663 done
3664IFS=$as_save_IFS
3665
3666fi
3667fi
3668CXX=$ac_cv_prog_CXX
3669if test -n "$CXX"; then
3670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3671$as_echo "$CXX" >&6; }
3672else
3673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3674$as_echo "no" >&6; }
3675fi
3676
3677
3678 test -n "$CXX" && break
3679 done
3680fi
3681if test -z "$CXX"; then
3682 ac_ct_CXX=$CXX
3683 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3684do
3685 # Extract the first word of "$ac_prog", so it can be a program name with args.
3686set dummy $ac_prog; ac_word=$2
3687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3688$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 3689if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3690 $as_echo_n "(cached) " >&6
3691else
3692 if test -n "$ac_ct_CXX"; then
3693 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3694else
3695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3696for as_dir in $PATH
3697do
3698 IFS=$as_save_IFS
3699 test -z "$as_dir" && as_dir=.
3700 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 3701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3702 ac_cv_prog_ac_ct_CXX="$ac_prog"
3703 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3704 break 2
3705 fi
3706done
3707 done
3708IFS=$as_save_IFS
3709
3710fi
3711fi
3712ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3713if test -n "$ac_ct_CXX"; then
3714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3715$as_echo "$ac_ct_CXX" >&6; }
3716else
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3718$as_echo "no" >&6; }
3719fi
3720
3721
3722 test -n "$ac_ct_CXX" && break
3723done
3724
3725 if test "x$ac_ct_CXX" = x; then
3726 CXX="g++"
3727 else
3728 case $cross_compiling:$ac_tool_warned in
3729yes:)
3730{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3731$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3732ac_tool_warned=yes ;;
3733esac
3734 CXX=$ac_ct_CXX
3735 fi
3736fi
3737
3738 fi
3739fi
3740# Provide some information about the compiler.
3741$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3742set X $ac_compile
3743ac_compiler=$2
3744for ac_option in --version -v -V -qversion; do
3745 { { ac_try="$ac_compiler $ac_option >&5"
3746case "(($ac_try" in
3747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3748 *) ac_try_echo=$ac_try;;
3749esac
3750eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3751$as_echo "$ac_try_echo"; } >&5
3752 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3753 ac_status=$?
3754 if test -s conftest.err; then
3755 sed '10a\
3756... rest of stderr output deleted ...
3757 10q' conftest.err >conftest.er1
3758 cat conftest.er1 >&5
3bc3d82a 3759 fi
63a9e923 3760 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3761 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3762 test $ac_status = 0; }
3763done
3764
3765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3766$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
63a9e923 3767if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3768 $as_echo_n "(cached) " >&6
3769else
3770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3771/* end confdefs.h. */
3772
3773int
3774main ()
3775{
3776#ifndef __GNUC__
3777 choke me
3778#endif
3779
3780 ;
3781 return 0;
3782}
3783_ACEOF
3784if ac_fn_cxx_try_compile "$LINENO"; then :
3785 ac_compiler_gnu=yes
3786else
3787 ac_compiler_gnu=no
3788fi
3789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3790ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3791
3792fi
3793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3794$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3795if test $ac_compiler_gnu = yes; then
3796 GXX=yes
3797else
3798 GXX=
3799fi
3800ac_test_CXXFLAGS=${CXXFLAGS+set}
3801ac_save_CXXFLAGS=$CXXFLAGS
3802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3803$as_echo_n "checking whether $CXX accepts -g... " >&6; }
63a9e923 3804if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3805 $as_echo_n "(cached) " >&6
3806else
3807 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3808 ac_cxx_werror_flag=yes
3809 ac_cv_prog_cxx_g=no
3810 CXXFLAGS="-g"
3811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3812/* end confdefs.h. */
3813
3814int
3815main ()
3816{
3817
3818 ;
3819 return 0;
3820}
3821_ACEOF
3822if ac_fn_cxx_try_compile "$LINENO"; then :
3823 ac_cv_prog_cxx_g=yes
3824else
3825 CXXFLAGS=""
3826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3827/* end confdefs.h. */
3828
3829int
3830main ()
3831{
3832
3833 ;
3834 return 0;
3835}
3836_ACEOF
3837if ac_fn_cxx_try_compile "$LINENO"; then :
3838
3839else
3840 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3841 CXXFLAGS="-g"
3842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3843/* end confdefs.h. */
3844
3845int
3846main ()
3847{
3848
3849 ;
3850 return 0;
3851}
3852_ACEOF
3853if ac_fn_cxx_try_compile "$LINENO"; then :
3854 ac_cv_prog_cxx_g=yes
3855fi
3856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3857fi
3858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3859fi
3860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3861 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3862fi
3863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3864$as_echo "$ac_cv_prog_cxx_g" >&6; }
3865if test "$ac_test_CXXFLAGS" = set; then
3866 CXXFLAGS=$ac_save_CXXFLAGS
3867elif test $ac_cv_prog_cxx_g = yes; then
3868 if test "$GXX" = yes; then
3869 CXXFLAGS="-g -O2"
3870 else
3871 CXXFLAGS="-g"
3872 fi
3873else
3874 if test "$GXX" = yes; then
3875 CXXFLAGS="-O2"
3876 else
3877 CXXFLAGS=
3878 fi
3879fi
3880ac_ext=c
3881ac_cpp='$CPP $CPPFLAGS'
3882ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3883ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3884ac_compiler_gnu=$ac_cv_c_compiler_gnu
3885
3886
60ca704f 3887
bec39cab
AC
3888ac_ext=c
3889ac_cpp='$CPP $CPPFLAGS'
3890ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3891ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3892ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3894$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3895# On Suns, sometimes $CPP names a directory.
3896if test -n "$CPP" && test -d "$CPP"; then
3897 CPP=
8bb2c122 3898fi
bec39cab 3899if test -z "$CPP"; then
63a9e923 3900 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 3901 $as_echo_n "(cached) " >&6
bec39cab
AC
3902else
3903 # Double quotes because CPP needs to be expanded
3904 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3905 do
3906 ac_preproc_ok=false
3907for ac_c_preproc_warn_flag in '' yes
3908do
3909 # Use a header file that comes with gcc, so configuring glibc
3910 # with a fresh cross-compiler works.
3911 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3912 # <limits.h> exists even on freestanding compilers.
3913 # On the NeXT, cc -E runs the code through the compiler's parser,
3914 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3916/* end confdefs.h. */
3917#ifdef __STDC__
3918# include <limits.h>
3919#else
3920# include <assert.h>
3921#endif
3922 Syntax error
3923_ACEOF
81ecdfbb 3924if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3925
81ecdfbb 3926else
bec39cab
AC
3927 # Broken: fails on valid input.
3928continue
3929fi
63a9e923 3930rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3931
81ecdfbb 3932 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3933 # can be detected and how.
81ecdfbb 3934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3935/* end confdefs.h. */
3936#include <ac_nonexistent.h>
3937_ACEOF
81ecdfbb 3938if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3939 # Broken: success on invalid input.
3940continue
8bb2c122 3941else
bec39cab
AC
3942 # Passes both tests.
3943ac_preproc_ok=:
3944break
8bb2c122 3945fi
63a9e923 3946rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 3947
bec39cab
AC
3948done
3949# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
63a9e923 3950rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 3951if $ac_preproc_ok; then :
bec39cab
AC
3952 break
3953fi
8bb2c122 3954
bec39cab
AC
3955 done
3956 ac_cv_prog_CPP=$CPP
ddc9cd0f 3957
c906108c 3958fi
bec39cab
AC
3959 CPP=$ac_cv_prog_CPP
3960else
3961 ac_cv_prog_CPP=$CPP
c906108c 3962fi
81ecdfbb
RW
3963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3964$as_echo "$CPP" >&6; }
bec39cab
AC
3965ac_preproc_ok=false
3966for ac_c_preproc_warn_flag in '' yes
3967do
3968 # Use a header file that comes with gcc, so configuring glibc
3969 # with a fresh cross-compiler works.
3970 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3971 # <limits.h> exists even on freestanding compilers.
3972 # On the NeXT, cc -E runs the code through the compiler's parser,
3973 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3975/* end confdefs.h. */
3976#ifdef __STDC__
3977# include <limits.h>
3978#else
3979# include <assert.h>
3980#endif
3981 Syntax error
3982_ACEOF
81ecdfbb 3983if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3984
81ecdfbb 3985else
bec39cab
AC
3986 # Broken: fails on valid input.
3987continue
3988fi
63a9e923 3989rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3990
81ecdfbb 3991 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3992 # can be detected and how.
81ecdfbb 3993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3994/* end confdefs.h. */
3995#include <ac_nonexistent.h>
3996_ACEOF
81ecdfbb 3997if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3998 # Broken: success on invalid input.
3999continue
c906108c 4000else
bec39cab
AC
4001 # Passes both tests.
4002ac_preproc_ok=:
4003break
c906108c 4004fi
63a9e923 4005rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4006
bec39cab
AC
4007done
4008# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
63a9e923 4009rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4010if $ac_preproc_ok; then :
4011
c906108c 4012else
81ecdfbb
RW
4013 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
4015as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4016See \`config.log' for more details" "$LINENO" 5; }
c906108c 4017fi
c906108c 4018
bec39cab
AC
4019ac_ext=c
4020ac_cpp='$CPP $CPPFLAGS'
4021ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4022ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4023ac_compiler_gnu=$ac_cv_c_compiler_gnu
4024
4025
81ecdfbb
RW
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4027$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
63a9e923 4028if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4029 $as_echo_n "(cached) " >&6
4e8d927d 4030else
81ecdfbb
RW
4031 if test -z "$GREP"; then
4032 ac_path_GREP_found=false
4033 # Loop through the user's path and test for each of PROGNAME-LIST
4034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4035for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4036do
4037 IFS=$as_save_IFS
4038 test -z "$as_dir" && as_dir=.
4039 for ac_prog in grep ggrep; do
4040 for ac_exec_ext in '' $ac_executable_extensions; do
4041 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
63a9e923 4042 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4043# Check for GNU ac_path_GREP and select it if it is found.
4044 # Check for GNU $ac_path_GREP
4045case `"$ac_path_GREP" --version 2>&1` in
4046*GNU*)
4047 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4048*)
4049 ac_count=0
4050 $as_echo_n 0123456789 >"conftest.in"
4051 while :
4052 do
4053 cat "conftest.in" "conftest.in" >"conftest.tmp"
4054 mv "conftest.tmp" "conftest.in"
4055 cp "conftest.in" "conftest.nl"
4056 $as_echo 'GREP' >> "conftest.nl"
4057 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4058 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4059 as_fn_arith $ac_count + 1 && ac_count=$as_val
4060 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4061 # Best one so far, save it but keep looking for a better one
4062 ac_cv_path_GREP="$ac_path_GREP"
4063 ac_path_GREP_max=$ac_count
bec39cab 4064 fi
81ecdfbb
RW
4065 # 10*(2^10) chars as input seems more than enough
4066 test $ac_count -gt 10 && break
4067 done
4068 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4069esac
bec39cab 4070
81ecdfbb
RW
4071 $ac_path_GREP_found && break 3
4072 done
4073 done
4074 done
4075IFS=$as_save_IFS
4076 if test -z "$ac_cv_path_GREP"; then
63a9e923 4077 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4078 fi
c906108c 4079else
81ecdfbb 4080 ac_cv_path_GREP=$GREP
c906108c 4081fi
c906108c 4082
81ecdfbb
RW
4083fi
4084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4085$as_echo "$ac_cv_path_GREP" >&6; }
4086 GREP="$ac_cv_path_GREP"
c906108c 4087
c906108c 4088
81ecdfbb
RW
4089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4090$as_echo_n "checking for egrep... " >&6; }
63a9e923 4091if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4092 $as_echo_n "(cached) " >&6
783e057b 4093else
81ecdfbb
RW
4094 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4095 then ac_cv_path_EGREP="$GREP -E"
4096 else
4097 if test -z "$EGREP"; then
4098 ac_path_EGREP_found=false
4099 # Loop through the user's path and test for each of PROGNAME-LIST
4100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4101for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4102do
4103 IFS=$as_save_IFS
4104 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4105 for ac_prog in egrep; do
4106 for ac_exec_ext in '' $ac_executable_extensions; do
4107 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
63a9e923 4108 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4109# Check for GNU ac_path_EGREP and select it if it is found.
4110 # Check for GNU $ac_path_EGREP
4111case `"$ac_path_EGREP" --version 2>&1` in
4112*GNU*)
4113 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4114*)
4115 ac_count=0
4116 $as_echo_n 0123456789 >"conftest.in"
4117 while :
4118 do
4119 cat "conftest.in" "conftest.in" >"conftest.tmp"
4120 mv "conftest.tmp" "conftest.in"
4121 cp "conftest.in" "conftest.nl"
4122 $as_echo 'EGREP' >> "conftest.nl"
4123 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4124 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4125 as_fn_arith $ac_count + 1 && ac_count=$as_val
4126 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4127 # Best one so far, save it but keep looking for a better one
4128 ac_cv_path_EGREP="$ac_path_EGREP"
4129 ac_path_EGREP_max=$ac_count
4130 fi
4131 # 10*(2^10) chars as input seems more than enough
4132 test $ac_count -gt 10 && break
4133 done
4134 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4135esac
bec39cab 4136
81ecdfbb
RW
4137 $ac_path_EGREP_found && break 3
4138 done
4139 done
4140 done
4141IFS=$as_save_IFS
4142 if test -z "$ac_cv_path_EGREP"; then
63a9e923 4143 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4144 fi
783e057b 4145else
81ecdfbb 4146 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4147fi
4148
81ecdfbb 4149 fi
783e057b 4150fi
81ecdfbb
RW
4151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4152$as_echo "$ac_cv_path_EGREP" >&6; }
4153 EGREP="$ac_cv_path_EGREP"
4154
783e057b 4155
81ecdfbb
RW
4156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4157$as_echo_n "checking for ANSI C header files... " >&6; }
63a9e923 4158if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4159 $as_echo_n "(cached) " >&6
783e057b 4160else
81ecdfbb 4161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4162/* end confdefs.h. */
783e057b 4163#include <stdlib.h>
bec39cab 4164#include <stdarg.h>
783e057b
DJ
4165#include <string.h>
4166#include <float.h>
c906108c 4167
bec39cab
AC
4168int
4169main ()
4170{
c906108c 4171
bec39cab
AC
4172 ;
4173 return 0;
4174}
4175_ACEOF
81ecdfbb 4176if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4177 ac_cv_header_stdc=yes
c906108c 4178else
81ecdfbb 4179 ac_cv_header_stdc=no
c906108c 4180fi
81ecdfbb 4181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4182
783e057b
DJ
4183if test $ac_cv_header_stdc = yes; then
4184 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4186/* end confdefs.h. */
4187#include <string.h>
c906108c 4188
783e057b
DJ
4189_ACEOF
4190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4191 $EGREP "memchr" >/dev/null 2>&1; then :
4192
c906108c 4193else
783e057b 4194 ac_cv_header_stdc=no
c906108c 4195fi
783e057b 4196rm -f conftest*
c906108c
SS
4197
4198fi
4199
783e057b
DJ
4200if test $ac_cv_header_stdc = yes; then
4201 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4203/* end confdefs.h. */
4204#include <stdlib.h>
bec39cab 4205
783e057b
DJ
4206_ACEOF
4207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4208 $EGREP "free" >/dev/null 2>&1; then :
4209
bec39cab 4210else
783e057b 4211 ac_cv_header_stdc=no
bec39cab 4212fi
783e057b 4213rm -f conftest*
bec39cab
AC
4214
4215fi
bec39cab 4216
783e057b
DJ
4217if test $ac_cv_header_stdc = yes; then
4218 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4219 if test "$cross_compiling" = yes; then :
783e057b 4220 :
bec39cab 4221else
81ecdfbb 4222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4223/* end confdefs.h. */
4224#include <ctype.h>
81ecdfbb 4225#include <stdlib.h>
783e057b
DJ
4226#if ((' ' & 0x0FF) == 0x020)
4227# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4228# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4229#else
4230# define ISLOWER(c) \
4231 (('a' <= (c) && (c) <= 'i') \
4232 || ('j' <= (c) && (c) <= 'r') \
4233 || ('s' <= (c) && (c) <= 'z'))
4234# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4235#endif
4236
4237#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4238int
4239main ()
4240{
4241 int i;
4242 for (i = 0; i < 256; i++)
4243 if (XOR (islower (i), ISLOWER (i))
4244 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4245 return 2;
4246 return 0;
783e057b
DJ
4247}
4248_ACEOF
81ecdfbb 4249if ac_fn_c_try_run "$LINENO"; then :
783e057b 4250
81ecdfbb
RW
4251else
4252 ac_cv_header_stdc=no
783e057b 4253fi
81ecdfbb
RW
4254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4255 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4256fi
81ecdfbb 4257
783e057b
DJ
4258fi
4259fi
81ecdfbb
RW
4260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4261$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4262if test $ac_cv_header_stdc = yes; then
4263
81ecdfbb 4264$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4265
4266fi
4267
4268# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4269for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4270 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4271do :
4272 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4273ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4274"
63a9e923 4275if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4276 cat >>confdefs.h <<_ACEOF
81ecdfbb 4277#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4278_ACEOF
4279
4280fi
4281
4282done
4283
4284
4285
81ecdfbb 4286 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
63a9e923 4287if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4288 MINIX=yes
4289else
4290 MINIX=
4291fi
4292
4293
4294 if test "$MINIX" = yes; then
4295
81ecdfbb 4296$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4297
4298
81ecdfbb 4299$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4300
4301
81ecdfbb 4302$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4303
4304 fi
4305
4306
81ecdfbb
RW
4307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4308$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
63a9e923 4309if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4310 $as_echo_n "(cached) " >&6
783e057b 4311else
81ecdfbb 4312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4313/* end confdefs.h. */
4314
63a9e923
SM
4315# define __EXTENSIONS__ 1
4316 $ac_includes_default
783e057b
DJ
4317int
4318main ()
4319{
4320
4321 ;
4322 return 0;
4323}
4324_ACEOF
81ecdfbb 4325if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4326 ac_cv_safe_to_define___extensions__=yes
4327else
81ecdfbb 4328 ac_cv_safe_to_define___extensions__=no
783e057b 4329fi
81ecdfbb 4330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4331fi
81ecdfbb
RW
4332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4333$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4334 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4335 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4336
81ecdfbb 4337 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4338
81ecdfbb 4339 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4340
81ecdfbb 4341 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4342
81ecdfbb 4343 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4344
4345
c971b7fa
PA
4346ac_aux_dir=
4347for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
63a9e923
SM
4348 if test -f "$ac_dir/install-sh"; then
4349 ac_aux_dir=$ac_dir
4350 ac_install_sh="$ac_aux_dir/install-sh -c"
4351 break
4352 elif test -f "$ac_dir/install.sh"; then
4353 ac_aux_dir=$ac_dir
4354 ac_install_sh="$ac_aux_dir/install.sh -c"
4355 break
4356 elif test -f "$ac_dir/shtool"; then
4357 ac_aux_dir=$ac_dir
4358 ac_install_sh="$ac_aux_dir/shtool install -c"
4359 break
4360 fi
c971b7fa
PA
4361done
4362if test -z "$ac_aux_dir"; then
63a9e923 4363 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4364fi
770d76d7 4365
c971b7fa
PA
4366# These three variables are undocumented and unsupported,
4367# and are intended to be withdrawn in a future Autoconf release.
4368# They can cause serious problems if a builder's source tree is in a directory
4369# whose full name contains unusual characters.
4370ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4371ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4372ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4373
770d76d7 4374
c971b7fa
PA
4375# Make sure we can run config.sub.
4376$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
63a9e923 4377 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4378
c971b7fa
PA
4379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4380$as_echo_n "checking build system type... " >&6; }
63a9e923 4381if ${ac_cv_build+:} false; then :
c971b7fa 4382 $as_echo_n "(cached) " >&6
770d76d7 4383else
c971b7fa
PA
4384 ac_build_alias=$build_alias
4385test "x$ac_build_alias" = x &&
4386 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4387test "x$ac_build_alias" = x &&
63a9e923 4388 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4389ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
63a9e923 4390 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4391
770d76d7 4392fi
c971b7fa
PA
4393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4394$as_echo "$ac_cv_build" >&6; }
4395case $ac_cv_build in
4396*-*-*) ;;
63a9e923 4397*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4398esac
c971b7fa
PA
4399build=$ac_cv_build
4400ac_save_IFS=$IFS; IFS='-'
4401set x $ac_cv_build
4402shift
4403build_cpu=$1
4404build_vendor=$2
4405shift; shift
4406# Remember, the first character of IFS is used to create $*,
4407# except with old shells:
4408build_os=$*
4409IFS=$ac_save_IFS
4410case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4411
4412
c971b7fa
PA
4413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4414$as_echo_n "checking host system type... " >&6; }
63a9e923 4415if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4416 $as_echo_n "(cached) " >&6
4417else
c971b7fa
PA
4418 if test "x$host_alias" = x; then
4419 ac_cv_host=$ac_cv_build
81ecdfbb 4420else
c971b7fa 4421 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
63a9e923 4422 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4423fi
81ecdfbb
RW
4424
4425fi
c971b7fa
PA
4426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4427$as_echo "$ac_cv_host" >&6; }
4428case $ac_cv_host in
4429*-*-*) ;;
63a9e923 4430*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4431esac
c971b7fa
PA
4432host=$ac_cv_host
4433ac_save_IFS=$IFS; IFS='-'
4434set x $ac_cv_host
4435shift
4436host_cpu=$1
4437host_vendor=$2
4438shift; shift
4439# Remember, the first character of IFS is used to create $*,
4440# except with old shells:
4441host_os=$*
4442IFS=$ac_save_IFS
4443case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4444
4445
4446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4447$as_echo_n "checking target system type... " >&6; }
63a9e923 4448if ${ac_cv_target+:} false; then :
3388710e
JM
4449 $as_echo_n "(cached) " >&6
4450else
4451 if test "x$target_alias" = x; then
4452 ac_cv_target=$ac_cv_host
4453else
4454 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
63a9e923 4455 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4456fi
4457
4458fi
4459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4460$as_echo "$ac_cv_target" >&6; }
4461case $ac_cv_target in
4462*-*-*) ;;
63a9e923 4463*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4464esac
4465target=$ac_cv_target
4466ac_save_IFS=$IFS; IFS='-'
4467set x $ac_cv_target
4468shift
4469target_cpu=$1
4470target_vendor=$2
4471shift; shift
4472# Remember, the first character of IFS is used to create $*,
4473# except with old shells:
4474target_os=$*
4475IFS=$ac_save_IFS
4476case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4477
4478
4479# The aliases save the names the user supplied, while $host etc.
4480# will get canonicalized.
4481test -n "$target_alias" &&
4482 test "$program_prefix$program_suffix$program_transform_name" = \
4483 NONENONEs,x,x, &&
4484 program_prefix=${target_alias}-
4485
4486# The tests for host and target for $enable_largefile require
4487# canonical names.
4488
4489
81ecdfbb 4490
da2f07f1
JK
4491# As the $enable_largefile decision depends on --enable-plugins we must set it
4492# even in directories otherwise not depending on the $plugins option.
4493
4494
2974be62
AM
4495 maybe_plugins=no
4496 for ac_header in dlfcn.h
4497do :
4498 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4499"
63a9e923 4500if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4501 cat >>confdefs.h <<_ACEOF
4502#define HAVE_DLFCN_H 1
4503_ACEOF
4504 maybe_plugins=yes
4505fi
4506
4507done
4508
4509 for ac_header in windows.h
4510do :
4511 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4512"
63a9e923 4513if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4514 cat >>confdefs.h <<_ACEOF
4515#define HAVE_WINDOWS_H 1
4516_ACEOF
4517 maybe_plugins=yes
4518fi
4519
4520done
4521
4522
4523 # Check whether --enable-plugins was given.
da2f07f1
JK
4524if test "${enable_plugins+set}" = set; then :
4525 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4526 no) plugins=no ;;
4527 *) plugins=yes
4528 if test "$maybe_plugins" != "yes" ; then
63a9e923 4529 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4530 fi ;;
4531 esac
da2f07f1 4532else
2974be62
AM
4533 plugins=$maybe_plugins
4534
da2f07f1
JK
4535fi
4536
2974be62 4537 if test "$plugins" = "yes"; then
458412c3
TT
4538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4539$as_echo_n "checking for library containing dlsym... " >&6; }
63a9e923 4540if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4541 $as_echo_n "(cached) " >&6
4542else
4543 ac_func_search_save_LIBS=$LIBS
4544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545/* end confdefs.h. */
4546
4547/* Override any GCC internal prototype to avoid an error.
4548 Use char because int might match the return type of a GCC
4549 builtin and then its argument prototype would still apply. */
4550#ifdef __cplusplus
4551extern "C"
4552#endif
458412c3 4553char dlsym ();
2974be62
AM
4554int
4555main ()
4556{
458412c3 4557return dlsym ();
2974be62
AM
4558 ;
4559 return 0;
4560}
4561_ACEOF
4562for ac_lib in '' dl; do
4563 if test -z "$ac_lib"; then
4564 ac_res="none required"
4565 else
4566 ac_res=-l$ac_lib
4567 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4568 fi
4569 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4570 ac_cv_search_dlsym=$ac_res
2974be62
AM
4571fi
4572rm -f core conftest.err conftest.$ac_objext \
4573 conftest$ac_exeext
63a9e923 4574 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4575 break
4576fi
4577done
63a9e923 4578if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4579
4580else
458412c3 4581 ac_cv_search_dlsym=no
2974be62
AM
4582fi
4583rm conftest.$ac_ext
4584LIBS=$ac_func_search_save_LIBS
4585fi
458412c3
TT
4586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4587$as_echo "$ac_cv_search_dlsym" >&6; }
4588ac_res=$ac_cv_search_dlsym
2974be62
AM
4589if test "$ac_res" != no; then :
4590 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4591
4592fi
4593
4594 fi
da2f07f1
JK
4595
4596
4597case "${host}" in
4598 sparc-*-solaris*|i[3-7]86-*-solaris*)
4599 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4600 # are mutually exclusive; and without procfs support, the bfd/ elf module
4601 # cannot provide certain routines such as elfcore_write_prpsinfo
4602 # or elfcore_write_prstatus. So unless the user explicitly requested
4603 # large-file support through the --enable-largefile switch, disable
4604 # large-file support in favor of procfs support.
4605 test "${target}" = "${host}" -a "x$plugins" = xno \
4606 && : ${enable_largefile="no"}
4607 ;;
4608esac
4609
4610# Check whether --enable-largefile was given.
4611if test "${enable_largefile+set}" = set; then :
4612 enableval=$enable_largefile;
4613fi
4614
4615if test "$enable_largefile" != no; then
4616
4617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4618$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
63a9e923 4619if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4620 $as_echo_n "(cached) " >&6
4621else
4622 ac_cv_sys_largefile_CC=no
4623 if test "$GCC" != yes; then
4624 ac_save_CC=$CC
4625 while :; do
4626 # IRIX 6.2 and later do not support large files by default,
4627 # so use the C compiler's -n32 option if that helps.
4628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4629/* end confdefs.h. */
4630#include <sys/types.h>
4631 /* Check that off_t can represent 2**63 - 1 correctly.
4632 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4633 since some C++ compilers masquerading as C compilers
4634 incorrectly reject 9223372036854775807. */
4635#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4636 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4637 && LARGE_OFF_T % 2147483647 == 1)
4638 ? 1 : -1];
4639int
4640main ()
4641{
4642
4643 ;
4644 return 0;
4645}
4646_ACEOF
4647 if ac_fn_c_try_compile "$LINENO"; then :
4648 break
4649fi
4650rm -f core conftest.err conftest.$ac_objext
4651 CC="$CC -n32"
4652 if ac_fn_c_try_compile "$LINENO"; then :
4653 ac_cv_sys_largefile_CC=' -n32'; break
4654fi
4655rm -f core conftest.err conftest.$ac_objext
4656 break
4657 done
4658 CC=$ac_save_CC
4659 rm -f conftest.$ac_ext
4660 fi
4661fi
4662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4663$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4664 if test "$ac_cv_sys_largefile_CC" != no; then
4665 CC=$CC$ac_cv_sys_largefile_CC
4666 fi
4667
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4669$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
63a9e923 4670if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4671 $as_echo_n "(cached) " >&6
4672else
4673 while :; do
4674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4675/* end confdefs.h. */
4676#include <sys/types.h>
4677 /* Check that off_t can represent 2**63 - 1 correctly.
4678 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4679 since some C++ compilers masquerading as C compilers
4680 incorrectly reject 9223372036854775807. */
4681#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4682 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4683 && LARGE_OFF_T % 2147483647 == 1)
4684 ? 1 : -1];
4685int
4686main ()
4687{
4688
4689 ;
4690 return 0;
4691}
4692_ACEOF
4693if ac_fn_c_try_compile "$LINENO"; then :
4694 ac_cv_sys_file_offset_bits=no; break
4695fi
4696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4698/* end confdefs.h. */
4699#define _FILE_OFFSET_BITS 64
4700#include <sys/types.h>
4701 /* Check that off_t can represent 2**63 - 1 correctly.
4702 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4703 since some C++ compilers masquerading as C compilers
4704 incorrectly reject 9223372036854775807. */
4705#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4706 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4707 && LARGE_OFF_T % 2147483647 == 1)
4708 ? 1 : -1];
4709int
4710main ()
4711{
4712
4713 ;
4714 return 0;
4715}
4716_ACEOF
4717if ac_fn_c_try_compile "$LINENO"; then :
4718 ac_cv_sys_file_offset_bits=64; break
4719fi
4720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4721 ac_cv_sys_file_offset_bits=unknown
4722 break
4723done
4724fi
4725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4726$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4727case $ac_cv_sys_file_offset_bits in #(
4728 no | unknown) ;;
4729 *)
4730cat >>confdefs.h <<_ACEOF
4731#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4732_ACEOF
4733;;
4734esac
4735rm -rf conftest*
4736 if test $ac_cv_sys_file_offset_bits = unknown; then
4737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4738$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
63a9e923 4739if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4740 $as_echo_n "(cached) " >&6
4741else
4742 while :; do
4743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4744/* end confdefs.h. */
4745#include <sys/types.h>
4746 /* Check that off_t can represent 2**63 - 1 correctly.
4747 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4748 since some C++ compilers masquerading as C compilers
4749 incorrectly reject 9223372036854775807. */
4750#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4751 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4752 && LARGE_OFF_T % 2147483647 == 1)
4753 ? 1 : -1];
4754int
4755main ()
4756{
4757
4758 ;
4759 return 0;
4760}
4761_ACEOF
4762if ac_fn_c_try_compile "$LINENO"; then :
4763 ac_cv_sys_large_files=no; break
4764fi
4765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4767/* end confdefs.h. */
4768#define _LARGE_FILES 1
4769#include <sys/types.h>
4770 /* Check that off_t can represent 2**63 - 1 correctly.
4771 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4772 since some C++ compilers masquerading as C compilers
4773 incorrectly reject 9223372036854775807. */
4774#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4775 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4776 && LARGE_OFF_T % 2147483647 == 1)
4777 ? 1 : -1];
4778int
4779main ()
4780{
4781
4782 ;
4783 return 0;
4784}
4785_ACEOF
4786if ac_fn_c_try_compile "$LINENO"; then :
4787 ac_cv_sys_large_files=1; break
4788fi
4789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4790 ac_cv_sys_large_files=unknown
4791 break
4792done
4793fi
4794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4795$as_echo "$ac_cv_sys_large_files" >&6; }
4796case $ac_cv_sys_large_files in #(
4797 no | unknown) ;;
4798 *)
4799cat >>confdefs.h <<_ACEOF
4800#define _LARGE_FILES $ac_cv_sys_large_files
4801_ACEOF
4802;;
4803esac
4804rm -rf conftest*
4805 fi
63a9e923
SM
4806
4807
da2f07f1
JK
4808fi
4809
4810
4811
81ecdfbb
RW
4812
4813
4814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4815$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
63a9e923 4816if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4817 $as_echo_n "(cached) " >&6
4818else
4819 am_cv_prog_cc_stdc=no
4820ac_save_CC="$CC"
4821# Don't try gcc -ansi; that turns off useful extensions and
4822# breaks some systems' header files.
4823# AIX -qlanglvl=ansi
4824# Ultrix and OSF/1 -std1
4825# HP-UX 10.20 and later -Ae
4826# HP-UX older versions -Aa -D_HPUX_SOURCE
4827# SVR4 -Xc -D__EXTENSIONS__
4828for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4829do
783e057b 4830 CC="$ac_save_CC $ac_arg"
81ecdfbb 4831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4832/* end confdefs.h. */
4833#include <stdarg.h>
4834#include <stdio.h>
4835#include <sys/types.h>
4836#include <sys/stat.h>
4837/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4838struct buf { int x; };
4839FILE * (*rcsopen) (struct buf *, struct stat *, int);
4840static char *e (p, i)
4841 char **p;
4842 int i;
4843{
4844 return p[i];
4845}
4846static char *f (char * (*g) (char **, int), char **p, ...)
4847{
4848 char *s;
4849 va_list v;
4850 va_start (v,p);
4851 s = g (p, va_arg (v,int));
4852 va_end (v);
4853 return s;
4854}
4855int test (int i, double x);
4856struct s1 {int (*f) (int a);};
4857struct s2 {int (*f) (double a);};
4858int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4859int argc;
4860char **argv;
4861
4862int
4863main ()
4864{
4865
4866return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4867
4868 ;
4869 return 0;
4870}
4871_ACEOF
81ecdfbb 4872if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4873 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4874fi
81ecdfbb 4875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4876done
4877CC="$ac_save_CC"
4878
4879fi
4880
4881if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4883$as_echo "none needed" >&6; }
783e057b 4884else
81ecdfbb
RW
4885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4886$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4887fi
4888case "x$am_cv_prog_cc_stdc" in
4889 x|xno) ;;
4890 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4891esac
4892
63a9e923
SM
4893# Expand $ac_aux_dir to an absolute path.
4894am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 4895
63a9e923 4896if test x"${install_sh+set}" != xset; then
4869db5e
RM
4897 case $am_aux_dir in
4898 *\ * | *\ *)
4899 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4900 *)
4901 install_sh="\${SHELL} $am_aux_dir/install-sh"
4902 esac
4903fi
4904
63a9e923
SM
4905# Installed binaries are usually stripped using 'strip' when the user
4906# run "make install-strip". However 'strip' might not be the right
4869db5e 4907# tool to use in cross-compilation environments, therefore Automake
63a9e923 4908# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
4909if test "$cross_compiling" != no; then
4910 if test -n "$ac_tool_prefix"; then
4911 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4912set dummy ${ac_tool_prefix}strip; ac_word=$2
4913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 4915if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
4916 $as_echo_n "(cached) " >&6
4917else
4918 if test -n "$STRIP"; then
4919 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4920else
4921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4922for as_dir in $PATH
4923do
4924 IFS=$as_save_IFS
4925 test -z "$as_dir" && as_dir=.
4926 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 4927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4928 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4930 break 2
4931 fi
4932done
4933 done
4934IFS=$as_save_IFS
4935
4936fi
4937fi
4938STRIP=$ac_cv_prog_STRIP
4939if test -n "$STRIP"; then
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4941$as_echo "$STRIP" >&6; }
4942else
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4944$as_echo "no" >&6; }
4945fi
4946
4947
4948fi
4949if test -z "$ac_cv_prog_STRIP"; then
4950 ac_ct_STRIP=$STRIP
4951 # Extract the first word of "strip", so it can be a program name with args.
4952set dummy strip; ac_word=$2
4953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4954$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 4955if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
4956 $as_echo_n "(cached) " >&6
4957else
4958 if test -n "$ac_ct_STRIP"; then
4959 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4960else
4961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4962for as_dir in $PATH
4963do
4964 IFS=$as_save_IFS
4965 test -z "$as_dir" && as_dir=.
4966 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 4967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4968 ac_cv_prog_ac_ct_STRIP="strip"
4969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4970 break 2
4971 fi
4972done
4973 done
4974IFS=$as_save_IFS
4975
4976fi
4977fi
4978ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4979if test -n "$ac_ct_STRIP"; then
4980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4981$as_echo "$ac_ct_STRIP" >&6; }
4982else
4983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984$as_echo "no" >&6; }
4985fi
4986
4987 if test "x$ac_ct_STRIP" = x; then
4988 STRIP=":"
4989 else
4990 case $cross_compiling:$ac_tool_warned in
4991yes:)
4992{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4993$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4994ac_tool_warned=yes ;;
4995esac
4996 STRIP=$ac_ct_STRIP
4997 fi
4998else
4999 STRIP="$ac_cv_prog_STRIP"
5000fi
5001
5002fi
5003INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5004
783e057b
DJ
5005
5006ac_aux_dir=
81ecdfbb 5007for ac_dir in .. "$srcdir"/..; do
63a9e923
SM
5008 if test -f "$ac_dir/install-sh"; then
5009 ac_aux_dir=$ac_dir
5010 ac_install_sh="$ac_aux_dir/install-sh -c"
5011 break
5012 elif test -f "$ac_dir/install.sh"; then
5013 ac_aux_dir=$ac_dir
5014 ac_install_sh="$ac_aux_dir/install.sh -c"
5015 break
5016 elif test -f "$ac_dir/shtool"; then
5017 ac_aux_dir=$ac_dir
5018 ac_install_sh="$ac_aux_dir/shtool install -c"
5019 break
5020 fi
783e057b
DJ
5021done
5022if test -z "$ac_aux_dir"; then
63a9e923 5023 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5024fi
81ecdfbb
RW
5025
5026# These three variables are undocumented and unsupported,
5027# and are intended to be withdrawn in a future Autoconf release.
5028# They can cause serious problems if a builder's source tree is in a directory
5029# whose full name contains unusual characters.
5030ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5031ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5032ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5033
783e057b 5034
783e057b 5035
9009e1ae
MR
5036test "$program_prefix" != NONE &&
5037 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5038# Use a double $ so make ignores it.
5039test "$program_suffix" != NONE &&
5040 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5041# Double any \ or $.
5042# By default was `s,x,x', remove it if useless.
5043ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5044program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5045
81ecdfbb 5046
0bcda685
PA
5047# We require a C++11 compiler. Check if one is available, and if
5048# necessary, set CXX_DIALECT to some -std=xxx switch.
5049
41260ac2 5050 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5051 ac_ext=cpp
5052ac_cpp='$CXXCPP $CPPFLAGS'
5053ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5054ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5055ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5056 CXX_DIALECT=""
5057 ac_success=no
5058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5059$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
63a9e923 5060if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5061 $as_echo_n "(cached) " >&6
5062else
5063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5064/* end confdefs.h. */
5065
5066
5067// If the compiler admits that it is not ready for C++11, why torture it?
5068// Hopefully, this will speed up the test.
5069
5070#ifndef __cplusplus
5071
5072#error "This is not a C++ compiler"
5073
5074#elif __cplusplus < 201103L
5075
5076#error "This is not a C++11 compiler"
5077
5078#else
5079
5080namespace cxx11
5081{
5082
5083 namespace test_static_assert
5084 {
5085
5086 template <typename T>
5087 struct check
5088 {
5089 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5090 };
5091
5092 }
5093
5094 namespace test_final_override
5095 {
5096
5097 struct Base
5098 {
5099 virtual void f() {}
5100 };
5101
5102 struct Derived : public Base
5103 {
5104 virtual void f() override {}
5105 };
5106
5107 }
5108
5109 namespace test_double_right_angle_brackets
5110 {
5111
5112 template < typename T >
5113 struct check {};
5114
5115 typedef check<void> single_type;
5116 typedef check<check<void>> double_type;
5117 typedef check<check<check<void>>> triple_type;
5118 typedef check<check<check<check<void>>>> quadruple_type;
5119
5120 }
5121
5122 namespace test_decltype
5123 {
5124
5125 int
5126 f()
5127 {
5128 int a = 1;
5129 decltype(a) b = 2;
5130 return a + b;
5131 }
5132
5133 }
5134
5135 namespace test_type_deduction
5136 {
5137
5138 template < typename T1, typename T2 >
5139 struct is_same
5140 {
5141 static const bool value = false;
5142 };
5143
5144 template < typename T >
5145 struct is_same<T, T>
5146 {
5147 static const bool value = true;
5148 };
5149
5150 template < typename T1, typename T2 >
5151 auto
5152 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5153 {
5154 return a1 + a2;
5155 }
5156
5157 int
5158 test(const int c, volatile int v)
5159 {
5160 static_assert(is_same<int, decltype(0)>::value == true, "");
5161 static_assert(is_same<int, decltype(c)>::value == false, "");
5162 static_assert(is_same<int, decltype(v)>::value == false, "");
5163 auto ac = c;
5164 auto av = v;
5165 auto sumi = ac + av + 'x';
5166 auto sumf = ac + av + 1.0;
5167 static_assert(is_same<int, decltype(ac)>::value == true, "");
5168 static_assert(is_same<int, decltype(av)>::value == true, "");
5169 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5170 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5171 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5172 return (sumf > 0.0) ? sumi : add(c, v);
5173 }
5174
5175 }
5176
5177 namespace test_noexcept
5178 {
5179
5180 int f() { return 0; }
5181 int g() noexcept { return 0; }
5182
5183 static_assert(noexcept(f()) == false, "");
5184 static_assert(noexcept(g()) == true, "");
5185
5186 }
5187
5188 namespace test_constexpr
5189 {
5190
5191 template < typename CharT >
5192 unsigned long constexpr
5193 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5194 {
5195 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5196 }
5197
5198 template < typename CharT >
5199 unsigned long constexpr
5200 strlen_c(const CharT *const s) noexcept
5201 {
5202 return strlen_c_r(s, 0UL);
5203 }
5204
5205 static_assert(strlen_c("") == 0UL, "");
5206 static_assert(strlen_c("1") == 1UL, "");
5207 static_assert(strlen_c("example") == 7UL, "");
5208 static_assert(strlen_c("another\0example") == 7UL, "");
5209
5210 }
5211
5212 namespace test_rvalue_references
5213 {
5214
5215 template < int N >
5216 struct answer
5217 {
5218 static constexpr int value = N;
5219 };
5220
5221 answer<1> f(int&) { return answer<1>(); }
5222 answer<2> f(const int&) { return answer<2>(); }
5223 answer<3> f(int&&) { return answer<3>(); }
5224
5225 void
5226 test()
5227 {
5228 int i = 0;
5229 const int c = 0;
5230 static_assert(decltype(f(i))::value == 1, "");
5231 static_assert(decltype(f(c))::value == 2, "");
5232 static_assert(decltype(f(0))::value == 3, "");
5233 }
5234
5235 }
5236
5237 namespace test_uniform_initialization
5238 {
5239
5240 struct test
5241 {
5242 static const int zero {};
5243 static const int one {1};
5244 };
5245
5246 static_assert(test::zero == 0, "");
5247 static_assert(test::one == 1, "");
5248
5249 }
5250
5251 namespace test_lambdas
5252 {
5253
5254 void
5255 test1()
5256 {
5257 auto lambda1 = [](){};
5258 auto lambda2 = lambda1;
5259 lambda1();
5260 lambda2();
5261 }
5262
5263 int
5264 test2()
5265 {
5266 auto a = [](int i, int j){ return i + j; }(1, 2);
5267 auto b = []() -> int { return '0'; }();
5268 auto c = [=](){ return a + b; }();
5269 auto d = [&](){ return c; }();
5270 auto e = [a, &b](int x) mutable {
5271 const auto identity = [](int y){ return y; };
5272 for (auto i = 0; i < a; ++i)
5273 a += b--;
5274 return x + identity(a + b);
5275 }(0);
5276 return a + b + c + d + e;
5277 }
5278
5279 int
5280 test3()
5281 {
5282 const auto nullary = [](){ return 0; };
5283 const auto unary = [](int x){ return x; };
5284 using nullary_t = decltype(nullary);
5285 using unary_t = decltype(unary);
5286 const auto higher1st = [](nullary_t f){ return f(); };
5287 const auto higher2nd = [unary](nullary_t f1){
5288 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5289 };
5290 return higher1st(nullary) + higher2nd(nullary)(unary);
5291 }
5292
5293 }
5294
5295 namespace test_variadic_templates
5296 {
5297
5298 template <int...>
5299 struct sum;
5300
5301 template <int N0, int... N1toN>
5302 struct sum<N0, N1toN...>
5303 {
5304 static constexpr auto value = N0 + sum<N1toN...>::value;
5305 };
5306
5307 template <>
5308 struct sum<>
5309 {
5310 static constexpr auto value = 0;
5311 };
5312
5313 static_assert(sum<>::value == 0, "");
5314 static_assert(sum<1>::value == 1, "");
5315 static_assert(sum<23>::value == 23, "");
5316 static_assert(sum<1, 2>::value == 3, "");
5317 static_assert(sum<5, 5, 11>::value == 21, "");
5318 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5319
5320 }
5321
5322 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5323 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5324 // because of this.
5325 namespace test_template_alias_sfinae
5326 {
5327
5328 struct foo {};
5329
5330 template<typename T>
5331 using member = typename T::member_type;
5332
5333 template<typename T>
5334 void func(...) {}
5335
5336 template<typename T>
5337 void func(member<T>*) {}
5338
5339 void test();
5340
5341 void test() { func<foo>(0); }
5342
5343 }
5344
5345} // namespace cxx11
5346
5347#endif // __cplusplus >= 201103L
5348
5349
5350
5351_ACEOF
5352if ac_fn_cxx_try_compile "$LINENO"; then :
5353 ax_cv_cxx_compile_cxx11=yes
5354else
5355 ax_cv_cxx_compile_cxx11=no
5356fi
5357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5358fi
5359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5360$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5361 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5362 ac_success=yes
5363 fi
5364
5365 if test x$ac_success = xno; then
41260ac2
SM
5366 for alternative in ${ax_cxx_compile_alternatives}; do
5367 switch="-std=gnu++${alternative}"
0bcda685
PA
5368 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5370$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
63a9e923 5371if eval \${$cachevar+:} false; then :
0bcda685
PA
5372 $as_echo_n "(cached) " >&6
5373else
5374 ac_save_CXX="$CXX"
5375 CXX="$CXX $switch"
5376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5377/* end confdefs.h. */
5378
5379
5380// If the compiler admits that it is not ready for C++11, why torture it?
5381// Hopefully, this will speed up the test.
5382
5383#ifndef __cplusplus
5384
5385#error "This is not a C++ compiler"
5386
5387#elif __cplusplus < 201103L
5388
5389#error "This is not a C++11 compiler"
5390
5391#else
5392
5393namespace cxx11
5394{
5395
5396 namespace test_static_assert
5397 {
5398
5399 template <typename T>
5400 struct check
5401 {
5402 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5403 };
5404
5405 }
5406
5407 namespace test_final_override
5408 {
5409
5410 struct Base
5411 {
5412 virtual void f() {}
5413 };
5414
5415 struct Derived : public Base
5416 {
5417 virtual void f() override {}
5418 };
5419
5420 }
5421
5422 namespace test_double_right_angle_brackets
5423 {
5424
5425 template < typename T >
5426 struct check {};
5427
5428 typedef check<void> single_type;
5429 typedef check<check<void>> double_type;
5430 typedef check<check<check<void>>> triple_type;
5431 typedef check<check<check<check<void>>>> quadruple_type;
5432
5433 }
5434
5435 namespace test_decltype
5436 {
5437
5438 int
5439 f()
5440 {
5441 int a = 1;
5442 decltype(a) b = 2;
5443 return a + b;
5444 }
5445
5446 }
5447
5448 namespace test_type_deduction
5449 {
5450
5451 template < typename T1, typename T2 >
5452 struct is_same
5453 {
5454 static const bool value = false;
5455 };
5456
5457 template < typename T >
5458 struct is_same<T, T>
5459 {
5460 static const bool value = true;
5461 };
5462
5463 template < typename T1, typename T2 >
5464 auto
5465 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5466 {
5467 return a1 + a2;
5468 }
5469
5470 int
5471 test(const int c, volatile int v)
5472 {
5473 static_assert(is_same<int, decltype(0)>::value == true, "");
5474 static_assert(is_same<int, decltype(c)>::value == false, "");
5475 static_assert(is_same<int, decltype(v)>::value == false, "");
5476 auto ac = c;
5477 auto av = v;
5478 auto sumi = ac + av + 'x';
5479 auto sumf = ac + av + 1.0;
5480 static_assert(is_same<int, decltype(ac)>::value == true, "");
5481 static_assert(is_same<int, decltype(av)>::value == true, "");
5482 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5483 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5484 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5485 return (sumf > 0.0) ? sumi : add(c, v);
5486 }
5487
5488 }
5489
5490 namespace test_noexcept
5491 {
5492
5493 int f() { return 0; }
5494 int g() noexcept { return 0; }
5495
5496 static_assert(noexcept(f()) == false, "");
5497 static_assert(noexcept(g()) == true, "");
5498
5499 }
5500
5501 namespace test_constexpr
5502 {
5503
5504 template < typename CharT >
5505 unsigned long constexpr
5506 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5507 {
5508 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5509 }
5510
5511 template < typename CharT >
5512 unsigned long constexpr
5513 strlen_c(const CharT *const s) noexcept
5514 {
5515 return strlen_c_r(s, 0UL);
5516 }
5517
5518 static_assert(strlen_c("") == 0UL, "");
5519 static_assert(strlen_c("1") == 1UL, "");
5520 static_assert(strlen_c("example") == 7UL, "");
5521 static_assert(strlen_c("another\0example") == 7UL, "");
5522
5523 }
5524
5525 namespace test_rvalue_references
5526 {
5527
5528 template < int N >
5529 struct answer
5530 {
5531 static constexpr int value = N;
5532 };
5533
5534 answer<1> f(int&) { return answer<1>(); }
5535 answer<2> f(const int&) { return answer<2>(); }
5536 answer<3> f(int&&) { return answer<3>(); }
5537
5538 void
5539 test()
5540 {
5541 int i = 0;
5542 const int c = 0;
5543 static_assert(decltype(f(i))::value == 1, "");
5544 static_assert(decltype(f(c))::value == 2, "");
5545 static_assert(decltype(f(0))::value == 3, "");
5546 }
5547
5548 }
5549
5550 namespace test_uniform_initialization
5551 {
5552
5553 struct test
5554 {
5555 static const int zero {};
5556 static const int one {1};
5557 };
5558
5559 static_assert(test::zero == 0, "");
5560 static_assert(test::one == 1, "");
5561
5562 }
5563
5564 namespace test_lambdas
5565 {
5566
5567 void
5568 test1()
5569 {
5570 auto lambda1 = [](){};
5571 auto lambda2 = lambda1;
5572 lambda1();
5573 lambda2();
5574 }
5575
5576 int
5577 test2()
5578 {
5579 auto a = [](int i, int j){ return i + j; }(1, 2);
5580 auto b = []() -> int { return '0'; }();
5581 auto c = [=](){ return a + b; }();
5582 auto d = [&](){ return c; }();
5583 auto e = [a, &b](int x) mutable {
5584 const auto identity = [](int y){ return y; };
5585 for (auto i = 0; i < a; ++i)
5586 a += b--;
5587 return x + identity(a + b);
5588 }(0);
5589 return a + b + c + d + e;
5590 }
5591
5592 int
5593 test3()
5594 {
5595 const auto nullary = [](){ return 0; };
5596 const auto unary = [](int x){ return x; };
5597 using nullary_t = decltype(nullary);
5598 using unary_t = decltype(unary);
5599 const auto higher1st = [](nullary_t f){ return f(); };
5600 const auto higher2nd = [unary](nullary_t f1){
5601 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5602 };
5603 return higher1st(nullary) + higher2nd(nullary)(unary);
5604 }
5605
5606 }
5607
5608 namespace test_variadic_templates
5609 {
5610
5611 template <int...>
5612 struct sum;
5613
5614 template <int N0, int... N1toN>
5615 struct sum<N0, N1toN...>
5616 {
5617 static constexpr auto value = N0 + sum<N1toN...>::value;
5618 };
5619
5620 template <>
5621 struct sum<>
5622 {
5623 static constexpr auto value = 0;
5624 };
5625
5626 static_assert(sum<>::value == 0, "");
5627 static_assert(sum<1>::value == 1, "");
5628 static_assert(sum<23>::value == 23, "");
5629 static_assert(sum<1, 2>::value == 3, "");
5630 static_assert(sum<5, 5, 11>::value == 21, "");
5631 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5632
5633 }
5634
5635 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5636 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5637 // because of this.
5638 namespace test_template_alias_sfinae
5639 {
5640
5641 struct foo {};
5642
5643 template<typename T>
5644 using member = typename T::member_type;
5645
5646 template<typename T>
5647 void func(...) {}
5648
5649 template<typename T>
5650 void func(member<T>*) {}
5651
5652 void test();
5653
5654 void test() { func<foo>(0); }
5655
5656 }
5657
5658} // namespace cxx11
5659
5660#endif // __cplusplus >= 201103L
5661
5662
5663
5664_ACEOF
5665if ac_fn_cxx_try_compile "$LINENO"; then :
5666 eval $cachevar=yes
5667else
5668 eval $cachevar=no
5669fi
5670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5671 CXX="$ac_save_CXX"
5672fi
5673eval ac_res=\$$cachevar
5674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5675$as_echo "$ac_res" >&6; }
5676 if eval test x\$$cachevar = xyes; then
5677 CXX_DIALECT="$switch"
5678 ac_success=yes
5679 break
5680 fi
5681 done
5682 fi
5683
5684 if test x$ac_success = xno; then
41260ac2
SM
5685 for alternative in ${ax_cxx_compile_alternatives}; do
5686 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5687 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5689$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
63a9e923 5690if eval \${$cachevar+:} false; then :
0bcda685
PA
5691 $as_echo_n "(cached) " >&6
5692else
5693 ac_save_CXX="$CXX"
41260ac2
SM
5694 CXX="$CXX $switch"
5695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5696/* end confdefs.h. */
5697
5698
5699// If the compiler admits that it is not ready for C++11, why torture it?
5700// Hopefully, this will speed up the test.
5701
5702#ifndef __cplusplus
5703
5704#error "This is not a C++ compiler"
5705
5706#elif __cplusplus < 201103L
5707
5708#error "This is not a C++11 compiler"
5709
5710#else
5711
5712namespace cxx11
5713{
5714
5715 namespace test_static_assert
5716 {
5717
5718 template <typename T>
5719 struct check
5720 {
5721 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5722 };
5723
5724 }
5725
5726 namespace test_final_override
5727 {
5728
5729 struct Base
5730 {
5731 virtual void f() {}
5732 };
5733
5734 struct Derived : public Base
5735 {
5736 virtual void f() override {}
5737 };
5738
5739 }
5740
5741 namespace test_double_right_angle_brackets
5742 {
5743
5744 template < typename T >
5745 struct check {};
5746
5747 typedef check<void> single_type;
5748 typedef check<check<void>> double_type;
5749 typedef check<check<check<void>>> triple_type;
5750 typedef check<check<check<check<void>>>> quadruple_type;
5751
5752 }
5753
5754 namespace test_decltype
5755 {
5756
5757 int
5758 f()
5759 {
5760 int a = 1;
5761 decltype(a) b = 2;
5762 return a + b;
5763 }
5764
5765 }
5766
5767 namespace test_type_deduction
5768 {
5769
5770 template < typename T1, typename T2 >
5771 struct is_same
5772 {
5773 static const bool value = false;
5774 };
5775
5776 template < typename T >
5777 struct is_same<T, T>
5778 {
5779 static const bool value = true;
5780 };
5781
5782 template < typename T1, typename T2 >
5783 auto
5784 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5785 {
5786 return a1 + a2;
5787 }
5788
5789 int
5790 test(const int c, volatile int v)
5791 {
5792 static_assert(is_same<int, decltype(0)>::value == true, "");
5793 static_assert(is_same<int, decltype(c)>::value == false, "");
5794 static_assert(is_same<int, decltype(v)>::value == false, "");
5795 auto ac = c;
5796 auto av = v;
5797 auto sumi = ac + av + 'x';
5798 auto sumf = ac + av + 1.0;
5799 static_assert(is_same<int, decltype(ac)>::value == true, "");
5800 static_assert(is_same<int, decltype(av)>::value == true, "");
5801 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5802 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5803 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5804 return (sumf > 0.0) ? sumi : add(c, v);
5805 }
5806
5807 }
5808
5809 namespace test_noexcept
5810 {
5811
5812 int f() { return 0; }
5813 int g() noexcept { return 0; }
5814
5815 static_assert(noexcept(f()) == false, "");
5816 static_assert(noexcept(g()) == true, "");
5817
5818 }
5819
5820 namespace test_constexpr
5821 {
5822
5823 template < typename CharT >
5824 unsigned long constexpr
5825 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5826 {
5827 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5828 }
5829
5830 template < typename CharT >
5831 unsigned long constexpr
5832 strlen_c(const CharT *const s) noexcept
5833 {
5834 return strlen_c_r(s, 0UL);
5835 }
5836
5837 static_assert(strlen_c("") == 0UL, "");
5838 static_assert(strlen_c("1") == 1UL, "");
5839 static_assert(strlen_c("example") == 7UL, "");
5840 static_assert(strlen_c("another\0example") == 7UL, "");
5841
5842 }
5843
5844 namespace test_rvalue_references
5845 {
5846
5847 template < int N >
5848 struct answer
5849 {
5850 static constexpr int value = N;
5851 };
5852
5853 answer<1> f(int&) { return answer<1>(); }
5854 answer<2> f(const int&) { return answer<2>(); }
5855 answer<3> f(int&&) { return answer<3>(); }
5856
5857 void
5858 test()
5859 {
5860 int i = 0;
5861 const int c = 0;
5862 static_assert(decltype(f(i))::value == 1, "");
5863 static_assert(decltype(f(c))::value == 2, "");
5864 static_assert(decltype(f(0))::value == 3, "");
5865 }
5866
5867 }
5868
5869 namespace test_uniform_initialization
5870 {
5871
5872 struct test
5873 {
5874 static const int zero {};
5875 static const int one {1};
5876 };
5877
5878 static_assert(test::zero == 0, "");
5879 static_assert(test::one == 1, "");
5880
5881 }
5882
5883 namespace test_lambdas
5884 {
5885
5886 void
5887 test1()
5888 {
5889 auto lambda1 = [](){};
5890 auto lambda2 = lambda1;
5891 lambda1();
5892 lambda2();
5893 }
5894
5895 int
5896 test2()
5897 {
5898 auto a = [](int i, int j){ return i + j; }(1, 2);
5899 auto b = []() -> int { return '0'; }();
5900 auto c = [=](){ return a + b; }();
5901 auto d = [&](){ return c; }();
5902 auto e = [a, &b](int x) mutable {
5903 const auto identity = [](int y){ return y; };
5904 for (auto i = 0; i < a; ++i)
5905 a += b--;
5906 return x + identity(a + b);
5907 }(0);
5908 return a + b + c + d + e;
5909 }
5910
5911 int
5912 test3()
5913 {
5914 const auto nullary = [](){ return 0; };
5915 const auto unary = [](int x){ return x; };
5916 using nullary_t = decltype(nullary);
5917 using unary_t = decltype(unary);
5918 const auto higher1st = [](nullary_t f){ return f(); };
5919 const auto higher2nd = [unary](nullary_t f1){
5920 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5921 };
5922 return higher1st(nullary) + higher2nd(nullary)(unary);
5923 }
5924
5925 }
5926
5927 namespace test_variadic_templates
5928 {
5929
5930 template <int...>
5931 struct sum;
5932
5933 template <int N0, int... N1toN>
5934 struct sum<N0, N1toN...>
5935 {
5936 static constexpr auto value = N0 + sum<N1toN...>::value;
5937 };
5938
5939 template <>
5940 struct sum<>
5941 {
5942 static constexpr auto value = 0;
5943 };
5944
5945 static_assert(sum<>::value == 0, "");
5946 static_assert(sum<1>::value == 1, "");
5947 static_assert(sum<23>::value == 23, "");
5948 static_assert(sum<1, 2>::value == 3, "");
5949 static_assert(sum<5, 5, 11>::value == 21, "");
5950 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5951
5952 }
5953
5954 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5955 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5956 // because of this.
5957 namespace test_template_alias_sfinae
5958 {
5959
5960 struct foo {};
5961
5962 template<typename T>
5963 using member = typename T::member_type;
5964
5965 template<typename T>
5966 void func(...) {}
5967
5968 template<typename T>
5969 void func(member<T>*) {}
5970
5971 void test();
5972
5973 void test() { func<foo>(0); }
5974
5975 }
5976
5977} // namespace cxx11
5978
5979#endif // __cplusplus >= 201103L
5980
5981
5982
5983_ACEOF
5984if ac_fn_cxx_try_compile "$LINENO"; then :
5985 eval $cachevar=yes
5986else
5987 eval $cachevar=no
5988fi
5989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 5990 CXX="$ac_save_CXX"
0bcda685
PA
5991fi
5992eval ac_res=\$$cachevar
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5994$as_echo "$ac_res" >&6; }
41260ac2
SM
5995 if eval test x\$$cachevar = xyes; then
5996 CXX_DIALECT="$switch"
5997 ac_success=yes
5998 break
5999 fi
6000 done
6001 if test x$ac_success = xyes; then
0bcda685
PA
6002 break
6003 fi
6004 done
6005 fi
6006 ac_ext=c
6007ac_cpp='$CPP $CPPFLAGS'
6008ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6009ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6010ac_compiler_gnu=$ac_cv_c_compiler_gnu
6011
6012 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6013 if test x$ac_success = xno; then
63a9e923 6014 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6015 fi
6016 fi
6017 if test x$ac_success = xno; then
6018 HAVE_CXX11=0
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6020$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6021 else
6022 HAVE_CXX11=1
6023
6024$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6025
6026 fi
6027
6028
6029
6030
a417dc56
RW
6031# Dependency checking.
6032rm -rf .tst 2>/dev/null
6033mkdir .tst 2>/dev/null
6034if test -d .tst; then
6035 am__leading_dot=.
6036else
6037 am__leading_dot=_
6038fi
6039rmdir .tst 2>/dev/null
6040
6041DEPDIR="${am__leading_dot}deps"
6042
81ecdfbb 6043ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6044
6045
6046depcc="$CC" am_compiler_list=
6047
6048am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6050$as_echo_n "checking dependency style of $depcc... " >&6; }
63a9e923 6051if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6052 $as_echo_n "(cached) " >&6
a417dc56
RW
6053else
6054 if test -f "$am_depcomp"; then
6055 # We make a subdir and do the tests there. Otherwise we can end up
6056 # making bogus files that we don't know about and never remove. For
6057 # instance it was reported that on HP-UX the gcc test will end up
6058 # making a dummy file named `D' -- because `-MD' means `put the output
6059 # in D'.
6060 mkdir conftest.dir
6061 # Copy depcomp to subdir because otherwise we won't find it if we're
6062 # using a relative directory.
6063 cp "$am_depcomp" conftest.dir
6064 cd conftest.dir
6065 # We will build objects and dependencies in a subdirectory because
6066 # it helps to detect inapplicable dependency modes. For instance
6067 # both Tru64's cc and ICC support -MD to output dependencies as a
6068 # side effect of compilation, but ICC will put the dependencies in
6069 # the current directory while Tru64 will put them in the object
6070 # directory.
6071 mkdir sub
6072
6073 am_cv_CC_dependencies_compiler_type=none
6074 if test "$am_compiler_list" = ""; then
6075 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6076 fi
6077 for depmode in $am_compiler_list; do
6078 if test $depmode = none; then break; fi
6079
81ecdfbb 6080 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6081 # Setup a source with many dependencies, because some compilers
6082 # like to wrap large dependency lists on column 80 (with \), and
6083 # we should not choose a depcomp mode which is confused by this.
6084 #
6085 # We need to recreate these files for each test, as the compiler may
6086 # overwrite some of them when testing with obscure command lines.
6087 # This happens at least with the AIX C compiler.
6088 : > sub/conftest.c
6089 for i in 1 2 3 4 5 6; do
6090 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6091 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6092 # Solaris 8's {/usr,}/bin/sh.
6093 touch sub/conftst$i.h
6094 done
6095 echo "include sub/conftest.Po" > confmf
6096
6097 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6098 # mode. It turns out that the SunPro C++ compiler does not properly
6099 # handle `-M -o', and we need to detect this.
6100 depcmd="depmode=$depmode \
6101 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6102 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6103 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6104 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6105 if env $depcmd > conftest.err 2>&1 &&
6106 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6107 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6108 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6109 # icc doesn't choke on unknown options, it will just issue warnings
6110 # or remarks (even with -Werror). So we grep stderr for any message
6111 # that says an option was ignored or not supported.
6112 # When given -MP, icc 7.0 and 7.1 complain thusly:
6113 # icc: Command line warning: ignoring option '-M'; no argument required
6114 # The diagnosis changed in icc 8.0:
6115 # icc: Command line remark: option '-MP' not supported
6116 if (grep 'ignoring option' conftest.err ||
6117 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6118 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6119 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6120 break
6121 fi
6122 fi
81ecdfbb 6123 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6124 sed -e 's/^/| /' < conftest.err >&5
6125 done
6126
6127 cd ..
6128 rm -rf conftest.dir
6129else
6130 am_cv_CC_dependencies_compiler_type=none
6131fi
6132
6133fi
81ecdfbb
RW
6134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6135$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6136if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
63a9e923 6137then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6138else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6139
6140fi
6141
6142
648d586d
JB
6143gnulib_extra_configure_args=
6144# If large-file support is disabled, make sure gnulib does the same.
6145if test "$enable_largefile" = no; then
6146gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6147fi
6148
c971b7fa
PA
6149# Configure gnulib. We need to build gnulib under some other
6150# directory not "gnulib", to avoid the problem of both GDB and
6151# GDBserver wanting to build it in the same directory, when building
6152# in the source dir.
783e057b 6153
c971b7fa
PA
6154 in_src="gnulib"
6155 in_build="build-gnulib"
648d586d 6156 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6157
6158 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6159 # so they do not pile up.
6160 ac_sub_configure_args=
6161 ac_prev=
6162 eval "set x $ac_configure_args"
6163 shift
6164 for ac_arg
6165 do
6166 if test -n "$ac_prev"; then
6167 ac_prev=
6168 continue
6169 fi
6170 case $ac_arg in
6171 -cache-file | --cache-file | --cache-fil | --cache-fi \
6172 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6173 ac_prev=cache_file ;;
6174 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6175 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6176 | --c=*)
6177 ;;
6178 --config-cache | -C)
6179 ;;
6180 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6181 ac_prev=srcdir ;;
6182 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6183 ;;
6184 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6185 ac_prev=prefix ;;
6186 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6187 ;;
6188 --disable-option-checking)
6189 ;;
6190 *)
6191 case $ac_arg in
6192 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6193 esac
6194 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6195 esac
6196 done
6197
6198 # Always prepend --prefix to ensure using the same prefix
6199 # in subdir configurations.
6200 ac_arg="--prefix=$prefix"
6201 case $ac_arg in
6202 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6203 esac
6204 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6205
6206 # Pass --silent
6207 if test "$silent" = yes; then
6208 ac_sub_configure_args="--silent $ac_sub_configure_args"
6209 fi
6210
6211 # Always prepend --disable-option-checking to silence warnings, since
6212 # different subdirs can have different --enable and --with options.
6213 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6214
6215 ac_popdir=`pwd`
6216 ac_dir=$in_build
6217
6218 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6219 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6220 $as_echo "$ac_msg" >&6
6221 as_dir="$ac_dir"; as_fn_mkdir_p
6222
38ea300a
PA
6223 case $srcdir in
6224 [\\/]* | ?:[\\/]* )
6225 ac_srcdir=$srcdir/$in_src ;;
6226 *) # Relative name.
6227 ac_srcdir=../$srcdir/$in_src ;;
6228 esac
c971b7fa
PA
6229
6230 cd "$ac_dir"
6231
6232 ac_sub_configure=$ac_srcdir/configure
6233
6234 # Make the cache file name correct relative to the subdirectory.
6235 case $cache_file in
6236 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6237 *) # Relative name.
6238 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6239 esac
6240
648d586d
JB
6241 if test -n "$in_extra_args"; then
6242 # Add the extra args at the end.
6243 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6244 fi
6245
c971b7fa
PA
6246 { $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
6247$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6248 # The eval makes quoting arguments work.
6249 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6250 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
63a9e923 6251 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c971b7fa
PA
6252
6253 cd "$ac_popdir"
783e057b 6254
c971b7fa
PA
6255
6256
6257CONFIG_OBS=
6258CONFIG_DEPS=
6259CONFIG_SRCS=
6260ENABLE_CFLAGS=
6261
6262CONFIG_ALL=
6263CONFIG_CLEAN=
6264CONFIG_INSTALL=
6265CONFIG_UNINSTALL=
6266
6267# If we haven't got the data from the intl directory,
6268# assume NLS is disabled.
6269USE_NLS=no
6270LIBINTL=
6271LIBINTL_DEP=
6272INCINTL=
6273XGETTEXT=
6274GMSGFMT=
6275POSUB=
783e057b
DJ
6276
6277if test -f ../intl/config.intl; then
6278 . ../intl/config.intl
6279fi
81ecdfbb
RW
6280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6281$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6282if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6284$as_echo "no" >&6; }
783e057b 6285else
81ecdfbb
RW
6286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6287$as_echo "yes" >&6; }
783e057b 6288
81ecdfbb 6289$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6290
6291
81ecdfbb
RW
6292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6293$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6294 # Look for .po and .gmo files in the source directory.
6295 CATALOGS=
6296 XLINGUAS=
6297 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6298 # If there aren't any .gmo files the shell will give us the
6299 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6300 # weeded out.
6301 case "$cat" in *\**)
6302 continue;;
6303 esac
6304 # The quadruple backslash is collapsed to a double backslash
6305 # by the backticks, then collapsed again by the double quotes,
6306 # leaving us with one backslash in the sed expression (right
6307 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6308 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6309 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6310 # The user is allowed to set LINGUAS to a list of languages to
6311 # install catalogs for. If it's empty that means "all of them."
6312 if test "x$LINGUAS" = x; then
6313 CATALOGS="$CATALOGS $cat"
6314 XLINGUAS="$XLINGUAS $lang"
6315 else
6316 case "$LINGUAS" in *$lang*)
6317 CATALOGS="$CATALOGS $cat"
6318 XLINGUAS="$XLINGUAS $lang"
6319 ;;
6320 esac
e28b3332
DJ
6321 fi
6322 done
c971b7fa
PA
6323 LINGUAS="$XLINGUAS"
6324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6325$as_echo "$LINGUAS" >&6; }
6326
6327
6328 DATADIRNAME=share
6329
6330 INSTOBJEXT=.mo
6331
6332 GENCAT=gencat
6333
6334 CATOBJEXT=.gmo
e28b3332 6335
e28b3332
DJ
6336fi
6337
c971b7fa
PA
6338localedir='${datadir}/locale'
6339
6340
6341if test x"$USE_NLS" = xyes; then
6342 CONFIG_ALL="$CONFIG_ALL all-po"
6343 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6344 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6345 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6346fi
e28b3332 6347
c971b7fa
PA
6348GNULIB=build-gnulib/import
6349
6350# For Makefile dependencies.
6351GNULIB_STDINT_H=
6352if test x"$STDINT_H" != x; then
6353 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
6354fi
6355
6356
c971b7fa
PA
6357PACKAGE=gdb
6358
6359cat >>confdefs.h <<_ACEOF
6360#define PACKAGE "$PACKAGE"
6361_ACEOF
6362
6363
6364
6365# We never need to detect it in this sub-configure.
6366# But preserve it for config.status --recheck.
6367
6368
6369
6370MAKEINFO_EXTRA_FLAGS=""
6371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6372$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
63a9e923 6373if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6374 $as_echo_n "(cached) " >&6
6375else
6376 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6377 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6378 gdb_cv_have_makeinfo_click=yes
6379 else
6380 gdb_cv_have_makeinfo_click=no
6381 fi
6382fi
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6384$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6385if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6386 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6387fi
e28b3332
DJ
6388
6389
bec39cab
AC
6390
6391
81ecdfbb
RW
6392# Check whether --with-separate-debug-dir was given.
6393if test "${with_separate_debug_dir+set}" = set; then :
6394 withval=$with_separate_debug_dir;
b14b1491
TT
6395 DEBUGDIR=$withval
6396else
6397 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6398fi
6399
20e95c23 6400
783e057b
DJ
6401 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6402 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6403 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6404 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6405
783e057b
DJ
6406cat >>confdefs.h <<_ACEOF
6407#define DEBUGDIR "$ac_define_dir"
20e95c23 6408_ACEOF
20e95c23 6409
20e95c23 6410
20e95c23 6411
0c4a4063 6412
b14b1491
TT
6413 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6414 if test "x$prefix" = xNONE; then
6415 test_prefix=/usr/local
6416 else
6417 test_prefix=$prefix
6418 fi
783e057b 6419 else
b14b1491 6420 test_prefix=$exec_prefix
783e057b 6421 fi
b14b1491
TT
6422 value=0
6423 case ${ac_define_dir} in
6424 "${test_prefix}"|"${test_prefix}/"*|\
6425 '${exec_prefix}'|'${exec_prefix}/'*)
6426 value=1
6427 ;;
6428 esac
6429
6430cat >>confdefs.h <<_ACEOF
6431#define DEBUGDIR_RELOCATABLE $value
6432_ACEOF
6433
6434
6435
0c4a4063 6436
f83d8a90
DE
6437# We can't pass paths as command line arguments.
6438# Mingw32 tries to be clever and will convert the paths for us.
6439# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6440# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6441# This breaks GDB's relocatable path conversions since paths passed in
6442# config.h would not get so translated, the path prefixes no longer match.
6443
6444 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6445 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6446 ac_define_dir=`eval echo $bindir`
6447 ac_define_dir=`eval echo $ac_define_dir`
6448
6449cat >>confdefs.h <<_ACEOF
6450#define BINDIR "$ac_define_dir"
6451_ACEOF
6452
6453
6454
b14b1491
TT
6455# GDB's datadir relocation
6456
6457
6458
81ecdfbb
RW
6459# Check whether --with-gdb-datadir was given.
6460if test "${with_gdb_datadir+set}" = set; then :
6461 withval=$with_gdb_datadir;
b14b1491 6462 GDB_DATADIR=$withval
20e95c23 6463else
b14b1491 6464 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6465fi
6466
20e95c23 6467
b14b1491
TT
6468 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6469 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6470 ac_define_dir=`eval echo $GDB_DATADIR`
6471 ac_define_dir=`eval echo $ac_define_dir`
6472
6473cat >>confdefs.h <<_ACEOF
6474#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6475_ACEOF
6476
b14b1491
TT
6477
6478
0c4a4063 6479
b14b1491
TT
6480 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6481 if test "x$prefix" = xNONE; then
6482 test_prefix=/usr/local
6483 else
6484 test_prefix=$prefix
6485 fi
6486 else
6487 test_prefix=$exec_prefix
6488 fi
6489 value=0
6490 case ${ac_define_dir} in
6491 "${test_prefix}"|"${test_prefix}/"*|\
6492 '${exec_prefix}'|'${exec_prefix}/'*)
6493 value=1
6494 ;;
6495 esac
6496
6497cat >>confdefs.h <<_ACEOF
6498#define GDB_DATADIR_RELOCATABLE $value
6499_ACEOF
6500
6501
783e057b 6502
20e95c23 6503
0c4a4063 6504
81ecdfbb
RW
6505# Check whether --with-relocated-sources was given.
6506if test "${with_relocated_sources+set}" = set; then :
6507 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6508
6509 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6510 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6511 ac_define_dir=`eval echo $reloc_srcdir`
6512 ac_define_dir=`eval echo $ac_define_dir`
6513
6514cat >>confdefs.h <<_ACEOF
6515#define RELOC_SRCDIR "$ac_define_dir"
6516_ACEOF
6517
6518
6519
81ecdfbb
RW
6520fi
6521
29b0e8a2 6522
7349ff92
JK
6523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6524$as_echo_n "checking for default auto-load directory... " >&6; }
6525
6526# Check whether --with-auto-load-dir was given.
6527if test "${with_auto_load_dir+set}" = set; then :
6528 withval=$with_auto_load_dir;
6529else
1564a261 6530 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6531fi
6532
1564a261 6533escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6534
6535 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6536 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6537 ac_define_dir=`eval echo $escape_dir`
6538 ac_define_dir=`eval echo $ac_define_dir`
6539
6540cat >>confdefs.h <<_ACEOF
6541#define AUTO_LOAD_DIR "$ac_define_dir"
6542_ACEOF
6543
6544
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6546$as_echo "$with_auto_load_dir" >&6; }
6547
bccbefd2
JK
6548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6549$as_echo_n "checking for default auto-load safe-path... " >&6; }
6550
6551# Check whether --with-auto-load-safe-path was given.
6552if test "${with_auto_load_safe_path+set}" = set; then :
6553 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6554 with_auto_load_safe_path="/"
6555 fi
bccbefd2 6556else
7349ff92 6557 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6558fi
6559
1564a261 6560escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6561
6562 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6563 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6564 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6565 ac_define_dir=`eval echo $ac_define_dir`
6566
6567cat >>confdefs.h <<_ACEOF
6dea1fbd 6568#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6569_ACEOF
6570
6571
6572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6573$as_echo "$with_auto_load_safe_path" >&6; }
6574
29b0e8a2 6575
20e95c23 6576
5ae98d25 6577subdirs="$subdirs testsuite"
20e95c23
DJ
6578
6579
783e057b 6580# Check whether to support alternative target configurations
81ecdfbb
RW
6581# Check whether --enable-targets was given.
6582if test "${enable_targets+set}" = set; then :
6583 enableval=$enable_targets; case "${enableval}" in
63a9e923 6584 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6585 ;;
6586 no) enable_targets= ;;
6587 *) enable_targets=$enableval ;;
6588esac
81ecdfbb
RW
6589fi
6590
20e95c23 6591
783e057b 6592# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6593# Check whether --enable-64-bit-bfd was given.
6594if test "${enable_64_bit_bfd+set}" = set; then :
6595 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6596 yes) want64=true ;;
6597 no) want64=false ;;
63a9e923 6598 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6599esac
6600else
6601 want64=false
81ecdfbb
RW
6602fi
6603
783e057b
DJ
6604# Provide defaults for some variables set by the per-host and per-target
6605# configuration.
6606gdb_host_obs=posix-hdep.o
20e95c23 6607
783e057b
DJ
6608if test "${target}" = "${host}"; then
6609 gdb_native=yes
6610else
6611 gdb_native=no
6612fi
20e95c23 6613
783e057b 6614. $srcdir/configure.host
20e95c23 6615
fb23d554
SDJ
6616# Add in the common host objects.
6617. $srcdir/common/common.host
6618gdb_host_obs="$gdb_host_obs $common_host_obs"
6619
783e057b 6620# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6621
783e057b
DJ
6622TARGET_OBS=
6623all_targets=
b292c783 6624HAVE_NATIVE_GCORE_TARGET=
20e95c23 6625
783e057b 6626for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6627do
783e057b
DJ
6628 if test "$targ_alias" = "all"; then
6629 all_targets=true
6630 else
6631 # Canonicalize the secondary target names.
6632 result=`$ac_config_sub $targ_alias 2>/dev/null`
6633 if test -n "$result"; then
6634 targ=$result
6635 else
6636 targ=$targ_alias
6637 fi
20e95c23 6638
783e057b 6639 . ${srcdir}/configure.tgt
20e95c23 6640
bf307134 6641 if test -z "${gdb_target_obs}"; then :
63a9e923 6642 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6643fi
6644
783e057b
DJ
6645 # Target-specific object files
6646 for i in ${gdb_target_obs}; do
6647 case " $TARGET_OBS " in
6648 *" ${i} "*) ;;
6649 *)
6650 TARGET_OBS="$TARGET_OBS ${i}"
6651 ;;
6652 esac
6653 done
20e95c23 6654
783e057b
DJ
6655 # Check whether this target needs 64-bit CORE_ADDR
6656 if test x${want64} = xfalse; then
6657 . ${srcdir}/../bfd/config.bfd
6658 fi
b292c783
JK
6659
6660 # Check whether this target is native and supports gcore.
6661 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6662 && $gdb_have_gcore; then
6663 HAVE_NATIVE_GCORE_TARGET=1
6664 fi
783e057b 6665 fi
20e95c23
DJ
6666done
6667
783e057b
DJ
6668if test x${all_targets} = xtrue; then
6669
6670 # We want all 64-bit targets if we either:
6671 # - run on a 64-bit host or
6672 # - already require 64-bit support for some other target or
6673 # - the --enable-64-bit-bfd option was supplied
6674 # Otherwise we only support all 32-bit targets.
6675 #
6676 # NOTE: This test must be in sync with the corresponding
6677 # tests in BFD!
20e95c23 6678
783e057b 6679 if test x${want64} = xfalse; then
81ecdfbb
RW
6680 # The cast to long int works around a bug in the HP C Compiler
6681# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6682# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6683# This bug is HP SR number 8606223364.
6684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6685$as_echo_n "checking size of long... " >&6; }
63a9e923 6686if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6687 $as_echo_n "(cached) " >&6
c0993dbe 6688else
81ecdfbb 6689 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6690
81ecdfbb
RW
6691else
6692 if test "$ac_cv_type_long" = yes; then
6693 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
6695as_fn_error 77 "cannot compute sizeof (long)
6696See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6697 else
6698 ac_cv_sizeof_long=0
6699 fi
c0993dbe 6700fi
81ecdfbb 6701
c0993dbe 6702fi
81ecdfbb
RW
6703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6704$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6705
c0993dbe 6706
c0993dbe 6707
c0993dbe
UW
6708cat >>confdefs.h <<_ACEOF
6709#define SIZEOF_LONG $ac_cv_sizeof_long
6710_ACEOF
6711
6712
6713 if test "x${ac_cv_sizeof_long}" = "x8"; then
6714 want64=true
6715 fi
6716 fi
6717 if test x${want64} = xtrue; then
6718 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6719 else
6720 TARGET_OBS='$(ALL_TARGET_OBS)'
6721 fi
6722fi
6723
6724
6725
b292c783 6726
c0993dbe
UW
6727# For other settings, only the main target counts.
6728gdb_sim=
6729gdb_osabi=
6730build_gdbserver=
6731targ=$target; . ${srcdir}/configure.tgt
6732
6733# Fetch the default architecture and default target vector from BFD.
6734targ=$target; . $srcdir/../bfd/config.bfd
6735
6736# We only want the first architecture, so strip off the others if
6737# there is more than one.
6738targ_archs=`echo $targ_archs | sed 's/ .*//'`
6739
6740if test "x$targ_archs" != x; then
6741
6742cat >>confdefs.h <<_ACEOF
6743#define DEFAULT_BFD_ARCH $targ_archs
6744_ACEOF
6745
6746fi
6747if test "x$targ_defvec" != x; then
6748
6749cat >>confdefs.h <<_ACEOF
6750#define DEFAULT_BFD_VEC $targ_defvec
6751_ACEOF
6752
6753fi
6754
c0993dbe
UW
6755# The CLI cannot be disabled yet, but may be in the future.
6756
6757# Enable CLI.
81ecdfbb
RW
6758# Check whether --enable-gdbcli was given.
6759if test "${enable_gdbcli+set}" = set; then :
6760 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
6761 yes)
6762 ;;
6763 no)
63a9e923 6764 as_fn_error $? "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 6765 *)
63a9e923 6766 as_fn_error $? "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
6767 esac
6768else
6769 enable_gdbcli=yes
81ecdfbb
RW
6770fi
6771
c0993dbe
UW
6772if test x"$enable_gdbcli" = xyes; then
6773 if test -d $srcdir/cli; then
6774 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
6775 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
6776 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
6777 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
6778 fi
6779fi
6780
6781# Enable MI.
81ecdfbb
RW
6782# Check whether --enable-gdbmi was given.
6783if test "${enable_gdbmi+set}" = set; then :
6784 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6785 yes | no)
6786 ;;
6787 *)
63a9e923 6788 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6789 esac
6790else
6791 enable_gdbmi=yes
81ecdfbb
RW
6792fi
6793
c0993dbe
UW
6794if test x"$enable_gdbmi" = xyes; then
6795 if test -d $srcdir/mi; then
6796 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6797 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6798 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6799 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6800 fi
6801fi
6802
6803# Enable TUI.
81ecdfbb
RW
6804# Check whether --enable-tui was given.
6805if test "${enable_tui+set}" = set; then :
6806 enableval=$enable_tui; case $enableval in
3ca64bd3 6807 yes | no | auto)
c0993dbe
UW
6808 ;;
6809 *)
63a9e923 6810 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6811 esac
6812else
3ca64bd3 6813 enable_tui=auto
81ecdfbb
RW
6814fi
6815
c0993dbe
UW
6816
6817# Enable gdbtk.
81ecdfbb
RW
6818# Check whether --enable-gdbtk was given.
6819if test "${enable_gdbtk+set}" = set; then :
6820 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6821 yes | no)
6822 ;;
6823 *)
63a9e923 6824 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6825 esac
6826else
5062cc19 6827 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6828 enable_gdbtk=yes
6829 else
6830 enable_gdbtk=no
6831 fi
81ecdfbb
RW
6832fi
6833
c0993dbe
UW
6834# We unconditionally disable gdbtk tests on selected platforms.
6835case $host_os in
6836 go32* | windows*)
81ecdfbb
RW
6837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6838$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6839 enable_gdbtk=no ;;
6840esac
6841
05e7c244 6842# Libunwind support for ia64.
bec39cab 6843
05e7c244
JK
6844
6845# Check whether --with-libunwind-ia64 was given.
6846if test "${with_libunwind_ia64+set}" = set; then :
6847 withval=$with_libunwind_ia64;
bec39cab 6848else
05e7c244
JK
6849 with_libunwind_ia64=auto
6850fi
bec39cab 6851
05e7c244
JK
6852
6853# Backward compatibility option.
6854if test "${with_libunwind+set}" = set; then
6855 if test x"$with_libunwind_ia64" != xauto; then
63a9e923 6856 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6857 fi
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6859$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6860 with_libunwind_ia64="$with_libunwind"
6861fi
6862
6863case "$with_libunwind_ia64" in
6864 yes | no)
6865 ;;
6866 auto)
6867 for ac_header in libunwind-ia64.h
81ecdfbb 6868do :
b54a8fd7 6869 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
63a9e923 6870if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6871 cat >>confdefs.h <<_ACEOF
b54a8fd7 6872#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6873_ACEOF
6874
6875fi
6876
6877done
6878
05e7c244
JK
6879 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6880 ;;
6881 *)
63a9e923 6882 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6883 ;;
6884esac
bec39cab 6885
05e7c244 6886if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6887 for ac_header in libunwind-ia64.h
81ecdfbb 6888do :
b54a8fd7 6889 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
63a9e923 6890if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6891 cat >>confdefs.h <<_ACEOF
b54a8fd7 6892#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6893_ACEOF
6894
6895fi
6896
6897done
6898
05e7c244 6899 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
63a9e923 6900 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6901 fi
6902 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6903 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6904 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6905fi
6906
cb01cfba
JB
6907opt_curses=no
6908
81ecdfbb
RW
6909# Check whether --with-curses was given.
6910if test "${with_curses+set}" = set; then :
6911 withval=$with_curses; opt_curses=$withval
6912fi
6913
cb01cfba 6914
76a39ba7 6915prefer_curses=no
cb01cfba 6916if test "$opt_curses" = "yes"; then
76a39ba7 6917 prefer_curses=yes
cb01cfba
JB
6918fi
6919
a9322a30 6920# Profiling support.
81ecdfbb
RW
6921# Check whether --enable-profiling was given.
6922if test "${enable_profiling+set}" = set; then :
6923 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6924 yes | no)
6925 ;;
6926 *)
63a9e923 6927 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6928 esac
6929else
6930 enable_profiling=no
81ecdfbb 6931fi
bec39cab 6932
a9322a30
TT
6933
6934for ac_func in monstartup _mcleanup
81ecdfbb
RW
6935do :
6936 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6937ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
63a9e923 6938if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6939 cat >>confdefs.h <<_ACEOF
6940#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6941_ACEOF
a9322a30 6942
81ecdfbb
RW
6943fi
6944done
a9322a30 6945
81ecdfbb
RW
6946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6947$as_echo_n "checking for _etext... " >&6; }
63a9e923 6948if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6949 $as_echo_n "(cached) " >&6
6950else
6951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6952/* end confdefs.h. */
6953#include <stdlib.h>
6954extern char _etext;
a9322a30
TT
6955
6956int
6957main ()
6958{
6959free (&_etext);
6960 ;
6961 return 0;
6962}
bec39cab 6963_ACEOF
81ecdfbb 6964if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6965 ac_cv_var__etext=yes
bec39cab 6966else
81ecdfbb 6967 ac_cv_var__etext=no
bec39cab 6968fi
81ecdfbb
RW
6969rm -f core conftest.err conftest.$ac_objext \
6970 conftest$ac_exeext conftest.$ac_ext
bec39cab 6971fi
81ecdfbb
RW
6972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6973$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6974if test $ac_cv_var__etext = yes; then
60ca704f 6975
81ecdfbb 6976$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6977
bec39cab 6978fi
81ecdfbb
RW
6979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6980$as_echo_n "checking for etext... " >&6; }
63a9e923 6981if ${ac_cv_var_etext+:} false; then :
81ecdfbb 6982 $as_echo_n "(cached) " >&6
bec39cab 6983else
81ecdfbb 6984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6985/* end confdefs.h. */
a9322a30
TT
6986#include <stdlib.h>
6987extern char etext;
bec39cab
AC
6988
6989int
6990main ()
6991{
a9322a30 6992free (&etext);
bec39cab
AC
6993 ;
6994 return 0;
6995}
6996_ACEOF
81ecdfbb 6997if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6998 ac_cv_var_etext=yes
bec39cab 6999else
81ecdfbb 7000 ac_cv_var_etext=no
bec39cab 7001fi
81ecdfbb
RW
7002rm -f core conftest.err conftest.$ac_objext \
7003 conftest$ac_exeext conftest.$ac_ext
bec39cab 7004fi
81ecdfbb
RW
7005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7006$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
7007if test $ac_cv_var_etext = yes; then
7008
81ecdfbb 7009$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7010
7011fi
a9322a30
TT
7012if test "$enable_profiling" = yes ; then
7013 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
63a9e923 7014 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7015 fi
7016 PROFILE_CFLAGS=-pg
7017 OLD_CFLAGS="$CFLAGS"
7018 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7019
81ecdfbb
RW
7020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7021$as_echo_n "checking whether $CC supports -pg... " >&6; }
63a9e923 7022if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7023 $as_echo_n "(cached) " >&6
bec39cab 7024else
81ecdfbb 7025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7026/* end confdefs.h. */
bec39cab
AC
7027
7028int
7029main ()
7030{
a9322a30 7031int x;
bec39cab
AC
7032 ;
7033 return 0;
7034}
7035_ACEOF
81ecdfbb 7036if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7037 ac_cv_cc_supports_pg=yes
bec39cab 7038else
81ecdfbb 7039 ac_cv_cc_supports_pg=no
bec39cab 7040fi
81ecdfbb 7041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7042fi
81ecdfbb
RW
7043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7044$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7045
a9322a30 7046 if test $ac_cv_cc_supports_pg = no; then
63a9e923 7047 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7048 fi
bec39cab 7049
a9322a30 7050 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7051fi
7052
c16158bc
JM
7053
7054
81ecdfbb
RW
7055# Check whether --with-pkgversion was given.
7056if test "${with_pkgversion+set}" = set; then :
7057 withval=$with_pkgversion; case "$withval" in
63a9e923 7058 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7059 no) PKGVERSION= ;;
7060 *) PKGVERSION="($withval) " ;;
7061 esac
7062else
7063 PKGVERSION="(GDB) "
7064
81ecdfbb 7065fi
c16158bc
JM
7066
7067
7068
7069
81ecdfbb
RW
7070
7071# Check whether --with-bugurl was given.
7072if test "${with_bugurl+set}" = set; then :
7073 withval=$with_bugurl; case "$withval" in
63a9e923 7074 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7075 no) BUGURL=
7076 ;;
7077 *) BUGURL="$withval"
7078 ;;
7079 esac
7080else
7081 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7082
81ecdfbb
RW
7083fi
7084
c16158bc
JM
7085 case ${BUGURL} in
7086 "")
7087 REPORT_BUGS_TO=
7088 REPORT_BUGS_TEXI=
7089 ;;
7090 *)
7091 REPORT_BUGS_TO="<$BUGURL>"
7092 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7093 ;;
7094 esac;
7095
7096
7097
7098
7099cat >>confdefs.h <<_ACEOF
7100#define PKGVERSION "$PKGVERSION"
7101_ACEOF
7102
7103
7104cat >>confdefs.h <<_ACEOF
7105#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7106_ACEOF
7107
7108
bec39cab
AC
7109# --------------------- #
7110# Checks for programs. #
7111# --------------------- #
7112
7113for ac_prog in gawk mawk nawk awk
7114do
7115 # Extract the first word of "$ac_prog", so it can be a program name with args.
7116set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7118$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 7119if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7120 $as_echo_n "(cached) " >&6
bec39cab
AC
7121else
7122 if test -n "$AWK"; then
7123 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7124else
7125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7126for as_dir in $PATH
7127do
7128 IFS=$as_save_IFS
7129 test -z "$as_dir" && as_dir=.
81ecdfbb 7130 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 7131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7132 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7134 break 2
7135 fi
7136done
81ecdfbb
RW
7137 done
7138IFS=$as_save_IFS
bec39cab
AC
7139
7140fi
7141fi
7142AWK=$ac_cv_prog_AWK
7143if test -n "$AWK"; then
81ecdfbb
RW
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7145$as_echo "$AWK" >&6; }
bec39cab 7146else
81ecdfbb
RW
7147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7148$as_echo "no" >&6; }
bec39cab
AC
7149fi
7150
bec39cab 7151
81ecdfbb 7152 test -n "$AWK" && break
bec39cab
AC
7153done
7154
c971b7fa
PA
7155# Find a good install program. We prefer a C program (faster),
7156# so one script is as good as another. But avoid the broken or
7157# incompatible versions:
7158# SysV /etc/install, /usr/sbin/install
7159# SunOS /usr/etc/install
7160# IRIX /sbin/install
7161# AIX /bin/install
7162# AmigaOS /C/install, which installs bootblocks on floppy discs
7163# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7164# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7165# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7166# OS/2's system install, which has a completely different semantic
7167# ./install, which can be erroneously created by make from ./install.sh.
7168# Reject install programs that cannot install multiple files.
7169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7170$as_echo_n "checking for a BSD-compatible install... " >&6; }
7171if test -z "$INSTALL"; then
63a9e923 7172if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7173 $as_echo_n "(cached) " >&6
7174else
7175 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7176for as_dir in $PATH
7177do
7178 IFS=$as_save_IFS
7179 test -z "$as_dir" && as_dir=.
7180 # Account for people who put trailing slashes in PATH elements.
7181case $as_dir/ in #((
7182 ./ | .// | /[cC]/* | \
7183 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7184 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7185 /usr/ucb/* ) ;;
7186 *)
7187 # OSF1 and SCO ODT 3.0 have their own names for install.
7188 # Don't use installbsd from OSF since it installs stuff as root
7189 # by default.
7190 for ac_prog in ginstall scoinst install; do
7191 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 7192 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7193 if test $ac_prog = install &&
7194 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7195 # AIX install. It has an incompatible calling convention.
7196 :
7197 elif test $ac_prog = install &&
7198 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7199 # program-specific install script used by HP pwplus--don't use.
7200 :
7201 else
7202 rm -rf conftest.one conftest.two conftest.dir
7203 echo one > conftest.one
7204 echo two > conftest.two
7205 mkdir conftest.dir
7206 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7207 test -s conftest.one && test -s conftest.two &&
7208 test -s conftest.dir/conftest.one &&
7209 test -s conftest.dir/conftest.two
7210 then
7211 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7212 break 3
7213 fi
7214 fi
7215 fi
7216 done
7217 done
7218 ;;
7219esac
7220
7221 done
7222IFS=$as_save_IFS
7223
7224rm -rf conftest.one conftest.two conftest.dir
7225
7226fi
7227 if test "${ac_cv_path_install+set}" = set; then
7228 INSTALL=$ac_cv_path_install
7229 else
7230 # As a last resort, use the slow shell script. Don't cache a
7231 # value for INSTALL within a source directory, because that will
7232 # break other packages using the cache if that directory is
7233 # removed, or if the value is a relative name.
7234 INSTALL=$ac_install_sh
7235 fi
7236fi
7237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7238$as_echo "$INSTALL" >&6; }
7239
7240# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7241# It thinks the first close brace ends the variable substitution.
7242test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7243
7244test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7245
7246test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7247
81ecdfbb
RW
7248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7249$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7250LN_S=$as_ln_s
7251if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7253$as_echo "yes" >&6; }
bec39cab 7254else
81ecdfbb
RW
7255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7256$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7257fi
7258
7259if test -n "$ac_tool_prefix"; then
7260 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7261set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7263$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 7264if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7265 $as_echo_n "(cached) " >&6
bec39cab
AC
7266else
7267 if test -n "$RANLIB"; then
7268 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7269else
7270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7271for as_dir in $PATH
7272do
7273 IFS=$as_save_IFS
7274 test -z "$as_dir" && as_dir=.
81ecdfbb 7275 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 7276 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7277 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7278 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7279 break 2
7280 fi
7281done
81ecdfbb
RW
7282 done
7283IFS=$as_save_IFS
bec39cab
AC
7284
7285fi
7286fi
7287RANLIB=$ac_cv_prog_RANLIB
7288if test -n "$RANLIB"; then
81ecdfbb
RW
7289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7290$as_echo "$RANLIB" >&6; }
bec39cab 7291else
81ecdfbb
RW
7292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7293$as_echo "no" >&6; }
bec39cab
AC
7294fi
7295
81ecdfbb 7296
bec39cab
AC
7297fi
7298if test -z "$ac_cv_prog_RANLIB"; then
7299 ac_ct_RANLIB=$RANLIB
7300 # Extract the first word of "ranlib", so it can be a program name with args.
7301set dummy ranlib; ac_word=$2
81ecdfbb
RW
7302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7303$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 7304if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7305 $as_echo_n "(cached) " >&6
bec39cab
AC
7306else
7307 if test -n "$ac_ct_RANLIB"; then
7308 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7309else
7310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7311for as_dir in $PATH
7312do
7313 IFS=$as_save_IFS
7314 test -z "$as_dir" && as_dir=.
81ecdfbb 7315 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 7316 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7317 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7318 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7319 break 2
7320 fi
7321done
81ecdfbb
RW
7322 done
7323IFS=$as_save_IFS
bec39cab 7324
bec39cab
AC
7325fi
7326fi
7327ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7328if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7330$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7331else
81ecdfbb
RW
7332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7333$as_echo "no" >&6; }
bec39cab
AC
7334fi
7335
81ecdfbb
RW
7336 if test "x$ac_ct_RANLIB" = x; then
7337 RANLIB=":"
7338 else
7339 case $cross_compiling:$ac_tool_warned in
7340yes:)
7341{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7342$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7343ac_tool_warned=yes ;;
7344esac
7345 RANLIB=$ac_ct_RANLIB
7346 fi
bec39cab
AC
7347else
7348 RANLIB="$ac_cv_prog_RANLIB"
7349fi
7350
7351for ac_prog in 'bison -y' byacc
7352do
7353 # Extract the first word of "$ac_prog", so it can be a program name with args.
7354set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7356$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 7357if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7358 $as_echo_n "(cached) " >&6
bec39cab
AC
7359else
7360 if test -n "$YACC"; then
7361 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7362else
7363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7364for as_dir in $PATH
7365do
7366 IFS=$as_save_IFS
7367 test -z "$as_dir" && as_dir=.
81ecdfbb 7368 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 7369 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7370 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7371 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7372 break 2
7373 fi
7374done
81ecdfbb
RW
7375 done
7376IFS=$as_save_IFS
bec39cab
AC
7377
7378fi
7379fi
7380YACC=$ac_cv_prog_YACC
7381if test -n "$YACC"; then
81ecdfbb
RW
7382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7383$as_echo "$YACC" >&6; }
bec39cab 7384else
81ecdfbb
RW
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7386$as_echo "no" >&6; }
bec39cab
AC
7387fi
7388
81ecdfbb 7389
bec39cab
AC
7390 test -n "$YACC" && break
7391done
7392test -n "$YACC" || YACC="yacc"
7393
7394
7395if test -n "$ac_tool_prefix"; then
7396 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7397set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7399$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 7400if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7401 $as_echo_n "(cached) " >&6
bec39cab
AC
7402else
7403 if test -n "$AR"; then
7404 ac_cv_prog_AR="$AR" # Let the user override the test.
7405else
7406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7407for as_dir in $PATH
7408do
7409 IFS=$as_save_IFS
7410 test -z "$as_dir" && as_dir=.
81ecdfbb 7411 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 7412 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7413 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7415 break 2
7416 fi
7417done
81ecdfbb
RW
7418 done
7419IFS=$as_save_IFS
bec39cab
AC
7420
7421fi
7422fi
7423AR=$ac_cv_prog_AR
7424if test -n "$AR"; then
81ecdfbb
RW
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7426$as_echo "$AR" >&6; }
bec39cab 7427else
81ecdfbb
RW
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7429$as_echo "no" >&6; }
bec39cab
AC
7430fi
7431
81ecdfbb 7432
bec39cab
AC
7433fi
7434if test -z "$ac_cv_prog_AR"; then
7435 ac_ct_AR=$AR
7436 # Extract the first word of "ar", so it can be a program name with args.
7437set dummy ar; ac_word=$2
81ecdfbb
RW
7438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7439$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 7440if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7441 $as_echo_n "(cached) " >&6
bec39cab
AC
7442else
7443 if test -n "$ac_ct_AR"; then
7444 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7445else
7446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7447for as_dir in $PATH
7448do
7449 IFS=$as_save_IFS
7450 test -z "$as_dir" && as_dir=.
81ecdfbb 7451 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 7452 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7453 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7454 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7455 break 2
7456 fi
7457done
81ecdfbb
RW
7458 done
7459IFS=$as_save_IFS
bec39cab
AC
7460
7461fi
7462fi
7463ac_ct_AR=$ac_cv_prog_ac_ct_AR
7464if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7466$as_echo "$ac_ct_AR" >&6; }
bec39cab 7467else
81ecdfbb
RW
7468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469$as_echo "no" >&6; }
bec39cab
AC
7470fi
7471
81ecdfbb
RW
7472 if test "x$ac_ct_AR" = x; then
7473 AR=""
7474 else
7475 case $cross_compiling:$ac_tool_warned in
7476yes:)
7477{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7478$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7479ac_tool_warned=yes ;;
7480esac
7481 AR=$ac_ct_AR
7482 fi
bec39cab
AC
7483else
7484 AR="$ac_cv_prog_AR"
7485fi
7486
7487if test -n "$ac_tool_prefix"; then
7488 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7489set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7491$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 7492if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7493 $as_echo_n "(cached) " >&6
bec39cab
AC
7494else
7495 if test -n "$DLLTOOL"; then
7496 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7497else
7498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7499for as_dir in $PATH
7500do
7501 IFS=$as_save_IFS
7502 test -z "$as_dir" && as_dir=.
81ecdfbb 7503 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 7504 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7505 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7507 break 2
7508 fi
7509done
81ecdfbb
RW
7510 done
7511IFS=$as_save_IFS
bec39cab
AC
7512
7513fi
7514fi
7515DLLTOOL=$ac_cv_prog_DLLTOOL
7516if test -n "$DLLTOOL"; then
81ecdfbb
RW
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7518$as_echo "$DLLTOOL" >&6; }
bec39cab 7519else
81ecdfbb
RW
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7521$as_echo "no" >&6; }
bec39cab
AC
7522fi
7523
81ecdfbb 7524
bec39cab
AC
7525fi
7526if test -z "$ac_cv_prog_DLLTOOL"; then
7527 ac_ct_DLLTOOL=$DLLTOOL
7528 # Extract the first word of "dlltool", so it can be a program name with args.
7529set dummy dlltool; ac_word=$2
81ecdfbb
RW
7530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7531$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 7532if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7533 $as_echo_n "(cached) " >&6
bec39cab
AC
7534else
7535 if test -n "$ac_ct_DLLTOOL"; then
7536 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7537else
7538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7539for as_dir in $PATH
7540do
7541 IFS=$as_save_IFS
7542 test -z "$as_dir" && as_dir=.
81ecdfbb 7543 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 7544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7545 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7547 break 2
7548 fi
7549done
81ecdfbb
RW
7550 done
7551IFS=$as_save_IFS
bec39cab
AC
7552
7553fi
7554fi
7555ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7556if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7558$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7559else
81ecdfbb
RW
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7561$as_echo "no" >&6; }
bec39cab
AC
7562fi
7563
81ecdfbb
RW
7564 if test "x$ac_ct_DLLTOOL" = x; then
7565 DLLTOOL=""
7566 else
7567 case $cross_compiling:$ac_tool_warned in
7568yes:)
7569{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7570$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7571ac_tool_warned=yes ;;
7572esac
7573 DLLTOOL=$ac_ct_DLLTOOL
7574 fi
bec39cab
AC
7575else
7576 DLLTOOL="$ac_cv_prog_DLLTOOL"
7577fi
7578
7579if test -n "$ac_tool_prefix"; then
7580 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7581set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7583$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 7584if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7585 $as_echo_n "(cached) " >&6
bec39cab
AC
7586else
7587 if test -n "$WINDRES"; then
7588 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7589else
7590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7591for as_dir in $PATH
7592do
7593 IFS=$as_save_IFS
7594 test -z "$as_dir" && as_dir=.
81ecdfbb 7595 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 7596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7597 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7599 break 2
7600 fi
7601done
81ecdfbb
RW
7602 done
7603IFS=$as_save_IFS
bec39cab
AC
7604
7605fi
7606fi
7607WINDRES=$ac_cv_prog_WINDRES
7608if test -n "$WINDRES"; then
81ecdfbb
RW
7609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7610$as_echo "$WINDRES" >&6; }
bec39cab 7611else
81ecdfbb
RW
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7613$as_echo "no" >&6; }
bec39cab
AC
7614fi
7615
81ecdfbb 7616
bec39cab
AC
7617fi
7618if test -z "$ac_cv_prog_WINDRES"; then
7619 ac_ct_WINDRES=$WINDRES
7620 # Extract the first word of "windres", so it can be a program name with args.
7621set dummy windres; ac_word=$2
81ecdfbb
RW
7622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7623$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 7624if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7625 $as_echo_n "(cached) " >&6
bec39cab
AC
7626else
7627 if test -n "$ac_ct_WINDRES"; then
7628 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7629else
7630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7631for as_dir in $PATH
7632do
7633 IFS=$as_save_IFS
7634 test -z "$as_dir" && as_dir=.
81ecdfbb 7635 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 7636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7637 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7639 break 2
7640 fi
7641done
81ecdfbb
RW
7642 done
7643IFS=$as_save_IFS
bec39cab
AC
7644
7645fi
7646fi
7647ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7648if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7650$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7651else
81ecdfbb
RW
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7653$as_echo "no" >&6; }
c906108c 7654fi
bec39cab 7655
81ecdfbb
RW
7656 if test "x$ac_ct_WINDRES" = x; then
7657 WINDRES=""
7658 else
7659 case $cross_compiling:$ac_tool_warned in
7660yes:)
7661{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7662$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7663ac_tool_warned=yes ;;
7664esac
7665 WINDRES=$ac_ct_WINDRES
7666 fi
c906108c 7667else
bec39cab 7668 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7669fi
7670
bec39cab 7671
036c3acb
TS
7672case $host_os in
7673 gnu*)
7674 # Needed for GNU Hurd hosts.
7675 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7676 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7677set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7679$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 7680if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7681 $as_echo_n "(cached) " >&6
c906108c 7682else
bec39cab
AC
7683 if test -n "$MIG"; then
7684 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7685else
7686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7687for as_dir in $PATH
7688do
7689 IFS=$as_save_IFS
7690 test -z "$as_dir" && as_dir=.
81ecdfbb 7691 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 7692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7693 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7695 break 2
7696 fi
7697done
81ecdfbb
RW
7698 done
7699IFS=$as_save_IFS
bec39cab 7700
c906108c 7701fi
bec39cab
AC
7702fi
7703MIG=$ac_cv_prog_MIG
7704if test -n "$MIG"; then
81ecdfbb
RW
7705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7706$as_echo "$MIG" >&6; }
c906108c 7707else
81ecdfbb
RW
7708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7709$as_echo "no" >&6; }
c906108c
SS
7710fi
7711
81ecdfbb 7712
bec39cab
AC
7713fi
7714if test -z "$ac_cv_prog_MIG"; then
7715 ac_ct_MIG=$MIG
7716 # Extract the first word of "mig", so it can be a program name with args.
7717set dummy mig; ac_word=$2
81ecdfbb
RW
7718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7719$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 7720if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7721 $as_echo_n "(cached) " >&6
bec39cab
AC
7722else
7723 if test -n "$ac_ct_MIG"; then
7724 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7725else
7726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7727for as_dir in $PATH
7728do
7729 IFS=$as_save_IFS
7730 test -z "$as_dir" && as_dir=.
81ecdfbb 7731 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 7732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7733 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7735 break 2
7736 fi
7737done
81ecdfbb
RW
7738 done
7739IFS=$as_save_IFS
c906108c 7740
bec39cab
AC
7741fi
7742fi
7743ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7744if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7746$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7747else
81ecdfbb
RW
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7749$as_echo "no" >&6; }
bec39cab 7750fi
c906108c 7751
81ecdfbb
RW
7752 if test "x$ac_ct_MIG" = x; then
7753 MIG=""
7754 else
7755 case $cross_compiling:$ac_tool_warned in
7756yes:)
7757{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7758$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7759ac_tool_warned=yes ;;
7760esac
7761 MIG=$ac_ct_MIG
7762 fi
bec39cab
AC
7763else
7764 MIG="$ac_cv_prog_MIG"
7765fi
c906108c 7766
036c3acb 7767 if test x"$MIG" = x; then
63a9e923 7768 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7769 fi
7770 ;;
7771esac
c906108c 7772
bec39cab
AC
7773# ---------------------- #
7774# Checks for libraries. #
7775# ---------------------- #
c906108c 7776
bec39cab 7777# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7779$as_echo_n "checking for main in -lm... " >&6; }
63a9e923 7780if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7781 $as_echo_n "(cached) " >&6
bec39cab
AC
7782else
7783 ac_check_lib_save_LIBS=$LIBS
7784LIBS="-lm $LIBS"
81ecdfbb 7785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7786/* end confdefs.h. */
c906108c 7787
c906108c 7788
bec39cab
AC
7789int
7790main ()
7791{
81ecdfbb 7792return main ();
bec39cab
AC
7793 ;
7794 return 0;
7795}
7796_ACEOF
81ecdfbb 7797if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7798 ac_cv_lib_m_main=yes
7799else
81ecdfbb 7800 ac_cv_lib_m_main=no
bec39cab 7801fi
81ecdfbb
RW
7802rm -f core conftest.err conftest.$ac_objext \
7803 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7804LIBS=$ac_check_lib_save_LIBS
7805fi
81ecdfbb
RW
7806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7807$as_echo "$ac_cv_lib_m_main" >&6; }
63a9e923 7808if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7809 cat >>confdefs.h <<_ACEOF
7810#define HAVE_LIBM 1
7811_ACEOF
7812
7813 LIBS="-lm $LIBS"
c906108c 7814
c906108c 7815fi
bec39cab
AC
7816
7817
bec39cab 7818# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7820$as_echo_n "checking for library containing gethostbyname... " >&6; }
63a9e923 7821if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7822 $as_echo_n "(cached) " >&6
bec39cab
AC
7823else
7824 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7826/* end confdefs.h. */
ddc9cd0f 7827
81ecdfbb
RW
7828/* Override any GCC internal prototype to avoid an error.
7829 Use char because int might match the return type of a GCC
7830 builtin and then its argument prototype would still apply. */
bec39cab
AC
7831#ifdef __cplusplus
7832extern "C"
7833#endif
bec39cab
AC
7834char gethostbyname ();
7835int
7836main ()
7837{
81ecdfbb 7838return gethostbyname ();
bec39cab
AC
7839 ;
7840 return 0;
7841}
7842_ACEOF
81ecdfbb
RW
7843for ac_lib in '' nsl; do
7844 if test -z "$ac_lib"; then
7845 ac_res="none required"
7846 else
7847 ac_res=-l$ac_lib
b4e70030 7848 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7849 fi
7850 if ac_fn_c_try_link "$LINENO"; then :
7851 ac_cv_search_gethostbyname=$ac_res
7852fi
7853rm -f core conftest.err conftest.$ac_objext \
7854 conftest$ac_exeext
63a9e923 7855 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7856 break
7857fi
7858done
63a9e923 7859if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7860
bec39cab 7861else
81ecdfbb 7862 ac_cv_search_gethostbyname=no
bec39cab 7863fi
81ecdfbb 7864rm conftest.$ac_ext
bec39cab
AC
7865LIBS=$ac_func_search_save_LIBS
7866fi
81ecdfbb
RW
7867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7868$as_echo "$ac_cv_search_gethostbyname" >&6; }
7869ac_res=$ac_cv_search_gethostbyname
7870if test "$ac_res" != no; then :
7871 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7872
bec39cab 7873fi
96baa820 7874
c906108c 7875
b4e70030 7876# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7878$as_echo_n "checking for library containing socketpair... " >&6; }
63a9e923 7879if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7880 $as_echo_n "(cached) " >&6
b4e70030
JB
7881else
7882 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7884/* end confdefs.h. */
7885
81ecdfbb
RW
7886/* Override any GCC internal prototype to avoid an error.
7887 Use char because int might match the return type of a GCC
7888 builtin and then its argument prototype would still apply. */
b4e70030
JB
7889#ifdef __cplusplus
7890extern "C"
7891#endif
b4e70030
JB
7892char socketpair ();
7893int
7894main ()
7895{
81ecdfbb 7896return socketpair ();
b4e70030
JB
7897 ;
7898 return 0;
7899}
7900_ACEOF
81ecdfbb
RW
7901for ac_lib in '' socket; do
7902 if test -z "$ac_lib"; then
7903 ac_res="none required"
7904 else
7905 ac_res=-l$ac_lib
b4e70030 7906 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7907 fi
7908 if ac_fn_c_try_link "$LINENO"; then :
7909 ac_cv_search_socketpair=$ac_res
7910fi
7911rm -f core conftest.err conftest.$ac_objext \
7912 conftest$ac_exeext
63a9e923 7913 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7914 break
7915fi
7916done
63a9e923 7917if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7918
b4e70030 7919else
81ecdfbb 7920 ac_cv_search_socketpair=no
b4e70030 7921fi
81ecdfbb 7922rm conftest.$ac_ext
b4e70030
JB
7923LIBS=$ac_func_search_save_LIBS
7924fi
81ecdfbb
RW
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7926$as_echo "$ac_cv_search_socketpair" >&6; }
7927ac_res=$ac_cv_search_socketpair
7928if test "$ac_res" != no; then :
7929 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7930
7931fi
7932
7933
233a11ab 7934# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7935
711a72d3 7936 # Use the system's zlib library.
39f3de7c
L
7937 zlibdir="-L\$(top_builddir)/../zlib"
7938 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7939
711a72d3
L
7940# Check whether --with-system-zlib was given.
7941if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7942 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7943 zlibdir=
7944 zlibinc=
7945 fi
b040ad30 7946
233a11ab 7947fi
233a11ab 7948
233a11ab 7949
233a11ab 7950
b040ad30 7951
233a11ab 7952
25268153 7953# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7954# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7956$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
63a9e923 7957if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7958 $as_echo_n "(cached) " >&6
7959else
7960 ac_func_search_save_LIBS=$LIBS
7961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7962/* end confdefs.h. */
7963
7964/* Override any GCC internal prototype to avoid an error.
7965 Use char because int might match the return type of a GCC
7966 builtin and then its argument prototype would still apply. */
7967#ifdef __cplusplus
7968extern "C"
7969#endif
7970char kinfo_getvmmap ();
7971int
7972main ()
7973{
7974return kinfo_getvmmap ();
7975 ;
7976 return 0;
7977}
7978_ACEOF
37773e78 7979for ac_lib in '' util util-freebsd; do
25268153
JB
7980 if test -z "$ac_lib"; then
7981 ac_res="none required"
7982 else
7983 ac_res=-l$ac_lib
7984 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7985 fi
7986 if ac_fn_c_try_link "$LINENO"; then :
7987 ac_cv_search_kinfo_getvmmap=$ac_res
7988fi
7989rm -f core conftest.err conftest.$ac_objext \
7990 conftest$ac_exeext
63a9e923 7991 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7992 break
7993fi
7994done
63a9e923 7995if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7996
7997else
7998 ac_cv_search_kinfo_getvmmap=no
7999fi
8000rm conftest.$ac_ext
8001LIBS=$ac_func_search_save_LIBS
8002fi
8003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8004$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8005ac_res=$ac_cv_search_kinfo_getvmmap
8006if test "$ac_res" != no; then :
8007 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8008
8009$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8010
8011fi
8012
8013
92fce24d
JB
8014# fbsd-nat.c can also use kinfo_getfile.
8015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8016$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
63a9e923 8017if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8018 $as_echo_n "(cached) " >&6
8019else
8020 ac_func_search_save_LIBS=$LIBS
8021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8022/* end confdefs.h. */
8023
8024/* Override any GCC internal prototype to avoid an error.
8025 Use char because int might match the return type of a GCC
8026 builtin and then its argument prototype would still apply. */
8027#ifdef __cplusplus
8028extern "C"
8029#endif
8030char kinfo_getfile ();
8031int
8032main ()
8033{
8034return kinfo_getfile ();
8035 ;
8036 return 0;
8037}
8038_ACEOF
8039for ac_lib in '' util util-freebsd; do
8040 if test -z "$ac_lib"; then
8041 ac_res="none required"
8042 else
8043 ac_res=-l$ac_lib
8044 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8045 fi
8046 if ac_fn_c_try_link "$LINENO"; then :
8047 ac_cv_search_kinfo_getfile=$ac_res
8048fi
8049rm -f core conftest.err conftest.$ac_objext \
8050 conftest$ac_exeext
63a9e923 8051 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8052 break
8053fi
8054done
63a9e923 8055if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8056
8057else
8058 ac_cv_search_kinfo_getfile=no
8059fi
8060rm conftest.$ac_ext
8061LIBS=$ac_func_search_save_LIBS
8062fi
8063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8064$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8065ac_res=$ac_cv_search_kinfo_getfile
8066if test "$ac_res" != no; then :
8067 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8068
8069$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
8070
8071fi
8072
8073
77f120bf 8074
016a3251
DD
8075 if test "X$prefix" = "XNONE"; then
8076 acl_final_prefix="$ac_default_prefix"
8077 else
8078 acl_final_prefix="$prefix"
8079 fi
8080 if test "X$exec_prefix" = "XNONE"; then
8081 acl_final_exec_prefix='${prefix}'
8082 else
8083 acl_final_exec_prefix="$exec_prefix"
8084 fi
8085 acl_save_prefix="$prefix"
8086 prefix="$acl_final_prefix"
8087 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8088 prefix="$acl_save_prefix"
8089
8090
8091# Check whether --with-gnu-ld was given.
8092if test "${with_gnu_ld+set}" = set; then :
8093 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8094else
8095 with_gnu_ld=no
8096fi
8097
8098# Prepare PATH_SEPARATOR.
8099# The user is always right.
8100if test "${PATH_SEPARATOR+set}" != set; then
8101 echo "#! /bin/sh" >conf$$.sh
8102 echo "exit 0" >>conf$$.sh
8103 chmod +x conf$$.sh
8104 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8105 PATH_SEPARATOR=';'
8106 else
8107 PATH_SEPARATOR=:
8108 fi
8109 rm -f conf$$.sh
8110fi
8111ac_prog=ld
8112if test "$GCC" = yes; then
8113 # Check if gcc -print-prog-name=ld gives a path.
8114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8115$as_echo_n "checking for ld used by GCC... " >&6; }
8116 case $host in
8117 *-*-mingw*)
8118 # gcc leaves a trailing carriage return which upsets mingw
8119 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8120 *)
8121 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8122 esac
8123 case $ac_prog in
8124 # Accept absolute paths.
8125 [\\/]* | [A-Za-z]:[\\/]*)
8126 re_direlt='/[^/][^/]*/\.\./'
8127 # Canonicalize the path of ld
8128 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8129 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8130 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8131 done
8132 test -z "$LD" && LD="$ac_prog"
8133 ;;
8134 "")
8135 # If it fails, then pretend we aren't using GCC.
8136 ac_prog=ld
8137 ;;
8138 *)
8139 # If it is relative, then search for the first ld in PATH.
8140 with_gnu_ld=unknown
8141 ;;
8142 esac
8143elif test "$with_gnu_ld" = yes; then
8144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8145$as_echo_n "checking for GNU ld... " >&6; }
8146else
8147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8148$as_echo_n "checking for non-GNU ld... " >&6; }
8149fi
63a9e923 8150if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8151 $as_echo_n "(cached) " >&6
8152else
8153 if test -z "$LD"; then
8154 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8155 for ac_dir in $PATH; do
8156 test -z "$ac_dir" && ac_dir=.
8157 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8158 acl_cv_path_LD="$ac_dir/$ac_prog"
8159 # Check to see if the program is GNU ld. I'd rather use --version,
8160 # but apparently some GNU ld's only accept -v.
8161 # Break only if it was the GNU/non-GNU ld that we prefer.
8162 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8163 test "$with_gnu_ld" != no && break
8164 else
8165 test "$with_gnu_ld" != yes && break
8166 fi
8167 fi
8168 done
8169 IFS="$ac_save_ifs"
8170else
8171 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8172fi
8173fi
8174
8175LD="$acl_cv_path_LD"
8176if test -n "$LD"; then
8177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8178$as_echo "$LD" >&6; }
8179else
8180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8181$as_echo "no" >&6; }
8182fi
63a9e923 8183test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8185$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
63a9e923 8186if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8187 $as_echo_n "(cached) " >&6
8188else
8189 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8190if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8191 acl_cv_prog_gnu_ld=yes
8192else
8193 acl_cv_prog_gnu_ld=no
8194fi
8195fi
8196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8197$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8198with_gnu_ld=$acl_cv_prog_gnu_ld
8199
8200
8201
8202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8203$as_echo_n "checking for shared library run path origin... " >&6; }
63a9e923 8204if ${acl_cv_rpath+:} false; then :
016a3251
DD
8205 $as_echo_n "(cached) " >&6
8206else
8207
8208 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8209 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8210 . ./conftest.sh
8211 rm -f ./conftest.sh
8212 acl_cv_rpath=done
8213
8214fi
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8216$as_echo "$acl_cv_rpath" >&6; }
8217 wl="$acl_cv_wl"
8218 libext="$acl_cv_libext"
8219 shlibext="$acl_cv_shlibext"
8220 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8221 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8222 hardcode_direct="$acl_cv_hardcode_direct"
8223 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8224 # Check whether --enable-rpath was given.
8225if test "${enable_rpath+set}" = set; then :
8226 enableval=$enable_rpath; :
8227else
8228 enable_rpath=yes
8229fi
8230
8231
8232
8233
8234
8235
8236
8237
8238 use_additional=yes
8239
8240 acl_save_prefix="$prefix"
8241 prefix="$acl_final_prefix"
8242 acl_save_exec_prefix="$exec_prefix"
8243 exec_prefix="$acl_final_exec_prefix"
8244
8245 eval additional_includedir=\"$includedir\"
8246 eval additional_libdir=\"$libdir\"
8247
8248 exec_prefix="$acl_save_exec_prefix"
8249 prefix="$acl_save_prefix"
77f120bf 8250
6c7a06a3 8251
81ecdfbb
RW
8252# Check whether --with-libiconv-prefix was given.
8253if test "${with_libiconv_prefix+set}" = set; then :
8254 withval=$with_libiconv_prefix;
016a3251
DD
8255 if test "X$withval" = "Xno"; then
8256 use_additional=no
8257 else
8258 if test "X$withval" = "X"; then
8259
8260 acl_save_prefix="$prefix"
8261 prefix="$acl_final_prefix"
8262 acl_save_exec_prefix="$exec_prefix"
8263 exec_prefix="$acl_final_exec_prefix"
8264
8265 eval additional_includedir=\"$includedir\"
8266 eval additional_libdir=\"$libdir\"
8267
8268 exec_prefix="$acl_save_exec_prefix"
8269 prefix="$acl_save_prefix"
8270
8271 else
8272 additional_includedir="$withval/include"
8273 additional_libdir="$withval/lib"
8274 fi
8275 fi
6c7a06a3 8276
81ecdfbb
RW
8277fi
8278
016a3251
DD
8279 LIBICONV=
8280 LTLIBICONV=
8281 INCICONV=
8282 rpathdirs=
8283 ltrpathdirs=
8284 names_already_handled=
8285 names_next_round='iconv '
8286 while test -n "$names_next_round"; do
8287 names_this_round="$names_next_round"
8288 names_next_round=
8289 for name in $names_this_round; do
8290 already_handled=
8291 for n in $names_already_handled; do
8292 if test "$n" = "$name"; then
8293 already_handled=yes
8294 break
8295 fi
8296 done
8297 if test -z "$already_handled"; then
8298 names_already_handled="$names_already_handled $name"
8299 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8300 eval value=\"\$HAVE_LIB$uppername\"
8301 if test -n "$value"; then
8302 if test "$value" = yes; then
8303 eval value=\"\$LIB$uppername\"
8304 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8305 eval value=\"\$LTLIB$uppername\"
8306 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8307 else
8308 :
8309 fi
8310 else
8311 found_dir=
8312 found_la=
8313 found_so=
8314 found_a=
8315 if test $use_additional = yes; then
8316 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8317 found_dir="$additional_libdir"
8318 found_so="$additional_libdir/lib$name.$shlibext"
8319 if test -f "$additional_libdir/lib$name.la"; then
8320 found_la="$additional_libdir/lib$name.la"
8321 fi
8322 else
8323 if test -f "$additional_libdir/lib$name.$libext"; then
8324 found_dir="$additional_libdir"
8325 found_a="$additional_libdir/lib$name.$libext"
8326 if test -f "$additional_libdir/lib$name.la"; then
8327 found_la="$additional_libdir/lib$name.la"
8328 fi
8329 fi
8330 fi
8331 fi
8332 if test "X$found_dir" = "X"; then
8333 for x in $LDFLAGS $LTLIBICONV; do
8334
8335 acl_save_prefix="$prefix"
8336 prefix="$acl_final_prefix"
8337 acl_save_exec_prefix="$exec_prefix"
8338 exec_prefix="$acl_final_exec_prefix"
8339 eval x=\"$x\"
8340 exec_prefix="$acl_save_exec_prefix"
8341 prefix="$acl_save_prefix"
8342
8343 case "$x" in
8344 -L*)
8345 dir=`echo "X$x" | sed -e 's/^X-L//'`
8346 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8347 found_dir="$dir"
8348 found_so="$dir/lib$name.$shlibext"
8349 if test -f "$dir/lib$name.la"; then
8350 found_la="$dir/lib$name.la"
8351 fi
8352 else
8353 if test -f "$dir/lib$name.$libext"; then
8354 found_dir="$dir"
8355 found_a="$dir/lib$name.$libext"
8356 if test -f "$dir/lib$name.la"; then
8357 found_la="$dir/lib$name.la"
8358 fi
8359 fi
8360 fi
8361 ;;
8362 esac
8363 if test "X$found_dir" != "X"; then
8364 break
8365 fi
8366 done
8367 fi
8368 if test "X$found_dir" != "X"; then
8369 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8370 if test "X$found_so" != "X"; then
8371 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8372 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8373 else
8374 haveit=
8375 for x in $ltrpathdirs; do
8376 if test "X$x" = "X$found_dir"; then
8377 haveit=yes
8378 break
8379 fi
8380 done
8381 if test -z "$haveit"; then
8382 ltrpathdirs="$ltrpathdirs $found_dir"
8383 fi
8384 if test "$hardcode_direct" = yes; then
8385 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8386 else
8387 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8388 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8389 haveit=
8390 for x in $rpathdirs; do
8391 if test "X$x" = "X$found_dir"; then
8392 haveit=yes
8393 break
8394 fi
8395 done
8396 if test -z "$haveit"; then
8397 rpathdirs="$rpathdirs $found_dir"
8398 fi
8399 else
8400 haveit=
8401 for x in $LDFLAGS $LIBICONV; do
8402
8403 acl_save_prefix="$prefix"
8404 prefix="$acl_final_prefix"
8405 acl_save_exec_prefix="$exec_prefix"
8406 exec_prefix="$acl_final_exec_prefix"
8407 eval x=\"$x\"
8408 exec_prefix="$acl_save_exec_prefix"
8409 prefix="$acl_save_prefix"
8410
8411 if test "X$x" = "X-L$found_dir"; then
8412 haveit=yes
8413 break
8414 fi
8415 done
8416 if test -z "$haveit"; then
8417 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8418 fi
8419 if test "$hardcode_minus_L" != no; then
8420 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8421 else
8422 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8423 fi
8424 fi
8425 fi
8426 fi
8427 else
8428 if test "X$found_a" != "X"; then
8429 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8430 else
8431 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8432 fi
8433 fi
8434 additional_includedir=
8435 case "$found_dir" in
8436 */lib | */lib/)
8437 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8438 additional_includedir="$basedir/include"
8439 ;;
8440 esac
8441 if test "X$additional_includedir" != "X"; then
8442 if test "X$additional_includedir" != "X/usr/include"; then
8443 haveit=
8444 if test "X$additional_includedir" = "X/usr/local/include"; then
8445 if test -n "$GCC"; then
8446 case $host_os in
8447 linux*) haveit=yes;;
8448 esac
8449 fi
8450 fi
8451 if test -z "$haveit"; then
8452 for x in $CPPFLAGS $INCICONV; do
8453
8454 acl_save_prefix="$prefix"
8455 prefix="$acl_final_prefix"
8456 acl_save_exec_prefix="$exec_prefix"
8457 exec_prefix="$acl_final_exec_prefix"
8458 eval x=\"$x\"
8459 exec_prefix="$acl_save_exec_prefix"
8460 prefix="$acl_save_prefix"
8461
8462 if test "X$x" = "X-I$additional_includedir"; then
8463 haveit=yes
8464 break
8465 fi
8466 done
8467 if test -z "$haveit"; then
8468 if test -d "$additional_includedir"; then
8469 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8470 fi
8471 fi
8472 fi
8473 fi
8474 fi
8475 if test -n "$found_la"; then
8476 save_libdir="$libdir"
8477 case "$found_la" in
8478 */* | *\\*) . "$found_la" ;;
8479 *) . "./$found_la" ;;
8480 esac
8481 libdir="$save_libdir"
8482 for dep in $dependency_libs; do
8483 case "$dep" in
8484 -L*)
8485 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8486 if test "X$additional_libdir" != "X/usr/lib"; then
8487 haveit=
8488 if test "X$additional_libdir" = "X/usr/local/lib"; then
8489 if test -n "$GCC"; then
8490 case $host_os in
8491 linux*) haveit=yes;;
8492 esac
8493 fi
8494 fi
8495 if test -z "$haveit"; then
8496 haveit=
8497 for x in $LDFLAGS $LIBICONV; do
8498
8499 acl_save_prefix="$prefix"
8500 prefix="$acl_final_prefix"
8501 acl_save_exec_prefix="$exec_prefix"
8502 exec_prefix="$acl_final_exec_prefix"
8503 eval x=\"$x\"
8504 exec_prefix="$acl_save_exec_prefix"
8505 prefix="$acl_save_prefix"
8506
8507 if test "X$x" = "X-L$additional_libdir"; then
8508 haveit=yes
8509 break
8510 fi
8511 done
8512 if test -z "$haveit"; then
8513 if test -d "$additional_libdir"; then
8514 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8515 fi
8516 fi
8517 haveit=
8518 for x in $LDFLAGS $LTLIBICONV; do
8519
8520 acl_save_prefix="$prefix"
8521 prefix="$acl_final_prefix"
8522 acl_save_exec_prefix="$exec_prefix"
8523 exec_prefix="$acl_final_exec_prefix"
8524 eval x=\"$x\"
8525 exec_prefix="$acl_save_exec_prefix"
8526 prefix="$acl_save_prefix"
8527
8528 if test "X$x" = "X-L$additional_libdir"; then
8529 haveit=yes
8530 break
8531 fi
8532 done
8533 if test -z "$haveit"; then
8534 if test -d "$additional_libdir"; then
8535 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8536 fi
8537 fi
8538 fi
8539 fi
8540 ;;
8541 -R*)
8542 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8543 if test "$enable_rpath" != no; then
8544 haveit=
8545 for x in $rpathdirs; do
8546 if test "X$x" = "X$dir"; then
8547 haveit=yes
8548 break
8549 fi
8550 done
8551 if test -z "$haveit"; then
8552 rpathdirs="$rpathdirs $dir"
8553 fi
8554 haveit=
8555 for x in $ltrpathdirs; do
8556 if test "X$x" = "X$dir"; then
8557 haveit=yes
8558 break
8559 fi
8560 done
8561 if test -z "$haveit"; then
8562 ltrpathdirs="$ltrpathdirs $dir"
8563 fi
8564 fi
8565 ;;
8566 -l*)
8567 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8568 ;;
8569 *.la)
8570 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8571 ;;
8572 *)
8573 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8574 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8575 ;;
8576 esac
8577 done
8578 fi
8579 else
8580 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8581 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8582 fi
8583 fi
8584 fi
8585 done
8586 done
8587 if test "X$rpathdirs" != "X"; then
8588 if test -n "$hardcode_libdir_separator"; then
8589 alldirs=
8590 for found_dir in $rpathdirs; do
8591 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8592 done
8593 acl_save_libdir="$libdir"
8594 libdir="$alldirs"
8595 eval flag=\"$hardcode_libdir_flag_spec\"
8596 libdir="$acl_save_libdir"
8597 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8598 else
8599 for found_dir in $rpathdirs; do
8600 acl_save_libdir="$libdir"
8601 libdir="$found_dir"
8602 eval flag=\"$hardcode_libdir_flag_spec\"
8603 libdir="$acl_save_libdir"
8604 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8605 done
8606 fi
8607 fi
8608 if test "X$ltrpathdirs" != "X"; then
8609 for found_dir in $ltrpathdirs; do
8610 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8611 done
8612 fi
8613
8614
8615
8616
8617
6c7a06a3 8618
6c7a06a3 8619
81ecdfbb
RW
8620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8621$as_echo_n "checking for iconv... " >&6; }
63a9e923 8622if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8623 $as_echo_n "(cached) " >&6
d542061a 8624else
6c7a06a3
TT
8625
8626 am_cv_func_iconv="no, consider installing GNU libiconv"
8627 am_cv_lib_iconv=no
016a3251
DD
8628 am_save_CPPFLAGS="$CPPFLAGS"
8629 CPPFLAGS="$CPPFLAGS $INCICONV"
8630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8631/* end confdefs.h. */
6c7a06a3
TT
8632#include <stdlib.h>
8633#include <iconv.h>
d542061a
UW
8634int
8635main ()
8636{
6c7a06a3 8637iconv_t cd = iconv_open("","");
016a3251
DD
8638 iconv(cd,NULL,NULL,NULL,NULL);
8639 iconv_close(cd);
d542061a
UW
8640 ;
8641 return 0;
8642}
8643_ACEOF
81ecdfbb 8644if ac_fn_c_try_link "$LINENO"; then :
016a3251 8645 am_cv_func_iconv=yes
d542061a 8646fi
81ecdfbb
RW
8647rm -f core conftest.err conftest.$ac_objext \
8648 conftest$ac_exeext conftest.$ac_ext
016a3251 8649 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8650
016a3251
DD
8651 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8652 for _libs in .libs _libs; do
8653 am_save_CPPFLAGS="$CPPFLAGS"
8654 am_save_LIBS="$LIBS"
8655 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8656 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8658/* end confdefs.h. */
6c7a06a3
TT
8659#include <stdlib.h>
8660#include <iconv.h>
d542061a
UW
8661int
8662main ()
8663{
6c7a06a3 8664iconv_t cd = iconv_open("","");
016a3251
DD
8665 iconv(cd,NULL,NULL,NULL,NULL);
8666 iconv_close(cd);
d542061a
UW
8667 ;
8668 return 0;
8669}
8670_ACEOF
81ecdfbb 8671if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8672 INCICONV="-I../libiconv/include"
8673 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8674 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8675 am_cv_lib_iconv=yes
8676 am_cv_func_iconv=yes
d542061a 8677fi
81ecdfbb
RW
8678rm -f core conftest.err conftest.$ac_objext \
8679 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8680 CPPFLAGS="$am_save_CPPFLAGS"
8681 LIBS="$am_save_LIBS"
8682 if test "$am_cv_func_iconv" = "yes"; then
8683 break
8684 fi
8685 done
77f120bf 8686 fi
94ae1714 8687
4edb1e84 8688 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8689 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8690 am_save_LIBS="$LIBS"
016a3251
DD
8691 CPPFLAGS="$LIBS $INCICONV"
8692 LIBS="$LIBS $LIBICONV"
81ecdfbb 8693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8694/* end confdefs.h. */
6c7a06a3
TT
8695#include <stdlib.h>
8696#include <iconv.h>
bec39cab
AC
8697int
8698main ()
8699{
6c7a06a3
TT
8700iconv_t cd = iconv_open("","");
8701 iconv(cd,NULL,NULL,NULL,NULL);
8702 iconv_close(cd);
bec39cab
AC
8703 ;
8704 return 0;
8705}
8706_ACEOF
81ecdfbb 8707if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8708 am_cv_lib_iconv=yes
6c7a06a3 8709 am_cv_func_iconv=yes
627af7ea 8710fi
81ecdfbb
RW
8711rm -f core conftest.err conftest.$ac_objext \
8712 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8713 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8714 LIBS="$am_save_LIBS"
6c7a06a3
TT
8715 fi
8716
8717fi
81ecdfbb
RW
8718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8719$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8720 if test "$am_cv_func_iconv" = yes; then
8721
8722$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8723
016a3251 8724 fi
fc3b640d 8725 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8726
8727 for element in $INCICONV; do
8728 haveit=
8729 for x in $CPPFLAGS; do
8730
8731 acl_save_prefix="$prefix"
8732 prefix="$acl_final_prefix"
8733 acl_save_exec_prefix="$exec_prefix"
8734 exec_prefix="$acl_final_exec_prefix"
8735 eval x=\"$x\"
8736 exec_prefix="$acl_save_exec_prefix"
8737 prefix="$acl_save_prefix"
8738
8739 if test "X$x" = "X$element"; then
8740 haveit=yes
8741 break
8742 fi
8743 done
8744 if test -z "$haveit"; then
8745 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8746 fi
8747 done
8748
8749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8750$as_echo_n "checking how to link with libiconv... " >&6; }
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8752$as_echo "$LIBICONV" >&6; }
94ae1714 8753 else
016a3251
DD
8754 LIBICONV=
8755 LTLIBICONV=
fc3b640d 8756 fi
94ae1714 8757
6c7a06a3 8758
6c7a06a3 8759
016a3251 8760 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8762$as_echo_n "checking for iconv declaration... " >&6; }
63a9e923 8763 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8764 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8765else
8766
81ecdfbb 8767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8768/* end confdefs.h. */
8769
6c7a06a3
TT
8770#include <stdlib.h>
8771#include <iconv.h>
8772extern
b4e70030 8773#ifdef __cplusplus
6c7a06a3 8774"C"
b4e70030 8775#endif
6c7a06a3
TT
8776#if defined(__STDC__) || defined(__cplusplus)
8777size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8778#else
8779size_t iconv();
8780#endif
8781
b4e70030
JB
8782int
8783main ()
8784{
6c7a06a3 8785
b4e70030
JB
8786 ;
8787 return 0;
8788}
8789_ACEOF
81ecdfbb 8790if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8791 am_cv_proto_iconv_arg1=""
4e8d927d 8792else
81ecdfbb 8793 am_cv_proto_iconv_arg1="const"
b4e70030 8794fi
81ecdfbb 8795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8796 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);"
8797fi
8798
8799 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8801 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8802$as_echo "${ac_t:-
8803 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8804
8805cat >>confdefs.h <<_ACEOF
8806#define ICONV_CONST $am_cv_proto_iconv_arg1
8807_ACEOF
8808
8809 fi
6c7a06a3
TT
8810
8811
478aac75
DE
8812# GDB may fork/exec the iconv program to get the list of supported character
8813# sets. Allow the user to specify where to find it.
8814# There are several factors affecting the choice of option name:
8815# - There is already --with-libiconv-prefix but we can't use it, it specifies
8816# the build-time location of libiconv files.
8817# - The program we need to find is iconv, which comes with glibc. The user
8818# doesn't necessarily have libiconv installed. Therefore naming this
8819# --with-libiconv-foo feels wrong.
8820# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8821# defined to work on directories not files (though it really doesn't know
8822# the difference).
8823# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8824# with --with-libiconv-prefix.
8825# Putting these together is why the option name is --with-iconv-bin.
8826
8827
8828# Check whether --with-iconv-bin was given.
8829if test "${with_iconv_bin+set}" = set; then :
8830 withval=$with_iconv_bin; iconv_bin="${withval}"
8831
8832cat >>confdefs.h <<_ACEOF
8833#define ICONV_BIN "${iconv_bin}"
8834_ACEOF
8835
8836
8837 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8838 if test "x$prefix" = xNONE; then
8839 test_prefix=/usr/local
8840 else
8841 test_prefix=$prefix
8842 fi
8843 else
8844 test_prefix=$exec_prefix
8845 fi
8846 value=0
8847 case ${iconv_bin} in
8848 "${test_prefix}"|"${test_prefix}/"*|\
8849 '${exec_prefix}'|'${exec_prefix}/'*)
8850 value=1
8851 ;;
8852 esac
8853
8854cat >>confdefs.h <<_ACEOF
8855#define ICONV_BIN_RELOCATABLE $value
8856_ACEOF
8857
8858
8859
8860fi
8861
8862
cb01cfba 8863# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8864if test x"$enable_tui" != xno; then
cb01cfba
JB
8865 prefer_curses=yes
8866fi
8867
8868curses_found=no
8869if test x"$prefer_curses" = xyes; then
8870 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8871 # curses library because the latter might not provide all the
8872 # functionality we need. However, this leads to problems on systems
8873 # where the linker searches /usr/local/lib, but the compiler doesn't
8874 # search /usr/local/include, if ncurses is installed in /usr/local. A
8875 # default installation of ncurses on alpha*-dec-osf* will lead to such
8876 # a situation.
81ecdfbb
RW
8877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8878$as_echo_n "checking for library containing waddstr... " >&6; }
63a9e923 8879if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8880 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8881else
8882 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8884/* end confdefs.h. */
8885
81ecdfbb
RW
8886/* Override any GCC internal prototype to avoid an error.
8887 Use char because int might match the return type of a GCC
8888 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8889#ifdef __cplusplus
8890extern "C"
8891#endif
6c7a06a3
TT
8892char waddstr ();
8893int
8894main ()
8895{
81ecdfbb 8896return waddstr ();
6c7a06a3
TT
8897 ;
8898 return 0;
8899}
8900_ACEOF
5007d765 8901for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8902 if test -z "$ac_lib"; then
8903 ac_res="none required"
8904 else
8905 ac_res=-l$ac_lib
8906 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8907 fi
8908 if ac_fn_c_try_link "$LINENO"; then :
8909 ac_cv_search_waddstr=$ac_res
8910fi
8911rm -f core conftest.err conftest.$ac_objext \
8912 conftest$ac_exeext
63a9e923 8913 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8914 break
8915fi
8916done
63a9e923 8917if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8918
6c7a06a3 8919else
81ecdfbb
RW
8920 ac_cv_search_waddstr=no
8921fi
8922rm conftest.$ac_ext
8923LIBS=$ac_func_search_save_LIBS
8924fi
8925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8926$as_echo "$ac_cv_search_waddstr" >&6; }
8927ac_res=$ac_cv_search_waddstr
8928if test "$ac_res" != no; then :
8929 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8930
8931fi
8932
8933
cb01cfba
JB
8934 if test "$ac_cv_search_waddstr" != no; then
8935 curses_found=yes
8936 fi
8937fi
8938
8939# Check whether we should enable the TUI, but only do so if we really
8940# can.
8941if test x"$enable_tui" != xno; then
8942 if test -d $srcdir/tui; then
8943 if test "$curses_found" != no; then
6c7a06a3
TT
8944 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8945 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8946 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8947 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8948 else
8949 if test x"$enable_tui" = xyes; then
63a9e923 8950 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8951 else
81ecdfbb
RW
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8953$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8954 fi
8955 fi
8956 fi
8957fi
8958
8959# Since GDB uses Readline, we need termcap functionality. In many
8960# cases this will be provided by the curses library, but some systems
96fe4562 8961# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8962
8963case $host_os in
8964 cygwin*)
8965 if test -d $srcdir/libtermcap; then
8966 LIBS="../libtermcap/libtermcap.a $LIBS"
8967 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8968 fi ;;
8969 go32* | *djgpp*)
8970 ac_cv_search_tgetent="none required"
8971 ;;
6c7a06a3
TT
8972esac
8973
8974# These are the libraries checked by Readline.
81ecdfbb
RW
8975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8976$as_echo_n "checking for library containing tgetent... " >&6; }
63a9e923 8977if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 8978 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8979else
8980 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8982/* end confdefs.h. */
8983
81ecdfbb
RW
8984/* Override any GCC internal prototype to avoid an error.
8985 Use char because int might match the return type of a GCC
8986 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8987#ifdef __cplusplus
8988extern "C"
8989#endif
6c7a06a3
TT
8990char tgetent ();
8991int
8992main ()
8993{
81ecdfbb 8994return tgetent ();
6c7a06a3
TT
8995 ;
8996 return 0;
8997}
8998_ACEOF
5007d765 8999for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9000 if test -z "$ac_lib"; then
9001 ac_res="none required"
9002 else
9003 ac_res=-l$ac_lib
6c7a06a3 9004 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9005 fi
9006 if ac_fn_c_try_link "$LINENO"; then :
9007 ac_cv_search_tgetent=$ac_res
9008fi
9009rm -f core conftest.err conftest.$ac_objext \
9010 conftest$ac_exeext
63a9e923 9011 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9012 break
9013fi
9014done
63a9e923 9015if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9016
6c7a06a3 9017else
81ecdfbb 9018 ac_cv_search_tgetent=no
6c7a06a3 9019fi
81ecdfbb 9020rm conftest.$ac_ext
6c7a06a3
TT
9021LIBS=$ac_func_search_save_LIBS
9022fi
81ecdfbb
RW
9023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9024$as_echo "$ac_cv_search_tgetent" >&6; }
9025ac_res=$ac_cv_search_tgetent
9026if test "$ac_res" != no; then :
9027 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9028
06825bd1
MK
9029fi
9030
06825bd1 9031
bec39cab 9032if test "$ac_cv_search_tgetent" = no; then
7a85168d 9033 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9034fi
9035
3841debe 9036
81ecdfbb
RW
9037# Check whether --with-system-readline was given.
9038if test "${with_system_readline+set}" = set; then :
9039 withval=$with_system_readline;
9040fi
6a30b0a5 9041
6a30b0a5
AS
9042
9043if test "$with_system_readline" = yes; then
9044 READLINE=-lreadline
9045 READLINE_DEPS=
9046 READLINE_CFLAGS=
39037522 9047 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9048else
9049 READLINE='$(READLINE_DIR)/libreadline.a'
9050 READLINE_DEPS='$(READLINE)'
9051 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9052 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9053fi
9054
9055
9056
9057
9058
f997c383
SD
9059# Generate jit-reader.h
9060
9061# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9062TARGET_PTR=
9063
9064# The cast to long int works around a bug in the HP C Compiler
9065# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9066# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9067# This bug is HP SR number 8606223364.
9068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9069$as_echo_n "checking size of unsigned long long... " >&6; }
63a9e923 9070if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9071 $as_echo_n "(cached) " >&6
9072else
9073 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9074
9075else
9076 if test "$ac_cv_type_unsigned_long_long" = yes; then
9077 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
9079as_fn_error 77 "cannot compute sizeof (unsigned long long)
9080See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9081 else
9082 ac_cv_sizeof_unsigned_long_long=0
9083 fi
9084fi
9085
9086fi
9087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9088$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9089
9090
9091
9092cat >>confdefs.h <<_ACEOF
9093#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9094_ACEOF
9095
9096
9097# The cast to long int works around a bug in the HP C Compiler
9098# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9099# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9100# This bug is HP SR number 8606223364.
9101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9102$as_echo_n "checking size of unsigned long... " >&6; }
63a9e923 9103if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9104 $as_echo_n "(cached) " >&6
9105else
9106 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9107
9108else
9109 if test "$ac_cv_type_unsigned_long" = yes; then
9110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9111$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
9112as_fn_error 77 "cannot compute sizeof (unsigned long)
9113See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9114 else
9115 ac_cv_sizeof_unsigned_long=0
9116 fi
9117fi
9118
9119fi
9120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9121$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9122
9123
9124
9125cat >>confdefs.h <<_ACEOF
9126#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9127_ACEOF
9128
9129
9130# The cast to long int works around a bug in the HP C Compiler
9131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9133# This bug is HP SR number 8606223364.
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9135$as_echo_n "checking size of unsigned __int128... " >&6; }
63a9e923 9136if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9137 $as_echo_n "(cached) " >&6
9138else
9139 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9140
9141else
9142 if test "$ac_cv_type_unsigned___int128" = yes; then
9143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
9145as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9146See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9147 else
9148 ac_cv_sizeof_unsigned___int128=0
9149 fi
9150fi
9151
9152fi
9153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9154$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9155
9156
9157
9158cat >>confdefs.h <<_ACEOF
9159#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9160_ACEOF
9161
9162
9163
9164if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9165 TARGET_PTR="unsigned long"
9166elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9167 TARGET_PTR="unsigned long long"
9168elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9169 TARGET_PTR="unsigned __int128"
9170else
9171 TARGET_PTR="unsigned long"
9172fi
9173
9174
9175ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9176
9177
a2d08b9e
SD
9178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9179$as_echo_n "checking for library containing dlopen... " >&6; }
63a9e923 9180if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9181 $as_echo_n "(cached) " >&6
9182else
9183 ac_func_search_save_LIBS=$LIBS
9184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9185/* end confdefs.h. */
9186
9187/* Override any GCC internal prototype to avoid an error.
9188 Use char because int might match the return type of a GCC
9189 builtin and then its argument prototype would still apply. */
9190#ifdef __cplusplus
9191extern "C"
9192#endif
9193char dlopen ();
9194int
9195main ()
9196{
9197return dlopen ();
9198 ;
9199 return 0;
9200}
9201_ACEOF
9202for ac_lib in '' dl; do
9203 if test -z "$ac_lib"; then
9204 ac_res="none required"
9205 else
9206 ac_res=-l$ac_lib
9207 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9208 fi
9209 if ac_fn_c_try_link "$LINENO"; then :
9210 ac_cv_search_dlopen=$ac_res
9211fi
9212rm -f core conftest.err conftest.$ac_objext \
9213 conftest$ac_exeext
63a9e923 9214 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9215 break
9216fi
9217done
63a9e923 9218if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9219
9220else
9221 ac_cv_search_dlopen=no
9222fi
9223rm conftest.$ac_ext
9224LIBS=$ac_func_search_save_LIBS
9225fi
9226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9227$as_echo "$ac_cv_search_dlopen" >&6; }
9228ac_res=$ac_cv_search_dlopen
9229if test "$ac_res" != no; then :
9230 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9231
9232fi
9233
9234
39037522 9235
b8e0a31c
SD
9236
9237# Check whether --with-jit-reader-dir was given.
9238if test "${with_jit_reader_dir+set}" = set; then :
9239 withval=$with_jit_reader_dir;
9240 JIT_READER_DIR=$withval
9241else
9242 JIT_READER_DIR=${libdir}/gdb
9243fi
9244
9245
9246 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9247 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9248 ac_define_dir=`eval echo $JIT_READER_DIR`
9249 ac_define_dir=`eval echo $ac_define_dir`
9250
9251cat >>confdefs.h <<_ACEOF
9252#define JIT_READER_DIR "$ac_define_dir"
9253_ACEOF
9254
9255
9256
9257
9258 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9259 if test "x$prefix" = xNONE; then
9260 test_prefix=/usr/local
9261 else
9262 test_prefix=$prefix
9263 fi
9264 else
9265 test_prefix=$exec_prefix
9266 fi
9267 value=0
9268 case ${ac_define_dir} in
9269 "${test_prefix}"|"${test_prefix}/"*|\
9270 '${exec_prefix}'|'${exec_prefix}/'*)
9271 value=1
9272 ;;
9273 esac
9274
9275cat >>confdefs.h <<_ACEOF
9276#define JIT_READER_DIR_RELOCATABLE $value
9277_ACEOF
9278
9279
9280
9281
9282
81ecdfbb
RW
9283# Check whether --with-expat was given.
9284if test "${with_expat+set}" = set; then :
9285 withval=$with_expat;
5c39566f
DJ
9286else
9287 with_expat=auto
81ecdfbb
RW
9288fi
9289
9290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9291$as_echo_n "checking whether to use expat... " >&6; }
9292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9293$as_echo "$with_expat" >&6; }
5c39566f
DJ
9294
9295if test "${with_expat}" = no; then
81ecdfbb
RW
9296 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9297$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9298 HAVE_LIBEXPAT=no
9299else
9300
3841debe
DJ
9301
9302
9303
9304
9305
9306
9307
9308 use_additional=yes
9309
9310 acl_save_prefix="$prefix"
9311 prefix="$acl_final_prefix"
9312 acl_save_exec_prefix="$exec_prefix"
9313 exec_prefix="$acl_final_exec_prefix"
9314
9315 eval additional_includedir=\"$includedir\"
9316 eval additional_libdir=\"$libdir\"
9317
9318 exec_prefix="$acl_save_exec_prefix"
9319 prefix="$acl_save_prefix"
9320
9321
81ecdfbb
RW
9322# Check whether --with-libexpat-prefix was given.
9323if test "${with_libexpat_prefix+set}" = set; then :
9324 withval=$with_libexpat_prefix;
3841debe
DJ
9325 if test "X$withval" = "Xno"; then
9326 use_additional=no
9327 else
9328 if test "X$withval" = "X"; then
9329
9330 acl_save_prefix="$prefix"
9331 prefix="$acl_final_prefix"
9332 acl_save_exec_prefix="$exec_prefix"
9333 exec_prefix="$acl_final_exec_prefix"
9334
9335 eval additional_includedir=\"$includedir\"
9336 eval additional_libdir=\"$libdir\"
9337
9338 exec_prefix="$acl_save_exec_prefix"
9339 prefix="$acl_save_prefix"
9340
9341 else
9342 additional_includedir="$withval/include"
9343 additional_libdir="$withval/lib"
9344 fi
9345 fi
9346
81ecdfbb
RW
9347fi
9348
3841debe
DJ
9349 LIBEXPAT=
9350 LTLIBEXPAT=
9351 INCEXPAT=
9352 rpathdirs=
9353 ltrpathdirs=
9354 names_already_handled=
9355 names_next_round='expat '
9356 while test -n "$names_next_round"; do
9357 names_this_round="$names_next_round"
9358 names_next_round=
9359 for name in $names_this_round; do
9360 already_handled=
9361 for n in $names_already_handled; do
9362 if test "$n" = "$name"; then
9363 already_handled=yes
9364 break
9365 fi
9366 done
9367 if test -z "$already_handled"; then
9368 names_already_handled="$names_already_handled $name"
9369 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9370 eval value=\"\$HAVE_LIB$uppername\"
9371 if test -n "$value"; then
9372 if test "$value" = yes; then
9373 eval value=\"\$LIB$uppername\"
9374 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9375 eval value=\"\$LTLIB$uppername\"
9376 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9377 else
9378 :
9379 fi
9380 else
9381 found_dir=
9382 found_la=
9383 found_so=
9384 found_a=
9385 if test $use_additional = yes; then
9386 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9387 found_dir="$additional_libdir"
9388 found_so="$additional_libdir/lib$name.$shlibext"
9389 if test -f "$additional_libdir/lib$name.la"; then
9390 found_la="$additional_libdir/lib$name.la"
9391 fi
9392 else
9393 if test -f "$additional_libdir/lib$name.$libext"; then
9394 found_dir="$additional_libdir"
9395 found_a="$additional_libdir/lib$name.$libext"
9396 if test -f "$additional_libdir/lib$name.la"; then
9397 found_la="$additional_libdir/lib$name.la"
9398 fi
9399 fi
9400 fi
9401 fi
9402 if test "X$found_dir" = "X"; then
9403 for x in $LDFLAGS $LTLIBEXPAT; do
9404
9405 acl_save_prefix="$prefix"
9406 prefix="$acl_final_prefix"
9407 acl_save_exec_prefix="$exec_prefix"
9408 exec_prefix="$acl_final_exec_prefix"
9409 eval x=\"$x\"
9410 exec_prefix="$acl_save_exec_prefix"
9411 prefix="$acl_save_prefix"
9412
9413 case "$x" in
9414 -L*)
9415 dir=`echo "X$x" | sed -e 's/^X-L//'`
9416 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9417 found_dir="$dir"
9418 found_so="$dir/lib$name.$shlibext"
9419 if test -f "$dir/lib$name.la"; then
9420 found_la="$dir/lib$name.la"
9421 fi
9422 else
9423 if test -f "$dir/lib$name.$libext"; then
9424 found_dir="$dir"
9425 found_a="$dir/lib$name.$libext"
9426 if test -f "$dir/lib$name.la"; then
9427 found_la="$dir/lib$name.la"
9428 fi
9429 fi
9430 fi
9431 ;;
9432 esac
9433 if test "X$found_dir" != "X"; then
9434 break
9435 fi
9436 done
9437 fi
9438 if test "X$found_dir" != "X"; then
9439 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9440 if test "X$found_so" != "X"; then
9441 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9442 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9443 else
9444 haveit=
9445 for x in $ltrpathdirs; do
9446 if test "X$x" = "X$found_dir"; then
9447 haveit=yes
9448 break
9449 fi
9450 done
9451 if test -z "$haveit"; then
9452 ltrpathdirs="$ltrpathdirs $found_dir"
9453 fi
9454 if test "$hardcode_direct" = yes; then
9455 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9456 else
9457 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9458 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9459 haveit=
9460 for x in $rpathdirs; do
9461 if test "X$x" = "X$found_dir"; then
9462 haveit=yes
9463 break
9464 fi
9465 done
9466 if test -z "$haveit"; then
9467 rpathdirs="$rpathdirs $found_dir"
9468 fi
9469 else
9470 haveit=
9471 for x in $LDFLAGS $LIBEXPAT; do
9472
9473 acl_save_prefix="$prefix"
9474 prefix="$acl_final_prefix"
9475 acl_save_exec_prefix="$exec_prefix"
9476 exec_prefix="$acl_final_exec_prefix"
9477 eval x=\"$x\"
9478 exec_prefix="$acl_save_exec_prefix"
9479 prefix="$acl_save_prefix"
9480
9481 if test "X$x" = "X-L$found_dir"; then
9482 haveit=yes
9483 break
9484 fi
9485 done
9486 if test -z "$haveit"; then
9487 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9488 fi
9489 if test "$hardcode_minus_L" != no; then
9490 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9491 else
9492 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9493 fi
9494 fi
9495 fi
9496 fi
9497 else
9498 if test "X$found_a" != "X"; then
9499 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9500 else
9501 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9502 fi
9503 fi
9504 additional_includedir=
9505 case "$found_dir" in
9506 */lib | */lib/)
9507 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9508 additional_includedir="$basedir/include"
9509 ;;
9510 esac
9511 if test "X$additional_includedir" != "X"; then
9512 if test "X$additional_includedir" != "X/usr/include"; then
9513 haveit=
9514 if test "X$additional_includedir" = "X/usr/local/include"; then
9515 if test -n "$GCC"; then
9516 case $host_os in
9517 linux*) haveit=yes;;
9518 esac
9519 fi
9520 fi
9521 if test -z "$haveit"; then
9522 for x in $CPPFLAGS $INCEXPAT; do
9523
9524 acl_save_prefix="$prefix"
9525 prefix="$acl_final_prefix"
9526 acl_save_exec_prefix="$exec_prefix"
9527 exec_prefix="$acl_final_exec_prefix"
9528 eval x=\"$x\"
9529 exec_prefix="$acl_save_exec_prefix"
9530 prefix="$acl_save_prefix"
9531
9532 if test "X$x" = "X-I$additional_includedir"; then
9533 haveit=yes
9534 break
9535 fi
9536 done
9537 if test -z "$haveit"; then
9538 if test -d "$additional_includedir"; then
9539 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9540 fi
9541 fi
9542 fi
9543 fi
9544 fi
9545 if test -n "$found_la"; then
9546 save_libdir="$libdir"
9547 case "$found_la" in
9548 */* | *\\*) . "$found_la" ;;
9549 *) . "./$found_la" ;;
9550 esac
9551 libdir="$save_libdir"
9552 for dep in $dependency_libs; do
9553 case "$dep" in
9554 -L*)
9555 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9556 if test "X$additional_libdir" != "X/usr/lib"; then
9557 haveit=
9558 if test "X$additional_libdir" = "X/usr/local/lib"; then
9559 if test -n "$GCC"; then
9560 case $host_os in
9561 linux*) haveit=yes;;
9562 esac
9563 fi
9564 fi
9565 if test -z "$haveit"; then
9566 haveit=
9567 for x in $LDFLAGS $LIBEXPAT; do
9568
9569 acl_save_prefix="$prefix"
9570 prefix="$acl_final_prefix"
9571 acl_save_exec_prefix="$exec_prefix"
9572 exec_prefix="$acl_final_exec_prefix"
9573 eval x=\"$x\"
9574 exec_prefix="$acl_save_exec_prefix"
9575 prefix="$acl_save_prefix"
9576
9577 if test "X$x" = "X-L$additional_libdir"; then
9578 haveit=yes
9579 break
9580 fi
9581 done
9582 if test -z "$haveit"; then
9583 if test -d "$additional_libdir"; then
9584 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9585 fi
9586 fi
9587 haveit=
9588 for x in $LDFLAGS $LTLIBEXPAT; do
9589
9590 acl_save_prefix="$prefix"
9591 prefix="$acl_final_prefix"
9592 acl_save_exec_prefix="$exec_prefix"
9593 exec_prefix="$acl_final_exec_prefix"
9594 eval x=\"$x\"
9595 exec_prefix="$acl_save_exec_prefix"
9596 prefix="$acl_save_prefix"
9597
9598 if test "X$x" = "X-L$additional_libdir"; then
9599 haveit=yes
9600 break
9601 fi
9602 done
9603 if test -z "$haveit"; then
9604 if test -d "$additional_libdir"; then
9605 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9606 fi
9607 fi
9608 fi
9609 fi
9610 ;;
9611 -R*)
9612 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9613 if test "$enable_rpath" != no; then
9614 haveit=
9615 for x in $rpathdirs; do
9616 if test "X$x" = "X$dir"; then
9617 haveit=yes
9618 break
9619 fi
9620 done
9621 if test -z "$haveit"; then
9622 rpathdirs="$rpathdirs $dir"
9623 fi
9624 haveit=
9625 for x in $ltrpathdirs; do
9626 if test "X$x" = "X$dir"; then
9627 haveit=yes
9628 break
9629 fi
9630 done
9631 if test -z "$haveit"; then
9632 ltrpathdirs="$ltrpathdirs $dir"
9633 fi
9634 fi
9635 ;;
9636 -l*)
9637 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9638 ;;
9639 *.la)
9640 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9641 ;;
9642 *)
9643 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9644 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9645 ;;
81ecdfbb
RW
9646 esac
9647 done
9648 fi
9649 else
9650 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9651 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9652 fi
9653 fi
9654 fi
9655 done
9656 done
9657 if test "X$rpathdirs" != "X"; then
9658 if test -n "$hardcode_libdir_separator"; then
9659 alldirs=
9660 for found_dir in $rpathdirs; do
9661 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9662 done
9663 acl_save_libdir="$libdir"
9664 libdir="$alldirs"
9665 eval flag=\"$hardcode_libdir_flag_spec\"
9666 libdir="$acl_save_libdir"
9667 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9668 else
9669 for found_dir in $rpathdirs; do
9670 acl_save_libdir="$libdir"
9671 libdir="$found_dir"
9672 eval flag=\"$hardcode_libdir_flag_spec\"
9673 libdir="$acl_save_libdir"
9674 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9675 done
9676 fi
9677 fi
9678 if test "X$ltrpathdirs" != "X"; then
9679 for found_dir in $ltrpathdirs; do
9680 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9681 done
9682 fi
a9322a30
TT
9683
9684
81ecdfbb 9685 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9686
81ecdfbb
RW
9687 for element in $INCEXPAT; do
9688 haveit=
9689 for x in $CPPFLAGS; do
a9322a30 9690
81ecdfbb
RW
9691 acl_save_prefix="$prefix"
9692 prefix="$acl_final_prefix"
9693 acl_save_exec_prefix="$exec_prefix"
9694 exec_prefix="$acl_final_exec_prefix"
9695 eval x=\"$x\"
9696 exec_prefix="$acl_save_exec_prefix"
9697 prefix="$acl_save_prefix"
a8111142 9698
81ecdfbb
RW
9699 if test "X$x" = "X$element"; then
9700 haveit=yes
9701 break
9702 fi
9703 done
9704 if test -z "$haveit"; then
9705 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9706 fi
9707 done
a9322a30
TT
9708
9709
81ecdfbb
RW
9710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9711$as_echo_n "checking for libexpat... " >&6; }
63a9e923 9712if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9713 $as_echo_n "(cached) " >&6
bec39cab 9714else
bec39cab 9715
81ecdfbb
RW
9716 ac_save_LIBS="$LIBS"
9717 LIBS="$LIBS $LIBEXPAT"
9718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9719/* end confdefs.h. */
81ecdfbb
RW
9720#include "expat.h"
9721int
9722main ()
9723{
9724XML_Parser p = XML_ParserCreate (0);
9725 ;
9726 return 0;
9727}
bec39cab 9728_ACEOF
81ecdfbb
RW
9729if ac_fn_c_try_link "$LINENO"; then :
9730 ac_cv_libexpat=yes
c906108c 9731else
81ecdfbb 9732 ac_cv_libexpat=no
bec39cab 9733fi
81ecdfbb
RW
9734rm -f core conftest.err conftest.$ac_objext \
9735 conftest$ac_exeext conftest.$ac_ext
9736 LIBS="$ac_save_LIBS"
c906108c 9737
95ca63c4 9738fi
81ecdfbb
RW
9739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9740$as_echo "$ac_cv_libexpat" >&6; }
9741 if test "$ac_cv_libexpat" = yes; then
9742 HAVE_LIBEXPAT=yes
bec39cab 9743
81ecdfbb 9744$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9745
81ecdfbb
RW
9746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9747$as_echo_n "checking how to link with libexpat... " >&6; }
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9749$as_echo "$LIBEXPAT" >&6; }
9750 else
9751 HAVE_LIBEXPAT=no
9752 CPPFLAGS="$ac_save_CPPFLAGS"
9753 LIBEXPAT=
9754 LTLIBEXPAT=
9755 fi
95ca63c4
CF
9756
9757
9758
7cb9022a
MK
9759
9760
bec39cab 9761
81ecdfbb
RW
9762 if test "$HAVE_LIBEXPAT" != yes; then
9763 if test "$with_expat" = yes; then
63a9e923 9764 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9765 else
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9767$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9768 fi
9769 else
9770 save_LIBS=$LIBS
9771 LIBS="$LIBS $LIBEXPAT"
9772 for ac_func in XML_StopParser
9773do :
9774 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
63a9e923 9775if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9776 cat >>confdefs.h <<_ACEOF
81ecdfbb 9777#define HAVE_XML_STOPPARSER 1
bec39cab 9778_ACEOF
95ca63c4 9779
bec39cab 9780fi
bec39cab 9781done
95ca63c4 9782
81ecdfbb
RW
9783 LIBS=$save_LIBS
9784 fi
a9322a30
TT
9785fi
9786
2400729e
UW
9787
9788# Check whether --with-mpfr was given.
9789if test "${with_mpfr+set}" = set; then :
9790 withval=$with_mpfr;
9791else
9792 with_mpfr=auto
9793fi
9794
9795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9796$as_echo_n "checking whether to use MPFR... " >&6; }
9797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9798$as_echo "$with_mpfr" >&6; }
9799
9800if test "${with_mpfr}" = no; then
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9802$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9803 HAVE_LIBMPFR=no
9804else
9805
9806
9807
9808
9809
9810
9811
9812
9813 use_additional=yes
9814
9815 acl_save_prefix="$prefix"
9816 prefix="$acl_final_prefix"
9817 acl_save_exec_prefix="$exec_prefix"
9818 exec_prefix="$acl_final_exec_prefix"
9819
9820 eval additional_includedir=\"$includedir\"
9821 eval additional_libdir=\"$libdir\"
9822
9823 exec_prefix="$acl_save_exec_prefix"
9824 prefix="$acl_save_prefix"
9825
9826
9827# Check whether --with-libmpfr-prefix was given.
9828if test "${with_libmpfr_prefix+set}" = set; then :
9829 withval=$with_libmpfr_prefix;
9830 if test "X$withval" = "Xno"; then
9831 use_additional=no
9832 else
9833 if test "X$withval" = "X"; then
9834
9835 acl_save_prefix="$prefix"
9836 prefix="$acl_final_prefix"
9837 acl_save_exec_prefix="$exec_prefix"
9838 exec_prefix="$acl_final_exec_prefix"
9839
9840 eval additional_includedir=\"$includedir\"
9841 eval additional_libdir=\"$libdir\"
9842
9843 exec_prefix="$acl_save_exec_prefix"
9844 prefix="$acl_save_prefix"
9845
9846 else
9847 additional_includedir="$withval/include"
9848 additional_libdir="$withval/lib"
9849 fi
9850 fi
9851
9852fi
9853
9854 LIBMPFR=
9855 LTLIBMPFR=
9856 INCMPFR=
9857 rpathdirs=
9858 ltrpathdirs=
9859 names_already_handled=
9860 names_next_round='mpfr '
9861 while test -n "$names_next_round"; do
9862 names_this_round="$names_next_round"
9863 names_next_round=
9864 for name in $names_this_round; do
9865 already_handled=
9866 for n in $names_already_handled; do
9867 if test "$n" = "$name"; then
9868 already_handled=yes
9869 break
9870 fi
9871 done
9872 if test -z "$already_handled"; then
9873 names_already_handled="$names_already_handled $name"
9874 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9875 eval value=\"\$HAVE_LIB$uppername\"
9876 if test -n "$value"; then
9877 if test "$value" = yes; then
9878 eval value=\"\$LIB$uppername\"
9879 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9880 eval value=\"\$LTLIB$uppername\"
9881 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9882 else
9883 :
9884 fi
9885 else
9886 found_dir=
9887 found_la=
9888 found_so=
9889 found_a=
9890 if test $use_additional = yes; then
9891 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9892 found_dir="$additional_libdir"
9893 found_so="$additional_libdir/lib$name.$shlibext"
9894 if test -f "$additional_libdir/lib$name.la"; then
9895 found_la="$additional_libdir/lib$name.la"
9896 fi
9897 else
9898 if test -f "$additional_libdir/lib$name.$libext"; then
9899 found_dir="$additional_libdir"
9900 found_a="$additional_libdir/lib$name.$libext"
9901 if test -f "$additional_libdir/lib$name.la"; then
9902 found_la="$additional_libdir/lib$name.la"
9903 fi
9904 fi
9905 fi
9906 fi
9907 if test "X$found_dir" = "X"; then
9908 for x in $LDFLAGS $LTLIBMPFR; do
9909
9910 acl_save_prefix="$prefix"
9911 prefix="$acl_final_prefix"
9912 acl_save_exec_prefix="$exec_prefix"
9913 exec_prefix="$acl_final_exec_prefix"
9914 eval x=\"$x\"
9915 exec_prefix="$acl_save_exec_prefix"
9916 prefix="$acl_save_prefix"
9917
9918 case "$x" in
9919 -L*)
9920 dir=`echo "X$x" | sed -e 's/^X-L//'`
9921 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9922 found_dir="$dir"
9923 found_so="$dir/lib$name.$shlibext"
9924 if test -f "$dir/lib$name.la"; then
9925 found_la="$dir/lib$name.la"
9926 fi
9927 else
9928 if test -f "$dir/lib$name.$libext"; then
9929 found_dir="$dir"
9930 found_a="$dir/lib$name.$libext"
9931 if test -f "$dir/lib$name.la"; then
9932 found_la="$dir/lib$name.la"
9933 fi
9934 fi
9935 fi
9936 ;;
9937 esac
9938 if test "X$found_dir" != "X"; then
9939 break
9940 fi
9941 done
9942 fi
9943 if test "X$found_dir" != "X"; then
9944 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9945 if test "X$found_so" != "X"; then
9946 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9947 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9948 else
9949 haveit=
9950 for x in $ltrpathdirs; do
9951 if test "X$x" = "X$found_dir"; then
9952 haveit=yes
9953 break
9954 fi
9955 done
9956 if test -z "$haveit"; then
9957 ltrpathdirs="$ltrpathdirs $found_dir"
9958 fi
9959 if test "$hardcode_direct" = yes; then
9960 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9961 else
9962 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9963 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9964 haveit=
9965 for x in $rpathdirs; do
9966 if test "X$x" = "X$found_dir"; then
9967 haveit=yes
9968 break
9969 fi
9970 done
9971 if test -z "$haveit"; then
9972 rpathdirs="$rpathdirs $found_dir"
9973 fi
9974 else
9975 haveit=
9976 for x in $LDFLAGS $LIBMPFR; do
9977
9978 acl_save_prefix="$prefix"
9979 prefix="$acl_final_prefix"
9980 acl_save_exec_prefix="$exec_prefix"
9981 exec_prefix="$acl_final_exec_prefix"
9982 eval x=\"$x\"
9983 exec_prefix="$acl_save_exec_prefix"
9984 prefix="$acl_save_prefix"
9985
9986 if test "X$x" = "X-L$found_dir"; then
9987 haveit=yes
9988 break
9989 fi
9990 done
9991 if test -z "$haveit"; then
9992 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9993 fi
9994 if test "$hardcode_minus_L" != no; then
9995 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9996 else
9997 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9998 fi
9999 fi
10000 fi
10001 fi
10002 else
10003 if test "X$found_a" != "X"; then
10004 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10005 else
10006 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10007 fi
10008 fi
10009 additional_includedir=
10010 case "$found_dir" in
10011 */lib | */lib/)
10012 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10013 additional_includedir="$basedir/include"
10014 ;;
10015 esac
10016 if test "X$additional_includedir" != "X"; then
10017 if test "X$additional_includedir" != "X/usr/include"; then
10018 haveit=
10019 if test "X$additional_includedir" = "X/usr/local/include"; then
10020 if test -n "$GCC"; then
10021 case $host_os in
10022 linux*) haveit=yes;;
10023 esac
10024 fi
10025 fi
10026 if test -z "$haveit"; then
10027 for x in $CPPFLAGS $INCMPFR; do
10028
10029 acl_save_prefix="$prefix"
10030 prefix="$acl_final_prefix"
10031 acl_save_exec_prefix="$exec_prefix"
10032 exec_prefix="$acl_final_exec_prefix"
10033 eval x=\"$x\"
10034 exec_prefix="$acl_save_exec_prefix"
10035 prefix="$acl_save_prefix"
10036
10037 if test "X$x" = "X-I$additional_includedir"; then
10038 haveit=yes
10039 break
10040 fi
10041 done
10042 if test -z "$haveit"; then
10043 if test -d "$additional_includedir"; then
10044 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10045 fi
10046 fi
10047 fi
10048 fi
10049 fi
10050 if test -n "$found_la"; then
10051 save_libdir="$libdir"
10052 case "$found_la" in
10053 */* | *\\*) . "$found_la" ;;
10054 *) . "./$found_la" ;;
10055 esac
10056 libdir="$save_libdir"
10057 for dep in $dependency_libs; do
10058 case "$dep" in
10059 -L*)
10060 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10061 if test "X$additional_libdir" != "X/usr/lib"; then
10062 haveit=
10063 if test "X$additional_libdir" = "X/usr/local/lib"; then
10064 if test -n "$GCC"; then
10065 case $host_os in
10066 linux*) haveit=yes;;
10067 esac
10068 fi
10069 fi
10070 if test -z "$haveit"; then
10071 haveit=
10072 for x in $LDFLAGS $LIBMPFR; do
10073
10074 acl_save_prefix="$prefix"
10075 prefix="$acl_final_prefix"
10076 acl_save_exec_prefix="$exec_prefix"
10077 exec_prefix="$acl_final_exec_prefix"
10078 eval x=\"$x\"
10079 exec_prefix="$acl_save_exec_prefix"
10080 prefix="$acl_save_prefix"
10081
10082 if test "X$x" = "X-L$additional_libdir"; then
10083 haveit=yes
10084 break
10085 fi
10086 done
10087 if test -z "$haveit"; then
10088 if test -d "$additional_libdir"; then
10089 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10090 fi
10091 fi
10092 haveit=
10093 for x in $LDFLAGS $LTLIBMPFR; do
10094
10095 acl_save_prefix="$prefix"
10096 prefix="$acl_final_prefix"
10097 acl_save_exec_prefix="$exec_prefix"
10098 exec_prefix="$acl_final_exec_prefix"
10099 eval x=\"$x\"
10100 exec_prefix="$acl_save_exec_prefix"
10101 prefix="$acl_save_prefix"
10102
10103 if test "X$x" = "X-L$additional_libdir"; then
10104 haveit=yes
10105 break
10106 fi
10107 done
10108 if test -z "$haveit"; then
10109 if test -d "$additional_libdir"; then
10110 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10111 fi
10112 fi
10113 fi
10114 fi
10115 ;;
10116 -R*)
10117 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10118 if test "$enable_rpath" != no; then
10119 haveit=
10120 for x in $rpathdirs; do
10121 if test "X$x" = "X$dir"; then
10122 haveit=yes
10123 break
10124 fi
10125 done
10126 if test -z "$haveit"; then
10127 rpathdirs="$rpathdirs $dir"
10128 fi
10129 haveit=
10130 for x in $ltrpathdirs; do
10131 if test "X$x" = "X$dir"; then
10132 haveit=yes
10133 break
10134 fi
10135 done
10136 if test -z "$haveit"; then
10137 ltrpathdirs="$ltrpathdirs $dir"
10138 fi
10139 fi
10140 ;;
10141 -l*)
10142 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10143 ;;
10144 *.la)
10145 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10146 ;;
10147 *)
10148 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10149 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10150 ;;
10151 esac
10152 done
10153 fi
10154 else
10155 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10156 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10157 fi
10158 fi
10159 fi
10160 done
10161 done
10162 if test "X$rpathdirs" != "X"; then
10163 if test -n "$hardcode_libdir_separator"; then
10164 alldirs=
10165 for found_dir in $rpathdirs; do
10166 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10167 done
10168 acl_save_libdir="$libdir"
10169 libdir="$alldirs"
10170 eval flag=\"$hardcode_libdir_flag_spec\"
10171 libdir="$acl_save_libdir"
10172 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10173 else
10174 for found_dir in $rpathdirs; do
10175 acl_save_libdir="$libdir"
10176 libdir="$found_dir"
10177 eval flag=\"$hardcode_libdir_flag_spec\"
10178 libdir="$acl_save_libdir"
10179 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10180 done
10181 fi
10182 fi
10183 if test "X$ltrpathdirs" != "X"; then
10184 for found_dir in $ltrpathdirs; do
10185 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10186 done
10187 fi
10188
10189
10190 ac_save_CPPFLAGS="$CPPFLAGS"
10191
10192 for element in $INCMPFR; do
10193 haveit=
10194 for x in $CPPFLAGS; do
10195
10196 acl_save_prefix="$prefix"
10197 prefix="$acl_final_prefix"
10198 acl_save_exec_prefix="$exec_prefix"
10199 exec_prefix="$acl_final_exec_prefix"
10200 eval x=\"$x\"
10201 exec_prefix="$acl_save_exec_prefix"
10202 prefix="$acl_save_prefix"
10203
10204 if test "X$x" = "X$element"; then
10205 haveit=yes
10206 break
10207 fi
10208 done
10209 if test -z "$haveit"; then
10210 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10211 fi
10212 done
10213
10214
10215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10216$as_echo_n "checking for libmpfr... " >&6; }
63a9e923 10217if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10218 $as_echo_n "(cached) " >&6
10219else
10220
10221 ac_save_LIBS="$LIBS"
10222 LIBS="$LIBS $LIBMPFR"
10223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10224/* end confdefs.h. */
10225#include <mpfr.h>
10226int
10227main ()
10228{
10229mpfr_exp_t exp; mpfr_t x;
10230 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10231 ;
10232 return 0;
10233}
10234_ACEOF
10235if ac_fn_c_try_link "$LINENO"; then :
10236 ac_cv_libmpfr=yes
10237else
10238 ac_cv_libmpfr=no
10239fi
10240rm -f core conftest.err conftest.$ac_objext \
10241 conftest$ac_exeext conftest.$ac_ext
10242 LIBS="$ac_save_LIBS"
10243
10244fi
10245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10246$as_echo "$ac_cv_libmpfr" >&6; }
10247 if test "$ac_cv_libmpfr" = yes; then
10248 HAVE_LIBMPFR=yes
10249
10250$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10251
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10253$as_echo_n "checking how to link with libmpfr... " >&6; }
10254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10255$as_echo "$LIBMPFR" >&6; }
10256 else
10257 HAVE_LIBMPFR=no
10258 CPPFLAGS="$ac_save_CPPFLAGS"
10259 LIBMPFR=
10260 LTLIBMPFR=
10261 fi
10262
10263
10264
10265
10266
10267
10268 if test "$HAVE_LIBMPFR" != yes; then
10269 if test "$with_mpfr" = yes; then
63a9e923 10270 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10271 else
10272 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10273$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10274 fi
10275 fi
10276fi
10277
d344e670
DE
10278# --------------------- #
10279# Check for libpython. #
10280# --------------------- #
10281
a9322a30 10282
a9322a30
TT
10283
10284
ec685c5e 10285
0c4a4063 10286
81ecdfbb
RW
10287# Check whether --with-python was given.
10288if test "${with_python+set}" = set; then :
10289 withval=$with_python;
bec39cab 10290else
81ecdfbb 10291 with_python=auto
bec39cab 10292fi
bec39cab 10293
81ecdfbb
RW
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10295$as_echo_n "checking whether to use python... " >&6; }
10296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10297$as_echo "$with_python" >&6; }
9a156167 10298
81ecdfbb
RW
10299if test "${with_python}" = no; then
10300 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10301$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10302 have_libpython=no
bec39cab 10303else
81ecdfbb 10304 case "${with_python}" in
8c85a4e2 10305 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10306 if test -d ${with_python}; then
10307 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10308 python_prog="${with_python}/bin/python"
0c4a4063 10309 python_prefix=
9c4ea6c5
JB
10310 # If python does not exit ${with_python}/bin, then try in
10311 # ${with_python}. On Windows/MinGW, this is where the Python
10312 # executable is.
10313 if test ! -x "${python_prog}"; then
10314 python_prog="${with_python}/python"
10315 python_prefix=
10316 fi
e7a30f46 10317 if test ! -x "${python_prog}"; then
ec685c5e
DE
10318 # Fall back to gdb 7.0/7.1 behaviour.
10319 python_prog=missing
0c4a4063 10320 python_prefix=${with_python}
ec685c5e 10321 fi
e7a30f46 10322 elif test -x "${with_python}"; then
ec685c5e
DE
10323 # While we can't run python compiled for $host (unless host == build),
10324 # the user could write a script that provides the needed information,
10325 # so we support that.
ec685c5e 10326 python_prog=${with_python}
0c4a4063 10327 python_prefix=
ec685c5e 10328 else
63a9e923 10329 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10330 fi
81ecdfbb 10331 ;;
ec685c5e
DE
10332 */*)
10333 # Disallow --with-python=foo/bar.
63a9e923 10334 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10335 ;;
ec685c5e
DE
10336 *)
10337 # The user has either specified auto, yes, or the name of the python
10338 # program assumed to be in $PATH.
10339 python_prefix=
10340 case "${with_python}" in
10341 yes | auto)
10342 if test ${build} = ${host}; then
10343 # Extract the first word of "python", so it can be a program name with args.
10344set dummy python; ac_word=$2
10345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10346$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 10347if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10348 $as_echo_n "(cached) " >&6
10349else
10350 case $python_prog_path in
10351 [\\/]* | ?:[\\/]*)
10352 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10353 ;;
10354 *)
10355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10356for as_dir in $PATH
10357do
10358 IFS=$as_save_IFS
10359 test -z "$as_dir" && as_dir=.
10360 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 10361 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10362 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10363 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10364 break 2
10365 fi
10366done
10367 done
10368IFS=$as_save_IFS
10369
10370 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10371 ;;
10372esac
10373fi
10374python_prog_path=$ac_cv_path_python_prog_path
10375if test -n "$python_prog_path"; then
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10377$as_echo "$python_prog_path" >&6; }
10378else
10379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10380$as_echo "no" >&6; }
10381fi
10382
10383
10384 if test "${python_prog_path}" = missing; then
10385 python_prog=missing
10386 else
10387 python_prog=${python_prog_path}
10388 fi
10389 else
10390 # Not much we can do except assume the cross-compiler will find the
10391 # right files.
10392 python_prog=missing
10393 fi
10394 ;;
10395 *)
10396 # While we can't run python compiled for $host (unless host == build),
10397 # the user could write a script that provides the needed information,
10398 # so we support that.
10399 python_prog="${with_python}"
10400 # Extract the first word of "${python_prog}", so it can be a program name with args.
10401set dummy ${python_prog}; ac_word=$2
10402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10403$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 10404if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10405 $as_echo_n "(cached) " >&6
10406else
10407 case $python_prog_path in
10408 [\\/]* | ?:[\\/]*)
10409 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10410 ;;
10411 *)
10412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10413for as_dir in $PATH
10414do
10415 IFS=$as_save_IFS
10416 test -z "$as_dir" && as_dir=.
10417 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 10418 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10419 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10420 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10421 break 2
10422 fi
10423done
10424 done
10425IFS=$as_save_IFS
10426
10427 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10428 ;;
10429esac
10430fi
10431python_prog_path=$ac_cv_path_python_prog_path
10432if test -n "$python_prog_path"; then
10433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10434$as_echo "$python_prog_path" >&6; }
10435else
10436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10437$as_echo "no" >&6; }
10438fi
10439
10440
10441 if test "${python_prog_path}" = missing; then
63a9e923 10442 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10443 fi
10444 ;;
10445 esac
81ecdfbb
RW
10446 esac
10447
ec685c5e 10448 if test "${python_prog}" != missing; then
e7a30f46
DE
10449 # We have a python program to use, but it may be too old.
10450 # Don't flag an error for --with-python=auto (the default).
10451 have_python_config=yes
ec685c5e
DE
10452 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10453 if test $? != 0; then
e7a30f46
DE
10454 have_python_config=failed
10455 if test "${with_python}" != auto; then
63a9e923 10456 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10457 fi
ec685c5e
DE
10458 fi
10459 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10460 if test $? != 0; then
e7a30f46
DE
10461 have_python_config=failed
10462 if test "${with_python}" != auto; then
63a9e923 10463 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10464 fi
ec685c5e 10465 fi
0c4a4063
DE
10466 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10467 if test $? != 0; then
e7a30f46
DE
10468 have_python_config=failed
10469 if test "${with_python}" != auto; then
63a9e923 10470 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10471 fi
0c4a4063 10472 fi
ec685c5e 10473 else
ac534cba
JB
10474 # We do not have a python executable we can use to determine where
10475 # to find the Python headers and libs. We cannot guess the include
10476 # path from the python_prefix either, because that include path
10477 # depends on the Python version. So, there is nothing much we can
10478 # do except assume that the compiler will be able to find those files.
10479 python_includes=
10480 python_libs=
0c4a4063 10481 have_python_config=no
ec685c5e 10482 fi
bec39cab 10483
ec685c5e
DE
10484 # If we have python-config, only try the configuration it provides.
10485 # Otherwise fallback on the old way of trying different versions of
10486 # python in turn.
81ecdfbb 10487
ec685c5e
DE
10488 have_libpython=no
10489 if test "${have_python_config}" = yes; then
c1039e3c
JB
10490 # Determine the Python version by extracting "-lpython<version>"
10491 # part of the python_libs. <version> is usually X.Y with X and Y
10492 # being decimal numbers, but can also be XY (seen on Windows).
10493 #
10494 # The extraction is performed using sed with a regular expression.
10495 # Initially, the regexp used was using the '?' quantifier to make
10496 # the dot in the version number optional. Unfortunately, this
10497 # does not work with non-GNU versions of sed because, because of
10498 # what looks like a limitation (the '?' quantifier does not work
10499 # with back-references). We work around this limitation by using
10500 # the '*' quantifier instead. It means that, in theory, we might
10501 # match unexpected version strings such as "-lpython2..7", but
10502 # this seems unlikely in practice. And even if that happens,
10503 # an error will be triggered later on, when checking that version
10504 # number.
ec685c5e 10505 python_version=`echo " ${python_libs} " \
c1039e3c 10506 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10507 case "${python_version}" in
10508 python*)
ec685c5e
DE
10509
10510 version=${python_version}
10511
10512 new_CPPFLAGS=${python_includes}
10513 new_LIBS=${python_libs}
81ecdfbb
RW
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10515$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10516 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10517 save_LIBS=$LIBS
ec685c5e 10518 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10519 LIBS="$new_LIBS $LIBS"
ec685c5e 10520 found_usable_python=no
81ecdfbb 10521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10522/* end confdefs.h. */
ac534cba 10523#include "Python.h"
81ecdfbb
RW
10524int
10525main ()
10526{
10527Py_Initialize ();
10528 ;
10529 return 0;
10530}
bec39cab 10531_ACEOF
81ecdfbb 10532if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10533 have_libpython=${version}
10534 found_usable_python=yes
ac534cba
JB
10535 PYTHON_CPPFLAGS=$new_CPPFLAGS
10536 PYTHON_LIBS=$new_LIBS
9a156167 10537fi
81ecdfbb
RW
10538rm -f core conftest.err conftest.$ac_objext \
10539 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10540 CPPFLAGS=$save_CPPFLAGS
10541 LIBS=$save_LIBS
ec685c5e
DE
10542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10543$as_echo "${found_usable_python}" >&6; }
9a156167 10544
0c4a4063
DE
10545 ;;
10546 *)
63a9e923 10547 as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10548 ;;
10549 esac
e7a30f46 10550 elif test "${have_python_config}" != failed; then
ec685c5e 10551 if test "${have_libpython}" = no; then
9a156167 10552
420697bb
TT
10553 version=python2.7
10554
10555 new_CPPFLAGS=${python_includes}
bf27f0e2 10556 new_LIBS="-lpython2.7 ${python_libs}"
420697bb
TT
10557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10558$as_echo_n "checking for ${version}... " >&6; }
10559 save_CPPFLAGS=$CPPFLAGS
10560 save_LIBS=$LIBS
10561 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10562 LIBS="$new_LIBS $LIBS"
420697bb
TT
10563 found_usable_python=no
10564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10565/* end confdefs.h. */
ac534cba 10566#include "Python.h"
420697bb
TT
10567int
10568main ()
10569{
10570Py_Initialize ();
10571 ;
10572 return 0;
10573}
10574_ACEOF
10575if ac_fn_c_try_link "$LINENO"; then :
10576 have_libpython=${version}
10577 found_usable_python=yes
ac534cba
JB
10578 PYTHON_CPPFLAGS=$new_CPPFLAGS
10579 PYTHON_LIBS=$new_LIBS
420697bb
TT
10580fi
10581rm -f core conftest.err conftest.$ac_objext \
10582 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10583 CPPFLAGS=$save_CPPFLAGS
10584 LIBS=$save_LIBS
420697bb
TT
10585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10586$as_echo "${found_usable_python}" >&6; }
10587
10588 fi
10589 if test "${have_libpython}" = no; then
10590
ec685c5e
DE
10591 version=python2.6
10592
10593 new_CPPFLAGS=${python_includes}
bf27f0e2 10594 new_LIBS="-lpython2.6 ${python_libs}"
ec685c5e
DE
10595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10596$as_echo_n "checking for ${version}... " >&6; }
10597 save_CPPFLAGS=$CPPFLAGS
10598 save_LIBS=$LIBS
10599 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10600 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10601 found_usable_python=no
10602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10603/* end confdefs.h. */
ac534cba 10604#include "Python.h"
ec685c5e
DE
10605int
10606main ()
10607{
10608Py_Initialize ();
10609 ;
10610 return 0;
10611}
10612_ACEOF
10613if ac_fn_c_try_link "$LINENO"; then :
10614 have_libpython=${version}
10615 found_usable_python=yes
ac534cba
JB
10616 PYTHON_CPPFLAGS=$new_CPPFLAGS
10617 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
10618fi
10619rm -f core conftest.err conftest.$ac_objext \
10620 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10621 CPPFLAGS=$save_CPPFLAGS
10622 LIBS=$save_LIBS
ec685c5e
DE
10623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10624$as_echo "${found_usable_python}" >&6; }
9a156167 10625
81ecdfbb 10626 fi
ec685c5e 10627 if test ${have_libpython} = no; then
9a156167 10628
81ecdfbb 10629 version=python2.5
9a156167 10630
ec685c5e 10631 new_CPPFLAGS=${python_includes}
bf27f0e2 10632 new_LIBS="-lpython2.5 ${python_libs}"
81ecdfbb
RW
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10634$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10635 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10636 save_LIBS=$LIBS
ec685c5e 10637 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10638 LIBS="$new_LIBS $LIBS"
ec685c5e 10639 found_usable_python=no
81ecdfbb 10640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10641/* end confdefs.h. */
ac534cba 10642#include "Python.h"
81ecdfbb
RW
10643int
10644main ()
10645{
10646Py_Initialize ();
10647 ;
10648 return 0;
10649}
436868fb 10650_ACEOF
81ecdfbb 10651if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10652 have_libpython=${version}
10653 found_usable_python=yes
ac534cba
JB
10654 PYTHON_CPPFLAGS=$new_CPPFLAGS
10655 PYTHON_LIBS=$new_LIBS
436868fb 10656fi
81ecdfbb
RW
10657rm -f core conftest.err conftest.$ac_objext \
10658 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10659 CPPFLAGS=$save_CPPFLAGS
10660 LIBS=$save_LIBS
ec685c5e
DE
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10662$as_echo "${found_usable_python}" >&6; }
a9322a30 10663
81ecdfbb 10664 fi
ec685c5e 10665 if test ${have_libpython} = no; then
a9322a30 10666
81ecdfbb 10667 version=python2.4
a9322a30 10668
ec685c5e 10669 new_CPPFLAGS=${python_includes}
bf27f0e2 10670 new_LIBS="-lpython2.4 ${python_libs}"
81ecdfbb
RW
10671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10672$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10673 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10674 save_LIBS=$LIBS
ec685c5e 10675 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10676 LIBS="$new_LIBS $LIBS"
ec685c5e 10677 found_usable_python=no
81ecdfbb 10678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10679/* end confdefs.h. */
ac534cba 10680#include "Python.h"
a9322a30
TT
10681int
10682main ()
10683{
81ecdfbb 10684Py_Initialize ();
a9322a30
TT
10685 ;
10686 return 0;
10687}
436868fb 10688_ACEOF
81ecdfbb 10689if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10690 have_libpython=${version}
10691 found_usable_python=yes
ac534cba
JB
10692 PYTHON_CPPFLAGS=$new_CPPFLAGS
10693 PYTHON_LIBS=$new_LIBS
436868fb 10694fi
81ecdfbb
RW
10695rm -f core conftest.err conftest.$ac_objext \
10696 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10697 CPPFLAGS=$save_CPPFLAGS
10698 LIBS=$save_LIBS
ec685c5e
DE
10699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10700$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10701
ec685c5e
DE
10702 fi
10703 fi
9c4ea6c5 10704 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10705
10706$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10707
9c4ea6c5 10708 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10709
10710$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10711
9c4ea6c5 10712 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10713
10714$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10715
9c4ea6c5 10716 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10717
10718$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10719
81ecdfbb 10720 fi
ec685c5e
DE
10721
10722 if test "${have_libpython}" = no; then
81ecdfbb
RW
10723 case "${with_python}" in
10724 yes)
63a9e923 10725 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10726 ;;
10727 auto)
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10729$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10730 ;;
10731 *)
63a9e923 10732 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10733 ;;
10734 esac
0c4a4063
DE
10735 else
10736 if test -n "${python_prefix}"; then
10737
10738cat >>confdefs.h <<_ACEOF
10739#define WITH_PYTHON_PATH "${python_prefix}"
10740_ACEOF
10741
10742
10743 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10744 if test "x$prefix" = xNONE; then
10745 test_prefix=/usr/local
10746 else
10747 test_prefix=$prefix
10748 fi
10749 else
10750 test_prefix=$exec_prefix
10751 fi
10752 value=0
10753 case ${python_prefix} in
10754 "${test_prefix}"|"${test_prefix}/"*|\
10755 '${exec_prefix}'|'${exec_prefix}/'*)
10756 value=1
10757 ;;
10758 esac
10759
10760cat >>confdefs.h <<_ACEOF
10761#define PYTHON_PATH_RELOCATABLE $value
10762_ACEOF
10763
10764
10765 fi
81ecdfbb 10766 fi
436868fb 10767fi
436868fb 10768
ec685c5e 10769if test "${have_libpython}" != no; then
436868fb 10770
81ecdfbb 10771$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10772
81ecdfbb
RW
10773 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10774 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10775 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10776 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10777 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10778
81ecdfbb
RW
10779 # Flags needed to compile Python code (taken from python-config --cflags).
10780 # We cannot call python-config directly because it will output whatever was
10781 # used when compiling the Python interpreter itself, including flags which
10782 # would make the python-related objects be compiled differently from the
10783 # rest of GDB (e.g., -O2 and -fPIC).
10784 if test "${GCC}" = yes; then
10785 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10786 fi
436868fb 10787
81ecdfbb
RW
10788 if test "x${tentative_python_cflags}" != x; then
10789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10790$as_echo_n "checking compiler flags for python code... " >&6; }
10791 for flag in ${tentative_python_cflags}; do
10792 # Check that the compiler accepts it
10793 saved_CFLAGS="$CFLAGS"
10794 CFLAGS="$CFLAGS $flag"
10795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10796/* end confdefs.h. */
81ecdfbb 10797
a9322a30
TT
10798int
10799main ()
10800{
a9322a30
TT
10801
10802 ;
10803 return 0;
10804}
bec39cab 10805_ACEOF
81ecdfbb
RW
10806if ac_fn_c_try_compile "$LINENO"; then :
10807 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10808fi
81ecdfbb
RW
10809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10810 CFLAGS="$saved_CFLAGS"
10811 done
10812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10813$as_echo "${PYTHON_CFLAGS}" >&6; }
10814 fi
043b6510 10815
c83393b9
JB
10816 # On x64 Windows, Python's include headers, and pyconfig.h in
10817 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10818 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10819 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10820 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10821 # The issue was reported to the Python community, but still isn't
10822 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10823
043b6510 10824 case "$gdb_host" in
c83393b9
JB
10825 mingw64)
10826 if test "${GCC}" = yes; then
10827 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10828 fi
10829 ;;
043b6510 10830 esac
a8db4212
YPK
10831
10832 # Note that "python -m threading" cannot be used to check for
10833 # threading support due to a bug in Python 2.7.3
10834 # (http://bugs.python.org/issue15567).
10835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10836$as_echo_n "checking whether python supports threads... " >&6; }
10837 saved_CPPFLAGS="${CPPFLAGS}"
10838 CPPFLAGS="${PYTHON_CPPFLAGS}"
10839 # Note that the test is reversed so that python_has_threads=yes on
10840 # unexpected failures.
10841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10842/* end confdefs.h. */
10843
10844#include <Python.h>
10845#ifdef WITH_THREAD
10846# error
10847#endif
10848
10849_ACEOF
10850if ac_fn_c_try_cpp "$LINENO"; then :
10851 python_has_threads=no
10852else
10853 python_has_threads=yes
10854fi
63a9e923 10855rm -f conftest.err conftest.i conftest.$ac_ext
a8db4212
YPK
10856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10857$as_echo "${python_has_threads}" >&6; }
10858 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10859else
6dddc817
DE
10860 # Even if Python support is not compiled in, we need to have this file
10861 # included so that the "python" command, et.al., still exists.
8fd8d003 10862 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10863 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10864fi
9a156167 10865
a4a1c157
PA
10866# Work around Python http://bugs.python.org/issue10112. See also
10867# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10868# no effect. Note that the only test after this that uses Python is
10869# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10870# run without -export-dynamic too.
10871PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10872
10873
ed3ef339
DE
10874
10875
4df42755
DE
10876 if test "${have_libpython}" != no; then
10877 HAVE_PYTHON_TRUE=
10878 HAVE_PYTHON_FALSE='#'
10879else
10880 HAVE_PYTHON_TRUE='#'
10881 HAVE_PYTHON_FALSE=
10882fi
10883
ed3ef339
DE
10884
10885# -------------------- #
10886# Check for libguile. #
10887# -------------------- #
10888
10889
e1402065
DE
10890
10891
10892
10893
10894# Check whether --with-guile was given.
10895if test "${with_guile+set}" = set; then :
10896 withval=$with_guile;
10897else
10898 with_guile=auto
10899fi
10900
10901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10902$as_echo_n "checking whether to use guile... " >&6; }
10903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10904$as_echo "$with_guile" >&6; }
10905
ed3ef339
DE
10906# Extract the first word of "pkg-config", so it can be a program name with args.
10907set dummy pkg-config; ac_word=$2
10908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10909$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 10910if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10911 $as_echo_n "(cached) " >&6
10912else
10913 case $pkg_config_prog_path in
10914 [\\/]* | ?:[\\/]*)
10915 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10916 ;;
10917 *)
10918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10919for as_dir in $PATH
10920do
10921 IFS=$as_save_IFS
10922 test -z "$as_dir" && as_dir=.
10923 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 10924 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10925 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10927 break 2
10928 fi
10929done
10930 done
10931IFS=$as_save_IFS
10932
10933 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10934 ;;
10935esac
10936fi
10937pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10938if test -n "$pkg_config_prog_path"; then
10939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10940$as_echo "$pkg_config_prog_path" >&6; }
10941else
10942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10943$as_echo "no" >&6; }
10944fi
10945
10946
10947
6e66f753 10948try_guile_versions="guile-2.0"
ed3ef339
DE
10949have_libguile=no
10950case "${with_guile}" in
10951no)
10952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10953$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10954 ;;
10955auto)
e1402065
DE
10956 if test "${pkg_config_prog_path}" = "missing"; then
10957 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10958$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10959 else
ed3ef339
DE
10960
10961 pkg_config=${pkg_config_prog_path}
10962 guile_version_list=${try_guile_versions}
10963 flag_errors=no
10964
ed3ef339
DE
10965 found_usable_guile=checking
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10967$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10968 for guile_version in ${guile_version_list}; do
10969 ${pkg_config} --exists ${guile_version} 2>/dev/null
10970 if test $? != 0; then
10971 continue
10972 fi
10973 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10974 if test $? != 0; then
63a9e923 10975 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10976 fi
10977 new_LIBS=`${pkg_config} --libs ${guile_version}`
10978 if test $? != 0; then
63a9e923 10979 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10980 fi
10981 found_usable_guile=${guile_version}
10982 break
10983 done
10984 if test "${found_usable_guile}" = "checking"; then
10985 if test "${flag_errors}" = "yes"; then
63a9e923 10986 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10987 else
10988 found_usable_guile=no
10989 fi
10990 fi
10991 if test "${found_usable_guile}" != no; then
10992 save_CPPFLAGS=$CPPFLAGS
10993 save_LIBS=$LIBS
10994 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10995 LIBS="$LIBS $new_LIBS"
10996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10997/* end confdefs.h. */
10998#include "libguile.h"
10999int
11000main ()
11001{
11002scm_init_guile ();
11003 ;
11004 return 0;
11005}
11006_ACEOF
11007if ac_fn_c_try_link "$LINENO"; then :
11008 have_libguile=yes
11009 GUILE_CPPFLAGS=$new_CPPFLAGS
11010 GUILE_LIBS=$new_LIBS
11011else
11012 found_usable_guile=no
11013fi
11014rm -f core conftest.err conftest.$ac_objext \
11015 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11016 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
63a9e923 11017if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11018
11019$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11020
11021
11022fi
11023
ed3ef339
DE
11024 CPPFLAGS=$save_CPPFLAGS
11025 LIBS=$save_LIBS
11026 if test "${found_usable_guile}" = no; then
11027 if test "${flag_errors}" = yes; then
11028 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
11030as_fn_error $? "linking guile version ${guile_version} test program failed
11031See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11032 fi
11033 fi
11034 fi
11035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11036$as_echo "${found_usable_guile}" >&6; }
11037
e1402065 11038 fi
ed3ef339
DE
11039 ;;
11040yes)
e1402065 11041 if test "${pkg_config_prog_path}" = "missing"; then
63a9e923 11042 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11043 fi
ed3ef339
DE
11044
11045 pkg_config=${pkg_config_prog_path}
11046 guile_version_list=${try_guile_versions}
11047 flag_errors=yes
11048
ed3ef339
DE
11049 found_usable_guile=checking
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11051$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11052 for guile_version in ${guile_version_list}; do
11053 ${pkg_config} --exists ${guile_version} 2>/dev/null
11054 if test $? != 0; then
11055 continue
11056 fi
11057 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11058 if test $? != 0; then
63a9e923 11059 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11060 fi
11061 new_LIBS=`${pkg_config} --libs ${guile_version}`
11062 if test $? != 0; then
63a9e923 11063 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11064 fi
11065 found_usable_guile=${guile_version}
11066 break
11067 done
11068 if test "${found_usable_guile}" = "checking"; then
11069 if test "${flag_errors}" = "yes"; then
63a9e923 11070 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11071 else
11072 found_usable_guile=no
11073 fi
11074 fi
11075 if test "${found_usable_guile}" != no; then
11076 save_CPPFLAGS=$CPPFLAGS
11077 save_LIBS=$LIBS
11078 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11079 LIBS="$LIBS $new_LIBS"
11080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11081/* end confdefs.h. */
11082#include "libguile.h"
11083int
11084main ()
11085{
11086scm_init_guile ();
11087 ;
11088 return 0;
11089}
11090_ACEOF
11091if ac_fn_c_try_link "$LINENO"; then :
11092 have_libguile=yes
11093 GUILE_CPPFLAGS=$new_CPPFLAGS
11094 GUILE_LIBS=$new_LIBS
11095else
11096 found_usable_guile=no
11097fi
11098rm -f core conftest.err conftest.$ac_objext \
11099 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11100 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
63a9e923 11101if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11102
11103$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11104
11105
11106fi
11107
ed3ef339
DE
11108 CPPFLAGS=$save_CPPFLAGS
11109 LIBS=$save_LIBS
11110 if test "${found_usable_guile}" = no; then
11111 if test "${flag_errors}" = yes; then
11112 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11113$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
11114as_fn_error $? "linking guile version ${guile_version} test program failed
11115See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11116 fi
11117 fi
11118 fi
11119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11120$as_echo "${found_usable_guile}" >&6; }
11121
11122 ;;
11123[\\/]* | ?:[\\/]*)
e1402065 11124 if test -x "${with_guile}"; then
ed3ef339
DE
11125
11126 pkg_config=${with_guile}
11127 guile_version_list=${try_guile_versions}
11128 flag_errors=yes
11129
ed3ef339
DE
11130 found_usable_guile=checking
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11132$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11133 for guile_version in ${guile_version_list}; do
11134 ${pkg_config} --exists ${guile_version} 2>/dev/null
11135 if test $? != 0; then
11136 continue
11137 fi
11138 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11139 if test $? != 0; then
63a9e923 11140 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11141 fi
11142 new_LIBS=`${pkg_config} --libs ${guile_version}`
11143 if test $? != 0; then
63a9e923 11144 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11145 fi
11146 found_usable_guile=${guile_version}
11147 break
11148 done
11149 if test "${found_usable_guile}" = "checking"; then
11150 if test "${flag_errors}" = "yes"; then
63a9e923 11151 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11152 else
11153 found_usable_guile=no
11154 fi
11155 fi
11156 if test "${found_usable_guile}" != no; then
11157 save_CPPFLAGS=$CPPFLAGS
11158 save_LIBS=$LIBS
11159 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11160 LIBS="$LIBS $new_LIBS"
11161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11162/* end confdefs.h. */
11163#include "libguile.h"
11164int
11165main ()
11166{
11167scm_init_guile ();
11168 ;
11169 return 0;
11170}
11171_ACEOF
11172if ac_fn_c_try_link "$LINENO"; then :
11173 have_libguile=yes
11174 GUILE_CPPFLAGS=$new_CPPFLAGS
11175 GUILE_LIBS=$new_LIBS
11176else
11177 found_usable_guile=no
11178fi
11179rm -f core conftest.err conftest.$ac_objext \
11180 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11181 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
63a9e923 11182if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11183
11184$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11185
11186
11187fi
11188
ed3ef339
DE
11189 CPPFLAGS=$save_CPPFLAGS
11190 LIBS=$save_LIBS
11191 if test "${found_usable_guile}" = no; then
11192 if test "${flag_errors}" = yes; then
11193 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11194$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
11195as_fn_error $? "linking guile version ${guile_version} test program failed
11196See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11197 fi
11198 fi
11199 fi
11200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11201$as_echo "${found_usable_guile}" >&6; }
11202
e1402065 11203 else
63a9e923 11204 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11205 fi
ed3ef339
DE
11206 ;;
11207"" | */*)
11208 # Disallow --with=guile="" and --with-guile=foo/bar.
63a9e923 11209 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11210 ;;
11211*)
11212 # A space separate list of guile versions to try, in order.
e1402065 11213 if test "${pkg_config_prog_path}" = "missing"; then
63a9e923 11214 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11215 fi
ed3ef339
DE
11216
11217 pkg_config=${pkg_config_prog_path}
11218 guile_version_list=${with_guile}
11219 flag_errors=yes
11220
ed3ef339
DE
11221 found_usable_guile=checking
11222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11223$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11224 for guile_version in ${guile_version_list}; do
11225 ${pkg_config} --exists ${guile_version} 2>/dev/null
11226 if test $? != 0; then
11227 continue
11228 fi
11229 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11230 if test $? != 0; then
63a9e923 11231 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11232 fi
11233 new_LIBS=`${pkg_config} --libs ${guile_version}`
11234 if test $? != 0; then
63a9e923 11235 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11236 fi
11237 found_usable_guile=${guile_version}
11238 break
11239 done
11240 if test "${found_usable_guile}" = "checking"; then
11241 if test "${flag_errors}" = "yes"; then
63a9e923 11242 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11243 else
11244 found_usable_guile=no
11245 fi
11246 fi
11247 if test "${found_usable_guile}" != no; then
11248 save_CPPFLAGS=$CPPFLAGS
11249 save_LIBS=$LIBS
11250 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11251 LIBS="$LIBS $new_LIBS"
11252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11253/* end confdefs.h. */
11254#include "libguile.h"
11255int
11256main ()
11257{
11258scm_init_guile ();
11259 ;
11260 return 0;
11261}
11262_ACEOF
11263if ac_fn_c_try_link "$LINENO"; then :
11264 have_libguile=yes
11265 GUILE_CPPFLAGS=$new_CPPFLAGS
11266 GUILE_LIBS=$new_LIBS
11267else
11268 found_usable_guile=no
11269fi
11270rm -f core conftest.err conftest.$ac_objext \
11271 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11272 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
63a9e923 11273if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11274
11275$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11276
11277
11278fi
11279
ed3ef339
DE
11280 CPPFLAGS=$save_CPPFLAGS
11281 LIBS=$save_LIBS
11282 if test "${found_usable_guile}" = no; then
11283 if test "${flag_errors}" = yes; then
11284 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11285$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
11286as_fn_error $? "linking guile version ${guile_version} test program failed
11287See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11288 fi
11289 fi
11290 fi
11291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11292$as_echo "${found_usable_guile}" >&6; }
11293
11294 ;;
11295esac
11296
e76c5d17 11297if test "${have_libguile}" != no; then
d342a0da
DE
11298 case "${with_guile}" in
11299 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11300
11301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11302$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
63a9e923 11303if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11304 $as_echo_n "(cached) " >&6
11305else
d342a0da 11306 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11307
11308 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11309 # the 'guild' and 'bindir' variables. In that case, try to guess
11310 # what the program name is, at the risk of getting it wrong if
11311 # Guile was configured with '--program-suffix' or similar.
11312 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11313 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11314 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11315 fi
11316
11317fi
11318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11319$as_echo "$ac_cv_guild_program_name" >&6; }
11320
11321 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
63a9e923 11322 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11323 fi
11324
11325 GUILD="$ac_cv_guild_program_name"
11326
11327
d342a0da
DE
11328 ;;
11329 *)
11330
11331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11332$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
63a9e923 11333if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11334 $as_echo_n "(cached) " >&6
11335else
11336 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11337
11338 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11339 # the 'guild' and 'bindir' variables. In that case, try to guess
11340 # what the program name is, at the risk of getting it wrong if
11341 # Guile was configured with '--program-suffix' or similar.
11342 if test "x$ac_cv_guild_program_name" = "x"; then
11343 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11344 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11345 fi
11346
11347fi
11348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11349$as_echo "$ac_cv_guild_program_name" >&6; }
11350
11351 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
63a9e923 11352 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11353 fi
11354
11355 GUILD="$ac_cv_guild_program_name"
11356
11357
11358 ;;
11359 esac
e76c5d17
DE
11360
11361
11362 if test "$cross_compiling" = no; then
11363 GUILD_TARGET_FLAG=
11364 else
11365 GUILD_TARGET_FLAG="--target=$host"
11366 fi
11367
11368
11369
11370
11371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11372$as_echo_n "checking whether guild supports this host... " >&6; }
63a9e923 11373if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11374 $as_echo_n "(cached) " >&6
11375else
11376 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11377 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11378 ac_cv_guild_ok=yes
11379 else
11380 ac_cv_guild_ok=no
11381 fi
11382fi
11383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11384$as_echo "$ac_cv_guild_ok" >&6; }
11385
11386 if test "$ac_cv_guild_ok" = no; then
11387 have_libguile=no
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11389$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11390 fi
11391fi
11392
ed3ef339
DE
11393if test "${have_libguile}" != no; then
11394
11395$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11396
11397 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11398 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11399 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11400 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11401 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11402
11403 save_LIBS="$LIBS"
11404 save_CPPFLAGS="$CPPFLAGS"
11405 LIBS="$GUILE_LIBS"
11406 CPPFLAGS="$GUILE_CPPFLAGS"
11407 for ac_func in scm_new_smob
11408do :
11409 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
63a9e923 11410if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11411 cat >>confdefs.h <<_ACEOF
11412#define HAVE_SCM_NEW_SMOB 1
11413_ACEOF
11414
11415fi
11416done
11417
11418 LIBS="$save_LIBS"
11419 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11420else
11421 # Even if Guile support is not compiled in, we need to have these files
11422 # included.
bd810fff 11423 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11424 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11425fi
9a156167 11426
ac534cba 11427
4df42755
DE
11428 if test "${have_libguile}" != no; then
11429 HAVE_GUILE_TRUE=
11430 HAVE_GUILE_FALSE='#'
11431else
11432 HAVE_GUILE_TRUE='#'
11433 HAVE_GUILE_FALSE=
11434fi
11435
ac534cba 11436
d344e670
DE
11437# --------------------- #
11438# Check for libmcheck. #
11439# --------------------- #
11440
a8db4212
YPK
11441# Enable -lmcheck by default (it provides cheap-enough memory mangling),
11442# but turn it off if Python is enabled with threads, since -lmcheck is
11443# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11444# and for releases.
17ef446e
PA
11445if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11446 && $development; then
11447 libmcheck_default=yes
11448else
11449 libmcheck_default=no
a8db4212
YPK
11450fi
11451
17ef446e
PA
11452 # Check whether --enable-libmcheck was given.
11453if test "${enable_libmcheck+set}" = set; then :
11454 enableval=$enable_libmcheck; case "${enableval}" in
11455 yes | y) ENABLE_LIBMCHECK="yes" ;;
11456 no | n) ENABLE_LIBMCHECK="no" ;;
63a9e923 11457 *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
17ef446e
PA
11458 esac
11459fi
11460
11461
11462 if test -z "${ENABLE_LIBMCHECK}"; then
11463 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 11464 fi
17ef446e
PA
11465
11466 if test "$ENABLE_LIBMCHECK" = "yes" ; then
11467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212 11468$as_echo_n "checking for main in -lmcheck... " >&6; }
63a9e923 11469if ${ac_cv_lib_mcheck_main+:} false; then :
a8db4212
YPK
11470 $as_echo_n "(cached) " >&6
11471else
11472 ac_check_lib_save_LIBS=$LIBS
11473LIBS="-lmcheck $LIBS"
11474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11475/* end confdefs.h. */
11476
11477
11478int
11479main ()
11480{
11481return main ();
11482 ;
11483 return 0;
11484}
11485_ACEOF
11486if ac_fn_c_try_link "$LINENO"; then :
11487 ac_cv_lib_mcheck_main=yes
11488else
11489 ac_cv_lib_mcheck_main=no
11490fi
11491rm -f core conftest.err conftest.$ac_objext \
11492 conftest$ac_exeext conftest.$ac_ext
11493LIBS=$ac_check_lib_save_LIBS
11494fi
11495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11496$as_echo "$ac_cv_lib_mcheck_main" >&6; }
63a9e923 11497if test "x$ac_cv_lib_mcheck_main" = xyes; then :
a8db4212
YPK
11498 cat >>confdefs.h <<_ACEOF
11499#define HAVE_LIBMCHECK 1
11500_ACEOF
11501
11502 LIBS="-lmcheck $LIBS"
11503
11504fi
11505
17ef446e
PA
11506 fi
11507
11508
11509if test "$ENABLE_LIBMCHECK" = "yes" \
11510 -a "${have_libpython}" != "no" \
11511 -a "${python_has_threads}" = "yes" ; then
11512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11513$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
11514fi
11515
58bfce93
MM
11516
11517# Check whether --with-intel_pt was given.
11518if test "${with_intel_pt+set}" = set; then :
11519 withval=$with_intel_pt;
11520else
11521 with_intel_pt=auto
11522fi
11523
11524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11525$as_echo_n "checking whether to use intel pt... " >&6; }
11526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11527$as_echo "$with_intel_pt" >&6; }
11528
11529if test "${with_intel_pt}" = no; then
bc504a31
PA
11530 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11531$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11532 HAVE_LIBIPT=no
11533else
5599c404
MM
11534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11535/* end confdefs.h. */
11536
11537#include <linux/perf_event.h>
11538#ifndef PERF_ATTR_SIZE_VER5
11539# error
11540#endif
11541
11542_ACEOF
11543if ac_fn_c_try_cpp "$LINENO"; then :
11544 perf_event=yes
11545else
11546 perf_event=no
11547fi
63a9e923 11548rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11549 if test "$perf_event" != yes; then
11550 if test "$with_intel_pt" = yes; then
63a9e923 11551 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11552 else
11553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11554$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11555 fi
11556 fi
11557
58bfce93
MM
11558
11559
11560
11561
11562
11563
11564
11565
11566 use_additional=yes
11567
11568 acl_save_prefix="$prefix"
11569 prefix="$acl_final_prefix"
11570 acl_save_exec_prefix="$exec_prefix"
11571 exec_prefix="$acl_final_exec_prefix"
11572
11573 eval additional_includedir=\"$includedir\"
11574 eval additional_libdir=\"$libdir\"
11575
11576 exec_prefix="$acl_save_exec_prefix"
11577 prefix="$acl_save_prefix"
11578
11579
11580# Check whether --with-libipt-prefix was given.
11581if test "${with_libipt_prefix+set}" = set; then :
11582 withval=$with_libipt_prefix;
11583 if test "X$withval" = "Xno"; then
11584 use_additional=no
11585 else
11586 if test "X$withval" = "X"; then
11587
11588 acl_save_prefix="$prefix"
11589 prefix="$acl_final_prefix"
11590 acl_save_exec_prefix="$exec_prefix"
11591 exec_prefix="$acl_final_exec_prefix"
11592
11593 eval additional_includedir=\"$includedir\"
11594 eval additional_libdir=\"$libdir\"
11595
11596 exec_prefix="$acl_save_exec_prefix"
11597 prefix="$acl_save_prefix"
11598
11599 else
11600 additional_includedir="$withval/include"
11601 additional_libdir="$withval/lib"
11602 fi
11603 fi
11604
11605fi
11606
11607 LIBIPT=
11608 LTLIBIPT=
11609 INCIPT=
11610 rpathdirs=
11611 ltrpathdirs=
11612 names_already_handled=
11613 names_next_round='ipt '
11614 while test -n "$names_next_round"; do
11615 names_this_round="$names_next_round"
11616 names_next_round=
11617 for name in $names_this_round; do
11618 already_handled=
11619 for n in $names_already_handled; do
11620 if test "$n" = "$name"; then
11621 already_handled=yes
11622 break
11623 fi
11624 done
11625 if test -z "$already_handled"; then
11626 names_already_handled="$names_already_handled $name"
11627 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11628 eval value=\"\$HAVE_LIB$uppername\"
11629 if test -n "$value"; then
11630 if test "$value" = yes; then
11631 eval value=\"\$LIB$uppername\"
11632 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11633 eval value=\"\$LTLIB$uppername\"
11634 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11635 else
11636 :
11637 fi
11638 else
11639 found_dir=
11640 found_la=
11641 found_so=
11642 found_a=
11643 if test $use_additional = yes; then
11644 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11645 found_dir="$additional_libdir"
11646 found_so="$additional_libdir/lib$name.$shlibext"
11647 if test -f "$additional_libdir/lib$name.la"; then
11648 found_la="$additional_libdir/lib$name.la"
11649 fi
11650 else
11651 if test -f "$additional_libdir/lib$name.$libext"; then
11652 found_dir="$additional_libdir"
11653 found_a="$additional_libdir/lib$name.$libext"
11654 if test -f "$additional_libdir/lib$name.la"; then
11655 found_la="$additional_libdir/lib$name.la"
11656 fi
11657 fi
11658 fi
11659 fi
11660 if test "X$found_dir" = "X"; then
11661 for x in $LDFLAGS $LTLIBIPT; do
11662
11663 acl_save_prefix="$prefix"
11664 prefix="$acl_final_prefix"
11665 acl_save_exec_prefix="$exec_prefix"
11666 exec_prefix="$acl_final_exec_prefix"
11667 eval x=\"$x\"
11668 exec_prefix="$acl_save_exec_prefix"
11669 prefix="$acl_save_prefix"
11670
11671 case "$x" in
11672 -L*)
11673 dir=`echo "X$x" | sed -e 's/^X-L//'`
11674 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11675 found_dir="$dir"
11676 found_so="$dir/lib$name.$shlibext"
11677 if test -f "$dir/lib$name.la"; then
11678 found_la="$dir/lib$name.la"
11679 fi
11680 else
11681 if test -f "$dir/lib$name.$libext"; then
11682 found_dir="$dir"
11683 found_a="$dir/lib$name.$libext"
11684 if test -f "$dir/lib$name.la"; then
11685 found_la="$dir/lib$name.la"
11686 fi
11687 fi
11688 fi
11689 ;;
11690 esac
11691 if test "X$found_dir" != "X"; then
11692 break
11693 fi
11694 done
11695 fi
11696 if test "X$found_dir" != "X"; then
11697 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11698 if test "X$found_so" != "X"; then
11699 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11700 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11701 else
11702 haveit=
11703 for x in $ltrpathdirs; do
11704 if test "X$x" = "X$found_dir"; then
11705 haveit=yes
11706 break
11707 fi
11708 done
11709 if test -z "$haveit"; then
11710 ltrpathdirs="$ltrpathdirs $found_dir"
11711 fi
11712 if test "$hardcode_direct" = yes; then
11713 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11714 else
11715 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11716 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11717 haveit=
11718 for x in $rpathdirs; do
11719 if test "X$x" = "X$found_dir"; then
11720 haveit=yes
11721 break
11722 fi
11723 done
11724 if test -z "$haveit"; then
11725 rpathdirs="$rpathdirs $found_dir"
11726 fi
11727 else
11728 haveit=
11729 for x in $LDFLAGS $LIBIPT; do
11730
11731 acl_save_prefix="$prefix"
11732 prefix="$acl_final_prefix"
11733 acl_save_exec_prefix="$exec_prefix"
11734 exec_prefix="$acl_final_exec_prefix"
11735 eval x=\"$x\"
11736 exec_prefix="$acl_save_exec_prefix"
11737 prefix="$acl_save_prefix"
11738
11739 if test "X$x" = "X-L$found_dir"; then
11740 haveit=yes
11741 break
11742 fi
11743 done
11744 if test -z "$haveit"; then
11745 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11746 fi
11747 if test "$hardcode_minus_L" != no; then
11748 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11749 else
11750 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11751 fi
11752 fi
11753 fi
11754 fi
11755 else
11756 if test "X$found_a" != "X"; then
11757 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11758 else
11759 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11760 fi
11761 fi
11762 additional_includedir=
11763 case "$found_dir" in
11764 */lib | */lib/)
11765 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11766 additional_includedir="$basedir/include"
11767 ;;
11768 esac
11769 if test "X$additional_includedir" != "X"; then
11770 if test "X$additional_includedir" != "X/usr/include"; then
11771 haveit=
11772 if test "X$additional_includedir" = "X/usr/local/include"; then
11773 if test -n "$GCC"; then
11774 case $host_os in
11775 linux*) haveit=yes;;
11776 esac
11777 fi
11778 fi
11779 if test -z "$haveit"; then
11780 for x in $CPPFLAGS $INCIPT; do
11781
11782 acl_save_prefix="$prefix"
11783 prefix="$acl_final_prefix"
11784 acl_save_exec_prefix="$exec_prefix"
11785 exec_prefix="$acl_final_exec_prefix"
11786 eval x=\"$x\"
11787 exec_prefix="$acl_save_exec_prefix"
11788 prefix="$acl_save_prefix"
11789
11790 if test "X$x" = "X-I$additional_includedir"; then
11791 haveit=yes
11792 break
11793 fi
11794 done
11795 if test -z "$haveit"; then
11796 if test -d "$additional_includedir"; then
11797 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11798 fi
11799 fi
11800 fi
11801 fi
11802 fi
11803 if test -n "$found_la"; then
11804 save_libdir="$libdir"
11805 case "$found_la" in
11806 */* | *\\*) . "$found_la" ;;
11807 *) . "./$found_la" ;;
11808 esac
11809 libdir="$save_libdir"
11810 for dep in $dependency_libs; do
11811 case "$dep" in
11812 -L*)
11813 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11814 if test "X$additional_libdir" != "X/usr/lib"; then
11815 haveit=
11816 if test "X$additional_libdir" = "X/usr/local/lib"; then
11817 if test -n "$GCC"; then
11818 case $host_os in
11819 linux*) haveit=yes;;
11820 esac
11821 fi
11822 fi
11823 if test -z "$haveit"; then
11824 haveit=
11825 for x in $LDFLAGS $LIBIPT; do
11826
11827 acl_save_prefix="$prefix"
11828 prefix="$acl_final_prefix"
11829 acl_save_exec_prefix="$exec_prefix"
11830 exec_prefix="$acl_final_exec_prefix"
11831 eval x=\"$x\"
11832 exec_prefix="$acl_save_exec_prefix"
11833 prefix="$acl_save_prefix"
11834
11835 if test "X$x" = "X-L$additional_libdir"; then
11836 haveit=yes
11837 break
11838 fi
11839 done
11840 if test -z "$haveit"; then
11841 if test -d "$additional_libdir"; then
11842 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11843 fi
11844 fi
11845 haveit=
11846 for x in $LDFLAGS $LTLIBIPT; do
11847
11848 acl_save_prefix="$prefix"
11849 prefix="$acl_final_prefix"
11850 acl_save_exec_prefix="$exec_prefix"
11851 exec_prefix="$acl_final_exec_prefix"
11852 eval x=\"$x\"
11853 exec_prefix="$acl_save_exec_prefix"
11854 prefix="$acl_save_prefix"
11855
11856 if test "X$x" = "X-L$additional_libdir"; then
11857 haveit=yes
11858 break
11859 fi
11860 done
11861 if test -z "$haveit"; then
11862 if test -d "$additional_libdir"; then
11863 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11864 fi
11865 fi
11866 fi
11867 fi
11868 ;;
11869 -R*)
11870 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11871 if test "$enable_rpath" != no; then
11872 haveit=
11873 for x in $rpathdirs; do
11874 if test "X$x" = "X$dir"; then
11875 haveit=yes
11876 break
11877 fi
11878 done
11879 if test -z "$haveit"; then
11880 rpathdirs="$rpathdirs $dir"
11881 fi
11882 haveit=
11883 for x in $ltrpathdirs; do
11884 if test "X$x" = "X$dir"; then
11885 haveit=yes
11886 break
11887 fi
11888 done
11889 if test -z "$haveit"; then
11890 ltrpathdirs="$ltrpathdirs $dir"
11891 fi
11892 fi
11893 ;;
11894 -l*)
11895 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11896 ;;
11897 *.la)
11898 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11899 ;;
11900 *)
11901 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11902 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11903 ;;
11904 esac
11905 done
11906 fi
11907 else
11908 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11909 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11910 fi
11911 fi
11912 fi
11913 done
11914 done
11915 if test "X$rpathdirs" != "X"; then
11916 if test -n "$hardcode_libdir_separator"; then
11917 alldirs=
11918 for found_dir in $rpathdirs; do
11919 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11920 done
11921 acl_save_libdir="$libdir"
11922 libdir="$alldirs"
11923 eval flag=\"$hardcode_libdir_flag_spec\"
11924 libdir="$acl_save_libdir"
11925 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11926 else
11927 for found_dir in $rpathdirs; do
11928 acl_save_libdir="$libdir"
11929 libdir="$found_dir"
11930 eval flag=\"$hardcode_libdir_flag_spec\"
11931 libdir="$acl_save_libdir"
11932 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11933 done
11934 fi
11935 fi
11936 if test "X$ltrpathdirs" != "X"; then
11937 for found_dir in $ltrpathdirs; do
11938 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11939 done
11940 fi
11941
11942
11943 ac_save_CPPFLAGS="$CPPFLAGS"
11944
11945 for element in $INCIPT; do
11946 haveit=
11947 for x in $CPPFLAGS; do
11948
11949 acl_save_prefix="$prefix"
11950 prefix="$acl_final_prefix"
11951 acl_save_exec_prefix="$exec_prefix"
11952 exec_prefix="$acl_final_exec_prefix"
11953 eval x=\"$x\"
11954 exec_prefix="$acl_save_exec_prefix"
11955 prefix="$acl_save_prefix"
11956
11957 if test "X$x" = "X$element"; then
11958 haveit=yes
11959 break
11960 fi
11961 done
11962 if test -z "$haveit"; then
11963 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11964 fi
11965 done
11966
11967
11968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11969$as_echo_n "checking for libipt... " >&6; }
63a9e923 11970if ${ac_cv_libipt+:} false; then :
58bfce93
MM
11971 $as_echo_n "(cached) " >&6
11972else
11973
11974 ac_save_LIBS="$LIBS"
11975 LIBS="$LIBS $LIBIPT"
11976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11977/* end confdefs.h. */
11978#include "intel-pt.h"
11979int
11980main ()
11981{
11982pt_insn_alloc_decoder (0);
11983 ;
11984 return 0;
11985}
11986_ACEOF
11987if ac_fn_c_try_link "$LINENO"; then :
11988 ac_cv_libipt=yes
11989else
11990 ac_cv_libipt=no
11991fi
11992rm -f core conftest.err conftest.$ac_objext \
11993 conftest$ac_exeext conftest.$ac_ext
11994 LIBS="$ac_save_LIBS"
11995
11996fi
11997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11998$as_echo "$ac_cv_libipt" >&6; }
11999 if test "$ac_cv_libipt" = yes; then
12000 HAVE_LIBIPT=yes
12001
12002$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
12003
12004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
12005$as_echo_n "checking how to link with libipt... " >&6; }
12006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
12007$as_echo "$LIBIPT" >&6; }
12008 else
12009 HAVE_LIBIPT=no
12010 CPPFLAGS="$ac_save_CPPFLAGS"
12011 LIBIPT=
12012 LTLIBIPT=
12013 fi
12014
12015
12016
12017
12018
12019
12020 if test "$HAVE_LIBIPT" != yes; then
12021 if test "$with_intel_pt" = yes; then
63a9e923 12022 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
12023 else
12024 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
12025$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
12026 fi
c56ccc05
MM
12027 else
12028 save_LIBS=$LIBS
12029 LIBS="$LIBS $LIBIPT"
12030 for ac_func in pt_insn_event
12031do :
12032 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
63a9e923 12033if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
12034 cat >>confdefs.h <<_ACEOF
12035#define HAVE_PT_INSN_EVENT 1
12036_ACEOF
12037
12038fi
12039done
12040
12041 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
12042"
63a9e923 12043if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
12044
12045cat >>confdefs.h <<_ACEOF
12046#define HAVE_STRUCT_PT_INSN_ENABLED 1
12047_ACEOF
12048
12049
12050fi
12051ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
12052"
63a9e923 12053if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
12054
12055cat >>confdefs.h <<_ACEOF
12056#define HAVE_STRUCT_PT_INSN_RESYNCED 1
12057_ACEOF
12058
12059
12060fi
12061
12062 LIBS=$save_LIBS
58bfce93
MM
12063 fi
12064fi
12065
81ecdfbb
RW
12066# ------------------------- #
12067# Checks for header files. #
12068# ------------------------- #
c890192f 12069
81ecdfbb
RW
12070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12071$as_echo_n "checking for ANSI C header files... " >&6; }
63a9e923 12072if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12073 $as_echo_n "(cached) " >&6
bec39cab 12074else
81ecdfbb 12075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12076/* end confdefs.h. */
81ecdfbb
RW
12077#include <stdlib.h>
12078#include <stdarg.h>
12079#include <string.h>
12080#include <float.h>
12081
a9322a30
TT
12082int
12083main ()
12084{
a9322a30
TT
12085
12086 ;
12087 return 0;
12088}
bec39cab 12089_ACEOF
81ecdfbb
RW
12090if ac_fn_c_try_compile "$LINENO"; then :
12091 ac_cv_header_stdc=yes
bec39cab 12092else
81ecdfbb 12093 ac_cv_header_stdc=no
a9322a30 12094fi
81ecdfbb 12095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12096
81ecdfbb
RW
12097if test $ac_cv_header_stdc = yes; then
12098 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12100/* end confdefs.h. */
12101#include <string.h>
bec39cab 12102
81ecdfbb
RW
12103_ACEOF
12104if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12105 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12106
bec39cab 12107else
81ecdfbb
RW
12108 ac_cv_header_stdc=no
12109fi
12110rm -f conftest*
12111
12112fi
12113
12114if test $ac_cv_header_stdc = yes; then
12115 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12117/* end confdefs.h. */
12118#include <stdlib.h>
12119
bec39cab 12120_ACEOF
81ecdfbb
RW
12121if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12122 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 12123
81ecdfbb
RW
12124else
12125 ac_cv_header_stdc=no
12126fi
12127rm -f conftest*
bec39cab 12128
bec39cab 12129fi
81ecdfbb
RW
12130
12131if test $ac_cv_header_stdc = yes; then
12132 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12133 if test "$cross_compiling" = yes; then :
12134 :
bec39cab 12135else
81ecdfbb 12136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12137/* end confdefs.h. */
81ecdfbb
RW
12138#include <ctype.h>
12139#include <stdlib.h>
12140#if ((' ' & 0x0FF) == 0x020)
12141# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12142# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12143#else
12144# define ISLOWER(c) \
12145 (('a' <= (c) && (c) <= 'i') \
12146 || ('j' <= (c) && (c) <= 'r') \
12147 || ('s' <= (c) && (c) <= 'z'))
12148# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12149#endif
12150
12151#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12152int
12153main ()
12154{
81ecdfbb
RW
12155 int i;
12156 for (i = 0; i < 256; i++)
12157 if (XOR (islower (i), ISLOWER (i))
12158 || toupper (i) != TOUPPER (i))
12159 return 2;
a9322a30
TT
12160 return 0;
12161}
bec39cab 12162_ACEOF
81ecdfbb
RW
12163if ac_fn_c_try_run "$LINENO"; then :
12164
bec39cab 12165else
81ecdfbb
RW
12166 ac_cv_header_stdc=no
12167fi
12168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12169 conftest.$ac_objext conftest.beam conftest.$ac_ext
12170fi
bec39cab 12171
bec39cab 12172fi
a9322a30 12173fi
81ecdfbb
RW
12174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12175$as_echo "$ac_cv_header_stdc" >&6; }
12176if test $ac_cv_header_stdc = yes; then
bec39cab 12177
81ecdfbb 12178$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12179
81ecdfbb 12180fi
bec39cab 12181
81ecdfbb 12182# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12183for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 12184 thread_db.h \
81ecdfbb
RW
12185 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12186 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 12187 sys/reg.h sys/debugreg.h sys/select.h \
726e1356 12188 termios.h elf_hp.h \
9467110b 12189 dlfcn.h
81ecdfbb
RW
12190do :
12191 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12192ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
63a9e923 12193if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12194 cat >>confdefs.h <<_ACEOF
81ecdfbb 12195#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12196_ACEOF
c906108c 12197
bec39cab 12198fi
81ecdfbb
RW
12199
12200done
12201
81ecdfbb
RW
12202for ac_header in sys/user.h
12203do :
12204 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12205# include <sys/param.h>
a9322a30
TT
12206#endif
12207
81ecdfbb 12208"
63a9e923 12209if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
12210 cat >>confdefs.h <<_ACEOF
12211#define HAVE_SYS_USER_H 1
bec39cab 12212_ACEOF
bec39cab 12213
a9322a30 12214fi
bec39cab 12215
81ecdfbb 12216done
5ee754fc 12217
5ee754fc 12218
5007d765 12219for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12220do :
12221 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12222ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
63a9e923 12223if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12224 cat >>confdefs.h <<_ACEOF
81ecdfbb 12225#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12226_ACEOF
5ee754fc
MK
12227
12228fi
12229
81ecdfbb 12230done
bec39cab 12231
81ecdfbb
RW
12232for ac_header in term.h
12233do :
12234 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12235# include <curses.h>
12236#endif
bec39cab 12237
81ecdfbb 12238"
63a9e923 12239if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12240 cat >>confdefs.h <<_ACEOF
12241#define HAVE_TERM_H 1
a8111142 12242_ACEOF
a8111142 12243
a8111142 12244fi
a8111142 12245
81ecdfbb 12246done
a8111142
TT
12247
12248
81ecdfbb
RW
12249# ------------------------- #
12250# Checks for declarations. #
12251# ------------------------- #
a9322a30 12252
07697489
PA
12253
12254 # Check for presence and size of long long.
12255 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
63a9e923 12256if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12257
12258cat >>confdefs.h <<_ACEOF
12259#define HAVE_LONG_LONG 1
12260_ACEOF
12261
12262# The cast to long int works around a bug in the HP C Compiler
12263# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12264# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12265# This bug is HP SR number 8606223364.
12266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12267$as_echo_n "checking size of long long... " >&6; }
63a9e923 12268if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12269 $as_echo_n "(cached) " >&6
12270else
12271 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12272
12273else
12274 if test "$ac_cv_type_long_long" = yes; then
12275 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
63a9e923
SM
12277as_fn_error 77 "cannot compute sizeof (long long)
12278See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12279 else
12280 ac_cv_sizeof_long_long=0
12281 fi
12282fi
12283
12284fi
12285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12286$as_echo "$ac_cv_sizeof_long_long" >&6; }
12287
12288
12289
12290cat >>confdefs.h <<_ACEOF
12291#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12292_ACEOF
12293
12294
12295fi
12296
12297
63a9e923
SM
12298 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12299ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12300if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12301 ac_have_decl=1
12302else
12303 ac_have_decl=0
12304fi
12305
12306cat >>confdefs.h <<_ACEOF
12307#define HAVE_DECL_BASENAME $ac_have_decl
12308_ACEOF
12309ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
63a9e923 12310if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12311 ac_have_decl=1
12312else
12313 ac_have_decl=0
12314fi
12315
12316cat >>confdefs.h <<_ACEOF
12317#define HAVE_DECL_FFS $ac_have_decl
12318_ACEOF
12319ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
63a9e923 12320if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12321 ac_have_decl=1
12322else
12323 ac_have_decl=0
12324fi
12325
12326cat >>confdefs.h <<_ACEOF
12327#define HAVE_DECL_ASPRINTF $ac_have_decl
12328_ACEOF
12329ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
63a9e923 12330if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12331 ac_have_decl=1
12332else
12333 ac_have_decl=0
12334fi
12335
12336cat >>confdefs.h <<_ACEOF
12337#define HAVE_DECL_VASPRINTF $ac_have_decl
12338_ACEOF
12339ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
63a9e923 12340if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12341 ac_have_decl=1
12342else
12343 ac_have_decl=0
12344fi
12345
12346cat >>confdefs.h <<_ACEOF
12347#define HAVE_DECL_SNPRINTF $ac_have_decl
12348_ACEOF
12349ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
63a9e923 12350if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12351 ac_have_decl=1
12352else
12353 ac_have_decl=0
12354fi
12355
12356cat >>confdefs.h <<_ACEOF
12357#define HAVE_DECL_VSNPRINTF $ac_have_decl
12358_ACEOF
12359
12360 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
63a9e923 12361if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
12362 ac_have_decl=1
12363else
12364 ac_have_decl=0
12365fi
12366
12367cat >>confdefs.h <<_ACEOF
12368#define HAVE_DECL_STRTOL $ac_have_decl
12369_ACEOF
12370ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
63a9e923 12371if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
12372 ac_have_decl=1
12373else
12374 ac_have_decl=0
12375fi
12376
12377cat >>confdefs.h <<_ACEOF
12378#define HAVE_DECL_STRTOUL $ac_have_decl
12379_ACEOF
12380ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
63a9e923 12381if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
12382 ac_have_decl=1
12383else
12384 ac_have_decl=0
12385fi
12386
12387cat >>confdefs.h <<_ACEOF
12388#define HAVE_DECL_STRTOLL $ac_have_decl
12389_ACEOF
12390ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
63a9e923 12391if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12392 ac_have_decl=1
12393else
12394 ac_have_decl=0
12395fi
12396
12397cat >>confdefs.h <<_ACEOF
12398#define HAVE_DECL_STRTOULL $ac_have_decl
12399_ACEOF
12400
12401 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
63a9e923 12402if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
12403 ac_have_decl=1
12404else
12405 ac_have_decl=0
12406fi
12407
12408cat >>confdefs.h <<_ACEOF
12409#define HAVE_DECL_STRVERSCMP $ac_have_decl
12410_ACEOF
12411
12412
12413
81ecdfbb 12414ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
63a9e923 12415if test "x$ac_cv_have_decl_free" = xyes; then :
81ecdfbb 12416 ac_have_decl=1
bec39cab 12417else
81ecdfbb
RW
12418 ac_have_decl=0
12419fi
12420
12421cat >>confdefs.h <<_ACEOF
12422#define HAVE_DECL_FREE $ac_have_decl
bec39cab 12423_ACEOF
81ecdfbb 12424ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
63a9e923 12425if test "x$ac_cv_have_decl_malloc" = xyes; then :
81ecdfbb
RW
12426 ac_have_decl=1
12427else
12428 ac_have_decl=0
12429fi
12430
12431cat >>confdefs.h <<_ACEOF
12432#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 12433_ACEOF
81ecdfbb 12434ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
63a9e923 12435if test "x$ac_cv_have_decl_realloc" = xyes; then :
81ecdfbb 12436 ac_have_decl=1
bec39cab 12437else
81ecdfbb
RW
12438 ac_have_decl=0
12439fi
bec39cab 12440
81ecdfbb
RW
12441cat >>confdefs.h <<_ACEOF
12442#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 12443_ACEOF
81ecdfbb 12444ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
63a9e923 12445if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12446 ac_have_decl=1
12447else
12448 ac_have_decl=0
5ee754fc 12449fi
81ecdfbb
RW
12450
12451cat >>confdefs.h <<_ACEOF
12452#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12453_ACEOF
5ee754fc 12454
5ee754fc 12455
81ecdfbb
RW
12456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12457$as_echo_n "checking for LC_MESSAGES... " >&6; }
63a9e923 12458if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12459 $as_echo_n "(cached) " >&6
bec39cab 12460else
81ecdfbb 12461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12462/* end confdefs.h. */
81ecdfbb 12463#include <locale.h>
a9322a30
TT
12464int
12465main ()
12466{
81ecdfbb 12467return LC_MESSAGES
a9322a30
TT
12468 ;
12469 return 0;
12470}
bec39cab 12471_ACEOF
81ecdfbb
RW
12472if ac_fn_c_try_link "$LINENO"; then :
12473 am_cv_val_LC_MESSAGES=yes
bec39cab 12474else
81ecdfbb
RW
12475 am_cv_val_LC_MESSAGES=no
12476fi
12477rm -f core conftest.err conftest.$ac_objext \
12478 conftest$ac_exeext conftest.$ac_ext
12479fi
12480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12481$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12482 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12483
81ecdfbb
RW
12484$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12485
12486 fi
12487
12488
12489# ----------------------- #
12490# Checks for structures. #
12491# ----------------------- #
12492
12493ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
63a9e923 12494if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12495
12496cat >>confdefs.h <<_ACEOF
12497#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12498_ACEOF
7eb368b3 12499
81ecdfbb 12500
7eb368b3 12501fi
81ecdfbb 12502ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
63a9e923 12503if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12504
a9322a30
TT
12505cat >>confdefs.h <<_ACEOF
12506#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12507_ACEOF
12508
a9322a30 12509
7eb368b3
NR
12510fi
12511
7eb368b3 12512
a9322a30
TT
12513# ------------------ #
12514# Checks for types. #
12515# ------------------ #
7eb368b3 12516
81ecdfbb 12517ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12518#include <sys/socket.h>
12519
81ecdfbb 12520"
63a9e923 12521if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12522
a9322a30
TT
12523cat >>confdefs.h <<_ACEOF
12524#define HAVE_SOCKLEN_T 1
12525_ACEOF
12526
12527
12528fi
12529
12530
12531# ------------------------------------- #
12532# Checks for compiler characteristics. #
12533# ------------------------------------- #
12534
81ecdfbb
RW
12535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12536$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
63a9e923 12537if ${ac_cv_c_const+:} false; then :
81ecdfbb 12538 $as_echo_n "(cached) " >&6
a9322a30 12539else
81ecdfbb 12540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12541/* end confdefs.h. */
a9322a30
TT
12542
12543int
12544main ()
12545{
63a9e923 12546
a9322a30 12547#ifndef __cplusplus
63a9e923 12548 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12549 typedef int charset[2];
63a9e923 12550 const charset cs = { 0, 0 };
a9322a30 12551 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12552 char const *const *pcpcc;
12553 char **ppc;
a9322a30
TT
12554 /* NEC SVR4.0.2 mips cc rejects this. */
12555 struct point {int x, y;};
12556 static struct point const zero = {0,0};
12557 /* AIX XL C 1.02.0.0 rejects this.
12558 It does not let you subtract one const X* pointer from another in
12559 an arm of an if-expression whose if-part is not a constant
12560 expression */
12561 const char *g = "string";
81ecdfbb 12562 pcpcc = &g + (g ? g-g : 0);
a9322a30 12563 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12564 ++pcpcc;
12565 ppc = (char**) pcpcc;
12566 pcpcc = (char const *const *) ppc;
63a9e923
SM
12567 { /* SCO 3.2v4 cc rejects this sort of thing. */
12568 char tx;
12569 char *t = &tx;
a9322a30
TT
12570 char const *s = 0 ? (char *) 0 : (char const *) 0;
12571
12572 *t++ = 0;
81ecdfbb 12573 if (s) return 0;
a9322a30
TT
12574 }
12575 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12576 int x[] = {25, 17};
12577 const int *foo = &x[0];
12578 ++foo;
12579 }
12580 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12581 typedef const int *iptr;
12582 iptr p = 0;
12583 ++p;
12584 }
63a9e923 12585 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12586 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
63a9e923
SM
12587 struct s { int j; const int *ap[3]; } bx;
12588 struct s *b = &bx; b->j = 5;
a9322a30
TT
12589 }
12590 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12591 const int foo = 10;
81ecdfbb 12592 if (!foo) return 0;
a9322a30 12593 }
81ecdfbb 12594 return !cs[0] && !zero.x;
a9322a30
TT
12595#endif
12596
12597 ;
12598 return 0;
12599}
bec39cab 12600_ACEOF
81ecdfbb 12601if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12602 ac_cv_c_const=yes
5ee754fc 12603else
81ecdfbb 12604 ac_cv_c_const=no
5ee754fc 12605fi
81ecdfbb 12606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12607fi
81ecdfbb
RW
12608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12609$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12610if test $ac_cv_c_const = no; then
bec39cab 12611
81ecdfbb 12612$as_echo "#define const /**/" >>confdefs.h
bec39cab 12613
5ee754fc 12614fi
bec39cab 12615
81ecdfbb
RW
12616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12617$as_echo_n "checking for inline... " >&6; }
63a9e923 12618if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12619 $as_echo_n "(cached) " >&6
bec39cab 12620else
a9322a30
TT
12621 ac_cv_c_inline=no
12622for ac_kw in inline __inline__ __inline; do
81ecdfbb 12623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12624/* end confdefs.h. */
a9322a30
TT
12625#ifndef __cplusplus
12626typedef int foo_t;
12627static $ac_kw foo_t static_foo () {return 0; }
12628$ac_kw foo_t foo () {return 0; }
12629#endif
12630
bec39cab 12631_ACEOF
81ecdfbb
RW
12632if ac_fn_c_try_compile "$LINENO"; then :
12633 ac_cv_c_inline=$ac_kw
bec39cab 12634fi
81ecdfbb
RW
12635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12636 test "$ac_cv_c_inline" != no && break
a9322a30 12637done
bec39cab 12638
5ee754fc 12639fi
81ecdfbb
RW
12640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12641$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12642
a9322a30
TT
12643case $ac_cv_c_inline in
12644 inline | yes) ;;
12645 *)
12646 case $ac_cv_c_inline in
12647 no) ac_val=;;
12648 *) ac_val=$ac_cv_c_inline;;
12649 esac
12650 cat >>confdefs.h <<_ACEOF
12651#ifndef __cplusplus
12652#define inline $ac_val
12653#endif
12654_ACEOF
bec39cab
AC
12655 ;;
12656esac
bec39cab 12657
81ecdfbb
RW
12658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12659$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
63a9e923 12660if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12661 $as_echo_n "(cached) " >&6
bec39cab 12662else
81ecdfbb
RW
12663 ac_cv_c_bigendian=unknown
12664 # See if we're dealing with a universal compiler.
12665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12666/* end confdefs.h. */
12667#ifndef __APPLE_CC__
12668 not a universal capable compiler
12669 #endif
12670 typedef int dummy;
12671
12672_ACEOF
12673if ac_fn_c_try_compile "$LINENO"; then :
12674
12675 # Check for potential -arch flags. It is not universal unless
12676 # there are at least two -arch flags with different values.
12677 ac_arch=
12678 ac_prev=
12679 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12680 if test -n "$ac_prev"; then
12681 case $ac_word in
12682 i?86 | x86_64 | ppc | ppc64)
12683 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12684 ac_arch=$ac_word
12685 else
12686 ac_cv_c_bigendian=universal
12687 break
12688 fi
12689 ;;
12690 esac
12691 ac_prev=
12692 elif test "x$ac_word" = "x-arch"; then
12693 ac_prev=arch
12694 fi
12695 done
12696fi
12697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12698 if test $ac_cv_c_bigendian = unknown; then
12699 # See if sys/param.h defines the BYTE_ORDER macro.
12700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12701/* end confdefs.h. */
a9322a30 12702#include <sys/types.h>
81ecdfbb 12703 #include <sys/param.h>
a9322a30
TT
12704
12705int
12706main ()
12707{
81ecdfbb
RW
12708#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12709 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12710 && LITTLE_ENDIAN)
12711 bogus endian macros
12712 #endif
a9322a30
TT
12713
12714 ;
12715 return 0;
12716}
bec39cab 12717_ACEOF
81ecdfbb 12718if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12719 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12721/* end confdefs.h. */
a9322a30 12722#include <sys/types.h>
81ecdfbb 12723 #include <sys/param.h>
a9322a30
TT
12724
12725int
12726main ()
12727{
12728#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12729 not big endian
12730 #endif
a9322a30
TT
12731
12732 ;
12733 return 0;
12734}
bec39cab 12735_ACEOF
81ecdfbb 12736if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12737 ac_cv_c_bigendian=yes
5ee754fc 12738else
81ecdfbb 12739 ac_cv_c_bigendian=no
5ee754fc 12740fi
81ecdfbb
RW
12741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12742fi
12743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12744 fi
12745 if test $ac_cv_c_bigendian = unknown; then
12746 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12748/* end confdefs.h. */
12749#include <limits.h>
bec39cab 12750
81ecdfbb
RW
12751int
12752main ()
12753{
12754#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12755 bogus endian macros
12756 #endif
12757
12758 ;
12759 return 0;
12760}
7eb368b3 12761_ACEOF
81ecdfbb
RW
12762if ac_fn_c_try_compile "$LINENO"; then :
12763 # It does; now see whether it defined to _BIG_ENDIAN or not.
12764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12765/* end confdefs.h. */
81ecdfbb
RW
12766#include <limits.h>
12767
7eb368b3
NR
12768int
12769main ()
12770{
81ecdfbb
RW
12771#ifndef _BIG_ENDIAN
12772 not big endian
12773 #endif
12774
7eb368b3
NR
12775 ;
12776 return 0;
12777}
12778_ACEOF
81ecdfbb 12779if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12780 ac_cv_c_bigendian=yes
81ecdfbb
RW
12781else
12782 ac_cv_c_bigendian=no
a9322a30 12783fi
81ecdfbb 12784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12785fi
81ecdfbb
RW
12786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12787 fi
12788 if test $ac_cv_c_bigendian = unknown; then
12789 # Compile a test program.
12790 if test "$cross_compiling" = yes; then :
12791 # Try to guess by grepping values from an object file.
12792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12793/* end confdefs.h. */
12794short int ascii_mm[] =
12795 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12796 short int ascii_ii[] =
12797 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12798 int use_ascii (int i) {
12799 return ascii_mm[i] + ascii_ii[i];
12800 }
12801 short int ebcdic_ii[] =
12802 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12803 short int ebcdic_mm[] =
12804 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12805 int use_ebcdic (int i) {
12806 return ebcdic_mm[i] + ebcdic_ii[i];
12807 }
12808 extern int foo;
7eb368b3 12809
81ecdfbb
RW
12810int
12811main ()
12812{
12813return use_ascii (foo) == use_ebcdic (foo);
12814 ;
12815 return 0;
12816}
12817_ACEOF
12818if ac_fn_c_try_compile "$LINENO"; then :
12819 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12820 ac_cv_c_bigendian=yes
12821 fi
12822 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12823 if test "$ac_cv_c_bigendian" = unknown; then
12824 ac_cv_c_bigendian=no
12825 else
12826 # finding both strings is unlikely to happen, but who knows?
12827 ac_cv_c_bigendian=unknown
12828 fi
12829 fi
7eb368b3 12830fi
81ecdfbb 12831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12832else
81ecdfbb 12833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12834/* end confdefs.h. */
81ecdfbb 12835$ac_includes_default
d3ea6809
MM
12836int
12837main ()
12838{
81ecdfbb
RW
12839
12840 /* Are we little or big endian? From Harbison&Steele. */
12841 union
12842 {
12843 long int l;
12844 char c[sizeof (long int)];
12845 } u;
12846 u.l = 1;
12847 return u.c[sizeof (long int) - 1] == 1;
12848
12849 ;
12850 return 0;
d3ea6809
MM
12851}
12852_ACEOF
81ecdfbb 12853if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12854 ac_cv_c_bigendian=no
d3ea6809 12855else
81ecdfbb 12856 ac_cv_c_bigendian=yes
d3ea6809 12857fi
81ecdfbb
RW
12858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12859 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12860fi
a9322a30 12861
81ecdfbb
RW
12862 fi
12863fi
12864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12865$as_echo "$ac_cv_c_bigendian" >&6; }
12866 case $ac_cv_c_bigendian in #(
12867 yes)
12868 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12869;; #(
12870 no)
12871 ;; #(
12872 universal)
12873
12874$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12875
12876 ;; #(
12877 *)
63a9e923 12878 as_fn_error $? "unknown endianness
81ecdfbb
RW
12879 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12880 esac
d3ea6809
MM
12881
12882
a9322a30
TT
12883# ------------------------------ #
12884# Checks for library functions. #
12885# ------------------------------ #
d3ea6809 12886
63a9e923
SM
12887
12888
12889
12890 for ac_header in $ac_header_list
81ecdfbb
RW
12891do :
12892 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
63a9e923
SM
12893ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12894"
12895if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12896 cat >>confdefs.h <<_ACEOF
81ecdfbb 12897#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12898_ACEOF
b757528f 12899
b757528f 12900fi
bec39cab 12901
a9322a30 12902done
a3828db0 12903
63a9e923
SM
12904
12905
12906
12907
12908
12909
12910
a9322a30 12911for ac_func in getpagesize
81ecdfbb
RW
12912do :
12913 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
63a9e923 12914if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12915 cat >>confdefs.h <<_ACEOF
81ecdfbb 12916#define HAVE_GETPAGESIZE 1
bec39cab 12917_ACEOF
bcb3dc3d 12918
bcb3dc3d
MK
12919fi
12920done
12921
81ecdfbb
RW
12922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12923$as_echo_n "checking for working mmap... " >&6; }
63a9e923 12924if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12925 $as_echo_n "(cached) " >&6
a9322a30 12926else
81ecdfbb 12927 if test "$cross_compiling" = yes; then :
a9322a30 12928 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12929else
81ecdfbb 12930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12931/* end confdefs.h. */
a9322a30
TT
12932$ac_includes_default
12933/* malloc might have been renamed as rpl_malloc. */
12934#undef malloc
bec39cab 12935
a9322a30
TT
12936/* Thanks to Mike Haertel and Jim Avera for this test.
12937 Here is a matrix of mmap possibilities:
12938 mmap private not fixed
12939 mmap private fixed at somewhere currently unmapped
12940 mmap private fixed at somewhere already mapped
12941 mmap shared not fixed
12942 mmap shared fixed at somewhere currently unmapped
12943 mmap shared fixed at somewhere already mapped
12944 For private mappings, we should verify that changes cannot be read()
12945 back from the file, nor mmap's back from the file at a different
12946 address. (There have been systems where private was not correctly
12947 implemented like the infamous i386 svr4.0, and systems where the
12948 VM page cache was not coherent with the file system buffer cache
12949 like early versions of FreeBSD and possibly contemporary NetBSD.)
12950 For shared mappings, we should conversely verify that changes get
12951 propagated back to all the places they're supposed to be.
bec39cab 12952
a9322a30
TT
12953 Grep wants private fixed already mapped.
12954 The main things grep needs to know about mmap are:
12955 * does it exist and is it safe to write into the mmap'd area
12956 * how to use it (BSD variants) */
8b9cf735 12957
a9322a30
TT
12958#include <fcntl.h>
12959#include <sys/mman.h>
8b9cf735 12960
81ecdfbb 12961#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12962char *malloc ();
a3828db0
MK
12963#endif
12964
a9322a30 12965/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12966#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12967# ifdef _SC_PAGESIZE
12968# define getpagesize() sysconf(_SC_PAGESIZE)
12969# else /* no _SC_PAGESIZE */
81ecdfbb 12970# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12971# include <sys/param.h>
12972# ifdef EXEC_PAGESIZE
12973# define getpagesize() EXEC_PAGESIZE
12974# else /* no EXEC_PAGESIZE */
12975# ifdef NBPG
12976# define getpagesize() NBPG * CLSIZE
12977# ifndef CLSIZE
12978# define CLSIZE 1
12979# endif /* no CLSIZE */
12980# else /* no NBPG */
12981# ifdef NBPC
12982# define getpagesize() NBPC
12983# else /* no NBPC */
12984# ifdef PAGESIZE
12985# define getpagesize() PAGESIZE
12986# endif /* PAGESIZE */
12987# endif /* no NBPC */
12988# endif /* no NBPG */
12989# endif /* no EXEC_PAGESIZE */
12990# else /* no HAVE_SYS_PARAM_H */
12991# define getpagesize() 8192 /* punt totally */
12992# endif /* no HAVE_SYS_PARAM_H */
12993# endif /* no _SC_PAGESIZE */
12994
12995#endif /* no HAVE_GETPAGESIZE */
12996
bec39cab
AC
12997int
12998main ()
12999{
a9322a30 13000 char *data, *data2, *data3;
63a9e923 13001 const char *cdata2;
a9322a30 13002 int i, pagesize;
63a9e923 13003 int fd, fd2;
a9322a30
TT
13004
13005 pagesize = getpagesize ();
13006
13007 /* First, make a file with some known garbage in it. */
13008 data = (char *) malloc (pagesize);
13009 if (!data)
81ecdfbb 13010 return 1;
a9322a30
TT
13011 for (i = 0; i < pagesize; ++i)
13012 *(data + i) = rand ();
13013 umask (0);
13014 fd = creat ("conftest.mmap", 0600);
13015 if (fd < 0)
63a9e923 13016 return 2;
a9322a30 13017 if (write (fd, data, pagesize) != pagesize)
63a9e923 13018 return 3;
a9322a30
TT
13019 close (fd);
13020
63a9e923
SM
13021 /* Next, check that the tail of a page is zero-filled. File must have
13022 non-zero length, otherwise we risk SIGBUS for entire page. */
13023 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13024 if (fd2 < 0)
13025 return 4;
13026 cdata2 = "";
13027 if (write (fd2, cdata2, 1) != 1)
13028 return 5;
13029 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13030 if (data2 == MAP_FAILED)
13031 return 6;
13032 for (i = 0; i < pagesize; ++i)
13033 if (*(data2 + i))
13034 return 7;
13035 close (fd2);
13036 if (munmap (data2, pagesize))
13037 return 8;
13038
a9322a30
TT
13039 /* Next, try to mmap the file at a fixed address which already has
13040 something else allocated at it. If we can, also make sure that
13041 we see the same garbage. */
13042 fd = open ("conftest.mmap", O_RDWR);
13043 if (fd < 0)
63a9e923 13044 return 9;
a9322a30
TT
13045 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13046 MAP_PRIVATE | MAP_FIXED, fd, 0L))
63a9e923 13047 return 10;
a9322a30
TT
13048 for (i = 0; i < pagesize; ++i)
13049 if (*(data + i) != *(data2 + i))
63a9e923 13050 return 11;
a9322a30
TT
13051
13052 /* Finally, make sure that changes to the mapped area do not
13053 percolate back to the file as seen by read(). (This is a bug on
13054 some variants of i386 svr4.0.) */
13055 for (i = 0; i < pagesize; ++i)
13056 *(data2 + i) = *(data2 + i) + 1;
13057 data3 = (char *) malloc (pagesize);
13058 if (!data3)
63a9e923 13059 return 12;
a9322a30 13060 if (read (fd, data3, pagesize) != pagesize)
63a9e923 13061 return 13;
a9322a30
TT
13062 for (i = 0; i < pagesize; ++i)
13063 if (*(data + i) != *(data3 + i))
63a9e923 13064 return 14;
a9322a30 13065 close (fd);
81ecdfbb 13066 return 0;
bec39cab
AC
13067}
13068_ACEOF
81ecdfbb 13069if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13070 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13071else
81ecdfbb 13072 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13073fi
81ecdfbb
RW
13074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13075 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13076fi
81ecdfbb 13077
a9322a30 13078fi
81ecdfbb
RW
13079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13080$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13081if test $ac_cv_func_mmap_fixed_mapped = yes; then
13082
81ecdfbb 13083$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13084
086ec9eb 13085fi
63a9e923 13086rm -f conftest.mmap conftest.txt
a3828db0 13087
81ecdfbb 13088ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
63a9e923 13089if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 13090
a9322a30
TT
13091else
13092
13093cat >>confdefs.h <<_ACEOF
13094#define pid_t int
bec39cab 13095_ACEOF
086ec9eb
MK
13096
13097fi
13098
81ecdfbb
RW
13099for ac_header in vfork.h
13100do :
13101 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
63a9e923 13102if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13103 cat >>confdefs.h <<_ACEOF
81ecdfbb 13104#define HAVE_VFORK_H 1
bec39cab 13105_ACEOF
c906108c
SS
13106
13107fi
a9322a30 13108
a3828db0 13109done
c906108c 13110
a9322a30 13111for ac_func in fork vfork
81ecdfbb
RW
13112do :
13113 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13114ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
63a9e923 13115if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13116 cat >>confdefs.h <<_ACEOF
81ecdfbb 13117#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13118_ACEOF
b83266a0 13119
97bf5e38 13120fi
a3828db0 13121done
b83266a0 13122
a9322a30 13123if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13125$as_echo_n "checking for working fork... " >&6; }
63a9e923 13126if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13127 $as_echo_n "(cached) " >&6
a9322a30 13128else
81ecdfbb 13129 if test "$cross_compiling" = yes; then :
a9322a30
TT
13130 ac_cv_func_fork_works=cross
13131else
81ecdfbb
RW
13132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13133/* end confdefs.h. */
13134$ac_includes_default
13135int
13136main ()
13137{
13138
13139 /* By Ruediger Kuhlmann. */
13140 return fork () < 0;
13141
13142 ;
13143 return 0;
13144}
a9322a30 13145_ACEOF
81ecdfbb 13146if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13147 ac_cv_func_fork_works=yes
13148else
81ecdfbb 13149 ac_cv_func_fork_works=no
a9322a30 13150fi
81ecdfbb
RW
13151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13152 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13153fi
81ecdfbb 13154
a9322a30 13155fi
81ecdfbb
RW
13156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13157$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13158
13159else
13160 ac_cv_func_fork_works=$ac_cv_func_fork
13161fi
13162if test "x$ac_cv_func_fork_works" = xcross; then
13163 case $host in
13164 *-*-amigaos* | *-*-msdosdjgpp*)
13165 # Override, as these systems have only a dummy fork() stub
13166 ac_cv_func_fork_works=no
13167 ;;
13168 *)
13169 ac_cv_func_fork_works=yes
13170 ;;
13171 esac
81ecdfbb
RW
13172 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13173$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13174fi
13175ac_cv_func_vfork_works=$ac_cv_func_vfork
13176if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13178$as_echo_n "checking for working vfork... " >&6; }
63a9e923 13179if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13180 $as_echo_n "(cached) " >&6
a9322a30 13181else
81ecdfbb 13182 if test "$cross_compiling" = yes; then :
a9322a30
TT
13183 ac_cv_func_vfork_works=cross
13184else
81ecdfbb 13185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13186/* end confdefs.h. */
13187/* Thanks to Paul Eggert for this test. */
81ecdfbb 13188$ac_includes_default
a9322a30 13189#include <sys/wait.h>
81ecdfbb 13190#ifdef HAVE_VFORK_H
a9322a30
TT
13191# include <vfork.h>
13192#endif
13193/* On some sparc systems, changes by the child to local and incoming
13194 argument registers are propagated back to the parent. The compiler
13195 is told about this with #include <vfork.h>, but some compilers
13196 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13197 static variable whose address is put into a register that is
13198 clobbered by the vfork. */
13199static void
13200#ifdef __cplusplus
13201sparc_address_test (int arg)
13202# else
13203sparc_address_test (arg) int arg;
13204#endif
13205{
13206 static pid_t child;
13207 if (!child) {
13208 child = vfork ();
13209 if (child < 0) {
13210 perror ("vfork");
13211 _exit(2);
13212 }
13213 if (!child) {
13214 arg = getpid();
13215 write(-1, "", 0);
13216 _exit (arg);
13217 }
13218 }
13219}
13220
13221int
13222main ()
13223{
13224 pid_t parent = getpid ();
13225 pid_t child;
13226
13227 sparc_address_test (0);
13228
13229 child = vfork ();
13230
13231 if (child == 0) {
13232 /* Here is another test for sparc vfork register problems. This
13233 test uses lots of local variables, at least as many local
13234 variables as main has allocated so far including compiler
13235 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13236 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13237 reuse the register of parent for one of the local variables,
13238 since it will think that parent can't possibly be used any more
13239 in this routine. Assigning to the local variable will thus
13240 munge parent in the parent process. */
13241 pid_t
13242 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13243 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13244 /* Convince the compiler that p..p7 are live; otherwise, it might
13245 use the same hardware register for all 8 local variables. */
13246 if (p != p1 || p != p2 || p != p3 || p != p4
13247 || p != p5 || p != p6 || p != p7)
13248 _exit(1);
13249
13250 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13251 from child file descriptors. If the child closes a descriptor
13252 before it execs or exits, this munges the parent's descriptor
13253 as well. Test for this by closing stdout in the child. */
13254 _exit(close(fileno(stdout)) != 0);
13255 } else {
13256 int status;
13257 struct stat st;
13258
13259 while (wait(&status) != child)
13260 ;
81ecdfbb 13261 return (
a9322a30
TT
13262 /* Was there some problem with vforking? */
13263 child < 0
13264
13265 /* Did the child fail? (This shouldn't happen.) */
13266 || status
13267
13268 /* Did the vfork/compiler bug occur? */
13269 || parent != getpid()
13270
13271 /* Did the file descriptor bug occur? */
13272 || fstat(fileno(stdout), &st) != 0
13273 );
13274 }
13275}
13276_ACEOF
81ecdfbb 13277if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13278 ac_cv_func_vfork_works=yes
13279else
81ecdfbb 13280 ac_cv_func_vfork_works=no
a9322a30 13281fi
81ecdfbb
RW
13282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13283 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13284fi
81ecdfbb 13285
a9322a30 13286fi
81ecdfbb
RW
13287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13288$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13289
13290fi;
13291if test "x$ac_cv_func_fork_works" = xcross; then
13292 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13293 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13294$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13295fi
13296
13297if test "x$ac_cv_func_vfork_works" = xyes; then
13298
81ecdfbb 13299$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13300
13301else
13302
81ecdfbb 13303$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13304
13305fi
13306if test "x$ac_cv_func_fork_works" = xyes; then
13307
81ecdfbb 13308$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13309
13310fi
13311
cdf43629 13312for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13313 pipe poll pread pread64 pwrite resize_term \
e671cd59 13314 sbrk getpgid setpgid setpgrp setsid \
9467110b 13315 sigaction sigprocmask sigsetmask socketpair \
110ed339 13316 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13317 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 13318 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
13319do :
13320 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13321ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
63a9e923 13322if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13323 cat >>confdefs.h <<_ACEOF
81ecdfbb 13324#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13325_ACEOF
13326
13327fi
13328done
13329
13330
81ecdfbb
RW
13331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13332$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
63a9e923 13333if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13334 $as_echo_n "(cached) " >&6
6c7a06a3 13335else
81ecdfbb 13336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13337/* end confdefs.h. */
13338#include <langinfo.h>
13339int
13340main ()
13341{
13342char* cs = nl_langinfo(CODESET);
bec39cab
AC
13343 ;
13344 return 0;
13345}
13346_ACEOF
81ecdfbb 13347if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13348 am_cv_langinfo_codeset=yes
a4db0f07 13349else
81ecdfbb 13350 am_cv_langinfo_codeset=no
a4db0f07 13351fi
81ecdfbb
RW
13352rm -f core conftest.err conftest.$ac_objext \
13353 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13354
a4db0f07 13355fi
81ecdfbb
RW
13356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13357$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13358 if test $am_cv_langinfo_codeset = yes; then
13359
81ecdfbb 13360$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13361
6c7a06a3 13362 fi
c906108c 13363
63a9e923
SM
13364ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13365if test "x$ac_cv_type_size_t" = xyes; then :
13366
13367else
13368
13369cat >>confdefs.h <<_ACEOF
13370#define size_t unsigned int
13371_ACEOF
13372
13373fi
13374
06825bd1 13375
3266f10b
TT
13376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13377$as_echo_n "checking for ANSI C header files... " >&6; }
63a9e923 13378if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13379 $as_echo_n "(cached) " >&6
13380else
13381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13382/* end confdefs.h. */
13383#include <stdlib.h>
13384#include <stdarg.h>
13385#include <string.h>
13386#include <float.h>
13387
13388int
13389main ()
13390{
13391
13392 ;
13393 return 0;
13394}
13395_ACEOF
13396if ac_fn_c_try_compile "$LINENO"; then :
13397 ac_cv_header_stdc=yes
13398else
13399 ac_cv_header_stdc=no
13400fi
13401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13402
13403if test $ac_cv_header_stdc = yes; then
13404 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13406/* end confdefs.h. */
13407#include <string.h>
13408
13409_ACEOF
13410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13411 $EGREP "memchr" >/dev/null 2>&1; then :
13412
13413else
13414 ac_cv_header_stdc=no
13415fi
13416rm -f conftest*
13417
13418fi
13419
13420if test $ac_cv_header_stdc = yes; then
13421 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13423/* end confdefs.h. */
13424#include <stdlib.h>
13425
13426_ACEOF
13427if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13428 $EGREP "free" >/dev/null 2>&1; then :
13429
13430else
13431 ac_cv_header_stdc=no
13432fi
13433rm -f conftest*
13434
13435fi
13436
13437if test $ac_cv_header_stdc = yes; then
13438 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13439 if test "$cross_compiling" = yes; then :
13440 :
13441else
13442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13443/* end confdefs.h. */
13444#include <ctype.h>
13445#include <stdlib.h>
13446#if ((' ' & 0x0FF) == 0x020)
13447# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13448# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13449#else
13450# define ISLOWER(c) \
13451 (('a' <= (c) && (c) <= 'i') \
13452 || ('j' <= (c) && (c) <= 'r') \
13453 || ('s' <= (c) && (c) <= 'z'))
13454# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13455#endif
13456
13457#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13458int
13459main ()
13460{
13461 int i;
13462 for (i = 0; i < 256; i++)
13463 if (XOR (islower (i), ISLOWER (i))
13464 || toupper (i) != TOUPPER (i))
13465 return 2;
13466 return 0;
13467}
13468_ACEOF
13469if ac_fn_c_try_run "$LINENO"; then :
13470
13471else
13472 ac_cv_header_stdc=no
13473fi
13474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13475 conftest.$ac_objext conftest.beam conftest.$ac_ext
13476fi
13477
13478fi
13479fi
13480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13481$as_echo "$ac_cv_header_stdc" >&6; }
13482if test $ac_cv_header_stdc = yes; then
13483
13484$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13485
3266f10b
TT
13486fi
13487
13488 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13489# for constant arguments. Useless!
13490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13491$as_echo_n "checking for working alloca.h... " >&6; }
63a9e923 13492if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13493 $as_echo_n "(cached) " >&6
13494else
13495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13496/* end confdefs.h. */
13497#include <alloca.h>
13498int
13499main ()
13500{
13501char *p = (char *) alloca (2 * sizeof (int));
13502 if (p) return 0;
13503 ;
13504 return 0;
13505}
13506_ACEOF
13507if ac_fn_c_try_link "$LINENO"; then :
13508 ac_cv_working_alloca_h=yes
13509else
13510 ac_cv_working_alloca_h=no
13511fi
13512rm -f core conftest.err conftest.$ac_objext \
13513 conftest$ac_exeext conftest.$ac_ext
13514fi
13515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13516$as_echo "$ac_cv_working_alloca_h" >&6; }
13517if test $ac_cv_working_alloca_h = yes; then
13518
13519$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13520
13521fi
13522
13523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13524$as_echo_n "checking for alloca... " >&6; }
63a9e923 13525if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13526 $as_echo_n "(cached) " >&6
13527else
13528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13529/* end confdefs.h. */
13530#ifdef __GNUC__
13531# define alloca __builtin_alloca
13532#else
13533# ifdef _MSC_VER
13534# include <malloc.h>
13535# define alloca _alloca
13536# else
13537# ifdef HAVE_ALLOCA_H
13538# include <alloca.h>
13539# else
13540# ifdef _AIX
13541 #pragma alloca
13542# else
13543# ifndef alloca /* predefined by HP cc +Olibcalls */
63a9e923 13544void *alloca (size_t);
3266f10b
TT
13545# endif
13546# endif
13547# endif
13548# endif
13549#endif
13550
13551int
13552main ()
13553{
13554char *p = (char *) alloca (1);
13555 if (p) return 0;
13556 ;
13557 return 0;
13558}
13559_ACEOF
13560if ac_fn_c_try_link "$LINENO"; then :
13561 ac_cv_func_alloca_works=yes
13562else
13563 ac_cv_func_alloca_works=no
13564fi
13565rm -f core conftest.err conftest.$ac_objext \
13566 conftest$ac_exeext conftest.$ac_ext
13567fi
13568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13569$as_echo "$ac_cv_func_alloca_works" >&6; }
13570
13571if test $ac_cv_func_alloca_works = yes; then
13572
13573$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13574
13575else
13576 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13577# that cause trouble. Some versions do not even contain alloca or
13578# contain a buggy version. If you still want to use their alloca,
13579# use ar to extract alloca.o from them instead of compiling alloca.c.
13580
13581ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13582
13583$as_echo "#define C_ALLOCA 1" >>confdefs.h
13584
13585
13586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13587$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
63a9e923 13588if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13589 $as_echo_n "(cached) " >&6
13590else
13591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13592/* end confdefs.h. */
13593#if defined CRAY && ! defined CRAY2
13594webecray
13595#else
13596wenotbecray
13597#endif
13598
13599_ACEOF
13600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13601 $EGREP "webecray" >/dev/null 2>&1; then :
13602 ac_cv_os_cray=yes
13603else
13604 ac_cv_os_cray=no
13605fi
13606rm -f conftest*
13607
13608fi
13609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13610$as_echo "$ac_cv_os_cray" >&6; }
13611if test $ac_cv_os_cray = yes; then
13612 for ac_func in _getb67 GETB67 getb67; do
13613 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13614ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
63a9e923 13615if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13616
13617cat >>confdefs.h <<_ACEOF
13618#define CRAY_STACKSEG_END $ac_func
13619_ACEOF
13620
13621 break
13622fi
13623
13624 done
13625fi
13626
13627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13628$as_echo_n "checking stack direction for C alloca... " >&6; }
63a9e923 13629if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13630 $as_echo_n "(cached) " >&6
13631else
13632 if test "$cross_compiling" = yes; then :
13633 ac_cv_c_stack_direction=0
13634else
13635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13636/* end confdefs.h. */
13637$ac_includes_default
13638int
63a9e923 13639find_stack_direction (int *addr, int depth)
3266f10b 13640{
63a9e923
SM
13641 int dir, dummy = 0;
13642 if (! addr)
13643 addr = &dummy;
13644 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13645 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13646 return dir + dummy;
3266f10b
TT
13647}
13648
13649int
63a9e923 13650main (int argc, char **argv)
3266f10b 13651{
63a9e923 13652 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13653}
13654_ACEOF
13655if ac_fn_c_try_run "$LINENO"; then :
13656 ac_cv_c_stack_direction=1
13657else
13658 ac_cv_c_stack_direction=-1
13659fi
13660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13661 conftest.$ac_objext conftest.beam conftest.$ac_ext
13662fi
13663
13664fi
13665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13666$as_echo "$ac_cv_c_stack_direction" >&6; }
13667cat >>confdefs.h <<_ACEOF
13668#define STACK_DIRECTION $ac_cv_c_stack_direction
13669_ACEOF
13670
13671
13672fi
13673
13674
13675
13676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13677$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
63a9e923 13678if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13679 $as_echo_n "(cached) " >&6
13680else
13681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13682/* end confdefs.h. */
13683#include <langinfo.h>
13684int
13685main ()
13686{
13687char* cs = nl_langinfo(CODESET);
13688 ;
13689 return 0;
13690}
13691_ACEOF
13692if ac_fn_c_try_link "$LINENO"; then :
13693 am_cv_langinfo_codeset=yes
13694else
13695 am_cv_langinfo_codeset=no
13696fi
13697rm -f core conftest.err conftest.$ac_objext \
13698 conftest$ac_exeext conftest.$ac_ext
13699
13700fi
13701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13702$as_echo "$am_cv_langinfo_codeset" >&6; }
13703 if test $am_cv_langinfo_codeset = yes; then
13704
13705$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13706
13707 fi
13708
13709
44122162 13710 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
13711do :
13712 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13713ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
63a9e923 13714if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13715 cat >>confdefs.h <<_ACEOF
13716#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13717_ACEOF
13718
13719fi
13720
13721done
13722
13723
f348d89a 13724 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13725do :
13726 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13727ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
63a9e923 13728if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13729 cat >>confdefs.h <<_ACEOF
13730#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13731_ACEOF
13732
13733fi
13734done
13735
13736
13737 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
63a9e923 13738if test "x$ac_cv_have_decl_strerror" = xyes; then :
3266f10b
TT
13739 ac_have_decl=1
13740else
13741 ac_have_decl=0
13742fi
13743
13744cat >>confdefs.h <<_ACEOF
13745#define HAVE_DECL_STRERROR $ac_have_decl
13746_ACEOF
13747ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
63a9e923 13748if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13749 ac_have_decl=1
13750else
13751 ac_have_decl=0
13752fi
13753
13754cat >>confdefs.h <<_ACEOF
13755#define HAVE_DECL_STRSTR $ac_have_decl
13756_ACEOF
13757
13758
e9bcb658
GB
13759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13760$as_echo_n "checking for sigsetjmp... " >&6; }
63a9e923 13761if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
13762 $as_echo_n "(cached) " >&6
13763else
13764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13765/* end confdefs.h. */
13766
13767#include <setjmp.h>
13768
13769int
13770main ()
13771{
13772sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13773 ;
13774 return 0;
13775}
13776_ACEOF
13777if ac_fn_c_try_compile "$LINENO"; then :
13778 gdb_cv_func_sigsetjmp=yes
13779else
13780 gdb_cv_func_sigsetjmp=no
13781fi
13782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13783fi
13784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13785$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13786if test $gdb_cv_func_sigsetjmp = yes; then
13787
13788$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13789
13790fi
13791
3266f10b 13792
54019719
PA
13793# Check the return and argument types of ptrace.
13794
13795
54019719
PA
13796for ac_header in sys/ptrace.h ptrace.h
13797do :
13798 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13799ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
63a9e923 13800if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
13801 cat >>confdefs.h <<_ACEOF
13802#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13803_ACEOF
13804
13805fi
13806
13807done
13808
13809
a3828db0 13810gdb_ptrace_headers='
4ff70b84 13811#include <sys/types.h>
a3828db0
MK
13812#if HAVE_SYS_PTRACE_H
13813# include <sys/ptrace.h>
13814#endif
13815#if HAVE_UNISTD_H
13816# include <unistd.h>
13817#endif
13818'
13819# There is no point in checking if we don't have a prototype.
9b30624b 13820ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 13821"
63a9e923 13822if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 13823 ac_have_decl=1
06825bd1 13824else
81ecdfbb 13825 ac_have_decl=0
06825bd1 13826fi
06825bd1 13827
a3828db0 13828cat >>confdefs.h <<_ACEOF
81ecdfbb 13829#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13830_ACEOF
81ecdfbb 13831if test $ac_have_decl = 1; then :
bec39cab 13832
a3828db0 13833else
a3828db0
MK
13834
13835 : ${gdb_cv_func_ptrace_ret='int'}
13836 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13837
06825bd1
MK
13838fi
13839
064ef605
DJ
13840# Check return type. Varargs (used on GNU/Linux) conflict with the
13841# empty argument list, so check for that explicitly.
81ecdfbb
RW
13842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13843$as_echo_n "checking return type of ptrace... " >&6; }
63a9e923 13844if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 13845 $as_echo_n "(cached) " >&6
bec39cab 13846else
81ecdfbb 13847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13848/* end confdefs.h. */
a3828db0 13849$gdb_ptrace_headers
bec39cab
AC
13850int
13851main ()
13852{
064ef605
DJ
13853extern long ptrace (enum __ptrace_request, ...);
13854 ;
13855 return 0;
13856}
13857_ACEOF
9b30624b 13858if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13859 gdb_cv_func_ptrace_ret='long'
13860else
81ecdfbb 13861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13862/* end confdefs.h. */
13863$gdb_ptrace_headers
13864int
13865main ()
13866{
a3828db0 13867extern int ptrace ();
bec39cab
AC
13868 ;
13869 return 0;
13870}
13871_ACEOF
9b30624b 13872if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13873 gdb_cv_func_ptrace_ret='int'
70f9f479 13874else
81ecdfbb 13875 gdb_cv_func_ptrace_ret='long'
70f9f479 13876fi
81ecdfbb 13877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13878fi
81ecdfbb 13879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13880fi
81ecdfbb
RW
13881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13882$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13883
a3828db0
MK
13884cat >>confdefs.h <<_ACEOF
13885#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13886_ACEOF
70f9f479 13887
a3828db0 13888# Check argument types.
81ecdfbb
RW
13889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13890$as_echo_n "checking types of arguments for ptrace... " >&6; }
63a9e923 13891if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 13892 $as_echo_n "(cached) " >&6
bec39cab 13893else
a3828db0 13894
81ecdfbb 13895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13896/* end confdefs.h. */
13897$gdb_ptrace_headers
13898int
13899main ()
13900{
13901extern long ptrace (enum __ptrace_request, ...);
13902 ;
13903 return 0;
13904}
13905_ACEOF
9b30624b 13906if ac_fn_c_try_compile "$LINENO"; then :
54019719 13907 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13908else
064ef605 13909
a3828db0
MK
13910for gdb_arg1 in 'int' 'long'; do
13911 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13912 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13913 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13915/* end confdefs.h. */
a3828db0 13916$gdb_ptrace_headers
bec39cab
AC
13917int
13918main ()
13919{
a3828db0
MK
13920
13921extern $gdb_cv_func_ptrace_ret
13922 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13923
bec39cab
AC
13924 ;
13925 return 0;
13926}
13927_ACEOF
9b30624b 13928if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13929 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13930 break 4;
5c7f2947 13931fi
81ecdfbb 13932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13933 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13935/* end confdefs.h. */
a3828db0 13936$gdb_ptrace_headers
bec39cab
AC
13937int
13938main ()
13939{
a3828db0
MK
13940
13941extern $gdb_cv_func_ptrace_ret
13942 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13943
bec39cab
AC
13944 ;
13945 return 0;
13946}
13947_ACEOF
9b30624b 13948if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13949
13950gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13951 break 5;
78434e59 13952fi
81ecdfbb 13953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13954 done
13955 done
13956 done
13957 done
13958done
13959# Provide a safe default value.
13960: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13961
064ef605 13962fi
81ecdfbb 13963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13964fi
81ecdfbb
RW
13965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13966$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13967ac_save_IFS=$IFS; IFS=','
13968set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13969IFS=$ac_save_IFS
13970shift
bec39cab 13971
54019719
PA
13972cat >>confdefs.h <<_ACEOF
13973#define PTRACE_TYPE_ARG1 $1
13974_ACEOF
13975
13976
a3828db0
MK
13977cat >>confdefs.h <<_ACEOF
13978#define PTRACE_TYPE_ARG3 $3
13979_ACEOF
13980
96d7229d
LM
13981
13982cat >>confdefs.h <<_ACEOF
13983#define PTRACE_TYPE_ARG4 $4
13984_ACEOF
13985
a3828db0
MK
13986if test -n "$5"; then
13987
13988cat >>confdefs.h <<_ACEOF
13989#define PTRACE_TYPE_ARG5 $5
bec39cab 13990_ACEOF
78434e59
MK
13991
13992fi
13993
54019719 13994
a3828db0 13995if test "$cross_compiling" = no; then
81ecdfbb
RW
13996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13997$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
63a9e923 13998if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13999 $as_echo_n "(cached) " >&6
a3828db0 14000else
81ecdfbb 14001 if test "$cross_compiling" = yes; then :
63a9e923 14002 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 14003else
81ecdfbb 14004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14005/* end confdefs.h. */
81ecdfbb 14006$ac_includes_default
bec39cab
AC
14007int
14008main ()
14009{
a3828db0
MK
14010/* If this system has a BSD-style setpgrp which takes arguments,
14011 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14012 exit successfully. */
81ecdfbb 14013 return setpgrp (1,1) != -1;
bec39cab
AC
14014 ;
14015 return 0;
14016}
14017_ACEOF
81ecdfbb 14018if ac_fn_c_try_run "$LINENO"; then :
a3828db0 14019 ac_cv_func_setpgrp_void=no
c906108c 14020else
81ecdfbb 14021 ac_cv_func_setpgrp_void=yes
c906108c 14022fi
81ecdfbb
RW
14023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14024 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14025fi
81ecdfbb 14026
a3828db0 14027fi
81ecdfbb
RW
14028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14029$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
14030if test $ac_cv_func_setpgrp_void = yes; then
14031
81ecdfbb 14032$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
14033
14034fi
a3828db0
MK
14035
14036else
81ecdfbb
RW
14037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14038$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
63a9e923 14039if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14040 $as_echo_n "(cached) " >&6
97bf5e38 14041else
81ecdfbb 14042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14043/* end confdefs.h. */
a3828db0
MK
14044
14045#include <unistd.h>
14046
bec39cab
AC
14047int
14048main ()
14049{
a3828db0
MK
14050
14051 if (setpgrp(1,1) == -1)
14052 exit (0);
14053 else
14054 exit (1);
14055
bec39cab
AC
14056 ;
14057 return 0;
14058}
14059_ACEOF
81ecdfbb 14060if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14061 ac_cv_func_setpgrp_void=no
c906108c 14062else
81ecdfbb 14063 ac_cv_func_setpgrp_void=yes
c906108c 14064fi
81ecdfbb 14065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14066fi
81ecdfbb
RW
14067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14068$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 14069if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 14070 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 14071
a3828db0 14072fi
c906108c
SS
14073fi
14074
db1ff28b
JK
14075# Assume we'll default to using the included libiberty regex.
14076gdb_use_included_regex=yes
14077
14078# However, if the system regex is GNU regex, then default to *not*
14079# using the included regex.
14080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14081$as_echo_n "checking for GNU regex... " >&6; }
63a9e923 14082if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
14083 $as_echo_n "(cached) " >&6
14084else
14085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14086/* end confdefs.h. */
14087#include <gnu-versions.h>
14088int
14089main ()
14090{
14091#define REGEX_INTERFACE_VERSION 1
14092#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14093# error "Version mismatch"
14094#endif
14095 ;
14096 return 0;
14097}
14098_ACEOF
14099if ac_fn_c_try_compile "$LINENO"; then :
14100 gdb_cv_have_gnu_regex=yes
14101else
14102 gdb_cv_have_gnu_regex=no
14103fi
14104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14105fi
14106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14107$as_echo "$gdb_cv_have_gnu_regex" >&6; }
14108if test $gdb_cv_have_gnu_regex = yes; then
14109 gdb_use_included_regex=no
14110fi
14111
14112
14113# Check whether --with-included-regex was given.
14114if test "${with_included_regex+set}" = set; then :
14115 withval=$with_included_regex; gdb_with_regex=$withval
14116else
14117 gdb_with_regex=$gdb_use_included_regex
14118fi
14119
14120if test "$gdb_with_regex" = yes; then
14121
14122$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14123
14124fi
14125
81ecdfbb
RW
14126# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14127ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14128#include <sys/proc.h>
14129
14130"
63a9e923 14131if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 14132
5c45e068 14133cat >>confdefs.h <<_ACEOF
a3828db0 14134#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 14135_ACEOF
c906108c 14136
5c45e068 14137
97bf5e38 14138fi
c906108c 14139
5c45e068 14140
a3828db0 14141# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
14142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14143$as_echo_n "checking for struct lwp... " >&6; }
63a9e923 14144if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 14145 $as_echo_n "(cached) " >&6
bec39cab 14146else
81ecdfbb 14147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14148/* end confdefs.h. */
a3828db0 14149#include <sys/param.h>
c49fbc6c 14150#define _KMEMUSER
a3828db0 14151#include <sys/lwp.h>
bec39cab
AC
14152int
14153main ()
14154{
a3828db0 14155struct lwp l;
bec39cab
AC
14156 ;
14157 return 0;
14158}
14159_ACEOF
81ecdfbb 14160if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14161 gdb_cv_struct_lwp=yes
c906108c 14162else
81ecdfbb 14163 gdb_cv_struct_lwp=no
c906108c 14164fi
81ecdfbb 14165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14166fi
81ecdfbb
RW
14167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14168$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 14169if test $gdb_cv_struct_lwp = yes; then
c906108c 14170
81ecdfbb 14171$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 14172
97bf5e38 14173fi
c906108c 14174
a3828db0 14175# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
14176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14177$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
63a9e923 14178if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 14179 $as_echo_n "(cached) " >&6
bec39cab 14180else
81ecdfbb 14181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14182/* end confdefs.h. */
a3828db0
MK
14183#include <sys/types.h>
14184#include <machine/reg.h>
bec39cab
AC
14185int
14186main ()
14187{
a3828db0 14188struct reg r;
bec39cab
AC
14189 ;
14190 return 0;
14191}
14192_ACEOF
81ecdfbb 14193if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14194 gdb_cv_struct_reg=yes
27ca5dad 14195else
81ecdfbb 14196 gdb_cv_struct_reg=no
27ca5dad 14197fi
81ecdfbb 14198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14199fi
81ecdfbb
RW
14200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14201$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 14202if test $gdb_cv_struct_reg = yes; then
bec39cab 14203
81ecdfbb 14204$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14205
14206fi
97bf5e38 14207
a3828db0
MK
14208# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14209# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14210ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14211#include <machine/reg.h>
81ecdfbb 14212"
63a9e923 14213if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
14214
14215cat >>confdefs.h <<_ACEOF
a3828db0 14216#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14217_ACEOF
3862412b 14218
5c45e068 14219
97bf5e38 14220fi
a6e69c1f
JB
14221ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14222#include <machine/reg.h>
81ecdfbb 14223"
63a9e923 14224if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
14225
14226cat >>confdefs.h <<_ACEOF
a3828db0 14227#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14228_ACEOF
3862412b 14229
5c45e068 14230
97bf5e38 14231fi
3862412b 14232
5c45e068 14233
6fea9e18
L
14234# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14235# Older amd64 Linux's don't have the fs_base and gs_base members of
14236# `struct user_regs_struct'.
f517c180
EA
14237ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14238#include <sys/user.h>
6fea9e18 14239"
63a9e923 14240if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
14241
14242cat >>confdefs.h <<_ACEOF
14243#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14244_ACEOF
14245
14246
14247fi
f517c180
EA
14248ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14249#include <sys/user.h>
6fea9e18 14250"
63a9e923 14251if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14252
14253cat >>confdefs.h <<_ACEOF
14254#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14255_ACEOF
14256
14257
14258fi
14259
14260
a3828db0 14261# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14263$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
63a9e923 14264if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14265 $as_echo_n "(cached) " >&6
451928c5 14266else
81ecdfbb 14267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14268/* end confdefs.h. */
a3828db0 14269#include <sys/ptrace.h>
bec39cab
AC
14270int
14271main ()
14272{
a3828db0 14273PTRACE_GETREGS;
bec39cab
AC
14274 ;
14275 return 0;
14276}
14277_ACEOF
81ecdfbb 14278if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14279 gdb_cv_have_ptrace_getregs=yes
451928c5 14280else
81ecdfbb 14281 gdb_cv_have_ptrace_getregs=no
451928c5 14282fi
81ecdfbb 14283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14284fi
14285
81ecdfbb
RW
14286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14287$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14288if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14289
81ecdfbb 14290$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14291
97bf5e38 14292fi
451928c5 14293
a3828db0 14294# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14296$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
63a9e923 14297if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14298 $as_echo_n "(cached) " >&6
451928c5 14299else
81ecdfbb 14300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14301/* end confdefs.h. */
a3828db0 14302#include <sys/ptrace.h>
bec39cab
AC
14303int
14304main ()
14305{
a3828db0 14306PTRACE_GETFPXREGS;
bec39cab
AC
14307 ;
14308 return 0;
14309}
14310_ACEOF
81ecdfbb 14311if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14312 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14313else
81ecdfbb 14314 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14315fi
81ecdfbb 14316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14317fi
14318
81ecdfbb
RW
14319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14320$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14321if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14322
81ecdfbb 14323$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14324
97bf5e38 14325fi
451928c5 14326
a3828db0 14327# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14329$as_echo_n "checking for PT_GETDBREGS... " >&6; }
63a9e923 14330if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 14331 $as_echo_n "(cached) " >&6
3862412b 14332else
81ecdfbb 14333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14334/* end confdefs.h. */
a3828db0
MK
14335#include <sys/types.h>
14336#include <sys/ptrace.h>
bec39cab
AC
14337int
14338main ()
14339{
a3828db0 14340PT_GETDBREGS;
bec39cab
AC
14341 ;
14342 return 0;
14343}
14344_ACEOF
81ecdfbb 14345if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14346 gdb_cv_have_pt_getdbregs=yes
3862412b 14347else
81ecdfbb 14348 gdb_cv_have_pt_getdbregs=no
3862412b 14349fi
81ecdfbb 14350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14351fi
14352
81ecdfbb
RW
14353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14354$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14355if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14356
81ecdfbb 14357$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14358
97bf5e38 14359fi
3862412b 14360
a3828db0 14361# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14363$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
63a9e923 14364if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 14365 $as_echo_n "(cached) " >&6
3862412b 14366else
81ecdfbb 14367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14368/* end confdefs.h. */
a3828db0
MK
14369#include <sys/types.h>
14370#include <sys/ptrace.h>
bec39cab
AC
14371int
14372main ()
14373{
a3828db0 14374PT_GETXMMREGS;
bec39cab
AC
14375 ;
14376 return 0;
14377}
14378_ACEOF
81ecdfbb 14379if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14380 gdb_cv_have_pt_getxmmregs=yes
3862412b 14381else
81ecdfbb 14382 gdb_cv_have_pt_getxmmregs=no
3862412b 14383fi
81ecdfbb 14384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14385fi
14386
81ecdfbb
RW
14387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14388$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14389if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14390
81ecdfbb 14391$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14392
97bf5e38 14393fi
3862412b 14394
6e9567fe
JB
14395# See if <sys/ptrace.h> supports LWP names on FreeBSD
14396# Older FreeBSD versions don't have the pl_tdname member of
14397# `struct ptrace_lwpinfo'.
14398ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14399"
63a9e923 14400if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
14401
14402cat >>confdefs.h <<_ACEOF
14403#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14404_ACEOF
14405
14406
14407fi
14408
14409
e6cdd38e
JB
14410# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14411# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14412# FreeBSD 10.3.
14413ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14414"
63a9e923 14415if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
14416
14417cat >>confdefs.h <<_ACEOF
14418#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14419_ACEOF
14420
14421
14422fi
14423
6e9567fe 14424
97bf5e38 14425if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14427$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
63a9e923 14428 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 14429 $as_echo_n "(cached) " >&6
596c9d4b 14430else
81ecdfbb 14431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14432/* end confdefs.h. */
596c9d4b
KB
14433
14434#define _SYSCALL32
d30c5336
JK
14435/* Needed for new procfs interface on sparc-solaris. */
14436#define _STRUCTURED_PROC 1
596c9d4b 14437#include <sys/procfs.h>
bec39cab
AC
14438int
14439main ()
14440{
97bf5e38 14441gregset_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_gregset_t=yes
596c9d4b 14448else
81ecdfbb 14449 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14450
596c9d4b 14451fi
81ecdfbb 14452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14453fi
14454
97bf5e38 14455 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14456
81ecdfbb 14457$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14458
14459 fi
81ecdfbb
RW
14460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14461$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14462
81ecdfbb
RW
14463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14464$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
63a9e923 14465 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14466 $as_echo_n "(cached) " >&6
d84dd0c5 14467else
81ecdfbb 14468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14469/* end confdefs.h. */
97bf5e38
MK
14470
14471#define _SYSCALL32
d30c5336
JK
14472/* Needed for new procfs interface on sparc-solaris. */
14473#define _STRUCTURED_PROC 1
d84dd0c5 14474#include <sys/procfs.h>
bec39cab
AC
14475int
14476main ()
14477{
97bf5e38 14478fpregset_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_fpregset_t=yes
d84dd0c5 14485else
81ecdfbb 14486 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14487
d84dd0c5 14488fi
81ecdfbb 14489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14490fi
14491
97bf5e38 14492 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14493
81ecdfbb 14494$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14495
97bf5e38 14496 fi
81ecdfbb
RW
14497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14498$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14499
81ecdfbb
RW
14500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14501$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
63a9e923 14502 if ${bfd_cv_have_sys_procfs_type_prgregset_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 14515prgregset_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_prgregset_t=yes
c906108c 14522else
81ecdfbb 14523 bfd_cv_have_sys_procfs_type_prgregset_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_prgregset_t = yes; then
bec39cab 14530
81ecdfbb 14531$as_echo "#define HAVE_PRGREGSET_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_prgregset_t" >&5
14535$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14536
81ecdfbb
RW
14537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14538$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
63a9e923 14539 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14540 $as_echo_n "(cached) " >&6
d45fe813 14541else
81ecdfbb 14542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14543/* end confdefs.h. */
97bf5e38
MK
14544
14545#define _SYSCALL32
d30c5336
JK
14546/* Needed for new procfs interface on sparc-solaris. */
14547#define _STRUCTURED_PROC 1
97bf5e38 14548#include <sys/procfs.h>
bec39cab
AC
14549int
14550main ()
14551{
97bf5e38 14552prfpregset_t avar
bec39cab
AC
14553 ;
14554 return 0;
14555}
14556_ACEOF
81ecdfbb 14557if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14558 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14559else
81ecdfbb 14560 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14561
d45fe813 14562fi
81ecdfbb 14563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14564fi
14565
97bf5e38 14566 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14567
81ecdfbb 14568$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14569
97bf5e38 14570 fi
81ecdfbb
RW
14571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14572$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14573
81ecdfbb
RW
14574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14575$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
63a9e923 14576 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 14577 $as_echo_n "(cached) " >&6
d45fe813 14578else
81ecdfbb 14579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14580/* end confdefs.h. */
97bf5e38
MK
14581
14582#define _SYSCALL32
d30c5336
JK
14583/* Needed for new procfs interface on sparc-solaris. */
14584#define _STRUCTURED_PROC 1
97bf5e38 14585#include <sys/procfs.h>
bec39cab
AC
14586int
14587main ()
14588{
97bf5e38 14589prgregset32_t avar
bec39cab
AC
14590 ;
14591 return 0;
14592}
14593_ACEOF
81ecdfbb 14594if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14595 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14596else
81ecdfbb 14597 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14598
d45fe813 14599fi
81ecdfbb 14600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14601fi
14602
97bf5e38 14603 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14604
81ecdfbb 14605$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14606
97bf5e38 14607 fi
81ecdfbb
RW
14608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14609$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14610
81ecdfbb
RW
14611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14612$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
63a9e923 14613 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14614 $as_echo_n "(cached) " >&6
d45fe813 14615else
81ecdfbb 14616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14617/* end confdefs.h. */
97bf5e38 14618
d45fe813 14619#define _SYSCALL32
d30c5336
JK
14620/* Needed for new procfs interface on sparc-solaris. */
14621#define _STRUCTURED_PROC 1
97bf5e38 14622#include <sys/procfs.h>
bec39cab
AC
14623int
14624main ()
14625{
97bf5e38 14626lwpid_t avar
bec39cab
AC
14627 ;
14628 return 0;
14629}
14630_ACEOF
81ecdfbb 14631if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14632 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14633else
81ecdfbb 14634 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14635
d45fe813 14636fi
81ecdfbb 14637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14638fi
14639
97bf5e38 14640 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14641
81ecdfbb 14642$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14643
97bf5e38 14644 fi
81ecdfbb
RW
14645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14646$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14647
81ecdfbb
RW
14648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14649$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
63a9e923 14650 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14651 $as_echo_n "(cached) " >&6
c906108c 14652else
81ecdfbb 14653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14654/* end confdefs.h. */
c906108c 14655
97bf5e38 14656#define _SYSCALL32
d30c5336
JK
14657/* Needed for new procfs interface on sparc-solaris. */
14658#define _STRUCTURED_PROC 1
97bf5e38 14659#include <sys/procfs.h>
bec39cab
AC
14660int
14661main ()
14662{
97bf5e38 14663psaddr_t avar
bec39cab
AC
14664 ;
14665 return 0;
14666}
14667_ACEOF
81ecdfbb 14668if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14669 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14670else
81ecdfbb 14671 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14672
c906108c 14673fi
81ecdfbb 14674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14675fi
14676
97bf5e38 14677 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14678
81ecdfbb 14679$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14680
97bf5e38 14681 fi
81ecdfbb
RW
14682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14683$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14684
97bf5e38
MK
14685
14686
14687
97bf5e38 14688 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14690$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
63a9e923 14691 if ${gdb_cv_prfpregset_t_broken+:} false; then :
81ecdfbb 14692 $as_echo_n "(cached) " >&6
c906108c 14693else
81ecdfbb 14694 if test "$cross_compiling" = yes; then :
97bf5e38 14695 gdb_cv_prfpregset_t_broken=yes
c906108c 14696else
81ecdfbb 14697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14698/* end confdefs.h. */
97bf5e38
MK
14699#include <sys/procfs.h>
14700 int main ()
14701 {
14702 if (sizeof (prfpregset_t) == sizeof (void *))
14703 return 1;
14704 return 0;
14705 }
bec39cab 14706_ACEOF
81ecdfbb 14707if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14708 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14709else
14710 gdb_cv_prfpregset_t_broken=yes
c906108c 14711fi
81ecdfbb
RW
14712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14713 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14714fi
81ecdfbb 14715
c906108c
SS
14716fi
14717
81ecdfbb
RW
14718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14719$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14720 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14721
81ecdfbb 14722$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14723
97bf5e38
MK
14724 fi
14725 fi
c906108c 14726fi
c906108c 14727
bc8bcb4b 14728# Check if the compiler supports the `long long' type.
c906108c 14729
81ecdfbb
RW
14730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14731$as_echo_n "checking for long long support in compiler... " >&6; }
63a9e923 14732if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 14733 $as_echo_n "(cached) " >&6
97bf5e38 14734else
81ecdfbb 14735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14736/* end confdefs.h. */
bc8bcb4b 14737extern long long foo;
bec39cab
AC
14738int
14739main ()
14740{
bc8bcb4b 14741switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14742 ;
14743 return 0;
14744}
14745_ACEOF
81ecdfbb 14746if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14747 gdb_cv_c_long_long=yes
14748else
81ecdfbb 14749 gdb_cv_c_long_long=no
97bf5e38 14750fi
81ecdfbb 14751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14752fi
81ecdfbb
RW
14753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14754$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14755if test $gdb_cv_c_long_long != yes; then
14756 # libdecnumber requires long long.
63a9e923 14757 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14758fi
14759
bc8bcb4b 14760# Check if the compiler and runtime support printing long longs.
97bf5e38 14761
81ecdfbb
RW
14762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14763$as_echo_n "checking for long long support in printf... " >&6; }
63a9e923 14764if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 14765 $as_echo_n "(cached) " >&6
97bf5e38 14766else
81ecdfbb 14767 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14768 gdb_cv_printf_has_long_long=no
14769else
81ecdfbb 14770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14771/* end confdefs.h. */
bc8bcb4b
MK
14772$ac_includes_default
14773int
14774main ()
14775{
14776char buf[32];
97bf5e38
MK
14777 long long l = 0;
14778 l = (l << 16) + 0x0123;
14779 l = (l << 16) + 0x4567;
14780 l = (l << 16) + 0x89ab;
14781 l = (l << 16) + 0xcdef;
14782 sprintf (buf, "0x%016llx", l);
14783 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14784 ;
14785 return 0;
c906108c 14786}
bec39cab 14787_ACEOF
81ecdfbb 14788if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14789 gdb_cv_printf_has_long_long=yes
14790else
81ecdfbb 14791 gdb_cv_printf_has_long_long=no
97bf5e38 14792fi
81ecdfbb
RW
14793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14794 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14795fi
81ecdfbb 14796
97bf5e38 14797fi
81ecdfbb
RW
14798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14799$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14800if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14801
81ecdfbb 14802$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14803
14804fi
97bf5e38 14805
1a619819
LM
14806# Check if the compiler and runtime support printing decfloats.
14807
81ecdfbb
RW
14808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14809$as_echo_n "checking for decfloat support in printf... " >&6; }
63a9e923 14810if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 14811 $as_echo_n "(cached) " >&6
1a619819 14812else
81ecdfbb 14813 if test "$cross_compiling" = yes; then :
1a619819
LM
14814 gdb_cv_printf_has_decfloat=no
14815else
81ecdfbb 14816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14817/* end confdefs.h. */
14818$ac_includes_default
14819int
14820main ()
14821{
14822char buf[64];
14823 _Decimal32 d32 = 1.2345df;
14824 _Decimal64 d64 = 1.2345dd;
14825 _Decimal128 d128 = 1.2345dl;
14826 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14827 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14828 ;
14829 return 0;
14830}
14831_ACEOF
81ecdfbb 14832if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14833 gdb_cv_printf_has_decfloat=yes
14834else
81ecdfbb 14835 gdb_cv_printf_has_decfloat=no
1a619819 14836fi
81ecdfbb
RW
14837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14838 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14839fi
81ecdfbb 14840
1a619819 14841fi
81ecdfbb
RW
14842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14843$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14844if test $gdb_cv_printf_has_decfloat = yes; then
14845
81ecdfbb 14846$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14847
14848fi
14849
bc8bcb4b
MK
14850# Check if the compiler supports the `long double' type. We can't use
14851# AC_C_LONG_DOUBLE because that one does additional checks on the
14852# constants defined in <float.h> that fail on some systems,
14853# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14854
81ecdfbb
RW
14855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14856$as_echo_n "checking for long double support in compiler... " >&6; }
63a9e923 14857if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 14858 $as_echo_n "(cached) " >&6
97bf5e38 14859else
81ecdfbb 14860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14861/* end confdefs.h. */
97bf5e38 14862long double foo;
bec39cab 14863_ACEOF
81ecdfbb 14864if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14865 gdb_cv_c_long_double=yes
97bf5e38 14866else
81ecdfbb 14867 gdb_cv_c_long_double=no
97bf5e38 14868fi
81ecdfbb 14869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14870fi
81ecdfbb
RW
14871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14872$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14873if test $gdb_cv_c_long_double = yes; then
c906108c 14874
81ecdfbb 14875$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14876
14877fi
14878
bc8bcb4b 14879# Check if the compiler and runtime support printing long doubles.
97bf5e38 14880
81ecdfbb
RW
14881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14882$as_echo_n "checking for long double support in printf... " >&6; }
63a9e923 14883if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 14884 $as_echo_n "(cached) " >&6
97bf5e38 14885else
81ecdfbb 14886 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14887 gdb_cv_printf_has_long_double=no
14888else
81ecdfbb 14889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14890/* end confdefs.h. */
bc8bcb4b
MK
14891$ac_includes_default
14892int
14893main ()
14894{
14895char buf[16];
97bf5e38
MK
14896 long double f = 3.141592653;
14897 sprintf (buf, "%Lg", f);
14898 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14899 ;
14900 return 0;
97bf5e38 14901}
bec39cab 14902_ACEOF
81ecdfbb 14903if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14904 gdb_cv_printf_has_long_double=yes
c906108c 14905else
81ecdfbb 14906 gdb_cv_printf_has_long_double=no
c906108c 14907fi
81ecdfbb
RW
14908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14909 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14910fi
81ecdfbb 14911
c906108c 14912fi
81ecdfbb
RW
14913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14914$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14915if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14916
81ecdfbb 14917$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14918
14919fi
97bf5e38 14920
bc8bcb4b 14921# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14922
81ecdfbb
RW
14923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14924$as_echo_n "checking for long double support in scanf... " >&6; }
63a9e923 14925if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 14926 $as_echo_n "(cached) " >&6
97bf5e38 14927else
81ecdfbb 14928 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14929 gdb_cv_scanf_has_long_double=no
14930else
81ecdfbb 14931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14932/* end confdefs.h. */
bc8bcb4b
MK
14933#include <stdio.h>
14934int
14935main ()
14936{
14937char *buf = "3.141592653";
97bf5e38
MK
14938 long double f = 0;
14939 sscanf (buf, "%Lg", &f);
14940 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14941 ;
14942 return 0;
97bf5e38 14943}
bec39cab 14944_ACEOF
81ecdfbb 14945if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14946 gdb_cv_scanf_has_long_double=yes
14947else
81ecdfbb 14948 gdb_cv_scanf_has_long_double=no
97bf5e38 14949fi
81ecdfbb
RW
14950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14951 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14952fi
81ecdfbb 14953
c906108c 14954fi
81ecdfbb
RW
14955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14956$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14957if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14958
81ecdfbb 14959$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14960
14961fi
c906108c 14962
438013df
AO
14963case ${host_os} in
14964aix*)
81ecdfbb
RW
14965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14966$as_echo_n "checking for -bbigtoc option... " >&6; }
63a9e923 14967if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 14968 $as_echo_n "(cached) " >&6
438013df 14969else
bec39cab 14970
438013df
AO
14971 SAVE_LDFLAGS=$LDFLAGS
14972
14973 case $GCC in
14974 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14975 *) gdb_cv_bigtoc=-bbigtoc ;;
14976 esac
14977
14978 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14980/* end confdefs.h. */
438013df 14981
bec39cab
AC
14982int
14983main ()
14984{
438013df 14985int i;
bec39cab
AC
14986 ;
14987 return 0;
14988}
14989_ACEOF
81ecdfbb 14990if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14991
81ecdfbb
RW
14992else
14993 gdb_cv_bigtoc=
438013df 14994fi
81ecdfbb
RW
14995rm -f core conftest.err conftest.$ac_objext \
14996 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14997 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14998
bec39cab 14999fi
81ecdfbb
RW
15000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15001$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
15002 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15003 ;;
15004esac
15005
38f6b338 15006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 15007$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
15008dynamic_list=false
15009if test "${gdb_native}" = yes; then
15010 # The dynamically loaded libthread_db needs access to symbols in the gdb
15011 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15012 # may not be supported there.
15013 old_LDFLAGS="$LDFLAGS"
15014 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15015 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15016 LDFLAGS="$LDFLAGS $RDYNAMIC"
15017 if test "${have_libpython}" = no; then
15018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
15019/* end confdefs.h. */
15020
15021int
15022main ()
15023{
15024
15025 ;
15026 return 0;
15027}
15028_ACEOF
15029if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
15030 dynamic_list=true
15031fi
15032rm -f core conftest.err conftest.$ac_objext \
15033 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
15034 else
15035 # Workaround http://bugs.python.org/issue4434 where static
15036 # libpythonX.Y.a would get its symbols required for
15037 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15038 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
15039
15040 # Note the workaround for Python
15041 # http://bugs.python.org/issue10112 earlier has removed
15042 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15043 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15044 # always pass.
38f6b338
JK
15045 old_CFLAGS="$CFLAGS"
15046 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
15047 old_LIBS="$LIBS"
15048 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
15049 old_CPPFLAGS="$CPPFLAGS"
15050 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 15051 if test "$cross_compiling" = yes; then :
3bebe2f2 15052 true
f6528abd 15053else
3bebe2f2
JK
15054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15055/* end confdefs.h. */
1b4f615e 15056#include "Python.h"
3bebe2f2
JK
15057int
15058main ()
15059{
15060int err;
38f6b338
JK
15061 Py_Initialize ();
15062 err = PyRun_SimpleString ("import itertools\n");
15063 Py_Finalize ();
15064 return err == 0 ? 0 : 1;
3bebe2f2
JK
15065 ;
15066 return 0;
15067}
15068_ACEOF
15069if ac_fn_c_try_run "$LINENO"; then :
15070 dynamic_list=true
15071fi
15072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15073 conftest.$ac_objext conftest.beam conftest.$ac_ext
15074fi
15075
8c1fb155 15076 LIBS="$old_LIBS"
38f6b338 15077 CFLAGS="$old_CFLAGS"
1b4f615e 15078 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
15079 fi
15080 LDFLAGS="$old_LDFLAGS"
15081fi
15082if $dynamic_list; then
15083 found="-Wl,--dynamic-list"
15084 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15085else
38f6b338
JK
15086 found="-rdynamic"
15087 RDYNAMIC="-rdynamic"
f6528abd 15088fi
f6528abd 15089
38f6b338 15090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15091$as_echo "$found" >&6; }
0407b3f1 15092
f6528abd 15093
0407b3f1 15094if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 15095 case ${host_os} in
d92419e5 15096 aix*)
81ecdfbb
RW
15097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15098$as_echo_n "checking for AiX thread debugging library... " >&6; }
63a9e923 15099 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 15100 $as_echo_n "(cached) " >&6
bec39cab 15101else
81ecdfbb 15102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15103/* end confdefs.h. */
d92419e5 15104#include <sys/pthdebug.h>
bec39cab
AC
15105int
15106main ()
15107{
d92419e5
JB
15108#ifndef PTHDB_VERSION_3
15109 #error
15110 #endif
bec39cab
AC
15111 ;
15112 return 0;
15113}
15114_ACEOF
81ecdfbb 15115if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15116 gdb_cv_have_aix_thread_debug=yes
15117else
81ecdfbb 15118 gdb_cv_have_aix_thread_debug=no
d92419e5 15119fi
81ecdfbb 15120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15121fi
15122
81ecdfbb
RW
15123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15124$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
15125 if test $gdb_cv_have_aix_thread_debug = yes; then
15126 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15127 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15128 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15129
15130 # Older versions of AIX do not provide the declaration for
15131 # the getthrds function (it appears that it was introduced
15132 # with AIX 6.x).
15133 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15134"
63a9e923 15135if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
15136 ac_have_decl=1
15137else
15138 ac_have_decl=0
15139fi
15140
15141cat >>confdefs.h <<_ACEOF
15142#define HAVE_DECL_GETTHRDS $ac_have_decl
15143_ACEOF
15144
d92419e5
JB
15145 fi
15146 ;;
c906108c 15147 esac
bec39cab 15148
c906108c
SS
15149fi
15150
3f47be5c 15151if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15153$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
63a9e923 15154if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 15155 $as_echo_n "(cached) " >&6
bec39cab 15156else
81ecdfbb 15157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15158/* end confdefs.h. */
3f47be5c 15159#include <thread_db.h>
bec39cab
AC
15160int
15161main ()
15162{
3f47be5c 15163int i = TD_NOTALLOC;
bec39cab
AC
15164 ;
15165 return 0;
15166}
15167_ACEOF
81ecdfbb 15168if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15169 gdb_cv_thread_db_h_has_td_notalloc=yes
15170else
81ecdfbb 15171 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15172
3f47be5c 15173fi
81ecdfbb 15174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15175
bec39cab 15176fi
81ecdfbb
RW
15177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15178$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15180$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
63a9e923 15181if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 15182 $as_echo_n "(cached) " >&6
59f80f10 15183else
81ecdfbb 15184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15185/* end confdefs.h. */
15186#include <thread_db.h>
15187int
15188main ()
15189{
15190int i = TD_VERSION;
15191 ;
15192 return 0;
15193}
15194_ACEOF
81ecdfbb 15195if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15196 gdb_cv_thread_db_h_has_td_version=yes
15197else
81ecdfbb 15198 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15199
15200fi
81ecdfbb 15201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15202
15203fi
81ecdfbb
RW
15204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15205$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15207$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
63a9e923 15208if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15209 $as_echo_n "(cached) " >&6
59f80f10 15210else
81ecdfbb 15211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15212/* end confdefs.h. */
15213#include <thread_db.h>
15214int
15215main ()
15216{
15217int i = TD_NOTLS;
15218 ;
15219 return 0;
15220}
15221_ACEOF
81ecdfbb 15222if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15223 gdb_cv_thread_db_h_has_td_notls=yes
15224else
81ecdfbb 15225 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15226
15227fi
81ecdfbb 15228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15229
15230fi
81ecdfbb
RW
15231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15232$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15233fi
15234if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15235
81ecdfbb 15236$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15237
59f80f10
DJ
15238fi
15239if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15240
81ecdfbb 15241$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15242
15243fi
15244if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15245
81ecdfbb 15246$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15247
3f47be5c
EZ
15248fi
15249
81ecdfbb
RW
15250ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15251"
63a9e923 15252if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15253 ac_have_decl=1
10568435 15254else
81ecdfbb 15255 ac_have_decl=0
10568435 15256fi
10568435
JK
15257
15258cat >>confdefs.h <<_ACEOF
81ecdfbb 15259#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15260_ACEOF
15261
15262
81ecdfbb
RW
15263if test "$cross_compiling" = yes; then :
15264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15265/* end confdefs.h. */
15266#include <sys/personality.h>
15267int
15268main ()
15269{
15270
15271# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15272# define ADDR_NO_RANDOMIZE 0x0040000
15273# endif
15274 /* Test the flag could be set and stays set. */
15275 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15276 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15277 return 1
15278 ;
15279 return 0;
15280}
15281_ACEOF
81ecdfbb 15282if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15283 have_personality=true
15284else
81ecdfbb 15285 have_personality=false
10568435 15286fi
81ecdfbb
RW
15287rm -f core conftest.err conftest.$ac_objext \
15288 conftest$ac_exeext conftest.$ac_ext
10568435 15289else
81ecdfbb 15290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15291/* end confdefs.h. */
15292#include <sys/personality.h>
15293int
15294main ()
15295{
15296
15297# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15298# define ADDR_NO_RANDOMIZE 0x0040000
15299# endif
15300 /* Test the flag could be set and stays set. */
15301 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15302 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15303 return 1
15304 ;
15305 return 0;
15306}
15307_ACEOF
81ecdfbb 15308if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15309 have_personality=true
15310else
81ecdfbb 15311 have_personality=false
10568435 15312fi
81ecdfbb
RW
15313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15314 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15315fi
81ecdfbb 15316
10568435
JK
15317if $have_personality
15318then
15319
81ecdfbb 15320$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15321
15322fi
15323
e655c1a2
PA
15324case $host_os in
15325 go32* | *djgpp*)
15326 gdbinit=gdb.ini
15327 ;;
15328 *)
15329 gdbinit=.gdbinit
15330 ;;
15331esac
15332
15333cat >>confdefs.h <<_ACEOF
15334#define GDBINIT "$gdbinit"
15335_ACEOF
15336
15337
fb40c209 15338
f83d8a90
DE
15339# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15340# except that the argument to --with-sysroot is optional.
15341# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15342if test "x$with_sysroot" = xyes; then
15343 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15344fi
bec39cab 15345
81ecdfbb
RW
15346# Check whether --with-sysroot was given.
15347if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15348 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15349else
15350 TARGET_SYSTEM_ROOT=
15351fi
030292b7 15352
030292b7 15353
f83d8a90
DE
15354 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15355 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15356 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15357 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15358
f83d8a90
DE
15359cat >>confdefs.h <<_ACEOF
15360#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15361_ACEOF
bec39cab 15362
030292b7 15363
b14b1491 15364
f83d8a90
DE
15365
15366 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15367 if test "x$prefix" = xNONE; then
15368 test_prefix=/usr/local
15369 else
15370 test_prefix=$prefix
15371 fi
15372 else
15373 test_prefix=$exec_prefix
15374 fi
15375 value=0
15376 case ${ac_define_dir} in
15377 "${test_prefix}"|"${test_prefix}/"*|\
15378 '${exec_prefix}'|'${exec_prefix}/'*)
15379 value=1
15380 ;;
15381 esac
15382
15383cat >>confdefs.h <<_ACEOF
15384#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15385_ACEOF
030292b7
DJ
15386
15387
15388
16e7150e 15389
16e7150e 15390
81ecdfbb
RW
15391# Check whether --with-system-gdbinit was given.
15392if test "${with_system_gdbinit+set}" = set; then :
15393 withval=$with_system_gdbinit;
b14b1491
TT
15394 SYSTEM_GDBINIT=$withval
15395else
15396 SYSTEM_GDBINIT=
81ecdfbb
RW
15397fi
15398
16e7150e
JG
15399
15400 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15401 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15402 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15403 ac_define_dir=`eval echo $ac_define_dir`
15404
15405cat >>confdefs.h <<_ACEOF
15406#define SYSTEM_GDBINIT "$ac_define_dir"
15407_ACEOF
15408
15409
15410
0c4a4063 15411
b14b1491
TT
15412 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15413 if test "x$prefix" = xNONE; then
15414 test_prefix=/usr/local
15415 else
15416 test_prefix=$prefix
15417 fi
15418 else
15419 test_prefix=$exec_prefix
15420 fi
15421 value=0
15422 case ${ac_define_dir} in
15423 "${test_prefix}"|"${test_prefix}/"*|\
15424 '${exec_prefix}'|'${exec_prefix}/'*)
15425 value=1
15426 ;;
15427 esac
16e7150e 15428
b14b1491
TT
15429cat >>confdefs.h <<_ACEOF
15430#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15431_ACEOF
15432
b14b1491 15433
16e7150e 15434
0c4a4063 15435
b835bb52 15436
81ecdfbb
RW
15437# Check whether --enable-werror was given.
15438if test "${enable_werror+set}" = set; then :
15439 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15440 yes | y) ERROR_ON_WARNING="yes" ;;
15441 no | n) ERROR_ON_WARNING="no" ;;
63a9e923 15442 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15443 esac
81ecdfbb
RW
15444fi
15445
094a342e 15446
9a084706
PA
15447# Enable -Werror by default when using gcc. Turn it off for releases.
15448if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15449 ERROR_ON_WARNING=yes
15450fi
15451
15452WERROR_CFLAGS=""
15453if test "${ERROR_ON_WARNING}" = yes ; then
15454 WERROR_CFLAGS="-Werror"
15455fi
15456
cf6de44d 15457# The options we'll try to enable.
aac331e4 15458build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 15459-Wno-unused -Wunused-value -Wunused-function \
aac331e4 15460-Wno-switch -Wno-char-subscripts \
cf6de44d 15461-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
8465943a 15462-Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
7f8a5d38 15463-Wno-mismatched-tags \
632e107b 15464-Wno-error=deprecated-register \
85e26832 15465-Wsuggest-override \
1a34f210 15466-Wimplicit-fallthrough=3 \
aff689d3 15467-Wduplicated-cond"
3bc3d82a 15468
3526781e 15469case "${host}" in
4fa7574e
RO
15470 *-*-mingw32*)
15471 # Enable -Wno-format by default when using gcc on mingw since many
15472 # GCC versions complain about %I64.
15473 build_warnings="$build_warnings -Wno-format" ;;
15474 *-*-solaris*)
15475 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15476 # doesn't understand.
15477 build_warnings="$build_warnings -Wno-unknown-pragmas"
15478 # Solaris 11 <unistd.h> marks vfork deprecated.
15479 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
d3685d60 15480 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15481esac
15482
81ecdfbb
RW
15483# Check whether --enable-build-warnings was given.
15484if test "${enable_build_warnings+set}" = set; then :
15485 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15486 yes) ;;
15487 no) build_warnings="-w";;
15488 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15489 build_warnings="${build_warnings} ${t}";;
15490 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15491 build_warnings="${t} ${build_warnings}";;
15492 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15493esac
d4f3574e 15494if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15495 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15496fi
81ecdfbb
RW
15497fi
15498# Check whether --enable-gdb-build-warnings was given.
15499if test "${enable_gdb_build_warnings+set}" = set; then :
15500 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15501 yes) ;;
15502 no) build_warnings="-w";;
15503 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15504 build_warnings="${build_warnings} ${t}";;
15505 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15506 build_warnings="${t} ${build_warnings}";;
15507 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15508esac
15509if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15510 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15511fi
81ecdfbb 15512fi
3bc3d82a
PA
15513
15514# The set of warnings supported by a C++ compiler is not the same as
15515# of the C compiler.
cf6de44d 15516ac_ext=cpp
3bc3d82a
PA
15517ac_cpp='$CXXCPP $CPPFLAGS'
15518ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15519ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15520ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15521
3bc3d82a 15522
81ecdfbb 15523WARN_CFLAGS=""
c906108c
SS
15524if test "x${build_warnings}" != x -a "x$GCC" = xyes
15525then
81ecdfbb
RW
15526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15527$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15528 # Separate out the -Werror flag as some files just cannot be
15529 # compiled with it enabled.
15530 for w in ${build_warnings}; do
7544db95
PA
15531 # GCC does not complain about -Wno-unknown-warning. Invert
15532 # and test -Wunknown-warning instead.
15533 case $w in
15534 -Wno-*)
15535 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15536 *)
15537 wtest=$w ;;
15538 esac
15539
746a987d
AC
15540 case $w in
15541 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15542 *)
15543 # Check whether GCC accepts it.
4536bbc6 15544 saved_CFLAGS="$CFLAGS"
3e019bdc 15545 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15546 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15547 CXXFLAGS="$CXXFLAGS -Werror $wtest"
54019719 15548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15549/* end confdefs.h. */
4536bbc6 15550
bec39cab
AC
15551int
15552main ()
15553{
4536bbc6 15554
bec39cab
AC
15555 ;
15556 return 0;
15557}
15558_ACEOF
3bc3d82a 15559if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15560 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15561fi
81ecdfbb 15562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15563 CFLAGS="$saved_CFLAGS"
3bc3d82a 15564 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15565 esac
15566 done
81ecdfbb
RW
15567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15568$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15569fi
15570
15571
104c1213 15572
cf6de44d 15573ac_ext=c
3bc3d82a
PA
15574ac_cpp='$CPP $CPPFLAGS'
15575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15577ac_compiler_gnu=$ac_cv_c_compiler_gnu
15578
3bc3d82a 15579
b835bb52 15580
7a292a7a 15581# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15583$as_echo_n "checking for cygwin... " >&6; }
63a9e923 15584if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 15585 $as_echo_n "(cached) " >&6
bec39cab 15586else
81ecdfbb 15587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15588/* end confdefs.h. */
7a292a7a
SS
15589
15590#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15591lose
15592#endif
bec39cab 15593_ACEOF
7a292a7a 15594if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15595 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15596 gdb_cv_os_cygwin=yes
15597else
7a292a7a
SS
15598 gdb_cv_os_cygwin=no
15599fi
15600rm -f conftest*
15601
15602fi
81ecdfbb
RW
15603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15604$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15605
aff38e61 15606
3eb25fda 15607SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15608case ${host} in
95cbc983
AC
15609 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15610 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15611 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15612esac
15613
15614
cd0fc7c3
SS
15615# libreadline needs libuser32.a in a cygwin environment
15616WIN32LIBS=
15617if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15618 WIN32LIBS="-luser32"
15619 case "${target}" in
15620 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15621 ;;
15622 esac
cd0fc7c3 15623fi
c906108c 15624
b4505029
MM
15625# The ser-tcp.c module requires sockets.
15626case ${host} in
15627 *mingw32*)
15628
81ecdfbb 15629$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15630
15631 WIN32LIBS="$WIN32LIBS -lws2_32"
15632 ;;
15633esac
15634
7a292a7a 15635
31d99776 15636# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15637
15638 OLD_CFLAGS=$CFLAGS
15639 OLD_LDFLAGS=$LDFLAGS
15640 OLD_LIBS=$LIBS
15641 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15642 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15643 # always want our bfd.
15644 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15645 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15646 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15647 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15648 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 15650$as_echo_n "checking for ELF support in BFD... " >&6; }
63a9e923 15651if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 15652 $as_echo_n "(cached) " >&6
31d99776 15653else
81ecdfbb 15654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15655/* end confdefs.h. */
15656#include <stdlib.h>
def63ff0
TT
15657 #include "bfd.h"
15658 #include "elf-bfd.h"
31d99776
DJ
15659
15660int
15661main ()
15662{
def63ff0 15663return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15664 ;
15665 return 0;
15666}
15667_ACEOF
81ecdfbb 15668if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15669 gdb_cv_var_elf=yes
15670else
81ecdfbb 15671 gdb_cv_var_elf=no
31d99776 15672fi
81ecdfbb
RW
15673rm -f core conftest.err conftest.$ac_objext \
15674 conftest$ac_exeext conftest.$ac_ext
31d99776 15675fi
81ecdfbb
RW
15676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15677$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15678 CFLAGS=$OLD_CFLAGS
15679 LDFLAGS=$OLD_LDFLAGS
15680 LIBS=$OLD_LIBS
31d99776 15681if test $gdb_cv_var_elf = yes; then
d4777acb 15682 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15683
81ecdfbb 15684$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15685
075ff26d
JK
15686 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15687 if test "$plugins" = "yes"; then
a48b32c0
L
15688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15689$as_echo_n "checking for library containing dlopen... " >&6; }
63a9e923 15690if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15691 $as_echo_n "(cached) " >&6
15692else
15693 ac_func_search_save_LIBS=$LIBS
15694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15695/* end confdefs.h. */
15696
15697/* Override any GCC internal prototype to avoid an error.
15698 Use char because int might match the return type of a GCC
15699 builtin and then its argument prototype would still apply. */
15700#ifdef __cplusplus
15701extern "C"
15702#endif
15703char dlopen ();
15704int
15705main ()
15706{
15707return dlopen ();
15708 ;
15709 return 0;
15710}
15711_ACEOF
15712for ac_lib in '' dl; do
15713 if test -z "$ac_lib"; then
15714 ac_res="none required"
15715 else
15716 ac_res=-l$ac_lib
15717 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15718 fi
15719 if ac_fn_c_try_link "$LINENO"; then :
15720 ac_cv_search_dlopen=$ac_res
15721fi
15722rm -f core conftest.err conftest.$ac_objext \
15723 conftest$ac_exeext
63a9e923 15724 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15725 break
15726fi
15727done
63a9e923 15728if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15729
15730else
15731 ac_cv_search_dlopen=no
15732fi
15733rm conftest.$ac_ext
15734LIBS=$ac_func_search_save_LIBS
15735fi
15736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15737$as_echo "$ac_cv_search_dlopen" >&6; }
15738ac_res=$ac_cv_search_dlopen
15739if test "$ac_res" != no; then :
15740 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15741
15742fi
15743
075ff26d 15744 fi
31d99776 15745fi
31d99776 15746
4f05add4
TT
15747# Add macho support to GDB, but only if BFD includes it.
15748
15749 OLD_CFLAGS=$CFLAGS
15750 OLD_LDFLAGS=$LDFLAGS
15751 OLD_LIBS=$LIBS
15752 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15753 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15754 # always want our bfd.
15755 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15756 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15757 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15758 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15759 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15761$as_echo_n "checking for Mach-O support in BFD... " >&6; }
63a9e923 15762if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
15763 $as_echo_n "(cached) " >&6
15764else
15765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15766/* end confdefs.h. */
15767#include <stdlib.h>
15768 #include "bfd.h"
15769 #include "mach-o.h"
15770
15771int
15772main ()
15773{
15774return bfd_mach_o_lookup_command (NULL, 0, NULL);
15775 ;
15776 return 0;
15777}
15778_ACEOF
15779if ac_fn_c_try_link "$LINENO"; then :
15780 gdb_cv_var_macho=yes
15781else
15782 gdb_cv_var_macho=no
15783fi
15784rm -f core conftest.err conftest.$ac_objext \
15785 conftest$ac_exeext conftest.$ac_ext
15786fi
15787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15788$as_echo "$gdb_cv_var_macho" >&6; }
15789 CFLAGS=$OLD_CFLAGS
15790 LDFLAGS=$OLD_LDFLAGS
15791 LIBS=$OLD_LIBS
15792if test $gdb_cv_var_macho = yes; then
15793 CONFIG_OBS="$CONFIG_OBS machoread.o"
15794fi
15795
121ce6e5
DJ
15796# Add any host-specific objects to GDB.
15797CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15798
608e2dbb
TT
15799# If building on ELF, look for lzma support for embedded compressed debug info.
15800if test $gdb_cv_var_elf = yes; then
15801
15802# Check whether --with-lzma was given.
15803if test "${with_lzma+set}" = set; then :
15804 withval=$with_lzma;
15805else
15806 with_lzma=auto
15807fi
15808
15809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15810$as_echo_n "checking whether to use lzma... " >&6; }
15811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15812$as_echo "$with_lzma" >&6; }
15813
15814 if test "${with_lzma}" != no; then
15815
15816
15817
15818
15819
15820
15821
15822
15823 use_additional=yes
15824
15825 acl_save_prefix="$prefix"
15826 prefix="$acl_final_prefix"
15827 acl_save_exec_prefix="$exec_prefix"
15828 exec_prefix="$acl_final_exec_prefix"
15829
15830 eval additional_includedir=\"$includedir\"
15831 eval additional_libdir=\"$libdir\"
15832
15833 exec_prefix="$acl_save_exec_prefix"
15834 prefix="$acl_save_prefix"
15835
15836
15837# Check whether --with-liblzma-prefix was given.
15838if test "${with_liblzma_prefix+set}" = set; then :
15839 withval=$with_liblzma_prefix;
15840 if test "X$withval" = "Xno"; then
15841 use_additional=no
15842 else
15843 if test "X$withval" = "X"; then
15844
15845 acl_save_prefix="$prefix"
15846 prefix="$acl_final_prefix"
15847 acl_save_exec_prefix="$exec_prefix"
15848 exec_prefix="$acl_final_exec_prefix"
15849
15850 eval additional_includedir=\"$includedir\"
15851 eval additional_libdir=\"$libdir\"
15852
15853 exec_prefix="$acl_save_exec_prefix"
15854 prefix="$acl_save_prefix"
15855
15856 else
15857 additional_includedir="$withval/include"
15858 additional_libdir="$withval/lib"
15859 fi
15860 fi
15861
15862fi
15863
15864 LIBLZMA=
15865 LTLIBLZMA=
15866 INCLZMA=
15867 rpathdirs=
15868 ltrpathdirs=
15869 names_already_handled=
15870 names_next_round='lzma '
15871 while test -n "$names_next_round"; do
15872 names_this_round="$names_next_round"
15873 names_next_round=
15874 for name in $names_this_round; do
15875 already_handled=
15876 for n in $names_already_handled; do
15877 if test "$n" = "$name"; then
15878 already_handled=yes
15879 break
15880 fi
15881 done
15882 if test -z "$already_handled"; then
15883 names_already_handled="$names_already_handled $name"
15884 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15885 eval value=\"\$HAVE_LIB$uppername\"
15886 if test -n "$value"; then
15887 if test "$value" = yes; then
15888 eval value=\"\$LIB$uppername\"
15889 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15890 eval value=\"\$LTLIB$uppername\"
15891 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15892 else
15893 :
15894 fi
15895 else
15896 found_dir=
15897 found_la=
15898 found_so=
15899 found_a=
15900 if test $use_additional = yes; then
15901 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15902 found_dir="$additional_libdir"
15903 found_so="$additional_libdir/lib$name.$shlibext"
15904 if test -f "$additional_libdir/lib$name.la"; then
15905 found_la="$additional_libdir/lib$name.la"
15906 fi
15907 else
15908 if test -f "$additional_libdir/lib$name.$libext"; then
15909 found_dir="$additional_libdir"
15910 found_a="$additional_libdir/lib$name.$libext"
15911 if test -f "$additional_libdir/lib$name.la"; then
15912 found_la="$additional_libdir/lib$name.la"
15913 fi
15914 fi
15915 fi
15916 fi
15917 if test "X$found_dir" = "X"; then
15918 for x in $LDFLAGS $LTLIBLZMA; do
15919
15920 acl_save_prefix="$prefix"
15921 prefix="$acl_final_prefix"
15922 acl_save_exec_prefix="$exec_prefix"
15923 exec_prefix="$acl_final_exec_prefix"
15924 eval x=\"$x\"
15925 exec_prefix="$acl_save_exec_prefix"
15926 prefix="$acl_save_prefix"
15927
15928 case "$x" in
15929 -L*)
15930 dir=`echo "X$x" | sed -e 's/^X-L//'`
15931 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15932 found_dir="$dir"
15933 found_so="$dir/lib$name.$shlibext"
15934 if test -f "$dir/lib$name.la"; then
15935 found_la="$dir/lib$name.la"
15936 fi
15937 else
15938 if test -f "$dir/lib$name.$libext"; then
15939 found_dir="$dir"
15940 found_a="$dir/lib$name.$libext"
15941 if test -f "$dir/lib$name.la"; then
15942 found_la="$dir/lib$name.la"
15943 fi
15944 fi
15945 fi
15946 ;;
15947 esac
15948 if test "X$found_dir" != "X"; then
15949 break
15950 fi
15951 done
15952 fi
15953 if test "X$found_dir" != "X"; then
15954 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15955 if test "X$found_so" != "X"; then
15956 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15957 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15958 else
15959 haveit=
15960 for x in $ltrpathdirs; do
15961 if test "X$x" = "X$found_dir"; then
15962 haveit=yes
15963 break
15964 fi
15965 done
15966 if test -z "$haveit"; then
15967 ltrpathdirs="$ltrpathdirs $found_dir"
15968 fi
15969 if test "$hardcode_direct" = yes; then
15970 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15971 else
15972 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15973 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15974 haveit=
15975 for x in $rpathdirs; do
15976 if test "X$x" = "X$found_dir"; then
15977 haveit=yes
15978 break
15979 fi
15980 done
15981 if test -z "$haveit"; then
15982 rpathdirs="$rpathdirs $found_dir"
15983 fi
15984 else
15985 haveit=
15986 for x in $LDFLAGS $LIBLZMA; do
15987
15988 acl_save_prefix="$prefix"
15989 prefix="$acl_final_prefix"
15990 acl_save_exec_prefix="$exec_prefix"
15991 exec_prefix="$acl_final_exec_prefix"
15992 eval x=\"$x\"
15993 exec_prefix="$acl_save_exec_prefix"
15994 prefix="$acl_save_prefix"
15995
15996 if test "X$x" = "X-L$found_dir"; then
15997 haveit=yes
15998 break
15999 fi
16000 done
16001 if test -z "$haveit"; then
16002 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16003 fi
16004 if test "$hardcode_minus_L" != no; then
16005 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16006 else
16007 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16008 fi
16009 fi
16010 fi
16011 fi
16012 else
16013 if test "X$found_a" != "X"; then
16014 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16015 else
16016 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16017 fi
16018 fi
16019 additional_includedir=
16020 case "$found_dir" in
16021 */lib | */lib/)
16022 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16023 additional_includedir="$basedir/include"
16024 ;;
16025 esac
16026 if test "X$additional_includedir" != "X"; then
16027 if test "X$additional_includedir" != "X/usr/include"; then
16028 haveit=
16029 if test "X$additional_includedir" = "X/usr/local/include"; then
16030 if test -n "$GCC"; then
16031 case $host_os in
16032 linux*) haveit=yes;;
16033 esac
16034 fi
16035 fi
16036 if test -z "$haveit"; then
16037 for x in $CPPFLAGS $INCLZMA; do
16038
16039 acl_save_prefix="$prefix"
16040 prefix="$acl_final_prefix"
16041 acl_save_exec_prefix="$exec_prefix"
16042 exec_prefix="$acl_final_exec_prefix"
16043 eval x=\"$x\"
16044 exec_prefix="$acl_save_exec_prefix"
16045 prefix="$acl_save_prefix"
16046
16047 if test "X$x" = "X-I$additional_includedir"; then
16048 haveit=yes
16049 break
16050 fi
16051 done
16052 if test -z "$haveit"; then
16053 if test -d "$additional_includedir"; then
16054 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16055 fi
16056 fi
16057 fi
16058 fi
16059 fi
16060 if test -n "$found_la"; then
16061 save_libdir="$libdir"
16062 case "$found_la" in
16063 */* | *\\*) . "$found_la" ;;
16064 *) . "./$found_la" ;;
16065 esac
16066 libdir="$save_libdir"
16067 for dep in $dependency_libs; do
16068 case "$dep" in
16069 -L*)
16070 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16071 if test "X$additional_libdir" != "X/usr/lib"; then
16072 haveit=
16073 if test "X$additional_libdir" = "X/usr/local/lib"; then
16074 if test -n "$GCC"; then
16075 case $host_os in
16076 linux*) haveit=yes;;
16077 esac
16078 fi
16079 fi
16080 if test -z "$haveit"; then
16081 haveit=
16082 for x in $LDFLAGS $LIBLZMA; do
16083
16084 acl_save_prefix="$prefix"
16085 prefix="$acl_final_prefix"
16086 acl_save_exec_prefix="$exec_prefix"
16087 exec_prefix="$acl_final_exec_prefix"
16088 eval x=\"$x\"
16089 exec_prefix="$acl_save_exec_prefix"
16090 prefix="$acl_save_prefix"
16091
16092 if test "X$x" = "X-L$additional_libdir"; then
16093 haveit=yes
16094 break
16095 fi
16096 done
16097 if test -z "$haveit"; then
16098 if test -d "$additional_libdir"; then
16099 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16100 fi
16101 fi
16102 haveit=
16103 for x in $LDFLAGS $LTLIBLZMA; do
16104
16105 acl_save_prefix="$prefix"
16106 prefix="$acl_final_prefix"
16107 acl_save_exec_prefix="$exec_prefix"
16108 exec_prefix="$acl_final_exec_prefix"
16109 eval x=\"$x\"
16110 exec_prefix="$acl_save_exec_prefix"
16111 prefix="$acl_save_prefix"
16112
16113 if test "X$x" = "X-L$additional_libdir"; then
16114 haveit=yes
16115 break
16116 fi
16117 done
16118 if test -z "$haveit"; then
16119 if test -d "$additional_libdir"; then
16120 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16121 fi
16122 fi
16123 fi
16124 fi
16125 ;;
16126 -R*)
16127 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16128 if test "$enable_rpath" != no; then
16129 haveit=
16130 for x in $rpathdirs; do
16131 if test "X$x" = "X$dir"; then
16132 haveit=yes
16133 break
16134 fi
16135 done
16136 if test -z "$haveit"; then
16137 rpathdirs="$rpathdirs $dir"
16138 fi
16139 haveit=
16140 for x in $ltrpathdirs; do
16141 if test "X$x" = "X$dir"; then
16142 haveit=yes
16143 break
16144 fi
16145 done
16146 if test -z "$haveit"; then
16147 ltrpathdirs="$ltrpathdirs $dir"
16148 fi
16149 fi
16150 ;;
16151 -l*)
16152 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16153 ;;
16154 *.la)
16155 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16156 ;;
16157 *)
16158 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16159 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16160 ;;
16161 esac
16162 done
16163 fi
16164 else
16165 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16166 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16167 fi
16168 fi
16169 fi
16170 done
16171 done
16172 if test "X$rpathdirs" != "X"; then
16173 if test -n "$hardcode_libdir_separator"; then
16174 alldirs=
16175 for found_dir in $rpathdirs; do
16176 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16177 done
16178 acl_save_libdir="$libdir"
16179 libdir="$alldirs"
16180 eval flag=\"$hardcode_libdir_flag_spec\"
16181 libdir="$acl_save_libdir"
16182 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16183 else
16184 for found_dir in $rpathdirs; do
16185 acl_save_libdir="$libdir"
16186 libdir="$found_dir"
16187 eval flag=\"$hardcode_libdir_flag_spec\"
16188 libdir="$acl_save_libdir"
16189 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16190 done
16191 fi
16192 fi
16193 if test "X$ltrpathdirs" != "X"; then
16194 for found_dir in $ltrpathdirs; do
16195 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16196 done
16197 fi
16198
16199
16200 ac_save_CPPFLAGS="$CPPFLAGS"
16201
16202 for element in $INCLZMA; do
16203 haveit=
16204 for x in $CPPFLAGS; do
16205
16206 acl_save_prefix="$prefix"
16207 prefix="$acl_final_prefix"
16208 acl_save_exec_prefix="$exec_prefix"
16209 exec_prefix="$acl_final_exec_prefix"
16210 eval x=\"$x\"
16211 exec_prefix="$acl_save_exec_prefix"
16212 prefix="$acl_save_prefix"
16213
16214 if test "X$x" = "X$element"; then
16215 haveit=yes
16216 break
16217 fi
16218 done
16219 if test -z "$haveit"; then
16220 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16221 fi
16222 done
16223
16224
16225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16226$as_echo_n "checking for liblzma... " >&6; }
63a9e923 16227if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16228 $as_echo_n "(cached) " >&6
16229else
16230
16231 ac_save_LIBS="$LIBS"
16232 LIBS="$LIBS $LIBLZMA"
16233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16234/* end confdefs.h. */
16235#include "lzma.h"
16236int
16237main ()
16238{
16239lzma_index_iter iter;
16240 lzma_index_iter_init (&iter, 0);
16241 lzma_mf_is_supported (LZMA_MF_HC3);
16242 ;
16243 return 0;
16244}
16245_ACEOF
16246if ac_fn_c_try_link "$LINENO"; then :
16247 ac_cv_liblzma=yes
16248else
16249 ac_cv_liblzma=no
16250fi
16251rm -f core conftest.err conftest.$ac_objext \
16252 conftest$ac_exeext conftest.$ac_ext
16253 LIBS="$ac_save_LIBS"
16254
16255fi
16256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16257$as_echo "$ac_cv_liblzma" >&6; }
16258 if test "$ac_cv_liblzma" = yes; then
16259 HAVE_LIBLZMA=yes
16260
16261$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16262
16263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16264$as_echo_n "checking how to link with liblzma... " >&6; }
16265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16266$as_echo "$LIBLZMA" >&6; }
16267 else
16268 HAVE_LIBLZMA=no
16269 CPPFLAGS="$ac_save_CPPFLAGS"
16270 LIBLZMA=
16271 LTLIBLZMA=
16272 fi
16273
16274
16275
16276
16277
16278
16279 if test "$HAVE_LIBLZMA" != yes; then
16280 if test "$with_lzma" = yes; then
63a9e923 16281 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
16282 fi
16283 fi
16284 fi
16285fi
16286
3fc11d3e
JM
16287LIBGUI="../libgui/src/libgui.a"
16288GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16289
16290
7a292a7a 16291
3fc11d3e
JM
16292WIN32LDAPP=
16293
16294
16295
d91670b9 16296case "${host}" in
686a5eed 16297*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16298 configdir="win"
16299 ;;
16300*)
16301 configdir="unix"
16302 ;;
16303esac
3fc11d3e
JM
16304
16305GDBTKLIBS=
16306if test "${enable_gdbtk}" = "yes"; then
16307
d1c3b63a
KS
16308 # Gdbtk must have an absolute path to srcdir in order to run
16309 # properly when not installed.
16310 here=`pwd`
16311 cd ${srcdir}
16312 GDBTK_SRC_DIR=`pwd`
16313 cd $here
16314
bec39cab 16315
5062cc19
KS
16316 #
16317 # Ok, lets find the tcl configuration
16318 # First, look for one uninstalled.
16319 # the alternative search directory is invoked by --with-tcl
16320 #
3fc11d3e 16321
5062cc19
KS
16322 if test x"${no_tcl}" = x ; then
16323 # we reset no_tcl in case something fails here
16324 no_tcl=true
bec39cab 16325
81ecdfbb
RW
16326# Check whether --with-tcl was given.
16327if test "${with_tcl+set}" = set; then :
16328 withval=$with_tcl; with_tclconfig=${withval}
16329fi
16330
16331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16332$as_echo_n "checking for Tcl configuration... " >&6; }
63a9e923 16333 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 16334 $as_echo_n "(cached) " >&6
3fc11d3e 16335else
bec39cab 16336
3fc11d3e 16337
5062cc19
KS
16338 # First check to see if --with-tcl was specified.
16339 case "${host}" in
16340 *-*-cygwin*) platDir="win" ;;
16341 *) platDir="unix" ;;
16342 esac
16343 if test x"${with_tclconfig}" != x ; then
16344 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16345 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16346 else
63a9e923 16347 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16348 fi
16349 fi
16350
16351 # then check for a private Tcl installation
16352 if test x"${ac_cv_c_tclconfig}" = x ; then
16353 for i in \
16354 ../tcl \
16355 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16356 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16357 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16358 ../../tcl \
16359 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16360 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16361 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16362 ../../../tcl \
16363 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16364 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16365 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16366 if test -f "$i/$platDir/tclConfig.sh" ; then
16367 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16368 break
16369 fi
16370 done
16371 fi
16372
16373 # on Darwin, check in Framework installation locations
16374 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16375 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16376 `ls -d /Library/Frameworks 2>/dev/null` \
16377 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16378 `ls -d /System/Library/Frameworks 2>/dev/null` \
16379 ; do
16380 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16381 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16382 break
16383 fi
16384 done
16385 fi
16386
16387 # check in a few common install locations
16388 if test x"${ac_cv_c_tclconfig}" = x ; then
16389 for i in `ls -d ${libdir} 2>/dev/null` \
16390 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16391 `ls -d ${prefix}/lib 2>/dev/null` \
16392 `ls -d /usr/local/lib 2>/dev/null` \
16393 `ls -d /usr/contrib/lib 2>/dev/null` \
16394 `ls -d /usr/lib 2>/dev/null` \
16395 ; do
16396 if test -f "$i/tclConfig.sh" ; then
16397 ac_cv_c_tclconfig=`(cd $i; pwd)`
16398 break
16399 fi
16400 done
16401 fi
3fc11d3e 16402
5062cc19
KS
16403 # check in a few other private locations
16404 if test x"${ac_cv_c_tclconfig}" = x ; then
16405 for i in \
16406 ${srcdir}/../tcl \
16407 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16408 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16409 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16410 if test -f "$i/$platDir/tclConfig.sh" ; then
16411 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16412 break
16413 fi
16414 done
16415 fi
bec39cab 16416
3fc11d3e
JM
16417fi
16418
5062cc19
KS
16419
16420 if test x"${ac_cv_c_tclconfig}" = x ; then
16421 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16422 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16423$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16424 else
16425 no_tcl=
16426 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16428$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16429 fi
16430 fi
3fc11d3e 16431
bec39cab 16432
85541719
DE
16433 # If $no_tk is nonempty, then we can't do Tk, and there is no
16434 # point to doing Tcl.
bec39cab 16435
5062cc19
KS
16436 #
16437 # Ok, lets find the tk configuration
16438 # First, look for one uninstalled.
16439 # the alternative search directory is invoked by --with-tk
16440 #
3fc11d3e 16441
5062cc19
KS
16442 if test x"${no_tk}" = x ; then
16443 # we reset no_tk in case something fails here
16444 no_tk=true
bec39cab 16445
81ecdfbb
RW
16446# Check whether --with-tk was given.
16447if test "${with_tk+set}" = set; then :
16448 withval=$with_tk; with_tkconfig=${withval}
16449fi
16450
16451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16452$as_echo_n "checking for Tk configuration... " >&6; }
63a9e923 16453 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 16454 $as_echo_n "(cached) " >&6
bec39cab 16455else
3fc11d3e
JM
16456
16457
5062cc19
KS
16458 # First check to see if --with-tkconfig was specified.
16459 if test x"${with_tkconfig}" != x ; then
16460 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16461 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16462 else
63a9e923 16463 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16464 fi
16465 fi
3fc11d3e 16466
5062cc19
KS
16467 # then check for a private Tk library
16468 case "${host}" in
16469 *-*-cygwin*) platDir="win" ;;
16470 *) platDir="unix" ;;
16471 esac
16472 if test x"${ac_cv_c_tkconfig}" = x ; then
16473 for i in \
16474 ../tk \
16475 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16476 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16477 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16478 ../../tk \
16479 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16480 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16481 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16482 ../../../tk \
16483 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16484 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16485 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16486 if test -f "$i/$platDir/tkConfig.sh" ; then
16487 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16488 break
16489 fi
16490 done
16491 fi
16492
16493 # on Darwin, check in Framework installation locations
16494 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16495 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16496 `ls -d /Library/Frameworks 2>/dev/null` \
16497 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16498 `ls -d /System/Library/Frameworks 2>/dev/null` \
16499 ; do
16500 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16501 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16502 break
16503 fi
16504 done
16505 fi
16506
16507 # check in a few common install locations
16508 if test x"${ac_cv_c_tkconfig}" = x ; then
16509 for i in `ls -d ${libdir} 2>/dev/null` \
16510 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16511 `ls -d ${prefix}/lib 2>/dev/null` \
16512 `ls -d /usr/local/lib 2>/dev/null` \
16513 `ls -d /usr/contrib/lib 2>/dev/null` \
16514 `ls -d /usr/lib 2>/dev/null` \
16515 ; do
16516 if test -f "$i/tkConfig.sh" ; then
16517 ac_cv_c_tkconfig=`(cd $i; pwd)`
16518 break
16519 fi
16520 done
16521 fi
16522 # check in a few other private locations
16523 if test x"${ac_cv_c_tkconfig}" = x ; then
16524 for i in \
16525 ${srcdir}/../tk \
16526 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16527 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16528 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16529 if test -f "$i/$platDir/tkConfig.sh" ; then
16530 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16531 break
16532 fi
16533 done
16534 fi
3fc11d3e 16535
3fc11d3e
JM
16536fi
16537
16538
5062cc19
KS
16539 if test x"${ac_cv_c_tkconfig}" = x ; then
16540 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16542$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16543 else
16544 no_tk=
16545 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16547$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16548 fi
3fc11d3e 16549 fi
dd2504ab 16550
dd2504ab 16551
85541719
DE
16552 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16553
81ecdfbb
RW
16554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16555$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16556
16557 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16559$as_echo "loading" >&6; }
85541719
DE
16560 . ${TCL_BIN_DIR}/tclConfig.sh
16561 else
81ecdfbb
RW
16562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16563$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16564 fi
16565
16566 # eval is required to do the TCL_DBGX substitution
16567 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16568 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16569
16570 # If the TCL_BIN_DIR is the build directory (not the install directory),
16571 # then set the common variable name to the value of the build variables.
16572 # For example, the variable TCL_LIB_SPEC will be set to the value
16573 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16574 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16575 # installed and uninstalled version of Tcl.
16576 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16577 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16578 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16579 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16580 elif test "`uname -s`" = "Darwin"; then
16581 # If Tcl was built as a framework, attempt to use the libraries
16582 # from the framework at the given location so that linking works
a68ffae9 16583 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16584 case ${TCL_DEFS} in
16585 *TCL_FRAMEWORK*)
16586 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16587 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16588 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16589 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16590 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16591 break
16592 fi
16593 done
16594 fi
16595 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16596 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16597 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16598 fi
16599 ;;
16600 esac
16601 fi
16602
16603 # eval is required to do the TCL_DBGX substitution
16604 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16605 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16606 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16607 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623 # Check for in-tree tcl
16624 here=`pwd`
16625 cd ${srcdir}/..
16626 topdir=`pwd`
16627 cd ${here}
16628
16629 intree="no"
16630 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16631 intree="yes"
16632 fi
16633
16634 # Find Tcl private headers
16635 if test x"${intree}" = xno; then
16636
81ecdfbb
RW
16637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16638$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16639 private_dir=""
16640 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16641 if test -f ${dir}/tclInt.h ; then
16642 private_dir=${dir}
16643 fi
16644
16645 if test x"${private_dir}" = x; then
63a9e923 16646 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16647 else
16648 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16650$as_echo "${private_dir}" >&6; }
85541719
DE
16651 fi
16652
16653 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16654 TCL_LIBRARY="${TCL_LIB_SPEC}"
16655 TCL_DEPS=""
16656 else
16657 # If building tcl in the same src tree, private headers
16658 # are not needed, but we need to be sure to use the right
16659 # headers library
16660 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16661 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16662 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16663 fi
16664
16665
16666
16667
16668
81ecdfbb
RW
16669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16670$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16671
5062cc19 16672 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16674$as_echo "loading" >&6; }
5062cc19 16675 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16676 else
81ecdfbb
RW
16677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16678$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16679 fi
bec39cab 16680
5062cc19
KS
16681 # eval is required to do the TK_DBGX substitution
16682 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16683 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16684
16685 # If the TK_BIN_DIR is the build directory (not the install directory),
16686 # then set the common variable name to the value of the build variables.
16687 # For example, the variable TK_LIB_SPEC will be set to the value
16688 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16689 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16690 # installed and uninstalled version of Tcl.
85541719 16691 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16692 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16693 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16694 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16695 elif test "`uname -s`" = "Darwin"; then
16696 # If Tk was built as a framework, attempt to use the libraries
16697 # from the framework at the given location so that linking works
a68ffae9 16698 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16699 case ${TK_DEFS} in
16700 *TK_FRAMEWORK*)
85541719 16701 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16702 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16703 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16704 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16705 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16706 break
16707 fi
16708 done
16709 fi
85541719 16710 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16711 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16712 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16713 fi
16714 ;;
16715 esac
3fc11d3e
JM
16716 fi
16717
5062cc19
KS
16718 # eval is required to do the TK_DBGX substitution
16719 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16720 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16721 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16722 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16723
3fc11d3e
JM
16724
16725
bec39cab
AC
16726
16727
16728
16729
16730
16731
16732
3fc11d3e 16733
3fc11d3e 16734
bec39cab 16735
bec39cab 16736
85541719
DE
16737 # Check for in-tree Tk
16738 intree="no"
16739 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16740 intree="yes"
16741 fi
3fc11d3e 16742
85541719
DE
16743 # Find Tk private headers
16744 if test x"${intree}" = xno; then
3fc11d3e 16745
81ecdfbb
RW
16746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16747$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16748 private_dir=""
16749 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16750 if test -f ${dir}/tkInt.h; then
16751 private_dir=${dir}
3fc11d3e 16752 fi
bec39cab 16753
5062cc19 16754 if test x"${private_dir}" = x; then
63a9e923 16755 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16756 else
5062cc19 16757 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16759$as_echo "${private_dir}" >&6; }
3fc11d3e 16760 fi
3fc11d3e 16761
85541719
DE
16762 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16763 TK_LIBRARY=${TK_LIB_SPEC}
16764 TK_DEPS=""
16765 else
16766 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16767 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16768 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16769 fi
3fc11d3e
JM
16770
16771
3fc11d3e
JM
16772
16773
3fc11d3e 16774
85541719 16775 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16776
85541719
DE
16777 # Include some libraries that Tcl and Tk want.
16778 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16779 # Yes, the ordering seems wrong here. But it isn't.
16780 # TK_LIBS is the list of libraries that need to be linked
16781 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16782 # were in LIBS then any link tests after this point would
16783 # try to include things like `$(LIBGUI)', which wouldn't work.
16784 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16785
85541719
DE
16786 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16787 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16788 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16789 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16790 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16791 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16792 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16793
85541719
DE
16794 if test x$gdb_cv_os_cygwin = xyes; then
16795 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16796 WIN32LDAPP="-Wl,--subsystem,console"
16797 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16798 fi
ffc6a242 16799
81ecdfbb 16800 subdirs="$subdirs gdbtk"
3ace7edb 16801
85541719 16802 fi
3fc11d3e
JM
16803fi
16804
16805
16806
16807
16808
16809
16810
16811
81ecdfbb
RW
16812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16813$as_echo_n "checking for X... " >&6; }
bec39cab 16814
c906108c 16815
81ecdfbb
RW
16816# Check whether --with-x was given.
16817if test "${with_x+set}" = set; then :
16818 withval=$with_x;
16819fi
c906108c
SS
16820
16821# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16822if test "x$with_x" = xno; then
16823 # The user explicitly disabled X.
16824 have_x=disabled
16825else
81ecdfbb 16826 case $x_includes,$x_libraries in #(
63a9e923
SM
16827 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16828 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 16829 $as_echo_n "(cached) " >&6
c906108c
SS
16830else
16831 # One or both of the vars are not set, and there is no cached value.
bec39cab 16832ac_x_includes=no ac_x_libraries=no
81ecdfbb 16833rm -f -r conftest.dir
bec39cab
AC
16834if mkdir conftest.dir; then
16835 cd conftest.dir
bec39cab 16836 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16837incroot:
16838 @echo incroot='${INCROOT}'
16839usrlibdir:
16840 @echo usrlibdir='${USRLIBDIR}'
16841libdir:
16842 @echo libdir='${LIBDIR}'
16843_ACEOF
16844 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
63a9e923 16845 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
16846 for ac_var in incroot usrlibdir libdir; do
16847 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16848 done
c906108c 16849 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16850 for ac_extension in a so sl dylib la dll; do
16851 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16852 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16853 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16854 fi
16855 done
16856 # Screen out bogus values from the imake configuration. They are
16857 # bogus both because they are the default anyway, and because
16858 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16859 case $ac_im_incroot in
81ecdfbb 16860 /usr/include) ac_x_includes= ;;
bec39cab 16861 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16862 esac
bec39cab 16863 case $ac_im_usrlibdir in
81ecdfbb 16864 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16865 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16866 esac
16867 fi
16868 cd ..
81ecdfbb 16869 rm -f -r conftest.dir
c906108c
SS
16870fi
16871
bec39cab
AC
16872# Standard set of common directories for X headers.
16873# Check X11 before X11Rn because it is often a symlink to the current release.
16874ac_x_header_dirs='
16875/usr/X11/include
81ecdfbb 16876/usr/X11R7/include
bec39cab
AC
16877/usr/X11R6/include
16878/usr/X11R5/include
16879/usr/X11R4/include
16880
16881/usr/include/X11
81ecdfbb 16882/usr/include/X11R7
bec39cab
AC
16883/usr/include/X11R6
16884/usr/include/X11R5
16885/usr/include/X11R4
16886
16887/usr/local/X11/include
81ecdfbb 16888/usr/local/X11R7/include
bec39cab
AC
16889/usr/local/X11R6/include
16890/usr/local/X11R5/include
16891/usr/local/X11R4/include
16892
16893/usr/local/include/X11
81ecdfbb 16894/usr/local/include/X11R7
bec39cab
AC
16895/usr/local/include/X11R6
16896/usr/local/include/X11R5
16897/usr/local/include/X11R4
16898
16899/usr/X386/include
16900/usr/x386/include
16901/usr/XFree86/include/X11
16902
16903/usr/include
16904/usr/local/include
16905/usr/unsupported/include
16906/usr/athena/include
16907/usr/local/x11r5/include
16908/usr/lpp/Xamples/include
16909
16910/usr/openwin/include
16911/usr/openwin/share/include'
16912
16913if test "$ac_x_includes" = no; then
81ecdfbb 16914 # Guess where to find include files, by looking for Xlib.h.
c906108c 16915 # First, try using that file with no special directory specified.
81ecdfbb 16916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16917/* end confdefs.h. */
81ecdfbb 16918#include <X11/Xlib.h>
bec39cab 16919_ACEOF
81ecdfbb 16920if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16921 # We can compile using X headers with no special include directory.
16922ac_x_includes=
16923else
bec39cab 16924 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16925 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16926 ac_x_includes=$ac_dir
16927 break
16928 fi
16929done
c906108c 16930fi
63a9e923 16931rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 16932fi # $ac_x_includes = no
c906108c 16933
bec39cab 16934if test "$ac_x_libraries" = no; then
c906108c 16935 # Check for the libraries.
c906108c
SS
16936 # See if we find them without any special options.
16937 # Don't add to $LIBS permanently.
bec39cab 16938 ac_save_LIBS=$LIBS
81ecdfbb
RW
16939 LIBS="-lX11 $LIBS"
16940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16941/* end confdefs.h. */
81ecdfbb 16942#include <X11/Xlib.h>
bec39cab
AC
16943int
16944main ()
16945{
81ecdfbb 16946XrmInitialize ()
bec39cab
AC
16947 ;
16948 return 0;
16949}
16950_ACEOF
81ecdfbb 16951if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16952 LIBS=$ac_save_LIBS
c906108c
SS
16953# We can link X programs with no special library path.
16954ac_x_libraries=
16955else
81ecdfbb
RW
16956 LIBS=$ac_save_LIBS
16957for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16958do
bec39cab 16959 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16960 for ac_extension in a so sl dylib la dll; do
16961 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16962 ac_x_libraries=$ac_dir
16963 break 2
16964 fi
16965 done
16966done
16967fi
81ecdfbb
RW
16968rm -f core conftest.err conftest.$ac_objext \
16969 conftest$ac_exeext conftest.$ac_ext
bec39cab 16970fi # $ac_x_libraries = no
c906108c 16971
81ecdfbb
RW
16972case $ac_x_includes,$ac_x_libraries in #(
16973 no,* | *,no | *\'*)
16974 # Didn't find X, or a directory has "'" in its name.
16975 ac_cv_have_x="have_x=no";; #(
16976 *)
16977 # Record where we found X for the cache.
16978 ac_cv_have_x="have_x=yes\
16979 ac_x_includes='$ac_x_includes'\
16980 ac_x_libraries='$ac_x_libraries'"
16981esac
c906108c 16982fi
81ecdfbb
RW
16983;; #(
16984 *) have_x=yes;;
16985 esac
c906108c
SS
16986 eval "$ac_cv_have_x"
16987fi # $with_x != no
16988
16989if test "$have_x" != yes; then
81ecdfbb
RW
16990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16991$as_echo "$have_x" >&6; }
c906108c
SS
16992 no_x=yes
16993else
16994 # If each of the values was on the command line, it overrides each guess.
16995 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16996 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16997 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16998 ac_cv_have_x="have_x=yes\
16999 ac_x_includes='$x_includes'\
17000 ac_x_libraries='$x_libraries'"
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17002$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
17003fi
17004
17005
bec39cab 17006# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 17007# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
17008# This code just checks for a few cases where we'd like to ignore those
17009# definitions, even when they're present in the '.mt' file. These cases
17010# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 17011# not part of the source tree.
7a292a7a 17012#
81ecdfbb
RW
17013# Check whether --enable-sim was given.
17014if test "${enable_sim+set}" = set; then :
17015 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
17016 echo "enableval = ${enableval}";
17017 case "${enableval}" in
17018 yes) ignore_sim=false ;;
17019 no) ignore_sim=true ;;
17020 *) ignore_sim=false ;;
17021 esac
17022else
17023 ignore_sim=false
81ecdfbb
RW
17024fi
17025
7a292a7a
SS
17026
17027if test ! -d "${srcdir}/../sim"; then
17028 ignore_sim=true
17029fi
17030
9b624dbe
UW
17031SIM=
17032SIM_OBS=
17033if test "${ignore_sim}" = "false"; then
17034 if test x"${gdb_sim}" != x ; then
17035 SIM="${gdb_sim}"
17036 SIM_OBS="remote-sim.o"
60ca704f 17037
81ecdfbb 17038$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17039
976102cd
PA
17040
17041 # Some tdep code should only be compiled in when the ppc sim is
17042 # built. PR sim/13418.
17043 case $target in
17044 powerpc*-*-*)
17045
17046$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17047
17048 ;;
17049 esac
9b624dbe 17050 fi
7a292a7a
SS
17051fi
17052
17053
17054
c906108c
SS
17055
17056
17057
17058
17059
17060
dfcd3bfb 17061
e56ac5c3
AC
17062
17063
b3a90332
AC
17064
17065
c35f4ffc 17066# List of host floatformats.
bec39cab
AC
17067
17068cat >>confdefs.h <<_ACEOF
c35f4ffc 17069#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17070_ACEOF
c35f4ffc 17071
bec39cab
AC
17072
17073cat >>confdefs.h <<_ACEOF
c35f4ffc 17074#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17075_ACEOF
17076
c35f4ffc 17077
bec39cab 17078cat >>confdefs.h <<_ACEOF
c35f4ffc 17079#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17080_ACEOF
c35f4ffc
AC
17081
17082
c906108c
SS
17083# target_subdir is used by the testsuite to find the target libraries.
17084target_subdir=
17085if test "${host}" != "${target}"; then
17086 target_subdir="${target_alias}/"
17087fi
17088
17089
21ea5acd 17090# Import nat definitions.
2b351b19 17091nat_makefile_frag=/dev/null
771b4502 17092if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17093 . ${srcdir}/configure.nat
17094 nativefile=$NAT_FILE
c906108c 17095fi
c906108c 17096
c906108c
SS
17097
17098
17099
21ea5acd
SDJ
17100
17101
17102
17103
17104
c906108c
SS
17105
17106
b00a8037 17107if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17108
17109cat >>confdefs.h <<_ACEOF
b00a8037 17110#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17111_ACEOF
b00a8037
DJ
17112
17113fi
17114
8dcde887 17115# Enable multi-ice-gdb-server.
81ecdfbb
RW
17116# Check whether --enable-multi-ice was given.
17117if test "${enable_multi_ice+set}" = set; then :
17118 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
17119 yes | no)
17120 ;;
63a9e923 17121 *) as_fn_error $? "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 17122 esac
81ecdfbb 17123fi
b4e70030 17124
81ecdfbb
RW
17125if test "x$enable_multi_ice" = xyes; then
17126 subdirs="$subdirs multi-ice"
3ace7edb 17127
a85f51e7
DJ
17128fi
17129
496c0e1b
JB
17130# Check whether --enable-gdbserver was given.
17131if test "${enable_gdbserver+set}" = set; then :
17132 enableval=$enable_gdbserver; case "${enableval}" in
17133 yes| no|auto) ;;
63a9e923 17134 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17135esac
17136else
17137 enable_gdbserver=auto
17138fi
17139
17140
17141# We only build gdbserver automatically in a native configuration, and
17142# only if the user did not explicitly disable its build.
17143if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17145$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17146 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17148$as_echo "yes" >&6; }
17149 subdirs="$subdirs gdbserver"
3ace7edb 17150
496c0e1b 17151 gdbserver_build_enabled=yes
8dcde887 17152 else
81ecdfbb
RW
17153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17154$as_echo "no" >&6; }
8dcde887
MK
17155 fi
17156fi
17157
496c0e1b
JB
17158# If the user explicitly request the gdbserver to be built, verify that
17159# we were in fact able to enable it.
17160if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
63a9e923 17161 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17162fi
17163
393fd4c3
YQ
17164# Check for babeltrace and babeltrace-ctf
17165
17166# Check whether --with-babeltrace was given.
17167if test "${with_babeltrace+set}" = set; then :
17168 withval=$with_babeltrace;
17169else
17170 with_babeltrace=auto
17171fi
17172
17173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17174$as_echo_n "checking whether to use babeltrace... " >&6; }
17175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17176$as_echo "$with_babeltrace" >&6; }
17177
17178if test "x$with_babeltrace" = "xno"; then
17179 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17180$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17181else
17182 # Append -Werror to CFLAGS so that configure can catch the warning
17183 # "assignment from incompatible pointer type", which is related to
17184 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17185 # in GDB, while babeltrace 1.0.3 is broken.
17186 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17187 # safe to save and restore CFLAGS here.
17188 saved_CFLAGS=$CFLAGS
17189 CFLAGS="$CFLAGS -Werror"
17190
17191
17192
17193
17194
17195
17196
17197
17198 use_additional=yes
17199
17200 acl_save_prefix="$prefix"
17201 prefix="$acl_final_prefix"
17202 acl_save_exec_prefix="$exec_prefix"
17203 exec_prefix="$acl_final_exec_prefix"
17204
17205 eval additional_includedir=\"$includedir\"
17206 eval additional_libdir=\"$libdir\"
17207
17208 exec_prefix="$acl_save_exec_prefix"
17209 prefix="$acl_save_prefix"
17210
17211
17212# Check whether --with-libbabeltrace-prefix was given.
17213if test "${with_libbabeltrace_prefix+set}" = set; then :
17214 withval=$with_libbabeltrace_prefix;
17215 if test "X$withval" = "Xno"; then
17216 use_additional=no
17217 else
17218 if test "X$withval" = "X"; then
17219
17220 acl_save_prefix="$prefix"
17221 prefix="$acl_final_prefix"
17222 acl_save_exec_prefix="$exec_prefix"
17223 exec_prefix="$acl_final_exec_prefix"
17224
17225 eval additional_includedir=\"$includedir\"
17226 eval additional_libdir=\"$libdir\"
17227
17228 exec_prefix="$acl_save_exec_prefix"
17229 prefix="$acl_save_prefix"
17230
17231 else
17232 additional_includedir="$withval/include"
17233 additional_libdir="$withval/lib"
17234 fi
17235 fi
17236
17237fi
17238
17239 LIBBABELTRACE=
17240 LTLIBBABELTRACE=
17241 INCBABELTRACE=
17242 rpathdirs=
17243 ltrpathdirs=
17244 names_already_handled=
17245 names_next_round='babeltrace babeltrace-ctf'
17246 while test -n "$names_next_round"; do
17247 names_this_round="$names_next_round"
17248 names_next_round=
17249 for name in $names_this_round; do
17250 already_handled=
17251 for n in $names_already_handled; do
17252 if test "$n" = "$name"; then
17253 already_handled=yes
17254 break
17255 fi
17256 done
17257 if test -z "$already_handled"; then
17258 names_already_handled="$names_already_handled $name"
17259 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17260 eval value=\"\$HAVE_LIB$uppername\"
17261 if test -n "$value"; then
17262 if test "$value" = yes; then
17263 eval value=\"\$LIB$uppername\"
17264 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17265 eval value=\"\$LTLIB$uppername\"
17266 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17267 else
17268 :
17269 fi
17270 else
17271 found_dir=
17272 found_la=
17273 found_so=
17274 found_a=
17275 if test $use_additional = yes; then
17276 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17277 found_dir="$additional_libdir"
17278 found_so="$additional_libdir/lib$name.$shlibext"
17279 if test -f "$additional_libdir/lib$name.la"; then
17280 found_la="$additional_libdir/lib$name.la"
17281 fi
17282 else
17283 if test -f "$additional_libdir/lib$name.$libext"; then
17284 found_dir="$additional_libdir"
17285 found_a="$additional_libdir/lib$name.$libext"
17286 if test -f "$additional_libdir/lib$name.la"; then
17287 found_la="$additional_libdir/lib$name.la"
17288 fi
17289 fi
17290 fi
17291 fi
17292 if test "X$found_dir" = "X"; then
17293 for x in $LDFLAGS $LTLIBBABELTRACE; do
17294
17295 acl_save_prefix="$prefix"
17296 prefix="$acl_final_prefix"
17297 acl_save_exec_prefix="$exec_prefix"
17298 exec_prefix="$acl_final_exec_prefix"
17299 eval x=\"$x\"
17300 exec_prefix="$acl_save_exec_prefix"
17301 prefix="$acl_save_prefix"
17302
17303 case "$x" in
17304 -L*)
17305 dir=`echo "X$x" | sed -e 's/^X-L//'`
17306 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17307 found_dir="$dir"
17308 found_so="$dir/lib$name.$shlibext"
17309 if test -f "$dir/lib$name.la"; then
17310 found_la="$dir/lib$name.la"
17311 fi
17312 else
17313 if test -f "$dir/lib$name.$libext"; then
17314 found_dir="$dir"
17315 found_a="$dir/lib$name.$libext"
17316 if test -f "$dir/lib$name.la"; then
17317 found_la="$dir/lib$name.la"
17318 fi
17319 fi
17320 fi
17321 ;;
17322 esac
17323 if test "X$found_dir" != "X"; then
17324 break
17325 fi
17326 done
17327 fi
17328 if test "X$found_dir" != "X"; then
17329 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17330 if test "X$found_so" != "X"; then
17331 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17332 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17333 else
17334 haveit=
17335 for x in $ltrpathdirs; do
17336 if test "X$x" = "X$found_dir"; then
17337 haveit=yes
17338 break
17339 fi
17340 done
17341 if test -z "$haveit"; then
17342 ltrpathdirs="$ltrpathdirs $found_dir"
17343 fi
17344 if test "$hardcode_direct" = yes; then
17345 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17346 else
17347 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17348 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17349 haveit=
17350 for x in $rpathdirs; do
17351 if test "X$x" = "X$found_dir"; then
17352 haveit=yes
17353 break
17354 fi
17355 done
17356 if test -z "$haveit"; then
17357 rpathdirs="$rpathdirs $found_dir"
17358 fi
17359 else
17360 haveit=
17361 for x in $LDFLAGS $LIBBABELTRACE; do
17362
17363 acl_save_prefix="$prefix"
17364 prefix="$acl_final_prefix"
17365 acl_save_exec_prefix="$exec_prefix"
17366 exec_prefix="$acl_final_exec_prefix"
17367 eval x=\"$x\"
17368 exec_prefix="$acl_save_exec_prefix"
17369 prefix="$acl_save_prefix"
17370
17371 if test "X$x" = "X-L$found_dir"; then
17372 haveit=yes
17373 break
17374 fi
17375 done
17376 if test -z "$haveit"; then
17377 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17378 fi
17379 if test "$hardcode_minus_L" != no; then
17380 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17381 else
17382 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17383 fi
17384 fi
17385 fi
17386 fi
17387 else
17388 if test "X$found_a" != "X"; then
17389 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17390 else
17391 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17392 fi
17393 fi
17394 additional_includedir=
17395 case "$found_dir" in
17396 */lib | */lib/)
17397 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17398 additional_includedir="$basedir/include"
17399 ;;
17400 esac
17401 if test "X$additional_includedir" != "X"; then
17402 if test "X$additional_includedir" != "X/usr/include"; then
17403 haveit=
17404 if test "X$additional_includedir" = "X/usr/local/include"; then
17405 if test -n "$GCC"; then
17406 case $host_os in
17407 linux*) haveit=yes;;
17408 esac
17409 fi
17410 fi
17411 if test -z "$haveit"; then
17412 for x in $CPPFLAGS $INCBABELTRACE; do
17413
17414 acl_save_prefix="$prefix"
17415 prefix="$acl_final_prefix"
17416 acl_save_exec_prefix="$exec_prefix"
17417 exec_prefix="$acl_final_exec_prefix"
17418 eval x=\"$x\"
17419 exec_prefix="$acl_save_exec_prefix"
17420 prefix="$acl_save_prefix"
17421
17422 if test "X$x" = "X-I$additional_includedir"; then
17423 haveit=yes
17424 break
17425 fi
17426 done
17427 if test -z "$haveit"; then
17428 if test -d "$additional_includedir"; then
17429 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17430 fi
17431 fi
17432 fi
17433 fi
17434 fi
17435 if test -n "$found_la"; then
17436 save_libdir="$libdir"
17437 case "$found_la" in
17438 */* | *\\*) . "$found_la" ;;
17439 *) . "./$found_la" ;;
17440 esac
17441 libdir="$save_libdir"
17442 for dep in $dependency_libs; do
17443 case "$dep" in
17444 -L*)
17445 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17446 if test "X$additional_libdir" != "X/usr/lib"; then
17447 haveit=
17448 if test "X$additional_libdir" = "X/usr/local/lib"; then
17449 if test -n "$GCC"; then
17450 case $host_os in
17451 linux*) haveit=yes;;
17452 esac
17453 fi
17454 fi
17455 if test -z "$haveit"; then
17456 haveit=
17457 for x in $LDFLAGS $LIBBABELTRACE; do
17458
17459 acl_save_prefix="$prefix"
17460 prefix="$acl_final_prefix"
17461 acl_save_exec_prefix="$exec_prefix"
17462 exec_prefix="$acl_final_exec_prefix"
17463 eval x=\"$x\"
17464 exec_prefix="$acl_save_exec_prefix"
17465 prefix="$acl_save_prefix"
17466
17467 if test "X$x" = "X-L$additional_libdir"; then
17468 haveit=yes
17469 break
17470 fi
17471 done
17472 if test -z "$haveit"; then
17473 if test -d "$additional_libdir"; then
17474 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17475 fi
17476 fi
17477 haveit=
17478 for x in $LDFLAGS $LTLIBBABELTRACE; do
17479
17480 acl_save_prefix="$prefix"
17481 prefix="$acl_final_prefix"
17482 acl_save_exec_prefix="$exec_prefix"
17483 exec_prefix="$acl_final_exec_prefix"
17484 eval x=\"$x\"
17485 exec_prefix="$acl_save_exec_prefix"
17486 prefix="$acl_save_prefix"
17487
17488 if test "X$x" = "X-L$additional_libdir"; then
17489 haveit=yes
17490 break
17491 fi
17492 done
17493 if test -z "$haveit"; then
17494 if test -d "$additional_libdir"; then
17495 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17496 fi
17497 fi
17498 fi
17499 fi
17500 ;;
17501 -R*)
17502 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17503 if test "$enable_rpath" != no; then
17504 haveit=
17505 for x in $rpathdirs; do
17506 if test "X$x" = "X$dir"; then
17507 haveit=yes
17508 break
17509 fi
17510 done
17511 if test -z "$haveit"; then
17512 rpathdirs="$rpathdirs $dir"
17513 fi
17514 haveit=
17515 for x in $ltrpathdirs; do
17516 if test "X$x" = "X$dir"; then
17517 haveit=yes
17518 break
17519 fi
17520 done
17521 if test -z "$haveit"; then
17522 ltrpathdirs="$ltrpathdirs $dir"
17523 fi
17524 fi
17525 ;;
17526 -l*)
17527 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17528 ;;
17529 *.la)
17530 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17531 ;;
17532 *)
17533 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17534 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17535 ;;
17536 esac
17537 done
17538 fi
17539 else
17540 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17541 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17542 fi
17543 fi
17544 fi
17545 done
17546 done
17547 if test "X$rpathdirs" != "X"; then
17548 if test -n "$hardcode_libdir_separator"; then
17549 alldirs=
17550 for found_dir in $rpathdirs; do
17551 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17552 done
17553 acl_save_libdir="$libdir"
17554 libdir="$alldirs"
17555 eval flag=\"$hardcode_libdir_flag_spec\"
17556 libdir="$acl_save_libdir"
17557 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17558 else
17559 for found_dir in $rpathdirs; do
17560 acl_save_libdir="$libdir"
17561 libdir="$found_dir"
17562 eval flag=\"$hardcode_libdir_flag_spec\"
17563 libdir="$acl_save_libdir"
17564 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17565 done
17566 fi
17567 fi
17568 if test "X$ltrpathdirs" != "X"; then
17569 for found_dir in $ltrpathdirs; do
17570 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17571 done
17572 fi
17573
17574
17575 ac_save_CPPFLAGS="$CPPFLAGS"
17576
17577 for element in $INCBABELTRACE; do
17578 haveit=
17579 for x in $CPPFLAGS; do
17580
17581 acl_save_prefix="$prefix"
17582 prefix="$acl_final_prefix"
17583 acl_save_exec_prefix="$exec_prefix"
17584 exec_prefix="$acl_final_exec_prefix"
17585 eval x=\"$x\"
17586 exec_prefix="$acl_save_exec_prefix"
17587 prefix="$acl_save_prefix"
17588
17589 if test "X$x" = "X$element"; then
17590 haveit=yes
17591 break
17592 fi
17593 done
17594 if test -z "$haveit"; then
17595 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17596 fi
17597 done
17598
17599
17600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17601$as_echo_n "checking for libbabeltrace... " >&6; }
63a9e923 17602if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
17603 $as_echo_n "(cached) " >&6
17604else
17605
17606 ac_save_LIBS="$LIBS"
17607 LIBS="$LIBS $LIBBABELTRACE"
17608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17609/* end confdefs.h. */
17610#include <babeltrace/babeltrace.h>
17611 #include <babeltrace/ctf/events.h>
17612 #include <babeltrace/ctf/iterator.h>
17613int
17614main ()
17615{
17616struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17617 struct bt_ctf_event *event = NULL;
17618 const struct bt_definition *scope;
17619
13cdc2af 17620 pos->type = BT_SEEK_BEGIN;
65c749e7 17621 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17622 scope = bt_ctf_get_top_level_scope (event,
17623 BT_STREAM_EVENT_HEADER);
17624 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17625
17626 ;
17627 return 0;
17628}
17629_ACEOF
17630if ac_fn_c_try_link "$LINENO"; then :
17631 ac_cv_libbabeltrace=yes
17632else
17633 ac_cv_libbabeltrace=no
17634fi
17635rm -f core conftest.err conftest.$ac_objext \
17636 conftest$ac_exeext conftest.$ac_ext
17637 LIBS="$ac_save_LIBS"
17638
17639fi
17640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17641$as_echo "$ac_cv_libbabeltrace" >&6; }
17642 if test "$ac_cv_libbabeltrace" = yes; then
17643 HAVE_LIBBABELTRACE=yes
17644
17645$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17646
17647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17648$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17650$as_echo "$LIBBABELTRACE" >&6; }
17651 else
17652 HAVE_LIBBABELTRACE=no
17653 CPPFLAGS="$ac_save_CPPFLAGS"
17654 LIBBABELTRACE=
17655 LTLIBBABELTRACE=
17656 fi
17657
17658
17659
17660
17661
17662
17663 CFLAGS=$saved_CFLAGS
17664
17665 if test "$HAVE_LIBBABELTRACE" != yes; then
17666 if test "$with_babeltrace" = yes; then
63a9e923 17667 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
17668 else
17669 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17670$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17671 fi
17672 fi
17673fi
17674
21ea5acd
SDJ
17675# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17676# empty version.
c906108c
SS
17677
17678files=
17679links=
5a2402b8 17680
c906108c
SS
17681rm -f nm.h
17682if test "${nativefile}" != ""; then
0f475e27
AC
17683 case "${nativefile}" in
17684 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17685 * ) GDB_NM_FILE="${nativefile}"
17686 esac
5a2402b8
AC
17687 files="${files} ${GDB_NM_FILE}"
17688 links="${links} nm.h"
60ca704f
SE
17689
17690cat >>confdefs.h <<_ACEOF
b78960be 17691#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17692_ACEOF
5a2402b8 17693
c906108c 17694fi
5a2402b8
AC
17695
17696
e3487908
GKB
17697for ac_prog in xsltproc
17698do
17699 # Extract the first word of "$ac_prog", so it can be a program name with args.
17700set dummy $ac_prog; ac_word=$2
17701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17702$as_echo_n "checking for $ac_word... " >&6; }
63a9e923 17703if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
17704 $as_echo_n "(cached) " >&6
17705else
17706 case $XSLTPROC in
17707 [\\/]* | ?:[\\/]*)
17708 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17709 ;;
17710 *)
17711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17712for as_dir in $PATH
17713do
17714 IFS=$as_save_IFS
17715 test -z "$as_dir" && as_dir=.
17716 for ac_exec_ext in '' $ac_executable_extensions; do
63a9e923 17717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
17718 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17720 break 2
17721 fi
17722done
17723 done
17724IFS=$as_save_IFS
17725
17726 ;;
17727esac
17728fi
17729XSLTPROC=$ac_cv_path_XSLTPROC
17730if test -n "$XSLTPROC"; then
17731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17732$as_echo "$XSLTPROC" >&6; }
17733else
17734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17735$as_echo "no" >&6; }
17736fi
17737
17738
17739 test -n "$XSLTPROC" && break
17740done
17741test -n "$XSLTPROC" || XSLTPROC="missing"
17742
17743if test "x$USE_MAINTAINER_MODE" = xyes; then
17744 if test "${XSLTPROC}" = missing; then
63a9e923 17745 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
17746 fi
17747fi
17748
17749
bec39cab
AC
17750ac_sources="$files"
17751ac_dests="$links"
17752while test -n "$ac_sources"; do
17753 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17754 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17755 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17756done
81ecdfbb 17757ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17758
17759
c906108c
SS
17760
17761
c906108c 17762
81ecdfbb 17763$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17764
bec39cab 17765
dcd1f979
TT
17766if $development; then
17767
17768$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17769
b5884fa7 17770 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o"
1e5ded6c 17771 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c"
dcd1f979
TT
17772fi
17773
b292c783 17774
f6a88844
JM
17775 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17776 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17777 if test "x$GDB_TRANSFORM_NAME" = x; then
17778 GDB_TRANSFORM_NAME=gdb
17779 fi
17780
17781
17782
17783 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17784 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17785 if test "x$GCORE_TRANSFORM_NAME" = x; then
17786 GCORE_TRANSFORM_NAME=gcore
17787 fi
17788
b292c783
JK
17789
17790ac_config_files="$ac_config_files gcore"
17791
c971b7fa 17792ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb 17793
89a34d1b 17794
bec39cab
AC
17795cat >confcache <<\_ACEOF
17796# This file is a shell script that caches the results of configure
17797# tests run on this system so they can be shared between configure
17798# scripts and configure runs, see configure's option --config-cache.
17799# It is not useful on other systems. If it contains results you don't
17800# want to keep, you may remove or edit it.
17801#
17802# config.status only pays attention to the cache file if you give it
17803# the --recheck option to rerun configure.
17804#
17805# `ac_cv_env_foo' variables (set or unset) will be overridden when
17806# loading this file, other *unset* `ac_cv_foo' will be assigned the
17807# following values.
17808
17809_ACEOF
17810
17811# The following way of writing the cache mishandles newlines in values,
17812# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17813# So, we kill variables containing newlines.
bec39cab
AC
17814# Ultrix sh set writes to stderr and can't be redirected directly,
17815# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17816(
17817 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17818 eval ac_val=\$$ac_var
17819 case $ac_val in #(
17820 *${as_nl}*)
17821 case $ac_var in #(
17822 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17823$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17824 esac
17825 case $ac_var in #(
17826 _ | IFS | as_nl) ;; #(
17827 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17828 *) { eval $ac_var=; unset $ac_var;} ;;
17829 esac ;;
17830 esac
17831 done
17832
bec39cab 17833 (set) 2>&1 |
81ecdfbb
RW
17834 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17835 *${as_nl}ac_space=\ *)
17836 # `set' does not quote correctly, so add quotes: double-quote
17837 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17838 sed -n \
17839 "s/'/'\\\\''/g;
17840 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17841 ;; #(
bec39cab
AC
17842 *)
17843 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17844 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17845 ;;
81ecdfbb
RW
17846 esac |
17847 sort
17848) |
bec39cab 17849 sed '
81ecdfbb 17850 /^ac_cv_env_/b end
bec39cab 17851 t clear
81ecdfbb 17852 :clear
bec39cab
AC
17853 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17854 t end
81ecdfbb
RW
17855 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17856 :end' >>confcache
17857if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17858 if test -w "$cache_file"; then
63a9e923 17859 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
17860 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17861$as_echo "$as_me: updating cache $cache_file" >&6;}
63a9e923
SM
17862 if test ! -f "$cache_file" || test -h "$cache_file"; then
17863 cat confcache >"$cache_file"
17864 else
17865 case $cache_file in #(
17866 */* | ?:*)
17867 mv -f confcache "$cache_file"$$ &&
17868 mv -f "$cache_file"$$ "$cache_file" ;; #(
17869 *)
17870 mv -f confcache "$cache_file" ;;
17871 esac
17872 fi
17873 fi
bec39cab 17874 else
81ecdfbb
RW
17875 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17876$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17877 fi
17878fi
17879rm -f confcache
17880
17881test "x$prefix" = xNONE && prefix=$ac_default_prefix
17882# Let make expand exec_prefix.
17883test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17884
bec39cab
AC
17885DEFS=-DHAVE_CONFIG_H
17886
17887ac_libobjs=
17888ac_ltlibobjs=
63a9e923 17889U=
bec39cab
AC
17890for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17891 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17892 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17893 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17894 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17895 # will be set to the directory where LIBOBJS objects are built.
17896 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17897 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17898done
17899LIBOBJS=$ac_libobjs
17900
17901LTLIBOBJS=$ac_ltlibobjs
17902
17903
85981d60 17904if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
63a9e923 17905 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 17906Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17907fi
4df42755 17908if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
63a9e923 17909 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
17910Usually this means the macro was only invoked conditionally." "$LINENO" 5
17911fi
17912if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
63a9e923 17913 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
17914Usually this means the macro was only invoked conditionally." "$LINENO" 5
17915fi
81ecdfbb
RW
17916
17917
63a9e923 17918: "${CONFIG_STATUS=./config.status}"
81ecdfbb 17919ac_write_fail=0
bec39cab
AC
17920ac_clean_files_save=$ac_clean_files
17921ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17922{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17923$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17924as_write_fail=0
17925cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17926#! $SHELL
17927# Generated by $as_me.
17928# Run this file to recreate the current configuration.
17929# Compiler output produced by configure, useful for debugging
17930# configure, is in config.log if it exists.
17931
17932debug=false
17933ac_cs_recheck=false
17934ac_cs_silent=false
bec39cab 17935
81ecdfbb
RW
17936SHELL=\${CONFIG_SHELL-$SHELL}
17937export SHELL
17938_ASEOF
17939cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17940## -------------------- ##
17941## M4sh Initialization. ##
17942## -------------------- ##
17943
17944# Be more Bourne compatible
17945DUALCASE=1; export DUALCASE # for MKS sh
17946if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17947 emulate sh
17948 NULLCMD=:
81ecdfbb 17949 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17950 # is contrary to our usage. Disable this feature.
17951 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17952 setopt NO_GLOB_SUBST
17953else
17954 case `(set -o) 2>/dev/null` in #(
17955 *posix*) :
17956 set -o posix ;; #(
17957 *) :
17958 ;;
17959esac
bec39cab 17960fi
bec39cab 17961
81ecdfbb
RW
17962
17963as_nl='
17964'
17965export as_nl
17966# Printing a long string crashes Solaris 7 /usr/bin/printf.
17967as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17968as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17969as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17970# Prefer a ksh shell builtin over an external printf program on Solaris,
17971# but without wasting forks for bash or zsh.
17972if test -z "$BASH_VERSION$ZSH_VERSION" \
17973 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17974 as_echo='print -r --'
17975 as_echo_n='print -rn --'
17976elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17977 as_echo='printf %s\n'
17978 as_echo_n='printf %s'
17979else
17980 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17981 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17982 as_echo_n='/usr/ucb/echo -n'
17983 else
17984 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17985 as_echo_n_body='eval
17986 arg=$1;
17987 case $arg in #(
17988 *"$as_nl"*)
17989 expr "X$arg" : "X\\(.*\\)$as_nl";
17990 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17991 esac;
17992 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17993 '
17994 export as_echo_n_body
17995 as_echo_n='sh -c $as_echo_n_body as_echo'
17996 fi
17997 export as_echo_body
17998 as_echo='sh -c $as_echo_body as_echo'
17999fi
18000
18001# The user is always right.
18002if test "${PATH_SEPARATOR+set}" != set; then
18003 PATH_SEPARATOR=:
18004 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18005 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18006 PATH_SEPARATOR=';'
18007 }
bec39cab
AC
18008fi
18009
18010
81ecdfbb
RW
18011# IFS
18012# We need space, tab and new line, in precisely that order. Quoting is
18013# there to prevent editors from complaining about space-tab.
18014# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18015# splitting by setting IFS to empty value.)
18016IFS=" "" $as_nl"
18017
18018# Find who we are. Look in the path if we contain no directory separator.
63a9e923 18019as_myself=
81ecdfbb
RW
18020case $0 in #((
18021 *[\\/]* ) as_myself=$0 ;;
18022 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18023for as_dir in $PATH
18024do
18025 IFS=$as_save_IFS
18026 test -z "$as_dir" && as_dir=.
18027 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18028 done
18029IFS=$as_save_IFS
18030
18031 ;;
18032esac
18033# We did not find ourselves, most probably we were run as `sh COMMAND'
18034# in which case we are not to be found in the path.
18035if test "x$as_myself" = x; then
18036 as_myself=$0
18037fi
18038if test ! -f "$as_myself"; then
18039 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18040 exit 1
18041fi
18042
18043# Unset variables that we do not need and which cause bugs (e.g. in
18044# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18045# suppresses any "Segmentation fault" message there. '((' could
18046# trigger a bug in pdksh 5.2.14.
18047for as_var in BASH_ENV ENV MAIL MAILPATH
18048do eval test x\${$as_var+set} = xset \
18049 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18050done
bec39cab
AC
18051PS1='$ '
18052PS2='> '
18053PS4='+ '
18054
18055# NLS nuisances.
81ecdfbb
RW
18056LC_ALL=C
18057export LC_ALL
18058LANGUAGE=C
18059export LANGUAGE
18060
18061# CDPATH.
18062(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18063
18064
63a9e923
SM
18065# as_fn_error STATUS ERROR [LINENO LOG_FD]
18066# ----------------------------------------
81ecdfbb
RW
18067# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18068# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
63a9e923 18069# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
18070as_fn_error ()
18071{
63a9e923
SM
18072 as_status=$1; test $as_status -eq 0 && as_status=1
18073 if test "$4"; then
18074 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18075 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 18076 fi
63a9e923 18077 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
18078 as_fn_exit $as_status
18079} # as_fn_error
18080
18081
18082# as_fn_set_status STATUS
18083# -----------------------
18084# Set $? to STATUS, without forking.
18085as_fn_set_status ()
18086{
18087 return $1
18088} # as_fn_set_status
18089
18090# as_fn_exit STATUS
18091# -----------------
18092# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18093as_fn_exit ()
18094{
18095 set +e
18096 as_fn_set_status $1
18097 exit $1
18098} # as_fn_exit
18099
18100# as_fn_unset VAR
18101# ---------------
18102# Portably unset VAR.
18103as_fn_unset ()
18104{
18105 { eval $1=; unset $1;}
18106}
18107as_unset=as_fn_unset
18108# as_fn_append VAR VALUE
18109# ----------------------
18110# Append the text in VALUE to the end of the definition contained in VAR. Take
18111# advantage of any shell optimizations that allow amortized linear growth over
18112# repeated appends, instead of the typical quadratic growth present in naive
18113# implementations.
18114if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18115 eval 'as_fn_append ()
18116 {
18117 eval $1+=\$2
18118 }'
18119else
18120 as_fn_append ()
18121 {
18122 eval $1=\$$1\$2
18123 }
18124fi # as_fn_append
18125
18126# as_fn_arith ARG...
18127# ------------------
18128# Perform arithmetic evaluation on the ARGs, and store the result in the
18129# global $as_val. Take advantage of shells that can avoid forks. The arguments
18130# must be portable across $(()) and expr.
18131if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18132 eval 'as_fn_arith ()
18133 {
18134 as_val=$(( $* ))
18135 }'
18136else
18137 as_fn_arith ()
18138 {
18139 as_val=`expr "$@" || test $? -eq 1`
18140 }
18141fi # as_fn_arith
bec39cab 18142
81ecdfbb
RW
18143
18144if expr a : '\(a\)' >/dev/null 2>&1 &&
18145 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18146 as_expr=expr
18147else
18148 as_expr=false
18149fi
18150
81ecdfbb 18151if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18152 as_basename=basename
18153else
18154 as_basename=false
18155fi
18156
81ecdfbb
RW
18157if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18158 as_dirname=dirname
18159else
18160 as_dirname=false
18161fi
bec39cab 18162
81ecdfbb 18163as_me=`$as_basename -- "$0" ||
bec39cab
AC
18164$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18165 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18166 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18167$as_echo X/"$0" |
18168 sed '/^.*\/\([^/][^/]*\)\/*$/{
18169 s//\1/
18170 q
18171 }
18172 /^X\/\(\/\/\)$/{
18173 s//\1/
18174 q
18175 }
18176 /^X\/\(\/\).*/{
18177 s//\1/
18178 q
18179 }
18180 s/.*/./; q'`
b4e70030 18181
b4e70030
JB
18182# Avoid depending upon Character Ranges.
18183as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18184as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18185as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18186as_cr_digits='0123456789'
18187as_cr_alnum=$as_cr_Letters$as_cr_digits
18188
81ecdfbb
RW
18189ECHO_C= ECHO_N= ECHO_T=
18190case `echo -n x` in #(((((
18191-n*)
18192 case `echo 'xy\c'` in
18193 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18194 xy) ECHO_C='\c';;
18195 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18196 ECHO_T=' ';;
18197 esac;;
18198*)
18199 ECHO_N='-n';;
bec39cab
AC
18200esac
18201
81ecdfbb
RW
18202rm -f conf$$ conf$$.exe conf$$.file
18203if test -d conf$$.dir; then
18204 rm -f conf$$.dir/conf$$.file
bec39cab 18205else
81ecdfbb
RW
18206 rm -f conf$$.dir
18207 mkdir conf$$.dir 2>/dev/null
bec39cab 18208fi
81ecdfbb
RW
18209if (echo >conf$$.file) 2>/dev/null; then
18210 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18211 as_ln_s='ln -s'
81ecdfbb
RW
18212 # ... but there are two gotchas:
18213 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18214 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
63a9e923 18215 # In both cases, we have to default to `cp -pR'.
81ecdfbb 18216 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
63a9e923 18217 as_ln_s='cp -pR'
81ecdfbb
RW
18218 elif ln conf$$.file conf$$ 2>/dev/null; then
18219 as_ln_s=ln
18220 else
63a9e923 18221 as_ln_s='cp -pR'
b4e70030 18222 fi
bec39cab 18223else
63a9e923 18224 as_ln_s='cp -pR'
bec39cab 18225fi
81ecdfbb
RW
18226rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18227rmdir conf$$.dir 2>/dev/null
18228
18229
18230# as_fn_mkdir_p
18231# -------------
18232# Create "$as_dir" as a directory, including parents if necessary.
18233as_fn_mkdir_p ()
18234{
18235
18236 case $as_dir in #(
18237 -*) as_dir=./$as_dir;;
18238 esac
18239 test -d "$as_dir" || eval $as_mkdir_p || {
18240 as_dirs=
18241 while :; do
18242 case $as_dir in #(
18243 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18244 *) as_qdir=$as_dir;;
18245 esac
18246 as_dirs="'$as_qdir' $as_dirs"
18247 as_dir=`$as_dirname -- "$as_dir" ||
18248$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18249 X"$as_dir" : 'X\(//\)[^/]' \| \
18250 X"$as_dir" : 'X\(//\)$' \| \
18251 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18252$as_echo X"$as_dir" |
18253 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18254 s//\1/
18255 q
18256 }
18257 /^X\(\/\/\)[^/].*/{
18258 s//\1/
18259 q
18260 }
18261 /^X\(\/\/\)$/{
18262 s//\1/
18263 q
18264 }
18265 /^X\(\/\).*/{
18266 s//\1/
18267 q
18268 }
18269 s/.*/./; q'`
18270 test -d "$as_dir" && break
18271 done
18272 test -z "$as_dirs" || eval "mkdir $as_dirs"
63a9e923 18273 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 18274
bec39cab 18275
81ecdfbb 18276} # as_fn_mkdir_p
bec39cab 18277if mkdir -p . 2>/dev/null; then
81ecdfbb 18278 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18279else
18280 test -d ./-p && rmdir ./-p
18281 as_mkdir_p=false
18282fi
18283
63a9e923
SM
18284
18285# as_fn_executable_p FILE
18286# -----------------------
18287# Test if FILE is an executable regular file.
18288as_fn_executable_p ()
18289{
18290 test -f "$1" && test -x "$1"
18291} # as_fn_executable_p
18292as_test_x='test -x'
18293as_executable_p=as_fn_executable_p
bec39cab
AC
18294
18295# Sed expression to map a string onto a valid CPP name.
18296as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18297
18298# Sed expression to map a string onto a valid variable name.
18299as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18300
18301
bec39cab 18302exec 6>&1
81ecdfbb
RW
18303## ----------------------------------- ##
18304## Main body of $CONFIG_STATUS script. ##
18305## ----------------------------------- ##
18306_ASEOF
18307test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18308
18309cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18310# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18311# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18312# values after options handling.
18313ac_log="
bec39cab 18314This file was extended by $as_me, which was
63a9e923 18315generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
18316
18317 CONFIG_FILES = $CONFIG_FILES
18318 CONFIG_HEADERS = $CONFIG_HEADERS
18319 CONFIG_LINKS = $CONFIG_LINKS
18320 CONFIG_COMMANDS = $CONFIG_COMMANDS
18321 $ $0 $@
18322
81ecdfbb
RW
18323on `(hostname || uname -n) 2>/dev/null | sed 1q`
18324"
18325
bec39cab
AC
18326_ACEOF
18327
81ecdfbb
RW
18328case $ac_config_files in *"
18329"*) set x $ac_config_files; shift; ac_config_files=$*;;
18330esac
234b45d4 18331
81ecdfbb
RW
18332case $ac_config_headers in *"
18333"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18334esac
b4e70030 18335
b4e70030 18336
81ecdfbb
RW
18337cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18338# Files that config.status was made for.
18339config_files="$ac_config_files"
18340config_headers="$ac_config_headers"
18341config_links="$ac_config_links"
18342config_commands="$ac_config_commands"
234b45d4 18343
81ecdfbb 18344_ACEOF
b4e70030 18345
81ecdfbb 18346cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18347ac_cs_usage="\
81ecdfbb
RW
18348\`$as_me' instantiates files and other configuration actions
18349from templates according to the current configuration. Unless the files
18350and actions are specified as TAGs, all are instantiated by default.
234b45d4 18351
81ecdfbb 18352Usage: $0 [OPTION]... [TAG]...
234b45d4 18353
bec39cab 18354 -h, --help print this help, then exit
81ecdfbb 18355 -V, --version print version number and configuration settings, then exit
63a9e923 18356 --config print configuration, then exit
81ecdfbb
RW
18357 -q, --quiet, --silent
18358 do not print progress messages
bec39cab
AC
18359 -d, --debug don't remove temporary files
18360 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18361 --file=FILE[:TEMPLATE]
18362 instantiate the configuration file FILE
18363 --header=FILE[:TEMPLATE]
18364 instantiate the configuration header FILE
234b45d4 18365
bec39cab
AC
18366Configuration files:
18367$config_files
234b45d4 18368
bec39cab
AC
18369Configuration headers:
18370$config_headers
234b45d4 18371
bec39cab
AC
18372Configuration links:
18373$config_links
234b45d4 18374
bec39cab
AC
18375Configuration commands:
18376$config_commands
18377
81ecdfbb 18378Report bugs to the package provider."
b4e70030 18379
81ecdfbb
RW
18380_ACEOF
18381cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
63a9e923 18382ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
18383ac_cs_version="\\
18384config.status
63a9e923
SM
18385configured by $0, generated by GNU Autoconf 2.69,
18386 with options \\"\$ac_cs_config\\"
bec39cab 18387
63a9e923 18388Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
18389This config.status script is free software; the Free Software Foundation
18390gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18391
18392ac_pwd='$ac_pwd'
18393srcdir='$srcdir'
18394INSTALL='$INSTALL'
81ecdfbb
RW
18395AWK='$AWK'
18396test -n "\$AWK" || AWK=awk
bec39cab
AC
18397_ACEOF
18398
81ecdfbb
RW
18399cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18400# The default lists apply if the user does not specify any file.
bec39cab
AC
18401ac_need_defaults=:
18402while test $# != 0
18403do
18404 case $1 in
63a9e923 18405 --*=?*)
81ecdfbb
RW
18406 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18407 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18408 ac_shift=:
c906108c 18409 ;;
63a9e923
SM
18410 --*=)
18411 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18412 ac_optarg=
18413 ac_shift=:
18414 ;;
81ecdfbb 18415 *)
bec39cab
AC
18416 ac_option=$1
18417 ac_optarg=$2
18418 ac_shift=shift
c906108c 18419 ;;
bec39cab 18420 esac
c906108c 18421
bec39cab
AC
18422 case $ac_option in
18423 # Handling of the options.
bec39cab
AC
18424 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18425 ac_cs_recheck=: ;;
81ecdfbb
RW
18426 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18427 $as_echo "$ac_cs_version"; exit ;;
63a9e923
SM
18428 --config | --confi | --conf | --con | --co | --c )
18429 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 18430 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18431 debug=: ;;
18432 --file | --fil | --fi | --f )
18433 $ac_shift
81ecdfbb
RW
18434 case $ac_optarg in
18435 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
63a9e923 18436 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
18437 esac
18438 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18439 ac_need_defaults=false;;
18440 --header | --heade | --head | --hea )
18441 $ac_shift
81ecdfbb
RW
18442 case $ac_optarg in
18443 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18444 esac
18445 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18446 ac_need_defaults=false;;
81ecdfbb
RW
18447 --he | --h)
18448 # Conflict between --help and --header
63a9e923 18449 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
18450Try \`$0 --help' for more information.";;
18451 --help | --hel | -h )
18452 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18453 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18454 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18455 ac_cs_silent=: ;;
c906108c 18456
bec39cab 18457 # This is an error.
63a9e923 18458 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 18459Try \`$0 --help' for more information." ;;
c906108c 18460
81ecdfbb
RW
18461 *) as_fn_append ac_config_targets " $1"
18462 ac_need_defaults=false ;;
c906108c 18463
bec39cab
AC
18464 esac
18465 shift
18466done
c906108c 18467
bec39cab 18468ac_configure_extra_args=
c906108c 18469
bec39cab
AC
18470if $ac_cs_silent; then
18471 exec 6>/dev/null
18472 ac_configure_extra_args="$ac_configure_extra_args --silent"
18473fi
c906108c 18474
bec39cab 18475_ACEOF
81ecdfbb 18476cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18477if \$ac_cs_recheck; then
63a9e923 18478 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
18479 shift
18480 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18481 CONFIG_SHELL='$SHELL'
18482 export CONFIG_SHELL
18483 exec "\$@"
bec39cab
AC
18484fi
18485
18486_ACEOF
81ecdfbb
RW
18487cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18488exec 5>>config.log
18489{
18490 echo
18491 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18492## Running $as_me. ##
18493_ASBOX
18494 $as_echo "$ac_log"
18495} >&5
bec39cab 18496
81ecdfbb
RW
18497_ACEOF
18498cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18499#
81ecdfbb 18500# INIT-COMMANDS
c906108c 18501#
a417dc56 18502ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 18503
bec39cab
AC
18504_ACEOF
18505
81ecdfbb 18506cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18507
81ecdfbb 18508# Handling of arguments.
bec39cab 18509for ac_config_target in $ac_config_targets
c906108c 18510do
81ecdfbb
RW
18511 case $ac_config_target in
18512 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18513 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18514 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18515 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18516 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18517 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18518 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 18519 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18520 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 18521
63a9e923 18522 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18523 esac
18524done
18525
81ecdfbb 18526
bec39cab
AC
18527# If the user did not use the arguments to specify the items to instantiate,
18528# then the envvar interface is used. Set only those that are not.
18529# We use the long form for the default assignment because of an extremely
18530# bizarre bug on SunOS 4.1.3.
18531if $ac_need_defaults; then
18532 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18533 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18534 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18535 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18536fi
18537
b4e70030 18538# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18539# simply because there is no reason against having it here, and in addition,
b4e70030 18540# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18541# Hook for its removal unless debugging.
18542# Note that there is a small window in which the directory will not be cleaned:
18543# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18544$debug ||
18545{
63a9e923 18546 tmp= ac_tmp=
81ecdfbb 18547 trap 'exit_status=$?
63a9e923
SM
18548 : "${ac_tmp:=$tmp}"
18549 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
18550' 0
18551 trap 'as_fn_exit 1' 1 2 13 15
18552}
18553# Create a (secure) tmp directory for tmp files.
18554
18555{
18556 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
63a9e923 18557 test -d "$tmp"
81ecdfbb
RW
18558} ||
18559{
18560 tmp=./conf$$-$RANDOM
18561 (umask 077 && mkdir "$tmp")
63a9e923
SM
18562} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18563ac_tmp=$tmp
81ecdfbb
RW
18564
18565# Set up the scripts for CONFIG_FILES section.
18566# No need to generate them if there are no CONFIG_FILES.
18567# This happens for instance with `./config.status config.h'.
18568if test -n "$CONFIG_FILES"; then
18569
18570if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18571 ac_cs_awk_getline=:
18572 ac_cs_awk_pipe_init=
18573 ac_cs_awk_read_file='
18574 while ((getline aline < (F[key])) > 0)
18575 print(aline)
18576 close(F[key])'
18577 ac_cs_awk_pipe_fini=
18578else
18579 ac_cs_awk_getline=false
18580 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18581 ac_cs_awk_read_file='
18582 print "|#_!!_#|"
18583 print "cat " F[key] " &&"
18584 '$ac_cs_awk_pipe_init
18585 # The final `:' finishes the AND list.
18586 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18587fi
18588ac_cr=`echo X | tr X '\015'`
18589# On cygwin, bash can eat \r inside `` if the user requested igncr.
18590# But we know of no other shell where ac_cr would be empty at this
18591# point, so we can use a bashism as a fallback.
18592if test "x$ac_cr" = x; then
18593 eval ac_cr=\$\'\\r\'
18594fi
18595ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18596if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
63a9e923 18597 ac_cs_awk_cr='\\r'
81ecdfbb
RW
18598else
18599 ac_cs_awk_cr=$ac_cr
18600fi
18601
63a9e923 18602echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
18603_ACEOF
18604
18605# Create commands to substitute file output variables.
18606{
18607 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
63a9e923 18608 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
18609 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18610 echo "_ACAWK" &&
18611 echo "_ACEOF"
18612} >conf$$files.sh &&
18613. ./conf$$files.sh ||
63a9e923 18614 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18615rm -f conf$$files.sh
18616
18617{
18618 echo "cat >conf$$subs.awk <<_ACEOF" &&
18619 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18620 echo "_ACEOF"
18621} >conf$$subs.sh ||
63a9e923
SM
18622 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18623ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
18624ac_delim='%!_!# '
18625for ac_last_try in false false false false false :; do
18626 . ./conf$$subs.sh ||
63a9e923 18627 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18628
18629 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18630 if test $ac_delim_n = $ac_delim_num; then
18631 break
18632 elif $ac_last_try; then
63a9e923 18633 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18634 else
18635 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18636 fi
18637done
18638rm -f conf$$subs.sh
18639
18640cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
63a9e923 18641cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
18642_ACEOF
18643sed -n '
18644h
18645s/^/S["/; s/!.*/"]=/
18646p
18647g
18648s/^[^!]*!//
18649:repl
18650t repl
18651s/'"$ac_delim"'$//
18652t delim
18653:nl
18654h
63a9e923 18655s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18656t more1
18657s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18658p
18659n
18660b repl
18661:more1
18662s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18663p
18664g
18665s/.\{148\}//
18666t nl
18667:delim
18668h
63a9e923 18669s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18670t more2
18671s/["\\]/\\&/g; s/^/"/; s/$/"/
18672p
18673b
18674:more2
18675s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18676p
18677g
18678s/.\{148\}//
18679t delim
18680' <conf$$subs.awk | sed '
18681/^[^""]/{
18682 N
18683 s/\n//
18684}
18685' >>$CONFIG_STATUS || ac_write_fail=1
18686rm -f conf$$subs.awk
18687cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18688_ACAWK
63a9e923 18689cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
18690 for (key in S) S_is_set[key] = 1
18691 FS = "\a"
18692 \$ac_cs_awk_pipe_init
18693}
18694{
18695 line = $ 0
18696 nfields = split(line, field, "@")
18697 substed = 0
18698 len = length(field[1])
18699 for (i = 2; i < nfields; i++) {
18700 key = field[i]
18701 keylen = length(key)
18702 if (S_is_set[key]) {
18703 value = S[key]
18704 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18705 len += length(value) + length(field[++i])
18706 substed = 1
18707 } else
18708 len += 1 + keylen
18709 }
18710 if (nfields == 3 && !substed) {
18711 key = field[2]
18712 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18713 \$ac_cs_awk_read_file
18714 next
18715 }
18716 }
18717 print line
b4e70030 18718}
81ecdfbb
RW
18719\$ac_cs_awk_pipe_fini
18720_ACAWK
18721_ACEOF
18722cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18723if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18724 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18725else
18726 cat
63a9e923
SM
18727fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18728 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
18729_ACEOF
18730
63a9e923
SM
18731# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18732# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
18733# trailing colons and then remove the whole line if VPATH becomes empty
18734# (actually we leave an empty line to preserve line numbers).
18735if test "x$srcdir" = x.; then
63a9e923
SM
18736 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18737h
18738s///
18739s/^/:/
18740s/[ ]*$/:/
18741s/:\$(srcdir):/:/g
18742s/:\${srcdir}:/:/g
18743s/:@srcdir@:/:/g
18744s/^:*//
81ecdfbb 18745s/:*$//
63a9e923
SM
18746x
18747s/\(=[ ]*\).*/\1/
18748G
18749s/\n//
81ecdfbb
RW
18750s/^[^=]*=[ ]*$//
18751}'
18752fi
18753
18754cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18755fi # test -n "$CONFIG_FILES"
18756
18757# Set up the scripts for CONFIG_HEADERS section.
18758# No need to generate them if there are no CONFIG_HEADERS.
18759# This happens for instance with `./config.status Makefile'.
18760if test -n "$CONFIG_HEADERS"; then
63a9e923 18761cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
18762BEGIN {
18763_ACEOF
18764
18765# Transform confdefs.h into an awk script `defines.awk', embedded as
18766# here-document in config.status, that substitutes the proper values into
18767# config.h.in to produce config.h.
4e8d927d 18768
81ecdfbb
RW
18769# Create a delimiter string that does not exist in confdefs.h, to ease
18770# handling of long lines.
18771ac_delim='%!_!# '
18772for ac_last_try in false false :; do
63a9e923
SM
18773 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18774 if test -z "$ac_tt"; then
81ecdfbb
RW
18775 break
18776 elif $ac_last_try; then
63a9e923 18777 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
18778 else
18779 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18780 fi
18781done
4e8d927d 18782
81ecdfbb
RW
18783# For the awk script, D is an array of macro values keyed by name,
18784# likewise P contains macro parameters if any. Preserve backslash
18785# newline sequences.
18786
18787ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18788sed -n '
18789s/.\{148\}/&'"$ac_delim"'/g
18790t rset
18791:rset
18792s/^[ ]*#[ ]*define[ ][ ]*/ /
18793t def
18794d
18795:def
18796s/\\$//
18797t bsnl
18798s/["\\]/\\&/g
18799s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18800D["\1"]=" \3"/p
18801s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18802d
18803:bsnl
18804s/["\\]/\\&/g
18805s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18806D["\1"]=" \3\\\\\\n"\\/p
18807t cont
18808s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18809t cont
18810d
18811:cont
18812n
18813s/.\{148\}/&'"$ac_delim"'/g
18814t clear
18815:clear
18816s/\\$//
18817t bsnlc
18818s/["\\]/\\&/g; s/^/"/; s/$/"/p
18819d
18820:bsnlc
18821s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18822b cont
18823' <confdefs.h | sed '
18824s/'"$ac_delim"'/"\\\
18825"/g' >>$CONFIG_STATUS || ac_write_fail=1
18826
18827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18828 for (key in D) D_is_set[key] = 1
18829 FS = "\a"
18830}
18831/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18832 line = \$ 0
18833 split(line, arg, " ")
18834 if (arg[1] == "#") {
18835 defundef = arg[2]
18836 mac1 = arg[3]
18837 } else {
18838 defundef = substr(arg[1], 2)
18839 mac1 = arg[2]
18840 }
18841 split(mac1, mac2, "(") #)
18842 macro = mac2[1]
18843 prefix = substr(line, 1, index(line, defundef) - 1)
18844 if (D_is_set[macro]) {
18845 # Preserve the white space surrounding the "#".
18846 print prefix "define", macro P[macro] D[macro]
18847 next
18848 } else {
18849 # Replace #undef with comments. This is necessary, for example,
18850 # in the case of _POSIX_SOURCE, which is predefined and required
18851 # on some systems where configure will not decide to define it.
18852 if (defundef == "undef") {
18853 print "/*", prefix defundef, macro, "*/"
18854 next
18855 }
18856 }
b4e70030 18857}
81ecdfbb
RW
18858{ print }
18859_ACAWK
b4e70030 18860_ACEOF
81ecdfbb 18861cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
63a9e923 18862 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 18863fi # test -n "$CONFIG_HEADERS"
4e8d927d 18864
4e8d927d 18865
81ecdfbb
RW
18866eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18867shift
18868for ac_tag
18869do
18870 case $ac_tag in
18871 :[FHLC]) ac_mode=$ac_tag; continue;;
18872 esac
18873 case $ac_mode$ac_tag in
18874 :[FHL]*:*);;
63a9e923 18875 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
18876 :[FH]-) ac_tag=-:-;;
18877 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18878 esac
18879 ac_save_IFS=$IFS
18880 IFS=:
18881 set x $ac_tag
18882 IFS=$ac_save_IFS
18883 shift
18884 ac_file=$1
18885 shift
4e8d927d 18886
81ecdfbb
RW
18887 case $ac_mode in
18888 :L) ac_source=$1;;
18889 :[FH])
18890 ac_file_inputs=
18891 for ac_f
18892 do
18893 case $ac_f in
63a9e923 18894 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
18895 *) # Look for the file first in the build tree, then in the source tree
18896 # (if the path is not absolute). The absolute path cannot be DOS-style,
18897 # because $ac_f cannot contain `:'.
18898 test -f "$ac_f" ||
18899 case $ac_f in
18900 [\\/$]*) false;;
18901 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18902 esac ||
63a9e923 18903 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
18904 esac
18905 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18906 as_fn_append ac_file_inputs " '$ac_f'"
18907 done
18908
18909 # Let's still pretend it is `configure' which instantiates (i.e., don't
18910 # use $as_me), people would be surprised to read:
18911 # /* config.h. Generated by config.status. */
18912 configure_input='Generated from '`
18913 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18914 `' by configure.'
18915 if test x"$ac_file" != x-; then
18916 configure_input="$ac_file. $configure_input"
18917 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18918$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18919 fi
81ecdfbb
RW
18920 # Neutralize special characters interpreted by sed in replacement strings.
18921 case $configure_input in #(
18922 *\&* | *\|* | *\\* )
18923 ac_sed_conf_input=`$as_echo "$configure_input" |
18924 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18925 *) ac_sed_conf_input=$configure_input;;
18926 esac
4e8d927d 18927
81ecdfbb 18928 case $ac_tag in
63a9e923
SM
18929 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18930 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
18931 esac
18932 ;;
c906108c
SS
18933 esac
18934
81ecdfbb 18935 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18936$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18937 X"$ac_file" : 'X\(//\)[^/]' \| \
18938 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18939 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18940$as_echo X"$ac_file" |
18941 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18942 s//\1/
18943 q
18944 }
18945 /^X\(\/\/\)[^/].*/{
18946 s//\1/
18947 q
18948 }
18949 /^X\(\/\/\)$/{
18950 s//\1/
18951 q
18952 }
18953 /^X\(\/\).*/{
18954 s//\1/
18955 q
18956 }
18957 s/.*/./; q'`
18958 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18959 ac_builddir=.
18960
81ecdfbb
RW
18961case "$ac_dir" in
18962.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18963*)
18964 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18965 # A ".." for each directory in $ac_dir_suffix.
18966 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18967 case $ac_top_builddir_sub in
18968 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18969 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18970 esac ;;
18971esac
18972ac_abs_top_builddir=$ac_pwd
18973ac_abs_builddir=$ac_pwd$ac_dir_suffix
18974# for backward compatibility:
18975ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18976
18977case $srcdir in
81ecdfbb 18978 .) # We are building in place.
bec39cab 18979 ac_srcdir=.
81ecdfbb
RW
18980 ac_top_srcdir=$ac_top_builddir_sub
18981 ac_abs_top_srcdir=$ac_pwd ;;
18982 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18983 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18984 ac_top_srcdir=$srcdir
18985 ac_abs_top_srcdir=$srcdir ;;
18986 *) # Relative name.
18987 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18988 ac_top_srcdir=$ac_top_build_prefix$srcdir
18989 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18990esac
81ecdfbb 18991ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 18992
c906108c 18993
81ecdfbb
RW
18994 case $ac_mode in
18995 :F)
18996 #
18997 # CONFIG_FILE
18998 #
c906108c 18999
bec39cab
AC
19000 case $INSTALL in
19001 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 19002 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 19003 esac
81ecdfbb 19004_ACEOF
121ce6e5 19005
81ecdfbb
RW
19006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19007# If the template does not know about datarootdir, expand it.
19008# FIXME: This hack should be removed a few years after 2.60.
19009ac_datarootdir_hack=; ac_datarootdir_seen=
19010ac_sed_dataroot='
19011/datarootdir/ {
19012 p
19013 q
19014}
19015/@datadir@/p
19016/@docdir@/p
19017/@infodir@/p
19018/@localedir@/p
19019/@mandir@/p'
19020case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19021*datarootdir*) ac_datarootdir_seen=yes;;
19022*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19024$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19025_ACEOF
19026cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19027 ac_datarootdir_hack='
19028 s&@datadir@&$datadir&g
19029 s&@docdir@&$docdir&g
19030 s&@infodir@&$infodir&g
19031 s&@localedir@&$localedir&g
19032 s&@mandir@&$mandir&g
19033 s&\\\${datarootdir}&$datarootdir&g' ;;
19034esac
4e8d927d 19035_ACEOF
81ecdfbb
RW
19036
19037# Neutralize VPATH when `$srcdir' = `.'.
19038# Shell code in configure.ac might set extrasub.
19039# FIXME: do we really want to maintain this feature?
19040cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19041ac_sed_extra="$ac_vpsub
bec39cab
AC
19042$extrasub
19043_ACEOF
81ecdfbb 19044cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
19045:t
19046/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
19047s|@configure_input@|$ac_sed_conf_input|;t t
19048s&@top_builddir@&$ac_top_builddir_sub&;t t
19049s&@top_build_prefix@&$ac_top_build_prefix&;t t
19050s&@srcdir@&$ac_srcdir&;t t
19051s&@abs_srcdir@&$ac_abs_srcdir&;t t
19052s&@top_srcdir@&$ac_top_srcdir&;t t
19053s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19054s&@builddir@&$ac_builddir&;t t
19055s&@abs_builddir@&$ac_abs_builddir&;t t
19056s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19057s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
19058$ac_datarootdir_hack
19059"
19060eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19061if $ac_cs_awk_getline; then
63a9e923 19062 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 19063else
63a9e923
SM
19064 $AWK -f "$ac_tmp/subs.awk" | $SHELL
19065fi \
19066 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19067
19068test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
63a9e923
SM
19069 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19070 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19071 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 19072 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
63a9e923 19073which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 19074$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
63a9e923 19075which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 19076
63a9e923 19077 rm -f "$ac_tmp/stdin"
bec39cab 19078 case $ac_file in
63a9e923
SM
19079 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19080 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 19081 esac \
63a9e923 19082 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19083 ;;
19084 :H)
19085 #
19086 # CONFIG_HEADER
19087 #
bec39cab 19088 if test x"$ac_file" != x-; then
81ecdfbb
RW
19089 {
19090 $as_echo "/* $configure_input */" \
63a9e923
SM
19091 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19092 } >"$ac_tmp/config.h" \
19093 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19094 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
19095 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19096$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 19097 else
81ecdfbb 19098 rm -f "$ac_file"
63a9e923
SM
19099 mv "$ac_tmp/config.h" "$ac_file" \
19100 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
19101 fi
19102 else
81ecdfbb 19103 $as_echo "/* $configure_input */" \
63a9e923
SM
19104 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19105 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 19106 fi
81ecdfbb
RW
19107 ;;
19108 :L)
19109 #
19110 # CONFIG_LINK
19111 #
c906108c 19112
81ecdfbb
RW
19113 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19114 :
b4e70030 19115 else
81ecdfbb
RW
19116 # Prefer the file from the source tree if names are identical.
19117 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19118 ac_source=$srcdir/$ac_source
19119 fi
b4e70030 19120
81ecdfbb
RW
19121 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19122$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 19123
81ecdfbb 19124 if test ! -r "$ac_source"; then
63a9e923 19125 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
19126 fi
19127 rm -f "$ac_file"
bec39cab 19128
81ecdfbb 19129 # Try a relative symlink, then a hard link, then a copy.
63a9e923 19130 case $ac_source in
81ecdfbb
RW
19131 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19132 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19133 esac
19134 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19135 ln "$ac_source" "$ac_file" 2>/dev/null ||
19136 cp -p "$ac_source" "$ac_file" ||
63a9e923 19137 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
19138 fi
19139 ;;
19140 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19141$as_echo "$as_me: executing $ac_file commands" >&6;}
19142 ;;
c906108c 19143 esac
b4e70030 19144
bec39cab 19145
81ecdfbb
RW
19146 case $ac_file$ac_mode in
19147 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 19148 "gcore":F) chmod +x gcore ;;
1e94266c
SM
19149 "Makefile":F)
19150case x$CONFIG_HEADERS in
19151xconfig.h:config.in)
19152echo > stamp-h ;;
19153esac
19154 ;;
19155 "gdb-gdb.gdb":F)
19156case x$CONFIG_HEADERS in
19157xconfig.h:config.in)
19158echo > stamp-h ;;
19159esac
19160 ;;
19161 "doc/Makefile":F)
19162case x$CONFIG_HEADERS in
19163xconfig.h:config.in)
19164echo > stamp-h ;;
19165esac
19166 ;;
19167 "data-directory/Makefile":F)
c906108c
SS
19168case x$CONFIG_HEADERS in
19169xconfig.h:config.in)
19170echo > stamp-h ;;
19171esac
bec39cab 19172 ;;
81ecdfbb 19173
bec39cab 19174 esac
81ecdfbb 19175done # for ac_tag
c906108c 19176
bec39cab 19177
81ecdfbb 19178as_fn_exit 0
bec39cab 19179_ACEOF
bec39cab
AC
19180ac_clean_files=$ac_clean_files_save
19181
81ecdfbb 19182test $ac_write_fail = 0 ||
63a9e923 19183 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 19184
bec39cab
AC
19185
19186# configure is writing to config.log, and then calls config.status.
19187# config.status does its own redirection, appending to config.log.
19188# Unfortunately, on DOS this fails, as config.log is still kept open
19189# by configure, so config.status won't be able to write to it; its
19190# output is simply discarded. So we exec the FD to /dev/null,
19191# effectively closing config.log, so it can be properly (re)opened and
19192# appended to by config.status. When coming back to configure, we
19193# need to make the FD available again.
19194if test "$no_create" != yes; then
19195 ac_cs_success=:
19196 ac_config_status_args=
19197 test "$silent" = yes &&
19198 ac_config_status_args="$ac_config_status_args --quiet"
19199 exec 5>/dev/null
19200 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19201 exec 5>>config.log
19202 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19203 # would make configure fail if this is the last instruction.
63a9e923 19204 $ac_cs_success || as_fn_exit 1
bec39cab 19205fi
c906108c 19206
bec39cab 19207#
81ecdfbb 19208# CONFIG_SUBDIRS section.
bec39cab 19209#
c906108c
SS
19210if test "$no_recursion" != yes; then
19211
81ecdfbb
RW
19212 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19213 # so they do not pile up.
c906108c
SS
19214 ac_sub_configure_args=
19215 ac_prev=
fdc59709
PB
19216 eval "set x $ac_configure_args"
19217 shift
19218 for ac_arg
19219 do
c906108c
SS
19220 if test -n "$ac_prev"; then
19221 ac_prev=
19222 continue
19223 fi
bec39cab 19224 case $ac_arg in
c906108c
SS
19225 -cache-file | --cache-file | --cache-fil | --cache-fi \
19226 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19227 ac_prev=cache_file ;;
19228 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19229 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19230 | --c=*)
19231 ;;
19232 --config-cache | -C)
c906108c
SS
19233 ;;
19234 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19235 ac_prev=srcdir ;;
19236 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19237 ;;
bec39cab
AC
19238 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19239 ac_prev=prefix ;;
19240 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19241 ;;
81ecdfbb
RW
19242 --disable-option-checking)
19243 ;;
fdc59709
PB
19244 *)
19245 case $ac_arg in
81ecdfbb 19246 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19247 esac
81ecdfbb 19248 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19249 esac
19250 done
19251
bec39cab
AC
19252 # Always prepend --prefix to ensure using the same prefix
19253 # in subdir configurations.
fdc59709
PB
19254 ac_arg="--prefix=$prefix"
19255 case $ac_arg in
81ecdfbb 19256 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19257 esac
81ecdfbb
RW
19258 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19259
19260 # Pass --silent
19261 if test "$silent" = yes; then
19262 ac_sub_configure_args="--silent $ac_sub_configure_args"
19263 fi
19264
19265 # Always prepend --disable-option-checking to silence warnings, since
19266 # different subdirs can have different --enable and --with options.
19267 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19268
b4e70030 19269 ac_popdir=`pwd`
bec39cab 19270 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19271
19272 # Do not complain, so a configure script can configure whichever
19273 # parts of a large source tree are present.
fdc59709 19274 test -d "$srcdir/$ac_dir" || continue
c906108c 19275
81ecdfbb
RW
19276 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19277 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19278 $as_echo "$ac_msg" >&6
19279 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19280 ac_builddir=.
19281
81ecdfbb
RW
19282case "$ac_dir" in
19283.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19284*)
19285 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19286 # A ".." for each directory in $ac_dir_suffix.
19287 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19288 case $ac_top_builddir_sub in
19289 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19290 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19291 esac ;;
19292esac
19293ac_abs_top_builddir=$ac_pwd
19294ac_abs_builddir=$ac_pwd$ac_dir_suffix
19295# for backward compatibility:
19296ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19297
19298case $srcdir in
81ecdfbb 19299 .) # We are building in place.
bec39cab 19300 ac_srcdir=.
81ecdfbb
RW
19301 ac_top_srcdir=$ac_top_builddir_sub
19302 ac_abs_top_srcdir=$ac_pwd ;;
19303 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19304 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19305 ac_top_srcdir=$srcdir
19306 ac_abs_top_srcdir=$srcdir ;;
19307 *) # Relative name.
19308 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19309 ac_top_srcdir=$ac_top_build_prefix$srcdir
19310 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19311esac
81ecdfbb 19312ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19313
c906108c 19314
fdc59709 19315 cd "$ac_dir"
c906108c
SS
19316
19317 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19318 if test -f "$ac_srcdir/configure.gnu"; then
19319 ac_sub_configure=$ac_srcdir/configure.gnu
19320 elif test -f "$ac_srcdir/configure"; then
19321 ac_sub_configure=$ac_srcdir/configure
19322 elif test -f "$ac_srcdir/configure.in"; then
19323 # This should be Cygnus configure.
19324 ac_sub_configure=$ac_aux_dir/configure
c906108c 19325 else
81ecdfbb
RW
19326 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19327$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19328 ac_sub_configure=
19329 fi
19330
19331 # The recursion is here.
19332 if test -n "$ac_sub_configure"; then
c906108c 19333 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19334 case $cache_file in
19335 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19336 *) # Relative name.
19337 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19338 esac
c906108c 19339
81ecdfbb
RW
19340 { $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
19341$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19342 # The eval makes quoting arguments work.
fdc59709
PB
19343 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19344 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
63a9e923 19345 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19346 fi
19347
fdc59709 19348 cd "$ac_popdir"
c906108c
SS
19349 done
19350fi
81ecdfbb
RW
19351if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19352 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19353$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19354fi
c906108c 19355