Print non-Ada unions without crashing
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 90as_myself=
81ecdfbb
RW
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
81ecdfbb
RW
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 211do
81ecdfbb
RW
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
81ecdfbb
RW
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 266 else
81ecdfbb
RW
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
bec39cab 271 fi
81ecdfbb
RW
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
bec39cab 301
81ecdfbb
RW
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
81ecdfbb
RW
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
81ecdfbb
RW
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
421 as_expr=expr
422else
423 as_expr=false
424fi
425
81ecdfbb 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
427 as_basename=basename
428else
429 as_basename=false
430fi
431
81ecdfbb
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
bec39cab 437
81ecdfbb 438as_me=`$as_basename -- "$0" ||
bec39cab
AC
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
bec39cab 456
b4e70030
JB
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 463
bec39cab 464
81ecdfbb
RW
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
bec39cab 474 sed '
81ecdfbb
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
bec39cab 479 N
81ecdfbb
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 482 t loop
81ecdfbb 483 s/-\n.*//
bec39cab 484 ' >$as_me.lineno &&
81ecdfbb
RW
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab 487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
bec39cab
AC
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
bec39cab
AC
496 # Exit status is that of the last command.
497 exit
498}
499
81ecdfbb
RW
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
bec39cab
AC
511esac
512
81ecdfbb
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
bec39cab 516else
81ecdfbb
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
bec39cab 519fi
81ecdfbb
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 522 as_ln_s='ln -s'
81ecdfbb
RW
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
81ecdfbb 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
81ecdfbb
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
b4e70030 533 fi
bec39cab 534else
d0ac1c44 535 as_ln_s='cp -pR'
bec39cab 536fi
81ecdfbb
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
bec39cab
AC
539
540if mkdir -p . 2>/dev/null; then
81ecdfbb 541 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
bec39cab
AC
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c906108c 559
bec39cab 560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
bec39cab
AC
565#
566# Initializations.
567#
c906108c 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
b4e70030 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab
AC
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
81ecdfbb 622enable_option_checking=no
d0ac1c44 623ac_header_list=
c971b7fa 624ac_subst_vars='LTLIBOBJS
81ecdfbb 625LIBOBJS
b292c783
JK
626GCORE_TRANSFORM_NAME
627GDB_TRANSFORM_NAME
e3487908 628XSLTPROC
81ecdfbb 629GDB_NM_FILE
393fd4c3
YQ
630LTLIBBABELTRACE
631LIBBABELTRACE
632HAVE_LIBBABELTRACE
21ea5acd
SDJ
633HAVE_NATIVE_GCORE_HOST
634NAT_GENERATED_FILES
635XM_CLIBS
636MH_CFLAGS
637LOADLIBES
638NAT_CDEPS
639NATDEPFILES
640NAT_FILE
81ecdfbb
RW
641target_subdir
642CONFIG_UNINSTALL
643CONFIG_INSTALL
644CONFIG_CLEAN
645CONFIG_ALL
646CONFIG_SRCS
647CONFIG_DEPS
648CONFIG_OBS
649PROFILE_CFLAGS
650ENABLE_CFLAGS
651SIM_OBS
652SIM
653XMKMF
654GDBTK_SRC_DIR
655GDBTK_CFLAGS
656GDBTKLIBS
657X_LIBS
658X_LDFLAGS
659X_CFLAGS
660TK_XINCLUDES
661TK_DEPS
662TK_LIBRARY
663TK_INCLUDE
664TK_STUB_LIB_SPEC
665TK_STUB_LIB_FLAG
666TK_STUB_LIB_FILE
667TK_LIB_SPEC
668TK_LIB_FLAG
669TK_LIB_FILE
670TK_SRC_DIR
671TK_BIN_DIR
672TK_VERSION
673TCL_DEPS
674TCL_LIBRARY
675TCL_INCLUDE
676TCL_STUB_LIB_SPEC
677TCL_STUB_LIB_FLAG
678TCL_STUB_LIB_FILE
679TCL_LIB_SPEC
680TCL_LIB_FLAG
681TCL_LIB_FILE
682TCL_SRC_DIR
683TCL_BIN_DIR
684TCL_PATCH_LEVEL
685TCL_VERSION
686WIN32LDAPP
687GUI_CFLAGS_X
688LIBGUI
608e2dbb
TT
689LTLIBLZMA
690LIBLZMA
691HAVE_LIBLZMA
81ecdfbb
RW
692WIN32LIBS
693SER_HARDWIRE
694WERROR_CFLAGS
695WARN_CFLAGS
696SYSTEM_GDBINIT
81ecdfbb
RW
697TARGET_SYSTEM_ROOT
698CONFIG_LDFLAGS
f6528abd 699RDYNAMIC
81ecdfbb 700ALLOCA
58bfce93
MM
701LTLIBIPT
702LIBIPT
703HAVE_LIBIPT
62f29fda
TT
704SRCHIGH_CFLAGS
705SRCHIGH_LIBS
4df42755
DE
706HAVE_GUILE_FALSE
707HAVE_GUILE_TRUE
ed3ef339
DE
708GUILE_LIBS
709GUILE_CPPFLAGS
e76c5d17
DE
710GUILD_TARGET_FLAG
711GUILD
ed3ef339 712pkg_config_prog_path
4df42755
DE
713HAVE_PYTHON_FALSE
714HAVE_PYTHON_TRUE
ac534cba
JB
715PYTHON_LIBS
716PYTHON_CPPFLAGS
81ecdfbb 717PYTHON_CFLAGS
ec685c5e 718python_prog_path
2400729e
UW
719LTLIBMPFR
720LIBMPFR
721HAVE_LIBMPFR
81ecdfbb
RW
722LTLIBEXPAT
723LIBEXPAT
724HAVE_LIBEXPAT
b8e0a31c 725JIT_READER_DIR
f997c383 726TARGET_PTR
39037522 727READLINE_TEXI_INCFLAG
81ecdfbb
RW
728READLINE_CFLAGS
729READLINE_DEPS
730READLINE
016a3251
DD
731LTLIBICONV
732LIBICONV
711a72d3
L
733zlibinc
734zlibdir
81ecdfbb
RW
735MIG
736WINDRES
737DLLTOOL
c971b7fa 738AR
81ecdfbb
RW
739YFLAGS
740YACC
c971b7fa 741RANLIB
81ecdfbb 742LN_S
c971b7fa
PA
743INSTALL_DATA
744INSTALL_SCRIPT
745INSTALL_PROGRAM
746AWK
81ecdfbb
RW
747REPORT_BUGS_TEXI
748REPORT_BUGS_TO
749PKGVERSION
44cee4fd 750CODESIGN_CERT
b292c783 751HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
752TARGET_OBS
753subdirs
754GDB_DATADIR
755DEBUGDIR
5048e516
JK
756MAKEINFO_EXTRA_FLAGS
757MAKEINFOFLAGS
758MAKEINFO
81ecdfbb
RW
759PACKAGE
760GNULIB_STDINT_H
81ecdfbb
RW
761CATOBJEXT
762GENCAT
763INSTOBJEXT
764DATADIRNAME
765CATALOGS
766POSUB
767GMSGFMT
768XGETTEXT
769INCINTL
770LIBINTL_DEP
771LIBINTL
772USE_NLS
81ecdfbb
RW
773CCDEPMODE
774DEPDIR
775am__leading_dot
0bcda685
PA
776CXX_DIALECT
777HAVE_CXX11
4869db5e
RM
778INSTALL_STRIP_PROGRAM
779STRIP
780install_sh
81ecdfbb
RW
781target_os
782target_vendor
783target_cpu
784target
785host_os
786host_vendor
787host_cpu
788host
789build_os
790build_vendor
791build_cpu
792build
c971b7fa
PA
793EGREP
794GREP
795CPP
3bc3d82a
PA
796ac_ct_CXX
797CXXFLAGS
798CXX
81ecdfbb
RW
799OBJEXT
800EXEEXT
801ac_ct_CC
802CPPFLAGS
803LDFLAGS
804CFLAGS
805CC
806MAINT
807MAINTAINER_MODE_FALSE
808MAINTAINER_MODE_TRUE
809target_alias
810host_alias
811build_alias
812LIBS
813ECHO_T
814ECHO_N
815ECHO_C
816DEFS
817mandir
818localedir
819libdir
820psdir
821pdfdir
822dvidir
823htmldir
824infodir
825docdir
826oldincludedir
827includedir
828localstatedir
829sharedstatedir
830sysconfdir
831datadir
832datarootdir
833libexecdir
834sbindir
835bindir
836program_transform_name
837prefix
838exec_prefix
839PACKAGE_URL
840PACKAGE_BUGREPORT
841PACKAGE_STRING
842PACKAGE_VERSION
843PACKAGE_TARNAME
844PACKAGE_NAME
845PATH_SEPARATOR
846SHELL'
2b351b19 847ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
848ac_user_opts='
849enable_option_checking
850enable_maintainer_mode
da2f07f1
JK
851enable_plugins
852enable_largefile
81ecdfbb
RW
853with_separate_debug_dir
854with_gdb_datadir
855with_relocated_sources
7349ff92 856with_auto_load_dir
bccbefd2 857with_auto_load_safe_path
81ecdfbb
RW
858enable_targets
859enable_64_bit_bfd
81ecdfbb
RW
860enable_gdbmi
861enable_tui
862enable_gdbtk
05e7c244 863with_libunwind_ia64
81ecdfbb
RW
864with_curses
865enable_profiling
44cee4fd 866enable_codesign
81ecdfbb
RW
867with_pkgversion
868with_bugurl
711a72d3 869with_system_zlib
016a3251
DD
870with_gnu_ld
871enable_rpath
81ecdfbb 872with_libiconv_prefix
478aac75 873with_iconv_bin
81ecdfbb 874with_system_readline
b8e0a31c 875with_jit_reader_dir
81ecdfbb 876with_expat
81ecdfbb 877with_libexpat_prefix
2400729e
UW
878with_mpfr
879with_libmpfr_prefix
81ecdfbb 880with_python
ed3ef339 881with_guile
a8db4212 882enable_libmcheck
58bfce93
MM
883with_intel_pt
884with_libipt_prefix
81ecdfbb
RW
885with_included_regex
886with_sysroot
887with_system_gdbinit
888enable_werror
889enable_build_warnings
890enable_gdb_build_warnings
f35d5ade 891enable_ubsan
608e2dbb
TT
892with_lzma
893with_liblzma_prefix
81ecdfbb
RW
894with_tcl
895with_tk
896with_x
897enable_sim
496c0e1b 898enable_gdbserver
393fd4c3
YQ
899with_babeltrace
900with_libbabeltrace_prefix
8ecfd7bd 901enable_unit_tests
81ecdfbb
RW
902'
903 ac_precious_vars='build_alias
904host_alias
905target_alias
906CC
907CFLAGS
908LDFLAGS
909LIBS
910CPPFLAGS
3bc3d82a
PA
911CXX
912CXXFLAGS
913CCC
81ecdfbb 914CPP
f06e05e0
JK
915MAKEINFO
916MAKEINFOFLAGS
81ecdfbb
RW
917YACC
918YFLAGS
919XMKMF'
5ae98d25 920ac_subdirs_all='testsuite
81ecdfbb 921gdbtk
81ecdfbb 922gdbserver'
c906108c
SS
923
924# Initialize some variables set by options.
bec39cab
AC
925ac_init_help=
926ac_init_version=false
81ecdfbb
RW
927ac_unrecognized_opts=
928ac_unrecognized_sep=
c906108c
SS
929# The variables have the same names as the options, with
930# dashes changed to underlines.
bec39cab 931cache_file=/dev/null
c906108c 932exec_prefix=NONE
c906108c 933no_create=
c906108c
SS
934no_recursion=
935prefix=NONE
936program_prefix=NONE
937program_suffix=NONE
938program_transform_name=s,x,x,
939silent=
940site=
941srcdir=
c906108c
SS
942verbose=
943x_includes=NONE
944x_libraries=NONE
bec39cab
AC
945
946# Installation directory options.
947# These are left unexpanded so users can "make install exec_prefix=/foo"
948# and all the variables that are supposed to be based on exec_prefix
949# by default will actually change.
950# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 951# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
952bindir='${exec_prefix}/bin'
953sbindir='${exec_prefix}/sbin'
954libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
955datarootdir='${prefix}/share'
956datadir='${datarootdir}'
c906108c
SS
957sysconfdir='${prefix}/etc'
958sharedstatedir='${prefix}/com'
959localstatedir='${prefix}/var'
c906108c
SS
960includedir='${prefix}/include'
961oldincludedir='/usr/include'
81ecdfbb
RW
962docdir='${datarootdir}/doc/${PACKAGE}'
963infodir='${datarootdir}/info'
964htmldir='${docdir}'
965dvidir='${docdir}'
966pdfdir='${docdir}'
967psdir='${docdir}'
968libdir='${exec_prefix}/lib'
969localedir='${datarootdir}/locale'
970mandir='${datarootdir}/man'
c906108c 971
c906108c 972ac_prev=
81ecdfbb 973ac_dashdash=
c906108c
SS
974for ac_option
975do
c906108c
SS
976 # If the previous option needs an argument, assign it.
977 if test -n "$ac_prev"; then
81ecdfbb 978 eval $ac_prev=\$ac_option
c906108c
SS
979 ac_prev=
980 continue
981 fi
982
81ecdfbb 983 case $ac_option in
d0ac1c44
SM
984 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
985 *=) ac_optarg= ;;
986 *) ac_optarg=yes ;;
81ecdfbb 987 esac
c906108c
SS
988
989 # Accept the important Cygnus configure options, so we can diagnose typos.
990
81ecdfbb
RW
991 case $ac_dashdash$ac_option in
992 --)
993 ac_dashdash=yes ;;
c906108c
SS
994
995 -bindir | --bindir | --bindi | --bind | --bin | --bi)
996 ac_prev=bindir ;;
997 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 998 bindir=$ac_optarg ;;
c906108c
SS
999
1000 -build | --build | --buil | --bui | --bu)
bec39cab 1001 ac_prev=build_alias ;;
c906108c 1002 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1003 build_alias=$ac_optarg ;;
c906108c
SS
1004
1005 -cache-file | --cache-file | --cache-fil | --cache-fi \
1006 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1007 ac_prev=cache_file ;;
1008 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1009 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1010 cache_file=$ac_optarg ;;
1011
1012 --config-cache | -C)
1013 cache_file=config.cache ;;
c906108c 1014
81ecdfbb 1015 -datadir | --datadir | --datadi | --datad)
c906108c 1016 ac_prev=datadir ;;
81ecdfbb 1017 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1018 datadir=$ac_optarg ;;
c906108c 1019
81ecdfbb
RW
1020 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1021 | --dataroo | --dataro | --datar)
1022 ac_prev=datarootdir ;;
1023 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1024 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1025 datarootdir=$ac_optarg ;;
1026
c906108c 1027 -disable-* | --disable-*)
81ecdfbb 1028 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1029 # Reject names that are not valid shell variable names.
81ecdfbb 1030 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1031 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1032 ac_useropt_orig=$ac_useropt
1033 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1034 case $ac_user_opts in
1035 *"
1036"enable_$ac_useropt"
1037"*) ;;
1038 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1039 ac_unrecognized_sep=', ';;
1040 esac
1041 eval enable_$ac_useropt=no ;;
1042
1043 -docdir | --docdir | --docdi | --doc | --do)
1044 ac_prev=docdir ;;
1045 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1046 docdir=$ac_optarg ;;
1047
1048 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1049 ac_prev=dvidir ;;
1050 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1051 dvidir=$ac_optarg ;;
c906108c
SS
1052
1053 -enable-* | --enable-*)
81ecdfbb 1054 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1055 # Reject names that are not valid shell variable names.
81ecdfbb 1056 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1057 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1058 ac_useropt_orig=$ac_useropt
1059 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1060 case $ac_user_opts in
1061 *"
1062"enable_$ac_useropt"
1063"*) ;;
1064 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1065 ac_unrecognized_sep=', ';;
b4e70030 1066 esac
81ecdfbb 1067 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1068
1069 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1070 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1071 | --exec | --exe | --ex)
1072 ac_prev=exec_prefix ;;
1073 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1074 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1075 | --exec=* | --exe=* | --ex=*)
bec39cab 1076 exec_prefix=$ac_optarg ;;
c906108c
SS
1077
1078 -gas | --gas | --ga | --g)
1079 # Obsolete; use --with-gas.
1080 with_gas=yes ;;
1081
bec39cab
AC
1082 -help | --help | --hel | --he | -h)
1083 ac_init_help=long ;;
1084 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1085 ac_init_help=recursive ;;
1086 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1087 ac_init_help=short ;;
c906108c
SS
1088
1089 -host | --host | --hos | --ho)
bec39cab 1090 ac_prev=host_alias ;;
c906108c 1091 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1092 host_alias=$ac_optarg ;;
c906108c 1093
81ecdfbb
RW
1094 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1095 ac_prev=htmldir ;;
1096 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1097 | --ht=*)
1098 htmldir=$ac_optarg ;;
1099
c906108c
SS
1100 -includedir | --includedir | --includedi | --included | --include \
1101 | --includ | --inclu | --incl | --inc)
1102 ac_prev=includedir ;;
1103 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1104 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1105 includedir=$ac_optarg ;;
c906108c
SS
1106
1107 -infodir | --infodir | --infodi | --infod | --info | --inf)
1108 ac_prev=infodir ;;
1109 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1110 infodir=$ac_optarg ;;
c906108c
SS
1111
1112 -libdir | --libdir | --libdi | --libd)
1113 ac_prev=libdir ;;
1114 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1115 libdir=$ac_optarg ;;
c906108c
SS
1116
1117 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1118 | --libexe | --libex | --libe)
1119 ac_prev=libexecdir ;;
1120 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1121 | --libexe=* | --libex=* | --libe=*)
bec39cab 1122 libexecdir=$ac_optarg ;;
c906108c 1123
81ecdfbb
RW
1124 -localedir | --localedir | --localedi | --localed | --locale)
1125 ac_prev=localedir ;;
1126 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1127 localedir=$ac_optarg ;;
1128
c906108c 1129 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1130 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1131 ac_prev=localstatedir ;;
1132 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1133 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1134 localstatedir=$ac_optarg ;;
c906108c
SS
1135
1136 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1137 ac_prev=mandir ;;
1138 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1139 mandir=$ac_optarg ;;
c906108c
SS
1140
1141 -nfp | --nfp | --nf)
1142 # Obsolete; use --without-fp.
1143 with_fp=no ;;
1144
1145 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1146 | --no-cr | --no-c | -n)
c906108c
SS
1147 no_create=yes ;;
1148
1149 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1150 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1151 no_recursion=yes ;;
1152
1153 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1154 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1155 | --oldin | --oldi | --old | --ol | --o)
1156 ac_prev=oldincludedir ;;
1157 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1158 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1159 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1160 oldincludedir=$ac_optarg ;;
c906108c
SS
1161
1162 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1163 ac_prev=prefix ;;
1164 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1165 prefix=$ac_optarg ;;
c906108c
SS
1166
1167 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1168 | --program-pre | --program-pr | --program-p)
1169 ac_prev=program_prefix ;;
1170 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1171 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1172 program_prefix=$ac_optarg ;;
c906108c
SS
1173
1174 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1175 | --program-suf | --program-su | --program-s)
1176 ac_prev=program_suffix ;;
1177 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1178 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1179 program_suffix=$ac_optarg ;;
c906108c
SS
1180
1181 -program-transform-name | --program-transform-name \
1182 | --program-transform-nam | --program-transform-na \
1183 | --program-transform-n | --program-transform- \
1184 | --program-transform | --program-transfor \
1185 | --program-transfo | --program-transf \
1186 | --program-trans | --program-tran \
1187 | --progr-tra | --program-tr | --program-t)
1188 ac_prev=program_transform_name ;;
1189 -program-transform-name=* | --program-transform-name=* \
1190 | --program-transform-nam=* | --program-transform-na=* \
1191 | --program-transform-n=* | --program-transform-=* \
1192 | --program-transform=* | --program-transfor=* \
1193 | --program-transfo=* | --program-transf=* \
1194 | --program-trans=* | --program-tran=* \
1195 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1196 program_transform_name=$ac_optarg ;;
c906108c 1197
81ecdfbb
RW
1198 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1199 ac_prev=pdfdir ;;
1200 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1201 pdfdir=$ac_optarg ;;
1202
1203 -psdir | --psdir | --psdi | --psd | --ps)
1204 ac_prev=psdir ;;
1205 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1206 psdir=$ac_optarg ;;
1207
c906108c
SS
1208 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1209 | -silent | --silent | --silen | --sile | --sil)
1210 silent=yes ;;
1211
1212 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1213 ac_prev=sbindir ;;
1214 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1215 | --sbi=* | --sb=*)
bec39cab 1216 sbindir=$ac_optarg ;;
c906108c
SS
1217
1218 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1219 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1220 | --sharedst | --shareds | --shared | --share | --shar \
1221 | --sha | --sh)
1222 ac_prev=sharedstatedir ;;
1223 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1224 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1225 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1226 | --sha=* | --sh=*)
bec39cab 1227 sharedstatedir=$ac_optarg ;;
c906108c
SS
1228
1229 -site | --site | --sit)
1230 ac_prev=site ;;
1231 -site=* | --site=* | --sit=*)
bec39cab 1232 site=$ac_optarg ;;
3ace7edb 1233
c906108c
SS
1234 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1235 ac_prev=srcdir ;;
1236 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1237 srcdir=$ac_optarg ;;
c906108c
SS
1238
1239 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1240 | --syscon | --sysco | --sysc | --sys | --sy)
1241 ac_prev=sysconfdir ;;
1242 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1243 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1244 sysconfdir=$ac_optarg ;;
c906108c
SS
1245
1246 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1247 ac_prev=target_alias ;;
c906108c 1248 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1249 target_alias=$ac_optarg ;;
c906108c
SS
1250
1251 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1252 verbose=yes ;;
1253
bec39cab
AC
1254 -version | --version | --versio | --versi | --vers | -V)
1255 ac_init_version=: ;;
c906108c
SS
1256
1257 -with-* | --with-*)
81ecdfbb 1258 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1259 # Reject names that are not valid shell variable names.
81ecdfbb 1260 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1261 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1262 ac_useropt_orig=$ac_useropt
1263 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1264 case $ac_user_opts in
1265 *"
1266"with_$ac_useropt"
1267"*) ;;
1268 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1269 ac_unrecognized_sep=', ';;
b4e70030 1270 esac
81ecdfbb 1271 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1272
1273 -without-* | --without-*)
81ecdfbb 1274 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1275 # Reject names that are not valid shell variable names.
81ecdfbb 1276 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1277 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1278 ac_useropt_orig=$ac_useropt
1279 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1280 case $ac_user_opts in
1281 *"
1282"with_$ac_useropt"
1283"*) ;;
1284 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1285 ac_unrecognized_sep=', ';;
1286 esac
1287 eval with_$ac_useropt=no ;;
c906108c
SS
1288
1289 --x)
1290 # Obsolete; use --with-x.
1291 with_x=yes ;;
1292
1293 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1294 | --x-incl | --x-inc | --x-in | --x-i)
1295 ac_prev=x_includes ;;
1296 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1297 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1298 x_includes=$ac_optarg ;;
c906108c
SS
1299
1300 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1301 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1302 ac_prev=x_libraries ;;
1303 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1304 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1305 x_libraries=$ac_optarg ;;
c906108c 1306
d0ac1c44
SM
1307 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1308Try \`$0 --help' for more information"
c906108c
SS
1309 ;;
1310
bec39cab
AC
1311 *=*)
1312 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1313 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1314 case $ac_envvar in #(
1315 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1316 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1317 esac
1318 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1319 export $ac_envvar ;;
1320
c906108c 1321 *)
bec39cab 1322 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1323 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1324 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1325 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1326 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1327 ;;
1328
1329 esac
1330done
1331
1332if test -n "$ac_prev"; then
bec39cab 1333 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1334 as_fn_error $? "missing argument to $ac_option"
c906108c 1335fi
c906108c 1336
81ecdfbb
RW
1337if test -n "$ac_unrecognized_opts"; then
1338 case $enable_option_checking in
1339 no) ;;
d0ac1c44 1340 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1341 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1342 esac
81ecdfbb 1343fi
b4e70030 1344
81ecdfbb
RW
1345# Check all directory arguments for consistency.
1346for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1347 datadir sysconfdir sharedstatedir localstatedir includedir \
1348 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1349 libdir localedir mandir
b4e70030 1350do
81ecdfbb
RW
1351 eval ac_val=\$$ac_var
1352 # Remove trailing slashes.
1353 case $ac_val in
1354 */ )
1355 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1356 eval $ac_var=\$ac_val;;
1357 esac
1358 # Be sure to have absolute directory names.
b4e70030 1359 case $ac_val in
81ecdfbb
RW
1360 [\\/$]* | ?:[\\/]* ) continue;;
1361 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1362 esac
d0ac1c44 1363 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1364done
1365
bec39cab
AC
1366# There might be people who depend on the old broken behavior: `$host'
1367# used to hold the argument of --host etc.
1368# FIXME: To remove some day.
1369build=$build_alias
1370host=$host_alias
1371target=$target_alias
1372
1373# FIXME: To remove some day.
1374if test "x$host_alias" != x; then
1375 if test "x$build_alias" = x; then
1376 cross_compiling=maybe
bec39cab
AC
1377 elif test "x$build_alias" != "x$host_alias"; then
1378 cross_compiling=yes
1379 fi
1380fi
c906108c 1381
bec39cab
AC
1382ac_tool_prefix=
1383test -n "$host_alias" && ac_tool_prefix=$host_alias-
1384
1385test "$silent" = yes && exec 6>/dev/null
c906108c 1386
c906108c 1387
81ecdfbb
RW
1388ac_pwd=`pwd` && test -n "$ac_pwd" &&
1389ac_ls_di=`ls -di .` &&
1390ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1391 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1392test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1393 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1394
1395
c906108c
SS
1396# Find the source files, if location was not specified.
1397if test -z "$srcdir"; then
1398 ac_srcdir_defaulted=yes
81ecdfbb
RW
1399 # Try the directory containing this script, then the parent directory.
1400 ac_confdir=`$as_dirname -- "$as_myself" ||
1401$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1402 X"$as_myself" : 'X\(//\)[^/]' \| \
1403 X"$as_myself" : 'X\(//\)$' \| \
1404 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1405$as_echo X"$as_myself" |
1406 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1407 s//\1/
1408 q
1409 }
1410 /^X\(\/\/\)[^/].*/{
1411 s//\1/
1412 q
1413 }
1414 /^X\(\/\/\)$/{
1415 s//\1/
1416 q
1417 }
1418 /^X\(\/\).*/{
1419 s//\1/
1420 q
1421 }
1422 s/.*/./; q'`
c906108c 1423 srcdir=$ac_confdir
81ecdfbb 1424 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1425 srcdir=..
1426 fi
1427else
1428 ac_srcdir_defaulted=no
1429fi
81ecdfbb
RW
1430if test ! -r "$srcdir/$ac_unique_file"; then
1431 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1432 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1433fi
1434ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1435ac_abs_confdir=`(
d0ac1c44 1436 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1437 pwd)`
1438# When building in place, set srcdir=.
1439if test "$ac_abs_confdir" = "$ac_pwd"; then
1440 srcdir=.
1441fi
1442# Remove unnecessary trailing slashes from srcdir.
1443# Double slashes in file names in object file debugging info
1444# mess up M-x gdb in Emacs.
1445case $srcdir in
1446*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1447esac
1448for ac_var in $ac_precious_vars; do
1449 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1450 eval ac_env_${ac_var}_value=\$${ac_var}
1451 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1452 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1453done
c906108c 1454
bec39cab
AC
1455#
1456# Report the --help message.
1457#
1458if test "$ac_init_help" = "long"; then
1459 # Omit some internal or obsolete options to make the list less imposing.
1460 # This message is too long to be a string in the A/UX 3.1 sh.
1461 cat <<_ACEOF
1462\`configure' configures this package to adapt to many kinds of systems.
1463
1464Usage: $0 [OPTION]... [VAR=VALUE]...
1465
1466To assign environment variables (e.g., CC, CFLAGS...), specify them as
1467VAR=VALUE. See below for descriptions of some of the useful variables.
1468
1469Defaults for the options are specified in brackets.
1470
1471Configuration:
1472 -h, --help display this help and exit
1473 --help=short display options specific to this package
1474 --help=recursive display the short help of all the included packages
1475 -V, --version display version information and exit
d0ac1c44 1476 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1477 --cache-file=FILE cache test results in FILE [disabled]
1478 -C, --config-cache alias for \`--cache-file=config.cache'
1479 -n, --no-create do not create output files
1480 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1481
bec39cab
AC
1482Installation directories:
1483 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1484 [$ac_default_prefix]
bec39cab 1485 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1486 [PREFIX]
bec39cab
AC
1487
1488By default, \`make install' will install all the files in
1489\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1490an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1491for instance \`--prefix=\$HOME'.
1492
1493For better control, use the options below.
1494
1495Fine tuning of the installation directories:
81ecdfbb
RW
1496 --bindir=DIR user executables [EPREFIX/bin]
1497 --sbindir=DIR system admin executables [EPREFIX/sbin]
1498 --libexecdir=DIR program executables [EPREFIX/libexec]
1499 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1500 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1501 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1502 --libdir=DIR object code libraries [EPREFIX/lib]
1503 --includedir=DIR C header files [PREFIX/include]
1504 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1505 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1506 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1507 --infodir=DIR info documentation [DATAROOTDIR/info]
1508 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1509 --mandir=DIR man documentation [DATAROOTDIR/man]
1510 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1511 --htmldir=DIR html documentation [DOCDIR]
1512 --dvidir=DIR dvi documentation [DOCDIR]
1513 --pdfdir=DIR pdf documentation [DOCDIR]
1514 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1515_ACEOF
1516
1517 cat <<\_ACEOF
1518
9009e1ae
MR
1519Program names:
1520 --program-prefix=PREFIX prepend PREFIX to installed program names
1521 --program-suffix=SUFFIX append SUFFIX to installed program names
1522 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1523
bec39cab
AC
1524X features:
1525 --x-includes=DIR X include files are in DIR
1526 --x-libraries=DIR X library files are in DIR
1527
1528System types:
1529 --build=BUILD configure for building on BUILD [guessed]
1530 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1531 --target=TARGET configure for building compilers for TARGET [HOST]
1532_ACEOF
1533fi
1534
1535if test -n "$ac_init_help"; then
1536
1537 cat <<\_ACEOF
1538
1539Optional Features:
81ecdfbb 1540 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1541 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1542 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1543 --enable-maintainer-mode
1544 enable make rules and dependencies not useful (and
1545 sometimes confusing) to the casual installer
2974be62 1546 --enable-plugins Enable support for plugins
da2f07f1 1547 --disable-largefile omit support for large files
a1220294
TT
1548 --enable-targets=TARGETS
1549 alternative target configurations
c0993dbe 1550 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1551 --disable-gdbmi disable machine-interface (MI)
1552 --enable-tui enable full-screen terminal user interface (TUI)
1553 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1554 --enable-profiling enable profiling of GDB
44cee4fd 1555 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1556 --disable-rpath do not hardcode runtime library paths
17ef446e 1557 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1558 --enable-werror treat compile warnings as errors
32c1c914 1559 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1560 --enable-gdb-build-warnings
32c1c914 1561 enable GDB specific build-time compiler warnings if
a1220294 1562 gcc is used
f35d5ade 1563 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1564 --enable-sim link gdb with simulator
496c0e1b
JB
1565 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1566 is auto)
8ecfd7bd
SDJ
1567 --enable-unit-tests Enable the inclusion of unit tests when compiling
1568 GDB
bec39cab
AC
1569
1570Optional Packages:
1571 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1572 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1573 --with-separate-debug-dir=PATH
32c1c914 1574 look for global separate debug info in this path
62e4f60c 1575 [LIBDIR/debug]
b14b1491
TT
1576 --with-gdb-datadir=PATH look for global separate data files in this path
1577 [DATADIR/gdb]
29b0e8a2 1578 --with-relocated-sources=PATH
32c1c914 1579 automatically relocate this path for source files
7349ff92 1580 --with-auto-load-dir=PATH
aff139ff 1581 directories from which to load auto-loaded scripts
1564a261 1582 [$debugdir:$datadir/auto-load]
bccbefd2 1583 --with-auto-load-safe-path=PATH
aff139ff 1584 directories safe to hold auto-loaded files
7349ff92 1585 [--with-auto-load-dir]
bccbefd2
JK
1586 --without-auto-load-safe-path
1587 do not restrict auto-loaded files locations
05e7c244 1588 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1589 --with-curses use the curses library instead of the termcap
1590 library
c16158bc
JM
1591 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1592 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1593 --with-system-zlib use installed libz
016a3251
DD
1594 --with-gnu-ld assume the C compiler uses GNU ld default=no
1595 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1596 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1597 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1598 --with-system-readline use installed readline library
b8e0a31c
SD
1599 --with-jit-reader-dir=PATH
1600 directory to load the JIT readers from
5c39566f 1601 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1602 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1603 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1604 --with-mpfr include MPFR support (auto/yes/no)
1605 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1606 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1607 --with-python[=PYTHON] include python support
1608 (auto/yes/no/<python-program>)
ed3ef339
DE
1609 --with-guile[=GUILE] include guile support
1610 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1611 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1612 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1613 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1614 --without-included-regex
1615 don't use included regex; this is the default on
1616 systems with version 2 of the GNU C library (use
1617 with caution on other system)
81ecdfbb 1618 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1619 --with-system-gdbinit=PATH
32c1c914 1620 automatically load a system-wide gdbinit file
608e2dbb
TT
1621 --with-lzma support lzma compression (auto/yes/no)
1622 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1623 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1624 --with-tcl directory containing tcl configuration (tclConfig.sh)
1625 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1626 --with-x use the X Window System
393fd4c3
YQ
1627 --with-babeltrace include babeltrace support (auto/yes/no)
1628 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1629 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1630
1631Some influential environment variables:
1632 CC C compiler command
1633 CFLAGS C compiler flags
1634 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1635 nonstandard directory <lib dir>
81ecdfbb 1636 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1637 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1638 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1639 CXX C++ compiler command
1640 CXXFLAGS C++ compiler flags
bec39cab 1641 CPP C preprocessor
f06e05e0
JK
1642 MAKEINFO Parent configure detects if it is of sufficient version.
1643 MAKEINFOFLAGS
1644 Parameters for MAKEINFO.
d0ac1c44
SM
1645 YACC The `Yet Another Compiler Compiler' implementation to use.
1646 Defaults to the first program found out of: `bison -y', `byacc',
1647 `yacc'.
81ecdfbb
RW
1648 YFLAGS The list of arguments that will be passed by default to $YACC.
1649 This script will default YFLAGS to the empty string to avoid a
1650 default value of `-d' given by some make applications.
1651 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1652
1653Use these variables to override the choices made by `configure' or to help
1654it to find libraries and programs with nonstandard names/locations.
1655
81ecdfbb 1656Report bugs to the package provider.
bec39cab 1657_ACEOF
81ecdfbb 1658ac_status=$?
bec39cab
AC
1659fi
1660
1661if test "$ac_init_help" = "recursive"; then
1662 # If there are subdirs, report their specific --help.
bec39cab 1663 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1664 test -d "$ac_dir" ||
1665 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1666 continue
bec39cab
AC
1667 ac_builddir=.
1668
81ecdfbb
RW
1669case "$ac_dir" in
1670.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1671*)
1672 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1673 # A ".." for each directory in $ac_dir_suffix.
1674 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1675 case $ac_top_builddir_sub in
1676 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1677 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1678 esac ;;
1679esac
1680ac_abs_top_builddir=$ac_pwd
1681ac_abs_builddir=$ac_pwd$ac_dir_suffix
1682# for backward compatibility:
1683ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1684
1685case $srcdir in
81ecdfbb 1686 .) # We are building in place.
bec39cab 1687 ac_srcdir=.
81ecdfbb
RW
1688 ac_top_srcdir=$ac_top_builddir_sub
1689 ac_abs_top_srcdir=$ac_pwd ;;
1690 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1691 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1692 ac_top_srcdir=$srcdir
1693 ac_abs_top_srcdir=$srcdir ;;
1694 *) # Relative name.
1695 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1696 ac_top_srcdir=$ac_top_build_prefix$srcdir
1697 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1698esac
81ecdfbb 1699ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1700
81ecdfbb
RW
1701 cd "$ac_dir" || { ac_status=$?; continue; }
1702 # Check for guested configure.
1703 if test -f "$ac_srcdir/configure.gnu"; then
1704 echo &&
1705 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1706 elif test -f "$ac_srcdir/configure"; then
1707 echo &&
1708 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1709 else
81ecdfbb
RW
1710 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1711 fi || ac_status=$?
1712 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1713 done
1714fi
1715
81ecdfbb 1716test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1717if $ac_init_version; then
1718 cat <<\_ACEOF
81ecdfbb 1719configure
d0ac1c44 1720generated by GNU Autoconf 2.69
bec39cab 1721
d0ac1c44 1722Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1723This configure script is free software; the Free Software Foundation
1724gives unlimited permission to copy, distribute and modify it.
1725_ACEOF
81ecdfbb 1726 exit
bec39cab 1727fi
bec39cab 1728
81ecdfbb
RW
1729## ------------------------ ##
1730## Autoconf initialization. ##
1731## ------------------------ ##
bec39cab 1732
81ecdfbb
RW
1733# ac_fn_c_try_compile LINENO
1734# --------------------------
1735# Try to compile conftest.$ac_ext, and return whether this succeeded.
1736ac_fn_c_try_compile ()
1737{
1738 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1739 rm -f conftest.$ac_objext
1740 if { { ac_try="$ac_compile"
1741case "(($ac_try" in
1742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1743 *) ac_try_echo=$ac_try;;
1744esac
1745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1746$as_echo "$ac_try_echo"; } >&5
1747 (eval "$ac_compile") 2>conftest.err
1748 ac_status=$?
1749 if test -s conftest.err; then
1750 grep -v '^ *+' conftest.err >conftest.er1
1751 cat conftest.er1 >&5
1752 mv -f conftest.er1 conftest.err
1753 fi
1754 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1755 test $ac_status = 0; } && {
1756 test -z "$ac_c_werror_flag" ||
1757 test ! -s conftest.err
1758 } && test -s conftest.$ac_objext; then :
1759 ac_retval=0
1760else
1761 $as_echo "$as_me: failed program was:" >&5
1762sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1763
81ecdfbb
RW
1764 ac_retval=1
1765fi
d0ac1c44
SM
1766 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1767 as_fn_set_status $ac_retval
81ecdfbb
RW
1768
1769} # ac_fn_c_try_compile
1770
3bc3d82a
PA
1771# ac_fn_cxx_try_compile LINENO
1772# ----------------------------
1773# Try to compile conftest.$ac_ext, and return whether this succeeded.
1774ac_fn_cxx_try_compile ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1777 rm -f conftest.$ac_objext
1778 if { { ac_try="$ac_compile"
1779case "(($ac_try" in
1780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1781 *) ac_try_echo=$ac_try;;
1782esac
1783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1784$as_echo "$ac_try_echo"; } >&5
1785 (eval "$ac_compile") 2>conftest.err
1786 ac_status=$?
1787 if test -s conftest.err; then
1788 grep -v '^ *+' conftest.err >conftest.er1
1789 cat conftest.er1 >&5
1790 mv -f conftest.er1 conftest.err
1791 fi
1792 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1793 test $ac_status = 0; } && {
1794 test -z "$ac_cxx_werror_flag" ||
1795 test ! -s conftest.err
1796 } && test -s conftest.$ac_objext; then :
1797 ac_retval=0
1798else
1799 $as_echo "$as_me: failed program was:" >&5
1800sed 's/^/| /' conftest.$ac_ext >&5
1801
1802 ac_retval=1
1803fi
d0ac1c44
SM
1804 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1805 as_fn_set_status $ac_retval
3bc3d82a
PA
1806
1807} # ac_fn_cxx_try_compile
1808
81ecdfbb
RW
1809# ac_fn_c_try_cpp LINENO
1810# ----------------------
1811# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1812ac_fn_c_try_cpp ()
bec39cab 1813{
81ecdfbb
RW
1814 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1815 if { { ac_try="$ac_cpp conftest.$ac_ext"
1816case "(($ac_try" in
1817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1818 *) ac_try_echo=$ac_try;;
1819esac
1820eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1821$as_echo "$ac_try_echo"; } >&5
1822 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1823 ac_status=$?
1824 if test -s conftest.err; then
1825 grep -v '^ *+' conftest.err >conftest.er1
1826 cat conftest.er1 >&5
1827 mv -f conftest.er1 conftest.err
1828 fi
1829 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1830 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1831 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1832 test ! -s conftest.err
1833 }; then :
1834 ac_retval=0
1835else
1836 $as_echo "$as_me: failed program was:" >&5
1837sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1838
81ecdfbb
RW
1839 ac_retval=1
1840fi
d0ac1c44
SM
1841 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1842 as_fn_set_status $ac_retval
bec39cab 1843
81ecdfbb 1844} # ac_fn_c_try_cpp
bec39cab 1845
81ecdfbb
RW
1846# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1847# -------------------------------------------------------
1848# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1849# the include files in INCLUDES and setting the cache variable VAR
1850# accordingly.
1851ac_fn_c_check_header_mongrel ()
1852{
1853 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1854 if eval \${$3+:} false; then :
81ecdfbb
RW
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1856$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1857if eval \${$3+:} false; then :
81ecdfbb
RW
1858 $as_echo_n "(cached) " >&6
1859fi
1860eval ac_res=\$$3
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862$as_echo "$ac_res" >&6; }
1863else
1864 # Is the header compilable?
1865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1866$as_echo_n "checking $2 usability... " >&6; }
1867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868/* end confdefs.h. */
1869$4
1870#include <$2>
1871_ACEOF
1872if ac_fn_c_try_compile "$LINENO"; then :
1873 ac_header_compiler=yes
1874else
1875 ac_header_compiler=no
1876fi
1877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1879$as_echo "$ac_header_compiler" >&6; }
bec39cab 1880
81ecdfbb
RW
1881# Is the header present?
1882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1883$as_echo_n "checking $2 presence... " >&6; }
1884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1885/* end confdefs.h. */
1886#include <$2>
1887_ACEOF
1888if ac_fn_c_try_cpp "$LINENO"; then :
1889 ac_header_preproc=yes
1890else
1891 ac_header_preproc=no
1892fi
d0ac1c44 1893rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1895$as_echo "$ac_header_preproc" >&6; }
bec39cab 1896
81ecdfbb
RW
1897# So? What about this header?
1898case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1899 yes:no: )
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1901$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1903$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1904 ;;
1905 no:yes:* )
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1907$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1909$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1911$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1913$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1915$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1916 ;;
1917esac
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1920if eval \${$3+:} false; then :
81ecdfbb
RW
1921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=\$ac_header_compiler"
1924fi
1925eval ac_res=\$$3
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927$as_echo "$ac_res" >&6; }
1928fi
d0ac1c44 1929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1930
81ecdfbb 1931} # ac_fn_c_check_header_mongrel
bec39cab 1932
81ecdfbb
RW
1933# ac_fn_c_try_run LINENO
1934# ----------------------
1935# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1936# that executables *can* be run.
1937ac_fn_c_try_run ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 if { { ac_try="$ac_link"
1941case "(($ac_try" in
1942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1943 *) ac_try_echo=$ac_try;;
1944esac
1945eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1946$as_echo "$ac_try_echo"; } >&5
1947 (eval "$ac_link") 2>&5
1948 ac_status=$?
1949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1950 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1951 { { case "(($ac_try" in
1952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1953 *) ac_try_echo=$ac_try;;
1954esac
1955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1956$as_echo "$ac_try_echo"; } >&5
1957 (eval "$ac_try") 2>&5
1958 ac_status=$?
1959 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1960 test $ac_status = 0; }; }; then :
1961 ac_retval=0
1962else
1963 $as_echo "$as_me: program exited with status $ac_status" >&5
1964 $as_echo "$as_me: failed program was:" >&5
1965sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1966
81ecdfbb
RW
1967 ac_retval=$ac_status
1968fi
1969 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1970 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1971 as_fn_set_status $ac_retval
bec39cab 1972
81ecdfbb 1973} # ac_fn_c_try_run
bec39cab 1974
81ecdfbb
RW
1975# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1976# -------------------------------------------------------
1977# Tests whether HEADER exists and can be compiled using the include files in
1978# INCLUDES, setting the cache variable VAR accordingly.
1979ac_fn_c_check_header_compile ()
1980{
1981 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1983$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1984if eval \${$3+:} false; then :
81ecdfbb
RW
1985 $as_echo_n "(cached) " >&6
1986else
1987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$4
1990#include <$2>
bec39cab 1991_ACEOF
81ecdfbb
RW
1992if ac_fn_c_try_compile "$LINENO"; then :
1993 eval "$3=yes"
1994else
1995 eval "$3=no"
1996fi
1997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1998fi
1999eval ac_res=\$$3
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2001$as_echo "$ac_res" >&6; }
d0ac1c44 2002 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2003
81ecdfbb 2004} # ac_fn_c_check_header_compile
bec39cab 2005
2974be62
AM
2006# ac_fn_c_try_link LINENO
2007# -----------------------
2008# Try to link conftest.$ac_ext, and return whether this succeeded.
2009ac_fn_c_try_link ()
2010{
2011 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 rm -f conftest.$ac_objext conftest$ac_exeext
2013 if { { ac_try="$ac_link"
2014case "(($ac_try" in
2015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2016 *) ac_try_echo=$ac_try;;
2017esac
2018eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2019$as_echo "$ac_try_echo"; } >&5
2020 (eval "$ac_link") 2>conftest.err
2021 ac_status=$?
2022 if test -s conftest.err; then
2023 grep -v '^ *+' conftest.err >conftest.er1
2024 cat conftest.er1 >&5
2025 mv -f conftest.er1 conftest.err
2026 fi
2027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2028 test $ac_status = 0; } && {
2029 test -z "$ac_c_werror_flag" ||
2030 test ! -s conftest.err
2031 } && test -s conftest$ac_exeext && {
2032 test "$cross_compiling" = yes ||
d0ac1c44 2033 test -x conftest$ac_exeext
2974be62
AM
2034 }; then :
2035 ac_retval=0
2036else
2037 $as_echo "$as_me: failed program was:" >&5
2038sed 's/^/| /' conftest.$ac_ext >&5
2039
2040 ac_retval=1
2041fi
2042 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2043 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2044 # interfere with the next link command; also delete a directory that is
2045 # left behind by Apple's compiler. We do this before executing the actions.
2046 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2047 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2048 as_fn_set_status $ac_retval
2974be62
AM
2049
2050} # ac_fn_c_try_link
2051
81ecdfbb
RW
2052# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2053# --------------------------------------------
2054# Tries to find the compile-time value of EXPR in a program that includes
2055# INCLUDES, setting VAR accordingly. Returns whether the value could be
2056# computed
2057ac_fn_c_compute_int ()
2058{
2059 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060 if test "$cross_compiling" = yes; then
2061 # Depending upon the size, compute the lo and hi bounds.
2062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$4
2065int
2066main ()
2067{
2068static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2069test_array [0] = 0;
2070return test_array [0];
bec39cab 2071
81ecdfbb
RW
2072 ;
2073 return 0;
2074}
2075_ACEOF
2076if ac_fn_c_try_compile "$LINENO"; then :
2077 ac_lo=0 ac_mid=0
2078 while :; do
2079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080/* end confdefs.h. */
2081$4
2082int
2083main ()
2084{
2085static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2086test_array [0] = 0;
2087return test_array [0];
bec39cab 2088
81ecdfbb
RW
2089 ;
2090 return 0;
2091}
2092_ACEOF
2093if ac_fn_c_try_compile "$LINENO"; then :
2094 ac_hi=$ac_mid; break
2095else
2096 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2097 if test $ac_lo -le $ac_mid; then
2098 ac_lo= ac_hi=
2099 break
2100 fi
2101 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2102fi
81ecdfbb
RW
2103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2104 done
c906108c 2105else
81ecdfbb
RW
2106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109int
2110main ()
2111{
2112static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2113test_array [0] = 0;
2114return test_array [0];
bec39cab 2115
81ecdfbb
RW
2116 ;
2117 return 0;
2118}
2119_ACEOF
2120if ac_fn_c_try_compile "$LINENO"; then :
2121 ac_hi=-1 ac_mid=-1
2122 while :; do
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124/* end confdefs.h. */
2125$4
2126int
2127main ()
2128{
2129static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2130test_array [0] = 0;
2131return test_array [0];
bec39cab 2132
81ecdfbb
RW
2133 ;
2134 return 0;
2135}
2136_ACEOF
2137if ac_fn_c_try_compile "$LINENO"; then :
2138 ac_lo=$ac_mid; break
2139else
2140 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2141 if test $ac_mid -le $ac_hi; then
2142 ac_lo= ac_hi=
2143 break
2144 fi
2145 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2146fi
2147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148 done
2149else
2150 ac_lo= ac_hi=
2151fi
2152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2153fi
2154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2155# Binary search between lo and hi bounds.
2156while test "x$ac_lo" != "x$ac_hi"; do
2157 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2159/* end confdefs.h. */
2160$4
2161int
2162main ()
2163{
2164static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2165test_array [0] = 0;
2166return test_array [0];
bec39cab 2167
81ecdfbb
RW
2168 ;
2169 return 0;
2170}
2171_ACEOF
2172if ac_fn_c_try_compile "$LINENO"; then :
2173 ac_hi=$ac_mid
2174else
2175 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2176fi
2177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178done
2179case $ac_lo in #((
2180?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2181'') ac_retval=1 ;;
2182esac
2183 else
2184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2185/* end confdefs.h. */
2186$4
2187static long int longval () { return $2; }
2188static unsigned long int ulongval () { return $2; }
2189#include <stdio.h>
2190#include <stdlib.h>
2191int
2192main ()
2193{
bec39cab 2194
81ecdfbb
RW
2195 FILE *f = fopen ("conftest.val", "w");
2196 if (! f)
2197 return 1;
2198 if (($2) < 0)
2199 {
2200 long int i = longval ();
2201 if (i != ($2))
2202 return 1;
2203 fprintf (f, "%ld", i);
2204 }
2205 else
2206 {
2207 unsigned long int i = ulongval ();
2208 if (i != ($2))
2209 return 1;
2210 fprintf (f, "%lu", i);
2211 }
2212 /* Do not output a trailing newline, as this causes \r\n confusion
2213 on some platforms. */
2214 return ferror (f) || fclose (f) != 0;
bec39cab 2215
81ecdfbb
RW
2216 ;
2217 return 0;
2218}
2219_ACEOF
2220if ac_fn_c_try_run "$LINENO"; then :
2221 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2222else
2223 ac_retval=1
2224fi
2225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2226 conftest.$ac_objext conftest.beam conftest.$ac_ext
2227rm -f conftest.val
bec39cab 2228
81ecdfbb 2229 fi
d0ac1c44
SM
2230 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2231 as_fn_set_status $ac_retval
bec39cab 2232
81ecdfbb 2233} # ac_fn_c_compute_int
bec39cab 2234
55a8c076
YQ
2235# ac_fn_c_check_func LINENO FUNC VAR
2236# ----------------------------------
2237# Tests whether FUNC exists, setting the cache variable VAR accordingly
2238ac_fn_c_check_func ()
81ecdfbb
RW
2239{
2240 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2242$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2243if eval \${$3+:} false; then :
81ecdfbb
RW
2244 $as_echo_n "(cached) " >&6
2245else
81ecdfbb
RW
2246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h. */
55a8c076
YQ
2248/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2249 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2250#define $2 innocuous_$2
2251
2252/* System header to define __stub macros and hopefully few prototypes,
2253 which can conflict with char $2 (); below.
2254 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2255 <limits.h> exists even on freestanding compilers. */
2256
2257#ifdef __STDC__
2258# include <limits.h>
2259#else
2260# include <assert.h>
2261#endif
2262
2263#undef $2
2264
2265/* Override any GCC internal prototype to avoid an error.
2266 Use char because int might match the return type of a GCC
2267 builtin and then its argument prototype would still apply. */
2268#ifdef __cplusplus
2269extern "C"
2270#endif
2271char $2 ();
2272/* The GNU C library defines this for functions which it implements
2273 to always fail with ENOSYS. Some functions are actually named
2274 something starting with __ and the normal name is an alias. */
2275#if defined __stub_$2 || defined __stub___$2
2276choke me
2277#endif
2278
2279int
2280main ()
2281{
2282return $2 ();
2283 ;
2284 return 0;
2285}
2286_ACEOF
2287if ac_fn_c_try_link "$LINENO"; then :
2288 eval "$3=yes"
2289else
2290 eval "$3=no"
2291fi
2292rm -f core conftest.err conftest.$ac_objext \
2293 conftest$ac_exeext conftest.$ac_ext
2294fi
2295eval ac_res=\$$3
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2297$as_echo "$ac_res" >&6; }
d0ac1c44 2298 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2299
2300} # ac_fn_c_check_func
2301
c56ccc05
MM
2302# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2303# ----------------------------------------------------
2304# Tries to find if the field MEMBER exists in type AGGR, after including
2305# INCLUDES, setting cache variable VAR accordingly.
2306ac_fn_c_check_member ()
2307{
2308 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2310$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2311if eval \${$4+:} false; then :
c56ccc05
MM
2312 $as_echo_n "(cached) " >&6
2313else
2314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315/* end confdefs.h. */
2316$5
2317int
2318main ()
2319{
2320static $2 ac_aggr;
2321if (ac_aggr.$3)
2322return 0;
2323 ;
2324 return 0;
2325}
2326_ACEOF
2327if ac_fn_c_try_compile "$LINENO"; then :
2328 eval "$4=yes"
2329else
2330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331/* end confdefs.h. */
2332$5
2333int
2334main ()
2335{
2336static $2 ac_aggr;
2337if (sizeof ac_aggr.$3)
2338return 0;
2339 ;
2340 return 0;
2341}
2342_ACEOF
2343if ac_fn_c_try_compile "$LINENO"; then :
2344 eval "$4=yes"
2345else
2346 eval "$4=no"
2347fi
2348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349fi
2350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2351fi
2352eval ac_res=\$$4
2353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2354$as_echo "$ac_res" >&6; }
d0ac1c44 2355 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2356
2357} # ac_fn_c_check_member
2358
07697489
PA
2359# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2360# -------------------------------------------
2361# Tests whether TYPE exists after having included INCLUDES, setting cache
2362# variable VAR accordingly.
2363ac_fn_c_check_type ()
2364{
2365 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2367$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2368if eval \${$3+:} false; then :
07697489
PA
2369 $as_echo_n "(cached) " >&6
2370else
2371 eval "$3=no"
2372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h. */
2374$4
2375int
2376main ()
2377{
2378if (sizeof ($2))
2379 return 0;
2380 ;
2381 return 0;
2382}
2383_ACEOF
2384if ac_fn_c_try_compile "$LINENO"; then :
2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386/* end confdefs.h. */
2387$4
2388int
2389main ()
2390{
2391if (sizeof (($2)))
2392 return 0;
2393 ;
2394 return 0;
2395}
2396_ACEOF
2397if ac_fn_c_try_compile "$LINENO"; then :
2398
2399else
2400 eval "$3=yes"
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403fi
2404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405fi
2406eval ac_res=\$$3
2407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2408$as_echo "$ac_res" >&6; }
d0ac1c44 2409 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2410
2411} # ac_fn_c_check_type
2412
d0ac1c44
SM
2413# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2414# ---------------------------------------------
2415# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2416# accordingly.
770d76d7
PA
2417ac_fn_c_check_decl ()
2418{
2419 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2420 as_decl_name=`echo $2|sed 's/ *(.*//'`
2421 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2423$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2424if eval \${$3+:} false; then :
770d76d7
PA
2425 $as_echo_n "(cached) " >&6
2426else
2427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2428/* end confdefs.h. */
2429$4
2430int
2431main ()
2432{
2433#ifndef $as_decl_name
2434#ifdef __cplusplus
2435 (void) $as_decl_use;
2436#else
2437 (void) $as_decl_name;
2438#endif
2439#endif
2440
2441 ;
2442 return 0;
2443}
2444_ACEOF
2445if ac_fn_c_try_compile "$LINENO"; then :
2446 eval "$3=yes"
2447else
2448 eval "$3=no"
2449fi
2450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451fi
2452eval ac_res=\$$3
2453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2454$as_echo "$ac_res" >&6; }
d0ac1c44 2455 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2456
2457} # ac_fn_c_check_decl
f35d5ade
TT
2458
2459# ac_fn_cxx_try_link LINENO
2460# -------------------------
2461# Try to link conftest.$ac_ext, and return whether this succeeded.
2462ac_fn_cxx_try_link ()
2463{
2464 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2465 rm -f conftest.$ac_objext conftest$ac_exeext
2466 if { { ac_try="$ac_link"
2467case "(($ac_try" in
2468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2469 *) ac_try_echo=$ac_try;;
2470esac
2471eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2472$as_echo "$ac_try_echo"; } >&5
2473 (eval "$ac_link") 2>conftest.err
2474 ac_status=$?
2475 if test -s conftest.err; then
2476 grep -v '^ *+' conftest.err >conftest.er1
2477 cat conftest.er1 >&5
2478 mv -f conftest.er1 conftest.err
2479 fi
2480 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2481 test $ac_status = 0; } && {
2482 test -z "$ac_cxx_werror_flag" ||
2483 test ! -s conftest.err
2484 } && test -s conftest$ac_exeext && {
2485 test "$cross_compiling" = yes ||
2486 test -x conftest$ac_exeext
2487 }; then :
2488 ac_retval=0
2489else
2490 $as_echo "$as_me: failed program was:" >&5
2491sed 's/^/| /' conftest.$ac_ext >&5
2492
2493 ac_retval=1
2494fi
2495 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2496 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2497 # interfere with the next link command; also delete a directory that is
2498 # left behind by Apple's compiler. We do this before executing the actions.
2499 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2500 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2501 as_fn_set_status $ac_retval
2502
2503} # ac_fn_cxx_try_link
81ecdfbb
RW
2504cat >config.log <<_ACEOF
2505This file contains any messages produced by compilers while
2506running configure, to aid debugging if configure makes a mistake.
d5af19ba 2507
81ecdfbb 2508It was created by $as_me, which was
d0ac1c44 2509generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2510
81ecdfbb 2511 $ $0 $@
413ccac7 2512
81ecdfbb
RW
2513_ACEOF
2514exec 5>>config.log
2515{
2516cat <<_ASUNAME
2517## --------- ##
2518## Platform. ##
2519## --------- ##
413ccac7 2520
81ecdfbb
RW
2521hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2522uname -m = `(uname -m) 2>/dev/null || echo unknown`
2523uname -r = `(uname -r) 2>/dev/null || echo unknown`
2524uname -s = `(uname -s) 2>/dev/null || echo unknown`
2525uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2526
81ecdfbb
RW
2527/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2528/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2529
81ecdfbb
RW
2530/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2531/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2532/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2533/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2534/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2535/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2536/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2537
81ecdfbb 2538_ASUNAME
bec39cab 2539
bec39cab
AC
2540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2541for as_dir in $PATH
2542do
2543 IFS=$as_save_IFS
2544 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2545 $as_echo "PATH: $as_dir"
2546 done
2547IFS=$as_save_IFS
bec39cab 2548
81ecdfbb 2549} >&5
bec39cab 2550
81ecdfbb 2551cat >&5 <<_ACEOF
bec39cab 2552
bec39cab 2553
81ecdfbb
RW
2554## ----------- ##
2555## Core tests. ##
2556## ----------- ##
2557
2558_ACEOF
2559
2560
2561# Keep a trace of the command line.
2562# Strip out --no-create and --no-recursion so they do not pile up.
2563# Strip out --silent because we don't want to record it for future runs.
2564# Also quote any args containing shell meta-characters.
2565# Make two passes to allow for proper duplicate-argument suppression.
2566ac_configure_args=
2567ac_configure_args0=
2568ac_configure_args1=
2569ac_must_keep_next=false
2570for ac_pass in 1 2
2571do
2572 for ac_arg
2573 do
2574 case $ac_arg in
2575 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2576 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2577 | -silent | --silent | --silen | --sile | --sil)
2578 continue ;;
2579 *\'*)
2580 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2581 esac
2582 case $ac_pass in
2583 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2584 2)
2585 as_fn_append ac_configure_args1 " '$ac_arg'"
2586 if test $ac_must_keep_next = true; then
2587 ac_must_keep_next=false # Got value, back to normal.
2588 else
2589 case $ac_arg in
2590 *=* | --config-cache | -C | -disable-* | --disable-* \
2591 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2592 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2593 | -with-* | --with-* | -without-* | --without-* | --x)
2594 case "$ac_configure_args0 " in
2595 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2596 esac
2597 ;;
2598 -* ) ac_must_keep_next=true ;;
2599 esac
2600 fi
2601 as_fn_append ac_configure_args " '$ac_arg'"
2602 ;;
2603 esac
2604 done
2605done
2606{ ac_configure_args0=; unset ac_configure_args0;}
2607{ ac_configure_args1=; unset ac_configure_args1;}
2608
2609# When interrupted or exit'd, cleanup temporary files, and complete
2610# config.log. We remove comments because anyway the quotes in there
2611# would cause problems or look ugly.
2612# WARNING: Use '\'' to represent an apostrophe within the trap.
2613# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2614trap 'exit_status=$?
2615 # Save into config.log some information that might help in debugging.
2616 {
2617 echo
2618
d0ac1c44 2619 $as_echo "## ---------------- ##
81ecdfbb 2620## Cache variables. ##
d0ac1c44 2621## ---------------- ##"
81ecdfbb
RW
2622 echo
2623 # The following way of writing the cache mishandles newlines in values,
2624(
2625 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2626 eval ac_val=\$$ac_var
2627 case $ac_val in #(
2628 *${as_nl}*)
2629 case $ac_var in #(
2630 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2631$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2632 esac
2633 case $ac_var in #(
2634 _ | IFS | as_nl) ;; #(
2635 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2636 *) { eval $ac_var=; unset $ac_var;} ;;
2637 esac ;;
2638 esac
2639 done
2640 (set) 2>&1 |
2641 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2642 *${as_nl}ac_space=\ *)
2643 sed -n \
2644 "s/'\''/'\''\\\\'\'''\''/g;
2645 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2646 ;; #(
2647 *)
2648 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2649 ;;
2650 esac |
2651 sort
2652)
2653 echo
2654
d0ac1c44 2655 $as_echo "## ----------------- ##
81ecdfbb 2656## Output variables. ##
d0ac1c44 2657## ----------------- ##"
81ecdfbb
RW
2658 echo
2659 for ac_var in $ac_subst_vars
2660 do
2661 eval ac_val=\$$ac_var
2662 case $ac_val in
2663 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2664 esac
2665 $as_echo "$ac_var='\''$ac_val'\''"
2666 done | sort
2667 echo
2668
2669 if test -n "$ac_subst_files"; then
d0ac1c44 2670 $as_echo "## ------------------- ##
81ecdfbb 2671## File substitutions. ##
d0ac1c44 2672## ------------------- ##"
81ecdfbb
RW
2673 echo
2674 for ac_var in $ac_subst_files
2675 do
2676 eval ac_val=\$$ac_var
2677 case $ac_val in
2678 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2679 esac
2680 $as_echo "$ac_var='\''$ac_val'\''"
2681 done | sort
2682 echo
2683 fi
2684
2685 if test -s confdefs.h; then
d0ac1c44 2686 $as_echo "## ----------- ##
81ecdfbb 2687## confdefs.h. ##
d0ac1c44 2688## ----------- ##"
81ecdfbb
RW
2689 echo
2690 cat confdefs.h
2691 echo
2692 fi
2693 test "$ac_signal" != 0 &&
2694 $as_echo "$as_me: caught signal $ac_signal"
2695 $as_echo "$as_me: exit $exit_status"
2696 } >&5
2697 rm -f core *.core core.conftest.* &&
2698 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2699 exit $exit_status
2700' 0
2701for ac_signal in 1 2 13 15; do
2702 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2703done
2704ac_signal=0
2705
2706# confdefs.h avoids OS command line length limits that DEFS can exceed.
2707rm -f -r conftest* confdefs.h
2708
2709$as_echo "/* confdefs.h */" > confdefs.h
2710
2711# Predefined preprocessor variables.
2712
2713cat >>confdefs.h <<_ACEOF
2714#define PACKAGE_NAME "$PACKAGE_NAME"
2715_ACEOF
2716
2717cat >>confdefs.h <<_ACEOF
2718#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2719_ACEOF
2720
2721cat >>confdefs.h <<_ACEOF
2722#define PACKAGE_VERSION "$PACKAGE_VERSION"
2723_ACEOF
2724
2725cat >>confdefs.h <<_ACEOF
2726#define PACKAGE_STRING "$PACKAGE_STRING"
2727_ACEOF
2728
2729cat >>confdefs.h <<_ACEOF
2730#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2731_ACEOF
2732
2733cat >>confdefs.h <<_ACEOF
2734#define PACKAGE_URL "$PACKAGE_URL"
2735_ACEOF
2736
2737
2738# Let the site file select an alternate cache file if it wants to.
2739# Prefer an explicitly selected file to automatically selected ones.
2740ac_site_file1=NONE
2741ac_site_file2=NONE
2742if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2743 # We do not want a PATH search for config.site.
2744 case $CONFIG_SITE in #((
2745 -*) ac_site_file1=./$CONFIG_SITE;;
2746 */*) ac_site_file1=$CONFIG_SITE;;
2747 *) ac_site_file1=./$CONFIG_SITE;;
2748 esac
81ecdfbb
RW
2749elif test "x$prefix" != xNONE; then
2750 ac_site_file1=$prefix/share/config.site
2751 ac_site_file2=$prefix/etc/config.site
2752else
2753 ac_site_file1=$ac_default_prefix/share/config.site
2754 ac_site_file2=$ac_default_prefix/etc/config.site
2755fi
2756for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2757do
2758 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2759 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2761$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2762 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2763 . "$ac_site_file" \
2764 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2766as_fn_error $? "failed to load site script $ac_site_file
2767See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2768 fi
2769done
2770
2771if test -r "$cache_file"; then
d0ac1c44
SM
2772 # Some versions of bash will fail to source /dev/null (special files
2773 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2774 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2776$as_echo "$as_me: loading cache $cache_file" >&6;}
2777 case $cache_file in
2778 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2779 *) . "./$cache_file";;
2780 esac
2781 fi
2782else
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2784$as_echo "$as_me: creating cache $cache_file" >&6;}
2785 >$cache_file
bec39cab
AC
2786fi
2787
d0ac1c44
SM
2788as_fn_append ac_header_list " stdlib.h"
2789as_fn_append ac_header_list " unistd.h"
2790as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2791# Check that the precious variables saved in the cache have kept the same
2792# value.
2793ac_cache_corrupted=false
2794for ac_var in $ac_precious_vars; do
2795 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2796 eval ac_new_set=\$ac_env_${ac_var}_set
2797 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2798 eval ac_new_val=\$ac_env_${ac_var}_value
2799 case $ac_old_set,$ac_new_set in
2800 set,)
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2802$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2803 ac_cache_corrupted=: ;;
2804 ,set)
2805 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2806$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2807 ac_cache_corrupted=: ;;
2808 ,);;
2809 *)
2810 if test "x$ac_old_val" != "x$ac_new_val"; then
2811 # differences in whitespace do not lead to failure.
2812 ac_old_val_w=`echo x $ac_old_val`
2813 ac_new_val_w=`echo x $ac_new_val`
2814 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2816$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2817 ac_cache_corrupted=:
2818 else
2819 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2820$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2821 eval $ac_var=\$ac_old_val
2822 fi
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2824$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2825 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2826$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2827 fi;;
2828 esac
2829 # Pass precious variables to config.status.
2830 if test "$ac_new_set" = set; then
2831 case $ac_new_val in
2832 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2833 *) ac_arg=$ac_var=$ac_new_val ;;
2834 esac
2835 case " $ac_configure_args " in
2836 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2837 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2838 esac
2839 fi
2840done
2841if $ac_cache_corrupted; then
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2843$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2844 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2845$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2846 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2847fi
2848## -------------------- ##
2849## Main body of script. ##
2850## -------------------- ##
2851
2852ac_ext=c
2853ac_cpp='$CPP $CPPFLAGS'
2854ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2855ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2856ac_compiler_gnu=$ac_cv_c_compiler_gnu
2857
2858
2859
2860
2861
2862ac_config_headers="$ac_config_headers config.h:config.in"
2863
2864
2865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2866$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2867 # Check whether --enable-maintainer-mode was given.
2868if test "${enable_maintainer_mode+set}" = set; then :
2869 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2870else
2871 USE_MAINTAINER_MODE=no
2872fi
2873
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2875$as_echo "$USE_MAINTAINER_MODE" >&6; }
2876 if test $USE_MAINTAINER_MODE = yes; then
2877 MAINTAINER_MODE_TRUE=
2878 MAINTAINER_MODE_FALSE='#'
2879else
2880 MAINTAINER_MODE_TRUE='#'
2881 MAINTAINER_MODE_FALSE=
2882fi
2883
2884 MAINT=$MAINTAINER_MODE_TRUE
2885
2886
2887
17ef446e 2888# Set the 'development' global.
270c9937 2889. $srcdir/../bfd/development.sh
f5f1cdb6 2890
81ecdfbb
RW
2891ac_ext=c
2892ac_cpp='$CPP $CPPFLAGS'
2893ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2894ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2895ac_compiler_gnu=$ac_cv_c_compiler_gnu
2896if test -n "$ac_tool_prefix"; then
2897 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2898set dummy ${ac_tool_prefix}gcc; ac_word=$2
2899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2900$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2901if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2902 $as_echo_n "(cached) " >&6
c906108c
SS
2903else
2904 if test -n "$CC"; then
2905 ac_cv_prog_CC="$CC" # Let the user override the test.
2906else
bec39cab
AC
2907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2908for as_dir in $PATH
2909do
2910 IFS=$as_save_IFS
2911 test -z "$as_dir" && as_dir=.
81ecdfbb 2912 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2914 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2916 break 2
2917 fi
2918done
81ecdfbb
RW
2919 done
2920IFS=$as_save_IFS
bec39cab 2921
c906108c
SS
2922fi
2923fi
bec39cab 2924CC=$ac_cv_prog_CC
c906108c 2925if test -n "$CC"; then
81ecdfbb
RW
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2927$as_echo "$CC" >&6; }
c906108c 2928else
81ecdfbb
RW
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2930$as_echo "no" >&6; }
c906108c
SS
2931fi
2932
81ecdfbb 2933
b4e70030
JB
2934fi
2935if test -z "$ac_cv_prog_CC"; then
2936 ac_ct_CC=$CC
81ecdfbb
RW
2937 # Extract the first word of "gcc", so it can be a program name with args.
2938set dummy gcc; ac_word=$2
2939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2940$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2941if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2942 $as_echo_n "(cached) " >&6
b4e70030
JB
2943else
2944 if test -n "$ac_ct_CC"; then
2945 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2946else
2947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2948for as_dir in $PATH
2949do
2950 IFS=$as_save_IFS
2951 test -z "$as_dir" && as_dir=.
81ecdfbb 2952 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2954 ac_cv_prog_ac_ct_CC="gcc"
2955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2956 break 2
4e8d927d 2957 fi
b4e70030 2958done
81ecdfbb
RW
2959 done
2960IFS=$as_save_IFS
b4e70030
JB
2961
2962fi
2963fi
2964ac_ct_CC=$ac_cv_prog_ac_ct_CC
2965if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2967$as_echo "$ac_ct_CC" >&6; }
b4e70030 2968else
81ecdfbb
RW
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2970$as_echo "no" >&6; }
b4e70030
JB
2971fi
2972
81ecdfbb
RW
2973 if test "x$ac_ct_CC" = x; then
2974 CC=""
2975 else
2976 case $cross_compiling:$ac_tool_warned in
2977yes:)
2978{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2979$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2980ac_tool_warned=yes ;;
2981esac
2982 CC=$ac_ct_CC
2983 fi
b4e70030
JB
2984else
2985 CC="$ac_cv_prog_CC"
2986fi
2987
c906108c 2988if test -z "$CC"; then
81ecdfbb
RW
2989 if test -n "$ac_tool_prefix"; then
2990 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2991set dummy ${ac_tool_prefix}cc; ac_word=$2
2992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2993$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2994if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2995 $as_echo_n "(cached) " >&6
c906108c
SS
2996else
2997 if test -n "$CC"; then
2998 ac_cv_prog_CC="$CC" # Let the user override the test.
2999else
bec39cab
AC
3000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3001for as_dir in $PATH
3002do
3003 IFS=$as_save_IFS
3004 test -z "$as_dir" && as_dir=.
81ecdfbb 3005 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3007 ac_cv_prog_CC="${ac_tool_prefix}cc"
3008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3009 break 2
3010 fi
3011done
81ecdfbb
RW
3012 done
3013IFS=$as_save_IFS
3014
3015fi
3016fi
3017CC=$ac_cv_prog_CC
3018if test -n "$CC"; then
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3020$as_echo "$CC" >&6; }
3021else
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3023$as_echo "no" >&6; }
3024fi
3025
3026
3027 fi
3028fi
3029if test -z "$CC"; then
3030 # Extract the first word of "cc", so it can be a program name with args.
3031set dummy cc; ac_word=$2
3032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3033$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3034if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3035 $as_echo_n "(cached) " >&6
3036else
3037 if test -n "$CC"; then
3038 ac_cv_prog_CC="$CC" # Let the user override the test.
3039else
3040 ac_prog_rejected=no
3041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3042for as_dir in $PATH
3043do
3044 IFS=$as_save_IFS
3045 test -z "$as_dir" && as_dir=.
3046 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3047 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3048 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3049 ac_prog_rejected=yes
3050 continue
3051 fi
3052 ac_cv_prog_CC="cc"
3053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3054 break 2
3055 fi
3056done
3057 done
3058IFS=$as_save_IFS
bec39cab 3059
c906108c
SS
3060if test $ac_prog_rejected = yes; then
3061 # We found a bogon in the path, so make sure we never use it.
3062 set dummy $ac_cv_prog_CC
3063 shift
bec39cab 3064 if test $# != 0; then
c906108c
SS
3065 # We chose a different compiler from the bogus one.
3066 # However, it has the same basename, so the bogon will be chosen
3067 # first if we set CC to just the basename; use the full file name.
3068 shift
bec39cab 3069 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3070 fi
3071fi
3072fi
3073fi
bec39cab 3074CC=$ac_cv_prog_CC
c906108c 3075if test -n "$CC"; then
81ecdfbb
RW
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3077$as_echo "$CC" >&6; }
c906108c 3078else
81ecdfbb
RW
3079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3080$as_echo "no" >&6; }
c906108c
SS
3081fi
3082
81ecdfbb 3083
bec39cab
AC
3084fi
3085if test -z "$CC"; then
3086 if test -n "$ac_tool_prefix"; then
81ecdfbb 3087 for ac_prog in cl.exe
bec39cab
AC
3088 do
3089 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3090set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3092$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3093if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3094 $as_echo_n "(cached) " >&6
c906108c
SS
3095else
3096 if test -n "$CC"; then
3097 ac_cv_prog_CC="$CC" # Let the user override the test.
3098else
bec39cab
AC
3099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3100for as_dir in $PATH
3101do
3102 IFS=$as_save_IFS
3103 test -z "$as_dir" && as_dir=.
81ecdfbb 3104 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3106 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3108 break 2
3109 fi
3110done
81ecdfbb
RW
3111 done
3112IFS=$as_save_IFS
bec39cab 3113
c906108c
SS
3114fi
3115fi
bec39cab 3116CC=$ac_cv_prog_CC
c906108c 3117if test -n "$CC"; then
81ecdfbb
RW
3118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3119$as_echo "$CC" >&6; }
c906108c 3120else
81ecdfbb
RW
3121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3122$as_echo "no" >&6; }
c906108c 3123fi
bec39cab 3124
81ecdfbb 3125
bec39cab
AC
3126 test -n "$CC" && break
3127 done
3128fi
3129if test -z "$CC"; then
3130 ac_ct_CC=$CC
81ecdfbb 3131 for ac_prog in cl.exe
bec39cab
AC
3132do
3133 # Extract the first word of "$ac_prog", so it can be a program name with args.
3134set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3136$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3137if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3138 $as_echo_n "(cached) " >&6
bec39cab
AC
3139else
3140 if test -n "$ac_ct_CC"; then
3141 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3142else
3143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3144for as_dir in $PATH
3145do
3146 IFS=$as_save_IFS
3147 test -z "$as_dir" && as_dir=.
81ecdfbb 3148 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3150 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3152 break 2
c906108c 3153 fi
bec39cab 3154done
81ecdfbb
RW
3155 done
3156IFS=$as_save_IFS
bec39cab
AC
3157
3158fi
3159fi
3160ac_ct_CC=$ac_cv_prog_ac_ct_CC
3161if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3163$as_echo "$ac_ct_CC" >&6; }
bec39cab 3164else
81ecdfbb
RW
3165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3166$as_echo "no" >&6; }
c906108c
SS
3167fi
3168
81ecdfbb 3169
bec39cab
AC
3170 test -n "$ac_ct_CC" && break
3171done
c906108c 3172
81ecdfbb
RW
3173 if test "x$ac_ct_CC" = x; then
3174 CC=""
3175 else
3176 case $cross_compiling:$ac_tool_warned in
3177yes:)
3178{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3179$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3180ac_tool_warned=yes ;;
3181esac
3182 CC=$ac_ct_CC
3183 fi
bec39cab
AC
3184fi
3185
3186fi
3187
3188
81ecdfbb
RW
3189test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3191as_fn_error $? "no acceptable C compiler found in \$PATH
3192See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3193
3194# Provide some information about the compiler.
81ecdfbb
RW
3195$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3196set X $ac_compile
3197ac_compiler=$2
3198for ac_option in --version -v -V -qversion; do
3199 { { ac_try="$ac_compiler $ac_option >&5"
3200case "(($ac_try" in
3201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3202 *) ac_try_echo=$ac_try;;
3203esac
3204eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3205$as_echo "$ac_try_echo"; } >&5
3206 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3207 ac_status=$?
81ecdfbb
RW
3208 if test -s conftest.err; then
3209 sed '10a\
3210... rest of stderr output deleted ...
3211 10q' conftest.err >conftest.er1
3212 cat conftest.er1 >&5
81ecdfbb 3213 fi
d0ac1c44 3214 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3215 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3216 test $ac_status = 0; }
3217done
bec39cab 3218
81ecdfbb 3219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3220/* end confdefs.h. */
3221
3222int
3223main ()
3224{
3225
3226 ;
3227 return 0;
3228}
3229_ACEOF
3230ac_clean_files_save=$ac_clean_files
d0ac1c44 3231ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3232# Try to create an executable without -o first, disregard a.out.
3233# It will help us diagnose broken compilers, and finding out an intuition
3234# of exeext.
d0ac1c44
SM
3235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3236$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3237ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3238
3239# The possible output files:
3240ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3241
3242ac_rmfiles=
3243for ac_file in $ac_files
3244do
3245 case $ac_file in
3246 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3247 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3248 esac
3249done
3250rm -f $ac_rmfiles
3251
3252if { { ac_try="$ac_link_default"
3253case "(($ac_try" in
3254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3255 *) ac_try_echo=$ac_try;;
3256esac
3257eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3258$as_echo "$ac_try_echo"; } >&5
3259 (eval "$ac_link_default") 2>&5
3260 ac_status=$?
3261 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3262 test $ac_status = 0; }; then :
3263 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3264# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3265# in a Makefile. We should not override ac_cv_exeext if it was cached,
3266# so that the user can short-circuit this test for compilers unknown to
3267# Autoconf.
3268for ac_file in $ac_files ''
bec39cab
AC
3269do
3270 test -f "$ac_file" || continue
3271 case $ac_file in
81ecdfbb 3272 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3273 ;;
3274 [ab].out )
3275 # We found the default executable, but exeext='' is most
3276 # certainly right.
3277 break;;
3278 *.* )
81ecdfbb
RW
3279 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3280 then :; else
3281 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3282 fi
3283 # We set ac_cv_exeext here because the later test for it is not
3284 # safe: cross compilers may not add the suffix if given an `-o'
3285 # argument, so we may need to know it at that point already.
3286 # Even if this section looks crufty: it has the advantage of
3287 # actually working.
b4e70030
JB
3288 break;;
3289 * )
3290 break;;
bec39cab
AC
3291 esac
3292done
81ecdfbb
RW
3293test "$ac_cv_exeext" = no && ac_cv_exeext=
3294
bec39cab 3295else
81ecdfbb
RW
3296 ac_file=''
3297fi
81ecdfbb 3298if test -z "$ac_file"; then :
d0ac1c44
SM
3299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3300$as_echo "no" >&6; }
3301$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3302sed 's/^/| /' conftest.$ac_ext >&5
3303
81ecdfbb
RW
3304{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3305$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3306as_fn_error 77 "C compiler cannot create executables
3307See \`config.log' for more details" "$LINENO" 5; }
3308else
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3310$as_echo "yes" >&6; }
bec39cab 3311fi
d0ac1c44
SM
3312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3313$as_echo_n "checking for C compiler default output file name... " >&6; }
3314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3315$as_echo "$ac_file" >&6; }
b4e70030 3316ac_exeext=$ac_cv_exeext
b4e70030 3317
d0ac1c44 3318rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3319ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3321$as_echo_n "checking for suffix of executables... " >&6; }
3322if { { ac_try="$ac_link"
3323case "(($ac_try" in
3324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3325 *) ac_try_echo=$ac_try;;
3326esac
3327eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3328$as_echo "$ac_try_echo"; } >&5
3329 (eval "$ac_link") 2>&5
bec39cab 3330 ac_status=$?
81ecdfbb
RW
3331 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3332 test $ac_status = 0; }; then :
b4e70030
JB
3333 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3334# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3335# work properly (i.e., refer to `conftest.exe'), while it won't with
3336# `rm'.
3337for ac_file in conftest.exe conftest conftest.*; do
3338 test -f "$ac_file" || continue
3339 case $ac_file in
81ecdfbb 3340 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3341 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3342 break;;
3343 * ) break;;
3344 esac
3345done
c906108c 3346else
81ecdfbb
RW
3347 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3348$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3349as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3350See \`config.log' for more details" "$LINENO" 5; }
c906108c 3351fi
d0ac1c44 3352rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3354$as_echo "$ac_cv_exeext" >&6; }
c906108c 3355
b4e70030 3356rm -f conftest.$ac_ext
bec39cab
AC
3357EXEEXT=$ac_cv_exeext
3358ac_exeext=$EXEEXT
d0ac1c44
SM
3359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3360/* end confdefs.h. */
3361#include <stdio.h>
3362int
3363main ()
3364{
3365FILE *f = fopen ("conftest.out", "w");
3366 return ferror (f) || fclose (f) != 0;
3367
3368 ;
3369 return 0;
3370}
3371_ACEOF
3372ac_clean_files="$ac_clean_files conftest.out"
3373# Check that the compiler produces executables we can run. If not, either
3374# the compiler is broken, or we cross compile.
3375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3376$as_echo_n "checking whether we are cross compiling... " >&6; }
3377if test "$cross_compiling" != yes; then
3378 { { ac_try="$ac_link"
3379case "(($ac_try" in
3380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3381 *) ac_try_echo=$ac_try;;
3382esac
3383eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3384$as_echo "$ac_try_echo"; } >&5
3385 (eval "$ac_link") 2>&5
3386 ac_status=$?
3387 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3388 test $ac_status = 0; }
3389 if { ac_try='./conftest$ac_cv_exeext'
3390 { { case "(($ac_try" in
3391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3392 *) ac_try_echo=$ac_try;;
3393esac
3394eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3395$as_echo "$ac_try_echo"; } >&5
3396 (eval "$ac_try") 2>&5
3397 ac_status=$?
3398 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3399 test $ac_status = 0; }; }; then
3400 cross_compiling=no
3401 else
3402 if test "$cross_compiling" = maybe; then
3403 cross_compiling=yes
3404 else
3405 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3406$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3407as_fn_error $? "cannot run C compiled programs.
3408If you meant to cross compile, use \`--host'.
3409See \`config.log' for more details" "$LINENO" 5; }
3410 fi
3411 fi
3412fi
3413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3414$as_echo "$cross_compiling" >&6; }
3415
3416rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3417ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3419$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3420if ${ac_cv_objext+:} false; then :
81ecdfbb 3421 $as_echo_n "(cached) " >&6
bec39cab 3422else
81ecdfbb 3423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3424/* end confdefs.h. */
3425
3426int
3427main ()
3428{
3429
3430 ;
3431 return 0;
3432}
3433_ACEOF
3434rm -f conftest.o conftest.obj
81ecdfbb
RW
3435if { { ac_try="$ac_compile"
3436case "(($ac_try" in
3437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3438 *) ac_try_echo=$ac_try;;
3439esac
3440eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3441$as_echo "$ac_try_echo"; } >&5
3442 (eval "$ac_compile") 2>&5
3443 ac_status=$?
3444 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3445 test $ac_status = 0; }; then :
3446 for ac_file in conftest.o conftest.obj conftest.*; do
3447 test -f "$ac_file" || continue;
bec39cab 3448 case $ac_file in
81ecdfbb 3449 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3450 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3451 break;;
3452 esac
3453done
c906108c 3454else
81ecdfbb 3455 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3456sed 's/^/| /' conftest.$ac_ext >&5
3457
81ecdfbb
RW
3458{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3459$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3460as_fn_error $? "cannot compute suffix of object files: cannot compile
3461See \`config.log' for more details" "$LINENO" 5; }
c906108c 3462fi
b4e70030 3463rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3464fi
81ecdfbb
RW
3465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3466$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3467OBJEXT=$ac_cv_objext
3468ac_objext=$OBJEXT
81ecdfbb
RW
3469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3470$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3471if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3472 $as_echo_n "(cached) " >&6
c906108c 3473else
81ecdfbb 3474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3475/* end confdefs.h. */
3476
3477int
3478main ()
3479{
3480#ifndef __GNUC__
3481 choke me
3482#endif
3483
3484 ;
3485 return 0;
3486}
3487_ACEOF
81ecdfbb 3488if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3489 ac_compiler_gnu=yes
3490else
81ecdfbb 3491 ac_compiler_gnu=no
bec39cab 3492fi
81ecdfbb 3493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3494ac_cv_c_compiler_gnu=$ac_compiler_gnu
3495
3496fi
81ecdfbb
RW
3497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3498$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3499if test $ac_compiler_gnu = yes; then
3500 GCC=yes
3501else
3502 GCC=
3503fi
bec39cab
AC
3504ac_test_CFLAGS=${CFLAGS+set}
3505ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3507$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3508if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3509 $as_echo_n "(cached) " >&6
bec39cab 3510else
81ecdfbb
RW
3511 ac_save_c_werror_flag=$ac_c_werror_flag
3512 ac_c_werror_flag=yes
3513 ac_cv_prog_cc_g=no
3514 CFLAGS="-g"
3515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3516/* end confdefs.h. */
3517
3518int
3519main ()
3520{
3521
3522 ;
3523 return 0;
3524}
3525_ACEOF
81ecdfbb 3526if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3527 ac_cv_prog_cc_g=yes
3528else
81ecdfbb
RW
3529 CFLAGS=""
3530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3531/* end confdefs.h. */
3532
3533int
3534main ()
3535{
3536
3537 ;
3538 return 0;
3539}
3540_ACEOF
3541if ac_fn_c_try_compile "$LINENO"; then :
3542
3543else
3544 ac_c_werror_flag=$ac_save_c_werror_flag
3545 CFLAGS="-g"
3546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3547/* end confdefs.h. */
3548
3549int
3550main ()
3551{
c906108c 3552
81ecdfbb
RW
3553 ;
3554 return 0;
3555}
3556_ACEOF
3557if ac_fn_c_try_compile "$LINENO"; then :
3558 ac_cv_prog_cc_g=yes
3559fi
3560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3561fi
3562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3563fi
81ecdfbb
RW
3564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3565 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3566fi
81ecdfbb
RW
3567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3568$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3569if test "$ac_test_CFLAGS" = set; then
bec39cab 3570 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3571elif test $ac_cv_prog_cc_g = yes; then
3572 if test "$GCC" = yes; then
3573 CFLAGS="-g -O2"
3574 else
3575 CFLAGS="-g"
3576 fi
3577else
3578 if test "$GCC" = yes; then
3579 CFLAGS="-O2"
3580 else
3581 CFLAGS=
3582 fi
3583fi
81ecdfbb
RW
3584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3585$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3586if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3587 $as_echo_n "(cached) " >&6
bec39cab 3588else
81ecdfbb 3589 ac_cv_prog_cc_c89=no
bec39cab 3590ac_save_CC=$CC
81ecdfbb 3591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3592/* end confdefs.h. */
c906108c
SS
3593#include <stdarg.h>
3594#include <stdio.h>
d0ac1c44 3595struct stat;
c906108c
SS
3596/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3597struct buf { int x; };
3598FILE * (*rcsopen) (struct buf *, struct stat *, int);
3599static char *e (p, i)
3600 char **p;
3601 int i;
3602{
3603 return p[i];
3604}
3605static char *f (char * (*g) (char **, int), char **p, ...)
3606{
3607 char *s;
3608 va_list v;
3609 va_start (v,p);
3610 s = g (p, va_arg (v,int));
3611 va_end (v);
3612 return s;
3613}
bec39cab
AC
3614
3615/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3616 function prototypes and stuff, but not '\xHH' hex character constants.
3617 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3618 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3619 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3620 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3621 that's true only with -std. */
bec39cab
AC
3622int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3623
81ecdfbb
RW
3624/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3625 inside strings and character constants. */
3626#define FOO(x) 'x'
3627int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3628
c906108c
SS
3629int test (int i, double x);
3630struct s1 {int (*f) (int a);};
3631struct s2 {int (*f) (double a);};
3632int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3633int argc;
3634char **argv;
bec39cab
AC
3635int
3636main ()
3637{
c906108c 3638return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3639 ;
3640 return 0;
3641}
3642_ACEOF
81ecdfbb
RW
3643for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3644 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3645do
3646 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3647 if ac_fn_c_try_compile "$LINENO"; then :
3648 ac_cv_prog_cc_c89=$ac_arg
c906108c 3649fi
81ecdfbb
RW
3650rm -f core conftest.err conftest.$ac_objext
3651 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3652done
81ecdfbb 3653rm -f conftest.$ac_ext
bec39cab 3654CC=$ac_save_CC
c906108c
SS
3655
3656fi
81ecdfbb
RW
3657# AC_CACHE_VAL
3658case "x$ac_cv_prog_cc_c89" in
3659 x)
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3661$as_echo "none needed" >&6; } ;;
3662 xno)
3663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3664$as_echo "unsupported" >&6; } ;;
bec39cab 3665 *)
81ecdfbb
RW
3666 CC="$CC $ac_cv_prog_cc_c89"
3667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3668$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3669esac
81ecdfbb 3670if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3671
b4e70030
JB
3672fi
3673
bec39cab
AC
3674ac_ext=c
3675ac_cpp='$CPP $CPPFLAGS'
3676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3678ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3679
3bc3d82a
PA
3680ac_ext=cpp
3681ac_cpp='$CXXCPP $CPPFLAGS'
3682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3685if test -z "$CXX"; then
3686 if test -n "$CCC"; then
3687 CXX=$CCC
3688 else
3689 if test -n "$ac_tool_prefix"; then
3690 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3691 do
3692 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3693set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3695$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3696if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3697 $as_echo_n "(cached) " >&6
3698else
3699 if test -n "$CXX"; then
3700 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3701else
3702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3703for as_dir in $PATH
3704do
3705 IFS=$as_save_IFS
3706 test -z "$as_dir" && as_dir=.
3707 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3709 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3711 break 2
3712 fi
3713done
3714 done
3715IFS=$as_save_IFS
3716
3717fi
3718fi
3719CXX=$ac_cv_prog_CXX
3720if test -n "$CXX"; then
3721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3722$as_echo "$CXX" >&6; }
3723else
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3725$as_echo "no" >&6; }
3726fi
3727
3728
3729 test -n "$CXX" && break
3730 done
3731fi
3732if test -z "$CXX"; then
3733 ac_ct_CXX=$CXX
3734 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3735do
3736 # Extract the first word of "$ac_prog", so it can be a program name with args.
3737set dummy $ac_prog; ac_word=$2
3738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3739$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3740if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3741 $as_echo_n "(cached) " >&6
3742else
3743 if test -n "$ac_ct_CXX"; then
3744 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3745else
3746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3747for as_dir in $PATH
3748do
3749 IFS=$as_save_IFS
3750 test -z "$as_dir" && as_dir=.
3751 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3753 ac_cv_prog_ac_ct_CXX="$ac_prog"
3754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3755 break 2
3756 fi
3757done
3758 done
3759IFS=$as_save_IFS
3760
3761fi
3762fi
3763ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3764if test -n "$ac_ct_CXX"; then
3765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3766$as_echo "$ac_ct_CXX" >&6; }
3767else
3768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3769$as_echo "no" >&6; }
3770fi
3771
3772
3773 test -n "$ac_ct_CXX" && break
3774done
3775
3776 if test "x$ac_ct_CXX" = x; then
3777 CXX="g++"
3778 else
3779 case $cross_compiling:$ac_tool_warned in
3780yes:)
3781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3783ac_tool_warned=yes ;;
3784esac
3785 CXX=$ac_ct_CXX
3786 fi
3787fi
3788
3789 fi
3790fi
3791# Provide some information about the compiler.
3792$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3793set X $ac_compile
3794ac_compiler=$2
3795for ac_option in --version -v -V -qversion; do
3796 { { ac_try="$ac_compiler $ac_option >&5"
3797case "(($ac_try" in
3798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3799 *) ac_try_echo=$ac_try;;
3800esac
3801eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3802$as_echo "$ac_try_echo"; } >&5
3803 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3804 ac_status=$?
3805 if test -s conftest.err; then
3806 sed '10a\
3807... rest of stderr output deleted ...
3808 10q' conftest.err >conftest.er1
3809 cat conftest.er1 >&5
3bc3d82a 3810 fi
d0ac1c44 3811 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3812 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3813 test $ac_status = 0; }
3814done
3815
3816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3817$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3818if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3819 $as_echo_n "(cached) " >&6
3820else
3821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3822/* end confdefs.h. */
3823
3824int
3825main ()
3826{
3827#ifndef __GNUC__
3828 choke me
3829#endif
3830
3831 ;
3832 return 0;
3833}
3834_ACEOF
3835if ac_fn_cxx_try_compile "$LINENO"; then :
3836 ac_compiler_gnu=yes
3837else
3838 ac_compiler_gnu=no
3839fi
3840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3841ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3842
3843fi
3844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3845$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3846if test $ac_compiler_gnu = yes; then
3847 GXX=yes
3848else
3849 GXX=
3850fi
3851ac_test_CXXFLAGS=${CXXFLAGS+set}
3852ac_save_CXXFLAGS=$CXXFLAGS
3853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3854$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3855if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3856 $as_echo_n "(cached) " >&6
3857else
3858 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3859 ac_cxx_werror_flag=yes
3860 ac_cv_prog_cxx_g=no
3861 CXXFLAGS="-g"
3862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3863/* end confdefs.h. */
3864
3865int
3866main ()
3867{
3868
3869 ;
3870 return 0;
3871}
3872_ACEOF
3873if ac_fn_cxx_try_compile "$LINENO"; then :
3874 ac_cv_prog_cxx_g=yes
3875else
3876 CXXFLAGS=""
3877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3878/* end confdefs.h. */
3879
3880int
3881main ()
3882{
3883
3884 ;
3885 return 0;
3886}
3887_ACEOF
3888if ac_fn_cxx_try_compile "$LINENO"; then :
3889
3890else
3891 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3892 CXXFLAGS="-g"
3893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3894/* end confdefs.h. */
3895
3896int
3897main ()
3898{
3899
3900 ;
3901 return 0;
3902}
3903_ACEOF
3904if ac_fn_cxx_try_compile "$LINENO"; then :
3905 ac_cv_prog_cxx_g=yes
3906fi
3907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3908fi
3909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3910fi
3911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3912 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3913fi
3914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3915$as_echo "$ac_cv_prog_cxx_g" >&6; }
3916if test "$ac_test_CXXFLAGS" = set; then
3917 CXXFLAGS=$ac_save_CXXFLAGS
3918elif test $ac_cv_prog_cxx_g = yes; then
3919 if test "$GXX" = yes; then
3920 CXXFLAGS="-g -O2"
3921 else
3922 CXXFLAGS="-g"
3923 fi
3924else
3925 if test "$GXX" = yes; then
3926 CXXFLAGS="-O2"
3927 else
3928 CXXFLAGS=
3929 fi
3930fi
3931ac_ext=c
3932ac_cpp='$CPP $CPPFLAGS'
3933ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3934ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3935ac_compiler_gnu=$ac_cv_c_compiler_gnu
3936
3937
60ca704f 3938
bec39cab
AC
3939ac_ext=c
3940ac_cpp='$CPP $CPPFLAGS'
3941ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3942ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3943ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3945$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3946# On Suns, sometimes $CPP names a directory.
3947if test -n "$CPP" && test -d "$CPP"; then
3948 CPP=
8bb2c122 3949fi
bec39cab 3950if test -z "$CPP"; then
d0ac1c44 3951 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 3952 $as_echo_n "(cached) " >&6
bec39cab
AC
3953else
3954 # Double quotes because CPP needs to be expanded
3955 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3956 do
3957 ac_preproc_ok=false
3958for ac_c_preproc_warn_flag in '' yes
3959do
3960 # Use a header file that comes with gcc, so configuring glibc
3961 # with a fresh cross-compiler works.
3962 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3963 # <limits.h> exists even on freestanding compilers.
3964 # On the NeXT, cc -E runs the code through the compiler's parser,
3965 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3967/* end confdefs.h. */
3968#ifdef __STDC__
3969# include <limits.h>
3970#else
3971# include <assert.h>
3972#endif
3973 Syntax error
3974_ACEOF
81ecdfbb 3975if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3976
81ecdfbb 3977else
bec39cab
AC
3978 # Broken: fails on valid input.
3979continue
3980fi
d0ac1c44 3981rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3982
81ecdfbb 3983 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3984 # can be detected and how.
81ecdfbb 3985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3986/* end confdefs.h. */
3987#include <ac_nonexistent.h>
3988_ACEOF
81ecdfbb 3989if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3990 # Broken: success on invalid input.
3991continue
8bb2c122 3992else
bec39cab
AC
3993 # Passes both tests.
3994ac_preproc_ok=:
3995break
8bb2c122 3996fi
d0ac1c44 3997rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 3998
bec39cab
AC
3999done
4000# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4001rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4002if $ac_preproc_ok; then :
bec39cab
AC
4003 break
4004fi
8bb2c122 4005
bec39cab
AC
4006 done
4007 ac_cv_prog_CPP=$CPP
ddc9cd0f 4008
c906108c 4009fi
bec39cab
AC
4010 CPP=$ac_cv_prog_CPP
4011else
4012 ac_cv_prog_CPP=$CPP
c906108c 4013fi
81ecdfbb
RW
4014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4015$as_echo "$CPP" >&6; }
bec39cab
AC
4016ac_preproc_ok=false
4017for ac_c_preproc_warn_flag in '' yes
4018do
4019 # Use a header file that comes with gcc, so configuring glibc
4020 # with a fresh cross-compiler works.
4021 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4022 # <limits.h> exists even on freestanding compilers.
4023 # On the NeXT, cc -E runs the code through the compiler's parser,
4024 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4026/* end confdefs.h. */
4027#ifdef __STDC__
4028# include <limits.h>
4029#else
4030# include <assert.h>
4031#endif
4032 Syntax error
4033_ACEOF
81ecdfbb 4034if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4035
81ecdfbb 4036else
bec39cab
AC
4037 # Broken: fails on valid input.
4038continue
4039fi
d0ac1c44 4040rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4041
81ecdfbb 4042 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4043 # can be detected and how.
81ecdfbb 4044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4045/* end confdefs.h. */
4046#include <ac_nonexistent.h>
4047_ACEOF
81ecdfbb 4048if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4049 # Broken: success on invalid input.
4050continue
c906108c 4051else
bec39cab
AC
4052 # Passes both tests.
4053ac_preproc_ok=:
4054break
c906108c 4055fi
d0ac1c44 4056rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4057
bec39cab
AC
4058done
4059# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4060rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4061if $ac_preproc_ok; then :
4062
c906108c 4063else
81ecdfbb
RW
4064 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4065$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4066as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4067See \`config.log' for more details" "$LINENO" 5; }
c906108c 4068fi
c906108c 4069
bec39cab
AC
4070ac_ext=c
4071ac_cpp='$CPP $CPPFLAGS'
4072ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4073ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4074ac_compiler_gnu=$ac_cv_c_compiler_gnu
4075
4076
81ecdfbb
RW
4077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4078$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4079if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4080 $as_echo_n "(cached) " >&6
4e8d927d 4081else
81ecdfbb
RW
4082 if test -z "$GREP"; then
4083 ac_path_GREP_found=false
4084 # Loop through the user's path and test for each of PROGNAME-LIST
4085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4086for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4087do
4088 IFS=$as_save_IFS
4089 test -z "$as_dir" && as_dir=.
4090 for ac_prog in grep ggrep; do
4091 for ac_exec_ext in '' $ac_executable_extensions; do
4092 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4093 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4094# Check for GNU ac_path_GREP and select it if it is found.
4095 # Check for GNU $ac_path_GREP
4096case `"$ac_path_GREP" --version 2>&1` in
4097*GNU*)
4098 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4099*)
4100 ac_count=0
4101 $as_echo_n 0123456789 >"conftest.in"
4102 while :
4103 do
4104 cat "conftest.in" "conftest.in" >"conftest.tmp"
4105 mv "conftest.tmp" "conftest.in"
4106 cp "conftest.in" "conftest.nl"
4107 $as_echo 'GREP' >> "conftest.nl"
4108 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4109 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4110 as_fn_arith $ac_count + 1 && ac_count=$as_val
4111 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4112 # Best one so far, save it but keep looking for a better one
4113 ac_cv_path_GREP="$ac_path_GREP"
4114 ac_path_GREP_max=$ac_count
bec39cab 4115 fi
81ecdfbb
RW
4116 # 10*(2^10) chars as input seems more than enough
4117 test $ac_count -gt 10 && break
4118 done
4119 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4120esac
bec39cab 4121
81ecdfbb
RW
4122 $ac_path_GREP_found && break 3
4123 done
4124 done
4125 done
4126IFS=$as_save_IFS
4127 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4128 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4129 fi
c906108c 4130else
81ecdfbb 4131 ac_cv_path_GREP=$GREP
c906108c 4132fi
c906108c 4133
81ecdfbb
RW
4134fi
4135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4136$as_echo "$ac_cv_path_GREP" >&6; }
4137 GREP="$ac_cv_path_GREP"
c906108c 4138
c906108c 4139
81ecdfbb
RW
4140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4141$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4142if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4143 $as_echo_n "(cached) " >&6
783e057b 4144else
81ecdfbb
RW
4145 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4146 then ac_cv_path_EGREP="$GREP -E"
4147 else
4148 if test -z "$EGREP"; then
4149 ac_path_EGREP_found=false
4150 # Loop through the user's path and test for each of PROGNAME-LIST
4151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4152for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4153do
4154 IFS=$as_save_IFS
4155 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4156 for ac_prog in egrep; do
4157 for ac_exec_ext in '' $ac_executable_extensions; do
4158 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4159 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4160# Check for GNU ac_path_EGREP and select it if it is found.
4161 # Check for GNU $ac_path_EGREP
4162case `"$ac_path_EGREP" --version 2>&1` in
4163*GNU*)
4164 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4165*)
4166 ac_count=0
4167 $as_echo_n 0123456789 >"conftest.in"
4168 while :
4169 do
4170 cat "conftest.in" "conftest.in" >"conftest.tmp"
4171 mv "conftest.tmp" "conftest.in"
4172 cp "conftest.in" "conftest.nl"
4173 $as_echo 'EGREP' >> "conftest.nl"
4174 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4175 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4176 as_fn_arith $ac_count + 1 && ac_count=$as_val
4177 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4178 # Best one so far, save it but keep looking for a better one
4179 ac_cv_path_EGREP="$ac_path_EGREP"
4180 ac_path_EGREP_max=$ac_count
4181 fi
4182 # 10*(2^10) chars as input seems more than enough
4183 test $ac_count -gt 10 && break
4184 done
4185 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4186esac
bec39cab 4187
81ecdfbb
RW
4188 $ac_path_EGREP_found && break 3
4189 done
4190 done
4191 done
4192IFS=$as_save_IFS
4193 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4194 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4195 fi
783e057b 4196else
81ecdfbb 4197 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4198fi
4199
81ecdfbb 4200 fi
783e057b 4201fi
81ecdfbb
RW
4202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4203$as_echo "$ac_cv_path_EGREP" >&6; }
4204 EGREP="$ac_cv_path_EGREP"
4205
783e057b 4206
81ecdfbb
RW
4207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4208$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4209if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4210 $as_echo_n "(cached) " >&6
783e057b 4211else
81ecdfbb 4212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4213/* end confdefs.h. */
783e057b 4214#include <stdlib.h>
bec39cab 4215#include <stdarg.h>
783e057b
DJ
4216#include <string.h>
4217#include <float.h>
c906108c 4218
bec39cab
AC
4219int
4220main ()
4221{
c906108c 4222
bec39cab
AC
4223 ;
4224 return 0;
4225}
4226_ACEOF
81ecdfbb 4227if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4228 ac_cv_header_stdc=yes
c906108c 4229else
81ecdfbb 4230 ac_cv_header_stdc=no
c906108c 4231fi
81ecdfbb 4232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4233
783e057b
DJ
4234if test $ac_cv_header_stdc = yes; then
4235 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4237/* end confdefs.h. */
4238#include <string.h>
c906108c 4239
783e057b
DJ
4240_ACEOF
4241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4242 $EGREP "memchr" >/dev/null 2>&1; then :
4243
c906108c 4244else
783e057b 4245 ac_cv_header_stdc=no
c906108c 4246fi
783e057b 4247rm -f conftest*
c906108c
SS
4248
4249fi
4250
783e057b
DJ
4251if test $ac_cv_header_stdc = yes; then
4252 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4254/* end confdefs.h. */
4255#include <stdlib.h>
bec39cab 4256
783e057b
DJ
4257_ACEOF
4258if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4259 $EGREP "free" >/dev/null 2>&1; then :
4260
bec39cab 4261else
783e057b 4262 ac_cv_header_stdc=no
bec39cab 4263fi
783e057b 4264rm -f conftest*
bec39cab
AC
4265
4266fi
bec39cab 4267
783e057b
DJ
4268if test $ac_cv_header_stdc = yes; then
4269 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4270 if test "$cross_compiling" = yes; then :
783e057b 4271 :
bec39cab 4272else
81ecdfbb 4273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4274/* end confdefs.h. */
4275#include <ctype.h>
81ecdfbb 4276#include <stdlib.h>
783e057b
DJ
4277#if ((' ' & 0x0FF) == 0x020)
4278# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4279# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4280#else
4281# define ISLOWER(c) \
4282 (('a' <= (c) && (c) <= 'i') \
4283 || ('j' <= (c) && (c) <= 'r') \
4284 || ('s' <= (c) && (c) <= 'z'))
4285# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4286#endif
4287
4288#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4289int
4290main ()
4291{
4292 int i;
4293 for (i = 0; i < 256; i++)
4294 if (XOR (islower (i), ISLOWER (i))
4295 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4296 return 2;
4297 return 0;
783e057b
DJ
4298}
4299_ACEOF
81ecdfbb 4300if ac_fn_c_try_run "$LINENO"; then :
783e057b 4301
81ecdfbb
RW
4302else
4303 ac_cv_header_stdc=no
783e057b 4304fi
81ecdfbb
RW
4305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4306 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4307fi
81ecdfbb 4308
783e057b
DJ
4309fi
4310fi
81ecdfbb
RW
4311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4312$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4313if test $ac_cv_header_stdc = yes; then
4314
81ecdfbb 4315$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4316
4317fi
4318
4319# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4320for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4321 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4322do :
4323 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4324ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4325"
d0ac1c44 4326if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4327 cat >>confdefs.h <<_ACEOF
81ecdfbb 4328#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4329_ACEOF
4330
4331fi
4332
4333done
4334
4335
4336
81ecdfbb 4337 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4338if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4339 MINIX=yes
4340else
4341 MINIX=
4342fi
4343
4344
4345 if test "$MINIX" = yes; then
4346
81ecdfbb 4347$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4348
4349
81ecdfbb 4350$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4351
4352
81ecdfbb 4353$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4354
4355 fi
4356
4357
81ecdfbb
RW
4358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4359$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4360if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4361 $as_echo_n "(cached) " >&6
783e057b 4362else
81ecdfbb 4363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4364/* end confdefs.h. */
4365
d0ac1c44
SM
4366# define __EXTENSIONS__ 1
4367 $ac_includes_default
783e057b
DJ
4368int
4369main ()
4370{
4371
4372 ;
4373 return 0;
4374}
4375_ACEOF
81ecdfbb 4376if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4377 ac_cv_safe_to_define___extensions__=yes
4378else
81ecdfbb 4379 ac_cv_safe_to_define___extensions__=no
783e057b 4380fi
81ecdfbb 4381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4382fi
81ecdfbb
RW
4383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4384$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4385 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4386 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4387
81ecdfbb 4388 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4389
81ecdfbb 4390 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4391
81ecdfbb 4392 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4393
81ecdfbb 4394 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4395
4396
c971b7fa
PA
4397ac_aux_dir=
4398for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4399 if test -f "$ac_dir/install-sh"; then
4400 ac_aux_dir=$ac_dir
4401 ac_install_sh="$ac_aux_dir/install-sh -c"
4402 break
4403 elif test -f "$ac_dir/install.sh"; then
4404 ac_aux_dir=$ac_dir
4405 ac_install_sh="$ac_aux_dir/install.sh -c"
4406 break
4407 elif test -f "$ac_dir/shtool"; then
4408 ac_aux_dir=$ac_dir
4409 ac_install_sh="$ac_aux_dir/shtool install -c"
4410 break
4411 fi
c971b7fa
PA
4412done
4413if test -z "$ac_aux_dir"; then
d0ac1c44 4414 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4415fi
770d76d7 4416
c971b7fa
PA
4417# These three variables are undocumented and unsupported,
4418# and are intended to be withdrawn in a future Autoconf release.
4419# They can cause serious problems if a builder's source tree is in a directory
4420# whose full name contains unusual characters.
4421ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4422ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4423ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4424
770d76d7 4425
c971b7fa
PA
4426# Make sure we can run config.sub.
4427$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4428 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4429
c971b7fa
PA
4430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4431$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4432if ${ac_cv_build+:} false; then :
c971b7fa 4433 $as_echo_n "(cached) " >&6
770d76d7 4434else
c971b7fa
PA
4435 ac_build_alias=$build_alias
4436test "x$ac_build_alias" = x &&
4437 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4438test "x$ac_build_alias" = x &&
d0ac1c44 4439 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4440ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4441 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4442
770d76d7 4443fi
c971b7fa
PA
4444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4445$as_echo "$ac_cv_build" >&6; }
4446case $ac_cv_build in
4447*-*-*) ;;
d0ac1c44 4448*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4449esac
c971b7fa
PA
4450build=$ac_cv_build
4451ac_save_IFS=$IFS; IFS='-'
4452set x $ac_cv_build
4453shift
4454build_cpu=$1
4455build_vendor=$2
4456shift; shift
4457# Remember, the first character of IFS is used to create $*,
4458# except with old shells:
4459build_os=$*
4460IFS=$ac_save_IFS
4461case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4462
4463
c971b7fa
PA
4464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4465$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4466if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4467 $as_echo_n "(cached) " >&6
4468else
c971b7fa
PA
4469 if test "x$host_alias" = x; then
4470 ac_cv_host=$ac_cv_build
81ecdfbb 4471else
c971b7fa 4472 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4473 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4474fi
81ecdfbb
RW
4475
4476fi
c971b7fa
PA
4477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4478$as_echo "$ac_cv_host" >&6; }
4479case $ac_cv_host in
4480*-*-*) ;;
d0ac1c44 4481*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4482esac
c971b7fa
PA
4483host=$ac_cv_host
4484ac_save_IFS=$IFS; IFS='-'
4485set x $ac_cv_host
4486shift
4487host_cpu=$1
4488host_vendor=$2
4489shift; shift
4490# Remember, the first character of IFS is used to create $*,
4491# except with old shells:
4492host_os=$*
4493IFS=$ac_save_IFS
4494case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4495
4496
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4498$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4499if ${ac_cv_target+:} false; then :
3388710e
JM
4500 $as_echo_n "(cached) " >&6
4501else
4502 if test "x$target_alias" = x; then
4503 ac_cv_target=$ac_cv_host
4504else
4505 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4506 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4507fi
4508
4509fi
4510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4511$as_echo "$ac_cv_target" >&6; }
4512case $ac_cv_target in
4513*-*-*) ;;
d0ac1c44 4514*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4515esac
4516target=$ac_cv_target
4517ac_save_IFS=$IFS; IFS='-'
4518set x $ac_cv_target
4519shift
4520target_cpu=$1
4521target_vendor=$2
4522shift; shift
4523# Remember, the first character of IFS is used to create $*,
4524# except with old shells:
4525target_os=$*
4526IFS=$ac_save_IFS
4527case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4528
4529
4530# The aliases save the names the user supplied, while $host etc.
4531# will get canonicalized.
4532test -n "$target_alias" &&
4533 test "$program_prefix$program_suffix$program_transform_name" = \
4534 NONENONEs,x,x, &&
4535 program_prefix=${target_alias}-
4536
4537# The tests for host and target for $enable_largefile require
4538# canonical names.
4539
4540
81ecdfbb 4541
da2f07f1
JK
4542# As the $enable_largefile decision depends on --enable-plugins we must set it
4543# even in directories otherwise not depending on the $plugins option.
4544
4545
2974be62
AM
4546 maybe_plugins=no
4547 for ac_header in dlfcn.h
4548do :
4549 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4550"
d0ac1c44 4551if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4552 cat >>confdefs.h <<_ACEOF
4553#define HAVE_DLFCN_H 1
4554_ACEOF
4555 maybe_plugins=yes
4556fi
4557
4558done
4559
4560 for ac_header in windows.h
4561do :
4562 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4563"
d0ac1c44 4564if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4565 cat >>confdefs.h <<_ACEOF
4566#define HAVE_WINDOWS_H 1
4567_ACEOF
4568 maybe_plugins=yes
4569fi
4570
4571done
4572
4573
4574 # Check whether --enable-plugins was given.
da2f07f1
JK
4575if test "${enable_plugins+set}" = set; then :
4576 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4577 no) plugins=no ;;
4578 *) plugins=yes
4579 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4580 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4581 fi ;;
4582 esac
da2f07f1 4583else
2974be62
AM
4584 plugins=$maybe_plugins
4585
da2f07f1
JK
4586fi
4587
2974be62 4588 if test "$plugins" = "yes"; then
458412c3
TT
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4590$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4591if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4592 $as_echo_n "(cached) " >&6
4593else
4594 ac_func_search_save_LIBS=$LIBS
4595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596/* end confdefs.h. */
4597
4598/* Override any GCC internal prototype to avoid an error.
4599 Use char because int might match the return type of a GCC
4600 builtin and then its argument prototype would still apply. */
4601#ifdef __cplusplus
4602extern "C"
4603#endif
458412c3 4604char dlsym ();
2974be62
AM
4605int
4606main ()
4607{
458412c3 4608return dlsym ();
2974be62
AM
4609 ;
4610 return 0;
4611}
4612_ACEOF
4613for ac_lib in '' dl; do
4614 if test -z "$ac_lib"; then
4615 ac_res="none required"
4616 else
4617 ac_res=-l$ac_lib
4618 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4619 fi
4620 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4621 ac_cv_search_dlsym=$ac_res
2974be62
AM
4622fi
4623rm -f core conftest.err conftest.$ac_objext \
4624 conftest$ac_exeext
d0ac1c44 4625 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4626 break
4627fi
4628done
d0ac1c44 4629if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4630
4631else
458412c3 4632 ac_cv_search_dlsym=no
2974be62
AM
4633fi
4634rm conftest.$ac_ext
4635LIBS=$ac_func_search_save_LIBS
4636fi
458412c3
TT
4637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4638$as_echo "$ac_cv_search_dlsym" >&6; }
4639ac_res=$ac_cv_search_dlsym
2974be62
AM
4640if test "$ac_res" != no; then :
4641 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4642
4643fi
4644
4645 fi
da2f07f1
JK
4646
4647
4648case "${host}" in
4649 sparc-*-solaris*|i[3-7]86-*-solaris*)
4650 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4651 # are mutually exclusive; and without procfs support, the bfd/ elf module
4652 # cannot provide certain routines such as elfcore_write_prpsinfo
4653 # or elfcore_write_prstatus. So unless the user explicitly requested
4654 # large-file support through the --enable-largefile switch, disable
4655 # large-file support in favor of procfs support.
4656 test "${target}" = "${host}" -a "x$plugins" = xno \
4657 && : ${enable_largefile="no"}
4658 ;;
4659esac
4660
4661# Check whether --enable-largefile was given.
4662if test "${enable_largefile+set}" = set; then :
4663 enableval=$enable_largefile;
4664fi
4665
4666if test "$enable_largefile" != no; then
4667
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4669$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4670if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4671 $as_echo_n "(cached) " >&6
4672else
4673 ac_cv_sys_largefile_CC=no
4674 if test "$GCC" != yes; then
4675 ac_save_CC=$CC
4676 while :; do
4677 # IRIX 6.2 and later do not support large files by default,
4678 # so use the C compiler's -n32 option if that helps.
4679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4680/* end confdefs.h. */
4681#include <sys/types.h>
4682 /* Check that off_t can represent 2**63 - 1 correctly.
4683 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4684 since some C++ compilers masquerading as C compilers
4685 incorrectly reject 9223372036854775807. */
4686#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4687 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4688 && LARGE_OFF_T % 2147483647 == 1)
4689 ? 1 : -1];
4690int
4691main ()
4692{
4693
4694 ;
4695 return 0;
4696}
4697_ACEOF
4698 if ac_fn_c_try_compile "$LINENO"; then :
4699 break
4700fi
4701rm -f core conftest.err conftest.$ac_objext
4702 CC="$CC -n32"
4703 if ac_fn_c_try_compile "$LINENO"; then :
4704 ac_cv_sys_largefile_CC=' -n32'; break
4705fi
4706rm -f core conftest.err conftest.$ac_objext
4707 break
4708 done
4709 CC=$ac_save_CC
4710 rm -f conftest.$ac_ext
4711 fi
4712fi
4713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4714$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4715 if test "$ac_cv_sys_largefile_CC" != no; then
4716 CC=$CC$ac_cv_sys_largefile_CC
4717 fi
4718
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4720$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4721if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4722 $as_echo_n "(cached) " >&6
4723else
4724 while :; do
4725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4726/* end confdefs.h. */
4727#include <sys/types.h>
4728 /* Check that off_t can represent 2**63 - 1 correctly.
4729 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4730 since some C++ compilers masquerading as C compilers
4731 incorrectly reject 9223372036854775807. */
4732#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4733 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4734 && LARGE_OFF_T % 2147483647 == 1)
4735 ? 1 : -1];
4736int
4737main ()
4738{
4739
4740 ;
4741 return 0;
4742}
4743_ACEOF
4744if ac_fn_c_try_compile "$LINENO"; then :
4745 ac_cv_sys_file_offset_bits=no; break
4746fi
4747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4749/* end confdefs.h. */
4750#define _FILE_OFFSET_BITS 64
4751#include <sys/types.h>
4752 /* Check that off_t can represent 2**63 - 1 correctly.
4753 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4754 since some C++ compilers masquerading as C compilers
4755 incorrectly reject 9223372036854775807. */
4756#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4757 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4758 && LARGE_OFF_T % 2147483647 == 1)
4759 ? 1 : -1];
4760int
4761main ()
4762{
4763
4764 ;
4765 return 0;
4766}
4767_ACEOF
4768if ac_fn_c_try_compile "$LINENO"; then :
4769 ac_cv_sys_file_offset_bits=64; break
4770fi
4771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4772 ac_cv_sys_file_offset_bits=unknown
4773 break
4774done
4775fi
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4777$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4778case $ac_cv_sys_file_offset_bits in #(
4779 no | unknown) ;;
4780 *)
4781cat >>confdefs.h <<_ACEOF
4782#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4783_ACEOF
4784;;
4785esac
4786rm -rf conftest*
4787 if test $ac_cv_sys_file_offset_bits = unknown; then
4788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4789$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4790if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4791 $as_echo_n "(cached) " >&6
4792else
4793 while :; do
4794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4795/* end confdefs.h. */
4796#include <sys/types.h>
4797 /* Check that off_t can represent 2**63 - 1 correctly.
4798 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4799 since some C++ compilers masquerading as C compilers
4800 incorrectly reject 9223372036854775807. */
4801#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4802 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4803 && LARGE_OFF_T % 2147483647 == 1)
4804 ? 1 : -1];
4805int
4806main ()
4807{
4808
4809 ;
4810 return 0;
4811}
4812_ACEOF
4813if ac_fn_c_try_compile "$LINENO"; then :
4814 ac_cv_sys_large_files=no; break
4815fi
4816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4818/* end confdefs.h. */
4819#define _LARGE_FILES 1
4820#include <sys/types.h>
4821 /* Check that off_t can represent 2**63 - 1 correctly.
4822 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4823 since some C++ compilers masquerading as C compilers
4824 incorrectly reject 9223372036854775807. */
4825#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4826 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4827 && LARGE_OFF_T % 2147483647 == 1)
4828 ? 1 : -1];
4829int
4830main ()
4831{
4832
4833 ;
4834 return 0;
4835}
4836_ACEOF
4837if ac_fn_c_try_compile "$LINENO"; then :
4838 ac_cv_sys_large_files=1; break
4839fi
4840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4841 ac_cv_sys_large_files=unknown
4842 break
4843done
4844fi
4845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4846$as_echo "$ac_cv_sys_large_files" >&6; }
4847case $ac_cv_sys_large_files in #(
4848 no | unknown) ;;
4849 *)
4850cat >>confdefs.h <<_ACEOF
4851#define _LARGE_FILES $ac_cv_sys_large_files
4852_ACEOF
4853;;
4854esac
4855rm -rf conftest*
4856 fi
d0ac1c44
SM
4857
4858
da2f07f1
JK
4859fi
4860
4861
4862
81ecdfbb
RW
4863
4864
4865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4866$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4867if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4868 $as_echo_n "(cached) " >&6
4869else
4870 am_cv_prog_cc_stdc=no
4871ac_save_CC="$CC"
4872# Don't try gcc -ansi; that turns off useful extensions and
4873# breaks some systems' header files.
4874# AIX -qlanglvl=ansi
4875# Ultrix and OSF/1 -std1
4876# HP-UX 10.20 and later -Ae
4877# HP-UX older versions -Aa -D_HPUX_SOURCE
4878# SVR4 -Xc -D__EXTENSIONS__
4879for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4880do
783e057b 4881 CC="$ac_save_CC $ac_arg"
81ecdfbb 4882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4883/* end confdefs.h. */
4884#include <stdarg.h>
4885#include <stdio.h>
4886#include <sys/types.h>
4887#include <sys/stat.h>
4888/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4889struct buf { int x; };
4890FILE * (*rcsopen) (struct buf *, struct stat *, int);
4891static char *e (p, i)
4892 char **p;
4893 int i;
4894{
4895 return p[i];
4896}
4897static char *f (char * (*g) (char **, int), char **p, ...)
4898{
4899 char *s;
4900 va_list v;
4901 va_start (v,p);
4902 s = g (p, va_arg (v,int));
4903 va_end (v);
4904 return s;
4905}
4906int test (int i, double x);
4907struct s1 {int (*f) (int a);};
4908struct s2 {int (*f) (double a);};
4909int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4910int argc;
4911char **argv;
4912
4913int
4914main ()
4915{
4916
4917return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4918
4919 ;
4920 return 0;
4921}
4922_ACEOF
81ecdfbb 4923if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4924 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4925fi
81ecdfbb 4926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4927done
4928CC="$ac_save_CC"
4929
4930fi
4931
4932if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4934$as_echo "none needed" >&6; }
783e057b 4935else
81ecdfbb
RW
4936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4937$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4938fi
4939case "x$am_cv_prog_cc_stdc" in
4940 x|xno) ;;
4941 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4942esac
4943
d0ac1c44
SM
4944# Expand $ac_aux_dir to an absolute path.
4945am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 4946
d0ac1c44 4947if test x"${install_sh+set}" != xset; then
4869db5e
RM
4948 case $am_aux_dir in
4949 *\ * | *\ *)
4950 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4951 *)
4952 install_sh="\${SHELL} $am_aux_dir/install-sh"
4953 esac
4954fi
4955
d0ac1c44
SM
4956# Installed binaries are usually stripped using 'strip' when the user
4957# run "make install-strip". However 'strip' might not be the right
4869db5e 4958# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 4959# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
4960if test "$cross_compiling" != no; then
4961 if test -n "$ac_tool_prefix"; then
4962 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4963set dummy ${ac_tool_prefix}strip; ac_word=$2
4964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4966if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
4967 $as_echo_n "(cached) " >&6
4968else
4969 if test -n "$STRIP"; then
4970 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4971else
4972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973for as_dir in $PATH
4974do
4975 IFS=$as_save_IFS
4976 test -z "$as_dir" && as_dir=.
4977 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4979 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4981 break 2
4982 fi
4983done
4984 done
4985IFS=$as_save_IFS
4986
4987fi
4988fi
4989STRIP=$ac_cv_prog_STRIP
4990if test -n "$STRIP"; then
4991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4992$as_echo "$STRIP" >&6; }
4993else
4994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995$as_echo "no" >&6; }
4996fi
4997
4998
4999fi
5000if test -z "$ac_cv_prog_STRIP"; then
5001 ac_ct_STRIP=$STRIP
5002 # Extract the first word of "strip", so it can be a program name with args.
5003set dummy strip; ac_word=$2
5004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5006if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5007 $as_echo_n "(cached) " >&6
5008else
5009 if test -n "$ac_ct_STRIP"; then
5010 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5011else
5012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in $PATH
5014do
5015 IFS=$as_save_IFS
5016 test -z "$as_dir" && as_dir=.
5017 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5018 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5019 ac_cv_prog_ac_ct_STRIP="strip"
5020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021 break 2
5022 fi
5023done
5024 done
5025IFS=$as_save_IFS
5026
5027fi
5028fi
5029ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5030if test -n "$ac_ct_STRIP"; then
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5032$as_echo "$ac_ct_STRIP" >&6; }
5033else
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038 if test "x$ac_ct_STRIP" = x; then
5039 STRIP=":"
5040 else
5041 case $cross_compiling:$ac_tool_warned in
5042yes:)
5043{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5044$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5045ac_tool_warned=yes ;;
5046esac
5047 STRIP=$ac_ct_STRIP
5048 fi
5049else
5050 STRIP="$ac_cv_prog_STRIP"
5051fi
5052
5053fi
5054INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5055
783e057b
DJ
5056
5057ac_aux_dir=
81ecdfbb 5058for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5059 if test -f "$ac_dir/install-sh"; then
5060 ac_aux_dir=$ac_dir
5061 ac_install_sh="$ac_aux_dir/install-sh -c"
5062 break
5063 elif test -f "$ac_dir/install.sh"; then
5064 ac_aux_dir=$ac_dir
5065 ac_install_sh="$ac_aux_dir/install.sh -c"
5066 break
5067 elif test -f "$ac_dir/shtool"; then
5068 ac_aux_dir=$ac_dir
5069 ac_install_sh="$ac_aux_dir/shtool install -c"
5070 break
5071 fi
783e057b
DJ
5072done
5073if test -z "$ac_aux_dir"; then
d0ac1c44 5074 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5075fi
81ecdfbb
RW
5076
5077# These three variables are undocumented and unsupported,
5078# and are intended to be withdrawn in a future Autoconf release.
5079# They can cause serious problems if a builder's source tree is in a directory
5080# whose full name contains unusual characters.
5081ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5082ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5083ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5084
783e057b 5085
783e057b 5086
9009e1ae
MR
5087test "$program_prefix" != NONE &&
5088 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5089# Use a double $ so make ignores it.
5090test "$program_suffix" != NONE &&
5091 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5092# Double any \ or $.
5093# By default was `s,x,x', remove it if useless.
5094ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5095program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5096
81ecdfbb 5097
0bcda685
PA
5098# We require a C++11 compiler. Check if one is available, and if
5099# necessary, set CXX_DIALECT to some -std=xxx switch.
5100
41260ac2 5101 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5102 ac_ext=cpp
5103ac_cpp='$CXXCPP $CPPFLAGS'
5104ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5105ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5106ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5107 CXX_DIALECT=""
5108 ac_success=no
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5110$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5111if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5112 $as_echo_n "(cached) " >&6
5113else
5114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5115/* end confdefs.h. */
5116
5117
5118// If the compiler admits that it is not ready for C++11, why torture it?
5119// Hopefully, this will speed up the test.
5120
5121#ifndef __cplusplus
5122
5123#error "This is not a C++ compiler"
5124
5125#elif __cplusplus < 201103L
5126
5127#error "This is not a C++11 compiler"
5128
5129#else
5130
5131namespace cxx11
5132{
5133
5134 namespace test_static_assert
5135 {
5136
5137 template <typename T>
5138 struct check
5139 {
5140 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5141 };
5142
5143 }
5144
5145 namespace test_final_override
5146 {
5147
5148 struct Base
5149 {
5150 virtual void f() {}
5151 };
5152
5153 struct Derived : public Base
5154 {
5155 virtual void f() override {}
5156 };
5157
5158 }
5159
5160 namespace test_double_right_angle_brackets
5161 {
5162
5163 template < typename T >
5164 struct check {};
5165
5166 typedef check<void> single_type;
5167 typedef check<check<void>> double_type;
5168 typedef check<check<check<void>>> triple_type;
5169 typedef check<check<check<check<void>>>> quadruple_type;
5170
5171 }
5172
5173 namespace test_decltype
5174 {
5175
5176 int
5177 f()
5178 {
5179 int a = 1;
5180 decltype(a) b = 2;
5181 return a + b;
5182 }
5183
5184 }
5185
5186 namespace test_type_deduction
5187 {
5188
5189 template < typename T1, typename T2 >
5190 struct is_same
5191 {
5192 static const bool value = false;
5193 };
5194
5195 template < typename T >
5196 struct is_same<T, T>
5197 {
5198 static const bool value = true;
5199 };
5200
5201 template < typename T1, typename T2 >
5202 auto
5203 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5204 {
5205 return a1 + a2;
5206 }
5207
5208 int
5209 test(const int c, volatile int v)
5210 {
5211 static_assert(is_same<int, decltype(0)>::value == true, "");
5212 static_assert(is_same<int, decltype(c)>::value == false, "");
5213 static_assert(is_same<int, decltype(v)>::value == false, "");
5214 auto ac = c;
5215 auto av = v;
5216 auto sumi = ac + av + 'x';
5217 auto sumf = ac + av + 1.0;
5218 static_assert(is_same<int, decltype(ac)>::value == true, "");
5219 static_assert(is_same<int, decltype(av)>::value == true, "");
5220 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5221 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5222 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5223 return (sumf > 0.0) ? sumi : add(c, v);
5224 }
5225
5226 }
5227
5228 namespace test_noexcept
5229 {
5230
5231 int f() { return 0; }
5232 int g() noexcept { return 0; }
5233
5234 static_assert(noexcept(f()) == false, "");
5235 static_assert(noexcept(g()) == true, "");
5236
5237 }
5238
5239 namespace test_constexpr
5240 {
5241
5242 template < typename CharT >
5243 unsigned long constexpr
5244 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5245 {
5246 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5247 }
5248
5249 template < typename CharT >
5250 unsigned long constexpr
5251 strlen_c(const CharT *const s) noexcept
5252 {
5253 return strlen_c_r(s, 0UL);
5254 }
5255
5256 static_assert(strlen_c("") == 0UL, "");
5257 static_assert(strlen_c("1") == 1UL, "");
5258 static_assert(strlen_c("example") == 7UL, "");
5259 static_assert(strlen_c("another\0example") == 7UL, "");
5260
5261 }
5262
5263 namespace test_rvalue_references
5264 {
5265
5266 template < int N >
5267 struct answer
5268 {
5269 static constexpr int value = N;
5270 };
5271
5272 answer<1> f(int&) { return answer<1>(); }
5273 answer<2> f(const int&) { return answer<2>(); }
5274 answer<3> f(int&&) { return answer<3>(); }
5275
5276 void
5277 test()
5278 {
5279 int i = 0;
5280 const int c = 0;
5281 static_assert(decltype(f(i))::value == 1, "");
5282 static_assert(decltype(f(c))::value == 2, "");
5283 static_assert(decltype(f(0))::value == 3, "");
5284 }
5285
5286 }
5287
5288 namespace test_uniform_initialization
5289 {
5290
5291 struct test
5292 {
5293 static const int zero {};
5294 static const int one {1};
5295 };
5296
5297 static_assert(test::zero == 0, "");
5298 static_assert(test::one == 1, "");
5299
5300 }
5301
5302 namespace test_lambdas
5303 {
5304
5305 void
5306 test1()
5307 {
5308 auto lambda1 = [](){};
5309 auto lambda2 = lambda1;
5310 lambda1();
5311 lambda2();
5312 }
5313
5314 int
5315 test2()
5316 {
5317 auto a = [](int i, int j){ return i + j; }(1, 2);
5318 auto b = []() -> int { return '0'; }();
5319 auto c = [=](){ return a + b; }();
5320 auto d = [&](){ return c; }();
5321 auto e = [a, &b](int x) mutable {
5322 const auto identity = [](int y){ return y; };
5323 for (auto i = 0; i < a; ++i)
5324 a += b--;
5325 return x + identity(a + b);
5326 }(0);
5327 return a + b + c + d + e;
5328 }
5329
5330 int
5331 test3()
5332 {
5333 const auto nullary = [](){ return 0; };
5334 const auto unary = [](int x){ return x; };
5335 using nullary_t = decltype(nullary);
5336 using unary_t = decltype(unary);
5337 const auto higher1st = [](nullary_t f){ return f(); };
5338 const auto higher2nd = [unary](nullary_t f1){
5339 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5340 };
5341 return higher1st(nullary) + higher2nd(nullary)(unary);
5342 }
5343
5344 }
5345
5346 namespace test_variadic_templates
5347 {
5348
5349 template <int...>
5350 struct sum;
5351
5352 template <int N0, int... N1toN>
5353 struct sum<N0, N1toN...>
5354 {
5355 static constexpr auto value = N0 + sum<N1toN...>::value;
5356 };
5357
5358 template <>
5359 struct sum<>
5360 {
5361 static constexpr auto value = 0;
5362 };
5363
5364 static_assert(sum<>::value == 0, "");
5365 static_assert(sum<1>::value == 1, "");
5366 static_assert(sum<23>::value == 23, "");
5367 static_assert(sum<1, 2>::value == 3, "");
5368 static_assert(sum<5, 5, 11>::value == 21, "");
5369 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5370
5371 }
5372
5373 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5374 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5375 // because of this.
5376 namespace test_template_alias_sfinae
5377 {
5378
5379 struct foo {};
5380
5381 template<typename T>
5382 using member = typename T::member_type;
5383
5384 template<typename T>
5385 void func(...) {}
5386
5387 template<typename T>
5388 void func(member<T>*) {}
5389
5390 void test();
5391
5392 void test() { func<foo>(0); }
5393
5394 }
5395
5396} // namespace cxx11
5397
5398#endif // __cplusplus >= 201103L
5399
5400
5401
5402_ACEOF
5403if ac_fn_cxx_try_compile "$LINENO"; then :
5404 ax_cv_cxx_compile_cxx11=yes
5405else
5406 ax_cv_cxx_compile_cxx11=no
5407fi
5408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5409fi
5410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5411$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5412 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5413 ac_success=yes
5414 fi
5415
5416 if test x$ac_success = xno; then
41260ac2
SM
5417 for alternative in ${ax_cxx_compile_alternatives}; do
5418 switch="-std=gnu++${alternative}"
0bcda685
PA
5419 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5421$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5422if eval \${$cachevar+:} false; then :
0bcda685
PA
5423 $as_echo_n "(cached) " >&6
5424else
5425 ac_save_CXX="$CXX"
5426 CXX="$CXX $switch"
5427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5428/* end confdefs.h. */
5429
5430
5431// If the compiler admits that it is not ready for C++11, why torture it?
5432// Hopefully, this will speed up the test.
5433
5434#ifndef __cplusplus
5435
5436#error "This is not a C++ compiler"
5437
5438#elif __cplusplus < 201103L
5439
5440#error "This is not a C++11 compiler"
5441
5442#else
5443
5444namespace cxx11
5445{
5446
5447 namespace test_static_assert
5448 {
5449
5450 template <typename T>
5451 struct check
5452 {
5453 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5454 };
5455
5456 }
5457
5458 namespace test_final_override
5459 {
5460
5461 struct Base
5462 {
5463 virtual void f() {}
5464 };
5465
5466 struct Derived : public Base
5467 {
5468 virtual void f() override {}
5469 };
5470
5471 }
5472
5473 namespace test_double_right_angle_brackets
5474 {
5475
5476 template < typename T >
5477 struct check {};
5478
5479 typedef check<void> single_type;
5480 typedef check<check<void>> double_type;
5481 typedef check<check<check<void>>> triple_type;
5482 typedef check<check<check<check<void>>>> quadruple_type;
5483
5484 }
5485
5486 namespace test_decltype
5487 {
5488
5489 int
5490 f()
5491 {
5492 int a = 1;
5493 decltype(a) b = 2;
5494 return a + b;
5495 }
5496
5497 }
5498
5499 namespace test_type_deduction
5500 {
5501
5502 template < typename T1, typename T2 >
5503 struct is_same
5504 {
5505 static const bool value = false;
5506 };
5507
5508 template < typename T >
5509 struct is_same<T, T>
5510 {
5511 static const bool value = true;
5512 };
5513
5514 template < typename T1, typename T2 >
5515 auto
5516 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5517 {
5518 return a1 + a2;
5519 }
5520
5521 int
5522 test(const int c, volatile int v)
5523 {
5524 static_assert(is_same<int, decltype(0)>::value == true, "");
5525 static_assert(is_same<int, decltype(c)>::value == false, "");
5526 static_assert(is_same<int, decltype(v)>::value == false, "");
5527 auto ac = c;
5528 auto av = v;
5529 auto sumi = ac + av + 'x';
5530 auto sumf = ac + av + 1.0;
5531 static_assert(is_same<int, decltype(ac)>::value == true, "");
5532 static_assert(is_same<int, decltype(av)>::value == true, "");
5533 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5534 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5535 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5536 return (sumf > 0.0) ? sumi : add(c, v);
5537 }
5538
5539 }
5540
5541 namespace test_noexcept
5542 {
5543
5544 int f() { return 0; }
5545 int g() noexcept { return 0; }
5546
5547 static_assert(noexcept(f()) == false, "");
5548 static_assert(noexcept(g()) == true, "");
5549
5550 }
5551
5552 namespace test_constexpr
5553 {
5554
5555 template < typename CharT >
5556 unsigned long constexpr
5557 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5558 {
5559 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5560 }
5561
5562 template < typename CharT >
5563 unsigned long constexpr
5564 strlen_c(const CharT *const s) noexcept
5565 {
5566 return strlen_c_r(s, 0UL);
5567 }
5568
5569 static_assert(strlen_c("") == 0UL, "");
5570 static_assert(strlen_c("1") == 1UL, "");
5571 static_assert(strlen_c("example") == 7UL, "");
5572 static_assert(strlen_c("another\0example") == 7UL, "");
5573
5574 }
5575
5576 namespace test_rvalue_references
5577 {
5578
5579 template < int N >
5580 struct answer
5581 {
5582 static constexpr int value = N;
5583 };
5584
5585 answer<1> f(int&) { return answer<1>(); }
5586 answer<2> f(const int&) { return answer<2>(); }
5587 answer<3> f(int&&) { return answer<3>(); }
5588
5589 void
5590 test()
5591 {
5592 int i = 0;
5593 const int c = 0;
5594 static_assert(decltype(f(i))::value == 1, "");
5595 static_assert(decltype(f(c))::value == 2, "");
5596 static_assert(decltype(f(0))::value == 3, "");
5597 }
5598
5599 }
5600
5601 namespace test_uniform_initialization
5602 {
5603
5604 struct test
5605 {
5606 static const int zero {};
5607 static const int one {1};
5608 };
5609
5610 static_assert(test::zero == 0, "");
5611 static_assert(test::one == 1, "");
5612
5613 }
5614
5615 namespace test_lambdas
5616 {
5617
5618 void
5619 test1()
5620 {
5621 auto lambda1 = [](){};
5622 auto lambda2 = lambda1;
5623 lambda1();
5624 lambda2();
5625 }
5626
5627 int
5628 test2()
5629 {
5630 auto a = [](int i, int j){ return i + j; }(1, 2);
5631 auto b = []() -> int { return '0'; }();
5632 auto c = [=](){ return a + b; }();
5633 auto d = [&](){ return c; }();
5634 auto e = [a, &b](int x) mutable {
5635 const auto identity = [](int y){ return y; };
5636 for (auto i = 0; i < a; ++i)
5637 a += b--;
5638 return x + identity(a + b);
5639 }(0);
5640 return a + b + c + d + e;
5641 }
5642
5643 int
5644 test3()
5645 {
5646 const auto nullary = [](){ return 0; };
5647 const auto unary = [](int x){ return x; };
5648 using nullary_t = decltype(nullary);
5649 using unary_t = decltype(unary);
5650 const auto higher1st = [](nullary_t f){ return f(); };
5651 const auto higher2nd = [unary](nullary_t f1){
5652 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5653 };
5654 return higher1st(nullary) + higher2nd(nullary)(unary);
5655 }
5656
5657 }
5658
5659 namespace test_variadic_templates
5660 {
5661
5662 template <int...>
5663 struct sum;
5664
5665 template <int N0, int... N1toN>
5666 struct sum<N0, N1toN...>
5667 {
5668 static constexpr auto value = N0 + sum<N1toN...>::value;
5669 };
5670
5671 template <>
5672 struct sum<>
5673 {
5674 static constexpr auto value = 0;
5675 };
5676
5677 static_assert(sum<>::value == 0, "");
5678 static_assert(sum<1>::value == 1, "");
5679 static_assert(sum<23>::value == 23, "");
5680 static_assert(sum<1, 2>::value == 3, "");
5681 static_assert(sum<5, 5, 11>::value == 21, "");
5682 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5683
5684 }
5685
5686 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5687 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5688 // because of this.
5689 namespace test_template_alias_sfinae
5690 {
5691
5692 struct foo {};
5693
5694 template<typename T>
5695 using member = typename T::member_type;
5696
5697 template<typename T>
5698 void func(...) {}
5699
5700 template<typename T>
5701 void func(member<T>*) {}
5702
5703 void test();
5704
5705 void test() { func<foo>(0); }
5706
5707 }
5708
5709} // namespace cxx11
5710
5711#endif // __cplusplus >= 201103L
5712
5713
5714
5715_ACEOF
5716if ac_fn_cxx_try_compile "$LINENO"; then :
5717 eval $cachevar=yes
5718else
5719 eval $cachevar=no
5720fi
5721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5722 CXX="$ac_save_CXX"
5723fi
5724eval ac_res=\$$cachevar
5725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5726$as_echo "$ac_res" >&6; }
5727 if eval test x\$$cachevar = xyes; then
5728 CXX_DIALECT="$switch"
5729 ac_success=yes
5730 break
5731 fi
5732 done
5733 fi
5734
5735 if test x$ac_success = xno; then
41260ac2
SM
5736 for alternative in ${ax_cxx_compile_alternatives}; do
5737 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5738 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5740$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5741if eval \${$cachevar+:} false; then :
0bcda685
PA
5742 $as_echo_n "(cached) " >&6
5743else
5744 ac_save_CXX="$CXX"
41260ac2
SM
5745 CXX="$CXX $switch"
5746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5747/* end confdefs.h. */
5748
5749
5750// If the compiler admits that it is not ready for C++11, why torture it?
5751// Hopefully, this will speed up the test.
5752
5753#ifndef __cplusplus
5754
5755#error "This is not a C++ compiler"
5756
5757#elif __cplusplus < 201103L
5758
5759#error "This is not a C++11 compiler"
5760
5761#else
5762
5763namespace cxx11
5764{
5765
5766 namespace test_static_assert
5767 {
5768
5769 template <typename T>
5770 struct check
5771 {
5772 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5773 };
5774
5775 }
5776
5777 namespace test_final_override
5778 {
5779
5780 struct Base
5781 {
5782 virtual void f() {}
5783 };
5784
5785 struct Derived : public Base
5786 {
5787 virtual void f() override {}
5788 };
5789
5790 }
5791
5792 namespace test_double_right_angle_brackets
5793 {
5794
5795 template < typename T >
5796 struct check {};
5797
5798 typedef check<void> single_type;
5799 typedef check<check<void>> double_type;
5800 typedef check<check<check<void>>> triple_type;
5801 typedef check<check<check<check<void>>>> quadruple_type;
5802
5803 }
5804
5805 namespace test_decltype
5806 {
5807
5808 int
5809 f()
5810 {
5811 int a = 1;
5812 decltype(a) b = 2;
5813 return a + b;
5814 }
5815
5816 }
5817
5818 namespace test_type_deduction
5819 {
5820
5821 template < typename T1, typename T2 >
5822 struct is_same
5823 {
5824 static const bool value = false;
5825 };
5826
5827 template < typename T >
5828 struct is_same<T, T>
5829 {
5830 static const bool value = true;
5831 };
5832
5833 template < typename T1, typename T2 >
5834 auto
5835 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5836 {
5837 return a1 + a2;
5838 }
5839
5840 int
5841 test(const int c, volatile int v)
5842 {
5843 static_assert(is_same<int, decltype(0)>::value == true, "");
5844 static_assert(is_same<int, decltype(c)>::value == false, "");
5845 static_assert(is_same<int, decltype(v)>::value == false, "");
5846 auto ac = c;
5847 auto av = v;
5848 auto sumi = ac + av + 'x';
5849 auto sumf = ac + av + 1.0;
5850 static_assert(is_same<int, decltype(ac)>::value == true, "");
5851 static_assert(is_same<int, decltype(av)>::value == true, "");
5852 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5853 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5854 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5855 return (sumf > 0.0) ? sumi : add(c, v);
5856 }
5857
5858 }
5859
5860 namespace test_noexcept
5861 {
5862
5863 int f() { return 0; }
5864 int g() noexcept { return 0; }
5865
5866 static_assert(noexcept(f()) == false, "");
5867 static_assert(noexcept(g()) == true, "");
5868
5869 }
5870
5871 namespace test_constexpr
5872 {
5873
5874 template < typename CharT >
5875 unsigned long constexpr
5876 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5877 {
5878 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5879 }
5880
5881 template < typename CharT >
5882 unsigned long constexpr
5883 strlen_c(const CharT *const s) noexcept
5884 {
5885 return strlen_c_r(s, 0UL);
5886 }
5887
5888 static_assert(strlen_c("") == 0UL, "");
5889 static_assert(strlen_c("1") == 1UL, "");
5890 static_assert(strlen_c("example") == 7UL, "");
5891 static_assert(strlen_c("another\0example") == 7UL, "");
5892
5893 }
5894
5895 namespace test_rvalue_references
5896 {
5897
5898 template < int N >
5899 struct answer
5900 {
5901 static constexpr int value = N;
5902 };
5903
5904 answer<1> f(int&) { return answer<1>(); }
5905 answer<2> f(const int&) { return answer<2>(); }
5906 answer<3> f(int&&) { return answer<3>(); }
5907
5908 void
5909 test()
5910 {
5911 int i = 0;
5912 const int c = 0;
5913 static_assert(decltype(f(i))::value == 1, "");
5914 static_assert(decltype(f(c))::value == 2, "");
5915 static_assert(decltype(f(0))::value == 3, "");
5916 }
5917
5918 }
5919
5920 namespace test_uniform_initialization
5921 {
5922
5923 struct test
5924 {
5925 static const int zero {};
5926 static const int one {1};
5927 };
5928
5929 static_assert(test::zero == 0, "");
5930 static_assert(test::one == 1, "");
5931
5932 }
5933
5934 namespace test_lambdas
5935 {
5936
5937 void
5938 test1()
5939 {
5940 auto lambda1 = [](){};
5941 auto lambda2 = lambda1;
5942 lambda1();
5943 lambda2();
5944 }
5945
5946 int
5947 test2()
5948 {
5949 auto a = [](int i, int j){ return i + j; }(1, 2);
5950 auto b = []() -> int { return '0'; }();
5951 auto c = [=](){ return a + b; }();
5952 auto d = [&](){ return c; }();
5953 auto e = [a, &b](int x) mutable {
5954 const auto identity = [](int y){ return y; };
5955 for (auto i = 0; i < a; ++i)
5956 a += b--;
5957 return x + identity(a + b);
5958 }(0);
5959 return a + b + c + d + e;
5960 }
5961
5962 int
5963 test3()
5964 {
5965 const auto nullary = [](){ return 0; };
5966 const auto unary = [](int x){ return x; };
5967 using nullary_t = decltype(nullary);
5968 using unary_t = decltype(unary);
5969 const auto higher1st = [](nullary_t f){ return f(); };
5970 const auto higher2nd = [unary](nullary_t f1){
5971 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5972 };
5973 return higher1st(nullary) + higher2nd(nullary)(unary);
5974 }
5975
5976 }
5977
5978 namespace test_variadic_templates
5979 {
5980
5981 template <int...>
5982 struct sum;
5983
5984 template <int N0, int... N1toN>
5985 struct sum<N0, N1toN...>
5986 {
5987 static constexpr auto value = N0 + sum<N1toN...>::value;
5988 };
5989
5990 template <>
5991 struct sum<>
5992 {
5993 static constexpr auto value = 0;
5994 };
5995
5996 static_assert(sum<>::value == 0, "");
5997 static_assert(sum<1>::value == 1, "");
5998 static_assert(sum<23>::value == 23, "");
5999 static_assert(sum<1, 2>::value == 3, "");
6000 static_assert(sum<5, 5, 11>::value == 21, "");
6001 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6002
6003 }
6004
6005 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6006 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6007 // because of this.
6008 namespace test_template_alias_sfinae
6009 {
6010
6011 struct foo {};
6012
6013 template<typename T>
6014 using member = typename T::member_type;
6015
6016 template<typename T>
6017 void func(...) {}
6018
6019 template<typename T>
6020 void func(member<T>*) {}
6021
6022 void test();
6023
6024 void test() { func<foo>(0); }
6025
6026 }
6027
6028} // namespace cxx11
6029
6030#endif // __cplusplus >= 201103L
6031
6032
6033
6034_ACEOF
6035if ac_fn_cxx_try_compile "$LINENO"; then :
6036 eval $cachevar=yes
6037else
6038 eval $cachevar=no
6039fi
6040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6041 CXX="$ac_save_CXX"
0bcda685
PA
6042fi
6043eval ac_res=\$$cachevar
6044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6045$as_echo "$ac_res" >&6; }
41260ac2
SM
6046 if eval test x\$$cachevar = xyes; then
6047 CXX_DIALECT="$switch"
6048 ac_success=yes
6049 break
6050 fi
6051 done
6052 if test x$ac_success = xyes; then
0bcda685
PA
6053 break
6054 fi
6055 done
6056 fi
6057 ac_ext=c
6058ac_cpp='$CPP $CPPFLAGS'
6059ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6060ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6061ac_compiler_gnu=$ac_cv_c_compiler_gnu
6062
6063 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6064 if test x$ac_success = xno; then
d0ac1c44 6065 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6066 fi
6067 fi
6068 if test x$ac_success = xno; then
6069 HAVE_CXX11=0
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6071$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6072 else
6073 HAVE_CXX11=1
6074
6075$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6076
6077 fi
6078
6079
6080
6081
a417dc56
RW
6082# Dependency checking.
6083rm -rf .tst 2>/dev/null
6084mkdir .tst 2>/dev/null
6085if test -d .tst; then
6086 am__leading_dot=.
6087else
6088 am__leading_dot=_
6089fi
6090rmdir .tst 2>/dev/null
6091
6092DEPDIR="${am__leading_dot}deps"
6093
81ecdfbb 6094ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6095
6096
6097depcc="$CC" am_compiler_list=
6098
6099am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6101$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6102if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6103 $as_echo_n "(cached) " >&6
a417dc56
RW
6104else
6105 if test -f "$am_depcomp"; then
6106 # We make a subdir and do the tests there. Otherwise we can end up
6107 # making bogus files that we don't know about and never remove. For
6108 # instance it was reported that on HP-UX the gcc test will end up
6109 # making a dummy file named `D' -- because `-MD' means `put the output
6110 # in D'.
6111 mkdir conftest.dir
6112 # Copy depcomp to subdir because otherwise we won't find it if we're
6113 # using a relative directory.
6114 cp "$am_depcomp" conftest.dir
6115 cd conftest.dir
6116 # We will build objects and dependencies in a subdirectory because
6117 # it helps to detect inapplicable dependency modes. For instance
6118 # both Tru64's cc and ICC support -MD to output dependencies as a
6119 # side effect of compilation, but ICC will put the dependencies in
6120 # the current directory while Tru64 will put them in the object
6121 # directory.
6122 mkdir sub
6123
6124 am_cv_CC_dependencies_compiler_type=none
6125 if test "$am_compiler_list" = ""; then
6126 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6127 fi
6128 for depmode in $am_compiler_list; do
6129 if test $depmode = none; then break; fi
6130
81ecdfbb 6131 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6132 # Setup a source with many dependencies, because some compilers
6133 # like to wrap large dependency lists on column 80 (with \), and
6134 # we should not choose a depcomp mode which is confused by this.
6135 #
6136 # We need to recreate these files for each test, as the compiler may
6137 # overwrite some of them when testing with obscure command lines.
6138 # This happens at least with the AIX C compiler.
6139 : > sub/conftest.c
6140 for i in 1 2 3 4 5 6; do
6141 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6142 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6143 # Solaris 8's {/usr,}/bin/sh.
6144 touch sub/conftst$i.h
6145 done
6146 echo "include sub/conftest.Po" > confmf
6147
6148 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6149 # mode. It turns out that the SunPro C++ compiler does not properly
6150 # handle `-M -o', and we need to detect this.
6151 depcmd="depmode=$depmode \
6152 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6153 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6154 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6155 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6156 if env $depcmd > conftest.err 2>&1 &&
6157 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6158 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6159 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6160 # icc doesn't choke on unknown options, it will just issue warnings
6161 # or remarks (even with -Werror). So we grep stderr for any message
6162 # that says an option was ignored or not supported.
6163 # When given -MP, icc 7.0 and 7.1 complain thusly:
6164 # icc: Command line warning: ignoring option '-M'; no argument required
6165 # The diagnosis changed in icc 8.0:
6166 # icc: Command line remark: option '-MP' not supported
6167 if (grep 'ignoring option' conftest.err ||
6168 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6169 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6170 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6171 break
6172 fi
6173 fi
81ecdfbb 6174 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6175 sed -e 's/^/| /' < conftest.err >&5
6176 done
6177
6178 cd ..
6179 rm -rf conftest.dir
6180else
6181 am_cv_CC_dependencies_compiler_type=none
6182fi
6183
6184fi
81ecdfbb
RW
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6186$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6187if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6188then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6189else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6190
6191fi
6192
6193
648d586d
JB
6194gnulib_extra_configure_args=
6195# If large-file support is disabled, make sure gnulib does the same.
6196if test "$enable_largefile" = no; then
6197gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6198fi
6199
c971b7fa
PA
6200# Configure gnulib. We need to build gnulib under some other
6201# directory not "gnulib", to avoid the problem of both GDB and
6202# GDBserver wanting to build it in the same directory, when building
6203# in the source dir.
783e057b 6204
c971b7fa
PA
6205 in_src="gnulib"
6206 in_build="build-gnulib"
648d586d 6207 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6208
6209 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6210 # so they do not pile up.
6211 ac_sub_configure_args=
6212 ac_prev=
6213 eval "set x $ac_configure_args"
6214 shift
6215 for ac_arg
6216 do
6217 if test -n "$ac_prev"; then
6218 ac_prev=
6219 continue
6220 fi
6221 case $ac_arg in
6222 -cache-file | --cache-file | --cache-fil | --cache-fi \
6223 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6224 ac_prev=cache_file ;;
6225 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6226 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6227 | --c=*)
6228 ;;
6229 --config-cache | -C)
6230 ;;
6231 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6232 ac_prev=srcdir ;;
6233 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6234 ;;
6235 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6236 ac_prev=prefix ;;
6237 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6238 ;;
6239 --disable-option-checking)
6240 ;;
6241 *)
6242 case $ac_arg in
6243 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6244 esac
6245 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6246 esac
6247 done
6248
6249 # Always prepend --prefix to ensure using the same prefix
6250 # in subdir configurations.
6251 ac_arg="--prefix=$prefix"
6252 case $ac_arg in
6253 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6254 esac
6255 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6256
6257 # Pass --silent
6258 if test "$silent" = yes; then
6259 ac_sub_configure_args="--silent $ac_sub_configure_args"
6260 fi
6261
6262 # Always prepend --disable-option-checking to silence warnings, since
6263 # different subdirs can have different --enable and --with options.
6264 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6265
6266 ac_popdir=`pwd`
6267 ac_dir=$in_build
6268
6269 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6270 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6271 $as_echo "$ac_msg" >&6
6272 as_dir="$ac_dir"; as_fn_mkdir_p
6273
38ea300a
PA
6274 case $srcdir in
6275 [\\/]* | ?:[\\/]* )
6276 ac_srcdir=$srcdir/$in_src ;;
6277 *) # Relative name.
6278 ac_srcdir=../$srcdir/$in_src ;;
6279 esac
c971b7fa
PA
6280
6281 cd "$ac_dir"
6282
6283 ac_sub_configure=$ac_srcdir/configure
6284
6285 # Make the cache file name correct relative to the subdirectory.
6286 case $cache_file in
6287 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6288 *) # Relative name.
6289 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6290 esac
6291
648d586d
JB
6292 if test -n "$in_extra_args"; then
6293 # Add the extra args at the end.
6294 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6295 fi
6296
c971b7fa
PA
6297 { $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
6298$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6299 # The eval makes quoting arguments work.
6300 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6301 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 6302 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c971b7fa
PA
6303
6304 cd "$ac_popdir"
783e057b 6305
c971b7fa
PA
6306
6307
6308CONFIG_OBS=
6309CONFIG_DEPS=
6310CONFIG_SRCS=
6311ENABLE_CFLAGS=
6312
6313CONFIG_ALL=
6314CONFIG_CLEAN=
6315CONFIG_INSTALL=
6316CONFIG_UNINSTALL=
6317
6318# If we haven't got the data from the intl directory,
6319# assume NLS is disabled.
6320USE_NLS=no
6321LIBINTL=
6322LIBINTL_DEP=
6323INCINTL=
6324XGETTEXT=
6325GMSGFMT=
6326POSUB=
783e057b
DJ
6327
6328if test -f ../intl/config.intl; then
6329 . ../intl/config.intl
6330fi
81ecdfbb
RW
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6332$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6333if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6335$as_echo "no" >&6; }
783e057b 6336else
81ecdfbb
RW
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6338$as_echo "yes" >&6; }
783e057b 6339
81ecdfbb 6340$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6341
6342
81ecdfbb
RW
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6344$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6345 # Look for .po and .gmo files in the source directory.
6346 CATALOGS=
6347 XLINGUAS=
6348 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6349 # If there aren't any .gmo files the shell will give us the
6350 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6351 # weeded out.
6352 case "$cat" in *\**)
6353 continue;;
6354 esac
6355 # The quadruple backslash is collapsed to a double backslash
6356 # by the backticks, then collapsed again by the double quotes,
6357 # leaving us with one backslash in the sed expression (right
6358 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6359 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6360 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6361 # The user is allowed to set LINGUAS to a list of languages to
6362 # install catalogs for. If it's empty that means "all of them."
6363 if test "x$LINGUAS" = x; then
6364 CATALOGS="$CATALOGS $cat"
6365 XLINGUAS="$XLINGUAS $lang"
6366 else
6367 case "$LINGUAS" in *$lang*)
6368 CATALOGS="$CATALOGS $cat"
6369 XLINGUAS="$XLINGUAS $lang"
6370 ;;
6371 esac
e28b3332
DJ
6372 fi
6373 done
c971b7fa
PA
6374 LINGUAS="$XLINGUAS"
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6376$as_echo "$LINGUAS" >&6; }
6377
6378
6379 DATADIRNAME=share
6380
6381 INSTOBJEXT=.mo
6382
6383 GENCAT=gencat
6384
6385 CATOBJEXT=.gmo
e28b3332 6386
e28b3332
DJ
6387fi
6388
c971b7fa
PA
6389localedir='${datadir}/locale'
6390
6391
6392if test x"$USE_NLS" = xyes; then
6393 CONFIG_ALL="$CONFIG_ALL all-po"
6394 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6395 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6396 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6397fi
e28b3332 6398
c971b7fa
PA
6399GNULIB=build-gnulib/import
6400
6401# For Makefile dependencies.
6402GNULIB_STDINT_H=
6403if test x"$STDINT_H" != x; then
6404 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
6405fi
6406
6407
c971b7fa
PA
6408PACKAGE=gdb
6409
6410cat >>confdefs.h <<_ACEOF
6411#define PACKAGE "$PACKAGE"
6412_ACEOF
6413
6414
6415
6416# We never need to detect it in this sub-configure.
6417# But preserve it for config.status --recheck.
6418
6419
6420
6421MAKEINFO_EXTRA_FLAGS=""
6422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6423$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6424if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6425 $as_echo_n "(cached) " >&6
6426else
6427 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6428 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6429 gdb_cv_have_makeinfo_click=yes
6430 else
6431 gdb_cv_have_makeinfo_click=no
6432 fi
6433fi
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6435$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6436if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6437 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6438fi
e28b3332
DJ
6439
6440
bec39cab
AC
6441
6442
81ecdfbb
RW
6443# Check whether --with-separate-debug-dir was given.
6444if test "${with_separate_debug_dir+set}" = set; then :
6445 withval=$with_separate_debug_dir;
b14b1491
TT
6446 DEBUGDIR=$withval
6447else
6448 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6449fi
6450
20e95c23 6451
783e057b
DJ
6452 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6453 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6454 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6455 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6456
783e057b
DJ
6457cat >>confdefs.h <<_ACEOF
6458#define DEBUGDIR "$ac_define_dir"
20e95c23 6459_ACEOF
20e95c23 6460
20e95c23 6461
20e95c23 6462
0c4a4063 6463
b14b1491
TT
6464 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6465 if test "x$prefix" = xNONE; then
6466 test_prefix=/usr/local
6467 else
6468 test_prefix=$prefix
6469 fi
783e057b 6470 else
b14b1491 6471 test_prefix=$exec_prefix
783e057b 6472 fi
b14b1491
TT
6473 value=0
6474 case ${ac_define_dir} in
6475 "${test_prefix}"|"${test_prefix}/"*|\
6476 '${exec_prefix}'|'${exec_prefix}/'*)
6477 value=1
6478 ;;
6479 esac
6480
6481cat >>confdefs.h <<_ACEOF
6482#define DEBUGDIR_RELOCATABLE $value
6483_ACEOF
6484
6485
6486
0c4a4063 6487
f83d8a90
DE
6488# We can't pass paths as command line arguments.
6489# Mingw32 tries to be clever and will convert the paths for us.
6490# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6491# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6492# This breaks GDB's relocatable path conversions since paths passed in
6493# config.h would not get so translated, the path prefixes no longer match.
6494
6495 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6496 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6497 ac_define_dir=`eval echo $bindir`
6498 ac_define_dir=`eval echo $ac_define_dir`
6499
6500cat >>confdefs.h <<_ACEOF
6501#define BINDIR "$ac_define_dir"
6502_ACEOF
6503
6504
6505
b14b1491
TT
6506# GDB's datadir relocation
6507
6508
6509
81ecdfbb
RW
6510# Check whether --with-gdb-datadir was given.
6511if test "${with_gdb_datadir+set}" = set; then :
6512 withval=$with_gdb_datadir;
b14b1491 6513 GDB_DATADIR=$withval
20e95c23 6514else
b14b1491 6515 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6516fi
6517
20e95c23 6518
b14b1491
TT
6519 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6520 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6521 ac_define_dir=`eval echo $GDB_DATADIR`
6522 ac_define_dir=`eval echo $ac_define_dir`
6523
6524cat >>confdefs.h <<_ACEOF
6525#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6526_ACEOF
6527
b14b1491
TT
6528
6529
0c4a4063 6530
b14b1491
TT
6531 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6532 if test "x$prefix" = xNONE; then
6533 test_prefix=/usr/local
6534 else
6535 test_prefix=$prefix
6536 fi
6537 else
6538 test_prefix=$exec_prefix
6539 fi
6540 value=0
6541 case ${ac_define_dir} in
6542 "${test_prefix}"|"${test_prefix}/"*|\
6543 '${exec_prefix}'|'${exec_prefix}/'*)
6544 value=1
6545 ;;
6546 esac
6547
6548cat >>confdefs.h <<_ACEOF
6549#define GDB_DATADIR_RELOCATABLE $value
6550_ACEOF
6551
6552
783e057b 6553
20e95c23 6554
0c4a4063 6555
81ecdfbb
RW
6556# Check whether --with-relocated-sources was given.
6557if test "${with_relocated_sources+set}" = set; then :
6558 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6559
6560 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6561 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6562 ac_define_dir=`eval echo $reloc_srcdir`
6563 ac_define_dir=`eval echo $ac_define_dir`
6564
6565cat >>confdefs.h <<_ACEOF
6566#define RELOC_SRCDIR "$ac_define_dir"
6567_ACEOF
6568
6569
6570
81ecdfbb
RW
6571fi
6572
29b0e8a2 6573
7349ff92
JK
6574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6575$as_echo_n "checking for default auto-load directory... " >&6; }
6576
6577# Check whether --with-auto-load-dir was given.
6578if test "${with_auto_load_dir+set}" = set; then :
6579 withval=$with_auto_load_dir;
6580else
1564a261 6581 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6582fi
6583
2861ee4f 6584escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6585
6586 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6587 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6588 ac_define_dir=`eval echo $escape_dir`
6589 ac_define_dir=`eval echo $ac_define_dir`
6590
6591cat >>confdefs.h <<_ACEOF
6592#define AUTO_LOAD_DIR "$ac_define_dir"
6593_ACEOF
6594
6595
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6597$as_echo "$with_auto_load_dir" >&6; }
6598
bccbefd2
JK
6599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6600$as_echo_n "checking for default auto-load safe-path... " >&6; }
6601
6602# Check whether --with-auto-load-safe-path was given.
6603if test "${with_auto_load_safe_path+set}" = set; then :
6604 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6605 with_auto_load_safe_path="/"
6606 fi
bccbefd2 6607else
7349ff92 6608 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6609fi
6610
2861ee4f 6611escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6612
6613 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6614 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6615 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6616 ac_define_dir=`eval echo $ac_define_dir`
6617
6618cat >>confdefs.h <<_ACEOF
6dea1fbd 6619#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6620_ACEOF
6621
6622
6623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6624$as_echo "$with_auto_load_safe_path" >&6; }
6625
29b0e8a2 6626
20e95c23 6627
5ae98d25 6628subdirs="$subdirs testsuite"
20e95c23
DJ
6629
6630
783e057b 6631# Check whether to support alternative target configurations
81ecdfbb
RW
6632# Check whether --enable-targets was given.
6633if test "${enable_targets+set}" = set; then :
6634 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6635 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6636 ;;
6637 no) enable_targets= ;;
6638 *) enable_targets=$enableval ;;
6639esac
81ecdfbb
RW
6640fi
6641
20e95c23 6642
783e057b 6643# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6644# Check whether --enable-64-bit-bfd was given.
6645if test "${enable_64_bit_bfd+set}" = set; then :
6646 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6647 yes) want64=true ;;
6648 no) want64=false ;;
d0ac1c44 6649 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6650esac
6651else
6652 want64=false
81ecdfbb
RW
6653fi
6654
783e057b
DJ
6655# Provide defaults for some variables set by the per-host and per-target
6656# configuration.
6657gdb_host_obs=posix-hdep.o
20e95c23 6658
783e057b
DJ
6659if test "${target}" = "${host}"; then
6660 gdb_native=yes
6661else
6662 gdb_native=no
6663fi
20e95c23 6664
783e057b 6665. $srcdir/configure.host
20e95c23 6666
fb23d554
SDJ
6667# Add in the common host objects.
6668. $srcdir/common/common.host
6669gdb_host_obs="$gdb_host_obs $common_host_obs"
6670
783e057b 6671# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6672
783e057b
DJ
6673TARGET_OBS=
6674all_targets=
b292c783 6675HAVE_NATIVE_GCORE_TARGET=
20e95c23 6676
783e057b 6677for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6678do
783e057b
DJ
6679 if test "$targ_alias" = "all"; then
6680 all_targets=true
6681 else
6682 # Canonicalize the secondary target names.
6683 result=`$ac_config_sub $targ_alias 2>/dev/null`
6684 if test -n "$result"; then
6685 targ=$result
6686 else
6687 targ=$targ_alias
6688 fi
20e95c23 6689
783e057b 6690 . ${srcdir}/configure.tgt
20e95c23 6691
bf307134 6692 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6693 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6694fi
6695
783e057b
DJ
6696 # Target-specific object files
6697 for i in ${gdb_target_obs}; do
6698 case " $TARGET_OBS " in
6699 *" ${i} "*) ;;
6700 *)
6701 TARGET_OBS="$TARGET_OBS ${i}"
6702 ;;
6703 esac
6704 done
20e95c23 6705
783e057b
DJ
6706 # Check whether this target needs 64-bit CORE_ADDR
6707 if test x${want64} = xfalse; then
6708 . ${srcdir}/../bfd/config.bfd
6709 fi
b292c783
JK
6710
6711 # Check whether this target is native and supports gcore.
6712 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6713 && $gdb_have_gcore; then
6714 HAVE_NATIVE_GCORE_TARGET=1
6715 fi
783e057b 6716 fi
20e95c23
DJ
6717done
6718
783e057b
DJ
6719if test x${all_targets} = xtrue; then
6720
6721 # We want all 64-bit targets if we either:
6722 # - run on a 64-bit host or
6723 # - already require 64-bit support for some other target or
6724 # - the --enable-64-bit-bfd option was supplied
6725 # Otherwise we only support all 32-bit targets.
6726 #
6727 # NOTE: This test must be in sync with the corresponding
6728 # tests in BFD!
20e95c23 6729
783e057b 6730 if test x${want64} = xfalse; then
81ecdfbb
RW
6731 # The cast to long int works around a bug in the HP C Compiler
6732# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6733# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6734# This bug is HP SR number 8606223364.
6735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6736$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6737if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6738 $as_echo_n "(cached) " >&6
c0993dbe 6739else
81ecdfbb 6740 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6741
81ecdfbb
RW
6742else
6743 if test "$ac_cv_type_long" = yes; then
6744 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6745$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6746as_fn_error 77 "cannot compute sizeof (long)
6747See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6748 else
6749 ac_cv_sizeof_long=0
6750 fi
c0993dbe 6751fi
81ecdfbb 6752
c0993dbe 6753fi
81ecdfbb
RW
6754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6755$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6756
c0993dbe 6757
c0993dbe 6758
c0993dbe
UW
6759cat >>confdefs.h <<_ACEOF
6760#define SIZEOF_LONG $ac_cv_sizeof_long
6761_ACEOF
6762
6763
6764 if test "x${ac_cv_sizeof_long}" = "x8"; then
6765 want64=true
6766 fi
6767 fi
6768 if test x${want64} = xtrue; then
6769 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6770 else
6771 TARGET_OBS='$(ALL_TARGET_OBS)'
6772 fi
6773fi
6774
6775
6776
b292c783 6777
c0993dbe
UW
6778# For other settings, only the main target counts.
6779gdb_sim=
6780gdb_osabi=
6781build_gdbserver=
6782targ=$target; . ${srcdir}/configure.tgt
6783
6784# Fetch the default architecture and default target vector from BFD.
6785targ=$target; . $srcdir/../bfd/config.bfd
6786
6787# We only want the first architecture, so strip off the others if
6788# there is more than one.
6789targ_archs=`echo $targ_archs | sed 's/ .*//'`
6790
6791if test "x$targ_archs" != x; then
6792
6793cat >>confdefs.h <<_ACEOF
6794#define DEFAULT_BFD_ARCH $targ_archs
6795_ACEOF
6796
6797fi
6798if test "x$targ_defvec" != x; then
6799
6800cat >>confdefs.h <<_ACEOF
6801#define DEFAULT_BFD_VEC $targ_defvec
6802_ACEOF
6803
6804fi
6805
c0993dbe 6806# Enable MI.
81ecdfbb
RW
6807# Check whether --enable-gdbmi was given.
6808if test "${enable_gdbmi+set}" = set; then :
6809 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6810 yes | no)
6811 ;;
6812 *)
d0ac1c44 6813 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6814 esac
6815else
6816 enable_gdbmi=yes
81ecdfbb
RW
6817fi
6818
c0993dbe
UW
6819if test x"$enable_gdbmi" = xyes; then
6820 if test -d $srcdir/mi; then
6821 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6822 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6823 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6824 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6825 fi
6826fi
6827
6828# Enable TUI.
81ecdfbb
RW
6829# Check whether --enable-tui was given.
6830if test "${enable_tui+set}" = set; then :
6831 enableval=$enable_tui; case $enableval in
3ca64bd3 6832 yes | no | auto)
c0993dbe
UW
6833 ;;
6834 *)
d0ac1c44 6835 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6836 esac
6837else
3ca64bd3 6838 enable_tui=auto
81ecdfbb
RW
6839fi
6840
c0993dbe
UW
6841
6842# Enable gdbtk.
81ecdfbb
RW
6843# Check whether --enable-gdbtk was given.
6844if test "${enable_gdbtk+set}" = set; then :
6845 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6846 yes | no)
6847 ;;
6848 *)
d0ac1c44 6849 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6850 esac
6851else
5062cc19 6852 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6853 enable_gdbtk=yes
6854 else
6855 enable_gdbtk=no
6856 fi
81ecdfbb
RW
6857fi
6858
c0993dbe
UW
6859# We unconditionally disable gdbtk tests on selected platforms.
6860case $host_os in
6861 go32* | windows*)
81ecdfbb
RW
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6863$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6864 enable_gdbtk=no ;;
6865esac
6866
05e7c244 6867# Libunwind support for ia64.
bec39cab 6868
05e7c244
JK
6869
6870# Check whether --with-libunwind-ia64 was given.
6871if test "${with_libunwind_ia64+set}" = set; then :
6872 withval=$with_libunwind_ia64;
bec39cab 6873else
05e7c244
JK
6874 with_libunwind_ia64=auto
6875fi
bec39cab 6876
05e7c244
JK
6877
6878# Backward compatibility option.
6879if test "${with_libunwind+set}" = set; then
6880 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6881 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6882 fi
6883 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6884$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6885 with_libunwind_ia64="$with_libunwind"
6886fi
6887
6888case "$with_libunwind_ia64" in
6889 yes | no)
6890 ;;
6891 auto)
6892 for ac_header in libunwind-ia64.h
81ecdfbb 6893do :
b54a8fd7 6894 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6895if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6896 cat >>confdefs.h <<_ACEOF
b54a8fd7 6897#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6898_ACEOF
6899
6900fi
6901
6902done
6903
05e7c244
JK
6904 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6905 ;;
6906 *)
d0ac1c44 6907 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6908 ;;
6909esac
bec39cab 6910
05e7c244 6911if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6912 for ac_header in libunwind-ia64.h
81ecdfbb 6913do :
b54a8fd7 6914 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6915if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6916 cat >>confdefs.h <<_ACEOF
b54a8fd7 6917#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6918_ACEOF
6919
6920fi
6921
6922done
6923
05e7c244 6924 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6925 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6926 fi
6927 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6928 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6929 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6930fi
6931
cb01cfba
JB
6932opt_curses=no
6933
81ecdfbb
RW
6934# Check whether --with-curses was given.
6935if test "${with_curses+set}" = set; then :
6936 withval=$with_curses; opt_curses=$withval
6937fi
6938
cb01cfba 6939
76a39ba7 6940prefer_curses=no
cb01cfba 6941if test "$opt_curses" = "yes"; then
76a39ba7 6942 prefer_curses=yes
cb01cfba
JB
6943fi
6944
a9322a30 6945# Profiling support.
81ecdfbb
RW
6946# Check whether --enable-profiling was given.
6947if test "${enable_profiling+set}" = set; then :
6948 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6949 yes | no)
6950 ;;
6951 *)
d0ac1c44 6952 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6953 esac
6954else
6955 enable_profiling=no
81ecdfbb 6956fi
bec39cab 6957
a9322a30
TT
6958
6959for ac_func in monstartup _mcleanup
81ecdfbb
RW
6960do :
6961 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6962ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6963if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6964 cat >>confdefs.h <<_ACEOF
6965#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6966_ACEOF
a9322a30 6967
81ecdfbb
RW
6968fi
6969done
a9322a30 6970
81ecdfbb
RW
6971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6972$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6973if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6974 $as_echo_n "(cached) " >&6
6975else
6976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6977/* end confdefs.h. */
6978#include <stdlib.h>
6979extern char _etext;
a9322a30
TT
6980
6981int
6982main ()
6983{
6984free (&_etext);
6985 ;
6986 return 0;
6987}
bec39cab 6988_ACEOF
81ecdfbb 6989if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6990 ac_cv_var__etext=yes
bec39cab 6991else
81ecdfbb 6992 ac_cv_var__etext=no
bec39cab 6993fi
81ecdfbb
RW
6994rm -f core conftest.err conftest.$ac_objext \
6995 conftest$ac_exeext conftest.$ac_ext
bec39cab 6996fi
81ecdfbb
RW
6997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6998$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6999if test $ac_cv_var__etext = yes; then
60ca704f 7000
81ecdfbb 7001$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7002
bec39cab 7003fi
81ecdfbb
RW
7004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7005$as_echo_n "checking for etext... " >&6; }
d0ac1c44 7006if ${ac_cv_var_etext+:} false; then :
81ecdfbb 7007 $as_echo_n "(cached) " >&6
bec39cab 7008else
81ecdfbb 7009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7010/* end confdefs.h. */
a9322a30
TT
7011#include <stdlib.h>
7012extern char etext;
bec39cab
AC
7013
7014int
7015main ()
7016{
a9322a30 7017free (&etext);
bec39cab
AC
7018 ;
7019 return 0;
7020}
7021_ACEOF
81ecdfbb 7022if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7023 ac_cv_var_etext=yes
bec39cab 7024else
81ecdfbb 7025 ac_cv_var_etext=no
bec39cab 7026fi
81ecdfbb
RW
7027rm -f core conftest.err conftest.$ac_objext \
7028 conftest$ac_exeext conftest.$ac_ext
bec39cab 7029fi
81ecdfbb
RW
7030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7031$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
7032if test $ac_cv_var_etext = yes; then
7033
81ecdfbb 7034$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7035
7036fi
a9322a30
TT
7037if test "$enable_profiling" = yes ; then
7038 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
d0ac1c44 7039 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7040 fi
7041 PROFILE_CFLAGS=-pg
7042 OLD_CFLAGS="$CFLAGS"
7043 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7044
81ecdfbb
RW
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7046$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7047if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7048 $as_echo_n "(cached) " >&6
bec39cab 7049else
81ecdfbb 7050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7051/* end confdefs.h. */
bec39cab
AC
7052
7053int
7054main ()
7055{
a9322a30 7056int x;
bec39cab
AC
7057 ;
7058 return 0;
7059}
7060_ACEOF
81ecdfbb 7061if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7062 ac_cv_cc_supports_pg=yes
bec39cab 7063else
81ecdfbb 7064 ac_cv_cc_supports_pg=no
bec39cab 7065fi
81ecdfbb 7066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7067fi
81ecdfbb
RW
7068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7069$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7070
a9322a30 7071 if test $ac_cv_cc_supports_pg = no; then
d0ac1c44 7072 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7073 fi
bec39cab 7074
a9322a30 7075 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7076fi
7077
44cee4fd
TT
7078CODESIGN_CERT=
7079# Check whether --enable-codesign was given.
7080if test "${enable_codesign+set}" = set; then :
7081 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7082fi
7083
7084
7085
c16158bc
JM
7086
7087
81ecdfbb
RW
7088# Check whether --with-pkgversion was given.
7089if test "${with_pkgversion+set}" = set; then :
7090 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7091 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7092 no) PKGVERSION= ;;
7093 *) PKGVERSION="($withval) " ;;
7094 esac
7095else
7096 PKGVERSION="(GDB) "
7097
81ecdfbb 7098fi
c16158bc
JM
7099
7100
7101
7102
81ecdfbb
RW
7103
7104# Check whether --with-bugurl was given.
7105if test "${with_bugurl+set}" = set; then :
7106 withval=$with_bugurl; case "$withval" in
d0ac1c44 7107 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7108 no) BUGURL=
7109 ;;
7110 *) BUGURL="$withval"
7111 ;;
7112 esac
7113else
7114 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7115
81ecdfbb
RW
7116fi
7117
c16158bc
JM
7118 case ${BUGURL} in
7119 "")
7120 REPORT_BUGS_TO=
7121 REPORT_BUGS_TEXI=
7122 ;;
7123 *)
7124 REPORT_BUGS_TO="<$BUGURL>"
7125 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7126 ;;
7127 esac;
7128
7129
7130
7131
7132cat >>confdefs.h <<_ACEOF
7133#define PKGVERSION "$PKGVERSION"
7134_ACEOF
7135
7136
7137cat >>confdefs.h <<_ACEOF
7138#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7139_ACEOF
7140
7141
bec39cab
AC
7142# --------------------- #
7143# Checks for programs. #
7144# --------------------- #
7145
7146for ac_prog in gawk mawk nawk awk
7147do
7148 # Extract the first word of "$ac_prog", so it can be a program name with args.
7149set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7151$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7152if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7153 $as_echo_n "(cached) " >&6
bec39cab
AC
7154else
7155 if test -n "$AWK"; then
7156 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7157else
7158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7159for as_dir in $PATH
7160do
7161 IFS=$as_save_IFS
7162 test -z "$as_dir" && as_dir=.
81ecdfbb 7163 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7164 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7165 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7166 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7167 break 2
7168 fi
7169done
81ecdfbb
RW
7170 done
7171IFS=$as_save_IFS
bec39cab
AC
7172
7173fi
7174fi
7175AWK=$ac_cv_prog_AWK
7176if test -n "$AWK"; then
81ecdfbb
RW
7177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7178$as_echo "$AWK" >&6; }
bec39cab 7179else
81ecdfbb
RW
7180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7181$as_echo "no" >&6; }
bec39cab
AC
7182fi
7183
bec39cab 7184
81ecdfbb 7185 test -n "$AWK" && break
bec39cab
AC
7186done
7187
c971b7fa
PA
7188# Find a good install program. We prefer a C program (faster),
7189# so one script is as good as another. But avoid the broken or
7190# incompatible versions:
7191# SysV /etc/install, /usr/sbin/install
7192# SunOS /usr/etc/install
7193# IRIX /sbin/install
7194# AIX /bin/install
7195# AmigaOS /C/install, which installs bootblocks on floppy discs
7196# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7197# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7198# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7199# OS/2's system install, which has a completely different semantic
7200# ./install, which can be erroneously created by make from ./install.sh.
7201# Reject install programs that cannot install multiple files.
7202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7203$as_echo_n "checking for a BSD-compatible install... " >&6; }
7204if test -z "$INSTALL"; then
d0ac1c44 7205if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7206 $as_echo_n "(cached) " >&6
7207else
7208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7209for as_dir in $PATH
7210do
7211 IFS=$as_save_IFS
7212 test -z "$as_dir" && as_dir=.
7213 # Account for people who put trailing slashes in PATH elements.
7214case $as_dir/ in #((
7215 ./ | .// | /[cC]/* | \
7216 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7217 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7218 /usr/ucb/* ) ;;
7219 *)
7220 # OSF1 and SCO ODT 3.0 have their own names for install.
7221 # Don't use installbsd from OSF since it installs stuff as root
7222 # by default.
7223 for ac_prog in ginstall scoinst install; do
7224 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7225 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7226 if test $ac_prog = install &&
7227 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7228 # AIX install. It has an incompatible calling convention.
7229 :
7230 elif test $ac_prog = install &&
7231 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7232 # program-specific install script used by HP pwplus--don't use.
7233 :
7234 else
7235 rm -rf conftest.one conftest.two conftest.dir
7236 echo one > conftest.one
7237 echo two > conftest.two
7238 mkdir conftest.dir
7239 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7240 test -s conftest.one && test -s conftest.two &&
7241 test -s conftest.dir/conftest.one &&
7242 test -s conftest.dir/conftest.two
7243 then
7244 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7245 break 3
7246 fi
7247 fi
7248 fi
7249 done
7250 done
7251 ;;
7252esac
7253
7254 done
7255IFS=$as_save_IFS
7256
7257rm -rf conftest.one conftest.two conftest.dir
7258
7259fi
7260 if test "${ac_cv_path_install+set}" = set; then
7261 INSTALL=$ac_cv_path_install
7262 else
7263 # As a last resort, use the slow shell script. Don't cache a
7264 # value for INSTALL within a source directory, because that will
7265 # break other packages using the cache if that directory is
7266 # removed, or if the value is a relative name.
7267 INSTALL=$ac_install_sh
7268 fi
7269fi
7270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7271$as_echo "$INSTALL" >&6; }
7272
7273# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7274# It thinks the first close brace ends the variable substitution.
7275test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7276
7277test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7278
7279test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7280
81ecdfbb
RW
7281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7282$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7283LN_S=$as_ln_s
7284if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7286$as_echo "yes" >&6; }
bec39cab 7287else
81ecdfbb
RW
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7289$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7290fi
7291
7292if test -n "$ac_tool_prefix"; then
7293 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7294set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7296$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7297if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7298 $as_echo_n "(cached) " >&6
bec39cab
AC
7299else
7300 if test -n "$RANLIB"; then
7301 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7302else
7303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7304for as_dir in $PATH
7305do
7306 IFS=$as_save_IFS
7307 test -z "$as_dir" && as_dir=.
81ecdfbb 7308 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7309 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7310 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7311 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7312 break 2
7313 fi
7314done
81ecdfbb
RW
7315 done
7316IFS=$as_save_IFS
bec39cab
AC
7317
7318fi
7319fi
7320RANLIB=$ac_cv_prog_RANLIB
7321if test -n "$RANLIB"; then
81ecdfbb
RW
7322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7323$as_echo "$RANLIB" >&6; }
bec39cab 7324else
81ecdfbb
RW
7325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7326$as_echo "no" >&6; }
bec39cab
AC
7327fi
7328
81ecdfbb 7329
bec39cab
AC
7330fi
7331if test -z "$ac_cv_prog_RANLIB"; then
7332 ac_ct_RANLIB=$RANLIB
7333 # Extract the first word of "ranlib", so it can be a program name with args.
7334set dummy ranlib; ac_word=$2
81ecdfbb
RW
7335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7336$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7337if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7338 $as_echo_n "(cached) " >&6
bec39cab
AC
7339else
7340 if test -n "$ac_ct_RANLIB"; then
7341 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7342else
7343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7344for as_dir in $PATH
7345do
7346 IFS=$as_save_IFS
7347 test -z "$as_dir" && as_dir=.
81ecdfbb 7348 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7349 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7350 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7352 break 2
7353 fi
7354done
81ecdfbb
RW
7355 done
7356IFS=$as_save_IFS
bec39cab 7357
bec39cab
AC
7358fi
7359fi
7360ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7361if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7363$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7364else
81ecdfbb
RW
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366$as_echo "no" >&6; }
bec39cab
AC
7367fi
7368
81ecdfbb
RW
7369 if test "x$ac_ct_RANLIB" = x; then
7370 RANLIB=":"
7371 else
7372 case $cross_compiling:$ac_tool_warned in
7373yes:)
7374{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7375$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7376ac_tool_warned=yes ;;
7377esac
7378 RANLIB=$ac_ct_RANLIB
7379 fi
bec39cab
AC
7380else
7381 RANLIB="$ac_cv_prog_RANLIB"
7382fi
7383
7384for ac_prog in 'bison -y' byacc
7385do
7386 # Extract the first word of "$ac_prog", so it can be a program name with args.
7387set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7389$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7390if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7391 $as_echo_n "(cached) " >&6
bec39cab
AC
7392else
7393 if test -n "$YACC"; then
7394 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7395else
7396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7397for as_dir in $PATH
7398do
7399 IFS=$as_save_IFS
7400 test -z "$as_dir" && as_dir=.
81ecdfbb 7401 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7402 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7403 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7405 break 2
7406 fi
7407done
81ecdfbb
RW
7408 done
7409IFS=$as_save_IFS
bec39cab
AC
7410
7411fi
7412fi
7413YACC=$ac_cv_prog_YACC
7414if test -n "$YACC"; then
81ecdfbb
RW
7415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7416$as_echo "$YACC" >&6; }
bec39cab 7417else
81ecdfbb
RW
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7419$as_echo "no" >&6; }
bec39cab
AC
7420fi
7421
81ecdfbb 7422
bec39cab
AC
7423 test -n "$YACC" && break
7424done
7425test -n "$YACC" || YACC="yacc"
7426
7427
7428if test -n "$ac_tool_prefix"; then
7429 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7430set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7433if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7434 $as_echo_n "(cached) " >&6
bec39cab
AC
7435else
7436 if test -n "$AR"; then
7437 ac_cv_prog_AR="$AR" # Let the user override the test.
7438else
7439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7440for as_dir in $PATH
7441do
7442 IFS=$as_save_IFS
7443 test -z "$as_dir" && as_dir=.
81ecdfbb 7444 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7445 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7446 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7447 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7448 break 2
7449 fi
7450done
81ecdfbb
RW
7451 done
7452IFS=$as_save_IFS
bec39cab
AC
7453
7454fi
7455fi
7456AR=$ac_cv_prog_AR
7457if test -n "$AR"; then
81ecdfbb
RW
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7459$as_echo "$AR" >&6; }
bec39cab 7460else
81ecdfbb
RW
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7462$as_echo "no" >&6; }
bec39cab
AC
7463fi
7464
81ecdfbb 7465
bec39cab
AC
7466fi
7467if test -z "$ac_cv_prog_AR"; then
7468 ac_ct_AR=$AR
7469 # Extract the first word of "ar", so it can be a program name with args.
7470set dummy ar; ac_word=$2
81ecdfbb
RW
7471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7472$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7473if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7474 $as_echo_n "(cached) " >&6
bec39cab
AC
7475else
7476 if test -n "$ac_ct_AR"; then
7477 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7478else
7479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7480for as_dir in $PATH
7481do
7482 IFS=$as_save_IFS
7483 test -z "$as_dir" && as_dir=.
81ecdfbb 7484 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7485 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7486 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7487 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7488 break 2
7489 fi
7490done
81ecdfbb
RW
7491 done
7492IFS=$as_save_IFS
bec39cab
AC
7493
7494fi
7495fi
7496ac_ct_AR=$ac_cv_prog_ac_ct_AR
7497if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7499$as_echo "$ac_ct_AR" >&6; }
bec39cab 7500else
81ecdfbb
RW
7501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502$as_echo "no" >&6; }
bec39cab
AC
7503fi
7504
81ecdfbb
RW
7505 if test "x$ac_ct_AR" = x; then
7506 AR=""
7507 else
7508 case $cross_compiling:$ac_tool_warned in
7509yes:)
7510{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7511$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7512ac_tool_warned=yes ;;
7513esac
7514 AR=$ac_ct_AR
7515 fi
bec39cab
AC
7516else
7517 AR="$ac_cv_prog_AR"
7518fi
7519
7520if test -n "$ac_tool_prefix"; then
7521 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7522set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7524$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7525if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7526 $as_echo_n "(cached) " >&6
bec39cab
AC
7527else
7528 if test -n "$DLLTOOL"; then
7529 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7530else
7531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7532for as_dir in $PATH
7533do
7534 IFS=$as_save_IFS
7535 test -z "$as_dir" && as_dir=.
81ecdfbb 7536 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7538 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7540 break 2
7541 fi
7542done
81ecdfbb
RW
7543 done
7544IFS=$as_save_IFS
bec39cab
AC
7545
7546fi
7547fi
7548DLLTOOL=$ac_cv_prog_DLLTOOL
7549if test -n "$DLLTOOL"; then
81ecdfbb
RW
7550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7551$as_echo "$DLLTOOL" >&6; }
bec39cab 7552else
81ecdfbb
RW
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554$as_echo "no" >&6; }
bec39cab
AC
7555fi
7556
81ecdfbb 7557
bec39cab
AC
7558fi
7559if test -z "$ac_cv_prog_DLLTOOL"; then
7560 ac_ct_DLLTOOL=$DLLTOOL
7561 # Extract the first word of "dlltool", so it can be a program name with args.
7562set dummy dlltool; ac_word=$2
81ecdfbb
RW
7563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7564$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7565if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7566 $as_echo_n "(cached) " >&6
bec39cab
AC
7567else
7568 if test -n "$ac_ct_DLLTOOL"; then
7569 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7570else
7571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7572for as_dir in $PATH
7573do
7574 IFS=$as_save_IFS
7575 test -z "$as_dir" && as_dir=.
81ecdfbb 7576 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7577 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7578 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7579 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7580 break 2
7581 fi
7582done
81ecdfbb
RW
7583 done
7584IFS=$as_save_IFS
bec39cab
AC
7585
7586fi
7587fi
7588ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7589if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7591$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7592else
81ecdfbb
RW
7593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7594$as_echo "no" >&6; }
bec39cab
AC
7595fi
7596
81ecdfbb
RW
7597 if test "x$ac_ct_DLLTOOL" = x; then
7598 DLLTOOL=""
7599 else
7600 case $cross_compiling:$ac_tool_warned in
7601yes:)
7602{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7603$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7604ac_tool_warned=yes ;;
7605esac
7606 DLLTOOL=$ac_ct_DLLTOOL
7607 fi
bec39cab
AC
7608else
7609 DLLTOOL="$ac_cv_prog_DLLTOOL"
7610fi
7611
7612if test -n "$ac_tool_prefix"; then
7613 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7614set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7616$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7617if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7618 $as_echo_n "(cached) " >&6
bec39cab
AC
7619else
7620 if test -n "$WINDRES"; then
7621 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7622else
7623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7624for as_dir in $PATH
7625do
7626 IFS=$as_save_IFS
7627 test -z "$as_dir" && as_dir=.
81ecdfbb 7628 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7630 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7632 break 2
7633 fi
7634done
81ecdfbb
RW
7635 done
7636IFS=$as_save_IFS
bec39cab
AC
7637
7638fi
7639fi
7640WINDRES=$ac_cv_prog_WINDRES
7641if test -n "$WINDRES"; then
81ecdfbb
RW
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7643$as_echo "$WINDRES" >&6; }
bec39cab 7644else
81ecdfbb
RW
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7646$as_echo "no" >&6; }
bec39cab
AC
7647fi
7648
81ecdfbb 7649
bec39cab
AC
7650fi
7651if test -z "$ac_cv_prog_WINDRES"; then
7652 ac_ct_WINDRES=$WINDRES
7653 # Extract the first word of "windres", so it can be a program name with args.
7654set dummy windres; ac_word=$2
81ecdfbb
RW
7655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7656$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7657if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7658 $as_echo_n "(cached) " >&6
bec39cab
AC
7659else
7660 if test -n "$ac_ct_WINDRES"; then
7661 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7662else
7663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7664for as_dir in $PATH
7665do
7666 IFS=$as_save_IFS
7667 test -z "$as_dir" && as_dir=.
81ecdfbb 7668 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7670 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7672 break 2
7673 fi
7674done
81ecdfbb
RW
7675 done
7676IFS=$as_save_IFS
bec39cab
AC
7677
7678fi
7679fi
7680ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7681if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7683$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7684else
81ecdfbb
RW
7685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7686$as_echo "no" >&6; }
c906108c 7687fi
bec39cab 7688
81ecdfbb
RW
7689 if test "x$ac_ct_WINDRES" = x; then
7690 WINDRES=""
7691 else
7692 case $cross_compiling:$ac_tool_warned in
7693yes:)
7694{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7695$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7696ac_tool_warned=yes ;;
7697esac
7698 WINDRES=$ac_ct_WINDRES
7699 fi
c906108c 7700else
bec39cab 7701 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7702fi
7703
bec39cab 7704
036c3acb
TS
7705case $host_os in
7706 gnu*)
7707 # Needed for GNU Hurd hosts.
7708 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7709 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7710set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7712$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7713if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7714 $as_echo_n "(cached) " >&6
c906108c 7715else
bec39cab
AC
7716 if test -n "$MIG"; then
7717 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7718else
7719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7720for as_dir in $PATH
7721do
7722 IFS=$as_save_IFS
7723 test -z "$as_dir" && as_dir=.
81ecdfbb 7724 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7726 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7728 break 2
7729 fi
7730done
81ecdfbb
RW
7731 done
7732IFS=$as_save_IFS
bec39cab 7733
c906108c 7734fi
bec39cab
AC
7735fi
7736MIG=$ac_cv_prog_MIG
7737if test -n "$MIG"; then
81ecdfbb
RW
7738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7739$as_echo "$MIG" >&6; }
c906108c 7740else
81ecdfbb
RW
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7742$as_echo "no" >&6; }
c906108c
SS
7743fi
7744
81ecdfbb 7745
bec39cab
AC
7746fi
7747if test -z "$ac_cv_prog_MIG"; then
7748 ac_ct_MIG=$MIG
7749 # Extract the first word of "mig", so it can be a program name with args.
7750set dummy mig; ac_word=$2
81ecdfbb
RW
7751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7752$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7753if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7754 $as_echo_n "(cached) " >&6
bec39cab
AC
7755else
7756 if test -n "$ac_ct_MIG"; then
7757 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7758else
7759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7760for as_dir in $PATH
7761do
7762 IFS=$as_save_IFS
7763 test -z "$as_dir" && as_dir=.
81ecdfbb 7764 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7765 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7766 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7767 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7768 break 2
7769 fi
7770done
81ecdfbb
RW
7771 done
7772IFS=$as_save_IFS
c906108c 7773
bec39cab
AC
7774fi
7775fi
7776ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7777if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7779$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7780else
81ecdfbb
RW
7781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7782$as_echo "no" >&6; }
bec39cab 7783fi
c906108c 7784
81ecdfbb
RW
7785 if test "x$ac_ct_MIG" = x; then
7786 MIG=""
7787 else
7788 case $cross_compiling:$ac_tool_warned in
7789yes:)
7790{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7791$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7792ac_tool_warned=yes ;;
7793esac
7794 MIG=$ac_ct_MIG
7795 fi
bec39cab
AC
7796else
7797 MIG="$ac_cv_prog_MIG"
7798fi
c906108c 7799
036c3acb 7800 if test x"$MIG" = x; then
d0ac1c44 7801 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7802 fi
7803 ;;
7804esac
c906108c 7805
bec39cab
AC
7806# ---------------------- #
7807# Checks for libraries. #
7808# ---------------------- #
c906108c 7809
bec39cab 7810# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7812$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7813if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7814 $as_echo_n "(cached) " >&6
bec39cab
AC
7815else
7816 ac_check_lib_save_LIBS=$LIBS
7817LIBS="-lm $LIBS"
81ecdfbb 7818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7819/* end confdefs.h. */
c906108c 7820
c906108c 7821
bec39cab
AC
7822int
7823main ()
7824{
81ecdfbb 7825return main ();
bec39cab
AC
7826 ;
7827 return 0;
7828}
7829_ACEOF
81ecdfbb 7830if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7831 ac_cv_lib_m_main=yes
7832else
81ecdfbb 7833 ac_cv_lib_m_main=no
bec39cab 7834fi
81ecdfbb
RW
7835rm -f core conftest.err conftest.$ac_objext \
7836 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7837LIBS=$ac_check_lib_save_LIBS
7838fi
81ecdfbb
RW
7839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7840$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7841if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7842 cat >>confdefs.h <<_ACEOF
7843#define HAVE_LIBM 1
7844_ACEOF
7845
7846 LIBS="-lm $LIBS"
c906108c 7847
c906108c 7848fi
bec39cab
AC
7849
7850
bec39cab 7851# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7853$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7854if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7855 $as_echo_n "(cached) " >&6
bec39cab
AC
7856else
7857 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7859/* end confdefs.h. */
ddc9cd0f 7860
81ecdfbb
RW
7861/* Override any GCC internal prototype to avoid an error.
7862 Use char because int might match the return type of a GCC
7863 builtin and then its argument prototype would still apply. */
bec39cab
AC
7864#ifdef __cplusplus
7865extern "C"
7866#endif
bec39cab
AC
7867char gethostbyname ();
7868int
7869main ()
7870{
81ecdfbb 7871return gethostbyname ();
bec39cab
AC
7872 ;
7873 return 0;
7874}
7875_ACEOF
81ecdfbb
RW
7876for ac_lib in '' nsl; do
7877 if test -z "$ac_lib"; then
7878 ac_res="none required"
7879 else
7880 ac_res=-l$ac_lib
b4e70030 7881 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7882 fi
7883 if ac_fn_c_try_link "$LINENO"; then :
7884 ac_cv_search_gethostbyname=$ac_res
7885fi
7886rm -f core conftest.err conftest.$ac_objext \
7887 conftest$ac_exeext
d0ac1c44 7888 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7889 break
7890fi
7891done
d0ac1c44 7892if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7893
bec39cab 7894else
81ecdfbb 7895 ac_cv_search_gethostbyname=no
bec39cab 7896fi
81ecdfbb 7897rm conftest.$ac_ext
bec39cab
AC
7898LIBS=$ac_func_search_save_LIBS
7899fi
81ecdfbb
RW
7900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7901$as_echo "$ac_cv_search_gethostbyname" >&6; }
7902ac_res=$ac_cv_search_gethostbyname
7903if test "$ac_res" != no; then :
7904 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7905
bec39cab 7906fi
96baa820 7907
c906108c 7908
b4e70030 7909# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7911$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7912if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7913 $as_echo_n "(cached) " >&6
b4e70030
JB
7914else
7915 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7917/* end confdefs.h. */
7918
81ecdfbb
RW
7919/* Override any GCC internal prototype to avoid an error.
7920 Use char because int might match the return type of a GCC
7921 builtin and then its argument prototype would still apply. */
b4e70030
JB
7922#ifdef __cplusplus
7923extern "C"
7924#endif
b4e70030
JB
7925char socketpair ();
7926int
7927main ()
7928{
81ecdfbb 7929return socketpair ();
b4e70030
JB
7930 ;
7931 return 0;
7932}
7933_ACEOF
81ecdfbb
RW
7934for ac_lib in '' socket; do
7935 if test -z "$ac_lib"; then
7936 ac_res="none required"
7937 else
7938 ac_res=-l$ac_lib
b4e70030 7939 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7940 fi
7941 if ac_fn_c_try_link "$LINENO"; then :
7942 ac_cv_search_socketpair=$ac_res
7943fi
7944rm -f core conftest.err conftest.$ac_objext \
7945 conftest$ac_exeext
d0ac1c44 7946 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7947 break
7948fi
7949done
d0ac1c44 7950if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7951
b4e70030 7952else
81ecdfbb 7953 ac_cv_search_socketpair=no
b4e70030 7954fi
81ecdfbb 7955rm conftest.$ac_ext
b4e70030
JB
7956LIBS=$ac_func_search_save_LIBS
7957fi
81ecdfbb
RW
7958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7959$as_echo "$ac_cv_search_socketpair" >&6; }
7960ac_res=$ac_cv_search_socketpair
7961if test "$ac_res" != no; then :
7962 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7963
7964fi
7965
7966
233a11ab 7967# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7968
711a72d3 7969 # Use the system's zlib library.
39f3de7c
L
7970 zlibdir="-L\$(top_builddir)/../zlib"
7971 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7972
711a72d3
L
7973# Check whether --with-system-zlib was given.
7974if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7975 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7976 zlibdir=
7977 zlibinc=
7978 fi
b040ad30 7979
233a11ab 7980fi
233a11ab 7981
233a11ab 7982
233a11ab 7983
b040ad30 7984
233a11ab 7985
25268153 7986# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7987# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7989$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7990if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7991 $as_echo_n "(cached) " >&6
7992else
7993 ac_func_search_save_LIBS=$LIBS
7994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7995/* end confdefs.h. */
7996
7997/* Override any GCC internal prototype to avoid an error.
7998 Use char because int might match the return type of a GCC
7999 builtin and then its argument prototype would still apply. */
8000#ifdef __cplusplus
8001extern "C"
8002#endif
8003char kinfo_getvmmap ();
8004int
8005main ()
8006{
8007return kinfo_getvmmap ();
8008 ;
8009 return 0;
8010}
8011_ACEOF
37773e78 8012for ac_lib in '' util util-freebsd; do
25268153
JB
8013 if test -z "$ac_lib"; then
8014 ac_res="none required"
8015 else
8016 ac_res=-l$ac_lib
8017 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8018 fi
8019 if ac_fn_c_try_link "$LINENO"; then :
8020 ac_cv_search_kinfo_getvmmap=$ac_res
8021fi
8022rm -f core conftest.err conftest.$ac_objext \
8023 conftest$ac_exeext
d0ac1c44 8024 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8025 break
8026fi
8027done
d0ac1c44 8028if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8029
8030else
8031 ac_cv_search_kinfo_getvmmap=no
8032fi
8033rm conftest.$ac_ext
8034LIBS=$ac_func_search_save_LIBS
8035fi
8036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8037$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8038ac_res=$ac_cv_search_kinfo_getvmmap
8039if test "$ac_res" != no; then :
8040 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8041
8042$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8043
8044fi
8045
8046
92fce24d
JB
8047# fbsd-nat.c can also use kinfo_getfile.
8048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8049$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
d0ac1c44 8050if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8051 $as_echo_n "(cached) " >&6
8052else
8053 ac_func_search_save_LIBS=$LIBS
8054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8055/* end confdefs.h. */
8056
8057/* Override any GCC internal prototype to avoid an error.
8058 Use char because int might match the return type of a GCC
8059 builtin and then its argument prototype would still apply. */
8060#ifdef __cplusplus
8061extern "C"
8062#endif
8063char kinfo_getfile ();
8064int
8065main ()
8066{
8067return kinfo_getfile ();
8068 ;
8069 return 0;
8070}
8071_ACEOF
8072for ac_lib in '' util util-freebsd; do
8073 if test -z "$ac_lib"; then
8074 ac_res="none required"
8075 else
8076 ac_res=-l$ac_lib
8077 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8078 fi
8079 if ac_fn_c_try_link "$LINENO"; then :
8080 ac_cv_search_kinfo_getfile=$ac_res
8081fi
8082rm -f core conftest.err conftest.$ac_objext \
8083 conftest$ac_exeext
d0ac1c44 8084 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8085 break
8086fi
8087done
d0ac1c44 8088if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8089
8090else
8091 ac_cv_search_kinfo_getfile=no
8092fi
8093rm conftest.$ac_ext
8094LIBS=$ac_func_search_save_LIBS
8095fi
8096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8097$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8098ac_res=$ac_cv_search_kinfo_getfile
8099if test "$ac_res" != no; then :
8100 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8101
8102$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
8103
8104fi
8105
8106
77f120bf 8107
016a3251
DD
8108 if test "X$prefix" = "XNONE"; then
8109 acl_final_prefix="$ac_default_prefix"
8110 else
8111 acl_final_prefix="$prefix"
8112 fi
8113 if test "X$exec_prefix" = "XNONE"; then
8114 acl_final_exec_prefix='${prefix}'
8115 else
8116 acl_final_exec_prefix="$exec_prefix"
8117 fi
8118 acl_save_prefix="$prefix"
8119 prefix="$acl_final_prefix"
8120 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8121 prefix="$acl_save_prefix"
8122
8123
8124# Check whether --with-gnu-ld was given.
8125if test "${with_gnu_ld+set}" = set; then :
8126 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8127else
8128 with_gnu_ld=no
8129fi
8130
8131# Prepare PATH_SEPARATOR.
8132# The user is always right.
8133if test "${PATH_SEPARATOR+set}" != set; then
8134 echo "#! /bin/sh" >conf$$.sh
8135 echo "exit 0" >>conf$$.sh
8136 chmod +x conf$$.sh
8137 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8138 PATH_SEPARATOR=';'
8139 else
8140 PATH_SEPARATOR=:
8141 fi
8142 rm -f conf$$.sh
8143fi
8144ac_prog=ld
8145if test "$GCC" = yes; then
8146 # Check if gcc -print-prog-name=ld gives a path.
8147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8148$as_echo_n "checking for ld used by GCC... " >&6; }
8149 case $host in
8150 *-*-mingw*)
8151 # gcc leaves a trailing carriage return which upsets mingw
8152 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8153 *)
8154 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8155 esac
8156 case $ac_prog in
8157 # Accept absolute paths.
8158 [\\/]* | [A-Za-z]:[\\/]*)
8159 re_direlt='/[^/][^/]*/\.\./'
8160 # Canonicalize the path of ld
8161 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8162 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8163 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8164 done
8165 test -z "$LD" && LD="$ac_prog"
8166 ;;
8167 "")
8168 # If it fails, then pretend we aren't using GCC.
8169 ac_prog=ld
8170 ;;
8171 *)
8172 # If it is relative, then search for the first ld in PATH.
8173 with_gnu_ld=unknown
8174 ;;
8175 esac
8176elif test "$with_gnu_ld" = yes; then
8177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8178$as_echo_n "checking for GNU ld... " >&6; }
8179else
8180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8181$as_echo_n "checking for non-GNU ld... " >&6; }
8182fi
d0ac1c44 8183if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8184 $as_echo_n "(cached) " >&6
8185else
8186 if test -z "$LD"; then
8187 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8188 for ac_dir in $PATH; do
8189 test -z "$ac_dir" && ac_dir=.
8190 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8191 acl_cv_path_LD="$ac_dir/$ac_prog"
8192 # Check to see if the program is GNU ld. I'd rather use --version,
8193 # but apparently some GNU ld's only accept -v.
8194 # Break only if it was the GNU/non-GNU ld that we prefer.
8195 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8196 test "$with_gnu_ld" != no && break
8197 else
8198 test "$with_gnu_ld" != yes && break
8199 fi
8200 fi
8201 done
8202 IFS="$ac_save_ifs"
8203else
8204 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8205fi
8206fi
8207
8208LD="$acl_cv_path_LD"
8209if test -n "$LD"; then
8210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8211$as_echo "$LD" >&6; }
8212else
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8214$as_echo "no" >&6; }
8215fi
d0ac1c44 8216test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8218$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8219if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8220 $as_echo_n "(cached) " >&6
8221else
8222 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8223if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8224 acl_cv_prog_gnu_ld=yes
8225else
8226 acl_cv_prog_gnu_ld=no
8227fi
8228fi
8229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8230$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8231with_gnu_ld=$acl_cv_prog_gnu_ld
8232
8233
8234
8235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8236$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8237if ${acl_cv_rpath+:} false; then :
016a3251
DD
8238 $as_echo_n "(cached) " >&6
8239else
8240
8241 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8242 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8243 . ./conftest.sh
8244 rm -f ./conftest.sh
8245 acl_cv_rpath=done
8246
8247fi
8248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8249$as_echo "$acl_cv_rpath" >&6; }
8250 wl="$acl_cv_wl"
8251 libext="$acl_cv_libext"
8252 shlibext="$acl_cv_shlibext"
8253 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8254 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8255 hardcode_direct="$acl_cv_hardcode_direct"
8256 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8257 # Check whether --enable-rpath was given.
8258if test "${enable_rpath+set}" = set; then :
8259 enableval=$enable_rpath; :
8260else
8261 enable_rpath=yes
8262fi
8263
8264
8265
8266
8267
8268
8269
8270
8271 use_additional=yes
8272
8273 acl_save_prefix="$prefix"
8274 prefix="$acl_final_prefix"
8275 acl_save_exec_prefix="$exec_prefix"
8276 exec_prefix="$acl_final_exec_prefix"
8277
8278 eval additional_includedir=\"$includedir\"
8279 eval additional_libdir=\"$libdir\"
8280
8281 exec_prefix="$acl_save_exec_prefix"
8282 prefix="$acl_save_prefix"
77f120bf 8283
6c7a06a3 8284
81ecdfbb
RW
8285# Check whether --with-libiconv-prefix was given.
8286if test "${with_libiconv_prefix+set}" = set; then :
8287 withval=$with_libiconv_prefix;
016a3251
DD
8288 if test "X$withval" = "Xno"; then
8289 use_additional=no
8290 else
8291 if test "X$withval" = "X"; then
8292
8293 acl_save_prefix="$prefix"
8294 prefix="$acl_final_prefix"
8295 acl_save_exec_prefix="$exec_prefix"
8296 exec_prefix="$acl_final_exec_prefix"
8297
8298 eval additional_includedir=\"$includedir\"
8299 eval additional_libdir=\"$libdir\"
8300
8301 exec_prefix="$acl_save_exec_prefix"
8302 prefix="$acl_save_prefix"
8303
8304 else
8305 additional_includedir="$withval/include"
8306 additional_libdir="$withval/lib"
8307 fi
8308 fi
6c7a06a3 8309
81ecdfbb
RW
8310fi
8311
016a3251
DD
8312 LIBICONV=
8313 LTLIBICONV=
8314 INCICONV=
8315 rpathdirs=
8316 ltrpathdirs=
8317 names_already_handled=
8318 names_next_round='iconv '
8319 while test -n "$names_next_round"; do
8320 names_this_round="$names_next_round"
8321 names_next_round=
8322 for name in $names_this_round; do
8323 already_handled=
8324 for n in $names_already_handled; do
8325 if test "$n" = "$name"; then
8326 already_handled=yes
8327 break
8328 fi
8329 done
8330 if test -z "$already_handled"; then
8331 names_already_handled="$names_already_handled $name"
8332 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8333 eval value=\"\$HAVE_LIB$uppername\"
8334 if test -n "$value"; then
8335 if test "$value" = yes; then
8336 eval value=\"\$LIB$uppername\"
8337 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8338 eval value=\"\$LTLIB$uppername\"
8339 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8340 else
8341 :
8342 fi
8343 else
8344 found_dir=
8345 found_la=
8346 found_so=
8347 found_a=
8348 if test $use_additional = yes; then
8349 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8350 found_dir="$additional_libdir"
8351 found_so="$additional_libdir/lib$name.$shlibext"
8352 if test -f "$additional_libdir/lib$name.la"; then
8353 found_la="$additional_libdir/lib$name.la"
8354 fi
8355 else
8356 if test -f "$additional_libdir/lib$name.$libext"; then
8357 found_dir="$additional_libdir"
8358 found_a="$additional_libdir/lib$name.$libext"
8359 if test -f "$additional_libdir/lib$name.la"; then
8360 found_la="$additional_libdir/lib$name.la"
8361 fi
8362 fi
8363 fi
8364 fi
8365 if test "X$found_dir" = "X"; then
8366 for x in $LDFLAGS $LTLIBICONV; do
8367
8368 acl_save_prefix="$prefix"
8369 prefix="$acl_final_prefix"
8370 acl_save_exec_prefix="$exec_prefix"
8371 exec_prefix="$acl_final_exec_prefix"
8372 eval x=\"$x\"
8373 exec_prefix="$acl_save_exec_prefix"
8374 prefix="$acl_save_prefix"
8375
8376 case "$x" in
8377 -L*)
8378 dir=`echo "X$x" | sed -e 's/^X-L//'`
8379 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8380 found_dir="$dir"
8381 found_so="$dir/lib$name.$shlibext"
8382 if test -f "$dir/lib$name.la"; then
8383 found_la="$dir/lib$name.la"
8384 fi
8385 else
8386 if test -f "$dir/lib$name.$libext"; then
8387 found_dir="$dir"
8388 found_a="$dir/lib$name.$libext"
8389 if test -f "$dir/lib$name.la"; then
8390 found_la="$dir/lib$name.la"
8391 fi
8392 fi
8393 fi
8394 ;;
8395 esac
8396 if test "X$found_dir" != "X"; then
8397 break
8398 fi
8399 done
8400 fi
8401 if test "X$found_dir" != "X"; then
8402 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8403 if test "X$found_so" != "X"; then
8404 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8405 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8406 else
8407 haveit=
8408 for x in $ltrpathdirs; do
8409 if test "X$x" = "X$found_dir"; then
8410 haveit=yes
8411 break
8412 fi
8413 done
8414 if test -z "$haveit"; then
8415 ltrpathdirs="$ltrpathdirs $found_dir"
8416 fi
8417 if test "$hardcode_direct" = yes; then
8418 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8419 else
8420 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8421 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8422 haveit=
8423 for x in $rpathdirs; do
8424 if test "X$x" = "X$found_dir"; then
8425 haveit=yes
8426 break
8427 fi
8428 done
8429 if test -z "$haveit"; then
8430 rpathdirs="$rpathdirs $found_dir"
8431 fi
8432 else
8433 haveit=
8434 for x in $LDFLAGS $LIBICONV; do
8435
8436 acl_save_prefix="$prefix"
8437 prefix="$acl_final_prefix"
8438 acl_save_exec_prefix="$exec_prefix"
8439 exec_prefix="$acl_final_exec_prefix"
8440 eval x=\"$x\"
8441 exec_prefix="$acl_save_exec_prefix"
8442 prefix="$acl_save_prefix"
8443
8444 if test "X$x" = "X-L$found_dir"; then
8445 haveit=yes
8446 break
8447 fi
8448 done
8449 if test -z "$haveit"; then
8450 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8451 fi
8452 if test "$hardcode_minus_L" != no; then
8453 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8454 else
8455 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8456 fi
8457 fi
8458 fi
8459 fi
8460 else
8461 if test "X$found_a" != "X"; then
8462 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8463 else
8464 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8465 fi
8466 fi
8467 additional_includedir=
8468 case "$found_dir" in
8469 */lib | */lib/)
8470 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8471 additional_includedir="$basedir/include"
8472 ;;
8473 esac
8474 if test "X$additional_includedir" != "X"; then
8475 if test "X$additional_includedir" != "X/usr/include"; then
8476 haveit=
8477 if test "X$additional_includedir" = "X/usr/local/include"; then
8478 if test -n "$GCC"; then
8479 case $host_os in
8480 linux*) haveit=yes;;
8481 esac
8482 fi
8483 fi
8484 if test -z "$haveit"; then
8485 for x in $CPPFLAGS $INCICONV; do
8486
8487 acl_save_prefix="$prefix"
8488 prefix="$acl_final_prefix"
8489 acl_save_exec_prefix="$exec_prefix"
8490 exec_prefix="$acl_final_exec_prefix"
8491 eval x=\"$x\"
8492 exec_prefix="$acl_save_exec_prefix"
8493 prefix="$acl_save_prefix"
8494
8495 if test "X$x" = "X-I$additional_includedir"; then
8496 haveit=yes
8497 break
8498 fi
8499 done
8500 if test -z "$haveit"; then
8501 if test -d "$additional_includedir"; then
8502 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8503 fi
8504 fi
8505 fi
8506 fi
8507 fi
8508 if test -n "$found_la"; then
8509 save_libdir="$libdir"
8510 case "$found_la" in
8511 */* | *\\*) . "$found_la" ;;
8512 *) . "./$found_la" ;;
8513 esac
8514 libdir="$save_libdir"
8515 for dep in $dependency_libs; do
8516 case "$dep" in
8517 -L*)
8518 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8519 if test "X$additional_libdir" != "X/usr/lib"; then
8520 haveit=
8521 if test "X$additional_libdir" = "X/usr/local/lib"; then
8522 if test -n "$GCC"; then
8523 case $host_os in
8524 linux*) haveit=yes;;
8525 esac
8526 fi
8527 fi
8528 if test -z "$haveit"; then
8529 haveit=
8530 for x in $LDFLAGS $LIBICONV; do
8531
8532 acl_save_prefix="$prefix"
8533 prefix="$acl_final_prefix"
8534 acl_save_exec_prefix="$exec_prefix"
8535 exec_prefix="$acl_final_exec_prefix"
8536 eval x=\"$x\"
8537 exec_prefix="$acl_save_exec_prefix"
8538 prefix="$acl_save_prefix"
8539
8540 if test "X$x" = "X-L$additional_libdir"; then
8541 haveit=yes
8542 break
8543 fi
8544 done
8545 if test -z "$haveit"; then
8546 if test -d "$additional_libdir"; then
8547 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8548 fi
8549 fi
8550 haveit=
8551 for x in $LDFLAGS $LTLIBICONV; do
8552
8553 acl_save_prefix="$prefix"
8554 prefix="$acl_final_prefix"
8555 acl_save_exec_prefix="$exec_prefix"
8556 exec_prefix="$acl_final_exec_prefix"
8557 eval x=\"$x\"
8558 exec_prefix="$acl_save_exec_prefix"
8559 prefix="$acl_save_prefix"
8560
8561 if test "X$x" = "X-L$additional_libdir"; then
8562 haveit=yes
8563 break
8564 fi
8565 done
8566 if test -z "$haveit"; then
8567 if test -d "$additional_libdir"; then
8568 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8569 fi
8570 fi
8571 fi
8572 fi
8573 ;;
8574 -R*)
8575 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8576 if test "$enable_rpath" != no; then
8577 haveit=
8578 for x in $rpathdirs; do
8579 if test "X$x" = "X$dir"; then
8580 haveit=yes
8581 break
8582 fi
8583 done
8584 if test -z "$haveit"; then
8585 rpathdirs="$rpathdirs $dir"
8586 fi
8587 haveit=
8588 for x in $ltrpathdirs; do
8589 if test "X$x" = "X$dir"; then
8590 haveit=yes
8591 break
8592 fi
8593 done
8594 if test -z "$haveit"; then
8595 ltrpathdirs="$ltrpathdirs $dir"
8596 fi
8597 fi
8598 ;;
8599 -l*)
8600 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8601 ;;
8602 *.la)
8603 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8604 ;;
8605 *)
8606 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8607 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8608 ;;
8609 esac
8610 done
8611 fi
8612 else
8613 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8614 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8615 fi
8616 fi
8617 fi
8618 done
8619 done
8620 if test "X$rpathdirs" != "X"; then
8621 if test -n "$hardcode_libdir_separator"; then
8622 alldirs=
8623 for found_dir in $rpathdirs; do
8624 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8625 done
8626 acl_save_libdir="$libdir"
8627 libdir="$alldirs"
8628 eval flag=\"$hardcode_libdir_flag_spec\"
8629 libdir="$acl_save_libdir"
8630 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8631 else
8632 for found_dir in $rpathdirs; do
8633 acl_save_libdir="$libdir"
8634 libdir="$found_dir"
8635 eval flag=\"$hardcode_libdir_flag_spec\"
8636 libdir="$acl_save_libdir"
8637 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8638 done
8639 fi
8640 fi
8641 if test "X$ltrpathdirs" != "X"; then
8642 for found_dir in $ltrpathdirs; do
8643 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8644 done
8645 fi
8646
8647
8648
8649
8650
6c7a06a3 8651
6c7a06a3 8652
81ecdfbb
RW
8653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8654$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8655if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8656 $as_echo_n "(cached) " >&6
d542061a 8657else
6c7a06a3
TT
8658
8659 am_cv_func_iconv="no, consider installing GNU libiconv"
8660 am_cv_lib_iconv=no
016a3251
DD
8661 am_save_CPPFLAGS="$CPPFLAGS"
8662 CPPFLAGS="$CPPFLAGS $INCICONV"
8663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8664/* end confdefs.h. */
6c7a06a3
TT
8665#include <stdlib.h>
8666#include <iconv.h>
d542061a
UW
8667int
8668main ()
8669{
6c7a06a3 8670iconv_t cd = iconv_open("","");
016a3251
DD
8671 iconv(cd,NULL,NULL,NULL,NULL);
8672 iconv_close(cd);
d542061a
UW
8673 ;
8674 return 0;
8675}
8676_ACEOF
81ecdfbb 8677if ac_fn_c_try_link "$LINENO"; then :
016a3251 8678 am_cv_func_iconv=yes
d542061a 8679fi
81ecdfbb
RW
8680rm -f core conftest.err conftest.$ac_objext \
8681 conftest$ac_exeext conftest.$ac_ext
016a3251 8682 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8683
016a3251
DD
8684 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8685 for _libs in .libs _libs; do
8686 am_save_CPPFLAGS="$CPPFLAGS"
8687 am_save_LIBS="$LIBS"
8688 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8689 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8691/* end confdefs.h. */
6c7a06a3
TT
8692#include <stdlib.h>
8693#include <iconv.h>
d542061a
UW
8694int
8695main ()
8696{
6c7a06a3 8697iconv_t cd = iconv_open("","");
016a3251
DD
8698 iconv(cd,NULL,NULL,NULL,NULL);
8699 iconv_close(cd);
d542061a
UW
8700 ;
8701 return 0;
8702}
8703_ACEOF
81ecdfbb 8704if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8705 INCICONV="-I../libiconv/include"
8706 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8707 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8708 am_cv_lib_iconv=yes
8709 am_cv_func_iconv=yes
d542061a 8710fi
81ecdfbb
RW
8711rm -f core conftest.err conftest.$ac_objext \
8712 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8713 CPPFLAGS="$am_save_CPPFLAGS"
8714 LIBS="$am_save_LIBS"
8715 if test "$am_cv_func_iconv" = "yes"; then
8716 break
8717 fi
8718 done
77f120bf 8719 fi
94ae1714 8720
4edb1e84 8721 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8722 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8723 am_save_LIBS="$LIBS"
5d762de0 8724 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8725 LIBS="$LIBS $LIBICONV"
81ecdfbb 8726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8727/* end confdefs.h. */
6c7a06a3
TT
8728#include <stdlib.h>
8729#include <iconv.h>
bec39cab
AC
8730int
8731main ()
8732{
6c7a06a3
TT
8733iconv_t cd = iconv_open("","");
8734 iconv(cd,NULL,NULL,NULL,NULL);
8735 iconv_close(cd);
bec39cab
AC
8736 ;
8737 return 0;
8738}
8739_ACEOF
81ecdfbb 8740if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8741 am_cv_lib_iconv=yes
6c7a06a3 8742 am_cv_func_iconv=yes
627af7ea 8743fi
81ecdfbb
RW
8744rm -f core conftest.err conftest.$ac_objext \
8745 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8746 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8747 LIBS="$am_save_LIBS"
6c7a06a3
TT
8748 fi
8749
8750fi
81ecdfbb
RW
8751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8752$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8753 if test "$am_cv_func_iconv" = yes; then
8754
8755$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8756
016a3251 8757 fi
fc3b640d 8758 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8759
8760 for element in $INCICONV; do
8761 haveit=
8762 for x in $CPPFLAGS; do
8763
8764 acl_save_prefix="$prefix"
8765 prefix="$acl_final_prefix"
8766 acl_save_exec_prefix="$exec_prefix"
8767 exec_prefix="$acl_final_exec_prefix"
8768 eval x=\"$x\"
8769 exec_prefix="$acl_save_exec_prefix"
8770 prefix="$acl_save_prefix"
8771
8772 if test "X$x" = "X$element"; then
8773 haveit=yes
8774 break
8775 fi
8776 done
8777 if test -z "$haveit"; then
8778 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8779 fi
8780 done
8781
8782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8783$as_echo_n "checking how to link with libiconv... " >&6; }
8784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8785$as_echo "$LIBICONV" >&6; }
94ae1714 8786 else
016a3251
DD
8787 LIBICONV=
8788 LTLIBICONV=
fc3b640d 8789 fi
94ae1714 8790
6c7a06a3 8791
6c7a06a3 8792
016a3251 8793 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8795$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8796 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8797 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8798else
8799
81ecdfbb 8800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8801/* end confdefs.h. */
8802
6c7a06a3
TT
8803#include <stdlib.h>
8804#include <iconv.h>
8805extern
b4e70030 8806#ifdef __cplusplus
6c7a06a3 8807"C"
b4e70030 8808#endif
6c7a06a3
TT
8809#if defined(__STDC__) || defined(__cplusplus)
8810size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8811#else
8812size_t iconv();
8813#endif
8814
b4e70030
JB
8815int
8816main ()
8817{
6c7a06a3 8818
b4e70030
JB
8819 ;
8820 return 0;
8821}
8822_ACEOF
81ecdfbb 8823if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8824 am_cv_proto_iconv_arg1=""
4e8d927d 8825else
81ecdfbb 8826 am_cv_proto_iconv_arg1="const"
b4e70030 8827fi
81ecdfbb 8828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8829 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);"
8830fi
8831
8832 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8834 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8835$as_echo "${ac_t:-
8836 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8837
8838cat >>confdefs.h <<_ACEOF
8839#define ICONV_CONST $am_cv_proto_iconv_arg1
8840_ACEOF
8841
8842 fi
6c7a06a3
TT
8843
8844
478aac75
DE
8845# GDB may fork/exec the iconv program to get the list of supported character
8846# sets. Allow the user to specify where to find it.
8847# There are several factors affecting the choice of option name:
8848# - There is already --with-libiconv-prefix but we can't use it, it specifies
8849# the build-time location of libiconv files.
8850# - The program we need to find is iconv, which comes with glibc. The user
8851# doesn't necessarily have libiconv installed. Therefore naming this
8852# --with-libiconv-foo feels wrong.
8853# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8854# defined to work on directories not files (though it really doesn't know
8855# the difference).
8856# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8857# with --with-libiconv-prefix.
8858# Putting these together is why the option name is --with-iconv-bin.
8859
8860
8861# Check whether --with-iconv-bin was given.
8862if test "${with_iconv_bin+set}" = set; then :
8863 withval=$with_iconv_bin; iconv_bin="${withval}"
8864
8865cat >>confdefs.h <<_ACEOF
8866#define ICONV_BIN "${iconv_bin}"
8867_ACEOF
8868
8869
8870 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8871 if test "x$prefix" = xNONE; then
8872 test_prefix=/usr/local
8873 else
8874 test_prefix=$prefix
8875 fi
8876 else
8877 test_prefix=$exec_prefix
8878 fi
8879 value=0
8880 case ${iconv_bin} in
8881 "${test_prefix}"|"${test_prefix}/"*|\
8882 '${exec_prefix}'|'${exec_prefix}/'*)
8883 value=1
8884 ;;
8885 esac
8886
8887cat >>confdefs.h <<_ACEOF
8888#define ICONV_BIN_RELOCATABLE $value
8889_ACEOF
8890
8891
8892
8893fi
8894
8895
cb01cfba 8896# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8897if test x"$enable_tui" != xno; then
cb01cfba
JB
8898 prefer_curses=yes
8899fi
8900
8901curses_found=no
8902if test x"$prefer_curses" = xyes; then
8903 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8904 # curses library because the latter might not provide all the
8905 # functionality we need. However, this leads to problems on systems
8906 # where the linker searches /usr/local/lib, but the compiler doesn't
8907 # search /usr/local/include, if ncurses is installed in /usr/local. A
8908 # default installation of ncurses on alpha*-dec-osf* will lead to such
8909 # a situation.
81ecdfbb
RW
8910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8911$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8912if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8913 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8914else
8915 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8917/* end confdefs.h. */
8918
81ecdfbb
RW
8919/* Override any GCC internal prototype to avoid an error.
8920 Use char because int might match the return type of a GCC
8921 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8922#ifdef __cplusplus
8923extern "C"
8924#endif
6c7a06a3
TT
8925char waddstr ();
8926int
8927main ()
8928{
81ecdfbb 8929return waddstr ();
6c7a06a3
TT
8930 ;
8931 return 0;
8932}
8933_ACEOF
5007d765 8934for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8935 if test -z "$ac_lib"; then
8936 ac_res="none required"
8937 else
8938 ac_res=-l$ac_lib
8939 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8940 fi
8941 if ac_fn_c_try_link "$LINENO"; then :
8942 ac_cv_search_waddstr=$ac_res
8943fi
8944rm -f core conftest.err conftest.$ac_objext \
8945 conftest$ac_exeext
d0ac1c44 8946 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8947 break
8948fi
8949done
d0ac1c44 8950if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8951
6c7a06a3 8952else
81ecdfbb
RW
8953 ac_cv_search_waddstr=no
8954fi
8955rm conftest.$ac_ext
8956LIBS=$ac_func_search_save_LIBS
8957fi
8958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8959$as_echo "$ac_cv_search_waddstr" >&6; }
8960ac_res=$ac_cv_search_waddstr
8961if test "$ac_res" != no; then :
8962 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8963
8964fi
8965
8966
cb01cfba
JB
8967 if test "$ac_cv_search_waddstr" != no; then
8968 curses_found=yes
8969 fi
8970fi
8971
8972# Check whether we should enable the TUI, but only do so if we really
8973# can.
8974if test x"$enable_tui" != xno; then
8975 if test -d $srcdir/tui; then
8976 if test "$curses_found" != no; then
6c7a06a3
TT
8977 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8978 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8979 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8980 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8981 else
8982 if test x"$enable_tui" = xyes; then
d0ac1c44 8983 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8984 else
81ecdfbb
RW
8985 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8986$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8987 fi
8988 fi
8989 fi
8990fi
8991
8992# Since GDB uses Readline, we need termcap functionality. In many
8993# cases this will be provided by the curses library, but some systems
96fe4562 8994# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8995
8996case $host_os in
8997 cygwin*)
8998 if test -d $srcdir/libtermcap; then
8999 LIBS="../libtermcap/libtermcap.a $LIBS"
9000 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9001 fi ;;
9002 go32* | *djgpp*)
9003 ac_cv_search_tgetent="none required"
9004 ;;
6c7a06a3
TT
9005esac
9006
9007# These are the libraries checked by Readline.
81ecdfbb
RW
9008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9009$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 9010if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 9011 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9012else
9013 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9015/* end confdefs.h. */
9016
81ecdfbb
RW
9017/* Override any GCC internal prototype to avoid an error.
9018 Use char because int might match the return type of a GCC
9019 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9020#ifdef __cplusplus
9021extern "C"
9022#endif
6c7a06a3
TT
9023char tgetent ();
9024int
9025main ()
9026{
81ecdfbb 9027return tgetent ();
6c7a06a3
TT
9028 ;
9029 return 0;
9030}
9031_ACEOF
2578ecb1 9032for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9033 if test -z "$ac_lib"; then
9034 ac_res="none required"
9035 else
9036 ac_res=-l$ac_lib
6c7a06a3 9037 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9038 fi
9039 if ac_fn_c_try_link "$LINENO"; then :
9040 ac_cv_search_tgetent=$ac_res
9041fi
9042rm -f core conftest.err conftest.$ac_objext \
9043 conftest$ac_exeext
d0ac1c44 9044 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9045 break
9046fi
9047done
d0ac1c44 9048if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9049
6c7a06a3 9050else
81ecdfbb 9051 ac_cv_search_tgetent=no
6c7a06a3 9052fi
81ecdfbb 9053rm conftest.$ac_ext
6c7a06a3
TT
9054LIBS=$ac_func_search_save_LIBS
9055fi
81ecdfbb
RW
9056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9057$as_echo "$ac_cv_search_tgetent" >&6; }
9058ac_res=$ac_cv_search_tgetent
9059if test "$ac_res" != no; then :
9060 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9061
06825bd1
MK
9062fi
9063
06825bd1 9064
bec39cab 9065if test "$ac_cv_search_tgetent" = no; then
7a85168d 9066 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9067fi
9068
3841debe 9069
81ecdfbb
RW
9070# Check whether --with-system-readline was given.
9071if test "${with_system_readline+set}" = set; then :
9072 withval=$with_system_readline;
9073fi
6a30b0a5 9074
6a30b0a5
AS
9075
9076if test "$with_system_readline" = yes; then
9077 READLINE=-lreadline
9078 READLINE_DEPS=
9079 READLINE_CFLAGS=
39037522 9080 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9081else
9082 READLINE='$(READLINE_DIR)/libreadline.a'
9083 READLINE_DEPS='$(READLINE)'
9084 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9085 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9086fi
9087
9088
9089
9090
9091
f997c383
SD
9092# Generate jit-reader.h
9093
9094# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9095TARGET_PTR=
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 long" >&5
9102$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9103if ${ac_cv_sizeof_unsigned_long_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 long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9107
9108else
9109 if test "$ac_cv_type_unsigned_long_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;}
d0ac1c44
SM
9112as_fn_error 77 "cannot compute sizeof (unsigned long long)
9113See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9114 else
9115 ac_cv_sizeof_unsigned_long_long=0
9116 fi
9117fi
9118
9119fi
9120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9121$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9122
9123
9124
9125cat >>confdefs.h <<_ACEOF
9126#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_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 long" >&5
9135$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9136if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9137 $as_echo_n "(cached) " >&6
9138else
9139 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9140
9141else
9142 if test "$ac_cv_type_unsigned_long" = 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;}
d0ac1c44
SM
9145as_fn_error 77 "cannot compute sizeof (unsigned long)
9146See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9147 else
9148 ac_cv_sizeof_unsigned_long=0
9149 fi
9150fi
9151
9152fi
9153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9154$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9155
9156
9157
9158cat >>confdefs.h <<_ACEOF
9159#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9160_ACEOF
9161
9162
9163# The cast to long int works around a bug in the HP C Compiler
9164# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9165# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9166# This bug is HP SR number 8606223364.
9167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9168$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9169if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9170 $as_echo_n "(cached) " >&6
9171else
9172 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9173
9174else
9175 if test "$ac_cv_type_unsigned___int128" = yes; then
9176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9178as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9179See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9180 else
9181 ac_cv_sizeof_unsigned___int128=0
9182 fi
9183fi
9184
9185fi
9186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9187$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9188
9189
9190
9191cat >>confdefs.h <<_ACEOF
9192#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9193_ACEOF
9194
9195
9196
9197if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9198 TARGET_PTR="unsigned long"
9199elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9200 TARGET_PTR="unsigned long long"
9201elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9202 TARGET_PTR="unsigned __int128"
9203else
9204 TARGET_PTR="unsigned long"
9205fi
9206
9207
9208ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9209
9210
a2d08b9e
SD
9211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9212$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9213if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9214 $as_echo_n "(cached) " >&6
9215else
9216 ac_func_search_save_LIBS=$LIBS
9217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9218/* end confdefs.h. */
9219
9220/* Override any GCC internal prototype to avoid an error.
9221 Use char because int might match the return type of a GCC
9222 builtin and then its argument prototype would still apply. */
9223#ifdef __cplusplus
9224extern "C"
9225#endif
9226char dlopen ();
9227int
9228main ()
9229{
9230return dlopen ();
9231 ;
9232 return 0;
9233}
9234_ACEOF
9235for ac_lib in '' dl; do
9236 if test -z "$ac_lib"; then
9237 ac_res="none required"
9238 else
9239 ac_res=-l$ac_lib
9240 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9241 fi
9242 if ac_fn_c_try_link "$LINENO"; then :
9243 ac_cv_search_dlopen=$ac_res
9244fi
9245rm -f core conftest.err conftest.$ac_objext \
9246 conftest$ac_exeext
d0ac1c44 9247 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9248 break
9249fi
9250done
d0ac1c44 9251if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9252
9253else
9254 ac_cv_search_dlopen=no
9255fi
9256rm conftest.$ac_ext
9257LIBS=$ac_func_search_save_LIBS
9258fi
9259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9260$as_echo "$ac_cv_search_dlopen" >&6; }
9261ac_res=$ac_cv_search_dlopen
9262if test "$ac_res" != no; then :
9263 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9264
9265fi
9266
9267
39037522 9268
b8e0a31c
SD
9269
9270# Check whether --with-jit-reader-dir was given.
9271if test "${with_jit_reader_dir+set}" = set; then :
9272 withval=$with_jit_reader_dir;
9273 JIT_READER_DIR=$withval
9274else
9275 JIT_READER_DIR=${libdir}/gdb
9276fi
9277
9278
9279 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9280 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9281 ac_define_dir=`eval echo $JIT_READER_DIR`
9282 ac_define_dir=`eval echo $ac_define_dir`
9283
9284cat >>confdefs.h <<_ACEOF
9285#define JIT_READER_DIR "$ac_define_dir"
9286_ACEOF
9287
9288
9289
9290
9291 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9292 if test "x$prefix" = xNONE; then
9293 test_prefix=/usr/local
9294 else
9295 test_prefix=$prefix
9296 fi
9297 else
9298 test_prefix=$exec_prefix
9299 fi
9300 value=0
9301 case ${ac_define_dir} in
9302 "${test_prefix}"|"${test_prefix}/"*|\
9303 '${exec_prefix}'|'${exec_prefix}/'*)
9304 value=1
9305 ;;
9306 esac
9307
9308cat >>confdefs.h <<_ACEOF
9309#define JIT_READER_DIR_RELOCATABLE $value
9310_ACEOF
9311
9312
9313
9314
9315
81ecdfbb
RW
9316# Check whether --with-expat was given.
9317if test "${with_expat+set}" = set; then :
9318 withval=$with_expat;
5c39566f
DJ
9319else
9320 with_expat=auto
81ecdfbb
RW
9321fi
9322
9323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9324$as_echo_n "checking whether to use expat... " >&6; }
9325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9326$as_echo "$with_expat" >&6; }
5c39566f
DJ
9327
9328if test "${with_expat}" = no; then
81ecdfbb
RW
9329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9330$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9331 HAVE_LIBEXPAT=no
9332else
9333
3841debe
DJ
9334
9335
9336
9337
9338
9339
9340
9341 use_additional=yes
9342
9343 acl_save_prefix="$prefix"
9344 prefix="$acl_final_prefix"
9345 acl_save_exec_prefix="$exec_prefix"
9346 exec_prefix="$acl_final_exec_prefix"
9347
9348 eval additional_includedir=\"$includedir\"
9349 eval additional_libdir=\"$libdir\"
9350
9351 exec_prefix="$acl_save_exec_prefix"
9352 prefix="$acl_save_prefix"
9353
9354
81ecdfbb
RW
9355# Check whether --with-libexpat-prefix was given.
9356if test "${with_libexpat_prefix+set}" = set; then :
9357 withval=$with_libexpat_prefix;
3841debe
DJ
9358 if test "X$withval" = "Xno"; then
9359 use_additional=no
9360 else
9361 if test "X$withval" = "X"; then
9362
9363 acl_save_prefix="$prefix"
9364 prefix="$acl_final_prefix"
9365 acl_save_exec_prefix="$exec_prefix"
9366 exec_prefix="$acl_final_exec_prefix"
9367
9368 eval additional_includedir=\"$includedir\"
9369 eval additional_libdir=\"$libdir\"
9370
9371 exec_prefix="$acl_save_exec_prefix"
9372 prefix="$acl_save_prefix"
9373
9374 else
9375 additional_includedir="$withval/include"
9376 additional_libdir="$withval/lib"
9377 fi
9378 fi
9379
81ecdfbb
RW
9380fi
9381
3841debe
DJ
9382 LIBEXPAT=
9383 LTLIBEXPAT=
9384 INCEXPAT=
9385 rpathdirs=
9386 ltrpathdirs=
9387 names_already_handled=
9388 names_next_round='expat '
9389 while test -n "$names_next_round"; do
9390 names_this_round="$names_next_round"
9391 names_next_round=
9392 for name in $names_this_round; do
9393 already_handled=
9394 for n in $names_already_handled; do
9395 if test "$n" = "$name"; then
9396 already_handled=yes
9397 break
9398 fi
9399 done
9400 if test -z "$already_handled"; then
9401 names_already_handled="$names_already_handled $name"
9402 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9403 eval value=\"\$HAVE_LIB$uppername\"
9404 if test -n "$value"; then
9405 if test "$value" = yes; then
9406 eval value=\"\$LIB$uppername\"
9407 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9408 eval value=\"\$LTLIB$uppername\"
9409 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9410 else
9411 :
9412 fi
9413 else
9414 found_dir=
9415 found_la=
9416 found_so=
9417 found_a=
9418 if test $use_additional = yes; then
9419 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9420 found_dir="$additional_libdir"
9421 found_so="$additional_libdir/lib$name.$shlibext"
9422 if test -f "$additional_libdir/lib$name.la"; then
9423 found_la="$additional_libdir/lib$name.la"
9424 fi
9425 else
9426 if test -f "$additional_libdir/lib$name.$libext"; then
9427 found_dir="$additional_libdir"
9428 found_a="$additional_libdir/lib$name.$libext"
9429 if test -f "$additional_libdir/lib$name.la"; then
9430 found_la="$additional_libdir/lib$name.la"
9431 fi
9432 fi
9433 fi
9434 fi
9435 if test "X$found_dir" = "X"; then
9436 for x in $LDFLAGS $LTLIBEXPAT; do
9437
9438 acl_save_prefix="$prefix"
9439 prefix="$acl_final_prefix"
9440 acl_save_exec_prefix="$exec_prefix"
9441 exec_prefix="$acl_final_exec_prefix"
9442 eval x=\"$x\"
9443 exec_prefix="$acl_save_exec_prefix"
9444 prefix="$acl_save_prefix"
9445
9446 case "$x" in
9447 -L*)
9448 dir=`echo "X$x" | sed -e 's/^X-L//'`
9449 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9450 found_dir="$dir"
9451 found_so="$dir/lib$name.$shlibext"
9452 if test -f "$dir/lib$name.la"; then
9453 found_la="$dir/lib$name.la"
9454 fi
9455 else
9456 if test -f "$dir/lib$name.$libext"; then
9457 found_dir="$dir"
9458 found_a="$dir/lib$name.$libext"
9459 if test -f "$dir/lib$name.la"; then
9460 found_la="$dir/lib$name.la"
9461 fi
9462 fi
9463 fi
9464 ;;
9465 esac
9466 if test "X$found_dir" != "X"; then
9467 break
9468 fi
9469 done
9470 fi
9471 if test "X$found_dir" != "X"; then
9472 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9473 if test "X$found_so" != "X"; then
9474 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9475 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9476 else
9477 haveit=
9478 for x in $ltrpathdirs; do
9479 if test "X$x" = "X$found_dir"; then
9480 haveit=yes
9481 break
9482 fi
9483 done
9484 if test -z "$haveit"; then
9485 ltrpathdirs="$ltrpathdirs $found_dir"
9486 fi
9487 if test "$hardcode_direct" = yes; then
9488 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9489 else
9490 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9491 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9492 haveit=
9493 for x in $rpathdirs; do
9494 if test "X$x" = "X$found_dir"; then
9495 haveit=yes
9496 break
9497 fi
9498 done
9499 if test -z "$haveit"; then
9500 rpathdirs="$rpathdirs $found_dir"
9501 fi
9502 else
9503 haveit=
9504 for x in $LDFLAGS $LIBEXPAT; do
9505
9506 acl_save_prefix="$prefix"
9507 prefix="$acl_final_prefix"
9508 acl_save_exec_prefix="$exec_prefix"
9509 exec_prefix="$acl_final_exec_prefix"
9510 eval x=\"$x\"
9511 exec_prefix="$acl_save_exec_prefix"
9512 prefix="$acl_save_prefix"
9513
9514 if test "X$x" = "X-L$found_dir"; then
9515 haveit=yes
9516 break
9517 fi
9518 done
9519 if test -z "$haveit"; then
9520 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9521 fi
9522 if test "$hardcode_minus_L" != no; then
9523 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9524 else
9525 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9526 fi
9527 fi
9528 fi
9529 fi
9530 else
9531 if test "X$found_a" != "X"; then
9532 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9533 else
9534 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9535 fi
9536 fi
9537 additional_includedir=
9538 case "$found_dir" in
9539 */lib | */lib/)
9540 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9541 additional_includedir="$basedir/include"
9542 ;;
9543 esac
9544 if test "X$additional_includedir" != "X"; then
9545 if test "X$additional_includedir" != "X/usr/include"; then
9546 haveit=
9547 if test "X$additional_includedir" = "X/usr/local/include"; then
9548 if test -n "$GCC"; then
9549 case $host_os in
9550 linux*) haveit=yes;;
9551 esac
9552 fi
9553 fi
9554 if test -z "$haveit"; then
9555 for x in $CPPFLAGS $INCEXPAT; do
9556
9557 acl_save_prefix="$prefix"
9558 prefix="$acl_final_prefix"
9559 acl_save_exec_prefix="$exec_prefix"
9560 exec_prefix="$acl_final_exec_prefix"
9561 eval x=\"$x\"
9562 exec_prefix="$acl_save_exec_prefix"
9563 prefix="$acl_save_prefix"
9564
9565 if test "X$x" = "X-I$additional_includedir"; then
9566 haveit=yes
9567 break
9568 fi
9569 done
9570 if test -z "$haveit"; then
9571 if test -d "$additional_includedir"; then
9572 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9573 fi
9574 fi
9575 fi
9576 fi
9577 fi
9578 if test -n "$found_la"; then
9579 save_libdir="$libdir"
9580 case "$found_la" in
9581 */* | *\\*) . "$found_la" ;;
9582 *) . "./$found_la" ;;
9583 esac
9584 libdir="$save_libdir"
9585 for dep in $dependency_libs; do
9586 case "$dep" in
9587 -L*)
9588 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9589 if test "X$additional_libdir" != "X/usr/lib"; then
9590 haveit=
9591 if test "X$additional_libdir" = "X/usr/local/lib"; then
9592 if test -n "$GCC"; then
9593 case $host_os in
9594 linux*) haveit=yes;;
9595 esac
9596 fi
9597 fi
9598 if test -z "$haveit"; then
9599 haveit=
9600 for x in $LDFLAGS $LIBEXPAT; do
9601
9602 acl_save_prefix="$prefix"
9603 prefix="$acl_final_prefix"
9604 acl_save_exec_prefix="$exec_prefix"
9605 exec_prefix="$acl_final_exec_prefix"
9606 eval x=\"$x\"
9607 exec_prefix="$acl_save_exec_prefix"
9608 prefix="$acl_save_prefix"
9609
9610 if test "X$x" = "X-L$additional_libdir"; then
9611 haveit=yes
9612 break
9613 fi
9614 done
9615 if test -z "$haveit"; then
9616 if test -d "$additional_libdir"; then
9617 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9618 fi
9619 fi
9620 haveit=
9621 for x in $LDFLAGS $LTLIBEXPAT; do
9622
9623 acl_save_prefix="$prefix"
9624 prefix="$acl_final_prefix"
9625 acl_save_exec_prefix="$exec_prefix"
9626 exec_prefix="$acl_final_exec_prefix"
9627 eval x=\"$x\"
9628 exec_prefix="$acl_save_exec_prefix"
9629 prefix="$acl_save_prefix"
9630
9631 if test "X$x" = "X-L$additional_libdir"; then
9632 haveit=yes
9633 break
9634 fi
9635 done
9636 if test -z "$haveit"; then
9637 if test -d "$additional_libdir"; then
9638 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9639 fi
9640 fi
9641 fi
9642 fi
9643 ;;
9644 -R*)
9645 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9646 if test "$enable_rpath" != no; then
9647 haveit=
9648 for x in $rpathdirs; do
9649 if test "X$x" = "X$dir"; then
9650 haveit=yes
9651 break
9652 fi
9653 done
9654 if test -z "$haveit"; then
9655 rpathdirs="$rpathdirs $dir"
9656 fi
9657 haveit=
9658 for x in $ltrpathdirs; do
9659 if test "X$x" = "X$dir"; then
9660 haveit=yes
9661 break
9662 fi
9663 done
9664 if test -z "$haveit"; then
9665 ltrpathdirs="$ltrpathdirs $dir"
9666 fi
9667 fi
9668 ;;
9669 -l*)
9670 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9671 ;;
9672 *.la)
9673 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9674 ;;
9675 *)
9676 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9677 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9678 ;;
81ecdfbb
RW
9679 esac
9680 done
9681 fi
9682 else
9683 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9684 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9685 fi
9686 fi
9687 fi
9688 done
9689 done
9690 if test "X$rpathdirs" != "X"; then
9691 if test -n "$hardcode_libdir_separator"; then
9692 alldirs=
9693 for found_dir in $rpathdirs; do
9694 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9695 done
9696 acl_save_libdir="$libdir"
9697 libdir="$alldirs"
9698 eval flag=\"$hardcode_libdir_flag_spec\"
9699 libdir="$acl_save_libdir"
9700 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9701 else
9702 for found_dir in $rpathdirs; do
9703 acl_save_libdir="$libdir"
9704 libdir="$found_dir"
9705 eval flag=\"$hardcode_libdir_flag_spec\"
9706 libdir="$acl_save_libdir"
9707 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9708 done
9709 fi
9710 fi
9711 if test "X$ltrpathdirs" != "X"; then
9712 for found_dir in $ltrpathdirs; do
9713 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9714 done
9715 fi
a9322a30
TT
9716
9717
81ecdfbb 9718 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9719
81ecdfbb
RW
9720 for element in $INCEXPAT; do
9721 haveit=
9722 for x in $CPPFLAGS; do
a9322a30 9723
81ecdfbb
RW
9724 acl_save_prefix="$prefix"
9725 prefix="$acl_final_prefix"
9726 acl_save_exec_prefix="$exec_prefix"
9727 exec_prefix="$acl_final_exec_prefix"
9728 eval x=\"$x\"
9729 exec_prefix="$acl_save_exec_prefix"
9730 prefix="$acl_save_prefix"
a8111142 9731
81ecdfbb
RW
9732 if test "X$x" = "X$element"; then
9733 haveit=yes
9734 break
9735 fi
9736 done
9737 if test -z "$haveit"; then
9738 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9739 fi
9740 done
a9322a30
TT
9741
9742
81ecdfbb
RW
9743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9744$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9745if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9746 $as_echo_n "(cached) " >&6
bec39cab 9747else
bec39cab 9748
81ecdfbb
RW
9749 ac_save_LIBS="$LIBS"
9750 LIBS="$LIBS $LIBEXPAT"
9751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9752/* end confdefs.h. */
81ecdfbb
RW
9753#include "expat.h"
9754int
9755main ()
9756{
9757XML_Parser p = XML_ParserCreate (0);
9758 ;
9759 return 0;
9760}
bec39cab 9761_ACEOF
81ecdfbb
RW
9762if ac_fn_c_try_link "$LINENO"; then :
9763 ac_cv_libexpat=yes
c906108c 9764else
81ecdfbb 9765 ac_cv_libexpat=no
bec39cab 9766fi
81ecdfbb
RW
9767rm -f core conftest.err conftest.$ac_objext \
9768 conftest$ac_exeext conftest.$ac_ext
9769 LIBS="$ac_save_LIBS"
c906108c 9770
95ca63c4 9771fi
81ecdfbb
RW
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9773$as_echo "$ac_cv_libexpat" >&6; }
9774 if test "$ac_cv_libexpat" = yes; then
9775 HAVE_LIBEXPAT=yes
bec39cab 9776
81ecdfbb 9777$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9778
81ecdfbb
RW
9779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9780$as_echo_n "checking how to link with libexpat... " >&6; }
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9782$as_echo "$LIBEXPAT" >&6; }
9783 else
9784 HAVE_LIBEXPAT=no
9785 CPPFLAGS="$ac_save_CPPFLAGS"
9786 LIBEXPAT=
9787 LTLIBEXPAT=
9788 fi
95ca63c4
CF
9789
9790
9791
7cb9022a
MK
9792
9793
bec39cab 9794
81ecdfbb
RW
9795 if test "$HAVE_LIBEXPAT" != yes; then
9796 if test "$with_expat" = yes; then
d0ac1c44 9797 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9798 else
9799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9800$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9801 fi
9802 else
9803 save_LIBS=$LIBS
9804 LIBS="$LIBS $LIBEXPAT"
9805 for ac_func in XML_StopParser
9806do :
9807 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9808if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9809 cat >>confdefs.h <<_ACEOF
81ecdfbb 9810#define HAVE_XML_STOPPARSER 1
bec39cab 9811_ACEOF
95ca63c4 9812
bec39cab 9813fi
bec39cab 9814done
95ca63c4 9815
81ecdfbb
RW
9816 LIBS=$save_LIBS
9817 fi
a9322a30
TT
9818fi
9819
2400729e
UW
9820
9821# Check whether --with-mpfr was given.
9822if test "${with_mpfr+set}" = set; then :
9823 withval=$with_mpfr;
9824else
9825 with_mpfr=auto
9826fi
9827
9828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9829$as_echo_n "checking whether to use MPFR... " >&6; }
9830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9831$as_echo "$with_mpfr" >&6; }
9832
9833if test "${with_mpfr}" = no; then
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9835$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9836 HAVE_LIBMPFR=no
9837else
9838
9839
9840
9841
9842
9843
9844
9845
9846 use_additional=yes
9847
9848 acl_save_prefix="$prefix"
9849 prefix="$acl_final_prefix"
9850 acl_save_exec_prefix="$exec_prefix"
9851 exec_prefix="$acl_final_exec_prefix"
9852
9853 eval additional_includedir=\"$includedir\"
9854 eval additional_libdir=\"$libdir\"
9855
9856 exec_prefix="$acl_save_exec_prefix"
9857 prefix="$acl_save_prefix"
9858
9859
9860# Check whether --with-libmpfr-prefix was given.
9861if test "${with_libmpfr_prefix+set}" = set; then :
9862 withval=$with_libmpfr_prefix;
9863 if test "X$withval" = "Xno"; then
9864 use_additional=no
9865 else
9866 if test "X$withval" = "X"; then
9867
9868 acl_save_prefix="$prefix"
9869 prefix="$acl_final_prefix"
9870 acl_save_exec_prefix="$exec_prefix"
9871 exec_prefix="$acl_final_exec_prefix"
9872
9873 eval additional_includedir=\"$includedir\"
9874 eval additional_libdir=\"$libdir\"
9875
9876 exec_prefix="$acl_save_exec_prefix"
9877 prefix="$acl_save_prefix"
9878
9879 else
9880 additional_includedir="$withval/include"
9881 additional_libdir="$withval/lib"
9882 fi
9883 fi
9884
9885fi
9886
9887 LIBMPFR=
9888 LTLIBMPFR=
9889 INCMPFR=
9890 rpathdirs=
9891 ltrpathdirs=
9892 names_already_handled=
da658607 9893 names_next_round='mpfr gmp'
2400729e
UW
9894 while test -n "$names_next_round"; do
9895 names_this_round="$names_next_round"
9896 names_next_round=
9897 for name in $names_this_round; do
9898 already_handled=
9899 for n in $names_already_handled; do
9900 if test "$n" = "$name"; then
9901 already_handled=yes
9902 break
9903 fi
9904 done
9905 if test -z "$already_handled"; then
9906 names_already_handled="$names_already_handled $name"
9907 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9908 eval value=\"\$HAVE_LIB$uppername\"
9909 if test -n "$value"; then
9910 if test "$value" = yes; then
9911 eval value=\"\$LIB$uppername\"
9912 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9913 eval value=\"\$LTLIB$uppername\"
9914 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9915 else
9916 :
9917 fi
9918 else
9919 found_dir=
9920 found_la=
9921 found_so=
9922 found_a=
9923 if test $use_additional = yes; then
9924 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9925 found_dir="$additional_libdir"
9926 found_so="$additional_libdir/lib$name.$shlibext"
9927 if test -f "$additional_libdir/lib$name.la"; then
9928 found_la="$additional_libdir/lib$name.la"
9929 fi
9930 else
9931 if test -f "$additional_libdir/lib$name.$libext"; then
9932 found_dir="$additional_libdir"
9933 found_a="$additional_libdir/lib$name.$libext"
9934 if test -f "$additional_libdir/lib$name.la"; then
9935 found_la="$additional_libdir/lib$name.la"
9936 fi
9937 fi
9938 fi
9939 fi
9940 if test "X$found_dir" = "X"; then
9941 for x in $LDFLAGS $LTLIBMPFR; do
9942
9943 acl_save_prefix="$prefix"
9944 prefix="$acl_final_prefix"
9945 acl_save_exec_prefix="$exec_prefix"
9946 exec_prefix="$acl_final_exec_prefix"
9947 eval x=\"$x\"
9948 exec_prefix="$acl_save_exec_prefix"
9949 prefix="$acl_save_prefix"
9950
9951 case "$x" in
9952 -L*)
9953 dir=`echo "X$x" | sed -e 's/^X-L//'`
9954 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9955 found_dir="$dir"
9956 found_so="$dir/lib$name.$shlibext"
9957 if test -f "$dir/lib$name.la"; then
9958 found_la="$dir/lib$name.la"
9959 fi
9960 else
9961 if test -f "$dir/lib$name.$libext"; then
9962 found_dir="$dir"
9963 found_a="$dir/lib$name.$libext"
9964 if test -f "$dir/lib$name.la"; then
9965 found_la="$dir/lib$name.la"
9966 fi
9967 fi
9968 fi
9969 ;;
9970 esac
9971 if test "X$found_dir" != "X"; then
9972 break
9973 fi
9974 done
9975 fi
9976 if test "X$found_dir" != "X"; then
9977 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9978 if test "X$found_so" != "X"; then
9979 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9980 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9981 else
9982 haveit=
9983 for x in $ltrpathdirs; do
9984 if test "X$x" = "X$found_dir"; then
9985 haveit=yes
9986 break
9987 fi
9988 done
9989 if test -z "$haveit"; then
9990 ltrpathdirs="$ltrpathdirs $found_dir"
9991 fi
9992 if test "$hardcode_direct" = yes; then
9993 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9994 else
9995 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9996 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9997 haveit=
9998 for x in $rpathdirs; do
9999 if test "X$x" = "X$found_dir"; then
10000 haveit=yes
10001 break
10002 fi
10003 done
10004 if test -z "$haveit"; then
10005 rpathdirs="$rpathdirs $found_dir"
10006 fi
10007 else
10008 haveit=
10009 for x in $LDFLAGS $LIBMPFR; do
10010
10011 acl_save_prefix="$prefix"
10012 prefix="$acl_final_prefix"
10013 acl_save_exec_prefix="$exec_prefix"
10014 exec_prefix="$acl_final_exec_prefix"
10015 eval x=\"$x\"
10016 exec_prefix="$acl_save_exec_prefix"
10017 prefix="$acl_save_prefix"
10018
10019 if test "X$x" = "X-L$found_dir"; then
10020 haveit=yes
10021 break
10022 fi
10023 done
10024 if test -z "$haveit"; then
10025 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10026 fi
10027 if test "$hardcode_minus_L" != no; then
10028 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10029 else
10030 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10031 fi
10032 fi
10033 fi
10034 fi
10035 else
10036 if test "X$found_a" != "X"; then
10037 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10038 else
10039 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10040 fi
10041 fi
10042 additional_includedir=
10043 case "$found_dir" in
10044 */lib | */lib/)
10045 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10046 additional_includedir="$basedir/include"
10047 ;;
10048 esac
10049 if test "X$additional_includedir" != "X"; then
10050 if test "X$additional_includedir" != "X/usr/include"; then
10051 haveit=
10052 if test "X$additional_includedir" = "X/usr/local/include"; then
10053 if test -n "$GCC"; then
10054 case $host_os in
10055 linux*) haveit=yes;;
10056 esac
10057 fi
10058 fi
10059 if test -z "$haveit"; then
10060 for x in $CPPFLAGS $INCMPFR; do
10061
10062 acl_save_prefix="$prefix"
10063 prefix="$acl_final_prefix"
10064 acl_save_exec_prefix="$exec_prefix"
10065 exec_prefix="$acl_final_exec_prefix"
10066 eval x=\"$x\"
10067 exec_prefix="$acl_save_exec_prefix"
10068 prefix="$acl_save_prefix"
10069
10070 if test "X$x" = "X-I$additional_includedir"; then
10071 haveit=yes
10072 break
10073 fi
10074 done
10075 if test -z "$haveit"; then
10076 if test -d "$additional_includedir"; then
10077 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10078 fi
10079 fi
10080 fi
10081 fi
10082 fi
10083 if test -n "$found_la"; then
10084 save_libdir="$libdir"
10085 case "$found_la" in
10086 */* | *\\*) . "$found_la" ;;
10087 *) . "./$found_la" ;;
10088 esac
10089 libdir="$save_libdir"
10090 for dep in $dependency_libs; do
10091 case "$dep" in
10092 -L*)
10093 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10094 if test "X$additional_libdir" != "X/usr/lib"; then
10095 haveit=
10096 if test "X$additional_libdir" = "X/usr/local/lib"; then
10097 if test -n "$GCC"; then
10098 case $host_os in
10099 linux*) haveit=yes;;
10100 esac
10101 fi
10102 fi
10103 if test -z "$haveit"; then
10104 haveit=
10105 for x in $LDFLAGS $LIBMPFR; do
10106
10107 acl_save_prefix="$prefix"
10108 prefix="$acl_final_prefix"
10109 acl_save_exec_prefix="$exec_prefix"
10110 exec_prefix="$acl_final_exec_prefix"
10111 eval x=\"$x\"
10112 exec_prefix="$acl_save_exec_prefix"
10113 prefix="$acl_save_prefix"
10114
10115 if test "X$x" = "X-L$additional_libdir"; then
10116 haveit=yes
10117 break
10118 fi
10119 done
10120 if test -z "$haveit"; then
10121 if test -d "$additional_libdir"; then
10122 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10123 fi
10124 fi
10125 haveit=
10126 for x in $LDFLAGS $LTLIBMPFR; do
10127
10128 acl_save_prefix="$prefix"
10129 prefix="$acl_final_prefix"
10130 acl_save_exec_prefix="$exec_prefix"
10131 exec_prefix="$acl_final_exec_prefix"
10132 eval x=\"$x\"
10133 exec_prefix="$acl_save_exec_prefix"
10134 prefix="$acl_save_prefix"
10135
10136 if test "X$x" = "X-L$additional_libdir"; then
10137 haveit=yes
10138 break
10139 fi
10140 done
10141 if test -z "$haveit"; then
10142 if test -d "$additional_libdir"; then
10143 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10144 fi
10145 fi
10146 fi
10147 fi
10148 ;;
10149 -R*)
10150 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10151 if test "$enable_rpath" != no; then
10152 haveit=
10153 for x in $rpathdirs; do
10154 if test "X$x" = "X$dir"; then
10155 haveit=yes
10156 break
10157 fi
10158 done
10159 if test -z "$haveit"; then
10160 rpathdirs="$rpathdirs $dir"
10161 fi
10162 haveit=
10163 for x in $ltrpathdirs; do
10164 if test "X$x" = "X$dir"; then
10165 haveit=yes
10166 break
10167 fi
10168 done
10169 if test -z "$haveit"; then
10170 ltrpathdirs="$ltrpathdirs $dir"
10171 fi
10172 fi
10173 ;;
10174 -l*)
10175 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10176 ;;
10177 *.la)
10178 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10179 ;;
10180 *)
10181 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10182 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10183 ;;
10184 esac
10185 done
10186 fi
10187 else
10188 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10189 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10190 fi
10191 fi
10192 fi
10193 done
10194 done
10195 if test "X$rpathdirs" != "X"; then
10196 if test -n "$hardcode_libdir_separator"; then
10197 alldirs=
10198 for found_dir in $rpathdirs; do
10199 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10200 done
10201 acl_save_libdir="$libdir"
10202 libdir="$alldirs"
10203 eval flag=\"$hardcode_libdir_flag_spec\"
10204 libdir="$acl_save_libdir"
10205 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10206 else
10207 for found_dir in $rpathdirs; do
10208 acl_save_libdir="$libdir"
10209 libdir="$found_dir"
10210 eval flag=\"$hardcode_libdir_flag_spec\"
10211 libdir="$acl_save_libdir"
10212 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10213 done
10214 fi
10215 fi
10216 if test "X$ltrpathdirs" != "X"; then
10217 for found_dir in $ltrpathdirs; do
10218 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10219 done
10220 fi
10221
10222
10223 ac_save_CPPFLAGS="$CPPFLAGS"
10224
10225 for element in $INCMPFR; do
10226 haveit=
10227 for x in $CPPFLAGS; do
10228
10229 acl_save_prefix="$prefix"
10230 prefix="$acl_final_prefix"
10231 acl_save_exec_prefix="$exec_prefix"
10232 exec_prefix="$acl_final_exec_prefix"
10233 eval x=\"$x\"
10234 exec_prefix="$acl_save_exec_prefix"
10235 prefix="$acl_save_prefix"
10236
10237 if test "X$x" = "X$element"; then
10238 haveit=yes
10239 break
10240 fi
10241 done
10242 if test -z "$haveit"; then
10243 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10244 fi
10245 done
10246
10247
10248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10249$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10250if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10251 $as_echo_n "(cached) " >&6
10252else
10253
10254 ac_save_LIBS="$LIBS"
10255 LIBS="$LIBS $LIBMPFR"
10256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10257/* end confdefs.h. */
10258#include <mpfr.h>
10259int
10260main ()
10261{
10262mpfr_exp_t exp; mpfr_t x;
10263 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10264 ;
10265 return 0;
10266}
10267_ACEOF
10268if ac_fn_c_try_link "$LINENO"; then :
10269 ac_cv_libmpfr=yes
10270else
10271 ac_cv_libmpfr=no
10272fi
10273rm -f core conftest.err conftest.$ac_objext \
10274 conftest$ac_exeext conftest.$ac_ext
10275 LIBS="$ac_save_LIBS"
10276
10277fi
10278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10279$as_echo "$ac_cv_libmpfr" >&6; }
10280 if test "$ac_cv_libmpfr" = yes; then
10281 HAVE_LIBMPFR=yes
10282
10283$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10284
10285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10286$as_echo_n "checking how to link with libmpfr... " >&6; }
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10288$as_echo "$LIBMPFR" >&6; }
10289 else
10290 HAVE_LIBMPFR=no
10291 CPPFLAGS="$ac_save_CPPFLAGS"
10292 LIBMPFR=
10293 LTLIBMPFR=
10294 fi
10295
10296
10297
10298
10299
10300
10301 if test "$HAVE_LIBMPFR" != yes; then
10302 if test "$with_mpfr" = yes; then
d0ac1c44 10303 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10304 else
10305 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10306$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10307 fi
10308 fi
10309fi
10310
d344e670
DE
10311# --------------------- #
10312# Check for libpython. #
10313# --------------------- #
10314
a9322a30 10315
a9322a30
TT
10316
10317
ec685c5e 10318
0c4a4063 10319
81ecdfbb
RW
10320# Check whether --with-python was given.
10321if test "${with_python+set}" = set; then :
10322 withval=$with_python;
bec39cab 10323else
81ecdfbb 10324 with_python=auto
bec39cab 10325fi
bec39cab 10326
81ecdfbb
RW
10327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10328$as_echo_n "checking whether to use python... " >&6; }
10329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10330$as_echo "$with_python" >&6; }
9a156167 10331
81ecdfbb
RW
10332if test "${with_python}" = no; then
10333 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10334$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10335 have_libpython=no
bec39cab 10336else
81ecdfbb 10337 case "${with_python}" in
8c85a4e2 10338 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10339 if test -d ${with_python}; then
10340 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10341 python_prog="${with_python}/bin/python"
0c4a4063 10342 python_prefix=
9c4ea6c5
JB
10343 # If python does not exit ${with_python}/bin, then try in
10344 # ${with_python}. On Windows/MinGW, this is where the Python
10345 # executable is.
10346 if test ! -x "${python_prog}"; then
10347 python_prog="${with_python}/python"
10348 python_prefix=
10349 fi
e7a30f46 10350 if test ! -x "${python_prog}"; then
ec685c5e
DE
10351 # Fall back to gdb 7.0/7.1 behaviour.
10352 python_prog=missing
0c4a4063 10353 python_prefix=${with_python}
ec685c5e 10354 fi
e7a30f46 10355 elif test -x "${with_python}"; then
ec685c5e
DE
10356 # While we can't run python compiled for $host (unless host == build),
10357 # the user could write a script that provides the needed information,
10358 # so we support that.
ec685c5e 10359 python_prog=${with_python}
0c4a4063 10360 python_prefix=
ec685c5e 10361 else
d0ac1c44 10362 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10363 fi
81ecdfbb 10364 ;;
ec685c5e
DE
10365 */*)
10366 # Disallow --with-python=foo/bar.
d0ac1c44 10367 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10368 ;;
ec685c5e
DE
10369 *)
10370 # The user has either specified auto, yes, or the name of the python
10371 # program assumed to be in $PATH.
10372 python_prefix=
10373 case "${with_python}" in
10374 yes | auto)
10375 if test ${build} = ${host}; then
10376 # Extract the first word of "python", so it can be a program name with args.
10377set dummy python; ac_word=$2
10378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10379$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10380if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10381 $as_echo_n "(cached) " >&6
10382else
10383 case $python_prog_path in
10384 [\\/]* | ?:[\\/]*)
10385 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10386 ;;
10387 *)
10388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10389for as_dir in $PATH
10390do
10391 IFS=$as_save_IFS
10392 test -z "$as_dir" && as_dir=.
10393 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10394 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10395 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10396 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10397 break 2
10398 fi
10399done
10400 done
10401IFS=$as_save_IFS
10402
10403 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10404 ;;
10405esac
10406fi
10407python_prog_path=$ac_cv_path_python_prog_path
10408if test -n "$python_prog_path"; then
10409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10410$as_echo "$python_prog_path" >&6; }
10411else
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10413$as_echo "no" >&6; }
10414fi
10415
10416
10417 if test "${python_prog_path}" = missing; then
10418 python_prog=missing
10419 else
10420 python_prog=${python_prog_path}
10421 fi
10422 else
10423 # Not much we can do except assume the cross-compiler will find the
10424 # right files.
10425 python_prog=missing
10426 fi
10427 ;;
10428 *)
10429 # While we can't run python compiled for $host (unless host == build),
10430 # the user could write a script that provides the needed information,
10431 # so we support that.
10432 python_prog="${with_python}"
10433 # Extract the first word of "${python_prog}", so it can be a program name with args.
10434set dummy ${python_prog}; ac_word=$2
10435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10436$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10437if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10438 $as_echo_n "(cached) " >&6
10439else
10440 case $python_prog_path in
10441 [\\/]* | ?:[\\/]*)
10442 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10443 ;;
10444 *)
10445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10446for as_dir in $PATH
10447do
10448 IFS=$as_save_IFS
10449 test -z "$as_dir" && as_dir=.
10450 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10452 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10454 break 2
10455 fi
10456done
10457 done
10458IFS=$as_save_IFS
10459
10460 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10461 ;;
10462esac
10463fi
10464python_prog_path=$ac_cv_path_python_prog_path
10465if test -n "$python_prog_path"; then
10466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10467$as_echo "$python_prog_path" >&6; }
10468else
10469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10470$as_echo "no" >&6; }
10471fi
10472
10473
10474 if test "${python_prog_path}" = missing; then
d0ac1c44 10475 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10476 fi
10477 ;;
10478 esac
81ecdfbb
RW
10479 esac
10480
ec685c5e 10481 if test "${python_prog}" != missing; then
e7a30f46
DE
10482 # We have a python program to use, but it may be too old.
10483 # Don't flag an error for --with-python=auto (the default).
10484 have_python_config=yes
ec685c5e
DE
10485 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10486 if test $? != 0; then
e7a30f46
DE
10487 have_python_config=failed
10488 if test "${with_python}" != auto; then
d0ac1c44 10489 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10490 fi
ec685c5e
DE
10491 fi
10492 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10493 if test $? != 0; then
e7a30f46
DE
10494 have_python_config=failed
10495 if test "${with_python}" != auto; then
d0ac1c44 10496 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10497 fi
ec685c5e 10498 fi
0c4a4063
DE
10499 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10500 if test $? != 0; then
e7a30f46
DE
10501 have_python_config=failed
10502 if test "${with_python}" != auto; then
d0ac1c44 10503 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10504 fi
0c4a4063 10505 fi
ec685c5e 10506 else
ac534cba
JB
10507 # We do not have a python executable we can use to determine where
10508 # to find the Python headers and libs. We cannot guess the include
10509 # path from the python_prefix either, because that include path
10510 # depends on the Python version. So, there is nothing much we can
10511 # do except assume that the compiler will be able to find those files.
10512 python_includes=
10513 python_libs=
0c4a4063 10514 have_python_config=no
ec685c5e 10515 fi
bec39cab 10516
ec685c5e
DE
10517 # If we have python-config, only try the configuration it provides.
10518 # Otherwise fallback on the old way of trying different versions of
10519 # python in turn.
81ecdfbb 10520
ec685c5e
DE
10521 have_libpython=no
10522 if test "${have_python_config}" = yes; then
c1039e3c
JB
10523 # Determine the Python version by extracting "-lpython<version>"
10524 # part of the python_libs. <version> is usually X.Y with X and Y
10525 # being decimal numbers, but can also be XY (seen on Windows).
10526 #
10527 # The extraction is performed using sed with a regular expression.
10528 # Initially, the regexp used was using the '?' quantifier to make
10529 # the dot in the version number optional. Unfortunately, this
10530 # does not work with non-GNU versions of sed because, because of
10531 # what looks like a limitation (the '?' quantifier does not work
10532 # with back-references). We work around this limitation by using
10533 # the '*' quantifier instead. It means that, in theory, we might
10534 # match unexpected version strings such as "-lpython2..7", but
10535 # this seems unlikely in practice. And even if that happens,
10536 # an error will be triggered later on, when checking that version
10537 # number.
ec685c5e 10538 python_version=`echo " ${python_libs} " \
c1039e3c 10539 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10540 case "${python_version}" in
10541 python*)
ec685c5e
DE
10542
10543 version=${python_version}
10544
10545 new_CPPFLAGS=${python_includes}
10546 new_LIBS=${python_libs}
81ecdfbb
RW
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10548$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10549 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10550 save_LIBS=$LIBS
ec685c5e 10551 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10552 LIBS="$new_LIBS $LIBS"
ec685c5e 10553 found_usable_python=no
81ecdfbb 10554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10555/* end confdefs.h. */
ac534cba 10556#include "Python.h"
81ecdfbb
RW
10557int
10558main ()
10559{
10560Py_Initialize ();
10561 ;
10562 return 0;
10563}
bec39cab 10564_ACEOF
81ecdfbb 10565if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10566 have_libpython=${version}
10567 found_usable_python=yes
ac534cba
JB
10568 PYTHON_CPPFLAGS=$new_CPPFLAGS
10569 PYTHON_LIBS=$new_LIBS
9a156167 10570fi
81ecdfbb
RW
10571rm -f core conftest.err conftest.$ac_objext \
10572 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10573 CPPFLAGS=$save_CPPFLAGS
10574 LIBS=$save_LIBS
ec685c5e
DE
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10576$as_echo "${found_usable_python}" >&6; }
9a156167 10577
0c4a4063
DE
10578 ;;
10579 *)
d0ac1c44 10580 as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10581 ;;
10582 esac
e7a30f46 10583 elif test "${have_python_config}" != failed; then
ec685c5e 10584 if test "${have_libpython}" = no; then
9a156167 10585
420697bb
TT
10586 version=python2.7
10587
10588 new_CPPFLAGS=${python_includes}
bf27f0e2 10589 new_LIBS="-lpython2.7 ${python_libs}"
420697bb
TT
10590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10591$as_echo_n "checking for ${version}... " >&6; }
10592 save_CPPFLAGS=$CPPFLAGS
10593 save_LIBS=$LIBS
10594 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10595 LIBS="$new_LIBS $LIBS"
420697bb
TT
10596 found_usable_python=no
10597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10598/* end confdefs.h. */
ac534cba 10599#include "Python.h"
420697bb
TT
10600int
10601main ()
10602{
10603Py_Initialize ();
10604 ;
10605 return 0;
10606}
10607_ACEOF
10608if ac_fn_c_try_link "$LINENO"; then :
10609 have_libpython=${version}
10610 found_usable_python=yes
ac534cba
JB
10611 PYTHON_CPPFLAGS=$new_CPPFLAGS
10612 PYTHON_LIBS=$new_LIBS
420697bb
TT
10613fi
10614rm -f core conftest.err conftest.$ac_objext \
10615 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10616 CPPFLAGS=$save_CPPFLAGS
10617 LIBS=$save_LIBS
420697bb
TT
10618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10619$as_echo "${found_usable_python}" >&6; }
10620
10621 fi
10622 if test "${have_libpython}" = no; then
10623
ec685c5e
DE
10624 version=python2.6
10625
10626 new_CPPFLAGS=${python_includes}
bf27f0e2 10627 new_LIBS="-lpython2.6 ${python_libs}"
ec685c5e
DE
10628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10629$as_echo_n "checking for ${version}... " >&6; }
10630 save_CPPFLAGS=$CPPFLAGS
10631 save_LIBS=$LIBS
10632 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10633 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10634 found_usable_python=no
10635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10636/* end confdefs.h. */
ac534cba 10637#include "Python.h"
ec685c5e
DE
10638int
10639main ()
10640{
10641Py_Initialize ();
10642 ;
10643 return 0;
10644}
10645_ACEOF
10646if ac_fn_c_try_link "$LINENO"; then :
10647 have_libpython=${version}
10648 found_usable_python=yes
ac534cba
JB
10649 PYTHON_CPPFLAGS=$new_CPPFLAGS
10650 PYTHON_LIBS=$new_LIBS
ec685c5e 10651fi
81ecdfbb
RW
10652rm -f core conftest.err conftest.$ac_objext \
10653 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10654 CPPFLAGS=$save_CPPFLAGS
10655 LIBS=$save_LIBS
ec685c5e
DE
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10657$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10658
ec685c5e
DE
10659 fi
10660 fi
9c4ea6c5 10661 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10662
10663$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10664
9c4ea6c5 10665 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10666
10667$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10668
81ecdfbb 10669 fi
ec685c5e
DE
10670
10671 if test "${have_libpython}" = no; then
81ecdfbb
RW
10672 case "${with_python}" in
10673 yes)
d0ac1c44 10674 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10675 ;;
10676 auto)
10677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10678$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10679 ;;
10680 *)
d0ac1c44 10681 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10682 ;;
10683 esac
0c4a4063
DE
10684 else
10685 if test -n "${python_prefix}"; then
10686
10687cat >>confdefs.h <<_ACEOF
10688#define WITH_PYTHON_PATH "${python_prefix}"
10689_ACEOF
10690
10691
10692 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10693 if test "x$prefix" = xNONE; then
10694 test_prefix=/usr/local
10695 else
10696 test_prefix=$prefix
10697 fi
10698 else
10699 test_prefix=$exec_prefix
10700 fi
10701 value=0
10702 case ${python_prefix} in
10703 "${test_prefix}"|"${test_prefix}/"*|\
10704 '${exec_prefix}'|'${exec_prefix}/'*)
10705 value=1
10706 ;;
10707 esac
10708
10709cat >>confdefs.h <<_ACEOF
10710#define PYTHON_PATH_RELOCATABLE $value
10711_ACEOF
10712
10713
10714 fi
81ecdfbb 10715 fi
436868fb 10716fi
436868fb 10717
ec685c5e 10718if test "${have_libpython}" != no; then
436868fb 10719
81ecdfbb 10720$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10721
81ecdfbb
RW
10722 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10723 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10724 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10725 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10726 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10727
81ecdfbb
RW
10728 # Flags needed to compile Python code (taken from python-config --cflags).
10729 # We cannot call python-config directly because it will output whatever was
10730 # used when compiling the Python interpreter itself, including flags which
10731 # would make the python-related objects be compiled differently from the
10732 # rest of GDB (e.g., -O2 and -fPIC).
10733 if test "${GCC}" = yes; then
ae292b3a
TT
10734 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10735 # Python headers recommend -DNDEBUG, but it's unclear if that just
10736 # refers to building Python itself. In release mode, though, it
10737 # doesn't hurt for the Python code in gdb to follow.
10738 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10739 fi
436868fb 10740
81ecdfbb
RW
10741 if test "x${tentative_python_cflags}" != x; then
10742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10743$as_echo_n "checking compiler flags for python code... " >&6; }
10744 for flag in ${tentative_python_cflags}; do
10745 # Check that the compiler accepts it
10746 saved_CFLAGS="$CFLAGS"
10747 CFLAGS="$CFLAGS $flag"
10748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10749/* end confdefs.h. */
81ecdfbb 10750
a9322a30
TT
10751int
10752main ()
10753{
a9322a30
TT
10754
10755 ;
10756 return 0;
10757}
bec39cab 10758_ACEOF
81ecdfbb
RW
10759if ac_fn_c_try_compile "$LINENO"; then :
10760 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10761fi
81ecdfbb
RW
10762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10763 CFLAGS="$saved_CFLAGS"
10764 done
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10766$as_echo "${PYTHON_CFLAGS}" >&6; }
10767 fi
043b6510 10768
c83393b9
JB
10769 # On x64 Windows, Python's include headers, and pyconfig.h in
10770 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10771 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10772 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10773 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10774 # The issue was reported to the Python community, but still isn't
10775 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10776
043b6510 10777 case "$gdb_host" in
c83393b9
JB
10778 mingw64)
10779 if test "${GCC}" = yes; then
10780 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10781 fi
10782 ;;
043b6510 10783 esac
a8db4212
YPK
10784
10785 # Note that "python -m threading" cannot be used to check for
10786 # threading support due to a bug in Python 2.7.3
10787 # (http://bugs.python.org/issue15567).
10788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10789$as_echo_n "checking whether python supports threads... " >&6; }
10790 saved_CPPFLAGS="${CPPFLAGS}"
10791 CPPFLAGS="${PYTHON_CPPFLAGS}"
10792 # Note that the test is reversed so that python_has_threads=yes on
10793 # unexpected failures.
10794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10795/* end confdefs.h. */
10796
10797#include <Python.h>
10798#ifdef WITH_THREAD
10799# error
10800#endif
10801
10802_ACEOF
10803if ac_fn_c_try_cpp "$LINENO"; then :
10804 python_has_threads=no
10805else
10806 python_has_threads=yes
10807fi
d0ac1c44 10808rm -f conftest.err conftest.i conftest.$ac_ext
a8db4212
YPK
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10810$as_echo "${python_has_threads}" >&6; }
10811 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10812else
6dddc817
DE
10813 # Even if Python support is not compiled in, we need to have this file
10814 # included so that the "python" command, et.al., still exists.
8fd8d003 10815 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10816 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10817fi
9a156167 10818
a4a1c157
PA
10819# Work around Python http://bugs.python.org/issue10112. See also
10820# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10821# no effect. Note that the only test after this that uses Python is
10822# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10823# run without -export-dynamic too.
10824PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10825
10826
ed3ef339
DE
10827
10828
4df42755
DE
10829 if test "${have_libpython}" != no; then
10830 HAVE_PYTHON_TRUE=
10831 HAVE_PYTHON_FALSE='#'
10832else
10833 HAVE_PYTHON_TRUE='#'
10834 HAVE_PYTHON_FALSE=
10835fi
10836
ed3ef339
DE
10837
10838# -------------------- #
10839# Check for libguile. #
10840# -------------------- #
10841
10842
e1402065
DE
10843
10844
10845
10846
10847# Check whether --with-guile was given.
10848if test "${with_guile+set}" = set; then :
10849 withval=$with_guile;
10850else
10851 with_guile=auto
10852fi
10853
10854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10855$as_echo_n "checking whether to use guile... " >&6; }
10856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10857$as_echo "$with_guile" >&6; }
10858
ed3ef339
DE
10859# Extract the first word of "pkg-config", so it can be a program name with args.
10860set dummy pkg-config; ac_word=$2
10861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10862$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10863if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10864 $as_echo_n "(cached) " >&6
10865else
10866 case $pkg_config_prog_path in
10867 [\\/]* | ?:[\\/]*)
10868 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10869 ;;
10870 *)
10871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10872for as_dir in $PATH
10873do
10874 IFS=$as_save_IFS
10875 test -z "$as_dir" && as_dir=.
10876 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10878 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10880 break 2
10881 fi
10882done
10883 done
10884IFS=$as_save_IFS
10885
10886 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10887 ;;
10888esac
10889fi
10890pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10891if test -n "$pkg_config_prog_path"; then
10892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10893$as_echo "$pkg_config_prog_path" >&6; }
10894else
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10896$as_echo "no" >&6; }
10897fi
10898
10899
10900
6e66f753 10901try_guile_versions="guile-2.0"
ed3ef339
DE
10902have_libguile=no
10903case "${with_guile}" in
10904no)
10905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10906$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10907 ;;
10908auto)
e1402065
DE
10909 if test "${pkg_config_prog_path}" = "missing"; then
10910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10911$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10912 else
ed3ef339
DE
10913
10914 pkg_config=${pkg_config_prog_path}
10915 guile_version_list=${try_guile_versions}
10916 flag_errors=no
10917
ed3ef339
DE
10918 found_usable_guile=checking
10919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10920$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10921 for guile_version in ${guile_version_list}; do
10922 ${pkg_config} --exists ${guile_version} 2>/dev/null
10923 if test $? != 0; then
10924 continue
10925 fi
10926 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10927 if test $? != 0; then
d0ac1c44 10928 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10929 fi
10930 new_LIBS=`${pkg_config} --libs ${guile_version}`
10931 if test $? != 0; then
d0ac1c44 10932 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10933 fi
10934 found_usable_guile=${guile_version}
10935 break
10936 done
10937 if test "${found_usable_guile}" = "checking"; then
10938 if test "${flag_errors}" = "yes"; then
d0ac1c44 10939 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10940 else
10941 found_usable_guile=no
10942 fi
10943 fi
10944 if test "${found_usable_guile}" != no; then
10945 save_CPPFLAGS=$CPPFLAGS
10946 save_LIBS=$LIBS
10947 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10948 LIBS="$LIBS $new_LIBS"
10949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10950/* end confdefs.h. */
10951#include "libguile.h"
10952int
10953main ()
10954{
10955scm_init_guile ();
10956 ;
10957 return 0;
10958}
10959_ACEOF
10960if ac_fn_c_try_link "$LINENO"; then :
10961 have_libguile=yes
10962 GUILE_CPPFLAGS=$new_CPPFLAGS
10963 GUILE_LIBS=$new_LIBS
10964else
10965 found_usable_guile=no
10966fi
10967rm -f core conftest.err conftest.$ac_objext \
10968 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10969 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10970if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10971
10972$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10973
10974
10975fi
10976
ed3ef339
DE
10977 CPPFLAGS=$save_CPPFLAGS
10978 LIBS=$save_LIBS
10979 if test "${found_usable_guile}" = no; then
10980 if test "${flag_errors}" = yes; then
10981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10983as_fn_error $? "linking guile version ${guile_version} test program failed
10984See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10985 fi
10986 fi
10987 fi
10988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10989$as_echo "${found_usable_guile}" >&6; }
10990
e1402065 10991 fi
ed3ef339
DE
10992 ;;
10993yes)
e1402065 10994 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 10995 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 10996 fi
ed3ef339
DE
10997
10998 pkg_config=${pkg_config_prog_path}
10999 guile_version_list=${try_guile_versions}
11000 flag_errors=yes
11001
ed3ef339
DE
11002 found_usable_guile=checking
11003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11004$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11005 for guile_version in ${guile_version_list}; do
11006 ${pkg_config} --exists ${guile_version} 2>/dev/null
11007 if test $? != 0; then
11008 continue
11009 fi
11010 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11011 if test $? != 0; then
d0ac1c44 11012 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11013 fi
11014 new_LIBS=`${pkg_config} --libs ${guile_version}`
11015 if test $? != 0; then
d0ac1c44 11016 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11017 fi
11018 found_usable_guile=${guile_version}
11019 break
11020 done
11021 if test "${found_usable_guile}" = "checking"; then
11022 if test "${flag_errors}" = "yes"; then
d0ac1c44 11023 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11024 else
11025 found_usable_guile=no
11026 fi
11027 fi
11028 if test "${found_usable_guile}" != no; then
11029 save_CPPFLAGS=$CPPFLAGS
11030 save_LIBS=$LIBS
11031 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11032 LIBS="$LIBS $new_LIBS"
11033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11034/* end confdefs.h. */
11035#include "libguile.h"
11036int
11037main ()
11038{
11039scm_init_guile ();
11040 ;
11041 return 0;
11042}
11043_ACEOF
11044if ac_fn_c_try_link "$LINENO"; then :
11045 have_libguile=yes
11046 GUILE_CPPFLAGS=$new_CPPFLAGS
11047 GUILE_LIBS=$new_LIBS
11048else
11049 found_usable_guile=no
11050fi
11051rm -f core conftest.err conftest.$ac_objext \
11052 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11053 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11054if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11055
11056$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11057
11058
11059fi
11060
ed3ef339
DE
11061 CPPFLAGS=$save_CPPFLAGS
11062 LIBS=$save_LIBS
11063 if test "${found_usable_guile}" = no; then
11064 if test "${flag_errors}" = yes; then
11065 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11067as_fn_error $? "linking guile version ${guile_version} test program failed
11068See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11069 fi
11070 fi
11071 fi
11072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11073$as_echo "${found_usable_guile}" >&6; }
11074
11075 ;;
11076[\\/]* | ?:[\\/]*)
e1402065 11077 if test -x "${with_guile}"; then
ed3ef339
DE
11078
11079 pkg_config=${with_guile}
11080 guile_version_list=${try_guile_versions}
11081 flag_errors=yes
11082
ed3ef339
DE
11083 found_usable_guile=checking
11084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11085$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11086 for guile_version in ${guile_version_list}; do
11087 ${pkg_config} --exists ${guile_version} 2>/dev/null
11088 if test $? != 0; then
11089 continue
11090 fi
11091 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11092 if test $? != 0; then
d0ac1c44 11093 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11094 fi
11095 new_LIBS=`${pkg_config} --libs ${guile_version}`
11096 if test $? != 0; then
d0ac1c44 11097 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11098 fi
11099 found_usable_guile=${guile_version}
11100 break
11101 done
11102 if test "${found_usable_guile}" = "checking"; then
11103 if test "${flag_errors}" = "yes"; then
d0ac1c44 11104 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11105 else
11106 found_usable_guile=no
11107 fi
11108 fi
11109 if test "${found_usable_guile}" != no; then
11110 save_CPPFLAGS=$CPPFLAGS
11111 save_LIBS=$LIBS
11112 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11113 LIBS="$LIBS $new_LIBS"
11114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11115/* end confdefs.h. */
11116#include "libguile.h"
11117int
11118main ()
11119{
11120scm_init_guile ();
11121 ;
11122 return 0;
11123}
11124_ACEOF
11125if ac_fn_c_try_link "$LINENO"; then :
11126 have_libguile=yes
11127 GUILE_CPPFLAGS=$new_CPPFLAGS
11128 GUILE_LIBS=$new_LIBS
11129else
11130 found_usable_guile=no
11131fi
11132rm -f core conftest.err conftest.$ac_objext \
11133 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11134 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11135if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11136
11137$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11138
11139
11140fi
11141
ed3ef339
DE
11142 CPPFLAGS=$save_CPPFLAGS
11143 LIBS=$save_LIBS
11144 if test "${found_usable_guile}" = no; then
11145 if test "${flag_errors}" = yes; then
11146 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11148as_fn_error $? "linking guile version ${guile_version} test program failed
11149See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11150 fi
11151 fi
11152 fi
11153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11154$as_echo "${found_usable_guile}" >&6; }
11155
e1402065 11156 else
d0ac1c44 11157 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11158 fi
ed3ef339
DE
11159 ;;
11160"" | */*)
11161 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11162 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11163 ;;
11164*)
11165 # A space separate list of guile versions to try, in order.
e1402065 11166 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11167 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11168 fi
ed3ef339
DE
11169
11170 pkg_config=${pkg_config_prog_path}
11171 guile_version_list=${with_guile}
11172 flag_errors=yes
11173
ed3ef339
DE
11174 found_usable_guile=checking
11175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11176$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11177 for guile_version in ${guile_version_list}; do
11178 ${pkg_config} --exists ${guile_version} 2>/dev/null
11179 if test $? != 0; then
11180 continue
11181 fi
11182 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11183 if test $? != 0; then
d0ac1c44 11184 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11185 fi
11186 new_LIBS=`${pkg_config} --libs ${guile_version}`
11187 if test $? != 0; then
d0ac1c44 11188 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11189 fi
11190 found_usable_guile=${guile_version}
11191 break
11192 done
11193 if test "${found_usable_guile}" = "checking"; then
11194 if test "${flag_errors}" = "yes"; then
d0ac1c44 11195 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11196 else
11197 found_usable_guile=no
11198 fi
11199 fi
11200 if test "${found_usable_guile}" != no; then
11201 save_CPPFLAGS=$CPPFLAGS
11202 save_LIBS=$LIBS
11203 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11204 LIBS="$LIBS $new_LIBS"
11205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11206/* end confdefs.h. */
11207#include "libguile.h"
11208int
11209main ()
11210{
11211scm_init_guile ();
11212 ;
11213 return 0;
11214}
11215_ACEOF
11216if ac_fn_c_try_link "$LINENO"; then :
11217 have_libguile=yes
11218 GUILE_CPPFLAGS=$new_CPPFLAGS
11219 GUILE_LIBS=$new_LIBS
11220else
11221 found_usable_guile=no
11222fi
11223rm -f core conftest.err conftest.$ac_objext \
11224 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11225 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11226if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11227
11228$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11229
11230
11231fi
11232
ed3ef339
DE
11233 CPPFLAGS=$save_CPPFLAGS
11234 LIBS=$save_LIBS
11235 if test "${found_usable_guile}" = no; then
11236 if test "${flag_errors}" = yes; then
11237 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11239as_fn_error $? "linking guile version ${guile_version} test program failed
11240See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11241 fi
11242 fi
11243 fi
11244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11245$as_echo "${found_usable_guile}" >&6; }
11246
11247 ;;
11248esac
11249
e76c5d17 11250if test "${have_libguile}" != no; then
d342a0da
DE
11251 case "${with_guile}" in
11252 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11253
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11255$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11256if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11257 $as_echo_n "(cached) " >&6
11258else
d342a0da 11259 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11260
11261 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11262 # the 'guild' and 'bindir' variables. In that case, try to guess
11263 # what the program name is, at the risk of getting it wrong if
11264 # Guile was configured with '--program-suffix' or similar.
11265 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11266 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11267 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11268 fi
11269
11270fi
11271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11272$as_echo "$ac_cv_guild_program_name" >&6; }
11273
11274 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11275 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11276 fi
11277
11278 GUILD="$ac_cv_guild_program_name"
11279
11280
d342a0da
DE
11281 ;;
11282 *)
11283
11284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11285$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11286if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11287 $as_echo_n "(cached) " >&6
11288else
11289 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11290
11291 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11292 # the 'guild' and 'bindir' variables. In that case, try to guess
11293 # what the program name is, at the risk of getting it wrong if
11294 # Guile was configured with '--program-suffix' or similar.
11295 if test "x$ac_cv_guild_program_name" = "x"; then
11296 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11297 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11298 fi
11299
11300fi
11301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11302$as_echo "$ac_cv_guild_program_name" >&6; }
11303
11304 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11305 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11306 fi
11307
11308 GUILD="$ac_cv_guild_program_name"
11309
11310
11311 ;;
11312 esac
e76c5d17
DE
11313
11314
11315 if test "$cross_compiling" = no; then
11316 GUILD_TARGET_FLAG=
11317 else
11318 GUILD_TARGET_FLAG="--target=$host"
11319 fi
11320
11321
11322
11323
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11325$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11326if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11327 $as_echo_n "(cached) " >&6
11328else
11329 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11330 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11331 ac_cv_guild_ok=yes
11332 else
11333 ac_cv_guild_ok=no
11334 fi
11335fi
11336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11337$as_echo "$ac_cv_guild_ok" >&6; }
11338
11339 if test "$ac_cv_guild_ok" = no; then
11340 have_libguile=no
11341 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11342$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11343 fi
11344fi
11345
ed3ef339
DE
11346if test "${have_libguile}" != no; then
11347
11348$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11349
11350 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11351 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11352 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11353 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11354 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11355
11356 save_LIBS="$LIBS"
11357 save_CPPFLAGS="$CPPFLAGS"
11358 LIBS="$GUILE_LIBS"
11359 CPPFLAGS="$GUILE_CPPFLAGS"
11360 for ac_func in scm_new_smob
11361do :
11362 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11363if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11364 cat >>confdefs.h <<_ACEOF
11365#define HAVE_SCM_NEW_SMOB 1
11366_ACEOF
11367
11368fi
11369done
11370
11371 LIBS="$save_LIBS"
11372 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11373else
11374 # Even if Guile support is not compiled in, we need to have these files
11375 # included.
bd810fff 11376 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11377 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11378fi
9a156167 11379
ac534cba 11380
4df42755
DE
11381 if test "${have_libguile}" != no; then
11382 HAVE_GUILE_TRUE=
11383 HAVE_GUILE_FALSE='#'
11384else
11385 HAVE_GUILE_TRUE='#'
11386 HAVE_GUILE_FALSE=
11387fi
11388
ac534cba 11389
62f29fda
TT
11390# ---------------------------- #
11391# Check for source highlight. #
11392# ---------------------------- #
11393
11394SRCHIGH_LIBS=
11395SRCHIGH_CFLAGS=
6c28e44a
TT
11396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
11397$as_echo_n "checking for the source-highlight library... " >&6; }
62f29fda
TT
11398if test "${pkg_config_prog_path}" = "missing"; then
11399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
11400$as_echo "no - pkg-config not found" >&6; }
11401else
11402 if ${pkg_config_prog_path} --exists source-highlight; then
11403 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11404 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11405
11406$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11407
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11409$as_echo "yes" >&6; }
11410 else
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11412$as_echo "no" >&6; }
11413 fi
11414fi
11415
11416
11417
d344e670
DE
11418# --------------------- #
11419# Check for libmcheck. #
11420# --------------------- #
11421
a8db4212
YPK
11422# Enable -lmcheck by default (it provides cheap-enough memory mangling),
11423# but turn it off if Python is enabled with threads, since -lmcheck is
11424# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11425# and for releases.
17ef446e
PA
11426if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11427 && $development; then
11428 libmcheck_default=yes
11429else
11430 libmcheck_default=no
a8db4212
YPK
11431fi
11432
17ef446e
PA
11433 # Check whether --enable-libmcheck was given.
11434if test "${enable_libmcheck+set}" = set; then :
11435 enableval=$enable_libmcheck; case "${enableval}" in
11436 yes | y) ENABLE_LIBMCHECK="yes" ;;
11437 no | n) ENABLE_LIBMCHECK="no" ;;
d0ac1c44 11438 *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
17ef446e
PA
11439 esac
11440fi
11441
11442
11443 if test -z "${ENABLE_LIBMCHECK}"; then
11444 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 11445 fi
17ef446e
PA
11446
11447 if test "$ENABLE_LIBMCHECK" = "yes" ; then
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212 11449$as_echo_n "checking for main in -lmcheck... " >&6; }
d0ac1c44 11450if ${ac_cv_lib_mcheck_main+:} false; then :
a8db4212
YPK
11451 $as_echo_n "(cached) " >&6
11452else
11453 ac_check_lib_save_LIBS=$LIBS
11454LIBS="-lmcheck $LIBS"
11455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11456/* end confdefs.h. */
11457
11458
11459int
11460main ()
11461{
11462return main ();
11463 ;
11464 return 0;
11465}
11466_ACEOF
11467if ac_fn_c_try_link "$LINENO"; then :
11468 ac_cv_lib_mcheck_main=yes
11469else
11470 ac_cv_lib_mcheck_main=no
11471fi
11472rm -f core conftest.err conftest.$ac_objext \
11473 conftest$ac_exeext conftest.$ac_ext
11474LIBS=$ac_check_lib_save_LIBS
11475fi
11476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11477$as_echo "$ac_cv_lib_mcheck_main" >&6; }
d0ac1c44 11478if test "x$ac_cv_lib_mcheck_main" = xyes; then :
a8db4212
YPK
11479 cat >>confdefs.h <<_ACEOF
11480#define HAVE_LIBMCHECK 1
11481_ACEOF
11482
11483 LIBS="-lmcheck $LIBS"
11484
11485fi
11486
17ef446e
PA
11487 fi
11488
11489
11490if test "$ENABLE_LIBMCHECK" = "yes" \
11491 -a "${have_libpython}" != "no" \
11492 -a "${python_has_threads}" = "yes" ; then
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11494$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
11495fi
11496
58bfce93
MM
11497
11498# Check whether --with-intel_pt was given.
11499if test "${with_intel_pt+set}" = set; then :
11500 withval=$with_intel_pt;
11501else
11502 with_intel_pt=auto
11503fi
11504
11505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11506$as_echo_n "checking whether to use intel pt... " >&6; }
11507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11508$as_echo "$with_intel_pt" >&6; }
11509
11510if test "${with_intel_pt}" = no; then
bc504a31
PA
11511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11512$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11513 HAVE_LIBIPT=no
11514else
5599c404
MM
11515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11516/* end confdefs.h. */
11517
11518#include <linux/perf_event.h>
11519#ifndef PERF_ATTR_SIZE_VER5
11520# error
11521#endif
11522
11523_ACEOF
11524if ac_fn_c_try_cpp "$LINENO"; then :
11525 perf_event=yes
11526else
11527 perf_event=no
11528fi
d0ac1c44 11529rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11530 if test "$perf_event" != yes; then
11531 if test "$with_intel_pt" = yes; then
d0ac1c44 11532 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11533 else
11534 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11535$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11536 fi
11537 fi
11538
58bfce93
MM
11539
11540
11541
11542
11543
11544
11545
11546
11547 use_additional=yes
11548
11549 acl_save_prefix="$prefix"
11550 prefix="$acl_final_prefix"
11551 acl_save_exec_prefix="$exec_prefix"
11552 exec_prefix="$acl_final_exec_prefix"
11553
11554 eval additional_includedir=\"$includedir\"
11555 eval additional_libdir=\"$libdir\"
11556
11557 exec_prefix="$acl_save_exec_prefix"
11558 prefix="$acl_save_prefix"
11559
11560
11561# Check whether --with-libipt-prefix was given.
11562if test "${with_libipt_prefix+set}" = set; then :
11563 withval=$with_libipt_prefix;
11564 if test "X$withval" = "Xno"; then
11565 use_additional=no
11566 else
11567 if test "X$withval" = "X"; then
11568
11569 acl_save_prefix="$prefix"
11570 prefix="$acl_final_prefix"
11571 acl_save_exec_prefix="$exec_prefix"
11572 exec_prefix="$acl_final_exec_prefix"
11573
11574 eval additional_includedir=\"$includedir\"
11575 eval additional_libdir=\"$libdir\"
11576
11577 exec_prefix="$acl_save_exec_prefix"
11578 prefix="$acl_save_prefix"
11579
11580 else
11581 additional_includedir="$withval/include"
11582 additional_libdir="$withval/lib"
11583 fi
11584 fi
11585
11586fi
11587
11588 LIBIPT=
11589 LTLIBIPT=
11590 INCIPT=
11591 rpathdirs=
11592 ltrpathdirs=
11593 names_already_handled=
11594 names_next_round='ipt '
11595 while test -n "$names_next_round"; do
11596 names_this_round="$names_next_round"
11597 names_next_round=
11598 for name in $names_this_round; do
11599 already_handled=
11600 for n in $names_already_handled; do
11601 if test "$n" = "$name"; then
11602 already_handled=yes
11603 break
11604 fi
11605 done
11606 if test -z "$already_handled"; then
11607 names_already_handled="$names_already_handled $name"
11608 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11609 eval value=\"\$HAVE_LIB$uppername\"
11610 if test -n "$value"; then
11611 if test "$value" = yes; then
11612 eval value=\"\$LIB$uppername\"
11613 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11614 eval value=\"\$LTLIB$uppername\"
11615 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11616 else
11617 :
11618 fi
11619 else
11620 found_dir=
11621 found_la=
11622 found_so=
11623 found_a=
11624 if test $use_additional = yes; then
11625 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11626 found_dir="$additional_libdir"
11627 found_so="$additional_libdir/lib$name.$shlibext"
11628 if test -f "$additional_libdir/lib$name.la"; then
11629 found_la="$additional_libdir/lib$name.la"
11630 fi
11631 else
11632 if test -f "$additional_libdir/lib$name.$libext"; then
11633 found_dir="$additional_libdir"
11634 found_a="$additional_libdir/lib$name.$libext"
11635 if test -f "$additional_libdir/lib$name.la"; then
11636 found_la="$additional_libdir/lib$name.la"
11637 fi
11638 fi
11639 fi
11640 fi
11641 if test "X$found_dir" = "X"; then
11642 for x in $LDFLAGS $LTLIBIPT; do
11643
11644 acl_save_prefix="$prefix"
11645 prefix="$acl_final_prefix"
11646 acl_save_exec_prefix="$exec_prefix"
11647 exec_prefix="$acl_final_exec_prefix"
11648 eval x=\"$x\"
11649 exec_prefix="$acl_save_exec_prefix"
11650 prefix="$acl_save_prefix"
11651
11652 case "$x" in
11653 -L*)
11654 dir=`echo "X$x" | sed -e 's/^X-L//'`
11655 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11656 found_dir="$dir"
11657 found_so="$dir/lib$name.$shlibext"
11658 if test -f "$dir/lib$name.la"; then
11659 found_la="$dir/lib$name.la"
11660 fi
11661 else
11662 if test -f "$dir/lib$name.$libext"; then
11663 found_dir="$dir"
11664 found_a="$dir/lib$name.$libext"
11665 if test -f "$dir/lib$name.la"; then
11666 found_la="$dir/lib$name.la"
11667 fi
11668 fi
11669 fi
11670 ;;
11671 esac
11672 if test "X$found_dir" != "X"; then
11673 break
11674 fi
11675 done
11676 fi
11677 if test "X$found_dir" != "X"; then
11678 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11679 if test "X$found_so" != "X"; then
11680 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11681 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11682 else
11683 haveit=
11684 for x in $ltrpathdirs; do
11685 if test "X$x" = "X$found_dir"; then
11686 haveit=yes
11687 break
11688 fi
11689 done
11690 if test -z "$haveit"; then
11691 ltrpathdirs="$ltrpathdirs $found_dir"
11692 fi
11693 if test "$hardcode_direct" = yes; then
11694 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11695 else
11696 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11697 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11698 haveit=
11699 for x in $rpathdirs; do
11700 if test "X$x" = "X$found_dir"; then
11701 haveit=yes
11702 break
11703 fi
11704 done
11705 if test -z "$haveit"; then
11706 rpathdirs="$rpathdirs $found_dir"
11707 fi
11708 else
11709 haveit=
11710 for x in $LDFLAGS $LIBIPT; do
11711
11712 acl_save_prefix="$prefix"
11713 prefix="$acl_final_prefix"
11714 acl_save_exec_prefix="$exec_prefix"
11715 exec_prefix="$acl_final_exec_prefix"
11716 eval x=\"$x\"
11717 exec_prefix="$acl_save_exec_prefix"
11718 prefix="$acl_save_prefix"
11719
11720 if test "X$x" = "X-L$found_dir"; then
11721 haveit=yes
11722 break
11723 fi
11724 done
11725 if test -z "$haveit"; then
11726 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11727 fi
11728 if test "$hardcode_minus_L" != no; then
11729 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11730 else
11731 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11732 fi
11733 fi
11734 fi
11735 fi
11736 else
11737 if test "X$found_a" != "X"; then
11738 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11739 else
11740 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11741 fi
11742 fi
11743 additional_includedir=
11744 case "$found_dir" in
11745 */lib | */lib/)
11746 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11747 additional_includedir="$basedir/include"
11748 ;;
11749 esac
11750 if test "X$additional_includedir" != "X"; then
11751 if test "X$additional_includedir" != "X/usr/include"; then
11752 haveit=
11753 if test "X$additional_includedir" = "X/usr/local/include"; then
11754 if test -n "$GCC"; then
11755 case $host_os in
11756 linux*) haveit=yes;;
11757 esac
11758 fi
11759 fi
11760 if test -z "$haveit"; then
11761 for x in $CPPFLAGS $INCIPT; do
11762
11763 acl_save_prefix="$prefix"
11764 prefix="$acl_final_prefix"
11765 acl_save_exec_prefix="$exec_prefix"
11766 exec_prefix="$acl_final_exec_prefix"
11767 eval x=\"$x\"
11768 exec_prefix="$acl_save_exec_prefix"
11769 prefix="$acl_save_prefix"
11770
11771 if test "X$x" = "X-I$additional_includedir"; then
11772 haveit=yes
11773 break
11774 fi
11775 done
11776 if test -z "$haveit"; then
11777 if test -d "$additional_includedir"; then
11778 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11779 fi
11780 fi
11781 fi
11782 fi
11783 fi
11784 if test -n "$found_la"; then
11785 save_libdir="$libdir"
11786 case "$found_la" in
11787 */* | *\\*) . "$found_la" ;;
11788 *) . "./$found_la" ;;
11789 esac
11790 libdir="$save_libdir"
11791 for dep in $dependency_libs; do
11792 case "$dep" in
11793 -L*)
11794 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11795 if test "X$additional_libdir" != "X/usr/lib"; then
11796 haveit=
11797 if test "X$additional_libdir" = "X/usr/local/lib"; then
11798 if test -n "$GCC"; then
11799 case $host_os in
11800 linux*) haveit=yes;;
11801 esac
11802 fi
11803 fi
11804 if test -z "$haveit"; then
11805 haveit=
11806 for x in $LDFLAGS $LIBIPT; do
11807
11808 acl_save_prefix="$prefix"
11809 prefix="$acl_final_prefix"
11810 acl_save_exec_prefix="$exec_prefix"
11811 exec_prefix="$acl_final_exec_prefix"
11812 eval x=\"$x\"
11813 exec_prefix="$acl_save_exec_prefix"
11814 prefix="$acl_save_prefix"
11815
11816 if test "X$x" = "X-L$additional_libdir"; then
11817 haveit=yes
11818 break
11819 fi
11820 done
11821 if test -z "$haveit"; then
11822 if test -d "$additional_libdir"; then
11823 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11824 fi
11825 fi
11826 haveit=
11827 for x in $LDFLAGS $LTLIBIPT; do
11828
11829 acl_save_prefix="$prefix"
11830 prefix="$acl_final_prefix"
11831 acl_save_exec_prefix="$exec_prefix"
11832 exec_prefix="$acl_final_exec_prefix"
11833 eval x=\"$x\"
11834 exec_prefix="$acl_save_exec_prefix"
11835 prefix="$acl_save_prefix"
11836
11837 if test "X$x" = "X-L$additional_libdir"; then
11838 haveit=yes
11839 break
11840 fi
11841 done
11842 if test -z "$haveit"; then
11843 if test -d "$additional_libdir"; then
11844 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11845 fi
11846 fi
11847 fi
11848 fi
11849 ;;
11850 -R*)
11851 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11852 if test "$enable_rpath" != no; then
11853 haveit=
11854 for x in $rpathdirs; do
11855 if test "X$x" = "X$dir"; then
11856 haveit=yes
11857 break
11858 fi
11859 done
11860 if test -z "$haveit"; then
11861 rpathdirs="$rpathdirs $dir"
11862 fi
11863 haveit=
11864 for x in $ltrpathdirs; do
11865 if test "X$x" = "X$dir"; then
11866 haveit=yes
11867 break
11868 fi
11869 done
11870 if test -z "$haveit"; then
11871 ltrpathdirs="$ltrpathdirs $dir"
11872 fi
11873 fi
11874 ;;
11875 -l*)
11876 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11877 ;;
11878 *.la)
11879 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11880 ;;
11881 *)
11882 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11883 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11884 ;;
11885 esac
11886 done
11887 fi
11888 else
11889 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11890 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11891 fi
11892 fi
11893 fi
11894 done
11895 done
11896 if test "X$rpathdirs" != "X"; then
11897 if test -n "$hardcode_libdir_separator"; then
11898 alldirs=
11899 for found_dir in $rpathdirs; do
11900 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11901 done
11902 acl_save_libdir="$libdir"
11903 libdir="$alldirs"
11904 eval flag=\"$hardcode_libdir_flag_spec\"
11905 libdir="$acl_save_libdir"
11906 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11907 else
11908 for found_dir in $rpathdirs; do
11909 acl_save_libdir="$libdir"
11910 libdir="$found_dir"
11911 eval flag=\"$hardcode_libdir_flag_spec\"
11912 libdir="$acl_save_libdir"
11913 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11914 done
11915 fi
11916 fi
11917 if test "X$ltrpathdirs" != "X"; then
11918 for found_dir in $ltrpathdirs; do
11919 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11920 done
11921 fi
11922
11923
11924 ac_save_CPPFLAGS="$CPPFLAGS"
11925
11926 for element in $INCIPT; do
11927 haveit=
11928 for x in $CPPFLAGS; do
11929
11930 acl_save_prefix="$prefix"
11931 prefix="$acl_final_prefix"
11932 acl_save_exec_prefix="$exec_prefix"
11933 exec_prefix="$acl_final_exec_prefix"
11934 eval x=\"$x\"
11935 exec_prefix="$acl_save_exec_prefix"
11936 prefix="$acl_save_prefix"
11937
11938 if test "X$x" = "X$element"; then
11939 haveit=yes
11940 break
11941 fi
11942 done
11943 if test -z "$haveit"; then
11944 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11945 fi
11946 done
11947
11948
11949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11950$as_echo_n "checking for libipt... " >&6; }
d0ac1c44 11951if ${ac_cv_libipt+:} false; then :
58bfce93
MM
11952 $as_echo_n "(cached) " >&6
11953else
11954
11955 ac_save_LIBS="$LIBS"
11956 LIBS="$LIBS $LIBIPT"
11957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11958/* end confdefs.h. */
11959#include "intel-pt.h"
11960int
11961main ()
11962{
11963pt_insn_alloc_decoder (0);
11964 ;
11965 return 0;
11966}
11967_ACEOF
11968if ac_fn_c_try_link "$LINENO"; then :
11969 ac_cv_libipt=yes
11970else
11971 ac_cv_libipt=no
11972fi
11973rm -f core conftest.err conftest.$ac_objext \
11974 conftest$ac_exeext conftest.$ac_ext
11975 LIBS="$ac_save_LIBS"
11976
11977fi
11978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11979$as_echo "$ac_cv_libipt" >&6; }
11980 if test "$ac_cv_libipt" = yes; then
11981 HAVE_LIBIPT=yes
11982
11983$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11984
11985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11986$as_echo_n "checking how to link with libipt... " >&6; }
11987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11988$as_echo "$LIBIPT" >&6; }
11989 else
11990 HAVE_LIBIPT=no
11991 CPPFLAGS="$ac_save_CPPFLAGS"
11992 LIBIPT=
11993 LTLIBIPT=
11994 fi
11995
11996
11997
11998
11999
12000
12001 if test "$HAVE_LIBIPT" != yes; then
12002 if test "$with_intel_pt" = yes; then
d0ac1c44 12003 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
12004 else
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
12006$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
12007 fi
c56ccc05
MM
12008 else
12009 save_LIBS=$LIBS
12010 LIBS="$LIBS $LIBIPT"
12011 for ac_func in pt_insn_event
12012do :
12013 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
d0ac1c44 12014if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
12015 cat >>confdefs.h <<_ACEOF
12016#define HAVE_PT_INSN_EVENT 1
12017_ACEOF
12018
12019fi
12020done
12021
12022 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
12023"
d0ac1c44 12024if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
12025
12026cat >>confdefs.h <<_ACEOF
12027#define HAVE_STRUCT_PT_INSN_ENABLED 1
12028_ACEOF
12029
12030
12031fi
12032ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
12033"
d0ac1c44 12034if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
12035
12036cat >>confdefs.h <<_ACEOF
12037#define HAVE_STRUCT_PT_INSN_RESYNCED 1
12038_ACEOF
12039
12040
12041fi
12042
12043 LIBS=$save_LIBS
58bfce93
MM
12044 fi
12045fi
12046
81ecdfbb
RW
12047# ------------------------- #
12048# Checks for header files. #
12049# ------------------------- #
c890192f 12050
81ecdfbb
RW
12051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12052$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 12053if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12054 $as_echo_n "(cached) " >&6
bec39cab 12055else
81ecdfbb 12056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12057/* end confdefs.h. */
81ecdfbb
RW
12058#include <stdlib.h>
12059#include <stdarg.h>
12060#include <string.h>
12061#include <float.h>
12062
a9322a30
TT
12063int
12064main ()
12065{
a9322a30
TT
12066
12067 ;
12068 return 0;
12069}
bec39cab 12070_ACEOF
81ecdfbb
RW
12071if ac_fn_c_try_compile "$LINENO"; then :
12072 ac_cv_header_stdc=yes
bec39cab 12073else
81ecdfbb 12074 ac_cv_header_stdc=no
a9322a30 12075fi
81ecdfbb 12076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12077
81ecdfbb
RW
12078if test $ac_cv_header_stdc = yes; then
12079 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12081/* end confdefs.h. */
12082#include <string.h>
bec39cab 12083
81ecdfbb
RW
12084_ACEOF
12085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12086 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12087
bec39cab 12088else
81ecdfbb
RW
12089 ac_cv_header_stdc=no
12090fi
12091rm -f conftest*
12092
12093fi
12094
12095if test $ac_cv_header_stdc = yes; then
12096 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12098/* end confdefs.h. */
12099#include <stdlib.h>
12100
bec39cab 12101_ACEOF
81ecdfbb
RW
12102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12103 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 12104
81ecdfbb
RW
12105else
12106 ac_cv_header_stdc=no
12107fi
12108rm -f conftest*
bec39cab 12109
bec39cab 12110fi
81ecdfbb
RW
12111
12112if test $ac_cv_header_stdc = yes; then
12113 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12114 if test "$cross_compiling" = yes; then :
12115 :
bec39cab 12116else
81ecdfbb 12117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12118/* end confdefs.h. */
81ecdfbb
RW
12119#include <ctype.h>
12120#include <stdlib.h>
12121#if ((' ' & 0x0FF) == 0x020)
12122# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12123# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12124#else
12125# define ISLOWER(c) \
12126 (('a' <= (c) && (c) <= 'i') \
12127 || ('j' <= (c) && (c) <= 'r') \
12128 || ('s' <= (c) && (c) <= 'z'))
12129# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12130#endif
12131
12132#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12133int
12134main ()
12135{
81ecdfbb
RW
12136 int i;
12137 for (i = 0; i < 256; i++)
12138 if (XOR (islower (i), ISLOWER (i))
12139 || toupper (i) != TOUPPER (i))
12140 return 2;
a9322a30
TT
12141 return 0;
12142}
bec39cab 12143_ACEOF
81ecdfbb
RW
12144if ac_fn_c_try_run "$LINENO"; then :
12145
bec39cab 12146else
81ecdfbb
RW
12147 ac_cv_header_stdc=no
12148fi
12149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12150 conftest.$ac_objext conftest.beam conftest.$ac_ext
12151fi
bec39cab 12152
bec39cab 12153fi
a9322a30 12154fi
81ecdfbb
RW
12155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12156$as_echo "$ac_cv_header_stdc" >&6; }
12157if test $ac_cv_header_stdc = yes; then
bec39cab 12158
81ecdfbb 12159$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12160
81ecdfbb 12161fi
bec39cab 12162
81ecdfbb 12163# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12164for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
43b7e92b 12165 thread_db.h linux/elf.h \
81ecdfbb
RW
12166 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12167 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 12168 sys/reg.h sys/debugreg.h sys/select.h \
726e1356 12169 termios.h elf_hp.h \
9467110b 12170 dlfcn.h
81ecdfbb
RW
12171do :
12172 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12173ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12174if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12175 cat >>confdefs.h <<_ACEOF
81ecdfbb 12176#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12177_ACEOF
c906108c 12178
bec39cab 12179fi
81ecdfbb
RW
12180
12181done
12182
81ecdfbb
RW
12183for ac_header in sys/user.h
12184do :
12185 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12186# include <sys/param.h>
a9322a30
TT
12187#endif
12188
81ecdfbb 12189"
d0ac1c44 12190if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
12191 cat >>confdefs.h <<_ACEOF
12192#define HAVE_SYS_USER_H 1
bec39cab 12193_ACEOF
bec39cab 12194
a9322a30 12195fi
bec39cab 12196
81ecdfbb 12197done
5ee754fc 12198
5ee754fc 12199
5007d765 12200for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12201do :
12202 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12203ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12204if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12205 cat >>confdefs.h <<_ACEOF
81ecdfbb 12206#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12207_ACEOF
5ee754fc
MK
12208
12209fi
12210
81ecdfbb 12211done
bec39cab 12212
81ecdfbb
RW
12213for ac_header in term.h
12214do :
12215 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12216# include <curses.h>
12217#endif
bec39cab 12218
81ecdfbb 12219"
d0ac1c44 12220if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12221 cat >>confdefs.h <<_ACEOF
12222#define HAVE_TERM_H 1
a8111142 12223_ACEOF
a8111142 12224
a8111142 12225fi
a8111142 12226
81ecdfbb 12227done
a8111142
TT
12228
12229
81ecdfbb
RW
12230# ------------------------- #
12231# Checks for declarations. #
12232# ------------------------- #
a9322a30 12233
07697489
PA
12234
12235 # Check for presence and size of long long.
12236 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 12237if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12238
12239cat >>confdefs.h <<_ACEOF
12240#define HAVE_LONG_LONG 1
12241_ACEOF
12242
12243# The cast to long int works around a bug in the HP C Compiler
12244# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12245# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12246# This bug is HP SR number 8606223364.
12247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12248$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 12249if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12250 $as_echo_n "(cached) " >&6
12251else
12252 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12253
12254else
12255 if test "$ac_cv_type_long_long" = yes; then
12256 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
12258as_fn_error 77 "cannot compute sizeof (long long)
12259See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12260 else
12261 ac_cv_sizeof_long_long=0
12262 fi
12263fi
12264
12265fi
12266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12267$as_echo "$ac_cv_sizeof_long_long" >&6; }
12268
12269
12270
12271cat >>confdefs.h <<_ACEOF
12272#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12273_ACEOF
12274
12275
12276fi
12277
12278
d0ac1c44
SM
12279 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12280ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12281if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12282 ac_have_decl=1
12283else
12284 ac_have_decl=0
12285fi
12286
12287cat >>confdefs.h <<_ACEOF
12288#define HAVE_DECL_BASENAME $ac_have_decl
12289_ACEOF
12290ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 12291if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12292 ac_have_decl=1
12293else
12294 ac_have_decl=0
12295fi
12296
12297cat >>confdefs.h <<_ACEOF
12298#define HAVE_DECL_FFS $ac_have_decl
12299_ACEOF
12300ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 12301if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12302 ac_have_decl=1
12303else
12304 ac_have_decl=0
12305fi
12306
12307cat >>confdefs.h <<_ACEOF
12308#define HAVE_DECL_ASPRINTF $ac_have_decl
12309_ACEOF
12310ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 12311if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12312 ac_have_decl=1
12313else
12314 ac_have_decl=0
12315fi
12316
12317cat >>confdefs.h <<_ACEOF
12318#define HAVE_DECL_VASPRINTF $ac_have_decl
12319_ACEOF
12320ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12321if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12322 ac_have_decl=1
12323else
12324 ac_have_decl=0
12325fi
12326
12327cat >>confdefs.h <<_ACEOF
12328#define HAVE_DECL_SNPRINTF $ac_have_decl
12329_ACEOF
12330ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 12331if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12332 ac_have_decl=1
12333else
12334 ac_have_decl=0
12335fi
12336
12337cat >>confdefs.h <<_ACEOF
12338#define HAVE_DECL_VSNPRINTF $ac_have_decl
12339_ACEOF
12340
12341 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 12342if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
12343 ac_have_decl=1
12344else
12345 ac_have_decl=0
12346fi
12347
12348cat >>confdefs.h <<_ACEOF
12349#define HAVE_DECL_STRTOL $ac_have_decl
12350_ACEOF
12351ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 12352if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
12353 ac_have_decl=1
12354else
12355 ac_have_decl=0
12356fi
12357
12358cat >>confdefs.h <<_ACEOF
12359#define HAVE_DECL_STRTOUL $ac_have_decl
12360_ACEOF
12361ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 12362if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
12363 ac_have_decl=1
12364else
12365 ac_have_decl=0
12366fi
12367
12368cat >>confdefs.h <<_ACEOF
12369#define HAVE_DECL_STRTOLL $ac_have_decl
12370_ACEOF
12371ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 12372if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12373 ac_have_decl=1
12374else
12375 ac_have_decl=0
12376fi
12377
12378cat >>confdefs.h <<_ACEOF
12379#define HAVE_DECL_STRTOULL $ac_have_decl
12380_ACEOF
12381
12382 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 12383if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
12384 ac_have_decl=1
12385else
12386 ac_have_decl=0
12387fi
12388
12389cat >>confdefs.h <<_ACEOF
12390#define HAVE_DECL_STRVERSCMP $ac_have_decl
12391_ACEOF
12392
12393
12394
81ecdfbb 12395ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12396if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12397 ac_have_decl=1
12398else
12399 ac_have_decl=0
5ee754fc 12400fi
81ecdfbb
RW
12401
12402cat >>confdefs.h <<_ACEOF
12403#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12404_ACEOF
5ee754fc 12405
5ee754fc 12406
81ecdfbb
RW
12407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12408$as_echo_n "checking for LC_MESSAGES... " >&6; }
d0ac1c44 12409if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12410 $as_echo_n "(cached) " >&6
bec39cab 12411else
81ecdfbb 12412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12413/* end confdefs.h. */
81ecdfbb 12414#include <locale.h>
a9322a30
TT
12415int
12416main ()
12417{
81ecdfbb 12418return LC_MESSAGES
a9322a30
TT
12419 ;
12420 return 0;
12421}
bec39cab 12422_ACEOF
81ecdfbb
RW
12423if ac_fn_c_try_link "$LINENO"; then :
12424 am_cv_val_LC_MESSAGES=yes
bec39cab 12425else
81ecdfbb
RW
12426 am_cv_val_LC_MESSAGES=no
12427fi
12428rm -f core conftest.err conftest.$ac_objext \
12429 conftest$ac_exeext conftest.$ac_ext
12430fi
12431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12432$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12433 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12434
81ecdfbb
RW
12435$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12436
12437 fi
12438
12439
12440# ----------------------- #
12441# Checks for structures. #
12442# ----------------------- #
12443
12444ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 12445if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12446
12447cat >>confdefs.h <<_ACEOF
12448#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12449_ACEOF
7eb368b3 12450
81ecdfbb 12451
7eb368b3 12452fi
81ecdfbb 12453ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 12454if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12455
a9322a30
TT
12456cat >>confdefs.h <<_ACEOF
12457#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12458_ACEOF
12459
a9322a30 12460
7eb368b3
NR
12461fi
12462
7eb368b3 12463
a9322a30
TT
12464# ------------------ #
12465# Checks for types. #
12466# ------------------ #
7eb368b3 12467
81ecdfbb 12468ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12469#include <sys/socket.h>
12470
81ecdfbb 12471"
d0ac1c44 12472if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12473
a9322a30
TT
12474cat >>confdefs.h <<_ACEOF
12475#define HAVE_SOCKLEN_T 1
12476_ACEOF
12477
12478
12479fi
12480
12481
12482# ------------------------------------- #
12483# Checks for compiler characteristics. #
12484# ------------------------------------- #
12485
81ecdfbb
RW
12486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12487$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
d0ac1c44 12488if ${ac_cv_c_const+:} false; then :
81ecdfbb 12489 $as_echo_n "(cached) " >&6
a9322a30 12490else
81ecdfbb 12491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12492/* end confdefs.h. */
a9322a30
TT
12493
12494int
12495main ()
12496{
d0ac1c44 12497
a9322a30 12498#ifndef __cplusplus
d0ac1c44 12499 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12500 typedef int charset[2];
d0ac1c44 12501 const charset cs = { 0, 0 };
a9322a30 12502 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12503 char const *const *pcpcc;
12504 char **ppc;
a9322a30
TT
12505 /* NEC SVR4.0.2 mips cc rejects this. */
12506 struct point {int x, y;};
12507 static struct point const zero = {0,0};
12508 /* AIX XL C 1.02.0.0 rejects this.
12509 It does not let you subtract one const X* pointer from another in
12510 an arm of an if-expression whose if-part is not a constant
12511 expression */
12512 const char *g = "string";
81ecdfbb 12513 pcpcc = &g + (g ? g-g : 0);
a9322a30 12514 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12515 ++pcpcc;
12516 ppc = (char**) pcpcc;
12517 pcpcc = (char const *const *) ppc;
d0ac1c44
SM
12518 { /* SCO 3.2v4 cc rejects this sort of thing. */
12519 char tx;
12520 char *t = &tx;
a9322a30
TT
12521 char const *s = 0 ? (char *) 0 : (char const *) 0;
12522
12523 *t++ = 0;
81ecdfbb 12524 if (s) return 0;
a9322a30
TT
12525 }
12526 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12527 int x[] = {25, 17};
12528 const int *foo = &x[0];
12529 ++foo;
12530 }
12531 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12532 typedef const int *iptr;
12533 iptr p = 0;
12534 ++p;
12535 }
d0ac1c44 12536 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12537 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
d0ac1c44
SM
12538 struct s { int j; const int *ap[3]; } bx;
12539 struct s *b = &bx; b->j = 5;
a9322a30
TT
12540 }
12541 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12542 const int foo = 10;
81ecdfbb 12543 if (!foo) return 0;
a9322a30 12544 }
81ecdfbb 12545 return !cs[0] && !zero.x;
a9322a30
TT
12546#endif
12547
12548 ;
12549 return 0;
12550}
bec39cab 12551_ACEOF
81ecdfbb 12552if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12553 ac_cv_c_const=yes
5ee754fc 12554else
81ecdfbb 12555 ac_cv_c_const=no
5ee754fc 12556fi
81ecdfbb 12557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12558fi
81ecdfbb
RW
12559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12560$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12561if test $ac_cv_c_const = no; then
bec39cab 12562
81ecdfbb 12563$as_echo "#define const /**/" >>confdefs.h
bec39cab 12564
5ee754fc 12565fi
bec39cab 12566
81ecdfbb
RW
12567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12568$as_echo_n "checking for inline... " >&6; }
d0ac1c44 12569if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12570 $as_echo_n "(cached) " >&6
bec39cab 12571else
a9322a30
TT
12572 ac_cv_c_inline=no
12573for ac_kw in inline __inline__ __inline; do
81ecdfbb 12574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12575/* end confdefs.h. */
a9322a30
TT
12576#ifndef __cplusplus
12577typedef int foo_t;
12578static $ac_kw foo_t static_foo () {return 0; }
12579$ac_kw foo_t foo () {return 0; }
12580#endif
12581
bec39cab 12582_ACEOF
81ecdfbb
RW
12583if ac_fn_c_try_compile "$LINENO"; then :
12584 ac_cv_c_inline=$ac_kw
bec39cab 12585fi
81ecdfbb
RW
12586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12587 test "$ac_cv_c_inline" != no && break
a9322a30 12588done
bec39cab 12589
5ee754fc 12590fi
81ecdfbb
RW
12591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12592$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12593
a9322a30
TT
12594case $ac_cv_c_inline in
12595 inline | yes) ;;
12596 *)
12597 case $ac_cv_c_inline in
12598 no) ac_val=;;
12599 *) ac_val=$ac_cv_c_inline;;
12600 esac
12601 cat >>confdefs.h <<_ACEOF
12602#ifndef __cplusplus
12603#define inline $ac_val
12604#endif
12605_ACEOF
bec39cab
AC
12606 ;;
12607esac
bec39cab 12608
81ecdfbb
RW
12609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12610$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12611if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12612 $as_echo_n "(cached) " >&6
bec39cab 12613else
81ecdfbb
RW
12614 ac_cv_c_bigendian=unknown
12615 # See if we're dealing with a universal compiler.
12616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12617/* end confdefs.h. */
12618#ifndef __APPLE_CC__
12619 not a universal capable compiler
12620 #endif
12621 typedef int dummy;
12622
12623_ACEOF
12624if ac_fn_c_try_compile "$LINENO"; then :
12625
12626 # Check for potential -arch flags. It is not universal unless
12627 # there are at least two -arch flags with different values.
12628 ac_arch=
12629 ac_prev=
12630 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12631 if test -n "$ac_prev"; then
12632 case $ac_word in
12633 i?86 | x86_64 | ppc | ppc64)
12634 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12635 ac_arch=$ac_word
12636 else
12637 ac_cv_c_bigendian=universal
12638 break
12639 fi
12640 ;;
12641 esac
12642 ac_prev=
12643 elif test "x$ac_word" = "x-arch"; then
12644 ac_prev=arch
12645 fi
12646 done
12647fi
12648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12649 if test $ac_cv_c_bigendian = unknown; then
12650 # See if sys/param.h defines the BYTE_ORDER macro.
12651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12652/* end confdefs.h. */
a9322a30 12653#include <sys/types.h>
81ecdfbb 12654 #include <sys/param.h>
a9322a30
TT
12655
12656int
12657main ()
12658{
81ecdfbb
RW
12659#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12660 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12661 && LITTLE_ENDIAN)
12662 bogus endian macros
12663 #endif
a9322a30
TT
12664
12665 ;
12666 return 0;
12667}
bec39cab 12668_ACEOF
81ecdfbb 12669if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12670 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12672/* end confdefs.h. */
a9322a30 12673#include <sys/types.h>
81ecdfbb 12674 #include <sys/param.h>
a9322a30
TT
12675
12676int
12677main ()
12678{
12679#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12680 not big endian
12681 #endif
a9322a30
TT
12682
12683 ;
12684 return 0;
12685}
bec39cab 12686_ACEOF
81ecdfbb 12687if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12688 ac_cv_c_bigendian=yes
5ee754fc 12689else
81ecdfbb 12690 ac_cv_c_bigendian=no
5ee754fc 12691fi
81ecdfbb
RW
12692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12693fi
12694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12695 fi
12696 if test $ac_cv_c_bigendian = unknown; then
12697 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12699/* end confdefs.h. */
12700#include <limits.h>
bec39cab 12701
81ecdfbb
RW
12702int
12703main ()
12704{
12705#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12706 bogus endian macros
12707 #endif
12708
12709 ;
12710 return 0;
12711}
7eb368b3 12712_ACEOF
81ecdfbb
RW
12713if ac_fn_c_try_compile "$LINENO"; then :
12714 # It does; now see whether it defined to _BIG_ENDIAN or not.
12715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12716/* end confdefs.h. */
81ecdfbb
RW
12717#include <limits.h>
12718
7eb368b3
NR
12719int
12720main ()
12721{
81ecdfbb
RW
12722#ifndef _BIG_ENDIAN
12723 not big endian
12724 #endif
12725
7eb368b3
NR
12726 ;
12727 return 0;
12728}
12729_ACEOF
81ecdfbb 12730if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12731 ac_cv_c_bigendian=yes
81ecdfbb
RW
12732else
12733 ac_cv_c_bigendian=no
a9322a30 12734fi
81ecdfbb 12735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12736fi
81ecdfbb
RW
12737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12738 fi
12739 if test $ac_cv_c_bigendian = unknown; then
12740 # Compile a test program.
12741 if test "$cross_compiling" = yes; then :
12742 # Try to guess by grepping values from an object file.
12743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12744/* end confdefs.h. */
12745short int ascii_mm[] =
12746 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12747 short int ascii_ii[] =
12748 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12749 int use_ascii (int i) {
12750 return ascii_mm[i] + ascii_ii[i];
12751 }
12752 short int ebcdic_ii[] =
12753 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12754 short int ebcdic_mm[] =
12755 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12756 int use_ebcdic (int i) {
12757 return ebcdic_mm[i] + ebcdic_ii[i];
12758 }
12759 extern int foo;
7eb368b3 12760
81ecdfbb
RW
12761int
12762main ()
12763{
12764return use_ascii (foo) == use_ebcdic (foo);
12765 ;
12766 return 0;
12767}
12768_ACEOF
12769if ac_fn_c_try_compile "$LINENO"; then :
12770 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12771 ac_cv_c_bigendian=yes
12772 fi
12773 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12774 if test "$ac_cv_c_bigendian" = unknown; then
12775 ac_cv_c_bigendian=no
12776 else
12777 # finding both strings is unlikely to happen, but who knows?
12778 ac_cv_c_bigendian=unknown
12779 fi
12780 fi
7eb368b3 12781fi
81ecdfbb 12782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12783else
81ecdfbb 12784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12785/* end confdefs.h. */
81ecdfbb 12786$ac_includes_default
d3ea6809
MM
12787int
12788main ()
12789{
81ecdfbb
RW
12790
12791 /* Are we little or big endian? From Harbison&Steele. */
12792 union
12793 {
12794 long int l;
12795 char c[sizeof (long int)];
12796 } u;
12797 u.l = 1;
12798 return u.c[sizeof (long int) - 1] == 1;
12799
12800 ;
12801 return 0;
d3ea6809
MM
12802}
12803_ACEOF
81ecdfbb 12804if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12805 ac_cv_c_bigendian=no
d3ea6809 12806else
81ecdfbb 12807 ac_cv_c_bigendian=yes
d3ea6809 12808fi
81ecdfbb
RW
12809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12810 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12811fi
a9322a30 12812
81ecdfbb
RW
12813 fi
12814fi
12815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12816$as_echo "$ac_cv_c_bigendian" >&6; }
12817 case $ac_cv_c_bigendian in #(
12818 yes)
12819 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12820;; #(
12821 no)
12822 ;; #(
12823 universal)
12824
12825$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12826
12827 ;; #(
12828 *)
d0ac1c44 12829 as_fn_error $? "unknown endianness
81ecdfbb
RW
12830 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12831 esac
d3ea6809
MM
12832
12833
a9322a30
TT
12834# ------------------------------ #
12835# Checks for library functions. #
12836# ------------------------------ #
d3ea6809 12837
d0ac1c44
SM
12838
12839
12840
12841 for ac_header in $ac_header_list
81ecdfbb
RW
12842do :
12843 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
d0ac1c44
SM
12844ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12845"
12846if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12847 cat >>confdefs.h <<_ACEOF
81ecdfbb 12848#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12849_ACEOF
b757528f 12850
b757528f 12851fi
bec39cab 12852
a9322a30 12853done
a3828db0 12854
d0ac1c44
SM
12855
12856
12857
12858
12859
12860
12861
a9322a30 12862for ac_func in getpagesize
81ecdfbb
RW
12863do :
12864 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12865if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12866 cat >>confdefs.h <<_ACEOF
81ecdfbb 12867#define HAVE_GETPAGESIZE 1
bec39cab 12868_ACEOF
bcb3dc3d 12869
bcb3dc3d
MK
12870fi
12871done
12872
81ecdfbb
RW
12873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12874$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12875if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12876 $as_echo_n "(cached) " >&6
a9322a30 12877else
81ecdfbb 12878 if test "$cross_compiling" = yes; then :
a9322a30 12879 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12880else
81ecdfbb 12881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12882/* end confdefs.h. */
a9322a30
TT
12883$ac_includes_default
12884/* malloc might have been renamed as rpl_malloc. */
12885#undef malloc
bec39cab 12886
a9322a30
TT
12887/* Thanks to Mike Haertel and Jim Avera for this test.
12888 Here is a matrix of mmap possibilities:
12889 mmap private not fixed
12890 mmap private fixed at somewhere currently unmapped
12891 mmap private fixed at somewhere already mapped
12892 mmap shared not fixed
12893 mmap shared fixed at somewhere currently unmapped
12894 mmap shared fixed at somewhere already mapped
12895 For private mappings, we should verify that changes cannot be read()
12896 back from the file, nor mmap's back from the file at a different
12897 address. (There have been systems where private was not correctly
12898 implemented like the infamous i386 svr4.0, and systems where the
12899 VM page cache was not coherent with the file system buffer cache
12900 like early versions of FreeBSD and possibly contemporary NetBSD.)
12901 For shared mappings, we should conversely verify that changes get
12902 propagated back to all the places they're supposed to be.
bec39cab 12903
a9322a30
TT
12904 Grep wants private fixed already mapped.
12905 The main things grep needs to know about mmap are:
12906 * does it exist and is it safe to write into the mmap'd area
12907 * how to use it (BSD variants) */
8b9cf735 12908
a9322a30
TT
12909#include <fcntl.h>
12910#include <sys/mman.h>
8b9cf735 12911
81ecdfbb 12912#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12913char *malloc ();
a3828db0
MK
12914#endif
12915
a9322a30 12916/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12917#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12918# ifdef _SC_PAGESIZE
12919# define getpagesize() sysconf(_SC_PAGESIZE)
12920# else /* no _SC_PAGESIZE */
81ecdfbb 12921# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12922# include <sys/param.h>
12923# ifdef EXEC_PAGESIZE
12924# define getpagesize() EXEC_PAGESIZE
12925# else /* no EXEC_PAGESIZE */
12926# ifdef NBPG
12927# define getpagesize() NBPG * CLSIZE
12928# ifndef CLSIZE
12929# define CLSIZE 1
12930# endif /* no CLSIZE */
12931# else /* no NBPG */
12932# ifdef NBPC
12933# define getpagesize() NBPC
12934# else /* no NBPC */
12935# ifdef PAGESIZE
12936# define getpagesize() PAGESIZE
12937# endif /* PAGESIZE */
12938# endif /* no NBPC */
12939# endif /* no NBPG */
12940# endif /* no EXEC_PAGESIZE */
12941# else /* no HAVE_SYS_PARAM_H */
12942# define getpagesize() 8192 /* punt totally */
12943# endif /* no HAVE_SYS_PARAM_H */
12944# endif /* no _SC_PAGESIZE */
12945
12946#endif /* no HAVE_GETPAGESIZE */
12947
bec39cab
AC
12948int
12949main ()
12950{
a9322a30 12951 char *data, *data2, *data3;
d0ac1c44 12952 const char *cdata2;
a9322a30 12953 int i, pagesize;
d0ac1c44 12954 int fd, fd2;
a9322a30
TT
12955
12956 pagesize = getpagesize ();
12957
12958 /* First, make a file with some known garbage in it. */
12959 data = (char *) malloc (pagesize);
12960 if (!data)
81ecdfbb 12961 return 1;
a9322a30
TT
12962 for (i = 0; i < pagesize; ++i)
12963 *(data + i) = rand ();
12964 umask (0);
12965 fd = creat ("conftest.mmap", 0600);
12966 if (fd < 0)
d0ac1c44 12967 return 2;
a9322a30 12968 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 12969 return 3;
a9322a30
TT
12970 close (fd);
12971
d0ac1c44
SM
12972 /* Next, check that the tail of a page is zero-filled. File must have
12973 non-zero length, otherwise we risk SIGBUS for entire page. */
12974 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12975 if (fd2 < 0)
12976 return 4;
12977 cdata2 = "";
12978 if (write (fd2, cdata2, 1) != 1)
12979 return 5;
12980 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12981 if (data2 == MAP_FAILED)
12982 return 6;
12983 for (i = 0; i < pagesize; ++i)
12984 if (*(data2 + i))
12985 return 7;
12986 close (fd2);
12987 if (munmap (data2, pagesize))
12988 return 8;
12989
a9322a30
TT
12990 /* Next, try to mmap the file at a fixed address which already has
12991 something else allocated at it. If we can, also make sure that
12992 we see the same garbage. */
12993 fd = open ("conftest.mmap", O_RDWR);
12994 if (fd < 0)
d0ac1c44 12995 return 9;
a9322a30
TT
12996 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12997 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 12998 return 10;
a9322a30
TT
12999 for (i = 0; i < pagesize; ++i)
13000 if (*(data + i) != *(data2 + i))
d0ac1c44 13001 return 11;
a9322a30
TT
13002
13003 /* Finally, make sure that changes to the mapped area do not
13004 percolate back to the file as seen by read(). (This is a bug on
13005 some variants of i386 svr4.0.) */
13006 for (i = 0; i < pagesize; ++i)
13007 *(data2 + i) = *(data2 + i) + 1;
13008 data3 = (char *) malloc (pagesize);
13009 if (!data3)
d0ac1c44 13010 return 12;
a9322a30 13011 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 13012 return 13;
a9322a30
TT
13013 for (i = 0; i < pagesize; ++i)
13014 if (*(data + i) != *(data3 + i))
d0ac1c44 13015 return 14;
a9322a30 13016 close (fd);
81ecdfbb 13017 return 0;
bec39cab
AC
13018}
13019_ACEOF
81ecdfbb 13020if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13021 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13022else
81ecdfbb 13023 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13024fi
81ecdfbb
RW
13025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13026 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13027fi
81ecdfbb 13028
a9322a30 13029fi
81ecdfbb
RW
13030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13031$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13032if test $ac_cv_func_mmap_fixed_mapped = yes; then
13033
81ecdfbb 13034$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13035
086ec9eb 13036fi
d0ac1c44 13037rm -f conftest.mmap conftest.txt
a3828db0 13038
81ecdfbb 13039ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 13040if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 13041
a9322a30
TT
13042else
13043
13044cat >>confdefs.h <<_ACEOF
13045#define pid_t int
bec39cab 13046_ACEOF
086ec9eb
MK
13047
13048fi
13049
81ecdfbb
RW
13050for ac_header in vfork.h
13051do :
13052 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 13053if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13054 cat >>confdefs.h <<_ACEOF
81ecdfbb 13055#define HAVE_VFORK_H 1
bec39cab 13056_ACEOF
c906108c
SS
13057
13058fi
a9322a30 13059
a3828db0 13060done
c906108c 13061
a9322a30 13062for ac_func in fork vfork
81ecdfbb
RW
13063do :
13064 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13065ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13066if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13067 cat >>confdefs.h <<_ACEOF
81ecdfbb 13068#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13069_ACEOF
b83266a0 13070
97bf5e38 13071fi
a3828db0 13072done
b83266a0 13073
a9322a30 13074if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13076$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13077if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13078 $as_echo_n "(cached) " >&6
a9322a30 13079else
81ecdfbb 13080 if test "$cross_compiling" = yes; then :
a9322a30
TT
13081 ac_cv_func_fork_works=cross
13082else
81ecdfbb
RW
13083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13084/* end confdefs.h. */
13085$ac_includes_default
13086int
13087main ()
13088{
13089
13090 /* By Ruediger Kuhlmann. */
13091 return fork () < 0;
13092
13093 ;
13094 return 0;
13095}
a9322a30 13096_ACEOF
81ecdfbb 13097if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13098 ac_cv_func_fork_works=yes
13099else
81ecdfbb 13100 ac_cv_func_fork_works=no
a9322a30 13101fi
81ecdfbb
RW
13102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13103 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13104fi
81ecdfbb 13105
a9322a30 13106fi
81ecdfbb
RW
13107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13108$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13109
13110else
13111 ac_cv_func_fork_works=$ac_cv_func_fork
13112fi
13113if test "x$ac_cv_func_fork_works" = xcross; then
13114 case $host in
13115 *-*-amigaos* | *-*-msdosdjgpp*)
13116 # Override, as these systems have only a dummy fork() stub
13117 ac_cv_func_fork_works=no
13118 ;;
13119 *)
13120 ac_cv_func_fork_works=yes
13121 ;;
13122 esac
81ecdfbb
RW
13123 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13124$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13125fi
13126ac_cv_func_vfork_works=$ac_cv_func_vfork
13127if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13129$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13130if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13131 $as_echo_n "(cached) " >&6
a9322a30 13132else
81ecdfbb 13133 if test "$cross_compiling" = yes; then :
a9322a30
TT
13134 ac_cv_func_vfork_works=cross
13135else
81ecdfbb 13136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13137/* end confdefs.h. */
13138/* Thanks to Paul Eggert for this test. */
81ecdfbb 13139$ac_includes_default
a9322a30 13140#include <sys/wait.h>
81ecdfbb 13141#ifdef HAVE_VFORK_H
a9322a30
TT
13142# include <vfork.h>
13143#endif
13144/* On some sparc systems, changes by the child to local and incoming
13145 argument registers are propagated back to the parent. The compiler
13146 is told about this with #include <vfork.h>, but some compilers
13147 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13148 static variable whose address is put into a register that is
13149 clobbered by the vfork. */
13150static void
13151#ifdef __cplusplus
13152sparc_address_test (int arg)
13153# else
13154sparc_address_test (arg) int arg;
13155#endif
13156{
13157 static pid_t child;
13158 if (!child) {
13159 child = vfork ();
13160 if (child < 0) {
13161 perror ("vfork");
13162 _exit(2);
13163 }
13164 if (!child) {
13165 arg = getpid();
13166 write(-1, "", 0);
13167 _exit (arg);
13168 }
13169 }
13170}
13171
13172int
13173main ()
13174{
13175 pid_t parent = getpid ();
13176 pid_t child;
13177
13178 sparc_address_test (0);
13179
13180 child = vfork ();
13181
13182 if (child == 0) {
13183 /* Here is another test for sparc vfork register problems. This
13184 test uses lots of local variables, at least as many local
13185 variables as main has allocated so far including compiler
13186 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13187 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13188 reuse the register of parent for one of the local variables,
13189 since it will think that parent can't possibly be used any more
13190 in this routine. Assigning to the local variable will thus
13191 munge parent in the parent process. */
13192 pid_t
13193 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13194 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13195 /* Convince the compiler that p..p7 are live; otherwise, it might
13196 use the same hardware register for all 8 local variables. */
13197 if (p != p1 || p != p2 || p != p3 || p != p4
13198 || p != p5 || p != p6 || p != p7)
13199 _exit(1);
13200
13201 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13202 from child file descriptors. If the child closes a descriptor
13203 before it execs or exits, this munges the parent's descriptor
13204 as well. Test for this by closing stdout in the child. */
13205 _exit(close(fileno(stdout)) != 0);
13206 } else {
13207 int status;
13208 struct stat st;
13209
13210 while (wait(&status) != child)
13211 ;
81ecdfbb 13212 return (
a9322a30
TT
13213 /* Was there some problem with vforking? */
13214 child < 0
13215
13216 /* Did the child fail? (This shouldn't happen.) */
13217 || status
13218
13219 /* Did the vfork/compiler bug occur? */
13220 || parent != getpid()
13221
13222 /* Did the file descriptor bug occur? */
13223 || fstat(fileno(stdout), &st) != 0
13224 );
13225 }
13226}
13227_ACEOF
81ecdfbb 13228if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13229 ac_cv_func_vfork_works=yes
13230else
81ecdfbb 13231 ac_cv_func_vfork_works=no
a9322a30 13232fi
81ecdfbb
RW
13233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13234 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13235fi
81ecdfbb 13236
a9322a30 13237fi
81ecdfbb
RW
13238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13239$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13240
13241fi;
13242if test "x$ac_cv_func_fork_works" = xcross; then
13243 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13245$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13246fi
13247
13248if test "x$ac_cv_func_vfork_works" = xyes; then
13249
81ecdfbb 13250$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13251
13252else
13253
81ecdfbb 13254$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13255
13256fi
13257if test "x$ac_cv_func_fork_works" = xyes; then
13258
81ecdfbb 13259$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13260
13261fi
13262
cdf43629 13263for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13264 pipe poll pread pread64 pwrite resize_term \
e671cd59 13265 sbrk getpgid setpgid setpgrp setsid \
9467110b 13266 sigaction sigprocmask sigsetmask socketpair \
110ed339 13267 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13268 setrlimit getrlimit posix_madvise waitpid \
1d1d0bf7 13269 ptrace64 sigaltstack setns use_default_colors
81ecdfbb
RW
13270do :
13271 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13272ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13273if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13274 cat >>confdefs.h <<_ACEOF
81ecdfbb 13275#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13276_ACEOF
13277
13278fi
13279done
13280
13281
81ecdfbb
RW
13282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13283$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13284if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13285 $as_echo_n "(cached) " >&6
6c7a06a3 13286else
81ecdfbb 13287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13288/* end confdefs.h. */
13289#include <langinfo.h>
13290int
13291main ()
13292{
13293char* cs = nl_langinfo(CODESET);
bec39cab
AC
13294 ;
13295 return 0;
13296}
13297_ACEOF
81ecdfbb 13298if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13299 am_cv_langinfo_codeset=yes
a4db0f07 13300else
81ecdfbb 13301 am_cv_langinfo_codeset=no
a4db0f07 13302fi
81ecdfbb
RW
13303rm -f core conftest.err conftest.$ac_objext \
13304 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13305
a4db0f07 13306fi
81ecdfbb
RW
13307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13308$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13309 if test $am_cv_langinfo_codeset = yes; then
13310
81ecdfbb 13311$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13312
6c7a06a3 13313 fi
c906108c 13314
d0ac1c44
SM
13315ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13316if test "x$ac_cv_type_size_t" = xyes; then :
13317
13318else
13319
13320cat >>confdefs.h <<_ACEOF
13321#define size_t unsigned int
13322_ACEOF
13323
13324fi
13325
06825bd1 13326
3266f10b
TT
13327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13328$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 13329if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13330 $as_echo_n "(cached) " >&6
13331else
13332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13333/* end confdefs.h. */
13334#include <stdlib.h>
13335#include <stdarg.h>
13336#include <string.h>
13337#include <float.h>
13338
13339int
13340main ()
13341{
13342
13343 ;
13344 return 0;
13345}
13346_ACEOF
13347if ac_fn_c_try_compile "$LINENO"; then :
13348 ac_cv_header_stdc=yes
13349else
13350 ac_cv_header_stdc=no
13351fi
13352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13353
13354if test $ac_cv_header_stdc = yes; then
13355 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13357/* end confdefs.h. */
13358#include <string.h>
13359
13360_ACEOF
13361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13362 $EGREP "memchr" >/dev/null 2>&1; then :
13363
13364else
13365 ac_cv_header_stdc=no
13366fi
13367rm -f conftest*
13368
13369fi
13370
13371if test $ac_cv_header_stdc = yes; then
13372 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13374/* end confdefs.h. */
13375#include <stdlib.h>
13376
13377_ACEOF
13378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13379 $EGREP "free" >/dev/null 2>&1; then :
13380
13381else
13382 ac_cv_header_stdc=no
13383fi
13384rm -f conftest*
13385
13386fi
13387
13388if test $ac_cv_header_stdc = yes; then
13389 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13390 if test "$cross_compiling" = yes; then :
13391 :
13392else
13393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13394/* end confdefs.h. */
13395#include <ctype.h>
13396#include <stdlib.h>
13397#if ((' ' & 0x0FF) == 0x020)
13398# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13399# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13400#else
13401# define ISLOWER(c) \
13402 (('a' <= (c) && (c) <= 'i') \
13403 || ('j' <= (c) && (c) <= 'r') \
13404 || ('s' <= (c) && (c) <= 'z'))
13405# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13406#endif
13407
13408#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13409int
13410main ()
13411{
13412 int i;
13413 for (i = 0; i < 256; i++)
13414 if (XOR (islower (i), ISLOWER (i))
13415 || toupper (i) != TOUPPER (i))
13416 return 2;
13417 return 0;
13418}
13419_ACEOF
13420if ac_fn_c_try_run "$LINENO"; then :
13421
13422else
13423 ac_cv_header_stdc=no
13424fi
13425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13426 conftest.$ac_objext conftest.beam conftest.$ac_ext
13427fi
13428
13429fi
13430fi
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13432$as_echo "$ac_cv_header_stdc" >&6; }
13433if test $ac_cv_header_stdc = yes; then
13434
13435$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13436
3266f10b
TT
13437fi
13438
13439 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13440# for constant arguments. Useless!
13441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13442$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 13443if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13444 $as_echo_n "(cached) " >&6
13445else
13446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13447/* end confdefs.h. */
13448#include <alloca.h>
13449int
13450main ()
13451{
13452char *p = (char *) alloca (2 * sizeof (int));
13453 if (p) return 0;
13454 ;
13455 return 0;
13456}
13457_ACEOF
13458if ac_fn_c_try_link "$LINENO"; then :
13459 ac_cv_working_alloca_h=yes
13460else
13461 ac_cv_working_alloca_h=no
13462fi
13463rm -f core conftest.err conftest.$ac_objext \
13464 conftest$ac_exeext conftest.$ac_ext
13465fi
13466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13467$as_echo "$ac_cv_working_alloca_h" >&6; }
13468if test $ac_cv_working_alloca_h = yes; then
13469
13470$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13471
13472fi
13473
13474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13475$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 13476if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13477 $as_echo_n "(cached) " >&6
13478else
13479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13480/* end confdefs.h. */
13481#ifdef __GNUC__
13482# define alloca __builtin_alloca
13483#else
13484# ifdef _MSC_VER
13485# include <malloc.h>
13486# define alloca _alloca
13487# else
13488# ifdef HAVE_ALLOCA_H
13489# include <alloca.h>
13490# else
13491# ifdef _AIX
13492 #pragma alloca
13493# else
13494# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 13495void *alloca (size_t);
3266f10b
TT
13496# endif
13497# endif
13498# endif
13499# endif
13500#endif
13501
13502int
13503main ()
13504{
13505char *p = (char *) alloca (1);
13506 if (p) return 0;
13507 ;
13508 return 0;
13509}
13510_ACEOF
13511if ac_fn_c_try_link "$LINENO"; then :
13512 ac_cv_func_alloca_works=yes
13513else
13514 ac_cv_func_alloca_works=no
13515fi
13516rm -f core conftest.err conftest.$ac_objext \
13517 conftest$ac_exeext conftest.$ac_ext
13518fi
13519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13520$as_echo "$ac_cv_func_alloca_works" >&6; }
13521
13522if test $ac_cv_func_alloca_works = yes; then
13523
13524$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13525
13526else
13527 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13528# that cause trouble. Some versions do not even contain alloca or
13529# contain a buggy version. If you still want to use their alloca,
13530# use ar to extract alloca.o from them instead of compiling alloca.c.
13531
13532ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13533
13534$as_echo "#define C_ALLOCA 1" >>confdefs.h
13535
13536
13537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13538$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 13539if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13540 $as_echo_n "(cached) " >&6
13541else
13542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13543/* end confdefs.h. */
13544#if defined CRAY && ! defined CRAY2
13545webecray
13546#else
13547wenotbecray
13548#endif
13549
13550_ACEOF
13551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13552 $EGREP "webecray" >/dev/null 2>&1; then :
13553 ac_cv_os_cray=yes
13554else
13555 ac_cv_os_cray=no
13556fi
13557rm -f conftest*
13558
13559fi
13560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13561$as_echo "$ac_cv_os_cray" >&6; }
13562if test $ac_cv_os_cray = yes; then
13563 for ac_func in _getb67 GETB67 getb67; do
13564 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13565ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13566if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13567
13568cat >>confdefs.h <<_ACEOF
13569#define CRAY_STACKSEG_END $ac_func
13570_ACEOF
13571
13572 break
13573fi
13574
13575 done
13576fi
13577
13578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13579$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 13580if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13581 $as_echo_n "(cached) " >&6
13582else
13583 if test "$cross_compiling" = yes; then :
13584 ac_cv_c_stack_direction=0
13585else
13586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13587/* end confdefs.h. */
13588$ac_includes_default
13589int
d0ac1c44 13590find_stack_direction (int *addr, int depth)
3266f10b 13591{
d0ac1c44
SM
13592 int dir, dummy = 0;
13593 if (! addr)
13594 addr = &dummy;
13595 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13596 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13597 return dir + dummy;
3266f10b
TT
13598}
13599
13600int
d0ac1c44 13601main (int argc, char **argv)
3266f10b 13602{
d0ac1c44 13603 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13604}
13605_ACEOF
13606if ac_fn_c_try_run "$LINENO"; then :
13607 ac_cv_c_stack_direction=1
13608else
13609 ac_cv_c_stack_direction=-1
13610fi
13611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13612 conftest.$ac_objext conftest.beam conftest.$ac_ext
13613fi
13614
13615fi
13616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13617$as_echo "$ac_cv_c_stack_direction" >&6; }
13618cat >>confdefs.h <<_ACEOF
13619#define STACK_DIRECTION $ac_cv_c_stack_direction
13620_ACEOF
13621
13622
13623fi
13624
13625
13626
13627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13628$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13629if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13630 $as_echo_n "(cached) " >&6
13631else
13632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13633/* end confdefs.h. */
13634#include <langinfo.h>
13635int
13636main ()
13637{
13638char* cs = nl_langinfo(CODESET);
13639 ;
13640 return 0;
13641}
13642_ACEOF
13643if ac_fn_c_try_link "$LINENO"; then :
13644 am_cv_langinfo_codeset=yes
13645else
13646 am_cv_langinfo_codeset=no
13647fi
13648rm -f core conftest.err conftest.$ac_objext \
13649 conftest$ac_exeext conftest.$ac_ext
13650
13651fi
13652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13653$as_echo "$am_cv_langinfo_codeset" >&6; }
13654 if test $am_cv_langinfo_codeset = yes; then
13655
13656$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13657
13658 fi
13659
13660
44122162 13661 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
13662do :
13663 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13664ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13665if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13666 cat >>confdefs.h <<_ACEOF
13667#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13668_ACEOF
13669
13670fi
13671
13672done
13673
13674
f348d89a 13675 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13676do :
13677 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13678ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13679if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13680 cat >>confdefs.h <<_ACEOF
13681#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13682_ACEOF
13683
13684fi
13685done
13686
13687
13688 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
d0ac1c44 13689if test "x$ac_cv_have_decl_strerror" = xyes; then :
3266f10b
TT
13690 ac_have_decl=1
13691else
13692 ac_have_decl=0
13693fi
13694
13695cat >>confdefs.h <<_ACEOF
13696#define HAVE_DECL_STRERROR $ac_have_decl
13697_ACEOF
13698ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 13699if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13700 ac_have_decl=1
13701else
13702 ac_have_decl=0
13703fi
13704
13705cat >>confdefs.h <<_ACEOF
13706#define HAVE_DECL_STRSTR $ac_have_decl
13707_ACEOF
13708
13709
e9bcb658
GB
13710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13711$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 13712if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
13713 $as_echo_n "(cached) " >&6
13714else
13715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13716/* end confdefs.h. */
13717
13718#include <setjmp.h>
13719
13720int
13721main ()
13722{
13723sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13724 ;
13725 return 0;
13726}
13727_ACEOF
13728if ac_fn_c_try_compile "$LINENO"; then :
13729 gdb_cv_func_sigsetjmp=yes
13730else
13731 gdb_cv_func_sigsetjmp=no
13732fi
13733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13734fi
13735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13736$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13737if test $gdb_cv_func_sigsetjmp = yes; then
13738
13739$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13740
13741fi
13742
3266f10b 13743
54019719
PA
13744# Check the return and argument types of ptrace.
13745
13746
54019719
PA
13747for ac_header in sys/ptrace.h ptrace.h
13748do :
13749 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13750ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13751if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
13752 cat >>confdefs.h <<_ACEOF
13753#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13754_ACEOF
13755
13756fi
13757
13758done
13759
13760
a3828db0 13761gdb_ptrace_headers='
4ff70b84 13762#include <sys/types.h>
a3828db0
MK
13763#if HAVE_SYS_PTRACE_H
13764# include <sys/ptrace.h>
13765#endif
13766#if HAVE_UNISTD_H
13767# include <unistd.h>
13768#endif
13769'
13770# There is no point in checking if we don't have a prototype.
9b30624b 13771ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 13772"
d0ac1c44 13773if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 13774 ac_have_decl=1
06825bd1 13775else
81ecdfbb 13776 ac_have_decl=0
06825bd1 13777fi
06825bd1 13778
a3828db0 13779cat >>confdefs.h <<_ACEOF
81ecdfbb 13780#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13781_ACEOF
81ecdfbb 13782if test $ac_have_decl = 1; then :
bec39cab 13783
a3828db0 13784else
a3828db0
MK
13785
13786 : ${gdb_cv_func_ptrace_ret='int'}
13787 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13788
06825bd1
MK
13789fi
13790
064ef605
DJ
13791# Check return type. Varargs (used on GNU/Linux) conflict with the
13792# empty argument list, so check for that explicitly.
81ecdfbb
RW
13793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13794$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 13795if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 13796 $as_echo_n "(cached) " >&6
bec39cab 13797else
81ecdfbb 13798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13799/* end confdefs.h. */
a3828db0 13800$gdb_ptrace_headers
bec39cab
AC
13801int
13802main ()
13803{
064ef605
DJ
13804extern long ptrace (enum __ptrace_request, ...);
13805 ;
13806 return 0;
13807}
13808_ACEOF
9b30624b 13809if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13810 gdb_cv_func_ptrace_ret='long'
13811else
81ecdfbb 13812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13813/* end confdefs.h. */
13814$gdb_ptrace_headers
13815int
13816main ()
13817{
a3828db0 13818extern int ptrace ();
bec39cab
AC
13819 ;
13820 return 0;
13821}
13822_ACEOF
9b30624b 13823if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13824 gdb_cv_func_ptrace_ret='int'
70f9f479 13825else
81ecdfbb 13826 gdb_cv_func_ptrace_ret='long'
70f9f479 13827fi
81ecdfbb 13828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13829fi
81ecdfbb 13830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13831fi
81ecdfbb
RW
13832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13833$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13834
a3828db0
MK
13835cat >>confdefs.h <<_ACEOF
13836#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13837_ACEOF
70f9f479 13838
a3828db0 13839# Check argument types.
81ecdfbb
RW
13840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13841$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 13842if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 13843 $as_echo_n "(cached) " >&6
bec39cab 13844else
a3828db0 13845
81ecdfbb 13846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13847/* end confdefs.h. */
13848$gdb_ptrace_headers
13849int
13850main ()
13851{
13852extern long ptrace (enum __ptrace_request, ...);
13853 ;
13854 return 0;
13855}
13856_ACEOF
9b30624b 13857if ac_fn_c_try_compile "$LINENO"; then :
54019719 13858 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13859else
064ef605 13860
a3828db0
MK
13861for gdb_arg1 in 'int' 'long'; do
13862 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13863 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13864 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13866/* end confdefs.h. */
a3828db0 13867$gdb_ptrace_headers
bec39cab
AC
13868int
13869main ()
13870{
a3828db0
MK
13871
13872extern $gdb_cv_func_ptrace_ret
13873 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13874
bec39cab
AC
13875 ;
13876 return 0;
13877}
13878_ACEOF
9b30624b 13879if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13880 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13881 break 4;
5c7f2947 13882fi
81ecdfbb 13883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13884 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13886/* end confdefs.h. */
a3828db0 13887$gdb_ptrace_headers
bec39cab
AC
13888int
13889main ()
13890{
a3828db0
MK
13891
13892extern $gdb_cv_func_ptrace_ret
13893 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13894
bec39cab
AC
13895 ;
13896 return 0;
13897}
13898_ACEOF
9b30624b 13899if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13900
13901gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13902 break 5;
78434e59 13903fi
81ecdfbb 13904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13905 done
13906 done
13907 done
13908 done
13909done
13910# Provide a safe default value.
13911: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13912
064ef605 13913fi
81ecdfbb 13914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13915fi
81ecdfbb
RW
13916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13917$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13918ac_save_IFS=$IFS; IFS=','
13919set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13920IFS=$ac_save_IFS
13921shift
bec39cab 13922
54019719
PA
13923cat >>confdefs.h <<_ACEOF
13924#define PTRACE_TYPE_ARG1 $1
13925_ACEOF
13926
13927
a3828db0
MK
13928cat >>confdefs.h <<_ACEOF
13929#define PTRACE_TYPE_ARG3 $3
13930_ACEOF
13931
96d7229d
LM
13932
13933cat >>confdefs.h <<_ACEOF
13934#define PTRACE_TYPE_ARG4 $4
13935_ACEOF
13936
a3828db0
MK
13937if test -n "$5"; then
13938
13939cat >>confdefs.h <<_ACEOF
13940#define PTRACE_TYPE_ARG5 $5
bec39cab 13941_ACEOF
78434e59
MK
13942
13943fi
13944
54019719 13945
a3828db0 13946if test "$cross_compiling" = no; then
81ecdfbb
RW
13947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13948$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13949if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13950 $as_echo_n "(cached) " >&6
a3828db0 13951else
81ecdfbb 13952 if test "$cross_compiling" = yes; then :
d0ac1c44 13953 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13954else
81ecdfbb 13955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13956/* end confdefs.h. */
81ecdfbb 13957$ac_includes_default
bec39cab
AC
13958int
13959main ()
13960{
a3828db0
MK
13961/* If this system has a BSD-style setpgrp which takes arguments,
13962 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13963 exit successfully. */
81ecdfbb 13964 return setpgrp (1,1) != -1;
bec39cab
AC
13965 ;
13966 return 0;
13967}
13968_ACEOF
81ecdfbb 13969if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13970 ac_cv_func_setpgrp_void=no
c906108c 13971else
81ecdfbb 13972 ac_cv_func_setpgrp_void=yes
c906108c 13973fi
81ecdfbb
RW
13974rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13975 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13976fi
81ecdfbb 13977
a3828db0 13978fi
81ecdfbb
RW
13979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13980$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13981if test $ac_cv_func_setpgrp_void = yes; then
13982
81ecdfbb 13983$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13984
13985fi
a3828db0
MK
13986
13987else
81ecdfbb
RW
13988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13989$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13990if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13991 $as_echo_n "(cached) " >&6
97bf5e38 13992else
81ecdfbb 13993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13994/* end confdefs.h. */
a3828db0
MK
13995
13996#include <unistd.h>
13997
bec39cab
AC
13998int
13999main ()
14000{
a3828db0
MK
14001
14002 if (setpgrp(1,1) == -1)
14003 exit (0);
14004 else
14005 exit (1);
14006
bec39cab
AC
14007 ;
14008 return 0;
14009}
14010_ACEOF
81ecdfbb 14011if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14012 ac_cv_func_setpgrp_void=no
c906108c 14013else
81ecdfbb 14014 ac_cv_func_setpgrp_void=yes
c906108c 14015fi
81ecdfbb 14016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14017fi
81ecdfbb
RW
14018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14019$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 14020if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 14021 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 14022
a3828db0 14023fi
c906108c
SS
14024fi
14025
db1ff28b
JK
14026# Assume we'll default to using the included libiberty regex.
14027gdb_use_included_regex=yes
14028
14029# However, if the system regex is GNU regex, then default to *not*
14030# using the included regex.
14031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14032$as_echo_n "checking for GNU regex... " >&6; }
d0ac1c44 14033if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
14034 $as_echo_n "(cached) " >&6
14035else
14036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14037/* end confdefs.h. */
14038#include <gnu-versions.h>
14039int
14040main ()
14041{
14042#define REGEX_INTERFACE_VERSION 1
14043#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14044# error "Version mismatch"
14045#endif
14046 ;
14047 return 0;
14048}
14049_ACEOF
14050if ac_fn_c_try_compile "$LINENO"; then :
14051 gdb_cv_have_gnu_regex=yes
14052else
14053 gdb_cv_have_gnu_regex=no
14054fi
14055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14056fi
14057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14058$as_echo "$gdb_cv_have_gnu_regex" >&6; }
14059if test $gdb_cv_have_gnu_regex = yes; then
14060 gdb_use_included_regex=no
14061fi
14062
14063
14064# Check whether --with-included-regex was given.
14065if test "${with_included_regex+set}" = set; then :
14066 withval=$with_included_regex; gdb_with_regex=$withval
14067else
14068 gdb_with_regex=$gdb_use_included_regex
14069fi
14070
14071if test "$gdb_with_regex" = yes; then
14072
14073$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14074
14075fi
14076
81ecdfbb
RW
14077# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14078ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14079#include <sys/proc.h>
14080
14081"
d0ac1c44 14082if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 14083
5c45e068 14084cat >>confdefs.h <<_ACEOF
a3828db0 14085#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 14086_ACEOF
c906108c 14087
5c45e068 14088
97bf5e38 14089fi
c906108c 14090
5c45e068 14091
a3828db0 14092# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
14093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14094$as_echo_n "checking for struct lwp... " >&6; }
d0ac1c44 14095if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 14096 $as_echo_n "(cached) " >&6
bec39cab 14097else
81ecdfbb 14098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14099/* end confdefs.h. */
a3828db0 14100#include <sys/param.h>
c49fbc6c 14101#define _KMEMUSER
a3828db0 14102#include <sys/lwp.h>
bec39cab
AC
14103int
14104main ()
14105{
a3828db0 14106struct lwp l;
bec39cab
AC
14107 ;
14108 return 0;
14109}
14110_ACEOF
81ecdfbb 14111if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14112 gdb_cv_struct_lwp=yes
c906108c 14113else
81ecdfbb 14114 gdb_cv_struct_lwp=no
c906108c 14115fi
81ecdfbb 14116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14117fi
81ecdfbb
RW
14118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14119$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 14120if test $gdb_cv_struct_lwp = yes; then
c906108c 14121
81ecdfbb 14122$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 14123
97bf5e38 14124fi
c906108c 14125
a3828db0 14126# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
14127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14128$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
d0ac1c44 14129if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 14130 $as_echo_n "(cached) " >&6
bec39cab 14131else
81ecdfbb 14132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14133/* end confdefs.h. */
a3828db0
MK
14134#include <sys/types.h>
14135#include <machine/reg.h>
bec39cab
AC
14136int
14137main ()
14138{
a3828db0 14139struct reg r;
bec39cab
AC
14140 ;
14141 return 0;
14142}
14143_ACEOF
81ecdfbb 14144if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14145 gdb_cv_struct_reg=yes
27ca5dad 14146else
81ecdfbb 14147 gdb_cv_struct_reg=no
27ca5dad 14148fi
81ecdfbb 14149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14150fi
81ecdfbb
RW
14151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14152$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 14153if test $gdb_cv_struct_reg = yes; then
bec39cab 14154
81ecdfbb 14155$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14156
14157fi
97bf5e38 14158
a3828db0
MK
14159# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14160# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14161ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14162#include <machine/reg.h>
81ecdfbb 14163"
d0ac1c44 14164if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
14165
14166cat >>confdefs.h <<_ACEOF
a3828db0 14167#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14168_ACEOF
3862412b 14169
5c45e068 14170
97bf5e38 14171fi
a6e69c1f
JB
14172ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14173#include <machine/reg.h>
81ecdfbb 14174"
d0ac1c44 14175if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
14176
14177cat >>confdefs.h <<_ACEOF
a3828db0 14178#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14179_ACEOF
3862412b 14180
5c45e068 14181
97bf5e38 14182fi
3862412b 14183
5c45e068 14184
6fea9e18
L
14185# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14186# Older amd64 Linux's don't have the fs_base and gs_base members of
14187# `struct user_regs_struct'.
f517c180
EA
14188ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14189#include <sys/user.h>
6fea9e18 14190"
d0ac1c44 14191if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
14192
14193cat >>confdefs.h <<_ACEOF
14194#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14195_ACEOF
14196
14197
14198fi
f517c180
EA
14199ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14200#include <sys/user.h>
6fea9e18 14201"
d0ac1c44 14202if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14203
14204cat >>confdefs.h <<_ACEOF
14205#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14206_ACEOF
14207
14208
14209fi
14210
14211
a3828db0 14212# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14214$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14215if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14216 $as_echo_n "(cached) " >&6
451928c5 14217else
81ecdfbb 14218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14219/* end confdefs.h. */
a3828db0 14220#include <sys/ptrace.h>
bec39cab
AC
14221int
14222main ()
14223{
a3828db0 14224PTRACE_GETREGS;
bec39cab
AC
14225 ;
14226 return 0;
14227}
14228_ACEOF
81ecdfbb 14229if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14230 gdb_cv_have_ptrace_getregs=yes
451928c5 14231else
81ecdfbb 14232 gdb_cv_have_ptrace_getregs=no
451928c5 14233fi
81ecdfbb 14234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14235fi
14236
81ecdfbb
RW
14237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14238$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14239if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14240
81ecdfbb 14241$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14242
97bf5e38 14243fi
451928c5 14244
a3828db0 14245# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14247$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14248if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14249 $as_echo_n "(cached) " >&6
451928c5 14250else
81ecdfbb 14251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14252/* end confdefs.h. */
a3828db0 14253#include <sys/ptrace.h>
bec39cab
AC
14254int
14255main ()
14256{
a3828db0 14257PTRACE_GETFPXREGS;
bec39cab
AC
14258 ;
14259 return 0;
14260}
14261_ACEOF
81ecdfbb 14262if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14263 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14264else
81ecdfbb 14265 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14266fi
81ecdfbb 14267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14268fi
14269
81ecdfbb
RW
14270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14271$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14272if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14273
81ecdfbb 14274$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14275
97bf5e38 14276fi
451928c5 14277
a3828db0 14278# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14280$as_echo_n "checking for PT_GETDBREGS... " >&6; }
d0ac1c44 14281if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 14282 $as_echo_n "(cached) " >&6
3862412b 14283else
81ecdfbb 14284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14285/* end confdefs.h. */
a3828db0
MK
14286#include <sys/types.h>
14287#include <sys/ptrace.h>
bec39cab
AC
14288int
14289main ()
14290{
a3828db0 14291PT_GETDBREGS;
bec39cab
AC
14292 ;
14293 return 0;
14294}
14295_ACEOF
81ecdfbb 14296if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14297 gdb_cv_have_pt_getdbregs=yes
3862412b 14298else
81ecdfbb 14299 gdb_cv_have_pt_getdbregs=no
3862412b 14300fi
81ecdfbb 14301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14302fi
14303
81ecdfbb
RW
14304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14305$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14306if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14307
81ecdfbb 14308$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14309
97bf5e38 14310fi
3862412b 14311
a3828db0 14312# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14314$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
d0ac1c44 14315if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 14316 $as_echo_n "(cached) " >&6
3862412b 14317else
81ecdfbb 14318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14319/* end confdefs.h. */
a3828db0
MK
14320#include <sys/types.h>
14321#include <sys/ptrace.h>
bec39cab
AC
14322int
14323main ()
14324{
a3828db0 14325PT_GETXMMREGS;
bec39cab
AC
14326 ;
14327 return 0;
14328}
14329_ACEOF
81ecdfbb 14330if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14331 gdb_cv_have_pt_getxmmregs=yes
3862412b 14332else
81ecdfbb 14333 gdb_cv_have_pt_getxmmregs=no
3862412b 14334fi
81ecdfbb 14335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14336fi
14337
81ecdfbb
RW
14338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14339$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14340if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14341
81ecdfbb 14342$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14343
97bf5e38 14344fi
3862412b 14345
6e9567fe
JB
14346# See if <sys/ptrace.h> supports LWP names on FreeBSD
14347# Older FreeBSD versions don't have the pl_tdname member of
14348# `struct ptrace_lwpinfo'.
14349ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14350"
d0ac1c44 14351if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
14352
14353cat >>confdefs.h <<_ACEOF
14354#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14355_ACEOF
14356
14357
14358fi
14359
14360
e6cdd38e
JB
14361# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14362# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14363# FreeBSD 10.3.
14364ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14365"
d0ac1c44 14366if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
14367
14368cat >>confdefs.h <<_ACEOF
14369#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14370_ACEOF
14371
14372
14373fi
14374
6e9567fe 14375
97bf5e38 14376if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14378$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14379 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 14380 $as_echo_n "(cached) " >&6
596c9d4b 14381else
81ecdfbb 14382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14383/* end confdefs.h. */
596c9d4b
KB
14384
14385#define _SYSCALL32
d30c5336
JK
14386/* Needed for new procfs interface on sparc-solaris. */
14387#define _STRUCTURED_PROC 1
596c9d4b 14388#include <sys/procfs.h>
bec39cab
AC
14389int
14390main ()
14391{
97bf5e38 14392gregset_t avar
bec39cab
AC
14393 ;
14394 return 0;
14395}
14396_ACEOF
81ecdfbb 14397if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14398 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14399else
81ecdfbb 14400 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14401
596c9d4b 14402fi
81ecdfbb 14403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14404fi
14405
97bf5e38 14406 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14407
81ecdfbb 14408$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14409
14410 fi
81ecdfbb
RW
14411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14412$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14413
81ecdfbb
RW
14414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14415$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14416 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14417 $as_echo_n "(cached) " >&6
d84dd0c5 14418else
81ecdfbb 14419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14420/* end confdefs.h. */
97bf5e38
MK
14421
14422#define _SYSCALL32
d30c5336
JK
14423/* Needed for new procfs interface on sparc-solaris. */
14424#define _STRUCTURED_PROC 1
d84dd0c5 14425#include <sys/procfs.h>
bec39cab
AC
14426int
14427main ()
14428{
97bf5e38 14429fpregset_t avar
bec39cab
AC
14430 ;
14431 return 0;
14432}
14433_ACEOF
81ecdfbb 14434if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14435 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14436else
81ecdfbb 14437 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14438
d84dd0c5 14439fi
81ecdfbb 14440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14441fi
14442
97bf5e38 14443 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14444
81ecdfbb 14445$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14446
97bf5e38 14447 fi
81ecdfbb
RW
14448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14449$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14450
81ecdfbb
RW
14451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14452$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14453 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 14454 $as_echo_n "(cached) " >&6
c906108c 14455else
81ecdfbb 14456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14457/* end confdefs.h. */
c906108c 14458
97bf5e38 14459#define _SYSCALL32
d30c5336
JK
14460/* Needed for new procfs interface on sparc-solaris. */
14461#define _STRUCTURED_PROC 1
97bf5e38 14462#include <sys/procfs.h>
bec39cab
AC
14463int
14464main ()
14465{
97bf5e38 14466prgregset_t avar
bec39cab
AC
14467 ;
14468 return 0;
14469}
14470_ACEOF
81ecdfbb 14471if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14472 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14473else
81ecdfbb 14474 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14475
c906108c 14476fi
81ecdfbb 14477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14478fi
14479
97bf5e38 14480 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14481
81ecdfbb 14482$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14483
97bf5e38 14484 fi
81ecdfbb
RW
14485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14486$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14487
81ecdfbb
RW
14488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14489$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14490 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14491 $as_echo_n "(cached) " >&6
d45fe813 14492else
81ecdfbb 14493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14494/* end confdefs.h. */
97bf5e38
MK
14495
14496#define _SYSCALL32
d30c5336
JK
14497/* Needed for new procfs interface on sparc-solaris. */
14498#define _STRUCTURED_PROC 1
97bf5e38 14499#include <sys/procfs.h>
bec39cab
AC
14500int
14501main ()
14502{
97bf5e38 14503prfpregset_t avar
bec39cab
AC
14504 ;
14505 return 0;
14506}
14507_ACEOF
81ecdfbb 14508if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14509 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14510else
81ecdfbb 14511 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14512
d45fe813 14513fi
81ecdfbb 14514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14515fi
14516
97bf5e38 14517 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14518
81ecdfbb 14519$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14520
97bf5e38 14521 fi
81ecdfbb
RW
14522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14523$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14524
81ecdfbb
RW
14525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14526$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
d0ac1c44 14527 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 14528 $as_echo_n "(cached) " >&6
d45fe813 14529else
81ecdfbb 14530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14531/* end confdefs.h. */
97bf5e38
MK
14532
14533#define _SYSCALL32
d30c5336
JK
14534/* Needed for new procfs interface on sparc-solaris. */
14535#define _STRUCTURED_PROC 1
97bf5e38 14536#include <sys/procfs.h>
bec39cab
AC
14537int
14538main ()
14539{
97bf5e38 14540prgregset32_t avar
bec39cab
AC
14541 ;
14542 return 0;
14543}
14544_ACEOF
81ecdfbb 14545if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14546 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14547else
81ecdfbb 14548 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14549
d45fe813 14550fi
81ecdfbb 14551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14552fi
14553
97bf5e38 14554 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14555
81ecdfbb 14556$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14557
97bf5e38 14558 fi
81ecdfbb
RW
14559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14560$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14561
81ecdfbb
RW
14562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14563$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 14564 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14565 $as_echo_n "(cached) " >&6
d45fe813 14566else
81ecdfbb 14567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14568/* end confdefs.h. */
97bf5e38 14569
d45fe813 14570#define _SYSCALL32
d30c5336
JK
14571/* Needed for new procfs interface on sparc-solaris. */
14572#define _STRUCTURED_PROC 1
97bf5e38 14573#include <sys/procfs.h>
bec39cab
AC
14574int
14575main ()
14576{
97bf5e38 14577lwpid_t avar
bec39cab
AC
14578 ;
14579 return 0;
14580}
14581_ACEOF
81ecdfbb 14582if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14583 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14584else
81ecdfbb 14585 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14586
d45fe813 14587fi
81ecdfbb 14588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14589fi
14590
97bf5e38 14591 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14592
81ecdfbb 14593$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14594
97bf5e38 14595 fi
81ecdfbb
RW
14596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14597$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14598
81ecdfbb
RW
14599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14600$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 14601 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14602 $as_echo_n "(cached) " >&6
c906108c 14603else
81ecdfbb 14604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14605/* end confdefs.h. */
c906108c 14606
97bf5e38 14607#define _SYSCALL32
d30c5336
JK
14608/* Needed for new procfs interface on sparc-solaris. */
14609#define _STRUCTURED_PROC 1
97bf5e38 14610#include <sys/procfs.h>
bec39cab
AC
14611int
14612main ()
14613{
97bf5e38 14614psaddr_t avar
bec39cab
AC
14615 ;
14616 return 0;
14617}
14618_ACEOF
81ecdfbb 14619if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14620 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14621else
81ecdfbb 14622 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14623
c906108c 14624fi
81ecdfbb 14625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14626fi
14627
97bf5e38 14628 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14629
81ecdfbb 14630$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14631
97bf5e38 14632 fi
81ecdfbb
RW
14633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14634$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14635
43b7e92b
GB
14636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14637$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14638 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14639 $as_echo_n "(cached) " >&6
14640else
14641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14642/* end confdefs.h. */
14643
14644#define _SYSCALL32
14645/* Needed for new procfs interface on sparc-solaris. */
14646#define _STRUCTURED_PROC 1
14647#include <sys/procfs.h>
14648int
14649main ()
14650{
14651elf_fpregset_t avar
14652 ;
14653 return 0;
14654}
14655_ACEOF
14656if ac_fn_c_try_compile "$LINENO"; then :
14657 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14658else
14659 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14660
14661fi
14662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14663fi
14664
14665 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14666
14667$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14668
14669 fi
14670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14671$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14672
c906108c 14673fi
c906108c 14674
bc8bcb4b 14675# Check if the compiler supports the `long long' type.
c906108c 14676
81ecdfbb
RW
14677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14678$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 14679if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 14680 $as_echo_n "(cached) " >&6
97bf5e38 14681else
81ecdfbb 14682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14683/* end confdefs.h. */
bc8bcb4b 14684extern long long foo;
bec39cab
AC
14685int
14686main ()
14687{
bc8bcb4b 14688switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14689 ;
14690 return 0;
14691}
14692_ACEOF
81ecdfbb 14693if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14694 gdb_cv_c_long_long=yes
14695else
81ecdfbb 14696 gdb_cv_c_long_long=no
97bf5e38 14697fi
81ecdfbb 14698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14699fi
81ecdfbb
RW
14700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14701$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14702if test $gdb_cv_c_long_long != yes; then
14703 # libdecnumber requires long long.
d0ac1c44 14704 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14705fi
14706
bc8bcb4b 14707# Check if the compiler and runtime support printing long longs.
97bf5e38 14708
81ecdfbb
RW
14709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14710$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 14711if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 14712 $as_echo_n "(cached) " >&6
97bf5e38 14713else
81ecdfbb 14714 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14715 gdb_cv_printf_has_long_long=no
14716else
81ecdfbb 14717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14718/* end confdefs.h. */
bc8bcb4b
MK
14719$ac_includes_default
14720int
14721main ()
14722{
14723char buf[32];
97bf5e38
MK
14724 long long l = 0;
14725 l = (l << 16) + 0x0123;
14726 l = (l << 16) + 0x4567;
14727 l = (l << 16) + 0x89ab;
14728 l = (l << 16) + 0xcdef;
14729 sprintf (buf, "0x%016llx", l);
14730 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14731 ;
14732 return 0;
c906108c 14733}
bec39cab 14734_ACEOF
81ecdfbb 14735if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14736 gdb_cv_printf_has_long_long=yes
14737else
81ecdfbb 14738 gdb_cv_printf_has_long_long=no
97bf5e38 14739fi
81ecdfbb
RW
14740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14741 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14742fi
81ecdfbb 14743
97bf5e38 14744fi
81ecdfbb
RW
14745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14746$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14747if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14748
81ecdfbb 14749$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14750
14751fi
97bf5e38 14752
1a619819
LM
14753# Check if the compiler and runtime support printing decfloats.
14754
81ecdfbb
RW
14755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14756$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 14757if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 14758 $as_echo_n "(cached) " >&6
1a619819 14759else
81ecdfbb 14760 if test "$cross_compiling" = yes; then :
1a619819
LM
14761 gdb_cv_printf_has_decfloat=no
14762else
81ecdfbb 14763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14764/* end confdefs.h. */
14765$ac_includes_default
14766int
14767main ()
14768{
14769char buf[64];
14770 _Decimal32 d32 = 1.2345df;
14771 _Decimal64 d64 = 1.2345dd;
14772 _Decimal128 d128 = 1.2345dl;
14773 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14774 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14775 ;
14776 return 0;
14777}
14778_ACEOF
81ecdfbb 14779if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14780 gdb_cv_printf_has_decfloat=yes
14781else
81ecdfbb 14782 gdb_cv_printf_has_decfloat=no
1a619819 14783fi
81ecdfbb
RW
14784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14785 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14786fi
81ecdfbb 14787
1a619819 14788fi
81ecdfbb
RW
14789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14790$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14791if test $gdb_cv_printf_has_decfloat = yes; then
14792
81ecdfbb 14793$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14794
14795fi
14796
bc8bcb4b
MK
14797# Check if the compiler supports the `long double' type. We can't use
14798# AC_C_LONG_DOUBLE because that one does additional checks on the
14799# constants defined in <float.h> that fail on some systems,
14800# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14801
81ecdfbb
RW
14802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14803$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 14804if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 14805 $as_echo_n "(cached) " >&6
97bf5e38 14806else
81ecdfbb 14807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14808/* end confdefs.h. */
97bf5e38 14809long double foo;
bec39cab 14810_ACEOF
81ecdfbb 14811if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14812 gdb_cv_c_long_double=yes
97bf5e38 14813else
81ecdfbb 14814 gdb_cv_c_long_double=no
97bf5e38 14815fi
81ecdfbb 14816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14817fi
81ecdfbb
RW
14818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14819$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14820if test $gdb_cv_c_long_double = yes; then
c906108c 14821
81ecdfbb 14822$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14823
14824fi
14825
bc8bcb4b 14826# Check if the compiler and runtime support printing long doubles.
97bf5e38 14827
81ecdfbb
RW
14828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14829$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 14830if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 14831 $as_echo_n "(cached) " >&6
97bf5e38 14832else
81ecdfbb 14833 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14834 gdb_cv_printf_has_long_double=no
14835else
81ecdfbb 14836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14837/* end confdefs.h. */
bc8bcb4b
MK
14838$ac_includes_default
14839int
14840main ()
14841{
14842char buf[16];
97bf5e38
MK
14843 long double f = 3.141592653;
14844 sprintf (buf, "%Lg", f);
14845 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14846 ;
14847 return 0;
97bf5e38 14848}
bec39cab 14849_ACEOF
81ecdfbb 14850if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14851 gdb_cv_printf_has_long_double=yes
c906108c 14852else
81ecdfbb 14853 gdb_cv_printf_has_long_double=no
c906108c 14854fi
81ecdfbb
RW
14855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14856 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14857fi
81ecdfbb 14858
c906108c 14859fi
81ecdfbb
RW
14860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14861$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14862if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14863
81ecdfbb 14864$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14865
14866fi
97bf5e38 14867
bc8bcb4b 14868# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14869
81ecdfbb
RW
14870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14871$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 14872if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 14873 $as_echo_n "(cached) " >&6
97bf5e38 14874else
81ecdfbb 14875 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14876 gdb_cv_scanf_has_long_double=no
14877else
81ecdfbb 14878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14879/* end confdefs.h. */
bc8bcb4b
MK
14880#include <stdio.h>
14881int
14882main ()
14883{
14884char *buf = "3.141592653";
97bf5e38
MK
14885 long double f = 0;
14886 sscanf (buf, "%Lg", &f);
14887 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14888 ;
14889 return 0;
97bf5e38 14890}
bec39cab 14891_ACEOF
81ecdfbb 14892if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14893 gdb_cv_scanf_has_long_double=yes
14894else
81ecdfbb 14895 gdb_cv_scanf_has_long_double=no
97bf5e38 14896fi
81ecdfbb
RW
14897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14898 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14899fi
81ecdfbb 14900
c906108c 14901fi
81ecdfbb
RW
14902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14903$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14904if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14905
81ecdfbb 14906$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14907
14908fi
c906108c 14909
438013df
AO
14910case ${host_os} in
14911aix*)
81ecdfbb
RW
14912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14913$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 14914if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 14915 $as_echo_n "(cached) " >&6
438013df 14916else
bec39cab 14917
438013df
AO
14918 SAVE_LDFLAGS=$LDFLAGS
14919
14920 case $GCC in
14921 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14922 *) gdb_cv_bigtoc=-bbigtoc ;;
14923 esac
14924
14925 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14927/* end confdefs.h. */
438013df 14928
bec39cab
AC
14929int
14930main ()
14931{
438013df 14932int i;
bec39cab
AC
14933 ;
14934 return 0;
14935}
14936_ACEOF
81ecdfbb 14937if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14938
81ecdfbb
RW
14939else
14940 gdb_cv_bigtoc=
438013df 14941fi
81ecdfbb
RW
14942rm -f core conftest.err conftest.$ac_objext \
14943 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14944 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14945
bec39cab 14946fi
81ecdfbb
RW
14947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14948$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14949 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14950 ;;
14951esac
14952
38f6b338 14953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14954$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14955dynamic_list=false
14956if test "${gdb_native}" = yes; then
14957 # The dynamically loaded libthread_db needs access to symbols in the gdb
14958 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14959 # may not be supported there.
14960 old_LDFLAGS="$LDFLAGS"
14961 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14962 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14963 LDFLAGS="$LDFLAGS $RDYNAMIC"
14964 if test "${have_libpython}" = no; then
14965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14966/* end confdefs.h. */
14967
14968int
14969main ()
14970{
14971
14972 ;
14973 return 0;
14974}
14975_ACEOF
14976if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14977 dynamic_list=true
14978fi
14979rm -f core conftest.err conftest.$ac_objext \
14980 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14981 else
14982 # Workaround http://bugs.python.org/issue4434 where static
14983 # libpythonX.Y.a would get its symbols required for
14984 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14985 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
14986
14987 # Note the workaround for Python
14988 # http://bugs.python.org/issue10112 earlier has removed
14989 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
14990 # here too, as otherwise it'd make this -Wl,--dynamic-list test
14991 # always pass.
38f6b338
JK
14992 old_CFLAGS="$CFLAGS"
14993 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
14994 old_LIBS="$LIBS"
14995 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
14996 old_CPPFLAGS="$CPPFLAGS"
14997 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 14998 if test "$cross_compiling" = yes; then :
3bebe2f2 14999 true
f6528abd 15000else
3bebe2f2
JK
15001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15002/* end confdefs.h. */
1b4f615e 15003#include "Python.h"
3bebe2f2
JK
15004int
15005main ()
15006{
15007int err;
38f6b338
JK
15008 Py_Initialize ();
15009 err = PyRun_SimpleString ("import itertools\n");
15010 Py_Finalize ();
15011 return err == 0 ? 0 : 1;
3bebe2f2
JK
15012 ;
15013 return 0;
15014}
15015_ACEOF
15016if ac_fn_c_try_run "$LINENO"; then :
15017 dynamic_list=true
15018fi
15019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15020 conftest.$ac_objext conftest.beam conftest.$ac_ext
15021fi
15022
8c1fb155 15023 LIBS="$old_LIBS"
38f6b338 15024 CFLAGS="$old_CFLAGS"
1b4f615e 15025 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
15026 fi
15027 LDFLAGS="$old_LDFLAGS"
15028fi
15029if $dynamic_list; then
15030 found="-Wl,--dynamic-list"
15031 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15032else
38f6b338
JK
15033 found="-rdynamic"
15034 RDYNAMIC="-rdynamic"
f6528abd 15035fi
f6528abd 15036
38f6b338 15037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15038$as_echo "$found" >&6; }
0407b3f1 15039
f6528abd 15040
0407b3f1 15041if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 15042 case ${host_os} in
d92419e5 15043 aix*)
81ecdfbb
RW
15044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15045$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 15046 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 15047 $as_echo_n "(cached) " >&6
bec39cab 15048else
81ecdfbb 15049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15050/* end confdefs.h. */
d92419e5 15051#include <sys/pthdebug.h>
bec39cab
AC
15052int
15053main ()
15054{
d92419e5
JB
15055#ifndef PTHDB_VERSION_3
15056 #error
15057 #endif
bec39cab
AC
15058 ;
15059 return 0;
15060}
15061_ACEOF
81ecdfbb 15062if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15063 gdb_cv_have_aix_thread_debug=yes
15064else
81ecdfbb 15065 gdb_cv_have_aix_thread_debug=no
d92419e5 15066fi
81ecdfbb 15067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15068fi
15069
81ecdfbb
RW
15070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15071$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
15072 if test $gdb_cv_have_aix_thread_debug = yes; then
15073 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15074 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15075 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15076
15077 # Older versions of AIX do not provide the declaration for
15078 # the getthrds function (it appears that it was introduced
15079 # with AIX 6.x).
15080 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15081"
d0ac1c44 15082if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
15083 ac_have_decl=1
15084else
15085 ac_have_decl=0
15086fi
15087
15088cat >>confdefs.h <<_ACEOF
15089#define HAVE_DECL_GETTHRDS $ac_have_decl
15090_ACEOF
15091
d92419e5
JB
15092 fi
15093 ;;
c906108c 15094 esac
bec39cab 15095
c906108c
SS
15096fi
15097
3f47be5c 15098if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15100$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 15101if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 15102 $as_echo_n "(cached) " >&6
bec39cab 15103else
81ecdfbb 15104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15105/* end confdefs.h. */
3f47be5c 15106#include <thread_db.h>
bec39cab
AC
15107int
15108main ()
15109{
3f47be5c 15110int i = TD_NOTALLOC;
bec39cab
AC
15111 ;
15112 return 0;
15113}
15114_ACEOF
81ecdfbb 15115if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15116 gdb_cv_thread_db_h_has_td_notalloc=yes
15117else
81ecdfbb 15118 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15119
3f47be5c 15120fi
81ecdfbb 15121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15122
bec39cab 15123fi
81ecdfbb
RW
15124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15125$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15127$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 15128if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 15129 $as_echo_n "(cached) " >&6
59f80f10 15130else
81ecdfbb 15131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15132/* end confdefs.h. */
15133#include <thread_db.h>
15134int
15135main ()
15136{
15137int i = TD_VERSION;
15138 ;
15139 return 0;
15140}
15141_ACEOF
81ecdfbb 15142if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15143 gdb_cv_thread_db_h_has_td_version=yes
15144else
81ecdfbb 15145 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15146
15147fi
81ecdfbb 15148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15149
15150fi
81ecdfbb
RW
15151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15152$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15154$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 15155if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15156 $as_echo_n "(cached) " >&6
59f80f10 15157else
81ecdfbb 15158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15159/* end confdefs.h. */
15160#include <thread_db.h>
15161int
15162main ()
15163{
15164int i = TD_NOTLS;
15165 ;
15166 return 0;
15167}
15168_ACEOF
81ecdfbb 15169if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15170 gdb_cv_thread_db_h_has_td_notls=yes
15171else
81ecdfbb 15172 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15173
15174fi
81ecdfbb 15175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15176
15177fi
81ecdfbb
RW
15178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15179$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15180fi
15181if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15182
81ecdfbb 15183$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15184
59f80f10
DJ
15185fi
15186if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15187
81ecdfbb 15188$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15189
15190fi
15191if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15192
81ecdfbb 15193$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15194
3f47be5c
EZ
15195fi
15196
81ecdfbb
RW
15197ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15198"
d0ac1c44 15199if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15200 ac_have_decl=1
10568435 15201else
81ecdfbb 15202 ac_have_decl=0
10568435 15203fi
10568435
JK
15204
15205cat >>confdefs.h <<_ACEOF
81ecdfbb 15206#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15207_ACEOF
15208
15209
81ecdfbb
RW
15210if test "$cross_compiling" = yes; then :
15211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15212/* end confdefs.h. */
15213#include <sys/personality.h>
15214int
15215main ()
15216{
15217
15218# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15219# define ADDR_NO_RANDOMIZE 0x0040000
15220# endif
15221 /* Test the flag could be set and stays set. */
15222 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15223 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15224 return 1
15225 ;
15226 return 0;
15227}
15228_ACEOF
81ecdfbb 15229if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15230 have_personality=true
15231else
81ecdfbb 15232 have_personality=false
10568435 15233fi
81ecdfbb
RW
15234rm -f core conftest.err conftest.$ac_objext \
15235 conftest$ac_exeext conftest.$ac_ext
10568435 15236else
81ecdfbb 15237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15238/* end confdefs.h. */
15239#include <sys/personality.h>
15240int
15241main ()
15242{
15243
15244# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15245# define ADDR_NO_RANDOMIZE 0x0040000
15246# endif
15247 /* Test the flag could be set and stays set. */
15248 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15249 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15250 return 1
15251 ;
15252 return 0;
15253}
15254_ACEOF
81ecdfbb 15255if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15256 have_personality=true
15257else
81ecdfbb 15258 have_personality=false
10568435 15259fi
81ecdfbb
RW
15260rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15261 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15262fi
81ecdfbb 15263
10568435
JK
15264if $have_personality
15265then
15266
81ecdfbb 15267$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15268
15269fi
15270
e655c1a2
PA
15271case $host_os in
15272 go32* | *djgpp*)
15273 gdbinit=gdb.ini
15274 ;;
15275 *)
15276 gdbinit=.gdbinit
15277 ;;
15278esac
15279
15280cat >>confdefs.h <<_ACEOF
15281#define GDBINIT "$gdbinit"
15282_ACEOF
15283
15284
fb40c209 15285
f83d8a90
DE
15286# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15287# except that the argument to --with-sysroot is optional.
15288# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15289if test "x$with_sysroot" = xyes; then
15290 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15291fi
bec39cab 15292
81ecdfbb
RW
15293# Check whether --with-sysroot was given.
15294if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15295 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15296else
15297 TARGET_SYSTEM_ROOT=
15298fi
030292b7 15299
030292b7 15300
f83d8a90
DE
15301 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15302 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15303 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15304 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15305
f83d8a90
DE
15306cat >>confdefs.h <<_ACEOF
15307#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15308_ACEOF
bec39cab 15309
030292b7 15310
b14b1491 15311
f83d8a90
DE
15312
15313 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15314 if test "x$prefix" = xNONE; then
15315 test_prefix=/usr/local
15316 else
15317 test_prefix=$prefix
15318 fi
15319 else
15320 test_prefix=$exec_prefix
15321 fi
15322 value=0
15323 case ${ac_define_dir} in
15324 "${test_prefix}"|"${test_prefix}/"*|\
15325 '${exec_prefix}'|'${exec_prefix}/'*)
15326 value=1
15327 ;;
15328 esac
15329
15330cat >>confdefs.h <<_ACEOF
15331#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15332_ACEOF
030292b7
DJ
15333
15334
15335
16e7150e 15336
16e7150e 15337
81ecdfbb
RW
15338# Check whether --with-system-gdbinit was given.
15339if test "${with_system_gdbinit+set}" = set; then :
15340 withval=$with_system_gdbinit;
b14b1491
TT
15341 SYSTEM_GDBINIT=$withval
15342else
15343 SYSTEM_GDBINIT=
81ecdfbb
RW
15344fi
15345
16e7150e
JG
15346
15347 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15348 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15349 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15350 ac_define_dir=`eval echo $ac_define_dir`
15351
15352cat >>confdefs.h <<_ACEOF
15353#define SYSTEM_GDBINIT "$ac_define_dir"
15354_ACEOF
15355
15356
15357
0c4a4063 15358
b14b1491
TT
15359 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15360 if test "x$prefix" = xNONE; then
15361 test_prefix=/usr/local
15362 else
15363 test_prefix=$prefix
15364 fi
15365 else
15366 test_prefix=$exec_prefix
15367 fi
15368 value=0
15369 case ${ac_define_dir} in
15370 "${test_prefix}"|"${test_prefix}/"*|\
15371 '${exec_prefix}'|'${exec_prefix}/'*)
15372 value=1
15373 ;;
15374 esac
16e7150e 15375
b14b1491
TT
15376cat >>confdefs.h <<_ACEOF
15377#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15378_ACEOF
15379
b14b1491 15380
16e7150e 15381
0c4a4063 15382
b835bb52 15383
81ecdfbb
RW
15384# Check whether --enable-werror was given.
15385if test "${enable_werror+set}" = set; then :
15386 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15387 yes | y) ERROR_ON_WARNING="yes" ;;
15388 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 15389 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15390 esac
81ecdfbb
RW
15391fi
15392
094a342e 15393
9a084706
PA
15394# Enable -Werror by default when using gcc. Turn it off for releases.
15395if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15396 ERROR_ON_WARNING=yes
15397fi
15398
15399WERROR_CFLAGS=""
15400if test "${ERROR_ON_WARNING}" = yes ; then
15401 WERROR_CFLAGS="-Werror"
15402fi
15403
cf6de44d 15404# The options we'll try to enable.
aac331e4 15405build_warnings="-Wall -Wpointer-arith \
a0de763e 15406-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 15407-Wno-switch -Wno-char-subscripts \
cf6de44d 15408-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 15409-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 15410-Wno-mismatched-tags \
632e107b 15411-Wno-error=deprecated-register \
85e26832 15412-Wsuggest-override \
1a34f210 15413-Wimplicit-fallthrough=3 \
96643e35
TT
15414-Wduplicated-cond \
15415-Wshadow=local"
3bc3d82a 15416
3526781e 15417case "${host}" in
4fa7574e
RO
15418 *-*-mingw32*)
15419 # Enable -Wno-format by default when using gcc on mingw since many
15420 # GCC versions complain about %I64.
15421 build_warnings="$build_warnings -Wno-format" ;;
15422 *-*-solaris*)
15423 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15424 # doesn't understand.
15425 build_warnings="$build_warnings -Wno-unknown-pragmas"
15426 # Solaris 11 <unistd.h> marks vfork deprecated.
15427 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
15428 *)
15429 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
15430 # but there's a special case for this below.
15431 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15432esac
15433
81ecdfbb
RW
15434# Check whether --enable-build-warnings was given.
15435if test "${enable_build_warnings+set}" = set; then :
15436 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15437 yes) ;;
15438 no) build_warnings="-w";;
15439 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15440 build_warnings="${build_warnings} ${t}";;
15441 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15442 build_warnings="${t} ${build_warnings}";;
15443 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15444esac
d4f3574e 15445if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15446 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15447fi
81ecdfbb
RW
15448fi
15449# Check whether --enable-gdb-build-warnings was given.
15450if test "${enable_gdb_build_warnings+set}" = set; then :
15451 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15452 yes) ;;
15453 no) build_warnings="-w";;
15454 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15455 build_warnings="${build_warnings} ${t}";;
15456 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15457 build_warnings="${t} ${build_warnings}";;
15458 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15459esac
15460if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15461 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15462fi
81ecdfbb 15463fi
3bc3d82a
PA
15464
15465# The set of warnings supported by a C++ compiler is not the same as
15466# of the C compiler.
cf6de44d 15467ac_ext=cpp
3bc3d82a
PA
15468ac_cpp='$CXXCPP $CPPFLAGS'
15469ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15470ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15471ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15472
3bc3d82a 15473
81ecdfbb 15474WARN_CFLAGS=""
c906108c
SS
15475if test "x${build_warnings}" != x -a "x$GCC" = xyes
15476then
81ecdfbb
RW
15477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15478$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15479 # Separate out the -Werror flag as some files just cannot be
15480 # compiled with it enabled.
15481 for w in ${build_warnings}; do
7544db95
PA
15482 # GCC does not complain about -Wno-unknown-warning. Invert
15483 # and test -Wunknown-warning instead.
15484 case $w in
15485 -Wno-*)
15486 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
15487 -Wformat-nonliteral)
15488 # gcc requires -Wformat before -Wformat-nonliteral
15489 # will work, so stick them together.
15490 w="-Wformat $w"
15491 wtest="$w"
15492 ;;
7544db95
PA
15493 *)
15494 wtest=$w ;;
15495 esac
15496
746a987d
AC
15497 case $w in
15498 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15499 *)
15500 # Check whether GCC accepts it.
4536bbc6 15501 saved_CFLAGS="$CFLAGS"
3e019bdc 15502 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15503 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15504 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
15505 if test "x$w" = "x-Wunused-variable"; then
15506 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
15507 # fixed in GCC 4.9. This test is derived from the gdb
15508 # source code that triggered this bug in GCC.
15509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15510/* end confdefs.h. */
15511struct scoped_restore_base {};
15512 struct scoped_restore_tmpl : public scoped_restore_base {
15513 ~scoped_restore_tmpl() {}
15514 };
15515int
15516main ()
15517{
15518const scoped_restore_base &b = scoped_restore_tmpl();
15519 ;
15520 return 0;
15521}
15522_ACEOF
15523if ac_fn_cxx_try_compile "$LINENO"; then :
15524 WARN_CFLAGS="${WARN_CFLAGS} $w"
15525fi
15526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15527 else
15528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15529/* end confdefs.h. */
4536bbc6 15530
bec39cab
AC
15531int
15532main ()
15533{
4536bbc6 15534
bec39cab
AC
15535 ;
15536 return 0;
15537}
15538_ACEOF
3bc3d82a 15539if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15540 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15541fi
81ecdfbb 15542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 15543 fi
4536bbc6 15544 CFLAGS="$saved_CFLAGS"
3bc3d82a 15545 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15546 esac
15547 done
81ecdfbb
RW
15548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15549$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15550fi
15551
15552
104c1213 15553
cf6de44d 15554ac_ext=c
3bc3d82a
PA
15555ac_cpp='$CPP $CPPFLAGS'
15556ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15557ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15558ac_compiler_gnu=$ac_cv_c_compiler_gnu
15559
3bc3d82a 15560
b835bb52 15561
f35d5ade
TT
15562# Check whether --enable-ubsan was given.
15563if test "${enable_ubsan+set}" = set; then :
15564 enableval=$enable_ubsan;
15565else
eff98030 15566 enable_ubsan=no
f35d5ade
TT
15567fi
15568
15569if test "x$enable_ubsan" = xauto; then
15570 if $development; then
15571 enable_ubsan=yes
15572 fi
15573fi
15574ac_ext=cpp
15575ac_cpp='$CXXCPP $CPPFLAGS'
15576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15579
15580if test "x$enable_ubsan" = xyes; then
15581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
15582$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
15583 saved_CXXFLAGS="$CXXFLAGS"
15584 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15586/* end confdefs.h. */
15587
15588int
15589main ()
15590{
15591
15592 ;
15593 return 0;
15594}
15595_ACEOF
15596if ac_fn_cxx_try_link "$LINENO"; then :
15597 enable_ubsan=yes
15598else
15599 enable_ubsan=no
15600fi
15601rm -f core conftest.err conftest.$ac_objext \
15602 conftest$ac_exeext conftest.$ac_ext
15603 CXXFLAGS="$saved_CXXFLAGS"
15604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
15605$as_echo "$enable_ubsan" >&6; }
15606 if test "x$enable_ubsan" = xyes; then
15607 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15608 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
15609 fi
15610fi
15611ac_ext=c
15612ac_cpp='$CPP $CPPFLAGS'
15613ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15614ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15615ac_compiler_gnu=$ac_cv_c_compiler_gnu
15616
15617
15618
7a292a7a 15619# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15621$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 15622if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 15623 $as_echo_n "(cached) " >&6
bec39cab 15624else
81ecdfbb 15625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15626/* end confdefs.h. */
7a292a7a
SS
15627
15628#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15629lose
15630#endif
bec39cab 15631_ACEOF
7a292a7a 15632if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15633 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15634 gdb_cv_os_cygwin=yes
15635else
7a292a7a
SS
15636 gdb_cv_os_cygwin=no
15637fi
15638rm -f conftest*
15639
15640fi
81ecdfbb
RW
15641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15642$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15643
aff38e61 15644
3eb25fda 15645SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15646case ${host} in
95cbc983
AC
15647 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15648 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15649 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 15650 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
15651esac
15652
15653
cd0fc7c3
SS
15654# libreadline needs libuser32.a in a cygwin environment
15655WIN32LIBS=
15656if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15657 WIN32LIBS="-luser32"
15658 case "${target}" in
15659 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15660 ;;
15661 esac
cd0fc7c3 15662fi
c906108c 15663
b4505029
MM
15664# The ser-tcp.c module requires sockets.
15665case ${host} in
15666 *mingw32*)
15667
81ecdfbb 15668$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15669
15670 WIN32LIBS="$WIN32LIBS -lws2_32"
15671 ;;
15672esac
15673
7a292a7a 15674
31d99776 15675# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15676
15677 OLD_CFLAGS=$CFLAGS
15678 OLD_LDFLAGS=$LDFLAGS
15679 OLD_LIBS=$LIBS
15680 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15681 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15682 # always want our bfd.
15683 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15684 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15685 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15686 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15687 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 15689$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 15690if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 15691 $as_echo_n "(cached) " >&6
31d99776 15692else
81ecdfbb 15693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15694/* end confdefs.h. */
15695#include <stdlib.h>
def63ff0
TT
15696 #include "bfd.h"
15697 #include "elf-bfd.h"
31d99776
DJ
15698
15699int
15700main ()
15701{
def63ff0 15702return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15703 ;
15704 return 0;
15705}
15706_ACEOF
81ecdfbb 15707if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15708 gdb_cv_var_elf=yes
15709else
81ecdfbb 15710 gdb_cv_var_elf=no
31d99776 15711fi
81ecdfbb
RW
15712rm -f core conftest.err conftest.$ac_objext \
15713 conftest$ac_exeext conftest.$ac_ext
31d99776 15714fi
81ecdfbb
RW
15715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15716$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15717 CFLAGS=$OLD_CFLAGS
15718 LDFLAGS=$OLD_LDFLAGS
15719 LIBS=$OLD_LIBS
31d99776 15720if test $gdb_cv_var_elf = yes; then
d4777acb 15721 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15722
81ecdfbb 15723$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15724
075ff26d
JK
15725 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15726 if test "$plugins" = "yes"; then
a48b32c0
L
15727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15728$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 15729if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15730 $as_echo_n "(cached) " >&6
15731else
15732 ac_func_search_save_LIBS=$LIBS
15733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15734/* end confdefs.h. */
15735
15736/* Override any GCC internal prototype to avoid an error.
15737 Use char because int might match the return type of a GCC
15738 builtin and then its argument prototype would still apply. */
15739#ifdef __cplusplus
15740extern "C"
15741#endif
15742char dlopen ();
15743int
15744main ()
15745{
15746return dlopen ();
15747 ;
15748 return 0;
15749}
15750_ACEOF
15751for ac_lib in '' dl; do
15752 if test -z "$ac_lib"; then
15753 ac_res="none required"
15754 else
15755 ac_res=-l$ac_lib
15756 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15757 fi
15758 if ac_fn_c_try_link "$LINENO"; then :
15759 ac_cv_search_dlopen=$ac_res
15760fi
15761rm -f core conftest.err conftest.$ac_objext \
15762 conftest$ac_exeext
d0ac1c44 15763 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15764 break
15765fi
15766done
d0ac1c44 15767if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15768
15769else
15770 ac_cv_search_dlopen=no
15771fi
15772rm conftest.$ac_ext
15773LIBS=$ac_func_search_save_LIBS
15774fi
15775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15776$as_echo "$ac_cv_search_dlopen" >&6; }
15777ac_res=$ac_cv_search_dlopen
15778if test "$ac_res" != no; then :
15779 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15780
15781fi
15782
075ff26d 15783 fi
31d99776 15784fi
31d99776 15785
4f05add4
TT
15786# Add macho support to GDB, but only if BFD includes it.
15787
15788 OLD_CFLAGS=$CFLAGS
15789 OLD_LDFLAGS=$LDFLAGS
15790 OLD_LIBS=$LIBS
15791 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15792 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15793 # always want our bfd.
15794 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15795 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15796 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15797 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15798 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15800$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 15801if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
15802 $as_echo_n "(cached) " >&6
15803else
15804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15805/* end confdefs.h. */
15806#include <stdlib.h>
15807 #include "bfd.h"
15808 #include "mach-o.h"
15809
15810int
15811main ()
15812{
15813return bfd_mach_o_lookup_command (NULL, 0, NULL);
15814 ;
15815 return 0;
15816}
15817_ACEOF
15818if ac_fn_c_try_link "$LINENO"; then :
15819 gdb_cv_var_macho=yes
15820else
15821 gdb_cv_var_macho=no
15822fi
15823rm -f core conftest.err conftest.$ac_objext \
15824 conftest$ac_exeext conftest.$ac_ext
15825fi
15826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15827$as_echo "$gdb_cv_var_macho" >&6; }
15828 CFLAGS=$OLD_CFLAGS
15829 LDFLAGS=$OLD_LDFLAGS
15830 LIBS=$OLD_LIBS
15831if test $gdb_cv_var_macho = yes; then
15832 CONFIG_OBS="$CONFIG_OBS machoread.o"
15833fi
15834
121ce6e5
DJ
15835# Add any host-specific objects to GDB.
15836CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15837
608e2dbb
TT
15838# If building on ELF, look for lzma support for embedded compressed debug info.
15839if test $gdb_cv_var_elf = yes; then
15840
15841# Check whether --with-lzma was given.
15842if test "${with_lzma+set}" = set; then :
15843 withval=$with_lzma;
15844else
15845 with_lzma=auto
15846fi
15847
15848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15849$as_echo_n "checking whether to use lzma... " >&6; }
15850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15851$as_echo "$with_lzma" >&6; }
15852
15853 if test "${with_lzma}" != no; then
15854
15855
15856
15857
15858
15859
15860
15861
15862 use_additional=yes
15863
15864 acl_save_prefix="$prefix"
15865 prefix="$acl_final_prefix"
15866 acl_save_exec_prefix="$exec_prefix"
15867 exec_prefix="$acl_final_exec_prefix"
15868
15869 eval additional_includedir=\"$includedir\"
15870 eval additional_libdir=\"$libdir\"
15871
15872 exec_prefix="$acl_save_exec_prefix"
15873 prefix="$acl_save_prefix"
15874
15875
15876# Check whether --with-liblzma-prefix was given.
15877if test "${with_liblzma_prefix+set}" = set; then :
15878 withval=$with_liblzma_prefix;
15879 if test "X$withval" = "Xno"; then
15880 use_additional=no
15881 else
15882 if test "X$withval" = "X"; then
15883
15884 acl_save_prefix="$prefix"
15885 prefix="$acl_final_prefix"
15886 acl_save_exec_prefix="$exec_prefix"
15887 exec_prefix="$acl_final_exec_prefix"
15888
15889 eval additional_includedir=\"$includedir\"
15890 eval additional_libdir=\"$libdir\"
15891
15892 exec_prefix="$acl_save_exec_prefix"
15893 prefix="$acl_save_prefix"
15894
15895 else
15896 additional_includedir="$withval/include"
15897 additional_libdir="$withval/lib"
15898 fi
15899 fi
15900
15901fi
15902
15903 LIBLZMA=
15904 LTLIBLZMA=
15905 INCLZMA=
15906 rpathdirs=
15907 ltrpathdirs=
15908 names_already_handled=
15909 names_next_round='lzma '
15910 while test -n "$names_next_round"; do
15911 names_this_round="$names_next_round"
15912 names_next_round=
15913 for name in $names_this_round; do
15914 already_handled=
15915 for n in $names_already_handled; do
15916 if test "$n" = "$name"; then
15917 already_handled=yes
15918 break
15919 fi
15920 done
15921 if test -z "$already_handled"; then
15922 names_already_handled="$names_already_handled $name"
15923 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15924 eval value=\"\$HAVE_LIB$uppername\"
15925 if test -n "$value"; then
15926 if test "$value" = yes; then
15927 eval value=\"\$LIB$uppername\"
15928 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15929 eval value=\"\$LTLIB$uppername\"
15930 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15931 else
15932 :
15933 fi
15934 else
15935 found_dir=
15936 found_la=
15937 found_so=
15938 found_a=
15939 if test $use_additional = yes; then
15940 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15941 found_dir="$additional_libdir"
15942 found_so="$additional_libdir/lib$name.$shlibext"
15943 if test -f "$additional_libdir/lib$name.la"; then
15944 found_la="$additional_libdir/lib$name.la"
15945 fi
15946 else
15947 if test -f "$additional_libdir/lib$name.$libext"; then
15948 found_dir="$additional_libdir"
15949 found_a="$additional_libdir/lib$name.$libext"
15950 if test -f "$additional_libdir/lib$name.la"; then
15951 found_la="$additional_libdir/lib$name.la"
15952 fi
15953 fi
15954 fi
15955 fi
15956 if test "X$found_dir" = "X"; then
15957 for x in $LDFLAGS $LTLIBLZMA; do
15958
15959 acl_save_prefix="$prefix"
15960 prefix="$acl_final_prefix"
15961 acl_save_exec_prefix="$exec_prefix"
15962 exec_prefix="$acl_final_exec_prefix"
15963 eval x=\"$x\"
15964 exec_prefix="$acl_save_exec_prefix"
15965 prefix="$acl_save_prefix"
15966
15967 case "$x" in
15968 -L*)
15969 dir=`echo "X$x" | sed -e 's/^X-L//'`
15970 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15971 found_dir="$dir"
15972 found_so="$dir/lib$name.$shlibext"
15973 if test -f "$dir/lib$name.la"; then
15974 found_la="$dir/lib$name.la"
15975 fi
15976 else
15977 if test -f "$dir/lib$name.$libext"; then
15978 found_dir="$dir"
15979 found_a="$dir/lib$name.$libext"
15980 if test -f "$dir/lib$name.la"; then
15981 found_la="$dir/lib$name.la"
15982 fi
15983 fi
15984 fi
15985 ;;
15986 esac
15987 if test "X$found_dir" != "X"; then
15988 break
15989 fi
15990 done
15991 fi
15992 if test "X$found_dir" != "X"; then
15993 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15994 if test "X$found_so" != "X"; then
15995 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15996 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15997 else
15998 haveit=
15999 for x in $ltrpathdirs; do
16000 if test "X$x" = "X$found_dir"; then
16001 haveit=yes
16002 break
16003 fi
16004 done
16005 if test -z "$haveit"; then
16006 ltrpathdirs="$ltrpathdirs $found_dir"
16007 fi
16008 if test "$hardcode_direct" = yes; then
16009 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16010 else
16011 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16012 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16013 haveit=
16014 for x in $rpathdirs; do
16015 if test "X$x" = "X$found_dir"; then
16016 haveit=yes
16017 break
16018 fi
16019 done
16020 if test -z "$haveit"; then
16021 rpathdirs="$rpathdirs $found_dir"
16022 fi
16023 else
16024 haveit=
16025 for x in $LDFLAGS $LIBLZMA; do
16026
16027 acl_save_prefix="$prefix"
16028 prefix="$acl_final_prefix"
16029 acl_save_exec_prefix="$exec_prefix"
16030 exec_prefix="$acl_final_exec_prefix"
16031 eval x=\"$x\"
16032 exec_prefix="$acl_save_exec_prefix"
16033 prefix="$acl_save_prefix"
16034
16035 if test "X$x" = "X-L$found_dir"; then
16036 haveit=yes
16037 break
16038 fi
16039 done
16040 if test -z "$haveit"; then
16041 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16042 fi
16043 if test "$hardcode_minus_L" != no; then
16044 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16045 else
16046 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16047 fi
16048 fi
16049 fi
16050 fi
16051 else
16052 if test "X$found_a" != "X"; then
16053 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16054 else
16055 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16056 fi
16057 fi
16058 additional_includedir=
16059 case "$found_dir" in
16060 */lib | */lib/)
16061 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16062 additional_includedir="$basedir/include"
16063 ;;
16064 esac
16065 if test "X$additional_includedir" != "X"; then
16066 if test "X$additional_includedir" != "X/usr/include"; then
16067 haveit=
16068 if test "X$additional_includedir" = "X/usr/local/include"; then
16069 if test -n "$GCC"; then
16070 case $host_os in
16071 linux*) haveit=yes;;
16072 esac
16073 fi
16074 fi
16075 if test -z "$haveit"; then
16076 for x in $CPPFLAGS $INCLZMA; do
16077
16078 acl_save_prefix="$prefix"
16079 prefix="$acl_final_prefix"
16080 acl_save_exec_prefix="$exec_prefix"
16081 exec_prefix="$acl_final_exec_prefix"
16082 eval x=\"$x\"
16083 exec_prefix="$acl_save_exec_prefix"
16084 prefix="$acl_save_prefix"
16085
16086 if test "X$x" = "X-I$additional_includedir"; then
16087 haveit=yes
16088 break
16089 fi
16090 done
16091 if test -z "$haveit"; then
16092 if test -d "$additional_includedir"; then
16093 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16094 fi
16095 fi
16096 fi
16097 fi
16098 fi
16099 if test -n "$found_la"; then
16100 save_libdir="$libdir"
16101 case "$found_la" in
16102 */* | *\\*) . "$found_la" ;;
16103 *) . "./$found_la" ;;
16104 esac
16105 libdir="$save_libdir"
16106 for dep in $dependency_libs; do
16107 case "$dep" in
16108 -L*)
16109 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16110 if test "X$additional_libdir" != "X/usr/lib"; then
16111 haveit=
16112 if test "X$additional_libdir" = "X/usr/local/lib"; then
16113 if test -n "$GCC"; then
16114 case $host_os in
16115 linux*) haveit=yes;;
16116 esac
16117 fi
16118 fi
16119 if test -z "$haveit"; then
16120 haveit=
16121 for x in $LDFLAGS $LIBLZMA; do
16122
16123 acl_save_prefix="$prefix"
16124 prefix="$acl_final_prefix"
16125 acl_save_exec_prefix="$exec_prefix"
16126 exec_prefix="$acl_final_exec_prefix"
16127 eval x=\"$x\"
16128 exec_prefix="$acl_save_exec_prefix"
16129 prefix="$acl_save_prefix"
16130
16131 if test "X$x" = "X-L$additional_libdir"; then
16132 haveit=yes
16133 break
16134 fi
16135 done
16136 if test -z "$haveit"; then
16137 if test -d "$additional_libdir"; then
16138 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16139 fi
16140 fi
16141 haveit=
16142 for x in $LDFLAGS $LTLIBLZMA; do
16143
16144 acl_save_prefix="$prefix"
16145 prefix="$acl_final_prefix"
16146 acl_save_exec_prefix="$exec_prefix"
16147 exec_prefix="$acl_final_exec_prefix"
16148 eval x=\"$x\"
16149 exec_prefix="$acl_save_exec_prefix"
16150 prefix="$acl_save_prefix"
16151
16152 if test "X$x" = "X-L$additional_libdir"; then
16153 haveit=yes
16154 break
16155 fi
16156 done
16157 if test -z "$haveit"; then
16158 if test -d "$additional_libdir"; then
16159 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16160 fi
16161 fi
16162 fi
16163 fi
16164 ;;
16165 -R*)
16166 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16167 if test "$enable_rpath" != no; then
16168 haveit=
16169 for x in $rpathdirs; do
16170 if test "X$x" = "X$dir"; then
16171 haveit=yes
16172 break
16173 fi
16174 done
16175 if test -z "$haveit"; then
16176 rpathdirs="$rpathdirs $dir"
16177 fi
16178 haveit=
16179 for x in $ltrpathdirs; do
16180 if test "X$x" = "X$dir"; then
16181 haveit=yes
16182 break
16183 fi
16184 done
16185 if test -z "$haveit"; then
16186 ltrpathdirs="$ltrpathdirs $dir"
16187 fi
16188 fi
16189 ;;
16190 -l*)
16191 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16192 ;;
16193 *.la)
16194 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16195 ;;
16196 *)
16197 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16198 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16199 ;;
16200 esac
16201 done
16202 fi
16203 else
16204 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16205 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16206 fi
16207 fi
16208 fi
16209 done
16210 done
16211 if test "X$rpathdirs" != "X"; then
16212 if test -n "$hardcode_libdir_separator"; then
16213 alldirs=
16214 for found_dir in $rpathdirs; do
16215 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16216 done
16217 acl_save_libdir="$libdir"
16218 libdir="$alldirs"
16219 eval flag=\"$hardcode_libdir_flag_spec\"
16220 libdir="$acl_save_libdir"
16221 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16222 else
16223 for found_dir in $rpathdirs; do
16224 acl_save_libdir="$libdir"
16225 libdir="$found_dir"
16226 eval flag=\"$hardcode_libdir_flag_spec\"
16227 libdir="$acl_save_libdir"
16228 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16229 done
16230 fi
16231 fi
16232 if test "X$ltrpathdirs" != "X"; then
16233 for found_dir in $ltrpathdirs; do
16234 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16235 done
16236 fi
16237
16238
16239 ac_save_CPPFLAGS="$CPPFLAGS"
16240
16241 for element in $INCLZMA; do
16242 haveit=
16243 for x in $CPPFLAGS; do
16244
16245 acl_save_prefix="$prefix"
16246 prefix="$acl_final_prefix"
16247 acl_save_exec_prefix="$exec_prefix"
16248 exec_prefix="$acl_final_exec_prefix"
16249 eval x=\"$x\"
16250 exec_prefix="$acl_save_exec_prefix"
16251 prefix="$acl_save_prefix"
16252
16253 if test "X$x" = "X$element"; then
16254 haveit=yes
16255 break
16256 fi
16257 done
16258 if test -z "$haveit"; then
16259 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16260 fi
16261 done
16262
16263
16264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16265$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16266if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16267 $as_echo_n "(cached) " >&6
16268else
16269
16270 ac_save_LIBS="$LIBS"
16271 LIBS="$LIBS $LIBLZMA"
16272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16273/* end confdefs.h. */
16274#include "lzma.h"
16275int
16276main ()
16277{
16278lzma_index_iter iter;
16279 lzma_index_iter_init (&iter, 0);
16280 lzma_mf_is_supported (LZMA_MF_HC3);
16281 ;
16282 return 0;
16283}
16284_ACEOF
16285if ac_fn_c_try_link "$LINENO"; then :
16286 ac_cv_liblzma=yes
16287else
16288 ac_cv_liblzma=no
16289fi
16290rm -f core conftest.err conftest.$ac_objext \
16291 conftest$ac_exeext conftest.$ac_ext
16292 LIBS="$ac_save_LIBS"
16293
16294fi
16295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16296$as_echo "$ac_cv_liblzma" >&6; }
16297 if test "$ac_cv_liblzma" = yes; then
16298 HAVE_LIBLZMA=yes
16299
16300$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16301
16302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16303$as_echo_n "checking how to link with liblzma... " >&6; }
16304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16305$as_echo "$LIBLZMA" >&6; }
16306 else
16307 HAVE_LIBLZMA=no
16308 CPPFLAGS="$ac_save_CPPFLAGS"
16309 LIBLZMA=
16310 LTLIBLZMA=
16311 fi
16312
16313
16314
16315
16316
16317
16318 if test "$HAVE_LIBLZMA" != yes; then
16319 if test "$with_lzma" = yes; then
d0ac1c44 16320 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
16321 fi
16322 fi
16323 fi
16324fi
16325
3fc11d3e
JM
16326LIBGUI="../libgui/src/libgui.a"
16327GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16328
16329
7a292a7a 16330
3fc11d3e
JM
16331WIN32LDAPP=
16332
16333
16334
d91670b9 16335case "${host}" in
686a5eed 16336*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16337 configdir="win"
16338 ;;
16339*)
16340 configdir="unix"
16341 ;;
16342esac
3fc11d3e
JM
16343
16344GDBTKLIBS=
16345if test "${enable_gdbtk}" = "yes"; then
16346
d1c3b63a
KS
16347 # Gdbtk must have an absolute path to srcdir in order to run
16348 # properly when not installed.
16349 here=`pwd`
16350 cd ${srcdir}
16351 GDBTK_SRC_DIR=`pwd`
16352 cd $here
16353
bec39cab 16354
5062cc19
KS
16355 #
16356 # Ok, lets find the tcl configuration
16357 # First, look for one uninstalled.
16358 # the alternative search directory is invoked by --with-tcl
16359 #
3fc11d3e 16360
5062cc19
KS
16361 if test x"${no_tcl}" = x ; then
16362 # we reset no_tcl in case something fails here
16363 no_tcl=true
bec39cab 16364
81ecdfbb
RW
16365# Check whether --with-tcl was given.
16366if test "${with_tcl+set}" = set; then :
16367 withval=$with_tcl; with_tclconfig=${withval}
16368fi
16369
16370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16371$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 16372 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 16373 $as_echo_n "(cached) " >&6
3fc11d3e 16374else
bec39cab 16375
3fc11d3e 16376
5062cc19
KS
16377 # First check to see if --with-tcl was specified.
16378 case "${host}" in
16379 *-*-cygwin*) platDir="win" ;;
16380 *) platDir="unix" ;;
16381 esac
16382 if test x"${with_tclconfig}" != x ; then
16383 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16384 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16385 else
d0ac1c44 16386 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16387 fi
16388 fi
16389
16390 # then check for a private Tcl installation
16391 if test x"${ac_cv_c_tclconfig}" = x ; then
16392 for i in \
16393 ../tcl \
16394 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16395 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16396 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16397 ../../tcl \
16398 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16399 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16400 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16401 ../../../tcl \
16402 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16403 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16404 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16405 if test -f "$i/$platDir/tclConfig.sh" ; then
16406 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16407 break
16408 fi
16409 done
16410 fi
16411
16412 # on Darwin, check in Framework installation locations
16413 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16414 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16415 `ls -d /Library/Frameworks 2>/dev/null` \
16416 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16417 `ls -d /System/Library/Frameworks 2>/dev/null` \
16418 ; do
16419 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16420 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16421 break
16422 fi
16423 done
16424 fi
16425
16426 # check in a few common install locations
16427 if test x"${ac_cv_c_tclconfig}" = x ; then
16428 for i in `ls -d ${libdir} 2>/dev/null` \
16429 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16430 `ls -d ${prefix}/lib 2>/dev/null` \
16431 `ls -d /usr/local/lib 2>/dev/null` \
16432 `ls -d /usr/contrib/lib 2>/dev/null` \
16433 `ls -d /usr/lib 2>/dev/null` \
16434 ; do
16435 if test -f "$i/tclConfig.sh" ; then
16436 ac_cv_c_tclconfig=`(cd $i; pwd)`
16437 break
16438 fi
16439 done
16440 fi
3fc11d3e 16441
5062cc19
KS
16442 # check in a few other private locations
16443 if test x"${ac_cv_c_tclconfig}" = x ; then
16444 for i in \
16445 ${srcdir}/../tcl \
16446 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16447 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16448 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16449 if test -f "$i/$platDir/tclConfig.sh" ; then
16450 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16451 break
16452 fi
16453 done
16454 fi
bec39cab 16455
3fc11d3e
JM
16456fi
16457
5062cc19
KS
16458
16459 if test x"${ac_cv_c_tclconfig}" = x ; then
16460 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16461 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16462$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16463 else
16464 no_tcl=
16465 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16467$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16468 fi
16469 fi
3fc11d3e 16470
bec39cab 16471
85541719
DE
16472 # If $no_tk is nonempty, then we can't do Tk, and there is no
16473 # point to doing Tcl.
bec39cab 16474
5062cc19
KS
16475 #
16476 # Ok, lets find the tk configuration
16477 # First, look for one uninstalled.
16478 # the alternative search directory is invoked by --with-tk
16479 #
3fc11d3e 16480
5062cc19
KS
16481 if test x"${no_tk}" = x ; then
16482 # we reset no_tk in case something fails here
16483 no_tk=true
bec39cab 16484
81ecdfbb
RW
16485# Check whether --with-tk was given.
16486if test "${with_tk+set}" = set; then :
16487 withval=$with_tk; with_tkconfig=${withval}
16488fi
16489
16490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16491$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 16492 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 16493 $as_echo_n "(cached) " >&6
bec39cab 16494else
3fc11d3e
JM
16495
16496
5062cc19
KS
16497 # First check to see if --with-tkconfig was specified.
16498 if test x"${with_tkconfig}" != x ; then
16499 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16500 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16501 else
d0ac1c44 16502 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16503 fi
16504 fi
3fc11d3e 16505
5062cc19
KS
16506 # then check for a private Tk library
16507 case "${host}" in
16508 *-*-cygwin*) platDir="win" ;;
16509 *) platDir="unix" ;;
16510 esac
16511 if test x"${ac_cv_c_tkconfig}" = x ; then
16512 for i in \
16513 ../tk \
16514 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16515 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16516 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16517 ../../tk \
16518 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16519 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16520 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16521 ../../../tk \
16522 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16523 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16524 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16525 if test -f "$i/$platDir/tkConfig.sh" ; then
16526 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16527 break
16528 fi
16529 done
16530 fi
16531
16532 # on Darwin, check in Framework installation locations
16533 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16534 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16535 `ls -d /Library/Frameworks 2>/dev/null` \
16536 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16537 `ls -d /System/Library/Frameworks 2>/dev/null` \
16538 ; do
16539 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16540 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16541 break
16542 fi
16543 done
16544 fi
16545
16546 # check in a few common install locations
16547 if test x"${ac_cv_c_tkconfig}" = x ; then
16548 for i in `ls -d ${libdir} 2>/dev/null` \
16549 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16550 `ls -d ${prefix}/lib 2>/dev/null` \
16551 `ls -d /usr/local/lib 2>/dev/null` \
16552 `ls -d /usr/contrib/lib 2>/dev/null` \
16553 `ls -d /usr/lib 2>/dev/null` \
16554 ; do
16555 if test -f "$i/tkConfig.sh" ; then
16556 ac_cv_c_tkconfig=`(cd $i; pwd)`
16557 break
16558 fi
16559 done
16560 fi
16561 # check in a few other private locations
16562 if test x"${ac_cv_c_tkconfig}" = x ; then
16563 for i in \
16564 ${srcdir}/../tk \
16565 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16566 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16567 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16568 if test -f "$i/$platDir/tkConfig.sh" ; then
16569 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16570 break
16571 fi
16572 done
16573 fi
3fc11d3e 16574
3fc11d3e
JM
16575fi
16576
16577
5062cc19
KS
16578 if test x"${ac_cv_c_tkconfig}" = x ; then
16579 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16580 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16581$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16582 else
16583 no_tk=
16584 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16586$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16587 fi
3fc11d3e 16588 fi
dd2504ab 16589
dd2504ab 16590
85541719
DE
16591 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16592
81ecdfbb
RW
16593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16594$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16595
16596 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16598$as_echo "loading" >&6; }
85541719
DE
16599 . ${TCL_BIN_DIR}/tclConfig.sh
16600 else
81ecdfbb
RW
16601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16602$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16603 fi
16604
16605 # eval is required to do the TCL_DBGX substitution
16606 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16607 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16608
16609 # If the TCL_BIN_DIR is the build directory (not the install directory),
16610 # then set the common variable name to the value of the build variables.
16611 # For example, the variable TCL_LIB_SPEC will be set to the value
16612 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16613 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16614 # installed and uninstalled version of Tcl.
16615 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16616 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16617 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16618 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16619 elif test "`uname -s`" = "Darwin"; then
16620 # If Tcl was built as a framework, attempt to use the libraries
16621 # from the framework at the given location so that linking works
a68ffae9 16622 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16623 case ${TCL_DEFS} in
16624 *TCL_FRAMEWORK*)
16625 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16626 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16627 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16628 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16629 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16630 break
16631 fi
16632 done
16633 fi
16634 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16635 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16636 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16637 fi
16638 ;;
16639 esac
16640 fi
16641
16642 # eval is required to do the TCL_DBGX substitution
16643 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16644 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16645 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16646 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662 # Check for in-tree tcl
16663 here=`pwd`
16664 cd ${srcdir}/..
16665 topdir=`pwd`
16666 cd ${here}
16667
16668 intree="no"
16669 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16670 intree="yes"
16671 fi
16672
16673 # Find Tcl private headers
16674 if test x"${intree}" = xno; then
16675
81ecdfbb
RW
16676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16677$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16678 private_dir=""
16679 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16680 if test -f ${dir}/tclInt.h ; then
16681 private_dir=${dir}
16682 fi
16683
16684 if test x"${private_dir}" = x; then
d0ac1c44 16685 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16686 else
16687 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16689$as_echo "${private_dir}" >&6; }
85541719
DE
16690 fi
16691
16692 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16693 TCL_LIBRARY="${TCL_LIB_SPEC}"
16694 TCL_DEPS=""
16695 else
16696 # If building tcl in the same src tree, private headers
16697 # are not needed, but we need to be sure to use the right
16698 # headers library
16699 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16700 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16701 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16702 fi
16703
16704
16705
16706
16707
81ecdfbb
RW
16708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16709$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16710
5062cc19 16711 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16713$as_echo "loading" >&6; }
5062cc19 16714 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16715 else
81ecdfbb
RW
16716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16717$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16718 fi
bec39cab 16719
5062cc19
KS
16720 # eval is required to do the TK_DBGX substitution
16721 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16722 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16723
16724 # If the TK_BIN_DIR is the build directory (not the install directory),
16725 # then set the common variable name to the value of the build variables.
16726 # For example, the variable TK_LIB_SPEC will be set to the value
16727 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16728 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16729 # installed and uninstalled version of Tcl.
85541719 16730 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16731 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16732 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16733 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16734 elif test "`uname -s`" = "Darwin"; then
16735 # If Tk was built as a framework, attempt to use the libraries
16736 # from the framework at the given location so that linking works
a68ffae9 16737 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16738 case ${TK_DEFS} in
16739 *TK_FRAMEWORK*)
85541719 16740 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16741 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16742 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16743 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16744 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16745 break
16746 fi
16747 done
16748 fi
85541719 16749 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16750 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16751 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16752 fi
16753 ;;
16754 esac
3fc11d3e
JM
16755 fi
16756
5062cc19
KS
16757 # eval is required to do the TK_DBGX substitution
16758 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16759 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16760 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16761 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16762
3fc11d3e
JM
16763
16764
bec39cab
AC
16765
16766
16767
16768
16769
16770
16771
3fc11d3e 16772
3fc11d3e 16773
bec39cab 16774
bec39cab 16775
85541719
DE
16776 # Check for in-tree Tk
16777 intree="no"
16778 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16779 intree="yes"
16780 fi
3fc11d3e 16781
85541719
DE
16782 # Find Tk private headers
16783 if test x"${intree}" = xno; then
3fc11d3e 16784
81ecdfbb
RW
16785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16786$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16787 private_dir=""
16788 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16789 if test -f ${dir}/tkInt.h; then
16790 private_dir=${dir}
3fc11d3e 16791 fi
bec39cab 16792
5062cc19 16793 if test x"${private_dir}" = x; then
d0ac1c44 16794 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16795 else
5062cc19 16796 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16798$as_echo "${private_dir}" >&6; }
3fc11d3e 16799 fi
3fc11d3e 16800
85541719
DE
16801 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16802 TK_LIBRARY=${TK_LIB_SPEC}
16803 TK_DEPS=""
16804 else
16805 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16806 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16807 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16808 fi
3fc11d3e
JM
16809
16810
3fc11d3e
JM
16811
16812
3fc11d3e 16813
85541719 16814 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16815
85541719
DE
16816 # Include some libraries that Tcl and Tk want.
16817 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16818 # Yes, the ordering seems wrong here. But it isn't.
16819 # TK_LIBS is the list of libraries that need to be linked
16820 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16821 # were in LIBS then any link tests after this point would
16822 # try to include things like `$(LIBGUI)', which wouldn't work.
16823 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16824
85541719
DE
16825 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16826 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16827 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16828 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16829 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16830 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16831 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16832
85541719
DE
16833 if test x$gdb_cv_os_cygwin = xyes; then
16834 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16835 WIN32LDAPP="-Wl,--subsystem,console"
16836 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16837 fi
ffc6a242 16838
81ecdfbb 16839 subdirs="$subdirs gdbtk"
3ace7edb 16840
85541719 16841 fi
3fc11d3e
JM
16842fi
16843
16844
16845
16846
16847
16848
16849
16850
81ecdfbb
RW
16851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16852$as_echo_n "checking for X... " >&6; }
bec39cab 16853
c906108c 16854
81ecdfbb
RW
16855# Check whether --with-x was given.
16856if test "${with_x+set}" = set; then :
16857 withval=$with_x;
16858fi
c906108c
SS
16859
16860# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16861if test "x$with_x" = xno; then
16862 # The user explicitly disabled X.
16863 have_x=disabled
16864else
81ecdfbb 16865 case $x_includes,$x_libraries in #(
d0ac1c44
SM
16866 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16867 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 16868 $as_echo_n "(cached) " >&6
c906108c
SS
16869else
16870 # One or both of the vars are not set, and there is no cached value.
bec39cab 16871ac_x_includes=no ac_x_libraries=no
81ecdfbb 16872rm -f -r conftest.dir
bec39cab
AC
16873if mkdir conftest.dir; then
16874 cd conftest.dir
bec39cab 16875 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16876incroot:
16877 @echo incroot='${INCROOT}'
16878usrlibdir:
16879 @echo usrlibdir='${USRLIBDIR}'
16880libdir:
16881 @echo libdir='${LIBDIR}'
16882_ACEOF
16883 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 16884 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
16885 for ac_var in incroot usrlibdir libdir; do
16886 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16887 done
c906108c 16888 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16889 for ac_extension in a so sl dylib la dll; do
16890 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16891 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16892 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16893 fi
16894 done
16895 # Screen out bogus values from the imake configuration. They are
16896 # bogus both because they are the default anyway, and because
16897 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16898 case $ac_im_incroot in
81ecdfbb 16899 /usr/include) ac_x_includes= ;;
bec39cab 16900 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16901 esac
bec39cab 16902 case $ac_im_usrlibdir in
81ecdfbb 16903 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16904 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16905 esac
16906 fi
16907 cd ..
81ecdfbb 16908 rm -f -r conftest.dir
c906108c
SS
16909fi
16910
bec39cab
AC
16911# Standard set of common directories for X headers.
16912# Check X11 before X11Rn because it is often a symlink to the current release.
16913ac_x_header_dirs='
16914/usr/X11/include
81ecdfbb 16915/usr/X11R7/include
bec39cab
AC
16916/usr/X11R6/include
16917/usr/X11R5/include
16918/usr/X11R4/include
16919
16920/usr/include/X11
81ecdfbb 16921/usr/include/X11R7
bec39cab
AC
16922/usr/include/X11R6
16923/usr/include/X11R5
16924/usr/include/X11R4
16925
16926/usr/local/X11/include
81ecdfbb 16927/usr/local/X11R7/include
bec39cab
AC
16928/usr/local/X11R6/include
16929/usr/local/X11R5/include
16930/usr/local/X11R4/include
16931
16932/usr/local/include/X11
81ecdfbb 16933/usr/local/include/X11R7
bec39cab
AC
16934/usr/local/include/X11R6
16935/usr/local/include/X11R5
16936/usr/local/include/X11R4
16937
16938/usr/X386/include
16939/usr/x386/include
16940/usr/XFree86/include/X11
16941
16942/usr/include
16943/usr/local/include
16944/usr/unsupported/include
16945/usr/athena/include
16946/usr/local/x11r5/include
16947/usr/lpp/Xamples/include
16948
16949/usr/openwin/include
16950/usr/openwin/share/include'
16951
16952if test "$ac_x_includes" = no; then
81ecdfbb 16953 # Guess where to find include files, by looking for Xlib.h.
c906108c 16954 # First, try using that file with no special directory specified.
81ecdfbb 16955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16956/* end confdefs.h. */
81ecdfbb 16957#include <X11/Xlib.h>
bec39cab 16958_ACEOF
81ecdfbb 16959if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16960 # We can compile using X headers with no special include directory.
16961ac_x_includes=
16962else
bec39cab 16963 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16964 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16965 ac_x_includes=$ac_dir
16966 break
16967 fi
16968done
c906108c 16969fi
d0ac1c44 16970rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 16971fi # $ac_x_includes = no
c906108c 16972
bec39cab 16973if test "$ac_x_libraries" = no; then
c906108c 16974 # Check for the libraries.
c906108c
SS
16975 # See if we find them without any special options.
16976 # Don't add to $LIBS permanently.
bec39cab 16977 ac_save_LIBS=$LIBS
81ecdfbb
RW
16978 LIBS="-lX11 $LIBS"
16979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16980/* end confdefs.h. */
81ecdfbb 16981#include <X11/Xlib.h>
bec39cab
AC
16982int
16983main ()
16984{
81ecdfbb 16985XrmInitialize ()
bec39cab
AC
16986 ;
16987 return 0;
16988}
16989_ACEOF
81ecdfbb 16990if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16991 LIBS=$ac_save_LIBS
c906108c
SS
16992# We can link X programs with no special library path.
16993ac_x_libraries=
16994else
81ecdfbb
RW
16995 LIBS=$ac_save_LIBS
16996for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16997do
bec39cab 16998 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16999 for ac_extension in a so sl dylib la dll; do
17000 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
17001 ac_x_libraries=$ac_dir
17002 break 2
17003 fi
17004 done
17005done
17006fi
81ecdfbb
RW
17007rm -f core conftest.err conftest.$ac_objext \
17008 conftest$ac_exeext conftest.$ac_ext
bec39cab 17009fi # $ac_x_libraries = no
c906108c 17010
81ecdfbb
RW
17011case $ac_x_includes,$ac_x_libraries in #(
17012 no,* | *,no | *\'*)
17013 # Didn't find X, or a directory has "'" in its name.
17014 ac_cv_have_x="have_x=no";; #(
17015 *)
17016 # Record where we found X for the cache.
17017 ac_cv_have_x="have_x=yes\
17018 ac_x_includes='$ac_x_includes'\
17019 ac_x_libraries='$ac_x_libraries'"
17020esac
c906108c 17021fi
81ecdfbb
RW
17022;; #(
17023 *) have_x=yes;;
17024 esac
c906108c
SS
17025 eval "$ac_cv_have_x"
17026fi # $with_x != no
17027
17028if test "$have_x" != yes; then
81ecdfbb
RW
17029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17030$as_echo "$have_x" >&6; }
c906108c
SS
17031 no_x=yes
17032else
17033 # If each of the values was on the command line, it overrides each guess.
17034 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17035 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17036 # Update the cache value to reflect the command line values.
81ecdfbb
RW
17037 ac_cv_have_x="have_x=yes\
17038 ac_x_includes='$x_includes'\
17039 ac_x_libraries='$x_libraries'"
17040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17041$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
17042fi
17043
17044
bec39cab 17045# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 17046# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
17047# This code just checks for a few cases where we'd like to ignore those
17048# definitions, even when they're present in the '.mt' file. These cases
17049# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 17050# not part of the source tree.
7a292a7a 17051#
81ecdfbb
RW
17052# Check whether --enable-sim was given.
17053if test "${enable_sim+set}" = set; then :
17054 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
17055 echo "enableval = ${enableval}";
17056 case "${enableval}" in
17057 yes) ignore_sim=false ;;
17058 no) ignore_sim=true ;;
17059 *) ignore_sim=false ;;
17060 esac
17061else
17062 ignore_sim=false
81ecdfbb
RW
17063fi
17064
7a292a7a
SS
17065
17066if test ! -d "${srcdir}/../sim"; then
17067 ignore_sim=true
17068fi
17069
9b624dbe
UW
17070SIM=
17071SIM_OBS=
17072if test "${ignore_sim}" = "false"; then
17073 if test x"${gdb_sim}" != x ; then
17074 SIM="${gdb_sim}"
17075 SIM_OBS="remote-sim.o"
60ca704f 17076
81ecdfbb 17077$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17078
976102cd
PA
17079
17080 # Some tdep code should only be compiled in when the ppc sim is
17081 # built. PR sim/13418.
17082 case $target in
17083 powerpc*-*-*)
17084
17085$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17086
17087 ;;
17088 esac
9b624dbe 17089 fi
7a292a7a
SS
17090fi
17091
17092
17093
c906108c
SS
17094
17095
17096
17097
17098
17099
dfcd3bfb 17100
e56ac5c3
AC
17101
17102
b3a90332
AC
17103
17104
c35f4ffc 17105# List of host floatformats.
bec39cab
AC
17106
17107cat >>confdefs.h <<_ACEOF
c35f4ffc 17108#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17109_ACEOF
c35f4ffc 17110
bec39cab
AC
17111
17112cat >>confdefs.h <<_ACEOF
c35f4ffc 17113#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17114_ACEOF
17115
c35f4ffc 17116
bec39cab 17117cat >>confdefs.h <<_ACEOF
c35f4ffc 17118#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17119_ACEOF
c35f4ffc
AC
17120
17121
c906108c
SS
17122# target_subdir is used by the testsuite to find the target libraries.
17123target_subdir=
17124if test "${host}" != "${target}"; then
17125 target_subdir="${target_alias}/"
17126fi
17127
17128
21ea5acd 17129# Import nat definitions.
2b351b19 17130nat_makefile_frag=/dev/null
771b4502 17131if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17132 . ${srcdir}/configure.nat
17133 nativefile=$NAT_FILE
c906108c 17134fi
c906108c 17135
c906108c
SS
17136
17137
17138
21ea5acd
SDJ
17139
17140
17141
17142
17143
c906108c
SS
17144
17145
b00a8037 17146if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17147
17148cat >>confdefs.h <<_ACEOF
b00a8037 17149#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17150_ACEOF
b00a8037
DJ
17151
17152fi
17153
496c0e1b
JB
17154# Check whether --enable-gdbserver was given.
17155if test "${enable_gdbserver+set}" = set; then :
17156 enableval=$enable_gdbserver; case "${enableval}" in
17157 yes| no|auto) ;;
d0ac1c44 17158 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17159esac
17160else
17161 enable_gdbserver=auto
17162fi
17163
17164
17165# We only build gdbserver automatically in a native configuration, and
17166# only if the user did not explicitly disable its build.
17167if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17169$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17170 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17172$as_echo "yes" >&6; }
17173 subdirs="$subdirs gdbserver"
3ace7edb 17174
496c0e1b 17175 gdbserver_build_enabled=yes
8dcde887 17176 else
81ecdfbb
RW
17177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17178$as_echo "no" >&6; }
8dcde887
MK
17179 fi
17180fi
17181
496c0e1b
JB
17182# If the user explicitly request the gdbserver to be built, verify that
17183# we were in fact able to enable it.
17184if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17185 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17186fi
17187
393fd4c3
YQ
17188# Check for babeltrace and babeltrace-ctf
17189
17190# Check whether --with-babeltrace was given.
17191if test "${with_babeltrace+set}" = set; then :
17192 withval=$with_babeltrace;
17193else
17194 with_babeltrace=auto
17195fi
17196
17197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17198$as_echo_n "checking whether to use babeltrace... " >&6; }
17199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17200$as_echo "$with_babeltrace" >&6; }
17201
17202if test "x$with_babeltrace" = "xno"; then
17203 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17204$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17205else
17206 # Append -Werror to CFLAGS so that configure can catch the warning
17207 # "assignment from incompatible pointer type", which is related to
17208 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17209 # in GDB, while babeltrace 1.0.3 is broken.
17210 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17211 # safe to save and restore CFLAGS here.
17212 saved_CFLAGS=$CFLAGS
17213 CFLAGS="$CFLAGS -Werror"
17214
17215
17216
17217
17218
17219
17220
17221
17222 use_additional=yes
17223
17224 acl_save_prefix="$prefix"
17225 prefix="$acl_final_prefix"
17226 acl_save_exec_prefix="$exec_prefix"
17227 exec_prefix="$acl_final_exec_prefix"
17228
17229 eval additional_includedir=\"$includedir\"
17230 eval additional_libdir=\"$libdir\"
17231
17232 exec_prefix="$acl_save_exec_prefix"
17233 prefix="$acl_save_prefix"
17234
17235
17236# Check whether --with-libbabeltrace-prefix was given.
17237if test "${with_libbabeltrace_prefix+set}" = set; then :
17238 withval=$with_libbabeltrace_prefix;
17239 if test "X$withval" = "Xno"; then
17240 use_additional=no
17241 else
17242 if test "X$withval" = "X"; then
17243
17244 acl_save_prefix="$prefix"
17245 prefix="$acl_final_prefix"
17246 acl_save_exec_prefix="$exec_prefix"
17247 exec_prefix="$acl_final_exec_prefix"
17248
17249 eval additional_includedir=\"$includedir\"
17250 eval additional_libdir=\"$libdir\"
17251
17252 exec_prefix="$acl_save_exec_prefix"
17253 prefix="$acl_save_prefix"
17254
17255 else
17256 additional_includedir="$withval/include"
17257 additional_libdir="$withval/lib"
17258 fi
17259 fi
17260
17261fi
17262
17263 LIBBABELTRACE=
17264 LTLIBBABELTRACE=
17265 INCBABELTRACE=
17266 rpathdirs=
17267 ltrpathdirs=
17268 names_already_handled=
17269 names_next_round='babeltrace babeltrace-ctf'
17270 while test -n "$names_next_round"; do
17271 names_this_round="$names_next_round"
17272 names_next_round=
17273 for name in $names_this_round; do
17274 already_handled=
17275 for n in $names_already_handled; do
17276 if test "$n" = "$name"; then
17277 already_handled=yes
17278 break
17279 fi
17280 done
17281 if test -z "$already_handled"; then
17282 names_already_handled="$names_already_handled $name"
17283 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17284 eval value=\"\$HAVE_LIB$uppername\"
17285 if test -n "$value"; then
17286 if test "$value" = yes; then
17287 eval value=\"\$LIB$uppername\"
17288 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17289 eval value=\"\$LTLIB$uppername\"
17290 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17291 else
17292 :
17293 fi
17294 else
17295 found_dir=
17296 found_la=
17297 found_so=
17298 found_a=
17299 if test $use_additional = yes; then
17300 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17301 found_dir="$additional_libdir"
17302 found_so="$additional_libdir/lib$name.$shlibext"
17303 if test -f "$additional_libdir/lib$name.la"; then
17304 found_la="$additional_libdir/lib$name.la"
17305 fi
17306 else
17307 if test -f "$additional_libdir/lib$name.$libext"; then
17308 found_dir="$additional_libdir"
17309 found_a="$additional_libdir/lib$name.$libext"
17310 if test -f "$additional_libdir/lib$name.la"; then
17311 found_la="$additional_libdir/lib$name.la"
17312 fi
17313 fi
17314 fi
17315 fi
17316 if test "X$found_dir" = "X"; then
17317 for x in $LDFLAGS $LTLIBBABELTRACE; do
17318
17319 acl_save_prefix="$prefix"
17320 prefix="$acl_final_prefix"
17321 acl_save_exec_prefix="$exec_prefix"
17322 exec_prefix="$acl_final_exec_prefix"
17323 eval x=\"$x\"
17324 exec_prefix="$acl_save_exec_prefix"
17325 prefix="$acl_save_prefix"
17326
17327 case "$x" in
17328 -L*)
17329 dir=`echo "X$x" | sed -e 's/^X-L//'`
17330 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17331 found_dir="$dir"
17332 found_so="$dir/lib$name.$shlibext"
17333 if test -f "$dir/lib$name.la"; then
17334 found_la="$dir/lib$name.la"
17335 fi
17336 else
17337 if test -f "$dir/lib$name.$libext"; then
17338 found_dir="$dir"
17339 found_a="$dir/lib$name.$libext"
17340 if test -f "$dir/lib$name.la"; then
17341 found_la="$dir/lib$name.la"
17342 fi
17343 fi
17344 fi
17345 ;;
17346 esac
17347 if test "X$found_dir" != "X"; then
17348 break
17349 fi
17350 done
17351 fi
17352 if test "X$found_dir" != "X"; then
17353 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17354 if test "X$found_so" != "X"; then
17355 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17356 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17357 else
17358 haveit=
17359 for x in $ltrpathdirs; do
17360 if test "X$x" = "X$found_dir"; then
17361 haveit=yes
17362 break
17363 fi
17364 done
17365 if test -z "$haveit"; then
17366 ltrpathdirs="$ltrpathdirs $found_dir"
17367 fi
17368 if test "$hardcode_direct" = yes; then
17369 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17370 else
17371 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17372 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17373 haveit=
17374 for x in $rpathdirs; do
17375 if test "X$x" = "X$found_dir"; then
17376 haveit=yes
17377 break
17378 fi
17379 done
17380 if test -z "$haveit"; then
17381 rpathdirs="$rpathdirs $found_dir"
17382 fi
17383 else
17384 haveit=
17385 for x in $LDFLAGS $LIBBABELTRACE; do
17386
17387 acl_save_prefix="$prefix"
17388 prefix="$acl_final_prefix"
17389 acl_save_exec_prefix="$exec_prefix"
17390 exec_prefix="$acl_final_exec_prefix"
17391 eval x=\"$x\"
17392 exec_prefix="$acl_save_exec_prefix"
17393 prefix="$acl_save_prefix"
17394
17395 if test "X$x" = "X-L$found_dir"; then
17396 haveit=yes
17397 break
17398 fi
17399 done
17400 if test -z "$haveit"; then
17401 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17402 fi
17403 if test "$hardcode_minus_L" != no; then
17404 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17405 else
17406 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17407 fi
17408 fi
17409 fi
17410 fi
17411 else
17412 if test "X$found_a" != "X"; then
17413 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17414 else
17415 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17416 fi
17417 fi
17418 additional_includedir=
17419 case "$found_dir" in
17420 */lib | */lib/)
17421 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17422 additional_includedir="$basedir/include"
17423 ;;
17424 esac
17425 if test "X$additional_includedir" != "X"; then
17426 if test "X$additional_includedir" != "X/usr/include"; then
17427 haveit=
17428 if test "X$additional_includedir" = "X/usr/local/include"; then
17429 if test -n "$GCC"; then
17430 case $host_os in
17431 linux*) haveit=yes;;
17432 esac
17433 fi
17434 fi
17435 if test -z "$haveit"; then
17436 for x in $CPPFLAGS $INCBABELTRACE; do
17437
17438 acl_save_prefix="$prefix"
17439 prefix="$acl_final_prefix"
17440 acl_save_exec_prefix="$exec_prefix"
17441 exec_prefix="$acl_final_exec_prefix"
17442 eval x=\"$x\"
17443 exec_prefix="$acl_save_exec_prefix"
17444 prefix="$acl_save_prefix"
17445
17446 if test "X$x" = "X-I$additional_includedir"; then
17447 haveit=yes
17448 break
17449 fi
17450 done
17451 if test -z "$haveit"; then
17452 if test -d "$additional_includedir"; then
17453 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17454 fi
17455 fi
17456 fi
17457 fi
17458 fi
17459 if test -n "$found_la"; then
17460 save_libdir="$libdir"
17461 case "$found_la" in
17462 */* | *\\*) . "$found_la" ;;
17463 *) . "./$found_la" ;;
17464 esac
17465 libdir="$save_libdir"
17466 for dep in $dependency_libs; do
17467 case "$dep" in
17468 -L*)
17469 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17470 if test "X$additional_libdir" != "X/usr/lib"; then
17471 haveit=
17472 if test "X$additional_libdir" = "X/usr/local/lib"; then
17473 if test -n "$GCC"; then
17474 case $host_os in
17475 linux*) haveit=yes;;
17476 esac
17477 fi
17478 fi
17479 if test -z "$haveit"; then
17480 haveit=
17481 for x in $LDFLAGS $LIBBABELTRACE; do
17482
17483 acl_save_prefix="$prefix"
17484 prefix="$acl_final_prefix"
17485 acl_save_exec_prefix="$exec_prefix"
17486 exec_prefix="$acl_final_exec_prefix"
17487 eval x=\"$x\"
17488 exec_prefix="$acl_save_exec_prefix"
17489 prefix="$acl_save_prefix"
17490
17491 if test "X$x" = "X-L$additional_libdir"; then
17492 haveit=yes
17493 break
17494 fi
17495 done
17496 if test -z "$haveit"; then
17497 if test -d "$additional_libdir"; then
17498 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17499 fi
17500 fi
17501 haveit=
17502 for x in $LDFLAGS $LTLIBBABELTRACE; do
17503
17504 acl_save_prefix="$prefix"
17505 prefix="$acl_final_prefix"
17506 acl_save_exec_prefix="$exec_prefix"
17507 exec_prefix="$acl_final_exec_prefix"
17508 eval x=\"$x\"
17509 exec_prefix="$acl_save_exec_prefix"
17510 prefix="$acl_save_prefix"
17511
17512 if test "X$x" = "X-L$additional_libdir"; then
17513 haveit=yes
17514 break
17515 fi
17516 done
17517 if test -z "$haveit"; then
17518 if test -d "$additional_libdir"; then
17519 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17520 fi
17521 fi
17522 fi
17523 fi
17524 ;;
17525 -R*)
17526 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17527 if test "$enable_rpath" != no; then
17528 haveit=
17529 for x in $rpathdirs; do
17530 if test "X$x" = "X$dir"; then
17531 haveit=yes
17532 break
17533 fi
17534 done
17535 if test -z "$haveit"; then
17536 rpathdirs="$rpathdirs $dir"
17537 fi
17538 haveit=
17539 for x in $ltrpathdirs; do
17540 if test "X$x" = "X$dir"; then
17541 haveit=yes
17542 break
17543 fi
17544 done
17545 if test -z "$haveit"; then
17546 ltrpathdirs="$ltrpathdirs $dir"
17547 fi
17548 fi
17549 ;;
17550 -l*)
17551 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17552 ;;
17553 *.la)
17554 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17555 ;;
17556 *)
17557 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17558 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17559 ;;
17560 esac
17561 done
17562 fi
17563 else
17564 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17565 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17566 fi
17567 fi
17568 fi
17569 done
17570 done
17571 if test "X$rpathdirs" != "X"; then
17572 if test -n "$hardcode_libdir_separator"; then
17573 alldirs=
17574 for found_dir in $rpathdirs; do
17575 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17576 done
17577 acl_save_libdir="$libdir"
17578 libdir="$alldirs"
17579 eval flag=\"$hardcode_libdir_flag_spec\"
17580 libdir="$acl_save_libdir"
17581 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17582 else
17583 for found_dir in $rpathdirs; do
17584 acl_save_libdir="$libdir"
17585 libdir="$found_dir"
17586 eval flag=\"$hardcode_libdir_flag_spec\"
17587 libdir="$acl_save_libdir"
17588 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17589 done
17590 fi
17591 fi
17592 if test "X$ltrpathdirs" != "X"; then
17593 for found_dir in $ltrpathdirs; do
17594 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17595 done
17596 fi
17597
17598
17599 ac_save_CPPFLAGS="$CPPFLAGS"
17600
17601 for element in $INCBABELTRACE; do
17602 haveit=
17603 for x in $CPPFLAGS; do
17604
17605 acl_save_prefix="$prefix"
17606 prefix="$acl_final_prefix"
17607 acl_save_exec_prefix="$exec_prefix"
17608 exec_prefix="$acl_final_exec_prefix"
17609 eval x=\"$x\"
17610 exec_prefix="$acl_save_exec_prefix"
17611 prefix="$acl_save_prefix"
17612
17613 if test "X$x" = "X$element"; then
17614 haveit=yes
17615 break
17616 fi
17617 done
17618 if test -z "$haveit"; then
17619 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17620 fi
17621 done
17622
17623
17624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17625$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 17626if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
17627 $as_echo_n "(cached) " >&6
17628else
17629
17630 ac_save_LIBS="$LIBS"
17631 LIBS="$LIBS $LIBBABELTRACE"
17632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17633/* end confdefs.h. */
17634#include <babeltrace/babeltrace.h>
17635 #include <babeltrace/ctf/events.h>
17636 #include <babeltrace/ctf/iterator.h>
17637int
17638main ()
17639{
17640struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17641 struct bt_ctf_event *event = NULL;
17642 const struct bt_definition *scope;
17643
13cdc2af 17644 pos->type = BT_SEEK_BEGIN;
65c749e7 17645 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17646 scope = bt_ctf_get_top_level_scope (event,
17647 BT_STREAM_EVENT_HEADER);
17648 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17649
17650 ;
17651 return 0;
17652}
17653_ACEOF
17654if ac_fn_c_try_link "$LINENO"; then :
17655 ac_cv_libbabeltrace=yes
17656else
17657 ac_cv_libbabeltrace=no
17658fi
17659rm -f core conftest.err conftest.$ac_objext \
17660 conftest$ac_exeext conftest.$ac_ext
17661 LIBS="$ac_save_LIBS"
17662
17663fi
17664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17665$as_echo "$ac_cv_libbabeltrace" >&6; }
17666 if test "$ac_cv_libbabeltrace" = yes; then
17667 HAVE_LIBBABELTRACE=yes
17668
17669$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17670
17671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17672$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17674$as_echo "$LIBBABELTRACE" >&6; }
17675 else
17676 HAVE_LIBBABELTRACE=no
17677 CPPFLAGS="$ac_save_CPPFLAGS"
17678 LIBBABELTRACE=
17679 LTLIBBABELTRACE=
17680 fi
17681
17682
17683
17684
17685
17686
17687 CFLAGS=$saved_CFLAGS
17688
17689 if test "$HAVE_LIBBABELTRACE" != yes; then
17690 if test "$with_babeltrace" = yes; then
d0ac1c44 17691 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
17692 else
17693 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17694$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17695 fi
17696 fi
17697fi
17698
21ea5acd
SDJ
17699# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17700# empty version.
c906108c
SS
17701
17702files=
17703links=
5a2402b8 17704
c906108c
SS
17705rm -f nm.h
17706if test "${nativefile}" != ""; then
0f475e27
AC
17707 case "${nativefile}" in
17708 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17709 * ) GDB_NM_FILE="${nativefile}"
17710 esac
5a2402b8
AC
17711 files="${files} ${GDB_NM_FILE}"
17712 links="${links} nm.h"
60ca704f
SE
17713
17714cat >>confdefs.h <<_ACEOF
b78960be 17715#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17716_ACEOF
5a2402b8 17717
c906108c 17718fi
5a2402b8
AC
17719
17720
e3487908
GKB
17721for ac_prog in xsltproc
17722do
17723 # Extract the first word of "$ac_prog", so it can be a program name with args.
17724set dummy $ac_prog; ac_word=$2
17725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17726$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 17727if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
17728 $as_echo_n "(cached) " >&6
17729else
17730 case $XSLTPROC in
17731 [\\/]* | ?:[\\/]*)
17732 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17733 ;;
17734 *)
17735 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17736for as_dir in $PATH
17737do
17738 IFS=$as_save_IFS
17739 test -z "$as_dir" && as_dir=.
17740 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 17741 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
17742 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17744 break 2
17745 fi
17746done
17747 done
17748IFS=$as_save_IFS
17749
17750 ;;
17751esac
17752fi
17753XSLTPROC=$ac_cv_path_XSLTPROC
17754if test -n "$XSLTPROC"; then
17755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17756$as_echo "$XSLTPROC" >&6; }
17757else
17758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17759$as_echo "no" >&6; }
17760fi
17761
17762
17763 test -n "$XSLTPROC" && break
17764done
17765test -n "$XSLTPROC" || XSLTPROC="missing"
17766
17767if test "x$USE_MAINTAINER_MODE" = xyes; then
17768 if test "${XSLTPROC}" = missing; then
d0ac1c44 17769 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
17770 fi
17771fi
17772
17773
bec39cab
AC
17774ac_sources="$files"
17775ac_dests="$links"
17776while test -n "$ac_sources"; do
17777 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17778 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17779 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17780done
81ecdfbb 17781ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17782
17783
c906108c
SS
17784
17785
c906108c 17786
81ecdfbb 17787$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17788
bec39cab 17789
8ecfd7bd
SDJ
17790
17791# Check whether we will enable the inclusion of unit tests when
17792# compiling GDB.
17793#
17794# The default value of this option changes depending whether we're on
17795# development mode (in which case it's "true") or not (in which case
17796# it's "false").
17797# Check whether --enable-unit-tests was given.
17798if test "${enable_unit_tests+set}" = set; then :
17799 enableval=$enable_unit_tests; case "${enableval}" in
17800 yes) enable_unittests=true ;;
17801 no) enable_unittests=false ;;
17802 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
17803esac
17804else
17805 enable_unittests=$development
17806fi
17807
17808
17809if $enable_unittests; then
dcd1f979
TT
17810
17811$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17812
8ecfd7bd 17813
b5884fa7 17814 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o"
1e5ded6c 17815 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c"
8ecfd7bd 17816
dcd1f979
TT
17817fi
17818
b292c783 17819
8ecfd7bd 17820
f6a88844
JM
17821 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17822 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17823 if test "x$GDB_TRANSFORM_NAME" = x; then
17824 GDB_TRANSFORM_NAME=gdb
17825 fi
17826
17827
17828
17829 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17830 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17831 if test "x$GCORE_TRANSFORM_NAME" = x; then
17832 GCORE_TRANSFORM_NAME=gcore
17833 fi
17834
b292c783
JK
17835
17836ac_config_files="$ac_config_files gcore"
17837
141ec9f6 17838ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 17839
89a34d1b 17840
bec39cab
AC
17841cat >confcache <<\_ACEOF
17842# This file is a shell script that caches the results of configure
17843# tests run on this system so they can be shared between configure
17844# scripts and configure runs, see configure's option --config-cache.
17845# It is not useful on other systems. If it contains results you don't
17846# want to keep, you may remove or edit it.
17847#
17848# config.status only pays attention to the cache file if you give it
17849# the --recheck option to rerun configure.
17850#
17851# `ac_cv_env_foo' variables (set or unset) will be overridden when
17852# loading this file, other *unset* `ac_cv_foo' will be assigned the
17853# following values.
17854
17855_ACEOF
17856
17857# The following way of writing the cache mishandles newlines in values,
17858# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17859# So, we kill variables containing newlines.
bec39cab
AC
17860# Ultrix sh set writes to stderr and can't be redirected directly,
17861# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17862(
17863 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17864 eval ac_val=\$$ac_var
17865 case $ac_val in #(
17866 *${as_nl}*)
17867 case $ac_var in #(
17868 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17869$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17870 esac
17871 case $ac_var in #(
17872 _ | IFS | as_nl) ;; #(
17873 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17874 *) { eval $ac_var=; unset $ac_var;} ;;
17875 esac ;;
17876 esac
17877 done
17878
bec39cab 17879 (set) 2>&1 |
81ecdfbb
RW
17880 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17881 *${as_nl}ac_space=\ *)
17882 # `set' does not quote correctly, so add quotes: double-quote
17883 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17884 sed -n \
17885 "s/'/'\\\\''/g;
17886 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17887 ;; #(
bec39cab
AC
17888 *)
17889 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17890 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17891 ;;
81ecdfbb
RW
17892 esac |
17893 sort
17894) |
bec39cab 17895 sed '
81ecdfbb 17896 /^ac_cv_env_/b end
bec39cab 17897 t clear
81ecdfbb 17898 :clear
bec39cab
AC
17899 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17900 t end
81ecdfbb
RW
17901 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17902 :end' >>confcache
17903if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17904 if test -w "$cache_file"; then
d0ac1c44 17905 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
17906 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17907$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
17908 if test ! -f "$cache_file" || test -h "$cache_file"; then
17909 cat confcache >"$cache_file"
17910 else
17911 case $cache_file in #(
17912 */* | ?:*)
17913 mv -f confcache "$cache_file"$$ &&
17914 mv -f "$cache_file"$$ "$cache_file" ;; #(
17915 *)
17916 mv -f confcache "$cache_file" ;;
17917 esac
17918 fi
17919 fi
bec39cab 17920 else
81ecdfbb
RW
17921 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17922$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17923 fi
17924fi
17925rm -f confcache
17926
17927test "x$prefix" = xNONE && prefix=$ac_default_prefix
17928# Let make expand exec_prefix.
17929test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17930
bec39cab
AC
17931DEFS=-DHAVE_CONFIG_H
17932
17933ac_libobjs=
17934ac_ltlibobjs=
d0ac1c44 17935U=
bec39cab
AC
17936for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17937 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17938 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17939 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17940 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17941 # will be set to the directory where LIBOBJS objects are built.
17942 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17943 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17944done
17945LIBOBJS=$ac_libobjs
17946
17947LTLIBOBJS=$ac_ltlibobjs
17948
17949
85981d60 17950if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 17951 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 17952Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17953fi
4df42755 17954if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 17955 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
17956Usually this means the macro was only invoked conditionally." "$LINENO" 5
17957fi
17958if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 17959 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
17960Usually this means the macro was only invoked conditionally." "$LINENO" 5
17961fi
81ecdfbb
RW
17962
17963
d0ac1c44 17964: "${CONFIG_STATUS=./config.status}"
81ecdfbb 17965ac_write_fail=0
bec39cab
AC
17966ac_clean_files_save=$ac_clean_files
17967ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17968{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17969$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17970as_write_fail=0
17971cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17972#! $SHELL
17973# Generated by $as_me.
17974# Run this file to recreate the current configuration.
17975# Compiler output produced by configure, useful for debugging
17976# configure, is in config.log if it exists.
17977
17978debug=false
17979ac_cs_recheck=false
17980ac_cs_silent=false
bec39cab 17981
81ecdfbb
RW
17982SHELL=\${CONFIG_SHELL-$SHELL}
17983export SHELL
17984_ASEOF
17985cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17986## -------------------- ##
17987## M4sh Initialization. ##
17988## -------------------- ##
17989
17990# Be more Bourne compatible
17991DUALCASE=1; export DUALCASE # for MKS sh
17992if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17993 emulate sh
17994 NULLCMD=:
81ecdfbb 17995 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17996 # is contrary to our usage. Disable this feature.
17997 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17998 setopt NO_GLOB_SUBST
17999else
18000 case `(set -o) 2>/dev/null` in #(
18001 *posix*) :
18002 set -o posix ;; #(
18003 *) :
18004 ;;
18005esac
bec39cab 18006fi
bec39cab 18007
81ecdfbb
RW
18008
18009as_nl='
18010'
18011export as_nl
18012# Printing a long string crashes Solaris 7 /usr/bin/printf.
18013as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18014as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18015as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18016# Prefer a ksh shell builtin over an external printf program on Solaris,
18017# but without wasting forks for bash or zsh.
18018if test -z "$BASH_VERSION$ZSH_VERSION" \
18019 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18020 as_echo='print -r --'
18021 as_echo_n='print -rn --'
18022elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18023 as_echo='printf %s\n'
18024 as_echo_n='printf %s'
18025else
18026 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18027 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18028 as_echo_n='/usr/ucb/echo -n'
18029 else
18030 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18031 as_echo_n_body='eval
18032 arg=$1;
18033 case $arg in #(
18034 *"$as_nl"*)
18035 expr "X$arg" : "X\\(.*\\)$as_nl";
18036 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18037 esac;
18038 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18039 '
18040 export as_echo_n_body
18041 as_echo_n='sh -c $as_echo_n_body as_echo'
18042 fi
18043 export as_echo_body
18044 as_echo='sh -c $as_echo_body as_echo'
18045fi
18046
18047# The user is always right.
18048if test "${PATH_SEPARATOR+set}" != set; then
18049 PATH_SEPARATOR=:
18050 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18051 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18052 PATH_SEPARATOR=';'
18053 }
bec39cab
AC
18054fi
18055
18056
81ecdfbb
RW
18057# IFS
18058# We need space, tab and new line, in precisely that order. Quoting is
18059# there to prevent editors from complaining about space-tab.
18060# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18061# splitting by setting IFS to empty value.)
18062IFS=" "" $as_nl"
18063
18064# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 18065as_myself=
81ecdfbb
RW
18066case $0 in #((
18067 *[\\/]* ) as_myself=$0 ;;
18068 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18069for as_dir in $PATH
18070do
18071 IFS=$as_save_IFS
18072 test -z "$as_dir" && as_dir=.
18073 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18074 done
18075IFS=$as_save_IFS
18076
18077 ;;
18078esac
18079# We did not find ourselves, most probably we were run as `sh COMMAND'
18080# in which case we are not to be found in the path.
18081if test "x$as_myself" = x; then
18082 as_myself=$0
18083fi
18084if test ! -f "$as_myself"; then
18085 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18086 exit 1
18087fi
18088
18089# Unset variables that we do not need and which cause bugs (e.g. in
18090# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18091# suppresses any "Segmentation fault" message there. '((' could
18092# trigger a bug in pdksh 5.2.14.
18093for as_var in BASH_ENV ENV MAIL MAILPATH
18094do eval test x\${$as_var+set} = xset \
18095 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18096done
bec39cab
AC
18097PS1='$ '
18098PS2='> '
18099PS4='+ '
18100
18101# NLS nuisances.
81ecdfbb
RW
18102LC_ALL=C
18103export LC_ALL
18104LANGUAGE=C
18105export LANGUAGE
18106
18107# CDPATH.
18108(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18109
18110
d0ac1c44
SM
18111# as_fn_error STATUS ERROR [LINENO LOG_FD]
18112# ----------------------------------------
81ecdfbb
RW
18113# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18114# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 18115# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
18116as_fn_error ()
18117{
d0ac1c44
SM
18118 as_status=$1; test $as_status -eq 0 && as_status=1
18119 if test "$4"; then
18120 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18121 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 18122 fi
d0ac1c44 18123 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
18124 as_fn_exit $as_status
18125} # as_fn_error
18126
18127
18128# as_fn_set_status STATUS
18129# -----------------------
18130# Set $? to STATUS, without forking.
18131as_fn_set_status ()
18132{
18133 return $1
18134} # as_fn_set_status
18135
18136# as_fn_exit STATUS
18137# -----------------
18138# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18139as_fn_exit ()
18140{
18141 set +e
18142 as_fn_set_status $1
18143 exit $1
18144} # as_fn_exit
18145
18146# as_fn_unset VAR
18147# ---------------
18148# Portably unset VAR.
18149as_fn_unset ()
18150{
18151 { eval $1=; unset $1;}
18152}
18153as_unset=as_fn_unset
18154# as_fn_append VAR VALUE
18155# ----------------------
18156# Append the text in VALUE to the end of the definition contained in VAR. Take
18157# advantage of any shell optimizations that allow amortized linear growth over
18158# repeated appends, instead of the typical quadratic growth present in naive
18159# implementations.
18160if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18161 eval 'as_fn_append ()
18162 {
18163 eval $1+=\$2
18164 }'
18165else
18166 as_fn_append ()
18167 {
18168 eval $1=\$$1\$2
18169 }
18170fi # as_fn_append
18171
18172# as_fn_arith ARG...
18173# ------------------
18174# Perform arithmetic evaluation on the ARGs, and store the result in the
18175# global $as_val. Take advantage of shells that can avoid forks. The arguments
18176# must be portable across $(()) and expr.
18177if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18178 eval 'as_fn_arith ()
18179 {
18180 as_val=$(( $* ))
18181 }'
18182else
18183 as_fn_arith ()
18184 {
18185 as_val=`expr "$@" || test $? -eq 1`
18186 }
18187fi # as_fn_arith
bec39cab 18188
81ecdfbb
RW
18189
18190if expr a : '\(a\)' >/dev/null 2>&1 &&
18191 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18192 as_expr=expr
18193else
18194 as_expr=false
18195fi
18196
81ecdfbb 18197if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18198 as_basename=basename
18199else
18200 as_basename=false
18201fi
18202
81ecdfbb
RW
18203if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18204 as_dirname=dirname
18205else
18206 as_dirname=false
18207fi
bec39cab 18208
81ecdfbb 18209as_me=`$as_basename -- "$0" ||
bec39cab
AC
18210$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18211 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18212 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18213$as_echo X/"$0" |
18214 sed '/^.*\/\([^/][^/]*\)\/*$/{
18215 s//\1/
18216 q
18217 }
18218 /^X\/\(\/\/\)$/{
18219 s//\1/
18220 q
18221 }
18222 /^X\/\(\/\).*/{
18223 s//\1/
18224 q
18225 }
18226 s/.*/./; q'`
b4e70030 18227
b4e70030
JB
18228# Avoid depending upon Character Ranges.
18229as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18230as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18231as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18232as_cr_digits='0123456789'
18233as_cr_alnum=$as_cr_Letters$as_cr_digits
18234
81ecdfbb
RW
18235ECHO_C= ECHO_N= ECHO_T=
18236case `echo -n x` in #(((((
18237-n*)
18238 case `echo 'xy\c'` in
18239 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18240 xy) ECHO_C='\c';;
18241 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18242 ECHO_T=' ';;
18243 esac;;
18244*)
18245 ECHO_N='-n';;
bec39cab
AC
18246esac
18247
81ecdfbb
RW
18248rm -f conf$$ conf$$.exe conf$$.file
18249if test -d conf$$.dir; then
18250 rm -f conf$$.dir/conf$$.file
bec39cab 18251else
81ecdfbb
RW
18252 rm -f conf$$.dir
18253 mkdir conf$$.dir 2>/dev/null
bec39cab 18254fi
81ecdfbb
RW
18255if (echo >conf$$.file) 2>/dev/null; then
18256 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18257 as_ln_s='ln -s'
81ecdfbb
RW
18258 # ... but there are two gotchas:
18259 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18260 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 18261 # In both cases, we have to default to `cp -pR'.
81ecdfbb 18262 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 18263 as_ln_s='cp -pR'
81ecdfbb
RW
18264 elif ln conf$$.file conf$$ 2>/dev/null; then
18265 as_ln_s=ln
18266 else
d0ac1c44 18267 as_ln_s='cp -pR'
b4e70030 18268 fi
bec39cab 18269else
d0ac1c44 18270 as_ln_s='cp -pR'
bec39cab 18271fi
81ecdfbb
RW
18272rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18273rmdir conf$$.dir 2>/dev/null
18274
18275
18276# as_fn_mkdir_p
18277# -------------
18278# Create "$as_dir" as a directory, including parents if necessary.
18279as_fn_mkdir_p ()
18280{
18281
18282 case $as_dir in #(
18283 -*) as_dir=./$as_dir;;
18284 esac
18285 test -d "$as_dir" || eval $as_mkdir_p || {
18286 as_dirs=
18287 while :; do
18288 case $as_dir in #(
18289 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18290 *) as_qdir=$as_dir;;
18291 esac
18292 as_dirs="'$as_qdir' $as_dirs"
18293 as_dir=`$as_dirname -- "$as_dir" ||
18294$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18295 X"$as_dir" : 'X\(//\)[^/]' \| \
18296 X"$as_dir" : 'X\(//\)$' \| \
18297 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18298$as_echo X"$as_dir" |
18299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18300 s//\1/
18301 q
18302 }
18303 /^X\(\/\/\)[^/].*/{
18304 s//\1/
18305 q
18306 }
18307 /^X\(\/\/\)$/{
18308 s//\1/
18309 q
18310 }
18311 /^X\(\/\).*/{
18312 s//\1/
18313 q
18314 }
18315 s/.*/./; q'`
18316 test -d "$as_dir" && break
18317 done
18318 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 18319 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 18320
bec39cab 18321
81ecdfbb 18322} # as_fn_mkdir_p
bec39cab 18323if mkdir -p . 2>/dev/null; then
81ecdfbb 18324 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18325else
18326 test -d ./-p && rmdir ./-p
18327 as_mkdir_p=false
18328fi
18329
d0ac1c44
SM
18330
18331# as_fn_executable_p FILE
18332# -----------------------
18333# Test if FILE is an executable regular file.
18334as_fn_executable_p ()
18335{
18336 test -f "$1" && test -x "$1"
18337} # as_fn_executable_p
18338as_test_x='test -x'
18339as_executable_p=as_fn_executable_p
bec39cab
AC
18340
18341# Sed expression to map a string onto a valid CPP name.
18342as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18343
18344# Sed expression to map a string onto a valid variable name.
18345as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18346
18347
bec39cab 18348exec 6>&1
81ecdfbb
RW
18349## ----------------------------------- ##
18350## Main body of $CONFIG_STATUS script. ##
18351## ----------------------------------- ##
18352_ASEOF
18353test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18354
18355cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18356# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18357# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18358# values after options handling.
18359ac_log="
bec39cab 18360This file was extended by $as_me, which was
d0ac1c44 18361generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
18362
18363 CONFIG_FILES = $CONFIG_FILES
18364 CONFIG_HEADERS = $CONFIG_HEADERS
18365 CONFIG_LINKS = $CONFIG_LINKS
18366 CONFIG_COMMANDS = $CONFIG_COMMANDS
18367 $ $0 $@
18368
81ecdfbb
RW
18369on `(hostname || uname -n) 2>/dev/null | sed 1q`
18370"
18371
bec39cab
AC
18372_ACEOF
18373
81ecdfbb
RW
18374case $ac_config_files in *"
18375"*) set x $ac_config_files; shift; ac_config_files=$*;;
18376esac
234b45d4 18377
81ecdfbb
RW
18378case $ac_config_headers in *"
18379"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18380esac
b4e70030 18381
b4e70030 18382
81ecdfbb
RW
18383cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18384# Files that config.status was made for.
18385config_files="$ac_config_files"
18386config_headers="$ac_config_headers"
18387config_links="$ac_config_links"
18388config_commands="$ac_config_commands"
234b45d4 18389
81ecdfbb 18390_ACEOF
b4e70030 18391
81ecdfbb 18392cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18393ac_cs_usage="\
81ecdfbb
RW
18394\`$as_me' instantiates files and other configuration actions
18395from templates according to the current configuration. Unless the files
18396and actions are specified as TAGs, all are instantiated by default.
234b45d4 18397
81ecdfbb 18398Usage: $0 [OPTION]... [TAG]...
234b45d4 18399
bec39cab 18400 -h, --help print this help, then exit
81ecdfbb 18401 -V, --version print version number and configuration settings, then exit
d0ac1c44 18402 --config print configuration, then exit
81ecdfbb
RW
18403 -q, --quiet, --silent
18404 do not print progress messages
bec39cab
AC
18405 -d, --debug don't remove temporary files
18406 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18407 --file=FILE[:TEMPLATE]
18408 instantiate the configuration file FILE
18409 --header=FILE[:TEMPLATE]
18410 instantiate the configuration header FILE
234b45d4 18411
bec39cab
AC
18412Configuration files:
18413$config_files
234b45d4 18414
bec39cab
AC
18415Configuration headers:
18416$config_headers
234b45d4 18417
bec39cab
AC
18418Configuration links:
18419$config_links
234b45d4 18420
bec39cab
AC
18421Configuration commands:
18422$config_commands
18423
81ecdfbb 18424Report bugs to the package provider."
b4e70030 18425
81ecdfbb
RW
18426_ACEOF
18427cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18428ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
18429ac_cs_version="\\
18430config.status
d0ac1c44
SM
18431configured by $0, generated by GNU Autoconf 2.69,
18432 with options \\"\$ac_cs_config\\"
bec39cab 18433
d0ac1c44 18434Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
18435This config.status script is free software; the Free Software Foundation
18436gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18437
18438ac_pwd='$ac_pwd'
18439srcdir='$srcdir'
18440INSTALL='$INSTALL'
81ecdfbb
RW
18441AWK='$AWK'
18442test -n "\$AWK" || AWK=awk
bec39cab
AC
18443_ACEOF
18444
81ecdfbb
RW
18445cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18446# The default lists apply if the user does not specify any file.
bec39cab
AC
18447ac_need_defaults=:
18448while test $# != 0
18449do
18450 case $1 in
d0ac1c44 18451 --*=?*)
81ecdfbb
RW
18452 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18453 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18454 ac_shift=:
c906108c 18455 ;;
d0ac1c44
SM
18456 --*=)
18457 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18458 ac_optarg=
18459 ac_shift=:
18460 ;;
81ecdfbb 18461 *)
bec39cab
AC
18462 ac_option=$1
18463 ac_optarg=$2
18464 ac_shift=shift
c906108c 18465 ;;
bec39cab 18466 esac
c906108c 18467
bec39cab
AC
18468 case $ac_option in
18469 # Handling of the options.
bec39cab
AC
18470 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18471 ac_cs_recheck=: ;;
81ecdfbb
RW
18472 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18473 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
18474 --config | --confi | --conf | --con | --co | --c )
18475 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 18476 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18477 debug=: ;;
18478 --file | --fil | --fi | --f )
18479 $ac_shift
81ecdfbb
RW
18480 case $ac_optarg in
18481 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 18482 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
18483 esac
18484 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18485 ac_need_defaults=false;;
18486 --header | --heade | --head | --hea )
18487 $ac_shift
81ecdfbb
RW
18488 case $ac_optarg in
18489 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18490 esac
18491 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18492 ac_need_defaults=false;;
81ecdfbb
RW
18493 --he | --h)
18494 # Conflict between --help and --header
d0ac1c44 18495 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
18496Try \`$0 --help' for more information.";;
18497 --help | --hel | -h )
18498 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18499 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18500 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18501 ac_cs_silent=: ;;
c906108c 18502
bec39cab 18503 # This is an error.
d0ac1c44 18504 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 18505Try \`$0 --help' for more information." ;;
c906108c 18506
81ecdfbb
RW
18507 *) as_fn_append ac_config_targets " $1"
18508 ac_need_defaults=false ;;
c906108c 18509
bec39cab
AC
18510 esac
18511 shift
18512done
c906108c 18513
bec39cab 18514ac_configure_extra_args=
c906108c 18515
bec39cab
AC
18516if $ac_cs_silent; then
18517 exec 6>/dev/null
18518 ac_configure_extra_args="$ac_configure_extra_args --silent"
18519fi
c906108c 18520
bec39cab 18521_ACEOF
81ecdfbb 18522cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18523if \$ac_cs_recheck; then
d0ac1c44 18524 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
18525 shift
18526 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18527 CONFIG_SHELL='$SHELL'
18528 export CONFIG_SHELL
18529 exec "\$@"
bec39cab
AC
18530fi
18531
18532_ACEOF
81ecdfbb
RW
18533cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18534exec 5>>config.log
18535{
18536 echo
18537 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18538## Running $as_me. ##
18539_ASBOX
18540 $as_echo "$ac_log"
18541} >&5
bec39cab 18542
81ecdfbb
RW
18543_ACEOF
18544cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18545#
81ecdfbb 18546# INIT-COMMANDS
c906108c 18547#
a417dc56 18548ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 18549
bec39cab
AC
18550_ACEOF
18551
81ecdfbb 18552cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18553
81ecdfbb 18554# Handling of arguments.
bec39cab 18555for ac_config_target in $ac_config_targets
c906108c 18556do
81ecdfbb
RW
18557 case $ac_config_target in
18558 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18559 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18560 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18561 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18562 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18563 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18564 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 18565 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 18566 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18567 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 18568
d0ac1c44 18569 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18570 esac
18571done
18572
81ecdfbb 18573
bec39cab
AC
18574# If the user did not use the arguments to specify the items to instantiate,
18575# then the envvar interface is used. Set only those that are not.
18576# We use the long form for the default assignment because of an extremely
18577# bizarre bug on SunOS 4.1.3.
18578if $ac_need_defaults; then
18579 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18580 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18581 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18582 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18583fi
18584
b4e70030 18585# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18586# simply because there is no reason against having it here, and in addition,
b4e70030 18587# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18588# Hook for its removal unless debugging.
18589# Note that there is a small window in which the directory will not be cleaned:
18590# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18591$debug ||
18592{
d0ac1c44 18593 tmp= ac_tmp=
81ecdfbb 18594 trap 'exit_status=$?
d0ac1c44
SM
18595 : "${ac_tmp:=$tmp}"
18596 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
18597' 0
18598 trap 'as_fn_exit 1' 1 2 13 15
18599}
18600# Create a (secure) tmp directory for tmp files.
18601
18602{
18603 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 18604 test -d "$tmp"
81ecdfbb
RW
18605} ||
18606{
18607 tmp=./conf$$-$RANDOM
18608 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
18609} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18610ac_tmp=$tmp
81ecdfbb
RW
18611
18612# Set up the scripts for CONFIG_FILES section.
18613# No need to generate them if there are no CONFIG_FILES.
18614# This happens for instance with `./config.status config.h'.
18615if test -n "$CONFIG_FILES"; then
18616
18617if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18618 ac_cs_awk_getline=:
18619 ac_cs_awk_pipe_init=
18620 ac_cs_awk_read_file='
18621 while ((getline aline < (F[key])) > 0)
18622 print(aline)
18623 close(F[key])'
18624 ac_cs_awk_pipe_fini=
18625else
18626 ac_cs_awk_getline=false
18627 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18628 ac_cs_awk_read_file='
18629 print "|#_!!_#|"
18630 print "cat " F[key] " &&"
18631 '$ac_cs_awk_pipe_init
18632 # The final `:' finishes the AND list.
18633 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18634fi
18635ac_cr=`echo X | tr X '\015'`
18636# On cygwin, bash can eat \r inside `` if the user requested igncr.
18637# But we know of no other shell where ac_cr would be empty at this
18638# point, so we can use a bashism as a fallback.
18639if test "x$ac_cr" = x; then
18640 eval ac_cr=\$\'\\r\'
18641fi
18642ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18643if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 18644 ac_cs_awk_cr='\\r'
81ecdfbb
RW
18645else
18646 ac_cs_awk_cr=$ac_cr
18647fi
18648
d0ac1c44 18649echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
18650_ACEOF
18651
18652# Create commands to substitute file output variables.
18653{
18654 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 18655 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
18656 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18657 echo "_ACAWK" &&
18658 echo "_ACEOF"
18659} >conf$$files.sh &&
18660. ./conf$$files.sh ||
d0ac1c44 18661 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18662rm -f conf$$files.sh
18663
18664{
18665 echo "cat >conf$$subs.awk <<_ACEOF" &&
18666 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18667 echo "_ACEOF"
18668} >conf$$subs.sh ||
d0ac1c44
SM
18669 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18670ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
18671ac_delim='%!_!# '
18672for ac_last_try in false false false false false :; do
18673 . ./conf$$subs.sh ||
d0ac1c44 18674 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18675
18676 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18677 if test $ac_delim_n = $ac_delim_num; then
18678 break
18679 elif $ac_last_try; then
d0ac1c44 18680 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18681 else
18682 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18683 fi
18684done
18685rm -f conf$$subs.sh
18686
18687cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18688cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
18689_ACEOF
18690sed -n '
18691h
18692s/^/S["/; s/!.*/"]=/
18693p
18694g
18695s/^[^!]*!//
18696:repl
18697t repl
18698s/'"$ac_delim"'$//
18699t delim
18700:nl
18701h
d0ac1c44 18702s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18703t more1
18704s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18705p
18706n
18707b repl
18708:more1
18709s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18710p
18711g
18712s/.\{148\}//
18713t nl
18714:delim
18715h
d0ac1c44 18716s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18717t more2
18718s/["\\]/\\&/g; s/^/"/; s/$/"/
18719p
18720b
18721:more2
18722s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18723p
18724g
18725s/.\{148\}//
18726t delim
18727' <conf$$subs.awk | sed '
18728/^[^""]/{
18729 N
18730 s/\n//
18731}
18732' >>$CONFIG_STATUS || ac_write_fail=1
18733rm -f conf$$subs.awk
18734cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18735_ACAWK
d0ac1c44 18736cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
18737 for (key in S) S_is_set[key] = 1
18738 FS = "\a"
18739 \$ac_cs_awk_pipe_init
18740}
18741{
18742 line = $ 0
18743 nfields = split(line, field, "@")
18744 substed = 0
18745 len = length(field[1])
18746 for (i = 2; i < nfields; i++) {
18747 key = field[i]
18748 keylen = length(key)
18749 if (S_is_set[key]) {
18750 value = S[key]
18751 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18752 len += length(value) + length(field[++i])
18753 substed = 1
18754 } else
18755 len += 1 + keylen
18756 }
18757 if (nfields == 3 && !substed) {
18758 key = field[2]
18759 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18760 \$ac_cs_awk_read_file
18761 next
18762 }
18763 }
18764 print line
b4e70030 18765}
81ecdfbb
RW
18766\$ac_cs_awk_pipe_fini
18767_ACAWK
18768_ACEOF
18769cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18770if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18771 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18772else
18773 cat
d0ac1c44
SM
18774fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18775 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
18776_ACEOF
18777
d0ac1c44
SM
18778# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18779# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
18780# trailing colons and then remove the whole line if VPATH becomes empty
18781# (actually we leave an empty line to preserve line numbers).
18782if test "x$srcdir" = x.; then
d0ac1c44
SM
18783 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18784h
18785s///
18786s/^/:/
18787s/[ ]*$/:/
18788s/:\$(srcdir):/:/g
18789s/:\${srcdir}:/:/g
18790s/:@srcdir@:/:/g
18791s/^:*//
81ecdfbb 18792s/:*$//
d0ac1c44
SM
18793x
18794s/\(=[ ]*\).*/\1/
18795G
18796s/\n//
81ecdfbb
RW
18797s/^[^=]*=[ ]*$//
18798}'
18799fi
18800
18801cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18802fi # test -n "$CONFIG_FILES"
18803
18804# Set up the scripts for CONFIG_HEADERS section.
18805# No need to generate them if there are no CONFIG_HEADERS.
18806# This happens for instance with `./config.status Makefile'.
18807if test -n "$CONFIG_HEADERS"; then
d0ac1c44 18808cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
18809BEGIN {
18810_ACEOF
18811
18812# Transform confdefs.h into an awk script `defines.awk', embedded as
18813# here-document in config.status, that substitutes the proper values into
18814# config.h.in to produce config.h.
4e8d927d 18815
81ecdfbb
RW
18816# Create a delimiter string that does not exist in confdefs.h, to ease
18817# handling of long lines.
18818ac_delim='%!_!# '
18819for ac_last_try in false false :; do
d0ac1c44
SM
18820 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18821 if test -z "$ac_tt"; then
81ecdfbb
RW
18822 break
18823 elif $ac_last_try; then
d0ac1c44 18824 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
18825 else
18826 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18827 fi
18828done
4e8d927d 18829
81ecdfbb
RW
18830# For the awk script, D is an array of macro values keyed by name,
18831# likewise P contains macro parameters if any. Preserve backslash
18832# newline sequences.
18833
18834ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18835sed -n '
18836s/.\{148\}/&'"$ac_delim"'/g
18837t rset
18838:rset
18839s/^[ ]*#[ ]*define[ ][ ]*/ /
18840t def
18841d
18842:def
18843s/\\$//
18844t bsnl
18845s/["\\]/\\&/g
18846s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18847D["\1"]=" \3"/p
18848s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18849d
18850:bsnl
18851s/["\\]/\\&/g
18852s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18853D["\1"]=" \3\\\\\\n"\\/p
18854t cont
18855s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18856t cont
18857d
18858:cont
18859n
18860s/.\{148\}/&'"$ac_delim"'/g
18861t clear
18862:clear
18863s/\\$//
18864t bsnlc
18865s/["\\]/\\&/g; s/^/"/; s/$/"/p
18866d
18867:bsnlc
18868s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18869b cont
18870' <confdefs.h | sed '
18871s/'"$ac_delim"'/"\\\
18872"/g' >>$CONFIG_STATUS || ac_write_fail=1
18873
18874cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18875 for (key in D) D_is_set[key] = 1
18876 FS = "\a"
18877}
18878/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18879 line = \$ 0
18880 split(line, arg, " ")
18881 if (arg[1] == "#") {
18882 defundef = arg[2]
18883 mac1 = arg[3]
18884 } else {
18885 defundef = substr(arg[1], 2)
18886 mac1 = arg[2]
18887 }
18888 split(mac1, mac2, "(") #)
18889 macro = mac2[1]
18890 prefix = substr(line, 1, index(line, defundef) - 1)
18891 if (D_is_set[macro]) {
18892 # Preserve the white space surrounding the "#".
18893 print prefix "define", macro P[macro] D[macro]
18894 next
18895 } else {
18896 # Replace #undef with comments. This is necessary, for example,
18897 # in the case of _POSIX_SOURCE, which is predefined and required
18898 # on some systems where configure will not decide to define it.
18899 if (defundef == "undef") {
18900 print "/*", prefix defundef, macro, "*/"
18901 next
18902 }
18903 }
b4e70030 18904}
81ecdfbb
RW
18905{ print }
18906_ACAWK
b4e70030 18907_ACEOF
81ecdfbb 18908cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 18909 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 18910fi # test -n "$CONFIG_HEADERS"
4e8d927d 18911
4e8d927d 18912
81ecdfbb
RW
18913eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18914shift
18915for ac_tag
18916do
18917 case $ac_tag in
18918 :[FHLC]) ac_mode=$ac_tag; continue;;
18919 esac
18920 case $ac_mode$ac_tag in
18921 :[FHL]*:*);;
d0ac1c44 18922 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
18923 :[FH]-) ac_tag=-:-;;
18924 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18925 esac
18926 ac_save_IFS=$IFS
18927 IFS=:
18928 set x $ac_tag
18929 IFS=$ac_save_IFS
18930 shift
18931 ac_file=$1
18932 shift
4e8d927d 18933
81ecdfbb
RW
18934 case $ac_mode in
18935 :L) ac_source=$1;;
18936 :[FH])
18937 ac_file_inputs=
18938 for ac_f
18939 do
18940 case $ac_f in
d0ac1c44 18941 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
18942 *) # Look for the file first in the build tree, then in the source tree
18943 # (if the path is not absolute). The absolute path cannot be DOS-style,
18944 # because $ac_f cannot contain `:'.
18945 test -f "$ac_f" ||
18946 case $ac_f in
18947 [\\/$]*) false;;
18948 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18949 esac ||
d0ac1c44 18950 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
18951 esac
18952 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18953 as_fn_append ac_file_inputs " '$ac_f'"
18954 done
18955
18956 # Let's still pretend it is `configure' which instantiates (i.e., don't
18957 # use $as_me), people would be surprised to read:
18958 # /* config.h. Generated by config.status. */
18959 configure_input='Generated from '`
18960 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18961 `' by configure.'
18962 if test x"$ac_file" != x-; then
18963 configure_input="$ac_file. $configure_input"
18964 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18965$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18966 fi
81ecdfbb
RW
18967 # Neutralize special characters interpreted by sed in replacement strings.
18968 case $configure_input in #(
18969 *\&* | *\|* | *\\* )
18970 ac_sed_conf_input=`$as_echo "$configure_input" |
18971 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18972 *) ac_sed_conf_input=$configure_input;;
18973 esac
4e8d927d 18974
81ecdfbb 18975 case $ac_tag in
d0ac1c44
SM
18976 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18977 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
18978 esac
18979 ;;
c906108c
SS
18980 esac
18981
81ecdfbb 18982 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18983$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18984 X"$ac_file" : 'X\(//\)[^/]' \| \
18985 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18986 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18987$as_echo X"$ac_file" |
18988 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18989 s//\1/
18990 q
18991 }
18992 /^X\(\/\/\)[^/].*/{
18993 s//\1/
18994 q
18995 }
18996 /^X\(\/\/\)$/{
18997 s//\1/
18998 q
18999 }
19000 /^X\(\/\).*/{
19001 s//\1/
19002 q
19003 }
19004 s/.*/./; q'`
19005 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19006 ac_builddir=.
19007
81ecdfbb
RW
19008case "$ac_dir" in
19009.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19010*)
19011 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19012 # A ".." for each directory in $ac_dir_suffix.
19013 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19014 case $ac_top_builddir_sub in
19015 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19016 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19017 esac ;;
19018esac
19019ac_abs_top_builddir=$ac_pwd
19020ac_abs_builddir=$ac_pwd$ac_dir_suffix
19021# for backward compatibility:
19022ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19023
19024case $srcdir in
81ecdfbb 19025 .) # We are building in place.
bec39cab 19026 ac_srcdir=.
81ecdfbb
RW
19027 ac_top_srcdir=$ac_top_builddir_sub
19028 ac_abs_top_srcdir=$ac_pwd ;;
19029 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19030 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19031 ac_top_srcdir=$srcdir
19032 ac_abs_top_srcdir=$srcdir ;;
19033 *) # Relative name.
19034 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19035 ac_top_srcdir=$ac_top_build_prefix$srcdir
19036 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19037esac
81ecdfbb 19038ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 19039
c906108c 19040
81ecdfbb
RW
19041 case $ac_mode in
19042 :F)
19043 #
19044 # CONFIG_FILE
19045 #
c906108c 19046
bec39cab
AC
19047 case $INSTALL in
19048 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 19049 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 19050 esac
81ecdfbb 19051_ACEOF
121ce6e5 19052
81ecdfbb
RW
19053cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19054# If the template does not know about datarootdir, expand it.
19055# FIXME: This hack should be removed a few years after 2.60.
19056ac_datarootdir_hack=; ac_datarootdir_seen=
19057ac_sed_dataroot='
19058/datarootdir/ {
19059 p
19060 q
19061}
19062/@datadir@/p
19063/@docdir@/p
19064/@infodir@/p
19065/@localedir@/p
19066/@mandir@/p'
19067case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19068*datarootdir*) ac_datarootdir_seen=yes;;
19069*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19071$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19072_ACEOF
19073cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19074 ac_datarootdir_hack='
19075 s&@datadir@&$datadir&g
19076 s&@docdir@&$docdir&g
19077 s&@infodir@&$infodir&g
19078 s&@localedir@&$localedir&g
19079 s&@mandir@&$mandir&g
19080 s&\\\${datarootdir}&$datarootdir&g' ;;
19081esac
4e8d927d 19082_ACEOF
81ecdfbb
RW
19083
19084# Neutralize VPATH when `$srcdir' = `.'.
19085# Shell code in configure.ac might set extrasub.
19086# FIXME: do we really want to maintain this feature?
19087cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19088ac_sed_extra="$ac_vpsub
bec39cab
AC
19089$extrasub
19090_ACEOF
81ecdfbb 19091cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
19092:t
19093/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
19094s|@configure_input@|$ac_sed_conf_input|;t t
19095s&@top_builddir@&$ac_top_builddir_sub&;t t
19096s&@top_build_prefix@&$ac_top_build_prefix&;t t
19097s&@srcdir@&$ac_srcdir&;t t
19098s&@abs_srcdir@&$ac_abs_srcdir&;t t
19099s&@top_srcdir@&$ac_top_srcdir&;t t
19100s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19101s&@builddir@&$ac_builddir&;t t
19102s&@abs_builddir@&$ac_abs_builddir&;t t
19103s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19104s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
19105$ac_datarootdir_hack
19106"
19107eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19108if $ac_cs_awk_getline; then
d0ac1c44 19109 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 19110else
d0ac1c44
SM
19111 $AWK -f "$ac_tmp/subs.awk" | $SHELL
19112fi \
19113 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19114
19115test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
19116 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19117 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19118 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 19119 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19120which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 19121$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19122which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 19123
d0ac1c44 19124 rm -f "$ac_tmp/stdin"
bec39cab 19125 case $ac_file in
d0ac1c44
SM
19126 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19127 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 19128 esac \
d0ac1c44 19129 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19130 ;;
19131 :H)
19132 #
19133 # CONFIG_HEADER
19134 #
bec39cab 19135 if test x"$ac_file" != x-; then
81ecdfbb
RW
19136 {
19137 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19138 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19139 } >"$ac_tmp/config.h" \
19140 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19141 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
19142 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19143$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 19144 else
81ecdfbb 19145 rm -f "$ac_file"
d0ac1c44
SM
19146 mv "$ac_tmp/config.h" "$ac_file" \
19147 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
19148 fi
19149 else
81ecdfbb 19150 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19151 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19152 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 19153 fi
81ecdfbb
RW
19154 ;;
19155 :L)
19156 #
19157 # CONFIG_LINK
19158 #
c906108c 19159
81ecdfbb
RW
19160 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19161 :
b4e70030 19162 else
81ecdfbb
RW
19163 # Prefer the file from the source tree if names are identical.
19164 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19165 ac_source=$srcdir/$ac_source
19166 fi
b4e70030 19167
81ecdfbb
RW
19168 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19169$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 19170
81ecdfbb 19171 if test ! -r "$ac_source"; then
d0ac1c44 19172 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
19173 fi
19174 rm -f "$ac_file"
bec39cab 19175
81ecdfbb 19176 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 19177 case $ac_source in
81ecdfbb
RW
19178 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19179 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19180 esac
19181 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19182 ln "$ac_source" "$ac_file" 2>/dev/null ||
19183 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 19184 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
19185 fi
19186 ;;
19187 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19188$as_echo "$as_me: executing $ac_file commands" >&6;}
19189 ;;
c906108c 19190 esac
b4e70030 19191
bec39cab 19192
81ecdfbb
RW
19193 case $ac_file$ac_mode in
19194 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 19195 "gcore":F) chmod +x gcore ;;
1e94266c
SM
19196 "Makefile":F)
19197case x$CONFIG_HEADERS in
19198xconfig.h:config.in)
19199echo > stamp-h ;;
19200esac
19201 ;;
19202 "gdb-gdb.gdb":F)
19203case x$CONFIG_HEADERS in
19204xconfig.h:config.in)
19205echo > stamp-h ;;
141ec9f6
SM
19206esac
19207 ;;
19208 "gdb-gdb.py":F)
19209case x$CONFIG_HEADERS in
19210xconfig.h:config.in)
19211echo > stamp-h ;;
1e94266c
SM
19212esac
19213 ;;
19214 "doc/Makefile":F)
19215case x$CONFIG_HEADERS in
19216xconfig.h:config.in)
19217echo > stamp-h ;;
19218esac
19219 ;;
19220 "data-directory/Makefile":F)
c906108c
SS
19221case x$CONFIG_HEADERS in
19222xconfig.h:config.in)
19223echo > stamp-h ;;
19224esac
bec39cab 19225 ;;
81ecdfbb 19226
bec39cab 19227 esac
81ecdfbb 19228done # for ac_tag
c906108c 19229
bec39cab 19230
81ecdfbb 19231as_fn_exit 0
bec39cab 19232_ACEOF
bec39cab
AC
19233ac_clean_files=$ac_clean_files_save
19234
81ecdfbb 19235test $ac_write_fail = 0 ||
d0ac1c44 19236 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 19237
bec39cab
AC
19238
19239# configure is writing to config.log, and then calls config.status.
19240# config.status does its own redirection, appending to config.log.
19241# Unfortunately, on DOS this fails, as config.log is still kept open
19242# by configure, so config.status won't be able to write to it; its
19243# output is simply discarded. So we exec the FD to /dev/null,
19244# effectively closing config.log, so it can be properly (re)opened and
19245# appended to by config.status. When coming back to configure, we
19246# need to make the FD available again.
19247if test "$no_create" != yes; then
19248 ac_cs_success=:
19249 ac_config_status_args=
19250 test "$silent" = yes &&
19251 ac_config_status_args="$ac_config_status_args --quiet"
19252 exec 5>/dev/null
19253 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19254 exec 5>>config.log
19255 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19256 # would make configure fail if this is the last instruction.
d0ac1c44 19257 $ac_cs_success || as_fn_exit 1
bec39cab 19258fi
c906108c 19259
bec39cab 19260#
81ecdfbb 19261# CONFIG_SUBDIRS section.
bec39cab 19262#
c906108c
SS
19263if test "$no_recursion" != yes; then
19264
81ecdfbb
RW
19265 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19266 # so they do not pile up.
c906108c
SS
19267 ac_sub_configure_args=
19268 ac_prev=
fdc59709
PB
19269 eval "set x $ac_configure_args"
19270 shift
19271 for ac_arg
19272 do
c906108c
SS
19273 if test -n "$ac_prev"; then
19274 ac_prev=
19275 continue
19276 fi
bec39cab 19277 case $ac_arg in
c906108c
SS
19278 -cache-file | --cache-file | --cache-fil | --cache-fi \
19279 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19280 ac_prev=cache_file ;;
19281 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19282 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19283 | --c=*)
19284 ;;
19285 --config-cache | -C)
c906108c
SS
19286 ;;
19287 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19288 ac_prev=srcdir ;;
19289 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19290 ;;
bec39cab
AC
19291 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19292 ac_prev=prefix ;;
19293 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19294 ;;
81ecdfbb
RW
19295 --disable-option-checking)
19296 ;;
fdc59709
PB
19297 *)
19298 case $ac_arg in
81ecdfbb 19299 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19300 esac
81ecdfbb 19301 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19302 esac
19303 done
19304
bec39cab
AC
19305 # Always prepend --prefix to ensure using the same prefix
19306 # in subdir configurations.
fdc59709
PB
19307 ac_arg="--prefix=$prefix"
19308 case $ac_arg in
81ecdfbb 19309 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19310 esac
81ecdfbb
RW
19311 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19312
19313 # Pass --silent
19314 if test "$silent" = yes; then
19315 ac_sub_configure_args="--silent $ac_sub_configure_args"
19316 fi
19317
19318 # Always prepend --disable-option-checking to silence warnings, since
19319 # different subdirs can have different --enable and --with options.
19320 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19321
b4e70030 19322 ac_popdir=`pwd`
bec39cab 19323 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19324
19325 # Do not complain, so a configure script can configure whichever
19326 # parts of a large source tree are present.
fdc59709 19327 test -d "$srcdir/$ac_dir" || continue
c906108c 19328
81ecdfbb
RW
19329 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19330 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19331 $as_echo "$ac_msg" >&6
19332 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19333 ac_builddir=.
19334
81ecdfbb
RW
19335case "$ac_dir" in
19336.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19337*)
19338 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19339 # A ".." for each directory in $ac_dir_suffix.
19340 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19341 case $ac_top_builddir_sub in
19342 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19343 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19344 esac ;;
19345esac
19346ac_abs_top_builddir=$ac_pwd
19347ac_abs_builddir=$ac_pwd$ac_dir_suffix
19348# for backward compatibility:
19349ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19350
19351case $srcdir in
81ecdfbb 19352 .) # We are building in place.
bec39cab 19353 ac_srcdir=.
81ecdfbb
RW
19354 ac_top_srcdir=$ac_top_builddir_sub
19355 ac_abs_top_srcdir=$ac_pwd ;;
19356 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19357 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19358 ac_top_srcdir=$srcdir
19359 ac_abs_top_srcdir=$srcdir ;;
19360 *) # Relative name.
19361 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19362 ac_top_srcdir=$ac_top_build_prefix$srcdir
19363 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19364esac
81ecdfbb 19365ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19366
c906108c 19367
fdc59709 19368 cd "$ac_dir"
c906108c
SS
19369
19370 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19371 if test -f "$ac_srcdir/configure.gnu"; then
19372 ac_sub_configure=$ac_srcdir/configure.gnu
19373 elif test -f "$ac_srcdir/configure"; then
19374 ac_sub_configure=$ac_srcdir/configure
19375 elif test -f "$ac_srcdir/configure.in"; then
19376 # This should be Cygnus configure.
19377 ac_sub_configure=$ac_aux_dir/configure
c906108c 19378 else
81ecdfbb
RW
19379 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19380$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19381 ac_sub_configure=
19382 fi
19383
19384 # The recursion is here.
19385 if test -n "$ac_sub_configure"; then
c906108c 19386 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19387 case $cache_file in
19388 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19389 *) # Relative name.
19390 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19391 esac
c906108c 19392
81ecdfbb
RW
19393 { $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
19394$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19395 # The eval makes quoting arguments work.
fdc59709
PB
19396 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19397 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 19398 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19399 fi
19400
fdc59709 19401 cd "$ac_popdir"
c906108c
SS
19402 done
19403fi
81ecdfbb
RW
19404if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19405 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19406$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19407fi
c906108c 19408
This page took 3.041854 seconds and 4 git commands to generate.