Add parameter to allow enabling/disabling selftests via configure
[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
4df42755
DE
704HAVE_GUILE_FALSE
705HAVE_GUILE_TRUE
ed3ef339
DE
706GUILE_LIBS
707GUILE_CPPFLAGS
e76c5d17
DE
708GUILD_TARGET_FLAG
709GUILD
ed3ef339 710pkg_config_prog_path
4df42755
DE
711HAVE_PYTHON_FALSE
712HAVE_PYTHON_TRUE
ac534cba
JB
713PYTHON_LIBS
714PYTHON_CPPFLAGS
81ecdfbb 715PYTHON_CFLAGS
ec685c5e 716python_prog_path
2400729e
UW
717LTLIBMPFR
718LIBMPFR
719HAVE_LIBMPFR
81ecdfbb
RW
720LTLIBEXPAT
721LIBEXPAT
722HAVE_LIBEXPAT
b8e0a31c 723JIT_READER_DIR
f997c383 724TARGET_PTR
39037522 725READLINE_TEXI_INCFLAG
81ecdfbb
RW
726READLINE_CFLAGS
727READLINE_DEPS
728READLINE
016a3251
DD
729LTLIBICONV
730LIBICONV
711a72d3
L
731zlibinc
732zlibdir
81ecdfbb
RW
733MIG
734WINDRES
735DLLTOOL
c971b7fa 736AR
81ecdfbb
RW
737YFLAGS
738YACC
c971b7fa 739RANLIB
81ecdfbb 740LN_S
c971b7fa
PA
741INSTALL_DATA
742INSTALL_SCRIPT
743INSTALL_PROGRAM
744AWK
81ecdfbb
RW
745REPORT_BUGS_TEXI
746REPORT_BUGS_TO
747PKGVERSION
44cee4fd 748CODESIGN_CERT
b292c783 749HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
750TARGET_OBS
751subdirs
752GDB_DATADIR
753DEBUGDIR
5048e516
JK
754MAKEINFO_EXTRA_FLAGS
755MAKEINFOFLAGS
756MAKEINFO
81ecdfbb
RW
757PACKAGE
758GNULIB_STDINT_H
81ecdfbb
RW
759CATOBJEXT
760GENCAT
761INSTOBJEXT
762DATADIRNAME
763CATALOGS
764POSUB
765GMSGFMT
766XGETTEXT
767INCINTL
768LIBINTL_DEP
769LIBINTL
770USE_NLS
81ecdfbb
RW
771CCDEPMODE
772DEPDIR
773am__leading_dot
0bcda685
PA
774CXX_DIALECT
775HAVE_CXX11
4869db5e
RM
776INSTALL_STRIP_PROGRAM
777STRIP
778install_sh
81ecdfbb
RW
779target_os
780target_vendor
781target_cpu
782target
783host_os
784host_vendor
785host_cpu
786host
787build_os
788build_vendor
789build_cpu
790build
c971b7fa
PA
791EGREP
792GREP
793CPP
3bc3d82a
PA
794ac_ct_CXX
795CXXFLAGS
796CXX
81ecdfbb
RW
797OBJEXT
798EXEEXT
799ac_ct_CC
800CPPFLAGS
801LDFLAGS
802CFLAGS
803CC
804MAINT
805MAINTAINER_MODE_FALSE
806MAINTAINER_MODE_TRUE
807target_alias
808host_alias
809build_alias
810LIBS
811ECHO_T
812ECHO_N
813ECHO_C
814DEFS
815mandir
816localedir
817libdir
818psdir
819pdfdir
820dvidir
821htmldir
822infodir
823docdir
824oldincludedir
825includedir
826localstatedir
827sharedstatedir
828sysconfdir
829datadir
830datarootdir
831libexecdir
832sbindir
833bindir
834program_transform_name
835prefix
836exec_prefix
837PACKAGE_URL
838PACKAGE_BUGREPORT
839PACKAGE_STRING
840PACKAGE_VERSION
841PACKAGE_TARNAME
842PACKAGE_NAME
843PATH_SEPARATOR
844SHELL'
2b351b19 845ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
846ac_user_opts='
847enable_option_checking
848enable_maintainer_mode
da2f07f1
JK
849enable_plugins
850enable_largefile
81ecdfbb
RW
851with_separate_debug_dir
852with_gdb_datadir
853with_relocated_sources
7349ff92 854with_auto_load_dir
bccbefd2 855with_auto_load_safe_path
81ecdfbb
RW
856enable_targets
857enable_64_bit_bfd
81ecdfbb
RW
858enable_gdbmi
859enable_tui
860enable_gdbtk
05e7c244 861with_libunwind_ia64
81ecdfbb
RW
862with_curses
863enable_profiling
44cee4fd 864enable_codesign
81ecdfbb
RW
865with_pkgversion
866with_bugurl
711a72d3 867with_system_zlib
016a3251
DD
868with_gnu_ld
869enable_rpath
81ecdfbb 870with_libiconv_prefix
478aac75 871with_iconv_bin
81ecdfbb 872with_system_readline
b8e0a31c 873with_jit_reader_dir
81ecdfbb 874with_expat
81ecdfbb 875with_libexpat_prefix
2400729e
UW
876with_mpfr
877with_libmpfr_prefix
81ecdfbb 878with_python
ed3ef339 879with_guile
a8db4212 880enable_libmcheck
58bfce93
MM
881with_intel_pt
882with_libipt_prefix
81ecdfbb
RW
883with_included_regex
884with_sysroot
885with_system_gdbinit
886enable_werror
887enable_build_warnings
888enable_gdb_build_warnings
f35d5ade 889enable_ubsan
608e2dbb
TT
890with_lzma
891with_liblzma_prefix
81ecdfbb
RW
892with_tcl
893with_tk
894with_x
895enable_sim
496c0e1b 896enable_gdbserver
393fd4c3
YQ
897with_babeltrace
898with_libbabeltrace_prefix
8ecfd7bd 899enable_unit_tests
81ecdfbb
RW
900'
901 ac_precious_vars='build_alias
902host_alias
903target_alias
904CC
905CFLAGS
906LDFLAGS
907LIBS
908CPPFLAGS
3bc3d82a
PA
909CXX
910CXXFLAGS
911CCC
81ecdfbb 912CPP
f06e05e0
JK
913MAKEINFO
914MAKEINFOFLAGS
81ecdfbb
RW
915YACC
916YFLAGS
917XMKMF'
5ae98d25 918ac_subdirs_all='testsuite
81ecdfbb 919gdbtk
81ecdfbb 920gdbserver'
c906108c
SS
921
922# Initialize some variables set by options.
bec39cab
AC
923ac_init_help=
924ac_init_version=false
81ecdfbb
RW
925ac_unrecognized_opts=
926ac_unrecognized_sep=
c906108c
SS
927# The variables have the same names as the options, with
928# dashes changed to underlines.
bec39cab 929cache_file=/dev/null
c906108c 930exec_prefix=NONE
c906108c 931no_create=
c906108c
SS
932no_recursion=
933prefix=NONE
934program_prefix=NONE
935program_suffix=NONE
936program_transform_name=s,x,x,
937silent=
938site=
939srcdir=
c906108c
SS
940verbose=
941x_includes=NONE
942x_libraries=NONE
bec39cab
AC
943
944# Installation directory options.
945# These are left unexpanded so users can "make install exec_prefix=/foo"
946# and all the variables that are supposed to be based on exec_prefix
947# by default will actually change.
948# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 949# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
950bindir='${exec_prefix}/bin'
951sbindir='${exec_prefix}/sbin'
952libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
953datarootdir='${prefix}/share'
954datadir='${datarootdir}'
c906108c
SS
955sysconfdir='${prefix}/etc'
956sharedstatedir='${prefix}/com'
957localstatedir='${prefix}/var'
c906108c
SS
958includedir='${prefix}/include'
959oldincludedir='/usr/include'
81ecdfbb
RW
960docdir='${datarootdir}/doc/${PACKAGE}'
961infodir='${datarootdir}/info'
962htmldir='${docdir}'
963dvidir='${docdir}'
964pdfdir='${docdir}'
965psdir='${docdir}'
966libdir='${exec_prefix}/lib'
967localedir='${datarootdir}/locale'
968mandir='${datarootdir}/man'
c906108c 969
c906108c 970ac_prev=
81ecdfbb 971ac_dashdash=
c906108c
SS
972for ac_option
973do
c906108c
SS
974 # If the previous option needs an argument, assign it.
975 if test -n "$ac_prev"; then
81ecdfbb 976 eval $ac_prev=\$ac_option
c906108c
SS
977 ac_prev=
978 continue
979 fi
980
81ecdfbb 981 case $ac_option in
d0ac1c44
SM
982 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
983 *=) ac_optarg= ;;
984 *) ac_optarg=yes ;;
81ecdfbb 985 esac
c906108c
SS
986
987 # Accept the important Cygnus configure options, so we can diagnose typos.
988
81ecdfbb
RW
989 case $ac_dashdash$ac_option in
990 --)
991 ac_dashdash=yes ;;
c906108c
SS
992
993 -bindir | --bindir | --bindi | --bind | --bin | --bi)
994 ac_prev=bindir ;;
995 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 996 bindir=$ac_optarg ;;
c906108c
SS
997
998 -build | --build | --buil | --bui | --bu)
bec39cab 999 ac_prev=build_alias ;;
c906108c 1000 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1001 build_alias=$ac_optarg ;;
c906108c
SS
1002
1003 -cache-file | --cache-file | --cache-fil | --cache-fi \
1004 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1005 ac_prev=cache_file ;;
1006 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1007 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1008 cache_file=$ac_optarg ;;
1009
1010 --config-cache | -C)
1011 cache_file=config.cache ;;
c906108c 1012
81ecdfbb 1013 -datadir | --datadir | --datadi | --datad)
c906108c 1014 ac_prev=datadir ;;
81ecdfbb 1015 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1016 datadir=$ac_optarg ;;
c906108c 1017
81ecdfbb
RW
1018 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1019 | --dataroo | --dataro | --datar)
1020 ac_prev=datarootdir ;;
1021 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1022 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1023 datarootdir=$ac_optarg ;;
1024
c906108c 1025 -disable-* | --disable-*)
81ecdfbb 1026 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1027 # Reject names that are not valid shell variable names.
81ecdfbb 1028 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1029 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1030 ac_useropt_orig=$ac_useropt
1031 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1032 case $ac_user_opts in
1033 *"
1034"enable_$ac_useropt"
1035"*) ;;
1036 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1037 ac_unrecognized_sep=', ';;
1038 esac
1039 eval enable_$ac_useropt=no ;;
1040
1041 -docdir | --docdir | --docdi | --doc | --do)
1042 ac_prev=docdir ;;
1043 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1044 docdir=$ac_optarg ;;
1045
1046 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1047 ac_prev=dvidir ;;
1048 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1049 dvidir=$ac_optarg ;;
c906108c
SS
1050
1051 -enable-* | --enable-*)
81ecdfbb 1052 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1053 # Reject names that are not valid shell variable names.
81ecdfbb 1054 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1055 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1056 ac_useropt_orig=$ac_useropt
1057 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1058 case $ac_user_opts in
1059 *"
1060"enable_$ac_useropt"
1061"*) ;;
1062 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1063 ac_unrecognized_sep=', ';;
b4e70030 1064 esac
81ecdfbb 1065 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1066
1067 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1068 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1069 | --exec | --exe | --ex)
1070 ac_prev=exec_prefix ;;
1071 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1072 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1073 | --exec=* | --exe=* | --ex=*)
bec39cab 1074 exec_prefix=$ac_optarg ;;
c906108c
SS
1075
1076 -gas | --gas | --ga | --g)
1077 # Obsolete; use --with-gas.
1078 with_gas=yes ;;
1079
bec39cab
AC
1080 -help | --help | --hel | --he | -h)
1081 ac_init_help=long ;;
1082 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1083 ac_init_help=recursive ;;
1084 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1085 ac_init_help=short ;;
c906108c
SS
1086
1087 -host | --host | --hos | --ho)
bec39cab 1088 ac_prev=host_alias ;;
c906108c 1089 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1090 host_alias=$ac_optarg ;;
c906108c 1091
81ecdfbb
RW
1092 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1093 ac_prev=htmldir ;;
1094 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1095 | --ht=*)
1096 htmldir=$ac_optarg ;;
1097
c906108c
SS
1098 -includedir | --includedir | --includedi | --included | --include \
1099 | --includ | --inclu | --incl | --inc)
1100 ac_prev=includedir ;;
1101 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1102 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1103 includedir=$ac_optarg ;;
c906108c
SS
1104
1105 -infodir | --infodir | --infodi | --infod | --info | --inf)
1106 ac_prev=infodir ;;
1107 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1108 infodir=$ac_optarg ;;
c906108c
SS
1109
1110 -libdir | --libdir | --libdi | --libd)
1111 ac_prev=libdir ;;
1112 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1113 libdir=$ac_optarg ;;
c906108c
SS
1114
1115 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1116 | --libexe | --libex | --libe)
1117 ac_prev=libexecdir ;;
1118 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1119 | --libexe=* | --libex=* | --libe=*)
bec39cab 1120 libexecdir=$ac_optarg ;;
c906108c 1121
81ecdfbb
RW
1122 -localedir | --localedir | --localedi | --localed | --locale)
1123 ac_prev=localedir ;;
1124 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1125 localedir=$ac_optarg ;;
1126
c906108c 1127 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1128 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1129 ac_prev=localstatedir ;;
1130 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1131 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1132 localstatedir=$ac_optarg ;;
c906108c
SS
1133
1134 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1135 ac_prev=mandir ;;
1136 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1137 mandir=$ac_optarg ;;
c906108c
SS
1138
1139 -nfp | --nfp | --nf)
1140 # Obsolete; use --without-fp.
1141 with_fp=no ;;
1142
1143 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1144 | --no-cr | --no-c | -n)
c906108c
SS
1145 no_create=yes ;;
1146
1147 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1148 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1149 no_recursion=yes ;;
1150
1151 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1152 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1153 | --oldin | --oldi | --old | --ol | --o)
1154 ac_prev=oldincludedir ;;
1155 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1156 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1157 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1158 oldincludedir=$ac_optarg ;;
c906108c
SS
1159
1160 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1161 ac_prev=prefix ;;
1162 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1163 prefix=$ac_optarg ;;
c906108c
SS
1164
1165 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1166 | --program-pre | --program-pr | --program-p)
1167 ac_prev=program_prefix ;;
1168 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1169 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1170 program_prefix=$ac_optarg ;;
c906108c
SS
1171
1172 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1173 | --program-suf | --program-su | --program-s)
1174 ac_prev=program_suffix ;;
1175 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1176 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1177 program_suffix=$ac_optarg ;;
c906108c
SS
1178
1179 -program-transform-name | --program-transform-name \
1180 | --program-transform-nam | --program-transform-na \
1181 | --program-transform-n | --program-transform- \
1182 | --program-transform | --program-transfor \
1183 | --program-transfo | --program-transf \
1184 | --program-trans | --program-tran \
1185 | --progr-tra | --program-tr | --program-t)
1186 ac_prev=program_transform_name ;;
1187 -program-transform-name=* | --program-transform-name=* \
1188 | --program-transform-nam=* | --program-transform-na=* \
1189 | --program-transform-n=* | --program-transform-=* \
1190 | --program-transform=* | --program-transfor=* \
1191 | --program-transfo=* | --program-transf=* \
1192 | --program-trans=* | --program-tran=* \
1193 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1194 program_transform_name=$ac_optarg ;;
c906108c 1195
81ecdfbb
RW
1196 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1197 ac_prev=pdfdir ;;
1198 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1199 pdfdir=$ac_optarg ;;
1200
1201 -psdir | --psdir | --psdi | --psd | --ps)
1202 ac_prev=psdir ;;
1203 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1204 psdir=$ac_optarg ;;
1205
c906108c
SS
1206 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1207 | -silent | --silent | --silen | --sile | --sil)
1208 silent=yes ;;
1209
1210 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1211 ac_prev=sbindir ;;
1212 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1213 | --sbi=* | --sb=*)
bec39cab 1214 sbindir=$ac_optarg ;;
c906108c
SS
1215
1216 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1217 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1218 | --sharedst | --shareds | --shared | --share | --shar \
1219 | --sha | --sh)
1220 ac_prev=sharedstatedir ;;
1221 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1222 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1223 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1224 | --sha=* | --sh=*)
bec39cab 1225 sharedstatedir=$ac_optarg ;;
c906108c
SS
1226
1227 -site | --site | --sit)
1228 ac_prev=site ;;
1229 -site=* | --site=* | --sit=*)
bec39cab 1230 site=$ac_optarg ;;
3ace7edb 1231
c906108c
SS
1232 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1233 ac_prev=srcdir ;;
1234 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1235 srcdir=$ac_optarg ;;
c906108c
SS
1236
1237 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1238 | --syscon | --sysco | --sysc | --sys | --sy)
1239 ac_prev=sysconfdir ;;
1240 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1241 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1242 sysconfdir=$ac_optarg ;;
c906108c
SS
1243
1244 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1245 ac_prev=target_alias ;;
c906108c 1246 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1247 target_alias=$ac_optarg ;;
c906108c
SS
1248
1249 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1250 verbose=yes ;;
1251
bec39cab
AC
1252 -version | --version | --versio | --versi | --vers | -V)
1253 ac_init_version=: ;;
c906108c
SS
1254
1255 -with-* | --with-*)
81ecdfbb 1256 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1257 # Reject names that are not valid shell variable names.
81ecdfbb 1258 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1259 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1260 ac_useropt_orig=$ac_useropt
1261 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1262 case $ac_user_opts in
1263 *"
1264"with_$ac_useropt"
1265"*) ;;
1266 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1267 ac_unrecognized_sep=', ';;
b4e70030 1268 esac
81ecdfbb 1269 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1270
1271 -without-* | --without-*)
81ecdfbb 1272 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1273 # Reject names that are not valid shell variable names.
81ecdfbb 1274 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1275 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1276 ac_useropt_orig=$ac_useropt
1277 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1278 case $ac_user_opts in
1279 *"
1280"with_$ac_useropt"
1281"*) ;;
1282 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1283 ac_unrecognized_sep=', ';;
1284 esac
1285 eval with_$ac_useropt=no ;;
c906108c
SS
1286
1287 --x)
1288 # Obsolete; use --with-x.
1289 with_x=yes ;;
1290
1291 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1292 | --x-incl | --x-inc | --x-in | --x-i)
1293 ac_prev=x_includes ;;
1294 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1295 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1296 x_includes=$ac_optarg ;;
c906108c
SS
1297
1298 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1299 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1300 ac_prev=x_libraries ;;
1301 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1302 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1303 x_libraries=$ac_optarg ;;
c906108c 1304
d0ac1c44
SM
1305 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1306Try \`$0 --help' for more information"
c906108c
SS
1307 ;;
1308
bec39cab
AC
1309 *=*)
1310 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1311 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1312 case $ac_envvar in #(
1313 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1314 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1315 esac
1316 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1317 export $ac_envvar ;;
1318
c906108c 1319 *)
bec39cab 1320 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1321 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1322 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1323 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1324 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1325 ;;
1326
1327 esac
1328done
1329
1330if test -n "$ac_prev"; then
bec39cab 1331 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1332 as_fn_error $? "missing argument to $ac_option"
c906108c 1333fi
c906108c 1334
81ecdfbb
RW
1335if test -n "$ac_unrecognized_opts"; then
1336 case $enable_option_checking in
1337 no) ;;
d0ac1c44 1338 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1339 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1340 esac
81ecdfbb 1341fi
b4e70030 1342
81ecdfbb
RW
1343# Check all directory arguments for consistency.
1344for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1345 datadir sysconfdir sharedstatedir localstatedir includedir \
1346 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1347 libdir localedir mandir
b4e70030 1348do
81ecdfbb
RW
1349 eval ac_val=\$$ac_var
1350 # Remove trailing slashes.
1351 case $ac_val in
1352 */ )
1353 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1354 eval $ac_var=\$ac_val;;
1355 esac
1356 # Be sure to have absolute directory names.
b4e70030 1357 case $ac_val in
81ecdfbb
RW
1358 [\\/$]* | ?:[\\/]* ) continue;;
1359 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1360 esac
d0ac1c44 1361 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1362done
1363
bec39cab
AC
1364# There might be people who depend on the old broken behavior: `$host'
1365# used to hold the argument of --host etc.
1366# FIXME: To remove some day.
1367build=$build_alias
1368host=$host_alias
1369target=$target_alias
1370
1371# FIXME: To remove some day.
1372if test "x$host_alias" != x; then
1373 if test "x$build_alias" = x; then
1374 cross_compiling=maybe
bec39cab
AC
1375 elif test "x$build_alias" != "x$host_alias"; then
1376 cross_compiling=yes
1377 fi
1378fi
c906108c 1379
bec39cab
AC
1380ac_tool_prefix=
1381test -n "$host_alias" && ac_tool_prefix=$host_alias-
1382
1383test "$silent" = yes && exec 6>/dev/null
c906108c 1384
c906108c 1385
81ecdfbb
RW
1386ac_pwd=`pwd` && test -n "$ac_pwd" &&
1387ac_ls_di=`ls -di .` &&
1388ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1389 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1390test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1391 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1392
1393
c906108c
SS
1394# Find the source files, if location was not specified.
1395if test -z "$srcdir"; then
1396 ac_srcdir_defaulted=yes
81ecdfbb
RW
1397 # Try the directory containing this script, then the parent directory.
1398 ac_confdir=`$as_dirname -- "$as_myself" ||
1399$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1400 X"$as_myself" : 'X\(//\)[^/]' \| \
1401 X"$as_myself" : 'X\(//\)$' \| \
1402 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1403$as_echo X"$as_myself" |
1404 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1405 s//\1/
1406 q
1407 }
1408 /^X\(\/\/\)[^/].*/{
1409 s//\1/
1410 q
1411 }
1412 /^X\(\/\/\)$/{
1413 s//\1/
1414 q
1415 }
1416 /^X\(\/\).*/{
1417 s//\1/
1418 q
1419 }
1420 s/.*/./; q'`
c906108c 1421 srcdir=$ac_confdir
81ecdfbb 1422 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1423 srcdir=..
1424 fi
1425else
1426 ac_srcdir_defaulted=no
1427fi
81ecdfbb
RW
1428if test ! -r "$srcdir/$ac_unique_file"; then
1429 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1430 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1431fi
1432ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1433ac_abs_confdir=`(
d0ac1c44 1434 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1435 pwd)`
1436# When building in place, set srcdir=.
1437if test "$ac_abs_confdir" = "$ac_pwd"; then
1438 srcdir=.
1439fi
1440# Remove unnecessary trailing slashes from srcdir.
1441# Double slashes in file names in object file debugging info
1442# mess up M-x gdb in Emacs.
1443case $srcdir in
1444*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1445esac
1446for ac_var in $ac_precious_vars; do
1447 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1448 eval ac_env_${ac_var}_value=\$${ac_var}
1449 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1450 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1451done
c906108c 1452
bec39cab
AC
1453#
1454# Report the --help message.
1455#
1456if test "$ac_init_help" = "long"; then
1457 # Omit some internal or obsolete options to make the list less imposing.
1458 # This message is too long to be a string in the A/UX 3.1 sh.
1459 cat <<_ACEOF
1460\`configure' configures this package to adapt to many kinds of systems.
1461
1462Usage: $0 [OPTION]... [VAR=VALUE]...
1463
1464To assign environment variables (e.g., CC, CFLAGS...), specify them as
1465VAR=VALUE. See below for descriptions of some of the useful variables.
1466
1467Defaults for the options are specified in brackets.
1468
1469Configuration:
1470 -h, --help display this help and exit
1471 --help=short display options specific to this package
1472 --help=recursive display the short help of all the included packages
1473 -V, --version display version information and exit
d0ac1c44 1474 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1475 --cache-file=FILE cache test results in FILE [disabled]
1476 -C, --config-cache alias for \`--cache-file=config.cache'
1477 -n, --no-create do not create output files
1478 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1479
bec39cab
AC
1480Installation directories:
1481 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1482 [$ac_default_prefix]
bec39cab 1483 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1484 [PREFIX]
bec39cab
AC
1485
1486By default, \`make install' will install all the files in
1487\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1488an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1489for instance \`--prefix=\$HOME'.
1490
1491For better control, use the options below.
1492
1493Fine tuning of the installation directories:
81ecdfbb
RW
1494 --bindir=DIR user executables [EPREFIX/bin]
1495 --sbindir=DIR system admin executables [EPREFIX/sbin]
1496 --libexecdir=DIR program executables [EPREFIX/libexec]
1497 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1498 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1499 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1500 --libdir=DIR object code libraries [EPREFIX/lib]
1501 --includedir=DIR C header files [PREFIX/include]
1502 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1503 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1504 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1505 --infodir=DIR info documentation [DATAROOTDIR/info]
1506 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1507 --mandir=DIR man documentation [DATAROOTDIR/man]
1508 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1509 --htmldir=DIR html documentation [DOCDIR]
1510 --dvidir=DIR dvi documentation [DOCDIR]
1511 --pdfdir=DIR pdf documentation [DOCDIR]
1512 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1513_ACEOF
1514
1515 cat <<\_ACEOF
1516
9009e1ae
MR
1517Program names:
1518 --program-prefix=PREFIX prepend PREFIX to installed program names
1519 --program-suffix=SUFFIX append SUFFIX to installed program names
1520 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1521
bec39cab
AC
1522X features:
1523 --x-includes=DIR X include files are in DIR
1524 --x-libraries=DIR X library files are in DIR
1525
1526System types:
1527 --build=BUILD configure for building on BUILD [guessed]
1528 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1529 --target=TARGET configure for building compilers for TARGET [HOST]
1530_ACEOF
1531fi
1532
1533if test -n "$ac_init_help"; then
1534
1535 cat <<\_ACEOF
1536
1537Optional Features:
81ecdfbb 1538 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1539 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1540 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1541 --enable-maintainer-mode
1542 enable make rules and dependencies not useful (and
1543 sometimes confusing) to the casual installer
2974be62 1544 --enable-plugins Enable support for plugins
da2f07f1 1545 --disable-largefile omit support for large files
a1220294
TT
1546 --enable-targets=TARGETS
1547 alternative target configurations
c0993dbe 1548 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1549 --disable-gdbmi disable machine-interface (MI)
1550 --enable-tui enable full-screen terminal user interface (TUI)
1551 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1552 --enable-profiling enable profiling of GDB
44cee4fd 1553 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1554 --disable-rpath do not hardcode runtime library paths
17ef446e 1555 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1556 --enable-werror treat compile warnings as errors
32c1c914 1557 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1558 --enable-gdb-build-warnings
32c1c914 1559 enable GDB specific build-time compiler warnings if
a1220294 1560 gcc is used
f35d5ade 1561 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1562 --enable-sim link gdb with simulator
496c0e1b
JB
1563 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1564 is auto)
8ecfd7bd
SDJ
1565 --enable-unit-tests Enable the inclusion of unit tests when compiling
1566 GDB
bec39cab
AC
1567
1568Optional Packages:
1569 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1570 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1571 --with-separate-debug-dir=PATH
32c1c914 1572 look for global separate debug info in this path
62e4f60c 1573 [LIBDIR/debug]
b14b1491
TT
1574 --with-gdb-datadir=PATH look for global separate data files in this path
1575 [DATADIR/gdb]
29b0e8a2 1576 --with-relocated-sources=PATH
32c1c914 1577 automatically relocate this path for source files
7349ff92 1578 --with-auto-load-dir=PATH
aff139ff 1579 directories from which to load auto-loaded scripts
1564a261 1580 [$debugdir:$datadir/auto-load]
bccbefd2 1581 --with-auto-load-safe-path=PATH
aff139ff 1582 directories safe to hold auto-loaded files
7349ff92 1583 [--with-auto-load-dir]
bccbefd2
JK
1584 --without-auto-load-safe-path
1585 do not restrict auto-loaded files locations
05e7c244 1586 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1587 --with-curses use the curses library instead of the termcap
1588 library
c16158bc
JM
1589 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1590 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1591 --with-system-zlib use installed libz
016a3251
DD
1592 --with-gnu-ld assume the C compiler uses GNU ld default=no
1593 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1594 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1595 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1596 --with-system-readline use installed readline library
b8e0a31c
SD
1597 --with-jit-reader-dir=PATH
1598 directory to load the JIT readers from
5c39566f 1599 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1600 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1601 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1602 --with-mpfr include MPFR support (auto/yes/no)
1603 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1604 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1605 --with-python[=PYTHON] include python support
1606 (auto/yes/no/<python-program>)
ed3ef339
DE
1607 --with-guile[=GUILE] include guile support
1608 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1609 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1610 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1611 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1612 --without-included-regex
1613 don't use included regex; this is the default on
1614 systems with version 2 of the GNU C library (use
1615 with caution on other system)
81ecdfbb 1616 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1617 --with-system-gdbinit=PATH
32c1c914 1618 automatically load a system-wide gdbinit file
608e2dbb
TT
1619 --with-lzma support lzma compression (auto/yes/no)
1620 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1621 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1622 --with-tcl directory containing tcl configuration (tclConfig.sh)
1623 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1624 --with-x use the X Window System
393fd4c3
YQ
1625 --with-babeltrace include babeltrace support (auto/yes/no)
1626 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1627 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1628
1629Some influential environment variables:
1630 CC C compiler command
1631 CFLAGS C compiler flags
1632 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1633 nonstandard directory <lib dir>
81ecdfbb 1634 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1635 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1636 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1637 CXX C++ compiler command
1638 CXXFLAGS C++ compiler flags
bec39cab 1639 CPP C preprocessor
f06e05e0
JK
1640 MAKEINFO Parent configure detects if it is of sufficient version.
1641 MAKEINFOFLAGS
1642 Parameters for MAKEINFO.
d0ac1c44
SM
1643 YACC The `Yet Another Compiler Compiler' implementation to use.
1644 Defaults to the first program found out of: `bison -y', `byacc',
1645 `yacc'.
81ecdfbb
RW
1646 YFLAGS The list of arguments that will be passed by default to $YACC.
1647 This script will default YFLAGS to the empty string to avoid a
1648 default value of `-d' given by some make applications.
1649 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1650
1651Use these variables to override the choices made by `configure' or to help
1652it to find libraries and programs with nonstandard names/locations.
1653
81ecdfbb 1654Report bugs to the package provider.
bec39cab 1655_ACEOF
81ecdfbb 1656ac_status=$?
bec39cab
AC
1657fi
1658
1659if test "$ac_init_help" = "recursive"; then
1660 # If there are subdirs, report their specific --help.
bec39cab 1661 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1662 test -d "$ac_dir" ||
1663 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1664 continue
bec39cab
AC
1665 ac_builddir=.
1666
81ecdfbb
RW
1667case "$ac_dir" in
1668.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1669*)
1670 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1671 # A ".." for each directory in $ac_dir_suffix.
1672 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1673 case $ac_top_builddir_sub in
1674 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1675 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1676 esac ;;
1677esac
1678ac_abs_top_builddir=$ac_pwd
1679ac_abs_builddir=$ac_pwd$ac_dir_suffix
1680# for backward compatibility:
1681ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1682
1683case $srcdir in
81ecdfbb 1684 .) # We are building in place.
bec39cab 1685 ac_srcdir=.
81ecdfbb
RW
1686 ac_top_srcdir=$ac_top_builddir_sub
1687 ac_abs_top_srcdir=$ac_pwd ;;
1688 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1689 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1690 ac_top_srcdir=$srcdir
1691 ac_abs_top_srcdir=$srcdir ;;
1692 *) # Relative name.
1693 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1694 ac_top_srcdir=$ac_top_build_prefix$srcdir
1695 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1696esac
81ecdfbb 1697ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1698
81ecdfbb
RW
1699 cd "$ac_dir" || { ac_status=$?; continue; }
1700 # Check for guested configure.
1701 if test -f "$ac_srcdir/configure.gnu"; then
1702 echo &&
1703 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1704 elif test -f "$ac_srcdir/configure"; then
1705 echo &&
1706 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1707 else
81ecdfbb
RW
1708 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1709 fi || ac_status=$?
1710 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1711 done
1712fi
1713
81ecdfbb 1714test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1715if $ac_init_version; then
1716 cat <<\_ACEOF
81ecdfbb 1717configure
d0ac1c44 1718generated by GNU Autoconf 2.69
bec39cab 1719
d0ac1c44 1720Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1721This configure script is free software; the Free Software Foundation
1722gives unlimited permission to copy, distribute and modify it.
1723_ACEOF
81ecdfbb 1724 exit
bec39cab 1725fi
bec39cab 1726
81ecdfbb
RW
1727## ------------------------ ##
1728## Autoconf initialization. ##
1729## ------------------------ ##
bec39cab 1730
81ecdfbb
RW
1731# ac_fn_c_try_compile LINENO
1732# --------------------------
1733# Try to compile conftest.$ac_ext, and return whether this succeeded.
1734ac_fn_c_try_compile ()
1735{
1736 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1737 rm -f conftest.$ac_objext
1738 if { { ac_try="$ac_compile"
1739case "(($ac_try" in
1740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1741 *) ac_try_echo=$ac_try;;
1742esac
1743eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1744$as_echo "$ac_try_echo"; } >&5
1745 (eval "$ac_compile") 2>conftest.err
1746 ac_status=$?
1747 if test -s conftest.err; then
1748 grep -v '^ *+' conftest.err >conftest.er1
1749 cat conftest.er1 >&5
1750 mv -f conftest.er1 conftest.err
1751 fi
1752 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1753 test $ac_status = 0; } && {
1754 test -z "$ac_c_werror_flag" ||
1755 test ! -s conftest.err
1756 } && test -s conftest.$ac_objext; then :
1757 ac_retval=0
1758else
1759 $as_echo "$as_me: failed program was:" >&5
1760sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1761
81ecdfbb
RW
1762 ac_retval=1
1763fi
d0ac1c44
SM
1764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1765 as_fn_set_status $ac_retval
81ecdfbb
RW
1766
1767} # ac_fn_c_try_compile
1768
3bc3d82a
PA
1769# ac_fn_cxx_try_compile LINENO
1770# ----------------------------
1771# Try to compile conftest.$ac_ext, and return whether this succeeded.
1772ac_fn_cxx_try_compile ()
1773{
1774 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1775 rm -f conftest.$ac_objext
1776 if { { ac_try="$ac_compile"
1777case "(($ac_try" in
1778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1779 *) ac_try_echo=$ac_try;;
1780esac
1781eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1782$as_echo "$ac_try_echo"; } >&5
1783 (eval "$ac_compile") 2>conftest.err
1784 ac_status=$?
1785 if test -s conftest.err; then
1786 grep -v '^ *+' conftest.err >conftest.er1
1787 cat conftest.er1 >&5
1788 mv -f conftest.er1 conftest.err
1789 fi
1790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1791 test $ac_status = 0; } && {
1792 test -z "$ac_cxx_werror_flag" ||
1793 test ! -s conftest.err
1794 } && test -s conftest.$ac_objext; then :
1795 ac_retval=0
1796else
1797 $as_echo "$as_me: failed program was:" >&5
1798sed 's/^/| /' conftest.$ac_ext >&5
1799
1800 ac_retval=1
1801fi
d0ac1c44
SM
1802 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1803 as_fn_set_status $ac_retval
3bc3d82a
PA
1804
1805} # ac_fn_cxx_try_compile
1806
81ecdfbb
RW
1807# ac_fn_c_try_cpp LINENO
1808# ----------------------
1809# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1810ac_fn_c_try_cpp ()
bec39cab 1811{
81ecdfbb
RW
1812 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813 if { { ac_try="$ac_cpp conftest.$ac_ext"
1814case "(($ac_try" in
1815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1816 *) ac_try_echo=$ac_try;;
1817esac
1818eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1819$as_echo "$ac_try_echo"; } >&5
1820 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1821 ac_status=$?
1822 if test -s conftest.err; then
1823 grep -v '^ *+' conftest.err >conftest.er1
1824 cat conftest.er1 >&5
1825 mv -f conftest.er1 conftest.err
1826 fi
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1828 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1829 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1830 test ! -s conftest.err
1831 }; then :
1832 ac_retval=0
1833else
1834 $as_echo "$as_me: failed program was:" >&5
1835sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1836
81ecdfbb
RW
1837 ac_retval=1
1838fi
d0ac1c44
SM
1839 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1840 as_fn_set_status $ac_retval
bec39cab 1841
81ecdfbb 1842} # ac_fn_c_try_cpp
bec39cab 1843
81ecdfbb
RW
1844# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1845# -------------------------------------------------------
1846# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1847# the include files in INCLUDES and setting the cache variable VAR
1848# accordingly.
1849ac_fn_c_check_header_mongrel ()
1850{
1851 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1852 if eval \${$3+:} false; then :
81ecdfbb
RW
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1855if eval \${$3+:} false; then :
81ecdfbb
RW
1856 $as_echo_n "(cached) " >&6
1857fi
1858eval ac_res=\$$3
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860$as_echo "$ac_res" >&6; }
1861else
1862 # Is the header compilable?
1863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1864$as_echo_n "checking $2 usability... " >&6; }
1865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1866/* end confdefs.h. */
1867$4
1868#include <$2>
1869_ACEOF
1870if ac_fn_c_try_compile "$LINENO"; then :
1871 ac_header_compiler=yes
1872else
1873 ac_header_compiler=no
1874fi
1875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1877$as_echo "$ac_header_compiler" >&6; }
bec39cab 1878
81ecdfbb
RW
1879# Is the header present?
1880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1881$as_echo_n "checking $2 presence... " >&6; }
1882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883/* end confdefs.h. */
1884#include <$2>
1885_ACEOF
1886if ac_fn_c_try_cpp "$LINENO"; then :
1887 ac_header_preproc=yes
1888else
1889 ac_header_preproc=no
1890fi
d0ac1c44 1891rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1893$as_echo "$ac_header_preproc" >&6; }
bec39cab 1894
81ecdfbb
RW
1895# So? What about this header?
1896case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1897 yes:no: )
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1899$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1901$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1902 ;;
1903 no:yes:* )
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1905$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1907$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1909$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1911$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1913$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1914 ;;
1915esac
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1917$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1918if eval \${$3+:} false; then :
81ecdfbb
RW
1919 $as_echo_n "(cached) " >&6
1920else
1921 eval "$3=\$ac_header_compiler"
1922fi
1923eval ac_res=\$$3
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925$as_echo "$ac_res" >&6; }
1926fi
d0ac1c44 1927 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1928
81ecdfbb 1929} # ac_fn_c_check_header_mongrel
bec39cab 1930
81ecdfbb
RW
1931# ac_fn_c_try_run LINENO
1932# ----------------------
1933# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1934# that executables *can* be run.
1935ac_fn_c_try_run ()
1936{
1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938 if { { ac_try="$ac_link"
1939case "(($ac_try" in
1940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1941 *) ac_try_echo=$ac_try;;
1942esac
1943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1944$as_echo "$ac_try_echo"; } >&5
1945 (eval "$ac_link") 2>&5
1946 ac_status=$?
1947 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1948 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1949 { { case "(($ac_try" in
1950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1951 *) ac_try_echo=$ac_try;;
1952esac
1953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1954$as_echo "$ac_try_echo"; } >&5
1955 (eval "$ac_try") 2>&5
1956 ac_status=$?
1957 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1958 test $ac_status = 0; }; }; then :
1959 ac_retval=0
1960else
1961 $as_echo "$as_me: program exited with status $ac_status" >&5
1962 $as_echo "$as_me: failed program was:" >&5
1963sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1964
81ecdfbb
RW
1965 ac_retval=$ac_status
1966fi
1967 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1968 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1969 as_fn_set_status $ac_retval
bec39cab 1970
81ecdfbb 1971} # ac_fn_c_try_run
bec39cab 1972
81ecdfbb
RW
1973# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1974# -------------------------------------------------------
1975# Tests whether HEADER exists and can be compiled using the include files in
1976# INCLUDES, setting the cache variable VAR accordingly.
1977ac_fn_c_check_header_compile ()
1978{
1979 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1981$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1982if eval \${$3+:} false; then :
81ecdfbb
RW
1983 $as_echo_n "(cached) " >&6
1984else
1985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1986/* end confdefs.h. */
1987$4
1988#include <$2>
bec39cab 1989_ACEOF
81ecdfbb
RW
1990if ac_fn_c_try_compile "$LINENO"; then :
1991 eval "$3=yes"
1992else
1993 eval "$3=no"
1994fi
1995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1996fi
1997eval ac_res=\$$3
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1999$as_echo "$ac_res" >&6; }
d0ac1c44 2000 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2001
81ecdfbb 2002} # ac_fn_c_check_header_compile
bec39cab 2003
2974be62
AM
2004# ac_fn_c_try_link LINENO
2005# -----------------------
2006# Try to link conftest.$ac_ext, and return whether this succeeded.
2007ac_fn_c_try_link ()
2008{
2009 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010 rm -f conftest.$ac_objext conftest$ac_exeext
2011 if { { ac_try="$ac_link"
2012case "(($ac_try" in
2013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2014 *) ac_try_echo=$ac_try;;
2015esac
2016eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2017$as_echo "$ac_try_echo"; } >&5
2018 (eval "$ac_link") 2>conftest.err
2019 ac_status=$?
2020 if test -s conftest.err; then
2021 grep -v '^ *+' conftest.err >conftest.er1
2022 cat conftest.er1 >&5
2023 mv -f conftest.er1 conftest.err
2024 fi
2025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2026 test $ac_status = 0; } && {
2027 test -z "$ac_c_werror_flag" ||
2028 test ! -s conftest.err
2029 } && test -s conftest$ac_exeext && {
2030 test "$cross_compiling" = yes ||
d0ac1c44 2031 test -x conftest$ac_exeext
2974be62
AM
2032 }; then :
2033 ac_retval=0
2034else
2035 $as_echo "$as_me: failed program was:" >&5
2036sed 's/^/| /' conftest.$ac_ext >&5
2037
2038 ac_retval=1
2039fi
2040 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2041 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2042 # interfere with the next link command; also delete a directory that is
2043 # left behind by Apple's compiler. We do this before executing the actions.
2044 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2045 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2046 as_fn_set_status $ac_retval
2974be62
AM
2047
2048} # ac_fn_c_try_link
2049
81ecdfbb
RW
2050# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2051# --------------------------------------------
2052# Tries to find the compile-time value of EXPR in a program that includes
2053# INCLUDES, setting VAR accordingly. Returns whether the value could be
2054# computed
2055ac_fn_c_compute_int ()
2056{
2057 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2058 if test "$cross_compiling" = yes; then
2059 # Depending upon the size, compute the lo and hi bounds.
2060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h. */
2062$4
2063int
2064main ()
2065{
2066static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2067test_array [0] = 0;
2068return test_array [0];
bec39cab 2069
81ecdfbb
RW
2070 ;
2071 return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_lo=0 ac_mid=0
2076 while :; do
2077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078/* end confdefs.h. */
2079$4
2080int
2081main ()
2082{
2083static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2084test_array [0] = 0;
2085return test_array [0];
bec39cab 2086
81ecdfbb
RW
2087 ;
2088 return 0;
2089}
2090_ACEOF
2091if ac_fn_c_try_compile "$LINENO"; then :
2092 ac_hi=$ac_mid; break
2093else
2094 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2095 if test $ac_lo -le $ac_mid; then
2096 ac_lo= ac_hi=
2097 break
2098 fi
2099 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2100fi
81ecdfbb
RW
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102 done
c906108c 2103else
81ecdfbb
RW
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2111test_array [0] = 0;
2112return test_array [0];
bec39cab 2113
81ecdfbb
RW
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=-1 ac_mid=-1
2120 while :; do
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124int
2125main ()
2126{
2127static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2128test_array [0] = 0;
2129return test_array [0];
bec39cab 2130
81ecdfbb
RW
2131 ;
2132 return 0;
2133}
2134_ACEOF
2135if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_lo=$ac_mid; break
2137else
2138 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2139 if test $ac_mid -le $ac_hi; then
2140 ac_lo= ac_hi=
2141 break
2142 fi
2143 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146 done
2147else
2148 ac_lo= ac_hi=
2149fi
2150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151fi
2152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2153# Binary search between lo and hi bounds.
2154while test "x$ac_lo" != "x$ac_hi"; do
2155 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157/* end confdefs.h. */
2158$4
2159int
2160main ()
2161{
2162static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2163test_array [0] = 0;
2164return test_array [0];
bec39cab 2165
81ecdfbb
RW
2166 ;
2167 return 0;
2168}
2169_ACEOF
2170if ac_fn_c_try_compile "$LINENO"; then :
2171 ac_hi=$ac_mid
2172else
2173 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2174fi
2175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2176done
2177case $ac_lo in #((
2178?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2179'') ac_retval=1 ;;
2180esac
2181 else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184$4
2185static long int longval () { return $2; }
2186static unsigned long int ulongval () { return $2; }
2187#include <stdio.h>
2188#include <stdlib.h>
2189int
2190main ()
2191{
bec39cab 2192
81ecdfbb
RW
2193 FILE *f = fopen ("conftest.val", "w");
2194 if (! f)
2195 return 1;
2196 if (($2) < 0)
2197 {
2198 long int i = longval ();
2199 if (i != ($2))
2200 return 1;
2201 fprintf (f, "%ld", i);
2202 }
2203 else
2204 {
2205 unsigned long int i = ulongval ();
2206 if (i != ($2))
2207 return 1;
2208 fprintf (f, "%lu", i);
2209 }
2210 /* Do not output a trailing newline, as this causes \r\n confusion
2211 on some platforms. */
2212 return ferror (f) || fclose (f) != 0;
bec39cab 2213
81ecdfbb
RW
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_run "$LINENO"; then :
2219 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2220else
2221 ac_retval=1
2222fi
2223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2224 conftest.$ac_objext conftest.beam conftest.$ac_ext
2225rm -f conftest.val
bec39cab 2226
81ecdfbb 2227 fi
d0ac1c44
SM
2228 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2229 as_fn_set_status $ac_retval
bec39cab 2230
81ecdfbb 2231} # ac_fn_c_compute_int
bec39cab 2232
55a8c076
YQ
2233# ac_fn_c_check_func LINENO FUNC VAR
2234# ----------------------------------
2235# Tests whether FUNC exists, setting the cache variable VAR accordingly
2236ac_fn_c_check_func ()
81ecdfbb
RW
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2240$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2241if eval \${$3+:} false; then :
81ecdfbb
RW
2242 $as_echo_n "(cached) " >&6
2243else
81ecdfbb
RW
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
55a8c076
YQ
2246/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2247 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2248#define $2 innocuous_$2
2249
2250/* System header to define __stub macros and hopefully few prototypes,
2251 which can conflict with char $2 (); below.
2252 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2253 <limits.h> exists even on freestanding compilers. */
2254
2255#ifdef __STDC__
2256# include <limits.h>
2257#else
2258# include <assert.h>
2259#endif
2260
2261#undef $2
2262
2263/* Override any GCC internal prototype to avoid an error.
2264 Use char because int might match the return type of a GCC
2265 builtin and then its argument prototype would still apply. */
2266#ifdef __cplusplus
2267extern "C"
2268#endif
2269char $2 ();
2270/* The GNU C library defines this for functions which it implements
2271 to always fail with ENOSYS. Some functions are actually named
2272 something starting with __ and the normal name is an alias. */
2273#if defined __stub_$2 || defined __stub___$2
2274choke me
2275#endif
2276
2277int
2278main ()
2279{
2280return $2 ();
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285if ac_fn_c_try_link "$LINENO"; then :
2286 eval "$3=yes"
2287else
2288 eval "$3=no"
2289fi
2290rm -f core conftest.err conftest.$ac_objext \
2291 conftest$ac_exeext conftest.$ac_ext
2292fi
2293eval ac_res=\$$3
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2295$as_echo "$ac_res" >&6; }
d0ac1c44 2296 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2297
2298} # ac_fn_c_check_func
2299
c56ccc05
MM
2300# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2301# ----------------------------------------------------
2302# Tries to find if the field MEMBER exists in type AGGR, after including
2303# INCLUDES, setting cache variable VAR accordingly.
2304ac_fn_c_check_member ()
2305{
2306 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2308$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2309if eval \${$4+:} false; then :
c56ccc05
MM
2310 $as_echo_n "(cached) " >&6
2311else
2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h. */
2314$5
2315int
2316main ()
2317{
2318static $2 ac_aggr;
2319if (ac_aggr.$3)
2320return 0;
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$4=yes"
2327else
2328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h. */
2330$5
2331int
2332main ()
2333{
2334static $2 ac_aggr;
2335if (sizeof ac_aggr.$3)
2336return 0;
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341if ac_fn_c_try_compile "$LINENO"; then :
2342 eval "$4=yes"
2343else
2344 eval "$4=no"
2345fi
2346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347fi
2348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349fi
2350eval ac_res=\$$4
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2352$as_echo "$ac_res" >&6; }
d0ac1c44 2353 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2354
2355} # ac_fn_c_check_member
2356
07697489
PA
2357# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2358# -------------------------------------------
2359# Tests whether TYPE exists after having included INCLUDES, setting cache
2360# variable VAR accordingly.
2361ac_fn_c_check_type ()
2362{
2363 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2365$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2366if eval \${$3+:} false; then :
07697489
PA
2367 $as_echo_n "(cached) " >&6
2368else
2369 eval "$3=no"
2370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371/* end confdefs.h. */
2372$4
2373int
2374main ()
2375{
2376if (sizeof ($2))
2377 return 0;
2378 ;
2379 return 0;
2380}
2381_ACEOF
2382if ac_fn_c_try_compile "$LINENO"; then :
2383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2384/* end confdefs.h. */
2385$4
2386int
2387main ()
2388{
2389if (sizeof (($2)))
2390 return 0;
2391 ;
2392 return 0;
2393}
2394_ACEOF
2395if ac_fn_c_try_compile "$LINENO"; then :
2396
2397else
2398 eval "$3=yes"
2399fi
2400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403fi
2404eval ac_res=\$$3
2405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406$as_echo "$ac_res" >&6; }
d0ac1c44 2407 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2408
2409} # ac_fn_c_check_type
2410
d0ac1c44
SM
2411# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2412# ---------------------------------------------
2413# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2414# accordingly.
770d76d7
PA
2415ac_fn_c_check_decl ()
2416{
2417 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418 as_decl_name=`echo $2|sed 's/ *(.*//'`
2419 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2421$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2422if eval \${$3+:} false; then :
770d76d7
PA
2423 $as_echo_n "(cached) " >&6
2424else
2425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426/* end confdefs.h. */
2427$4
2428int
2429main ()
2430{
2431#ifndef $as_decl_name
2432#ifdef __cplusplus
2433 (void) $as_decl_use;
2434#else
2435 (void) $as_decl_name;
2436#endif
2437#endif
2438
2439 ;
2440 return 0;
2441}
2442_ACEOF
2443if ac_fn_c_try_compile "$LINENO"; then :
2444 eval "$3=yes"
2445else
2446 eval "$3=no"
2447fi
2448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449fi
2450eval ac_res=\$$3
2451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2452$as_echo "$ac_res" >&6; }
d0ac1c44 2453 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2454
2455} # ac_fn_c_check_decl
f35d5ade
TT
2456
2457# ac_fn_cxx_try_link LINENO
2458# -------------------------
2459# Try to link conftest.$ac_ext, and return whether this succeeded.
2460ac_fn_cxx_try_link ()
2461{
2462 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2463 rm -f conftest.$ac_objext conftest$ac_exeext
2464 if { { ac_try="$ac_link"
2465case "(($ac_try" in
2466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2467 *) ac_try_echo=$ac_try;;
2468esac
2469eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2470$as_echo "$ac_try_echo"; } >&5
2471 (eval "$ac_link") 2>conftest.err
2472 ac_status=$?
2473 if test -s conftest.err; then
2474 grep -v '^ *+' conftest.err >conftest.er1
2475 cat conftest.er1 >&5
2476 mv -f conftest.er1 conftest.err
2477 fi
2478 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2479 test $ac_status = 0; } && {
2480 test -z "$ac_cxx_werror_flag" ||
2481 test ! -s conftest.err
2482 } && test -s conftest$ac_exeext && {
2483 test "$cross_compiling" = yes ||
2484 test -x conftest$ac_exeext
2485 }; then :
2486 ac_retval=0
2487else
2488 $as_echo "$as_me: failed program was:" >&5
2489sed 's/^/| /' conftest.$ac_ext >&5
2490
2491 ac_retval=1
2492fi
2493 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2494 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2495 # interfere with the next link command; also delete a directory that is
2496 # left behind by Apple's compiler. We do this before executing the actions.
2497 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2498 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2499 as_fn_set_status $ac_retval
2500
2501} # ac_fn_cxx_try_link
81ecdfbb
RW
2502cat >config.log <<_ACEOF
2503This file contains any messages produced by compilers while
2504running configure, to aid debugging if configure makes a mistake.
d5af19ba 2505
81ecdfbb 2506It was created by $as_me, which was
d0ac1c44 2507generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2508
81ecdfbb 2509 $ $0 $@
413ccac7 2510
81ecdfbb
RW
2511_ACEOF
2512exec 5>>config.log
2513{
2514cat <<_ASUNAME
2515## --------- ##
2516## Platform. ##
2517## --------- ##
413ccac7 2518
81ecdfbb
RW
2519hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2520uname -m = `(uname -m) 2>/dev/null || echo unknown`
2521uname -r = `(uname -r) 2>/dev/null || echo unknown`
2522uname -s = `(uname -s) 2>/dev/null || echo unknown`
2523uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2524
81ecdfbb
RW
2525/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2526/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2527
81ecdfbb
RW
2528/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2529/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2530/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2531/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2532/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2533/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2534/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2535
81ecdfbb 2536_ASUNAME
bec39cab 2537
bec39cab
AC
2538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2539for as_dir in $PATH
2540do
2541 IFS=$as_save_IFS
2542 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2543 $as_echo "PATH: $as_dir"
2544 done
2545IFS=$as_save_IFS
bec39cab 2546
81ecdfbb 2547} >&5
bec39cab 2548
81ecdfbb 2549cat >&5 <<_ACEOF
bec39cab 2550
bec39cab 2551
81ecdfbb
RW
2552## ----------- ##
2553## Core tests. ##
2554## ----------- ##
2555
2556_ACEOF
2557
2558
2559# Keep a trace of the command line.
2560# Strip out --no-create and --no-recursion so they do not pile up.
2561# Strip out --silent because we don't want to record it for future runs.
2562# Also quote any args containing shell meta-characters.
2563# Make two passes to allow for proper duplicate-argument suppression.
2564ac_configure_args=
2565ac_configure_args0=
2566ac_configure_args1=
2567ac_must_keep_next=false
2568for ac_pass in 1 2
2569do
2570 for ac_arg
2571 do
2572 case $ac_arg in
2573 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2574 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2575 | -silent | --silent | --silen | --sile | --sil)
2576 continue ;;
2577 *\'*)
2578 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2579 esac
2580 case $ac_pass in
2581 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2582 2)
2583 as_fn_append ac_configure_args1 " '$ac_arg'"
2584 if test $ac_must_keep_next = true; then
2585 ac_must_keep_next=false # Got value, back to normal.
2586 else
2587 case $ac_arg in
2588 *=* | --config-cache | -C | -disable-* | --disable-* \
2589 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2590 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2591 | -with-* | --with-* | -without-* | --without-* | --x)
2592 case "$ac_configure_args0 " in
2593 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2594 esac
2595 ;;
2596 -* ) ac_must_keep_next=true ;;
2597 esac
2598 fi
2599 as_fn_append ac_configure_args " '$ac_arg'"
2600 ;;
2601 esac
2602 done
2603done
2604{ ac_configure_args0=; unset ac_configure_args0;}
2605{ ac_configure_args1=; unset ac_configure_args1;}
2606
2607# When interrupted or exit'd, cleanup temporary files, and complete
2608# config.log. We remove comments because anyway the quotes in there
2609# would cause problems or look ugly.
2610# WARNING: Use '\'' to represent an apostrophe within the trap.
2611# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2612trap 'exit_status=$?
2613 # Save into config.log some information that might help in debugging.
2614 {
2615 echo
2616
d0ac1c44 2617 $as_echo "## ---------------- ##
81ecdfbb 2618## Cache variables. ##
d0ac1c44 2619## ---------------- ##"
81ecdfbb
RW
2620 echo
2621 # The following way of writing the cache mishandles newlines in values,
2622(
2623 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2624 eval ac_val=\$$ac_var
2625 case $ac_val in #(
2626 *${as_nl}*)
2627 case $ac_var in #(
2628 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2629$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2630 esac
2631 case $ac_var in #(
2632 _ | IFS | as_nl) ;; #(
2633 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2634 *) { eval $ac_var=; unset $ac_var;} ;;
2635 esac ;;
2636 esac
2637 done
2638 (set) 2>&1 |
2639 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2640 *${as_nl}ac_space=\ *)
2641 sed -n \
2642 "s/'\''/'\''\\\\'\'''\''/g;
2643 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2644 ;; #(
2645 *)
2646 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2647 ;;
2648 esac |
2649 sort
2650)
2651 echo
2652
d0ac1c44 2653 $as_echo "## ----------------- ##
81ecdfbb 2654## Output variables. ##
d0ac1c44 2655## ----------------- ##"
81ecdfbb
RW
2656 echo
2657 for ac_var in $ac_subst_vars
2658 do
2659 eval ac_val=\$$ac_var
2660 case $ac_val in
2661 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2662 esac
2663 $as_echo "$ac_var='\''$ac_val'\''"
2664 done | sort
2665 echo
2666
2667 if test -n "$ac_subst_files"; then
d0ac1c44 2668 $as_echo "## ------------------- ##
81ecdfbb 2669## File substitutions. ##
d0ac1c44 2670## ------------------- ##"
81ecdfbb
RW
2671 echo
2672 for ac_var in $ac_subst_files
2673 do
2674 eval ac_val=\$$ac_var
2675 case $ac_val in
2676 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2677 esac
2678 $as_echo "$ac_var='\''$ac_val'\''"
2679 done | sort
2680 echo
2681 fi
2682
2683 if test -s confdefs.h; then
d0ac1c44 2684 $as_echo "## ----------- ##
81ecdfbb 2685## confdefs.h. ##
d0ac1c44 2686## ----------- ##"
81ecdfbb
RW
2687 echo
2688 cat confdefs.h
2689 echo
2690 fi
2691 test "$ac_signal" != 0 &&
2692 $as_echo "$as_me: caught signal $ac_signal"
2693 $as_echo "$as_me: exit $exit_status"
2694 } >&5
2695 rm -f core *.core core.conftest.* &&
2696 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2697 exit $exit_status
2698' 0
2699for ac_signal in 1 2 13 15; do
2700 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2701done
2702ac_signal=0
2703
2704# confdefs.h avoids OS command line length limits that DEFS can exceed.
2705rm -f -r conftest* confdefs.h
2706
2707$as_echo "/* confdefs.h */" > confdefs.h
2708
2709# Predefined preprocessor variables.
2710
2711cat >>confdefs.h <<_ACEOF
2712#define PACKAGE_NAME "$PACKAGE_NAME"
2713_ACEOF
2714
2715cat >>confdefs.h <<_ACEOF
2716#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2717_ACEOF
2718
2719cat >>confdefs.h <<_ACEOF
2720#define PACKAGE_VERSION "$PACKAGE_VERSION"
2721_ACEOF
2722
2723cat >>confdefs.h <<_ACEOF
2724#define PACKAGE_STRING "$PACKAGE_STRING"
2725_ACEOF
2726
2727cat >>confdefs.h <<_ACEOF
2728#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2729_ACEOF
2730
2731cat >>confdefs.h <<_ACEOF
2732#define PACKAGE_URL "$PACKAGE_URL"
2733_ACEOF
2734
2735
2736# Let the site file select an alternate cache file if it wants to.
2737# Prefer an explicitly selected file to automatically selected ones.
2738ac_site_file1=NONE
2739ac_site_file2=NONE
2740if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2741 # We do not want a PATH search for config.site.
2742 case $CONFIG_SITE in #((
2743 -*) ac_site_file1=./$CONFIG_SITE;;
2744 */*) ac_site_file1=$CONFIG_SITE;;
2745 *) ac_site_file1=./$CONFIG_SITE;;
2746 esac
81ecdfbb
RW
2747elif test "x$prefix" != xNONE; then
2748 ac_site_file1=$prefix/share/config.site
2749 ac_site_file2=$prefix/etc/config.site
2750else
2751 ac_site_file1=$ac_default_prefix/share/config.site
2752 ac_site_file2=$ac_default_prefix/etc/config.site
2753fi
2754for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2755do
2756 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2757 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2759$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2760 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2761 . "$ac_site_file" \
2762 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2764as_fn_error $? "failed to load site script $ac_site_file
2765See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2766 fi
2767done
2768
2769if test -r "$cache_file"; then
d0ac1c44
SM
2770 # Some versions of bash will fail to source /dev/null (special files
2771 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2772 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2774$as_echo "$as_me: loading cache $cache_file" >&6;}
2775 case $cache_file in
2776 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2777 *) . "./$cache_file";;
2778 esac
2779 fi
2780else
2781 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2782$as_echo "$as_me: creating cache $cache_file" >&6;}
2783 >$cache_file
bec39cab
AC
2784fi
2785
d0ac1c44
SM
2786as_fn_append ac_header_list " stdlib.h"
2787as_fn_append ac_header_list " unistd.h"
2788as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2789# Check that the precious variables saved in the cache have kept the same
2790# value.
2791ac_cache_corrupted=false
2792for ac_var in $ac_precious_vars; do
2793 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2794 eval ac_new_set=\$ac_env_${ac_var}_set
2795 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2796 eval ac_new_val=\$ac_env_${ac_var}_value
2797 case $ac_old_set,$ac_new_set in
2798 set,)
2799 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2800$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2801 ac_cache_corrupted=: ;;
2802 ,set)
2803 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2804$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2805 ac_cache_corrupted=: ;;
2806 ,);;
2807 *)
2808 if test "x$ac_old_val" != "x$ac_new_val"; then
2809 # differences in whitespace do not lead to failure.
2810 ac_old_val_w=`echo x $ac_old_val`
2811 ac_new_val_w=`echo x $ac_new_val`
2812 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2813 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2814$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2815 ac_cache_corrupted=:
2816 else
2817 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2818$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2819 eval $ac_var=\$ac_old_val
2820 fi
2821 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2822$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2824$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2825 fi;;
2826 esac
2827 # Pass precious variables to config.status.
2828 if test "$ac_new_set" = set; then
2829 case $ac_new_val in
2830 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2831 *) ac_arg=$ac_var=$ac_new_val ;;
2832 esac
2833 case " $ac_configure_args " in
2834 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2835 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2836 esac
2837 fi
2838done
2839if $ac_cache_corrupted; then
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2843$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2844 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2845fi
2846## -------------------- ##
2847## Main body of script. ##
2848## -------------------- ##
2849
2850ac_ext=c
2851ac_cpp='$CPP $CPPFLAGS'
2852ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2853ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2854ac_compiler_gnu=$ac_cv_c_compiler_gnu
2855
2856
2857
2858
2859
2860ac_config_headers="$ac_config_headers config.h:config.in"
2861
2862
2863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2864$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2865 # Check whether --enable-maintainer-mode was given.
2866if test "${enable_maintainer_mode+set}" = set; then :
2867 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2868else
2869 USE_MAINTAINER_MODE=no
2870fi
2871
2872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2873$as_echo "$USE_MAINTAINER_MODE" >&6; }
2874 if test $USE_MAINTAINER_MODE = yes; then
2875 MAINTAINER_MODE_TRUE=
2876 MAINTAINER_MODE_FALSE='#'
2877else
2878 MAINTAINER_MODE_TRUE='#'
2879 MAINTAINER_MODE_FALSE=
2880fi
2881
2882 MAINT=$MAINTAINER_MODE_TRUE
2883
2884
2885
17ef446e 2886# Set the 'development' global.
270c9937 2887. $srcdir/../bfd/development.sh
f5f1cdb6 2888
81ecdfbb
RW
2889ac_ext=c
2890ac_cpp='$CPP $CPPFLAGS'
2891ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2892ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2893ac_compiler_gnu=$ac_cv_c_compiler_gnu
2894if test -n "$ac_tool_prefix"; then
2895 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2896set dummy ${ac_tool_prefix}gcc; ac_word=$2
2897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2898$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2899if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2900 $as_echo_n "(cached) " >&6
c906108c
SS
2901else
2902 if test -n "$CC"; then
2903 ac_cv_prog_CC="$CC" # Let the user override the test.
2904else
bec39cab
AC
2905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2906for as_dir in $PATH
2907do
2908 IFS=$as_save_IFS
2909 test -z "$as_dir" && as_dir=.
81ecdfbb 2910 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2911 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2912 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2914 break 2
2915 fi
2916done
81ecdfbb
RW
2917 done
2918IFS=$as_save_IFS
bec39cab 2919
c906108c
SS
2920fi
2921fi
bec39cab 2922CC=$ac_cv_prog_CC
c906108c 2923if test -n "$CC"; then
81ecdfbb
RW
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2925$as_echo "$CC" >&6; }
c906108c 2926else
81ecdfbb
RW
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2928$as_echo "no" >&6; }
c906108c
SS
2929fi
2930
81ecdfbb 2931
b4e70030
JB
2932fi
2933if test -z "$ac_cv_prog_CC"; then
2934 ac_ct_CC=$CC
81ecdfbb
RW
2935 # Extract the first word of "gcc", so it can be a program name with args.
2936set dummy gcc; ac_word=$2
2937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2938$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2939if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2940 $as_echo_n "(cached) " >&6
b4e70030
JB
2941else
2942 if test -n "$ac_ct_CC"; then
2943 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2944else
2945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2946for as_dir in $PATH
2947do
2948 IFS=$as_save_IFS
2949 test -z "$as_dir" && as_dir=.
81ecdfbb 2950 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2951 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2952 ac_cv_prog_ac_ct_CC="gcc"
2953 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2954 break 2
4e8d927d 2955 fi
b4e70030 2956done
81ecdfbb
RW
2957 done
2958IFS=$as_save_IFS
b4e70030
JB
2959
2960fi
2961fi
2962ac_ct_CC=$ac_cv_prog_ac_ct_CC
2963if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2965$as_echo "$ac_ct_CC" >&6; }
b4e70030 2966else
81ecdfbb
RW
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2968$as_echo "no" >&6; }
b4e70030
JB
2969fi
2970
81ecdfbb
RW
2971 if test "x$ac_ct_CC" = x; then
2972 CC=""
2973 else
2974 case $cross_compiling:$ac_tool_warned in
2975yes:)
2976{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2977$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2978ac_tool_warned=yes ;;
2979esac
2980 CC=$ac_ct_CC
2981 fi
b4e70030
JB
2982else
2983 CC="$ac_cv_prog_CC"
2984fi
2985
c906108c 2986if test -z "$CC"; then
81ecdfbb
RW
2987 if test -n "$ac_tool_prefix"; then
2988 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2989set dummy ${ac_tool_prefix}cc; ac_word=$2
2990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2991$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2992if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2993 $as_echo_n "(cached) " >&6
c906108c
SS
2994else
2995 if test -n "$CC"; then
2996 ac_cv_prog_CC="$CC" # Let the user override the test.
2997else
bec39cab
AC
2998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2999for as_dir in $PATH
3000do
3001 IFS=$as_save_IFS
3002 test -z "$as_dir" && as_dir=.
81ecdfbb 3003 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3005 ac_cv_prog_CC="${ac_tool_prefix}cc"
3006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3007 break 2
3008 fi
3009done
81ecdfbb
RW
3010 done
3011IFS=$as_save_IFS
3012
3013fi
3014fi
3015CC=$ac_cv_prog_CC
3016if test -n "$CC"; then
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3018$as_echo "$CC" >&6; }
3019else
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3021$as_echo "no" >&6; }
3022fi
3023
3024
3025 fi
3026fi
3027if test -z "$CC"; then
3028 # Extract the first word of "cc", so it can be a program name with args.
3029set dummy cc; ac_word=$2
3030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3031$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3032if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3033 $as_echo_n "(cached) " >&6
3034else
3035 if test -n "$CC"; then
3036 ac_cv_prog_CC="$CC" # Let the user override the test.
3037else
3038 ac_prog_rejected=no
3039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3040for as_dir in $PATH
3041do
3042 IFS=$as_save_IFS
3043 test -z "$as_dir" && as_dir=.
3044 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3046 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3047 ac_prog_rejected=yes
3048 continue
3049 fi
3050 ac_cv_prog_CC="cc"
3051 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3052 break 2
3053 fi
3054done
3055 done
3056IFS=$as_save_IFS
bec39cab 3057
c906108c
SS
3058if test $ac_prog_rejected = yes; then
3059 # We found a bogon in the path, so make sure we never use it.
3060 set dummy $ac_cv_prog_CC
3061 shift
bec39cab 3062 if test $# != 0; then
c906108c
SS
3063 # We chose a different compiler from the bogus one.
3064 # However, it has the same basename, so the bogon will be chosen
3065 # first if we set CC to just the basename; use the full file name.
3066 shift
bec39cab 3067 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3068 fi
3069fi
3070fi
3071fi
bec39cab 3072CC=$ac_cv_prog_CC
c906108c 3073if test -n "$CC"; then
81ecdfbb
RW
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3075$as_echo "$CC" >&6; }
c906108c 3076else
81ecdfbb
RW
3077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3078$as_echo "no" >&6; }
c906108c
SS
3079fi
3080
81ecdfbb 3081
bec39cab
AC
3082fi
3083if test -z "$CC"; then
3084 if test -n "$ac_tool_prefix"; then
81ecdfbb 3085 for ac_prog in cl.exe
bec39cab
AC
3086 do
3087 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3088set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3090$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3091if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3092 $as_echo_n "(cached) " >&6
c906108c
SS
3093else
3094 if test -n "$CC"; then
3095 ac_cv_prog_CC="$CC" # Let the user override the test.
3096else
bec39cab
AC
3097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3098for as_dir in $PATH
3099do
3100 IFS=$as_save_IFS
3101 test -z "$as_dir" && as_dir=.
81ecdfbb 3102 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3103 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3104 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3106 break 2
3107 fi
3108done
81ecdfbb
RW
3109 done
3110IFS=$as_save_IFS
bec39cab 3111
c906108c
SS
3112fi
3113fi
bec39cab 3114CC=$ac_cv_prog_CC
c906108c 3115if test -n "$CC"; then
81ecdfbb
RW
3116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3117$as_echo "$CC" >&6; }
c906108c 3118else
81ecdfbb
RW
3119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3120$as_echo "no" >&6; }
c906108c 3121fi
bec39cab 3122
81ecdfbb 3123
bec39cab
AC
3124 test -n "$CC" && break
3125 done
3126fi
3127if test -z "$CC"; then
3128 ac_ct_CC=$CC
81ecdfbb 3129 for ac_prog in cl.exe
bec39cab
AC
3130do
3131 # Extract the first word of "$ac_prog", so it can be a program name with args.
3132set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3134$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3135if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3136 $as_echo_n "(cached) " >&6
bec39cab
AC
3137else
3138 if test -n "$ac_ct_CC"; then
3139 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3140else
3141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3142for as_dir in $PATH
3143do
3144 IFS=$as_save_IFS
3145 test -z "$as_dir" && as_dir=.
81ecdfbb 3146 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3147 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3148 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3149 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3150 break 2
c906108c 3151 fi
bec39cab 3152done
81ecdfbb
RW
3153 done
3154IFS=$as_save_IFS
bec39cab
AC
3155
3156fi
3157fi
3158ac_ct_CC=$ac_cv_prog_ac_ct_CC
3159if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3161$as_echo "$ac_ct_CC" >&6; }
bec39cab 3162else
81ecdfbb
RW
3163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3164$as_echo "no" >&6; }
c906108c
SS
3165fi
3166
81ecdfbb 3167
bec39cab
AC
3168 test -n "$ac_ct_CC" && break
3169done
c906108c 3170
81ecdfbb
RW
3171 if test "x$ac_ct_CC" = x; then
3172 CC=""
3173 else
3174 case $cross_compiling:$ac_tool_warned in
3175yes:)
3176{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3177$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3178ac_tool_warned=yes ;;
3179esac
3180 CC=$ac_ct_CC
3181 fi
bec39cab
AC
3182fi
3183
3184fi
3185
3186
81ecdfbb
RW
3187test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3189as_fn_error $? "no acceptable C compiler found in \$PATH
3190See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3191
3192# Provide some information about the compiler.
81ecdfbb
RW
3193$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3194set X $ac_compile
3195ac_compiler=$2
3196for ac_option in --version -v -V -qversion; do
3197 { { ac_try="$ac_compiler $ac_option >&5"
3198case "(($ac_try" in
3199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3200 *) ac_try_echo=$ac_try;;
3201esac
3202eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3203$as_echo "$ac_try_echo"; } >&5
3204 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3205 ac_status=$?
81ecdfbb
RW
3206 if test -s conftest.err; then
3207 sed '10a\
3208... rest of stderr output deleted ...
3209 10q' conftest.err >conftest.er1
3210 cat conftest.er1 >&5
81ecdfbb 3211 fi
d0ac1c44 3212 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3213 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3214 test $ac_status = 0; }
3215done
bec39cab 3216
81ecdfbb 3217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3218/* end confdefs.h. */
3219
3220int
3221main ()
3222{
3223
3224 ;
3225 return 0;
3226}
3227_ACEOF
3228ac_clean_files_save=$ac_clean_files
d0ac1c44 3229ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3230# Try to create an executable without -o first, disregard a.out.
3231# It will help us diagnose broken compilers, and finding out an intuition
3232# of exeext.
d0ac1c44
SM
3233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3234$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3235ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3236
3237# The possible output files:
3238ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3239
3240ac_rmfiles=
3241for ac_file in $ac_files
3242do
3243 case $ac_file in
3244 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3245 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3246 esac
3247done
3248rm -f $ac_rmfiles
3249
3250if { { ac_try="$ac_link_default"
3251case "(($ac_try" in
3252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3253 *) ac_try_echo=$ac_try;;
3254esac
3255eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3256$as_echo "$ac_try_echo"; } >&5
3257 (eval "$ac_link_default") 2>&5
3258 ac_status=$?
3259 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3260 test $ac_status = 0; }; then :
3261 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3262# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3263# in a Makefile. We should not override ac_cv_exeext if it was cached,
3264# so that the user can short-circuit this test for compilers unknown to
3265# Autoconf.
3266for ac_file in $ac_files ''
bec39cab
AC
3267do
3268 test -f "$ac_file" || continue
3269 case $ac_file in
81ecdfbb 3270 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3271 ;;
3272 [ab].out )
3273 # We found the default executable, but exeext='' is most
3274 # certainly right.
3275 break;;
3276 *.* )
81ecdfbb
RW
3277 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3278 then :; else
3279 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3280 fi
3281 # We set ac_cv_exeext here because the later test for it is not
3282 # safe: cross compilers may not add the suffix if given an `-o'
3283 # argument, so we may need to know it at that point already.
3284 # Even if this section looks crufty: it has the advantage of
3285 # actually working.
b4e70030
JB
3286 break;;
3287 * )
3288 break;;
bec39cab
AC
3289 esac
3290done
81ecdfbb
RW
3291test "$ac_cv_exeext" = no && ac_cv_exeext=
3292
bec39cab 3293else
81ecdfbb
RW
3294 ac_file=''
3295fi
81ecdfbb 3296if test -z "$ac_file"; then :
d0ac1c44
SM
3297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3298$as_echo "no" >&6; }
3299$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3300sed 's/^/| /' conftest.$ac_ext >&5
3301
81ecdfbb
RW
3302{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3303$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3304as_fn_error 77 "C compiler cannot create executables
3305See \`config.log' for more details" "$LINENO" 5; }
3306else
3307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3308$as_echo "yes" >&6; }
bec39cab 3309fi
d0ac1c44
SM
3310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3311$as_echo_n "checking for C compiler default output file name... " >&6; }
3312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3313$as_echo "$ac_file" >&6; }
b4e70030 3314ac_exeext=$ac_cv_exeext
b4e70030 3315
d0ac1c44 3316rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3317ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3319$as_echo_n "checking for suffix of executables... " >&6; }
3320if { { ac_try="$ac_link"
3321case "(($ac_try" in
3322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3323 *) ac_try_echo=$ac_try;;
3324esac
3325eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3326$as_echo "$ac_try_echo"; } >&5
3327 (eval "$ac_link") 2>&5
bec39cab 3328 ac_status=$?
81ecdfbb
RW
3329 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3330 test $ac_status = 0; }; then :
b4e70030
JB
3331 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3332# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3333# work properly (i.e., refer to `conftest.exe'), while it won't with
3334# `rm'.
3335for ac_file in conftest.exe conftest conftest.*; do
3336 test -f "$ac_file" || continue
3337 case $ac_file in
81ecdfbb 3338 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3339 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3340 break;;
3341 * ) break;;
3342 esac
3343done
c906108c 3344else
81ecdfbb
RW
3345 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3346$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3347as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3348See \`config.log' for more details" "$LINENO" 5; }
c906108c 3349fi
d0ac1c44 3350rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3352$as_echo "$ac_cv_exeext" >&6; }
c906108c 3353
b4e70030 3354rm -f conftest.$ac_ext
bec39cab
AC
3355EXEEXT=$ac_cv_exeext
3356ac_exeext=$EXEEXT
d0ac1c44
SM
3357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3358/* end confdefs.h. */
3359#include <stdio.h>
3360int
3361main ()
3362{
3363FILE *f = fopen ("conftest.out", "w");
3364 return ferror (f) || fclose (f) != 0;
3365
3366 ;
3367 return 0;
3368}
3369_ACEOF
3370ac_clean_files="$ac_clean_files conftest.out"
3371# Check that the compiler produces executables we can run. If not, either
3372# the compiler is broken, or we cross compile.
3373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3374$as_echo_n "checking whether we are cross compiling... " >&6; }
3375if test "$cross_compiling" != yes; then
3376 { { ac_try="$ac_link"
3377case "(($ac_try" in
3378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3379 *) ac_try_echo=$ac_try;;
3380esac
3381eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3382$as_echo "$ac_try_echo"; } >&5
3383 (eval "$ac_link") 2>&5
3384 ac_status=$?
3385 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3386 test $ac_status = 0; }
3387 if { ac_try='./conftest$ac_cv_exeext'
3388 { { case "(($ac_try" in
3389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3390 *) ac_try_echo=$ac_try;;
3391esac
3392eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3393$as_echo "$ac_try_echo"; } >&5
3394 (eval "$ac_try") 2>&5
3395 ac_status=$?
3396 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3397 test $ac_status = 0; }; }; then
3398 cross_compiling=no
3399 else
3400 if test "$cross_compiling" = maybe; then
3401 cross_compiling=yes
3402 else
3403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3405as_fn_error $? "cannot run C compiled programs.
3406If you meant to cross compile, use \`--host'.
3407See \`config.log' for more details" "$LINENO" 5; }
3408 fi
3409 fi
3410fi
3411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3412$as_echo "$cross_compiling" >&6; }
3413
3414rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3415ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3417$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3418if ${ac_cv_objext+:} false; then :
81ecdfbb 3419 $as_echo_n "(cached) " >&6
bec39cab 3420else
81ecdfbb 3421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3422/* end confdefs.h. */
3423
3424int
3425main ()
3426{
3427
3428 ;
3429 return 0;
3430}
3431_ACEOF
3432rm -f conftest.o conftest.obj
81ecdfbb
RW
3433if { { ac_try="$ac_compile"
3434case "(($ac_try" in
3435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3436 *) ac_try_echo=$ac_try;;
3437esac
3438eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3439$as_echo "$ac_try_echo"; } >&5
3440 (eval "$ac_compile") 2>&5
3441 ac_status=$?
3442 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3443 test $ac_status = 0; }; then :
3444 for ac_file in conftest.o conftest.obj conftest.*; do
3445 test -f "$ac_file" || continue;
bec39cab 3446 case $ac_file in
81ecdfbb 3447 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3448 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3449 break;;
3450 esac
3451done
c906108c 3452else
81ecdfbb 3453 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3454sed 's/^/| /' conftest.$ac_ext >&5
3455
81ecdfbb
RW
3456{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3457$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3458as_fn_error $? "cannot compute suffix of object files: cannot compile
3459See \`config.log' for more details" "$LINENO" 5; }
c906108c 3460fi
b4e70030 3461rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3462fi
81ecdfbb
RW
3463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3464$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3465OBJEXT=$ac_cv_objext
3466ac_objext=$OBJEXT
81ecdfbb
RW
3467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3468$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3469if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3470 $as_echo_n "(cached) " >&6
c906108c 3471else
81ecdfbb 3472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3473/* end confdefs.h. */
3474
3475int
3476main ()
3477{
3478#ifndef __GNUC__
3479 choke me
3480#endif
3481
3482 ;
3483 return 0;
3484}
3485_ACEOF
81ecdfbb 3486if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3487 ac_compiler_gnu=yes
3488else
81ecdfbb 3489 ac_compiler_gnu=no
bec39cab 3490fi
81ecdfbb 3491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3492ac_cv_c_compiler_gnu=$ac_compiler_gnu
3493
3494fi
81ecdfbb
RW
3495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3496$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3497if test $ac_compiler_gnu = yes; then
3498 GCC=yes
3499else
3500 GCC=
3501fi
bec39cab
AC
3502ac_test_CFLAGS=${CFLAGS+set}
3503ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3505$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3506if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3507 $as_echo_n "(cached) " >&6
bec39cab 3508else
81ecdfbb
RW
3509 ac_save_c_werror_flag=$ac_c_werror_flag
3510 ac_c_werror_flag=yes
3511 ac_cv_prog_cc_g=no
3512 CFLAGS="-g"
3513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3514/* end confdefs.h. */
3515
3516int
3517main ()
3518{
3519
3520 ;
3521 return 0;
3522}
3523_ACEOF
81ecdfbb 3524if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3525 ac_cv_prog_cc_g=yes
3526else
81ecdfbb
RW
3527 CFLAGS=""
3528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3529/* end confdefs.h. */
3530
3531int
3532main ()
3533{
3534
3535 ;
3536 return 0;
3537}
3538_ACEOF
3539if ac_fn_c_try_compile "$LINENO"; then :
3540
3541else
3542 ac_c_werror_flag=$ac_save_c_werror_flag
3543 CFLAGS="-g"
3544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3545/* end confdefs.h. */
3546
3547int
3548main ()
3549{
c906108c 3550
81ecdfbb
RW
3551 ;
3552 return 0;
3553}
3554_ACEOF
3555if ac_fn_c_try_compile "$LINENO"; then :
3556 ac_cv_prog_cc_g=yes
3557fi
3558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3559fi
3560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3561fi
81ecdfbb
RW
3562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3563 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3564fi
81ecdfbb
RW
3565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3566$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3567if test "$ac_test_CFLAGS" = set; then
bec39cab 3568 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3569elif test $ac_cv_prog_cc_g = yes; then
3570 if test "$GCC" = yes; then
3571 CFLAGS="-g -O2"
3572 else
3573 CFLAGS="-g"
3574 fi
3575else
3576 if test "$GCC" = yes; then
3577 CFLAGS="-O2"
3578 else
3579 CFLAGS=
3580 fi
3581fi
81ecdfbb
RW
3582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3583$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3584if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3585 $as_echo_n "(cached) " >&6
bec39cab 3586else
81ecdfbb 3587 ac_cv_prog_cc_c89=no
bec39cab 3588ac_save_CC=$CC
81ecdfbb 3589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3590/* end confdefs.h. */
c906108c
SS
3591#include <stdarg.h>
3592#include <stdio.h>
d0ac1c44 3593struct stat;
c906108c
SS
3594/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3595struct buf { int x; };
3596FILE * (*rcsopen) (struct buf *, struct stat *, int);
3597static char *e (p, i)
3598 char **p;
3599 int i;
3600{
3601 return p[i];
3602}
3603static char *f (char * (*g) (char **, int), char **p, ...)
3604{
3605 char *s;
3606 va_list v;
3607 va_start (v,p);
3608 s = g (p, va_arg (v,int));
3609 va_end (v);
3610 return s;
3611}
bec39cab
AC
3612
3613/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3614 function prototypes and stuff, but not '\xHH' hex character constants.
3615 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3616 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3617 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3618 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3619 that's true only with -std. */
bec39cab
AC
3620int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3621
81ecdfbb
RW
3622/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3623 inside strings and character constants. */
3624#define FOO(x) 'x'
3625int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3626
c906108c
SS
3627int test (int i, double x);
3628struct s1 {int (*f) (int a);};
3629struct s2 {int (*f) (double a);};
3630int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3631int argc;
3632char **argv;
bec39cab
AC
3633int
3634main ()
3635{
c906108c 3636return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3637 ;
3638 return 0;
3639}
3640_ACEOF
81ecdfbb
RW
3641for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3642 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3643do
3644 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3645 if ac_fn_c_try_compile "$LINENO"; then :
3646 ac_cv_prog_cc_c89=$ac_arg
c906108c 3647fi
81ecdfbb
RW
3648rm -f core conftest.err conftest.$ac_objext
3649 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3650done
81ecdfbb 3651rm -f conftest.$ac_ext
bec39cab 3652CC=$ac_save_CC
c906108c
SS
3653
3654fi
81ecdfbb
RW
3655# AC_CACHE_VAL
3656case "x$ac_cv_prog_cc_c89" in
3657 x)
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3659$as_echo "none needed" >&6; } ;;
3660 xno)
3661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3662$as_echo "unsupported" >&6; } ;;
bec39cab 3663 *)
81ecdfbb
RW
3664 CC="$CC $ac_cv_prog_cc_c89"
3665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3666$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3667esac
81ecdfbb 3668if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3669
b4e70030
JB
3670fi
3671
bec39cab
AC
3672ac_ext=c
3673ac_cpp='$CPP $CPPFLAGS'
3674ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3675ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3676ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3677
3bc3d82a
PA
3678ac_ext=cpp
3679ac_cpp='$CXXCPP $CPPFLAGS'
3680ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3681ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3682ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3683if test -z "$CXX"; then
3684 if test -n "$CCC"; then
3685 CXX=$CCC
3686 else
3687 if test -n "$ac_tool_prefix"; then
3688 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3689 do
3690 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3691set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3693$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3694if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3695 $as_echo_n "(cached) " >&6
3696else
3697 if test -n "$CXX"; then
3698 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3699else
3700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3701for as_dir in $PATH
3702do
3703 IFS=$as_save_IFS
3704 test -z "$as_dir" && as_dir=.
3705 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3707 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3709 break 2
3710 fi
3711done
3712 done
3713IFS=$as_save_IFS
3714
3715fi
3716fi
3717CXX=$ac_cv_prog_CXX
3718if test -n "$CXX"; then
3719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3720$as_echo "$CXX" >&6; }
3721else
3722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3723$as_echo "no" >&6; }
3724fi
3725
3726
3727 test -n "$CXX" && break
3728 done
3729fi
3730if test -z "$CXX"; then
3731 ac_ct_CXX=$CXX
3732 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3733do
3734 # Extract the first word of "$ac_prog", so it can be a program name with args.
3735set dummy $ac_prog; ac_word=$2
3736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3737$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3738if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3739 $as_echo_n "(cached) " >&6
3740else
3741 if test -n "$ac_ct_CXX"; then
3742 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3743else
3744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3745for as_dir in $PATH
3746do
3747 IFS=$as_save_IFS
3748 test -z "$as_dir" && as_dir=.
3749 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3751 ac_cv_prog_ac_ct_CXX="$ac_prog"
3752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3753 break 2
3754 fi
3755done
3756 done
3757IFS=$as_save_IFS
3758
3759fi
3760fi
3761ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3762if test -n "$ac_ct_CXX"; then
3763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3764$as_echo "$ac_ct_CXX" >&6; }
3765else
3766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3767$as_echo "no" >&6; }
3768fi
3769
3770
3771 test -n "$ac_ct_CXX" && break
3772done
3773
3774 if test "x$ac_ct_CXX" = x; then
3775 CXX="g++"
3776 else
3777 case $cross_compiling:$ac_tool_warned in
3778yes:)
3779{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3780$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3781ac_tool_warned=yes ;;
3782esac
3783 CXX=$ac_ct_CXX
3784 fi
3785fi
3786
3787 fi
3788fi
3789# Provide some information about the compiler.
3790$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3791set X $ac_compile
3792ac_compiler=$2
3793for ac_option in --version -v -V -qversion; do
3794 { { ac_try="$ac_compiler $ac_option >&5"
3795case "(($ac_try" in
3796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3797 *) ac_try_echo=$ac_try;;
3798esac
3799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3800$as_echo "$ac_try_echo"; } >&5
3801 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3802 ac_status=$?
3803 if test -s conftest.err; then
3804 sed '10a\
3805... rest of stderr output deleted ...
3806 10q' conftest.err >conftest.er1
3807 cat conftest.er1 >&5
3bc3d82a 3808 fi
d0ac1c44 3809 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3810 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3811 test $ac_status = 0; }
3812done
3813
3814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3815$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3816if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3817 $as_echo_n "(cached) " >&6
3818else
3819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3820/* end confdefs.h. */
3821
3822int
3823main ()
3824{
3825#ifndef __GNUC__
3826 choke me
3827#endif
3828
3829 ;
3830 return 0;
3831}
3832_ACEOF
3833if ac_fn_cxx_try_compile "$LINENO"; then :
3834 ac_compiler_gnu=yes
3835else
3836 ac_compiler_gnu=no
3837fi
3838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3839ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3840
3841fi
3842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3843$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3844if test $ac_compiler_gnu = yes; then
3845 GXX=yes
3846else
3847 GXX=
3848fi
3849ac_test_CXXFLAGS=${CXXFLAGS+set}
3850ac_save_CXXFLAGS=$CXXFLAGS
3851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3852$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3853if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3854 $as_echo_n "(cached) " >&6
3855else
3856 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3857 ac_cxx_werror_flag=yes
3858 ac_cv_prog_cxx_g=no
3859 CXXFLAGS="-g"
3860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3861/* end confdefs.h. */
3862
3863int
3864main ()
3865{
3866
3867 ;
3868 return 0;
3869}
3870_ACEOF
3871if ac_fn_cxx_try_compile "$LINENO"; then :
3872 ac_cv_prog_cxx_g=yes
3873else
3874 CXXFLAGS=""
3875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3876/* end confdefs.h. */
3877
3878int
3879main ()
3880{
3881
3882 ;
3883 return 0;
3884}
3885_ACEOF
3886if ac_fn_cxx_try_compile "$LINENO"; then :
3887
3888else
3889 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3890 CXXFLAGS="-g"
3891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3892/* end confdefs.h. */
3893
3894int
3895main ()
3896{
3897
3898 ;
3899 return 0;
3900}
3901_ACEOF
3902if ac_fn_cxx_try_compile "$LINENO"; then :
3903 ac_cv_prog_cxx_g=yes
3904fi
3905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3906fi
3907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3908fi
3909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3910 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3911fi
3912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3913$as_echo "$ac_cv_prog_cxx_g" >&6; }
3914if test "$ac_test_CXXFLAGS" = set; then
3915 CXXFLAGS=$ac_save_CXXFLAGS
3916elif test $ac_cv_prog_cxx_g = yes; then
3917 if test "$GXX" = yes; then
3918 CXXFLAGS="-g -O2"
3919 else
3920 CXXFLAGS="-g"
3921 fi
3922else
3923 if test "$GXX" = yes; then
3924 CXXFLAGS="-O2"
3925 else
3926 CXXFLAGS=
3927 fi
3928fi
3929ac_ext=c
3930ac_cpp='$CPP $CPPFLAGS'
3931ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3932ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3933ac_compiler_gnu=$ac_cv_c_compiler_gnu
3934
3935
60ca704f 3936
bec39cab
AC
3937ac_ext=c
3938ac_cpp='$CPP $CPPFLAGS'
3939ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3940ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3941ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3943$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3944# On Suns, sometimes $CPP names a directory.
3945if test -n "$CPP" && test -d "$CPP"; then
3946 CPP=
8bb2c122 3947fi
bec39cab 3948if test -z "$CPP"; then
d0ac1c44 3949 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 3950 $as_echo_n "(cached) " >&6
bec39cab
AC
3951else
3952 # Double quotes because CPP needs to be expanded
3953 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3954 do
3955 ac_preproc_ok=false
3956for ac_c_preproc_warn_flag in '' yes
3957do
3958 # Use a header file that comes with gcc, so configuring glibc
3959 # with a fresh cross-compiler works.
3960 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3961 # <limits.h> exists even on freestanding compilers.
3962 # On the NeXT, cc -E runs the code through the compiler's parser,
3963 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3965/* end confdefs.h. */
3966#ifdef __STDC__
3967# include <limits.h>
3968#else
3969# include <assert.h>
3970#endif
3971 Syntax error
3972_ACEOF
81ecdfbb 3973if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3974
81ecdfbb 3975else
bec39cab
AC
3976 # Broken: fails on valid input.
3977continue
3978fi
d0ac1c44 3979rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3980
81ecdfbb 3981 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3982 # can be detected and how.
81ecdfbb 3983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3984/* end confdefs.h. */
3985#include <ac_nonexistent.h>
3986_ACEOF
81ecdfbb 3987if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3988 # Broken: success on invalid input.
3989continue
8bb2c122 3990else
bec39cab
AC
3991 # Passes both tests.
3992ac_preproc_ok=:
3993break
8bb2c122 3994fi
d0ac1c44 3995rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 3996
bec39cab
AC
3997done
3998# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3999rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4000if $ac_preproc_ok; then :
bec39cab
AC
4001 break
4002fi
8bb2c122 4003
bec39cab
AC
4004 done
4005 ac_cv_prog_CPP=$CPP
ddc9cd0f 4006
c906108c 4007fi
bec39cab
AC
4008 CPP=$ac_cv_prog_CPP
4009else
4010 ac_cv_prog_CPP=$CPP
c906108c 4011fi
81ecdfbb
RW
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4013$as_echo "$CPP" >&6; }
bec39cab
AC
4014ac_preproc_ok=false
4015for ac_c_preproc_warn_flag in '' yes
4016do
4017 # Use a header file that comes with gcc, so configuring glibc
4018 # with a fresh cross-compiler works.
4019 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4020 # <limits.h> exists even on freestanding compilers.
4021 # On the NeXT, cc -E runs the code through the compiler's parser,
4022 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4024/* end confdefs.h. */
4025#ifdef __STDC__
4026# include <limits.h>
4027#else
4028# include <assert.h>
4029#endif
4030 Syntax error
4031_ACEOF
81ecdfbb 4032if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4033
81ecdfbb 4034else
bec39cab
AC
4035 # Broken: fails on valid input.
4036continue
4037fi
d0ac1c44 4038rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4039
81ecdfbb 4040 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4041 # can be detected and how.
81ecdfbb 4042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4043/* end confdefs.h. */
4044#include <ac_nonexistent.h>
4045_ACEOF
81ecdfbb 4046if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4047 # Broken: success on invalid input.
4048continue
c906108c 4049else
bec39cab
AC
4050 # Passes both tests.
4051ac_preproc_ok=:
4052break
c906108c 4053fi
d0ac1c44 4054rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4055
bec39cab
AC
4056done
4057# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4058rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4059if $ac_preproc_ok; then :
4060
c906108c 4061else
81ecdfbb
RW
4062 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4063$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4064as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4065See \`config.log' for more details" "$LINENO" 5; }
c906108c 4066fi
c906108c 4067
bec39cab
AC
4068ac_ext=c
4069ac_cpp='$CPP $CPPFLAGS'
4070ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4071ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4072ac_compiler_gnu=$ac_cv_c_compiler_gnu
4073
4074
81ecdfbb
RW
4075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4076$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4077if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4078 $as_echo_n "(cached) " >&6
4e8d927d 4079else
81ecdfbb
RW
4080 if test -z "$GREP"; then
4081 ac_path_GREP_found=false
4082 # Loop through the user's path and test for each of PROGNAME-LIST
4083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4084for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4085do
4086 IFS=$as_save_IFS
4087 test -z "$as_dir" && as_dir=.
4088 for ac_prog in grep ggrep; do
4089 for ac_exec_ext in '' $ac_executable_extensions; do
4090 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4091 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4092# Check for GNU ac_path_GREP and select it if it is found.
4093 # Check for GNU $ac_path_GREP
4094case `"$ac_path_GREP" --version 2>&1` in
4095*GNU*)
4096 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4097*)
4098 ac_count=0
4099 $as_echo_n 0123456789 >"conftest.in"
4100 while :
4101 do
4102 cat "conftest.in" "conftest.in" >"conftest.tmp"
4103 mv "conftest.tmp" "conftest.in"
4104 cp "conftest.in" "conftest.nl"
4105 $as_echo 'GREP' >> "conftest.nl"
4106 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4107 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4108 as_fn_arith $ac_count + 1 && ac_count=$as_val
4109 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4110 # Best one so far, save it but keep looking for a better one
4111 ac_cv_path_GREP="$ac_path_GREP"
4112 ac_path_GREP_max=$ac_count
bec39cab 4113 fi
81ecdfbb
RW
4114 # 10*(2^10) chars as input seems more than enough
4115 test $ac_count -gt 10 && break
4116 done
4117 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4118esac
bec39cab 4119
81ecdfbb
RW
4120 $ac_path_GREP_found && break 3
4121 done
4122 done
4123 done
4124IFS=$as_save_IFS
4125 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4126 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4127 fi
c906108c 4128else
81ecdfbb 4129 ac_cv_path_GREP=$GREP
c906108c 4130fi
c906108c 4131
81ecdfbb
RW
4132fi
4133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4134$as_echo "$ac_cv_path_GREP" >&6; }
4135 GREP="$ac_cv_path_GREP"
c906108c 4136
c906108c 4137
81ecdfbb
RW
4138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4139$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4140if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4141 $as_echo_n "(cached) " >&6
783e057b 4142else
81ecdfbb
RW
4143 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4144 then ac_cv_path_EGREP="$GREP -E"
4145 else
4146 if test -z "$EGREP"; then
4147 ac_path_EGREP_found=false
4148 # Loop through the user's path and test for each of PROGNAME-LIST
4149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4150for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4151do
4152 IFS=$as_save_IFS
4153 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4154 for ac_prog in egrep; do
4155 for ac_exec_ext in '' $ac_executable_extensions; do
4156 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4157 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4158# Check for GNU ac_path_EGREP and select it if it is found.
4159 # Check for GNU $ac_path_EGREP
4160case `"$ac_path_EGREP" --version 2>&1` in
4161*GNU*)
4162 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4163*)
4164 ac_count=0
4165 $as_echo_n 0123456789 >"conftest.in"
4166 while :
4167 do
4168 cat "conftest.in" "conftest.in" >"conftest.tmp"
4169 mv "conftest.tmp" "conftest.in"
4170 cp "conftest.in" "conftest.nl"
4171 $as_echo 'EGREP' >> "conftest.nl"
4172 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4173 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4174 as_fn_arith $ac_count + 1 && ac_count=$as_val
4175 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4176 # Best one so far, save it but keep looking for a better one
4177 ac_cv_path_EGREP="$ac_path_EGREP"
4178 ac_path_EGREP_max=$ac_count
4179 fi
4180 # 10*(2^10) chars as input seems more than enough
4181 test $ac_count -gt 10 && break
4182 done
4183 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4184esac
bec39cab 4185
81ecdfbb
RW
4186 $ac_path_EGREP_found && break 3
4187 done
4188 done
4189 done
4190IFS=$as_save_IFS
4191 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4192 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4193 fi
783e057b 4194else
81ecdfbb 4195 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4196fi
4197
81ecdfbb 4198 fi
783e057b 4199fi
81ecdfbb
RW
4200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4201$as_echo "$ac_cv_path_EGREP" >&6; }
4202 EGREP="$ac_cv_path_EGREP"
4203
783e057b 4204
81ecdfbb
RW
4205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4206$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4207if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4208 $as_echo_n "(cached) " >&6
783e057b 4209else
81ecdfbb 4210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4211/* end confdefs.h. */
783e057b 4212#include <stdlib.h>
bec39cab 4213#include <stdarg.h>
783e057b
DJ
4214#include <string.h>
4215#include <float.h>
c906108c 4216
bec39cab
AC
4217int
4218main ()
4219{
c906108c 4220
bec39cab
AC
4221 ;
4222 return 0;
4223}
4224_ACEOF
81ecdfbb 4225if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4226 ac_cv_header_stdc=yes
c906108c 4227else
81ecdfbb 4228 ac_cv_header_stdc=no
c906108c 4229fi
81ecdfbb 4230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4231
783e057b
DJ
4232if test $ac_cv_header_stdc = yes; then
4233 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4235/* end confdefs.h. */
4236#include <string.h>
c906108c 4237
783e057b
DJ
4238_ACEOF
4239if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4240 $EGREP "memchr" >/dev/null 2>&1; then :
4241
c906108c 4242else
783e057b 4243 ac_cv_header_stdc=no
c906108c 4244fi
783e057b 4245rm -f conftest*
c906108c
SS
4246
4247fi
4248
783e057b
DJ
4249if test $ac_cv_header_stdc = yes; then
4250 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4252/* end confdefs.h. */
4253#include <stdlib.h>
bec39cab 4254
783e057b
DJ
4255_ACEOF
4256if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4257 $EGREP "free" >/dev/null 2>&1; then :
4258
bec39cab 4259else
783e057b 4260 ac_cv_header_stdc=no
bec39cab 4261fi
783e057b 4262rm -f conftest*
bec39cab
AC
4263
4264fi
bec39cab 4265
783e057b
DJ
4266if test $ac_cv_header_stdc = yes; then
4267 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4268 if test "$cross_compiling" = yes; then :
783e057b 4269 :
bec39cab 4270else
81ecdfbb 4271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4272/* end confdefs.h. */
4273#include <ctype.h>
81ecdfbb 4274#include <stdlib.h>
783e057b
DJ
4275#if ((' ' & 0x0FF) == 0x020)
4276# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4277# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4278#else
4279# define ISLOWER(c) \
4280 (('a' <= (c) && (c) <= 'i') \
4281 || ('j' <= (c) && (c) <= 'r') \
4282 || ('s' <= (c) && (c) <= 'z'))
4283# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4284#endif
4285
4286#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4287int
4288main ()
4289{
4290 int i;
4291 for (i = 0; i < 256; i++)
4292 if (XOR (islower (i), ISLOWER (i))
4293 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4294 return 2;
4295 return 0;
783e057b
DJ
4296}
4297_ACEOF
81ecdfbb 4298if ac_fn_c_try_run "$LINENO"; then :
783e057b 4299
81ecdfbb
RW
4300else
4301 ac_cv_header_stdc=no
783e057b 4302fi
81ecdfbb
RW
4303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4304 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4305fi
81ecdfbb 4306
783e057b
DJ
4307fi
4308fi
81ecdfbb
RW
4309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4310$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4311if test $ac_cv_header_stdc = yes; then
4312
81ecdfbb 4313$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4314
4315fi
4316
4317# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4318for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4319 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4320do :
4321 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4322ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4323"
d0ac1c44 4324if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4325 cat >>confdefs.h <<_ACEOF
81ecdfbb 4326#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4327_ACEOF
4328
4329fi
4330
4331done
4332
4333
4334
81ecdfbb 4335 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4336if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4337 MINIX=yes
4338else
4339 MINIX=
4340fi
4341
4342
4343 if test "$MINIX" = yes; then
4344
81ecdfbb 4345$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4346
4347
81ecdfbb 4348$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4349
4350
81ecdfbb 4351$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4352
4353 fi
4354
4355
81ecdfbb
RW
4356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4357$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4358if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4359 $as_echo_n "(cached) " >&6
783e057b 4360else
81ecdfbb 4361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4362/* end confdefs.h. */
4363
d0ac1c44
SM
4364# define __EXTENSIONS__ 1
4365 $ac_includes_default
783e057b
DJ
4366int
4367main ()
4368{
4369
4370 ;
4371 return 0;
4372}
4373_ACEOF
81ecdfbb 4374if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4375 ac_cv_safe_to_define___extensions__=yes
4376else
81ecdfbb 4377 ac_cv_safe_to_define___extensions__=no
783e057b 4378fi
81ecdfbb 4379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4380fi
81ecdfbb
RW
4381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4382$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4383 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4384 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4385
81ecdfbb 4386 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4387
81ecdfbb 4388 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4389
81ecdfbb 4390 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4391
81ecdfbb 4392 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4393
4394
c971b7fa
PA
4395ac_aux_dir=
4396for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4397 if test -f "$ac_dir/install-sh"; then
4398 ac_aux_dir=$ac_dir
4399 ac_install_sh="$ac_aux_dir/install-sh -c"
4400 break
4401 elif test -f "$ac_dir/install.sh"; then
4402 ac_aux_dir=$ac_dir
4403 ac_install_sh="$ac_aux_dir/install.sh -c"
4404 break
4405 elif test -f "$ac_dir/shtool"; then
4406 ac_aux_dir=$ac_dir
4407 ac_install_sh="$ac_aux_dir/shtool install -c"
4408 break
4409 fi
c971b7fa
PA
4410done
4411if test -z "$ac_aux_dir"; then
d0ac1c44 4412 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4413fi
770d76d7 4414
c971b7fa
PA
4415# These three variables are undocumented and unsupported,
4416# and are intended to be withdrawn in a future Autoconf release.
4417# They can cause serious problems if a builder's source tree is in a directory
4418# whose full name contains unusual characters.
4419ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4420ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4421ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4422
770d76d7 4423
c971b7fa
PA
4424# Make sure we can run config.sub.
4425$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4426 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4427
c971b7fa
PA
4428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4429$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4430if ${ac_cv_build+:} false; then :
c971b7fa 4431 $as_echo_n "(cached) " >&6
770d76d7 4432else
c971b7fa
PA
4433 ac_build_alias=$build_alias
4434test "x$ac_build_alias" = x &&
4435 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4436test "x$ac_build_alias" = x &&
d0ac1c44 4437 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4438ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4439 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4440
770d76d7 4441fi
c971b7fa
PA
4442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4443$as_echo "$ac_cv_build" >&6; }
4444case $ac_cv_build in
4445*-*-*) ;;
d0ac1c44 4446*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4447esac
c971b7fa
PA
4448build=$ac_cv_build
4449ac_save_IFS=$IFS; IFS='-'
4450set x $ac_cv_build
4451shift
4452build_cpu=$1
4453build_vendor=$2
4454shift; shift
4455# Remember, the first character of IFS is used to create $*,
4456# except with old shells:
4457build_os=$*
4458IFS=$ac_save_IFS
4459case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4460
4461
c971b7fa
PA
4462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4463$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4464if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4465 $as_echo_n "(cached) " >&6
4466else
c971b7fa
PA
4467 if test "x$host_alias" = x; then
4468 ac_cv_host=$ac_cv_build
81ecdfbb 4469else
c971b7fa 4470 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4471 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4472fi
81ecdfbb
RW
4473
4474fi
c971b7fa
PA
4475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4476$as_echo "$ac_cv_host" >&6; }
4477case $ac_cv_host in
4478*-*-*) ;;
d0ac1c44 4479*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4480esac
c971b7fa
PA
4481host=$ac_cv_host
4482ac_save_IFS=$IFS; IFS='-'
4483set x $ac_cv_host
4484shift
4485host_cpu=$1
4486host_vendor=$2
4487shift; shift
4488# Remember, the first character of IFS is used to create $*,
4489# except with old shells:
4490host_os=$*
4491IFS=$ac_save_IFS
4492case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4493
4494
4495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4496$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4497if ${ac_cv_target+:} false; then :
3388710e
JM
4498 $as_echo_n "(cached) " >&6
4499else
4500 if test "x$target_alias" = x; then
4501 ac_cv_target=$ac_cv_host
4502else
4503 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4504 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4505fi
4506
4507fi
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4509$as_echo "$ac_cv_target" >&6; }
4510case $ac_cv_target in
4511*-*-*) ;;
d0ac1c44 4512*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4513esac
4514target=$ac_cv_target
4515ac_save_IFS=$IFS; IFS='-'
4516set x $ac_cv_target
4517shift
4518target_cpu=$1
4519target_vendor=$2
4520shift; shift
4521# Remember, the first character of IFS is used to create $*,
4522# except with old shells:
4523target_os=$*
4524IFS=$ac_save_IFS
4525case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4526
4527
4528# The aliases save the names the user supplied, while $host etc.
4529# will get canonicalized.
4530test -n "$target_alias" &&
4531 test "$program_prefix$program_suffix$program_transform_name" = \
4532 NONENONEs,x,x, &&
4533 program_prefix=${target_alias}-
4534
4535# The tests for host and target for $enable_largefile require
4536# canonical names.
4537
4538
81ecdfbb 4539
da2f07f1
JK
4540# As the $enable_largefile decision depends on --enable-plugins we must set it
4541# even in directories otherwise not depending on the $plugins option.
4542
4543
2974be62
AM
4544 maybe_plugins=no
4545 for ac_header in dlfcn.h
4546do :
4547 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4548"
d0ac1c44 4549if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4550 cat >>confdefs.h <<_ACEOF
4551#define HAVE_DLFCN_H 1
4552_ACEOF
4553 maybe_plugins=yes
4554fi
4555
4556done
4557
4558 for ac_header in windows.h
4559do :
4560 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4561"
d0ac1c44 4562if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4563 cat >>confdefs.h <<_ACEOF
4564#define HAVE_WINDOWS_H 1
4565_ACEOF
4566 maybe_plugins=yes
4567fi
4568
4569done
4570
4571
4572 # Check whether --enable-plugins was given.
da2f07f1
JK
4573if test "${enable_plugins+set}" = set; then :
4574 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4575 no) plugins=no ;;
4576 *) plugins=yes
4577 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4578 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4579 fi ;;
4580 esac
da2f07f1 4581else
2974be62
AM
4582 plugins=$maybe_plugins
4583
da2f07f1
JK
4584fi
4585
2974be62 4586 if test "$plugins" = "yes"; then
458412c3
TT
4587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4588$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4589if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4590 $as_echo_n "(cached) " >&6
4591else
4592 ac_func_search_save_LIBS=$LIBS
4593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4594/* end confdefs.h. */
4595
4596/* Override any GCC internal prototype to avoid an error.
4597 Use char because int might match the return type of a GCC
4598 builtin and then its argument prototype would still apply. */
4599#ifdef __cplusplus
4600extern "C"
4601#endif
458412c3 4602char dlsym ();
2974be62
AM
4603int
4604main ()
4605{
458412c3 4606return dlsym ();
2974be62
AM
4607 ;
4608 return 0;
4609}
4610_ACEOF
4611for ac_lib in '' dl; do
4612 if test -z "$ac_lib"; then
4613 ac_res="none required"
4614 else
4615 ac_res=-l$ac_lib
4616 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4617 fi
4618 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4619 ac_cv_search_dlsym=$ac_res
2974be62
AM
4620fi
4621rm -f core conftest.err conftest.$ac_objext \
4622 conftest$ac_exeext
d0ac1c44 4623 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4624 break
4625fi
4626done
d0ac1c44 4627if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4628
4629else
458412c3 4630 ac_cv_search_dlsym=no
2974be62
AM
4631fi
4632rm conftest.$ac_ext
4633LIBS=$ac_func_search_save_LIBS
4634fi
458412c3
TT
4635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4636$as_echo "$ac_cv_search_dlsym" >&6; }
4637ac_res=$ac_cv_search_dlsym
2974be62
AM
4638if test "$ac_res" != no; then :
4639 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4640
4641fi
4642
4643 fi
da2f07f1
JK
4644
4645
4646case "${host}" in
4647 sparc-*-solaris*|i[3-7]86-*-solaris*)
4648 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4649 # are mutually exclusive; and without procfs support, the bfd/ elf module
4650 # cannot provide certain routines such as elfcore_write_prpsinfo
4651 # or elfcore_write_prstatus. So unless the user explicitly requested
4652 # large-file support through the --enable-largefile switch, disable
4653 # large-file support in favor of procfs support.
4654 test "${target}" = "${host}" -a "x$plugins" = xno \
4655 && : ${enable_largefile="no"}
4656 ;;
4657esac
4658
4659# Check whether --enable-largefile was given.
4660if test "${enable_largefile+set}" = set; then :
4661 enableval=$enable_largefile;
4662fi
4663
4664if test "$enable_largefile" != no; then
4665
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4667$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4668if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4669 $as_echo_n "(cached) " >&6
4670else
4671 ac_cv_sys_largefile_CC=no
4672 if test "$GCC" != yes; then
4673 ac_save_CC=$CC
4674 while :; do
4675 # IRIX 6.2 and later do not support large files by default,
4676 # so use the C compiler's -n32 option if that helps.
4677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4678/* end confdefs.h. */
4679#include <sys/types.h>
4680 /* Check that off_t can represent 2**63 - 1 correctly.
4681 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4682 since some C++ compilers masquerading as C compilers
4683 incorrectly reject 9223372036854775807. */
4684#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4685 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4686 && LARGE_OFF_T % 2147483647 == 1)
4687 ? 1 : -1];
4688int
4689main ()
4690{
4691
4692 ;
4693 return 0;
4694}
4695_ACEOF
4696 if ac_fn_c_try_compile "$LINENO"; then :
4697 break
4698fi
4699rm -f core conftest.err conftest.$ac_objext
4700 CC="$CC -n32"
4701 if ac_fn_c_try_compile "$LINENO"; then :
4702 ac_cv_sys_largefile_CC=' -n32'; break
4703fi
4704rm -f core conftest.err conftest.$ac_objext
4705 break
4706 done
4707 CC=$ac_save_CC
4708 rm -f conftest.$ac_ext
4709 fi
4710fi
4711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4712$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4713 if test "$ac_cv_sys_largefile_CC" != no; then
4714 CC=$CC$ac_cv_sys_largefile_CC
4715 fi
4716
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4718$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4719if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4720 $as_echo_n "(cached) " >&6
4721else
4722 while :; do
4723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4724/* end confdefs.h. */
4725#include <sys/types.h>
4726 /* Check that off_t can represent 2**63 - 1 correctly.
4727 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4728 since some C++ compilers masquerading as C compilers
4729 incorrectly reject 9223372036854775807. */
4730#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4731 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4732 && LARGE_OFF_T % 2147483647 == 1)
4733 ? 1 : -1];
4734int
4735main ()
4736{
4737
4738 ;
4739 return 0;
4740}
4741_ACEOF
4742if ac_fn_c_try_compile "$LINENO"; then :
4743 ac_cv_sys_file_offset_bits=no; break
4744fi
4745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4747/* end confdefs.h. */
4748#define _FILE_OFFSET_BITS 64
4749#include <sys/types.h>
4750 /* Check that off_t can represent 2**63 - 1 correctly.
4751 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4752 since some C++ compilers masquerading as C compilers
4753 incorrectly reject 9223372036854775807. */
4754#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4755 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4756 && LARGE_OFF_T % 2147483647 == 1)
4757 ? 1 : -1];
4758int
4759main ()
4760{
4761
4762 ;
4763 return 0;
4764}
4765_ACEOF
4766if ac_fn_c_try_compile "$LINENO"; then :
4767 ac_cv_sys_file_offset_bits=64; break
4768fi
4769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4770 ac_cv_sys_file_offset_bits=unknown
4771 break
4772done
4773fi
4774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4775$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4776case $ac_cv_sys_file_offset_bits in #(
4777 no | unknown) ;;
4778 *)
4779cat >>confdefs.h <<_ACEOF
4780#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4781_ACEOF
4782;;
4783esac
4784rm -rf conftest*
4785 if test $ac_cv_sys_file_offset_bits = unknown; then
4786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4787$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4788if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4789 $as_echo_n "(cached) " >&6
4790else
4791 while :; do
4792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4793/* end confdefs.h. */
4794#include <sys/types.h>
4795 /* Check that off_t can represent 2**63 - 1 correctly.
4796 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4797 since some C++ compilers masquerading as C compilers
4798 incorrectly reject 9223372036854775807. */
4799#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4800 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4801 && LARGE_OFF_T % 2147483647 == 1)
4802 ? 1 : -1];
4803int
4804main ()
4805{
4806
4807 ;
4808 return 0;
4809}
4810_ACEOF
4811if ac_fn_c_try_compile "$LINENO"; then :
4812 ac_cv_sys_large_files=no; break
4813fi
4814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4816/* end confdefs.h. */
4817#define _LARGE_FILES 1
4818#include <sys/types.h>
4819 /* Check that off_t can represent 2**63 - 1 correctly.
4820 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4821 since some C++ compilers masquerading as C compilers
4822 incorrectly reject 9223372036854775807. */
4823#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4824 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4825 && LARGE_OFF_T % 2147483647 == 1)
4826 ? 1 : -1];
4827int
4828main ()
4829{
4830
4831 ;
4832 return 0;
4833}
4834_ACEOF
4835if ac_fn_c_try_compile "$LINENO"; then :
4836 ac_cv_sys_large_files=1; break
4837fi
4838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4839 ac_cv_sys_large_files=unknown
4840 break
4841done
4842fi
4843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4844$as_echo "$ac_cv_sys_large_files" >&6; }
4845case $ac_cv_sys_large_files in #(
4846 no | unknown) ;;
4847 *)
4848cat >>confdefs.h <<_ACEOF
4849#define _LARGE_FILES $ac_cv_sys_large_files
4850_ACEOF
4851;;
4852esac
4853rm -rf conftest*
4854 fi
d0ac1c44
SM
4855
4856
da2f07f1
JK
4857fi
4858
4859
4860
81ecdfbb
RW
4861
4862
4863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4864$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4865if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4866 $as_echo_n "(cached) " >&6
4867else
4868 am_cv_prog_cc_stdc=no
4869ac_save_CC="$CC"
4870# Don't try gcc -ansi; that turns off useful extensions and
4871# breaks some systems' header files.
4872# AIX -qlanglvl=ansi
4873# Ultrix and OSF/1 -std1
4874# HP-UX 10.20 and later -Ae
4875# HP-UX older versions -Aa -D_HPUX_SOURCE
4876# SVR4 -Xc -D__EXTENSIONS__
4877for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4878do
783e057b 4879 CC="$ac_save_CC $ac_arg"
81ecdfbb 4880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4881/* end confdefs.h. */
4882#include <stdarg.h>
4883#include <stdio.h>
4884#include <sys/types.h>
4885#include <sys/stat.h>
4886/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4887struct buf { int x; };
4888FILE * (*rcsopen) (struct buf *, struct stat *, int);
4889static char *e (p, i)
4890 char **p;
4891 int i;
4892{
4893 return p[i];
4894}
4895static char *f (char * (*g) (char **, int), char **p, ...)
4896{
4897 char *s;
4898 va_list v;
4899 va_start (v,p);
4900 s = g (p, va_arg (v,int));
4901 va_end (v);
4902 return s;
4903}
4904int test (int i, double x);
4905struct s1 {int (*f) (int a);};
4906struct s2 {int (*f) (double a);};
4907int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4908int argc;
4909char **argv;
4910
4911int
4912main ()
4913{
4914
4915return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4916
4917 ;
4918 return 0;
4919}
4920_ACEOF
81ecdfbb 4921if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4922 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4923fi
81ecdfbb 4924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4925done
4926CC="$ac_save_CC"
4927
4928fi
4929
4930if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4932$as_echo "none needed" >&6; }
783e057b 4933else
81ecdfbb
RW
4934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4935$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4936fi
4937case "x$am_cv_prog_cc_stdc" in
4938 x|xno) ;;
4939 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4940esac
4941
d0ac1c44
SM
4942# Expand $ac_aux_dir to an absolute path.
4943am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 4944
d0ac1c44 4945if test x"${install_sh+set}" != xset; then
4869db5e
RM
4946 case $am_aux_dir in
4947 *\ * | *\ *)
4948 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4949 *)
4950 install_sh="\${SHELL} $am_aux_dir/install-sh"
4951 esac
4952fi
4953
d0ac1c44
SM
4954# Installed binaries are usually stripped using 'strip' when the user
4955# run "make install-strip". However 'strip' might not be the right
4869db5e 4956# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 4957# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
4958if test "$cross_compiling" != no; then
4959 if test -n "$ac_tool_prefix"; then
4960 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4961set dummy ${ac_tool_prefix}strip; ac_word=$2
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4963$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4964if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
4965 $as_echo_n "(cached) " >&6
4966else
4967 if test -n "$STRIP"; then
4968 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4969else
4970as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4971for as_dir in $PATH
4972do
4973 IFS=$as_save_IFS
4974 test -z "$as_dir" && as_dir=.
4975 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4976 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4977 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4979 break 2
4980 fi
4981done
4982 done
4983IFS=$as_save_IFS
4984
4985fi
4986fi
4987STRIP=$ac_cv_prog_STRIP
4988if test -n "$STRIP"; then
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4990$as_echo "$STRIP" >&6; }
4991else
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4993$as_echo "no" >&6; }
4994fi
4995
4996
4997fi
4998if test -z "$ac_cv_prog_STRIP"; then
4999 ac_ct_STRIP=$STRIP
5000 # Extract the first word of "strip", so it can be a program name with args.
5001set dummy strip; ac_word=$2
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5003$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5004if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5005 $as_echo_n "(cached) " >&6
5006else
5007 if test -n "$ac_ct_STRIP"; then
5008 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5009else
5010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5011for as_dir in $PATH
5012do
5013 IFS=$as_save_IFS
5014 test -z "$as_dir" && as_dir=.
5015 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5016 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5017 ac_cv_prog_ac_ct_STRIP="strip"
5018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5019 break 2
5020 fi
5021done
5022 done
5023IFS=$as_save_IFS
5024
5025fi
5026fi
5027ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5028if test -n "$ac_ct_STRIP"; then
5029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5030$as_echo "$ac_ct_STRIP" >&6; }
5031else
5032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5033$as_echo "no" >&6; }
5034fi
5035
5036 if test "x$ac_ct_STRIP" = x; then
5037 STRIP=":"
5038 else
5039 case $cross_compiling:$ac_tool_warned in
5040yes:)
5041{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5042$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5043ac_tool_warned=yes ;;
5044esac
5045 STRIP=$ac_ct_STRIP
5046 fi
5047else
5048 STRIP="$ac_cv_prog_STRIP"
5049fi
5050
5051fi
5052INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5053
783e057b
DJ
5054
5055ac_aux_dir=
81ecdfbb 5056for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5057 if test -f "$ac_dir/install-sh"; then
5058 ac_aux_dir=$ac_dir
5059 ac_install_sh="$ac_aux_dir/install-sh -c"
5060 break
5061 elif test -f "$ac_dir/install.sh"; then
5062 ac_aux_dir=$ac_dir
5063 ac_install_sh="$ac_aux_dir/install.sh -c"
5064 break
5065 elif test -f "$ac_dir/shtool"; then
5066 ac_aux_dir=$ac_dir
5067 ac_install_sh="$ac_aux_dir/shtool install -c"
5068 break
5069 fi
783e057b
DJ
5070done
5071if test -z "$ac_aux_dir"; then
d0ac1c44 5072 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5073fi
81ecdfbb
RW
5074
5075# These three variables are undocumented and unsupported,
5076# and are intended to be withdrawn in a future Autoconf release.
5077# They can cause serious problems if a builder's source tree is in a directory
5078# whose full name contains unusual characters.
5079ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5080ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5081ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5082
783e057b 5083
783e057b 5084
9009e1ae
MR
5085test "$program_prefix" != NONE &&
5086 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5087# Use a double $ so make ignores it.
5088test "$program_suffix" != NONE &&
5089 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5090# Double any \ or $.
5091# By default was `s,x,x', remove it if useless.
5092ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5093program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5094
81ecdfbb 5095
0bcda685
PA
5096# We require a C++11 compiler. Check if one is available, and if
5097# necessary, set CXX_DIALECT to some -std=xxx switch.
5098
41260ac2 5099 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5100 ac_ext=cpp
5101ac_cpp='$CXXCPP $CPPFLAGS'
5102ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5103ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5104ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5105 CXX_DIALECT=""
5106 ac_success=no
5107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5108$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5109if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5110 $as_echo_n "(cached) " >&6
5111else
5112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5113/* end confdefs.h. */
5114
5115
5116// If the compiler admits that it is not ready for C++11, why torture it?
5117// Hopefully, this will speed up the test.
5118
5119#ifndef __cplusplus
5120
5121#error "This is not a C++ compiler"
5122
5123#elif __cplusplus < 201103L
5124
5125#error "This is not a C++11 compiler"
5126
5127#else
5128
5129namespace cxx11
5130{
5131
5132 namespace test_static_assert
5133 {
5134
5135 template <typename T>
5136 struct check
5137 {
5138 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5139 };
5140
5141 }
5142
5143 namespace test_final_override
5144 {
5145
5146 struct Base
5147 {
5148 virtual void f() {}
5149 };
5150
5151 struct Derived : public Base
5152 {
5153 virtual void f() override {}
5154 };
5155
5156 }
5157
5158 namespace test_double_right_angle_brackets
5159 {
5160
5161 template < typename T >
5162 struct check {};
5163
5164 typedef check<void> single_type;
5165 typedef check<check<void>> double_type;
5166 typedef check<check<check<void>>> triple_type;
5167 typedef check<check<check<check<void>>>> quadruple_type;
5168
5169 }
5170
5171 namespace test_decltype
5172 {
5173
5174 int
5175 f()
5176 {
5177 int a = 1;
5178 decltype(a) b = 2;
5179 return a + b;
5180 }
5181
5182 }
5183
5184 namespace test_type_deduction
5185 {
5186
5187 template < typename T1, typename T2 >
5188 struct is_same
5189 {
5190 static const bool value = false;
5191 };
5192
5193 template < typename T >
5194 struct is_same<T, T>
5195 {
5196 static const bool value = true;
5197 };
5198
5199 template < typename T1, typename T2 >
5200 auto
5201 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5202 {
5203 return a1 + a2;
5204 }
5205
5206 int
5207 test(const int c, volatile int v)
5208 {
5209 static_assert(is_same<int, decltype(0)>::value == true, "");
5210 static_assert(is_same<int, decltype(c)>::value == false, "");
5211 static_assert(is_same<int, decltype(v)>::value == false, "");
5212 auto ac = c;
5213 auto av = v;
5214 auto sumi = ac + av + 'x';
5215 auto sumf = ac + av + 1.0;
5216 static_assert(is_same<int, decltype(ac)>::value == true, "");
5217 static_assert(is_same<int, decltype(av)>::value == true, "");
5218 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5219 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5220 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5221 return (sumf > 0.0) ? sumi : add(c, v);
5222 }
5223
5224 }
5225
5226 namespace test_noexcept
5227 {
5228
5229 int f() { return 0; }
5230 int g() noexcept { return 0; }
5231
5232 static_assert(noexcept(f()) == false, "");
5233 static_assert(noexcept(g()) == true, "");
5234
5235 }
5236
5237 namespace test_constexpr
5238 {
5239
5240 template < typename CharT >
5241 unsigned long constexpr
5242 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5243 {
5244 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5245 }
5246
5247 template < typename CharT >
5248 unsigned long constexpr
5249 strlen_c(const CharT *const s) noexcept
5250 {
5251 return strlen_c_r(s, 0UL);
5252 }
5253
5254 static_assert(strlen_c("") == 0UL, "");
5255 static_assert(strlen_c("1") == 1UL, "");
5256 static_assert(strlen_c("example") == 7UL, "");
5257 static_assert(strlen_c("another\0example") == 7UL, "");
5258
5259 }
5260
5261 namespace test_rvalue_references
5262 {
5263
5264 template < int N >
5265 struct answer
5266 {
5267 static constexpr int value = N;
5268 };
5269
5270 answer<1> f(int&) { return answer<1>(); }
5271 answer<2> f(const int&) { return answer<2>(); }
5272 answer<3> f(int&&) { return answer<3>(); }
5273
5274 void
5275 test()
5276 {
5277 int i = 0;
5278 const int c = 0;
5279 static_assert(decltype(f(i))::value == 1, "");
5280 static_assert(decltype(f(c))::value == 2, "");
5281 static_assert(decltype(f(0))::value == 3, "");
5282 }
5283
5284 }
5285
5286 namespace test_uniform_initialization
5287 {
5288
5289 struct test
5290 {
5291 static const int zero {};
5292 static const int one {1};
5293 };
5294
5295 static_assert(test::zero == 0, "");
5296 static_assert(test::one == 1, "");
5297
5298 }
5299
5300 namespace test_lambdas
5301 {
5302
5303 void
5304 test1()
5305 {
5306 auto lambda1 = [](){};
5307 auto lambda2 = lambda1;
5308 lambda1();
5309 lambda2();
5310 }
5311
5312 int
5313 test2()
5314 {
5315 auto a = [](int i, int j){ return i + j; }(1, 2);
5316 auto b = []() -> int { return '0'; }();
5317 auto c = [=](){ return a + b; }();
5318 auto d = [&](){ return c; }();
5319 auto e = [a, &b](int x) mutable {
5320 const auto identity = [](int y){ return y; };
5321 for (auto i = 0; i < a; ++i)
5322 a += b--;
5323 return x + identity(a + b);
5324 }(0);
5325 return a + b + c + d + e;
5326 }
5327
5328 int
5329 test3()
5330 {
5331 const auto nullary = [](){ return 0; };
5332 const auto unary = [](int x){ return x; };
5333 using nullary_t = decltype(nullary);
5334 using unary_t = decltype(unary);
5335 const auto higher1st = [](nullary_t f){ return f(); };
5336 const auto higher2nd = [unary](nullary_t f1){
5337 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5338 };
5339 return higher1st(nullary) + higher2nd(nullary)(unary);
5340 }
5341
5342 }
5343
5344 namespace test_variadic_templates
5345 {
5346
5347 template <int...>
5348 struct sum;
5349
5350 template <int N0, int... N1toN>
5351 struct sum<N0, N1toN...>
5352 {
5353 static constexpr auto value = N0 + sum<N1toN...>::value;
5354 };
5355
5356 template <>
5357 struct sum<>
5358 {
5359 static constexpr auto value = 0;
5360 };
5361
5362 static_assert(sum<>::value == 0, "");
5363 static_assert(sum<1>::value == 1, "");
5364 static_assert(sum<23>::value == 23, "");
5365 static_assert(sum<1, 2>::value == 3, "");
5366 static_assert(sum<5, 5, 11>::value == 21, "");
5367 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5368
5369 }
5370
5371 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5372 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5373 // because of this.
5374 namespace test_template_alias_sfinae
5375 {
5376
5377 struct foo {};
5378
5379 template<typename T>
5380 using member = typename T::member_type;
5381
5382 template<typename T>
5383 void func(...) {}
5384
5385 template<typename T>
5386 void func(member<T>*) {}
5387
5388 void test();
5389
5390 void test() { func<foo>(0); }
5391
5392 }
5393
5394} // namespace cxx11
5395
5396#endif // __cplusplus >= 201103L
5397
5398
5399
5400_ACEOF
5401if ac_fn_cxx_try_compile "$LINENO"; then :
5402 ax_cv_cxx_compile_cxx11=yes
5403else
5404 ax_cv_cxx_compile_cxx11=no
5405fi
5406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5407fi
5408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5409$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5410 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5411 ac_success=yes
5412 fi
5413
5414 if test x$ac_success = xno; then
41260ac2
SM
5415 for alternative in ${ax_cxx_compile_alternatives}; do
5416 switch="-std=gnu++${alternative}"
0bcda685
PA
5417 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5419$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5420if eval \${$cachevar+:} false; then :
0bcda685
PA
5421 $as_echo_n "(cached) " >&6
5422else
5423 ac_save_CXX="$CXX"
5424 CXX="$CXX $switch"
5425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5426/* end confdefs.h. */
5427
5428
5429// If the compiler admits that it is not ready for C++11, why torture it?
5430// Hopefully, this will speed up the test.
5431
5432#ifndef __cplusplus
5433
5434#error "This is not a C++ compiler"
5435
5436#elif __cplusplus < 201103L
5437
5438#error "This is not a C++11 compiler"
5439
5440#else
5441
5442namespace cxx11
5443{
5444
5445 namespace test_static_assert
5446 {
5447
5448 template <typename T>
5449 struct check
5450 {
5451 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5452 };
5453
5454 }
5455
5456 namespace test_final_override
5457 {
5458
5459 struct Base
5460 {
5461 virtual void f() {}
5462 };
5463
5464 struct Derived : public Base
5465 {
5466 virtual void f() override {}
5467 };
5468
5469 }
5470
5471 namespace test_double_right_angle_brackets
5472 {
5473
5474 template < typename T >
5475 struct check {};
5476
5477 typedef check<void> single_type;
5478 typedef check<check<void>> double_type;
5479 typedef check<check<check<void>>> triple_type;
5480 typedef check<check<check<check<void>>>> quadruple_type;
5481
5482 }
5483
5484 namespace test_decltype
5485 {
5486
5487 int
5488 f()
5489 {
5490 int a = 1;
5491 decltype(a) b = 2;
5492 return a + b;
5493 }
5494
5495 }
5496
5497 namespace test_type_deduction
5498 {
5499
5500 template < typename T1, typename T2 >
5501 struct is_same
5502 {
5503 static const bool value = false;
5504 };
5505
5506 template < typename T >
5507 struct is_same<T, T>
5508 {
5509 static const bool value = true;
5510 };
5511
5512 template < typename T1, typename T2 >
5513 auto
5514 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5515 {
5516 return a1 + a2;
5517 }
5518
5519 int
5520 test(const int c, volatile int v)
5521 {
5522 static_assert(is_same<int, decltype(0)>::value == true, "");
5523 static_assert(is_same<int, decltype(c)>::value == false, "");
5524 static_assert(is_same<int, decltype(v)>::value == false, "");
5525 auto ac = c;
5526 auto av = v;
5527 auto sumi = ac + av + 'x';
5528 auto sumf = ac + av + 1.0;
5529 static_assert(is_same<int, decltype(ac)>::value == true, "");
5530 static_assert(is_same<int, decltype(av)>::value == true, "");
5531 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5532 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5533 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5534 return (sumf > 0.0) ? sumi : add(c, v);
5535 }
5536
5537 }
5538
5539 namespace test_noexcept
5540 {
5541
5542 int f() { return 0; }
5543 int g() noexcept { return 0; }
5544
5545 static_assert(noexcept(f()) == false, "");
5546 static_assert(noexcept(g()) == true, "");
5547
5548 }
5549
5550 namespace test_constexpr
5551 {
5552
5553 template < typename CharT >
5554 unsigned long constexpr
5555 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5556 {
5557 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5558 }
5559
5560 template < typename CharT >
5561 unsigned long constexpr
5562 strlen_c(const CharT *const s) noexcept
5563 {
5564 return strlen_c_r(s, 0UL);
5565 }
5566
5567 static_assert(strlen_c("") == 0UL, "");
5568 static_assert(strlen_c("1") == 1UL, "");
5569 static_assert(strlen_c("example") == 7UL, "");
5570 static_assert(strlen_c("another\0example") == 7UL, "");
5571
5572 }
5573
5574 namespace test_rvalue_references
5575 {
5576
5577 template < int N >
5578 struct answer
5579 {
5580 static constexpr int value = N;
5581 };
5582
5583 answer<1> f(int&) { return answer<1>(); }
5584 answer<2> f(const int&) { return answer<2>(); }
5585 answer<3> f(int&&) { return answer<3>(); }
5586
5587 void
5588 test()
5589 {
5590 int i = 0;
5591 const int c = 0;
5592 static_assert(decltype(f(i))::value == 1, "");
5593 static_assert(decltype(f(c))::value == 2, "");
5594 static_assert(decltype(f(0))::value == 3, "");
5595 }
5596
5597 }
5598
5599 namespace test_uniform_initialization
5600 {
5601
5602 struct test
5603 {
5604 static const int zero {};
5605 static const int one {1};
5606 };
5607
5608 static_assert(test::zero == 0, "");
5609 static_assert(test::one == 1, "");
5610
5611 }
5612
5613 namespace test_lambdas
5614 {
5615
5616 void
5617 test1()
5618 {
5619 auto lambda1 = [](){};
5620 auto lambda2 = lambda1;
5621 lambda1();
5622 lambda2();
5623 }
5624
5625 int
5626 test2()
5627 {
5628 auto a = [](int i, int j){ return i + j; }(1, 2);
5629 auto b = []() -> int { return '0'; }();
5630 auto c = [=](){ return a + b; }();
5631 auto d = [&](){ return c; }();
5632 auto e = [a, &b](int x) mutable {
5633 const auto identity = [](int y){ return y; };
5634 for (auto i = 0; i < a; ++i)
5635 a += b--;
5636 return x + identity(a + b);
5637 }(0);
5638 return a + b + c + d + e;
5639 }
5640
5641 int
5642 test3()
5643 {
5644 const auto nullary = [](){ return 0; };
5645 const auto unary = [](int x){ return x; };
5646 using nullary_t = decltype(nullary);
5647 using unary_t = decltype(unary);
5648 const auto higher1st = [](nullary_t f){ return f(); };
5649 const auto higher2nd = [unary](nullary_t f1){
5650 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5651 };
5652 return higher1st(nullary) + higher2nd(nullary)(unary);
5653 }
5654
5655 }
5656
5657 namespace test_variadic_templates
5658 {
5659
5660 template <int...>
5661 struct sum;
5662
5663 template <int N0, int... N1toN>
5664 struct sum<N0, N1toN...>
5665 {
5666 static constexpr auto value = N0 + sum<N1toN...>::value;
5667 };
5668
5669 template <>
5670 struct sum<>
5671 {
5672 static constexpr auto value = 0;
5673 };
5674
5675 static_assert(sum<>::value == 0, "");
5676 static_assert(sum<1>::value == 1, "");
5677 static_assert(sum<23>::value == 23, "");
5678 static_assert(sum<1, 2>::value == 3, "");
5679 static_assert(sum<5, 5, 11>::value == 21, "");
5680 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5681
5682 }
5683
5684 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5685 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5686 // because of this.
5687 namespace test_template_alias_sfinae
5688 {
5689
5690 struct foo {};
5691
5692 template<typename T>
5693 using member = typename T::member_type;
5694
5695 template<typename T>
5696 void func(...) {}
5697
5698 template<typename T>
5699 void func(member<T>*) {}
5700
5701 void test();
5702
5703 void test() { func<foo>(0); }
5704
5705 }
5706
5707} // namespace cxx11
5708
5709#endif // __cplusplus >= 201103L
5710
5711
5712
5713_ACEOF
5714if ac_fn_cxx_try_compile "$LINENO"; then :
5715 eval $cachevar=yes
5716else
5717 eval $cachevar=no
5718fi
5719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5720 CXX="$ac_save_CXX"
5721fi
5722eval ac_res=\$$cachevar
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5724$as_echo "$ac_res" >&6; }
5725 if eval test x\$$cachevar = xyes; then
5726 CXX_DIALECT="$switch"
5727 ac_success=yes
5728 break
5729 fi
5730 done
5731 fi
5732
5733 if test x$ac_success = xno; then
41260ac2
SM
5734 for alternative in ${ax_cxx_compile_alternatives}; do
5735 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5736 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5738$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5739if eval \${$cachevar+:} false; then :
0bcda685
PA
5740 $as_echo_n "(cached) " >&6
5741else
5742 ac_save_CXX="$CXX"
41260ac2
SM
5743 CXX="$CXX $switch"
5744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5745/* end confdefs.h. */
5746
5747
5748// If the compiler admits that it is not ready for C++11, why torture it?
5749// Hopefully, this will speed up the test.
5750
5751#ifndef __cplusplus
5752
5753#error "This is not a C++ compiler"
5754
5755#elif __cplusplus < 201103L
5756
5757#error "This is not a C++11 compiler"
5758
5759#else
5760
5761namespace cxx11
5762{
5763
5764 namespace test_static_assert
5765 {
5766
5767 template <typename T>
5768 struct check
5769 {
5770 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5771 };
5772
5773 }
5774
5775 namespace test_final_override
5776 {
5777
5778 struct Base
5779 {
5780 virtual void f() {}
5781 };
5782
5783 struct Derived : public Base
5784 {
5785 virtual void f() override {}
5786 };
5787
5788 }
5789
5790 namespace test_double_right_angle_brackets
5791 {
5792
5793 template < typename T >
5794 struct check {};
5795
5796 typedef check<void> single_type;
5797 typedef check<check<void>> double_type;
5798 typedef check<check<check<void>>> triple_type;
5799 typedef check<check<check<check<void>>>> quadruple_type;
5800
5801 }
5802
5803 namespace test_decltype
5804 {
5805
5806 int
5807 f()
5808 {
5809 int a = 1;
5810 decltype(a) b = 2;
5811 return a + b;
5812 }
5813
5814 }
5815
5816 namespace test_type_deduction
5817 {
5818
5819 template < typename T1, typename T2 >
5820 struct is_same
5821 {
5822 static const bool value = false;
5823 };
5824
5825 template < typename T >
5826 struct is_same<T, T>
5827 {
5828 static const bool value = true;
5829 };
5830
5831 template < typename T1, typename T2 >
5832 auto
5833 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5834 {
5835 return a1 + a2;
5836 }
5837
5838 int
5839 test(const int c, volatile int v)
5840 {
5841 static_assert(is_same<int, decltype(0)>::value == true, "");
5842 static_assert(is_same<int, decltype(c)>::value == false, "");
5843 static_assert(is_same<int, decltype(v)>::value == false, "");
5844 auto ac = c;
5845 auto av = v;
5846 auto sumi = ac + av + 'x';
5847 auto sumf = ac + av + 1.0;
5848 static_assert(is_same<int, decltype(ac)>::value == true, "");
5849 static_assert(is_same<int, decltype(av)>::value == true, "");
5850 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5851 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5852 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5853 return (sumf > 0.0) ? sumi : add(c, v);
5854 }
5855
5856 }
5857
5858 namespace test_noexcept
5859 {
5860
5861 int f() { return 0; }
5862 int g() noexcept { return 0; }
5863
5864 static_assert(noexcept(f()) == false, "");
5865 static_assert(noexcept(g()) == true, "");
5866
5867 }
5868
5869 namespace test_constexpr
5870 {
5871
5872 template < typename CharT >
5873 unsigned long constexpr
5874 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5875 {
5876 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5877 }
5878
5879 template < typename CharT >
5880 unsigned long constexpr
5881 strlen_c(const CharT *const s) noexcept
5882 {
5883 return strlen_c_r(s, 0UL);
5884 }
5885
5886 static_assert(strlen_c("") == 0UL, "");
5887 static_assert(strlen_c("1") == 1UL, "");
5888 static_assert(strlen_c("example") == 7UL, "");
5889 static_assert(strlen_c("another\0example") == 7UL, "");
5890
5891 }
5892
5893 namespace test_rvalue_references
5894 {
5895
5896 template < int N >
5897 struct answer
5898 {
5899 static constexpr int value = N;
5900 };
5901
5902 answer<1> f(int&) { return answer<1>(); }
5903 answer<2> f(const int&) { return answer<2>(); }
5904 answer<3> f(int&&) { return answer<3>(); }
5905
5906 void
5907 test()
5908 {
5909 int i = 0;
5910 const int c = 0;
5911 static_assert(decltype(f(i))::value == 1, "");
5912 static_assert(decltype(f(c))::value == 2, "");
5913 static_assert(decltype(f(0))::value == 3, "");
5914 }
5915
5916 }
5917
5918 namespace test_uniform_initialization
5919 {
5920
5921 struct test
5922 {
5923 static const int zero {};
5924 static const int one {1};
5925 };
5926
5927 static_assert(test::zero == 0, "");
5928 static_assert(test::one == 1, "");
5929
5930 }
5931
5932 namespace test_lambdas
5933 {
5934
5935 void
5936 test1()
5937 {
5938 auto lambda1 = [](){};
5939 auto lambda2 = lambda1;
5940 lambda1();
5941 lambda2();
5942 }
5943
5944 int
5945 test2()
5946 {
5947 auto a = [](int i, int j){ return i + j; }(1, 2);
5948 auto b = []() -> int { return '0'; }();
5949 auto c = [=](){ return a + b; }();
5950 auto d = [&](){ return c; }();
5951 auto e = [a, &b](int x) mutable {
5952 const auto identity = [](int y){ return y; };
5953 for (auto i = 0; i < a; ++i)
5954 a += b--;
5955 return x + identity(a + b);
5956 }(0);
5957 return a + b + c + d + e;
5958 }
5959
5960 int
5961 test3()
5962 {
5963 const auto nullary = [](){ return 0; };
5964 const auto unary = [](int x){ return x; };
5965 using nullary_t = decltype(nullary);
5966 using unary_t = decltype(unary);
5967 const auto higher1st = [](nullary_t f){ return f(); };
5968 const auto higher2nd = [unary](nullary_t f1){
5969 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5970 };
5971 return higher1st(nullary) + higher2nd(nullary)(unary);
5972 }
5973
5974 }
5975
5976 namespace test_variadic_templates
5977 {
5978
5979 template <int...>
5980 struct sum;
5981
5982 template <int N0, int... N1toN>
5983 struct sum<N0, N1toN...>
5984 {
5985 static constexpr auto value = N0 + sum<N1toN...>::value;
5986 };
5987
5988 template <>
5989 struct sum<>
5990 {
5991 static constexpr auto value = 0;
5992 };
5993
5994 static_assert(sum<>::value == 0, "");
5995 static_assert(sum<1>::value == 1, "");
5996 static_assert(sum<23>::value == 23, "");
5997 static_assert(sum<1, 2>::value == 3, "");
5998 static_assert(sum<5, 5, 11>::value == 21, "");
5999 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6000
6001 }
6002
6003 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6004 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6005 // because of this.
6006 namespace test_template_alias_sfinae
6007 {
6008
6009 struct foo {};
6010
6011 template<typename T>
6012 using member = typename T::member_type;
6013
6014 template<typename T>
6015 void func(...) {}
6016
6017 template<typename T>
6018 void func(member<T>*) {}
6019
6020 void test();
6021
6022 void test() { func<foo>(0); }
6023
6024 }
6025
6026} // namespace cxx11
6027
6028#endif // __cplusplus >= 201103L
6029
6030
6031
6032_ACEOF
6033if ac_fn_cxx_try_compile "$LINENO"; then :
6034 eval $cachevar=yes
6035else
6036 eval $cachevar=no
6037fi
6038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6039 CXX="$ac_save_CXX"
0bcda685
PA
6040fi
6041eval ac_res=\$$cachevar
6042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6043$as_echo "$ac_res" >&6; }
41260ac2
SM
6044 if eval test x\$$cachevar = xyes; then
6045 CXX_DIALECT="$switch"
6046 ac_success=yes
6047 break
6048 fi
6049 done
6050 if test x$ac_success = xyes; then
0bcda685
PA
6051 break
6052 fi
6053 done
6054 fi
6055 ac_ext=c
6056ac_cpp='$CPP $CPPFLAGS'
6057ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6058ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6059ac_compiler_gnu=$ac_cv_c_compiler_gnu
6060
6061 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6062 if test x$ac_success = xno; then
d0ac1c44 6063 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6064 fi
6065 fi
6066 if test x$ac_success = xno; then
6067 HAVE_CXX11=0
6068 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6069$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6070 else
6071 HAVE_CXX11=1
6072
6073$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6074
6075 fi
6076
6077
6078
6079
a417dc56
RW
6080# Dependency checking.
6081rm -rf .tst 2>/dev/null
6082mkdir .tst 2>/dev/null
6083if test -d .tst; then
6084 am__leading_dot=.
6085else
6086 am__leading_dot=_
6087fi
6088rmdir .tst 2>/dev/null
6089
6090DEPDIR="${am__leading_dot}deps"
6091
81ecdfbb 6092ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6093
6094
6095depcc="$CC" am_compiler_list=
6096
6097am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6099$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6100if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6101 $as_echo_n "(cached) " >&6
a417dc56
RW
6102else
6103 if test -f "$am_depcomp"; then
6104 # We make a subdir and do the tests there. Otherwise we can end up
6105 # making bogus files that we don't know about and never remove. For
6106 # instance it was reported that on HP-UX the gcc test will end up
6107 # making a dummy file named `D' -- because `-MD' means `put the output
6108 # in D'.
6109 mkdir conftest.dir
6110 # Copy depcomp to subdir because otherwise we won't find it if we're
6111 # using a relative directory.
6112 cp "$am_depcomp" conftest.dir
6113 cd conftest.dir
6114 # We will build objects and dependencies in a subdirectory because
6115 # it helps to detect inapplicable dependency modes. For instance
6116 # both Tru64's cc and ICC support -MD to output dependencies as a
6117 # side effect of compilation, but ICC will put the dependencies in
6118 # the current directory while Tru64 will put them in the object
6119 # directory.
6120 mkdir sub
6121
6122 am_cv_CC_dependencies_compiler_type=none
6123 if test "$am_compiler_list" = ""; then
6124 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6125 fi
6126 for depmode in $am_compiler_list; do
6127 if test $depmode = none; then break; fi
6128
81ecdfbb 6129 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6130 # Setup a source with many dependencies, because some compilers
6131 # like to wrap large dependency lists on column 80 (with \), and
6132 # we should not choose a depcomp mode which is confused by this.
6133 #
6134 # We need to recreate these files for each test, as the compiler may
6135 # overwrite some of them when testing with obscure command lines.
6136 # This happens at least with the AIX C compiler.
6137 : > sub/conftest.c
6138 for i in 1 2 3 4 5 6; do
6139 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6140 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6141 # Solaris 8's {/usr,}/bin/sh.
6142 touch sub/conftst$i.h
6143 done
6144 echo "include sub/conftest.Po" > confmf
6145
6146 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6147 # mode. It turns out that the SunPro C++ compiler does not properly
6148 # handle `-M -o', and we need to detect this.
6149 depcmd="depmode=$depmode \
6150 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6151 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6152 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6153 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6154 if env $depcmd > conftest.err 2>&1 &&
6155 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6156 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6157 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6158 # icc doesn't choke on unknown options, it will just issue warnings
6159 # or remarks (even with -Werror). So we grep stderr for any message
6160 # that says an option was ignored or not supported.
6161 # When given -MP, icc 7.0 and 7.1 complain thusly:
6162 # icc: Command line warning: ignoring option '-M'; no argument required
6163 # The diagnosis changed in icc 8.0:
6164 # icc: Command line remark: option '-MP' not supported
6165 if (grep 'ignoring option' conftest.err ||
6166 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6167 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6168 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6169 break
6170 fi
6171 fi
81ecdfbb 6172 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6173 sed -e 's/^/| /' < conftest.err >&5
6174 done
6175
6176 cd ..
6177 rm -rf conftest.dir
6178else
6179 am_cv_CC_dependencies_compiler_type=none
6180fi
6181
6182fi
81ecdfbb
RW
6183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6184$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6185if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6186then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6187else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6188
6189fi
6190
6191
648d586d
JB
6192gnulib_extra_configure_args=
6193# If large-file support is disabled, make sure gnulib does the same.
6194if test "$enable_largefile" = no; then
6195gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6196fi
6197
c971b7fa
PA
6198# Configure gnulib. We need to build gnulib under some other
6199# directory not "gnulib", to avoid the problem of both GDB and
6200# GDBserver wanting to build it in the same directory, when building
6201# in the source dir.
783e057b 6202
c971b7fa
PA
6203 in_src="gnulib"
6204 in_build="build-gnulib"
648d586d 6205 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6206
6207 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6208 # so they do not pile up.
6209 ac_sub_configure_args=
6210 ac_prev=
6211 eval "set x $ac_configure_args"
6212 shift
6213 for ac_arg
6214 do
6215 if test -n "$ac_prev"; then
6216 ac_prev=
6217 continue
6218 fi
6219 case $ac_arg in
6220 -cache-file | --cache-file | --cache-fil | --cache-fi \
6221 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6222 ac_prev=cache_file ;;
6223 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6224 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6225 | --c=*)
6226 ;;
6227 --config-cache | -C)
6228 ;;
6229 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6230 ac_prev=srcdir ;;
6231 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6232 ;;
6233 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6234 ac_prev=prefix ;;
6235 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6236 ;;
6237 --disable-option-checking)
6238 ;;
6239 *)
6240 case $ac_arg in
6241 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6242 esac
6243 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6244 esac
6245 done
6246
6247 # Always prepend --prefix to ensure using the same prefix
6248 # in subdir configurations.
6249 ac_arg="--prefix=$prefix"
6250 case $ac_arg in
6251 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6252 esac
6253 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6254
6255 # Pass --silent
6256 if test "$silent" = yes; then
6257 ac_sub_configure_args="--silent $ac_sub_configure_args"
6258 fi
6259
6260 # Always prepend --disable-option-checking to silence warnings, since
6261 # different subdirs can have different --enable and --with options.
6262 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6263
6264 ac_popdir=`pwd`
6265 ac_dir=$in_build
6266
6267 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6268 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6269 $as_echo "$ac_msg" >&6
6270 as_dir="$ac_dir"; as_fn_mkdir_p
6271
38ea300a
PA
6272 case $srcdir in
6273 [\\/]* | ?:[\\/]* )
6274 ac_srcdir=$srcdir/$in_src ;;
6275 *) # Relative name.
6276 ac_srcdir=../$srcdir/$in_src ;;
6277 esac
c971b7fa
PA
6278
6279 cd "$ac_dir"
6280
6281 ac_sub_configure=$ac_srcdir/configure
6282
6283 # Make the cache file name correct relative to the subdirectory.
6284 case $cache_file in
6285 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6286 *) # Relative name.
6287 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6288 esac
6289
648d586d
JB
6290 if test -n "$in_extra_args"; then
6291 # Add the extra args at the end.
6292 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6293 fi
6294
c971b7fa
PA
6295 { $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
6296$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6297 # The eval makes quoting arguments work.
6298 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6299 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 6300 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c971b7fa
PA
6301
6302 cd "$ac_popdir"
783e057b 6303
c971b7fa
PA
6304
6305
6306CONFIG_OBS=
6307CONFIG_DEPS=
6308CONFIG_SRCS=
6309ENABLE_CFLAGS=
6310
6311CONFIG_ALL=
6312CONFIG_CLEAN=
6313CONFIG_INSTALL=
6314CONFIG_UNINSTALL=
6315
6316# If we haven't got the data from the intl directory,
6317# assume NLS is disabled.
6318USE_NLS=no
6319LIBINTL=
6320LIBINTL_DEP=
6321INCINTL=
6322XGETTEXT=
6323GMSGFMT=
6324POSUB=
783e057b
DJ
6325
6326if test -f ../intl/config.intl; then
6327 . ../intl/config.intl
6328fi
81ecdfbb
RW
6329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6330$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6331if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6333$as_echo "no" >&6; }
783e057b 6334else
81ecdfbb
RW
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6336$as_echo "yes" >&6; }
783e057b 6337
81ecdfbb 6338$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6339
6340
81ecdfbb
RW
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6342$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6343 # Look for .po and .gmo files in the source directory.
6344 CATALOGS=
6345 XLINGUAS=
6346 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6347 # If there aren't any .gmo files the shell will give us the
6348 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6349 # weeded out.
6350 case "$cat" in *\**)
6351 continue;;
6352 esac
6353 # The quadruple backslash is collapsed to a double backslash
6354 # by the backticks, then collapsed again by the double quotes,
6355 # leaving us with one backslash in the sed expression (right
6356 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6357 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6358 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6359 # The user is allowed to set LINGUAS to a list of languages to
6360 # install catalogs for. If it's empty that means "all of them."
6361 if test "x$LINGUAS" = x; then
6362 CATALOGS="$CATALOGS $cat"
6363 XLINGUAS="$XLINGUAS $lang"
6364 else
6365 case "$LINGUAS" in *$lang*)
6366 CATALOGS="$CATALOGS $cat"
6367 XLINGUAS="$XLINGUAS $lang"
6368 ;;
6369 esac
e28b3332
DJ
6370 fi
6371 done
c971b7fa
PA
6372 LINGUAS="$XLINGUAS"
6373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6374$as_echo "$LINGUAS" >&6; }
6375
6376
6377 DATADIRNAME=share
6378
6379 INSTOBJEXT=.mo
6380
6381 GENCAT=gencat
6382
6383 CATOBJEXT=.gmo
e28b3332 6384
e28b3332
DJ
6385fi
6386
c971b7fa
PA
6387localedir='${datadir}/locale'
6388
6389
6390if test x"$USE_NLS" = xyes; then
6391 CONFIG_ALL="$CONFIG_ALL all-po"
6392 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6393 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6394 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6395fi
e28b3332 6396
c971b7fa
PA
6397GNULIB=build-gnulib/import
6398
6399# For Makefile dependencies.
6400GNULIB_STDINT_H=
6401if test x"$STDINT_H" != x; then
6402 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
6403fi
6404
6405
c971b7fa
PA
6406PACKAGE=gdb
6407
6408cat >>confdefs.h <<_ACEOF
6409#define PACKAGE "$PACKAGE"
6410_ACEOF
6411
6412
6413
6414# We never need to detect it in this sub-configure.
6415# But preserve it for config.status --recheck.
6416
6417
6418
6419MAKEINFO_EXTRA_FLAGS=""
6420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6421$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6422if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6423 $as_echo_n "(cached) " >&6
6424else
6425 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6426 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6427 gdb_cv_have_makeinfo_click=yes
6428 else
6429 gdb_cv_have_makeinfo_click=no
6430 fi
6431fi
6432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6433$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6434if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6435 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6436fi
e28b3332
DJ
6437
6438
bec39cab
AC
6439
6440
81ecdfbb
RW
6441# Check whether --with-separate-debug-dir was given.
6442if test "${with_separate_debug_dir+set}" = set; then :
6443 withval=$with_separate_debug_dir;
b14b1491
TT
6444 DEBUGDIR=$withval
6445else
6446 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6447fi
6448
20e95c23 6449
783e057b
DJ
6450 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6451 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6452 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6453 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6454
783e057b
DJ
6455cat >>confdefs.h <<_ACEOF
6456#define DEBUGDIR "$ac_define_dir"
20e95c23 6457_ACEOF
20e95c23 6458
20e95c23 6459
20e95c23 6460
0c4a4063 6461
b14b1491
TT
6462 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6463 if test "x$prefix" = xNONE; then
6464 test_prefix=/usr/local
6465 else
6466 test_prefix=$prefix
6467 fi
783e057b 6468 else
b14b1491 6469 test_prefix=$exec_prefix
783e057b 6470 fi
b14b1491
TT
6471 value=0
6472 case ${ac_define_dir} in
6473 "${test_prefix}"|"${test_prefix}/"*|\
6474 '${exec_prefix}'|'${exec_prefix}/'*)
6475 value=1
6476 ;;
6477 esac
6478
6479cat >>confdefs.h <<_ACEOF
6480#define DEBUGDIR_RELOCATABLE $value
6481_ACEOF
6482
6483
6484
0c4a4063 6485
f83d8a90
DE
6486# We can't pass paths as command line arguments.
6487# Mingw32 tries to be clever and will convert the paths for us.
6488# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6489# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6490# This breaks GDB's relocatable path conversions since paths passed in
6491# config.h would not get so translated, the path prefixes no longer match.
6492
6493 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6494 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6495 ac_define_dir=`eval echo $bindir`
6496 ac_define_dir=`eval echo $ac_define_dir`
6497
6498cat >>confdefs.h <<_ACEOF
6499#define BINDIR "$ac_define_dir"
6500_ACEOF
6501
6502
6503
b14b1491
TT
6504# GDB's datadir relocation
6505
6506
6507
81ecdfbb
RW
6508# Check whether --with-gdb-datadir was given.
6509if test "${with_gdb_datadir+set}" = set; then :
6510 withval=$with_gdb_datadir;
b14b1491 6511 GDB_DATADIR=$withval
20e95c23 6512else
b14b1491 6513 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6514fi
6515
20e95c23 6516
b14b1491
TT
6517 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6518 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6519 ac_define_dir=`eval echo $GDB_DATADIR`
6520 ac_define_dir=`eval echo $ac_define_dir`
6521
6522cat >>confdefs.h <<_ACEOF
6523#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6524_ACEOF
6525
b14b1491
TT
6526
6527
0c4a4063 6528
b14b1491
TT
6529 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6530 if test "x$prefix" = xNONE; then
6531 test_prefix=/usr/local
6532 else
6533 test_prefix=$prefix
6534 fi
6535 else
6536 test_prefix=$exec_prefix
6537 fi
6538 value=0
6539 case ${ac_define_dir} in
6540 "${test_prefix}"|"${test_prefix}/"*|\
6541 '${exec_prefix}'|'${exec_prefix}/'*)
6542 value=1
6543 ;;
6544 esac
6545
6546cat >>confdefs.h <<_ACEOF
6547#define GDB_DATADIR_RELOCATABLE $value
6548_ACEOF
6549
6550
783e057b 6551
20e95c23 6552
0c4a4063 6553
81ecdfbb
RW
6554# Check whether --with-relocated-sources was given.
6555if test "${with_relocated_sources+set}" = set; then :
6556 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6557
6558 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6559 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6560 ac_define_dir=`eval echo $reloc_srcdir`
6561 ac_define_dir=`eval echo $ac_define_dir`
6562
6563cat >>confdefs.h <<_ACEOF
6564#define RELOC_SRCDIR "$ac_define_dir"
6565_ACEOF
6566
6567
6568
81ecdfbb
RW
6569fi
6570
29b0e8a2 6571
7349ff92
JK
6572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6573$as_echo_n "checking for default auto-load directory... " >&6; }
6574
6575# Check whether --with-auto-load-dir was given.
6576if test "${with_auto_load_dir+set}" = set; then :
6577 withval=$with_auto_load_dir;
6578else
1564a261 6579 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6580fi
6581
1564a261 6582escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6583
6584 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6585 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6586 ac_define_dir=`eval echo $escape_dir`
6587 ac_define_dir=`eval echo $ac_define_dir`
6588
6589cat >>confdefs.h <<_ACEOF
6590#define AUTO_LOAD_DIR "$ac_define_dir"
6591_ACEOF
6592
6593
6594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6595$as_echo "$with_auto_load_dir" >&6; }
6596
bccbefd2
JK
6597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6598$as_echo_n "checking for default auto-load safe-path... " >&6; }
6599
6600# Check whether --with-auto-load-safe-path was given.
6601if test "${with_auto_load_safe_path+set}" = set; then :
6602 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6603 with_auto_load_safe_path="/"
6604 fi
bccbefd2 6605else
7349ff92 6606 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6607fi
6608
1564a261 6609escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6610
6611 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6612 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6613 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6614 ac_define_dir=`eval echo $ac_define_dir`
6615
6616cat >>confdefs.h <<_ACEOF
6dea1fbd 6617#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6618_ACEOF
6619
6620
6621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6622$as_echo "$with_auto_load_safe_path" >&6; }
6623
29b0e8a2 6624
20e95c23 6625
5ae98d25 6626subdirs="$subdirs testsuite"
20e95c23
DJ
6627
6628
783e057b 6629# Check whether to support alternative target configurations
81ecdfbb
RW
6630# Check whether --enable-targets was given.
6631if test "${enable_targets+set}" = set; then :
6632 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6633 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6634 ;;
6635 no) enable_targets= ;;
6636 *) enable_targets=$enableval ;;
6637esac
81ecdfbb
RW
6638fi
6639
20e95c23 6640
783e057b 6641# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6642# Check whether --enable-64-bit-bfd was given.
6643if test "${enable_64_bit_bfd+set}" = set; then :
6644 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6645 yes) want64=true ;;
6646 no) want64=false ;;
d0ac1c44 6647 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6648esac
6649else
6650 want64=false
81ecdfbb
RW
6651fi
6652
783e057b
DJ
6653# Provide defaults for some variables set by the per-host and per-target
6654# configuration.
6655gdb_host_obs=posix-hdep.o
20e95c23 6656
783e057b
DJ
6657if test "${target}" = "${host}"; then
6658 gdb_native=yes
6659else
6660 gdb_native=no
6661fi
20e95c23 6662
783e057b 6663. $srcdir/configure.host
20e95c23 6664
fb23d554
SDJ
6665# Add in the common host objects.
6666. $srcdir/common/common.host
6667gdb_host_obs="$gdb_host_obs $common_host_obs"
6668
783e057b 6669# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6670
783e057b
DJ
6671TARGET_OBS=
6672all_targets=
b292c783 6673HAVE_NATIVE_GCORE_TARGET=
20e95c23 6674
783e057b 6675for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6676do
783e057b
DJ
6677 if test "$targ_alias" = "all"; then
6678 all_targets=true
6679 else
6680 # Canonicalize the secondary target names.
6681 result=`$ac_config_sub $targ_alias 2>/dev/null`
6682 if test -n "$result"; then
6683 targ=$result
6684 else
6685 targ=$targ_alias
6686 fi
20e95c23 6687
783e057b 6688 . ${srcdir}/configure.tgt
20e95c23 6689
bf307134 6690 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6691 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6692fi
6693
783e057b
DJ
6694 # Target-specific object files
6695 for i in ${gdb_target_obs}; do
6696 case " $TARGET_OBS " in
6697 *" ${i} "*) ;;
6698 *)
6699 TARGET_OBS="$TARGET_OBS ${i}"
6700 ;;
6701 esac
6702 done
20e95c23 6703
783e057b
DJ
6704 # Check whether this target needs 64-bit CORE_ADDR
6705 if test x${want64} = xfalse; then
6706 . ${srcdir}/../bfd/config.bfd
6707 fi
b292c783
JK
6708
6709 # Check whether this target is native and supports gcore.
6710 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6711 && $gdb_have_gcore; then
6712 HAVE_NATIVE_GCORE_TARGET=1
6713 fi
783e057b 6714 fi
20e95c23
DJ
6715done
6716
783e057b
DJ
6717if test x${all_targets} = xtrue; then
6718
6719 # We want all 64-bit targets if we either:
6720 # - run on a 64-bit host or
6721 # - already require 64-bit support for some other target or
6722 # - the --enable-64-bit-bfd option was supplied
6723 # Otherwise we only support all 32-bit targets.
6724 #
6725 # NOTE: This test must be in sync with the corresponding
6726 # tests in BFD!
20e95c23 6727
783e057b 6728 if test x${want64} = xfalse; then
81ecdfbb
RW
6729 # The cast to long int works around a bug in the HP C Compiler
6730# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6731# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6732# This bug is HP SR number 8606223364.
6733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6734$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6735if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6736 $as_echo_n "(cached) " >&6
c0993dbe 6737else
81ecdfbb 6738 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6739
81ecdfbb
RW
6740else
6741 if test "$ac_cv_type_long" = yes; then
6742 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6744as_fn_error 77 "cannot compute sizeof (long)
6745See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6746 else
6747 ac_cv_sizeof_long=0
6748 fi
c0993dbe 6749fi
81ecdfbb 6750
c0993dbe 6751fi
81ecdfbb
RW
6752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6753$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6754
c0993dbe 6755
c0993dbe 6756
c0993dbe
UW
6757cat >>confdefs.h <<_ACEOF
6758#define SIZEOF_LONG $ac_cv_sizeof_long
6759_ACEOF
6760
6761
6762 if test "x${ac_cv_sizeof_long}" = "x8"; then
6763 want64=true
6764 fi
6765 fi
6766 if test x${want64} = xtrue; then
6767 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6768 else
6769 TARGET_OBS='$(ALL_TARGET_OBS)'
6770 fi
6771fi
6772
6773
6774
b292c783 6775
c0993dbe
UW
6776# For other settings, only the main target counts.
6777gdb_sim=
6778gdb_osabi=
6779build_gdbserver=
6780targ=$target; . ${srcdir}/configure.tgt
6781
6782# Fetch the default architecture and default target vector from BFD.
6783targ=$target; . $srcdir/../bfd/config.bfd
6784
6785# We only want the first architecture, so strip off the others if
6786# there is more than one.
6787targ_archs=`echo $targ_archs | sed 's/ .*//'`
6788
6789if test "x$targ_archs" != x; then
6790
6791cat >>confdefs.h <<_ACEOF
6792#define DEFAULT_BFD_ARCH $targ_archs
6793_ACEOF
6794
6795fi
6796if test "x$targ_defvec" != x; then
6797
6798cat >>confdefs.h <<_ACEOF
6799#define DEFAULT_BFD_VEC $targ_defvec
6800_ACEOF
6801
6802fi
6803
c0993dbe 6804# Enable MI.
81ecdfbb
RW
6805# Check whether --enable-gdbmi was given.
6806if test "${enable_gdbmi+set}" = set; then :
6807 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6808 yes | no)
6809 ;;
6810 *)
d0ac1c44 6811 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6812 esac
6813else
6814 enable_gdbmi=yes
81ecdfbb
RW
6815fi
6816
c0993dbe
UW
6817if test x"$enable_gdbmi" = xyes; then
6818 if test -d $srcdir/mi; then
6819 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6820 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6821 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6822 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6823 fi
6824fi
6825
6826# Enable TUI.
81ecdfbb
RW
6827# Check whether --enable-tui was given.
6828if test "${enable_tui+set}" = set; then :
6829 enableval=$enable_tui; case $enableval in
3ca64bd3 6830 yes | no | auto)
c0993dbe
UW
6831 ;;
6832 *)
d0ac1c44 6833 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6834 esac
6835else
3ca64bd3 6836 enable_tui=auto
81ecdfbb
RW
6837fi
6838
c0993dbe
UW
6839
6840# Enable gdbtk.
81ecdfbb
RW
6841# Check whether --enable-gdbtk was given.
6842if test "${enable_gdbtk+set}" = set; then :
6843 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6844 yes | no)
6845 ;;
6846 *)
d0ac1c44 6847 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6848 esac
6849else
5062cc19 6850 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6851 enable_gdbtk=yes
6852 else
6853 enable_gdbtk=no
6854 fi
81ecdfbb
RW
6855fi
6856
c0993dbe
UW
6857# We unconditionally disable gdbtk tests on selected platforms.
6858case $host_os in
6859 go32* | windows*)
81ecdfbb
RW
6860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6861$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6862 enable_gdbtk=no ;;
6863esac
6864
05e7c244 6865# Libunwind support for ia64.
bec39cab 6866
05e7c244
JK
6867
6868# Check whether --with-libunwind-ia64 was given.
6869if test "${with_libunwind_ia64+set}" = set; then :
6870 withval=$with_libunwind_ia64;
bec39cab 6871else
05e7c244
JK
6872 with_libunwind_ia64=auto
6873fi
bec39cab 6874
05e7c244
JK
6875
6876# Backward compatibility option.
6877if test "${with_libunwind+set}" = set; then
6878 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6879 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6880 fi
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6882$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6883 with_libunwind_ia64="$with_libunwind"
6884fi
6885
6886case "$with_libunwind_ia64" in
6887 yes | no)
6888 ;;
6889 auto)
6890 for ac_header in libunwind-ia64.h
81ecdfbb 6891do :
b54a8fd7 6892 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6893if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6894 cat >>confdefs.h <<_ACEOF
b54a8fd7 6895#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6896_ACEOF
6897
6898fi
6899
6900done
6901
05e7c244
JK
6902 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6903 ;;
6904 *)
d0ac1c44 6905 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6906 ;;
6907esac
bec39cab 6908
05e7c244 6909if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6910 for ac_header in libunwind-ia64.h
81ecdfbb 6911do :
b54a8fd7 6912 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6913if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6914 cat >>confdefs.h <<_ACEOF
b54a8fd7 6915#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6916_ACEOF
6917
6918fi
6919
6920done
6921
05e7c244 6922 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6923 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6924 fi
6925 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6926 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6927 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6928fi
6929
cb01cfba
JB
6930opt_curses=no
6931
81ecdfbb
RW
6932# Check whether --with-curses was given.
6933if test "${with_curses+set}" = set; then :
6934 withval=$with_curses; opt_curses=$withval
6935fi
6936
cb01cfba 6937
76a39ba7 6938prefer_curses=no
cb01cfba 6939if test "$opt_curses" = "yes"; then
76a39ba7 6940 prefer_curses=yes
cb01cfba
JB
6941fi
6942
a9322a30 6943# Profiling support.
81ecdfbb
RW
6944# Check whether --enable-profiling was given.
6945if test "${enable_profiling+set}" = set; then :
6946 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6947 yes | no)
6948 ;;
6949 *)
d0ac1c44 6950 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6951 esac
6952else
6953 enable_profiling=no
81ecdfbb 6954fi
bec39cab 6955
a9322a30
TT
6956
6957for ac_func in monstartup _mcleanup
81ecdfbb
RW
6958do :
6959 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6960ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6961if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6962 cat >>confdefs.h <<_ACEOF
6963#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6964_ACEOF
a9322a30 6965
81ecdfbb
RW
6966fi
6967done
a9322a30 6968
81ecdfbb
RW
6969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6970$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6971if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6972 $as_echo_n "(cached) " >&6
6973else
6974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6975/* end confdefs.h. */
6976#include <stdlib.h>
6977extern char _etext;
a9322a30
TT
6978
6979int
6980main ()
6981{
6982free (&_etext);
6983 ;
6984 return 0;
6985}
bec39cab 6986_ACEOF
81ecdfbb 6987if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6988 ac_cv_var__etext=yes
bec39cab 6989else
81ecdfbb 6990 ac_cv_var__etext=no
bec39cab 6991fi
81ecdfbb
RW
6992rm -f core conftest.err conftest.$ac_objext \
6993 conftest$ac_exeext conftest.$ac_ext
bec39cab 6994fi
81ecdfbb
RW
6995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6996$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6997if test $ac_cv_var__etext = yes; then
60ca704f 6998
81ecdfbb 6999$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7000
bec39cab 7001fi
81ecdfbb
RW
7002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7003$as_echo_n "checking for etext... " >&6; }
d0ac1c44 7004if ${ac_cv_var_etext+:} false; then :
81ecdfbb 7005 $as_echo_n "(cached) " >&6
bec39cab 7006else
81ecdfbb 7007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7008/* end confdefs.h. */
a9322a30
TT
7009#include <stdlib.h>
7010extern char etext;
bec39cab
AC
7011
7012int
7013main ()
7014{
a9322a30 7015free (&etext);
bec39cab
AC
7016 ;
7017 return 0;
7018}
7019_ACEOF
81ecdfbb 7020if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7021 ac_cv_var_etext=yes
bec39cab 7022else
81ecdfbb 7023 ac_cv_var_etext=no
bec39cab 7024fi
81ecdfbb
RW
7025rm -f core conftest.err conftest.$ac_objext \
7026 conftest$ac_exeext conftest.$ac_ext
bec39cab 7027fi
81ecdfbb
RW
7028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7029$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
7030if test $ac_cv_var_etext = yes; then
7031
81ecdfbb 7032$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7033
7034fi
a9322a30
TT
7035if test "$enable_profiling" = yes ; then
7036 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
d0ac1c44 7037 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7038 fi
7039 PROFILE_CFLAGS=-pg
7040 OLD_CFLAGS="$CFLAGS"
7041 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7042
81ecdfbb
RW
7043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7044$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7045if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7046 $as_echo_n "(cached) " >&6
bec39cab 7047else
81ecdfbb 7048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7049/* end confdefs.h. */
bec39cab
AC
7050
7051int
7052main ()
7053{
a9322a30 7054int x;
bec39cab
AC
7055 ;
7056 return 0;
7057}
7058_ACEOF
81ecdfbb 7059if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7060 ac_cv_cc_supports_pg=yes
bec39cab 7061else
81ecdfbb 7062 ac_cv_cc_supports_pg=no
bec39cab 7063fi
81ecdfbb 7064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7065fi
81ecdfbb
RW
7066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7067$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7068
a9322a30 7069 if test $ac_cv_cc_supports_pg = no; then
d0ac1c44 7070 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7071 fi
bec39cab 7072
a9322a30 7073 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7074fi
7075
44cee4fd
TT
7076CODESIGN_CERT=
7077# Check whether --enable-codesign was given.
7078if test "${enable_codesign+set}" = set; then :
7079 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7080fi
7081
7082
7083
c16158bc
JM
7084
7085
81ecdfbb
RW
7086# Check whether --with-pkgversion was given.
7087if test "${with_pkgversion+set}" = set; then :
7088 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7089 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7090 no) PKGVERSION= ;;
7091 *) PKGVERSION="($withval) " ;;
7092 esac
7093else
7094 PKGVERSION="(GDB) "
7095
81ecdfbb 7096fi
c16158bc
JM
7097
7098
7099
7100
81ecdfbb
RW
7101
7102# Check whether --with-bugurl was given.
7103if test "${with_bugurl+set}" = set; then :
7104 withval=$with_bugurl; case "$withval" in
d0ac1c44 7105 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7106 no) BUGURL=
7107 ;;
7108 *) BUGURL="$withval"
7109 ;;
7110 esac
7111else
7112 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7113
81ecdfbb
RW
7114fi
7115
c16158bc
JM
7116 case ${BUGURL} in
7117 "")
7118 REPORT_BUGS_TO=
7119 REPORT_BUGS_TEXI=
7120 ;;
7121 *)
7122 REPORT_BUGS_TO="<$BUGURL>"
7123 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7124 ;;
7125 esac;
7126
7127
7128
7129
7130cat >>confdefs.h <<_ACEOF
7131#define PKGVERSION "$PKGVERSION"
7132_ACEOF
7133
7134
7135cat >>confdefs.h <<_ACEOF
7136#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7137_ACEOF
7138
7139
bec39cab
AC
7140# --------------------- #
7141# Checks for programs. #
7142# --------------------- #
7143
7144for ac_prog in gawk mawk nawk awk
7145do
7146 # Extract the first word of "$ac_prog", so it can be a program name with args.
7147set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7149$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7150if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7151 $as_echo_n "(cached) " >&6
bec39cab
AC
7152else
7153 if test -n "$AWK"; then
7154 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7155else
7156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7157for as_dir in $PATH
7158do
7159 IFS=$as_save_IFS
7160 test -z "$as_dir" && as_dir=.
81ecdfbb 7161 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7162 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7163 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7164 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7165 break 2
7166 fi
7167done
81ecdfbb
RW
7168 done
7169IFS=$as_save_IFS
bec39cab
AC
7170
7171fi
7172fi
7173AWK=$ac_cv_prog_AWK
7174if test -n "$AWK"; then
81ecdfbb
RW
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7176$as_echo "$AWK" >&6; }
bec39cab 7177else
81ecdfbb
RW
7178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7179$as_echo "no" >&6; }
bec39cab
AC
7180fi
7181
bec39cab 7182
81ecdfbb 7183 test -n "$AWK" && break
bec39cab
AC
7184done
7185
c971b7fa
PA
7186# Find a good install program. We prefer a C program (faster),
7187# so one script is as good as another. But avoid the broken or
7188# incompatible versions:
7189# SysV /etc/install, /usr/sbin/install
7190# SunOS /usr/etc/install
7191# IRIX /sbin/install
7192# AIX /bin/install
7193# AmigaOS /C/install, which installs bootblocks on floppy discs
7194# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7195# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7196# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7197# OS/2's system install, which has a completely different semantic
7198# ./install, which can be erroneously created by make from ./install.sh.
7199# Reject install programs that cannot install multiple files.
7200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7201$as_echo_n "checking for a BSD-compatible install... " >&6; }
7202if test -z "$INSTALL"; then
d0ac1c44 7203if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7204 $as_echo_n "(cached) " >&6
7205else
7206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7207for as_dir in $PATH
7208do
7209 IFS=$as_save_IFS
7210 test -z "$as_dir" && as_dir=.
7211 # Account for people who put trailing slashes in PATH elements.
7212case $as_dir/ in #((
7213 ./ | .// | /[cC]/* | \
7214 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7215 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7216 /usr/ucb/* ) ;;
7217 *)
7218 # OSF1 and SCO ODT 3.0 have their own names for install.
7219 # Don't use installbsd from OSF since it installs stuff as root
7220 # by default.
7221 for ac_prog in ginstall scoinst install; do
7222 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7223 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7224 if test $ac_prog = install &&
7225 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7226 # AIX install. It has an incompatible calling convention.
7227 :
7228 elif test $ac_prog = install &&
7229 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7230 # program-specific install script used by HP pwplus--don't use.
7231 :
7232 else
7233 rm -rf conftest.one conftest.two conftest.dir
7234 echo one > conftest.one
7235 echo two > conftest.two
7236 mkdir conftest.dir
7237 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7238 test -s conftest.one && test -s conftest.two &&
7239 test -s conftest.dir/conftest.one &&
7240 test -s conftest.dir/conftest.two
7241 then
7242 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7243 break 3
7244 fi
7245 fi
7246 fi
7247 done
7248 done
7249 ;;
7250esac
7251
7252 done
7253IFS=$as_save_IFS
7254
7255rm -rf conftest.one conftest.two conftest.dir
7256
7257fi
7258 if test "${ac_cv_path_install+set}" = set; then
7259 INSTALL=$ac_cv_path_install
7260 else
7261 # As a last resort, use the slow shell script. Don't cache a
7262 # value for INSTALL within a source directory, because that will
7263 # break other packages using the cache if that directory is
7264 # removed, or if the value is a relative name.
7265 INSTALL=$ac_install_sh
7266 fi
7267fi
7268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7269$as_echo "$INSTALL" >&6; }
7270
7271# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7272# It thinks the first close brace ends the variable substitution.
7273test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7274
7275test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7276
7277test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7278
81ecdfbb
RW
7279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7280$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7281LN_S=$as_ln_s
7282if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7284$as_echo "yes" >&6; }
bec39cab 7285else
81ecdfbb
RW
7286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7287$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7288fi
7289
7290if test -n "$ac_tool_prefix"; then
7291 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7292set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7294$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7295if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7296 $as_echo_n "(cached) " >&6
bec39cab
AC
7297else
7298 if test -n "$RANLIB"; then
7299 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7300else
7301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7302for as_dir in $PATH
7303do
7304 IFS=$as_save_IFS
7305 test -z "$as_dir" && as_dir=.
81ecdfbb 7306 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7307 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7308 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7309 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7310 break 2
7311 fi
7312done
81ecdfbb
RW
7313 done
7314IFS=$as_save_IFS
bec39cab
AC
7315
7316fi
7317fi
7318RANLIB=$ac_cv_prog_RANLIB
7319if test -n "$RANLIB"; then
81ecdfbb
RW
7320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7321$as_echo "$RANLIB" >&6; }
bec39cab 7322else
81ecdfbb
RW
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7324$as_echo "no" >&6; }
bec39cab
AC
7325fi
7326
81ecdfbb 7327
bec39cab
AC
7328fi
7329if test -z "$ac_cv_prog_RANLIB"; then
7330 ac_ct_RANLIB=$RANLIB
7331 # Extract the first word of "ranlib", so it can be a program name with args.
7332set dummy ranlib; ac_word=$2
81ecdfbb
RW
7333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7334$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7335if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7336 $as_echo_n "(cached) " >&6
bec39cab
AC
7337else
7338 if test -n "$ac_ct_RANLIB"; then
7339 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7340else
7341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7342for as_dir in $PATH
7343do
7344 IFS=$as_save_IFS
7345 test -z "$as_dir" && as_dir=.
81ecdfbb 7346 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7347 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7348 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7350 break 2
7351 fi
7352done
81ecdfbb
RW
7353 done
7354IFS=$as_save_IFS
bec39cab 7355
bec39cab
AC
7356fi
7357fi
7358ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7359if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7361$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7362else
81ecdfbb
RW
7363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7364$as_echo "no" >&6; }
bec39cab
AC
7365fi
7366
81ecdfbb
RW
7367 if test "x$ac_ct_RANLIB" = x; then
7368 RANLIB=":"
7369 else
7370 case $cross_compiling:$ac_tool_warned in
7371yes:)
7372{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7373$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7374ac_tool_warned=yes ;;
7375esac
7376 RANLIB=$ac_ct_RANLIB
7377 fi
bec39cab
AC
7378else
7379 RANLIB="$ac_cv_prog_RANLIB"
7380fi
7381
7382for ac_prog in 'bison -y' byacc
7383do
7384 # Extract the first word of "$ac_prog", so it can be a program name with args.
7385set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7387$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7388if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7389 $as_echo_n "(cached) " >&6
bec39cab
AC
7390else
7391 if test -n "$YACC"; then
7392 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7393else
7394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7395for as_dir in $PATH
7396do
7397 IFS=$as_save_IFS
7398 test -z "$as_dir" && as_dir=.
81ecdfbb 7399 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7401 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7403 break 2
7404 fi
7405done
81ecdfbb
RW
7406 done
7407IFS=$as_save_IFS
bec39cab
AC
7408
7409fi
7410fi
7411YACC=$ac_cv_prog_YACC
7412if test -n "$YACC"; then
81ecdfbb
RW
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7414$as_echo "$YACC" >&6; }
bec39cab 7415else
81ecdfbb
RW
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417$as_echo "no" >&6; }
bec39cab
AC
7418fi
7419
81ecdfbb 7420
bec39cab
AC
7421 test -n "$YACC" && break
7422done
7423test -n "$YACC" || YACC="yacc"
7424
7425
7426if test -n "$ac_tool_prefix"; then
7427 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7428set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7430$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7431if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7432 $as_echo_n "(cached) " >&6
bec39cab
AC
7433else
7434 if test -n "$AR"; then
7435 ac_cv_prog_AR="$AR" # Let the user override the test.
7436else
7437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7438for as_dir in $PATH
7439do
7440 IFS=$as_save_IFS
7441 test -z "$as_dir" && as_dir=.
81ecdfbb 7442 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7444 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7446 break 2
7447 fi
7448done
81ecdfbb
RW
7449 done
7450IFS=$as_save_IFS
bec39cab
AC
7451
7452fi
7453fi
7454AR=$ac_cv_prog_AR
7455if test -n "$AR"; then
81ecdfbb
RW
7456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7457$as_echo "$AR" >&6; }
bec39cab 7458else
81ecdfbb
RW
7459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7460$as_echo "no" >&6; }
bec39cab
AC
7461fi
7462
81ecdfbb 7463
bec39cab
AC
7464fi
7465if test -z "$ac_cv_prog_AR"; then
7466 ac_ct_AR=$AR
7467 # Extract the first word of "ar", so it can be a program name with args.
7468set dummy ar; ac_word=$2
81ecdfbb
RW
7469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7470$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7471if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7472 $as_echo_n "(cached) " >&6
bec39cab
AC
7473else
7474 if test -n "$ac_ct_AR"; then
7475 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7476else
7477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7478for as_dir in $PATH
7479do
7480 IFS=$as_save_IFS
7481 test -z "$as_dir" && as_dir=.
81ecdfbb 7482 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7483 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7484 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7485 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7486 break 2
7487 fi
7488done
81ecdfbb
RW
7489 done
7490IFS=$as_save_IFS
bec39cab
AC
7491
7492fi
7493fi
7494ac_ct_AR=$ac_cv_prog_ac_ct_AR
7495if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7497$as_echo "$ac_ct_AR" >&6; }
bec39cab 7498else
81ecdfbb
RW
7499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7500$as_echo "no" >&6; }
bec39cab
AC
7501fi
7502
81ecdfbb
RW
7503 if test "x$ac_ct_AR" = x; then
7504 AR=""
7505 else
7506 case $cross_compiling:$ac_tool_warned in
7507yes:)
7508{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7509$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7510ac_tool_warned=yes ;;
7511esac
7512 AR=$ac_ct_AR
7513 fi
bec39cab
AC
7514else
7515 AR="$ac_cv_prog_AR"
7516fi
7517
7518if test -n "$ac_tool_prefix"; then
7519 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7520set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7522$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7523if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7524 $as_echo_n "(cached) " >&6
bec39cab
AC
7525else
7526 if test -n "$DLLTOOL"; then
7527 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7528else
7529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7530for as_dir in $PATH
7531do
7532 IFS=$as_save_IFS
7533 test -z "$as_dir" && as_dir=.
81ecdfbb 7534 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7535 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7536 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7538 break 2
7539 fi
7540done
81ecdfbb
RW
7541 done
7542IFS=$as_save_IFS
bec39cab
AC
7543
7544fi
7545fi
7546DLLTOOL=$ac_cv_prog_DLLTOOL
7547if test -n "$DLLTOOL"; then
81ecdfbb
RW
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7549$as_echo "$DLLTOOL" >&6; }
bec39cab 7550else
81ecdfbb
RW
7551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7552$as_echo "no" >&6; }
bec39cab
AC
7553fi
7554
81ecdfbb 7555
bec39cab
AC
7556fi
7557if test -z "$ac_cv_prog_DLLTOOL"; then
7558 ac_ct_DLLTOOL=$DLLTOOL
7559 # Extract the first word of "dlltool", so it can be a program name with args.
7560set dummy dlltool; ac_word=$2
81ecdfbb
RW
7561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7562$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7563if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7564 $as_echo_n "(cached) " >&6
bec39cab
AC
7565else
7566 if test -n "$ac_ct_DLLTOOL"; then
7567 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7568else
7569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7570for as_dir in $PATH
7571do
7572 IFS=$as_save_IFS
7573 test -z "$as_dir" && as_dir=.
81ecdfbb 7574 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7575 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7576 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7577 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7578 break 2
7579 fi
7580done
81ecdfbb
RW
7581 done
7582IFS=$as_save_IFS
bec39cab
AC
7583
7584fi
7585fi
7586ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7587if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7589$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7590else
81ecdfbb
RW
7591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7592$as_echo "no" >&6; }
bec39cab
AC
7593fi
7594
81ecdfbb
RW
7595 if test "x$ac_ct_DLLTOOL" = x; then
7596 DLLTOOL=""
7597 else
7598 case $cross_compiling:$ac_tool_warned in
7599yes:)
7600{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7601$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7602ac_tool_warned=yes ;;
7603esac
7604 DLLTOOL=$ac_ct_DLLTOOL
7605 fi
bec39cab
AC
7606else
7607 DLLTOOL="$ac_cv_prog_DLLTOOL"
7608fi
7609
7610if test -n "$ac_tool_prefix"; then
7611 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7612set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7614$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7615if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7616 $as_echo_n "(cached) " >&6
bec39cab
AC
7617else
7618 if test -n "$WINDRES"; then
7619 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7620else
7621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7622for as_dir in $PATH
7623do
7624 IFS=$as_save_IFS
7625 test -z "$as_dir" && as_dir=.
81ecdfbb 7626 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7627 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7628 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7629 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7630 break 2
7631 fi
7632done
81ecdfbb
RW
7633 done
7634IFS=$as_save_IFS
bec39cab
AC
7635
7636fi
7637fi
7638WINDRES=$ac_cv_prog_WINDRES
7639if test -n "$WINDRES"; then
81ecdfbb
RW
7640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7641$as_echo "$WINDRES" >&6; }
bec39cab 7642else
81ecdfbb
RW
7643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7644$as_echo "no" >&6; }
bec39cab
AC
7645fi
7646
81ecdfbb 7647
bec39cab
AC
7648fi
7649if test -z "$ac_cv_prog_WINDRES"; then
7650 ac_ct_WINDRES=$WINDRES
7651 # Extract the first word of "windres", so it can be a program name with args.
7652set dummy windres; ac_word=$2
81ecdfbb
RW
7653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7654$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7655if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7656 $as_echo_n "(cached) " >&6
bec39cab
AC
7657else
7658 if test -n "$ac_ct_WINDRES"; then
7659 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7660else
7661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7662for as_dir in $PATH
7663do
7664 IFS=$as_save_IFS
7665 test -z "$as_dir" && as_dir=.
81ecdfbb 7666 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7667 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7668 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7670 break 2
7671 fi
7672done
81ecdfbb
RW
7673 done
7674IFS=$as_save_IFS
bec39cab
AC
7675
7676fi
7677fi
7678ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7679if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7681$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7682else
81ecdfbb
RW
7683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7684$as_echo "no" >&6; }
c906108c 7685fi
bec39cab 7686
81ecdfbb
RW
7687 if test "x$ac_ct_WINDRES" = x; then
7688 WINDRES=""
7689 else
7690 case $cross_compiling:$ac_tool_warned in
7691yes:)
7692{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7693$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7694ac_tool_warned=yes ;;
7695esac
7696 WINDRES=$ac_ct_WINDRES
7697 fi
c906108c 7698else
bec39cab 7699 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7700fi
7701
bec39cab 7702
036c3acb
TS
7703case $host_os in
7704 gnu*)
7705 # Needed for GNU Hurd hosts.
7706 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7707 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7708set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7710$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7711if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7712 $as_echo_n "(cached) " >&6
c906108c 7713else
bec39cab
AC
7714 if test -n "$MIG"; then
7715 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7716else
7717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7718for as_dir in $PATH
7719do
7720 IFS=$as_save_IFS
7721 test -z "$as_dir" && as_dir=.
81ecdfbb 7722 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7723 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7724 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7726 break 2
7727 fi
7728done
81ecdfbb
RW
7729 done
7730IFS=$as_save_IFS
bec39cab 7731
c906108c 7732fi
bec39cab
AC
7733fi
7734MIG=$ac_cv_prog_MIG
7735if test -n "$MIG"; then
81ecdfbb
RW
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7737$as_echo "$MIG" >&6; }
c906108c 7738else
81ecdfbb
RW
7739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7740$as_echo "no" >&6; }
c906108c
SS
7741fi
7742
81ecdfbb 7743
bec39cab
AC
7744fi
7745if test -z "$ac_cv_prog_MIG"; then
7746 ac_ct_MIG=$MIG
7747 # Extract the first word of "mig", so it can be a program name with args.
7748set dummy mig; ac_word=$2
81ecdfbb
RW
7749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7750$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7751if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7752 $as_echo_n "(cached) " >&6
bec39cab
AC
7753else
7754 if test -n "$ac_ct_MIG"; then
7755 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7756else
7757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7758for as_dir in $PATH
7759do
7760 IFS=$as_save_IFS
7761 test -z "$as_dir" && as_dir=.
81ecdfbb 7762 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7764 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7766 break 2
7767 fi
7768done
81ecdfbb
RW
7769 done
7770IFS=$as_save_IFS
c906108c 7771
bec39cab
AC
7772fi
7773fi
7774ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7775if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7777$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7778else
81ecdfbb
RW
7779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7780$as_echo "no" >&6; }
bec39cab 7781fi
c906108c 7782
81ecdfbb
RW
7783 if test "x$ac_ct_MIG" = x; then
7784 MIG=""
7785 else
7786 case $cross_compiling:$ac_tool_warned in
7787yes:)
7788{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7789$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7790ac_tool_warned=yes ;;
7791esac
7792 MIG=$ac_ct_MIG
7793 fi
bec39cab
AC
7794else
7795 MIG="$ac_cv_prog_MIG"
7796fi
c906108c 7797
036c3acb 7798 if test x"$MIG" = x; then
d0ac1c44 7799 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7800 fi
7801 ;;
7802esac
c906108c 7803
bec39cab
AC
7804# ---------------------- #
7805# Checks for libraries. #
7806# ---------------------- #
c906108c 7807
bec39cab 7808# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7810$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7811if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7812 $as_echo_n "(cached) " >&6
bec39cab
AC
7813else
7814 ac_check_lib_save_LIBS=$LIBS
7815LIBS="-lm $LIBS"
81ecdfbb 7816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7817/* end confdefs.h. */
c906108c 7818
c906108c 7819
bec39cab
AC
7820int
7821main ()
7822{
81ecdfbb 7823return main ();
bec39cab
AC
7824 ;
7825 return 0;
7826}
7827_ACEOF
81ecdfbb 7828if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7829 ac_cv_lib_m_main=yes
7830else
81ecdfbb 7831 ac_cv_lib_m_main=no
bec39cab 7832fi
81ecdfbb
RW
7833rm -f core conftest.err conftest.$ac_objext \
7834 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7835LIBS=$ac_check_lib_save_LIBS
7836fi
81ecdfbb
RW
7837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7838$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7839if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7840 cat >>confdefs.h <<_ACEOF
7841#define HAVE_LIBM 1
7842_ACEOF
7843
7844 LIBS="-lm $LIBS"
c906108c 7845
c906108c 7846fi
bec39cab
AC
7847
7848
bec39cab 7849# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7851$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7852if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7853 $as_echo_n "(cached) " >&6
bec39cab
AC
7854else
7855 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7857/* end confdefs.h. */
ddc9cd0f 7858
81ecdfbb
RW
7859/* Override any GCC internal prototype to avoid an error.
7860 Use char because int might match the return type of a GCC
7861 builtin and then its argument prototype would still apply. */
bec39cab
AC
7862#ifdef __cplusplus
7863extern "C"
7864#endif
bec39cab
AC
7865char gethostbyname ();
7866int
7867main ()
7868{
81ecdfbb 7869return gethostbyname ();
bec39cab
AC
7870 ;
7871 return 0;
7872}
7873_ACEOF
81ecdfbb
RW
7874for ac_lib in '' nsl; do
7875 if test -z "$ac_lib"; then
7876 ac_res="none required"
7877 else
7878 ac_res=-l$ac_lib
b4e70030 7879 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7880 fi
7881 if ac_fn_c_try_link "$LINENO"; then :
7882 ac_cv_search_gethostbyname=$ac_res
7883fi
7884rm -f core conftest.err conftest.$ac_objext \
7885 conftest$ac_exeext
d0ac1c44 7886 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7887 break
7888fi
7889done
d0ac1c44 7890if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7891
bec39cab 7892else
81ecdfbb 7893 ac_cv_search_gethostbyname=no
bec39cab 7894fi
81ecdfbb 7895rm conftest.$ac_ext
bec39cab
AC
7896LIBS=$ac_func_search_save_LIBS
7897fi
81ecdfbb
RW
7898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7899$as_echo "$ac_cv_search_gethostbyname" >&6; }
7900ac_res=$ac_cv_search_gethostbyname
7901if test "$ac_res" != no; then :
7902 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7903
bec39cab 7904fi
96baa820 7905
c906108c 7906
b4e70030 7907# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7909$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7910if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7911 $as_echo_n "(cached) " >&6
b4e70030
JB
7912else
7913 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7915/* end confdefs.h. */
7916
81ecdfbb
RW
7917/* Override any GCC internal prototype to avoid an error.
7918 Use char because int might match the return type of a GCC
7919 builtin and then its argument prototype would still apply. */
b4e70030
JB
7920#ifdef __cplusplus
7921extern "C"
7922#endif
b4e70030
JB
7923char socketpair ();
7924int
7925main ()
7926{
81ecdfbb 7927return socketpair ();
b4e70030
JB
7928 ;
7929 return 0;
7930}
7931_ACEOF
81ecdfbb
RW
7932for ac_lib in '' socket; do
7933 if test -z "$ac_lib"; then
7934 ac_res="none required"
7935 else
7936 ac_res=-l$ac_lib
b4e70030 7937 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7938 fi
7939 if ac_fn_c_try_link "$LINENO"; then :
7940 ac_cv_search_socketpair=$ac_res
7941fi
7942rm -f core conftest.err conftest.$ac_objext \
7943 conftest$ac_exeext
d0ac1c44 7944 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7945 break
7946fi
7947done
d0ac1c44 7948if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7949
b4e70030 7950else
81ecdfbb 7951 ac_cv_search_socketpair=no
b4e70030 7952fi
81ecdfbb 7953rm conftest.$ac_ext
b4e70030
JB
7954LIBS=$ac_func_search_save_LIBS
7955fi
81ecdfbb
RW
7956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7957$as_echo "$ac_cv_search_socketpair" >&6; }
7958ac_res=$ac_cv_search_socketpair
7959if test "$ac_res" != no; then :
7960 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7961
7962fi
7963
7964
233a11ab 7965# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7966
711a72d3 7967 # Use the system's zlib library.
39f3de7c
L
7968 zlibdir="-L\$(top_builddir)/../zlib"
7969 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7970
711a72d3
L
7971# Check whether --with-system-zlib was given.
7972if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7973 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7974 zlibdir=
7975 zlibinc=
7976 fi
b040ad30 7977
233a11ab 7978fi
233a11ab 7979
233a11ab 7980
233a11ab 7981
b040ad30 7982
233a11ab 7983
25268153 7984# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7985# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7987$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7988if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7989 $as_echo_n "(cached) " >&6
7990else
7991 ac_func_search_save_LIBS=$LIBS
7992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7993/* end confdefs.h. */
7994
7995/* Override any GCC internal prototype to avoid an error.
7996 Use char because int might match the return type of a GCC
7997 builtin and then its argument prototype would still apply. */
7998#ifdef __cplusplus
7999extern "C"
8000#endif
8001char kinfo_getvmmap ();
8002int
8003main ()
8004{
8005return kinfo_getvmmap ();
8006 ;
8007 return 0;
8008}
8009_ACEOF
37773e78 8010for ac_lib in '' util util-freebsd; do
25268153
JB
8011 if test -z "$ac_lib"; then
8012 ac_res="none required"
8013 else
8014 ac_res=-l$ac_lib
8015 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8016 fi
8017 if ac_fn_c_try_link "$LINENO"; then :
8018 ac_cv_search_kinfo_getvmmap=$ac_res
8019fi
8020rm -f core conftest.err conftest.$ac_objext \
8021 conftest$ac_exeext
d0ac1c44 8022 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8023 break
8024fi
8025done
d0ac1c44 8026if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8027
8028else
8029 ac_cv_search_kinfo_getvmmap=no
8030fi
8031rm conftest.$ac_ext
8032LIBS=$ac_func_search_save_LIBS
8033fi
8034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8035$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8036ac_res=$ac_cv_search_kinfo_getvmmap
8037if test "$ac_res" != no; then :
8038 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8039
8040$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8041
8042fi
8043
8044
92fce24d
JB
8045# fbsd-nat.c can also use kinfo_getfile.
8046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8047$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
d0ac1c44 8048if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8049 $as_echo_n "(cached) " >&6
8050else
8051 ac_func_search_save_LIBS=$LIBS
8052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8053/* end confdefs.h. */
8054
8055/* Override any GCC internal prototype to avoid an error.
8056 Use char because int might match the return type of a GCC
8057 builtin and then its argument prototype would still apply. */
8058#ifdef __cplusplus
8059extern "C"
8060#endif
8061char kinfo_getfile ();
8062int
8063main ()
8064{
8065return kinfo_getfile ();
8066 ;
8067 return 0;
8068}
8069_ACEOF
8070for ac_lib in '' util util-freebsd; do
8071 if test -z "$ac_lib"; then
8072 ac_res="none required"
8073 else
8074 ac_res=-l$ac_lib
8075 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8076 fi
8077 if ac_fn_c_try_link "$LINENO"; then :
8078 ac_cv_search_kinfo_getfile=$ac_res
8079fi
8080rm -f core conftest.err conftest.$ac_objext \
8081 conftest$ac_exeext
d0ac1c44 8082 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8083 break
8084fi
8085done
d0ac1c44 8086if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8087
8088else
8089 ac_cv_search_kinfo_getfile=no
8090fi
8091rm conftest.$ac_ext
8092LIBS=$ac_func_search_save_LIBS
8093fi
8094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8095$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8096ac_res=$ac_cv_search_kinfo_getfile
8097if test "$ac_res" != no; then :
8098 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8099
8100$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
8101
8102fi
8103
8104
77f120bf 8105
016a3251
DD
8106 if test "X$prefix" = "XNONE"; then
8107 acl_final_prefix="$ac_default_prefix"
8108 else
8109 acl_final_prefix="$prefix"
8110 fi
8111 if test "X$exec_prefix" = "XNONE"; then
8112 acl_final_exec_prefix='${prefix}'
8113 else
8114 acl_final_exec_prefix="$exec_prefix"
8115 fi
8116 acl_save_prefix="$prefix"
8117 prefix="$acl_final_prefix"
8118 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8119 prefix="$acl_save_prefix"
8120
8121
8122# Check whether --with-gnu-ld was given.
8123if test "${with_gnu_ld+set}" = set; then :
8124 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8125else
8126 with_gnu_ld=no
8127fi
8128
8129# Prepare PATH_SEPARATOR.
8130# The user is always right.
8131if test "${PATH_SEPARATOR+set}" != set; then
8132 echo "#! /bin/sh" >conf$$.sh
8133 echo "exit 0" >>conf$$.sh
8134 chmod +x conf$$.sh
8135 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8136 PATH_SEPARATOR=';'
8137 else
8138 PATH_SEPARATOR=:
8139 fi
8140 rm -f conf$$.sh
8141fi
8142ac_prog=ld
8143if test "$GCC" = yes; then
8144 # Check if gcc -print-prog-name=ld gives a path.
8145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8146$as_echo_n "checking for ld used by GCC... " >&6; }
8147 case $host in
8148 *-*-mingw*)
8149 # gcc leaves a trailing carriage return which upsets mingw
8150 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8151 *)
8152 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8153 esac
8154 case $ac_prog in
8155 # Accept absolute paths.
8156 [\\/]* | [A-Za-z]:[\\/]*)
8157 re_direlt='/[^/][^/]*/\.\./'
8158 # Canonicalize the path of ld
8159 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8160 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8161 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8162 done
8163 test -z "$LD" && LD="$ac_prog"
8164 ;;
8165 "")
8166 # If it fails, then pretend we aren't using GCC.
8167 ac_prog=ld
8168 ;;
8169 *)
8170 # If it is relative, then search for the first ld in PATH.
8171 with_gnu_ld=unknown
8172 ;;
8173 esac
8174elif test "$with_gnu_ld" = yes; then
8175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8176$as_echo_n "checking for GNU ld... " >&6; }
8177else
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8179$as_echo_n "checking for non-GNU ld... " >&6; }
8180fi
d0ac1c44 8181if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8182 $as_echo_n "(cached) " >&6
8183else
8184 if test -z "$LD"; then
8185 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8186 for ac_dir in $PATH; do
8187 test -z "$ac_dir" && ac_dir=.
8188 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8189 acl_cv_path_LD="$ac_dir/$ac_prog"
8190 # Check to see if the program is GNU ld. I'd rather use --version,
8191 # but apparently some GNU ld's only accept -v.
8192 # Break only if it was the GNU/non-GNU ld that we prefer.
8193 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8194 test "$with_gnu_ld" != no && break
8195 else
8196 test "$with_gnu_ld" != yes && break
8197 fi
8198 fi
8199 done
8200 IFS="$ac_save_ifs"
8201else
8202 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8203fi
8204fi
8205
8206LD="$acl_cv_path_LD"
8207if test -n "$LD"; then
8208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8209$as_echo "$LD" >&6; }
8210else
8211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8212$as_echo "no" >&6; }
8213fi
d0ac1c44 8214test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8216$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8217if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8218 $as_echo_n "(cached) " >&6
8219else
8220 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8221if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8222 acl_cv_prog_gnu_ld=yes
8223else
8224 acl_cv_prog_gnu_ld=no
8225fi
8226fi
8227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8228$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8229with_gnu_ld=$acl_cv_prog_gnu_ld
8230
8231
8232
8233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8234$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8235if ${acl_cv_rpath+:} false; then :
016a3251
DD
8236 $as_echo_n "(cached) " >&6
8237else
8238
8239 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8240 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8241 . ./conftest.sh
8242 rm -f ./conftest.sh
8243 acl_cv_rpath=done
8244
8245fi
8246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8247$as_echo "$acl_cv_rpath" >&6; }
8248 wl="$acl_cv_wl"
8249 libext="$acl_cv_libext"
8250 shlibext="$acl_cv_shlibext"
8251 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8252 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8253 hardcode_direct="$acl_cv_hardcode_direct"
8254 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8255 # Check whether --enable-rpath was given.
8256if test "${enable_rpath+set}" = set; then :
8257 enableval=$enable_rpath; :
8258else
8259 enable_rpath=yes
8260fi
8261
8262
8263
8264
8265
8266
8267
8268
8269 use_additional=yes
8270
8271 acl_save_prefix="$prefix"
8272 prefix="$acl_final_prefix"
8273 acl_save_exec_prefix="$exec_prefix"
8274 exec_prefix="$acl_final_exec_prefix"
8275
8276 eval additional_includedir=\"$includedir\"
8277 eval additional_libdir=\"$libdir\"
8278
8279 exec_prefix="$acl_save_exec_prefix"
8280 prefix="$acl_save_prefix"
77f120bf 8281
6c7a06a3 8282
81ecdfbb
RW
8283# Check whether --with-libiconv-prefix was given.
8284if test "${with_libiconv_prefix+set}" = set; then :
8285 withval=$with_libiconv_prefix;
016a3251
DD
8286 if test "X$withval" = "Xno"; then
8287 use_additional=no
8288 else
8289 if test "X$withval" = "X"; then
8290
8291 acl_save_prefix="$prefix"
8292 prefix="$acl_final_prefix"
8293 acl_save_exec_prefix="$exec_prefix"
8294 exec_prefix="$acl_final_exec_prefix"
8295
8296 eval additional_includedir=\"$includedir\"
8297 eval additional_libdir=\"$libdir\"
8298
8299 exec_prefix="$acl_save_exec_prefix"
8300 prefix="$acl_save_prefix"
8301
8302 else
8303 additional_includedir="$withval/include"
8304 additional_libdir="$withval/lib"
8305 fi
8306 fi
6c7a06a3 8307
81ecdfbb
RW
8308fi
8309
016a3251
DD
8310 LIBICONV=
8311 LTLIBICONV=
8312 INCICONV=
8313 rpathdirs=
8314 ltrpathdirs=
8315 names_already_handled=
8316 names_next_round='iconv '
8317 while test -n "$names_next_round"; do
8318 names_this_round="$names_next_round"
8319 names_next_round=
8320 for name in $names_this_round; do
8321 already_handled=
8322 for n in $names_already_handled; do
8323 if test "$n" = "$name"; then
8324 already_handled=yes
8325 break
8326 fi
8327 done
8328 if test -z "$already_handled"; then
8329 names_already_handled="$names_already_handled $name"
8330 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8331 eval value=\"\$HAVE_LIB$uppername\"
8332 if test -n "$value"; then
8333 if test "$value" = yes; then
8334 eval value=\"\$LIB$uppername\"
8335 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8336 eval value=\"\$LTLIB$uppername\"
8337 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8338 else
8339 :
8340 fi
8341 else
8342 found_dir=
8343 found_la=
8344 found_so=
8345 found_a=
8346 if test $use_additional = yes; then
8347 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8348 found_dir="$additional_libdir"
8349 found_so="$additional_libdir/lib$name.$shlibext"
8350 if test -f "$additional_libdir/lib$name.la"; then
8351 found_la="$additional_libdir/lib$name.la"
8352 fi
8353 else
8354 if test -f "$additional_libdir/lib$name.$libext"; then
8355 found_dir="$additional_libdir"
8356 found_a="$additional_libdir/lib$name.$libext"
8357 if test -f "$additional_libdir/lib$name.la"; then
8358 found_la="$additional_libdir/lib$name.la"
8359 fi
8360 fi
8361 fi
8362 fi
8363 if test "X$found_dir" = "X"; then
8364 for x in $LDFLAGS $LTLIBICONV; do
8365
8366 acl_save_prefix="$prefix"
8367 prefix="$acl_final_prefix"
8368 acl_save_exec_prefix="$exec_prefix"
8369 exec_prefix="$acl_final_exec_prefix"
8370 eval x=\"$x\"
8371 exec_prefix="$acl_save_exec_prefix"
8372 prefix="$acl_save_prefix"
8373
8374 case "$x" in
8375 -L*)
8376 dir=`echo "X$x" | sed -e 's/^X-L//'`
8377 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8378 found_dir="$dir"
8379 found_so="$dir/lib$name.$shlibext"
8380 if test -f "$dir/lib$name.la"; then
8381 found_la="$dir/lib$name.la"
8382 fi
8383 else
8384 if test -f "$dir/lib$name.$libext"; then
8385 found_dir="$dir"
8386 found_a="$dir/lib$name.$libext"
8387 if test -f "$dir/lib$name.la"; then
8388 found_la="$dir/lib$name.la"
8389 fi
8390 fi
8391 fi
8392 ;;
8393 esac
8394 if test "X$found_dir" != "X"; then
8395 break
8396 fi
8397 done
8398 fi
8399 if test "X$found_dir" != "X"; then
8400 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8401 if test "X$found_so" != "X"; then
8402 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8403 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8404 else
8405 haveit=
8406 for x in $ltrpathdirs; do
8407 if test "X$x" = "X$found_dir"; then
8408 haveit=yes
8409 break
8410 fi
8411 done
8412 if test -z "$haveit"; then
8413 ltrpathdirs="$ltrpathdirs $found_dir"
8414 fi
8415 if test "$hardcode_direct" = yes; then
8416 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8417 else
8418 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8419 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8420 haveit=
8421 for x in $rpathdirs; do
8422 if test "X$x" = "X$found_dir"; then
8423 haveit=yes
8424 break
8425 fi
8426 done
8427 if test -z "$haveit"; then
8428 rpathdirs="$rpathdirs $found_dir"
8429 fi
8430 else
8431 haveit=
8432 for x in $LDFLAGS $LIBICONV; do
8433
8434 acl_save_prefix="$prefix"
8435 prefix="$acl_final_prefix"
8436 acl_save_exec_prefix="$exec_prefix"
8437 exec_prefix="$acl_final_exec_prefix"
8438 eval x=\"$x\"
8439 exec_prefix="$acl_save_exec_prefix"
8440 prefix="$acl_save_prefix"
8441
8442 if test "X$x" = "X-L$found_dir"; then
8443 haveit=yes
8444 break
8445 fi
8446 done
8447 if test -z "$haveit"; then
8448 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8449 fi
8450 if test "$hardcode_minus_L" != no; then
8451 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8452 else
8453 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8454 fi
8455 fi
8456 fi
8457 fi
8458 else
8459 if test "X$found_a" != "X"; then
8460 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8461 else
8462 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8463 fi
8464 fi
8465 additional_includedir=
8466 case "$found_dir" in
8467 */lib | */lib/)
8468 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8469 additional_includedir="$basedir/include"
8470 ;;
8471 esac
8472 if test "X$additional_includedir" != "X"; then
8473 if test "X$additional_includedir" != "X/usr/include"; then
8474 haveit=
8475 if test "X$additional_includedir" = "X/usr/local/include"; then
8476 if test -n "$GCC"; then
8477 case $host_os in
8478 linux*) haveit=yes;;
8479 esac
8480 fi
8481 fi
8482 if test -z "$haveit"; then
8483 for x in $CPPFLAGS $INCICONV; do
8484
8485 acl_save_prefix="$prefix"
8486 prefix="$acl_final_prefix"
8487 acl_save_exec_prefix="$exec_prefix"
8488 exec_prefix="$acl_final_exec_prefix"
8489 eval x=\"$x\"
8490 exec_prefix="$acl_save_exec_prefix"
8491 prefix="$acl_save_prefix"
8492
8493 if test "X$x" = "X-I$additional_includedir"; then
8494 haveit=yes
8495 break
8496 fi
8497 done
8498 if test -z "$haveit"; then
8499 if test -d "$additional_includedir"; then
8500 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8501 fi
8502 fi
8503 fi
8504 fi
8505 fi
8506 if test -n "$found_la"; then
8507 save_libdir="$libdir"
8508 case "$found_la" in
8509 */* | *\\*) . "$found_la" ;;
8510 *) . "./$found_la" ;;
8511 esac
8512 libdir="$save_libdir"
8513 for dep in $dependency_libs; do
8514 case "$dep" in
8515 -L*)
8516 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8517 if test "X$additional_libdir" != "X/usr/lib"; then
8518 haveit=
8519 if test "X$additional_libdir" = "X/usr/local/lib"; then
8520 if test -n "$GCC"; then
8521 case $host_os in
8522 linux*) haveit=yes;;
8523 esac
8524 fi
8525 fi
8526 if test -z "$haveit"; then
8527 haveit=
8528 for x in $LDFLAGS $LIBICONV; do
8529
8530 acl_save_prefix="$prefix"
8531 prefix="$acl_final_prefix"
8532 acl_save_exec_prefix="$exec_prefix"
8533 exec_prefix="$acl_final_exec_prefix"
8534 eval x=\"$x\"
8535 exec_prefix="$acl_save_exec_prefix"
8536 prefix="$acl_save_prefix"
8537
8538 if test "X$x" = "X-L$additional_libdir"; then
8539 haveit=yes
8540 break
8541 fi
8542 done
8543 if test -z "$haveit"; then
8544 if test -d "$additional_libdir"; then
8545 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8546 fi
8547 fi
8548 haveit=
8549 for x in $LDFLAGS $LTLIBICONV; do
8550
8551 acl_save_prefix="$prefix"
8552 prefix="$acl_final_prefix"
8553 acl_save_exec_prefix="$exec_prefix"
8554 exec_prefix="$acl_final_exec_prefix"
8555 eval x=\"$x\"
8556 exec_prefix="$acl_save_exec_prefix"
8557 prefix="$acl_save_prefix"
8558
8559 if test "X$x" = "X-L$additional_libdir"; then
8560 haveit=yes
8561 break
8562 fi
8563 done
8564 if test -z "$haveit"; then
8565 if test -d "$additional_libdir"; then
8566 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8567 fi
8568 fi
8569 fi
8570 fi
8571 ;;
8572 -R*)
8573 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8574 if test "$enable_rpath" != no; then
8575 haveit=
8576 for x in $rpathdirs; do
8577 if test "X$x" = "X$dir"; then
8578 haveit=yes
8579 break
8580 fi
8581 done
8582 if test -z "$haveit"; then
8583 rpathdirs="$rpathdirs $dir"
8584 fi
8585 haveit=
8586 for x in $ltrpathdirs; do
8587 if test "X$x" = "X$dir"; then
8588 haveit=yes
8589 break
8590 fi
8591 done
8592 if test -z "$haveit"; then
8593 ltrpathdirs="$ltrpathdirs $dir"
8594 fi
8595 fi
8596 ;;
8597 -l*)
8598 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8599 ;;
8600 *.la)
8601 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8602 ;;
8603 *)
8604 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8605 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8606 ;;
8607 esac
8608 done
8609 fi
8610 else
8611 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8612 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8613 fi
8614 fi
8615 fi
8616 done
8617 done
8618 if test "X$rpathdirs" != "X"; then
8619 if test -n "$hardcode_libdir_separator"; then
8620 alldirs=
8621 for found_dir in $rpathdirs; do
8622 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8623 done
8624 acl_save_libdir="$libdir"
8625 libdir="$alldirs"
8626 eval flag=\"$hardcode_libdir_flag_spec\"
8627 libdir="$acl_save_libdir"
8628 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8629 else
8630 for found_dir in $rpathdirs; do
8631 acl_save_libdir="$libdir"
8632 libdir="$found_dir"
8633 eval flag=\"$hardcode_libdir_flag_spec\"
8634 libdir="$acl_save_libdir"
8635 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8636 done
8637 fi
8638 fi
8639 if test "X$ltrpathdirs" != "X"; then
8640 for found_dir in $ltrpathdirs; do
8641 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8642 done
8643 fi
8644
8645
8646
8647
8648
6c7a06a3 8649
6c7a06a3 8650
81ecdfbb
RW
8651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8652$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8653if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8654 $as_echo_n "(cached) " >&6
d542061a 8655else
6c7a06a3
TT
8656
8657 am_cv_func_iconv="no, consider installing GNU libiconv"
8658 am_cv_lib_iconv=no
016a3251
DD
8659 am_save_CPPFLAGS="$CPPFLAGS"
8660 CPPFLAGS="$CPPFLAGS $INCICONV"
8661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8662/* end confdefs.h. */
6c7a06a3
TT
8663#include <stdlib.h>
8664#include <iconv.h>
d542061a
UW
8665int
8666main ()
8667{
6c7a06a3 8668iconv_t cd = iconv_open("","");
016a3251
DD
8669 iconv(cd,NULL,NULL,NULL,NULL);
8670 iconv_close(cd);
d542061a
UW
8671 ;
8672 return 0;
8673}
8674_ACEOF
81ecdfbb 8675if ac_fn_c_try_link "$LINENO"; then :
016a3251 8676 am_cv_func_iconv=yes
d542061a 8677fi
81ecdfbb
RW
8678rm -f core conftest.err conftest.$ac_objext \
8679 conftest$ac_exeext conftest.$ac_ext
016a3251 8680 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8681
016a3251
DD
8682 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8683 for _libs in .libs _libs; do
8684 am_save_CPPFLAGS="$CPPFLAGS"
8685 am_save_LIBS="$LIBS"
8686 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8687 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8689/* end confdefs.h. */
6c7a06a3
TT
8690#include <stdlib.h>
8691#include <iconv.h>
d542061a
UW
8692int
8693main ()
8694{
6c7a06a3 8695iconv_t cd = iconv_open("","");
016a3251
DD
8696 iconv(cd,NULL,NULL,NULL,NULL);
8697 iconv_close(cd);
d542061a
UW
8698 ;
8699 return 0;
8700}
8701_ACEOF
81ecdfbb 8702if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8703 INCICONV="-I../libiconv/include"
8704 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8705 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8706 am_cv_lib_iconv=yes
8707 am_cv_func_iconv=yes
d542061a 8708fi
81ecdfbb
RW
8709rm -f core conftest.err conftest.$ac_objext \
8710 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8711 CPPFLAGS="$am_save_CPPFLAGS"
8712 LIBS="$am_save_LIBS"
8713 if test "$am_cv_func_iconv" = "yes"; then
8714 break
8715 fi
8716 done
77f120bf 8717 fi
94ae1714 8718
4edb1e84 8719 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8720 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8721 am_save_LIBS="$LIBS"
016a3251
DD
8722 CPPFLAGS="$LIBS $INCICONV"
8723 LIBS="$LIBS $LIBICONV"
81ecdfbb 8724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8725/* end confdefs.h. */
6c7a06a3
TT
8726#include <stdlib.h>
8727#include <iconv.h>
bec39cab
AC
8728int
8729main ()
8730{
6c7a06a3
TT
8731iconv_t cd = iconv_open("","");
8732 iconv(cd,NULL,NULL,NULL,NULL);
8733 iconv_close(cd);
bec39cab
AC
8734 ;
8735 return 0;
8736}
8737_ACEOF
81ecdfbb 8738if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8739 am_cv_lib_iconv=yes
6c7a06a3 8740 am_cv_func_iconv=yes
627af7ea 8741fi
81ecdfbb
RW
8742rm -f core conftest.err conftest.$ac_objext \
8743 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8744 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8745 LIBS="$am_save_LIBS"
6c7a06a3
TT
8746 fi
8747
8748fi
81ecdfbb
RW
8749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8750$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8751 if test "$am_cv_func_iconv" = yes; then
8752
8753$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8754
016a3251 8755 fi
fc3b640d 8756 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8757
8758 for element in $INCICONV; do
8759 haveit=
8760 for x in $CPPFLAGS; do
8761
8762 acl_save_prefix="$prefix"
8763 prefix="$acl_final_prefix"
8764 acl_save_exec_prefix="$exec_prefix"
8765 exec_prefix="$acl_final_exec_prefix"
8766 eval x=\"$x\"
8767 exec_prefix="$acl_save_exec_prefix"
8768 prefix="$acl_save_prefix"
8769
8770 if test "X$x" = "X$element"; then
8771 haveit=yes
8772 break
8773 fi
8774 done
8775 if test -z "$haveit"; then
8776 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8777 fi
8778 done
8779
8780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8781$as_echo_n "checking how to link with libiconv... " >&6; }
8782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8783$as_echo "$LIBICONV" >&6; }
94ae1714 8784 else
016a3251
DD
8785 LIBICONV=
8786 LTLIBICONV=
fc3b640d 8787 fi
94ae1714 8788
6c7a06a3 8789
6c7a06a3 8790
016a3251 8791 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8793$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8794 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8795 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8796else
8797
81ecdfbb 8798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8799/* end confdefs.h. */
8800
6c7a06a3
TT
8801#include <stdlib.h>
8802#include <iconv.h>
8803extern
b4e70030 8804#ifdef __cplusplus
6c7a06a3 8805"C"
b4e70030 8806#endif
6c7a06a3
TT
8807#if defined(__STDC__) || defined(__cplusplus)
8808size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8809#else
8810size_t iconv();
8811#endif
8812
b4e70030
JB
8813int
8814main ()
8815{
6c7a06a3 8816
b4e70030
JB
8817 ;
8818 return 0;
8819}
8820_ACEOF
81ecdfbb 8821if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8822 am_cv_proto_iconv_arg1=""
4e8d927d 8823else
81ecdfbb 8824 am_cv_proto_iconv_arg1="const"
b4e70030 8825fi
81ecdfbb 8826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8827 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);"
8828fi
8829
8830 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8832 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8833$as_echo "${ac_t:-
8834 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8835
8836cat >>confdefs.h <<_ACEOF
8837#define ICONV_CONST $am_cv_proto_iconv_arg1
8838_ACEOF
8839
8840 fi
6c7a06a3
TT
8841
8842
478aac75
DE
8843# GDB may fork/exec the iconv program to get the list of supported character
8844# sets. Allow the user to specify where to find it.
8845# There are several factors affecting the choice of option name:
8846# - There is already --with-libiconv-prefix but we can't use it, it specifies
8847# the build-time location of libiconv files.
8848# - The program we need to find is iconv, which comes with glibc. The user
8849# doesn't necessarily have libiconv installed. Therefore naming this
8850# --with-libiconv-foo feels wrong.
8851# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8852# defined to work on directories not files (though it really doesn't know
8853# the difference).
8854# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8855# with --with-libiconv-prefix.
8856# Putting these together is why the option name is --with-iconv-bin.
8857
8858
8859# Check whether --with-iconv-bin was given.
8860if test "${with_iconv_bin+set}" = set; then :
8861 withval=$with_iconv_bin; iconv_bin="${withval}"
8862
8863cat >>confdefs.h <<_ACEOF
8864#define ICONV_BIN "${iconv_bin}"
8865_ACEOF
8866
8867
8868 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8869 if test "x$prefix" = xNONE; then
8870 test_prefix=/usr/local
8871 else
8872 test_prefix=$prefix
8873 fi
8874 else
8875 test_prefix=$exec_prefix
8876 fi
8877 value=0
8878 case ${iconv_bin} in
8879 "${test_prefix}"|"${test_prefix}/"*|\
8880 '${exec_prefix}'|'${exec_prefix}/'*)
8881 value=1
8882 ;;
8883 esac
8884
8885cat >>confdefs.h <<_ACEOF
8886#define ICONV_BIN_RELOCATABLE $value
8887_ACEOF
8888
8889
8890
8891fi
8892
8893
cb01cfba 8894# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8895if test x"$enable_tui" != xno; then
cb01cfba
JB
8896 prefer_curses=yes
8897fi
8898
8899curses_found=no
8900if test x"$prefer_curses" = xyes; then
8901 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8902 # curses library because the latter might not provide all the
8903 # functionality we need. However, this leads to problems on systems
8904 # where the linker searches /usr/local/lib, but the compiler doesn't
8905 # search /usr/local/include, if ncurses is installed in /usr/local. A
8906 # default installation of ncurses on alpha*-dec-osf* will lead to such
8907 # a situation.
81ecdfbb
RW
8908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8909$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8910if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8911 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8912else
8913 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8915/* end confdefs.h. */
8916
81ecdfbb
RW
8917/* Override any GCC internal prototype to avoid an error.
8918 Use char because int might match the return type of a GCC
8919 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8920#ifdef __cplusplus
8921extern "C"
8922#endif
6c7a06a3
TT
8923char waddstr ();
8924int
8925main ()
8926{
81ecdfbb 8927return waddstr ();
6c7a06a3
TT
8928 ;
8929 return 0;
8930}
8931_ACEOF
5007d765 8932for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8933 if test -z "$ac_lib"; then
8934 ac_res="none required"
8935 else
8936 ac_res=-l$ac_lib
8937 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8938 fi
8939 if ac_fn_c_try_link "$LINENO"; then :
8940 ac_cv_search_waddstr=$ac_res
8941fi
8942rm -f core conftest.err conftest.$ac_objext \
8943 conftest$ac_exeext
d0ac1c44 8944 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8945 break
8946fi
8947done
d0ac1c44 8948if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8949
6c7a06a3 8950else
81ecdfbb
RW
8951 ac_cv_search_waddstr=no
8952fi
8953rm conftest.$ac_ext
8954LIBS=$ac_func_search_save_LIBS
8955fi
8956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8957$as_echo "$ac_cv_search_waddstr" >&6; }
8958ac_res=$ac_cv_search_waddstr
8959if test "$ac_res" != no; then :
8960 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8961
8962fi
8963
8964
cb01cfba
JB
8965 if test "$ac_cv_search_waddstr" != no; then
8966 curses_found=yes
8967 fi
8968fi
8969
8970# Check whether we should enable the TUI, but only do so if we really
8971# can.
8972if test x"$enable_tui" != xno; then
8973 if test -d $srcdir/tui; then
8974 if test "$curses_found" != no; then
6c7a06a3
TT
8975 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8976 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8977 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8978 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8979 else
8980 if test x"$enable_tui" = xyes; then
d0ac1c44 8981 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8982 else
81ecdfbb
RW
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8984$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8985 fi
8986 fi
8987 fi
8988fi
8989
8990# Since GDB uses Readline, we need termcap functionality. In many
8991# cases this will be provided by the curses library, but some systems
96fe4562 8992# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8993
8994case $host_os in
8995 cygwin*)
8996 if test -d $srcdir/libtermcap; then
8997 LIBS="../libtermcap/libtermcap.a $LIBS"
8998 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8999 fi ;;
9000 go32* | *djgpp*)
9001 ac_cv_search_tgetent="none required"
9002 ;;
6c7a06a3
TT
9003esac
9004
9005# These are the libraries checked by Readline.
81ecdfbb
RW
9006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9007$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 9008if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 9009 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9010else
9011 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9013/* end confdefs.h. */
9014
81ecdfbb
RW
9015/* Override any GCC internal prototype to avoid an error.
9016 Use char because int might match the return type of a GCC
9017 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9018#ifdef __cplusplus
9019extern "C"
9020#endif
6c7a06a3
TT
9021char tgetent ();
9022int
9023main ()
9024{
81ecdfbb 9025return tgetent ();
6c7a06a3
TT
9026 ;
9027 return 0;
9028}
9029_ACEOF
5007d765 9030for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9031 if test -z "$ac_lib"; then
9032 ac_res="none required"
9033 else
9034 ac_res=-l$ac_lib
6c7a06a3 9035 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9036 fi
9037 if ac_fn_c_try_link "$LINENO"; then :
9038 ac_cv_search_tgetent=$ac_res
9039fi
9040rm -f core conftest.err conftest.$ac_objext \
9041 conftest$ac_exeext
d0ac1c44 9042 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9043 break
9044fi
9045done
d0ac1c44 9046if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9047
6c7a06a3 9048else
81ecdfbb 9049 ac_cv_search_tgetent=no
6c7a06a3 9050fi
81ecdfbb 9051rm conftest.$ac_ext
6c7a06a3
TT
9052LIBS=$ac_func_search_save_LIBS
9053fi
81ecdfbb
RW
9054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9055$as_echo "$ac_cv_search_tgetent" >&6; }
9056ac_res=$ac_cv_search_tgetent
9057if test "$ac_res" != no; then :
9058 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9059
06825bd1
MK
9060fi
9061
06825bd1 9062
bec39cab 9063if test "$ac_cv_search_tgetent" = no; then
7a85168d 9064 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9065fi
9066
3841debe 9067
81ecdfbb
RW
9068# Check whether --with-system-readline was given.
9069if test "${with_system_readline+set}" = set; then :
9070 withval=$with_system_readline;
9071fi
6a30b0a5 9072
6a30b0a5
AS
9073
9074if test "$with_system_readline" = yes; then
9075 READLINE=-lreadline
9076 READLINE_DEPS=
9077 READLINE_CFLAGS=
39037522 9078 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9079else
9080 READLINE='$(READLINE_DIR)/libreadline.a'
9081 READLINE_DEPS='$(READLINE)'
9082 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9083 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9084fi
9085
9086
9087
9088
9089
f997c383
SD
9090# Generate jit-reader.h
9091
9092# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9093TARGET_PTR=
9094
9095# The cast to long int works around a bug in the HP C Compiler
9096# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9097# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9098# This bug is HP SR number 8606223364.
9099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9100$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9101if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9102 $as_echo_n "(cached) " >&6
9103else
9104 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9105
9106else
9107 if test "$ac_cv_type_unsigned_long_long" = yes; then
9108 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9109$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9110as_fn_error 77 "cannot compute sizeof (unsigned long long)
9111See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9112 else
9113 ac_cv_sizeof_unsigned_long_long=0
9114 fi
9115fi
9116
9117fi
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9119$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9120
9121
9122
9123cat >>confdefs.h <<_ACEOF
9124#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9125_ACEOF
9126
9127
9128# The cast to long int works around a bug in the HP C Compiler
9129# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9130# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9131# This bug is HP SR number 8606223364.
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9133$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9134if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9135 $as_echo_n "(cached) " >&6
9136else
9137 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9138
9139else
9140 if test "$ac_cv_type_unsigned_long" = yes; then
9141 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9142$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9143as_fn_error 77 "cannot compute sizeof (unsigned long)
9144See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9145 else
9146 ac_cv_sizeof_unsigned_long=0
9147 fi
9148fi
9149
9150fi
9151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9152$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9153
9154
9155
9156cat >>confdefs.h <<_ACEOF
9157#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9158_ACEOF
9159
9160
9161# The cast to long int works around a bug in the HP C Compiler
9162# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9163# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9164# This bug is HP SR number 8606223364.
9165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9166$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9167if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9168 $as_echo_n "(cached) " >&6
9169else
9170 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9171
9172else
9173 if test "$ac_cv_type_unsigned___int128" = yes; then
9174 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9175$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9176as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9177See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9178 else
9179 ac_cv_sizeof_unsigned___int128=0
9180 fi
9181fi
9182
9183fi
9184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9185$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9186
9187
9188
9189cat >>confdefs.h <<_ACEOF
9190#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9191_ACEOF
9192
9193
9194
9195if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9196 TARGET_PTR="unsigned long"
9197elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9198 TARGET_PTR="unsigned long long"
9199elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9200 TARGET_PTR="unsigned __int128"
9201else
9202 TARGET_PTR="unsigned long"
9203fi
9204
9205
9206ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9207
9208
a2d08b9e
SD
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9210$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9211if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9212 $as_echo_n "(cached) " >&6
9213else
9214 ac_func_search_save_LIBS=$LIBS
9215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9216/* end confdefs.h. */
9217
9218/* Override any GCC internal prototype to avoid an error.
9219 Use char because int might match the return type of a GCC
9220 builtin and then its argument prototype would still apply. */
9221#ifdef __cplusplus
9222extern "C"
9223#endif
9224char dlopen ();
9225int
9226main ()
9227{
9228return dlopen ();
9229 ;
9230 return 0;
9231}
9232_ACEOF
9233for ac_lib in '' dl; do
9234 if test -z "$ac_lib"; then
9235 ac_res="none required"
9236 else
9237 ac_res=-l$ac_lib
9238 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9239 fi
9240 if ac_fn_c_try_link "$LINENO"; then :
9241 ac_cv_search_dlopen=$ac_res
9242fi
9243rm -f core conftest.err conftest.$ac_objext \
9244 conftest$ac_exeext
d0ac1c44 9245 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9246 break
9247fi
9248done
d0ac1c44 9249if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9250
9251else
9252 ac_cv_search_dlopen=no
9253fi
9254rm conftest.$ac_ext
9255LIBS=$ac_func_search_save_LIBS
9256fi
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9258$as_echo "$ac_cv_search_dlopen" >&6; }
9259ac_res=$ac_cv_search_dlopen
9260if test "$ac_res" != no; then :
9261 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9262
9263fi
9264
9265
39037522 9266
b8e0a31c
SD
9267
9268# Check whether --with-jit-reader-dir was given.
9269if test "${with_jit_reader_dir+set}" = set; then :
9270 withval=$with_jit_reader_dir;
9271 JIT_READER_DIR=$withval
9272else
9273 JIT_READER_DIR=${libdir}/gdb
9274fi
9275
9276
9277 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9278 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9279 ac_define_dir=`eval echo $JIT_READER_DIR`
9280 ac_define_dir=`eval echo $ac_define_dir`
9281
9282cat >>confdefs.h <<_ACEOF
9283#define JIT_READER_DIR "$ac_define_dir"
9284_ACEOF
9285
9286
9287
9288
9289 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9290 if test "x$prefix" = xNONE; then
9291 test_prefix=/usr/local
9292 else
9293 test_prefix=$prefix
9294 fi
9295 else
9296 test_prefix=$exec_prefix
9297 fi
9298 value=0
9299 case ${ac_define_dir} in
9300 "${test_prefix}"|"${test_prefix}/"*|\
9301 '${exec_prefix}'|'${exec_prefix}/'*)
9302 value=1
9303 ;;
9304 esac
9305
9306cat >>confdefs.h <<_ACEOF
9307#define JIT_READER_DIR_RELOCATABLE $value
9308_ACEOF
9309
9310
9311
9312
9313
81ecdfbb
RW
9314# Check whether --with-expat was given.
9315if test "${with_expat+set}" = set; then :
9316 withval=$with_expat;
5c39566f
DJ
9317else
9318 with_expat=auto
81ecdfbb
RW
9319fi
9320
9321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9322$as_echo_n "checking whether to use expat... " >&6; }
9323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9324$as_echo "$with_expat" >&6; }
5c39566f
DJ
9325
9326if test "${with_expat}" = no; then
81ecdfbb
RW
9327 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9328$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9329 HAVE_LIBEXPAT=no
9330else
9331
3841debe
DJ
9332
9333
9334
9335
9336
9337
9338
9339 use_additional=yes
9340
9341 acl_save_prefix="$prefix"
9342 prefix="$acl_final_prefix"
9343 acl_save_exec_prefix="$exec_prefix"
9344 exec_prefix="$acl_final_exec_prefix"
9345
9346 eval additional_includedir=\"$includedir\"
9347 eval additional_libdir=\"$libdir\"
9348
9349 exec_prefix="$acl_save_exec_prefix"
9350 prefix="$acl_save_prefix"
9351
9352
81ecdfbb
RW
9353# Check whether --with-libexpat-prefix was given.
9354if test "${with_libexpat_prefix+set}" = set; then :
9355 withval=$with_libexpat_prefix;
3841debe
DJ
9356 if test "X$withval" = "Xno"; then
9357 use_additional=no
9358 else
9359 if test "X$withval" = "X"; then
9360
9361 acl_save_prefix="$prefix"
9362 prefix="$acl_final_prefix"
9363 acl_save_exec_prefix="$exec_prefix"
9364 exec_prefix="$acl_final_exec_prefix"
9365
9366 eval additional_includedir=\"$includedir\"
9367 eval additional_libdir=\"$libdir\"
9368
9369 exec_prefix="$acl_save_exec_prefix"
9370 prefix="$acl_save_prefix"
9371
9372 else
9373 additional_includedir="$withval/include"
9374 additional_libdir="$withval/lib"
9375 fi
9376 fi
9377
81ecdfbb
RW
9378fi
9379
3841debe
DJ
9380 LIBEXPAT=
9381 LTLIBEXPAT=
9382 INCEXPAT=
9383 rpathdirs=
9384 ltrpathdirs=
9385 names_already_handled=
9386 names_next_round='expat '
9387 while test -n "$names_next_round"; do
9388 names_this_round="$names_next_round"
9389 names_next_round=
9390 for name in $names_this_round; do
9391 already_handled=
9392 for n in $names_already_handled; do
9393 if test "$n" = "$name"; then
9394 already_handled=yes
9395 break
9396 fi
9397 done
9398 if test -z "$already_handled"; then
9399 names_already_handled="$names_already_handled $name"
9400 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9401 eval value=\"\$HAVE_LIB$uppername\"
9402 if test -n "$value"; then
9403 if test "$value" = yes; then
9404 eval value=\"\$LIB$uppername\"
9405 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9406 eval value=\"\$LTLIB$uppername\"
9407 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9408 else
9409 :
9410 fi
9411 else
9412 found_dir=
9413 found_la=
9414 found_so=
9415 found_a=
9416 if test $use_additional = yes; then
9417 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9418 found_dir="$additional_libdir"
9419 found_so="$additional_libdir/lib$name.$shlibext"
9420 if test -f "$additional_libdir/lib$name.la"; then
9421 found_la="$additional_libdir/lib$name.la"
9422 fi
9423 else
9424 if test -f "$additional_libdir/lib$name.$libext"; then
9425 found_dir="$additional_libdir"
9426 found_a="$additional_libdir/lib$name.$libext"
9427 if test -f "$additional_libdir/lib$name.la"; then
9428 found_la="$additional_libdir/lib$name.la"
9429 fi
9430 fi
9431 fi
9432 fi
9433 if test "X$found_dir" = "X"; then
9434 for x in $LDFLAGS $LTLIBEXPAT; do
9435
9436 acl_save_prefix="$prefix"
9437 prefix="$acl_final_prefix"
9438 acl_save_exec_prefix="$exec_prefix"
9439 exec_prefix="$acl_final_exec_prefix"
9440 eval x=\"$x\"
9441 exec_prefix="$acl_save_exec_prefix"
9442 prefix="$acl_save_prefix"
9443
9444 case "$x" in
9445 -L*)
9446 dir=`echo "X$x" | sed -e 's/^X-L//'`
9447 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9448 found_dir="$dir"
9449 found_so="$dir/lib$name.$shlibext"
9450 if test -f "$dir/lib$name.la"; then
9451 found_la="$dir/lib$name.la"
9452 fi
9453 else
9454 if test -f "$dir/lib$name.$libext"; then
9455 found_dir="$dir"
9456 found_a="$dir/lib$name.$libext"
9457 if test -f "$dir/lib$name.la"; then
9458 found_la="$dir/lib$name.la"
9459 fi
9460 fi
9461 fi
9462 ;;
9463 esac
9464 if test "X$found_dir" != "X"; then
9465 break
9466 fi
9467 done
9468 fi
9469 if test "X$found_dir" != "X"; then
9470 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9471 if test "X$found_so" != "X"; then
9472 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9473 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9474 else
9475 haveit=
9476 for x in $ltrpathdirs; do
9477 if test "X$x" = "X$found_dir"; then
9478 haveit=yes
9479 break
9480 fi
9481 done
9482 if test -z "$haveit"; then
9483 ltrpathdirs="$ltrpathdirs $found_dir"
9484 fi
9485 if test "$hardcode_direct" = yes; then
9486 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9487 else
9488 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9489 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9490 haveit=
9491 for x in $rpathdirs; do
9492 if test "X$x" = "X$found_dir"; then
9493 haveit=yes
9494 break
9495 fi
9496 done
9497 if test -z "$haveit"; then
9498 rpathdirs="$rpathdirs $found_dir"
9499 fi
9500 else
9501 haveit=
9502 for x in $LDFLAGS $LIBEXPAT; do
9503
9504 acl_save_prefix="$prefix"
9505 prefix="$acl_final_prefix"
9506 acl_save_exec_prefix="$exec_prefix"
9507 exec_prefix="$acl_final_exec_prefix"
9508 eval x=\"$x\"
9509 exec_prefix="$acl_save_exec_prefix"
9510 prefix="$acl_save_prefix"
9511
9512 if test "X$x" = "X-L$found_dir"; then
9513 haveit=yes
9514 break
9515 fi
9516 done
9517 if test -z "$haveit"; then
9518 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9519 fi
9520 if test "$hardcode_minus_L" != no; then
9521 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9522 else
9523 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9524 fi
9525 fi
9526 fi
9527 fi
9528 else
9529 if test "X$found_a" != "X"; then
9530 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9531 else
9532 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9533 fi
9534 fi
9535 additional_includedir=
9536 case "$found_dir" in
9537 */lib | */lib/)
9538 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9539 additional_includedir="$basedir/include"
9540 ;;
9541 esac
9542 if test "X$additional_includedir" != "X"; then
9543 if test "X$additional_includedir" != "X/usr/include"; then
9544 haveit=
9545 if test "X$additional_includedir" = "X/usr/local/include"; then
9546 if test -n "$GCC"; then
9547 case $host_os in
9548 linux*) haveit=yes;;
9549 esac
9550 fi
9551 fi
9552 if test -z "$haveit"; then
9553 for x in $CPPFLAGS $INCEXPAT; do
9554
9555 acl_save_prefix="$prefix"
9556 prefix="$acl_final_prefix"
9557 acl_save_exec_prefix="$exec_prefix"
9558 exec_prefix="$acl_final_exec_prefix"
9559 eval x=\"$x\"
9560 exec_prefix="$acl_save_exec_prefix"
9561 prefix="$acl_save_prefix"
9562
9563 if test "X$x" = "X-I$additional_includedir"; then
9564 haveit=yes
9565 break
9566 fi
9567 done
9568 if test -z "$haveit"; then
9569 if test -d "$additional_includedir"; then
9570 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9571 fi
9572 fi
9573 fi
9574 fi
9575 fi
9576 if test -n "$found_la"; then
9577 save_libdir="$libdir"
9578 case "$found_la" in
9579 */* | *\\*) . "$found_la" ;;
9580 *) . "./$found_la" ;;
9581 esac
9582 libdir="$save_libdir"
9583 for dep in $dependency_libs; do
9584 case "$dep" in
9585 -L*)
9586 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9587 if test "X$additional_libdir" != "X/usr/lib"; then
9588 haveit=
9589 if test "X$additional_libdir" = "X/usr/local/lib"; then
9590 if test -n "$GCC"; then
9591 case $host_os in
9592 linux*) haveit=yes;;
9593 esac
9594 fi
9595 fi
9596 if test -z "$haveit"; then
9597 haveit=
9598 for x in $LDFLAGS $LIBEXPAT; do
9599
9600 acl_save_prefix="$prefix"
9601 prefix="$acl_final_prefix"
9602 acl_save_exec_prefix="$exec_prefix"
9603 exec_prefix="$acl_final_exec_prefix"
9604 eval x=\"$x\"
9605 exec_prefix="$acl_save_exec_prefix"
9606 prefix="$acl_save_prefix"
9607
9608 if test "X$x" = "X-L$additional_libdir"; then
9609 haveit=yes
9610 break
9611 fi
9612 done
9613 if test -z "$haveit"; then
9614 if test -d "$additional_libdir"; then
9615 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9616 fi
9617 fi
9618 haveit=
9619 for x in $LDFLAGS $LTLIBEXPAT; do
9620
9621 acl_save_prefix="$prefix"
9622 prefix="$acl_final_prefix"
9623 acl_save_exec_prefix="$exec_prefix"
9624 exec_prefix="$acl_final_exec_prefix"
9625 eval x=\"$x\"
9626 exec_prefix="$acl_save_exec_prefix"
9627 prefix="$acl_save_prefix"
9628
9629 if test "X$x" = "X-L$additional_libdir"; then
9630 haveit=yes
9631 break
9632 fi
9633 done
9634 if test -z "$haveit"; then
9635 if test -d "$additional_libdir"; then
9636 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9637 fi
9638 fi
9639 fi
9640 fi
9641 ;;
9642 -R*)
9643 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9644 if test "$enable_rpath" != no; then
9645 haveit=
9646 for x in $rpathdirs; do
9647 if test "X$x" = "X$dir"; then
9648 haveit=yes
9649 break
9650 fi
9651 done
9652 if test -z "$haveit"; then
9653 rpathdirs="$rpathdirs $dir"
9654 fi
9655 haveit=
9656 for x in $ltrpathdirs; do
9657 if test "X$x" = "X$dir"; then
9658 haveit=yes
9659 break
9660 fi
9661 done
9662 if test -z "$haveit"; then
9663 ltrpathdirs="$ltrpathdirs $dir"
9664 fi
9665 fi
9666 ;;
9667 -l*)
9668 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9669 ;;
9670 *.la)
9671 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9672 ;;
9673 *)
9674 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9675 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9676 ;;
81ecdfbb
RW
9677 esac
9678 done
9679 fi
9680 else
9681 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9682 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9683 fi
9684 fi
9685 fi
9686 done
9687 done
9688 if test "X$rpathdirs" != "X"; then
9689 if test -n "$hardcode_libdir_separator"; then
9690 alldirs=
9691 for found_dir in $rpathdirs; do
9692 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9693 done
9694 acl_save_libdir="$libdir"
9695 libdir="$alldirs"
9696 eval flag=\"$hardcode_libdir_flag_spec\"
9697 libdir="$acl_save_libdir"
9698 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9699 else
9700 for found_dir in $rpathdirs; do
9701 acl_save_libdir="$libdir"
9702 libdir="$found_dir"
9703 eval flag=\"$hardcode_libdir_flag_spec\"
9704 libdir="$acl_save_libdir"
9705 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9706 done
9707 fi
9708 fi
9709 if test "X$ltrpathdirs" != "X"; then
9710 for found_dir in $ltrpathdirs; do
9711 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9712 done
9713 fi
a9322a30
TT
9714
9715
81ecdfbb 9716 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9717
81ecdfbb
RW
9718 for element in $INCEXPAT; do
9719 haveit=
9720 for x in $CPPFLAGS; do
a9322a30 9721
81ecdfbb
RW
9722 acl_save_prefix="$prefix"
9723 prefix="$acl_final_prefix"
9724 acl_save_exec_prefix="$exec_prefix"
9725 exec_prefix="$acl_final_exec_prefix"
9726 eval x=\"$x\"
9727 exec_prefix="$acl_save_exec_prefix"
9728 prefix="$acl_save_prefix"
a8111142 9729
81ecdfbb
RW
9730 if test "X$x" = "X$element"; then
9731 haveit=yes
9732 break
9733 fi
9734 done
9735 if test -z "$haveit"; then
9736 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9737 fi
9738 done
a9322a30
TT
9739
9740
81ecdfbb
RW
9741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9742$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9743if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9744 $as_echo_n "(cached) " >&6
bec39cab 9745else
bec39cab 9746
81ecdfbb
RW
9747 ac_save_LIBS="$LIBS"
9748 LIBS="$LIBS $LIBEXPAT"
9749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9750/* end confdefs.h. */
81ecdfbb
RW
9751#include "expat.h"
9752int
9753main ()
9754{
9755XML_Parser p = XML_ParserCreate (0);
9756 ;
9757 return 0;
9758}
bec39cab 9759_ACEOF
81ecdfbb
RW
9760if ac_fn_c_try_link "$LINENO"; then :
9761 ac_cv_libexpat=yes
c906108c 9762else
81ecdfbb 9763 ac_cv_libexpat=no
bec39cab 9764fi
81ecdfbb
RW
9765rm -f core conftest.err conftest.$ac_objext \
9766 conftest$ac_exeext conftest.$ac_ext
9767 LIBS="$ac_save_LIBS"
c906108c 9768
95ca63c4 9769fi
81ecdfbb
RW
9770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9771$as_echo "$ac_cv_libexpat" >&6; }
9772 if test "$ac_cv_libexpat" = yes; then
9773 HAVE_LIBEXPAT=yes
bec39cab 9774
81ecdfbb 9775$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9776
81ecdfbb
RW
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9778$as_echo_n "checking how to link with libexpat... " >&6; }
9779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9780$as_echo "$LIBEXPAT" >&6; }
9781 else
9782 HAVE_LIBEXPAT=no
9783 CPPFLAGS="$ac_save_CPPFLAGS"
9784 LIBEXPAT=
9785 LTLIBEXPAT=
9786 fi
95ca63c4
CF
9787
9788
9789
7cb9022a
MK
9790
9791
bec39cab 9792
81ecdfbb
RW
9793 if test "$HAVE_LIBEXPAT" != yes; then
9794 if test "$with_expat" = yes; then
d0ac1c44 9795 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9796 else
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9798$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9799 fi
9800 else
9801 save_LIBS=$LIBS
9802 LIBS="$LIBS $LIBEXPAT"
9803 for ac_func in XML_StopParser
9804do :
9805 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9806if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9807 cat >>confdefs.h <<_ACEOF
81ecdfbb 9808#define HAVE_XML_STOPPARSER 1
bec39cab 9809_ACEOF
95ca63c4 9810
bec39cab 9811fi
bec39cab 9812done
95ca63c4 9813
81ecdfbb
RW
9814 LIBS=$save_LIBS
9815 fi
a9322a30
TT
9816fi
9817
2400729e
UW
9818
9819# Check whether --with-mpfr was given.
9820if test "${with_mpfr+set}" = set; then :
9821 withval=$with_mpfr;
9822else
9823 with_mpfr=auto
9824fi
9825
9826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9827$as_echo_n "checking whether to use MPFR... " >&6; }
9828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9829$as_echo "$with_mpfr" >&6; }
9830
9831if test "${with_mpfr}" = no; then
9832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9833$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9834 HAVE_LIBMPFR=no
9835else
9836
9837
9838
9839
9840
9841
9842
9843
9844 use_additional=yes
9845
9846 acl_save_prefix="$prefix"
9847 prefix="$acl_final_prefix"
9848 acl_save_exec_prefix="$exec_prefix"
9849 exec_prefix="$acl_final_exec_prefix"
9850
9851 eval additional_includedir=\"$includedir\"
9852 eval additional_libdir=\"$libdir\"
9853
9854 exec_prefix="$acl_save_exec_prefix"
9855 prefix="$acl_save_prefix"
9856
9857
9858# Check whether --with-libmpfr-prefix was given.
9859if test "${with_libmpfr_prefix+set}" = set; then :
9860 withval=$with_libmpfr_prefix;
9861 if test "X$withval" = "Xno"; then
9862 use_additional=no
9863 else
9864 if test "X$withval" = "X"; then
9865
9866 acl_save_prefix="$prefix"
9867 prefix="$acl_final_prefix"
9868 acl_save_exec_prefix="$exec_prefix"
9869 exec_prefix="$acl_final_exec_prefix"
9870
9871 eval additional_includedir=\"$includedir\"
9872 eval additional_libdir=\"$libdir\"
9873
9874 exec_prefix="$acl_save_exec_prefix"
9875 prefix="$acl_save_prefix"
9876
9877 else
9878 additional_includedir="$withval/include"
9879 additional_libdir="$withval/lib"
9880 fi
9881 fi
9882
9883fi
9884
9885 LIBMPFR=
9886 LTLIBMPFR=
9887 INCMPFR=
9888 rpathdirs=
9889 ltrpathdirs=
9890 names_already_handled=
da658607 9891 names_next_round='mpfr gmp'
2400729e
UW
9892 while test -n "$names_next_round"; do
9893 names_this_round="$names_next_round"
9894 names_next_round=
9895 for name in $names_this_round; do
9896 already_handled=
9897 for n in $names_already_handled; do
9898 if test "$n" = "$name"; then
9899 already_handled=yes
9900 break
9901 fi
9902 done
9903 if test -z "$already_handled"; then
9904 names_already_handled="$names_already_handled $name"
9905 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9906 eval value=\"\$HAVE_LIB$uppername\"
9907 if test -n "$value"; then
9908 if test "$value" = yes; then
9909 eval value=\"\$LIB$uppername\"
9910 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9911 eval value=\"\$LTLIB$uppername\"
9912 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9913 else
9914 :
9915 fi
9916 else
9917 found_dir=
9918 found_la=
9919 found_so=
9920 found_a=
9921 if test $use_additional = yes; then
9922 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9923 found_dir="$additional_libdir"
9924 found_so="$additional_libdir/lib$name.$shlibext"
9925 if test -f "$additional_libdir/lib$name.la"; then
9926 found_la="$additional_libdir/lib$name.la"
9927 fi
9928 else
9929 if test -f "$additional_libdir/lib$name.$libext"; then
9930 found_dir="$additional_libdir"
9931 found_a="$additional_libdir/lib$name.$libext"
9932 if test -f "$additional_libdir/lib$name.la"; then
9933 found_la="$additional_libdir/lib$name.la"
9934 fi
9935 fi
9936 fi
9937 fi
9938 if test "X$found_dir" = "X"; then
9939 for x in $LDFLAGS $LTLIBMPFR; do
9940
9941 acl_save_prefix="$prefix"
9942 prefix="$acl_final_prefix"
9943 acl_save_exec_prefix="$exec_prefix"
9944 exec_prefix="$acl_final_exec_prefix"
9945 eval x=\"$x\"
9946 exec_prefix="$acl_save_exec_prefix"
9947 prefix="$acl_save_prefix"
9948
9949 case "$x" in
9950 -L*)
9951 dir=`echo "X$x" | sed -e 's/^X-L//'`
9952 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9953 found_dir="$dir"
9954 found_so="$dir/lib$name.$shlibext"
9955 if test -f "$dir/lib$name.la"; then
9956 found_la="$dir/lib$name.la"
9957 fi
9958 else
9959 if test -f "$dir/lib$name.$libext"; then
9960 found_dir="$dir"
9961 found_a="$dir/lib$name.$libext"
9962 if test -f "$dir/lib$name.la"; then
9963 found_la="$dir/lib$name.la"
9964 fi
9965 fi
9966 fi
9967 ;;
9968 esac
9969 if test "X$found_dir" != "X"; then
9970 break
9971 fi
9972 done
9973 fi
9974 if test "X$found_dir" != "X"; then
9975 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9976 if test "X$found_so" != "X"; then
9977 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9978 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9979 else
9980 haveit=
9981 for x in $ltrpathdirs; do
9982 if test "X$x" = "X$found_dir"; then
9983 haveit=yes
9984 break
9985 fi
9986 done
9987 if test -z "$haveit"; then
9988 ltrpathdirs="$ltrpathdirs $found_dir"
9989 fi
9990 if test "$hardcode_direct" = yes; then
9991 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9992 else
9993 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9994 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9995 haveit=
9996 for x in $rpathdirs; do
9997 if test "X$x" = "X$found_dir"; then
9998 haveit=yes
9999 break
10000 fi
10001 done
10002 if test -z "$haveit"; then
10003 rpathdirs="$rpathdirs $found_dir"
10004 fi
10005 else
10006 haveit=
10007 for x in $LDFLAGS $LIBMPFR; do
10008
10009 acl_save_prefix="$prefix"
10010 prefix="$acl_final_prefix"
10011 acl_save_exec_prefix="$exec_prefix"
10012 exec_prefix="$acl_final_exec_prefix"
10013 eval x=\"$x\"
10014 exec_prefix="$acl_save_exec_prefix"
10015 prefix="$acl_save_prefix"
10016
10017 if test "X$x" = "X-L$found_dir"; then
10018 haveit=yes
10019 break
10020 fi
10021 done
10022 if test -z "$haveit"; then
10023 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10024 fi
10025 if test "$hardcode_minus_L" != no; then
10026 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10027 else
10028 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10029 fi
10030 fi
10031 fi
10032 fi
10033 else
10034 if test "X$found_a" != "X"; then
10035 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10036 else
10037 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10038 fi
10039 fi
10040 additional_includedir=
10041 case "$found_dir" in
10042 */lib | */lib/)
10043 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10044 additional_includedir="$basedir/include"
10045 ;;
10046 esac
10047 if test "X$additional_includedir" != "X"; then
10048 if test "X$additional_includedir" != "X/usr/include"; then
10049 haveit=
10050 if test "X$additional_includedir" = "X/usr/local/include"; then
10051 if test -n "$GCC"; then
10052 case $host_os in
10053 linux*) haveit=yes;;
10054 esac
10055 fi
10056 fi
10057 if test -z "$haveit"; then
10058 for x in $CPPFLAGS $INCMPFR; do
10059
10060 acl_save_prefix="$prefix"
10061 prefix="$acl_final_prefix"
10062 acl_save_exec_prefix="$exec_prefix"
10063 exec_prefix="$acl_final_exec_prefix"
10064 eval x=\"$x\"
10065 exec_prefix="$acl_save_exec_prefix"
10066 prefix="$acl_save_prefix"
10067
10068 if test "X$x" = "X-I$additional_includedir"; then
10069 haveit=yes
10070 break
10071 fi
10072 done
10073 if test -z "$haveit"; then
10074 if test -d "$additional_includedir"; then
10075 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10076 fi
10077 fi
10078 fi
10079 fi
10080 fi
10081 if test -n "$found_la"; then
10082 save_libdir="$libdir"
10083 case "$found_la" in
10084 */* | *\\*) . "$found_la" ;;
10085 *) . "./$found_la" ;;
10086 esac
10087 libdir="$save_libdir"
10088 for dep in $dependency_libs; do
10089 case "$dep" in
10090 -L*)
10091 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10092 if test "X$additional_libdir" != "X/usr/lib"; then
10093 haveit=
10094 if test "X$additional_libdir" = "X/usr/local/lib"; then
10095 if test -n "$GCC"; then
10096 case $host_os in
10097 linux*) haveit=yes;;
10098 esac
10099 fi
10100 fi
10101 if test -z "$haveit"; then
10102 haveit=
10103 for x in $LDFLAGS $LIBMPFR; do
10104
10105 acl_save_prefix="$prefix"
10106 prefix="$acl_final_prefix"
10107 acl_save_exec_prefix="$exec_prefix"
10108 exec_prefix="$acl_final_exec_prefix"
10109 eval x=\"$x\"
10110 exec_prefix="$acl_save_exec_prefix"
10111 prefix="$acl_save_prefix"
10112
10113 if test "X$x" = "X-L$additional_libdir"; then
10114 haveit=yes
10115 break
10116 fi
10117 done
10118 if test -z "$haveit"; then
10119 if test -d "$additional_libdir"; then
10120 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10121 fi
10122 fi
10123 haveit=
10124 for x in $LDFLAGS $LTLIBMPFR; do
10125
10126 acl_save_prefix="$prefix"
10127 prefix="$acl_final_prefix"
10128 acl_save_exec_prefix="$exec_prefix"
10129 exec_prefix="$acl_final_exec_prefix"
10130 eval x=\"$x\"
10131 exec_prefix="$acl_save_exec_prefix"
10132 prefix="$acl_save_prefix"
10133
10134 if test "X$x" = "X-L$additional_libdir"; then
10135 haveit=yes
10136 break
10137 fi
10138 done
10139 if test -z "$haveit"; then
10140 if test -d "$additional_libdir"; then
10141 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10142 fi
10143 fi
10144 fi
10145 fi
10146 ;;
10147 -R*)
10148 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10149 if test "$enable_rpath" != no; then
10150 haveit=
10151 for x in $rpathdirs; do
10152 if test "X$x" = "X$dir"; then
10153 haveit=yes
10154 break
10155 fi
10156 done
10157 if test -z "$haveit"; then
10158 rpathdirs="$rpathdirs $dir"
10159 fi
10160 haveit=
10161 for x in $ltrpathdirs; do
10162 if test "X$x" = "X$dir"; then
10163 haveit=yes
10164 break
10165 fi
10166 done
10167 if test -z "$haveit"; then
10168 ltrpathdirs="$ltrpathdirs $dir"
10169 fi
10170 fi
10171 ;;
10172 -l*)
10173 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10174 ;;
10175 *.la)
10176 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10177 ;;
10178 *)
10179 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10180 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10181 ;;
10182 esac
10183 done
10184 fi
10185 else
10186 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10187 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10188 fi
10189 fi
10190 fi
10191 done
10192 done
10193 if test "X$rpathdirs" != "X"; then
10194 if test -n "$hardcode_libdir_separator"; then
10195 alldirs=
10196 for found_dir in $rpathdirs; do
10197 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10198 done
10199 acl_save_libdir="$libdir"
10200 libdir="$alldirs"
10201 eval flag=\"$hardcode_libdir_flag_spec\"
10202 libdir="$acl_save_libdir"
10203 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10204 else
10205 for found_dir in $rpathdirs; do
10206 acl_save_libdir="$libdir"
10207 libdir="$found_dir"
10208 eval flag=\"$hardcode_libdir_flag_spec\"
10209 libdir="$acl_save_libdir"
10210 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10211 done
10212 fi
10213 fi
10214 if test "X$ltrpathdirs" != "X"; then
10215 for found_dir in $ltrpathdirs; do
10216 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10217 done
10218 fi
10219
10220
10221 ac_save_CPPFLAGS="$CPPFLAGS"
10222
10223 for element in $INCMPFR; do
10224 haveit=
10225 for x in $CPPFLAGS; do
10226
10227 acl_save_prefix="$prefix"
10228 prefix="$acl_final_prefix"
10229 acl_save_exec_prefix="$exec_prefix"
10230 exec_prefix="$acl_final_exec_prefix"
10231 eval x=\"$x\"
10232 exec_prefix="$acl_save_exec_prefix"
10233 prefix="$acl_save_prefix"
10234
10235 if test "X$x" = "X$element"; then
10236 haveit=yes
10237 break
10238 fi
10239 done
10240 if test -z "$haveit"; then
10241 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10242 fi
10243 done
10244
10245
10246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10247$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10248if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10249 $as_echo_n "(cached) " >&6
10250else
10251
10252 ac_save_LIBS="$LIBS"
10253 LIBS="$LIBS $LIBMPFR"
10254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10255/* end confdefs.h. */
10256#include <mpfr.h>
10257int
10258main ()
10259{
10260mpfr_exp_t exp; mpfr_t x;
10261 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10262 ;
10263 return 0;
10264}
10265_ACEOF
10266if ac_fn_c_try_link "$LINENO"; then :
10267 ac_cv_libmpfr=yes
10268else
10269 ac_cv_libmpfr=no
10270fi
10271rm -f core conftest.err conftest.$ac_objext \
10272 conftest$ac_exeext conftest.$ac_ext
10273 LIBS="$ac_save_LIBS"
10274
10275fi
10276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10277$as_echo "$ac_cv_libmpfr" >&6; }
10278 if test "$ac_cv_libmpfr" = yes; then
10279 HAVE_LIBMPFR=yes
10280
10281$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10282
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10284$as_echo_n "checking how to link with libmpfr... " >&6; }
10285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10286$as_echo "$LIBMPFR" >&6; }
10287 else
10288 HAVE_LIBMPFR=no
10289 CPPFLAGS="$ac_save_CPPFLAGS"
10290 LIBMPFR=
10291 LTLIBMPFR=
10292 fi
10293
10294
10295
10296
10297
10298
10299 if test "$HAVE_LIBMPFR" != yes; then
10300 if test "$with_mpfr" = yes; then
d0ac1c44 10301 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10302 else
10303 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10304$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10305 fi
10306 fi
10307fi
10308
d344e670
DE
10309# --------------------- #
10310# Check for libpython. #
10311# --------------------- #
10312
a9322a30 10313
a9322a30
TT
10314
10315
ec685c5e 10316
0c4a4063 10317
81ecdfbb
RW
10318# Check whether --with-python was given.
10319if test "${with_python+set}" = set; then :
10320 withval=$with_python;
bec39cab 10321else
81ecdfbb 10322 with_python=auto
bec39cab 10323fi
bec39cab 10324
81ecdfbb
RW
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10326$as_echo_n "checking whether to use python... " >&6; }
10327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10328$as_echo "$with_python" >&6; }
9a156167 10329
81ecdfbb
RW
10330if test "${with_python}" = no; then
10331 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10332$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10333 have_libpython=no
bec39cab 10334else
81ecdfbb 10335 case "${with_python}" in
8c85a4e2 10336 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10337 if test -d ${with_python}; then
10338 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10339 python_prog="${with_python}/bin/python"
0c4a4063 10340 python_prefix=
9c4ea6c5
JB
10341 # If python does not exit ${with_python}/bin, then try in
10342 # ${with_python}. On Windows/MinGW, this is where the Python
10343 # executable is.
10344 if test ! -x "${python_prog}"; then
10345 python_prog="${with_python}/python"
10346 python_prefix=
10347 fi
e7a30f46 10348 if test ! -x "${python_prog}"; then
ec685c5e
DE
10349 # Fall back to gdb 7.0/7.1 behaviour.
10350 python_prog=missing
0c4a4063 10351 python_prefix=${with_python}
ec685c5e 10352 fi
e7a30f46 10353 elif test -x "${with_python}"; then
ec685c5e
DE
10354 # While we can't run python compiled for $host (unless host == build),
10355 # the user could write a script that provides the needed information,
10356 # so we support that.
ec685c5e 10357 python_prog=${with_python}
0c4a4063 10358 python_prefix=
ec685c5e 10359 else
d0ac1c44 10360 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10361 fi
81ecdfbb 10362 ;;
ec685c5e
DE
10363 */*)
10364 # Disallow --with-python=foo/bar.
d0ac1c44 10365 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10366 ;;
ec685c5e
DE
10367 *)
10368 # The user has either specified auto, yes, or the name of the python
10369 # program assumed to be in $PATH.
10370 python_prefix=
10371 case "${with_python}" in
10372 yes | auto)
10373 if test ${build} = ${host}; then
10374 # Extract the first word of "python", so it can be a program name with args.
10375set dummy python; ac_word=$2
10376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10377$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10378if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10379 $as_echo_n "(cached) " >&6
10380else
10381 case $python_prog_path in
10382 [\\/]* | ?:[\\/]*)
10383 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10384 ;;
10385 *)
10386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10387for as_dir in $PATH
10388do
10389 IFS=$as_save_IFS
10390 test -z "$as_dir" && as_dir=.
10391 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10392 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10393 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10394 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10395 break 2
10396 fi
10397done
10398 done
10399IFS=$as_save_IFS
10400
10401 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10402 ;;
10403esac
10404fi
10405python_prog_path=$ac_cv_path_python_prog_path
10406if test -n "$python_prog_path"; then
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10408$as_echo "$python_prog_path" >&6; }
10409else
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10411$as_echo "no" >&6; }
10412fi
10413
10414
10415 if test "${python_prog_path}" = missing; then
10416 python_prog=missing
10417 else
10418 python_prog=${python_prog_path}
10419 fi
10420 else
10421 # Not much we can do except assume the cross-compiler will find the
10422 # right files.
10423 python_prog=missing
10424 fi
10425 ;;
10426 *)
10427 # While we can't run python compiled for $host (unless host == build),
10428 # the user could write a script that provides the needed information,
10429 # so we support that.
10430 python_prog="${with_python}"
10431 # Extract the first word of "${python_prog}", so it can be a program name with args.
10432set dummy ${python_prog}; ac_word=$2
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10435if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10436 $as_echo_n "(cached) " >&6
10437else
10438 case $python_prog_path in
10439 [\\/]* | ?:[\\/]*)
10440 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10441 ;;
10442 *)
10443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10444for as_dir in $PATH
10445do
10446 IFS=$as_save_IFS
10447 test -z "$as_dir" && as_dir=.
10448 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10449 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10450 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10451 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10452 break 2
10453 fi
10454done
10455 done
10456IFS=$as_save_IFS
10457
10458 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10459 ;;
10460esac
10461fi
10462python_prog_path=$ac_cv_path_python_prog_path
10463if test -n "$python_prog_path"; then
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10465$as_echo "$python_prog_path" >&6; }
10466else
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468$as_echo "no" >&6; }
10469fi
10470
10471
10472 if test "${python_prog_path}" = missing; then
d0ac1c44 10473 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10474 fi
10475 ;;
10476 esac
81ecdfbb
RW
10477 esac
10478
ec685c5e 10479 if test "${python_prog}" != missing; then
e7a30f46
DE
10480 # We have a python program to use, but it may be too old.
10481 # Don't flag an error for --with-python=auto (the default).
10482 have_python_config=yes
ec685c5e
DE
10483 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10484 if test $? != 0; then
e7a30f46
DE
10485 have_python_config=failed
10486 if test "${with_python}" != auto; then
d0ac1c44 10487 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10488 fi
ec685c5e
DE
10489 fi
10490 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10491 if test $? != 0; then
e7a30f46
DE
10492 have_python_config=failed
10493 if test "${with_python}" != auto; then
d0ac1c44 10494 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10495 fi
ec685c5e 10496 fi
0c4a4063
DE
10497 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10498 if test $? != 0; then
e7a30f46
DE
10499 have_python_config=failed
10500 if test "${with_python}" != auto; then
d0ac1c44 10501 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10502 fi
0c4a4063 10503 fi
ec685c5e 10504 else
ac534cba
JB
10505 # We do not have a python executable we can use to determine where
10506 # to find the Python headers and libs. We cannot guess the include
10507 # path from the python_prefix either, because that include path
10508 # depends on the Python version. So, there is nothing much we can
10509 # do except assume that the compiler will be able to find those files.
10510 python_includes=
10511 python_libs=
0c4a4063 10512 have_python_config=no
ec685c5e 10513 fi
bec39cab 10514
ec685c5e
DE
10515 # If we have python-config, only try the configuration it provides.
10516 # Otherwise fallback on the old way of trying different versions of
10517 # python in turn.
81ecdfbb 10518
ec685c5e
DE
10519 have_libpython=no
10520 if test "${have_python_config}" = yes; then
c1039e3c
JB
10521 # Determine the Python version by extracting "-lpython<version>"
10522 # part of the python_libs. <version> is usually X.Y with X and Y
10523 # being decimal numbers, but can also be XY (seen on Windows).
10524 #
10525 # The extraction is performed using sed with a regular expression.
10526 # Initially, the regexp used was using the '?' quantifier to make
10527 # the dot in the version number optional. Unfortunately, this
10528 # does not work with non-GNU versions of sed because, because of
10529 # what looks like a limitation (the '?' quantifier does not work
10530 # with back-references). We work around this limitation by using
10531 # the '*' quantifier instead. It means that, in theory, we might
10532 # match unexpected version strings such as "-lpython2..7", but
10533 # this seems unlikely in practice. And even if that happens,
10534 # an error will be triggered later on, when checking that version
10535 # number.
ec685c5e 10536 python_version=`echo " ${python_libs} " \
c1039e3c 10537 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10538 case "${python_version}" in
10539 python*)
ec685c5e
DE
10540
10541 version=${python_version}
10542
10543 new_CPPFLAGS=${python_includes}
10544 new_LIBS=${python_libs}
81ecdfbb
RW
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10546$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10547 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10548 save_LIBS=$LIBS
ec685c5e 10549 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10550 LIBS="$new_LIBS $LIBS"
ec685c5e 10551 found_usable_python=no
81ecdfbb 10552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10553/* end confdefs.h. */
ac534cba 10554#include "Python.h"
81ecdfbb
RW
10555int
10556main ()
10557{
10558Py_Initialize ();
10559 ;
10560 return 0;
10561}
bec39cab 10562_ACEOF
81ecdfbb 10563if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10564 have_libpython=${version}
10565 found_usable_python=yes
ac534cba
JB
10566 PYTHON_CPPFLAGS=$new_CPPFLAGS
10567 PYTHON_LIBS=$new_LIBS
9a156167 10568fi
81ecdfbb
RW
10569rm -f core conftest.err conftest.$ac_objext \
10570 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10571 CPPFLAGS=$save_CPPFLAGS
10572 LIBS=$save_LIBS
ec685c5e
DE
10573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10574$as_echo "${found_usable_python}" >&6; }
9a156167 10575
0c4a4063
DE
10576 ;;
10577 *)
d0ac1c44 10578 as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10579 ;;
10580 esac
e7a30f46 10581 elif test "${have_python_config}" != failed; then
ec685c5e 10582 if test "${have_libpython}" = no; then
9a156167 10583
420697bb
TT
10584 version=python2.7
10585
10586 new_CPPFLAGS=${python_includes}
bf27f0e2 10587 new_LIBS="-lpython2.7 ${python_libs}"
420697bb
TT
10588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10589$as_echo_n "checking for ${version}... " >&6; }
10590 save_CPPFLAGS=$CPPFLAGS
10591 save_LIBS=$LIBS
10592 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10593 LIBS="$new_LIBS $LIBS"
420697bb
TT
10594 found_usable_python=no
10595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10596/* end confdefs.h. */
ac534cba 10597#include "Python.h"
420697bb
TT
10598int
10599main ()
10600{
10601Py_Initialize ();
10602 ;
10603 return 0;
10604}
10605_ACEOF
10606if ac_fn_c_try_link "$LINENO"; then :
10607 have_libpython=${version}
10608 found_usable_python=yes
ac534cba
JB
10609 PYTHON_CPPFLAGS=$new_CPPFLAGS
10610 PYTHON_LIBS=$new_LIBS
420697bb
TT
10611fi
10612rm -f core conftest.err conftest.$ac_objext \
10613 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10614 CPPFLAGS=$save_CPPFLAGS
10615 LIBS=$save_LIBS
420697bb
TT
10616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10617$as_echo "${found_usable_python}" >&6; }
10618
10619 fi
10620 if test "${have_libpython}" = no; then
10621
ec685c5e
DE
10622 version=python2.6
10623
10624 new_CPPFLAGS=${python_includes}
bf27f0e2 10625 new_LIBS="-lpython2.6 ${python_libs}"
ec685c5e
DE
10626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10627$as_echo_n "checking for ${version}... " >&6; }
10628 save_CPPFLAGS=$CPPFLAGS
10629 save_LIBS=$LIBS
10630 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10631 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10632 found_usable_python=no
10633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10634/* end confdefs.h. */
ac534cba 10635#include "Python.h"
ec685c5e
DE
10636int
10637main ()
10638{
10639Py_Initialize ();
10640 ;
10641 return 0;
10642}
10643_ACEOF
10644if ac_fn_c_try_link "$LINENO"; then :
10645 have_libpython=${version}
10646 found_usable_python=yes
ac534cba
JB
10647 PYTHON_CPPFLAGS=$new_CPPFLAGS
10648 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
10649fi
10650rm -f core conftest.err conftest.$ac_objext \
10651 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10652 CPPFLAGS=$save_CPPFLAGS
10653 LIBS=$save_LIBS
ec685c5e
DE
10654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10655$as_echo "${found_usable_python}" >&6; }
9a156167 10656
81ecdfbb 10657 fi
ec685c5e 10658 if test ${have_libpython} = no; then
9a156167 10659
81ecdfbb 10660 version=python2.5
9a156167 10661
ec685c5e 10662 new_CPPFLAGS=${python_includes}
bf27f0e2 10663 new_LIBS="-lpython2.5 ${python_libs}"
81ecdfbb
RW
10664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10665$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10666 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10667 save_LIBS=$LIBS
ec685c5e 10668 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10669 LIBS="$new_LIBS $LIBS"
ec685c5e 10670 found_usable_python=no
81ecdfbb 10671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10672/* end confdefs.h. */
ac534cba 10673#include "Python.h"
81ecdfbb
RW
10674int
10675main ()
10676{
10677Py_Initialize ();
10678 ;
10679 return 0;
10680}
436868fb 10681_ACEOF
81ecdfbb 10682if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10683 have_libpython=${version}
10684 found_usable_python=yes
ac534cba
JB
10685 PYTHON_CPPFLAGS=$new_CPPFLAGS
10686 PYTHON_LIBS=$new_LIBS
436868fb 10687fi
81ecdfbb
RW
10688rm -f core conftest.err conftest.$ac_objext \
10689 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10690 CPPFLAGS=$save_CPPFLAGS
10691 LIBS=$save_LIBS
ec685c5e
DE
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10693$as_echo "${found_usable_python}" >&6; }
a9322a30 10694
81ecdfbb 10695 fi
ec685c5e 10696 if test ${have_libpython} = no; then
a9322a30 10697
81ecdfbb 10698 version=python2.4
a9322a30 10699
ec685c5e 10700 new_CPPFLAGS=${python_includes}
bf27f0e2 10701 new_LIBS="-lpython2.4 ${python_libs}"
81ecdfbb
RW
10702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10703$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10704 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10705 save_LIBS=$LIBS
ec685c5e 10706 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10707 LIBS="$new_LIBS $LIBS"
ec685c5e 10708 found_usable_python=no
81ecdfbb 10709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10710/* end confdefs.h. */
ac534cba 10711#include "Python.h"
a9322a30
TT
10712int
10713main ()
10714{
81ecdfbb 10715Py_Initialize ();
a9322a30
TT
10716 ;
10717 return 0;
10718}
436868fb 10719_ACEOF
81ecdfbb 10720if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10721 have_libpython=${version}
10722 found_usable_python=yes
ac534cba
JB
10723 PYTHON_CPPFLAGS=$new_CPPFLAGS
10724 PYTHON_LIBS=$new_LIBS
436868fb 10725fi
81ecdfbb
RW
10726rm -f core conftest.err conftest.$ac_objext \
10727 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10728 CPPFLAGS=$save_CPPFLAGS
10729 LIBS=$save_LIBS
ec685c5e
DE
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10731$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10732
ec685c5e
DE
10733 fi
10734 fi
9c4ea6c5 10735 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10736
10737$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10738
9c4ea6c5 10739 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10740
10741$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10742
9c4ea6c5 10743 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10744
10745$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10746
9c4ea6c5 10747 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10748
10749$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10750
81ecdfbb 10751 fi
ec685c5e
DE
10752
10753 if test "${have_libpython}" = no; then
81ecdfbb
RW
10754 case "${with_python}" in
10755 yes)
d0ac1c44 10756 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10757 ;;
10758 auto)
10759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10760$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10761 ;;
10762 *)
d0ac1c44 10763 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10764 ;;
10765 esac
0c4a4063
DE
10766 else
10767 if test -n "${python_prefix}"; then
10768
10769cat >>confdefs.h <<_ACEOF
10770#define WITH_PYTHON_PATH "${python_prefix}"
10771_ACEOF
10772
10773
10774 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10775 if test "x$prefix" = xNONE; then
10776 test_prefix=/usr/local
10777 else
10778 test_prefix=$prefix
10779 fi
10780 else
10781 test_prefix=$exec_prefix
10782 fi
10783 value=0
10784 case ${python_prefix} in
10785 "${test_prefix}"|"${test_prefix}/"*|\
10786 '${exec_prefix}'|'${exec_prefix}/'*)
10787 value=1
10788 ;;
10789 esac
10790
10791cat >>confdefs.h <<_ACEOF
10792#define PYTHON_PATH_RELOCATABLE $value
10793_ACEOF
10794
10795
10796 fi
81ecdfbb 10797 fi
436868fb 10798fi
436868fb 10799
ec685c5e 10800if test "${have_libpython}" != no; then
436868fb 10801
81ecdfbb 10802$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10803
81ecdfbb
RW
10804 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10805 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10806 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10807 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10808 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10809
81ecdfbb
RW
10810 # Flags needed to compile Python code (taken from python-config --cflags).
10811 # We cannot call python-config directly because it will output whatever was
10812 # used when compiling the Python interpreter itself, including flags which
10813 # would make the python-related objects be compiled differently from the
10814 # rest of GDB (e.g., -O2 and -fPIC).
10815 if test "${GCC}" = yes; then
ae292b3a
TT
10816 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10817 # Python headers recommend -DNDEBUG, but it's unclear if that just
10818 # refers to building Python itself. In release mode, though, it
10819 # doesn't hurt for the Python code in gdb to follow.
10820 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10821 fi
436868fb 10822
81ecdfbb
RW
10823 if test "x${tentative_python_cflags}" != x; then
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10825$as_echo_n "checking compiler flags for python code... " >&6; }
10826 for flag in ${tentative_python_cflags}; do
10827 # Check that the compiler accepts it
10828 saved_CFLAGS="$CFLAGS"
10829 CFLAGS="$CFLAGS $flag"
10830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10831/* end confdefs.h. */
81ecdfbb 10832
a9322a30
TT
10833int
10834main ()
10835{
a9322a30
TT
10836
10837 ;
10838 return 0;
10839}
bec39cab 10840_ACEOF
81ecdfbb
RW
10841if ac_fn_c_try_compile "$LINENO"; then :
10842 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10843fi
81ecdfbb
RW
10844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10845 CFLAGS="$saved_CFLAGS"
10846 done
10847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10848$as_echo "${PYTHON_CFLAGS}" >&6; }
10849 fi
043b6510 10850
c83393b9
JB
10851 # On x64 Windows, Python's include headers, and pyconfig.h in
10852 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10853 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10854 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10855 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10856 # The issue was reported to the Python community, but still isn't
10857 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10858
043b6510 10859 case "$gdb_host" in
c83393b9
JB
10860 mingw64)
10861 if test "${GCC}" = yes; then
10862 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10863 fi
10864 ;;
043b6510 10865 esac
a8db4212
YPK
10866
10867 # Note that "python -m threading" cannot be used to check for
10868 # threading support due to a bug in Python 2.7.3
10869 # (http://bugs.python.org/issue15567).
10870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10871$as_echo_n "checking whether python supports threads... " >&6; }
10872 saved_CPPFLAGS="${CPPFLAGS}"
10873 CPPFLAGS="${PYTHON_CPPFLAGS}"
10874 # Note that the test is reversed so that python_has_threads=yes on
10875 # unexpected failures.
10876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10877/* end confdefs.h. */
10878
10879#include <Python.h>
10880#ifdef WITH_THREAD
10881# error
10882#endif
10883
10884_ACEOF
10885if ac_fn_c_try_cpp "$LINENO"; then :
10886 python_has_threads=no
10887else
10888 python_has_threads=yes
10889fi
d0ac1c44 10890rm -f conftest.err conftest.i conftest.$ac_ext
a8db4212
YPK
10891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10892$as_echo "${python_has_threads}" >&6; }
10893 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10894else
6dddc817
DE
10895 # Even if Python support is not compiled in, we need to have this file
10896 # included so that the "python" command, et.al., still exists.
8fd8d003 10897 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10898 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10899fi
9a156167 10900
a4a1c157
PA
10901# Work around Python http://bugs.python.org/issue10112. See also
10902# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10903# no effect. Note that the only test after this that uses Python is
10904# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10905# run without -export-dynamic too.
10906PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10907
10908
ed3ef339
DE
10909
10910
4df42755
DE
10911 if test "${have_libpython}" != no; then
10912 HAVE_PYTHON_TRUE=
10913 HAVE_PYTHON_FALSE='#'
10914else
10915 HAVE_PYTHON_TRUE='#'
10916 HAVE_PYTHON_FALSE=
10917fi
10918
ed3ef339
DE
10919
10920# -------------------- #
10921# Check for libguile. #
10922# -------------------- #
10923
10924
e1402065
DE
10925
10926
10927
10928
10929# Check whether --with-guile was given.
10930if test "${with_guile+set}" = set; then :
10931 withval=$with_guile;
10932else
10933 with_guile=auto
10934fi
10935
10936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10937$as_echo_n "checking whether to use guile... " >&6; }
10938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10939$as_echo "$with_guile" >&6; }
10940
ed3ef339
DE
10941# Extract the first word of "pkg-config", so it can be a program name with args.
10942set dummy pkg-config; ac_word=$2
10943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10944$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10945if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10946 $as_echo_n "(cached) " >&6
10947else
10948 case $pkg_config_prog_path in
10949 [\\/]* | ?:[\\/]*)
10950 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10951 ;;
10952 *)
10953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10954for as_dir in $PATH
10955do
10956 IFS=$as_save_IFS
10957 test -z "$as_dir" && as_dir=.
10958 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10960 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10962 break 2
10963 fi
10964done
10965 done
10966IFS=$as_save_IFS
10967
10968 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10969 ;;
10970esac
10971fi
10972pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10973if test -n "$pkg_config_prog_path"; then
10974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10975$as_echo "$pkg_config_prog_path" >&6; }
10976else
10977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10978$as_echo "no" >&6; }
10979fi
10980
10981
10982
6e66f753 10983try_guile_versions="guile-2.0"
ed3ef339
DE
10984have_libguile=no
10985case "${with_guile}" in
10986no)
10987 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10988$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10989 ;;
10990auto)
e1402065
DE
10991 if test "${pkg_config_prog_path}" = "missing"; then
10992 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10993$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10994 else
ed3ef339
DE
10995
10996 pkg_config=${pkg_config_prog_path}
10997 guile_version_list=${try_guile_versions}
10998 flag_errors=no
10999
ed3ef339
DE
11000 found_usable_guile=checking
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11002$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11003 for guile_version in ${guile_version_list}; do
11004 ${pkg_config} --exists ${guile_version} 2>/dev/null
11005 if test $? != 0; then
11006 continue
11007 fi
11008 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11009 if test $? != 0; then
d0ac1c44 11010 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11011 fi
11012 new_LIBS=`${pkg_config} --libs ${guile_version}`
11013 if test $? != 0; then
d0ac1c44 11014 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11015 fi
11016 found_usable_guile=${guile_version}
11017 break
11018 done
11019 if test "${found_usable_guile}" = "checking"; then
11020 if test "${flag_errors}" = "yes"; then
d0ac1c44 11021 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11022 else
11023 found_usable_guile=no
11024 fi
11025 fi
11026 if test "${found_usable_guile}" != no; then
11027 save_CPPFLAGS=$CPPFLAGS
11028 save_LIBS=$LIBS
11029 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11030 LIBS="$LIBS $new_LIBS"
11031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11032/* end confdefs.h. */
11033#include "libguile.h"
11034int
11035main ()
11036{
11037scm_init_guile ();
11038 ;
11039 return 0;
11040}
11041_ACEOF
11042if ac_fn_c_try_link "$LINENO"; then :
11043 have_libguile=yes
11044 GUILE_CPPFLAGS=$new_CPPFLAGS
11045 GUILE_LIBS=$new_LIBS
11046else
11047 found_usable_guile=no
11048fi
11049rm -f core conftest.err conftest.$ac_objext \
11050 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11051 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11052if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11053
11054$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11055
11056
11057fi
11058
ed3ef339
DE
11059 CPPFLAGS=$save_CPPFLAGS
11060 LIBS=$save_LIBS
11061 if test "${found_usable_guile}" = no; then
11062 if test "${flag_errors}" = yes; then
11063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11065as_fn_error $? "linking guile version ${guile_version} test program failed
11066See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11067 fi
11068 fi
11069 fi
11070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11071$as_echo "${found_usable_guile}" >&6; }
11072
e1402065 11073 fi
ed3ef339
DE
11074 ;;
11075yes)
e1402065 11076 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11077 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11078 fi
ed3ef339
DE
11079
11080 pkg_config=${pkg_config_prog_path}
11081 guile_version_list=${try_guile_versions}
11082 flag_errors=yes
11083
ed3ef339
DE
11084 found_usable_guile=checking
11085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11086$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11087 for guile_version in ${guile_version_list}; do
11088 ${pkg_config} --exists ${guile_version} 2>/dev/null
11089 if test $? != 0; then
11090 continue
11091 fi
11092 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11093 if test $? != 0; then
d0ac1c44 11094 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11095 fi
11096 new_LIBS=`${pkg_config} --libs ${guile_version}`
11097 if test $? != 0; then
d0ac1c44 11098 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11099 fi
11100 found_usable_guile=${guile_version}
11101 break
11102 done
11103 if test "${found_usable_guile}" = "checking"; then
11104 if test "${flag_errors}" = "yes"; then
d0ac1c44 11105 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11106 else
11107 found_usable_guile=no
11108 fi
11109 fi
11110 if test "${found_usable_guile}" != no; then
11111 save_CPPFLAGS=$CPPFLAGS
11112 save_LIBS=$LIBS
11113 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11114 LIBS="$LIBS $new_LIBS"
11115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11116/* end confdefs.h. */
11117#include "libguile.h"
11118int
11119main ()
11120{
11121scm_init_guile ();
11122 ;
11123 return 0;
11124}
11125_ACEOF
11126if ac_fn_c_try_link "$LINENO"; then :
11127 have_libguile=yes
11128 GUILE_CPPFLAGS=$new_CPPFLAGS
11129 GUILE_LIBS=$new_LIBS
11130else
11131 found_usable_guile=no
11132fi
11133rm -f core conftest.err conftest.$ac_objext \
11134 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11135 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11136if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11137
11138$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11139
11140
11141fi
11142
ed3ef339
DE
11143 CPPFLAGS=$save_CPPFLAGS
11144 LIBS=$save_LIBS
11145 if test "${found_usable_guile}" = no; then
11146 if test "${flag_errors}" = yes; then
11147 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11148$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11149as_fn_error $? "linking guile version ${guile_version} test program failed
11150See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11151 fi
11152 fi
11153 fi
11154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11155$as_echo "${found_usable_guile}" >&6; }
11156
11157 ;;
11158[\\/]* | ?:[\\/]*)
e1402065 11159 if test -x "${with_guile}"; then
ed3ef339
DE
11160
11161 pkg_config=${with_guile}
11162 guile_version_list=${try_guile_versions}
11163 flag_errors=yes
11164
ed3ef339
DE
11165 found_usable_guile=checking
11166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11167$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11168 for guile_version in ${guile_version_list}; do
11169 ${pkg_config} --exists ${guile_version} 2>/dev/null
11170 if test $? != 0; then
11171 continue
11172 fi
11173 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11174 if test $? != 0; then
d0ac1c44 11175 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11176 fi
11177 new_LIBS=`${pkg_config} --libs ${guile_version}`
11178 if test $? != 0; then
d0ac1c44 11179 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11180 fi
11181 found_usable_guile=${guile_version}
11182 break
11183 done
11184 if test "${found_usable_guile}" = "checking"; then
11185 if test "${flag_errors}" = "yes"; then
d0ac1c44 11186 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11187 else
11188 found_usable_guile=no
11189 fi
11190 fi
11191 if test "${found_usable_guile}" != no; then
11192 save_CPPFLAGS=$CPPFLAGS
11193 save_LIBS=$LIBS
11194 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11195 LIBS="$LIBS $new_LIBS"
11196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11197/* end confdefs.h. */
11198#include "libguile.h"
11199int
11200main ()
11201{
11202scm_init_guile ();
11203 ;
11204 return 0;
11205}
11206_ACEOF
11207if ac_fn_c_try_link "$LINENO"; then :
11208 have_libguile=yes
11209 GUILE_CPPFLAGS=$new_CPPFLAGS
11210 GUILE_LIBS=$new_LIBS
11211else
11212 found_usable_guile=no
11213fi
11214rm -f core conftest.err conftest.$ac_objext \
11215 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11216 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11217if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11218
11219$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11220
11221
11222fi
11223
ed3ef339
DE
11224 CPPFLAGS=$save_CPPFLAGS
11225 LIBS=$save_LIBS
11226 if test "${found_usable_guile}" = no; then
11227 if test "${flag_errors}" = yes; then
11228 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11230as_fn_error $? "linking guile version ${guile_version} test program failed
11231See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11232 fi
11233 fi
11234 fi
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11236$as_echo "${found_usable_guile}" >&6; }
11237
e1402065 11238 else
d0ac1c44 11239 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11240 fi
ed3ef339
DE
11241 ;;
11242"" | */*)
11243 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11244 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11245 ;;
11246*)
11247 # A space separate list of guile versions to try, in order.
e1402065 11248 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11249 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11250 fi
ed3ef339
DE
11251
11252 pkg_config=${pkg_config_prog_path}
11253 guile_version_list=${with_guile}
11254 flag_errors=yes
11255
ed3ef339
DE
11256 found_usable_guile=checking
11257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11258$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11259 for guile_version in ${guile_version_list}; do
11260 ${pkg_config} --exists ${guile_version} 2>/dev/null
11261 if test $? != 0; then
11262 continue
11263 fi
11264 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11265 if test $? != 0; then
d0ac1c44 11266 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11267 fi
11268 new_LIBS=`${pkg_config} --libs ${guile_version}`
11269 if test $? != 0; then
d0ac1c44 11270 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11271 fi
11272 found_usable_guile=${guile_version}
11273 break
11274 done
11275 if test "${found_usable_guile}" = "checking"; then
11276 if test "${flag_errors}" = "yes"; then
d0ac1c44 11277 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11278 else
11279 found_usable_guile=no
11280 fi
11281 fi
11282 if test "${found_usable_guile}" != no; then
11283 save_CPPFLAGS=$CPPFLAGS
11284 save_LIBS=$LIBS
11285 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11286 LIBS="$LIBS $new_LIBS"
11287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11288/* end confdefs.h. */
11289#include "libguile.h"
11290int
11291main ()
11292{
11293scm_init_guile ();
11294 ;
11295 return 0;
11296}
11297_ACEOF
11298if ac_fn_c_try_link "$LINENO"; then :
11299 have_libguile=yes
11300 GUILE_CPPFLAGS=$new_CPPFLAGS
11301 GUILE_LIBS=$new_LIBS
11302else
11303 found_usable_guile=no
11304fi
11305rm -f core conftest.err conftest.$ac_objext \
11306 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11307 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11308if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11309
11310$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11311
11312
11313fi
11314
ed3ef339
DE
11315 CPPFLAGS=$save_CPPFLAGS
11316 LIBS=$save_LIBS
11317 if test "${found_usable_guile}" = no; then
11318 if test "${flag_errors}" = yes; then
11319 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11320$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11321as_fn_error $? "linking guile version ${guile_version} test program failed
11322See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11323 fi
11324 fi
11325 fi
11326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11327$as_echo "${found_usable_guile}" >&6; }
11328
11329 ;;
11330esac
11331
e76c5d17 11332if test "${have_libguile}" != no; then
d342a0da
DE
11333 case "${with_guile}" in
11334 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11335
11336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11337$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11338if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11339 $as_echo_n "(cached) " >&6
11340else
d342a0da 11341 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11342
11343 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11344 # the 'guild' and 'bindir' variables. In that case, try to guess
11345 # what the program name is, at the risk of getting it wrong if
11346 # Guile was configured with '--program-suffix' or similar.
11347 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11348 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11349 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11350 fi
11351
11352fi
11353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11354$as_echo "$ac_cv_guild_program_name" >&6; }
11355
11356 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11357 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11358 fi
11359
11360 GUILD="$ac_cv_guild_program_name"
11361
11362
d342a0da
DE
11363 ;;
11364 *)
11365
11366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11367$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11368if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11369 $as_echo_n "(cached) " >&6
11370else
11371 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11372
11373 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11374 # the 'guild' and 'bindir' variables. In that case, try to guess
11375 # what the program name is, at the risk of getting it wrong if
11376 # Guile was configured with '--program-suffix' or similar.
11377 if test "x$ac_cv_guild_program_name" = "x"; then
11378 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11379 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11380 fi
11381
11382fi
11383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11384$as_echo "$ac_cv_guild_program_name" >&6; }
11385
11386 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11387 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11388 fi
11389
11390 GUILD="$ac_cv_guild_program_name"
11391
11392
11393 ;;
11394 esac
e76c5d17
DE
11395
11396
11397 if test "$cross_compiling" = no; then
11398 GUILD_TARGET_FLAG=
11399 else
11400 GUILD_TARGET_FLAG="--target=$host"
11401 fi
11402
11403
11404
11405
11406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11407$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11408if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11409 $as_echo_n "(cached) " >&6
11410else
11411 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11412 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11413 ac_cv_guild_ok=yes
11414 else
11415 ac_cv_guild_ok=no
11416 fi
11417fi
11418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11419$as_echo "$ac_cv_guild_ok" >&6; }
11420
11421 if test "$ac_cv_guild_ok" = no; then
11422 have_libguile=no
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11424$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11425 fi
11426fi
11427
ed3ef339
DE
11428if test "${have_libguile}" != no; then
11429
11430$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11431
11432 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11433 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11434 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11435 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11436 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11437
11438 save_LIBS="$LIBS"
11439 save_CPPFLAGS="$CPPFLAGS"
11440 LIBS="$GUILE_LIBS"
11441 CPPFLAGS="$GUILE_CPPFLAGS"
11442 for ac_func in scm_new_smob
11443do :
11444 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11445if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11446 cat >>confdefs.h <<_ACEOF
11447#define HAVE_SCM_NEW_SMOB 1
11448_ACEOF
11449
11450fi
11451done
11452
11453 LIBS="$save_LIBS"
11454 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11455else
11456 # Even if Guile support is not compiled in, we need to have these files
11457 # included.
bd810fff 11458 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11459 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11460fi
9a156167 11461
ac534cba 11462
4df42755
DE
11463 if test "${have_libguile}" != no; then
11464 HAVE_GUILE_TRUE=
11465 HAVE_GUILE_FALSE='#'
11466else
11467 HAVE_GUILE_TRUE='#'
11468 HAVE_GUILE_FALSE=
11469fi
11470
ac534cba 11471
d344e670
DE
11472# --------------------- #
11473# Check for libmcheck. #
11474# --------------------- #
11475
a8db4212
YPK
11476# Enable -lmcheck by default (it provides cheap-enough memory mangling),
11477# but turn it off if Python is enabled with threads, since -lmcheck is
11478# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11479# and for releases.
17ef446e
PA
11480if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11481 && $development; then
11482 libmcheck_default=yes
11483else
11484 libmcheck_default=no
a8db4212
YPK
11485fi
11486
17ef446e
PA
11487 # Check whether --enable-libmcheck was given.
11488if test "${enable_libmcheck+set}" = set; then :
11489 enableval=$enable_libmcheck; case "${enableval}" in
11490 yes | y) ENABLE_LIBMCHECK="yes" ;;
11491 no | n) ENABLE_LIBMCHECK="no" ;;
d0ac1c44 11492 *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
17ef446e
PA
11493 esac
11494fi
11495
11496
11497 if test -z "${ENABLE_LIBMCHECK}"; then
11498 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 11499 fi
17ef446e
PA
11500
11501 if test "$ENABLE_LIBMCHECK" = "yes" ; then
11502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212 11503$as_echo_n "checking for main in -lmcheck... " >&6; }
d0ac1c44 11504if ${ac_cv_lib_mcheck_main+:} false; then :
a8db4212
YPK
11505 $as_echo_n "(cached) " >&6
11506else
11507 ac_check_lib_save_LIBS=$LIBS
11508LIBS="-lmcheck $LIBS"
11509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11510/* end confdefs.h. */
11511
11512
11513int
11514main ()
11515{
11516return main ();
11517 ;
11518 return 0;
11519}
11520_ACEOF
11521if ac_fn_c_try_link "$LINENO"; then :
11522 ac_cv_lib_mcheck_main=yes
11523else
11524 ac_cv_lib_mcheck_main=no
11525fi
11526rm -f core conftest.err conftest.$ac_objext \
11527 conftest$ac_exeext conftest.$ac_ext
11528LIBS=$ac_check_lib_save_LIBS
11529fi
11530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11531$as_echo "$ac_cv_lib_mcheck_main" >&6; }
d0ac1c44 11532if test "x$ac_cv_lib_mcheck_main" = xyes; then :
a8db4212
YPK
11533 cat >>confdefs.h <<_ACEOF
11534#define HAVE_LIBMCHECK 1
11535_ACEOF
11536
11537 LIBS="-lmcheck $LIBS"
11538
11539fi
11540
17ef446e
PA
11541 fi
11542
11543
11544if test "$ENABLE_LIBMCHECK" = "yes" \
11545 -a "${have_libpython}" != "no" \
11546 -a "${python_has_threads}" = "yes" ; then
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11548$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
11549fi
11550
58bfce93
MM
11551
11552# Check whether --with-intel_pt was given.
11553if test "${with_intel_pt+set}" = set; then :
11554 withval=$with_intel_pt;
11555else
11556 with_intel_pt=auto
11557fi
11558
11559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11560$as_echo_n "checking whether to use intel pt... " >&6; }
11561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11562$as_echo "$with_intel_pt" >&6; }
11563
11564if test "${with_intel_pt}" = no; then
bc504a31
PA
11565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11566$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11567 HAVE_LIBIPT=no
11568else
5599c404
MM
11569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11570/* end confdefs.h. */
11571
11572#include <linux/perf_event.h>
11573#ifndef PERF_ATTR_SIZE_VER5
11574# error
11575#endif
11576
11577_ACEOF
11578if ac_fn_c_try_cpp "$LINENO"; then :
11579 perf_event=yes
11580else
11581 perf_event=no
11582fi
d0ac1c44 11583rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11584 if test "$perf_event" != yes; then
11585 if test "$with_intel_pt" = yes; then
d0ac1c44 11586 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11587 else
11588 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11589$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11590 fi
11591 fi
11592
58bfce93
MM
11593
11594
11595
11596
11597
11598
11599
11600
11601 use_additional=yes
11602
11603 acl_save_prefix="$prefix"
11604 prefix="$acl_final_prefix"
11605 acl_save_exec_prefix="$exec_prefix"
11606 exec_prefix="$acl_final_exec_prefix"
11607
11608 eval additional_includedir=\"$includedir\"
11609 eval additional_libdir=\"$libdir\"
11610
11611 exec_prefix="$acl_save_exec_prefix"
11612 prefix="$acl_save_prefix"
11613
11614
11615# Check whether --with-libipt-prefix was given.
11616if test "${with_libipt_prefix+set}" = set; then :
11617 withval=$with_libipt_prefix;
11618 if test "X$withval" = "Xno"; then
11619 use_additional=no
11620 else
11621 if test "X$withval" = "X"; then
11622
11623 acl_save_prefix="$prefix"
11624 prefix="$acl_final_prefix"
11625 acl_save_exec_prefix="$exec_prefix"
11626 exec_prefix="$acl_final_exec_prefix"
11627
11628 eval additional_includedir=\"$includedir\"
11629 eval additional_libdir=\"$libdir\"
11630
11631 exec_prefix="$acl_save_exec_prefix"
11632 prefix="$acl_save_prefix"
11633
11634 else
11635 additional_includedir="$withval/include"
11636 additional_libdir="$withval/lib"
11637 fi
11638 fi
11639
11640fi
11641
11642 LIBIPT=
11643 LTLIBIPT=
11644 INCIPT=
11645 rpathdirs=
11646 ltrpathdirs=
11647 names_already_handled=
11648 names_next_round='ipt '
11649 while test -n "$names_next_round"; do
11650 names_this_round="$names_next_round"
11651 names_next_round=
11652 for name in $names_this_round; do
11653 already_handled=
11654 for n in $names_already_handled; do
11655 if test "$n" = "$name"; then
11656 already_handled=yes
11657 break
11658 fi
11659 done
11660 if test -z "$already_handled"; then
11661 names_already_handled="$names_already_handled $name"
11662 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11663 eval value=\"\$HAVE_LIB$uppername\"
11664 if test -n "$value"; then
11665 if test "$value" = yes; then
11666 eval value=\"\$LIB$uppername\"
11667 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11668 eval value=\"\$LTLIB$uppername\"
11669 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11670 else
11671 :
11672 fi
11673 else
11674 found_dir=
11675 found_la=
11676 found_so=
11677 found_a=
11678 if test $use_additional = yes; then
11679 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11680 found_dir="$additional_libdir"
11681 found_so="$additional_libdir/lib$name.$shlibext"
11682 if test -f "$additional_libdir/lib$name.la"; then
11683 found_la="$additional_libdir/lib$name.la"
11684 fi
11685 else
11686 if test -f "$additional_libdir/lib$name.$libext"; then
11687 found_dir="$additional_libdir"
11688 found_a="$additional_libdir/lib$name.$libext"
11689 if test -f "$additional_libdir/lib$name.la"; then
11690 found_la="$additional_libdir/lib$name.la"
11691 fi
11692 fi
11693 fi
11694 fi
11695 if test "X$found_dir" = "X"; then
11696 for x in $LDFLAGS $LTLIBIPT; do
11697
11698 acl_save_prefix="$prefix"
11699 prefix="$acl_final_prefix"
11700 acl_save_exec_prefix="$exec_prefix"
11701 exec_prefix="$acl_final_exec_prefix"
11702 eval x=\"$x\"
11703 exec_prefix="$acl_save_exec_prefix"
11704 prefix="$acl_save_prefix"
11705
11706 case "$x" in
11707 -L*)
11708 dir=`echo "X$x" | sed -e 's/^X-L//'`
11709 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11710 found_dir="$dir"
11711 found_so="$dir/lib$name.$shlibext"
11712 if test -f "$dir/lib$name.la"; then
11713 found_la="$dir/lib$name.la"
11714 fi
11715 else
11716 if test -f "$dir/lib$name.$libext"; then
11717 found_dir="$dir"
11718 found_a="$dir/lib$name.$libext"
11719 if test -f "$dir/lib$name.la"; then
11720 found_la="$dir/lib$name.la"
11721 fi
11722 fi
11723 fi
11724 ;;
11725 esac
11726 if test "X$found_dir" != "X"; then
11727 break
11728 fi
11729 done
11730 fi
11731 if test "X$found_dir" != "X"; then
11732 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11733 if test "X$found_so" != "X"; then
11734 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11735 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11736 else
11737 haveit=
11738 for x in $ltrpathdirs; do
11739 if test "X$x" = "X$found_dir"; then
11740 haveit=yes
11741 break
11742 fi
11743 done
11744 if test -z "$haveit"; then
11745 ltrpathdirs="$ltrpathdirs $found_dir"
11746 fi
11747 if test "$hardcode_direct" = yes; then
11748 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11749 else
11750 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11751 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11752 haveit=
11753 for x in $rpathdirs; do
11754 if test "X$x" = "X$found_dir"; then
11755 haveit=yes
11756 break
11757 fi
11758 done
11759 if test -z "$haveit"; then
11760 rpathdirs="$rpathdirs $found_dir"
11761 fi
11762 else
11763 haveit=
11764 for x in $LDFLAGS $LIBIPT; do
11765
11766 acl_save_prefix="$prefix"
11767 prefix="$acl_final_prefix"
11768 acl_save_exec_prefix="$exec_prefix"
11769 exec_prefix="$acl_final_exec_prefix"
11770 eval x=\"$x\"
11771 exec_prefix="$acl_save_exec_prefix"
11772 prefix="$acl_save_prefix"
11773
11774 if test "X$x" = "X-L$found_dir"; then
11775 haveit=yes
11776 break
11777 fi
11778 done
11779 if test -z "$haveit"; then
11780 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11781 fi
11782 if test "$hardcode_minus_L" != no; then
11783 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11784 else
11785 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11786 fi
11787 fi
11788 fi
11789 fi
11790 else
11791 if test "X$found_a" != "X"; then
11792 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11793 else
11794 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11795 fi
11796 fi
11797 additional_includedir=
11798 case "$found_dir" in
11799 */lib | */lib/)
11800 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11801 additional_includedir="$basedir/include"
11802 ;;
11803 esac
11804 if test "X$additional_includedir" != "X"; then
11805 if test "X$additional_includedir" != "X/usr/include"; then
11806 haveit=
11807 if test "X$additional_includedir" = "X/usr/local/include"; then
11808 if test -n "$GCC"; then
11809 case $host_os in
11810 linux*) haveit=yes;;
11811 esac
11812 fi
11813 fi
11814 if test -z "$haveit"; then
11815 for x in $CPPFLAGS $INCIPT; do
11816
11817 acl_save_prefix="$prefix"
11818 prefix="$acl_final_prefix"
11819 acl_save_exec_prefix="$exec_prefix"
11820 exec_prefix="$acl_final_exec_prefix"
11821 eval x=\"$x\"
11822 exec_prefix="$acl_save_exec_prefix"
11823 prefix="$acl_save_prefix"
11824
11825 if test "X$x" = "X-I$additional_includedir"; then
11826 haveit=yes
11827 break
11828 fi
11829 done
11830 if test -z "$haveit"; then
11831 if test -d "$additional_includedir"; then
11832 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11833 fi
11834 fi
11835 fi
11836 fi
11837 fi
11838 if test -n "$found_la"; then
11839 save_libdir="$libdir"
11840 case "$found_la" in
11841 */* | *\\*) . "$found_la" ;;
11842 *) . "./$found_la" ;;
11843 esac
11844 libdir="$save_libdir"
11845 for dep in $dependency_libs; do
11846 case "$dep" in
11847 -L*)
11848 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11849 if test "X$additional_libdir" != "X/usr/lib"; then
11850 haveit=
11851 if test "X$additional_libdir" = "X/usr/local/lib"; then
11852 if test -n "$GCC"; then
11853 case $host_os in
11854 linux*) haveit=yes;;
11855 esac
11856 fi
11857 fi
11858 if test -z "$haveit"; then
11859 haveit=
11860 for x in $LDFLAGS $LIBIPT; do
11861
11862 acl_save_prefix="$prefix"
11863 prefix="$acl_final_prefix"
11864 acl_save_exec_prefix="$exec_prefix"
11865 exec_prefix="$acl_final_exec_prefix"
11866 eval x=\"$x\"
11867 exec_prefix="$acl_save_exec_prefix"
11868 prefix="$acl_save_prefix"
11869
11870 if test "X$x" = "X-L$additional_libdir"; then
11871 haveit=yes
11872 break
11873 fi
11874 done
11875 if test -z "$haveit"; then
11876 if test -d "$additional_libdir"; then
11877 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11878 fi
11879 fi
11880 haveit=
11881 for x in $LDFLAGS $LTLIBIPT; do
11882
11883 acl_save_prefix="$prefix"
11884 prefix="$acl_final_prefix"
11885 acl_save_exec_prefix="$exec_prefix"
11886 exec_prefix="$acl_final_exec_prefix"
11887 eval x=\"$x\"
11888 exec_prefix="$acl_save_exec_prefix"
11889 prefix="$acl_save_prefix"
11890
11891 if test "X$x" = "X-L$additional_libdir"; then
11892 haveit=yes
11893 break
11894 fi
11895 done
11896 if test -z "$haveit"; then
11897 if test -d "$additional_libdir"; then
11898 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11899 fi
11900 fi
11901 fi
11902 fi
11903 ;;
11904 -R*)
11905 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11906 if test "$enable_rpath" != no; then
11907 haveit=
11908 for x in $rpathdirs; do
11909 if test "X$x" = "X$dir"; then
11910 haveit=yes
11911 break
11912 fi
11913 done
11914 if test -z "$haveit"; then
11915 rpathdirs="$rpathdirs $dir"
11916 fi
11917 haveit=
11918 for x in $ltrpathdirs; do
11919 if test "X$x" = "X$dir"; then
11920 haveit=yes
11921 break
11922 fi
11923 done
11924 if test -z "$haveit"; then
11925 ltrpathdirs="$ltrpathdirs $dir"
11926 fi
11927 fi
11928 ;;
11929 -l*)
11930 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11931 ;;
11932 *.la)
11933 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11934 ;;
11935 *)
11936 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11937 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11938 ;;
11939 esac
11940 done
11941 fi
11942 else
11943 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11944 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11945 fi
11946 fi
11947 fi
11948 done
11949 done
11950 if test "X$rpathdirs" != "X"; then
11951 if test -n "$hardcode_libdir_separator"; then
11952 alldirs=
11953 for found_dir in $rpathdirs; do
11954 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11955 done
11956 acl_save_libdir="$libdir"
11957 libdir="$alldirs"
11958 eval flag=\"$hardcode_libdir_flag_spec\"
11959 libdir="$acl_save_libdir"
11960 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11961 else
11962 for found_dir in $rpathdirs; do
11963 acl_save_libdir="$libdir"
11964 libdir="$found_dir"
11965 eval flag=\"$hardcode_libdir_flag_spec\"
11966 libdir="$acl_save_libdir"
11967 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11968 done
11969 fi
11970 fi
11971 if test "X$ltrpathdirs" != "X"; then
11972 for found_dir in $ltrpathdirs; do
11973 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11974 done
11975 fi
11976
11977
11978 ac_save_CPPFLAGS="$CPPFLAGS"
11979
11980 for element in $INCIPT; do
11981 haveit=
11982 for x in $CPPFLAGS; do
11983
11984 acl_save_prefix="$prefix"
11985 prefix="$acl_final_prefix"
11986 acl_save_exec_prefix="$exec_prefix"
11987 exec_prefix="$acl_final_exec_prefix"
11988 eval x=\"$x\"
11989 exec_prefix="$acl_save_exec_prefix"
11990 prefix="$acl_save_prefix"
11991
11992 if test "X$x" = "X$element"; then
11993 haveit=yes
11994 break
11995 fi
11996 done
11997 if test -z "$haveit"; then
11998 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11999 fi
12000 done
12001
12002
12003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
12004$as_echo_n "checking for libipt... " >&6; }
d0ac1c44 12005if ${ac_cv_libipt+:} false; then :
58bfce93
MM
12006 $as_echo_n "(cached) " >&6
12007else
12008
12009 ac_save_LIBS="$LIBS"
12010 LIBS="$LIBS $LIBIPT"
12011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12012/* end confdefs.h. */
12013#include "intel-pt.h"
12014int
12015main ()
12016{
12017pt_insn_alloc_decoder (0);
12018 ;
12019 return 0;
12020}
12021_ACEOF
12022if ac_fn_c_try_link "$LINENO"; then :
12023 ac_cv_libipt=yes
12024else
12025 ac_cv_libipt=no
12026fi
12027rm -f core conftest.err conftest.$ac_objext \
12028 conftest$ac_exeext conftest.$ac_ext
12029 LIBS="$ac_save_LIBS"
12030
12031fi
12032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
12033$as_echo "$ac_cv_libipt" >&6; }
12034 if test "$ac_cv_libipt" = yes; then
12035 HAVE_LIBIPT=yes
12036
12037$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
12038
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
12040$as_echo_n "checking how to link with libipt... " >&6; }
12041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
12042$as_echo "$LIBIPT" >&6; }
12043 else
12044 HAVE_LIBIPT=no
12045 CPPFLAGS="$ac_save_CPPFLAGS"
12046 LIBIPT=
12047 LTLIBIPT=
12048 fi
12049
12050
12051
12052
12053
12054
12055 if test "$HAVE_LIBIPT" != yes; then
12056 if test "$with_intel_pt" = yes; then
d0ac1c44 12057 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
12058 else
12059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
12060$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
12061 fi
c56ccc05
MM
12062 else
12063 save_LIBS=$LIBS
12064 LIBS="$LIBS $LIBIPT"
12065 for ac_func in pt_insn_event
12066do :
12067 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
d0ac1c44 12068if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
12069 cat >>confdefs.h <<_ACEOF
12070#define HAVE_PT_INSN_EVENT 1
12071_ACEOF
12072
12073fi
12074done
12075
12076 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
12077"
d0ac1c44 12078if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
12079
12080cat >>confdefs.h <<_ACEOF
12081#define HAVE_STRUCT_PT_INSN_ENABLED 1
12082_ACEOF
12083
12084
12085fi
12086ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
12087"
d0ac1c44 12088if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
12089
12090cat >>confdefs.h <<_ACEOF
12091#define HAVE_STRUCT_PT_INSN_RESYNCED 1
12092_ACEOF
12093
12094
12095fi
12096
12097 LIBS=$save_LIBS
58bfce93
MM
12098 fi
12099fi
12100
81ecdfbb
RW
12101# ------------------------- #
12102# Checks for header files. #
12103# ------------------------- #
c890192f 12104
81ecdfbb
RW
12105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12106$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 12107if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12108 $as_echo_n "(cached) " >&6
bec39cab 12109else
81ecdfbb 12110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12111/* end confdefs.h. */
81ecdfbb
RW
12112#include <stdlib.h>
12113#include <stdarg.h>
12114#include <string.h>
12115#include <float.h>
12116
a9322a30
TT
12117int
12118main ()
12119{
a9322a30
TT
12120
12121 ;
12122 return 0;
12123}
bec39cab 12124_ACEOF
81ecdfbb
RW
12125if ac_fn_c_try_compile "$LINENO"; then :
12126 ac_cv_header_stdc=yes
bec39cab 12127else
81ecdfbb 12128 ac_cv_header_stdc=no
a9322a30 12129fi
81ecdfbb 12130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12131
81ecdfbb
RW
12132if test $ac_cv_header_stdc = yes; then
12133 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12135/* end confdefs.h. */
12136#include <string.h>
bec39cab 12137
81ecdfbb
RW
12138_ACEOF
12139if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12140 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12141
bec39cab 12142else
81ecdfbb
RW
12143 ac_cv_header_stdc=no
12144fi
12145rm -f conftest*
12146
12147fi
12148
12149if test $ac_cv_header_stdc = yes; then
12150 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12152/* end confdefs.h. */
12153#include <stdlib.h>
12154
bec39cab 12155_ACEOF
81ecdfbb
RW
12156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12157 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 12158
81ecdfbb
RW
12159else
12160 ac_cv_header_stdc=no
12161fi
12162rm -f conftest*
bec39cab 12163
bec39cab 12164fi
81ecdfbb
RW
12165
12166if test $ac_cv_header_stdc = yes; then
12167 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12168 if test "$cross_compiling" = yes; then :
12169 :
bec39cab 12170else
81ecdfbb 12171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12172/* end confdefs.h. */
81ecdfbb
RW
12173#include <ctype.h>
12174#include <stdlib.h>
12175#if ((' ' & 0x0FF) == 0x020)
12176# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12177# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12178#else
12179# define ISLOWER(c) \
12180 (('a' <= (c) && (c) <= 'i') \
12181 || ('j' <= (c) && (c) <= 'r') \
12182 || ('s' <= (c) && (c) <= 'z'))
12183# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12184#endif
12185
12186#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12187int
12188main ()
12189{
81ecdfbb
RW
12190 int i;
12191 for (i = 0; i < 256; i++)
12192 if (XOR (islower (i), ISLOWER (i))
12193 || toupper (i) != TOUPPER (i))
12194 return 2;
a9322a30
TT
12195 return 0;
12196}
bec39cab 12197_ACEOF
81ecdfbb
RW
12198if ac_fn_c_try_run "$LINENO"; then :
12199
bec39cab 12200else
81ecdfbb
RW
12201 ac_cv_header_stdc=no
12202fi
12203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12204 conftest.$ac_objext conftest.beam conftest.$ac_ext
12205fi
bec39cab 12206
bec39cab 12207fi
a9322a30 12208fi
81ecdfbb
RW
12209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12210$as_echo "$ac_cv_header_stdc" >&6; }
12211if test $ac_cv_header_stdc = yes; then
bec39cab 12212
81ecdfbb 12213$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12214
81ecdfbb 12215fi
bec39cab 12216
81ecdfbb 12217# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12218for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
43b7e92b 12219 thread_db.h linux/elf.h \
81ecdfbb
RW
12220 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12221 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 12222 sys/reg.h sys/debugreg.h sys/select.h \
726e1356 12223 termios.h elf_hp.h \
9467110b 12224 dlfcn.h
81ecdfbb
RW
12225do :
12226 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12227ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12228if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12229 cat >>confdefs.h <<_ACEOF
81ecdfbb 12230#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12231_ACEOF
c906108c 12232
bec39cab 12233fi
81ecdfbb
RW
12234
12235done
12236
81ecdfbb
RW
12237for ac_header in sys/user.h
12238do :
12239 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12240# include <sys/param.h>
a9322a30
TT
12241#endif
12242
81ecdfbb 12243"
d0ac1c44 12244if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
12245 cat >>confdefs.h <<_ACEOF
12246#define HAVE_SYS_USER_H 1
bec39cab 12247_ACEOF
bec39cab 12248
a9322a30 12249fi
bec39cab 12250
81ecdfbb 12251done
5ee754fc 12252
5ee754fc 12253
5007d765 12254for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12255do :
12256 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12257ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12258if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12259 cat >>confdefs.h <<_ACEOF
81ecdfbb 12260#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12261_ACEOF
5ee754fc
MK
12262
12263fi
12264
81ecdfbb 12265done
bec39cab 12266
81ecdfbb
RW
12267for ac_header in term.h
12268do :
12269 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12270# include <curses.h>
12271#endif
bec39cab 12272
81ecdfbb 12273"
d0ac1c44 12274if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12275 cat >>confdefs.h <<_ACEOF
12276#define HAVE_TERM_H 1
a8111142 12277_ACEOF
a8111142 12278
a8111142 12279fi
a8111142 12280
81ecdfbb 12281done
a8111142
TT
12282
12283
81ecdfbb
RW
12284# ------------------------- #
12285# Checks for declarations. #
12286# ------------------------- #
a9322a30 12287
07697489
PA
12288
12289 # Check for presence and size of long long.
12290 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 12291if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12292
12293cat >>confdefs.h <<_ACEOF
12294#define HAVE_LONG_LONG 1
12295_ACEOF
12296
12297# The cast to long int works around a bug in the HP C Compiler
12298# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12299# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12300# This bug is HP SR number 8606223364.
12301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12302$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 12303if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12304 $as_echo_n "(cached) " >&6
12305else
12306 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12307
12308else
12309 if test "$ac_cv_type_long_long" = yes; then
12310 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12311$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
12312as_fn_error 77 "cannot compute sizeof (long long)
12313See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12314 else
12315 ac_cv_sizeof_long_long=0
12316 fi
12317fi
12318
12319fi
12320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12321$as_echo "$ac_cv_sizeof_long_long" >&6; }
12322
12323
12324
12325cat >>confdefs.h <<_ACEOF
12326#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12327_ACEOF
12328
12329
12330fi
12331
12332
d0ac1c44
SM
12333 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12334ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12335if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12336 ac_have_decl=1
12337else
12338 ac_have_decl=0
12339fi
12340
12341cat >>confdefs.h <<_ACEOF
12342#define HAVE_DECL_BASENAME $ac_have_decl
12343_ACEOF
12344ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 12345if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12346 ac_have_decl=1
12347else
12348 ac_have_decl=0
12349fi
12350
12351cat >>confdefs.h <<_ACEOF
12352#define HAVE_DECL_FFS $ac_have_decl
12353_ACEOF
12354ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 12355if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12356 ac_have_decl=1
12357else
12358 ac_have_decl=0
12359fi
12360
12361cat >>confdefs.h <<_ACEOF
12362#define HAVE_DECL_ASPRINTF $ac_have_decl
12363_ACEOF
12364ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 12365if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12366 ac_have_decl=1
12367else
12368 ac_have_decl=0
12369fi
12370
12371cat >>confdefs.h <<_ACEOF
12372#define HAVE_DECL_VASPRINTF $ac_have_decl
12373_ACEOF
12374ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12375if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12376 ac_have_decl=1
12377else
12378 ac_have_decl=0
12379fi
12380
12381cat >>confdefs.h <<_ACEOF
12382#define HAVE_DECL_SNPRINTF $ac_have_decl
12383_ACEOF
12384ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 12385if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12386 ac_have_decl=1
12387else
12388 ac_have_decl=0
12389fi
12390
12391cat >>confdefs.h <<_ACEOF
12392#define HAVE_DECL_VSNPRINTF $ac_have_decl
12393_ACEOF
12394
12395 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 12396if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
12397 ac_have_decl=1
12398else
12399 ac_have_decl=0
12400fi
12401
12402cat >>confdefs.h <<_ACEOF
12403#define HAVE_DECL_STRTOL $ac_have_decl
12404_ACEOF
12405ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 12406if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
12407 ac_have_decl=1
12408else
12409 ac_have_decl=0
12410fi
12411
12412cat >>confdefs.h <<_ACEOF
12413#define HAVE_DECL_STRTOUL $ac_have_decl
12414_ACEOF
12415ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 12416if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
12417 ac_have_decl=1
12418else
12419 ac_have_decl=0
12420fi
12421
12422cat >>confdefs.h <<_ACEOF
12423#define HAVE_DECL_STRTOLL $ac_have_decl
12424_ACEOF
12425ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 12426if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12427 ac_have_decl=1
12428else
12429 ac_have_decl=0
12430fi
12431
12432cat >>confdefs.h <<_ACEOF
12433#define HAVE_DECL_STRTOULL $ac_have_decl
12434_ACEOF
12435
12436 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 12437if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
12438 ac_have_decl=1
12439else
12440 ac_have_decl=0
12441fi
12442
12443cat >>confdefs.h <<_ACEOF
12444#define HAVE_DECL_STRVERSCMP $ac_have_decl
12445_ACEOF
12446
12447
12448
81ecdfbb 12449ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12450if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12451 ac_have_decl=1
12452else
12453 ac_have_decl=0
5ee754fc 12454fi
81ecdfbb
RW
12455
12456cat >>confdefs.h <<_ACEOF
12457#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12458_ACEOF
5ee754fc 12459
5ee754fc 12460
81ecdfbb
RW
12461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12462$as_echo_n "checking for LC_MESSAGES... " >&6; }
d0ac1c44 12463if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12464 $as_echo_n "(cached) " >&6
bec39cab 12465else
81ecdfbb 12466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12467/* end confdefs.h. */
81ecdfbb 12468#include <locale.h>
a9322a30
TT
12469int
12470main ()
12471{
81ecdfbb 12472return LC_MESSAGES
a9322a30
TT
12473 ;
12474 return 0;
12475}
bec39cab 12476_ACEOF
81ecdfbb
RW
12477if ac_fn_c_try_link "$LINENO"; then :
12478 am_cv_val_LC_MESSAGES=yes
bec39cab 12479else
81ecdfbb
RW
12480 am_cv_val_LC_MESSAGES=no
12481fi
12482rm -f core conftest.err conftest.$ac_objext \
12483 conftest$ac_exeext conftest.$ac_ext
12484fi
12485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12486$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12487 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12488
81ecdfbb
RW
12489$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12490
12491 fi
12492
12493
12494# ----------------------- #
12495# Checks for structures. #
12496# ----------------------- #
12497
12498ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 12499if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12500
12501cat >>confdefs.h <<_ACEOF
12502#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12503_ACEOF
7eb368b3 12504
81ecdfbb 12505
7eb368b3 12506fi
81ecdfbb 12507ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 12508if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12509
a9322a30
TT
12510cat >>confdefs.h <<_ACEOF
12511#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12512_ACEOF
12513
a9322a30 12514
7eb368b3
NR
12515fi
12516
7eb368b3 12517
a9322a30
TT
12518# ------------------ #
12519# Checks for types. #
12520# ------------------ #
7eb368b3 12521
81ecdfbb 12522ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12523#include <sys/socket.h>
12524
81ecdfbb 12525"
d0ac1c44 12526if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12527
a9322a30
TT
12528cat >>confdefs.h <<_ACEOF
12529#define HAVE_SOCKLEN_T 1
12530_ACEOF
12531
12532
12533fi
12534
12535
12536# ------------------------------------- #
12537# Checks for compiler characteristics. #
12538# ------------------------------------- #
12539
81ecdfbb
RW
12540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12541$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
d0ac1c44 12542if ${ac_cv_c_const+:} false; then :
81ecdfbb 12543 $as_echo_n "(cached) " >&6
a9322a30 12544else
81ecdfbb 12545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12546/* end confdefs.h. */
a9322a30
TT
12547
12548int
12549main ()
12550{
d0ac1c44 12551
a9322a30 12552#ifndef __cplusplus
d0ac1c44 12553 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12554 typedef int charset[2];
d0ac1c44 12555 const charset cs = { 0, 0 };
a9322a30 12556 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12557 char const *const *pcpcc;
12558 char **ppc;
a9322a30
TT
12559 /* NEC SVR4.0.2 mips cc rejects this. */
12560 struct point {int x, y;};
12561 static struct point const zero = {0,0};
12562 /* AIX XL C 1.02.0.0 rejects this.
12563 It does not let you subtract one const X* pointer from another in
12564 an arm of an if-expression whose if-part is not a constant
12565 expression */
12566 const char *g = "string";
81ecdfbb 12567 pcpcc = &g + (g ? g-g : 0);
a9322a30 12568 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12569 ++pcpcc;
12570 ppc = (char**) pcpcc;
12571 pcpcc = (char const *const *) ppc;
d0ac1c44
SM
12572 { /* SCO 3.2v4 cc rejects this sort of thing. */
12573 char tx;
12574 char *t = &tx;
a9322a30
TT
12575 char const *s = 0 ? (char *) 0 : (char const *) 0;
12576
12577 *t++ = 0;
81ecdfbb 12578 if (s) return 0;
a9322a30
TT
12579 }
12580 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12581 int x[] = {25, 17};
12582 const int *foo = &x[0];
12583 ++foo;
12584 }
12585 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12586 typedef const int *iptr;
12587 iptr p = 0;
12588 ++p;
12589 }
d0ac1c44 12590 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12591 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
d0ac1c44
SM
12592 struct s { int j; const int *ap[3]; } bx;
12593 struct s *b = &bx; b->j = 5;
a9322a30
TT
12594 }
12595 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12596 const int foo = 10;
81ecdfbb 12597 if (!foo) return 0;
a9322a30 12598 }
81ecdfbb 12599 return !cs[0] && !zero.x;
a9322a30
TT
12600#endif
12601
12602 ;
12603 return 0;
12604}
bec39cab 12605_ACEOF
81ecdfbb 12606if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12607 ac_cv_c_const=yes
5ee754fc 12608else
81ecdfbb 12609 ac_cv_c_const=no
5ee754fc 12610fi
81ecdfbb 12611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12612fi
81ecdfbb
RW
12613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12614$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12615if test $ac_cv_c_const = no; then
bec39cab 12616
81ecdfbb 12617$as_echo "#define const /**/" >>confdefs.h
bec39cab 12618
5ee754fc 12619fi
bec39cab 12620
81ecdfbb
RW
12621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12622$as_echo_n "checking for inline... " >&6; }
d0ac1c44 12623if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12624 $as_echo_n "(cached) " >&6
bec39cab 12625else
a9322a30
TT
12626 ac_cv_c_inline=no
12627for ac_kw in inline __inline__ __inline; do
81ecdfbb 12628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12629/* end confdefs.h. */
a9322a30
TT
12630#ifndef __cplusplus
12631typedef int foo_t;
12632static $ac_kw foo_t static_foo () {return 0; }
12633$ac_kw foo_t foo () {return 0; }
12634#endif
12635
bec39cab 12636_ACEOF
81ecdfbb
RW
12637if ac_fn_c_try_compile "$LINENO"; then :
12638 ac_cv_c_inline=$ac_kw
bec39cab 12639fi
81ecdfbb
RW
12640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12641 test "$ac_cv_c_inline" != no && break
a9322a30 12642done
bec39cab 12643
5ee754fc 12644fi
81ecdfbb
RW
12645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12646$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12647
a9322a30
TT
12648case $ac_cv_c_inline in
12649 inline | yes) ;;
12650 *)
12651 case $ac_cv_c_inline in
12652 no) ac_val=;;
12653 *) ac_val=$ac_cv_c_inline;;
12654 esac
12655 cat >>confdefs.h <<_ACEOF
12656#ifndef __cplusplus
12657#define inline $ac_val
12658#endif
12659_ACEOF
bec39cab
AC
12660 ;;
12661esac
bec39cab 12662
81ecdfbb
RW
12663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12664$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12665if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12666 $as_echo_n "(cached) " >&6
bec39cab 12667else
81ecdfbb
RW
12668 ac_cv_c_bigendian=unknown
12669 # See if we're dealing with a universal compiler.
12670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12671/* end confdefs.h. */
12672#ifndef __APPLE_CC__
12673 not a universal capable compiler
12674 #endif
12675 typedef int dummy;
12676
12677_ACEOF
12678if ac_fn_c_try_compile "$LINENO"; then :
12679
12680 # Check for potential -arch flags. It is not universal unless
12681 # there are at least two -arch flags with different values.
12682 ac_arch=
12683 ac_prev=
12684 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12685 if test -n "$ac_prev"; then
12686 case $ac_word in
12687 i?86 | x86_64 | ppc | ppc64)
12688 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12689 ac_arch=$ac_word
12690 else
12691 ac_cv_c_bigendian=universal
12692 break
12693 fi
12694 ;;
12695 esac
12696 ac_prev=
12697 elif test "x$ac_word" = "x-arch"; then
12698 ac_prev=arch
12699 fi
12700 done
12701fi
12702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12703 if test $ac_cv_c_bigendian = unknown; then
12704 # See if sys/param.h defines the BYTE_ORDER macro.
12705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12706/* end confdefs.h. */
a9322a30 12707#include <sys/types.h>
81ecdfbb 12708 #include <sys/param.h>
a9322a30
TT
12709
12710int
12711main ()
12712{
81ecdfbb
RW
12713#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12714 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12715 && LITTLE_ENDIAN)
12716 bogus endian macros
12717 #endif
a9322a30
TT
12718
12719 ;
12720 return 0;
12721}
bec39cab 12722_ACEOF
81ecdfbb 12723if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12724 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12726/* end confdefs.h. */
a9322a30 12727#include <sys/types.h>
81ecdfbb 12728 #include <sys/param.h>
a9322a30
TT
12729
12730int
12731main ()
12732{
12733#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12734 not big endian
12735 #endif
a9322a30
TT
12736
12737 ;
12738 return 0;
12739}
bec39cab 12740_ACEOF
81ecdfbb 12741if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12742 ac_cv_c_bigendian=yes
5ee754fc 12743else
81ecdfbb 12744 ac_cv_c_bigendian=no
5ee754fc 12745fi
81ecdfbb
RW
12746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12747fi
12748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12749 fi
12750 if test $ac_cv_c_bigendian = unknown; then
12751 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12753/* end confdefs.h. */
12754#include <limits.h>
bec39cab 12755
81ecdfbb
RW
12756int
12757main ()
12758{
12759#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12760 bogus endian macros
12761 #endif
12762
12763 ;
12764 return 0;
12765}
7eb368b3 12766_ACEOF
81ecdfbb
RW
12767if ac_fn_c_try_compile "$LINENO"; then :
12768 # It does; now see whether it defined to _BIG_ENDIAN or not.
12769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12770/* end confdefs.h. */
81ecdfbb
RW
12771#include <limits.h>
12772
7eb368b3
NR
12773int
12774main ()
12775{
81ecdfbb
RW
12776#ifndef _BIG_ENDIAN
12777 not big endian
12778 #endif
12779
7eb368b3
NR
12780 ;
12781 return 0;
12782}
12783_ACEOF
81ecdfbb 12784if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12785 ac_cv_c_bigendian=yes
81ecdfbb
RW
12786else
12787 ac_cv_c_bigendian=no
a9322a30 12788fi
81ecdfbb 12789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12790fi
81ecdfbb
RW
12791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12792 fi
12793 if test $ac_cv_c_bigendian = unknown; then
12794 # Compile a test program.
12795 if test "$cross_compiling" = yes; then :
12796 # Try to guess by grepping values from an object file.
12797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12798/* end confdefs.h. */
12799short int ascii_mm[] =
12800 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12801 short int ascii_ii[] =
12802 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12803 int use_ascii (int i) {
12804 return ascii_mm[i] + ascii_ii[i];
12805 }
12806 short int ebcdic_ii[] =
12807 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12808 short int ebcdic_mm[] =
12809 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12810 int use_ebcdic (int i) {
12811 return ebcdic_mm[i] + ebcdic_ii[i];
12812 }
12813 extern int foo;
7eb368b3 12814
81ecdfbb
RW
12815int
12816main ()
12817{
12818return use_ascii (foo) == use_ebcdic (foo);
12819 ;
12820 return 0;
12821}
12822_ACEOF
12823if ac_fn_c_try_compile "$LINENO"; then :
12824 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12825 ac_cv_c_bigendian=yes
12826 fi
12827 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12828 if test "$ac_cv_c_bigendian" = unknown; then
12829 ac_cv_c_bigendian=no
12830 else
12831 # finding both strings is unlikely to happen, but who knows?
12832 ac_cv_c_bigendian=unknown
12833 fi
12834 fi
7eb368b3 12835fi
81ecdfbb 12836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12837else
81ecdfbb 12838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12839/* end confdefs.h. */
81ecdfbb 12840$ac_includes_default
d3ea6809
MM
12841int
12842main ()
12843{
81ecdfbb
RW
12844
12845 /* Are we little or big endian? From Harbison&Steele. */
12846 union
12847 {
12848 long int l;
12849 char c[sizeof (long int)];
12850 } u;
12851 u.l = 1;
12852 return u.c[sizeof (long int) - 1] == 1;
12853
12854 ;
12855 return 0;
d3ea6809
MM
12856}
12857_ACEOF
81ecdfbb 12858if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12859 ac_cv_c_bigendian=no
d3ea6809 12860else
81ecdfbb 12861 ac_cv_c_bigendian=yes
d3ea6809 12862fi
81ecdfbb
RW
12863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12864 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12865fi
a9322a30 12866
81ecdfbb
RW
12867 fi
12868fi
12869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12870$as_echo "$ac_cv_c_bigendian" >&6; }
12871 case $ac_cv_c_bigendian in #(
12872 yes)
12873 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12874;; #(
12875 no)
12876 ;; #(
12877 universal)
12878
12879$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12880
12881 ;; #(
12882 *)
d0ac1c44 12883 as_fn_error $? "unknown endianness
81ecdfbb
RW
12884 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12885 esac
d3ea6809
MM
12886
12887
a9322a30
TT
12888# ------------------------------ #
12889# Checks for library functions. #
12890# ------------------------------ #
d3ea6809 12891
d0ac1c44
SM
12892
12893
12894
12895 for ac_header in $ac_header_list
81ecdfbb
RW
12896do :
12897 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
d0ac1c44
SM
12898ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12899"
12900if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12901 cat >>confdefs.h <<_ACEOF
81ecdfbb 12902#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12903_ACEOF
b757528f 12904
b757528f 12905fi
bec39cab 12906
a9322a30 12907done
a3828db0 12908
d0ac1c44
SM
12909
12910
12911
12912
12913
12914
12915
a9322a30 12916for ac_func in getpagesize
81ecdfbb
RW
12917do :
12918 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12919if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12920 cat >>confdefs.h <<_ACEOF
81ecdfbb 12921#define HAVE_GETPAGESIZE 1
bec39cab 12922_ACEOF
bcb3dc3d 12923
bcb3dc3d
MK
12924fi
12925done
12926
81ecdfbb
RW
12927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12928$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12929if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12930 $as_echo_n "(cached) " >&6
a9322a30 12931else
81ecdfbb 12932 if test "$cross_compiling" = yes; then :
a9322a30 12933 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12934else
81ecdfbb 12935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12936/* end confdefs.h. */
a9322a30
TT
12937$ac_includes_default
12938/* malloc might have been renamed as rpl_malloc. */
12939#undef malloc
bec39cab 12940
a9322a30
TT
12941/* Thanks to Mike Haertel and Jim Avera for this test.
12942 Here is a matrix of mmap possibilities:
12943 mmap private not fixed
12944 mmap private fixed at somewhere currently unmapped
12945 mmap private fixed at somewhere already mapped
12946 mmap shared not fixed
12947 mmap shared fixed at somewhere currently unmapped
12948 mmap shared fixed at somewhere already mapped
12949 For private mappings, we should verify that changes cannot be read()
12950 back from the file, nor mmap's back from the file at a different
12951 address. (There have been systems where private was not correctly
12952 implemented like the infamous i386 svr4.0, and systems where the
12953 VM page cache was not coherent with the file system buffer cache
12954 like early versions of FreeBSD and possibly contemporary NetBSD.)
12955 For shared mappings, we should conversely verify that changes get
12956 propagated back to all the places they're supposed to be.
bec39cab 12957
a9322a30
TT
12958 Grep wants private fixed already mapped.
12959 The main things grep needs to know about mmap are:
12960 * does it exist and is it safe to write into the mmap'd area
12961 * how to use it (BSD variants) */
8b9cf735 12962
a9322a30
TT
12963#include <fcntl.h>
12964#include <sys/mman.h>
8b9cf735 12965
81ecdfbb 12966#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12967char *malloc ();
a3828db0
MK
12968#endif
12969
a9322a30 12970/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12971#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12972# ifdef _SC_PAGESIZE
12973# define getpagesize() sysconf(_SC_PAGESIZE)
12974# else /* no _SC_PAGESIZE */
81ecdfbb 12975# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12976# include <sys/param.h>
12977# ifdef EXEC_PAGESIZE
12978# define getpagesize() EXEC_PAGESIZE
12979# else /* no EXEC_PAGESIZE */
12980# ifdef NBPG
12981# define getpagesize() NBPG * CLSIZE
12982# ifndef CLSIZE
12983# define CLSIZE 1
12984# endif /* no CLSIZE */
12985# else /* no NBPG */
12986# ifdef NBPC
12987# define getpagesize() NBPC
12988# else /* no NBPC */
12989# ifdef PAGESIZE
12990# define getpagesize() PAGESIZE
12991# endif /* PAGESIZE */
12992# endif /* no NBPC */
12993# endif /* no NBPG */
12994# endif /* no EXEC_PAGESIZE */
12995# else /* no HAVE_SYS_PARAM_H */
12996# define getpagesize() 8192 /* punt totally */
12997# endif /* no HAVE_SYS_PARAM_H */
12998# endif /* no _SC_PAGESIZE */
12999
13000#endif /* no HAVE_GETPAGESIZE */
13001
bec39cab
AC
13002int
13003main ()
13004{
a9322a30 13005 char *data, *data2, *data3;
d0ac1c44 13006 const char *cdata2;
a9322a30 13007 int i, pagesize;
d0ac1c44 13008 int fd, fd2;
a9322a30
TT
13009
13010 pagesize = getpagesize ();
13011
13012 /* First, make a file with some known garbage in it. */
13013 data = (char *) malloc (pagesize);
13014 if (!data)
81ecdfbb 13015 return 1;
a9322a30
TT
13016 for (i = 0; i < pagesize; ++i)
13017 *(data + i) = rand ();
13018 umask (0);
13019 fd = creat ("conftest.mmap", 0600);
13020 if (fd < 0)
d0ac1c44 13021 return 2;
a9322a30 13022 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 13023 return 3;
a9322a30
TT
13024 close (fd);
13025
d0ac1c44
SM
13026 /* Next, check that the tail of a page is zero-filled. File must have
13027 non-zero length, otherwise we risk SIGBUS for entire page. */
13028 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13029 if (fd2 < 0)
13030 return 4;
13031 cdata2 = "";
13032 if (write (fd2, cdata2, 1) != 1)
13033 return 5;
13034 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13035 if (data2 == MAP_FAILED)
13036 return 6;
13037 for (i = 0; i < pagesize; ++i)
13038 if (*(data2 + i))
13039 return 7;
13040 close (fd2);
13041 if (munmap (data2, pagesize))
13042 return 8;
13043
a9322a30
TT
13044 /* Next, try to mmap the file at a fixed address which already has
13045 something else allocated at it. If we can, also make sure that
13046 we see the same garbage. */
13047 fd = open ("conftest.mmap", O_RDWR);
13048 if (fd < 0)
d0ac1c44 13049 return 9;
a9322a30
TT
13050 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13051 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 13052 return 10;
a9322a30
TT
13053 for (i = 0; i < pagesize; ++i)
13054 if (*(data + i) != *(data2 + i))
d0ac1c44 13055 return 11;
a9322a30
TT
13056
13057 /* Finally, make sure that changes to the mapped area do not
13058 percolate back to the file as seen by read(). (This is a bug on
13059 some variants of i386 svr4.0.) */
13060 for (i = 0; i < pagesize; ++i)
13061 *(data2 + i) = *(data2 + i) + 1;
13062 data3 = (char *) malloc (pagesize);
13063 if (!data3)
d0ac1c44 13064 return 12;
a9322a30 13065 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 13066 return 13;
a9322a30
TT
13067 for (i = 0; i < pagesize; ++i)
13068 if (*(data + i) != *(data3 + i))
d0ac1c44 13069 return 14;
a9322a30 13070 close (fd);
81ecdfbb 13071 return 0;
bec39cab
AC
13072}
13073_ACEOF
81ecdfbb 13074if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13075 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13076else
81ecdfbb 13077 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13078fi
81ecdfbb
RW
13079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13080 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13081fi
81ecdfbb 13082
a9322a30 13083fi
81ecdfbb
RW
13084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13085$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13086if test $ac_cv_func_mmap_fixed_mapped = yes; then
13087
81ecdfbb 13088$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13089
086ec9eb 13090fi
d0ac1c44 13091rm -f conftest.mmap conftest.txt
a3828db0 13092
81ecdfbb 13093ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 13094if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 13095
a9322a30
TT
13096else
13097
13098cat >>confdefs.h <<_ACEOF
13099#define pid_t int
bec39cab 13100_ACEOF
086ec9eb
MK
13101
13102fi
13103
81ecdfbb
RW
13104for ac_header in vfork.h
13105do :
13106 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 13107if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13108 cat >>confdefs.h <<_ACEOF
81ecdfbb 13109#define HAVE_VFORK_H 1
bec39cab 13110_ACEOF
c906108c
SS
13111
13112fi
a9322a30 13113
a3828db0 13114done
c906108c 13115
a9322a30 13116for ac_func in fork vfork
81ecdfbb
RW
13117do :
13118 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13119ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13120if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13121 cat >>confdefs.h <<_ACEOF
81ecdfbb 13122#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13123_ACEOF
b83266a0 13124
97bf5e38 13125fi
a3828db0 13126done
b83266a0 13127
a9322a30 13128if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13130$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13131if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13132 $as_echo_n "(cached) " >&6
a9322a30 13133else
81ecdfbb 13134 if test "$cross_compiling" = yes; then :
a9322a30
TT
13135 ac_cv_func_fork_works=cross
13136else
81ecdfbb
RW
13137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13138/* end confdefs.h. */
13139$ac_includes_default
13140int
13141main ()
13142{
13143
13144 /* By Ruediger Kuhlmann. */
13145 return fork () < 0;
13146
13147 ;
13148 return 0;
13149}
a9322a30 13150_ACEOF
81ecdfbb 13151if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13152 ac_cv_func_fork_works=yes
13153else
81ecdfbb 13154 ac_cv_func_fork_works=no
a9322a30 13155fi
81ecdfbb
RW
13156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13157 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13158fi
81ecdfbb 13159
a9322a30 13160fi
81ecdfbb
RW
13161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13162$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13163
13164else
13165 ac_cv_func_fork_works=$ac_cv_func_fork
13166fi
13167if test "x$ac_cv_func_fork_works" = xcross; then
13168 case $host in
13169 *-*-amigaos* | *-*-msdosdjgpp*)
13170 # Override, as these systems have only a dummy fork() stub
13171 ac_cv_func_fork_works=no
13172 ;;
13173 *)
13174 ac_cv_func_fork_works=yes
13175 ;;
13176 esac
81ecdfbb
RW
13177 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13178$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13179fi
13180ac_cv_func_vfork_works=$ac_cv_func_vfork
13181if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13183$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13184if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13185 $as_echo_n "(cached) " >&6
a9322a30 13186else
81ecdfbb 13187 if test "$cross_compiling" = yes; then :
a9322a30
TT
13188 ac_cv_func_vfork_works=cross
13189else
81ecdfbb 13190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13191/* end confdefs.h. */
13192/* Thanks to Paul Eggert for this test. */
81ecdfbb 13193$ac_includes_default
a9322a30 13194#include <sys/wait.h>
81ecdfbb 13195#ifdef HAVE_VFORK_H
a9322a30
TT
13196# include <vfork.h>
13197#endif
13198/* On some sparc systems, changes by the child to local and incoming
13199 argument registers are propagated back to the parent. The compiler
13200 is told about this with #include <vfork.h>, but some compilers
13201 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13202 static variable whose address is put into a register that is
13203 clobbered by the vfork. */
13204static void
13205#ifdef __cplusplus
13206sparc_address_test (int arg)
13207# else
13208sparc_address_test (arg) int arg;
13209#endif
13210{
13211 static pid_t child;
13212 if (!child) {
13213 child = vfork ();
13214 if (child < 0) {
13215 perror ("vfork");
13216 _exit(2);
13217 }
13218 if (!child) {
13219 arg = getpid();
13220 write(-1, "", 0);
13221 _exit (arg);
13222 }
13223 }
13224}
13225
13226int
13227main ()
13228{
13229 pid_t parent = getpid ();
13230 pid_t child;
13231
13232 sparc_address_test (0);
13233
13234 child = vfork ();
13235
13236 if (child == 0) {
13237 /* Here is another test for sparc vfork register problems. This
13238 test uses lots of local variables, at least as many local
13239 variables as main has allocated so far including compiler
13240 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13241 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13242 reuse the register of parent for one of the local variables,
13243 since it will think that parent can't possibly be used any more
13244 in this routine. Assigning to the local variable will thus
13245 munge parent in the parent process. */
13246 pid_t
13247 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13248 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13249 /* Convince the compiler that p..p7 are live; otherwise, it might
13250 use the same hardware register for all 8 local variables. */
13251 if (p != p1 || p != p2 || p != p3 || p != p4
13252 || p != p5 || p != p6 || p != p7)
13253 _exit(1);
13254
13255 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13256 from child file descriptors. If the child closes a descriptor
13257 before it execs or exits, this munges the parent's descriptor
13258 as well. Test for this by closing stdout in the child. */
13259 _exit(close(fileno(stdout)) != 0);
13260 } else {
13261 int status;
13262 struct stat st;
13263
13264 while (wait(&status) != child)
13265 ;
81ecdfbb 13266 return (
a9322a30
TT
13267 /* Was there some problem with vforking? */
13268 child < 0
13269
13270 /* Did the child fail? (This shouldn't happen.) */
13271 || status
13272
13273 /* Did the vfork/compiler bug occur? */
13274 || parent != getpid()
13275
13276 /* Did the file descriptor bug occur? */
13277 || fstat(fileno(stdout), &st) != 0
13278 );
13279 }
13280}
13281_ACEOF
81ecdfbb 13282if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13283 ac_cv_func_vfork_works=yes
13284else
81ecdfbb 13285 ac_cv_func_vfork_works=no
a9322a30 13286fi
81ecdfbb
RW
13287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13288 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13289fi
81ecdfbb 13290
a9322a30 13291fi
81ecdfbb
RW
13292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13293$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13294
13295fi;
13296if test "x$ac_cv_func_fork_works" = xcross; then
13297 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13298 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13299$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13300fi
13301
13302if test "x$ac_cv_func_vfork_works" = xyes; then
13303
81ecdfbb 13304$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13305
13306else
13307
81ecdfbb 13308$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13309
13310fi
13311if test "x$ac_cv_func_fork_works" = xyes; then
13312
81ecdfbb 13313$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13314
13315fi
13316
cdf43629 13317for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13318 pipe poll pread pread64 pwrite resize_term \
e671cd59 13319 sbrk getpgid setpgid setpgrp setsid \
9467110b 13320 sigaction sigprocmask sigsetmask socketpair \
110ed339 13321 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13322 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 13323 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
13324do :
13325 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13326ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13327if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13328 cat >>confdefs.h <<_ACEOF
81ecdfbb 13329#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13330_ACEOF
13331
13332fi
13333done
13334
13335
81ecdfbb
RW
13336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13337$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13338if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13339 $as_echo_n "(cached) " >&6
6c7a06a3 13340else
81ecdfbb 13341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13342/* end confdefs.h. */
13343#include <langinfo.h>
13344int
13345main ()
13346{
13347char* cs = nl_langinfo(CODESET);
bec39cab
AC
13348 ;
13349 return 0;
13350}
13351_ACEOF
81ecdfbb 13352if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13353 am_cv_langinfo_codeset=yes
a4db0f07 13354else
81ecdfbb 13355 am_cv_langinfo_codeset=no
a4db0f07 13356fi
81ecdfbb
RW
13357rm -f core conftest.err conftest.$ac_objext \
13358 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13359
a4db0f07 13360fi
81ecdfbb
RW
13361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13362$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13363 if test $am_cv_langinfo_codeset = yes; then
13364
81ecdfbb 13365$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13366
6c7a06a3 13367 fi
c906108c 13368
d0ac1c44
SM
13369ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13370if test "x$ac_cv_type_size_t" = xyes; then :
13371
13372else
13373
13374cat >>confdefs.h <<_ACEOF
13375#define size_t unsigned int
13376_ACEOF
13377
13378fi
13379
06825bd1 13380
3266f10b
TT
13381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13382$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 13383if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13384 $as_echo_n "(cached) " >&6
13385else
13386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13387/* end confdefs.h. */
13388#include <stdlib.h>
13389#include <stdarg.h>
13390#include <string.h>
13391#include <float.h>
13392
13393int
13394main ()
13395{
13396
13397 ;
13398 return 0;
13399}
13400_ACEOF
13401if ac_fn_c_try_compile "$LINENO"; then :
13402 ac_cv_header_stdc=yes
13403else
13404 ac_cv_header_stdc=no
13405fi
13406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13407
13408if test $ac_cv_header_stdc = yes; then
13409 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13411/* end confdefs.h. */
13412#include <string.h>
13413
13414_ACEOF
13415if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13416 $EGREP "memchr" >/dev/null 2>&1; then :
13417
13418else
13419 ac_cv_header_stdc=no
13420fi
13421rm -f conftest*
13422
13423fi
13424
13425if test $ac_cv_header_stdc = yes; then
13426 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13428/* end confdefs.h. */
13429#include <stdlib.h>
13430
13431_ACEOF
13432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13433 $EGREP "free" >/dev/null 2>&1; then :
13434
13435else
13436 ac_cv_header_stdc=no
13437fi
13438rm -f conftest*
13439
13440fi
13441
13442if test $ac_cv_header_stdc = yes; then
13443 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13444 if test "$cross_compiling" = yes; then :
13445 :
13446else
13447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13448/* end confdefs.h. */
13449#include <ctype.h>
13450#include <stdlib.h>
13451#if ((' ' & 0x0FF) == 0x020)
13452# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13453# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13454#else
13455# define ISLOWER(c) \
13456 (('a' <= (c) && (c) <= 'i') \
13457 || ('j' <= (c) && (c) <= 'r') \
13458 || ('s' <= (c) && (c) <= 'z'))
13459# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13460#endif
13461
13462#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13463int
13464main ()
13465{
13466 int i;
13467 for (i = 0; i < 256; i++)
13468 if (XOR (islower (i), ISLOWER (i))
13469 || toupper (i) != TOUPPER (i))
13470 return 2;
13471 return 0;
13472}
13473_ACEOF
13474if ac_fn_c_try_run "$LINENO"; then :
13475
13476else
13477 ac_cv_header_stdc=no
13478fi
13479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13480 conftest.$ac_objext conftest.beam conftest.$ac_ext
13481fi
13482
13483fi
13484fi
13485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13486$as_echo "$ac_cv_header_stdc" >&6; }
13487if test $ac_cv_header_stdc = yes; then
13488
13489$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13490
3266f10b
TT
13491fi
13492
13493 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13494# for constant arguments. Useless!
13495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13496$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 13497if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13498 $as_echo_n "(cached) " >&6
13499else
13500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13501/* end confdefs.h. */
13502#include <alloca.h>
13503int
13504main ()
13505{
13506char *p = (char *) alloca (2 * sizeof (int));
13507 if (p) return 0;
13508 ;
13509 return 0;
13510}
13511_ACEOF
13512if ac_fn_c_try_link "$LINENO"; then :
13513 ac_cv_working_alloca_h=yes
13514else
13515 ac_cv_working_alloca_h=no
13516fi
13517rm -f core conftest.err conftest.$ac_objext \
13518 conftest$ac_exeext conftest.$ac_ext
13519fi
13520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13521$as_echo "$ac_cv_working_alloca_h" >&6; }
13522if test $ac_cv_working_alloca_h = yes; then
13523
13524$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13525
13526fi
13527
13528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13529$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 13530if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13531 $as_echo_n "(cached) " >&6
13532else
13533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13534/* end confdefs.h. */
13535#ifdef __GNUC__
13536# define alloca __builtin_alloca
13537#else
13538# ifdef _MSC_VER
13539# include <malloc.h>
13540# define alloca _alloca
13541# else
13542# ifdef HAVE_ALLOCA_H
13543# include <alloca.h>
13544# else
13545# ifdef _AIX
13546 #pragma alloca
13547# else
13548# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 13549void *alloca (size_t);
3266f10b
TT
13550# endif
13551# endif
13552# endif
13553# endif
13554#endif
13555
13556int
13557main ()
13558{
13559char *p = (char *) alloca (1);
13560 if (p) return 0;
13561 ;
13562 return 0;
13563}
13564_ACEOF
13565if ac_fn_c_try_link "$LINENO"; then :
13566 ac_cv_func_alloca_works=yes
13567else
13568 ac_cv_func_alloca_works=no
13569fi
13570rm -f core conftest.err conftest.$ac_objext \
13571 conftest$ac_exeext conftest.$ac_ext
13572fi
13573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13574$as_echo "$ac_cv_func_alloca_works" >&6; }
13575
13576if test $ac_cv_func_alloca_works = yes; then
13577
13578$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13579
13580else
13581 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13582# that cause trouble. Some versions do not even contain alloca or
13583# contain a buggy version. If you still want to use their alloca,
13584# use ar to extract alloca.o from them instead of compiling alloca.c.
13585
13586ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13587
13588$as_echo "#define C_ALLOCA 1" >>confdefs.h
13589
13590
13591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13592$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 13593if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13594 $as_echo_n "(cached) " >&6
13595else
13596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13597/* end confdefs.h. */
13598#if defined CRAY && ! defined CRAY2
13599webecray
13600#else
13601wenotbecray
13602#endif
13603
13604_ACEOF
13605if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13606 $EGREP "webecray" >/dev/null 2>&1; then :
13607 ac_cv_os_cray=yes
13608else
13609 ac_cv_os_cray=no
13610fi
13611rm -f conftest*
13612
13613fi
13614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13615$as_echo "$ac_cv_os_cray" >&6; }
13616if test $ac_cv_os_cray = yes; then
13617 for ac_func in _getb67 GETB67 getb67; do
13618 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13619ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13620if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13621
13622cat >>confdefs.h <<_ACEOF
13623#define CRAY_STACKSEG_END $ac_func
13624_ACEOF
13625
13626 break
13627fi
13628
13629 done
13630fi
13631
13632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13633$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 13634if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13635 $as_echo_n "(cached) " >&6
13636else
13637 if test "$cross_compiling" = yes; then :
13638 ac_cv_c_stack_direction=0
13639else
13640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13641/* end confdefs.h. */
13642$ac_includes_default
13643int
d0ac1c44 13644find_stack_direction (int *addr, int depth)
3266f10b 13645{
d0ac1c44
SM
13646 int dir, dummy = 0;
13647 if (! addr)
13648 addr = &dummy;
13649 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13650 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13651 return dir + dummy;
3266f10b
TT
13652}
13653
13654int
d0ac1c44 13655main (int argc, char **argv)
3266f10b 13656{
d0ac1c44 13657 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13658}
13659_ACEOF
13660if ac_fn_c_try_run "$LINENO"; then :
13661 ac_cv_c_stack_direction=1
13662else
13663 ac_cv_c_stack_direction=-1
13664fi
13665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13666 conftest.$ac_objext conftest.beam conftest.$ac_ext
13667fi
13668
13669fi
13670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13671$as_echo "$ac_cv_c_stack_direction" >&6; }
13672cat >>confdefs.h <<_ACEOF
13673#define STACK_DIRECTION $ac_cv_c_stack_direction
13674_ACEOF
13675
13676
13677fi
13678
13679
13680
13681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13682$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13683if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13684 $as_echo_n "(cached) " >&6
13685else
13686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13687/* end confdefs.h. */
13688#include <langinfo.h>
13689int
13690main ()
13691{
13692char* cs = nl_langinfo(CODESET);
13693 ;
13694 return 0;
13695}
13696_ACEOF
13697if ac_fn_c_try_link "$LINENO"; then :
13698 am_cv_langinfo_codeset=yes
13699else
13700 am_cv_langinfo_codeset=no
13701fi
13702rm -f core conftest.err conftest.$ac_objext \
13703 conftest$ac_exeext conftest.$ac_ext
13704
13705fi
13706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13707$as_echo "$am_cv_langinfo_codeset" >&6; }
13708 if test $am_cv_langinfo_codeset = yes; then
13709
13710$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13711
13712 fi
13713
13714
44122162 13715 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
13716do :
13717 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13718ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13719if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13720 cat >>confdefs.h <<_ACEOF
13721#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13722_ACEOF
13723
13724fi
13725
13726done
13727
13728
f348d89a 13729 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13730do :
13731 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13732ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13733if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13734 cat >>confdefs.h <<_ACEOF
13735#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13736_ACEOF
13737
13738fi
13739done
13740
13741
13742 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
d0ac1c44 13743if test "x$ac_cv_have_decl_strerror" = xyes; then :
3266f10b
TT
13744 ac_have_decl=1
13745else
13746 ac_have_decl=0
13747fi
13748
13749cat >>confdefs.h <<_ACEOF
13750#define HAVE_DECL_STRERROR $ac_have_decl
13751_ACEOF
13752ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 13753if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13754 ac_have_decl=1
13755else
13756 ac_have_decl=0
13757fi
13758
13759cat >>confdefs.h <<_ACEOF
13760#define HAVE_DECL_STRSTR $ac_have_decl
13761_ACEOF
13762
13763
e9bcb658
GB
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13765$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 13766if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
13767 $as_echo_n "(cached) " >&6
13768else
13769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13770/* end confdefs.h. */
13771
13772#include <setjmp.h>
13773
13774int
13775main ()
13776{
13777sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13778 ;
13779 return 0;
13780}
13781_ACEOF
13782if ac_fn_c_try_compile "$LINENO"; then :
13783 gdb_cv_func_sigsetjmp=yes
13784else
13785 gdb_cv_func_sigsetjmp=no
13786fi
13787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13788fi
13789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13790$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13791if test $gdb_cv_func_sigsetjmp = yes; then
13792
13793$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13794
13795fi
13796
3266f10b 13797
54019719
PA
13798# Check the return and argument types of ptrace.
13799
13800
54019719
PA
13801for ac_header in sys/ptrace.h ptrace.h
13802do :
13803 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13804ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13805if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
13806 cat >>confdefs.h <<_ACEOF
13807#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13808_ACEOF
13809
13810fi
13811
13812done
13813
13814
a3828db0 13815gdb_ptrace_headers='
4ff70b84 13816#include <sys/types.h>
a3828db0
MK
13817#if HAVE_SYS_PTRACE_H
13818# include <sys/ptrace.h>
13819#endif
13820#if HAVE_UNISTD_H
13821# include <unistd.h>
13822#endif
13823'
13824# There is no point in checking if we don't have a prototype.
9b30624b 13825ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 13826"
d0ac1c44 13827if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 13828 ac_have_decl=1
06825bd1 13829else
81ecdfbb 13830 ac_have_decl=0
06825bd1 13831fi
06825bd1 13832
a3828db0 13833cat >>confdefs.h <<_ACEOF
81ecdfbb 13834#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13835_ACEOF
81ecdfbb 13836if test $ac_have_decl = 1; then :
bec39cab 13837
a3828db0 13838else
a3828db0
MK
13839
13840 : ${gdb_cv_func_ptrace_ret='int'}
13841 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13842
06825bd1
MK
13843fi
13844
064ef605
DJ
13845# Check return type. Varargs (used on GNU/Linux) conflict with the
13846# empty argument list, so check for that explicitly.
81ecdfbb
RW
13847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13848$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 13849if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 13850 $as_echo_n "(cached) " >&6
bec39cab 13851else
81ecdfbb 13852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13853/* end confdefs.h. */
a3828db0 13854$gdb_ptrace_headers
bec39cab
AC
13855int
13856main ()
13857{
064ef605
DJ
13858extern long ptrace (enum __ptrace_request, ...);
13859 ;
13860 return 0;
13861}
13862_ACEOF
9b30624b 13863if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13864 gdb_cv_func_ptrace_ret='long'
13865else
81ecdfbb 13866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13867/* end confdefs.h. */
13868$gdb_ptrace_headers
13869int
13870main ()
13871{
a3828db0 13872extern int ptrace ();
bec39cab
AC
13873 ;
13874 return 0;
13875}
13876_ACEOF
9b30624b 13877if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13878 gdb_cv_func_ptrace_ret='int'
70f9f479 13879else
81ecdfbb 13880 gdb_cv_func_ptrace_ret='long'
70f9f479 13881fi
81ecdfbb 13882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13883fi
81ecdfbb 13884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13885fi
81ecdfbb
RW
13886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13887$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13888
a3828db0
MK
13889cat >>confdefs.h <<_ACEOF
13890#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13891_ACEOF
70f9f479 13892
a3828db0 13893# Check argument types.
81ecdfbb
RW
13894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13895$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 13896if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 13897 $as_echo_n "(cached) " >&6
bec39cab 13898else
a3828db0 13899
81ecdfbb 13900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13901/* end confdefs.h. */
13902$gdb_ptrace_headers
13903int
13904main ()
13905{
13906extern long ptrace (enum __ptrace_request, ...);
13907 ;
13908 return 0;
13909}
13910_ACEOF
9b30624b 13911if ac_fn_c_try_compile "$LINENO"; then :
54019719 13912 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13913else
064ef605 13914
a3828db0
MK
13915for gdb_arg1 in 'int' 'long'; do
13916 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13917 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13918 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13920/* end confdefs.h. */
a3828db0 13921$gdb_ptrace_headers
bec39cab
AC
13922int
13923main ()
13924{
a3828db0
MK
13925
13926extern $gdb_cv_func_ptrace_ret
13927 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13928
bec39cab
AC
13929 ;
13930 return 0;
13931}
13932_ACEOF
9b30624b 13933if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13934 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13935 break 4;
5c7f2947 13936fi
81ecdfbb 13937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13938 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13940/* end confdefs.h. */
a3828db0 13941$gdb_ptrace_headers
bec39cab
AC
13942int
13943main ()
13944{
a3828db0
MK
13945
13946extern $gdb_cv_func_ptrace_ret
13947 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13948
bec39cab
AC
13949 ;
13950 return 0;
13951}
13952_ACEOF
9b30624b 13953if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13954
13955gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13956 break 5;
78434e59 13957fi
81ecdfbb 13958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13959 done
13960 done
13961 done
13962 done
13963done
13964# Provide a safe default value.
13965: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13966
064ef605 13967fi
81ecdfbb 13968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13969fi
81ecdfbb
RW
13970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13971$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13972ac_save_IFS=$IFS; IFS=','
13973set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13974IFS=$ac_save_IFS
13975shift
bec39cab 13976
54019719
PA
13977cat >>confdefs.h <<_ACEOF
13978#define PTRACE_TYPE_ARG1 $1
13979_ACEOF
13980
13981
a3828db0
MK
13982cat >>confdefs.h <<_ACEOF
13983#define PTRACE_TYPE_ARG3 $3
13984_ACEOF
13985
96d7229d
LM
13986
13987cat >>confdefs.h <<_ACEOF
13988#define PTRACE_TYPE_ARG4 $4
13989_ACEOF
13990
a3828db0
MK
13991if test -n "$5"; then
13992
13993cat >>confdefs.h <<_ACEOF
13994#define PTRACE_TYPE_ARG5 $5
bec39cab 13995_ACEOF
78434e59
MK
13996
13997fi
13998
54019719 13999
a3828db0 14000if test "$cross_compiling" = no; then
81ecdfbb
RW
14001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14002$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 14003if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14004 $as_echo_n "(cached) " >&6
a3828db0 14005else
81ecdfbb 14006 if test "$cross_compiling" = yes; then :
d0ac1c44 14007 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 14008else
81ecdfbb 14009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14010/* end confdefs.h. */
81ecdfbb 14011$ac_includes_default
bec39cab
AC
14012int
14013main ()
14014{
a3828db0
MK
14015/* If this system has a BSD-style setpgrp which takes arguments,
14016 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14017 exit successfully. */
81ecdfbb 14018 return setpgrp (1,1) != -1;
bec39cab
AC
14019 ;
14020 return 0;
14021}
14022_ACEOF
81ecdfbb 14023if ac_fn_c_try_run "$LINENO"; then :
a3828db0 14024 ac_cv_func_setpgrp_void=no
c906108c 14025else
81ecdfbb 14026 ac_cv_func_setpgrp_void=yes
c906108c 14027fi
81ecdfbb
RW
14028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14029 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14030fi
81ecdfbb 14031
a3828db0 14032fi
81ecdfbb
RW
14033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14034$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
14035if test $ac_cv_func_setpgrp_void = yes; then
14036
81ecdfbb 14037$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
14038
14039fi
a3828db0
MK
14040
14041else
81ecdfbb
RW
14042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14043$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 14044if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14045 $as_echo_n "(cached) " >&6
97bf5e38 14046else
81ecdfbb 14047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14048/* end confdefs.h. */
a3828db0
MK
14049
14050#include <unistd.h>
14051
bec39cab
AC
14052int
14053main ()
14054{
a3828db0
MK
14055
14056 if (setpgrp(1,1) == -1)
14057 exit (0);
14058 else
14059 exit (1);
14060
bec39cab
AC
14061 ;
14062 return 0;
14063}
14064_ACEOF
81ecdfbb 14065if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14066 ac_cv_func_setpgrp_void=no
c906108c 14067else
81ecdfbb 14068 ac_cv_func_setpgrp_void=yes
c906108c 14069fi
81ecdfbb 14070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14071fi
81ecdfbb
RW
14072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14073$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 14074if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 14075 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 14076
a3828db0 14077fi
c906108c
SS
14078fi
14079
db1ff28b
JK
14080# Assume we'll default to using the included libiberty regex.
14081gdb_use_included_regex=yes
14082
14083# However, if the system regex is GNU regex, then default to *not*
14084# using the included regex.
14085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14086$as_echo_n "checking for GNU regex... " >&6; }
d0ac1c44 14087if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
14088 $as_echo_n "(cached) " >&6
14089else
14090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14091/* end confdefs.h. */
14092#include <gnu-versions.h>
14093int
14094main ()
14095{
14096#define REGEX_INTERFACE_VERSION 1
14097#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14098# error "Version mismatch"
14099#endif
14100 ;
14101 return 0;
14102}
14103_ACEOF
14104if ac_fn_c_try_compile "$LINENO"; then :
14105 gdb_cv_have_gnu_regex=yes
14106else
14107 gdb_cv_have_gnu_regex=no
14108fi
14109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14110fi
14111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14112$as_echo "$gdb_cv_have_gnu_regex" >&6; }
14113if test $gdb_cv_have_gnu_regex = yes; then
14114 gdb_use_included_regex=no
14115fi
14116
14117
14118# Check whether --with-included-regex was given.
14119if test "${with_included_regex+set}" = set; then :
14120 withval=$with_included_regex; gdb_with_regex=$withval
14121else
14122 gdb_with_regex=$gdb_use_included_regex
14123fi
14124
14125if test "$gdb_with_regex" = yes; then
14126
14127$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14128
14129fi
14130
81ecdfbb
RW
14131# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14132ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14133#include <sys/proc.h>
14134
14135"
d0ac1c44 14136if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 14137
5c45e068 14138cat >>confdefs.h <<_ACEOF
a3828db0 14139#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 14140_ACEOF
c906108c 14141
5c45e068 14142
97bf5e38 14143fi
c906108c 14144
5c45e068 14145
a3828db0 14146# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
14147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14148$as_echo_n "checking for struct lwp... " >&6; }
d0ac1c44 14149if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 14150 $as_echo_n "(cached) " >&6
bec39cab 14151else
81ecdfbb 14152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14153/* end confdefs.h. */
a3828db0 14154#include <sys/param.h>
c49fbc6c 14155#define _KMEMUSER
a3828db0 14156#include <sys/lwp.h>
bec39cab
AC
14157int
14158main ()
14159{
a3828db0 14160struct lwp l;
bec39cab
AC
14161 ;
14162 return 0;
14163}
14164_ACEOF
81ecdfbb 14165if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14166 gdb_cv_struct_lwp=yes
c906108c 14167else
81ecdfbb 14168 gdb_cv_struct_lwp=no
c906108c 14169fi
81ecdfbb 14170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14171fi
81ecdfbb
RW
14172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14173$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 14174if test $gdb_cv_struct_lwp = yes; then
c906108c 14175
81ecdfbb 14176$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 14177
97bf5e38 14178fi
c906108c 14179
a3828db0 14180# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
14181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14182$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
d0ac1c44 14183if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 14184 $as_echo_n "(cached) " >&6
bec39cab 14185else
81ecdfbb 14186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14187/* end confdefs.h. */
a3828db0
MK
14188#include <sys/types.h>
14189#include <machine/reg.h>
bec39cab
AC
14190int
14191main ()
14192{
a3828db0 14193struct reg r;
bec39cab
AC
14194 ;
14195 return 0;
14196}
14197_ACEOF
81ecdfbb 14198if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14199 gdb_cv_struct_reg=yes
27ca5dad 14200else
81ecdfbb 14201 gdb_cv_struct_reg=no
27ca5dad 14202fi
81ecdfbb 14203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14204fi
81ecdfbb
RW
14205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14206$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 14207if test $gdb_cv_struct_reg = yes; then
bec39cab 14208
81ecdfbb 14209$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14210
14211fi
97bf5e38 14212
a3828db0
MK
14213# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14214# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14215ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14216#include <machine/reg.h>
81ecdfbb 14217"
d0ac1c44 14218if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
14219
14220cat >>confdefs.h <<_ACEOF
a3828db0 14221#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14222_ACEOF
3862412b 14223
5c45e068 14224
97bf5e38 14225fi
a6e69c1f
JB
14226ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14227#include <machine/reg.h>
81ecdfbb 14228"
d0ac1c44 14229if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
14230
14231cat >>confdefs.h <<_ACEOF
a3828db0 14232#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14233_ACEOF
3862412b 14234
5c45e068 14235
97bf5e38 14236fi
3862412b 14237
5c45e068 14238
6fea9e18
L
14239# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14240# Older amd64 Linux's don't have the fs_base and gs_base members of
14241# `struct user_regs_struct'.
f517c180
EA
14242ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14243#include <sys/user.h>
6fea9e18 14244"
d0ac1c44 14245if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
14246
14247cat >>confdefs.h <<_ACEOF
14248#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14249_ACEOF
14250
14251
14252fi
f517c180
EA
14253ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14254#include <sys/user.h>
6fea9e18 14255"
d0ac1c44 14256if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14257
14258cat >>confdefs.h <<_ACEOF
14259#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14260_ACEOF
14261
14262
14263fi
14264
14265
a3828db0 14266# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14268$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14269if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14270 $as_echo_n "(cached) " >&6
451928c5 14271else
81ecdfbb 14272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14273/* end confdefs.h. */
a3828db0 14274#include <sys/ptrace.h>
bec39cab
AC
14275int
14276main ()
14277{
a3828db0 14278PTRACE_GETREGS;
bec39cab
AC
14279 ;
14280 return 0;
14281}
14282_ACEOF
81ecdfbb 14283if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14284 gdb_cv_have_ptrace_getregs=yes
451928c5 14285else
81ecdfbb 14286 gdb_cv_have_ptrace_getregs=no
451928c5 14287fi
81ecdfbb 14288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14289fi
14290
81ecdfbb
RW
14291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14292$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14293if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14294
81ecdfbb 14295$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14296
97bf5e38 14297fi
451928c5 14298
a3828db0 14299# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14301$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14302if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14303 $as_echo_n "(cached) " >&6
451928c5 14304else
81ecdfbb 14305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14306/* end confdefs.h. */
a3828db0 14307#include <sys/ptrace.h>
bec39cab
AC
14308int
14309main ()
14310{
a3828db0 14311PTRACE_GETFPXREGS;
bec39cab
AC
14312 ;
14313 return 0;
14314}
14315_ACEOF
81ecdfbb 14316if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14317 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14318else
81ecdfbb 14319 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14320fi
81ecdfbb 14321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14322fi
14323
81ecdfbb
RW
14324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14325$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14326if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14327
81ecdfbb 14328$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14329
97bf5e38 14330fi
451928c5 14331
a3828db0 14332# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14334$as_echo_n "checking for PT_GETDBREGS... " >&6; }
d0ac1c44 14335if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 14336 $as_echo_n "(cached) " >&6
3862412b 14337else
81ecdfbb 14338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14339/* end confdefs.h. */
a3828db0
MK
14340#include <sys/types.h>
14341#include <sys/ptrace.h>
bec39cab
AC
14342int
14343main ()
14344{
a3828db0 14345PT_GETDBREGS;
bec39cab
AC
14346 ;
14347 return 0;
14348}
14349_ACEOF
81ecdfbb 14350if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14351 gdb_cv_have_pt_getdbregs=yes
3862412b 14352else
81ecdfbb 14353 gdb_cv_have_pt_getdbregs=no
3862412b 14354fi
81ecdfbb 14355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14356fi
14357
81ecdfbb
RW
14358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14359$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14360if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14361
81ecdfbb 14362$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14363
97bf5e38 14364fi
3862412b 14365
a3828db0 14366# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14368$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
d0ac1c44 14369if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 14370 $as_echo_n "(cached) " >&6
3862412b 14371else
81ecdfbb 14372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14373/* end confdefs.h. */
a3828db0
MK
14374#include <sys/types.h>
14375#include <sys/ptrace.h>
bec39cab
AC
14376int
14377main ()
14378{
a3828db0 14379PT_GETXMMREGS;
bec39cab
AC
14380 ;
14381 return 0;
14382}
14383_ACEOF
81ecdfbb 14384if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14385 gdb_cv_have_pt_getxmmregs=yes
3862412b 14386else
81ecdfbb 14387 gdb_cv_have_pt_getxmmregs=no
3862412b 14388fi
81ecdfbb 14389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14390fi
14391
81ecdfbb
RW
14392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14393$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14394if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14395
81ecdfbb 14396$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14397
97bf5e38 14398fi
3862412b 14399
6e9567fe
JB
14400# See if <sys/ptrace.h> supports LWP names on FreeBSD
14401# Older FreeBSD versions don't have the pl_tdname member of
14402# `struct ptrace_lwpinfo'.
14403ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14404"
d0ac1c44 14405if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
14406
14407cat >>confdefs.h <<_ACEOF
14408#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14409_ACEOF
14410
14411
14412fi
14413
14414
e6cdd38e
JB
14415# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14416# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14417# FreeBSD 10.3.
14418ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14419"
d0ac1c44 14420if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
14421
14422cat >>confdefs.h <<_ACEOF
14423#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14424_ACEOF
14425
14426
14427fi
14428
6e9567fe 14429
97bf5e38 14430if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14432$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14433 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 14434 $as_echo_n "(cached) " >&6
596c9d4b 14435else
81ecdfbb 14436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14437/* end confdefs.h. */
596c9d4b
KB
14438
14439#define _SYSCALL32
d30c5336
JK
14440/* Needed for new procfs interface on sparc-solaris. */
14441#define _STRUCTURED_PROC 1
596c9d4b 14442#include <sys/procfs.h>
bec39cab
AC
14443int
14444main ()
14445{
97bf5e38 14446gregset_t avar
bec39cab
AC
14447 ;
14448 return 0;
14449}
14450_ACEOF
81ecdfbb 14451if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14452 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14453else
81ecdfbb 14454 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14455
596c9d4b 14456fi
81ecdfbb 14457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14458fi
14459
97bf5e38 14460 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14461
81ecdfbb 14462$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14463
14464 fi
81ecdfbb
RW
14465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14466$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14467
81ecdfbb
RW
14468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14469$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14470 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14471 $as_echo_n "(cached) " >&6
d84dd0c5 14472else
81ecdfbb 14473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14474/* end confdefs.h. */
97bf5e38
MK
14475
14476#define _SYSCALL32
d30c5336
JK
14477/* Needed for new procfs interface on sparc-solaris. */
14478#define _STRUCTURED_PROC 1
d84dd0c5 14479#include <sys/procfs.h>
bec39cab
AC
14480int
14481main ()
14482{
97bf5e38 14483fpregset_t avar
bec39cab
AC
14484 ;
14485 return 0;
14486}
14487_ACEOF
81ecdfbb 14488if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14489 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14490else
81ecdfbb 14491 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14492
d84dd0c5 14493fi
81ecdfbb 14494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14495fi
14496
97bf5e38 14497 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14498
81ecdfbb 14499$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14500
97bf5e38 14501 fi
81ecdfbb
RW
14502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14503$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14504
81ecdfbb
RW
14505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14506$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14507 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 14508 $as_echo_n "(cached) " >&6
c906108c 14509else
81ecdfbb 14510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14511/* end confdefs.h. */
c906108c 14512
97bf5e38 14513#define _SYSCALL32
d30c5336
JK
14514/* Needed for new procfs interface on sparc-solaris. */
14515#define _STRUCTURED_PROC 1
97bf5e38 14516#include <sys/procfs.h>
bec39cab
AC
14517int
14518main ()
14519{
97bf5e38 14520prgregset_t avar
bec39cab
AC
14521 ;
14522 return 0;
14523}
14524_ACEOF
81ecdfbb 14525if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14526 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14527else
81ecdfbb 14528 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14529
c906108c 14530fi
81ecdfbb 14531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14532fi
14533
97bf5e38 14534 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14535
81ecdfbb 14536$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14537
97bf5e38 14538 fi
81ecdfbb
RW
14539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14540$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14541
81ecdfbb
RW
14542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14543$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14544 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14545 $as_echo_n "(cached) " >&6
d45fe813 14546else
81ecdfbb 14547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14548/* end confdefs.h. */
97bf5e38
MK
14549
14550#define _SYSCALL32
d30c5336
JK
14551/* Needed for new procfs interface on sparc-solaris. */
14552#define _STRUCTURED_PROC 1
97bf5e38 14553#include <sys/procfs.h>
bec39cab
AC
14554int
14555main ()
14556{
97bf5e38 14557prfpregset_t avar
bec39cab
AC
14558 ;
14559 return 0;
14560}
14561_ACEOF
81ecdfbb 14562if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14563 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14564else
81ecdfbb 14565 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14566
d45fe813 14567fi
81ecdfbb 14568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14569fi
14570
97bf5e38 14571 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14572
81ecdfbb 14573$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14574
97bf5e38 14575 fi
81ecdfbb
RW
14576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14577$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14578
81ecdfbb
RW
14579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14580$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
d0ac1c44 14581 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 14582 $as_echo_n "(cached) " >&6
d45fe813 14583else
81ecdfbb 14584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14585/* end confdefs.h. */
97bf5e38
MK
14586
14587#define _SYSCALL32
d30c5336
JK
14588/* Needed for new procfs interface on sparc-solaris. */
14589#define _STRUCTURED_PROC 1
97bf5e38 14590#include <sys/procfs.h>
bec39cab
AC
14591int
14592main ()
14593{
97bf5e38 14594prgregset32_t avar
bec39cab
AC
14595 ;
14596 return 0;
14597}
14598_ACEOF
81ecdfbb 14599if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14600 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14601else
81ecdfbb 14602 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14603
d45fe813 14604fi
81ecdfbb 14605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14606fi
14607
97bf5e38 14608 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14609
81ecdfbb 14610$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14611
97bf5e38 14612 fi
81ecdfbb
RW
14613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14614$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14615
81ecdfbb
RW
14616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14617$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 14618 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14619 $as_echo_n "(cached) " >&6
d45fe813 14620else
81ecdfbb 14621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14622/* end confdefs.h. */
97bf5e38 14623
d45fe813 14624#define _SYSCALL32
d30c5336
JK
14625/* Needed for new procfs interface on sparc-solaris. */
14626#define _STRUCTURED_PROC 1
97bf5e38 14627#include <sys/procfs.h>
bec39cab
AC
14628int
14629main ()
14630{
97bf5e38 14631lwpid_t avar
bec39cab
AC
14632 ;
14633 return 0;
14634}
14635_ACEOF
81ecdfbb 14636if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14637 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14638else
81ecdfbb 14639 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14640
d45fe813 14641fi
81ecdfbb 14642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14643fi
14644
97bf5e38 14645 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14646
81ecdfbb 14647$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14648
97bf5e38 14649 fi
81ecdfbb
RW
14650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14651$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14652
81ecdfbb
RW
14653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14654$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 14655 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14656 $as_echo_n "(cached) " >&6
c906108c 14657else
81ecdfbb 14658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14659/* end confdefs.h. */
c906108c 14660
97bf5e38 14661#define _SYSCALL32
d30c5336
JK
14662/* Needed for new procfs interface on sparc-solaris. */
14663#define _STRUCTURED_PROC 1
97bf5e38 14664#include <sys/procfs.h>
bec39cab
AC
14665int
14666main ()
14667{
97bf5e38 14668psaddr_t avar
bec39cab
AC
14669 ;
14670 return 0;
14671}
14672_ACEOF
81ecdfbb 14673if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14674 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14675else
81ecdfbb 14676 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14677
c906108c 14678fi
81ecdfbb 14679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14680fi
14681
97bf5e38 14682 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14683
81ecdfbb 14684$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14685
97bf5e38 14686 fi
81ecdfbb
RW
14687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14688$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14689
43b7e92b
GB
14690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14691$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14692 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14693 $as_echo_n "(cached) " >&6
14694else
14695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14696/* end confdefs.h. */
14697
14698#define _SYSCALL32
14699/* Needed for new procfs interface on sparc-solaris. */
14700#define _STRUCTURED_PROC 1
14701#include <sys/procfs.h>
14702int
14703main ()
14704{
14705elf_fpregset_t avar
14706 ;
14707 return 0;
14708}
14709_ACEOF
14710if ac_fn_c_try_compile "$LINENO"; then :
14711 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14712else
14713 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14714
14715fi
14716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14717fi
14718
14719 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14720
14721$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14722
14723 fi
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14725$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14726
c906108c 14727fi
c906108c 14728
bc8bcb4b 14729# Check if the compiler supports the `long long' type.
c906108c 14730
81ecdfbb
RW
14731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14732$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 14733if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 14734 $as_echo_n "(cached) " >&6
97bf5e38 14735else
81ecdfbb 14736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14737/* end confdefs.h. */
bc8bcb4b 14738extern long long foo;
bec39cab
AC
14739int
14740main ()
14741{
bc8bcb4b 14742switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14743 ;
14744 return 0;
14745}
14746_ACEOF
81ecdfbb 14747if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14748 gdb_cv_c_long_long=yes
14749else
81ecdfbb 14750 gdb_cv_c_long_long=no
97bf5e38 14751fi
81ecdfbb 14752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14753fi
81ecdfbb
RW
14754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14755$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14756if test $gdb_cv_c_long_long != yes; then
14757 # libdecnumber requires long long.
d0ac1c44 14758 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14759fi
14760
bc8bcb4b 14761# Check if the compiler and runtime support printing long longs.
97bf5e38 14762
81ecdfbb
RW
14763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14764$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 14765if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 14766 $as_echo_n "(cached) " >&6
97bf5e38 14767else
81ecdfbb 14768 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14769 gdb_cv_printf_has_long_long=no
14770else
81ecdfbb 14771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14772/* end confdefs.h. */
bc8bcb4b
MK
14773$ac_includes_default
14774int
14775main ()
14776{
14777char buf[32];
97bf5e38
MK
14778 long long l = 0;
14779 l = (l << 16) + 0x0123;
14780 l = (l << 16) + 0x4567;
14781 l = (l << 16) + 0x89ab;
14782 l = (l << 16) + 0xcdef;
14783 sprintf (buf, "0x%016llx", l);
14784 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14785 ;
14786 return 0;
c906108c 14787}
bec39cab 14788_ACEOF
81ecdfbb 14789if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14790 gdb_cv_printf_has_long_long=yes
14791else
81ecdfbb 14792 gdb_cv_printf_has_long_long=no
97bf5e38 14793fi
81ecdfbb
RW
14794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14795 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14796fi
81ecdfbb 14797
97bf5e38 14798fi
81ecdfbb
RW
14799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14800$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14801if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14802
81ecdfbb 14803$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14804
14805fi
97bf5e38 14806
1a619819
LM
14807# Check if the compiler and runtime support printing decfloats.
14808
81ecdfbb
RW
14809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14810$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 14811if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 14812 $as_echo_n "(cached) " >&6
1a619819 14813else
81ecdfbb 14814 if test "$cross_compiling" = yes; then :
1a619819
LM
14815 gdb_cv_printf_has_decfloat=no
14816else
81ecdfbb 14817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14818/* end confdefs.h. */
14819$ac_includes_default
14820int
14821main ()
14822{
14823char buf[64];
14824 _Decimal32 d32 = 1.2345df;
14825 _Decimal64 d64 = 1.2345dd;
14826 _Decimal128 d128 = 1.2345dl;
14827 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14828 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14829 ;
14830 return 0;
14831}
14832_ACEOF
81ecdfbb 14833if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14834 gdb_cv_printf_has_decfloat=yes
14835else
81ecdfbb 14836 gdb_cv_printf_has_decfloat=no
1a619819 14837fi
81ecdfbb
RW
14838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14839 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14840fi
81ecdfbb 14841
1a619819 14842fi
81ecdfbb
RW
14843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14844$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14845if test $gdb_cv_printf_has_decfloat = yes; then
14846
81ecdfbb 14847$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14848
14849fi
14850
bc8bcb4b
MK
14851# Check if the compiler supports the `long double' type. We can't use
14852# AC_C_LONG_DOUBLE because that one does additional checks on the
14853# constants defined in <float.h> that fail on some systems,
14854# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14855
81ecdfbb
RW
14856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14857$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 14858if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 14859 $as_echo_n "(cached) " >&6
97bf5e38 14860else
81ecdfbb 14861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14862/* end confdefs.h. */
97bf5e38 14863long double foo;
bec39cab 14864_ACEOF
81ecdfbb 14865if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14866 gdb_cv_c_long_double=yes
97bf5e38 14867else
81ecdfbb 14868 gdb_cv_c_long_double=no
97bf5e38 14869fi
81ecdfbb 14870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14871fi
81ecdfbb
RW
14872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14873$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14874if test $gdb_cv_c_long_double = yes; then
c906108c 14875
81ecdfbb 14876$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14877
14878fi
14879
bc8bcb4b 14880# Check if the compiler and runtime support printing long doubles.
97bf5e38 14881
81ecdfbb
RW
14882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14883$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 14884if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 14885 $as_echo_n "(cached) " >&6
97bf5e38 14886else
81ecdfbb 14887 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14888 gdb_cv_printf_has_long_double=no
14889else
81ecdfbb 14890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14891/* end confdefs.h. */
bc8bcb4b
MK
14892$ac_includes_default
14893int
14894main ()
14895{
14896char buf[16];
97bf5e38
MK
14897 long double f = 3.141592653;
14898 sprintf (buf, "%Lg", f);
14899 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14900 ;
14901 return 0;
97bf5e38 14902}
bec39cab 14903_ACEOF
81ecdfbb 14904if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14905 gdb_cv_printf_has_long_double=yes
c906108c 14906else
81ecdfbb 14907 gdb_cv_printf_has_long_double=no
c906108c 14908fi
81ecdfbb
RW
14909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14910 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14911fi
81ecdfbb 14912
c906108c 14913fi
81ecdfbb
RW
14914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14915$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14916if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14917
81ecdfbb 14918$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14919
14920fi
97bf5e38 14921
bc8bcb4b 14922# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14923
81ecdfbb
RW
14924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14925$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 14926if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 14927 $as_echo_n "(cached) " >&6
97bf5e38 14928else
81ecdfbb 14929 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14930 gdb_cv_scanf_has_long_double=no
14931else
81ecdfbb 14932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14933/* end confdefs.h. */
bc8bcb4b
MK
14934#include <stdio.h>
14935int
14936main ()
14937{
14938char *buf = "3.141592653";
97bf5e38
MK
14939 long double f = 0;
14940 sscanf (buf, "%Lg", &f);
14941 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14942 ;
14943 return 0;
97bf5e38 14944}
bec39cab 14945_ACEOF
81ecdfbb 14946if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14947 gdb_cv_scanf_has_long_double=yes
14948else
81ecdfbb 14949 gdb_cv_scanf_has_long_double=no
97bf5e38 14950fi
81ecdfbb
RW
14951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14952 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14953fi
81ecdfbb 14954
c906108c 14955fi
81ecdfbb
RW
14956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14957$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14958if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14959
81ecdfbb 14960$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14961
14962fi
c906108c 14963
438013df
AO
14964case ${host_os} in
14965aix*)
81ecdfbb
RW
14966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14967$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 14968if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 14969 $as_echo_n "(cached) " >&6
438013df 14970else
bec39cab 14971
438013df
AO
14972 SAVE_LDFLAGS=$LDFLAGS
14973
14974 case $GCC in
14975 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14976 *) gdb_cv_bigtoc=-bbigtoc ;;
14977 esac
14978
14979 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14981/* end confdefs.h. */
438013df 14982
bec39cab
AC
14983int
14984main ()
14985{
438013df 14986int i;
bec39cab
AC
14987 ;
14988 return 0;
14989}
14990_ACEOF
81ecdfbb 14991if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14992
81ecdfbb
RW
14993else
14994 gdb_cv_bigtoc=
438013df 14995fi
81ecdfbb
RW
14996rm -f core conftest.err conftest.$ac_objext \
14997 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14998 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14999
bec39cab 15000fi
81ecdfbb
RW
15001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15002$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
15003 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15004 ;;
15005esac
15006
38f6b338 15007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 15008$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
15009dynamic_list=false
15010if test "${gdb_native}" = yes; then
15011 # The dynamically loaded libthread_db needs access to symbols in the gdb
15012 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15013 # may not be supported there.
15014 old_LDFLAGS="$LDFLAGS"
15015 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15016 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15017 LDFLAGS="$LDFLAGS $RDYNAMIC"
15018 if test "${have_libpython}" = no; then
15019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
15020/* end confdefs.h. */
15021
15022int
15023main ()
15024{
15025
15026 ;
15027 return 0;
15028}
15029_ACEOF
15030if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
15031 dynamic_list=true
15032fi
15033rm -f core conftest.err conftest.$ac_objext \
15034 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
15035 else
15036 # Workaround http://bugs.python.org/issue4434 where static
15037 # libpythonX.Y.a would get its symbols required for
15038 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15039 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
15040
15041 # Note the workaround for Python
15042 # http://bugs.python.org/issue10112 earlier has removed
15043 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15044 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15045 # always pass.
38f6b338
JK
15046 old_CFLAGS="$CFLAGS"
15047 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
15048 old_LIBS="$LIBS"
15049 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
15050 old_CPPFLAGS="$CPPFLAGS"
15051 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 15052 if test "$cross_compiling" = yes; then :
3bebe2f2 15053 true
f6528abd 15054else
3bebe2f2
JK
15055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15056/* end confdefs.h. */
1b4f615e 15057#include "Python.h"
3bebe2f2
JK
15058int
15059main ()
15060{
15061int err;
38f6b338
JK
15062 Py_Initialize ();
15063 err = PyRun_SimpleString ("import itertools\n");
15064 Py_Finalize ();
15065 return err == 0 ? 0 : 1;
3bebe2f2
JK
15066 ;
15067 return 0;
15068}
15069_ACEOF
15070if ac_fn_c_try_run "$LINENO"; then :
15071 dynamic_list=true
15072fi
15073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15074 conftest.$ac_objext conftest.beam conftest.$ac_ext
15075fi
15076
8c1fb155 15077 LIBS="$old_LIBS"
38f6b338 15078 CFLAGS="$old_CFLAGS"
1b4f615e 15079 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
15080 fi
15081 LDFLAGS="$old_LDFLAGS"
15082fi
15083if $dynamic_list; then
15084 found="-Wl,--dynamic-list"
15085 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15086else
38f6b338
JK
15087 found="-rdynamic"
15088 RDYNAMIC="-rdynamic"
f6528abd 15089fi
f6528abd 15090
38f6b338 15091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15092$as_echo "$found" >&6; }
0407b3f1 15093
f6528abd 15094
0407b3f1 15095if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 15096 case ${host_os} in
d92419e5 15097 aix*)
81ecdfbb
RW
15098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15099$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 15100 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 15101 $as_echo_n "(cached) " >&6
bec39cab 15102else
81ecdfbb 15103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15104/* end confdefs.h. */
d92419e5 15105#include <sys/pthdebug.h>
bec39cab
AC
15106int
15107main ()
15108{
d92419e5
JB
15109#ifndef PTHDB_VERSION_3
15110 #error
15111 #endif
bec39cab
AC
15112 ;
15113 return 0;
15114}
15115_ACEOF
81ecdfbb 15116if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15117 gdb_cv_have_aix_thread_debug=yes
15118else
81ecdfbb 15119 gdb_cv_have_aix_thread_debug=no
d92419e5 15120fi
81ecdfbb 15121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15122fi
15123
81ecdfbb
RW
15124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15125$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
15126 if test $gdb_cv_have_aix_thread_debug = yes; then
15127 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15128 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15129 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15130
15131 # Older versions of AIX do not provide the declaration for
15132 # the getthrds function (it appears that it was introduced
15133 # with AIX 6.x).
15134 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15135"
d0ac1c44 15136if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
15137 ac_have_decl=1
15138else
15139 ac_have_decl=0
15140fi
15141
15142cat >>confdefs.h <<_ACEOF
15143#define HAVE_DECL_GETTHRDS $ac_have_decl
15144_ACEOF
15145
d92419e5
JB
15146 fi
15147 ;;
c906108c 15148 esac
bec39cab 15149
c906108c
SS
15150fi
15151
3f47be5c 15152if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15154$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 15155if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 15156 $as_echo_n "(cached) " >&6
bec39cab 15157else
81ecdfbb 15158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15159/* end confdefs.h. */
3f47be5c 15160#include <thread_db.h>
bec39cab
AC
15161int
15162main ()
15163{
3f47be5c 15164int i = TD_NOTALLOC;
bec39cab
AC
15165 ;
15166 return 0;
15167}
15168_ACEOF
81ecdfbb 15169if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15170 gdb_cv_thread_db_h_has_td_notalloc=yes
15171else
81ecdfbb 15172 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15173
3f47be5c 15174fi
81ecdfbb 15175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15176
bec39cab 15177fi
81ecdfbb
RW
15178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15179$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15181$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 15182if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 15183 $as_echo_n "(cached) " >&6
59f80f10 15184else
81ecdfbb 15185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15186/* end confdefs.h. */
15187#include <thread_db.h>
15188int
15189main ()
15190{
15191int i = TD_VERSION;
15192 ;
15193 return 0;
15194}
15195_ACEOF
81ecdfbb 15196if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15197 gdb_cv_thread_db_h_has_td_version=yes
15198else
81ecdfbb 15199 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15200
15201fi
81ecdfbb 15202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15203
15204fi
81ecdfbb
RW
15205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15206$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15208$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 15209if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15210 $as_echo_n "(cached) " >&6
59f80f10 15211else
81ecdfbb 15212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15213/* end confdefs.h. */
15214#include <thread_db.h>
15215int
15216main ()
15217{
15218int i = TD_NOTLS;
15219 ;
15220 return 0;
15221}
15222_ACEOF
81ecdfbb 15223if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15224 gdb_cv_thread_db_h_has_td_notls=yes
15225else
81ecdfbb 15226 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15227
15228fi
81ecdfbb 15229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15230
15231fi
81ecdfbb
RW
15232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15233$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15234fi
15235if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15236
81ecdfbb 15237$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15238
59f80f10
DJ
15239fi
15240if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15241
81ecdfbb 15242$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15243
15244fi
15245if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15246
81ecdfbb 15247$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15248
3f47be5c
EZ
15249fi
15250
81ecdfbb
RW
15251ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15252"
d0ac1c44 15253if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15254 ac_have_decl=1
10568435 15255else
81ecdfbb 15256 ac_have_decl=0
10568435 15257fi
10568435
JK
15258
15259cat >>confdefs.h <<_ACEOF
81ecdfbb 15260#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15261_ACEOF
15262
15263
81ecdfbb
RW
15264if test "$cross_compiling" = yes; then :
15265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15266/* end confdefs.h. */
15267#include <sys/personality.h>
15268int
15269main ()
15270{
15271
15272# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15273# define ADDR_NO_RANDOMIZE 0x0040000
15274# endif
15275 /* Test the flag could be set and stays set. */
15276 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15277 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15278 return 1
15279 ;
15280 return 0;
15281}
15282_ACEOF
81ecdfbb 15283if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15284 have_personality=true
15285else
81ecdfbb 15286 have_personality=false
10568435 15287fi
81ecdfbb
RW
15288rm -f core conftest.err conftest.$ac_objext \
15289 conftest$ac_exeext conftest.$ac_ext
10568435 15290else
81ecdfbb 15291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15292/* end confdefs.h. */
15293#include <sys/personality.h>
15294int
15295main ()
15296{
15297
15298# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15299# define ADDR_NO_RANDOMIZE 0x0040000
15300# endif
15301 /* Test the flag could be set and stays set. */
15302 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15303 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15304 return 1
15305 ;
15306 return 0;
15307}
15308_ACEOF
81ecdfbb 15309if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15310 have_personality=true
15311else
81ecdfbb 15312 have_personality=false
10568435 15313fi
81ecdfbb
RW
15314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15315 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15316fi
81ecdfbb 15317
10568435
JK
15318if $have_personality
15319then
15320
81ecdfbb 15321$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15322
15323fi
15324
e655c1a2
PA
15325case $host_os in
15326 go32* | *djgpp*)
15327 gdbinit=gdb.ini
15328 ;;
15329 *)
15330 gdbinit=.gdbinit
15331 ;;
15332esac
15333
15334cat >>confdefs.h <<_ACEOF
15335#define GDBINIT "$gdbinit"
15336_ACEOF
15337
15338
fb40c209 15339
f83d8a90
DE
15340# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15341# except that the argument to --with-sysroot is optional.
15342# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15343if test "x$with_sysroot" = xyes; then
15344 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15345fi
bec39cab 15346
81ecdfbb
RW
15347# Check whether --with-sysroot was given.
15348if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15349 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15350else
15351 TARGET_SYSTEM_ROOT=
15352fi
030292b7 15353
030292b7 15354
f83d8a90
DE
15355 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15356 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15357 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15358 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15359
f83d8a90
DE
15360cat >>confdefs.h <<_ACEOF
15361#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15362_ACEOF
bec39cab 15363
030292b7 15364
b14b1491 15365
f83d8a90
DE
15366
15367 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15368 if test "x$prefix" = xNONE; then
15369 test_prefix=/usr/local
15370 else
15371 test_prefix=$prefix
15372 fi
15373 else
15374 test_prefix=$exec_prefix
15375 fi
15376 value=0
15377 case ${ac_define_dir} in
15378 "${test_prefix}"|"${test_prefix}/"*|\
15379 '${exec_prefix}'|'${exec_prefix}/'*)
15380 value=1
15381 ;;
15382 esac
15383
15384cat >>confdefs.h <<_ACEOF
15385#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15386_ACEOF
030292b7
DJ
15387
15388
15389
16e7150e 15390
16e7150e 15391
81ecdfbb
RW
15392# Check whether --with-system-gdbinit was given.
15393if test "${with_system_gdbinit+set}" = set; then :
15394 withval=$with_system_gdbinit;
b14b1491
TT
15395 SYSTEM_GDBINIT=$withval
15396else
15397 SYSTEM_GDBINIT=
81ecdfbb
RW
15398fi
15399
16e7150e
JG
15400
15401 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15402 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15403 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15404 ac_define_dir=`eval echo $ac_define_dir`
15405
15406cat >>confdefs.h <<_ACEOF
15407#define SYSTEM_GDBINIT "$ac_define_dir"
15408_ACEOF
15409
15410
15411
0c4a4063 15412
b14b1491
TT
15413 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15414 if test "x$prefix" = xNONE; then
15415 test_prefix=/usr/local
15416 else
15417 test_prefix=$prefix
15418 fi
15419 else
15420 test_prefix=$exec_prefix
15421 fi
15422 value=0
15423 case ${ac_define_dir} in
15424 "${test_prefix}"|"${test_prefix}/"*|\
15425 '${exec_prefix}'|'${exec_prefix}/'*)
15426 value=1
15427 ;;
15428 esac
16e7150e 15429
b14b1491
TT
15430cat >>confdefs.h <<_ACEOF
15431#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15432_ACEOF
15433
b14b1491 15434
16e7150e 15435
0c4a4063 15436
b835bb52 15437
81ecdfbb
RW
15438# Check whether --enable-werror was given.
15439if test "${enable_werror+set}" = set; then :
15440 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15441 yes | y) ERROR_ON_WARNING="yes" ;;
15442 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 15443 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15444 esac
81ecdfbb
RW
15445fi
15446
094a342e 15447
9a084706
PA
15448# Enable -Werror by default when using gcc. Turn it off for releases.
15449if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15450 ERROR_ON_WARNING=yes
15451fi
15452
15453WERROR_CFLAGS=""
15454if test "${ERROR_ON_WARNING}" = yes ; then
15455 WERROR_CFLAGS="-Werror"
15456fi
15457
cf6de44d 15458# The options we'll try to enable.
aac331e4 15459build_warnings="-Wall -Wpointer-arith \
a0de763e 15460-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 15461-Wno-switch -Wno-char-subscripts \
cf6de44d 15462-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 15463-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 15464-Wno-mismatched-tags \
632e107b 15465-Wno-error=deprecated-register \
85e26832 15466-Wsuggest-override \
1a34f210 15467-Wimplicit-fallthrough=3 \
96643e35
TT
15468-Wduplicated-cond \
15469-Wshadow=local"
3bc3d82a 15470
3526781e 15471case "${host}" in
4fa7574e
RO
15472 *-*-mingw32*)
15473 # Enable -Wno-format by default when using gcc on mingw since many
15474 # GCC versions complain about %I64.
15475 build_warnings="$build_warnings -Wno-format" ;;
15476 *-*-solaris*)
15477 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15478 # doesn't understand.
15479 build_warnings="$build_warnings -Wno-unknown-pragmas"
15480 # Solaris 11 <unistd.h> marks vfork deprecated.
15481 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
15482 *)
15483 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
15484 # but there's a special case for this below.
15485 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15486esac
15487
81ecdfbb
RW
15488# Check whether --enable-build-warnings was given.
15489if test "${enable_build_warnings+set}" = set; then :
15490 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15491 yes) ;;
15492 no) build_warnings="-w";;
15493 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15494 build_warnings="${build_warnings} ${t}";;
15495 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15496 build_warnings="${t} ${build_warnings}";;
15497 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15498esac
d4f3574e 15499if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15500 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15501fi
81ecdfbb
RW
15502fi
15503# Check whether --enable-gdb-build-warnings was given.
15504if test "${enable_gdb_build_warnings+set}" = set; then :
15505 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15506 yes) ;;
15507 no) build_warnings="-w";;
15508 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15509 build_warnings="${build_warnings} ${t}";;
15510 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15511 build_warnings="${t} ${build_warnings}";;
15512 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15513esac
15514if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15515 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15516fi
81ecdfbb 15517fi
3bc3d82a
PA
15518
15519# The set of warnings supported by a C++ compiler is not the same as
15520# of the C compiler.
cf6de44d 15521ac_ext=cpp
3bc3d82a
PA
15522ac_cpp='$CXXCPP $CPPFLAGS'
15523ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15524ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15525ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15526
3bc3d82a 15527
81ecdfbb 15528WARN_CFLAGS=""
c906108c
SS
15529if test "x${build_warnings}" != x -a "x$GCC" = xyes
15530then
81ecdfbb
RW
15531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15532$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15533 # Separate out the -Werror flag as some files just cannot be
15534 # compiled with it enabled.
15535 for w in ${build_warnings}; do
7544db95
PA
15536 # GCC does not complain about -Wno-unknown-warning. Invert
15537 # and test -Wunknown-warning instead.
15538 case $w in
15539 -Wno-*)
15540 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
15541 -Wformat-nonliteral)
15542 # gcc requires -Wformat before -Wformat-nonliteral
15543 # will work, so stick them together.
15544 w="-Wformat $w"
15545 wtest="$w"
15546 ;;
7544db95
PA
15547 *)
15548 wtest=$w ;;
15549 esac
15550
746a987d
AC
15551 case $w in
15552 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15553 *)
15554 # Check whether GCC accepts it.
4536bbc6 15555 saved_CFLAGS="$CFLAGS"
3e019bdc 15556 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15557 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15558 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
15559 if test "x$w" = "x-Wunused-variable"; then
15560 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
15561 # fixed in GCC 4.9. This test is derived from the gdb
15562 # source code that triggered this bug in GCC.
15563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15564/* end confdefs.h. */
15565struct scoped_restore_base {};
15566 struct scoped_restore_tmpl : public scoped_restore_base {
15567 ~scoped_restore_tmpl() {}
15568 };
15569int
15570main ()
15571{
15572const scoped_restore_base &b = scoped_restore_tmpl();
15573 ;
15574 return 0;
15575}
15576_ACEOF
15577if ac_fn_cxx_try_compile "$LINENO"; then :
15578 WARN_CFLAGS="${WARN_CFLAGS} $w"
15579fi
15580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15581 else
15582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15583/* end confdefs.h. */
4536bbc6 15584
bec39cab
AC
15585int
15586main ()
15587{
4536bbc6 15588
bec39cab
AC
15589 ;
15590 return 0;
15591}
15592_ACEOF
3bc3d82a 15593if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15594 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15595fi
81ecdfbb 15596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 15597 fi
4536bbc6 15598 CFLAGS="$saved_CFLAGS"
3bc3d82a 15599 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15600 esac
15601 done
81ecdfbb
RW
15602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15603$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15604fi
15605
15606
104c1213 15607
cf6de44d 15608ac_ext=c
3bc3d82a
PA
15609ac_cpp='$CPP $CPPFLAGS'
15610ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15611ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15612ac_compiler_gnu=$ac_cv_c_compiler_gnu
15613
3bc3d82a 15614
b835bb52 15615
f35d5ade
TT
15616# Check whether --enable-ubsan was given.
15617if test "${enable_ubsan+set}" = set; then :
15618 enableval=$enable_ubsan;
15619else
eff98030 15620 enable_ubsan=no
f35d5ade
TT
15621fi
15622
15623if test "x$enable_ubsan" = xauto; then
15624 if $development; then
15625 enable_ubsan=yes
15626 fi
15627fi
15628ac_ext=cpp
15629ac_cpp='$CXXCPP $CPPFLAGS'
15630ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15631ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15632ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15633
15634if test "x$enable_ubsan" = xyes; then
15635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
15636$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
15637 saved_CXXFLAGS="$CXXFLAGS"
15638 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15640/* end confdefs.h. */
15641
15642int
15643main ()
15644{
15645
15646 ;
15647 return 0;
15648}
15649_ACEOF
15650if ac_fn_cxx_try_link "$LINENO"; then :
15651 enable_ubsan=yes
15652else
15653 enable_ubsan=no
15654fi
15655rm -f core conftest.err conftest.$ac_objext \
15656 conftest$ac_exeext conftest.$ac_ext
15657 CXXFLAGS="$saved_CXXFLAGS"
15658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
15659$as_echo "$enable_ubsan" >&6; }
15660 if test "x$enable_ubsan" = xyes; then
15661 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15662 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
15663 fi
15664fi
15665ac_ext=c
15666ac_cpp='$CPP $CPPFLAGS'
15667ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15668ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15669ac_compiler_gnu=$ac_cv_c_compiler_gnu
15670
15671
15672
7a292a7a 15673# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15675$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 15676if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 15677 $as_echo_n "(cached) " >&6
bec39cab 15678else
81ecdfbb 15679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15680/* end confdefs.h. */
7a292a7a
SS
15681
15682#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15683lose
15684#endif
bec39cab 15685_ACEOF
7a292a7a 15686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15687 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15688 gdb_cv_os_cygwin=yes
15689else
7a292a7a
SS
15690 gdb_cv_os_cygwin=no
15691fi
15692rm -f conftest*
15693
15694fi
81ecdfbb
RW
15695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15696$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15697
aff38e61 15698
3eb25fda 15699SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15700case ${host} in
95cbc983
AC
15701 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15702 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15703 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 15704 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
15705esac
15706
15707
cd0fc7c3
SS
15708# libreadline needs libuser32.a in a cygwin environment
15709WIN32LIBS=
15710if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15711 WIN32LIBS="-luser32"
15712 case "${target}" in
15713 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15714 ;;
15715 esac
cd0fc7c3 15716fi
c906108c 15717
b4505029
MM
15718# The ser-tcp.c module requires sockets.
15719case ${host} in
15720 *mingw32*)
15721
81ecdfbb 15722$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15723
15724 WIN32LIBS="$WIN32LIBS -lws2_32"
15725 ;;
15726esac
15727
7a292a7a 15728
31d99776 15729# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15730
15731 OLD_CFLAGS=$CFLAGS
15732 OLD_LDFLAGS=$LDFLAGS
15733 OLD_LIBS=$LIBS
15734 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15735 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15736 # always want our bfd.
15737 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15738 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15739 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15740 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15741 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 15743$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 15744if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 15745 $as_echo_n "(cached) " >&6
31d99776 15746else
81ecdfbb 15747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15748/* end confdefs.h. */
15749#include <stdlib.h>
def63ff0
TT
15750 #include "bfd.h"
15751 #include "elf-bfd.h"
31d99776
DJ
15752
15753int
15754main ()
15755{
def63ff0 15756return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15757 ;
15758 return 0;
15759}
15760_ACEOF
81ecdfbb 15761if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15762 gdb_cv_var_elf=yes
15763else
81ecdfbb 15764 gdb_cv_var_elf=no
31d99776 15765fi
81ecdfbb
RW
15766rm -f core conftest.err conftest.$ac_objext \
15767 conftest$ac_exeext conftest.$ac_ext
31d99776 15768fi
81ecdfbb
RW
15769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15770$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15771 CFLAGS=$OLD_CFLAGS
15772 LDFLAGS=$OLD_LDFLAGS
15773 LIBS=$OLD_LIBS
31d99776 15774if test $gdb_cv_var_elf = yes; then
d4777acb 15775 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15776
81ecdfbb 15777$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15778
075ff26d
JK
15779 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15780 if test "$plugins" = "yes"; then
a48b32c0
L
15781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15782$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 15783if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15784 $as_echo_n "(cached) " >&6
15785else
15786 ac_func_search_save_LIBS=$LIBS
15787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15788/* end confdefs.h. */
15789
15790/* Override any GCC internal prototype to avoid an error.
15791 Use char because int might match the return type of a GCC
15792 builtin and then its argument prototype would still apply. */
15793#ifdef __cplusplus
15794extern "C"
15795#endif
15796char dlopen ();
15797int
15798main ()
15799{
15800return dlopen ();
15801 ;
15802 return 0;
15803}
15804_ACEOF
15805for ac_lib in '' dl; do
15806 if test -z "$ac_lib"; then
15807 ac_res="none required"
15808 else
15809 ac_res=-l$ac_lib
15810 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15811 fi
15812 if ac_fn_c_try_link "$LINENO"; then :
15813 ac_cv_search_dlopen=$ac_res
15814fi
15815rm -f core conftest.err conftest.$ac_objext \
15816 conftest$ac_exeext
d0ac1c44 15817 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15818 break
15819fi
15820done
d0ac1c44 15821if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15822
15823else
15824 ac_cv_search_dlopen=no
15825fi
15826rm conftest.$ac_ext
15827LIBS=$ac_func_search_save_LIBS
15828fi
15829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15830$as_echo "$ac_cv_search_dlopen" >&6; }
15831ac_res=$ac_cv_search_dlopen
15832if test "$ac_res" != no; then :
15833 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15834
15835fi
15836
075ff26d 15837 fi
31d99776 15838fi
31d99776 15839
4f05add4
TT
15840# Add macho support to GDB, but only if BFD includes it.
15841
15842 OLD_CFLAGS=$CFLAGS
15843 OLD_LDFLAGS=$LDFLAGS
15844 OLD_LIBS=$LIBS
15845 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15846 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15847 # always want our bfd.
15848 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15849 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15850 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15851 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15852 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15854$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 15855if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
15856 $as_echo_n "(cached) " >&6
15857else
15858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15859/* end confdefs.h. */
15860#include <stdlib.h>
15861 #include "bfd.h"
15862 #include "mach-o.h"
15863
15864int
15865main ()
15866{
15867return bfd_mach_o_lookup_command (NULL, 0, NULL);
15868 ;
15869 return 0;
15870}
15871_ACEOF
15872if ac_fn_c_try_link "$LINENO"; then :
15873 gdb_cv_var_macho=yes
15874else
15875 gdb_cv_var_macho=no
15876fi
15877rm -f core conftest.err conftest.$ac_objext \
15878 conftest$ac_exeext conftest.$ac_ext
15879fi
15880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15881$as_echo "$gdb_cv_var_macho" >&6; }
15882 CFLAGS=$OLD_CFLAGS
15883 LDFLAGS=$OLD_LDFLAGS
15884 LIBS=$OLD_LIBS
15885if test $gdb_cv_var_macho = yes; then
15886 CONFIG_OBS="$CONFIG_OBS machoread.o"
15887fi
15888
121ce6e5
DJ
15889# Add any host-specific objects to GDB.
15890CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15891
608e2dbb
TT
15892# If building on ELF, look for lzma support for embedded compressed debug info.
15893if test $gdb_cv_var_elf = yes; then
15894
15895# Check whether --with-lzma was given.
15896if test "${with_lzma+set}" = set; then :
15897 withval=$with_lzma;
15898else
15899 with_lzma=auto
15900fi
15901
15902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15903$as_echo_n "checking whether to use lzma... " >&6; }
15904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15905$as_echo "$with_lzma" >&6; }
15906
15907 if test "${with_lzma}" != no; then
15908
15909
15910
15911
15912
15913
15914
15915
15916 use_additional=yes
15917
15918 acl_save_prefix="$prefix"
15919 prefix="$acl_final_prefix"
15920 acl_save_exec_prefix="$exec_prefix"
15921 exec_prefix="$acl_final_exec_prefix"
15922
15923 eval additional_includedir=\"$includedir\"
15924 eval additional_libdir=\"$libdir\"
15925
15926 exec_prefix="$acl_save_exec_prefix"
15927 prefix="$acl_save_prefix"
15928
15929
15930# Check whether --with-liblzma-prefix was given.
15931if test "${with_liblzma_prefix+set}" = set; then :
15932 withval=$with_liblzma_prefix;
15933 if test "X$withval" = "Xno"; then
15934 use_additional=no
15935 else
15936 if test "X$withval" = "X"; then
15937
15938 acl_save_prefix="$prefix"
15939 prefix="$acl_final_prefix"
15940 acl_save_exec_prefix="$exec_prefix"
15941 exec_prefix="$acl_final_exec_prefix"
15942
15943 eval additional_includedir=\"$includedir\"
15944 eval additional_libdir=\"$libdir\"
15945
15946 exec_prefix="$acl_save_exec_prefix"
15947 prefix="$acl_save_prefix"
15948
15949 else
15950 additional_includedir="$withval/include"
15951 additional_libdir="$withval/lib"
15952 fi
15953 fi
15954
15955fi
15956
15957 LIBLZMA=
15958 LTLIBLZMA=
15959 INCLZMA=
15960 rpathdirs=
15961 ltrpathdirs=
15962 names_already_handled=
15963 names_next_round='lzma '
15964 while test -n "$names_next_round"; do
15965 names_this_round="$names_next_round"
15966 names_next_round=
15967 for name in $names_this_round; do
15968 already_handled=
15969 for n in $names_already_handled; do
15970 if test "$n" = "$name"; then
15971 already_handled=yes
15972 break
15973 fi
15974 done
15975 if test -z "$already_handled"; then
15976 names_already_handled="$names_already_handled $name"
15977 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15978 eval value=\"\$HAVE_LIB$uppername\"
15979 if test -n "$value"; then
15980 if test "$value" = yes; then
15981 eval value=\"\$LIB$uppername\"
15982 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15983 eval value=\"\$LTLIB$uppername\"
15984 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15985 else
15986 :
15987 fi
15988 else
15989 found_dir=
15990 found_la=
15991 found_so=
15992 found_a=
15993 if test $use_additional = yes; then
15994 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15995 found_dir="$additional_libdir"
15996 found_so="$additional_libdir/lib$name.$shlibext"
15997 if test -f "$additional_libdir/lib$name.la"; then
15998 found_la="$additional_libdir/lib$name.la"
15999 fi
16000 else
16001 if test -f "$additional_libdir/lib$name.$libext"; then
16002 found_dir="$additional_libdir"
16003 found_a="$additional_libdir/lib$name.$libext"
16004 if test -f "$additional_libdir/lib$name.la"; then
16005 found_la="$additional_libdir/lib$name.la"
16006 fi
16007 fi
16008 fi
16009 fi
16010 if test "X$found_dir" = "X"; then
16011 for x in $LDFLAGS $LTLIBLZMA; do
16012
16013 acl_save_prefix="$prefix"
16014 prefix="$acl_final_prefix"
16015 acl_save_exec_prefix="$exec_prefix"
16016 exec_prefix="$acl_final_exec_prefix"
16017 eval x=\"$x\"
16018 exec_prefix="$acl_save_exec_prefix"
16019 prefix="$acl_save_prefix"
16020
16021 case "$x" in
16022 -L*)
16023 dir=`echo "X$x" | sed -e 's/^X-L//'`
16024 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16025 found_dir="$dir"
16026 found_so="$dir/lib$name.$shlibext"
16027 if test -f "$dir/lib$name.la"; then
16028 found_la="$dir/lib$name.la"
16029 fi
16030 else
16031 if test -f "$dir/lib$name.$libext"; then
16032 found_dir="$dir"
16033 found_a="$dir/lib$name.$libext"
16034 if test -f "$dir/lib$name.la"; then
16035 found_la="$dir/lib$name.la"
16036 fi
16037 fi
16038 fi
16039 ;;
16040 esac
16041 if test "X$found_dir" != "X"; then
16042 break
16043 fi
16044 done
16045 fi
16046 if test "X$found_dir" != "X"; then
16047 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16048 if test "X$found_so" != "X"; then
16049 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16050 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16051 else
16052 haveit=
16053 for x in $ltrpathdirs; do
16054 if test "X$x" = "X$found_dir"; then
16055 haveit=yes
16056 break
16057 fi
16058 done
16059 if test -z "$haveit"; then
16060 ltrpathdirs="$ltrpathdirs $found_dir"
16061 fi
16062 if test "$hardcode_direct" = yes; then
16063 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16064 else
16065 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16066 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16067 haveit=
16068 for x in $rpathdirs; do
16069 if test "X$x" = "X$found_dir"; then
16070 haveit=yes
16071 break
16072 fi
16073 done
16074 if test -z "$haveit"; then
16075 rpathdirs="$rpathdirs $found_dir"
16076 fi
16077 else
16078 haveit=
16079 for x in $LDFLAGS $LIBLZMA; do
16080
16081 acl_save_prefix="$prefix"
16082 prefix="$acl_final_prefix"
16083 acl_save_exec_prefix="$exec_prefix"
16084 exec_prefix="$acl_final_exec_prefix"
16085 eval x=\"$x\"
16086 exec_prefix="$acl_save_exec_prefix"
16087 prefix="$acl_save_prefix"
16088
16089 if test "X$x" = "X-L$found_dir"; then
16090 haveit=yes
16091 break
16092 fi
16093 done
16094 if test -z "$haveit"; then
16095 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16096 fi
16097 if test "$hardcode_minus_L" != no; then
16098 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16099 else
16100 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16101 fi
16102 fi
16103 fi
16104 fi
16105 else
16106 if test "X$found_a" != "X"; then
16107 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16108 else
16109 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16110 fi
16111 fi
16112 additional_includedir=
16113 case "$found_dir" in
16114 */lib | */lib/)
16115 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16116 additional_includedir="$basedir/include"
16117 ;;
16118 esac
16119 if test "X$additional_includedir" != "X"; then
16120 if test "X$additional_includedir" != "X/usr/include"; then
16121 haveit=
16122 if test "X$additional_includedir" = "X/usr/local/include"; then
16123 if test -n "$GCC"; then
16124 case $host_os in
16125 linux*) haveit=yes;;
16126 esac
16127 fi
16128 fi
16129 if test -z "$haveit"; then
16130 for x in $CPPFLAGS $INCLZMA; do
16131
16132 acl_save_prefix="$prefix"
16133 prefix="$acl_final_prefix"
16134 acl_save_exec_prefix="$exec_prefix"
16135 exec_prefix="$acl_final_exec_prefix"
16136 eval x=\"$x\"
16137 exec_prefix="$acl_save_exec_prefix"
16138 prefix="$acl_save_prefix"
16139
16140 if test "X$x" = "X-I$additional_includedir"; then
16141 haveit=yes
16142 break
16143 fi
16144 done
16145 if test -z "$haveit"; then
16146 if test -d "$additional_includedir"; then
16147 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16148 fi
16149 fi
16150 fi
16151 fi
16152 fi
16153 if test -n "$found_la"; then
16154 save_libdir="$libdir"
16155 case "$found_la" in
16156 */* | *\\*) . "$found_la" ;;
16157 *) . "./$found_la" ;;
16158 esac
16159 libdir="$save_libdir"
16160 for dep in $dependency_libs; do
16161 case "$dep" in
16162 -L*)
16163 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16164 if test "X$additional_libdir" != "X/usr/lib"; then
16165 haveit=
16166 if test "X$additional_libdir" = "X/usr/local/lib"; then
16167 if test -n "$GCC"; then
16168 case $host_os in
16169 linux*) haveit=yes;;
16170 esac
16171 fi
16172 fi
16173 if test -z "$haveit"; then
16174 haveit=
16175 for x in $LDFLAGS $LIBLZMA; do
16176
16177 acl_save_prefix="$prefix"
16178 prefix="$acl_final_prefix"
16179 acl_save_exec_prefix="$exec_prefix"
16180 exec_prefix="$acl_final_exec_prefix"
16181 eval x=\"$x\"
16182 exec_prefix="$acl_save_exec_prefix"
16183 prefix="$acl_save_prefix"
16184
16185 if test "X$x" = "X-L$additional_libdir"; then
16186 haveit=yes
16187 break
16188 fi
16189 done
16190 if test -z "$haveit"; then
16191 if test -d "$additional_libdir"; then
16192 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16193 fi
16194 fi
16195 haveit=
16196 for x in $LDFLAGS $LTLIBLZMA; do
16197
16198 acl_save_prefix="$prefix"
16199 prefix="$acl_final_prefix"
16200 acl_save_exec_prefix="$exec_prefix"
16201 exec_prefix="$acl_final_exec_prefix"
16202 eval x=\"$x\"
16203 exec_prefix="$acl_save_exec_prefix"
16204 prefix="$acl_save_prefix"
16205
16206 if test "X$x" = "X-L$additional_libdir"; then
16207 haveit=yes
16208 break
16209 fi
16210 done
16211 if test -z "$haveit"; then
16212 if test -d "$additional_libdir"; then
16213 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16214 fi
16215 fi
16216 fi
16217 fi
16218 ;;
16219 -R*)
16220 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16221 if test "$enable_rpath" != no; then
16222 haveit=
16223 for x in $rpathdirs; do
16224 if test "X$x" = "X$dir"; then
16225 haveit=yes
16226 break
16227 fi
16228 done
16229 if test -z "$haveit"; then
16230 rpathdirs="$rpathdirs $dir"
16231 fi
16232 haveit=
16233 for x in $ltrpathdirs; do
16234 if test "X$x" = "X$dir"; then
16235 haveit=yes
16236 break
16237 fi
16238 done
16239 if test -z "$haveit"; then
16240 ltrpathdirs="$ltrpathdirs $dir"
16241 fi
16242 fi
16243 ;;
16244 -l*)
16245 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16246 ;;
16247 *.la)
16248 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16249 ;;
16250 *)
16251 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16252 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16253 ;;
16254 esac
16255 done
16256 fi
16257 else
16258 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16259 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16260 fi
16261 fi
16262 fi
16263 done
16264 done
16265 if test "X$rpathdirs" != "X"; then
16266 if test -n "$hardcode_libdir_separator"; then
16267 alldirs=
16268 for found_dir in $rpathdirs; do
16269 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16270 done
16271 acl_save_libdir="$libdir"
16272 libdir="$alldirs"
16273 eval flag=\"$hardcode_libdir_flag_spec\"
16274 libdir="$acl_save_libdir"
16275 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16276 else
16277 for found_dir in $rpathdirs; do
16278 acl_save_libdir="$libdir"
16279 libdir="$found_dir"
16280 eval flag=\"$hardcode_libdir_flag_spec\"
16281 libdir="$acl_save_libdir"
16282 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16283 done
16284 fi
16285 fi
16286 if test "X$ltrpathdirs" != "X"; then
16287 for found_dir in $ltrpathdirs; do
16288 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16289 done
16290 fi
16291
16292
16293 ac_save_CPPFLAGS="$CPPFLAGS"
16294
16295 for element in $INCLZMA; do
16296 haveit=
16297 for x in $CPPFLAGS; do
16298
16299 acl_save_prefix="$prefix"
16300 prefix="$acl_final_prefix"
16301 acl_save_exec_prefix="$exec_prefix"
16302 exec_prefix="$acl_final_exec_prefix"
16303 eval x=\"$x\"
16304 exec_prefix="$acl_save_exec_prefix"
16305 prefix="$acl_save_prefix"
16306
16307 if test "X$x" = "X$element"; then
16308 haveit=yes
16309 break
16310 fi
16311 done
16312 if test -z "$haveit"; then
16313 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16314 fi
16315 done
16316
16317
16318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16319$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16320if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16321 $as_echo_n "(cached) " >&6
16322else
16323
16324 ac_save_LIBS="$LIBS"
16325 LIBS="$LIBS $LIBLZMA"
16326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16327/* end confdefs.h. */
16328#include "lzma.h"
16329int
16330main ()
16331{
16332lzma_index_iter iter;
16333 lzma_index_iter_init (&iter, 0);
16334 lzma_mf_is_supported (LZMA_MF_HC3);
16335 ;
16336 return 0;
16337}
16338_ACEOF
16339if ac_fn_c_try_link "$LINENO"; then :
16340 ac_cv_liblzma=yes
16341else
16342 ac_cv_liblzma=no
16343fi
16344rm -f core conftest.err conftest.$ac_objext \
16345 conftest$ac_exeext conftest.$ac_ext
16346 LIBS="$ac_save_LIBS"
16347
16348fi
16349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16350$as_echo "$ac_cv_liblzma" >&6; }
16351 if test "$ac_cv_liblzma" = yes; then
16352 HAVE_LIBLZMA=yes
16353
16354$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16355
16356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16357$as_echo_n "checking how to link with liblzma... " >&6; }
16358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16359$as_echo "$LIBLZMA" >&6; }
16360 else
16361 HAVE_LIBLZMA=no
16362 CPPFLAGS="$ac_save_CPPFLAGS"
16363 LIBLZMA=
16364 LTLIBLZMA=
16365 fi
16366
16367
16368
16369
16370
16371
16372 if test "$HAVE_LIBLZMA" != yes; then
16373 if test "$with_lzma" = yes; then
d0ac1c44 16374 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
16375 fi
16376 fi
16377 fi
16378fi
16379
3fc11d3e
JM
16380LIBGUI="../libgui/src/libgui.a"
16381GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16382
16383
7a292a7a 16384
3fc11d3e
JM
16385WIN32LDAPP=
16386
16387
16388
d91670b9 16389case "${host}" in
686a5eed 16390*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16391 configdir="win"
16392 ;;
16393*)
16394 configdir="unix"
16395 ;;
16396esac
3fc11d3e
JM
16397
16398GDBTKLIBS=
16399if test "${enable_gdbtk}" = "yes"; then
16400
d1c3b63a
KS
16401 # Gdbtk must have an absolute path to srcdir in order to run
16402 # properly when not installed.
16403 here=`pwd`
16404 cd ${srcdir}
16405 GDBTK_SRC_DIR=`pwd`
16406 cd $here
16407
bec39cab 16408
5062cc19
KS
16409 #
16410 # Ok, lets find the tcl configuration
16411 # First, look for one uninstalled.
16412 # the alternative search directory is invoked by --with-tcl
16413 #
3fc11d3e 16414
5062cc19
KS
16415 if test x"${no_tcl}" = x ; then
16416 # we reset no_tcl in case something fails here
16417 no_tcl=true
bec39cab 16418
81ecdfbb
RW
16419# Check whether --with-tcl was given.
16420if test "${with_tcl+set}" = set; then :
16421 withval=$with_tcl; with_tclconfig=${withval}
16422fi
16423
16424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16425$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 16426 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 16427 $as_echo_n "(cached) " >&6
3fc11d3e 16428else
bec39cab 16429
3fc11d3e 16430
5062cc19
KS
16431 # First check to see if --with-tcl was specified.
16432 case "${host}" in
16433 *-*-cygwin*) platDir="win" ;;
16434 *) platDir="unix" ;;
16435 esac
16436 if test x"${with_tclconfig}" != x ; then
16437 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16438 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16439 else
d0ac1c44 16440 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16441 fi
16442 fi
16443
16444 # then check for a private Tcl installation
16445 if test x"${ac_cv_c_tclconfig}" = x ; then
16446 for i in \
16447 ../tcl \
16448 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16449 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16450 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16451 ../../tcl \
16452 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16453 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16454 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16455 ../../../tcl \
16456 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16457 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16458 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16459 if test -f "$i/$platDir/tclConfig.sh" ; then
16460 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16461 break
16462 fi
16463 done
16464 fi
16465
16466 # on Darwin, check in Framework installation locations
16467 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16468 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16469 `ls -d /Library/Frameworks 2>/dev/null` \
16470 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16471 `ls -d /System/Library/Frameworks 2>/dev/null` \
16472 ; do
16473 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16474 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16475 break
16476 fi
16477 done
16478 fi
16479
16480 # check in a few common install locations
16481 if test x"${ac_cv_c_tclconfig}" = x ; then
16482 for i in `ls -d ${libdir} 2>/dev/null` \
16483 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16484 `ls -d ${prefix}/lib 2>/dev/null` \
16485 `ls -d /usr/local/lib 2>/dev/null` \
16486 `ls -d /usr/contrib/lib 2>/dev/null` \
16487 `ls -d /usr/lib 2>/dev/null` \
16488 ; do
16489 if test -f "$i/tclConfig.sh" ; then
16490 ac_cv_c_tclconfig=`(cd $i; pwd)`
16491 break
16492 fi
16493 done
16494 fi
3fc11d3e 16495
5062cc19
KS
16496 # check in a few other private locations
16497 if test x"${ac_cv_c_tclconfig}" = x ; then
16498 for i in \
16499 ${srcdir}/../tcl \
16500 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16501 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16502 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16503 if test -f "$i/$platDir/tclConfig.sh" ; then
16504 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16505 break
16506 fi
16507 done
16508 fi
bec39cab 16509
3fc11d3e
JM
16510fi
16511
5062cc19
KS
16512
16513 if test x"${ac_cv_c_tclconfig}" = x ; then
16514 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16515 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16516$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16517 else
16518 no_tcl=
16519 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16521$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16522 fi
16523 fi
3fc11d3e 16524
bec39cab 16525
85541719
DE
16526 # If $no_tk is nonempty, then we can't do Tk, and there is no
16527 # point to doing Tcl.
bec39cab 16528
5062cc19
KS
16529 #
16530 # Ok, lets find the tk configuration
16531 # First, look for one uninstalled.
16532 # the alternative search directory is invoked by --with-tk
16533 #
3fc11d3e 16534
5062cc19
KS
16535 if test x"${no_tk}" = x ; then
16536 # we reset no_tk in case something fails here
16537 no_tk=true
bec39cab 16538
81ecdfbb
RW
16539# Check whether --with-tk was given.
16540if test "${with_tk+set}" = set; then :
16541 withval=$with_tk; with_tkconfig=${withval}
16542fi
16543
16544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16545$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 16546 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 16547 $as_echo_n "(cached) " >&6
bec39cab 16548else
3fc11d3e
JM
16549
16550
5062cc19
KS
16551 # First check to see if --with-tkconfig was specified.
16552 if test x"${with_tkconfig}" != x ; then
16553 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16554 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16555 else
d0ac1c44 16556 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16557 fi
16558 fi
3fc11d3e 16559
5062cc19
KS
16560 # then check for a private Tk library
16561 case "${host}" in
16562 *-*-cygwin*) platDir="win" ;;
16563 *) platDir="unix" ;;
16564 esac
16565 if test x"${ac_cv_c_tkconfig}" = x ; then
16566 for i in \
16567 ../tk \
16568 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16569 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16570 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16571 ../../tk \
16572 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16573 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16574 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16575 ../../../tk \
16576 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16577 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16578 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16579 if test -f "$i/$platDir/tkConfig.sh" ; then
16580 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16581 break
16582 fi
16583 done
16584 fi
16585
16586 # on Darwin, check in Framework installation locations
16587 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16588 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16589 `ls -d /Library/Frameworks 2>/dev/null` \
16590 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16591 `ls -d /System/Library/Frameworks 2>/dev/null` \
16592 ; do
16593 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16594 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16595 break
16596 fi
16597 done
16598 fi
16599
16600 # check in a few common install locations
16601 if test x"${ac_cv_c_tkconfig}" = x ; then
16602 for i in `ls -d ${libdir} 2>/dev/null` \
16603 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16604 `ls -d ${prefix}/lib 2>/dev/null` \
16605 `ls -d /usr/local/lib 2>/dev/null` \
16606 `ls -d /usr/contrib/lib 2>/dev/null` \
16607 `ls -d /usr/lib 2>/dev/null` \
16608 ; do
16609 if test -f "$i/tkConfig.sh" ; then
16610 ac_cv_c_tkconfig=`(cd $i; pwd)`
16611 break
16612 fi
16613 done
16614 fi
16615 # check in a few other private locations
16616 if test x"${ac_cv_c_tkconfig}" = x ; then
16617 for i in \
16618 ${srcdir}/../tk \
16619 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16620 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16621 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16622 if test -f "$i/$platDir/tkConfig.sh" ; then
16623 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16624 break
16625 fi
16626 done
16627 fi
3fc11d3e 16628
3fc11d3e
JM
16629fi
16630
16631
5062cc19
KS
16632 if test x"${ac_cv_c_tkconfig}" = x ; then
16633 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16634 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16635$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16636 else
16637 no_tk=
16638 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16640$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16641 fi
3fc11d3e 16642 fi
dd2504ab 16643
dd2504ab 16644
85541719
DE
16645 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16646
81ecdfbb
RW
16647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16648$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16649
16650 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16652$as_echo "loading" >&6; }
85541719
DE
16653 . ${TCL_BIN_DIR}/tclConfig.sh
16654 else
81ecdfbb
RW
16655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16656$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16657 fi
16658
16659 # eval is required to do the TCL_DBGX substitution
16660 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16661 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16662
16663 # If the TCL_BIN_DIR is the build directory (not the install directory),
16664 # then set the common variable name to the value of the build variables.
16665 # For example, the variable TCL_LIB_SPEC will be set to the value
16666 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16667 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16668 # installed and uninstalled version of Tcl.
16669 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16670 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16671 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16672 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16673 elif test "`uname -s`" = "Darwin"; then
16674 # If Tcl was built as a framework, attempt to use the libraries
16675 # from the framework at the given location so that linking works
a68ffae9 16676 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16677 case ${TCL_DEFS} in
16678 *TCL_FRAMEWORK*)
16679 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16680 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16681 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16682 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16683 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16684 break
16685 fi
16686 done
16687 fi
16688 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16689 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16690 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16691 fi
16692 ;;
16693 esac
16694 fi
16695
16696 # eval is required to do the TCL_DBGX substitution
16697 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16698 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16699 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16700 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716 # Check for in-tree tcl
16717 here=`pwd`
16718 cd ${srcdir}/..
16719 topdir=`pwd`
16720 cd ${here}
16721
16722 intree="no"
16723 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16724 intree="yes"
16725 fi
16726
16727 # Find Tcl private headers
16728 if test x"${intree}" = xno; then
16729
81ecdfbb
RW
16730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16731$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16732 private_dir=""
16733 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16734 if test -f ${dir}/tclInt.h ; then
16735 private_dir=${dir}
16736 fi
16737
16738 if test x"${private_dir}" = x; then
d0ac1c44 16739 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16740 else
16741 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16743$as_echo "${private_dir}" >&6; }
85541719
DE
16744 fi
16745
16746 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16747 TCL_LIBRARY="${TCL_LIB_SPEC}"
16748 TCL_DEPS=""
16749 else
16750 # If building tcl in the same src tree, private headers
16751 # are not needed, but we need to be sure to use the right
16752 # headers library
16753 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16754 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16755 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16756 fi
16757
16758
16759
16760
16761
81ecdfbb
RW
16762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16763$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16764
5062cc19 16765 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16767$as_echo "loading" >&6; }
5062cc19 16768 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16769 else
81ecdfbb
RW
16770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16771$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16772 fi
bec39cab 16773
5062cc19
KS
16774 # eval is required to do the TK_DBGX substitution
16775 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16776 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16777
16778 # If the TK_BIN_DIR is the build directory (not the install directory),
16779 # then set the common variable name to the value of the build variables.
16780 # For example, the variable TK_LIB_SPEC will be set to the value
16781 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16782 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16783 # installed and uninstalled version of Tcl.
85541719 16784 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16785 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16786 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16787 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16788 elif test "`uname -s`" = "Darwin"; then
16789 # If Tk was built as a framework, attempt to use the libraries
16790 # from the framework at the given location so that linking works
a68ffae9 16791 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16792 case ${TK_DEFS} in
16793 *TK_FRAMEWORK*)
85541719 16794 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16795 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16796 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16797 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16798 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16799 break
16800 fi
16801 done
16802 fi
85541719 16803 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16804 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16805 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16806 fi
16807 ;;
16808 esac
3fc11d3e
JM
16809 fi
16810
5062cc19
KS
16811 # eval is required to do the TK_DBGX substitution
16812 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16813 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16814 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16815 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16816
3fc11d3e
JM
16817
16818
bec39cab
AC
16819
16820
16821
16822
16823
16824
16825
3fc11d3e 16826
3fc11d3e 16827
bec39cab 16828
bec39cab 16829
85541719
DE
16830 # Check for in-tree Tk
16831 intree="no"
16832 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16833 intree="yes"
16834 fi
3fc11d3e 16835
85541719
DE
16836 # Find Tk private headers
16837 if test x"${intree}" = xno; then
3fc11d3e 16838
81ecdfbb
RW
16839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16840$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16841 private_dir=""
16842 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16843 if test -f ${dir}/tkInt.h; then
16844 private_dir=${dir}
3fc11d3e 16845 fi
bec39cab 16846
5062cc19 16847 if test x"${private_dir}" = x; then
d0ac1c44 16848 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16849 else
5062cc19 16850 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16852$as_echo "${private_dir}" >&6; }
3fc11d3e 16853 fi
3fc11d3e 16854
85541719
DE
16855 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16856 TK_LIBRARY=${TK_LIB_SPEC}
16857 TK_DEPS=""
16858 else
16859 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16860 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16861 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16862 fi
3fc11d3e
JM
16863
16864
3fc11d3e
JM
16865
16866
3fc11d3e 16867
85541719 16868 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16869
85541719
DE
16870 # Include some libraries that Tcl and Tk want.
16871 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16872 # Yes, the ordering seems wrong here. But it isn't.
16873 # TK_LIBS is the list of libraries that need to be linked
16874 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16875 # were in LIBS then any link tests after this point would
16876 # try to include things like `$(LIBGUI)', which wouldn't work.
16877 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16878
85541719
DE
16879 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16880 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16881 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16882 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16883 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16884 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16885 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16886
85541719
DE
16887 if test x$gdb_cv_os_cygwin = xyes; then
16888 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16889 WIN32LDAPP="-Wl,--subsystem,console"
16890 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16891 fi
ffc6a242 16892
81ecdfbb 16893 subdirs="$subdirs gdbtk"
3ace7edb 16894
85541719 16895 fi
3fc11d3e
JM
16896fi
16897
16898
16899
16900
16901
16902
16903
16904
81ecdfbb
RW
16905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16906$as_echo_n "checking for X... " >&6; }
bec39cab 16907
c906108c 16908
81ecdfbb
RW
16909# Check whether --with-x was given.
16910if test "${with_x+set}" = set; then :
16911 withval=$with_x;
16912fi
c906108c
SS
16913
16914# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16915if test "x$with_x" = xno; then
16916 # The user explicitly disabled X.
16917 have_x=disabled
16918else
81ecdfbb 16919 case $x_includes,$x_libraries in #(
d0ac1c44
SM
16920 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16921 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 16922 $as_echo_n "(cached) " >&6
c906108c
SS
16923else
16924 # One or both of the vars are not set, and there is no cached value.
bec39cab 16925ac_x_includes=no ac_x_libraries=no
81ecdfbb 16926rm -f -r conftest.dir
bec39cab
AC
16927if mkdir conftest.dir; then
16928 cd conftest.dir
bec39cab 16929 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16930incroot:
16931 @echo incroot='${INCROOT}'
16932usrlibdir:
16933 @echo usrlibdir='${USRLIBDIR}'
16934libdir:
16935 @echo libdir='${LIBDIR}'
16936_ACEOF
16937 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 16938 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
16939 for ac_var in incroot usrlibdir libdir; do
16940 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16941 done
c906108c 16942 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16943 for ac_extension in a so sl dylib la dll; do
16944 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16945 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16946 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16947 fi
16948 done
16949 # Screen out bogus values from the imake configuration. They are
16950 # bogus both because they are the default anyway, and because
16951 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16952 case $ac_im_incroot in
81ecdfbb 16953 /usr/include) ac_x_includes= ;;
bec39cab 16954 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16955 esac
bec39cab 16956 case $ac_im_usrlibdir in
81ecdfbb 16957 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16958 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16959 esac
16960 fi
16961 cd ..
81ecdfbb 16962 rm -f -r conftest.dir
c906108c
SS
16963fi
16964
bec39cab
AC
16965# Standard set of common directories for X headers.
16966# Check X11 before X11Rn because it is often a symlink to the current release.
16967ac_x_header_dirs='
16968/usr/X11/include
81ecdfbb 16969/usr/X11R7/include
bec39cab
AC
16970/usr/X11R6/include
16971/usr/X11R5/include
16972/usr/X11R4/include
16973
16974/usr/include/X11
81ecdfbb 16975/usr/include/X11R7
bec39cab
AC
16976/usr/include/X11R6
16977/usr/include/X11R5
16978/usr/include/X11R4
16979
16980/usr/local/X11/include
81ecdfbb 16981/usr/local/X11R7/include
bec39cab
AC
16982/usr/local/X11R6/include
16983/usr/local/X11R5/include
16984/usr/local/X11R4/include
16985
16986/usr/local/include/X11
81ecdfbb 16987/usr/local/include/X11R7
bec39cab
AC
16988/usr/local/include/X11R6
16989/usr/local/include/X11R5
16990/usr/local/include/X11R4
16991
16992/usr/X386/include
16993/usr/x386/include
16994/usr/XFree86/include/X11
16995
16996/usr/include
16997/usr/local/include
16998/usr/unsupported/include
16999/usr/athena/include
17000/usr/local/x11r5/include
17001/usr/lpp/Xamples/include
17002
17003/usr/openwin/include
17004/usr/openwin/share/include'
17005
17006if test "$ac_x_includes" = no; then
81ecdfbb 17007 # Guess where to find include files, by looking for Xlib.h.
c906108c 17008 # First, try using that file with no special directory specified.
81ecdfbb 17009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17010/* end confdefs.h. */
81ecdfbb 17011#include <X11/Xlib.h>
bec39cab 17012_ACEOF
81ecdfbb 17013if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
17014 # We can compile using X headers with no special include directory.
17015ac_x_includes=
17016else
bec39cab 17017 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 17018 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
17019 ac_x_includes=$ac_dir
17020 break
17021 fi
17022done
c906108c 17023fi
d0ac1c44 17024rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 17025fi # $ac_x_includes = no
c906108c 17026
bec39cab 17027if test "$ac_x_libraries" = no; then
c906108c 17028 # Check for the libraries.
c906108c
SS
17029 # See if we find them without any special options.
17030 # Don't add to $LIBS permanently.
bec39cab 17031 ac_save_LIBS=$LIBS
81ecdfbb
RW
17032 LIBS="-lX11 $LIBS"
17033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17034/* end confdefs.h. */
81ecdfbb 17035#include <X11/Xlib.h>
bec39cab
AC
17036int
17037main ()
17038{
81ecdfbb 17039XrmInitialize ()
bec39cab
AC
17040 ;
17041 return 0;
17042}
17043_ACEOF
81ecdfbb 17044if ac_fn_c_try_link "$LINENO"; then :
bec39cab 17045 LIBS=$ac_save_LIBS
c906108c
SS
17046# We can link X programs with no special library path.
17047ac_x_libraries=
17048else
81ecdfbb
RW
17049 LIBS=$ac_save_LIBS
17050for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 17051do
bec39cab 17052 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
17053 for ac_extension in a so sl dylib la dll; do
17054 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
17055 ac_x_libraries=$ac_dir
17056 break 2
17057 fi
17058 done
17059done
17060fi
81ecdfbb
RW
17061rm -f core conftest.err conftest.$ac_objext \
17062 conftest$ac_exeext conftest.$ac_ext
bec39cab 17063fi # $ac_x_libraries = no
c906108c 17064
81ecdfbb
RW
17065case $ac_x_includes,$ac_x_libraries in #(
17066 no,* | *,no | *\'*)
17067 # Didn't find X, or a directory has "'" in its name.
17068 ac_cv_have_x="have_x=no";; #(
17069 *)
17070 # Record where we found X for the cache.
17071 ac_cv_have_x="have_x=yes\
17072 ac_x_includes='$ac_x_includes'\
17073 ac_x_libraries='$ac_x_libraries'"
17074esac
c906108c 17075fi
81ecdfbb
RW
17076;; #(
17077 *) have_x=yes;;
17078 esac
c906108c
SS
17079 eval "$ac_cv_have_x"
17080fi # $with_x != no
17081
17082if test "$have_x" != yes; then
81ecdfbb
RW
17083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17084$as_echo "$have_x" >&6; }
c906108c
SS
17085 no_x=yes
17086else
17087 # If each of the values was on the command line, it overrides each guess.
17088 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17089 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17090 # Update the cache value to reflect the command line values.
81ecdfbb
RW
17091 ac_cv_have_x="have_x=yes\
17092 ac_x_includes='$x_includes'\
17093 ac_x_libraries='$x_libraries'"
17094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17095$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
17096fi
17097
17098
bec39cab 17099# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 17100# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
17101# This code just checks for a few cases where we'd like to ignore those
17102# definitions, even when they're present in the '.mt' file. These cases
17103# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 17104# not part of the source tree.
7a292a7a 17105#
81ecdfbb
RW
17106# Check whether --enable-sim was given.
17107if test "${enable_sim+set}" = set; then :
17108 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
17109 echo "enableval = ${enableval}";
17110 case "${enableval}" in
17111 yes) ignore_sim=false ;;
17112 no) ignore_sim=true ;;
17113 *) ignore_sim=false ;;
17114 esac
17115else
17116 ignore_sim=false
81ecdfbb
RW
17117fi
17118
7a292a7a
SS
17119
17120if test ! -d "${srcdir}/../sim"; then
17121 ignore_sim=true
17122fi
17123
9b624dbe
UW
17124SIM=
17125SIM_OBS=
17126if test "${ignore_sim}" = "false"; then
17127 if test x"${gdb_sim}" != x ; then
17128 SIM="${gdb_sim}"
17129 SIM_OBS="remote-sim.o"
60ca704f 17130
81ecdfbb 17131$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17132
976102cd
PA
17133
17134 # Some tdep code should only be compiled in when the ppc sim is
17135 # built. PR sim/13418.
17136 case $target in
17137 powerpc*-*-*)
17138
17139$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17140
17141 ;;
17142 esac
9b624dbe 17143 fi
7a292a7a
SS
17144fi
17145
17146
17147
c906108c
SS
17148
17149
17150
17151
17152
17153
dfcd3bfb 17154
e56ac5c3
AC
17155
17156
b3a90332
AC
17157
17158
c35f4ffc 17159# List of host floatformats.
bec39cab
AC
17160
17161cat >>confdefs.h <<_ACEOF
c35f4ffc 17162#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17163_ACEOF
c35f4ffc 17164
bec39cab
AC
17165
17166cat >>confdefs.h <<_ACEOF
c35f4ffc 17167#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17168_ACEOF
17169
c35f4ffc 17170
bec39cab 17171cat >>confdefs.h <<_ACEOF
c35f4ffc 17172#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17173_ACEOF
c35f4ffc
AC
17174
17175
c906108c
SS
17176# target_subdir is used by the testsuite to find the target libraries.
17177target_subdir=
17178if test "${host}" != "${target}"; then
17179 target_subdir="${target_alias}/"
17180fi
17181
17182
21ea5acd 17183# Import nat definitions.
2b351b19 17184nat_makefile_frag=/dev/null
771b4502 17185if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17186 . ${srcdir}/configure.nat
17187 nativefile=$NAT_FILE
c906108c 17188fi
c906108c 17189
c906108c
SS
17190
17191
17192
21ea5acd
SDJ
17193
17194
17195
17196
17197
c906108c
SS
17198
17199
b00a8037 17200if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17201
17202cat >>confdefs.h <<_ACEOF
b00a8037 17203#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17204_ACEOF
b00a8037
DJ
17205
17206fi
17207
496c0e1b
JB
17208# Check whether --enable-gdbserver was given.
17209if test "${enable_gdbserver+set}" = set; then :
17210 enableval=$enable_gdbserver; case "${enableval}" in
17211 yes| no|auto) ;;
d0ac1c44 17212 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17213esac
17214else
17215 enable_gdbserver=auto
17216fi
17217
17218
17219# We only build gdbserver automatically in a native configuration, and
17220# only if the user did not explicitly disable its build.
17221if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17223$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17224 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17226$as_echo "yes" >&6; }
17227 subdirs="$subdirs gdbserver"
3ace7edb 17228
496c0e1b 17229 gdbserver_build_enabled=yes
8dcde887 17230 else
81ecdfbb
RW
17231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17232$as_echo "no" >&6; }
8dcde887
MK
17233 fi
17234fi
17235
496c0e1b
JB
17236# If the user explicitly request the gdbserver to be built, verify that
17237# we were in fact able to enable it.
17238if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17239 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17240fi
17241
393fd4c3
YQ
17242# Check for babeltrace and babeltrace-ctf
17243
17244# Check whether --with-babeltrace was given.
17245if test "${with_babeltrace+set}" = set; then :
17246 withval=$with_babeltrace;
17247else
17248 with_babeltrace=auto
17249fi
17250
17251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17252$as_echo_n "checking whether to use babeltrace... " >&6; }
17253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17254$as_echo "$with_babeltrace" >&6; }
17255
17256if test "x$with_babeltrace" = "xno"; then
17257 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17258$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17259else
17260 # Append -Werror to CFLAGS so that configure can catch the warning
17261 # "assignment from incompatible pointer type", which is related to
17262 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17263 # in GDB, while babeltrace 1.0.3 is broken.
17264 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17265 # safe to save and restore CFLAGS here.
17266 saved_CFLAGS=$CFLAGS
17267 CFLAGS="$CFLAGS -Werror"
17268
17269
17270
17271
17272
17273
17274
17275
17276 use_additional=yes
17277
17278 acl_save_prefix="$prefix"
17279 prefix="$acl_final_prefix"
17280 acl_save_exec_prefix="$exec_prefix"
17281 exec_prefix="$acl_final_exec_prefix"
17282
17283 eval additional_includedir=\"$includedir\"
17284 eval additional_libdir=\"$libdir\"
17285
17286 exec_prefix="$acl_save_exec_prefix"
17287 prefix="$acl_save_prefix"
17288
17289
17290# Check whether --with-libbabeltrace-prefix was given.
17291if test "${with_libbabeltrace_prefix+set}" = set; then :
17292 withval=$with_libbabeltrace_prefix;
17293 if test "X$withval" = "Xno"; then
17294 use_additional=no
17295 else
17296 if test "X$withval" = "X"; then
17297
17298 acl_save_prefix="$prefix"
17299 prefix="$acl_final_prefix"
17300 acl_save_exec_prefix="$exec_prefix"
17301 exec_prefix="$acl_final_exec_prefix"
17302
17303 eval additional_includedir=\"$includedir\"
17304 eval additional_libdir=\"$libdir\"
17305
17306 exec_prefix="$acl_save_exec_prefix"
17307 prefix="$acl_save_prefix"
17308
17309 else
17310 additional_includedir="$withval/include"
17311 additional_libdir="$withval/lib"
17312 fi
17313 fi
17314
17315fi
17316
17317 LIBBABELTRACE=
17318 LTLIBBABELTRACE=
17319 INCBABELTRACE=
17320 rpathdirs=
17321 ltrpathdirs=
17322 names_already_handled=
17323 names_next_round='babeltrace babeltrace-ctf'
17324 while test -n "$names_next_round"; do
17325 names_this_round="$names_next_round"
17326 names_next_round=
17327 for name in $names_this_round; do
17328 already_handled=
17329 for n in $names_already_handled; do
17330 if test "$n" = "$name"; then
17331 already_handled=yes
17332 break
17333 fi
17334 done
17335 if test -z "$already_handled"; then
17336 names_already_handled="$names_already_handled $name"
17337 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17338 eval value=\"\$HAVE_LIB$uppername\"
17339 if test -n "$value"; then
17340 if test "$value" = yes; then
17341 eval value=\"\$LIB$uppername\"
17342 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17343 eval value=\"\$LTLIB$uppername\"
17344 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17345 else
17346 :
17347 fi
17348 else
17349 found_dir=
17350 found_la=
17351 found_so=
17352 found_a=
17353 if test $use_additional = yes; then
17354 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17355 found_dir="$additional_libdir"
17356 found_so="$additional_libdir/lib$name.$shlibext"
17357 if test -f "$additional_libdir/lib$name.la"; then
17358 found_la="$additional_libdir/lib$name.la"
17359 fi
17360 else
17361 if test -f "$additional_libdir/lib$name.$libext"; then
17362 found_dir="$additional_libdir"
17363 found_a="$additional_libdir/lib$name.$libext"
17364 if test -f "$additional_libdir/lib$name.la"; then
17365 found_la="$additional_libdir/lib$name.la"
17366 fi
17367 fi
17368 fi
17369 fi
17370 if test "X$found_dir" = "X"; then
17371 for x in $LDFLAGS $LTLIBBABELTRACE; do
17372
17373 acl_save_prefix="$prefix"
17374 prefix="$acl_final_prefix"
17375 acl_save_exec_prefix="$exec_prefix"
17376 exec_prefix="$acl_final_exec_prefix"
17377 eval x=\"$x\"
17378 exec_prefix="$acl_save_exec_prefix"
17379 prefix="$acl_save_prefix"
17380
17381 case "$x" in
17382 -L*)
17383 dir=`echo "X$x" | sed -e 's/^X-L//'`
17384 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17385 found_dir="$dir"
17386 found_so="$dir/lib$name.$shlibext"
17387 if test -f "$dir/lib$name.la"; then
17388 found_la="$dir/lib$name.la"
17389 fi
17390 else
17391 if test -f "$dir/lib$name.$libext"; then
17392 found_dir="$dir"
17393 found_a="$dir/lib$name.$libext"
17394 if test -f "$dir/lib$name.la"; then
17395 found_la="$dir/lib$name.la"
17396 fi
17397 fi
17398 fi
17399 ;;
17400 esac
17401 if test "X$found_dir" != "X"; then
17402 break
17403 fi
17404 done
17405 fi
17406 if test "X$found_dir" != "X"; then
17407 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17408 if test "X$found_so" != "X"; then
17409 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17410 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17411 else
17412 haveit=
17413 for x in $ltrpathdirs; do
17414 if test "X$x" = "X$found_dir"; then
17415 haveit=yes
17416 break
17417 fi
17418 done
17419 if test -z "$haveit"; then
17420 ltrpathdirs="$ltrpathdirs $found_dir"
17421 fi
17422 if test "$hardcode_direct" = yes; then
17423 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17424 else
17425 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17426 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17427 haveit=
17428 for x in $rpathdirs; do
17429 if test "X$x" = "X$found_dir"; then
17430 haveit=yes
17431 break
17432 fi
17433 done
17434 if test -z "$haveit"; then
17435 rpathdirs="$rpathdirs $found_dir"
17436 fi
17437 else
17438 haveit=
17439 for x in $LDFLAGS $LIBBABELTRACE; do
17440
17441 acl_save_prefix="$prefix"
17442 prefix="$acl_final_prefix"
17443 acl_save_exec_prefix="$exec_prefix"
17444 exec_prefix="$acl_final_exec_prefix"
17445 eval x=\"$x\"
17446 exec_prefix="$acl_save_exec_prefix"
17447 prefix="$acl_save_prefix"
17448
17449 if test "X$x" = "X-L$found_dir"; then
17450 haveit=yes
17451 break
17452 fi
17453 done
17454 if test -z "$haveit"; then
17455 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17456 fi
17457 if test "$hardcode_minus_L" != no; then
17458 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17459 else
17460 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17461 fi
17462 fi
17463 fi
17464 fi
17465 else
17466 if test "X$found_a" != "X"; then
17467 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17468 else
17469 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17470 fi
17471 fi
17472 additional_includedir=
17473 case "$found_dir" in
17474 */lib | */lib/)
17475 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17476 additional_includedir="$basedir/include"
17477 ;;
17478 esac
17479 if test "X$additional_includedir" != "X"; then
17480 if test "X$additional_includedir" != "X/usr/include"; then
17481 haveit=
17482 if test "X$additional_includedir" = "X/usr/local/include"; then
17483 if test -n "$GCC"; then
17484 case $host_os in
17485 linux*) haveit=yes;;
17486 esac
17487 fi
17488 fi
17489 if test -z "$haveit"; then
17490 for x in $CPPFLAGS $INCBABELTRACE; do
17491
17492 acl_save_prefix="$prefix"
17493 prefix="$acl_final_prefix"
17494 acl_save_exec_prefix="$exec_prefix"
17495 exec_prefix="$acl_final_exec_prefix"
17496 eval x=\"$x\"
17497 exec_prefix="$acl_save_exec_prefix"
17498 prefix="$acl_save_prefix"
17499
17500 if test "X$x" = "X-I$additional_includedir"; then
17501 haveit=yes
17502 break
17503 fi
17504 done
17505 if test -z "$haveit"; then
17506 if test -d "$additional_includedir"; then
17507 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17508 fi
17509 fi
17510 fi
17511 fi
17512 fi
17513 if test -n "$found_la"; then
17514 save_libdir="$libdir"
17515 case "$found_la" in
17516 */* | *\\*) . "$found_la" ;;
17517 *) . "./$found_la" ;;
17518 esac
17519 libdir="$save_libdir"
17520 for dep in $dependency_libs; do
17521 case "$dep" in
17522 -L*)
17523 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17524 if test "X$additional_libdir" != "X/usr/lib"; then
17525 haveit=
17526 if test "X$additional_libdir" = "X/usr/local/lib"; then
17527 if test -n "$GCC"; then
17528 case $host_os in
17529 linux*) haveit=yes;;
17530 esac
17531 fi
17532 fi
17533 if test -z "$haveit"; then
17534 haveit=
17535 for x in $LDFLAGS $LIBBABELTRACE; do
17536
17537 acl_save_prefix="$prefix"
17538 prefix="$acl_final_prefix"
17539 acl_save_exec_prefix="$exec_prefix"
17540 exec_prefix="$acl_final_exec_prefix"
17541 eval x=\"$x\"
17542 exec_prefix="$acl_save_exec_prefix"
17543 prefix="$acl_save_prefix"
17544
17545 if test "X$x" = "X-L$additional_libdir"; then
17546 haveit=yes
17547 break
17548 fi
17549 done
17550 if test -z "$haveit"; then
17551 if test -d "$additional_libdir"; then
17552 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17553 fi
17554 fi
17555 haveit=
17556 for x in $LDFLAGS $LTLIBBABELTRACE; do
17557
17558 acl_save_prefix="$prefix"
17559 prefix="$acl_final_prefix"
17560 acl_save_exec_prefix="$exec_prefix"
17561 exec_prefix="$acl_final_exec_prefix"
17562 eval x=\"$x\"
17563 exec_prefix="$acl_save_exec_prefix"
17564 prefix="$acl_save_prefix"
17565
17566 if test "X$x" = "X-L$additional_libdir"; then
17567 haveit=yes
17568 break
17569 fi
17570 done
17571 if test -z "$haveit"; then
17572 if test -d "$additional_libdir"; then
17573 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17574 fi
17575 fi
17576 fi
17577 fi
17578 ;;
17579 -R*)
17580 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17581 if test "$enable_rpath" != no; then
17582 haveit=
17583 for x in $rpathdirs; do
17584 if test "X$x" = "X$dir"; then
17585 haveit=yes
17586 break
17587 fi
17588 done
17589 if test -z "$haveit"; then
17590 rpathdirs="$rpathdirs $dir"
17591 fi
17592 haveit=
17593 for x in $ltrpathdirs; do
17594 if test "X$x" = "X$dir"; then
17595 haveit=yes
17596 break
17597 fi
17598 done
17599 if test -z "$haveit"; then
17600 ltrpathdirs="$ltrpathdirs $dir"
17601 fi
17602 fi
17603 ;;
17604 -l*)
17605 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17606 ;;
17607 *.la)
17608 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17609 ;;
17610 *)
17611 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17612 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17613 ;;
17614 esac
17615 done
17616 fi
17617 else
17618 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17619 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17620 fi
17621 fi
17622 fi
17623 done
17624 done
17625 if test "X$rpathdirs" != "X"; then
17626 if test -n "$hardcode_libdir_separator"; then
17627 alldirs=
17628 for found_dir in $rpathdirs; do
17629 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17630 done
17631 acl_save_libdir="$libdir"
17632 libdir="$alldirs"
17633 eval flag=\"$hardcode_libdir_flag_spec\"
17634 libdir="$acl_save_libdir"
17635 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17636 else
17637 for found_dir in $rpathdirs; do
17638 acl_save_libdir="$libdir"
17639 libdir="$found_dir"
17640 eval flag=\"$hardcode_libdir_flag_spec\"
17641 libdir="$acl_save_libdir"
17642 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17643 done
17644 fi
17645 fi
17646 if test "X$ltrpathdirs" != "X"; then
17647 for found_dir in $ltrpathdirs; do
17648 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17649 done
17650 fi
17651
17652
17653 ac_save_CPPFLAGS="$CPPFLAGS"
17654
17655 for element in $INCBABELTRACE; do
17656 haveit=
17657 for x in $CPPFLAGS; do
17658
17659 acl_save_prefix="$prefix"
17660 prefix="$acl_final_prefix"
17661 acl_save_exec_prefix="$exec_prefix"
17662 exec_prefix="$acl_final_exec_prefix"
17663 eval x=\"$x\"
17664 exec_prefix="$acl_save_exec_prefix"
17665 prefix="$acl_save_prefix"
17666
17667 if test "X$x" = "X$element"; then
17668 haveit=yes
17669 break
17670 fi
17671 done
17672 if test -z "$haveit"; then
17673 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17674 fi
17675 done
17676
17677
17678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17679$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 17680if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
17681 $as_echo_n "(cached) " >&6
17682else
17683
17684 ac_save_LIBS="$LIBS"
17685 LIBS="$LIBS $LIBBABELTRACE"
17686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17687/* end confdefs.h. */
17688#include <babeltrace/babeltrace.h>
17689 #include <babeltrace/ctf/events.h>
17690 #include <babeltrace/ctf/iterator.h>
17691int
17692main ()
17693{
17694struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17695 struct bt_ctf_event *event = NULL;
17696 const struct bt_definition *scope;
17697
13cdc2af 17698 pos->type = BT_SEEK_BEGIN;
65c749e7 17699 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17700 scope = bt_ctf_get_top_level_scope (event,
17701 BT_STREAM_EVENT_HEADER);
17702 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17703
17704 ;
17705 return 0;
17706}
17707_ACEOF
17708if ac_fn_c_try_link "$LINENO"; then :
17709 ac_cv_libbabeltrace=yes
17710else
17711 ac_cv_libbabeltrace=no
17712fi
17713rm -f core conftest.err conftest.$ac_objext \
17714 conftest$ac_exeext conftest.$ac_ext
17715 LIBS="$ac_save_LIBS"
17716
17717fi
17718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17719$as_echo "$ac_cv_libbabeltrace" >&6; }
17720 if test "$ac_cv_libbabeltrace" = yes; then
17721 HAVE_LIBBABELTRACE=yes
17722
17723$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17724
17725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17726$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17728$as_echo "$LIBBABELTRACE" >&6; }
17729 else
17730 HAVE_LIBBABELTRACE=no
17731 CPPFLAGS="$ac_save_CPPFLAGS"
17732 LIBBABELTRACE=
17733 LTLIBBABELTRACE=
17734 fi
17735
17736
17737
17738
17739
17740
17741 CFLAGS=$saved_CFLAGS
17742
17743 if test "$HAVE_LIBBABELTRACE" != yes; then
17744 if test "$with_babeltrace" = yes; then
d0ac1c44 17745 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
17746 else
17747 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17748$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17749 fi
17750 fi
17751fi
17752
21ea5acd
SDJ
17753# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17754# empty version.
c906108c
SS
17755
17756files=
17757links=
5a2402b8 17758
c906108c
SS
17759rm -f nm.h
17760if test "${nativefile}" != ""; then
0f475e27
AC
17761 case "${nativefile}" in
17762 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17763 * ) GDB_NM_FILE="${nativefile}"
17764 esac
5a2402b8
AC
17765 files="${files} ${GDB_NM_FILE}"
17766 links="${links} nm.h"
60ca704f
SE
17767
17768cat >>confdefs.h <<_ACEOF
b78960be 17769#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17770_ACEOF
5a2402b8 17771
c906108c 17772fi
5a2402b8
AC
17773
17774
e3487908
GKB
17775for ac_prog in xsltproc
17776do
17777 # Extract the first word of "$ac_prog", so it can be a program name with args.
17778set dummy $ac_prog; ac_word=$2
17779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17780$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 17781if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
17782 $as_echo_n "(cached) " >&6
17783else
17784 case $XSLTPROC in
17785 [\\/]* | ?:[\\/]*)
17786 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17787 ;;
17788 *)
17789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17790for as_dir in $PATH
17791do
17792 IFS=$as_save_IFS
17793 test -z "$as_dir" && as_dir=.
17794 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 17795 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
17796 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17797 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17798 break 2
17799 fi
17800done
17801 done
17802IFS=$as_save_IFS
17803
17804 ;;
17805esac
17806fi
17807XSLTPROC=$ac_cv_path_XSLTPROC
17808if test -n "$XSLTPROC"; then
17809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17810$as_echo "$XSLTPROC" >&6; }
17811else
17812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17813$as_echo "no" >&6; }
17814fi
17815
17816
17817 test -n "$XSLTPROC" && break
17818done
17819test -n "$XSLTPROC" || XSLTPROC="missing"
17820
17821if test "x$USE_MAINTAINER_MODE" = xyes; then
17822 if test "${XSLTPROC}" = missing; then
d0ac1c44 17823 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
17824 fi
17825fi
17826
17827
bec39cab
AC
17828ac_sources="$files"
17829ac_dests="$links"
17830while test -n "$ac_sources"; do
17831 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17832 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17833 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17834done
81ecdfbb 17835ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17836
17837
c906108c
SS
17838
17839
c906108c 17840
81ecdfbb 17841$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17842
bec39cab 17843
8ecfd7bd
SDJ
17844
17845# Check whether we will enable the inclusion of unit tests when
17846# compiling GDB.
17847#
17848# The default value of this option changes depending whether we're on
17849# development mode (in which case it's "true") or not (in which case
17850# it's "false").
17851# Check whether --enable-unit-tests was given.
17852if test "${enable_unit_tests+set}" = set; then :
17853 enableval=$enable_unit_tests; case "${enableval}" in
17854 yes) enable_unittests=true ;;
17855 no) enable_unittests=false ;;
17856 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
17857esac
17858else
17859 enable_unittests=$development
17860fi
17861
17862
17863if $enable_unittests; then
dcd1f979
TT
17864
17865$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17866
8ecfd7bd 17867
b5884fa7 17868 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o"
1e5ded6c 17869 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c"
8ecfd7bd 17870
dcd1f979
TT
17871fi
17872
b292c783 17873
8ecfd7bd 17874
f6a88844
JM
17875 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17876 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17877 if test "x$GDB_TRANSFORM_NAME" = x; then
17878 GDB_TRANSFORM_NAME=gdb
17879 fi
17880
17881
17882
17883 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17884 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17885 if test "x$GCORE_TRANSFORM_NAME" = x; then
17886 GCORE_TRANSFORM_NAME=gcore
17887 fi
17888
b292c783
JK
17889
17890ac_config_files="$ac_config_files gcore"
17891
141ec9f6 17892ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 17893
89a34d1b 17894
bec39cab
AC
17895cat >confcache <<\_ACEOF
17896# This file is a shell script that caches the results of configure
17897# tests run on this system so they can be shared between configure
17898# scripts and configure runs, see configure's option --config-cache.
17899# It is not useful on other systems. If it contains results you don't
17900# want to keep, you may remove or edit it.
17901#
17902# config.status only pays attention to the cache file if you give it
17903# the --recheck option to rerun configure.
17904#
17905# `ac_cv_env_foo' variables (set or unset) will be overridden when
17906# loading this file, other *unset* `ac_cv_foo' will be assigned the
17907# following values.
17908
17909_ACEOF
17910
17911# The following way of writing the cache mishandles newlines in values,
17912# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17913# So, we kill variables containing newlines.
bec39cab
AC
17914# Ultrix sh set writes to stderr and can't be redirected directly,
17915# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17916(
17917 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17918 eval ac_val=\$$ac_var
17919 case $ac_val in #(
17920 *${as_nl}*)
17921 case $ac_var in #(
17922 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17923$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17924 esac
17925 case $ac_var in #(
17926 _ | IFS | as_nl) ;; #(
17927 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17928 *) { eval $ac_var=; unset $ac_var;} ;;
17929 esac ;;
17930 esac
17931 done
17932
bec39cab 17933 (set) 2>&1 |
81ecdfbb
RW
17934 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17935 *${as_nl}ac_space=\ *)
17936 # `set' does not quote correctly, so add quotes: double-quote
17937 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17938 sed -n \
17939 "s/'/'\\\\''/g;
17940 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17941 ;; #(
bec39cab
AC
17942 *)
17943 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17944 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17945 ;;
81ecdfbb
RW
17946 esac |
17947 sort
17948) |
bec39cab 17949 sed '
81ecdfbb 17950 /^ac_cv_env_/b end
bec39cab 17951 t clear
81ecdfbb 17952 :clear
bec39cab
AC
17953 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17954 t end
81ecdfbb
RW
17955 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17956 :end' >>confcache
17957if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17958 if test -w "$cache_file"; then
d0ac1c44 17959 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
17960 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17961$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
17962 if test ! -f "$cache_file" || test -h "$cache_file"; then
17963 cat confcache >"$cache_file"
17964 else
17965 case $cache_file in #(
17966 */* | ?:*)
17967 mv -f confcache "$cache_file"$$ &&
17968 mv -f "$cache_file"$$ "$cache_file" ;; #(
17969 *)
17970 mv -f confcache "$cache_file" ;;
17971 esac
17972 fi
17973 fi
bec39cab 17974 else
81ecdfbb
RW
17975 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17976$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17977 fi
17978fi
17979rm -f confcache
17980
17981test "x$prefix" = xNONE && prefix=$ac_default_prefix
17982# Let make expand exec_prefix.
17983test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17984
bec39cab
AC
17985DEFS=-DHAVE_CONFIG_H
17986
17987ac_libobjs=
17988ac_ltlibobjs=
d0ac1c44 17989U=
bec39cab
AC
17990for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17991 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17992 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17993 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17994 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17995 # will be set to the directory where LIBOBJS objects are built.
17996 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17997 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17998done
17999LIBOBJS=$ac_libobjs
18000
18001LTLIBOBJS=$ac_ltlibobjs
18002
18003
85981d60 18004if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 18005 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 18006Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 18007fi
4df42755 18008if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 18009 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
18010Usually this means the macro was only invoked conditionally." "$LINENO" 5
18011fi
18012if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 18013 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
18014Usually this means the macro was only invoked conditionally." "$LINENO" 5
18015fi
81ecdfbb
RW
18016
18017
d0ac1c44 18018: "${CONFIG_STATUS=./config.status}"
81ecdfbb 18019ac_write_fail=0
bec39cab
AC
18020ac_clean_files_save=$ac_clean_files
18021ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
18022{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18023$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18024as_write_fail=0
18025cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
18026#! $SHELL
18027# Generated by $as_me.
18028# Run this file to recreate the current configuration.
18029# Compiler output produced by configure, useful for debugging
18030# configure, is in config.log if it exists.
18031
18032debug=false
18033ac_cs_recheck=false
18034ac_cs_silent=false
bec39cab 18035
81ecdfbb
RW
18036SHELL=\${CONFIG_SHELL-$SHELL}
18037export SHELL
18038_ASEOF
18039cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18040## -------------------- ##
18041## M4sh Initialization. ##
18042## -------------------- ##
18043
18044# Be more Bourne compatible
18045DUALCASE=1; export DUALCASE # for MKS sh
18046if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18047 emulate sh
18048 NULLCMD=:
81ecdfbb 18049 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
18050 # is contrary to our usage. Disable this feature.
18051 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
18052 setopt NO_GLOB_SUBST
18053else
18054 case `(set -o) 2>/dev/null` in #(
18055 *posix*) :
18056 set -o posix ;; #(
18057 *) :
18058 ;;
18059esac
bec39cab 18060fi
bec39cab 18061
81ecdfbb
RW
18062
18063as_nl='
18064'
18065export as_nl
18066# Printing a long string crashes Solaris 7 /usr/bin/printf.
18067as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18068as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18069as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18070# Prefer a ksh shell builtin over an external printf program on Solaris,
18071# but without wasting forks for bash or zsh.
18072if test -z "$BASH_VERSION$ZSH_VERSION" \
18073 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18074 as_echo='print -r --'
18075 as_echo_n='print -rn --'
18076elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18077 as_echo='printf %s\n'
18078 as_echo_n='printf %s'
18079else
18080 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18081 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18082 as_echo_n='/usr/ucb/echo -n'
18083 else
18084 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18085 as_echo_n_body='eval
18086 arg=$1;
18087 case $arg in #(
18088 *"$as_nl"*)
18089 expr "X$arg" : "X\\(.*\\)$as_nl";
18090 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18091 esac;
18092 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18093 '
18094 export as_echo_n_body
18095 as_echo_n='sh -c $as_echo_n_body as_echo'
18096 fi
18097 export as_echo_body
18098 as_echo='sh -c $as_echo_body as_echo'
18099fi
18100
18101# The user is always right.
18102if test "${PATH_SEPARATOR+set}" != set; then
18103 PATH_SEPARATOR=:
18104 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18105 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18106 PATH_SEPARATOR=';'
18107 }
bec39cab
AC
18108fi
18109
18110
81ecdfbb
RW
18111# IFS
18112# We need space, tab and new line, in precisely that order. Quoting is
18113# there to prevent editors from complaining about space-tab.
18114# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18115# splitting by setting IFS to empty value.)
18116IFS=" "" $as_nl"
18117
18118# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 18119as_myself=
81ecdfbb
RW
18120case $0 in #((
18121 *[\\/]* ) as_myself=$0 ;;
18122 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18123for as_dir in $PATH
18124do
18125 IFS=$as_save_IFS
18126 test -z "$as_dir" && as_dir=.
18127 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18128 done
18129IFS=$as_save_IFS
18130
18131 ;;
18132esac
18133# We did not find ourselves, most probably we were run as `sh COMMAND'
18134# in which case we are not to be found in the path.
18135if test "x$as_myself" = x; then
18136 as_myself=$0
18137fi
18138if test ! -f "$as_myself"; then
18139 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18140 exit 1
18141fi
18142
18143# Unset variables that we do not need and which cause bugs (e.g. in
18144# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18145# suppresses any "Segmentation fault" message there. '((' could
18146# trigger a bug in pdksh 5.2.14.
18147for as_var in BASH_ENV ENV MAIL MAILPATH
18148do eval test x\${$as_var+set} = xset \
18149 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18150done
bec39cab
AC
18151PS1='$ '
18152PS2='> '
18153PS4='+ '
18154
18155# NLS nuisances.
81ecdfbb
RW
18156LC_ALL=C
18157export LC_ALL
18158LANGUAGE=C
18159export LANGUAGE
18160
18161# CDPATH.
18162(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18163
18164
d0ac1c44
SM
18165# as_fn_error STATUS ERROR [LINENO LOG_FD]
18166# ----------------------------------------
81ecdfbb
RW
18167# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18168# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 18169# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
18170as_fn_error ()
18171{
d0ac1c44
SM
18172 as_status=$1; test $as_status -eq 0 && as_status=1
18173 if test "$4"; then
18174 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18175 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 18176 fi
d0ac1c44 18177 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
18178 as_fn_exit $as_status
18179} # as_fn_error
18180
18181
18182# as_fn_set_status STATUS
18183# -----------------------
18184# Set $? to STATUS, without forking.
18185as_fn_set_status ()
18186{
18187 return $1
18188} # as_fn_set_status
18189
18190# as_fn_exit STATUS
18191# -----------------
18192# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18193as_fn_exit ()
18194{
18195 set +e
18196 as_fn_set_status $1
18197 exit $1
18198} # as_fn_exit
18199
18200# as_fn_unset VAR
18201# ---------------
18202# Portably unset VAR.
18203as_fn_unset ()
18204{
18205 { eval $1=; unset $1;}
18206}
18207as_unset=as_fn_unset
18208# as_fn_append VAR VALUE
18209# ----------------------
18210# Append the text in VALUE to the end of the definition contained in VAR. Take
18211# advantage of any shell optimizations that allow amortized linear growth over
18212# repeated appends, instead of the typical quadratic growth present in naive
18213# implementations.
18214if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18215 eval 'as_fn_append ()
18216 {
18217 eval $1+=\$2
18218 }'
18219else
18220 as_fn_append ()
18221 {
18222 eval $1=\$$1\$2
18223 }
18224fi # as_fn_append
18225
18226# as_fn_arith ARG...
18227# ------------------
18228# Perform arithmetic evaluation on the ARGs, and store the result in the
18229# global $as_val. Take advantage of shells that can avoid forks. The arguments
18230# must be portable across $(()) and expr.
18231if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18232 eval 'as_fn_arith ()
18233 {
18234 as_val=$(( $* ))
18235 }'
18236else
18237 as_fn_arith ()
18238 {
18239 as_val=`expr "$@" || test $? -eq 1`
18240 }
18241fi # as_fn_arith
bec39cab 18242
81ecdfbb
RW
18243
18244if expr a : '\(a\)' >/dev/null 2>&1 &&
18245 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18246 as_expr=expr
18247else
18248 as_expr=false
18249fi
18250
81ecdfbb 18251if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18252 as_basename=basename
18253else
18254 as_basename=false
18255fi
18256
81ecdfbb
RW
18257if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18258 as_dirname=dirname
18259else
18260 as_dirname=false
18261fi
bec39cab 18262
81ecdfbb 18263as_me=`$as_basename -- "$0" ||
bec39cab
AC
18264$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18265 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18266 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18267$as_echo X/"$0" |
18268 sed '/^.*\/\([^/][^/]*\)\/*$/{
18269 s//\1/
18270 q
18271 }
18272 /^X\/\(\/\/\)$/{
18273 s//\1/
18274 q
18275 }
18276 /^X\/\(\/\).*/{
18277 s//\1/
18278 q
18279 }
18280 s/.*/./; q'`
b4e70030 18281
b4e70030
JB
18282# Avoid depending upon Character Ranges.
18283as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18284as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18285as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18286as_cr_digits='0123456789'
18287as_cr_alnum=$as_cr_Letters$as_cr_digits
18288
81ecdfbb
RW
18289ECHO_C= ECHO_N= ECHO_T=
18290case `echo -n x` in #(((((
18291-n*)
18292 case `echo 'xy\c'` in
18293 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18294 xy) ECHO_C='\c';;
18295 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18296 ECHO_T=' ';;
18297 esac;;
18298*)
18299 ECHO_N='-n';;
bec39cab
AC
18300esac
18301
81ecdfbb
RW
18302rm -f conf$$ conf$$.exe conf$$.file
18303if test -d conf$$.dir; then
18304 rm -f conf$$.dir/conf$$.file
bec39cab 18305else
81ecdfbb
RW
18306 rm -f conf$$.dir
18307 mkdir conf$$.dir 2>/dev/null
bec39cab 18308fi
81ecdfbb
RW
18309if (echo >conf$$.file) 2>/dev/null; then
18310 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18311 as_ln_s='ln -s'
81ecdfbb
RW
18312 # ... but there are two gotchas:
18313 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18314 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 18315 # In both cases, we have to default to `cp -pR'.
81ecdfbb 18316 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 18317 as_ln_s='cp -pR'
81ecdfbb
RW
18318 elif ln conf$$.file conf$$ 2>/dev/null; then
18319 as_ln_s=ln
18320 else
d0ac1c44 18321 as_ln_s='cp -pR'
b4e70030 18322 fi
bec39cab 18323else
d0ac1c44 18324 as_ln_s='cp -pR'
bec39cab 18325fi
81ecdfbb
RW
18326rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18327rmdir conf$$.dir 2>/dev/null
18328
18329
18330# as_fn_mkdir_p
18331# -------------
18332# Create "$as_dir" as a directory, including parents if necessary.
18333as_fn_mkdir_p ()
18334{
18335
18336 case $as_dir in #(
18337 -*) as_dir=./$as_dir;;
18338 esac
18339 test -d "$as_dir" || eval $as_mkdir_p || {
18340 as_dirs=
18341 while :; do
18342 case $as_dir in #(
18343 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18344 *) as_qdir=$as_dir;;
18345 esac
18346 as_dirs="'$as_qdir' $as_dirs"
18347 as_dir=`$as_dirname -- "$as_dir" ||
18348$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18349 X"$as_dir" : 'X\(//\)[^/]' \| \
18350 X"$as_dir" : 'X\(//\)$' \| \
18351 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18352$as_echo X"$as_dir" |
18353 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18354 s//\1/
18355 q
18356 }
18357 /^X\(\/\/\)[^/].*/{
18358 s//\1/
18359 q
18360 }
18361 /^X\(\/\/\)$/{
18362 s//\1/
18363 q
18364 }
18365 /^X\(\/\).*/{
18366 s//\1/
18367 q
18368 }
18369 s/.*/./; q'`
18370 test -d "$as_dir" && break
18371 done
18372 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 18373 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 18374
bec39cab 18375
81ecdfbb 18376} # as_fn_mkdir_p
bec39cab 18377if mkdir -p . 2>/dev/null; then
81ecdfbb 18378 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18379else
18380 test -d ./-p && rmdir ./-p
18381 as_mkdir_p=false
18382fi
18383
d0ac1c44
SM
18384
18385# as_fn_executable_p FILE
18386# -----------------------
18387# Test if FILE is an executable regular file.
18388as_fn_executable_p ()
18389{
18390 test -f "$1" && test -x "$1"
18391} # as_fn_executable_p
18392as_test_x='test -x'
18393as_executable_p=as_fn_executable_p
bec39cab
AC
18394
18395# Sed expression to map a string onto a valid CPP name.
18396as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18397
18398# Sed expression to map a string onto a valid variable name.
18399as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18400
18401
bec39cab 18402exec 6>&1
81ecdfbb
RW
18403## ----------------------------------- ##
18404## Main body of $CONFIG_STATUS script. ##
18405## ----------------------------------- ##
18406_ASEOF
18407test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18408
18409cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18410# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18411# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18412# values after options handling.
18413ac_log="
bec39cab 18414This file was extended by $as_me, which was
d0ac1c44 18415generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
18416
18417 CONFIG_FILES = $CONFIG_FILES
18418 CONFIG_HEADERS = $CONFIG_HEADERS
18419 CONFIG_LINKS = $CONFIG_LINKS
18420 CONFIG_COMMANDS = $CONFIG_COMMANDS
18421 $ $0 $@
18422
81ecdfbb
RW
18423on `(hostname || uname -n) 2>/dev/null | sed 1q`
18424"
18425
bec39cab
AC
18426_ACEOF
18427
81ecdfbb
RW
18428case $ac_config_files in *"
18429"*) set x $ac_config_files; shift; ac_config_files=$*;;
18430esac
234b45d4 18431
81ecdfbb
RW
18432case $ac_config_headers in *"
18433"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18434esac
b4e70030 18435
b4e70030 18436
81ecdfbb
RW
18437cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18438# Files that config.status was made for.
18439config_files="$ac_config_files"
18440config_headers="$ac_config_headers"
18441config_links="$ac_config_links"
18442config_commands="$ac_config_commands"
234b45d4 18443
81ecdfbb 18444_ACEOF
b4e70030 18445
81ecdfbb 18446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18447ac_cs_usage="\
81ecdfbb
RW
18448\`$as_me' instantiates files and other configuration actions
18449from templates according to the current configuration. Unless the files
18450and actions are specified as TAGs, all are instantiated by default.
234b45d4 18451
81ecdfbb 18452Usage: $0 [OPTION]... [TAG]...
234b45d4 18453
bec39cab 18454 -h, --help print this help, then exit
81ecdfbb 18455 -V, --version print version number and configuration settings, then exit
d0ac1c44 18456 --config print configuration, then exit
81ecdfbb
RW
18457 -q, --quiet, --silent
18458 do not print progress messages
bec39cab
AC
18459 -d, --debug don't remove temporary files
18460 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18461 --file=FILE[:TEMPLATE]
18462 instantiate the configuration file FILE
18463 --header=FILE[:TEMPLATE]
18464 instantiate the configuration header FILE
234b45d4 18465
bec39cab
AC
18466Configuration files:
18467$config_files
234b45d4 18468
bec39cab
AC
18469Configuration headers:
18470$config_headers
234b45d4 18471
bec39cab
AC
18472Configuration links:
18473$config_links
234b45d4 18474
bec39cab
AC
18475Configuration commands:
18476$config_commands
18477
81ecdfbb 18478Report bugs to the package provider."
b4e70030 18479
81ecdfbb
RW
18480_ACEOF
18481cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18482ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
18483ac_cs_version="\\
18484config.status
d0ac1c44
SM
18485configured by $0, generated by GNU Autoconf 2.69,
18486 with options \\"\$ac_cs_config\\"
bec39cab 18487
d0ac1c44 18488Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
18489This config.status script is free software; the Free Software Foundation
18490gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18491
18492ac_pwd='$ac_pwd'
18493srcdir='$srcdir'
18494INSTALL='$INSTALL'
81ecdfbb
RW
18495AWK='$AWK'
18496test -n "\$AWK" || AWK=awk
bec39cab
AC
18497_ACEOF
18498
81ecdfbb
RW
18499cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18500# The default lists apply if the user does not specify any file.
bec39cab
AC
18501ac_need_defaults=:
18502while test $# != 0
18503do
18504 case $1 in
d0ac1c44 18505 --*=?*)
81ecdfbb
RW
18506 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18507 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18508 ac_shift=:
c906108c 18509 ;;
d0ac1c44
SM
18510 --*=)
18511 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18512 ac_optarg=
18513 ac_shift=:
18514 ;;
81ecdfbb 18515 *)
bec39cab
AC
18516 ac_option=$1
18517 ac_optarg=$2
18518 ac_shift=shift
c906108c 18519 ;;
bec39cab 18520 esac
c906108c 18521
bec39cab
AC
18522 case $ac_option in
18523 # Handling of the options.
bec39cab
AC
18524 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18525 ac_cs_recheck=: ;;
81ecdfbb
RW
18526 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18527 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
18528 --config | --confi | --conf | --con | --co | --c )
18529 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 18530 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18531 debug=: ;;
18532 --file | --fil | --fi | --f )
18533 $ac_shift
81ecdfbb
RW
18534 case $ac_optarg in
18535 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 18536 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
18537 esac
18538 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18539 ac_need_defaults=false;;
18540 --header | --heade | --head | --hea )
18541 $ac_shift
81ecdfbb
RW
18542 case $ac_optarg in
18543 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18544 esac
18545 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18546 ac_need_defaults=false;;
81ecdfbb
RW
18547 --he | --h)
18548 # Conflict between --help and --header
d0ac1c44 18549 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
18550Try \`$0 --help' for more information.";;
18551 --help | --hel | -h )
18552 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18553 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18554 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18555 ac_cs_silent=: ;;
c906108c 18556
bec39cab 18557 # This is an error.
d0ac1c44 18558 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 18559Try \`$0 --help' for more information." ;;
c906108c 18560
81ecdfbb
RW
18561 *) as_fn_append ac_config_targets " $1"
18562 ac_need_defaults=false ;;
c906108c 18563
bec39cab
AC
18564 esac
18565 shift
18566done
c906108c 18567
bec39cab 18568ac_configure_extra_args=
c906108c 18569
bec39cab
AC
18570if $ac_cs_silent; then
18571 exec 6>/dev/null
18572 ac_configure_extra_args="$ac_configure_extra_args --silent"
18573fi
c906108c 18574
bec39cab 18575_ACEOF
81ecdfbb 18576cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18577if \$ac_cs_recheck; then
d0ac1c44 18578 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
18579 shift
18580 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18581 CONFIG_SHELL='$SHELL'
18582 export CONFIG_SHELL
18583 exec "\$@"
bec39cab
AC
18584fi
18585
18586_ACEOF
81ecdfbb
RW
18587cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18588exec 5>>config.log
18589{
18590 echo
18591 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18592## Running $as_me. ##
18593_ASBOX
18594 $as_echo "$ac_log"
18595} >&5
bec39cab 18596
81ecdfbb
RW
18597_ACEOF
18598cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18599#
81ecdfbb 18600# INIT-COMMANDS
c906108c 18601#
a417dc56 18602ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 18603
bec39cab
AC
18604_ACEOF
18605
81ecdfbb 18606cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18607
81ecdfbb 18608# Handling of arguments.
bec39cab 18609for ac_config_target in $ac_config_targets
c906108c 18610do
81ecdfbb
RW
18611 case $ac_config_target in
18612 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18613 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18614 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18615 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18616 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18617 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18618 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 18619 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 18620 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18621 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 18622
d0ac1c44 18623 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18624 esac
18625done
18626
81ecdfbb 18627
bec39cab
AC
18628# If the user did not use the arguments to specify the items to instantiate,
18629# then the envvar interface is used. Set only those that are not.
18630# We use the long form for the default assignment because of an extremely
18631# bizarre bug on SunOS 4.1.3.
18632if $ac_need_defaults; then
18633 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18634 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18635 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18636 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18637fi
18638
b4e70030 18639# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18640# simply because there is no reason against having it here, and in addition,
b4e70030 18641# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18642# Hook for its removal unless debugging.
18643# Note that there is a small window in which the directory will not be cleaned:
18644# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18645$debug ||
18646{
d0ac1c44 18647 tmp= ac_tmp=
81ecdfbb 18648 trap 'exit_status=$?
d0ac1c44
SM
18649 : "${ac_tmp:=$tmp}"
18650 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
18651' 0
18652 trap 'as_fn_exit 1' 1 2 13 15
18653}
18654# Create a (secure) tmp directory for tmp files.
18655
18656{
18657 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 18658 test -d "$tmp"
81ecdfbb
RW
18659} ||
18660{
18661 tmp=./conf$$-$RANDOM
18662 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
18663} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18664ac_tmp=$tmp
81ecdfbb
RW
18665
18666# Set up the scripts for CONFIG_FILES section.
18667# No need to generate them if there are no CONFIG_FILES.
18668# This happens for instance with `./config.status config.h'.
18669if test -n "$CONFIG_FILES"; then
18670
18671if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18672 ac_cs_awk_getline=:
18673 ac_cs_awk_pipe_init=
18674 ac_cs_awk_read_file='
18675 while ((getline aline < (F[key])) > 0)
18676 print(aline)
18677 close(F[key])'
18678 ac_cs_awk_pipe_fini=
18679else
18680 ac_cs_awk_getline=false
18681 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18682 ac_cs_awk_read_file='
18683 print "|#_!!_#|"
18684 print "cat " F[key] " &&"
18685 '$ac_cs_awk_pipe_init
18686 # The final `:' finishes the AND list.
18687 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18688fi
18689ac_cr=`echo X | tr X '\015'`
18690# On cygwin, bash can eat \r inside `` if the user requested igncr.
18691# But we know of no other shell where ac_cr would be empty at this
18692# point, so we can use a bashism as a fallback.
18693if test "x$ac_cr" = x; then
18694 eval ac_cr=\$\'\\r\'
18695fi
18696ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18697if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 18698 ac_cs_awk_cr='\\r'
81ecdfbb
RW
18699else
18700 ac_cs_awk_cr=$ac_cr
18701fi
18702
d0ac1c44 18703echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
18704_ACEOF
18705
18706# Create commands to substitute file output variables.
18707{
18708 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 18709 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
18710 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18711 echo "_ACAWK" &&
18712 echo "_ACEOF"
18713} >conf$$files.sh &&
18714. ./conf$$files.sh ||
d0ac1c44 18715 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18716rm -f conf$$files.sh
18717
18718{
18719 echo "cat >conf$$subs.awk <<_ACEOF" &&
18720 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18721 echo "_ACEOF"
18722} >conf$$subs.sh ||
d0ac1c44
SM
18723 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18724ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
18725ac_delim='%!_!# '
18726for ac_last_try in false false false false false :; do
18727 . ./conf$$subs.sh ||
d0ac1c44 18728 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18729
18730 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18731 if test $ac_delim_n = $ac_delim_num; then
18732 break
18733 elif $ac_last_try; then
d0ac1c44 18734 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18735 else
18736 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18737 fi
18738done
18739rm -f conf$$subs.sh
18740
18741cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18742cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
18743_ACEOF
18744sed -n '
18745h
18746s/^/S["/; s/!.*/"]=/
18747p
18748g
18749s/^[^!]*!//
18750:repl
18751t repl
18752s/'"$ac_delim"'$//
18753t delim
18754:nl
18755h
d0ac1c44 18756s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18757t more1
18758s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18759p
18760n
18761b repl
18762:more1
18763s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18764p
18765g
18766s/.\{148\}//
18767t nl
18768:delim
18769h
d0ac1c44 18770s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18771t more2
18772s/["\\]/\\&/g; s/^/"/; s/$/"/
18773p
18774b
18775:more2
18776s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18777p
18778g
18779s/.\{148\}//
18780t delim
18781' <conf$$subs.awk | sed '
18782/^[^""]/{
18783 N
18784 s/\n//
18785}
18786' >>$CONFIG_STATUS || ac_write_fail=1
18787rm -f conf$$subs.awk
18788cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18789_ACAWK
d0ac1c44 18790cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
18791 for (key in S) S_is_set[key] = 1
18792 FS = "\a"
18793 \$ac_cs_awk_pipe_init
18794}
18795{
18796 line = $ 0
18797 nfields = split(line, field, "@")
18798 substed = 0
18799 len = length(field[1])
18800 for (i = 2; i < nfields; i++) {
18801 key = field[i]
18802 keylen = length(key)
18803 if (S_is_set[key]) {
18804 value = S[key]
18805 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18806 len += length(value) + length(field[++i])
18807 substed = 1
18808 } else
18809 len += 1 + keylen
18810 }
18811 if (nfields == 3 && !substed) {
18812 key = field[2]
18813 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18814 \$ac_cs_awk_read_file
18815 next
18816 }
18817 }
18818 print line
b4e70030 18819}
81ecdfbb
RW
18820\$ac_cs_awk_pipe_fini
18821_ACAWK
18822_ACEOF
18823cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18824if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18825 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18826else
18827 cat
d0ac1c44
SM
18828fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18829 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
18830_ACEOF
18831
d0ac1c44
SM
18832# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18833# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
18834# trailing colons and then remove the whole line if VPATH becomes empty
18835# (actually we leave an empty line to preserve line numbers).
18836if test "x$srcdir" = x.; then
d0ac1c44
SM
18837 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18838h
18839s///
18840s/^/:/
18841s/[ ]*$/:/
18842s/:\$(srcdir):/:/g
18843s/:\${srcdir}:/:/g
18844s/:@srcdir@:/:/g
18845s/^:*//
81ecdfbb 18846s/:*$//
d0ac1c44
SM
18847x
18848s/\(=[ ]*\).*/\1/
18849G
18850s/\n//
81ecdfbb
RW
18851s/^[^=]*=[ ]*$//
18852}'
18853fi
18854
18855cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18856fi # test -n "$CONFIG_FILES"
18857
18858# Set up the scripts for CONFIG_HEADERS section.
18859# No need to generate them if there are no CONFIG_HEADERS.
18860# This happens for instance with `./config.status Makefile'.
18861if test -n "$CONFIG_HEADERS"; then
d0ac1c44 18862cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
18863BEGIN {
18864_ACEOF
18865
18866# Transform confdefs.h into an awk script `defines.awk', embedded as
18867# here-document in config.status, that substitutes the proper values into
18868# config.h.in to produce config.h.
4e8d927d 18869
81ecdfbb
RW
18870# Create a delimiter string that does not exist in confdefs.h, to ease
18871# handling of long lines.
18872ac_delim='%!_!# '
18873for ac_last_try in false false :; do
d0ac1c44
SM
18874 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18875 if test -z "$ac_tt"; then
81ecdfbb
RW
18876 break
18877 elif $ac_last_try; then
d0ac1c44 18878 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
18879 else
18880 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18881 fi
18882done
4e8d927d 18883
81ecdfbb
RW
18884# For the awk script, D is an array of macro values keyed by name,
18885# likewise P contains macro parameters if any. Preserve backslash
18886# newline sequences.
18887
18888ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18889sed -n '
18890s/.\{148\}/&'"$ac_delim"'/g
18891t rset
18892:rset
18893s/^[ ]*#[ ]*define[ ][ ]*/ /
18894t def
18895d
18896:def
18897s/\\$//
18898t bsnl
18899s/["\\]/\\&/g
18900s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18901D["\1"]=" \3"/p
18902s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18903d
18904:bsnl
18905s/["\\]/\\&/g
18906s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18907D["\1"]=" \3\\\\\\n"\\/p
18908t cont
18909s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18910t cont
18911d
18912:cont
18913n
18914s/.\{148\}/&'"$ac_delim"'/g
18915t clear
18916:clear
18917s/\\$//
18918t bsnlc
18919s/["\\]/\\&/g; s/^/"/; s/$/"/p
18920d
18921:bsnlc
18922s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18923b cont
18924' <confdefs.h | sed '
18925s/'"$ac_delim"'/"\\\
18926"/g' >>$CONFIG_STATUS || ac_write_fail=1
18927
18928cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18929 for (key in D) D_is_set[key] = 1
18930 FS = "\a"
18931}
18932/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18933 line = \$ 0
18934 split(line, arg, " ")
18935 if (arg[1] == "#") {
18936 defundef = arg[2]
18937 mac1 = arg[3]
18938 } else {
18939 defundef = substr(arg[1], 2)
18940 mac1 = arg[2]
18941 }
18942 split(mac1, mac2, "(") #)
18943 macro = mac2[1]
18944 prefix = substr(line, 1, index(line, defundef) - 1)
18945 if (D_is_set[macro]) {
18946 # Preserve the white space surrounding the "#".
18947 print prefix "define", macro P[macro] D[macro]
18948 next
18949 } else {
18950 # Replace #undef with comments. This is necessary, for example,
18951 # in the case of _POSIX_SOURCE, which is predefined and required
18952 # on some systems where configure will not decide to define it.
18953 if (defundef == "undef") {
18954 print "/*", prefix defundef, macro, "*/"
18955 next
18956 }
18957 }
b4e70030 18958}
81ecdfbb
RW
18959{ print }
18960_ACAWK
b4e70030 18961_ACEOF
81ecdfbb 18962cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 18963 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 18964fi # test -n "$CONFIG_HEADERS"
4e8d927d 18965
4e8d927d 18966
81ecdfbb
RW
18967eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18968shift
18969for ac_tag
18970do
18971 case $ac_tag in
18972 :[FHLC]) ac_mode=$ac_tag; continue;;
18973 esac
18974 case $ac_mode$ac_tag in
18975 :[FHL]*:*);;
d0ac1c44 18976 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
18977 :[FH]-) ac_tag=-:-;;
18978 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18979 esac
18980 ac_save_IFS=$IFS
18981 IFS=:
18982 set x $ac_tag
18983 IFS=$ac_save_IFS
18984 shift
18985 ac_file=$1
18986 shift
4e8d927d 18987
81ecdfbb
RW
18988 case $ac_mode in
18989 :L) ac_source=$1;;
18990 :[FH])
18991 ac_file_inputs=
18992 for ac_f
18993 do
18994 case $ac_f in
d0ac1c44 18995 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
18996 *) # Look for the file first in the build tree, then in the source tree
18997 # (if the path is not absolute). The absolute path cannot be DOS-style,
18998 # because $ac_f cannot contain `:'.
18999 test -f "$ac_f" ||
19000 case $ac_f in
19001 [\\/$]*) false;;
19002 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19003 esac ||
d0ac1c44 19004 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
19005 esac
19006 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19007 as_fn_append ac_file_inputs " '$ac_f'"
19008 done
19009
19010 # Let's still pretend it is `configure' which instantiates (i.e., don't
19011 # use $as_me), people would be surprised to read:
19012 # /* config.h. Generated by config.status. */
19013 configure_input='Generated from '`
19014 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19015 `' by configure.'
19016 if test x"$ac_file" != x-; then
19017 configure_input="$ac_file. $configure_input"
19018 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19019$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 19020 fi
81ecdfbb
RW
19021 # Neutralize special characters interpreted by sed in replacement strings.
19022 case $configure_input in #(
19023 *\&* | *\|* | *\\* )
19024 ac_sed_conf_input=`$as_echo "$configure_input" |
19025 sed 's/[\\\\&|]/\\\\&/g'`;; #(
19026 *) ac_sed_conf_input=$configure_input;;
19027 esac
4e8d927d 19028
81ecdfbb 19029 case $ac_tag in
d0ac1c44
SM
19030 *:-:* | *:-) cat >"$ac_tmp/stdin" \
19031 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
19032 esac
19033 ;;
c906108c
SS
19034 esac
19035
81ecdfbb 19036 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
19037$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19038 X"$ac_file" : 'X\(//\)[^/]' \| \
19039 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
19040 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19041$as_echo X"$ac_file" |
19042 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19043 s//\1/
19044 q
19045 }
19046 /^X\(\/\/\)[^/].*/{
19047 s//\1/
19048 q
19049 }
19050 /^X\(\/\/\)$/{
19051 s//\1/
19052 q
19053 }
19054 /^X\(\/\).*/{
19055 s//\1/
19056 q
19057 }
19058 s/.*/./; q'`
19059 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19060 ac_builddir=.
19061
81ecdfbb
RW
19062case "$ac_dir" in
19063.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19064*)
19065 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19066 # A ".." for each directory in $ac_dir_suffix.
19067 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19068 case $ac_top_builddir_sub in
19069 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19070 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19071 esac ;;
19072esac
19073ac_abs_top_builddir=$ac_pwd
19074ac_abs_builddir=$ac_pwd$ac_dir_suffix
19075# for backward compatibility:
19076ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19077
19078case $srcdir in
81ecdfbb 19079 .) # We are building in place.
bec39cab 19080 ac_srcdir=.
81ecdfbb
RW
19081 ac_top_srcdir=$ac_top_builddir_sub
19082 ac_abs_top_srcdir=$ac_pwd ;;
19083 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19084 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19085 ac_top_srcdir=$srcdir
19086 ac_abs_top_srcdir=$srcdir ;;
19087 *) # Relative name.
19088 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19089 ac_top_srcdir=$ac_top_build_prefix$srcdir
19090 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19091esac
81ecdfbb 19092ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 19093
c906108c 19094
81ecdfbb
RW
19095 case $ac_mode in
19096 :F)
19097 #
19098 # CONFIG_FILE
19099 #
c906108c 19100
bec39cab
AC
19101 case $INSTALL in
19102 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 19103 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 19104 esac
81ecdfbb 19105_ACEOF
121ce6e5 19106
81ecdfbb
RW
19107cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19108# If the template does not know about datarootdir, expand it.
19109# FIXME: This hack should be removed a few years after 2.60.
19110ac_datarootdir_hack=; ac_datarootdir_seen=
19111ac_sed_dataroot='
19112/datarootdir/ {
19113 p
19114 q
19115}
19116/@datadir@/p
19117/@docdir@/p
19118/@infodir@/p
19119/@localedir@/p
19120/@mandir@/p'
19121case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19122*datarootdir*) ac_datarootdir_seen=yes;;
19123*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19124 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19125$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19126_ACEOF
19127cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19128 ac_datarootdir_hack='
19129 s&@datadir@&$datadir&g
19130 s&@docdir@&$docdir&g
19131 s&@infodir@&$infodir&g
19132 s&@localedir@&$localedir&g
19133 s&@mandir@&$mandir&g
19134 s&\\\${datarootdir}&$datarootdir&g' ;;
19135esac
4e8d927d 19136_ACEOF
81ecdfbb
RW
19137
19138# Neutralize VPATH when `$srcdir' = `.'.
19139# Shell code in configure.ac might set extrasub.
19140# FIXME: do we really want to maintain this feature?
19141cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19142ac_sed_extra="$ac_vpsub
bec39cab
AC
19143$extrasub
19144_ACEOF
81ecdfbb 19145cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
19146:t
19147/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
19148s|@configure_input@|$ac_sed_conf_input|;t t
19149s&@top_builddir@&$ac_top_builddir_sub&;t t
19150s&@top_build_prefix@&$ac_top_build_prefix&;t t
19151s&@srcdir@&$ac_srcdir&;t t
19152s&@abs_srcdir@&$ac_abs_srcdir&;t t
19153s&@top_srcdir@&$ac_top_srcdir&;t t
19154s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19155s&@builddir@&$ac_builddir&;t t
19156s&@abs_builddir@&$ac_abs_builddir&;t t
19157s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19158s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
19159$ac_datarootdir_hack
19160"
19161eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19162if $ac_cs_awk_getline; then
d0ac1c44 19163 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 19164else
d0ac1c44
SM
19165 $AWK -f "$ac_tmp/subs.awk" | $SHELL
19166fi \
19167 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19168
19169test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
19170 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19171 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19172 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 19173 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19174which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 19175$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19176which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 19177
d0ac1c44 19178 rm -f "$ac_tmp/stdin"
bec39cab 19179 case $ac_file in
d0ac1c44
SM
19180 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19181 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 19182 esac \
d0ac1c44 19183 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19184 ;;
19185 :H)
19186 #
19187 # CONFIG_HEADER
19188 #
bec39cab 19189 if test x"$ac_file" != x-; then
81ecdfbb
RW
19190 {
19191 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19192 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19193 } >"$ac_tmp/config.h" \
19194 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19195 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
19196 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19197$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 19198 else
81ecdfbb 19199 rm -f "$ac_file"
d0ac1c44
SM
19200 mv "$ac_tmp/config.h" "$ac_file" \
19201 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
19202 fi
19203 else
81ecdfbb 19204 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19205 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19206 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 19207 fi
81ecdfbb
RW
19208 ;;
19209 :L)
19210 #
19211 # CONFIG_LINK
19212 #
c906108c 19213
81ecdfbb
RW
19214 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19215 :
b4e70030 19216 else
81ecdfbb
RW
19217 # Prefer the file from the source tree if names are identical.
19218 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19219 ac_source=$srcdir/$ac_source
19220 fi
b4e70030 19221
81ecdfbb
RW
19222 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19223$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 19224
81ecdfbb 19225 if test ! -r "$ac_source"; then
d0ac1c44 19226 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
19227 fi
19228 rm -f "$ac_file"
bec39cab 19229
81ecdfbb 19230 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 19231 case $ac_source in
81ecdfbb
RW
19232 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19233 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19234 esac
19235 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19236 ln "$ac_source" "$ac_file" 2>/dev/null ||
19237 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 19238 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
19239 fi
19240 ;;
19241 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19242$as_echo "$as_me: executing $ac_file commands" >&6;}
19243 ;;
c906108c 19244 esac
b4e70030 19245
bec39cab 19246
81ecdfbb
RW
19247 case $ac_file$ac_mode in
19248 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 19249 "gcore":F) chmod +x gcore ;;
1e94266c
SM
19250 "Makefile":F)
19251case x$CONFIG_HEADERS in
19252xconfig.h:config.in)
19253echo > stamp-h ;;
19254esac
19255 ;;
19256 "gdb-gdb.gdb":F)
19257case x$CONFIG_HEADERS in
19258xconfig.h:config.in)
19259echo > stamp-h ;;
141ec9f6
SM
19260esac
19261 ;;
19262 "gdb-gdb.py":F)
19263case x$CONFIG_HEADERS in
19264xconfig.h:config.in)
19265echo > stamp-h ;;
1e94266c
SM
19266esac
19267 ;;
19268 "doc/Makefile":F)
19269case x$CONFIG_HEADERS in
19270xconfig.h:config.in)
19271echo > stamp-h ;;
19272esac
19273 ;;
19274 "data-directory/Makefile":F)
c906108c
SS
19275case x$CONFIG_HEADERS in
19276xconfig.h:config.in)
19277echo > stamp-h ;;
19278esac
bec39cab 19279 ;;
81ecdfbb 19280
bec39cab 19281 esac
81ecdfbb 19282done # for ac_tag
c906108c 19283
bec39cab 19284
81ecdfbb 19285as_fn_exit 0
bec39cab 19286_ACEOF
bec39cab
AC
19287ac_clean_files=$ac_clean_files_save
19288
81ecdfbb 19289test $ac_write_fail = 0 ||
d0ac1c44 19290 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 19291
bec39cab
AC
19292
19293# configure is writing to config.log, and then calls config.status.
19294# config.status does its own redirection, appending to config.log.
19295# Unfortunately, on DOS this fails, as config.log is still kept open
19296# by configure, so config.status won't be able to write to it; its
19297# output is simply discarded. So we exec the FD to /dev/null,
19298# effectively closing config.log, so it can be properly (re)opened and
19299# appended to by config.status. When coming back to configure, we
19300# need to make the FD available again.
19301if test "$no_create" != yes; then
19302 ac_cs_success=:
19303 ac_config_status_args=
19304 test "$silent" = yes &&
19305 ac_config_status_args="$ac_config_status_args --quiet"
19306 exec 5>/dev/null
19307 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19308 exec 5>>config.log
19309 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19310 # would make configure fail if this is the last instruction.
d0ac1c44 19311 $ac_cs_success || as_fn_exit 1
bec39cab 19312fi
c906108c 19313
bec39cab 19314#
81ecdfbb 19315# CONFIG_SUBDIRS section.
bec39cab 19316#
c906108c
SS
19317if test "$no_recursion" != yes; then
19318
81ecdfbb
RW
19319 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19320 # so they do not pile up.
c906108c
SS
19321 ac_sub_configure_args=
19322 ac_prev=
fdc59709
PB
19323 eval "set x $ac_configure_args"
19324 shift
19325 for ac_arg
19326 do
c906108c
SS
19327 if test -n "$ac_prev"; then
19328 ac_prev=
19329 continue
19330 fi
bec39cab 19331 case $ac_arg in
c906108c
SS
19332 -cache-file | --cache-file | --cache-fil | --cache-fi \
19333 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19334 ac_prev=cache_file ;;
19335 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19336 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19337 | --c=*)
19338 ;;
19339 --config-cache | -C)
c906108c
SS
19340 ;;
19341 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19342 ac_prev=srcdir ;;
19343 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19344 ;;
bec39cab
AC
19345 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19346 ac_prev=prefix ;;
19347 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19348 ;;
81ecdfbb
RW
19349 --disable-option-checking)
19350 ;;
fdc59709
PB
19351 *)
19352 case $ac_arg in
81ecdfbb 19353 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19354 esac
81ecdfbb 19355 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19356 esac
19357 done
19358
bec39cab
AC
19359 # Always prepend --prefix to ensure using the same prefix
19360 # in subdir configurations.
fdc59709
PB
19361 ac_arg="--prefix=$prefix"
19362 case $ac_arg in
81ecdfbb 19363 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19364 esac
81ecdfbb
RW
19365 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19366
19367 # Pass --silent
19368 if test "$silent" = yes; then
19369 ac_sub_configure_args="--silent $ac_sub_configure_args"
19370 fi
19371
19372 # Always prepend --disable-option-checking to silence warnings, since
19373 # different subdirs can have different --enable and --with options.
19374 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19375
b4e70030 19376 ac_popdir=`pwd`
bec39cab 19377 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19378
19379 # Do not complain, so a configure script can configure whichever
19380 # parts of a large source tree are present.
fdc59709 19381 test -d "$srcdir/$ac_dir" || continue
c906108c 19382
81ecdfbb
RW
19383 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19384 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19385 $as_echo "$ac_msg" >&6
19386 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19387 ac_builddir=.
19388
81ecdfbb
RW
19389case "$ac_dir" in
19390.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19391*)
19392 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19393 # A ".." for each directory in $ac_dir_suffix.
19394 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19395 case $ac_top_builddir_sub in
19396 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19397 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19398 esac ;;
19399esac
19400ac_abs_top_builddir=$ac_pwd
19401ac_abs_builddir=$ac_pwd$ac_dir_suffix
19402# for backward compatibility:
19403ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19404
19405case $srcdir in
81ecdfbb 19406 .) # We are building in place.
bec39cab 19407 ac_srcdir=.
81ecdfbb
RW
19408 ac_top_srcdir=$ac_top_builddir_sub
19409 ac_abs_top_srcdir=$ac_pwd ;;
19410 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19411 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19412 ac_top_srcdir=$srcdir
19413 ac_abs_top_srcdir=$srcdir ;;
19414 *) # Relative name.
19415 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19416 ac_top_srcdir=$ac_top_build_prefix$srcdir
19417 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19418esac
81ecdfbb 19419ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19420
c906108c 19421
fdc59709 19422 cd "$ac_dir"
c906108c
SS
19423
19424 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19425 if test -f "$ac_srcdir/configure.gnu"; then
19426 ac_sub_configure=$ac_srcdir/configure.gnu
19427 elif test -f "$ac_srcdir/configure"; then
19428 ac_sub_configure=$ac_srcdir/configure
19429 elif test -f "$ac_srcdir/configure.in"; then
19430 # This should be Cygnus configure.
19431 ac_sub_configure=$ac_aux_dir/configure
c906108c 19432 else
81ecdfbb
RW
19433 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19434$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19435 ac_sub_configure=
19436 fi
19437
19438 # The recursion is here.
19439 if test -n "$ac_sub_configure"; then
c906108c 19440 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19441 case $cache_file in
19442 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19443 *) # Relative name.
19444 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19445 esac
c906108c 19446
81ecdfbb
RW
19447 { $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
19448$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19449 # The eval makes quoting arguments work.
fdc59709
PB
19450 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19451 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 19452 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19453 fi
19454
fdc59709 19455 cd "$ac_popdir"
c906108c
SS
19456 done
19457fi
81ecdfbb
RW
19458if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19459 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19460$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19461fi
c906108c 19462
This page took 4.654494 seconds and 4 git commands to generate.