Add missing va_end found by Coverity
[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
81ecdfbb
RW
899'
900 ac_precious_vars='build_alias
901host_alias
902target_alias
903CC
904CFLAGS
905LDFLAGS
906LIBS
907CPPFLAGS
3bc3d82a
PA
908CXX
909CXXFLAGS
910CCC
81ecdfbb 911CPP
f06e05e0
JK
912MAKEINFO
913MAKEINFOFLAGS
81ecdfbb
RW
914YACC
915YFLAGS
916XMKMF'
5ae98d25 917ac_subdirs_all='testsuite
81ecdfbb 918gdbtk
81ecdfbb 919gdbserver'
c906108c
SS
920
921# Initialize some variables set by options.
bec39cab
AC
922ac_init_help=
923ac_init_version=false
81ecdfbb
RW
924ac_unrecognized_opts=
925ac_unrecognized_sep=
c906108c
SS
926# The variables have the same names as the options, with
927# dashes changed to underlines.
bec39cab 928cache_file=/dev/null
c906108c 929exec_prefix=NONE
c906108c 930no_create=
c906108c
SS
931no_recursion=
932prefix=NONE
933program_prefix=NONE
934program_suffix=NONE
935program_transform_name=s,x,x,
936silent=
937site=
938srcdir=
c906108c
SS
939verbose=
940x_includes=NONE
941x_libraries=NONE
bec39cab
AC
942
943# Installation directory options.
944# These are left unexpanded so users can "make install exec_prefix=/foo"
945# and all the variables that are supposed to be based on exec_prefix
946# by default will actually change.
947# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 948# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
949bindir='${exec_prefix}/bin'
950sbindir='${exec_prefix}/sbin'
951libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
952datarootdir='${prefix}/share'
953datadir='${datarootdir}'
c906108c
SS
954sysconfdir='${prefix}/etc'
955sharedstatedir='${prefix}/com'
956localstatedir='${prefix}/var'
c906108c
SS
957includedir='${prefix}/include'
958oldincludedir='/usr/include'
81ecdfbb
RW
959docdir='${datarootdir}/doc/${PACKAGE}'
960infodir='${datarootdir}/info'
961htmldir='${docdir}'
962dvidir='${docdir}'
963pdfdir='${docdir}'
964psdir='${docdir}'
965libdir='${exec_prefix}/lib'
966localedir='${datarootdir}/locale'
967mandir='${datarootdir}/man'
c906108c 968
c906108c 969ac_prev=
81ecdfbb 970ac_dashdash=
c906108c
SS
971for ac_option
972do
c906108c
SS
973 # If the previous option needs an argument, assign it.
974 if test -n "$ac_prev"; then
81ecdfbb 975 eval $ac_prev=\$ac_option
c906108c
SS
976 ac_prev=
977 continue
978 fi
979
81ecdfbb 980 case $ac_option in
d0ac1c44
SM
981 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
982 *=) ac_optarg= ;;
983 *) ac_optarg=yes ;;
81ecdfbb 984 esac
c906108c
SS
985
986 # Accept the important Cygnus configure options, so we can diagnose typos.
987
81ecdfbb
RW
988 case $ac_dashdash$ac_option in
989 --)
990 ac_dashdash=yes ;;
c906108c
SS
991
992 -bindir | --bindir | --bindi | --bind | --bin | --bi)
993 ac_prev=bindir ;;
994 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 995 bindir=$ac_optarg ;;
c906108c
SS
996
997 -build | --build | --buil | --bui | --bu)
bec39cab 998 ac_prev=build_alias ;;
c906108c 999 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1000 build_alias=$ac_optarg ;;
c906108c
SS
1001
1002 -cache-file | --cache-file | --cache-fil | --cache-fi \
1003 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1004 ac_prev=cache_file ;;
1005 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1006 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1007 cache_file=$ac_optarg ;;
1008
1009 --config-cache | -C)
1010 cache_file=config.cache ;;
c906108c 1011
81ecdfbb 1012 -datadir | --datadir | --datadi | --datad)
c906108c 1013 ac_prev=datadir ;;
81ecdfbb 1014 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1015 datadir=$ac_optarg ;;
c906108c 1016
81ecdfbb
RW
1017 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1018 | --dataroo | --dataro | --datar)
1019 ac_prev=datarootdir ;;
1020 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1021 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1022 datarootdir=$ac_optarg ;;
1023
c906108c 1024 -disable-* | --disable-*)
81ecdfbb 1025 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1026 # Reject names that are not valid shell variable names.
81ecdfbb 1027 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1028 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1029 ac_useropt_orig=$ac_useropt
1030 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1031 case $ac_user_opts in
1032 *"
1033"enable_$ac_useropt"
1034"*) ;;
1035 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1036 ac_unrecognized_sep=', ';;
1037 esac
1038 eval enable_$ac_useropt=no ;;
1039
1040 -docdir | --docdir | --docdi | --doc | --do)
1041 ac_prev=docdir ;;
1042 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1043 docdir=$ac_optarg ;;
1044
1045 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1046 ac_prev=dvidir ;;
1047 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1048 dvidir=$ac_optarg ;;
c906108c
SS
1049
1050 -enable-* | --enable-*)
81ecdfbb 1051 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1052 # Reject names that are not valid shell variable names.
81ecdfbb 1053 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1054 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1055 ac_useropt_orig=$ac_useropt
1056 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1057 case $ac_user_opts in
1058 *"
1059"enable_$ac_useropt"
1060"*) ;;
1061 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1062 ac_unrecognized_sep=', ';;
b4e70030 1063 esac
81ecdfbb 1064 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1065
1066 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1067 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1068 | --exec | --exe | --ex)
1069 ac_prev=exec_prefix ;;
1070 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1071 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1072 | --exec=* | --exe=* | --ex=*)
bec39cab 1073 exec_prefix=$ac_optarg ;;
c906108c
SS
1074
1075 -gas | --gas | --ga | --g)
1076 # Obsolete; use --with-gas.
1077 with_gas=yes ;;
1078
bec39cab
AC
1079 -help | --help | --hel | --he | -h)
1080 ac_init_help=long ;;
1081 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1082 ac_init_help=recursive ;;
1083 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1084 ac_init_help=short ;;
c906108c
SS
1085
1086 -host | --host | --hos | --ho)
bec39cab 1087 ac_prev=host_alias ;;
c906108c 1088 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1089 host_alias=$ac_optarg ;;
c906108c 1090
81ecdfbb
RW
1091 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1092 ac_prev=htmldir ;;
1093 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1094 | --ht=*)
1095 htmldir=$ac_optarg ;;
1096
c906108c
SS
1097 -includedir | --includedir | --includedi | --included | --include \
1098 | --includ | --inclu | --incl | --inc)
1099 ac_prev=includedir ;;
1100 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1101 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1102 includedir=$ac_optarg ;;
c906108c
SS
1103
1104 -infodir | --infodir | --infodi | --infod | --info | --inf)
1105 ac_prev=infodir ;;
1106 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1107 infodir=$ac_optarg ;;
c906108c
SS
1108
1109 -libdir | --libdir | --libdi | --libd)
1110 ac_prev=libdir ;;
1111 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1112 libdir=$ac_optarg ;;
c906108c
SS
1113
1114 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1115 | --libexe | --libex | --libe)
1116 ac_prev=libexecdir ;;
1117 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1118 | --libexe=* | --libex=* | --libe=*)
bec39cab 1119 libexecdir=$ac_optarg ;;
c906108c 1120
81ecdfbb
RW
1121 -localedir | --localedir | --localedi | --localed | --locale)
1122 ac_prev=localedir ;;
1123 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1124 localedir=$ac_optarg ;;
1125
c906108c 1126 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1127 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1128 ac_prev=localstatedir ;;
1129 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1130 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1131 localstatedir=$ac_optarg ;;
c906108c
SS
1132
1133 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1134 ac_prev=mandir ;;
1135 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1136 mandir=$ac_optarg ;;
c906108c
SS
1137
1138 -nfp | --nfp | --nf)
1139 # Obsolete; use --without-fp.
1140 with_fp=no ;;
1141
1142 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1143 | --no-cr | --no-c | -n)
c906108c
SS
1144 no_create=yes ;;
1145
1146 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1147 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1148 no_recursion=yes ;;
1149
1150 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1151 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1152 | --oldin | --oldi | --old | --ol | --o)
1153 ac_prev=oldincludedir ;;
1154 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1155 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1156 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1157 oldincludedir=$ac_optarg ;;
c906108c
SS
1158
1159 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1160 ac_prev=prefix ;;
1161 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1162 prefix=$ac_optarg ;;
c906108c
SS
1163
1164 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1165 | --program-pre | --program-pr | --program-p)
1166 ac_prev=program_prefix ;;
1167 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1168 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1169 program_prefix=$ac_optarg ;;
c906108c
SS
1170
1171 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1172 | --program-suf | --program-su | --program-s)
1173 ac_prev=program_suffix ;;
1174 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1175 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1176 program_suffix=$ac_optarg ;;
c906108c
SS
1177
1178 -program-transform-name | --program-transform-name \
1179 | --program-transform-nam | --program-transform-na \
1180 | --program-transform-n | --program-transform- \
1181 | --program-transform | --program-transfor \
1182 | --program-transfo | --program-transf \
1183 | --program-trans | --program-tran \
1184 | --progr-tra | --program-tr | --program-t)
1185 ac_prev=program_transform_name ;;
1186 -program-transform-name=* | --program-transform-name=* \
1187 | --program-transform-nam=* | --program-transform-na=* \
1188 | --program-transform-n=* | --program-transform-=* \
1189 | --program-transform=* | --program-transfor=* \
1190 | --program-transfo=* | --program-transf=* \
1191 | --program-trans=* | --program-tran=* \
1192 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1193 program_transform_name=$ac_optarg ;;
c906108c 1194
81ecdfbb
RW
1195 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1196 ac_prev=pdfdir ;;
1197 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1198 pdfdir=$ac_optarg ;;
1199
1200 -psdir | --psdir | --psdi | --psd | --ps)
1201 ac_prev=psdir ;;
1202 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1203 psdir=$ac_optarg ;;
1204
c906108c
SS
1205 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1206 | -silent | --silent | --silen | --sile | --sil)
1207 silent=yes ;;
1208
1209 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1210 ac_prev=sbindir ;;
1211 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1212 | --sbi=* | --sb=*)
bec39cab 1213 sbindir=$ac_optarg ;;
c906108c
SS
1214
1215 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1216 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1217 | --sharedst | --shareds | --shared | --share | --shar \
1218 | --sha | --sh)
1219 ac_prev=sharedstatedir ;;
1220 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1221 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1222 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1223 | --sha=* | --sh=*)
bec39cab 1224 sharedstatedir=$ac_optarg ;;
c906108c
SS
1225
1226 -site | --site | --sit)
1227 ac_prev=site ;;
1228 -site=* | --site=* | --sit=*)
bec39cab 1229 site=$ac_optarg ;;
3ace7edb 1230
c906108c
SS
1231 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1232 ac_prev=srcdir ;;
1233 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1234 srcdir=$ac_optarg ;;
c906108c
SS
1235
1236 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1237 | --syscon | --sysco | --sysc | --sys | --sy)
1238 ac_prev=sysconfdir ;;
1239 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1240 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1241 sysconfdir=$ac_optarg ;;
c906108c
SS
1242
1243 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1244 ac_prev=target_alias ;;
c906108c 1245 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1246 target_alias=$ac_optarg ;;
c906108c
SS
1247
1248 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1249 verbose=yes ;;
1250
bec39cab
AC
1251 -version | --version | --versio | --versi | --vers | -V)
1252 ac_init_version=: ;;
c906108c
SS
1253
1254 -with-* | --with-*)
81ecdfbb 1255 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1256 # Reject names that are not valid shell variable names.
81ecdfbb 1257 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1258 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1259 ac_useropt_orig=$ac_useropt
1260 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1261 case $ac_user_opts in
1262 *"
1263"with_$ac_useropt"
1264"*) ;;
1265 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1266 ac_unrecognized_sep=', ';;
b4e70030 1267 esac
81ecdfbb 1268 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1269
1270 -without-* | --without-*)
81ecdfbb 1271 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1272 # Reject names that are not valid shell variable names.
81ecdfbb 1273 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1274 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1275 ac_useropt_orig=$ac_useropt
1276 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1277 case $ac_user_opts in
1278 *"
1279"with_$ac_useropt"
1280"*) ;;
1281 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1282 ac_unrecognized_sep=', ';;
1283 esac
1284 eval with_$ac_useropt=no ;;
c906108c
SS
1285
1286 --x)
1287 # Obsolete; use --with-x.
1288 with_x=yes ;;
1289
1290 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1291 | --x-incl | --x-inc | --x-in | --x-i)
1292 ac_prev=x_includes ;;
1293 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1294 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1295 x_includes=$ac_optarg ;;
c906108c
SS
1296
1297 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1298 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1299 ac_prev=x_libraries ;;
1300 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1301 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1302 x_libraries=$ac_optarg ;;
c906108c 1303
d0ac1c44
SM
1304 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1305Try \`$0 --help' for more information"
c906108c
SS
1306 ;;
1307
bec39cab
AC
1308 *=*)
1309 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1310 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1311 case $ac_envvar in #(
1312 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1313 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1314 esac
1315 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1316 export $ac_envvar ;;
1317
c906108c 1318 *)
bec39cab 1319 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1320 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1321 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1322 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1323 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1324 ;;
1325
1326 esac
1327done
1328
1329if test -n "$ac_prev"; then
bec39cab 1330 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1331 as_fn_error $? "missing argument to $ac_option"
c906108c 1332fi
c906108c 1333
81ecdfbb
RW
1334if test -n "$ac_unrecognized_opts"; then
1335 case $enable_option_checking in
1336 no) ;;
d0ac1c44 1337 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1338 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1339 esac
81ecdfbb 1340fi
b4e70030 1341
81ecdfbb
RW
1342# Check all directory arguments for consistency.
1343for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1344 datadir sysconfdir sharedstatedir localstatedir includedir \
1345 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1346 libdir localedir mandir
b4e70030 1347do
81ecdfbb
RW
1348 eval ac_val=\$$ac_var
1349 # Remove trailing slashes.
1350 case $ac_val in
1351 */ )
1352 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1353 eval $ac_var=\$ac_val;;
1354 esac
1355 # Be sure to have absolute directory names.
b4e70030 1356 case $ac_val in
81ecdfbb
RW
1357 [\\/$]* | ?:[\\/]* ) continue;;
1358 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1359 esac
d0ac1c44 1360 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1361done
1362
bec39cab
AC
1363# There might be people who depend on the old broken behavior: `$host'
1364# used to hold the argument of --host etc.
1365# FIXME: To remove some day.
1366build=$build_alias
1367host=$host_alias
1368target=$target_alias
1369
1370# FIXME: To remove some day.
1371if test "x$host_alias" != x; then
1372 if test "x$build_alias" = x; then
1373 cross_compiling=maybe
bec39cab
AC
1374 elif test "x$build_alias" != "x$host_alias"; then
1375 cross_compiling=yes
1376 fi
1377fi
c906108c 1378
bec39cab
AC
1379ac_tool_prefix=
1380test -n "$host_alias" && ac_tool_prefix=$host_alias-
1381
1382test "$silent" = yes && exec 6>/dev/null
c906108c 1383
c906108c 1384
81ecdfbb
RW
1385ac_pwd=`pwd` && test -n "$ac_pwd" &&
1386ac_ls_di=`ls -di .` &&
1387ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1388 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1389test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1390 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1391
1392
c906108c
SS
1393# Find the source files, if location was not specified.
1394if test -z "$srcdir"; then
1395 ac_srcdir_defaulted=yes
81ecdfbb
RW
1396 # Try the directory containing this script, then the parent directory.
1397 ac_confdir=`$as_dirname -- "$as_myself" ||
1398$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1399 X"$as_myself" : 'X\(//\)[^/]' \| \
1400 X"$as_myself" : 'X\(//\)$' \| \
1401 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1402$as_echo X"$as_myself" |
1403 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1404 s//\1/
1405 q
1406 }
1407 /^X\(\/\/\)[^/].*/{
1408 s//\1/
1409 q
1410 }
1411 /^X\(\/\/\)$/{
1412 s//\1/
1413 q
1414 }
1415 /^X\(\/\).*/{
1416 s//\1/
1417 q
1418 }
1419 s/.*/./; q'`
c906108c 1420 srcdir=$ac_confdir
81ecdfbb 1421 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1422 srcdir=..
1423 fi
1424else
1425 ac_srcdir_defaulted=no
1426fi
81ecdfbb
RW
1427if test ! -r "$srcdir/$ac_unique_file"; then
1428 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1429 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1430fi
1431ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1432ac_abs_confdir=`(
d0ac1c44 1433 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1434 pwd)`
1435# When building in place, set srcdir=.
1436if test "$ac_abs_confdir" = "$ac_pwd"; then
1437 srcdir=.
1438fi
1439# Remove unnecessary trailing slashes from srcdir.
1440# Double slashes in file names in object file debugging info
1441# mess up M-x gdb in Emacs.
1442case $srcdir in
1443*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1444esac
1445for ac_var in $ac_precious_vars; do
1446 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1447 eval ac_env_${ac_var}_value=\$${ac_var}
1448 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1449 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1450done
c906108c 1451
bec39cab
AC
1452#
1453# Report the --help message.
1454#
1455if test "$ac_init_help" = "long"; then
1456 # Omit some internal or obsolete options to make the list less imposing.
1457 # This message is too long to be a string in the A/UX 3.1 sh.
1458 cat <<_ACEOF
1459\`configure' configures this package to adapt to many kinds of systems.
1460
1461Usage: $0 [OPTION]... [VAR=VALUE]...
1462
1463To assign environment variables (e.g., CC, CFLAGS...), specify them as
1464VAR=VALUE. See below for descriptions of some of the useful variables.
1465
1466Defaults for the options are specified in brackets.
1467
1468Configuration:
1469 -h, --help display this help and exit
1470 --help=short display options specific to this package
1471 --help=recursive display the short help of all the included packages
1472 -V, --version display version information and exit
d0ac1c44 1473 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1474 --cache-file=FILE cache test results in FILE [disabled]
1475 -C, --config-cache alias for \`--cache-file=config.cache'
1476 -n, --no-create do not create output files
1477 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1478
bec39cab
AC
1479Installation directories:
1480 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1481 [$ac_default_prefix]
bec39cab 1482 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1483 [PREFIX]
bec39cab
AC
1484
1485By default, \`make install' will install all the files in
1486\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1487an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1488for instance \`--prefix=\$HOME'.
1489
1490For better control, use the options below.
1491
1492Fine tuning of the installation directories:
81ecdfbb
RW
1493 --bindir=DIR user executables [EPREFIX/bin]
1494 --sbindir=DIR system admin executables [EPREFIX/sbin]
1495 --libexecdir=DIR program executables [EPREFIX/libexec]
1496 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1497 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1498 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1499 --libdir=DIR object code libraries [EPREFIX/lib]
1500 --includedir=DIR C header files [PREFIX/include]
1501 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1502 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1503 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1504 --infodir=DIR info documentation [DATAROOTDIR/info]
1505 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1506 --mandir=DIR man documentation [DATAROOTDIR/man]
1507 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1508 --htmldir=DIR html documentation [DOCDIR]
1509 --dvidir=DIR dvi documentation [DOCDIR]
1510 --pdfdir=DIR pdf documentation [DOCDIR]
1511 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1512_ACEOF
1513
1514 cat <<\_ACEOF
1515
9009e1ae
MR
1516Program names:
1517 --program-prefix=PREFIX prepend PREFIX to installed program names
1518 --program-suffix=SUFFIX append SUFFIX to installed program names
1519 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1520
bec39cab
AC
1521X features:
1522 --x-includes=DIR X include files are in DIR
1523 --x-libraries=DIR X library files are in DIR
1524
1525System types:
1526 --build=BUILD configure for building on BUILD [guessed]
1527 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1528 --target=TARGET configure for building compilers for TARGET [HOST]
1529_ACEOF
1530fi
1531
1532if test -n "$ac_init_help"; then
1533
1534 cat <<\_ACEOF
1535
1536Optional Features:
81ecdfbb 1537 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1538 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1539 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1540 --enable-maintainer-mode
1541 enable make rules and dependencies not useful (and
1542 sometimes confusing) to the casual installer
2974be62 1543 --enable-plugins Enable support for plugins
da2f07f1 1544 --disable-largefile omit support for large files
a1220294
TT
1545 --enable-targets=TARGETS
1546 alternative target configurations
c0993dbe 1547 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1548 --disable-gdbmi disable machine-interface (MI)
1549 --enable-tui enable full-screen terminal user interface (TUI)
1550 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1551 --enable-profiling enable profiling of GDB
44cee4fd 1552 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1553 --disable-rpath do not hardcode runtime library paths
17ef446e 1554 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1555 --enable-werror treat compile warnings as errors
32c1c914 1556 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1557 --enable-gdb-build-warnings
32c1c914 1558 enable GDB specific build-time compiler warnings if
a1220294 1559 gcc is used
f35d5ade 1560 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1561 --enable-sim link gdb with simulator
496c0e1b
JB
1562 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1563 is auto)
bec39cab
AC
1564
1565Optional Packages:
1566 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1567 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1568 --with-separate-debug-dir=PATH
32c1c914 1569 look for global separate debug info in this path
62e4f60c 1570 [LIBDIR/debug]
b14b1491
TT
1571 --with-gdb-datadir=PATH look for global separate data files in this path
1572 [DATADIR/gdb]
29b0e8a2 1573 --with-relocated-sources=PATH
32c1c914 1574 automatically relocate this path for source files
7349ff92 1575 --with-auto-load-dir=PATH
aff139ff 1576 directories from which to load auto-loaded scripts
1564a261 1577 [$debugdir:$datadir/auto-load]
bccbefd2 1578 --with-auto-load-safe-path=PATH
aff139ff 1579 directories safe to hold auto-loaded files
7349ff92 1580 [--with-auto-load-dir]
bccbefd2
JK
1581 --without-auto-load-safe-path
1582 do not restrict auto-loaded files locations
05e7c244 1583 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1584 --with-curses use the curses library instead of the termcap
1585 library
c16158bc
JM
1586 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1587 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1588 --with-system-zlib use installed libz
016a3251
DD
1589 --with-gnu-ld assume the C compiler uses GNU ld default=no
1590 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1591 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1592 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1593 --with-system-readline use installed readline library
b8e0a31c
SD
1594 --with-jit-reader-dir=PATH
1595 directory to load the JIT readers from
5c39566f 1596 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1597 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1598 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1599 --with-mpfr include MPFR support (auto/yes/no)
1600 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1601 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1602 --with-python[=PYTHON] include python support
1603 (auto/yes/no/<python-program>)
ed3ef339
DE
1604 --with-guile[=GUILE] include guile support
1605 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1606 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1607 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1608 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1609 --without-included-regex
1610 don't use included regex; this is the default on
1611 systems with version 2 of the GNU C library (use
1612 with caution on other system)
81ecdfbb 1613 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1614 --with-system-gdbinit=PATH
32c1c914 1615 automatically load a system-wide gdbinit file
608e2dbb
TT
1616 --with-lzma support lzma compression (auto/yes/no)
1617 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1618 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1619 --with-tcl directory containing tcl configuration (tclConfig.sh)
1620 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1621 --with-x use the X Window System
393fd4c3
YQ
1622 --with-babeltrace include babeltrace support (auto/yes/no)
1623 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1624 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1625
1626Some influential environment variables:
1627 CC C compiler command
1628 CFLAGS C compiler flags
1629 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1630 nonstandard directory <lib dir>
81ecdfbb 1631 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1632 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1633 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1634 CXX C++ compiler command
1635 CXXFLAGS C++ compiler flags
bec39cab 1636 CPP C preprocessor
f06e05e0
JK
1637 MAKEINFO Parent configure detects if it is of sufficient version.
1638 MAKEINFOFLAGS
1639 Parameters for MAKEINFO.
d0ac1c44
SM
1640 YACC The `Yet Another Compiler Compiler' implementation to use.
1641 Defaults to the first program found out of: `bison -y', `byacc',
1642 `yacc'.
81ecdfbb
RW
1643 YFLAGS The list of arguments that will be passed by default to $YACC.
1644 This script will default YFLAGS to the empty string to avoid a
1645 default value of `-d' given by some make applications.
1646 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1647
1648Use these variables to override the choices made by `configure' or to help
1649it to find libraries and programs with nonstandard names/locations.
1650
81ecdfbb 1651Report bugs to the package provider.
bec39cab 1652_ACEOF
81ecdfbb 1653ac_status=$?
bec39cab
AC
1654fi
1655
1656if test "$ac_init_help" = "recursive"; then
1657 # If there are subdirs, report their specific --help.
bec39cab 1658 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1659 test -d "$ac_dir" ||
1660 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1661 continue
bec39cab
AC
1662 ac_builddir=.
1663
81ecdfbb
RW
1664case "$ac_dir" in
1665.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1666*)
1667 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1668 # A ".." for each directory in $ac_dir_suffix.
1669 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1670 case $ac_top_builddir_sub in
1671 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1672 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1673 esac ;;
1674esac
1675ac_abs_top_builddir=$ac_pwd
1676ac_abs_builddir=$ac_pwd$ac_dir_suffix
1677# for backward compatibility:
1678ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1679
1680case $srcdir in
81ecdfbb 1681 .) # We are building in place.
bec39cab 1682 ac_srcdir=.
81ecdfbb
RW
1683 ac_top_srcdir=$ac_top_builddir_sub
1684 ac_abs_top_srcdir=$ac_pwd ;;
1685 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1686 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1687 ac_top_srcdir=$srcdir
1688 ac_abs_top_srcdir=$srcdir ;;
1689 *) # Relative name.
1690 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1691 ac_top_srcdir=$ac_top_build_prefix$srcdir
1692 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1693esac
81ecdfbb 1694ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1695
81ecdfbb
RW
1696 cd "$ac_dir" || { ac_status=$?; continue; }
1697 # Check for guested configure.
1698 if test -f "$ac_srcdir/configure.gnu"; then
1699 echo &&
1700 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1701 elif test -f "$ac_srcdir/configure"; then
1702 echo &&
1703 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1704 else
81ecdfbb
RW
1705 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1706 fi || ac_status=$?
1707 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1708 done
1709fi
1710
81ecdfbb 1711test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1712if $ac_init_version; then
1713 cat <<\_ACEOF
81ecdfbb 1714configure
d0ac1c44 1715generated by GNU Autoconf 2.69
bec39cab 1716
d0ac1c44 1717Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1718This configure script is free software; the Free Software Foundation
1719gives unlimited permission to copy, distribute and modify it.
1720_ACEOF
81ecdfbb 1721 exit
bec39cab 1722fi
bec39cab 1723
81ecdfbb
RW
1724## ------------------------ ##
1725## Autoconf initialization. ##
1726## ------------------------ ##
bec39cab 1727
81ecdfbb
RW
1728# ac_fn_c_try_compile LINENO
1729# --------------------------
1730# Try to compile conftest.$ac_ext, and return whether this succeeded.
1731ac_fn_c_try_compile ()
1732{
1733 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1734 rm -f conftest.$ac_objext
1735 if { { ac_try="$ac_compile"
1736case "(($ac_try" in
1737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1738 *) ac_try_echo=$ac_try;;
1739esac
1740eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1741$as_echo "$ac_try_echo"; } >&5
1742 (eval "$ac_compile") 2>conftest.err
1743 ac_status=$?
1744 if test -s conftest.err; then
1745 grep -v '^ *+' conftest.err >conftest.er1
1746 cat conftest.er1 >&5
1747 mv -f conftest.er1 conftest.err
1748 fi
1749 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1750 test $ac_status = 0; } && {
1751 test -z "$ac_c_werror_flag" ||
1752 test ! -s conftest.err
1753 } && test -s conftest.$ac_objext; then :
1754 ac_retval=0
1755else
1756 $as_echo "$as_me: failed program was:" >&5
1757sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1758
81ecdfbb
RW
1759 ac_retval=1
1760fi
d0ac1c44
SM
1761 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1762 as_fn_set_status $ac_retval
81ecdfbb
RW
1763
1764} # ac_fn_c_try_compile
1765
3bc3d82a
PA
1766# ac_fn_cxx_try_compile LINENO
1767# ----------------------------
1768# Try to compile conftest.$ac_ext, and return whether this succeeded.
1769ac_fn_cxx_try_compile ()
1770{
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1772 rm -f conftest.$ac_objext
1773 if { { ac_try="$ac_compile"
1774case "(($ac_try" in
1775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776 *) ac_try_echo=$ac_try;;
1777esac
1778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779$as_echo "$ac_try_echo"; } >&5
1780 (eval "$ac_compile") 2>conftest.err
1781 ac_status=$?
1782 if test -s conftest.err; then
1783 grep -v '^ *+' conftest.err >conftest.er1
1784 cat conftest.er1 >&5
1785 mv -f conftest.er1 conftest.err
1786 fi
1787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1788 test $ac_status = 0; } && {
1789 test -z "$ac_cxx_werror_flag" ||
1790 test ! -s conftest.err
1791 } && test -s conftest.$ac_objext; then :
1792 ac_retval=0
1793else
1794 $as_echo "$as_me: failed program was:" >&5
1795sed 's/^/| /' conftest.$ac_ext >&5
1796
1797 ac_retval=1
1798fi
d0ac1c44
SM
1799 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1800 as_fn_set_status $ac_retval
3bc3d82a
PA
1801
1802} # ac_fn_cxx_try_compile
1803
81ecdfbb
RW
1804# ac_fn_c_try_cpp LINENO
1805# ----------------------
1806# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1807ac_fn_c_try_cpp ()
bec39cab 1808{
81ecdfbb
RW
1809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1810 if { { ac_try="$ac_cpp conftest.$ac_ext"
1811case "(($ac_try" in
1812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1813 *) ac_try_echo=$ac_try;;
1814esac
1815eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1816$as_echo "$ac_try_echo"; } >&5
1817 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1818 ac_status=$?
1819 if test -s conftest.err; then
1820 grep -v '^ *+' conftest.err >conftest.er1
1821 cat conftest.er1 >&5
1822 mv -f conftest.er1 conftest.err
1823 fi
1824 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1825 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1826 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1827 test ! -s conftest.err
1828 }; then :
1829 ac_retval=0
1830else
1831 $as_echo "$as_me: failed program was:" >&5
1832sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1833
81ecdfbb
RW
1834 ac_retval=1
1835fi
d0ac1c44
SM
1836 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1837 as_fn_set_status $ac_retval
bec39cab 1838
81ecdfbb 1839} # ac_fn_c_try_cpp
bec39cab 1840
81ecdfbb
RW
1841# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1842# -------------------------------------------------------
1843# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1844# the include files in INCLUDES and setting the cache variable VAR
1845# accordingly.
1846ac_fn_c_check_header_mongrel ()
1847{
1848 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1849 if eval \${$3+:} false; then :
81ecdfbb
RW
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1851$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1852if eval \${$3+:} false; then :
81ecdfbb
RW
1853 $as_echo_n "(cached) " >&6
1854fi
1855eval ac_res=\$$3
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1857$as_echo "$ac_res" >&6; }
1858else
1859 # Is the header compilable?
1860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1861$as_echo_n "checking $2 usability... " >&6; }
1862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1863/* end confdefs.h. */
1864$4
1865#include <$2>
1866_ACEOF
1867if ac_fn_c_try_compile "$LINENO"; then :
1868 ac_header_compiler=yes
1869else
1870 ac_header_compiler=no
1871fi
1872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1874$as_echo "$ac_header_compiler" >&6; }
bec39cab 1875
81ecdfbb
RW
1876# Is the header present?
1877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1878$as_echo_n "checking $2 presence... " >&6; }
1879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1880/* end confdefs.h. */
1881#include <$2>
1882_ACEOF
1883if ac_fn_c_try_cpp "$LINENO"; then :
1884 ac_header_preproc=yes
1885else
1886 ac_header_preproc=no
1887fi
d0ac1c44 1888rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1890$as_echo "$ac_header_preproc" >&6; }
bec39cab 1891
81ecdfbb
RW
1892# So? What about this header?
1893case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1894 yes:no: )
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1896$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1898$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1899 ;;
1900 no:yes:* )
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1902$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1904$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1906$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1908$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1910$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1911 ;;
1912esac
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1914$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1915if eval \${$3+:} false; then :
81ecdfbb
RW
1916 $as_echo_n "(cached) " >&6
1917else
1918 eval "$3=\$ac_header_compiler"
1919fi
1920eval ac_res=\$$3
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1922$as_echo "$ac_res" >&6; }
1923fi
d0ac1c44 1924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1925
81ecdfbb 1926} # ac_fn_c_check_header_mongrel
bec39cab 1927
81ecdfbb
RW
1928# ac_fn_c_try_run LINENO
1929# ----------------------
1930# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1931# that executables *can* be run.
1932ac_fn_c_try_run ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 if { { ac_try="$ac_link"
1936case "(($ac_try" in
1937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1938 *) ac_try_echo=$ac_try;;
1939esac
1940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1941$as_echo "$ac_try_echo"; } >&5
1942 (eval "$ac_link") 2>&5
1943 ac_status=$?
1944 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1945 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1946 { { case "(($ac_try" in
1947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1948 *) ac_try_echo=$ac_try;;
1949esac
1950eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1951$as_echo "$ac_try_echo"; } >&5
1952 (eval "$ac_try") 2>&5
1953 ac_status=$?
1954 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1955 test $ac_status = 0; }; }; then :
1956 ac_retval=0
1957else
1958 $as_echo "$as_me: program exited with status $ac_status" >&5
1959 $as_echo "$as_me: failed program was:" >&5
1960sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1961
81ecdfbb
RW
1962 ac_retval=$ac_status
1963fi
1964 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1965 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1966 as_fn_set_status $ac_retval
bec39cab 1967
81ecdfbb 1968} # ac_fn_c_try_run
bec39cab 1969
81ecdfbb
RW
1970# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1971# -------------------------------------------------------
1972# Tests whether HEADER exists and can be compiled using the include files in
1973# INCLUDES, setting the cache variable VAR accordingly.
1974ac_fn_c_check_header_compile ()
1975{
1976 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1978$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1979if eval \${$3+:} false; then :
81ecdfbb
RW
1980 $as_echo_n "(cached) " >&6
1981else
1982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1983/* end confdefs.h. */
1984$4
1985#include <$2>
bec39cab 1986_ACEOF
81ecdfbb
RW
1987if ac_fn_c_try_compile "$LINENO"; then :
1988 eval "$3=yes"
1989else
1990 eval "$3=no"
1991fi
1992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1993fi
1994eval ac_res=\$$3
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996$as_echo "$ac_res" >&6; }
d0ac1c44 1997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1998
81ecdfbb 1999} # ac_fn_c_check_header_compile
bec39cab 2000
2974be62
AM
2001# ac_fn_c_try_link LINENO
2002# -----------------------
2003# Try to link conftest.$ac_ext, and return whether this succeeded.
2004ac_fn_c_try_link ()
2005{
2006 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007 rm -f conftest.$ac_objext conftest$ac_exeext
2008 if { { ac_try="$ac_link"
2009case "(($ac_try" in
2010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2011 *) ac_try_echo=$ac_try;;
2012esac
2013eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2014$as_echo "$ac_try_echo"; } >&5
2015 (eval "$ac_link") 2>conftest.err
2016 ac_status=$?
2017 if test -s conftest.err; then
2018 grep -v '^ *+' conftest.err >conftest.er1
2019 cat conftest.er1 >&5
2020 mv -f conftest.er1 conftest.err
2021 fi
2022 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2023 test $ac_status = 0; } && {
2024 test -z "$ac_c_werror_flag" ||
2025 test ! -s conftest.err
2026 } && test -s conftest$ac_exeext && {
2027 test "$cross_compiling" = yes ||
d0ac1c44 2028 test -x conftest$ac_exeext
2974be62
AM
2029 }; then :
2030 ac_retval=0
2031else
2032 $as_echo "$as_me: failed program was:" >&5
2033sed 's/^/| /' conftest.$ac_ext >&5
2034
2035 ac_retval=1
2036fi
2037 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2038 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2039 # interfere with the next link command; also delete a directory that is
2040 # left behind by Apple's compiler. We do this before executing the actions.
2041 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2042 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2043 as_fn_set_status $ac_retval
2974be62
AM
2044
2045} # ac_fn_c_try_link
2046
81ecdfbb
RW
2047# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2048# --------------------------------------------
2049# Tries to find the compile-time value of EXPR in a program that includes
2050# INCLUDES, setting VAR accordingly. Returns whether the value could be
2051# computed
2052ac_fn_c_compute_int ()
2053{
2054 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2055 if test "$cross_compiling" = yes; then
2056 # Depending upon the size, compute the lo and hi bounds.
2057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2064test_array [0] = 0;
2065return test_array [0];
bec39cab 2066
81ecdfbb
RW
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_lo=0 ac_mid=0
2073 while :; do
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2081test_array [0] = 0;
2082return test_array [0];
bec39cab 2083
81ecdfbb
RW
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_hi=$ac_mid; break
2090else
2091 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2092 if test $ac_lo -le $ac_mid; then
2093 ac_lo= ac_hi=
2094 break
2095 fi
2096 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2097fi
81ecdfbb
RW
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099 done
c906108c 2100else
81ecdfbb
RW
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2108test_array [0] = 0;
2109return test_array [0];
bec39cab 2110
81ecdfbb
RW
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_hi=-1 ac_mid=-1
2117 while :; do
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121int
2122main ()
2123{
2124static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2125test_array [0] = 0;
2126return test_array [0];
bec39cab 2127
81ecdfbb
RW
2128 ;
2129 return 0;
2130}
2131_ACEOF
2132if ac_fn_c_try_compile "$LINENO"; then :
2133 ac_lo=$ac_mid; break
2134else
2135 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2136 if test $ac_mid -le $ac_hi; then
2137 ac_lo= ac_hi=
2138 break
2139 fi
2140 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2141fi
2142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 done
2144else
2145 ac_lo= ac_hi=
2146fi
2147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150# Binary search between lo and hi bounds.
2151while test "x$ac_lo" != "x$ac_hi"; do
2152 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2154/* end confdefs.h. */
2155$4
2156int
2157main ()
2158{
2159static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2160test_array [0] = 0;
2161return test_array [0];
bec39cab 2162
81ecdfbb
RW
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_compile "$LINENO"; then :
2168 ac_hi=$ac_mid
2169else
2170 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2171fi
2172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173done
2174case $ac_lo in #((
2175?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2176'') ac_retval=1 ;;
2177esac
2178 else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180/* end confdefs.h. */
2181$4
2182static long int longval () { return $2; }
2183static unsigned long int ulongval () { return $2; }
2184#include <stdio.h>
2185#include <stdlib.h>
2186int
2187main ()
2188{
bec39cab 2189
81ecdfbb
RW
2190 FILE *f = fopen ("conftest.val", "w");
2191 if (! f)
2192 return 1;
2193 if (($2) < 0)
2194 {
2195 long int i = longval ();
2196 if (i != ($2))
2197 return 1;
2198 fprintf (f, "%ld", i);
2199 }
2200 else
2201 {
2202 unsigned long int i = ulongval ();
2203 if (i != ($2))
2204 return 1;
2205 fprintf (f, "%lu", i);
2206 }
2207 /* Do not output a trailing newline, as this causes \r\n confusion
2208 on some platforms. */
2209 return ferror (f) || fclose (f) != 0;
bec39cab 2210
81ecdfbb
RW
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215if ac_fn_c_try_run "$LINENO"; then :
2216 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2217else
2218 ac_retval=1
2219fi
2220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2221 conftest.$ac_objext conftest.beam conftest.$ac_ext
2222rm -f conftest.val
bec39cab 2223
81ecdfbb 2224 fi
d0ac1c44
SM
2225 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2226 as_fn_set_status $ac_retval
bec39cab 2227
81ecdfbb 2228} # ac_fn_c_compute_int
bec39cab 2229
55a8c076
YQ
2230# ac_fn_c_check_func LINENO FUNC VAR
2231# ----------------------------------
2232# Tests whether FUNC exists, setting the cache variable VAR accordingly
2233ac_fn_c_check_func ()
81ecdfbb
RW
2234{
2235 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2237$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2238if eval \${$3+:} false; then :
81ecdfbb
RW
2239 $as_echo_n "(cached) " >&6
2240else
81ecdfbb
RW
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
55a8c076
YQ
2243/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2244 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2245#define $2 innocuous_$2
2246
2247/* System header to define __stub macros and hopefully few prototypes,
2248 which can conflict with char $2 (); below.
2249 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2250 <limits.h> exists even on freestanding compilers. */
2251
2252#ifdef __STDC__
2253# include <limits.h>
2254#else
2255# include <assert.h>
2256#endif
2257
2258#undef $2
2259
2260/* Override any GCC internal prototype to avoid an error.
2261 Use char because int might match the return type of a GCC
2262 builtin and then its argument prototype would still apply. */
2263#ifdef __cplusplus
2264extern "C"
2265#endif
2266char $2 ();
2267/* The GNU C library defines this for functions which it implements
2268 to always fail with ENOSYS. Some functions are actually named
2269 something starting with __ and the normal name is an alias. */
2270#if defined __stub_$2 || defined __stub___$2
2271choke me
2272#endif
2273
2274int
2275main ()
2276{
2277return $2 ();
2278 ;
2279 return 0;
2280}
2281_ACEOF
2282if ac_fn_c_try_link "$LINENO"; then :
2283 eval "$3=yes"
2284else
2285 eval "$3=no"
2286fi
2287rm -f core conftest.err conftest.$ac_objext \
2288 conftest$ac_exeext conftest.$ac_ext
2289fi
2290eval ac_res=\$$3
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2292$as_echo "$ac_res" >&6; }
d0ac1c44 2293 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2294
2295} # ac_fn_c_check_func
2296
c56ccc05
MM
2297# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2298# ----------------------------------------------------
2299# Tries to find if the field MEMBER exists in type AGGR, after including
2300# INCLUDES, setting cache variable VAR accordingly.
2301ac_fn_c_check_member ()
2302{
2303 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2305$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2306if eval \${$4+:} false; then :
c56ccc05
MM
2307 $as_echo_n "(cached) " >&6
2308else
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
2311$5
2312int
2313main ()
2314{
2315static $2 ac_aggr;
2316if (ac_aggr.$3)
2317return 0;
2318 ;
2319 return 0;
2320}
2321_ACEOF
2322if ac_fn_c_try_compile "$LINENO"; then :
2323 eval "$4=yes"
2324else
2325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2326/* end confdefs.h. */
2327$5
2328int
2329main ()
2330{
2331static $2 ac_aggr;
2332if (sizeof ac_aggr.$3)
2333return 0;
2334 ;
2335 return 0;
2336}
2337_ACEOF
2338if ac_fn_c_try_compile "$LINENO"; then :
2339 eval "$4=yes"
2340else
2341 eval "$4=no"
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346fi
2347eval ac_res=\$$4
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349$as_echo "$ac_res" >&6; }
d0ac1c44 2350 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2351
2352} # ac_fn_c_check_member
2353
07697489
PA
2354# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2355# -------------------------------------------
2356# Tests whether TYPE exists after having included INCLUDES, setting cache
2357# variable VAR accordingly.
2358ac_fn_c_check_type ()
2359{
2360 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2362$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2363if eval \${$3+:} false; then :
07697489
PA
2364 $as_echo_n "(cached) " >&6
2365else
2366 eval "$3=no"
2367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2368/* end confdefs.h. */
2369$4
2370int
2371main ()
2372{
2373if (sizeof ($2))
2374 return 0;
2375 ;
2376 return 0;
2377}
2378_ACEOF
2379if ac_fn_c_try_compile "$LINENO"; then :
2380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2381/* end confdefs.h. */
2382$4
2383int
2384main ()
2385{
2386if (sizeof (($2)))
2387 return 0;
2388 ;
2389 return 0;
2390}
2391_ACEOF
2392if ac_fn_c_try_compile "$LINENO"; then :
2393
2394else
2395 eval "$3=yes"
2396fi
2397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2398fi
2399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2400fi
2401eval ac_res=\$$3
2402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2403$as_echo "$ac_res" >&6; }
d0ac1c44 2404 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2405
2406} # ac_fn_c_check_type
2407
d0ac1c44
SM
2408# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2409# ---------------------------------------------
2410# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2411# accordingly.
770d76d7
PA
2412ac_fn_c_check_decl ()
2413{
2414 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2415 as_decl_name=`echo $2|sed 's/ *(.*//'`
2416 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2418$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2419if eval \${$3+:} false; then :
770d76d7
PA
2420 $as_echo_n "(cached) " >&6
2421else
2422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2423/* end confdefs.h. */
2424$4
2425int
2426main ()
2427{
2428#ifndef $as_decl_name
2429#ifdef __cplusplus
2430 (void) $as_decl_use;
2431#else
2432 (void) $as_decl_name;
2433#endif
2434#endif
2435
2436 ;
2437 return 0;
2438}
2439_ACEOF
2440if ac_fn_c_try_compile "$LINENO"; then :
2441 eval "$3=yes"
2442else
2443 eval "$3=no"
2444fi
2445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2446fi
2447eval ac_res=\$$3
2448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2449$as_echo "$ac_res" >&6; }
d0ac1c44 2450 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2451
2452} # ac_fn_c_check_decl
f35d5ade
TT
2453
2454# ac_fn_cxx_try_link LINENO
2455# -------------------------
2456# Try to link conftest.$ac_ext, and return whether this succeeded.
2457ac_fn_cxx_try_link ()
2458{
2459 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2460 rm -f conftest.$ac_objext conftest$ac_exeext
2461 if { { ac_try="$ac_link"
2462case "(($ac_try" in
2463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2464 *) ac_try_echo=$ac_try;;
2465esac
2466eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2467$as_echo "$ac_try_echo"; } >&5
2468 (eval "$ac_link") 2>conftest.err
2469 ac_status=$?
2470 if test -s conftest.err; then
2471 grep -v '^ *+' conftest.err >conftest.er1
2472 cat conftest.er1 >&5
2473 mv -f conftest.er1 conftest.err
2474 fi
2475 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2476 test $ac_status = 0; } && {
2477 test -z "$ac_cxx_werror_flag" ||
2478 test ! -s conftest.err
2479 } && test -s conftest$ac_exeext && {
2480 test "$cross_compiling" = yes ||
2481 test -x conftest$ac_exeext
2482 }; then :
2483 ac_retval=0
2484else
2485 $as_echo "$as_me: failed program was:" >&5
2486sed 's/^/| /' conftest.$ac_ext >&5
2487
2488 ac_retval=1
2489fi
2490 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2491 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2492 # interfere with the next link command; also delete a directory that is
2493 # left behind by Apple's compiler. We do this before executing the actions.
2494 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2495 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2496 as_fn_set_status $ac_retval
2497
2498} # ac_fn_cxx_try_link
81ecdfbb
RW
2499cat >config.log <<_ACEOF
2500This file contains any messages produced by compilers while
2501running configure, to aid debugging if configure makes a mistake.
d5af19ba 2502
81ecdfbb 2503It was created by $as_me, which was
d0ac1c44 2504generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2505
81ecdfbb 2506 $ $0 $@
413ccac7 2507
81ecdfbb
RW
2508_ACEOF
2509exec 5>>config.log
2510{
2511cat <<_ASUNAME
2512## --------- ##
2513## Platform. ##
2514## --------- ##
413ccac7 2515
81ecdfbb
RW
2516hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2517uname -m = `(uname -m) 2>/dev/null || echo unknown`
2518uname -r = `(uname -r) 2>/dev/null || echo unknown`
2519uname -s = `(uname -s) 2>/dev/null || echo unknown`
2520uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2521
81ecdfbb
RW
2522/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2523/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2524
81ecdfbb
RW
2525/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2526/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2527/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2528/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2529/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2530/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2531/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2532
81ecdfbb 2533_ASUNAME
bec39cab 2534
bec39cab
AC
2535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2536for as_dir in $PATH
2537do
2538 IFS=$as_save_IFS
2539 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2540 $as_echo "PATH: $as_dir"
2541 done
2542IFS=$as_save_IFS
bec39cab 2543
81ecdfbb 2544} >&5
bec39cab 2545
81ecdfbb 2546cat >&5 <<_ACEOF
bec39cab 2547
bec39cab 2548
81ecdfbb
RW
2549## ----------- ##
2550## Core tests. ##
2551## ----------- ##
2552
2553_ACEOF
2554
2555
2556# Keep a trace of the command line.
2557# Strip out --no-create and --no-recursion so they do not pile up.
2558# Strip out --silent because we don't want to record it for future runs.
2559# Also quote any args containing shell meta-characters.
2560# Make two passes to allow for proper duplicate-argument suppression.
2561ac_configure_args=
2562ac_configure_args0=
2563ac_configure_args1=
2564ac_must_keep_next=false
2565for ac_pass in 1 2
2566do
2567 for ac_arg
2568 do
2569 case $ac_arg in
2570 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2571 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2572 | -silent | --silent | --silen | --sile | --sil)
2573 continue ;;
2574 *\'*)
2575 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2576 esac
2577 case $ac_pass in
2578 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2579 2)
2580 as_fn_append ac_configure_args1 " '$ac_arg'"
2581 if test $ac_must_keep_next = true; then
2582 ac_must_keep_next=false # Got value, back to normal.
2583 else
2584 case $ac_arg in
2585 *=* | --config-cache | -C | -disable-* | --disable-* \
2586 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2587 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2588 | -with-* | --with-* | -without-* | --without-* | --x)
2589 case "$ac_configure_args0 " in
2590 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2591 esac
2592 ;;
2593 -* ) ac_must_keep_next=true ;;
2594 esac
2595 fi
2596 as_fn_append ac_configure_args " '$ac_arg'"
2597 ;;
2598 esac
2599 done
2600done
2601{ ac_configure_args0=; unset ac_configure_args0;}
2602{ ac_configure_args1=; unset ac_configure_args1;}
2603
2604# When interrupted or exit'd, cleanup temporary files, and complete
2605# config.log. We remove comments because anyway the quotes in there
2606# would cause problems or look ugly.
2607# WARNING: Use '\'' to represent an apostrophe within the trap.
2608# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2609trap 'exit_status=$?
2610 # Save into config.log some information that might help in debugging.
2611 {
2612 echo
2613
d0ac1c44 2614 $as_echo "## ---------------- ##
81ecdfbb 2615## Cache variables. ##
d0ac1c44 2616## ---------------- ##"
81ecdfbb
RW
2617 echo
2618 # The following way of writing the cache mishandles newlines in values,
2619(
2620 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2621 eval ac_val=\$$ac_var
2622 case $ac_val in #(
2623 *${as_nl}*)
2624 case $ac_var in #(
2625 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2626$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2627 esac
2628 case $ac_var in #(
2629 _ | IFS | as_nl) ;; #(
2630 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2631 *) { eval $ac_var=; unset $ac_var;} ;;
2632 esac ;;
2633 esac
2634 done
2635 (set) 2>&1 |
2636 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2637 *${as_nl}ac_space=\ *)
2638 sed -n \
2639 "s/'\''/'\''\\\\'\'''\''/g;
2640 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2641 ;; #(
2642 *)
2643 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2644 ;;
2645 esac |
2646 sort
2647)
2648 echo
2649
d0ac1c44 2650 $as_echo "## ----------------- ##
81ecdfbb 2651## Output variables. ##
d0ac1c44 2652## ----------------- ##"
81ecdfbb
RW
2653 echo
2654 for ac_var in $ac_subst_vars
2655 do
2656 eval ac_val=\$$ac_var
2657 case $ac_val in
2658 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2659 esac
2660 $as_echo "$ac_var='\''$ac_val'\''"
2661 done | sort
2662 echo
2663
2664 if test -n "$ac_subst_files"; then
d0ac1c44 2665 $as_echo "## ------------------- ##
81ecdfbb 2666## File substitutions. ##
d0ac1c44 2667## ------------------- ##"
81ecdfbb
RW
2668 echo
2669 for ac_var in $ac_subst_files
2670 do
2671 eval ac_val=\$$ac_var
2672 case $ac_val in
2673 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2674 esac
2675 $as_echo "$ac_var='\''$ac_val'\''"
2676 done | sort
2677 echo
2678 fi
2679
2680 if test -s confdefs.h; then
d0ac1c44 2681 $as_echo "## ----------- ##
81ecdfbb 2682## confdefs.h. ##
d0ac1c44 2683## ----------- ##"
81ecdfbb
RW
2684 echo
2685 cat confdefs.h
2686 echo
2687 fi
2688 test "$ac_signal" != 0 &&
2689 $as_echo "$as_me: caught signal $ac_signal"
2690 $as_echo "$as_me: exit $exit_status"
2691 } >&5
2692 rm -f core *.core core.conftest.* &&
2693 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2694 exit $exit_status
2695' 0
2696for ac_signal in 1 2 13 15; do
2697 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2698done
2699ac_signal=0
2700
2701# confdefs.h avoids OS command line length limits that DEFS can exceed.
2702rm -f -r conftest* confdefs.h
2703
2704$as_echo "/* confdefs.h */" > confdefs.h
2705
2706# Predefined preprocessor variables.
2707
2708cat >>confdefs.h <<_ACEOF
2709#define PACKAGE_NAME "$PACKAGE_NAME"
2710_ACEOF
2711
2712cat >>confdefs.h <<_ACEOF
2713#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2714_ACEOF
2715
2716cat >>confdefs.h <<_ACEOF
2717#define PACKAGE_VERSION "$PACKAGE_VERSION"
2718_ACEOF
2719
2720cat >>confdefs.h <<_ACEOF
2721#define PACKAGE_STRING "$PACKAGE_STRING"
2722_ACEOF
2723
2724cat >>confdefs.h <<_ACEOF
2725#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2726_ACEOF
2727
2728cat >>confdefs.h <<_ACEOF
2729#define PACKAGE_URL "$PACKAGE_URL"
2730_ACEOF
2731
2732
2733# Let the site file select an alternate cache file if it wants to.
2734# Prefer an explicitly selected file to automatically selected ones.
2735ac_site_file1=NONE
2736ac_site_file2=NONE
2737if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2738 # We do not want a PATH search for config.site.
2739 case $CONFIG_SITE in #((
2740 -*) ac_site_file1=./$CONFIG_SITE;;
2741 */*) ac_site_file1=$CONFIG_SITE;;
2742 *) ac_site_file1=./$CONFIG_SITE;;
2743 esac
81ecdfbb
RW
2744elif test "x$prefix" != xNONE; then
2745 ac_site_file1=$prefix/share/config.site
2746 ac_site_file2=$prefix/etc/config.site
2747else
2748 ac_site_file1=$ac_default_prefix/share/config.site
2749 ac_site_file2=$ac_default_prefix/etc/config.site
2750fi
2751for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2752do
2753 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2754 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2756$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2757 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2758 . "$ac_site_file" \
2759 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2761as_fn_error $? "failed to load site script $ac_site_file
2762See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2763 fi
2764done
2765
2766if test -r "$cache_file"; then
d0ac1c44
SM
2767 # Some versions of bash will fail to source /dev/null (special files
2768 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2769 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2771$as_echo "$as_me: loading cache $cache_file" >&6;}
2772 case $cache_file in
2773 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2774 *) . "./$cache_file";;
2775 esac
2776 fi
2777else
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2779$as_echo "$as_me: creating cache $cache_file" >&6;}
2780 >$cache_file
bec39cab
AC
2781fi
2782
d0ac1c44
SM
2783as_fn_append ac_header_list " stdlib.h"
2784as_fn_append ac_header_list " unistd.h"
2785as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2786# Check that the precious variables saved in the cache have kept the same
2787# value.
2788ac_cache_corrupted=false
2789for ac_var in $ac_precious_vars; do
2790 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2791 eval ac_new_set=\$ac_env_${ac_var}_set
2792 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2793 eval ac_new_val=\$ac_env_${ac_var}_value
2794 case $ac_old_set,$ac_new_set in
2795 set,)
2796 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2797$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2798 ac_cache_corrupted=: ;;
2799 ,set)
2800 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2801$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2802 ac_cache_corrupted=: ;;
2803 ,);;
2804 *)
2805 if test "x$ac_old_val" != "x$ac_new_val"; then
2806 # differences in whitespace do not lead to failure.
2807 ac_old_val_w=`echo x $ac_old_val`
2808 ac_new_val_w=`echo x $ac_new_val`
2809 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2810 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2811$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2812 ac_cache_corrupted=:
2813 else
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2815$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2816 eval $ac_var=\$ac_old_val
2817 fi
2818 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2819$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2821$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2822 fi;;
2823 esac
2824 # Pass precious variables to config.status.
2825 if test "$ac_new_set" = set; then
2826 case $ac_new_val in
2827 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2828 *) ac_arg=$ac_var=$ac_new_val ;;
2829 esac
2830 case " $ac_configure_args " in
2831 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2832 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2833 esac
2834 fi
2835done
2836if $ac_cache_corrupted; then
2837 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2839 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2840$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2841 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2842fi
2843## -------------------- ##
2844## Main body of script. ##
2845## -------------------- ##
2846
2847ac_ext=c
2848ac_cpp='$CPP $CPPFLAGS'
2849ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2850ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2851ac_compiler_gnu=$ac_cv_c_compiler_gnu
2852
2853
2854
2855
2856
2857ac_config_headers="$ac_config_headers config.h:config.in"
2858
2859
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2861$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2862 # Check whether --enable-maintainer-mode was given.
2863if test "${enable_maintainer_mode+set}" = set; then :
2864 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2865else
2866 USE_MAINTAINER_MODE=no
2867fi
2868
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2870$as_echo "$USE_MAINTAINER_MODE" >&6; }
2871 if test $USE_MAINTAINER_MODE = yes; then
2872 MAINTAINER_MODE_TRUE=
2873 MAINTAINER_MODE_FALSE='#'
2874else
2875 MAINTAINER_MODE_TRUE='#'
2876 MAINTAINER_MODE_FALSE=
2877fi
2878
2879 MAINT=$MAINTAINER_MODE_TRUE
2880
2881
2882
17ef446e 2883# Set the 'development' global.
270c9937 2884. $srcdir/../bfd/development.sh
f5f1cdb6 2885
81ecdfbb
RW
2886ac_ext=c
2887ac_cpp='$CPP $CPPFLAGS'
2888ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2889ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2890ac_compiler_gnu=$ac_cv_c_compiler_gnu
2891if test -n "$ac_tool_prefix"; then
2892 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2893set dummy ${ac_tool_prefix}gcc; ac_word=$2
2894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2895$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2896if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2897 $as_echo_n "(cached) " >&6
c906108c
SS
2898else
2899 if test -n "$CC"; then
2900 ac_cv_prog_CC="$CC" # Let the user override the test.
2901else
bec39cab
AC
2902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2903for as_dir in $PATH
2904do
2905 IFS=$as_save_IFS
2906 test -z "$as_dir" && as_dir=.
81ecdfbb 2907 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2908 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2909 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2911 break 2
2912 fi
2913done
81ecdfbb
RW
2914 done
2915IFS=$as_save_IFS
bec39cab 2916
c906108c
SS
2917fi
2918fi
bec39cab 2919CC=$ac_cv_prog_CC
c906108c 2920if test -n "$CC"; then
81ecdfbb
RW
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2922$as_echo "$CC" >&6; }
c906108c 2923else
81ecdfbb
RW
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2925$as_echo "no" >&6; }
c906108c
SS
2926fi
2927
81ecdfbb 2928
b4e70030
JB
2929fi
2930if test -z "$ac_cv_prog_CC"; then
2931 ac_ct_CC=$CC
81ecdfbb
RW
2932 # Extract the first word of "gcc", so it can be a program name with args.
2933set dummy gcc; ac_word=$2
2934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2935$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2936if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2937 $as_echo_n "(cached) " >&6
b4e70030
JB
2938else
2939 if test -n "$ac_ct_CC"; then
2940 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2941else
2942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2943for as_dir in $PATH
2944do
2945 IFS=$as_save_IFS
2946 test -z "$as_dir" && as_dir=.
81ecdfbb 2947 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2948 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2949 ac_cv_prog_ac_ct_CC="gcc"
2950 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2951 break 2
4e8d927d 2952 fi
b4e70030 2953done
81ecdfbb
RW
2954 done
2955IFS=$as_save_IFS
b4e70030
JB
2956
2957fi
2958fi
2959ac_ct_CC=$ac_cv_prog_ac_ct_CC
2960if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2962$as_echo "$ac_ct_CC" >&6; }
b4e70030 2963else
81ecdfbb
RW
2964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2965$as_echo "no" >&6; }
b4e70030
JB
2966fi
2967
81ecdfbb
RW
2968 if test "x$ac_ct_CC" = x; then
2969 CC=""
2970 else
2971 case $cross_compiling:$ac_tool_warned in
2972yes:)
2973{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2974$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2975ac_tool_warned=yes ;;
2976esac
2977 CC=$ac_ct_CC
2978 fi
b4e70030
JB
2979else
2980 CC="$ac_cv_prog_CC"
2981fi
2982
c906108c 2983if test -z "$CC"; then
81ecdfbb
RW
2984 if test -n "$ac_tool_prefix"; then
2985 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2986set dummy ${ac_tool_prefix}cc; ac_word=$2
2987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2988$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2989if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2990 $as_echo_n "(cached) " >&6
c906108c
SS
2991else
2992 if test -n "$CC"; then
2993 ac_cv_prog_CC="$CC" # Let the user override the test.
2994else
bec39cab
AC
2995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2996for as_dir in $PATH
2997do
2998 IFS=$as_save_IFS
2999 test -z "$as_dir" && as_dir=.
81ecdfbb 3000 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3001 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3002 ac_cv_prog_CC="${ac_tool_prefix}cc"
3003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3004 break 2
3005 fi
3006done
81ecdfbb
RW
3007 done
3008IFS=$as_save_IFS
3009
3010fi
3011fi
3012CC=$ac_cv_prog_CC
3013if test -n "$CC"; then
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3015$as_echo "$CC" >&6; }
3016else
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3018$as_echo "no" >&6; }
3019fi
3020
3021
3022 fi
3023fi
3024if test -z "$CC"; then
3025 # Extract the first word of "cc", so it can be a program name with args.
3026set dummy cc; ac_word=$2
3027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3028$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3029if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3030 $as_echo_n "(cached) " >&6
3031else
3032 if test -n "$CC"; then
3033 ac_cv_prog_CC="$CC" # Let the user override the test.
3034else
3035 ac_prog_rejected=no
3036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3037for as_dir in $PATH
3038do
3039 IFS=$as_save_IFS
3040 test -z "$as_dir" && as_dir=.
3041 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3043 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3044 ac_prog_rejected=yes
3045 continue
3046 fi
3047 ac_cv_prog_CC="cc"
3048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3049 break 2
3050 fi
3051done
3052 done
3053IFS=$as_save_IFS
bec39cab 3054
c906108c
SS
3055if test $ac_prog_rejected = yes; then
3056 # We found a bogon in the path, so make sure we never use it.
3057 set dummy $ac_cv_prog_CC
3058 shift
bec39cab 3059 if test $# != 0; then
c906108c
SS
3060 # We chose a different compiler from the bogus one.
3061 # However, it has the same basename, so the bogon will be chosen
3062 # first if we set CC to just the basename; use the full file name.
3063 shift
bec39cab 3064 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3065 fi
3066fi
3067fi
3068fi
bec39cab 3069CC=$ac_cv_prog_CC
c906108c 3070if test -n "$CC"; then
81ecdfbb
RW
3071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3072$as_echo "$CC" >&6; }
c906108c 3073else
81ecdfbb
RW
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3075$as_echo "no" >&6; }
c906108c
SS
3076fi
3077
81ecdfbb 3078
bec39cab
AC
3079fi
3080if test -z "$CC"; then
3081 if test -n "$ac_tool_prefix"; then
81ecdfbb 3082 for ac_prog in cl.exe
bec39cab
AC
3083 do
3084 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3085set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3087$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3088if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3089 $as_echo_n "(cached) " >&6
c906108c
SS
3090else
3091 if test -n "$CC"; then
3092 ac_cv_prog_CC="$CC" # Let the user override the test.
3093else
bec39cab
AC
3094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3095for as_dir in $PATH
3096do
3097 IFS=$as_save_IFS
3098 test -z "$as_dir" && as_dir=.
81ecdfbb 3099 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3101 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3103 break 2
3104 fi
3105done
81ecdfbb
RW
3106 done
3107IFS=$as_save_IFS
bec39cab 3108
c906108c
SS
3109fi
3110fi
bec39cab 3111CC=$ac_cv_prog_CC
c906108c 3112if test -n "$CC"; then
81ecdfbb
RW
3113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3114$as_echo "$CC" >&6; }
c906108c 3115else
81ecdfbb
RW
3116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3117$as_echo "no" >&6; }
c906108c 3118fi
bec39cab 3119
81ecdfbb 3120
bec39cab
AC
3121 test -n "$CC" && break
3122 done
3123fi
3124if test -z "$CC"; then
3125 ac_ct_CC=$CC
81ecdfbb 3126 for ac_prog in cl.exe
bec39cab
AC
3127do
3128 # Extract the first word of "$ac_prog", so it can be a program name with args.
3129set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3131$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3132if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3133 $as_echo_n "(cached) " >&6
bec39cab
AC
3134else
3135 if test -n "$ac_ct_CC"; then
3136 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3137else
3138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3139for as_dir in $PATH
3140do
3141 IFS=$as_save_IFS
3142 test -z "$as_dir" && as_dir=.
81ecdfbb 3143 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3144 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3145 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3146 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3147 break 2
c906108c 3148 fi
bec39cab 3149done
81ecdfbb
RW
3150 done
3151IFS=$as_save_IFS
bec39cab
AC
3152
3153fi
3154fi
3155ac_ct_CC=$ac_cv_prog_ac_ct_CC
3156if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3158$as_echo "$ac_ct_CC" >&6; }
bec39cab 3159else
81ecdfbb
RW
3160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3161$as_echo "no" >&6; }
c906108c
SS
3162fi
3163
81ecdfbb 3164
bec39cab
AC
3165 test -n "$ac_ct_CC" && break
3166done
c906108c 3167
81ecdfbb
RW
3168 if test "x$ac_ct_CC" = x; then
3169 CC=""
3170 else
3171 case $cross_compiling:$ac_tool_warned in
3172yes:)
3173{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3174$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3175ac_tool_warned=yes ;;
3176esac
3177 CC=$ac_ct_CC
3178 fi
bec39cab
AC
3179fi
3180
3181fi
3182
3183
81ecdfbb
RW
3184test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3186as_fn_error $? "no acceptable C compiler found in \$PATH
3187See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3188
3189# Provide some information about the compiler.
81ecdfbb
RW
3190$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3191set X $ac_compile
3192ac_compiler=$2
3193for ac_option in --version -v -V -qversion; do
3194 { { ac_try="$ac_compiler $ac_option >&5"
3195case "(($ac_try" in
3196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3197 *) ac_try_echo=$ac_try;;
3198esac
3199eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3200$as_echo "$ac_try_echo"; } >&5
3201 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3202 ac_status=$?
81ecdfbb
RW
3203 if test -s conftest.err; then
3204 sed '10a\
3205... rest of stderr output deleted ...
3206 10q' conftest.err >conftest.er1
3207 cat conftest.er1 >&5
81ecdfbb 3208 fi
d0ac1c44 3209 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3210 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3211 test $ac_status = 0; }
3212done
bec39cab 3213
81ecdfbb 3214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3215/* end confdefs.h. */
3216
3217int
3218main ()
3219{
3220
3221 ;
3222 return 0;
3223}
3224_ACEOF
3225ac_clean_files_save=$ac_clean_files
d0ac1c44 3226ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3227# Try to create an executable without -o first, disregard a.out.
3228# It will help us diagnose broken compilers, and finding out an intuition
3229# of exeext.
d0ac1c44
SM
3230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3231$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3232ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3233
3234# The possible output files:
3235ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3236
3237ac_rmfiles=
3238for ac_file in $ac_files
3239do
3240 case $ac_file in
3241 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3242 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3243 esac
3244done
3245rm -f $ac_rmfiles
3246
3247if { { ac_try="$ac_link_default"
3248case "(($ac_try" in
3249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3250 *) ac_try_echo=$ac_try;;
3251esac
3252eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3253$as_echo "$ac_try_echo"; } >&5
3254 (eval "$ac_link_default") 2>&5
3255 ac_status=$?
3256 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3257 test $ac_status = 0; }; then :
3258 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3259# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3260# in a Makefile. We should not override ac_cv_exeext if it was cached,
3261# so that the user can short-circuit this test for compilers unknown to
3262# Autoconf.
3263for ac_file in $ac_files ''
bec39cab
AC
3264do
3265 test -f "$ac_file" || continue
3266 case $ac_file in
81ecdfbb 3267 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3268 ;;
3269 [ab].out )
3270 # We found the default executable, but exeext='' is most
3271 # certainly right.
3272 break;;
3273 *.* )
81ecdfbb
RW
3274 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3275 then :; else
3276 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3277 fi
3278 # We set ac_cv_exeext here because the later test for it is not
3279 # safe: cross compilers may not add the suffix if given an `-o'
3280 # argument, so we may need to know it at that point already.
3281 # Even if this section looks crufty: it has the advantage of
3282 # actually working.
b4e70030
JB
3283 break;;
3284 * )
3285 break;;
bec39cab
AC
3286 esac
3287done
81ecdfbb
RW
3288test "$ac_cv_exeext" = no && ac_cv_exeext=
3289
bec39cab 3290else
81ecdfbb
RW
3291 ac_file=''
3292fi
81ecdfbb 3293if test -z "$ac_file"; then :
d0ac1c44
SM
3294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3295$as_echo "no" >&6; }
3296$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3297sed 's/^/| /' conftest.$ac_ext >&5
3298
81ecdfbb
RW
3299{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3300$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3301as_fn_error 77 "C compiler cannot create executables
3302See \`config.log' for more details" "$LINENO" 5; }
3303else
3304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3305$as_echo "yes" >&6; }
bec39cab 3306fi
d0ac1c44
SM
3307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3308$as_echo_n "checking for C compiler default output file name... " >&6; }
3309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3310$as_echo "$ac_file" >&6; }
b4e70030 3311ac_exeext=$ac_cv_exeext
b4e70030 3312
d0ac1c44 3313rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3314ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3316$as_echo_n "checking for suffix of executables... " >&6; }
3317if { { ac_try="$ac_link"
3318case "(($ac_try" in
3319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3320 *) ac_try_echo=$ac_try;;
3321esac
3322eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3323$as_echo "$ac_try_echo"; } >&5
3324 (eval "$ac_link") 2>&5
bec39cab 3325 ac_status=$?
81ecdfbb
RW
3326 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3327 test $ac_status = 0; }; then :
b4e70030
JB
3328 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3329# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3330# work properly (i.e., refer to `conftest.exe'), while it won't with
3331# `rm'.
3332for ac_file in conftest.exe conftest conftest.*; do
3333 test -f "$ac_file" || continue
3334 case $ac_file in
81ecdfbb 3335 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3336 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3337 break;;
3338 * ) break;;
3339 esac
3340done
c906108c 3341else
81ecdfbb
RW
3342 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3343$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3344as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3345See \`config.log' for more details" "$LINENO" 5; }
c906108c 3346fi
d0ac1c44 3347rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3349$as_echo "$ac_cv_exeext" >&6; }
c906108c 3350
b4e70030 3351rm -f conftest.$ac_ext
bec39cab
AC
3352EXEEXT=$ac_cv_exeext
3353ac_exeext=$EXEEXT
d0ac1c44
SM
3354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3355/* end confdefs.h. */
3356#include <stdio.h>
3357int
3358main ()
3359{
3360FILE *f = fopen ("conftest.out", "w");
3361 return ferror (f) || fclose (f) != 0;
3362
3363 ;
3364 return 0;
3365}
3366_ACEOF
3367ac_clean_files="$ac_clean_files conftest.out"
3368# Check that the compiler produces executables we can run. If not, either
3369# the compiler is broken, or we cross compile.
3370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3371$as_echo_n "checking whether we are cross compiling... " >&6; }
3372if test "$cross_compiling" != yes; then
3373 { { ac_try="$ac_link"
3374case "(($ac_try" in
3375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3376 *) ac_try_echo=$ac_try;;
3377esac
3378eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3379$as_echo "$ac_try_echo"; } >&5
3380 (eval "$ac_link") 2>&5
3381 ac_status=$?
3382 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3383 test $ac_status = 0; }
3384 if { ac_try='./conftest$ac_cv_exeext'
3385 { { case "(($ac_try" in
3386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3387 *) ac_try_echo=$ac_try;;
3388esac
3389eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3390$as_echo "$ac_try_echo"; } >&5
3391 (eval "$ac_try") 2>&5
3392 ac_status=$?
3393 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3394 test $ac_status = 0; }; }; then
3395 cross_compiling=no
3396 else
3397 if test "$cross_compiling" = maybe; then
3398 cross_compiling=yes
3399 else
3400 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3401$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3402as_fn_error $? "cannot run C compiled programs.
3403If you meant to cross compile, use \`--host'.
3404See \`config.log' for more details" "$LINENO" 5; }
3405 fi
3406 fi
3407fi
3408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3409$as_echo "$cross_compiling" >&6; }
3410
3411rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3412ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3414$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3415if ${ac_cv_objext+:} false; then :
81ecdfbb 3416 $as_echo_n "(cached) " >&6
bec39cab 3417else
81ecdfbb 3418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3419/* end confdefs.h. */
3420
3421int
3422main ()
3423{
3424
3425 ;
3426 return 0;
3427}
3428_ACEOF
3429rm -f conftest.o conftest.obj
81ecdfbb
RW
3430if { { ac_try="$ac_compile"
3431case "(($ac_try" in
3432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3433 *) ac_try_echo=$ac_try;;
3434esac
3435eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3436$as_echo "$ac_try_echo"; } >&5
3437 (eval "$ac_compile") 2>&5
3438 ac_status=$?
3439 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3440 test $ac_status = 0; }; then :
3441 for ac_file in conftest.o conftest.obj conftest.*; do
3442 test -f "$ac_file" || continue;
bec39cab 3443 case $ac_file in
81ecdfbb 3444 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3445 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3446 break;;
3447 esac
3448done
c906108c 3449else
81ecdfbb 3450 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3451sed 's/^/| /' conftest.$ac_ext >&5
3452
81ecdfbb
RW
3453{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3454$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3455as_fn_error $? "cannot compute suffix of object files: cannot compile
3456See \`config.log' for more details" "$LINENO" 5; }
c906108c 3457fi
b4e70030 3458rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3459fi
81ecdfbb
RW
3460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3461$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3462OBJEXT=$ac_cv_objext
3463ac_objext=$OBJEXT
81ecdfbb
RW
3464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3465$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3466if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3467 $as_echo_n "(cached) " >&6
c906108c 3468else
81ecdfbb 3469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3470/* end confdefs.h. */
3471
3472int
3473main ()
3474{
3475#ifndef __GNUC__
3476 choke me
3477#endif
3478
3479 ;
3480 return 0;
3481}
3482_ACEOF
81ecdfbb 3483if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3484 ac_compiler_gnu=yes
3485else
81ecdfbb 3486 ac_compiler_gnu=no
bec39cab 3487fi
81ecdfbb 3488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3489ac_cv_c_compiler_gnu=$ac_compiler_gnu
3490
3491fi
81ecdfbb
RW
3492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3493$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3494if test $ac_compiler_gnu = yes; then
3495 GCC=yes
3496else
3497 GCC=
3498fi
bec39cab
AC
3499ac_test_CFLAGS=${CFLAGS+set}
3500ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3502$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3503if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3504 $as_echo_n "(cached) " >&6
bec39cab 3505else
81ecdfbb
RW
3506 ac_save_c_werror_flag=$ac_c_werror_flag
3507 ac_c_werror_flag=yes
3508 ac_cv_prog_cc_g=no
3509 CFLAGS="-g"
3510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3511/* end confdefs.h. */
3512
3513int
3514main ()
3515{
3516
3517 ;
3518 return 0;
3519}
3520_ACEOF
81ecdfbb 3521if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3522 ac_cv_prog_cc_g=yes
3523else
81ecdfbb
RW
3524 CFLAGS=""
3525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3526/* end confdefs.h. */
3527
3528int
3529main ()
3530{
3531
3532 ;
3533 return 0;
3534}
3535_ACEOF
3536if ac_fn_c_try_compile "$LINENO"; then :
3537
3538else
3539 ac_c_werror_flag=$ac_save_c_werror_flag
3540 CFLAGS="-g"
3541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3542/* end confdefs.h. */
3543
3544int
3545main ()
3546{
c906108c 3547
81ecdfbb
RW
3548 ;
3549 return 0;
3550}
3551_ACEOF
3552if ac_fn_c_try_compile "$LINENO"; then :
3553 ac_cv_prog_cc_g=yes
3554fi
3555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3556fi
3557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3558fi
81ecdfbb
RW
3559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3560 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3561fi
81ecdfbb
RW
3562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3563$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3564if test "$ac_test_CFLAGS" = set; then
bec39cab 3565 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3566elif test $ac_cv_prog_cc_g = yes; then
3567 if test "$GCC" = yes; then
3568 CFLAGS="-g -O2"
3569 else
3570 CFLAGS="-g"
3571 fi
3572else
3573 if test "$GCC" = yes; then
3574 CFLAGS="-O2"
3575 else
3576 CFLAGS=
3577 fi
3578fi
81ecdfbb
RW
3579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3580$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3581if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3582 $as_echo_n "(cached) " >&6
bec39cab 3583else
81ecdfbb 3584 ac_cv_prog_cc_c89=no
bec39cab 3585ac_save_CC=$CC
81ecdfbb 3586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3587/* end confdefs.h. */
c906108c
SS
3588#include <stdarg.h>
3589#include <stdio.h>
d0ac1c44 3590struct stat;
c906108c
SS
3591/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3592struct buf { int x; };
3593FILE * (*rcsopen) (struct buf *, struct stat *, int);
3594static char *e (p, i)
3595 char **p;
3596 int i;
3597{
3598 return p[i];
3599}
3600static char *f (char * (*g) (char **, int), char **p, ...)
3601{
3602 char *s;
3603 va_list v;
3604 va_start (v,p);
3605 s = g (p, va_arg (v,int));
3606 va_end (v);
3607 return s;
3608}
bec39cab
AC
3609
3610/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3611 function prototypes and stuff, but not '\xHH' hex character constants.
3612 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3613 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3614 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3615 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3616 that's true only with -std. */
bec39cab
AC
3617int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3618
81ecdfbb
RW
3619/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3620 inside strings and character constants. */
3621#define FOO(x) 'x'
3622int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3623
c906108c
SS
3624int test (int i, double x);
3625struct s1 {int (*f) (int a);};
3626struct s2 {int (*f) (double a);};
3627int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3628int argc;
3629char **argv;
bec39cab
AC
3630int
3631main ()
3632{
c906108c 3633return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3634 ;
3635 return 0;
3636}
3637_ACEOF
81ecdfbb
RW
3638for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3639 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3640do
3641 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3642 if ac_fn_c_try_compile "$LINENO"; then :
3643 ac_cv_prog_cc_c89=$ac_arg
c906108c 3644fi
81ecdfbb
RW
3645rm -f core conftest.err conftest.$ac_objext
3646 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3647done
81ecdfbb 3648rm -f conftest.$ac_ext
bec39cab 3649CC=$ac_save_CC
c906108c
SS
3650
3651fi
81ecdfbb
RW
3652# AC_CACHE_VAL
3653case "x$ac_cv_prog_cc_c89" in
3654 x)
3655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3656$as_echo "none needed" >&6; } ;;
3657 xno)
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3659$as_echo "unsupported" >&6; } ;;
bec39cab 3660 *)
81ecdfbb
RW
3661 CC="$CC $ac_cv_prog_cc_c89"
3662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3663$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3664esac
81ecdfbb 3665if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3666
b4e70030
JB
3667fi
3668
bec39cab
AC
3669ac_ext=c
3670ac_cpp='$CPP $CPPFLAGS'
3671ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3672ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3673ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3674
3bc3d82a
PA
3675ac_ext=cpp
3676ac_cpp='$CXXCPP $CPPFLAGS'
3677ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3678ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3679ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3680if test -z "$CXX"; then
3681 if test -n "$CCC"; then
3682 CXX=$CCC
3683 else
3684 if test -n "$ac_tool_prefix"; then
3685 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3686 do
3687 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3688set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3690$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3691if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3692 $as_echo_n "(cached) " >&6
3693else
3694 if test -n "$CXX"; then
3695 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3696else
3697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3698for as_dir in $PATH
3699do
3700 IFS=$as_save_IFS
3701 test -z "$as_dir" && as_dir=.
3702 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3704 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3706 break 2
3707 fi
3708done
3709 done
3710IFS=$as_save_IFS
3711
3712fi
3713fi
3714CXX=$ac_cv_prog_CXX
3715if test -n "$CXX"; then
3716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3717$as_echo "$CXX" >&6; }
3718else
3719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3720$as_echo "no" >&6; }
3721fi
3722
3723
3724 test -n "$CXX" && break
3725 done
3726fi
3727if test -z "$CXX"; then
3728 ac_ct_CXX=$CXX
3729 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3730do
3731 # Extract the first word of "$ac_prog", so it can be a program name with args.
3732set dummy $ac_prog; ac_word=$2
3733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3734$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3735if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3736 $as_echo_n "(cached) " >&6
3737else
3738 if test -n "$ac_ct_CXX"; then
3739 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3740else
3741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3742for as_dir in $PATH
3743do
3744 IFS=$as_save_IFS
3745 test -z "$as_dir" && as_dir=.
3746 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3748 ac_cv_prog_ac_ct_CXX="$ac_prog"
3749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3750 break 2
3751 fi
3752done
3753 done
3754IFS=$as_save_IFS
3755
3756fi
3757fi
3758ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3759if test -n "$ac_ct_CXX"; then
3760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3761$as_echo "$ac_ct_CXX" >&6; }
3762else
3763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3764$as_echo "no" >&6; }
3765fi
3766
3767
3768 test -n "$ac_ct_CXX" && break
3769done
3770
3771 if test "x$ac_ct_CXX" = x; then
3772 CXX="g++"
3773 else
3774 case $cross_compiling:$ac_tool_warned in
3775yes:)
3776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3778ac_tool_warned=yes ;;
3779esac
3780 CXX=$ac_ct_CXX
3781 fi
3782fi
3783
3784 fi
3785fi
3786# Provide some information about the compiler.
3787$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3788set X $ac_compile
3789ac_compiler=$2
3790for ac_option in --version -v -V -qversion; do
3791 { { ac_try="$ac_compiler $ac_option >&5"
3792case "(($ac_try" in
3793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3794 *) ac_try_echo=$ac_try;;
3795esac
3796eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3797$as_echo "$ac_try_echo"; } >&5
3798 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3799 ac_status=$?
3800 if test -s conftest.err; then
3801 sed '10a\
3802... rest of stderr output deleted ...
3803 10q' conftest.err >conftest.er1
3804 cat conftest.er1 >&5
3bc3d82a 3805 fi
d0ac1c44 3806 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3808 test $ac_status = 0; }
3809done
3810
3811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3812$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3813if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3814 $as_echo_n "(cached) " >&6
3815else
3816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3817/* end confdefs.h. */
3818
3819int
3820main ()
3821{
3822#ifndef __GNUC__
3823 choke me
3824#endif
3825
3826 ;
3827 return 0;
3828}
3829_ACEOF
3830if ac_fn_cxx_try_compile "$LINENO"; then :
3831 ac_compiler_gnu=yes
3832else
3833 ac_compiler_gnu=no
3834fi
3835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3836ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3837
3838fi
3839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3840$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3841if test $ac_compiler_gnu = yes; then
3842 GXX=yes
3843else
3844 GXX=
3845fi
3846ac_test_CXXFLAGS=${CXXFLAGS+set}
3847ac_save_CXXFLAGS=$CXXFLAGS
3848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3849$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3850if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3851 $as_echo_n "(cached) " >&6
3852else
3853 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3854 ac_cxx_werror_flag=yes
3855 ac_cv_prog_cxx_g=no
3856 CXXFLAGS="-g"
3857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3858/* end confdefs.h. */
3859
3860int
3861main ()
3862{
3863
3864 ;
3865 return 0;
3866}
3867_ACEOF
3868if ac_fn_cxx_try_compile "$LINENO"; then :
3869 ac_cv_prog_cxx_g=yes
3870else
3871 CXXFLAGS=""
3872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3873/* end confdefs.h. */
3874
3875int
3876main ()
3877{
3878
3879 ;
3880 return 0;
3881}
3882_ACEOF
3883if ac_fn_cxx_try_compile "$LINENO"; then :
3884
3885else
3886 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3887 CXXFLAGS="-g"
3888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3889/* end confdefs.h. */
3890
3891int
3892main ()
3893{
3894
3895 ;
3896 return 0;
3897}
3898_ACEOF
3899if ac_fn_cxx_try_compile "$LINENO"; then :
3900 ac_cv_prog_cxx_g=yes
3901fi
3902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3903fi
3904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3905fi
3906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3907 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3908fi
3909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3910$as_echo "$ac_cv_prog_cxx_g" >&6; }
3911if test "$ac_test_CXXFLAGS" = set; then
3912 CXXFLAGS=$ac_save_CXXFLAGS
3913elif test $ac_cv_prog_cxx_g = yes; then
3914 if test "$GXX" = yes; then
3915 CXXFLAGS="-g -O2"
3916 else
3917 CXXFLAGS="-g"
3918 fi
3919else
3920 if test "$GXX" = yes; then
3921 CXXFLAGS="-O2"
3922 else
3923 CXXFLAGS=
3924 fi
3925fi
3926ac_ext=c
3927ac_cpp='$CPP $CPPFLAGS'
3928ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3929ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3930ac_compiler_gnu=$ac_cv_c_compiler_gnu
3931
3932
60ca704f 3933
bec39cab
AC
3934ac_ext=c
3935ac_cpp='$CPP $CPPFLAGS'
3936ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3937ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3938ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3940$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3941# On Suns, sometimes $CPP names a directory.
3942if test -n "$CPP" && test -d "$CPP"; then
3943 CPP=
8bb2c122 3944fi
bec39cab 3945if test -z "$CPP"; then
d0ac1c44 3946 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 3947 $as_echo_n "(cached) " >&6
bec39cab
AC
3948else
3949 # Double quotes because CPP needs to be expanded
3950 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3951 do
3952 ac_preproc_ok=false
3953for ac_c_preproc_warn_flag in '' yes
3954do
3955 # Use a header file that comes with gcc, so configuring glibc
3956 # with a fresh cross-compiler works.
3957 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3958 # <limits.h> exists even on freestanding compilers.
3959 # On the NeXT, cc -E runs the code through the compiler's parser,
3960 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3962/* end confdefs.h. */
3963#ifdef __STDC__
3964# include <limits.h>
3965#else
3966# include <assert.h>
3967#endif
3968 Syntax error
3969_ACEOF
81ecdfbb 3970if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3971
81ecdfbb 3972else
bec39cab
AC
3973 # Broken: fails on valid input.
3974continue
3975fi
d0ac1c44 3976rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3977
81ecdfbb 3978 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3979 # can be detected and how.
81ecdfbb 3980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3981/* end confdefs.h. */
3982#include <ac_nonexistent.h>
3983_ACEOF
81ecdfbb 3984if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3985 # Broken: success on invalid input.
3986continue
8bb2c122 3987else
bec39cab
AC
3988 # Passes both tests.
3989ac_preproc_ok=:
3990break
8bb2c122 3991fi
d0ac1c44 3992rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 3993
bec39cab
AC
3994done
3995# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3996rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 3997if $ac_preproc_ok; then :
bec39cab
AC
3998 break
3999fi
8bb2c122 4000
bec39cab
AC
4001 done
4002 ac_cv_prog_CPP=$CPP
ddc9cd0f 4003
c906108c 4004fi
bec39cab
AC
4005 CPP=$ac_cv_prog_CPP
4006else
4007 ac_cv_prog_CPP=$CPP
c906108c 4008fi
81ecdfbb
RW
4009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4010$as_echo "$CPP" >&6; }
bec39cab
AC
4011ac_preproc_ok=false
4012for ac_c_preproc_warn_flag in '' yes
4013do
4014 # Use a header file that comes with gcc, so configuring glibc
4015 # with a fresh cross-compiler works.
4016 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4017 # <limits.h> exists even on freestanding compilers.
4018 # On the NeXT, cc -E runs the code through the compiler's parser,
4019 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4021/* end confdefs.h. */
4022#ifdef __STDC__
4023# include <limits.h>
4024#else
4025# include <assert.h>
4026#endif
4027 Syntax error
4028_ACEOF
81ecdfbb 4029if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4030
81ecdfbb 4031else
bec39cab
AC
4032 # Broken: fails on valid input.
4033continue
4034fi
d0ac1c44 4035rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4036
81ecdfbb 4037 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4038 # can be detected and how.
81ecdfbb 4039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4040/* end confdefs.h. */
4041#include <ac_nonexistent.h>
4042_ACEOF
81ecdfbb 4043if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4044 # Broken: success on invalid input.
4045continue
c906108c 4046else
bec39cab
AC
4047 # Passes both tests.
4048ac_preproc_ok=:
4049break
c906108c 4050fi
d0ac1c44 4051rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4052
bec39cab
AC
4053done
4054# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4055rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4056if $ac_preproc_ok; then :
4057
c906108c 4058else
81ecdfbb
RW
4059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4061as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4062See \`config.log' for more details" "$LINENO" 5; }
c906108c 4063fi
c906108c 4064
bec39cab
AC
4065ac_ext=c
4066ac_cpp='$CPP $CPPFLAGS'
4067ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4068ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4069ac_compiler_gnu=$ac_cv_c_compiler_gnu
4070
4071
81ecdfbb
RW
4072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4073$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4074if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4075 $as_echo_n "(cached) " >&6
4e8d927d 4076else
81ecdfbb
RW
4077 if test -z "$GREP"; then
4078 ac_path_GREP_found=false
4079 # Loop through the user's path and test for each of PROGNAME-LIST
4080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4081for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4082do
4083 IFS=$as_save_IFS
4084 test -z "$as_dir" && as_dir=.
4085 for ac_prog in grep ggrep; do
4086 for ac_exec_ext in '' $ac_executable_extensions; do
4087 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4088 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4089# Check for GNU ac_path_GREP and select it if it is found.
4090 # Check for GNU $ac_path_GREP
4091case `"$ac_path_GREP" --version 2>&1` in
4092*GNU*)
4093 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4094*)
4095 ac_count=0
4096 $as_echo_n 0123456789 >"conftest.in"
4097 while :
4098 do
4099 cat "conftest.in" "conftest.in" >"conftest.tmp"
4100 mv "conftest.tmp" "conftest.in"
4101 cp "conftest.in" "conftest.nl"
4102 $as_echo 'GREP' >> "conftest.nl"
4103 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4104 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4105 as_fn_arith $ac_count + 1 && ac_count=$as_val
4106 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4107 # Best one so far, save it but keep looking for a better one
4108 ac_cv_path_GREP="$ac_path_GREP"
4109 ac_path_GREP_max=$ac_count
bec39cab 4110 fi
81ecdfbb
RW
4111 # 10*(2^10) chars as input seems more than enough
4112 test $ac_count -gt 10 && break
4113 done
4114 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4115esac
bec39cab 4116
81ecdfbb
RW
4117 $ac_path_GREP_found && break 3
4118 done
4119 done
4120 done
4121IFS=$as_save_IFS
4122 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4123 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4124 fi
c906108c 4125else
81ecdfbb 4126 ac_cv_path_GREP=$GREP
c906108c 4127fi
c906108c 4128
81ecdfbb
RW
4129fi
4130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4131$as_echo "$ac_cv_path_GREP" >&6; }
4132 GREP="$ac_cv_path_GREP"
c906108c 4133
c906108c 4134
81ecdfbb
RW
4135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4136$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4137if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4138 $as_echo_n "(cached) " >&6
783e057b 4139else
81ecdfbb
RW
4140 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4141 then ac_cv_path_EGREP="$GREP -E"
4142 else
4143 if test -z "$EGREP"; then
4144 ac_path_EGREP_found=false
4145 # Loop through the user's path and test for each of PROGNAME-LIST
4146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4147for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4148do
4149 IFS=$as_save_IFS
4150 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4151 for ac_prog in egrep; do
4152 for ac_exec_ext in '' $ac_executable_extensions; do
4153 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4154 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4155# Check for GNU ac_path_EGREP and select it if it is found.
4156 # Check for GNU $ac_path_EGREP
4157case `"$ac_path_EGREP" --version 2>&1` in
4158*GNU*)
4159 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4160*)
4161 ac_count=0
4162 $as_echo_n 0123456789 >"conftest.in"
4163 while :
4164 do
4165 cat "conftest.in" "conftest.in" >"conftest.tmp"
4166 mv "conftest.tmp" "conftest.in"
4167 cp "conftest.in" "conftest.nl"
4168 $as_echo 'EGREP' >> "conftest.nl"
4169 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4170 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4171 as_fn_arith $ac_count + 1 && ac_count=$as_val
4172 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4173 # Best one so far, save it but keep looking for a better one
4174 ac_cv_path_EGREP="$ac_path_EGREP"
4175 ac_path_EGREP_max=$ac_count
4176 fi
4177 # 10*(2^10) chars as input seems more than enough
4178 test $ac_count -gt 10 && break
4179 done
4180 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4181esac
bec39cab 4182
81ecdfbb
RW
4183 $ac_path_EGREP_found && break 3
4184 done
4185 done
4186 done
4187IFS=$as_save_IFS
4188 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4189 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4190 fi
783e057b 4191else
81ecdfbb 4192 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4193fi
4194
81ecdfbb 4195 fi
783e057b 4196fi
81ecdfbb
RW
4197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4198$as_echo "$ac_cv_path_EGREP" >&6; }
4199 EGREP="$ac_cv_path_EGREP"
4200
783e057b 4201
81ecdfbb
RW
4202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4203$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4204if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4205 $as_echo_n "(cached) " >&6
783e057b 4206else
81ecdfbb 4207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4208/* end confdefs.h. */
783e057b 4209#include <stdlib.h>
bec39cab 4210#include <stdarg.h>
783e057b
DJ
4211#include <string.h>
4212#include <float.h>
c906108c 4213
bec39cab
AC
4214int
4215main ()
4216{
c906108c 4217
bec39cab
AC
4218 ;
4219 return 0;
4220}
4221_ACEOF
81ecdfbb 4222if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4223 ac_cv_header_stdc=yes
c906108c 4224else
81ecdfbb 4225 ac_cv_header_stdc=no
c906108c 4226fi
81ecdfbb 4227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4228
783e057b
DJ
4229if test $ac_cv_header_stdc = yes; then
4230 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4232/* end confdefs.h. */
4233#include <string.h>
c906108c 4234
783e057b
DJ
4235_ACEOF
4236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4237 $EGREP "memchr" >/dev/null 2>&1; then :
4238
c906108c 4239else
783e057b 4240 ac_cv_header_stdc=no
c906108c 4241fi
783e057b 4242rm -f conftest*
c906108c
SS
4243
4244fi
4245
783e057b
DJ
4246if test $ac_cv_header_stdc = yes; then
4247 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4249/* end confdefs.h. */
4250#include <stdlib.h>
bec39cab 4251
783e057b
DJ
4252_ACEOF
4253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4254 $EGREP "free" >/dev/null 2>&1; then :
4255
bec39cab 4256else
783e057b 4257 ac_cv_header_stdc=no
bec39cab 4258fi
783e057b 4259rm -f conftest*
bec39cab
AC
4260
4261fi
bec39cab 4262
783e057b
DJ
4263if test $ac_cv_header_stdc = yes; then
4264 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4265 if test "$cross_compiling" = yes; then :
783e057b 4266 :
bec39cab 4267else
81ecdfbb 4268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4269/* end confdefs.h. */
4270#include <ctype.h>
81ecdfbb 4271#include <stdlib.h>
783e057b
DJ
4272#if ((' ' & 0x0FF) == 0x020)
4273# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4274# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4275#else
4276# define ISLOWER(c) \
4277 (('a' <= (c) && (c) <= 'i') \
4278 || ('j' <= (c) && (c) <= 'r') \
4279 || ('s' <= (c) && (c) <= 'z'))
4280# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4281#endif
4282
4283#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4284int
4285main ()
4286{
4287 int i;
4288 for (i = 0; i < 256; i++)
4289 if (XOR (islower (i), ISLOWER (i))
4290 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4291 return 2;
4292 return 0;
783e057b
DJ
4293}
4294_ACEOF
81ecdfbb 4295if ac_fn_c_try_run "$LINENO"; then :
783e057b 4296
81ecdfbb
RW
4297else
4298 ac_cv_header_stdc=no
783e057b 4299fi
81ecdfbb
RW
4300rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4301 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4302fi
81ecdfbb 4303
783e057b
DJ
4304fi
4305fi
81ecdfbb
RW
4306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4307$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4308if test $ac_cv_header_stdc = yes; then
4309
81ecdfbb 4310$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4311
4312fi
4313
4314# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4315for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4316 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4317do :
4318 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4319ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4320"
d0ac1c44 4321if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4322 cat >>confdefs.h <<_ACEOF
81ecdfbb 4323#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4324_ACEOF
4325
4326fi
4327
4328done
4329
4330
4331
81ecdfbb 4332 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4333if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4334 MINIX=yes
4335else
4336 MINIX=
4337fi
4338
4339
4340 if test "$MINIX" = yes; then
4341
81ecdfbb 4342$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4343
4344
81ecdfbb 4345$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4346
4347
81ecdfbb 4348$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4349
4350 fi
4351
4352
81ecdfbb
RW
4353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4354$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4355if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4356 $as_echo_n "(cached) " >&6
783e057b 4357else
81ecdfbb 4358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4359/* end confdefs.h. */
4360
d0ac1c44
SM
4361# define __EXTENSIONS__ 1
4362 $ac_includes_default
783e057b
DJ
4363int
4364main ()
4365{
4366
4367 ;
4368 return 0;
4369}
4370_ACEOF
81ecdfbb 4371if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4372 ac_cv_safe_to_define___extensions__=yes
4373else
81ecdfbb 4374 ac_cv_safe_to_define___extensions__=no
783e057b 4375fi
81ecdfbb 4376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4377fi
81ecdfbb
RW
4378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4379$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4380 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4381 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4382
81ecdfbb 4383 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4384
81ecdfbb 4385 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4386
81ecdfbb 4387 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4388
81ecdfbb 4389 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4390
4391
c971b7fa
PA
4392ac_aux_dir=
4393for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4394 if test -f "$ac_dir/install-sh"; then
4395 ac_aux_dir=$ac_dir
4396 ac_install_sh="$ac_aux_dir/install-sh -c"
4397 break
4398 elif test -f "$ac_dir/install.sh"; then
4399 ac_aux_dir=$ac_dir
4400 ac_install_sh="$ac_aux_dir/install.sh -c"
4401 break
4402 elif test -f "$ac_dir/shtool"; then
4403 ac_aux_dir=$ac_dir
4404 ac_install_sh="$ac_aux_dir/shtool install -c"
4405 break
4406 fi
c971b7fa
PA
4407done
4408if test -z "$ac_aux_dir"; then
d0ac1c44 4409 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4410fi
770d76d7 4411
c971b7fa
PA
4412# These three variables are undocumented and unsupported,
4413# and are intended to be withdrawn in a future Autoconf release.
4414# They can cause serious problems if a builder's source tree is in a directory
4415# whose full name contains unusual characters.
4416ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4417ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4418ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4419
770d76d7 4420
c971b7fa
PA
4421# Make sure we can run config.sub.
4422$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4423 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4424
c971b7fa
PA
4425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4426$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4427if ${ac_cv_build+:} false; then :
c971b7fa 4428 $as_echo_n "(cached) " >&6
770d76d7 4429else
c971b7fa
PA
4430 ac_build_alias=$build_alias
4431test "x$ac_build_alias" = x &&
4432 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4433test "x$ac_build_alias" = x &&
d0ac1c44 4434 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4435ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4436 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4437
770d76d7 4438fi
c971b7fa
PA
4439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4440$as_echo "$ac_cv_build" >&6; }
4441case $ac_cv_build in
4442*-*-*) ;;
d0ac1c44 4443*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4444esac
c971b7fa
PA
4445build=$ac_cv_build
4446ac_save_IFS=$IFS; IFS='-'
4447set x $ac_cv_build
4448shift
4449build_cpu=$1
4450build_vendor=$2
4451shift; shift
4452# Remember, the first character of IFS is used to create $*,
4453# except with old shells:
4454build_os=$*
4455IFS=$ac_save_IFS
4456case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4457
4458
c971b7fa
PA
4459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4460$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4461if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4462 $as_echo_n "(cached) " >&6
4463else
c971b7fa
PA
4464 if test "x$host_alias" = x; then
4465 ac_cv_host=$ac_cv_build
81ecdfbb 4466else
c971b7fa 4467 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4468 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4469fi
81ecdfbb
RW
4470
4471fi
c971b7fa
PA
4472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4473$as_echo "$ac_cv_host" >&6; }
4474case $ac_cv_host in
4475*-*-*) ;;
d0ac1c44 4476*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4477esac
c971b7fa
PA
4478host=$ac_cv_host
4479ac_save_IFS=$IFS; IFS='-'
4480set x $ac_cv_host
4481shift
4482host_cpu=$1
4483host_vendor=$2
4484shift; shift
4485# Remember, the first character of IFS is used to create $*,
4486# except with old shells:
4487host_os=$*
4488IFS=$ac_save_IFS
4489case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4490
4491
4492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4493$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4494if ${ac_cv_target+:} false; then :
3388710e
JM
4495 $as_echo_n "(cached) " >&6
4496else
4497 if test "x$target_alias" = x; then
4498 ac_cv_target=$ac_cv_host
4499else
4500 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4501 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4502fi
4503
4504fi
4505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4506$as_echo "$ac_cv_target" >&6; }
4507case $ac_cv_target in
4508*-*-*) ;;
d0ac1c44 4509*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4510esac
4511target=$ac_cv_target
4512ac_save_IFS=$IFS; IFS='-'
4513set x $ac_cv_target
4514shift
4515target_cpu=$1
4516target_vendor=$2
4517shift; shift
4518# Remember, the first character of IFS is used to create $*,
4519# except with old shells:
4520target_os=$*
4521IFS=$ac_save_IFS
4522case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4523
4524
4525# The aliases save the names the user supplied, while $host etc.
4526# will get canonicalized.
4527test -n "$target_alias" &&
4528 test "$program_prefix$program_suffix$program_transform_name" = \
4529 NONENONEs,x,x, &&
4530 program_prefix=${target_alias}-
4531
4532# The tests for host and target for $enable_largefile require
4533# canonical names.
4534
4535
81ecdfbb 4536
da2f07f1
JK
4537# As the $enable_largefile decision depends on --enable-plugins we must set it
4538# even in directories otherwise not depending on the $plugins option.
4539
4540
2974be62
AM
4541 maybe_plugins=no
4542 for ac_header in dlfcn.h
4543do :
4544 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4545"
d0ac1c44 4546if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4547 cat >>confdefs.h <<_ACEOF
4548#define HAVE_DLFCN_H 1
4549_ACEOF
4550 maybe_plugins=yes
4551fi
4552
4553done
4554
4555 for ac_header in windows.h
4556do :
4557 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4558"
d0ac1c44 4559if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4560 cat >>confdefs.h <<_ACEOF
4561#define HAVE_WINDOWS_H 1
4562_ACEOF
4563 maybe_plugins=yes
4564fi
4565
4566done
4567
4568
4569 # Check whether --enable-plugins was given.
da2f07f1
JK
4570if test "${enable_plugins+set}" = set; then :
4571 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4572 no) plugins=no ;;
4573 *) plugins=yes
4574 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4575 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4576 fi ;;
4577 esac
da2f07f1 4578else
2974be62
AM
4579 plugins=$maybe_plugins
4580
da2f07f1
JK
4581fi
4582
2974be62 4583 if test "$plugins" = "yes"; then
458412c3
TT
4584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4585$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4586if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4587 $as_echo_n "(cached) " >&6
4588else
4589 ac_func_search_save_LIBS=$LIBS
4590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4591/* end confdefs.h. */
4592
4593/* Override any GCC internal prototype to avoid an error.
4594 Use char because int might match the return type of a GCC
4595 builtin and then its argument prototype would still apply. */
4596#ifdef __cplusplus
4597extern "C"
4598#endif
458412c3 4599char dlsym ();
2974be62
AM
4600int
4601main ()
4602{
458412c3 4603return dlsym ();
2974be62
AM
4604 ;
4605 return 0;
4606}
4607_ACEOF
4608for ac_lib in '' dl; do
4609 if test -z "$ac_lib"; then
4610 ac_res="none required"
4611 else
4612 ac_res=-l$ac_lib
4613 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4614 fi
4615 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4616 ac_cv_search_dlsym=$ac_res
2974be62
AM
4617fi
4618rm -f core conftest.err conftest.$ac_objext \
4619 conftest$ac_exeext
d0ac1c44 4620 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4621 break
4622fi
4623done
d0ac1c44 4624if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4625
4626else
458412c3 4627 ac_cv_search_dlsym=no
2974be62
AM
4628fi
4629rm conftest.$ac_ext
4630LIBS=$ac_func_search_save_LIBS
4631fi
458412c3
TT
4632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4633$as_echo "$ac_cv_search_dlsym" >&6; }
4634ac_res=$ac_cv_search_dlsym
2974be62
AM
4635if test "$ac_res" != no; then :
4636 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4637
4638fi
4639
4640 fi
da2f07f1
JK
4641
4642
4643case "${host}" in
4644 sparc-*-solaris*|i[3-7]86-*-solaris*)
4645 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4646 # are mutually exclusive; and without procfs support, the bfd/ elf module
4647 # cannot provide certain routines such as elfcore_write_prpsinfo
4648 # or elfcore_write_prstatus. So unless the user explicitly requested
4649 # large-file support through the --enable-largefile switch, disable
4650 # large-file support in favor of procfs support.
4651 test "${target}" = "${host}" -a "x$plugins" = xno \
4652 && : ${enable_largefile="no"}
4653 ;;
4654esac
4655
4656# Check whether --enable-largefile was given.
4657if test "${enable_largefile+set}" = set; then :
4658 enableval=$enable_largefile;
4659fi
4660
4661if test "$enable_largefile" != no; then
4662
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4664$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4665if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4666 $as_echo_n "(cached) " >&6
4667else
4668 ac_cv_sys_largefile_CC=no
4669 if test "$GCC" != yes; then
4670 ac_save_CC=$CC
4671 while :; do
4672 # IRIX 6.2 and later do not support large files by default,
4673 # so use the C compiler's -n32 option if that helps.
4674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4675/* end confdefs.h. */
4676#include <sys/types.h>
4677 /* Check that off_t can represent 2**63 - 1 correctly.
4678 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4679 since some C++ compilers masquerading as C compilers
4680 incorrectly reject 9223372036854775807. */
4681#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4682 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4683 && LARGE_OFF_T % 2147483647 == 1)
4684 ? 1 : -1];
4685int
4686main ()
4687{
4688
4689 ;
4690 return 0;
4691}
4692_ACEOF
4693 if ac_fn_c_try_compile "$LINENO"; then :
4694 break
4695fi
4696rm -f core conftest.err conftest.$ac_objext
4697 CC="$CC -n32"
4698 if ac_fn_c_try_compile "$LINENO"; then :
4699 ac_cv_sys_largefile_CC=' -n32'; break
4700fi
4701rm -f core conftest.err conftest.$ac_objext
4702 break
4703 done
4704 CC=$ac_save_CC
4705 rm -f conftest.$ac_ext
4706 fi
4707fi
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4709$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4710 if test "$ac_cv_sys_largefile_CC" != no; then
4711 CC=$CC$ac_cv_sys_largefile_CC
4712 fi
4713
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4715$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4716if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4717 $as_echo_n "(cached) " >&6
4718else
4719 while :; do
4720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4721/* end confdefs.h. */
4722#include <sys/types.h>
4723 /* Check that off_t can represent 2**63 - 1 correctly.
4724 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4725 since some C++ compilers masquerading as C compilers
4726 incorrectly reject 9223372036854775807. */
4727#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4728 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4729 && LARGE_OFF_T % 2147483647 == 1)
4730 ? 1 : -1];
4731int
4732main ()
4733{
4734
4735 ;
4736 return 0;
4737}
4738_ACEOF
4739if ac_fn_c_try_compile "$LINENO"; then :
4740 ac_cv_sys_file_offset_bits=no; break
4741fi
4742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4744/* end confdefs.h. */
4745#define _FILE_OFFSET_BITS 64
4746#include <sys/types.h>
4747 /* Check that off_t can represent 2**63 - 1 correctly.
4748 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4749 since some C++ compilers masquerading as C compilers
4750 incorrectly reject 9223372036854775807. */
4751#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4752 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4753 && LARGE_OFF_T % 2147483647 == 1)
4754 ? 1 : -1];
4755int
4756main ()
4757{
4758
4759 ;
4760 return 0;
4761}
4762_ACEOF
4763if ac_fn_c_try_compile "$LINENO"; then :
4764 ac_cv_sys_file_offset_bits=64; break
4765fi
4766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4767 ac_cv_sys_file_offset_bits=unknown
4768 break
4769done
4770fi
4771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4772$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4773case $ac_cv_sys_file_offset_bits in #(
4774 no | unknown) ;;
4775 *)
4776cat >>confdefs.h <<_ACEOF
4777#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4778_ACEOF
4779;;
4780esac
4781rm -rf conftest*
4782 if test $ac_cv_sys_file_offset_bits = unknown; then
4783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4784$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4785if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4786 $as_echo_n "(cached) " >&6
4787else
4788 while :; do
4789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4790/* end confdefs.h. */
4791#include <sys/types.h>
4792 /* Check that off_t can represent 2**63 - 1 correctly.
4793 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4794 since some C++ compilers masquerading as C compilers
4795 incorrectly reject 9223372036854775807. */
4796#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4797 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4798 && LARGE_OFF_T % 2147483647 == 1)
4799 ? 1 : -1];
4800int
4801main ()
4802{
4803
4804 ;
4805 return 0;
4806}
4807_ACEOF
4808if ac_fn_c_try_compile "$LINENO"; then :
4809 ac_cv_sys_large_files=no; break
4810fi
4811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4813/* end confdefs.h. */
4814#define _LARGE_FILES 1
4815#include <sys/types.h>
4816 /* Check that off_t can represent 2**63 - 1 correctly.
4817 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4818 since some C++ compilers masquerading as C compilers
4819 incorrectly reject 9223372036854775807. */
4820#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4821 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4822 && LARGE_OFF_T % 2147483647 == 1)
4823 ? 1 : -1];
4824int
4825main ()
4826{
4827
4828 ;
4829 return 0;
4830}
4831_ACEOF
4832if ac_fn_c_try_compile "$LINENO"; then :
4833 ac_cv_sys_large_files=1; break
4834fi
4835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4836 ac_cv_sys_large_files=unknown
4837 break
4838done
4839fi
4840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4841$as_echo "$ac_cv_sys_large_files" >&6; }
4842case $ac_cv_sys_large_files in #(
4843 no | unknown) ;;
4844 *)
4845cat >>confdefs.h <<_ACEOF
4846#define _LARGE_FILES $ac_cv_sys_large_files
4847_ACEOF
4848;;
4849esac
4850rm -rf conftest*
4851 fi
d0ac1c44
SM
4852
4853
da2f07f1
JK
4854fi
4855
4856
4857
81ecdfbb
RW
4858
4859
4860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4861$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4862if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4863 $as_echo_n "(cached) " >&6
4864else
4865 am_cv_prog_cc_stdc=no
4866ac_save_CC="$CC"
4867# Don't try gcc -ansi; that turns off useful extensions and
4868# breaks some systems' header files.
4869# AIX -qlanglvl=ansi
4870# Ultrix and OSF/1 -std1
4871# HP-UX 10.20 and later -Ae
4872# HP-UX older versions -Aa -D_HPUX_SOURCE
4873# SVR4 -Xc -D__EXTENSIONS__
4874for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4875do
783e057b 4876 CC="$ac_save_CC $ac_arg"
81ecdfbb 4877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4878/* end confdefs.h. */
4879#include <stdarg.h>
4880#include <stdio.h>
4881#include <sys/types.h>
4882#include <sys/stat.h>
4883/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4884struct buf { int x; };
4885FILE * (*rcsopen) (struct buf *, struct stat *, int);
4886static char *e (p, i)
4887 char **p;
4888 int i;
4889{
4890 return p[i];
4891}
4892static char *f (char * (*g) (char **, int), char **p, ...)
4893{
4894 char *s;
4895 va_list v;
4896 va_start (v,p);
4897 s = g (p, va_arg (v,int));
4898 va_end (v);
4899 return s;
4900}
4901int test (int i, double x);
4902struct s1 {int (*f) (int a);};
4903struct s2 {int (*f) (double a);};
4904int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4905int argc;
4906char **argv;
4907
4908int
4909main ()
4910{
4911
4912return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4913
4914 ;
4915 return 0;
4916}
4917_ACEOF
81ecdfbb 4918if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4919 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4920fi
81ecdfbb 4921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4922done
4923CC="$ac_save_CC"
4924
4925fi
4926
4927if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4929$as_echo "none needed" >&6; }
783e057b 4930else
81ecdfbb
RW
4931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4932$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4933fi
4934case "x$am_cv_prog_cc_stdc" in
4935 x|xno) ;;
4936 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4937esac
4938
d0ac1c44
SM
4939# Expand $ac_aux_dir to an absolute path.
4940am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 4941
d0ac1c44 4942if test x"${install_sh+set}" != xset; then
4869db5e
RM
4943 case $am_aux_dir in
4944 *\ * | *\ *)
4945 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4946 *)
4947 install_sh="\${SHELL} $am_aux_dir/install-sh"
4948 esac
4949fi
4950
d0ac1c44
SM
4951# Installed binaries are usually stripped using 'strip' when the user
4952# run "make install-strip". However 'strip' might not be the right
4869db5e 4953# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 4954# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
4955if test "$cross_compiling" != no; then
4956 if test -n "$ac_tool_prefix"; then
4957 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4958set dummy ${ac_tool_prefix}strip; ac_word=$2
4959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4960$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4961if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
4962 $as_echo_n "(cached) " >&6
4963else
4964 if test -n "$STRIP"; then
4965 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4966else
4967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968for as_dir in $PATH
4969do
4970 IFS=$as_save_IFS
4971 test -z "$as_dir" && as_dir=.
4972 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4973 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4974 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4975 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4976 break 2
4977 fi
4978done
4979 done
4980IFS=$as_save_IFS
4981
4982fi
4983fi
4984STRIP=$ac_cv_prog_STRIP
4985if test -n "$STRIP"; then
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4987$as_echo "$STRIP" >&6; }
4988else
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990$as_echo "no" >&6; }
4991fi
4992
4993
4994fi
4995if test -z "$ac_cv_prog_STRIP"; then
4996 ac_ct_STRIP=$STRIP
4997 # Extract the first word of "strip", so it can be a program name with args.
4998set dummy strip; ac_word=$2
4999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5000$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5001if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5002 $as_echo_n "(cached) " >&6
5003else
5004 if test -n "$ac_ct_STRIP"; then
5005 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5006else
5007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5008for as_dir in $PATH
5009do
5010 IFS=$as_save_IFS
5011 test -z "$as_dir" && as_dir=.
5012 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5013 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5014 ac_cv_prog_ac_ct_STRIP="strip"
5015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5016 break 2
5017 fi
5018done
5019 done
5020IFS=$as_save_IFS
5021
5022fi
5023fi
5024ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5025if test -n "$ac_ct_STRIP"; then
5026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5027$as_echo "$ac_ct_STRIP" >&6; }
5028else
5029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5030$as_echo "no" >&6; }
5031fi
5032
5033 if test "x$ac_ct_STRIP" = x; then
5034 STRIP=":"
5035 else
5036 case $cross_compiling:$ac_tool_warned in
5037yes:)
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5039$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5040ac_tool_warned=yes ;;
5041esac
5042 STRIP=$ac_ct_STRIP
5043 fi
5044else
5045 STRIP="$ac_cv_prog_STRIP"
5046fi
5047
5048fi
5049INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5050
783e057b
DJ
5051
5052ac_aux_dir=
81ecdfbb 5053for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5054 if test -f "$ac_dir/install-sh"; then
5055 ac_aux_dir=$ac_dir
5056 ac_install_sh="$ac_aux_dir/install-sh -c"
5057 break
5058 elif test -f "$ac_dir/install.sh"; then
5059 ac_aux_dir=$ac_dir
5060 ac_install_sh="$ac_aux_dir/install.sh -c"
5061 break
5062 elif test -f "$ac_dir/shtool"; then
5063 ac_aux_dir=$ac_dir
5064 ac_install_sh="$ac_aux_dir/shtool install -c"
5065 break
5066 fi
783e057b
DJ
5067done
5068if test -z "$ac_aux_dir"; then
d0ac1c44 5069 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5070fi
81ecdfbb
RW
5071
5072# These three variables are undocumented and unsupported,
5073# and are intended to be withdrawn in a future Autoconf release.
5074# They can cause serious problems if a builder's source tree is in a directory
5075# whose full name contains unusual characters.
5076ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5077ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5078ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5079
783e057b 5080
783e057b 5081
9009e1ae
MR
5082test "$program_prefix" != NONE &&
5083 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5084# Use a double $ so make ignores it.
5085test "$program_suffix" != NONE &&
5086 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5087# Double any \ or $.
5088# By default was `s,x,x', remove it if useless.
5089ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5090program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5091
81ecdfbb 5092
0bcda685
PA
5093# We require a C++11 compiler. Check if one is available, and if
5094# necessary, set CXX_DIALECT to some -std=xxx switch.
5095
41260ac2 5096 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5097 ac_ext=cpp
5098ac_cpp='$CXXCPP $CPPFLAGS'
5099ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5100ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5101ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5102 CXX_DIALECT=""
5103 ac_success=no
5104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5105$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5106if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5107 $as_echo_n "(cached) " >&6
5108else
5109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5110/* end confdefs.h. */
5111
5112
5113// If the compiler admits that it is not ready for C++11, why torture it?
5114// Hopefully, this will speed up the test.
5115
5116#ifndef __cplusplus
5117
5118#error "This is not a C++ compiler"
5119
5120#elif __cplusplus < 201103L
5121
5122#error "This is not a C++11 compiler"
5123
5124#else
5125
5126namespace cxx11
5127{
5128
5129 namespace test_static_assert
5130 {
5131
5132 template <typename T>
5133 struct check
5134 {
5135 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5136 };
5137
5138 }
5139
5140 namespace test_final_override
5141 {
5142
5143 struct Base
5144 {
5145 virtual void f() {}
5146 };
5147
5148 struct Derived : public Base
5149 {
5150 virtual void f() override {}
5151 };
5152
5153 }
5154
5155 namespace test_double_right_angle_brackets
5156 {
5157
5158 template < typename T >
5159 struct check {};
5160
5161 typedef check<void> single_type;
5162 typedef check<check<void>> double_type;
5163 typedef check<check<check<void>>> triple_type;
5164 typedef check<check<check<check<void>>>> quadruple_type;
5165
5166 }
5167
5168 namespace test_decltype
5169 {
5170
5171 int
5172 f()
5173 {
5174 int a = 1;
5175 decltype(a) b = 2;
5176 return a + b;
5177 }
5178
5179 }
5180
5181 namespace test_type_deduction
5182 {
5183
5184 template < typename T1, typename T2 >
5185 struct is_same
5186 {
5187 static const bool value = false;
5188 };
5189
5190 template < typename T >
5191 struct is_same<T, T>
5192 {
5193 static const bool value = true;
5194 };
5195
5196 template < typename T1, typename T2 >
5197 auto
5198 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5199 {
5200 return a1 + a2;
5201 }
5202
5203 int
5204 test(const int c, volatile int v)
5205 {
5206 static_assert(is_same<int, decltype(0)>::value == true, "");
5207 static_assert(is_same<int, decltype(c)>::value == false, "");
5208 static_assert(is_same<int, decltype(v)>::value == false, "");
5209 auto ac = c;
5210 auto av = v;
5211 auto sumi = ac + av + 'x';
5212 auto sumf = ac + av + 1.0;
5213 static_assert(is_same<int, decltype(ac)>::value == true, "");
5214 static_assert(is_same<int, decltype(av)>::value == true, "");
5215 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5216 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5217 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5218 return (sumf > 0.0) ? sumi : add(c, v);
5219 }
5220
5221 }
5222
5223 namespace test_noexcept
5224 {
5225
5226 int f() { return 0; }
5227 int g() noexcept { return 0; }
5228
5229 static_assert(noexcept(f()) == false, "");
5230 static_assert(noexcept(g()) == true, "");
5231
5232 }
5233
5234 namespace test_constexpr
5235 {
5236
5237 template < typename CharT >
5238 unsigned long constexpr
5239 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5240 {
5241 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5242 }
5243
5244 template < typename CharT >
5245 unsigned long constexpr
5246 strlen_c(const CharT *const s) noexcept
5247 {
5248 return strlen_c_r(s, 0UL);
5249 }
5250
5251 static_assert(strlen_c("") == 0UL, "");
5252 static_assert(strlen_c("1") == 1UL, "");
5253 static_assert(strlen_c("example") == 7UL, "");
5254 static_assert(strlen_c("another\0example") == 7UL, "");
5255
5256 }
5257
5258 namespace test_rvalue_references
5259 {
5260
5261 template < int N >
5262 struct answer
5263 {
5264 static constexpr int value = N;
5265 };
5266
5267 answer<1> f(int&) { return answer<1>(); }
5268 answer<2> f(const int&) { return answer<2>(); }
5269 answer<3> f(int&&) { return answer<3>(); }
5270
5271 void
5272 test()
5273 {
5274 int i = 0;
5275 const int c = 0;
5276 static_assert(decltype(f(i))::value == 1, "");
5277 static_assert(decltype(f(c))::value == 2, "");
5278 static_assert(decltype(f(0))::value == 3, "");
5279 }
5280
5281 }
5282
5283 namespace test_uniform_initialization
5284 {
5285
5286 struct test
5287 {
5288 static const int zero {};
5289 static const int one {1};
5290 };
5291
5292 static_assert(test::zero == 0, "");
5293 static_assert(test::one == 1, "");
5294
5295 }
5296
5297 namespace test_lambdas
5298 {
5299
5300 void
5301 test1()
5302 {
5303 auto lambda1 = [](){};
5304 auto lambda2 = lambda1;
5305 lambda1();
5306 lambda2();
5307 }
5308
5309 int
5310 test2()
5311 {
5312 auto a = [](int i, int j){ return i + j; }(1, 2);
5313 auto b = []() -> int { return '0'; }();
5314 auto c = [=](){ return a + b; }();
5315 auto d = [&](){ return c; }();
5316 auto e = [a, &b](int x) mutable {
5317 const auto identity = [](int y){ return y; };
5318 for (auto i = 0; i < a; ++i)
5319 a += b--;
5320 return x + identity(a + b);
5321 }(0);
5322 return a + b + c + d + e;
5323 }
5324
5325 int
5326 test3()
5327 {
5328 const auto nullary = [](){ return 0; };
5329 const auto unary = [](int x){ return x; };
5330 using nullary_t = decltype(nullary);
5331 using unary_t = decltype(unary);
5332 const auto higher1st = [](nullary_t f){ return f(); };
5333 const auto higher2nd = [unary](nullary_t f1){
5334 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5335 };
5336 return higher1st(nullary) + higher2nd(nullary)(unary);
5337 }
5338
5339 }
5340
5341 namespace test_variadic_templates
5342 {
5343
5344 template <int...>
5345 struct sum;
5346
5347 template <int N0, int... N1toN>
5348 struct sum<N0, N1toN...>
5349 {
5350 static constexpr auto value = N0 + sum<N1toN...>::value;
5351 };
5352
5353 template <>
5354 struct sum<>
5355 {
5356 static constexpr auto value = 0;
5357 };
5358
5359 static_assert(sum<>::value == 0, "");
5360 static_assert(sum<1>::value == 1, "");
5361 static_assert(sum<23>::value == 23, "");
5362 static_assert(sum<1, 2>::value == 3, "");
5363 static_assert(sum<5, 5, 11>::value == 21, "");
5364 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5365
5366 }
5367
5368 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5369 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5370 // because of this.
5371 namespace test_template_alias_sfinae
5372 {
5373
5374 struct foo {};
5375
5376 template<typename T>
5377 using member = typename T::member_type;
5378
5379 template<typename T>
5380 void func(...) {}
5381
5382 template<typename T>
5383 void func(member<T>*) {}
5384
5385 void test();
5386
5387 void test() { func<foo>(0); }
5388
5389 }
5390
5391} // namespace cxx11
5392
5393#endif // __cplusplus >= 201103L
5394
5395
5396
5397_ACEOF
5398if ac_fn_cxx_try_compile "$LINENO"; then :
5399 ax_cv_cxx_compile_cxx11=yes
5400else
5401 ax_cv_cxx_compile_cxx11=no
5402fi
5403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5404fi
5405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5406$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5407 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5408 ac_success=yes
5409 fi
5410
5411 if test x$ac_success = xno; then
41260ac2
SM
5412 for alternative in ${ax_cxx_compile_alternatives}; do
5413 switch="-std=gnu++${alternative}"
0bcda685
PA
5414 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5416$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5417if eval \${$cachevar+:} false; then :
0bcda685
PA
5418 $as_echo_n "(cached) " >&6
5419else
5420 ac_save_CXX="$CXX"
5421 CXX="$CXX $switch"
5422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5423/* end confdefs.h. */
5424
5425
5426// If the compiler admits that it is not ready for C++11, why torture it?
5427// Hopefully, this will speed up the test.
5428
5429#ifndef __cplusplus
5430
5431#error "This is not a C++ compiler"
5432
5433#elif __cplusplus < 201103L
5434
5435#error "This is not a C++11 compiler"
5436
5437#else
5438
5439namespace cxx11
5440{
5441
5442 namespace test_static_assert
5443 {
5444
5445 template <typename T>
5446 struct check
5447 {
5448 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5449 };
5450
5451 }
5452
5453 namespace test_final_override
5454 {
5455
5456 struct Base
5457 {
5458 virtual void f() {}
5459 };
5460
5461 struct Derived : public Base
5462 {
5463 virtual void f() override {}
5464 };
5465
5466 }
5467
5468 namespace test_double_right_angle_brackets
5469 {
5470
5471 template < typename T >
5472 struct check {};
5473
5474 typedef check<void> single_type;
5475 typedef check<check<void>> double_type;
5476 typedef check<check<check<void>>> triple_type;
5477 typedef check<check<check<check<void>>>> quadruple_type;
5478
5479 }
5480
5481 namespace test_decltype
5482 {
5483
5484 int
5485 f()
5486 {
5487 int a = 1;
5488 decltype(a) b = 2;
5489 return a + b;
5490 }
5491
5492 }
5493
5494 namespace test_type_deduction
5495 {
5496
5497 template < typename T1, typename T2 >
5498 struct is_same
5499 {
5500 static const bool value = false;
5501 };
5502
5503 template < typename T >
5504 struct is_same<T, T>
5505 {
5506 static const bool value = true;
5507 };
5508
5509 template < typename T1, typename T2 >
5510 auto
5511 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5512 {
5513 return a1 + a2;
5514 }
5515
5516 int
5517 test(const int c, volatile int v)
5518 {
5519 static_assert(is_same<int, decltype(0)>::value == true, "");
5520 static_assert(is_same<int, decltype(c)>::value == false, "");
5521 static_assert(is_same<int, decltype(v)>::value == false, "");
5522 auto ac = c;
5523 auto av = v;
5524 auto sumi = ac + av + 'x';
5525 auto sumf = ac + av + 1.0;
5526 static_assert(is_same<int, decltype(ac)>::value == true, "");
5527 static_assert(is_same<int, decltype(av)>::value == true, "");
5528 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5529 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5530 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5531 return (sumf > 0.0) ? sumi : add(c, v);
5532 }
5533
5534 }
5535
5536 namespace test_noexcept
5537 {
5538
5539 int f() { return 0; }
5540 int g() noexcept { return 0; }
5541
5542 static_assert(noexcept(f()) == false, "");
5543 static_assert(noexcept(g()) == true, "");
5544
5545 }
5546
5547 namespace test_constexpr
5548 {
5549
5550 template < typename CharT >
5551 unsigned long constexpr
5552 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5553 {
5554 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5555 }
5556
5557 template < typename CharT >
5558 unsigned long constexpr
5559 strlen_c(const CharT *const s) noexcept
5560 {
5561 return strlen_c_r(s, 0UL);
5562 }
5563
5564 static_assert(strlen_c("") == 0UL, "");
5565 static_assert(strlen_c("1") == 1UL, "");
5566 static_assert(strlen_c("example") == 7UL, "");
5567 static_assert(strlen_c("another\0example") == 7UL, "");
5568
5569 }
5570
5571 namespace test_rvalue_references
5572 {
5573
5574 template < int N >
5575 struct answer
5576 {
5577 static constexpr int value = N;
5578 };
5579
5580 answer<1> f(int&) { return answer<1>(); }
5581 answer<2> f(const int&) { return answer<2>(); }
5582 answer<3> f(int&&) { return answer<3>(); }
5583
5584 void
5585 test()
5586 {
5587 int i = 0;
5588 const int c = 0;
5589 static_assert(decltype(f(i))::value == 1, "");
5590 static_assert(decltype(f(c))::value == 2, "");
5591 static_assert(decltype(f(0))::value == 3, "");
5592 }
5593
5594 }
5595
5596 namespace test_uniform_initialization
5597 {
5598
5599 struct test
5600 {
5601 static const int zero {};
5602 static const int one {1};
5603 };
5604
5605 static_assert(test::zero == 0, "");
5606 static_assert(test::one == 1, "");
5607
5608 }
5609
5610 namespace test_lambdas
5611 {
5612
5613 void
5614 test1()
5615 {
5616 auto lambda1 = [](){};
5617 auto lambda2 = lambda1;
5618 lambda1();
5619 lambda2();
5620 }
5621
5622 int
5623 test2()
5624 {
5625 auto a = [](int i, int j){ return i + j; }(1, 2);
5626 auto b = []() -> int { return '0'; }();
5627 auto c = [=](){ return a + b; }();
5628 auto d = [&](){ return c; }();
5629 auto e = [a, &b](int x) mutable {
5630 const auto identity = [](int y){ return y; };
5631 for (auto i = 0; i < a; ++i)
5632 a += b--;
5633 return x + identity(a + b);
5634 }(0);
5635 return a + b + c + d + e;
5636 }
5637
5638 int
5639 test3()
5640 {
5641 const auto nullary = [](){ return 0; };
5642 const auto unary = [](int x){ return x; };
5643 using nullary_t = decltype(nullary);
5644 using unary_t = decltype(unary);
5645 const auto higher1st = [](nullary_t f){ return f(); };
5646 const auto higher2nd = [unary](nullary_t f1){
5647 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5648 };
5649 return higher1st(nullary) + higher2nd(nullary)(unary);
5650 }
5651
5652 }
5653
5654 namespace test_variadic_templates
5655 {
5656
5657 template <int...>
5658 struct sum;
5659
5660 template <int N0, int... N1toN>
5661 struct sum<N0, N1toN...>
5662 {
5663 static constexpr auto value = N0 + sum<N1toN...>::value;
5664 };
5665
5666 template <>
5667 struct sum<>
5668 {
5669 static constexpr auto value = 0;
5670 };
5671
5672 static_assert(sum<>::value == 0, "");
5673 static_assert(sum<1>::value == 1, "");
5674 static_assert(sum<23>::value == 23, "");
5675 static_assert(sum<1, 2>::value == 3, "");
5676 static_assert(sum<5, 5, 11>::value == 21, "");
5677 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5678
5679 }
5680
5681 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5682 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5683 // because of this.
5684 namespace test_template_alias_sfinae
5685 {
5686
5687 struct foo {};
5688
5689 template<typename T>
5690 using member = typename T::member_type;
5691
5692 template<typename T>
5693 void func(...) {}
5694
5695 template<typename T>
5696 void func(member<T>*) {}
5697
5698 void test();
5699
5700 void test() { func<foo>(0); }
5701
5702 }
5703
5704} // namespace cxx11
5705
5706#endif // __cplusplus >= 201103L
5707
5708
5709
5710_ACEOF
5711if ac_fn_cxx_try_compile "$LINENO"; then :
5712 eval $cachevar=yes
5713else
5714 eval $cachevar=no
5715fi
5716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5717 CXX="$ac_save_CXX"
5718fi
5719eval ac_res=\$$cachevar
5720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5721$as_echo "$ac_res" >&6; }
5722 if eval test x\$$cachevar = xyes; then
5723 CXX_DIALECT="$switch"
5724 ac_success=yes
5725 break
5726 fi
5727 done
5728 fi
5729
5730 if test x$ac_success = xno; then
41260ac2
SM
5731 for alternative in ${ax_cxx_compile_alternatives}; do
5732 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5733 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5735$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5736if eval \${$cachevar+:} false; then :
0bcda685
PA
5737 $as_echo_n "(cached) " >&6
5738else
5739 ac_save_CXX="$CXX"
41260ac2
SM
5740 CXX="$CXX $switch"
5741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5742/* end confdefs.h. */
5743
5744
5745// If the compiler admits that it is not ready for C++11, why torture it?
5746// Hopefully, this will speed up the test.
5747
5748#ifndef __cplusplus
5749
5750#error "This is not a C++ compiler"
5751
5752#elif __cplusplus < 201103L
5753
5754#error "This is not a C++11 compiler"
5755
5756#else
5757
5758namespace cxx11
5759{
5760
5761 namespace test_static_assert
5762 {
5763
5764 template <typename T>
5765 struct check
5766 {
5767 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5768 };
5769
5770 }
5771
5772 namespace test_final_override
5773 {
5774
5775 struct Base
5776 {
5777 virtual void f() {}
5778 };
5779
5780 struct Derived : public Base
5781 {
5782 virtual void f() override {}
5783 };
5784
5785 }
5786
5787 namespace test_double_right_angle_brackets
5788 {
5789
5790 template < typename T >
5791 struct check {};
5792
5793 typedef check<void> single_type;
5794 typedef check<check<void>> double_type;
5795 typedef check<check<check<void>>> triple_type;
5796 typedef check<check<check<check<void>>>> quadruple_type;
5797
5798 }
5799
5800 namespace test_decltype
5801 {
5802
5803 int
5804 f()
5805 {
5806 int a = 1;
5807 decltype(a) b = 2;
5808 return a + b;
5809 }
5810
5811 }
5812
5813 namespace test_type_deduction
5814 {
5815
5816 template < typename T1, typename T2 >
5817 struct is_same
5818 {
5819 static const bool value = false;
5820 };
5821
5822 template < typename T >
5823 struct is_same<T, T>
5824 {
5825 static const bool value = true;
5826 };
5827
5828 template < typename T1, typename T2 >
5829 auto
5830 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5831 {
5832 return a1 + a2;
5833 }
5834
5835 int
5836 test(const int c, volatile int v)
5837 {
5838 static_assert(is_same<int, decltype(0)>::value == true, "");
5839 static_assert(is_same<int, decltype(c)>::value == false, "");
5840 static_assert(is_same<int, decltype(v)>::value == false, "");
5841 auto ac = c;
5842 auto av = v;
5843 auto sumi = ac + av + 'x';
5844 auto sumf = ac + av + 1.0;
5845 static_assert(is_same<int, decltype(ac)>::value == true, "");
5846 static_assert(is_same<int, decltype(av)>::value == true, "");
5847 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5848 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5849 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5850 return (sumf > 0.0) ? sumi : add(c, v);
5851 }
5852
5853 }
5854
5855 namespace test_noexcept
5856 {
5857
5858 int f() { return 0; }
5859 int g() noexcept { return 0; }
5860
5861 static_assert(noexcept(f()) == false, "");
5862 static_assert(noexcept(g()) == true, "");
5863
5864 }
5865
5866 namespace test_constexpr
5867 {
5868
5869 template < typename CharT >
5870 unsigned long constexpr
5871 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5872 {
5873 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5874 }
5875
5876 template < typename CharT >
5877 unsigned long constexpr
5878 strlen_c(const CharT *const s) noexcept
5879 {
5880 return strlen_c_r(s, 0UL);
5881 }
5882
5883 static_assert(strlen_c("") == 0UL, "");
5884 static_assert(strlen_c("1") == 1UL, "");
5885 static_assert(strlen_c("example") == 7UL, "");
5886 static_assert(strlen_c("another\0example") == 7UL, "");
5887
5888 }
5889
5890 namespace test_rvalue_references
5891 {
5892
5893 template < int N >
5894 struct answer
5895 {
5896 static constexpr int value = N;
5897 };
5898
5899 answer<1> f(int&) { return answer<1>(); }
5900 answer<2> f(const int&) { return answer<2>(); }
5901 answer<3> f(int&&) { return answer<3>(); }
5902
5903 void
5904 test()
5905 {
5906 int i = 0;
5907 const int c = 0;
5908 static_assert(decltype(f(i))::value == 1, "");
5909 static_assert(decltype(f(c))::value == 2, "");
5910 static_assert(decltype(f(0))::value == 3, "");
5911 }
5912
5913 }
5914
5915 namespace test_uniform_initialization
5916 {
5917
5918 struct test
5919 {
5920 static const int zero {};
5921 static const int one {1};
5922 };
5923
5924 static_assert(test::zero == 0, "");
5925 static_assert(test::one == 1, "");
5926
5927 }
5928
5929 namespace test_lambdas
5930 {
5931
5932 void
5933 test1()
5934 {
5935 auto lambda1 = [](){};
5936 auto lambda2 = lambda1;
5937 lambda1();
5938 lambda2();
5939 }
5940
5941 int
5942 test2()
5943 {
5944 auto a = [](int i, int j){ return i + j; }(1, 2);
5945 auto b = []() -> int { return '0'; }();
5946 auto c = [=](){ return a + b; }();
5947 auto d = [&](){ return c; }();
5948 auto e = [a, &b](int x) mutable {
5949 const auto identity = [](int y){ return y; };
5950 for (auto i = 0; i < a; ++i)
5951 a += b--;
5952 return x + identity(a + b);
5953 }(0);
5954 return a + b + c + d + e;
5955 }
5956
5957 int
5958 test3()
5959 {
5960 const auto nullary = [](){ return 0; };
5961 const auto unary = [](int x){ return x; };
5962 using nullary_t = decltype(nullary);
5963 using unary_t = decltype(unary);
5964 const auto higher1st = [](nullary_t f){ return f(); };
5965 const auto higher2nd = [unary](nullary_t f1){
5966 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5967 };
5968 return higher1st(nullary) + higher2nd(nullary)(unary);
5969 }
5970
5971 }
5972
5973 namespace test_variadic_templates
5974 {
5975
5976 template <int...>
5977 struct sum;
5978
5979 template <int N0, int... N1toN>
5980 struct sum<N0, N1toN...>
5981 {
5982 static constexpr auto value = N0 + sum<N1toN...>::value;
5983 };
5984
5985 template <>
5986 struct sum<>
5987 {
5988 static constexpr auto value = 0;
5989 };
5990
5991 static_assert(sum<>::value == 0, "");
5992 static_assert(sum<1>::value == 1, "");
5993 static_assert(sum<23>::value == 23, "");
5994 static_assert(sum<1, 2>::value == 3, "");
5995 static_assert(sum<5, 5, 11>::value == 21, "");
5996 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5997
5998 }
5999
6000 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6001 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6002 // because of this.
6003 namespace test_template_alias_sfinae
6004 {
6005
6006 struct foo {};
6007
6008 template<typename T>
6009 using member = typename T::member_type;
6010
6011 template<typename T>
6012 void func(...) {}
6013
6014 template<typename T>
6015 void func(member<T>*) {}
6016
6017 void test();
6018
6019 void test() { func<foo>(0); }
6020
6021 }
6022
6023} // namespace cxx11
6024
6025#endif // __cplusplus >= 201103L
6026
6027
6028
6029_ACEOF
6030if ac_fn_cxx_try_compile "$LINENO"; then :
6031 eval $cachevar=yes
6032else
6033 eval $cachevar=no
6034fi
6035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6036 CXX="$ac_save_CXX"
0bcda685
PA
6037fi
6038eval ac_res=\$$cachevar
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6040$as_echo "$ac_res" >&6; }
41260ac2
SM
6041 if eval test x\$$cachevar = xyes; then
6042 CXX_DIALECT="$switch"
6043 ac_success=yes
6044 break
6045 fi
6046 done
6047 if test x$ac_success = xyes; then
0bcda685
PA
6048 break
6049 fi
6050 done
6051 fi
6052 ac_ext=c
6053ac_cpp='$CPP $CPPFLAGS'
6054ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6055ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6056ac_compiler_gnu=$ac_cv_c_compiler_gnu
6057
6058 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6059 if test x$ac_success = xno; then
d0ac1c44 6060 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6061 fi
6062 fi
6063 if test x$ac_success = xno; then
6064 HAVE_CXX11=0
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6066$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6067 else
6068 HAVE_CXX11=1
6069
6070$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6071
6072 fi
6073
6074
6075
6076
a417dc56
RW
6077# Dependency checking.
6078rm -rf .tst 2>/dev/null
6079mkdir .tst 2>/dev/null
6080if test -d .tst; then
6081 am__leading_dot=.
6082else
6083 am__leading_dot=_
6084fi
6085rmdir .tst 2>/dev/null
6086
6087DEPDIR="${am__leading_dot}deps"
6088
81ecdfbb 6089ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6090
6091
6092depcc="$CC" am_compiler_list=
6093
6094am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6096$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6097if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6098 $as_echo_n "(cached) " >&6
a417dc56
RW
6099else
6100 if test -f "$am_depcomp"; then
6101 # We make a subdir and do the tests there. Otherwise we can end up
6102 # making bogus files that we don't know about and never remove. For
6103 # instance it was reported that on HP-UX the gcc test will end up
6104 # making a dummy file named `D' -- because `-MD' means `put the output
6105 # in D'.
6106 mkdir conftest.dir
6107 # Copy depcomp to subdir because otherwise we won't find it if we're
6108 # using a relative directory.
6109 cp "$am_depcomp" conftest.dir
6110 cd conftest.dir
6111 # We will build objects and dependencies in a subdirectory because
6112 # it helps to detect inapplicable dependency modes. For instance
6113 # both Tru64's cc and ICC support -MD to output dependencies as a
6114 # side effect of compilation, but ICC will put the dependencies in
6115 # the current directory while Tru64 will put them in the object
6116 # directory.
6117 mkdir sub
6118
6119 am_cv_CC_dependencies_compiler_type=none
6120 if test "$am_compiler_list" = ""; then
6121 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6122 fi
6123 for depmode in $am_compiler_list; do
6124 if test $depmode = none; then break; fi
6125
81ecdfbb 6126 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6127 # Setup a source with many dependencies, because some compilers
6128 # like to wrap large dependency lists on column 80 (with \), and
6129 # we should not choose a depcomp mode which is confused by this.
6130 #
6131 # We need to recreate these files for each test, as the compiler may
6132 # overwrite some of them when testing with obscure command lines.
6133 # This happens at least with the AIX C compiler.
6134 : > sub/conftest.c
6135 for i in 1 2 3 4 5 6; do
6136 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6137 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6138 # Solaris 8's {/usr,}/bin/sh.
6139 touch sub/conftst$i.h
6140 done
6141 echo "include sub/conftest.Po" > confmf
6142
6143 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6144 # mode. It turns out that the SunPro C++ compiler does not properly
6145 # handle `-M -o', and we need to detect this.
6146 depcmd="depmode=$depmode \
6147 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6148 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6149 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6150 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6151 if env $depcmd > conftest.err 2>&1 &&
6152 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6153 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6154 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6155 # icc doesn't choke on unknown options, it will just issue warnings
6156 # or remarks (even with -Werror). So we grep stderr for any message
6157 # that says an option was ignored or not supported.
6158 # When given -MP, icc 7.0 and 7.1 complain thusly:
6159 # icc: Command line warning: ignoring option '-M'; no argument required
6160 # The diagnosis changed in icc 8.0:
6161 # icc: Command line remark: option '-MP' not supported
6162 if (grep 'ignoring option' conftest.err ||
6163 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6164 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6165 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6166 break
6167 fi
6168 fi
81ecdfbb 6169 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6170 sed -e 's/^/| /' < conftest.err >&5
6171 done
6172
6173 cd ..
6174 rm -rf conftest.dir
6175else
6176 am_cv_CC_dependencies_compiler_type=none
6177fi
6178
6179fi
81ecdfbb
RW
6180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6181$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6182if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6183then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6184else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6185
6186fi
6187
6188
648d586d
JB
6189gnulib_extra_configure_args=
6190# If large-file support is disabled, make sure gnulib does the same.
6191if test "$enable_largefile" = no; then
6192gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6193fi
6194
c971b7fa
PA
6195# Configure gnulib. We need to build gnulib under some other
6196# directory not "gnulib", to avoid the problem of both GDB and
6197# GDBserver wanting to build it in the same directory, when building
6198# in the source dir.
783e057b 6199
c971b7fa
PA
6200 in_src="gnulib"
6201 in_build="build-gnulib"
648d586d 6202 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6203
6204 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6205 # so they do not pile up.
6206 ac_sub_configure_args=
6207 ac_prev=
6208 eval "set x $ac_configure_args"
6209 shift
6210 for ac_arg
6211 do
6212 if test -n "$ac_prev"; then
6213 ac_prev=
6214 continue
6215 fi
6216 case $ac_arg in
6217 -cache-file | --cache-file | --cache-fil | --cache-fi \
6218 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6219 ac_prev=cache_file ;;
6220 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6221 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6222 | --c=*)
6223 ;;
6224 --config-cache | -C)
6225 ;;
6226 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6227 ac_prev=srcdir ;;
6228 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6229 ;;
6230 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6231 ac_prev=prefix ;;
6232 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6233 ;;
6234 --disable-option-checking)
6235 ;;
6236 *)
6237 case $ac_arg in
6238 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6239 esac
6240 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6241 esac
6242 done
6243
6244 # Always prepend --prefix to ensure using the same prefix
6245 # in subdir configurations.
6246 ac_arg="--prefix=$prefix"
6247 case $ac_arg in
6248 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6249 esac
6250 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6251
6252 # Pass --silent
6253 if test "$silent" = yes; then
6254 ac_sub_configure_args="--silent $ac_sub_configure_args"
6255 fi
6256
6257 # Always prepend --disable-option-checking to silence warnings, since
6258 # different subdirs can have different --enable and --with options.
6259 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6260
6261 ac_popdir=`pwd`
6262 ac_dir=$in_build
6263
6264 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6265 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6266 $as_echo "$ac_msg" >&6
6267 as_dir="$ac_dir"; as_fn_mkdir_p
6268
38ea300a
PA
6269 case $srcdir in
6270 [\\/]* | ?:[\\/]* )
6271 ac_srcdir=$srcdir/$in_src ;;
6272 *) # Relative name.
6273 ac_srcdir=../$srcdir/$in_src ;;
6274 esac
c971b7fa
PA
6275
6276 cd "$ac_dir"
6277
6278 ac_sub_configure=$ac_srcdir/configure
6279
6280 # Make the cache file name correct relative to the subdirectory.
6281 case $cache_file in
6282 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6283 *) # Relative name.
6284 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6285 esac
6286
648d586d
JB
6287 if test -n "$in_extra_args"; then
6288 # Add the extra args at the end.
6289 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6290 fi
6291
c971b7fa
PA
6292 { $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
6293$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6294 # The eval makes quoting arguments work.
6295 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6296 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 6297 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c971b7fa
PA
6298
6299 cd "$ac_popdir"
783e057b 6300
c971b7fa
PA
6301
6302
6303CONFIG_OBS=
6304CONFIG_DEPS=
6305CONFIG_SRCS=
6306ENABLE_CFLAGS=
6307
6308CONFIG_ALL=
6309CONFIG_CLEAN=
6310CONFIG_INSTALL=
6311CONFIG_UNINSTALL=
6312
6313# If we haven't got the data from the intl directory,
6314# assume NLS is disabled.
6315USE_NLS=no
6316LIBINTL=
6317LIBINTL_DEP=
6318INCINTL=
6319XGETTEXT=
6320GMSGFMT=
6321POSUB=
783e057b
DJ
6322
6323if test -f ../intl/config.intl; then
6324 . ../intl/config.intl
6325fi
81ecdfbb
RW
6326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6327$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6328if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6330$as_echo "no" >&6; }
783e057b 6331else
81ecdfbb
RW
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6333$as_echo "yes" >&6; }
783e057b 6334
81ecdfbb 6335$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6336
6337
81ecdfbb
RW
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6339$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6340 # Look for .po and .gmo files in the source directory.
6341 CATALOGS=
6342 XLINGUAS=
6343 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6344 # If there aren't any .gmo files the shell will give us the
6345 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6346 # weeded out.
6347 case "$cat" in *\**)
6348 continue;;
6349 esac
6350 # The quadruple backslash is collapsed to a double backslash
6351 # by the backticks, then collapsed again by the double quotes,
6352 # leaving us with one backslash in the sed expression (right
6353 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6354 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6355 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6356 # The user is allowed to set LINGUAS to a list of languages to
6357 # install catalogs for. If it's empty that means "all of them."
6358 if test "x$LINGUAS" = x; then
6359 CATALOGS="$CATALOGS $cat"
6360 XLINGUAS="$XLINGUAS $lang"
6361 else
6362 case "$LINGUAS" in *$lang*)
6363 CATALOGS="$CATALOGS $cat"
6364 XLINGUAS="$XLINGUAS $lang"
6365 ;;
6366 esac
e28b3332
DJ
6367 fi
6368 done
c971b7fa
PA
6369 LINGUAS="$XLINGUAS"
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6371$as_echo "$LINGUAS" >&6; }
6372
6373
6374 DATADIRNAME=share
6375
6376 INSTOBJEXT=.mo
6377
6378 GENCAT=gencat
6379
6380 CATOBJEXT=.gmo
e28b3332 6381
e28b3332
DJ
6382fi
6383
c971b7fa
PA
6384localedir='${datadir}/locale'
6385
6386
6387if test x"$USE_NLS" = xyes; then
6388 CONFIG_ALL="$CONFIG_ALL all-po"
6389 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6390 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6391 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6392fi
e28b3332 6393
c971b7fa
PA
6394GNULIB=build-gnulib/import
6395
6396# For Makefile dependencies.
6397GNULIB_STDINT_H=
6398if test x"$STDINT_H" != x; then
6399 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
6400fi
6401
6402
c971b7fa
PA
6403PACKAGE=gdb
6404
6405cat >>confdefs.h <<_ACEOF
6406#define PACKAGE "$PACKAGE"
6407_ACEOF
6408
6409
6410
6411# We never need to detect it in this sub-configure.
6412# But preserve it for config.status --recheck.
6413
6414
6415
6416MAKEINFO_EXTRA_FLAGS=""
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6418$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6419if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6420 $as_echo_n "(cached) " >&6
6421else
6422 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6423 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6424 gdb_cv_have_makeinfo_click=yes
6425 else
6426 gdb_cv_have_makeinfo_click=no
6427 fi
6428fi
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6430$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6431if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6432 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6433fi
e28b3332
DJ
6434
6435
bec39cab
AC
6436
6437
81ecdfbb
RW
6438# Check whether --with-separate-debug-dir was given.
6439if test "${with_separate_debug_dir+set}" = set; then :
6440 withval=$with_separate_debug_dir;
b14b1491
TT
6441 DEBUGDIR=$withval
6442else
6443 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6444fi
6445
20e95c23 6446
783e057b
DJ
6447 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6448 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6449 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6450 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6451
783e057b
DJ
6452cat >>confdefs.h <<_ACEOF
6453#define DEBUGDIR "$ac_define_dir"
20e95c23 6454_ACEOF
20e95c23 6455
20e95c23 6456
20e95c23 6457
0c4a4063 6458
b14b1491
TT
6459 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6460 if test "x$prefix" = xNONE; then
6461 test_prefix=/usr/local
6462 else
6463 test_prefix=$prefix
6464 fi
783e057b 6465 else
b14b1491 6466 test_prefix=$exec_prefix
783e057b 6467 fi
b14b1491
TT
6468 value=0
6469 case ${ac_define_dir} in
6470 "${test_prefix}"|"${test_prefix}/"*|\
6471 '${exec_prefix}'|'${exec_prefix}/'*)
6472 value=1
6473 ;;
6474 esac
6475
6476cat >>confdefs.h <<_ACEOF
6477#define DEBUGDIR_RELOCATABLE $value
6478_ACEOF
6479
6480
6481
0c4a4063 6482
f83d8a90
DE
6483# We can't pass paths as command line arguments.
6484# Mingw32 tries to be clever and will convert the paths for us.
6485# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6486# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6487# This breaks GDB's relocatable path conversions since paths passed in
6488# config.h would not get so translated, the path prefixes no longer match.
6489
6490 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6491 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6492 ac_define_dir=`eval echo $bindir`
6493 ac_define_dir=`eval echo $ac_define_dir`
6494
6495cat >>confdefs.h <<_ACEOF
6496#define BINDIR "$ac_define_dir"
6497_ACEOF
6498
6499
6500
b14b1491
TT
6501# GDB's datadir relocation
6502
6503
6504
81ecdfbb
RW
6505# Check whether --with-gdb-datadir was given.
6506if test "${with_gdb_datadir+set}" = set; then :
6507 withval=$with_gdb_datadir;
b14b1491 6508 GDB_DATADIR=$withval
20e95c23 6509else
b14b1491 6510 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6511fi
6512
20e95c23 6513
b14b1491
TT
6514 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6515 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6516 ac_define_dir=`eval echo $GDB_DATADIR`
6517 ac_define_dir=`eval echo $ac_define_dir`
6518
6519cat >>confdefs.h <<_ACEOF
6520#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6521_ACEOF
6522
b14b1491
TT
6523
6524
0c4a4063 6525
b14b1491
TT
6526 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6527 if test "x$prefix" = xNONE; then
6528 test_prefix=/usr/local
6529 else
6530 test_prefix=$prefix
6531 fi
6532 else
6533 test_prefix=$exec_prefix
6534 fi
6535 value=0
6536 case ${ac_define_dir} in
6537 "${test_prefix}"|"${test_prefix}/"*|\
6538 '${exec_prefix}'|'${exec_prefix}/'*)
6539 value=1
6540 ;;
6541 esac
6542
6543cat >>confdefs.h <<_ACEOF
6544#define GDB_DATADIR_RELOCATABLE $value
6545_ACEOF
6546
6547
783e057b 6548
20e95c23 6549
0c4a4063 6550
81ecdfbb
RW
6551# Check whether --with-relocated-sources was given.
6552if test "${with_relocated_sources+set}" = set; then :
6553 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6554
6555 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6556 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6557 ac_define_dir=`eval echo $reloc_srcdir`
6558 ac_define_dir=`eval echo $ac_define_dir`
6559
6560cat >>confdefs.h <<_ACEOF
6561#define RELOC_SRCDIR "$ac_define_dir"
6562_ACEOF
6563
6564
6565
81ecdfbb
RW
6566fi
6567
29b0e8a2 6568
7349ff92
JK
6569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6570$as_echo_n "checking for default auto-load directory... " >&6; }
6571
6572# Check whether --with-auto-load-dir was given.
6573if test "${with_auto_load_dir+set}" = set; then :
6574 withval=$with_auto_load_dir;
6575else
1564a261 6576 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6577fi
6578
1564a261 6579escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6580
6581 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6582 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6583 ac_define_dir=`eval echo $escape_dir`
6584 ac_define_dir=`eval echo $ac_define_dir`
6585
6586cat >>confdefs.h <<_ACEOF
6587#define AUTO_LOAD_DIR "$ac_define_dir"
6588_ACEOF
6589
6590
6591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6592$as_echo "$with_auto_load_dir" >&6; }
6593
bccbefd2
JK
6594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6595$as_echo_n "checking for default auto-load safe-path... " >&6; }
6596
6597# Check whether --with-auto-load-safe-path was given.
6598if test "${with_auto_load_safe_path+set}" = set; then :
6599 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6600 with_auto_load_safe_path="/"
6601 fi
bccbefd2 6602else
7349ff92 6603 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6604fi
6605
1564a261 6606escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6607
6608 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6609 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6610 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6611 ac_define_dir=`eval echo $ac_define_dir`
6612
6613cat >>confdefs.h <<_ACEOF
6dea1fbd 6614#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6615_ACEOF
6616
6617
6618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6619$as_echo "$with_auto_load_safe_path" >&6; }
6620
29b0e8a2 6621
20e95c23 6622
5ae98d25 6623subdirs="$subdirs testsuite"
20e95c23
DJ
6624
6625
783e057b 6626# Check whether to support alternative target configurations
81ecdfbb
RW
6627# Check whether --enable-targets was given.
6628if test "${enable_targets+set}" = set; then :
6629 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6630 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6631 ;;
6632 no) enable_targets= ;;
6633 *) enable_targets=$enableval ;;
6634esac
81ecdfbb
RW
6635fi
6636
20e95c23 6637
783e057b 6638# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6639# Check whether --enable-64-bit-bfd was given.
6640if test "${enable_64_bit_bfd+set}" = set; then :
6641 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6642 yes) want64=true ;;
6643 no) want64=false ;;
d0ac1c44 6644 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6645esac
6646else
6647 want64=false
81ecdfbb
RW
6648fi
6649
783e057b
DJ
6650# Provide defaults for some variables set by the per-host and per-target
6651# configuration.
6652gdb_host_obs=posix-hdep.o
20e95c23 6653
783e057b
DJ
6654if test "${target}" = "${host}"; then
6655 gdb_native=yes
6656else
6657 gdb_native=no
6658fi
20e95c23 6659
783e057b 6660. $srcdir/configure.host
20e95c23 6661
fb23d554
SDJ
6662# Add in the common host objects.
6663. $srcdir/common/common.host
6664gdb_host_obs="$gdb_host_obs $common_host_obs"
6665
783e057b 6666# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6667
783e057b
DJ
6668TARGET_OBS=
6669all_targets=
b292c783 6670HAVE_NATIVE_GCORE_TARGET=
20e95c23 6671
783e057b 6672for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6673do
783e057b
DJ
6674 if test "$targ_alias" = "all"; then
6675 all_targets=true
6676 else
6677 # Canonicalize the secondary target names.
6678 result=`$ac_config_sub $targ_alias 2>/dev/null`
6679 if test -n "$result"; then
6680 targ=$result
6681 else
6682 targ=$targ_alias
6683 fi
20e95c23 6684
783e057b 6685 . ${srcdir}/configure.tgt
20e95c23 6686
bf307134 6687 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6688 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6689fi
6690
783e057b
DJ
6691 # Target-specific object files
6692 for i in ${gdb_target_obs}; do
6693 case " $TARGET_OBS " in
6694 *" ${i} "*) ;;
6695 *)
6696 TARGET_OBS="$TARGET_OBS ${i}"
6697 ;;
6698 esac
6699 done
20e95c23 6700
783e057b
DJ
6701 # Check whether this target needs 64-bit CORE_ADDR
6702 if test x${want64} = xfalse; then
6703 . ${srcdir}/../bfd/config.bfd
6704 fi
b292c783
JK
6705
6706 # Check whether this target is native and supports gcore.
6707 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6708 && $gdb_have_gcore; then
6709 HAVE_NATIVE_GCORE_TARGET=1
6710 fi
783e057b 6711 fi
20e95c23
DJ
6712done
6713
783e057b
DJ
6714if test x${all_targets} = xtrue; then
6715
6716 # We want all 64-bit targets if we either:
6717 # - run on a 64-bit host or
6718 # - already require 64-bit support for some other target or
6719 # - the --enable-64-bit-bfd option was supplied
6720 # Otherwise we only support all 32-bit targets.
6721 #
6722 # NOTE: This test must be in sync with the corresponding
6723 # tests in BFD!
20e95c23 6724
783e057b 6725 if test x${want64} = xfalse; then
81ecdfbb
RW
6726 # The cast to long int works around a bug in the HP C Compiler
6727# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6728# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6729# This bug is HP SR number 8606223364.
6730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6731$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6732if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6733 $as_echo_n "(cached) " >&6
c0993dbe 6734else
81ecdfbb 6735 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6736
81ecdfbb
RW
6737else
6738 if test "$ac_cv_type_long" = yes; then
6739 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6741as_fn_error 77 "cannot compute sizeof (long)
6742See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6743 else
6744 ac_cv_sizeof_long=0
6745 fi
c0993dbe 6746fi
81ecdfbb 6747
c0993dbe 6748fi
81ecdfbb
RW
6749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6750$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6751
c0993dbe 6752
c0993dbe 6753
c0993dbe
UW
6754cat >>confdefs.h <<_ACEOF
6755#define SIZEOF_LONG $ac_cv_sizeof_long
6756_ACEOF
6757
6758
6759 if test "x${ac_cv_sizeof_long}" = "x8"; then
6760 want64=true
6761 fi
6762 fi
6763 if test x${want64} = xtrue; then
6764 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6765 else
6766 TARGET_OBS='$(ALL_TARGET_OBS)'
6767 fi
6768fi
6769
6770
6771
b292c783 6772
c0993dbe
UW
6773# For other settings, only the main target counts.
6774gdb_sim=
6775gdb_osabi=
6776build_gdbserver=
6777targ=$target; . ${srcdir}/configure.tgt
6778
6779# Fetch the default architecture and default target vector from BFD.
6780targ=$target; . $srcdir/../bfd/config.bfd
6781
6782# We only want the first architecture, so strip off the others if
6783# there is more than one.
6784targ_archs=`echo $targ_archs | sed 's/ .*//'`
6785
6786if test "x$targ_archs" != x; then
6787
6788cat >>confdefs.h <<_ACEOF
6789#define DEFAULT_BFD_ARCH $targ_archs
6790_ACEOF
6791
6792fi
6793if test "x$targ_defvec" != x; then
6794
6795cat >>confdefs.h <<_ACEOF
6796#define DEFAULT_BFD_VEC $targ_defvec
6797_ACEOF
6798
6799fi
6800
c0993dbe 6801# Enable MI.
81ecdfbb
RW
6802# Check whether --enable-gdbmi was given.
6803if test "${enable_gdbmi+set}" = set; then :
6804 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6805 yes | no)
6806 ;;
6807 *)
d0ac1c44 6808 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6809 esac
6810else
6811 enable_gdbmi=yes
81ecdfbb
RW
6812fi
6813
c0993dbe
UW
6814if test x"$enable_gdbmi" = xyes; then
6815 if test -d $srcdir/mi; then
6816 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6817 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6818 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6819 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6820 fi
6821fi
6822
6823# Enable TUI.
81ecdfbb
RW
6824# Check whether --enable-tui was given.
6825if test "${enable_tui+set}" = set; then :
6826 enableval=$enable_tui; case $enableval in
3ca64bd3 6827 yes | no | auto)
c0993dbe
UW
6828 ;;
6829 *)
d0ac1c44 6830 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6831 esac
6832else
3ca64bd3 6833 enable_tui=auto
81ecdfbb
RW
6834fi
6835
c0993dbe
UW
6836
6837# Enable gdbtk.
81ecdfbb
RW
6838# Check whether --enable-gdbtk was given.
6839if test "${enable_gdbtk+set}" = set; then :
6840 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6841 yes | no)
6842 ;;
6843 *)
d0ac1c44 6844 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6845 esac
6846else
5062cc19 6847 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6848 enable_gdbtk=yes
6849 else
6850 enable_gdbtk=no
6851 fi
81ecdfbb
RW
6852fi
6853
c0993dbe
UW
6854# We unconditionally disable gdbtk tests on selected platforms.
6855case $host_os in
6856 go32* | windows*)
81ecdfbb
RW
6857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6858$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6859 enable_gdbtk=no ;;
6860esac
6861
05e7c244 6862# Libunwind support for ia64.
bec39cab 6863
05e7c244
JK
6864
6865# Check whether --with-libunwind-ia64 was given.
6866if test "${with_libunwind_ia64+set}" = set; then :
6867 withval=$with_libunwind_ia64;
bec39cab 6868else
05e7c244
JK
6869 with_libunwind_ia64=auto
6870fi
bec39cab 6871
05e7c244
JK
6872
6873# Backward compatibility option.
6874if test "${with_libunwind+set}" = set; then
6875 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6876 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6877 fi
6878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6879$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6880 with_libunwind_ia64="$with_libunwind"
6881fi
6882
6883case "$with_libunwind_ia64" in
6884 yes | no)
6885 ;;
6886 auto)
6887 for ac_header in libunwind-ia64.h
81ecdfbb 6888do :
b54a8fd7 6889 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6890if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6891 cat >>confdefs.h <<_ACEOF
b54a8fd7 6892#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6893_ACEOF
6894
6895fi
6896
6897done
6898
05e7c244
JK
6899 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6900 ;;
6901 *)
d0ac1c44 6902 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6903 ;;
6904esac
bec39cab 6905
05e7c244 6906if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6907 for ac_header in libunwind-ia64.h
81ecdfbb 6908do :
b54a8fd7 6909 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6910if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6911 cat >>confdefs.h <<_ACEOF
b54a8fd7 6912#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6913_ACEOF
6914
6915fi
6916
6917done
6918
05e7c244 6919 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6920 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6921 fi
6922 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6923 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6924 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6925fi
6926
cb01cfba
JB
6927opt_curses=no
6928
81ecdfbb
RW
6929# Check whether --with-curses was given.
6930if test "${with_curses+set}" = set; then :
6931 withval=$with_curses; opt_curses=$withval
6932fi
6933
cb01cfba 6934
76a39ba7 6935prefer_curses=no
cb01cfba 6936if test "$opt_curses" = "yes"; then
76a39ba7 6937 prefer_curses=yes
cb01cfba
JB
6938fi
6939
a9322a30 6940# Profiling support.
81ecdfbb
RW
6941# Check whether --enable-profiling was given.
6942if test "${enable_profiling+set}" = set; then :
6943 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6944 yes | no)
6945 ;;
6946 *)
d0ac1c44 6947 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6948 esac
6949else
6950 enable_profiling=no
81ecdfbb 6951fi
bec39cab 6952
a9322a30
TT
6953
6954for ac_func in monstartup _mcleanup
81ecdfbb
RW
6955do :
6956 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6957ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6958if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6959 cat >>confdefs.h <<_ACEOF
6960#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6961_ACEOF
a9322a30 6962
81ecdfbb
RW
6963fi
6964done
a9322a30 6965
81ecdfbb
RW
6966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6967$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6968if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6969 $as_echo_n "(cached) " >&6
6970else
6971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6972/* end confdefs.h. */
6973#include <stdlib.h>
6974extern char _etext;
a9322a30
TT
6975
6976int
6977main ()
6978{
6979free (&_etext);
6980 ;
6981 return 0;
6982}
bec39cab 6983_ACEOF
81ecdfbb 6984if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6985 ac_cv_var__etext=yes
bec39cab 6986else
81ecdfbb 6987 ac_cv_var__etext=no
bec39cab 6988fi
81ecdfbb
RW
6989rm -f core conftest.err conftest.$ac_objext \
6990 conftest$ac_exeext conftest.$ac_ext
bec39cab 6991fi
81ecdfbb
RW
6992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6993$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6994if test $ac_cv_var__etext = yes; then
60ca704f 6995
81ecdfbb 6996$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6997
bec39cab 6998fi
81ecdfbb
RW
6999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7000$as_echo_n "checking for etext... " >&6; }
d0ac1c44 7001if ${ac_cv_var_etext+:} false; then :
81ecdfbb 7002 $as_echo_n "(cached) " >&6
bec39cab 7003else
81ecdfbb 7004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7005/* end confdefs.h. */
a9322a30
TT
7006#include <stdlib.h>
7007extern char etext;
bec39cab
AC
7008
7009int
7010main ()
7011{
a9322a30 7012free (&etext);
bec39cab
AC
7013 ;
7014 return 0;
7015}
7016_ACEOF
81ecdfbb 7017if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7018 ac_cv_var_etext=yes
bec39cab 7019else
81ecdfbb 7020 ac_cv_var_etext=no
bec39cab 7021fi
81ecdfbb
RW
7022rm -f core conftest.err conftest.$ac_objext \
7023 conftest$ac_exeext conftest.$ac_ext
bec39cab 7024fi
81ecdfbb
RW
7025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7026$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
7027if test $ac_cv_var_etext = yes; then
7028
81ecdfbb 7029$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7030
7031fi
a9322a30
TT
7032if test "$enable_profiling" = yes ; then
7033 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
d0ac1c44 7034 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7035 fi
7036 PROFILE_CFLAGS=-pg
7037 OLD_CFLAGS="$CFLAGS"
7038 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7039
81ecdfbb
RW
7040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7041$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7042if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7043 $as_echo_n "(cached) " >&6
bec39cab 7044else
81ecdfbb 7045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7046/* end confdefs.h. */
bec39cab
AC
7047
7048int
7049main ()
7050{
a9322a30 7051int x;
bec39cab
AC
7052 ;
7053 return 0;
7054}
7055_ACEOF
81ecdfbb 7056if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7057 ac_cv_cc_supports_pg=yes
bec39cab 7058else
81ecdfbb 7059 ac_cv_cc_supports_pg=no
bec39cab 7060fi
81ecdfbb 7061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7062fi
81ecdfbb
RW
7063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7064$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7065
a9322a30 7066 if test $ac_cv_cc_supports_pg = no; then
d0ac1c44 7067 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7068 fi
bec39cab 7069
a9322a30 7070 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7071fi
7072
44cee4fd
TT
7073CODESIGN_CERT=
7074# Check whether --enable-codesign was given.
7075if test "${enable_codesign+set}" = set; then :
7076 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7077fi
7078
7079
7080
c16158bc
JM
7081
7082
81ecdfbb
RW
7083# Check whether --with-pkgversion was given.
7084if test "${with_pkgversion+set}" = set; then :
7085 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7086 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7087 no) PKGVERSION= ;;
7088 *) PKGVERSION="($withval) " ;;
7089 esac
7090else
7091 PKGVERSION="(GDB) "
7092
81ecdfbb 7093fi
c16158bc
JM
7094
7095
7096
7097
81ecdfbb
RW
7098
7099# Check whether --with-bugurl was given.
7100if test "${with_bugurl+set}" = set; then :
7101 withval=$with_bugurl; case "$withval" in
d0ac1c44 7102 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7103 no) BUGURL=
7104 ;;
7105 *) BUGURL="$withval"
7106 ;;
7107 esac
7108else
7109 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7110
81ecdfbb
RW
7111fi
7112
c16158bc
JM
7113 case ${BUGURL} in
7114 "")
7115 REPORT_BUGS_TO=
7116 REPORT_BUGS_TEXI=
7117 ;;
7118 *)
7119 REPORT_BUGS_TO="<$BUGURL>"
7120 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7121 ;;
7122 esac;
7123
7124
7125
7126
7127cat >>confdefs.h <<_ACEOF
7128#define PKGVERSION "$PKGVERSION"
7129_ACEOF
7130
7131
7132cat >>confdefs.h <<_ACEOF
7133#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7134_ACEOF
7135
7136
bec39cab
AC
7137# --------------------- #
7138# Checks for programs. #
7139# --------------------- #
7140
7141for ac_prog in gawk mawk nawk awk
7142do
7143 # Extract the first word of "$ac_prog", so it can be a program name with args.
7144set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7146$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7147if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7148 $as_echo_n "(cached) " >&6
bec39cab
AC
7149else
7150 if test -n "$AWK"; then
7151 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7152else
7153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7154for as_dir in $PATH
7155do
7156 IFS=$as_save_IFS
7157 test -z "$as_dir" && as_dir=.
81ecdfbb 7158 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7159 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7160 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7162 break 2
7163 fi
7164done
81ecdfbb
RW
7165 done
7166IFS=$as_save_IFS
bec39cab
AC
7167
7168fi
7169fi
7170AWK=$ac_cv_prog_AWK
7171if test -n "$AWK"; then
81ecdfbb
RW
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7173$as_echo "$AWK" >&6; }
bec39cab 7174else
81ecdfbb
RW
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7176$as_echo "no" >&6; }
bec39cab
AC
7177fi
7178
bec39cab 7179
81ecdfbb 7180 test -n "$AWK" && break
bec39cab
AC
7181done
7182
c971b7fa
PA
7183# Find a good install program. We prefer a C program (faster),
7184# so one script is as good as another. But avoid the broken or
7185# incompatible versions:
7186# SysV /etc/install, /usr/sbin/install
7187# SunOS /usr/etc/install
7188# IRIX /sbin/install
7189# AIX /bin/install
7190# AmigaOS /C/install, which installs bootblocks on floppy discs
7191# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7192# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7193# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7194# OS/2's system install, which has a completely different semantic
7195# ./install, which can be erroneously created by make from ./install.sh.
7196# Reject install programs that cannot install multiple files.
7197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7198$as_echo_n "checking for a BSD-compatible install... " >&6; }
7199if test -z "$INSTALL"; then
d0ac1c44 7200if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7201 $as_echo_n "(cached) " >&6
7202else
7203 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7204for as_dir in $PATH
7205do
7206 IFS=$as_save_IFS
7207 test -z "$as_dir" && as_dir=.
7208 # Account for people who put trailing slashes in PATH elements.
7209case $as_dir/ in #((
7210 ./ | .// | /[cC]/* | \
7211 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7212 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7213 /usr/ucb/* ) ;;
7214 *)
7215 # OSF1 and SCO ODT 3.0 have their own names for install.
7216 # Don't use installbsd from OSF since it installs stuff as root
7217 # by default.
7218 for ac_prog in ginstall scoinst install; do
7219 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7220 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7221 if test $ac_prog = install &&
7222 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7223 # AIX install. It has an incompatible calling convention.
7224 :
7225 elif test $ac_prog = install &&
7226 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7227 # program-specific install script used by HP pwplus--don't use.
7228 :
7229 else
7230 rm -rf conftest.one conftest.two conftest.dir
7231 echo one > conftest.one
7232 echo two > conftest.two
7233 mkdir conftest.dir
7234 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7235 test -s conftest.one && test -s conftest.two &&
7236 test -s conftest.dir/conftest.one &&
7237 test -s conftest.dir/conftest.two
7238 then
7239 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7240 break 3
7241 fi
7242 fi
7243 fi
7244 done
7245 done
7246 ;;
7247esac
7248
7249 done
7250IFS=$as_save_IFS
7251
7252rm -rf conftest.one conftest.two conftest.dir
7253
7254fi
7255 if test "${ac_cv_path_install+set}" = set; then
7256 INSTALL=$ac_cv_path_install
7257 else
7258 # As a last resort, use the slow shell script. Don't cache a
7259 # value for INSTALL within a source directory, because that will
7260 # break other packages using the cache if that directory is
7261 # removed, or if the value is a relative name.
7262 INSTALL=$ac_install_sh
7263 fi
7264fi
7265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7266$as_echo "$INSTALL" >&6; }
7267
7268# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7269# It thinks the first close brace ends the variable substitution.
7270test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7271
7272test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7273
7274test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7275
81ecdfbb
RW
7276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7277$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7278LN_S=$as_ln_s
7279if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7281$as_echo "yes" >&6; }
bec39cab 7282else
81ecdfbb
RW
7283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7284$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7285fi
7286
7287if test -n "$ac_tool_prefix"; then
7288 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7289set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7291$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7292if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7293 $as_echo_n "(cached) " >&6
bec39cab
AC
7294else
7295 if test -n "$RANLIB"; then
7296 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7297else
7298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7299for as_dir in $PATH
7300do
7301 IFS=$as_save_IFS
7302 test -z "$as_dir" && as_dir=.
81ecdfbb 7303 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7304 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7305 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7307 break 2
7308 fi
7309done
81ecdfbb
RW
7310 done
7311IFS=$as_save_IFS
bec39cab
AC
7312
7313fi
7314fi
7315RANLIB=$ac_cv_prog_RANLIB
7316if test -n "$RANLIB"; then
81ecdfbb
RW
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7318$as_echo "$RANLIB" >&6; }
bec39cab 7319else
81ecdfbb
RW
7320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7321$as_echo "no" >&6; }
bec39cab
AC
7322fi
7323
81ecdfbb 7324
bec39cab
AC
7325fi
7326if test -z "$ac_cv_prog_RANLIB"; then
7327 ac_ct_RANLIB=$RANLIB
7328 # Extract the first word of "ranlib", so it can be a program name with args.
7329set dummy ranlib; ac_word=$2
81ecdfbb
RW
7330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7331$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7332if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7333 $as_echo_n "(cached) " >&6
bec39cab
AC
7334else
7335 if test -n "$ac_ct_RANLIB"; then
7336 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7337else
7338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7339for as_dir in $PATH
7340do
7341 IFS=$as_save_IFS
7342 test -z "$as_dir" && as_dir=.
81ecdfbb 7343 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7344 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7345 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7346 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7347 break 2
7348 fi
7349done
81ecdfbb
RW
7350 done
7351IFS=$as_save_IFS
bec39cab 7352
bec39cab
AC
7353fi
7354fi
7355ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7356if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7358$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7359else
81ecdfbb
RW
7360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7361$as_echo "no" >&6; }
bec39cab
AC
7362fi
7363
81ecdfbb
RW
7364 if test "x$ac_ct_RANLIB" = x; then
7365 RANLIB=":"
7366 else
7367 case $cross_compiling:$ac_tool_warned in
7368yes:)
7369{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7370$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7371ac_tool_warned=yes ;;
7372esac
7373 RANLIB=$ac_ct_RANLIB
7374 fi
bec39cab
AC
7375else
7376 RANLIB="$ac_cv_prog_RANLIB"
7377fi
7378
7379for ac_prog in 'bison -y' byacc
7380do
7381 # Extract the first word of "$ac_prog", so it can be a program name with args.
7382set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7384$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7385if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7386 $as_echo_n "(cached) " >&6
bec39cab
AC
7387else
7388 if test -n "$YACC"; then
7389 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7390else
7391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7392for as_dir in $PATH
7393do
7394 IFS=$as_save_IFS
7395 test -z "$as_dir" && as_dir=.
81ecdfbb 7396 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7397 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7398 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7400 break 2
7401 fi
7402done
81ecdfbb
RW
7403 done
7404IFS=$as_save_IFS
bec39cab
AC
7405
7406fi
7407fi
7408YACC=$ac_cv_prog_YACC
7409if test -n "$YACC"; then
81ecdfbb
RW
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7411$as_echo "$YACC" >&6; }
bec39cab 7412else
81ecdfbb
RW
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7414$as_echo "no" >&6; }
bec39cab
AC
7415fi
7416
81ecdfbb 7417
bec39cab
AC
7418 test -n "$YACC" && break
7419done
7420test -n "$YACC" || YACC="yacc"
7421
7422
7423if test -n "$ac_tool_prefix"; then
7424 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7425set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7427$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7428if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7429 $as_echo_n "(cached) " >&6
bec39cab
AC
7430else
7431 if test -n "$AR"; then
7432 ac_cv_prog_AR="$AR" # Let the user override the test.
7433else
7434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7435for as_dir in $PATH
7436do
7437 IFS=$as_save_IFS
7438 test -z "$as_dir" && as_dir=.
81ecdfbb 7439 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7440 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7441 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7442 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7443 break 2
7444 fi
7445done
81ecdfbb
RW
7446 done
7447IFS=$as_save_IFS
bec39cab
AC
7448
7449fi
7450fi
7451AR=$ac_cv_prog_AR
7452if test -n "$AR"; then
81ecdfbb
RW
7453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7454$as_echo "$AR" >&6; }
bec39cab 7455else
81ecdfbb
RW
7456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7457$as_echo "no" >&6; }
bec39cab
AC
7458fi
7459
81ecdfbb 7460
bec39cab
AC
7461fi
7462if test -z "$ac_cv_prog_AR"; then
7463 ac_ct_AR=$AR
7464 # Extract the first word of "ar", so it can be a program name with args.
7465set dummy ar; ac_word=$2
81ecdfbb
RW
7466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7467$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7468if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7469 $as_echo_n "(cached) " >&6
bec39cab
AC
7470else
7471 if test -n "$ac_ct_AR"; then
7472 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7473else
7474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7475for as_dir in $PATH
7476do
7477 IFS=$as_save_IFS
7478 test -z "$as_dir" && as_dir=.
81ecdfbb 7479 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7480 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7481 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7482 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7483 break 2
7484 fi
7485done
81ecdfbb
RW
7486 done
7487IFS=$as_save_IFS
bec39cab
AC
7488
7489fi
7490fi
7491ac_ct_AR=$ac_cv_prog_ac_ct_AR
7492if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7494$as_echo "$ac_ct_AR" >&6; }
bec39cab 7495else
81ecdfbb
RW
7496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7497$as_echo "no" >&6; }
bec39cab
AC
7498fi
7499
81ecdfbb
RW
7500 if test "x$ac_ct_AR" = x; then
7501 AR=""
7502 else
7503 case $cross_compiling:$ac_tool_warned in
7504yes:)
7505{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7506$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7507ac_tool_warned=yes ;;
7508esac
7509 AR=$ac_ct_AR
7510 fi
bec39cab
AC
7511else
7512 AR="$ac_cv_prog_AR"
7513fi
7514
7515if test -n "$ac_tool_prefix"; then
7516 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7517set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7519$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7520if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7521 $as_echo_n "(cached) " >&6
bec39cab
AC
7522else
7523 if test -n "$DLLTOOL"; then
7524 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7525else
7526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7527for as_dir in $PATH
7528do
7529 IFS=$as_save_IFS
7530 test -z "$as_dir" && as_dir=.
81ecdfbb 7531 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7533 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7535 break 2
7536 fi
7537done
81ecdfbb
RW
7538 done
7539IFS=$as_save_IFS
bec39cab
AC
7540
7541fi
7542fi
7543DLLTOOL=$ac_cv_prog_DLLTOOL
7544if test -n "$DLLTOOL"; then
81ecdfbb
RW
7545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7546$as_echo "$DLLTOOL" >&6; }
bec39cab 7547else
81ecdfbb
RW
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7549$as_echo "no" >&6; }
bec39cab
AC
7550fi
7551
81ecdfbb 7552
bec39cab
AC
7553fi
7554if test -z "$ac_cv_prog_DLLTOOL"; then
7555 ac_ct_DLLTOOL=$DLLTOOL
7556 # Extract the first word of "dlltool", so it can be a program name with args.
7557set dummy dlltool; ac_word=$2
81ecdfbb
RW
7558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7559$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7560if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7561 $as_echo_n "(cached) " >&6
bec39cab
AC
7562else
7563 if test -n "$ac_ct_DLLTOOL"; then
7564 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7565else
7566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7567for as_dir in $PATH
7568do
7569 IFS=$as_save_IFS
7570 test -z "$as_dir" && as_dir=.
81ecdfbb 7571 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7572 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7573 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7575 break 2
7576 fi
7577done
81ecdfbb
RW
7578 done
7579IFS=$as_save_IFS
bec39cab
AC
7580
7581fi
7582fi
7583ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7584if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7586$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7587else
81ecdfbb
RW
7588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7589$as_echo "no" >&6; }
bec39cab
AC
7590fi
7591
81ecdfbb
RW
7592 if test "x$ac_ct_DLLTOOL" = x; then
7593 DLLTOOL=""
7594 else
7595 case $cross_compiling:$ac_tool_warned in
7596yes:)
7597{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7598$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7599ac_tool_warned=yes ;;
7600esac
7601 DLLTOOL=$ac_ct_DLLTOOL
7602 fi
bec39cab
AC
7603else
7604 DLLTOOL="$ac_cv_prog_DLLTOOL"
7605fi
7606
7607if test -n "$ac_tool_prefix"; then
7608 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7609set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7611$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7612if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7613 $as_echo_n "(cached) " >&6
bec39cab
AC
7614else
7615 if test -n "$WINDRES"; then
7616 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7617else
7618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7619for as_dir in $PATH
7620do
7621 IFS=$as_save_IFS
7622 test -z "$as_dir" && as_dir=.
81ecdfbb 7623 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7625 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7627 break 2
7628 fi
7629done
81ecdfbb
RW
7630 done
7631IFS=$as_save_IFS
bec39cab
AC
7632
7633fi
7634fi
7635WINDRES=$ac_cv_prog_WINDRES
7636if test -n "$WINDRES"; then
81ecdfbb
RW
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7638$as_echo "$WINDRES" >&6; }
bec39cab 7639else
81ecdfbb
RW
7640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7641$as_echo "no" >&6; }
bec39cab
AC
7642fi
7643
81ecdfbb 7644
bec39cab
AC
7645fi
7646if test -z "$ac_cv_prog_WINDRES"; then
7647 ac_ct_WINDRES=$WINDRES
7648 # Extract the first word of "windres", so it can be a program name with args.
7649set dummy windres; ac_word=$2
81ecdfbb
RW
7650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7651$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7652if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7653 $as_echo_n "(cached) " >&6
bec39cab
AC
7654else
7655 if test -n "$ac_ct_WINDRES"; then
7656 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7657else
7658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7659for as_dir in $PATH
7660do
7661 IFS=$as_save_IFS
7662 test -z "$as_dir" && as_dir=.
81ecdfbb 7663 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7664 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7665 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7667 break 2
7668 fi
7669done
81ecdfbb
RW
7670 done
7671IFS=$as_save_IFS
bec39cab
AC
7672
7673fi
7674fi
7675ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7676if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7678$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7679else
81ecdfbb
RW
7680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7681$as_echo "no" >&6; }
c906108c 7682fi
bec39cab 7683
81ecdfbb
RW
7684 if test "x$ac_ct_WINDRES" = x; then
7685 WINDRES=""
7686 else
7687 case $cross_compiling:$ac_tool_warned in
7688yes:)
7689{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7690$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7691ac_tool_warned=yes ;;
7692esac
7693 WINDRES=$ac_ct_WINDRES
7694 fi
c906108c 7695else
bec39cab 7696 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7697fi
7698
bec39cab 7699
036c3acb
TS
7700case $host_os in
7701 gnu*)
7702 # Needed for GNU Hurd hosts.
7703 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7704 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7705set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7707$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7708if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7709 $as_echo_n "(cached) " >&6
c906108c 7710else
bec39cab
AC
7711 if test -n "$MIG"; then
7712 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7713else
7714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7715for as_dir in $PATH
7716do
7717 IFS=$as_save_IFS
7718 test -z "$as_dir" && as_dir=.
81ecdfbb 7719 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7721 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7723 break 2
7724 fi
7725done
81ecdfbb
RW
7726 done
7727IFS=$as_save_IFS
bec39cab 7728
c906108c 7729fi
bec39cab
AC
7730fi
7731MIG=$ac_cv_prog_MIG
7732if test -n "$MIG"; then
81ecdfbb
RW
7733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7734$as_echo "$MIG" >&6; }
c906108c 7735else
81ecdfbb
RW
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7737$as_echo "no" >&6; }
c906108c
SS
7738fi
7739
81ecdfbb 7740
bec39cab
AC
7741fi
7742if test -z "$ac_cv_prog_MIG"; then
7743 ac_ct_MIG=$MIG
7744 # Extract the first word of "mig", so it can be a program name with args.
7745set dummy mig; ac_word=$2
81ecdfbb
RW
7746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7747$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7748if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7749 $as_echo_n "(cached) " >&6
bec39cab
AC
7750else
7751 if test -n "$ac_ct_MIG"; then
7752 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7753else
7754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7755for as_dir in $PATH
7756do
7757 IFS=$as_save_IFS
7758 test -z "$as_dir" && as_dir=.
81ecdfbb 7759 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7761 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7763 break 2
7764 fi
7765done
81ecdfbb
RW
7766 done
7767IFS=$as_save_IFS
c906108c 7768
bec39cab
AC
7769fi
7770fi
7771ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7772if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7774$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7775else
81ecdfbb
RW
7776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7777$as_echo "no" >&6; }
bec39cab 7778fi
c906108c 7779
81ecdfbb
RW
7780 if test "x$ac_ct_MIG" = x; then
7781 MIG=""
7782 else
7783 case $cross_compiling:$ac_tool_warned in
7784yes:)
7785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7787ac_tool_warned=yes ;;
7788esac
7789 MIG=$ac_ct_MIG
7790 fi
bec39cab
AC
7791else
7792 MIG="$ac_cv_prog_MIG"
7793fi
c906108c 7794
036c3acb 7795 if test x"$MIG" = x; then
d0ac1c44 7796 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7797 fi
7798 ;;
7799esac
c906108c 7800
bec39cab
AC
7801# ---------------------- #
7802# Checks for libraries. #
7803# ---------------------- #
c906108c 7804
bec39cab 7805# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7807$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7808if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7809 $as_echo_n "(cached) " >&6
bec39cab
AC
7810else
7811 ac_check_lib_save_LIBS=$LIBS
7812LIBS="-lm $LIBS"
81ecdfbb 7813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7814/* end confdefs.h. */
c906108c 7815
c906108c 7816
bec39cab
AC
7817int
7818main ()
7819{
81ecdfbb 7820return main ();
bec39cab
AC
7821 ;
7822 return 0;
7823}
7824_ACEOF
81ecdfbb 7825if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7826 ac_cv_lib_m_main=yes
7827else
81ecdfbb 7828 ac_cv_lib_m_main=no
bec39cab 7829fi
81ecdfbb
RW
7830rm -f core conftest.err conftest.$ac_objext \
7831 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7832LIBS=$ac_check_lib_save_LIBS
7833fi
81ecdfbb
RW
7834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7835$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7836if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7837 cat >>confdefs.h <<_ACEOF
7838#define HAVE_LIBM 1
7839_ACEOF
7840
7841 LIBS="-lm $LIBS"
c906108c 7842
c906108c 7843fi
bec39cab
AC
7844
7845
bec39cab 7846# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7848$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7849if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7850 $as_echo_n "(cached) " >&6
bec39cab
AC
7851else
7852 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7854/* end confdefs.h. */
ddc9cd0f 7855
81ecdfbb
RW
7856/* Override any GCC internal prototype to avoid an error.
7857 Use char because int might match the return type of a GCC
7858 builtin and then its argument prototype would still apply. */
bec39cab
AC
7859#ifdef __cplusplus
7860extern "C"
7861#endif
bec39cab
AC
7862char gethostbyname ();
7863int
7864main ()
7865{
81ecdfbb 7866return gethostbyname ();
bec39cab
AC
7867 ;
7868 return 0;
7869}
7870_ACEOF
81ecdfbb
RW
7871for ac_lib in '' nsl; do
7872 if test -z "$ac_lib"; then
7873 ac_res="none required"
7874 else
7875 ac_res=-l$ac_lib
b4e70030 7876 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7877 fi
7878 if ac_fn_c_try_link "$LINENO"; then :
7879 ac_cv_search_gethostbyname=$ac_res
7880fi
7881rm -f core conftest.err conftest.$ac_objext \
7882 conftest$ac_exeext
d0ac1c44 7883 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7884 break
7885fi
7886done
d0ac1c44 7887if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7888
bec39cab 7889else
81ecdfbb 7890 ac_cv_search_gethostbyname=no
bec39cab 7891fi
81ecdfbb 7892rm conftest.$ac_ext
bec39cab
AC
7893LIBS=$ac_func_search_save_LIBS
7894fi
81ecdfbb
RW
7895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7896$as_echo "$ac_cv_search_gethostbyname" >&6; }
7897ac_res=$ac_cv_search_gethostbyname
7898if test "$ac_res" != no; then :
7899 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7900
bec39cab 7901fi
96baa820 7902
c906108c 7903
b4e70030 7904# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7906$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7907if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7908 $as_echo_n "(cached) " >&6
b4e70030
JB
7909else
7910 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7912/* end confdefs.h. */
7913
81ecdfbb
RW
7914/* Override any GCC internal prototype to avoid an error.
7915 Use char because int might match the return type of a GCC
7916 builtin and then its argument prototype would still apply. */
b4e70030
JB
7917#ifdef __cplusplus
7918extern "C"
7919#endif
b4e70030
JB
7920char socketpair ();
7921int
7922main ()
7923{
81ecdfbb 7924return socketpair ();
b4e70030
JB
7925 ;
7926 return 0;
7927}
7928_ACEOF
81ecdfbb
RW
7929for ac_lib in '' socket; do
7930 if test -z "$ac_lib"; then
7931 ac_res="none required"
7932 else
7933 ac_res=-l$ac_lib
b4e70030 7934 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7935 fi
7936 if ac_fn_c_try_link "$LINENO"; then :
7937 ac_cv_search_socketpair=$ac_res
7938fi
7939rm -f core conftest.err conftest.$ac_objext \
7940 conftest$ac_exeext
d0ac1c44 7941 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7942 break
7943fi
7944done
d0ac1c44 7945if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7946
b4e70030 7947else
81ecdfbb 7948 ac_cv_search_socketpair=no
b4e70030 7949fi
81ecdfbb 7950rm conftest.$ac_ext
b4e70030
JB
7951LIBS=$ac_func_search_save_LIBS
7952fi
81ecdfbb
RW
7953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7954$as_echo "$ac_cv_search_socketpair" >&6; }
7955ac_res=$ac_cv_search_socketpair
7956if test "$ac_res" != no; then :
7957 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7958
7959fi
7960
7961
233a11ab 7962# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7963
711a72d3 7964 # Use the system's zlib library.
39f3de7c
L
7965 zlibdir="-L\$(top_builddir)/../zlib"
7966 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7967
711a72d3
L
7968# Check whether --with-system-zlib was given.
7969if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7970 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7971 zlibdir=
7972 zlibinc=
7973 fi
b040ad30 7974
233a11ab 7975fi
233a11ab 7976
233a11ab 7977
233a11ab 7978
b040ad30 7979
233a11ab 7980
25268153 7981# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7982# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7984$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7985if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7986 $as_echo_n "(cached) " >&6
7987else
7988 ac_func_search_save_LIBS=$LIBS
7989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7990/* end confdefs.h. */
7991
7992/* Override any GCC internal prototype to avoid an error.
7993 Use char because int might match the return type of a GCC
7994 builtin and then its argument prototype would still apply. */
7995#ifdef __cplusplus
7996extern "C"
7997#endif
7998char kinfo_getvmmap ();
7999int
8000main ()
8001{
8002return kinfo_getvmmap ();
8003 ;
8004 return 0;
8005}
8006_ACEOF
37773e78 8007for ac_lib in '' util util-freebsd; do
25268153
JB
8008 if test -z "$ac_lib"; then
8009 ac_res="none required"
8010 else
8011 ac_res=-l$ac_lib
8012 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8013 fi
8014 if ac_fn_c_try_link "$LINENO"; then :
8015 ac_cv_search_kinfo_getvmmap=$ac_res
8016fi
8017rm -f core conftest.err conftest.$ac_objext \
8018 conftest$ac_exeext
d0ac1c44 8019 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8020 break
8021fi
8022done
d0ac1c44 8023if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8024
8025else
8026 ac_cv_search_kinfo_getvmmap=no
8027fi
8028rm conftest.$ac_ext
8029LIBS=$ac_func_search_save_LIBS
8030fi
8031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8032$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8033ac_res=$ac_cv_search_kinfo_getvmmap
8034if test "$ac_res" != no; then :
8035 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8036
8037$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8038
8039fi
8040
8041
92fce24d
JB
8042# fbsd-nat.c can also use kinfo_getfile.
8043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8044$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
d0ac1c44 8045if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8046 $as_echo_n "(cached) " >&6
8047else
8048 ac_func_search_save_LIBS=$LIBS
8049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8050/* end confdefs.h. */
8051
8052/* Override any GCC internal prototype to avoid an error.
8053 Use char because int might match the return type of a GCC
8054 builtin and then its argument prototype would still apply. */
8055#ifdef __cplusplus
8056extern "C"
8057#endif
8058char kinfo_getfile ();
8059int
8060main ()
8061{
8062return kinfo_getfile ();
8063 ;
8064 return 0;
8065}
8066_ACEOF
8067for ac_lib in '' util util-freebsd; do
8068 if test -z "$ac_lib"; then
8069 ac_res="none required"
8070 else
8071 ac_res=-l$ac_lib
8072 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8073 fi
8074 if ac_fn_c_try_link "$LINENO"; then :
8075 ac_cv_search_kinfo_getfile=$ac_res
8076fi
8077rm -f core conftest.err conftest.$ac_objext \
8078 conftest$ac_exeext
d0ac1c44 8079 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8080 break
8081fi
8082done
d0ac1c44 8083if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8084
8085else
8086 ac_cv_search_kinfo_getfile=no
8087fi
8088rm conftest.$ac_ext
8089LIBS=$ac_func_search_save_LIBS
8090fi
8091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8092$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8093ac_res=$ac_cv_search_kinfo_getfile
8094if test "$ac_res" != no; then :
8095 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8096
8097$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
8098
8099fi
8100
8101
77f120bf 8102
016a3251
DD
8103 if test "X$prefix" = "XNONE"; then
8104 acl_final_prefix="$ac_default_prefix"
8105 else
8106 acl_final_prefix="$prefix"
8107 fi
8108 if test "X$exec_prefix" = "XNONE"; then
8109 acl_final_exec_prefix='${prefix}'
8110 else
8111 acl_final_exec_prefix="$exec_prefix"
8112 fi
8113 acl_save_prefix="$prefix"
8114 prefix="$acl_final_prefix"
8115 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8116 prefix="$acl_save_prefix"
8117
8118
8119# Check whether --with-gnu-ld was given.
8120if test "${with_gnu_ld+set}" = set; then :
8121 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8122else
8123 with_gnu_ld=no
8124fi
8125
8126# Prepare PATH_SEPARATOR.
8127# The user is always right.
8128if test "${PATH_SEPARATOR+set}" != set; then
8129 echo "#! /bin/sh" >conf$$.sh
8130 echo "exit 0" >>conf$$.sh
8131 chmod +x conf$$.sh
8132 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8133 PATH_SEPARATOR=';'
8134 else
8135 PATH_SEPARATOR=:
8136 fi
8137 rm -f conf$$.sh
8138fi
8139ac_prog=ld
8140if test "$GCC" = yes; then
8141 # Check if gcc -print-prog-name=ld gives a path.
8142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8143$as_echo_n "checking for ld used by GCC... " >&6; }
8144 case $host in
8145 *-*-mingw*)
8146 # gcc leaves a trailing carriage return which upsets mingw
8147 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8148 *)
8149 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8150 esac
8151 case $ac_prog in
8152 # Accept absolute paths.
8153 [\\/]* | [A-Za-z]:[\\/]*)
8154 re_direlt='/[^/][^/]*/\.\./'
8155 # Canonicalize the path of ld
8156 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8157 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8158 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8159 done
8160 test -z "$LD" && LD="$ac_prog"
8161 ;;
8162 "")
8163 # If it fails, then pretend we aren't using GCC.
8164 ac_prog=ld
8165 ;;
8166 *)
8167 # If it is relative, then search for the first ld in PATH.
8168 with_gnu_ld=unknown
8169 ;;
8170 esac
8171elif test "$with_gnu_ld" = yes; then
8172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8173$as_echo_n "checking for GNU ld... " >&6; }
8174else
8175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8176$as_echo_n "checking for non-GNU ld... " >&6; }
8177fi
d0ac1c44 8178if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8179 $as_echo_n "(cached) " >&6
8180else
8181 if test -z "$LD"; then
8182 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8183 for ac_dir in $PATH; do
8184 test -z "$ac_dir" && ac_dir=.
8185 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8186 acl_cv_path_LD="$ac_dir/$ac_prog"
8187 # Check to see if the program is GNU ld. I'd rather use --version,
8188 # but apparently some GNU ld's only accept -v.
8189 # Break only if it was the GNU/non-GNU ld that we prefer.
8190 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8191 test "$with_gnu_ld" != no && break
8192 else
8193 test "$with_gnu_ld" != yes && break
8194 fi
8195 fi
8196 done
8197 IFS="$ac_save_ifs"
8198else
8199 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8200fi
8201fi
8202
8203LD="$acl_cv_path_LD"
8204if test -n "$LD"; then
8205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8206$as_echo "$LD" >&6; }
8207else
8208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8209$as_echo "no" >&6; }
8210fi
d0ac1c44 8211test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8213$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8214if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8215 $as_echo_n "(cached) " >&6
8216else
8217 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8218if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8219 acl_cv_prog_gnu_ld=yes
8220else
8221 acl_cv_prog_gnu_ld=no
8222fi
8223fi
8224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8225$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8226with_gnu_ld=$acl_cv_prog_gnu_ld
8227
8228
8229
8230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8231$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8232if ${acl_cv_rpath+:} false; then :
016a3251
DD
8233 $as_echo_n "(cached) " >&6
8234else
8235
8236 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8237 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8238 . ./conftest.sh
8239 rm -f ./conftest.sh
8240 acl_cv_rpath=done
8241
8242fi
8243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8244$as_echo "$acl_cv_rpath" >&6; }
8245 wl="$acl_cv_wl"
8246 libext="$acl_cv_libext"
8247 shlibext="$acl_cv_shlibext"
8248 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8249 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8250 hardcode_direct="$acl_cv_hardcode_direct"
8251 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8252 # Check whether --enable-rpath was given.
8253if test "${enable_rpath+set}" = set; then :
8254 enableval=$enable_rpath; :
8255else
8256 enable_rpath=yes
8257fi
8258
8259
8260
8261
8262
8263
8264
8265
8266 use_additional=yes
8267
8268 acl_save_prefix="$prefix"
8269 prefix="$acl_final_prefix"
8270 acl_save_exec_prefix="$exec_prefix"
8271 exec_prefix="$acl_final_exec_prefix"
8272
8273 eval additional_includedir=\"$includedir\"
8274 eval additional_libdir=\"$libdir\"
8275
8276 exec_prefix="$acl_save_exec_prefix"
8277 prefix="$acl_save_prefix"
77f120bf 8278
6c7a06a3 8279
81ecdfbb
RW
8280# Check whether --with-libiconv-prefix was given.
8281if test "${with_libiconv_prefix+set}" = set; then :
8282 withval=$with_libiconv_prefix;
016a3251
DD
8283 if test "X$withval" = "Xno"; then
8284 use_additional=no
8285 else
8286 if test "X$withval" = "X"; then
8287
8288 acl_save_prefix="$prefix"
8289 prefix="$acl_final_prefix"
8290 acl_save_exec_prefix="$exec_prefix"
8291 exec_prefix="$acl_final_exec_prefix"
8292
8293 eval additional_includedir=\"$includedir\"
8294 eval additional_libdir=\"$libdir\"
8295
8296 exec_prefix="$acl_save_exec_prefix"
8297 prefix="$acl_save_prefix"
8298
8299 else
8300 additional_includedir="$withval/include"
8301 additional_libdir="$withval/lib"
8302 fi
8303 fi
6c7a06a3 8304
81ecdfbb
RW
8305fi
8306
016a3251
DD
8307 LIBICONV=
8308 LTLIBICONV=
8309 INCICONV=
8310 rpathdirs=
8311 ltrpathdirs=
8312 names_already_handled=
8313 names_next_round='iconv '
8314 while test -n "$names_next_round"; do
8315 names_this_round="$names_next_round"
8316 names_next_round=
8317 for name in $names_this_round; do
8318 already_handled=
8319 for n in $names_already_handled; do
8320 if test "$n" = "$name"; then
8321 already_handled=yes
8322 break
8323 fi
8324 done
8325 if test -z "$already_handled"; then
8326 names_already_handled="$names_already_handled $name"
8327 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8328 eval value=\"\$HAVE_LIB$uppername\"
8329 if test -n "$value"; then
8330 if test "$value" = yes; then
8331 eval value=\"\$LIB$uppername\"
8332 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8333 eval value=\"\$LTLIB$uppername\"
8334 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8335 else
8336 :
8337 fi
8338 else
8339 found_dir=
8340 found_la=
8341 found_so=
8342 found_a=
8343 if test $use_additional = yes; then
8344 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8345 found_dir="$additional_libdir"
8346 found_so="$additional_libdir/lib$name.$shlibext"
8347 if test -f "$additional_libdir/lib$name.la"; then
8348 found_la="$additional_libdir/lib$name.la"
8349 fi
8350 else
8351 if test -f "$additional_libdir/lib$name.$libext"; then
8352 found_dir="$additional_libdir"
8353 found_a="$additional_libdir/lib$name.$libext"
8354 if test -f "$additional_libdir/lib$name.la"; then
8355 found_la="$additional_libdir/lib$name.la"
8356 fi
8357 fi
8358 fi
8359 fi
8360 if test "X$found_dir" = "X"; then
8361 for x in $LDFLAGS $LTLIBICONV; do
8362
8363 acl_save_prefix="$prefix"
8364 prefix="$acl_final_prefix"
8365 acl_save_exec_prefix="$exec_prefix"
8366 exec_prefix="$acl_final_exec_prefix"
8367 eval x=\"$x\"
8368 exec_prefix="$acl_save_exec_prefix"
8369 prefix="$acl_save_prefix"
8370
8371 case "$x" in
8372 -L*)
8373 dir=`echo "X$x" | sed -e 's/^X-L//'`
8374 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8375 found_dir="$dir"
8376 found_so="$dir/lib$name.$shlibext"
8377 if test -f "$dir/lib$name.la"; then
8378 found_la="$dir/lib$name.la"
8379 fi
8380 else
8381 if test -f "$dir/lib$name.$libext"; then
8382 found_dir="$dir"
8383 found_a="$dir/lib$name.$libext"
8384 if test -f "$dir/lib$name.la"; then
8385 found_la="$dir/lib$name.la"
8386 fi
8387 fi
8388 fi
8389 ;;
8390 esac
8391 if test "X$found_dir" != "X"; then
8392 break
8393 fi
8394 done
8395 fi
8396 if test "X$found_dir" != "X"; then
8397 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8398 if test "X$found_so" != "X"; then
8399 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8400 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8401 else
8402 haveit=
8403 for x in $ltrpathdirs; do
8404 if test "X$x" = "X$found_dir"; then
8405 haveit=yes
8406 break
8407 fi
8408 done
8409 if test -z "$haveit"; then
8410 ltrpathdirs="$ltrpathdirs $found_dir"
8411 fi
8412 if test "$hardcode_direct" = yes; then
8413 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8414 else
8415 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8416 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8417 haveit=
8418 for x in $rpathdirs; do
8419 if test "X$x" = "X$found_dir"; then
8420 haveit=yes
8421 break
8422 fi
8423 done
8424 if test -z "$haveit"; then
8425 rpathdirs="$rpathdirs $found_dir"
8426 fi
8427 else
8428 haveit=
8429 for x in $LDFLAGS $LIBICONV; do
8430
8431 acl_save_prefix="$prefix"
8432 prefix="$acl_final_prefix"
8433 acl_save_exec_prefix="$exec_prefix"
8434 exec_prefix="$acl_final_exec_prefix"
8435 eval x=\"$x\"
8436 exec_prefix="$acl_save_exec_prefix"
8437 prefix="$acl_save_prefix"
8438
8439 if test "X$x" = "X-L$found_dir"; then
8440 haveit=yes
8441 break
8442 fi
8443 done
8444 if test -z "$haveit"; then
8445 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8446 fi
8447 if test "$hardcode_minus_L" != no; then
8448 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8449 else
8450 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8451 fi
8452 fi
8453 fi
8454 fi
8455 else
8456 if test "X$found_a" != "X"; then
8457 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8458 else
8459 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8460 fi
8461 fi
8462 additional_includedir=
8463 case "$found_dir" in
8464 */lib | */lib/)
8465 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8466 additional_includedir="$basedir/include"
8467 ;;
8468 esac
8469 if test "X$additional_includedir" != "X"; then
8470 if test "X$additional_includedir" != "X/usr/include"; then
8471 haveit=
8472 if test "X$additional_includedir" = "X/usr/local/include"; then
8473 if test -n "$GCC"; then
8474 case $host_os in
8475 linux*) haveit=yes;;
8476 esac
8477 fi
8478 fi
8479 if test -z "$haveit"; then
8480 for x in $CPPFLAGS $INCICONV; do
8481
8482 acl_save_prefix="$prefix"
8483 prefix="$acl_final_prefix"
8484 acl_save_exec_prefix="$exec_prefix"
8485 exec_prefix="$acl_final_exec_prefix"
8486 eval x=\"$x\"
8487 exec_prefix="$acl_save_exec_prefix"
8488 prefix="$acl_save_prefix"
8489
8490 if test "X$x" = "X-I$additional_includedir"; then
8491 haveit=yes
8492 break
8493 fi
8494 done
8495 if test -z "$haveit"; then
8496 if test -d "$additional_includedir"; then
8497 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8498 fi
8499 fi
8500 fi
8501 fi
8502 fi
8503 if test -n "$found_la"; then
8504 save_libdir="$libdir"
8505 case "$found_la" in
8506 */* | *\\*) . "$found_la" ;;
8507 *) . "./$found_la" ;;
8508 esac
8509 libdir="$save_libdir"
8510 for dep in $dependency_libs; do
8511 case "$dep" in
8512 -L*)
8513 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8514 if test "X$additional_libdir" != "X/usr/lib"; then
8515 haveit=
8516 if test "X$additional_libdir" = "X/usr/local/lib"; then
8517 if test -n "$GCC"; then
8518 case $host_os in
8519 linux*) haveit=yes;;
8520 esac
8521 fi
8522 fi
8523 if test -z "$haveit"; then
8524 haveit=
8525 for x in $LDFLAGS $LIBICONV; do
8526
8527 acl_save_prefix="$prefix"
8528 prefix="$acl_final_prefix"
8529 acl_save_exec_prefix="$exec_prefix"
8530 exec_prefix="$acl_final_exec_prefix"
8531 eval x=\"$x\"
8532 exec_prefix="$acl_save_exec_prefix"
8533 prefix="$acl_save_prefix"
8534
8535 if test "X$x" = "X-L$additional_libdir"; then
8536 haveit=yes
8537 break
8538 fi
8539 done
8540 if test -z "$haveit"; then
8541 if test -d "$additional_libdir"; then
8542 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8543 fi
8544 fi
8545 haveit=
8546 for x in $LDFLAGS $LTLIBICONV; do
8547
8548 acl_save_prefix="$prefix"
8549 prefix="$acl_final_prefix"
8550 acl_save_exec_prefix="$exec_prefix"
8551 exec_prefix="$acl_final_exec_prefix"
8552 eval x=\"$x\"
8553 exec_prefix="$acl_save_exec_prefix"
8554 prefix="$acl_save_prefix"
8555
8556 if test "X$x" = "X-L$additional_libdir"; then
8557 haveit=yes
8558 break
8559 fi
8560 done
8561 if test -z "$haveit"; then
8562 if test -d "$additional_libdir"; then
8563 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8564 fi
8565 fi
8566 fi
8567 fi
8568 ;;
8569 -R*)
8570 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8571 if test "$enable_rpath" != no; then
8572 haveit=
8573 for x in $rpathdirs; do
8574 if test "X$x" = "X$dir"; then
8575 haveit=yes
8576 break
8577 fi
8578 done
8579 if test -z "$haveit"; then
8580 rpathdirs="$rpathdirs $dir"
8581 fi
8582 haveit=
8583 for x in $ltrpathdirs; do
8584 if test "X$x" = "X$dir"; then
8585 haveit=yes
8586 break
8587 fi
8588 done
8589 if test -z "$haveit"; then
8590 ltrpathdirs="$ltrpathdirs $dir"
8591 fi
8592 fi
8593 ;;
8594 -l*)
8595 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8596 ;;
8597 *.la)
8598 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8599 ;;
8600 *)
8601 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8602 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8603 ;;
8604 esac
8605 done
8606 fi
8607 else
8608 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8609 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8610 fi
8611 fi
8612 fi
8613 done
8614 done
8615 if test "X$rpathdirs" != "X"; then
8616 if test -n "$hardcode_libdir_separator"; then
8617 alldirs=
8618 for found_dir in $rpathdirs; do
8619 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8620 done
8621 acl_save_libdir="$libdir"
8622 libdir="$alldirs"
8623 eval flag=\"$hardcode_libdir_flag_spec\"
8624 libdir="$acl_save_libdir"
8625 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8626 else
8627 for found_dir in $rpathdirs; do
8628 acl_save_libdir="$libdir"
8629 libdir="$found_dir"
8630 eval flag=\"$hardcode_libdir_flag_spec\"
8631 libdir="$acl_save_libdir"
8632 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8633 done
8634 fi
8635 fi
8636 if test "X$ltrpathdirs" != "X"; then
8637 for found_dir in $ltrpathdirs; do
8638 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8639 done
8640 fi
8641
8642
8643
8644
8645
6c7a06a3 8646
6c7a06a3 8647
81ecdfbb
RW
8648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8649$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8650if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8651 $as_echo_n "(cached) " >&6
d542061a 8652else
6c7a06a3
TT
8653
8654 am_cv_func_iconv="no, consider installing GNU libiconv"
8655 am_cv_lib_iconv=no
016a3251
DD
8656 am_save_CPPFLAGS="$CPPFLAGS"
8657 CPPFLAGS="$CPPFLAGS $INCICONV"
8658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8659/* end confdefs.h. */
6c7a06a3
TT
8660#include <stdlib.h>
8661#include <iconv.h>
d542061a
UW
8662int
8663main ()
8664{
6c7a06a3 8665iconv_t cd = iconv_open("","");
016a3251
DD
8666 iconv(cd,NULL,NULL,NULL,NULL);
8667 iconv_close(cd);
d542061a
UW
8668 ;
8669 return 0;
8670}
8671_ACEOF
81ecdfbb 8672if ac_fn_c_try_link "$LINENO"; then :
016a3251 8673 am_cv_func_iconv=yes
d542061a 8674fi
81ecdfbb
RW
8675rm -f core conftest.err conftest.$ac_objext \
8676 conftest$ac_exeext conftest.$ac_ext
016a3251 8677 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8678
016a3251
DD
8679 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8680 for _libs in .libs _libs; do
8681 am_save_CPPFLAGS="$CPPFLAGS"
8682 am_save_LIBS="$LIBS"
8683 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8684 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8686/* end confdefs.h. */
6c7a06a3
TT
8687#include <stdlib.h>
8688#include <iconv.h>
d542061a
UW
8689int
8690main ()
8691{
6c7a06a3 8692iconv_t cd = iconv_open("","");
016a3251
DD
8693 iconv(cd,NULL,NULL,NULL,NULL);
8694 iconv_close(cd);
d542061a
UW
8695 ;
8696 return 0;
8697}
8698_ACEOF
81ecdfbb 8699if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8700 INCICONV="-I../libiconv/include"
8701 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8702 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8703 am_cv_lib_iconv=yes
8704 am_cv_func_iconv=yes
d542061a 8705fi
81ecdfbb
RW
8706rm -f core conftest.err conftest.$ac_objext \
8707 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8708 CPPFLAGS="$am_save_CPPFLAGS"
8709 LIBS="$am_save_LIBS"
8710 if test "$am_cv_func_iconv" = "yes"; then
8711 break
8712 fi
8713 done
77f120bf 8714 fi
94ae1714 8715
4edb1e84 8716 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8717 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8718 am_save_LIBS="$LIBS"
016a3251
DD
8719 CPPFLAGS="$LIBS $INCICONV"
8720 LIBS="$LIBS $LIBICONV"
81ecdfbb 8721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8722/* end confdefs.h. */
6c7a06a3
TT
8723#include <stdlib.h>
8724#include <iconv.h>
bec39cab
AC
8725int
8726main ()
8727{
6c7a06a3
TT
8728iconv_t cd = iconv_open("","");
8729 iconv(cd,NULL,NULL,NULL,NULL);
8730 iconv_close(cd);
bec39cab
AC
8731 ;
8732 return 0;
8733}
8734_ACEOF
81ecdfbb 8735if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8736 am_cv_lib_iconv=yes
6c7a06a3 8737 am_cv_func_iconv=yes
627af7ea 8738fi
81ecdfbb
RW
8739rm -f core conftest.err conftest.$ac_objext \
8740 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8741 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8742 LIBS="$am_save_LIBS"
6c7a06a3
TT
8743 fi
8744
8745fi
81ecdfbb
RW
8746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8747$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8748 if test "$am_cv_func_iconv" = yes; then
8749
8750$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8751
016a3251 8752 fi
fc3b640d 8753 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8754
8755 for element in $INCICONV; do
8756 haveit=
8757 for x in $CPPFLAGS; do
8758
8759 acl_save_prefix="$prefix"
8760 prefix="$acl_final_prefix"
8761 acl_save_exec_prefix="$exec_prefix"
8762 exec_prefix="$acl_final_exec_prefix"
8763 eval x=\"$x\"
8764 exec_prefix="$acl_save_exec_prefix"
8765 prefix="$acl_save_prefix"
8766
8767 if test "X$x" = "X$element"; then
8768 haveit=yes
8769 break
8770 fi
8771 done
8772 if test -z "$haveit"; then
8773 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8774 fi
8775 done
8776
8777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8778$as_echo_n "checking how to link with libiconv... " >&6; }
8779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8780$as_echo "$LIBICONV" >&6; }
94ae1714 8781 else
016a3251
DD
8782 LIBICONV=
8783 LTLIBICONV=
fc3b640d 8784 fi
94ae1714 8785
6c7a06a3 8786
6c7a06a3 8787
016a3251 8788 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8790$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8791 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8792 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8793else
8794
81ecdfbb 8795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8796/* end confdefs.h. */
8797
6c7a06a3
TT
8798#include <stdlib.h>
8799#include <iconv.h>
8800extern
b4e70030 8801#ifdef __cplusplus
6c7a06a3 8802"C"
b4e70030 8803#endif
6c7a06a3
TT
8804#if defined(__STDC__) || defined(__cplusplus)
8805size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8806#else
8807size_t iconv();
8808#endif
8809
b4e70030
JB
8810int
8811main ()
8812{
6c7a06a3 8813
b4e70030
JB
8814 ;
8815 return 0;
8816}
8817_ACEOF
81ecdfbb 8818if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8819 am_cv_proto_iconv_arg1=""
4e8d927d 8820else
81ecdfbb 8821 am_cv_proto_iconv_arg1="const"
b4e70030 8822fi
81ecdfbb 8823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8824 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);"
8825fi
8826
8827 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8829 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8830$as_echo "${ac_t:-
8831 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8832
8833cat >>confdefs.h <<_ACEOF
8834#define ICONV_CONST $am_cv_proto_iconv_arg1
8835_ACEOF
8836
8837 fi
6c7a06a3
TT
8838
8839
478aac75
DE
8840# GDB may fork/exec the iconv program to get the list of supported character
8841# sets. Allow the user to specify where to find it.
8842# There are several factors affecting the choice of option name:
8843# - There is already --with-libiconv-prefix but we can't use it, it specifies
8844# the build-time location of libiconv files.
8845# - The program we need to find is iconv, which comes with glibc. The user
8846# doesn't necessarily have libiconv installed. Therefore naming this
8847# --with-libiconv-foo feels wrong.
8848# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8849# defined to work on directories not files (though it really doesn't know
8850# the difference).
8851# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8852# with --with-libiconv-prefix.
8853# Putting these together is why the option name is --with-iconv-bin.
8854
8855
8856# Check whether --with-iconv-bin was given.
8857if test "${with_iconv_bin+set}" = set; then :
8858 withval=$with_iconv_bin; iconv_bin="${withval}"
8859
8860cat >>confdefs.h <<_ACEOF
8861#define ICONV_BIN "${iconv_bin}"
8862_ACEOF
8863
8864
8865 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8866 if test "x$prefix" = xNONE; then
8867 test_prefix=/usr/local
8868 else
8869 test_prefix=$prefix
8870 fi
8871 else
8872 test_prefix=$exec_prefix
8873 fi
8874 value=0
8875 case ${iconv_bin} in
8876 "${test_prefix}"|"${test_prefix}/"*|\
8877 '${exec_prefix}'|'${exec_prefix}/'*)
8878 value=1
8879 ;;
8880 esac
8881
8882cat >>confdefs.h <<_ACEOF
8883#define ICONV_BIN_RELOCATABLE $value
8884_ACEOF
8885
8886
8887
8888fi
8889
8890
cb01cfba 8891# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8892if test x"$enable_tui" != xno; then
cb01cfba
JB
8893 prefer_curses=yes
8894fi
8895
8896curses_found=no
8897if test x"$prefer_curses" = xyes; then
8898 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8899 # curses library because the latter might not provide all the
8900 # functionality we need. However, this leads to problems on systems
8901 # where the linker searches /usr/local/lib, but the compiler doesn't
8902 # search /usr/local/include, if ncurses is installed in /usr/local. A
8903 # default installation of ncurses on alpha*-dec-osf* will lead to such
8904 # a situation.
81ecdfbb
RW
8905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8906$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8907if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8908 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8909else
8910 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8912/* end confdefs.h. */
8913
81ecdfbb
RW
8914/* Override any GCC internal prototype to avoid an error.
8915 Use char because int might match the return type of a GCC
8916 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8917#ifdef __cplusplus
8918extern "C"
8919#endif
6c7a06a3
TT
8920char waddstr ();
8921int
8922main ()
8923{
81ecdfbb 8924return waddstr ();
6c7a06a3
TT
8925 ;
8926 return 0;
8927}
8928_ACEOF
5007d765 8929for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8930 if test -z "$ac_lib"; then
8931 ac_res="none required"
8932 else
8933 ac_res=-l$ac_lib
8934 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8935 fi
8936 if ac_fn_c_try_link "$LINENO"; then :
8937 ac_cv_search_waddstr=$ac_res
8938fi
8939rm -f core conftest.err conftest.$ac_objext \
8940 conftest$ac_exeext
d0ac1c44 8941 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8942 break
8943fi
8944done
d0ac1c44 8945if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8946
6c7a06a3 8947else
81ecdfbb
RW
8948 ac_cv_search_waddstr=no
8949fi
8950rm conftest.$ac_ext
8951LIBS=$ac_func_search_save_LIBS
8952fi
8953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8954$as_echo "$ac_cv_search_waddstr" >&6; }
8955ac_res=$ac_cv_search_waddstr
8956if test "$ac_res" != no; then :
8957 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8958
8959fi
8960
8961
cb01cfba
JB
8962 if test "$ac_cv_search_waddstr" != no; then
8963 curses_found=yes
8964 fi
8965fi
8966
8967# Check whether we should enable the TUI, but only do so if we really
8968# can.
8969if test x"$enable_tui" != xno; then
8970 if test -d $srcdir/tui; then
8971 if test "$curses_found" != no; then
6c7a06a3
TT
8972 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8973 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8974 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8975 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8976 else
8977 if test x"$enable_tui" = xyes; then
d0ac1c44 8978 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8979 else
81ecdfbb
RW
8980 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8981$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8982 fi
8983 fi
8984 fi
8985fi
8986
8987# Since GDB uses Readline, we need termcap functionality. In many
8988# cases this will be provided by the curses library, but some systems
96fe4562 8989# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8990
8991case $host_os in
8992 cygwin*)
8993 if test -d $srcdir/libtermcap; then
8994 LIBS="../libtermcap/libtermcap.a $LIBS"
8995 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8996 fi ;;
8997 go32* | *djgpp*)
8998 ac_cv_search_tgetent="none required"
8999 ;;
6c7a06a3
TT
9000esac
9001
9002# These are the libraries checked by Readline.
81ecdfbb
RW
9003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9004$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 9005if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 9006 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9007else
9008 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9010/* end confdefs.h. */
9011
81ecdfbb
RW
9012/* Override any GCC internal prototype to avoid an error.
9013 Use char because int might match the return type of a GCC
9014 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9015#ifdef __cplusplus
9016extern "C"
9017#endif
6c7a06a3
TT
9018char tgetent ();
9019int
9020main ()
9021{
81ecdfbb 9022return tgetent ();
6c7a06a3
TT
9023 ;
9024 return 0;
9025}
9026_ACEOF
5007d765 9027for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9028 if test -z "$ac_lib"; then
9029 ac_res="none required"
9030 else
9031 ac_res=-l$ac_lib
6c7a06a3 9032 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9033 fi
9034 if ac_fn_c_try_link "$LINENO"; then :
9035 ac_cv_search_tgetent=$ac_res
9036fi
9037rm -f core conftest.err conftest.$ac_objext \
9038 conftest$ac_exeext
d0ac1c44 9039 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9040 break
9041fi
9042done
d0ac1c44 9043if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9044
6c7a06a3 9045else
81ecdfbb 9046 ac_cv_search_tgetent=no
6c7a06a3 9047fi
81ecdfbb 9048rm conftest.$ac_ext
6c7a06a3
TT
9049LIBS=$ac_func_search_save_LIBS
9050fi
81ecdfbb
RW
9051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9052$as_echo "$ac_cv_search_tgetent" >&6; }
9053ac_res=$ac_cv_search_tgetent
9054if test "$ac_res" != no; then :
9055 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9056
06825bd1
MK
9057fi
9058
06825bd1 9059
bec39cab 9060if test "$ac_cv_search_tgetent" = no; then
7a85168d 9061 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9062fi
9063
3841debe 9064
81ecdfbb
RW
9065# Check whether --with-system-readline was given.
9066if test "${with_system_readline+set}" = set; then :
9067 withval=$with_system_readline;
9068fi
6a30b0a5 9069
6a30b0a5
AS
9070
9071if test "$with_system_readline" = yes; then
9072 READLINE=-lreadline
9073 READLINE_DEPS=
9074 READLINE_CFLAGS=
39037522 9075 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9076else
9077 READLINE='$(READLINE_DIR)/libreadline.a'
9078 READLINE_DEPS='$(READLINE)'
9079 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9080 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9081fi
9082
9083
9084
9085
9086
f997c383
SD
9087# Generate jit-reader.h
9088
9089# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9090TARGET_PTR=
9091
9092# The cast to long int works around a bug in the HP C Compiler
9093# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9094# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9095# This bug is HP SR number 8606223364.
9096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9097$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9098if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9099 $as_echo_n "(cached) " >&6
9100else
9101 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9102
9103else
9104 if test "$ac_cv_type_unsigned_long_long" = yes; then
9105 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9106$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9107as_fn_error 77 "cannot compute sizeof (unsigned long long)
9108See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9109 else
9110 ac_cv_sizeof_unsigned_long_long=0
9111 fi
9112fi
9113
9114fi
9115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9116$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9117
9118
9119
9120cat >>confdefs.h <<_ACEOF
9121#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9122_ACEOF
9123
9124
9125# The cast to long int works around a bug in the HP C Compiler
9126# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9127# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9128# This bug is HP SR number 8606223364.
9129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9130$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9131if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9132 $as_echo_n "(cached) " >&6
9133else
9134 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9135
9136else
9137 if test "$ac_cv_type_unsigned_long" = yes; then
9138 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9140as_fn_error 77 "cannot compute sizeof (unsigned long)
9141See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9142 else
9143 ac_cv_sizeof_unsigned_long=0
9144 fi
9145fi
9146
9147fi
9148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9149$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9150
9151
9152
9153cat >>confdefs.h <<_ACEOF
9154#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9155_ACEOF
9156
9157
9158# The cast to long int works around a bug in the HP C Compiler
9159# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9160# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9161# This bug is HP SR number 8606223364.
9162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9163$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9164if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9165 $as_echo_n "(cached) " >&6
9166else
9167 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9168
9169else
9170 if test "$ac_cv_type_unsigned___int128" = yes; then
9171 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9172$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9173as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9174See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9175 else
9176 ac_cv_sizeof_unsigned___int128=0
9177 fi
9178fi
9179
9180fi
9181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9182$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9183
9184
9185
9186cat >>confdefs.h <<_ACEOF
9187#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9188_ACEOF
9189
9190
9191
9192if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9193 TARGET_PTR="unsigned long"
9194elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9195 TARGET_PTR="unsigned long long"
9196elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9197 TARGET_PTR="unsigned __int128"
9198else
9199 TARGET_PTR="unsigned long"
9200fi
9201
9202
9203ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9204
9205
a2d08b9e
SD
9206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9207$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9208if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9209 $as_echo_n "(cached) " >&6
9210else
9211 ac_func_search_save_LIBS=$LIBS
9212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9213/* end confdefs.h. */
9214
9215/* Override any GCC internal prototype to avoid an error.
9216 Use char because int might match the return type of a GCC
9217 builtin and then its argument prototype would still apply. */
9218#ifdef __cplusplus
9219extern "C"
9220#endif
9221char dlopen ();
9222int
9223main ()
9224{
9225return dlopen ();
9226 ;
9227 return 0;
9228}
9229_ACEOF
9230for ac_lib in '' dl; do
9231 if test -z "$ac_lib"; then
9232 ac_res="none required"
9233 else
9234 ac_res=-l$ac_lib
9235 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9236 fi
9237 if ac_fn_c_try_link "$LINENO"; then :
9238 ac_cv_search_dlopen=$ac_res
9239fi
9240rm -f core conftest.err conftest.$ac_objext \
9241 conftest$ac_exeext
d0ac1c44 9242 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9243 break
9244fi
9245done
d0ac1c44 9246if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9247
9248else
9249 ac_cv_search_dlopen=no
9250fi
9251rm conftest.$ac_ext
9252LIBS=$ac_func_search_save_LIBS
9253fi
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9255$as_echo "$ac_cv_search_dlopen" >&6; }
9256ac_res=$ac_cv_search_dlopen
9257if test "$ac_res" != no; then :
9258 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9259
9260fi
9261
9262
39037522 9263
b8e0a31c
SD
9264
9265# Check whether --with-jit-reader-dir was given.
9266if test "${with_jit_reader_dir+set}" = set; then :
9267 withval=$with_jit_reader_dir;
9268 JIT_READER_DIR=$withval
9269else
9270 JIT_READER_DIR=${libdir}/gdb
9271fi
9272
9273
9274 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9275 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9276 ac_define_dir=`eval echo $JIT_READER_DIR`
9277 ac_define_dir=`eval echo $ac_define_dir`
9278
9279cat >>confdefs.h <<_ACEOF
9280#define JIT_READER_DIR "$ac_define_dir"
9281_ACEOF
9282
9283
9284
9285
9286 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9287 if test "x$prefix" = xNONE; then
9288 test_prefix=/usr/local
9289 else
9290 test_prefix=$prefix
9291 fi
9292 else
9293 test_prefix=$exec_prefix
9294 fi
9295 value=0
9296 case ${ac_define_dir} in
9297 "${test_prefix}"|"${test_prefix}/"*|\
9298 '${exec_prefix}'|'${exec_prefix}/'*)
9299 value=1
9300 ;;
9301 esac
9302
9303cat >>confdefs.h <<_ACEOF
9304#define JIT_READER_DIR_RELOCATABLE $value
9305_ACEOF
9306
9307
9308
9309
9310
81ecdfbb
RW
9311# Check whether --with-expat was given.
9312if test "${with_expat+set}" = set; then :
9313 withval=$with_expat;
5c39566f
DJ
9314else
9315 with_expat=auto
81ecdfbb
RW
9316fi
9317
9318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9319$as_echo_n "checking whether to use expat... " >&6; }
9320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9321$as_echo "$with_expat" >&6; }
5c39566f
DJ
9322
9323if test "${with_expat}" = no; then
81ecdfbb
RW
9324 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9325$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9326 HAVE_LIBEXPAT=no
9327else
9328
3841debe
DJ
9329
9330
9331
9332
9333
9334
9335
9336 use_additional=yes
9337
9338 acl_save_prefix="$prefix"
9339 prefix="$acl_final_prefix"
9340 acl_save_exec_prefix="$exec_prefix"
9341 exec_prefix="$acl_final_exec_prefix"
9342
9343 eval additional_includedir=\"$includedir\"
9344 eval additional_libdir=\"$libdir\"
9345
9346 exec_prefix="$acl_save_exec_prefix"
9347 prefix="$acl_save_prefix"
9348
9349
81ecdfbb
RW
9350# Check whether --with-libexpat-prefix was given.
9351if test "${with_libexpat_prefix+set}" = set; then :
9352 withval=$with_libexpat_prefix;
3841debe
DJ
9353 if test "X$withval" = "Xno"; then
9354 use_additional=no
9355 else
9356 if test "X$withval" = "X"; then
9357
9358 acl_save_prefix="$prefix"
9359 prefix="$acl_final_prefix"
9360 acl_save_exec_prefix="$exec_prefix"
9361 exec_prefix="$acl_final_exec_prefix"
9362
9363 eval additional_includedir=\"$includedir\"
9364 eval additional_libdir=\"$libdir\"
9365
9366 exec_prefix="$acl_save_exec_prefix"
9367 prefix="$acl_save_prefix"
9368
9369 else
9370 additional_includedir="$withval/include"
9371 additional_libdir="$withval/lib"
9372 fi
9373 fi
9374
81ecdfbb
RW
9375fi
9376
3841debe
DJ
9377 LIBEXPAT=
9378 LTLIBEXPAT=
9379 INCEXPAT=
9380 rpathdirs=
9381 ltrpathdirs=
9382 names_already_handled=
9383 names_next_round='expat '
9384 while test -n "$names_next_round"; do
9385 names_this_round="$names_next_round"
9386 names_next_round=
9387 for name in $names_this_round; do
9388 already_handled=
9389 for n in $names_already_handled; do
9390 if test "$n" = "$name"; then
9391 already_handled=yes
9392 break
9393 fi
9394 done
9395 if test -z "$already_handled"; then
9396 names_already_handled="$names_already_handled $name"
9397 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9398 eval value=\"\$HAVE_LIB$uppername\"
9399 if test -n "$value"; then
9400 if test "$value" = yes; then
9401 eval value=\"\$LIB$uppername\"
9402 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9403 eval value=\"\$LTLIB$uppername\"
9404 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9405 else
9406 :
9407 fi
9408 else
9409 found_dir=
9410 found_la=
9411 found_so=
9412 found_a=
9413 if test $use_additional = yes; then
9414 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9415 found_dir="$additional_libdir"
9416 found_so="$additional_libdir/lib$name.$shlibext"
9417 if test -f "$additional_libdir/lib$name.la"; then
9418 found_la="$additional_libdir/lib$name.la"
9419 fi
9420 else
9421 if test -f "$additional_libdir/lib$name.$libext"; then
9422 found_dir="$additional_libdir"
9423 found_a="$additional_libdir/lib$name.$libext"
9424 if test -f "$additional_libdir/lib$name.la"; then
9425 found_la="$additional_libdir/lib$name.la"
9426 fi
9427 fi
9428 fi
9429 fi
9430 if test "X$found_dir" = "X"; then
9431 for x in $LDFLAGS $LTLIBEXPAT; do
9432
9433 acl_save_prefix="$prefix"
9434 prefix="$acl_final_prefix"
9435 acl_save_exec_prefix="$exec_prefix"
9436 exec_prefix="$acl_final_exec_prefix"
9437 eval x=\"$x\"
9438 exec_prefix="$acl_save_exec_prefix"
9439 prefix="$acl_save_prefix"
9440
9441 case "$x" in
9442 -L*)
9443 dir=`echo "X$x" | sed -e 's/^X-L//'`
9444 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9445 found_dir="$dir"
9446 found_so="$dir/lib$name.$shlibext"
9447 if test -f "$dir/lib$name.la"; then
9448 found_la="$dir/lib$name.la"
9449 fi
9450 else
9451 if test -f "$dir/lib$name.$libext"; then
9452 found_dir="$dir"
9453 found_a="$dir/lib$name.$libext"
9454 if test -f "$dir/lib$name.la"; then
9455 found_la="$dir/lib$name.la"
9456 fi
9457 fi
9458 fi
9459 ;;
9460 esac
9461 if test "X$found_dir" != "X"; then
9462 break
9463 fi
9464 done
9465 fi
9466 if test "X$found_dir" != "X"; then
9467 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9468 if test "X$found_so" != "X"; then
9469 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9470 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9471 else
9472 haveit=
9473 for x in $ltrpathdirs; do
9474 if test "X$x" = "X$found_dir"; then
9475 haveit=yes
9476 break
9477 fi
9478 done
9479 if test -z "$haveit"; then
9480 ltrpathdirs="$ltrpathdirs $found_dir"
9481 fi
9482 if test "$hardcode_direct" = yes; then
9483 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9484 else
9485 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9486 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9487 haveit=
9488 for x in $rpathdirs; do
9489 if test "X$x" = "X$found_dir"; then
9490 haveit=yes
9491 break
9492 fi
9493 done
9494 if test -z "$haveit"; then
9495 rpathdirs="$rpathdirs $found_dir"
9496 fi
9497 else
9498 haveit=
9499 for x in $LDFLAGS $LIBEXPAT; do
9500
9501 acl_save_prefix="$prefix"
9502 prefix="$acl_final_prefix"
9503 acl_save_exec_prefix="$exec_prefix"
9504 exec_prefix="$acl_final_exec_prefix"
9505 eval x=\"$x\"
9506 exec_prefix="$acl_save_exec_prefix"
9507 prefix="$acl_save_prefix"
9508
9509 if test "X$x" = "X-L$found_dir"; then
9510 haveit=yes
9511 break
9512 fi
9513 done
9514 if test -z "$haveit"; then
9515 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9516 fi
9517 if test "$hardcode_minus_L" != no; then
9518 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9519 else
9520 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9521 fi
9522 fi
9523 fi
9524 fi
9525 else
9526 if test "X$found_a" != "X"; then
9527 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9528 else
9529 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9530 fi
9531 fi
9532 additional_includedir=
9533 case "$found_dir" in
9534 */lib | */lib/)
9535 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9536 additional_includedir="$basedir/include"
9537 ;;
9538 esac
9539 if test "X$additional_includedir" != "X"; then
9540 if test "X$additional_includedir" != "X/usr/include"; then
9541 haveit=
9542 if test "X$additional_includedir" = "X/usr/local/include"; then
9543 if test -n "$GCC"; then
9544 case $host_os in
9545 linux*) haveit=yes;;
9546 esac
9547 fi
9548 fi
9549 if test -z "$haveit"; then
9550 for x in $CPPFLAGS $INCEXPAT; do
9551
9552 acl_save_prefix="$prefix"
9553 prefix="$acl_final_prefix"
9554 acl_save_exec_prefix="$exec_prefix"
9555 exec_prefix="$acl_final_exec_prefix"
9556 eval x=\"$x\"
9557 exec_prefix="$acl_save_exec_prefix"
9558 prefix="$acl_save_prefix"
9559
9560 if test "X$x" = "X-I$additional_includedir"; then
9561 haveit=yes
9562 break
9563 fi
9564 done
9565 if test -z "$haveit"; then
9566 if test -d "$additional_includedir"; then
9567 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9568 fi
9569 fi
9570 fi
9571 fi
9572 fi
9573 if test -n "$found_la"; then
9574 save_libdir="$libdir"
9575 case "$found_la" in
9576 */* | *\\*) . "$found_la" ;;
9577 *) . "./$found_la" ;;
9578 esac
9579 libdir="$save_libdir"
9580 for dep in $dependency_libs; do
9581 case "$dep" in
9582 -L*)
9583 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9584 if test "X$additional_libdir" != "X/usr/lib"; then
9585 haveit=
9586 if test "X$additional_libdir" = "X/usr/local/lib"; then
9587 if test -n "$GCC"; then
9588 case $host_os in
9589 linux*) haveit=yes;;
9590 esac
9591 fi
9592 fi
9593 if test -z "$haveit"; then
9594 haveit=
9595 for x in $LDFLAGS $LIBEXPAT; do
9596
9597 acl_save_prefix="$prefix"
9598 prefix="$acl_final_prefix"
9599 acl_save_exec_prefix="$exec_prefix"
9600 exec_prefix="$acl_final_exec_prefix"
9601 eval x=\"$x\"
9602 exec_prefix="$acl_save_exec_prefix"
9603 prefix="$acl_save_prefix"
9604
9605 if test "X$x" = "X-L$additional_libdir"; then
9606 haveit=yes
9607 break
9608 fi
9609 done
9610 if test -z "$haveit"; then
9611 if test -d "$additional_libdir"; then
9612 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9613 fi
9614 fi
9615 haveit=
9616 for x in $LDFLAGS $LTLIBEXPAT; do
9617
9618 acl_save_prefix="$prefix"
9619 prefix="$acl_final_prefix"
9620 acl_save_exec_prefix="$exec_prefix"
9621 exec_prefix="$acl_final_exec_prefix"
9622 eval x=\"$x\"
9623 exec_prefix="$acl_save_exec_prefix"
9624 prefix="$acl_save_prefix"
9625
9626 if test "X$x" = "X-L$additional_libdir"; then
9627 haveit=yes
9628 break
9629 fi
9630 done
9631 if test -z "$haveit"; then
9632 if test -d "$additional_libdir"; then
9633 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9634 fi
9635 fi
9636 fi
9637 fi
9638 ;;
9639 -R*)
9640 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9641 if test "$enable_rpath" != no; then
9642 haveit=
9643 for x in $rpathdirs; do
9644 if test "X$x" = "X$dir"; then
9645 haveit=yes
9646 break
9647 fi
9648 done
9649 if test -z "$haveit"; then
9650 rpathdirs="$rpathdirs $dir"
9651 fi
9652 haveit=
9653 for x in $ltrpathdirs; do
9654 if test "X$x" = "X$dir"; then
9655 haveit=yes
9656 break
9657 fi
9658 done
9659 if test -z "$haveit"; then
9660 ltrpathdirs="$ltrpathdirs $dir"
9661 fi
9662 fi
9663 ;;
9664 -l*)
9665 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9666 ;;
9667 *.la)
9668 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9669 ;;
9670 *)
9671 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9672 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9673 ;;
81ecdfbb
RW
9674 esac
9675 done
9676 fi
9677 else
9678 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9679 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9680 fi
9681 fi
9682 fi
9683 done
9684 done
9685 if test "X$rpathdirs" != "X"; then
9686 if test -n "$hardcode_libdir_separator"; then
9687 alldirs=
9688 for found_dir in $rpathdirs; do
9689 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9690 done
9691 acl_save_libdir="$libdir"
9692 libdir="$alldirs"
9693 eval flag=\"$hardcode_libdir_flag_spec\"
9694 libdir="$acl_save_libdir"
9695 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9696 else
9697 for found_dir in $rpathdirs; do
9698 acl_save_libdir="$libdir"
9699 libdir="$found_dir"
9700 eval flag=\"$hardcode_libdir_flag_spec\"
9701 libdir="$acl_save_libdir"
9702 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9703 done
9704 fi
9705 fi
9706 if test "X$ltrpathdirs" != "X"; then
9707 for found_dir in $ltrpathdirs; do
9708 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9709 done
9710 fi
a9322a30
TT
9711
9712
81ecdfbb 9713 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9714
81ecdfbb
RW
9715 for element in $INCEXPAT; do
9716 haveit=
9717 for x in $CPPFLAGS; do
a9322a30 9718
81ecdfbb
RW
9719 acl_save_prefix="$prefix"
9720 prefix="$acl_final_prefix"
9721 acl_save_exec_prefix="$exec_prefix"
9722 exec_prefix="$acl_final_exec_prefix"
9723 eval x=\"$x\"
9724 exec_prefix="$acl_save_exec_prefix"
9725 prefix="$acl_save_prefix"
a8111142 9726
81ecdfbb
RW
9727 if test "X$x" = "X$element"; then
9728 haveit=yes
9729 break
9730 fi
9731 done
9732 if test -z "$haveit"; then
9733 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9734 fi
9735 done
a9322a30
TT
9736
9737
81ecdfbb
RW
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9739$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9740if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9741 $as_echo_n "(cached) " >&6
bec39cab 9742else
bec39cab 9743
81ecdfbb
RW
9744 ac_save_LIBS="$LIBS"
9745 LIBS="$LIBS $LIBEXPAT"
9746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9747/* end confdefs.h. */
81ecdfbb
RW
9748#include "expat.h"
9749int
9750main ()
9751{
9752XML_Parser p = XML_ParserCreate (0);
9753 ;
9754 return 0;
9755}
bec39cab 9756_ACEOF
81ecdfbb
RW
9757if ac_fn_c_try_link "$LINENO"; then :
9758 ac_cv_libexpat=yes
c906108c 9759else
81ecdfbb 9760 ac_cv_libexpat=no
bec39cab 9761fi
81ecdfbb
RW
9762rm -f core conftest.err conftest.$ac_objext \
9763 conftest$ac_exeext conftest.$ac_ext
9764 LIBS="$ac_save_LIBS"
c906108c 9765
95ca63c4 9766fi
81ecdfbb
RW
9767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9768$as_echo "$ac_cv_libexpat" >&6; }
9769 if test "$ac_cv_libexpat" = yes; then
9770 HAVE_LIBEXPAT=yes
bec39cab 9771
81ecdfbb 9772$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9773
81ecdfbb
RW
9774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9775$as_echo_n "checking how to link with libexpat... " >&6; }
9776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9777$as_echo "$LIBEXPAT" >&6; }
9778 else
9779 HAVE_LIBEXPAT=no
9780 CPPFLAGS="$ac_save_CPPFLAGS"
9781 LIBEXPAT=
9782 LTLIBEXPAT=
9783 fi
95ca63c4
CF
9784
9785
9786
7cb9022a
MK
9787
9788
bec39cab 9789
81ecdfbb
RW
9790 if test "$HAVE_LIBEXPAT" != yes; then
9791 if test "$with_expat" = yes; then
d0ac1c44 9792 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9793 else
9794 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9795$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9796 fi
9797 else
9798 save_LIBS=$LIBS
9799 LIBS="$LIBS $LIBEXPAT"
9800 for ac_func in XML_StopParser
9801do :
9802 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9803if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9804 cat >>confdefs.h <<_ACEOF
81ecdfbb 9805#define HAVE_XML_STOPPARSER 1
bec39cab 9806_ACEOF
95ca63c4 9807
bec39cab 9808fi
bec39cab 9809done
95ca63c4 9810
81ecdfbb
RW
9811 LIBS=$save_LIBS
9812 fi
a9322a30
TT
9813fi
9814
2400729e
UW
9815
9816# Check whether --with-mpfr was given.
9817if test "${with_mpfr+set}" = set; then :
9818 withval=$with_mpfr;
9819else
9820 with_mpfr=auto
9821fi
9822
9823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9824$as_echo_n "checking whether to use MPFR... " >&6; }
9825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9826$as_echo "$with_mpfr" >&6; }
9827
9828if test "${with_mpfr}" = no; then
9829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9830$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9831 HAVE_LIBMPFR=no
9832else
9833
9834
9835
9836
9837
9838
9839
9840
9841 use_additional=yes
9842
9843 acl_save_prefix="$prefix"
9844 prefix="$acl_final_prefix"
9845 acl_save_exec_prefix="$exec_prefix"
9846 exec_prefix="$acl_final_exec_prefix"
9847
9848 eval additional_includedir=\"$includedir\"
9849 eval additional_libdir=\"$libdir\"
9850
9851 exec_prefix="$acl_save_exec_prefix"
9852 prefix="$acl_save_prefix"
9853
9854
9855# Check whether --with-libmpfr-prefix was given.
9856if test "${with_libmpfr_prefix+set}" = set; then :
9857 withval=$with_libmpfr_prefix;
9858 if test "X$withval" = "Xno"; then
9859 use_additional=no
9860 else
9861 if test "X$withval" = "X"; then
9862
9863 acl_save_prefix="$prefix"
9864 prefix="$acl_final_prefix"
9865 acl_save_exec_prefix="$exec_prefix"
9866 exec_prefix="$acl_final_exec_prefix"
9867
9868 eval additional_includedir=\"$includedir\"
9869 eval additional_libdir=\"$libdir\"
9870
9871 exec_prefix="$acl_save_exec_prefix"
9872 prefix="$acl_save_prefix"
9873
9874 else
9875 additional_includedir="$withval/include"
9876 additional_libdir="$withval/lib"
9877 fi
9878 fi
9879
9880fi
9881
9882 LIBMPFR=
9883 LTLIBMPFR=
9884 INCMPFR=
9885 rpathdirs=
9886 ltrpathdirs=
9887 names_already_handled=
da658607 9888 names_next_round='mpfr gmp'
2400729e
UW
9889 while test -n "$names_next_round"; do
9890 names_this_round="$names_next_round"
9891 names_next_round=
9892 for name in $names_this_round; do
9893 already_handled=
9894 for n in $names_already_handled; do
9895 if test "$n" = "$name"; then
9896 already_handled=yes
9897 break
9898 fi
9899 done
9900 if test -z "$already_handled"; then
9901 names_already_handled="$names_already_handled $name"
9902 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9903 eval value=\"\$HAVE_LIB$uppername\"
9904 if test -n "$value"; then
9905 if test "$value" = yes; then
9906 eval value=\"\$LIB$uppername\"
9907 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9908 eval value=\"\$LTLIB$uppername\"
9909 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9910 else
9911 :
9912 fi
9913 else
9914 found_dir=
9915 found_la=
9916 found_so=
9917 found_a=
9918 if test $use_additional = yes; then
9919 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9920 found_dir="$additional_libdir"
9921 found_so="$additional_libdir/lib$name.$shlibext"
9922 if test -f "$additional_libdir/lib$name.la"; then
9923 found_la="$additional_libdir/lib$name.la"
9924 fi
9925 else
9926 if test -f "$additional_libdir/lib$name.$libext"; then
9927 found_dir="$additional_libdir"
9928 found_a="$additional_libdir/lib$name.$libext"
9929 if test -f "$additional_libdir/lib$name.la"; then
9930 found_la="$additional_libdir/lib$name.la"
9931 fi
9932 fi
9933 fi
9934 fi
9935 if test "X$found_dir" = "X"; then
9936 for x in $LDFLAGS $LTLIBMPFR; do
9937
9938 acl_save_prefix="$prefix"
9939 prefix="$acl_final_prefix"
9940 acl_save_exec_prefix="$exec_prefix"
9941 exec_prefix="$acl_final_exec_prefix"
9942 eval x=\"$x\"
9943 exec_prefix="$acl_save_exec_prefix"
9944 prefix="$acl_save_prefix"
9945
9946 case "$x" in
9947 -L*)
9948 dir=`echo "X$x" | sed -e 's/^X-L//'`
9949 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9950 found_dir="$dir"
9951 found_so="$dir/lib$name.$shlibext"
9952 if test -f "$dir/lib$name.la"; then
9953 found_la="$dir/lib$name.la"
9954 fi
9955 else
9956 if test -f "$dir/lib$name.$libext"; then
9957 found_dir="$dir"
9958 found_a="$dir/lib$name.$libext"
9959 if test -f "$dir/lib$name.la"; then
9960 found_la="$dir/lib$name.la"
9961 fi
9962 fi
9963 fi
9964 ;;
9965 esac
9966 if test "X$found_dir" != "X"; then
9967 break
9968 fi
9969 done
9970 fi
9971 if test "X$found_dir" != "X"; then
9972 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9973 if test "X$found_so" != "X"; then
9974 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9975 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9976 else
9977 haveit=
9978 for x in $ltrpathdirs; do
9979 if test "X$x" = "X$found_dir"; then
9980 haveit=yes
9981 break
9982 fi
9983 done
9984 if test -z "$haveit"; then
9985 ltrpathdirs="$ltrpathdirs $found_dir"
9986 fi
9987 if test "$hardcode_direct" = yes; then
9988 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9989 else
9990 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9991 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9992 haveit=
9993 for x in $rpathdirs; do
9994 if test "X$x" = "X$found_dir"; then
9995 haveit=yes
9996 break
9997 fi
9998 done
9999 if test -z "$haveit"; then
10000 rpathdirs="$rpathdirs $found_dir"
10001 fi
10002 else
10003 haveit=
10004 for x in $LDFLAGS $LIBMPFR; do
10005
10006 acl_save_prefix="$prefix"
10007 prefix="$acl_final_prefix"
10008 acl_save_exec_prefix="$exec_prefix"
10009 exec_prefix="$acl_final_exec_prefix"
10010 eval x=\"$x\"
10011 exec_prefix="$acl_save_exec_prefix"
10012 prefix="$acl_save_prefix"
10013
10014 if test "X$x" = "X-L$found_dir"; then
10015 haveit=yes
10016 break
10017 fi
10018 done
10019 if test -z "$haveit"; then
10020 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10021 fi
10022 if test "$hardcode_minus_L" != no; then
10023 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10024 else
10025 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10026 fi
10027 fi
10028 fi
10029 fi
10030 else
10031 if test "X$found_a" != "X"; then
10032 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10033 else
10034 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10035 fi
10036 fi
10037 additional_includedir=
10038 case "$found_dir" in
10039 */lib | */lib/)
10040 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10041 additional_includedir="$basedir/include"
10042 ;;
10043 esac
10044 if test "X$additional_includedir" != "X"; then
10045 if test "X$additional_includedir" != "X/usr/include"; then
10046 haveit=
10047 if test "X$additional_includedir" = "X/usr/local/include"; then
10048 if test -n "$GCC"; then
10049 case $host_os in
10050 linux*) haveit=yes;;
10051 esac
10052 fi
10053 fi
10054 if test -z "$haveit"; then
10055 for x in $CPPFLAGS $INCMPFR; do
10056
10057 acl_save_prefix="$prefix"
10058 prefix="$acl_final_prefix"
10059 acl_save_exec_prefix="$exec_prefix"
10060 exec_prefix="$acl_final_exec_prefix"
10061 eval x=\"$x\"
10062 exec_prefix="$acl_save_exec_prefix"
10063 prefix="$acl_save_prefix"
10064
10065 if test "X$x" = "X-I$additional_includedir"; then
10066 haveit=yes
10067 break
10068 fi
10069 done
10070 if test -z "$haveit"; then
10071 if test -d "$additional_includedir"; then
10072 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10073 fi
10074 fi
10075 fi
10076 fi
10077 fi
10078 if test -n "$found_la"; then
10079 save_libdir="$libdir"
10080 case "$found_la" in
10081 */* | *\\*) . "$found_la" ;;
10082 *) . "./$found_la" ;;
10083 esac
10084 libdir="$save_libdir"
10085 for dep in $dependency_libs; do
10086 case "$dep" in
10087 -L*)
10088 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10089 if test "X$additional_libdir" != "X/usr/lib"; then
10090 haveit=
10091 if test "X$additional_libdir" = "X/usr/local/lib"; then
10092 if test -n "$GCC"; then
10093 case $host_os in
10094 linux*) haveit=yes;;
10095 esac
10096 fi
10097 fi
10098 if test -z "$haveit"; then
10099 haveit=
10100 for x in $LDFLAGS $LIBMPFR; do
10101
10102 acl_save_prefix="$prefix"
10103 prefix="$acl_final_prefix"
10104 acl_save_exec_prefix="$exec_prefix"
10105 exec_prefix="$acl_final_exec_prefix"
10106 eval x=\"$x\"
10107 exec_prefix="$acl_save_exec_prefix"
10108 prefix="$acl_save_prefix"
10109
10110 if test "X$x" = "X-L$additional_libdir"; then
10111 haveit=yes
10112 break
10113 fi
10114 done
10115 if test -z "$haveit"; then
10116 if test -d "$additional_libdir"; then
10117 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10118 fi
10119 fi
10120 haveit=
10121 for x in $LDFLAGS $LTLIBMPFR; do
10122
10123 acl_save_prefix="$prefix"
10124 prefix="$acl_final_prefix"
10125 acl_save_exec_prefix="$exec_prefix"
10126 exec_prefix="$acl_final_exec_prefix"
10127 eval x=\"$x\"
10128 exec_prefix="$acl_save_exec_prefix"
10129 prefix="$acl_save_prefix"
10130
10131 if test "X$x" = "X-L$additional_libdir"; then
10132 haveit=yes
10133 break
10134 fi
10135 done
10136 if test -z "$haveit"; then
10137 if test -d "$additional_libdir"; then
10138 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10139 fi
10140 fi
10141 fi
10142 fi
10143 ;;
10144 -R*)
10145 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10146 if test "$enable_rpath" != no; then
10147 haveit=
10148 for x in $rpathdirs; do
10149 if test "X$x" = "X$dir"; then
10150 haveit=yes
10151 break
10152 fi
10153 done
10154 if test -z "$haveit"; then
10155 rpathdirs="$rpathdirs $dir"
10156 fi
10157 haveit=
10158 for x in $ltrpathdirs; do
10159 if test "X$x" = "X$dir"; then
10160 haveit=yes
10161 break
10162 fi
10163 done
10164 if test -z "$haveit"; then
10165 ltrpathdirs="$ltrpathdirs $dir"
10166 fi
10167 fi
10168 ;;
10169 -l*)
10170 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10171 ;;
10172 *.la)
10173 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10174 ;;
10175 *)
10176 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10177 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10178 ;;
10179 esac
10180 done
10181 fi
10182 else
10183 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10184 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10185 fi
10186 fi
10187 fi
10188 done
10189 done
10190 if test "X$rpathdirs" != "X"; then
10191 if test -n "$hardcode_libdir_separator"; then
10192 alldirs=
10193 for found_dir in $rpathdirs; do
10194 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10195 done
10196 acl_save_libdir="$libdir"
10197 libdir="$alldirs"
10198 eval flag=\"$hardcode_libdir_flag_spec\"
10199 libdir="$acl_save_libdir"
10200 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10201 else
10202 for found_dir in $rpathdirs; do
10203 acl_save_libdir="$libdir"
10204 libdir="$found_dir"
10205 eval flag=\"$hardcode_libdir_flag_spec\"
10206 libdir="$acl_save_libdir"
10207 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10208 done
10209 fi
10210 fi
10211 if test "X$ltrpathdirs" != "X"; then
10212 for found_dir in $ltrpathdirs; do
10213 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10214 done
10215 fi
10216
10217
10218 ac_save_CPPFLAGS="$CPPFLAGS"
10219
10220 for element in $INCMPFR; do
10221 haveit=
10222 for x in $CPPFLAGS; do
10223
10224 acl_save_prefix="$prefix"
10225 prefix="$acl_final_prefix"
10226 acl_save_exec_prefix="$exec_prefix"
10227 exec_prefix="$acl_final_exec_prefix"
10228 eval x=\"$x\"
10229 exec_prefix="$acl_save_exec_prefix"
10230 prefix="$acl_save_prefix"
10231
10232 if test "X$x" = "X$element"; then
10233 haveit=yes
10234 break
10235 fi
10236 done
10237 if test -z "$haveit"; then
10238 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10239 fi
10240 done
10241
10242
10243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10244$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10245if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10246 $as_echo_n "(cached) " >&6
10247else
10248
10249 ac_save_LIBS="$LIBS"
10250 LIBS="$LIBS $LIBMPFR"
10251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10252/* end confdefs.h. */
10253#include <mpfr.h>
10254int
10255main ()
10256{
10257mpfr_exp_t exp; mpfr_t x;
10258 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10259 ;
10260 return 0;
10261}
10262_ACEOF
10263if ac_fn_c_try_link "$LINENO"; then :
10264 ac_cv_libmpfr=yes
10265else
10266 ac_cv_libmpfr=no
10267fi
10268rm -f core conftest.err conftest.$ac_objext \
10269 conftest$ac_exeext conftest.$ac_ext
10270 LIBS="$ac_save_LIBS"
10271
10272fi
10273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10274$as_echo "$ac_cv_libmpfr" >&6; }
10275 if test "$ac_cv_libmpfr" = yes; then
10276 HAVE_LIBMPFR=yes
10277
10278$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10279
10280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10281$as_echo_n "checking how to link with libmpfr... " >&6; }
10282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10283$as_echo "$LIBMPFR" >&6; }
10284 else
10285 HAVE_LIBMPFR=no
10286 CPPFLAGS="$ac_save_CPPFLAGS"
10287 LIBMPFR=
10288 LTLIBMPFR=
10289 fi
10290
10291
10292
10293
10294
10295
10296 if test "$HAVE_LIBMPFR" != yes; then
10297 if test "$with_mpfr" = yes; then
d0ac1c44 10298 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10299 else
10300 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10301$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10302 fi
10303 fi
10304fi
10305
d344e670
DE
10306# --------------------- #
10307# Check for libpython. #
10308# --------------------- #
10309
a9322a30 10310
a9322a30
TT
10311
10312
ec685c5e 10313
0c4a4063 10314
81ecdfbb
RW
10315# Check whether --with-python was given.
10316if test "${with_python+set}" = set; then :
10317 withval=$with_python;
bec39cab 10318else
81ecdfbb 10319 with_python=auto
bec39cab 10320fi
bec39cab 10321
81ecdfbb
RW
10322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10323$as_echo_n "checking whether to use python... " >&6; }
10324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10325$as_echo "$with_python" >&6; }
9a156167 10326
81ecdfbb
RW
10327if test "${with_python}" = no; then
10328 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10329$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10330 have_libpython=no
bec39cab 10331else
81ecdfbb 10332 case "${with_python}" in
8c85a4e2 10333 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10334 if test -d ${with_python}; then
10335 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10336 python_prog="${with_python}/bin/python"
0c4a4063 10337 python_prefix=
9c4ea6c5
JB
10338 # If python does not exit ${with_python}/bin, then try in
10339 # ${with_python}. On Windows/MinGW, this is where the Python
10340 # executable is.
10341 if test ! -x "${python_prog}"; then
10342 python_prog="${with_python}/python"
10343 python_prefix=
10344 fi
e7a30f46 10345 if test ! -x "${python_prog}"; then
ec685c5e
DE
10346 # Fall back to gdb 7.0/7.1 behaviour.
10347 python_prog=missing
0c4a4063 10348 python_prefix=${with_python}
ec685c5e 10349 fi
e7a30f46 10350 elif test -x "${with_python}"; then
ec685c5e
DE
10351 # While we can't run python compiled for $host (unless host == build),
10352 # the user could write a script that provides the needed information,
10353 # so we support that.
ec685c5e 10354 python_prog=${with_python}
0c4a4063 10355 python_prefix=
ec685c5e 10356 else
d0ac1c44 10357 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10358 fi
81ecdfbb 10359 ;;
ec685c5e
DE
10360 */*)
10361 # Disallow --with-python=foo/bar.
d0ac1c44 10362 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10363 ;;
ec685c5e
DE
10364 *)
10365 # The user has either specified auto, yes, or the name of the python
10366 # program assumed to be in $PATH.
10367 python_prefix=
10368 case "${with_python}" in
10369 yes | auto)
10370 if test ${build} = ${host}; then
10371 # Extract the first word of "python", so it can be a program name with args.
10372set dummy python; ac_word=$2
10373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10374$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10375if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10376 $as_echo_n "(cached) " >&6
10377else
10378 case $python_prog_path in
10379 [\\/]* | ?:[\\/]*)
10380 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10381 ;;
10382 *)
10383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10384for as_dir in $PATH
10385do
10386 IFS=$as_save_IFS
10387 test -z "$as_dir" && as_dir=.
10388 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10389 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10390 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10391 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10392 break 2
10393 fi
10394done
10395 done
10396IFS=$as_save_IFS
10397
10398 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10399 ;;
10400esac
10401fi
10402python_prog_path=$ac_cv_path_python_prog_path
10403if test -n "$python_prog_path"; then
10404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10405$as_echo "$python_prog_path" >&6; }
10406else
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10408$as_echo "no" >&6; }
10409fi
10410
10411
10412 if test "${python_prog_path}" = missing; then
10413 python_prog=missing
10414 else
10415 python_prog=${python_prog_path}
10416 fi
10417 else
10418 # Not much we can do except assume the cross-compiler will find the
10419 # right files.
10420 python_prog=missing
10421 fi
10422 ;;
10423 *)
10424 # While we can't run python compiled for $host (unless host == build),
10425 # the user could write a script that provides the needed information,
10426 # so we support that.
10427 python_prog="${with_python}"
10428 # Extract the first word of "${python_prog}", so it can be a program name with args.
10429set dummy ${python_prog}; ac_word=$2
10430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10431$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10432if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10433 $as_echo_n "(cached) " >&6
10434else
10435 case $python_prog_path in
10436 [\\/]* | ?:[\\/]*)
10437 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10438 ;;
10439 *)
10440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10441for as_dir in $PATH
10442do
10443 IFS=$as_save_IFS
10444 test -z "$as_dir" && as_dir=.
10445 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10446 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10447 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10449 break 2
10450 fi
10451done
10452 done
10453IFS=$as_save_IFS
10454
10455 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10456 ;;
10457esac
10458fi
10459python_prog_path=$ac_cv_path_python_prog_path
10460if test -n "$python_prog_path"; then
10461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10462$as_echo "$python_prog_path" >&6; }
10463else
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10465$as_echo "no" >&6; }
10466fi
10467
10468
10469 if test "${python_prog_path}" = missing; then
d0ac1c44 10470 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10471 fi
10472 ;;
10473 esac
81ecdfbb
RW
10474 esac
10475
ec685c5e 10476 if test "${python_prog}" != missing; then
e7a30f46
DE
10477 # We have a python program to use, but it may be too old.
10478 # Don't flag an error for --with-python=auto (the default).
10479 have_python_config=yes
ec685c5e
DE
10480 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10481 if test $? != 0; then
e7a30f46
DE
10482 have_python_config=failed
10483 if test "${with_python}" != auto; then
d0ac1c44 10484 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10485 fi
ec685c5e
DE
10486 fi
10487 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10488 if test $? != 0; then
e7a30f46
DE
10489 have_python_config=failed
10490 if test "${with_python}" != auto; then
d0ac1c44 10491 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10492 fi
ec685c5e 10493 fi
0c4a4063
DE
10494 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10495 if test $? != 0; then
e7a30f46
DE
10496 have_python_config=failed
10497 if test "${with_python}" != auto; then
d0ac1c44 10498 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10499 fi
0c4a4063 10500 fi
ec685c5e 10501 else
ac534cba
JB
10502 # We do not have a python executable we can use to determine where
10503 # to find the Python headers and libs. We cannot guess the include
10504 # path from the python_prefix either, because that include path
10505 # depends on the Python version. So, there is nothing much we can
10506 # do except assume that the compiler will be able to find those files.
10507 python_includes=
10508 python_libs=
0c4a4063 10509 have_python_config=no
ec685c5e 10510 fi
bec39cab 10511
ec685c5e
DE
10512 # If we have python-config, only try the configuration it provides.
10513 # Otherwise fallback on the old way of trying different versions of
10514 # python in turn.
81ecdfbb 10515
ec685c5e
DE
10516 have_libpython=no
10517 if test "${have_python_config}" = yes; then
c1039e3c
JB
10518 # Determine the Python version by extracting "-lpython<version>"
10519 # part of the python_libs. <version> is usually X.Y with X and Y
10520 # being decimal numbers, but can also be XY (seen on Windows).
10521 #
10522 # The extraction is performed using sed with a regular expression.
10523 # Initially, the regexp used was using the '?' quantifier to make
10524 # the dot in the version number optional. Unfortunately, this
10525 # does not work with non-GNU versions of sed because, because of
10526 # what looks like a limitation (the '?' quantifier does not work
10527 # with back-references). We work around this limitation by using
10528 # the '*' quantifier instead. It means that, in theory, we might
10529 # match unexpected version strings such as "-lpython2..7", but
10530 # this seems unlikely in practice. And even if that happens,
10531 # an error will be triggered later on, when checking that version
10532 # number.
ec685c5e 10533 python_version=`echo " ${python_libs} " \
c1039e3c 10534 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10535 case "${python_version}" in
10536 python*)
ec685c5e
DE
10537
10538 version=${python_version}
10539
10540 new_CPPFLAGS=${python_includes}
10541 new_LIBS=${python_libs}
81ecdfbb
RW
10542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10543$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10544 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10545 save_LIBS=$LIBS
ec685c5e 10546 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10547 LIBS="$new_LIBS $LIBS"
ec685c5e 10548 found_usable_python=no
81ecdfbb 10549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10550/* end confdefs.h. */
ac534cba 10551#include "Python.h"
81ecdfbb
RW
10552int
10553main ()
10554{
10555Py_Initialize ();
10556 ;
10557 return 0;
10558}
bec39cab 10559_ACEOF
81ecdfbb 10560if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10561 have_libpython=${version}
10562 found_usable_python=yes
ac534cba
JB
10563 PYTHON_CPPFLAGS=$new_CPPFLAGS
10564 PYTHON_LIBS=$new_LIBS
9a156167 10565fi
81ecdfbb
RW
10566rm -f core conftest.err conftest.$ac_objext \
10567 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10568 CPPFLAGS=$save_CPPFLAGS
10569 LIBS=$save_LIBS
ec685c5e
DE
10570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10571$as_echo "${found_usable_python}" >&6; }
9a156167 10572
0c4a4063
DE
10573 ;;
10574 *)
d0ac1c44 10575 as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10576 ;;
10577 esac
e7a30f46 10578 elif test "${have_python_config}" != failed; then
ec685c5e 10579 if test "${have_libpython}" = no; then
9a156167 10580
420697bb
TT
10581 version=python2.7
10582
10583 new_CPPFLAGS=${python_includes}
bf27f0e2 10584 new_LIBS="-lpython2.7 ${python_libs}"
420697bb
TT
10585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10586$as_echo_n "checking for ${version}... " >&6; }
10587 save_CPPFLAGS=$CPPFLAGS
10588 save_LIBS=$LIBS
10589 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10590 LIBS="$new_LIBS $LIBS"
420697bb
TT
10591 found_usable_python=no
10592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10593/* end confdefs.h. */
ac534cba 10594#include "Python.h"
420697bb
TT
10595int
10596main ()
10597{
10598Py_Initialize ();
10599 ;
10600 return 0;
10601}
10602_ACEOF
10603if ac_fn_c_try_link "$LINENO"; then :
10604 have_libpython=${version}
10605 found_usable_python=yes
ac534cba
JB
10606 PYTHON_CPPFLAGS=$new_CPPFLAGS
10607 PYTHON_LIBS=$new_LIBS
420697bb
TT
10608fi
10609rm -f core conftest.err conftest.$ac_objext \
10610 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10611 CPPFLAGS=$save_CPPFLAGS
10612 LIBS=$save_LIBS
420697bb
TT
10613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10614$as_echo "${found_usable_python}" >&6; }
10615
10616 fi
10617 if test "${have_libpython}" = no; then
10618
ec685c5e
DE
10619 version=python2.6
10620
10621 new_CPPFLAGS=${python_includes}
bf27f0e2 10622 new_LIBS="-lpython2.6 ${python_libs}"
ec685c5e
DE
10623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10624$as_echo_n "checking for ${version}... " >&6; }
10625 save_CPPFLAGS=$CPPFLAGS
10626 save_LIBS=$LIBS
10627 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10628 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10629 found_usable_python=no
10630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10631/* end confdefs.h. */
ac534cba 10632#include "Python.h"
ec685c5e
DE
10633int
10634main ()
10635{
10636Py_Initialize ();
10637 ;
10638 return 0;
10639}
10640_ACEOF
10641if ac_fn_c_try_link "$LINENO"; then :
10642 have_libpython=${version}
10643 found_usable_python=yes
ac534cba
JB
10644 PYTHON_CPPFLAGS=$new_CPPFLAGS
10645 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
10646fi
10647rm -f core conftest.err conftest.$ac_objext \
10648 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10649 CPPFLAGS=$save_CPPFLAGS
10650 LIBS=$save_LIBS
ec685c5e
DE
10651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10652$as_echo "${found_usable_python}" >&6; }
9a156167 10653
81ecdfbb 10654 fi
ec685c5e 10655 if test ${have_libpython} = no; then
9a156167 10656
81ecdfbb 10657 version=python2.5
9a156167 10658
ec685c5e 10659 new_CPPFLAGS=${python_includes}
bf27f0e2 10660 new_LIBS="-lpython2.5 ${python_libs}"
81ecdfbb
RW
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10662$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10663 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10664 save_LIBS=$LIBS
ec685c5e 10665 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10666 LIBS="$new_LIBS $LIBS"
ec685c5e 10667 found_usable_python=no
81ecdfbb 10668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10669/* end confdefs.h. */
ac534cba 10670#include "Python.h"
81ecdfbb
RW
10671int
10672main ()
10673{
10674Py_Initialize ();
10675 ;
10676 return 0;
10677}
436868fb 10678_ACEOF
81ecdfbb 10679if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10680 have_libpython=${version}
10681 found_usable_python=yes
ac534cba
JB
10682 PYTHON_CPPFLAGS=$new_CPPFLAGS
10683 PYTHON_LIBS=$new_LIBS
436868fb 10684fi
81ecdfbb
RW
10685rm -f core conftest.err conftest.$ac_objext \
10686 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10687 CPPFLAGS=$save_CPPFLAGS
10688 LIBS=$save_LIBS
ec685c5e
DE
10689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10690$as_echo "${found_usable_python}" >&6; }
a9322a30 10691
81ecdfbb 10692 fi
ec685c5e 10693 if test ${have_libpython} = no; then
a9322a30 10694
81ecdfbb 10695 version=python2.4
a9322a30 10696
ec685c5e 10697 new_CPPFLAGS=${python_includes}
bf27f0e2 10698 new_LIBS="-lpython2.4 ${python_libs}"
81ecdfbb
RW
10699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10700$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10701 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10702 save_LIBS=$LIBS
ec685c5e 10703 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10704 LIBS="$new_LIBS $LIBS"
ec685c5e 10705 found_usable_python=no
81ecdfbb 10706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10707/* end confdefs.h. */
ac534cba 10708#include "Python.h"
a9322a30
TT
10709int
10710main ()
10711{
81ecdfbb 10712Py_Initialize ();
a9322a30
TT
10713 ;
10714 return 0;
10715}
436868fb 10716_ACEOF
81ecdfbb 10717if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10718 have_libpython=${version}
10719 found_usable_python=yes
ac534cba
JB
10720 PYTHON_CPPFLAGS=$new_CPPFLAGS
10721 PYTHON_LIBS=$new_LIBS
436868fb 10722fi
81ecdfbb
RW
10723rm -f core conftest.err conftest.$ac_objext \
10724 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10725 CPPFLAGS=$save_CPPFLAGS
10726 LIBS=$save_LIBS
ec685c5e
DE
10727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10728$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10729
ec685c5e
DE
10730 fi
10731 fi
9c4ea6c5 10732 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10733
10734$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10735
9c4ea6c5 10736 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10737
10738$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10739
9c4ea6c5 10740 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10741
10742$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10743
9c4ea6c5 10744 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10745
10746$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10747
81ecdfbb 10748 fi
ec685c5e
DE
10749
10750 if test "${have_libpython}" = no; then
81ecdfbb
RW
10751 case "${with_python}" in
10752 yes)
d0ac1c44 10753 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10754 ;;
10755 auto)
10756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10757$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10758 ;;
10759 *)
d0ac1c44 10760 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10761 ;;
10762 esac
0c4a4063
DE
10763 else
10764 if test -n "${python_prefix}"; then
10765
10766cat >>confdefs.h <<_ACEOF
10767#define WITH_PYTHON_PATH "${python_prefix}"
10768_ACEOF
10769
10770
10771 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10772 if test "x$prefix" = xNONE; then
10773 test_prefix=/usr/local
10774 else
10775 test_prefix=$prefix
10776 fi
10777 else
10778 test_prefix=$exec_prefix
10779 fi
10780 value=0
10781 case ${python_prefix} in
10782 "${test_prefix}"|"${test_prefix}/"*|\
10783 '${exec_prefix}'|'${exec_prefix}/'*)
10784 value=1
10785 ;;
10786 esac
10787
10788cat >>confdefs.h <<_ACEOF
10789#define PYTHON_PATH_RELOCATABLE $value
10790_ACEOF
10791
10792
10793 fi
81ecdfbb 10794 fi
436868fb 10795fi
436868fb 10796
ec685c5e 10797if test "${have_libpython}" != no; then
436868fb 10798
81ecdfbb 10799$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10800
81ecdfbb
RW
10801 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10802 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10803 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10804 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10805 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10806
81ecdfbb
RW
10807 # Flags needed to compile Python code (taken from python-config --cflags).
10808 # We cannot call python-config directly because it will output whatever was
10809 # used when compiling the Python interpreter itself, including flags which
10810 # would make the python-related objects be compiled differently from the
10811 # rest of GDB (e.g., -O2 and -fPIC).
10812 if test "${GCC}" = yes; then
ae292b3a
TT
10813 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10814 # Python headers recommend -DNDEBUG, but it's unclear if that just
10815 # refers to building Python itself. In release mode, though, it
10816 # doesn't hurt for the Python code in gdb to follow.
10817 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10818 fi
436868fb 10819
81ecdfbb
RW
10820 if test "x${tentative_python_cflags}" != x; then
10821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10822$as_echo_n "checking compiler flags for python code... " >&6; }
10823 for flag in ${tentative_python_cflags}; do
10824 # Check that the compiler accepts it
10825 saved_CFLAGS="$CFLAGS"
10826 CFLAGS="$CFLAGS $flag"
10827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10828/* end confdefs.h. */
81ecdfbb 10829
a9322a30
TT
10830int
10831main ()
10832{
a9322a30
TT
10833
10834 ;
10835 return 0;
10836}
bec39cab 10837_ACEOF
81ecdfbb
RW
10838if ac_fn_c_try_compile "$LINENO"; then :
10839 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10840fi
81ecdfbb
RW
10841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10842 CFLAGS="$saved_CFLAGS"
10843 done
10844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10845$as_echo "${PYTHON_CFLAGS}" >&6; }
10846 fi
043b6510 10847
c83393b9
JB
10848 # On x64 Windows, Python's include headers, and pyconfig.h in
10849 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10850 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10851 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10852 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10853 # The issue was reported to the Python community, but still isn't
10854 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10855
043b6510 10856 case "$gdb_host" in
c83393b9
JB
10857 mingw64)
10858 if test "${GCC}" = yes; then
10859 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10860 fi
10861 ;;
043b6510 10862 esac
a8db4212
YPK
10863
10864 # Note that "python -m threading" cannot be used to check for
10865 # threading support due to a bug in Python 2.7.3
10866 # (http://bugs.python.org/issue15567).
10867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10868$as_echo_n "checking whether python supports threads... " >&6; }
10869 saved_CPPFLAGS="${CPPFLAGS}"
10870 CPPFLAGS="${PYTHON_CPPFLAGS}"
10871 # Note that the test is reversed so that python_has_threads=yes on
10872 # unexpected failures.
10873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10874/* end confdefs.h. */
10875
10876#include <Python.h>
10877#ifdef WITH_THREAD
10878# error
10879#endif
10880
10881_ACEOF
10882if ac_fn_c_try_cpp "$LINENO"; then :
10883 python_has_threads=no
10884else
10885 python_has_threads=yes
10886fi
d0ac1c44 10887rm -f conftest.err conftest.i conftest.$ac_ext
a8db4212
YPK
10888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10889$as_echo "${python_has_threads}" >&6; }
10890 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10891else
6dddc817
DE
10892 # Even if Python support is not compiled in, we need to have this file
10893 # included so that the "python" command, et.al., still exists.
8fd8d003 10894 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10895 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10896fi
9a156167 10897
a4a1c157
PA
10898# Work around Python http://bugs.python.org/issue10112. See also
10899# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10900# no effect. Note that the only test after this that uses Python is
10901# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10902# run without -export-dynamic too.
10903PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10904
10905
ed3ef339
DE
10906
10907
4df42755
DE
10908 if test "${have_libpython}" != no; then
10909 HAVE_PYTHON_TRUE=
10910 HAVE_PYTHON_FALSE='#'
10911else
10912 HAVE_PYTHON_TRUE='#'
10913 HAVE_PYTHON_FALSE=
10914fi
10915
ed3ef339
DE
10916
10917# -------------------- #
10918# Check for libguile. #
10919# -------------------- #
10920
10921
e1402065
DE
10922
10923
10924
10925
10926# Check whether --with-guile was given.
10927if test "${with_guile+set}" = set; then :
10928 withval=$with_guile;
10929else
10930 with_guile=auto
10931fi
10932
10933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10934$as_echo_n "checking whether to use guile... " >&6; }
10935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10936$as_echo "$with_guile" >&6; }
10937
ed3ef339
DE
10938# Extract the first word of "pkg-config", so it can be a program name with args.
10939set dummy pkg-config; ac_word=$2
10940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10941$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10942if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10943 $as_echo_n "(cached) " >&6
10944else
10945 case $pkg_config_prog_path in
10946 [\\/]* | ?:[\\/]*)
10947 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10948 ;;
10949 *)
10950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10951for as_dir in $PATH
10952do
10953 IFS=$as_save_IFS
10954 test -z "$as_dir" && as_dir=.
10955 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10956 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10957 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10959 break 2
10960 fi
10961done
10962 done
10963IFS=$as_save_IFS
10964
10965 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10966 ;;
10967esac
10968fi
10969pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10970if test -n "$pkg_config_prog_path"; then
10971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10972$as_echo "$pkg_config_prog_path" >&6; }
10973else
10974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10975$as_echo "no" >&6; }
10976fi
10977
10978
10979
6e66f753 10980try_guile_versions="guile-2.0"
ed3ef339
DE
10981have_libguile=no
10982case "${with_guile}" in
10983no)
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10985$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10986 ;;
10987auto)
e1402065
DE
10988 if test "${pkg_config_prog_path}" = "missing"; then
10989 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10990$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10991 else
ed3ef339
DE
10992
10993 pkg_config=${pkg_config_prog_path}
10994 guile_version_list=${try_guile_versions}
10995 flag_errors=no
10996
ed3ef339
DE
10997 found_usable_guile=checking
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10999$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11000 for guile_version in ${guile_version_list}; do
11001 ${pkg_config} --exists ${guile_version} 2>/dev/null
11002 if test $? != 0; then
11003 continue
11004 fi
11005 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11006 if test $? != 0; then
d0ac1c44 11007 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11008 fi
11009 new_LIBS=`${pkg_config} --libs ${guile_version}`
11010 if test $? != 0; then
d0ac1c44 11011 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11012 fi
11013 found_usable_guile=${guile_version}
11014 break
11015 done
11016 if test "${found_usable_guile}" = "checking"; then
11017 if test "${flag_errors}" = "yes"; then
d0ac1c44 11018 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11019 else
11020 found_usable_guile=no
11021 fi
11022 fi
11023 if test "${found_usable_guile}" != no; then
11024 save_CPPFLAGS=$CPPFLAGS
11025 save_LIBS=$LIBS
11026 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11027 LIBS="$LIBS $new_LIBS"
11028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11029/* end confdefs.h. */
11030#include "libguile.h"
11031int
11032main ()
11033{
11034scm_init_guile ();
11035 ;
11036 return 0;
11037}
11038_ACEOF
11039if ac_fn_c_try_link "$LINENO"; then :
11040 have_libguile=yes
11041 GUILE_CPPFLAGS=$new_CPPFLAGS
11042 GUILE_LIBS=$new_LIBS
11043else
11044 found_usable_guile=no
11045fi
11046rm -f core conftest.err conftest.$ac_objext \
11047 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11048 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11049if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11050
11051$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11052
11053
11054fi
11055
ed3ef339
DE
11056 CPPFLAGS=$save_CPPFLAGS
11057 LIBS=$save_LIBS
11058 if test "${found_usable_guile}" = no; then
11059 if test "${flag_errors}" = yes; then
11060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11062as_fn_error $? "linking guile version ${guile_version} test program failed
11063See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11064 fi
11065 fi
11066 fi
11067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11068$as_echo "${found_usable_guile}" >&6; }
11069
e1402065 11070 fi
ed3ef339
DE
11071 ;;
11072yes)
e1402065 11073 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11074 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11075 fi
ed3ef339
DE
11076
11077 pkg_config=${pkg_config_prog_path}
11078 guile_version_list=${try_guile_versions}
11079 flag_errors=yes
11080
ed3ef339
DE
11081 found_usable_guile=checking
11082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11083$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11084 for guile_version in ${guile_version_list}; do
11085 ${pkg_config} --exists ${guile_version} 2>/dev/null
11086 if test $? != 0; then
11087 continue
11088 fi
11089 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11090 if test $? != 0; then
d0ac1c44 11091 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11092 fi
11093 new_LIBS=`${pkg_config} --libs ${guile_version}`
11094 if test $? != 0; then
d0ac1c44 11095 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11096 fi
11097 found_usable_guile=${guile_version}
11098 break
11099 done
11100 if test "${found_usable_guile}" = "checking"; then
11101 if test "${flag_errors}" = "yes"; then
d0ac1c44 11102 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11103 else
11104 found_usable_guile=no
11105 fi
11106 fi
11107 if test "${found_usable_guile}" != no; then
11108 save_CPPFLAGS=$CPPFLAGS
11109 save_LIBS=$LIBS
11110 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11111 LIBS="$LIBS $new_LIBS"
11112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11113/* end confdefs.h. */
11114#include "libguile.h"
11115int
11116main ()
11117{
11118scm_init_guile ();
11119 ;
11120 return 0;
11121}
11122_ACEOF
11123if ac_fn_c_try_link "$LINENO"; then :
11124 have_libguile=yes
11125 GUILE_CPPFLAGS=$new_CPPFLAGS
11126 GUILE_LIBS=$new_LIBS
11127else
11128 found_usable_guile=no
11129fi
11130rm -f core conftest.err conftest.$ac_objext \
11131 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11132 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11133if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11134
11135$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11136
11137
11138fi
11139
ed3ef339
DE
11140 CPPFLAGS=$save_CPPFLAGS
11141 LIBS=$save_LIBS
11142 if test "${found_usable_guile}" = no; then
11143 if test "${flag_errors}" = yes; then
11144 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11146as_fn_error $? "linking guile version ${guile_version} test program failed
11147See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11148 fi
11149 fi
11150 fi
11151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11152$as_echo "${found_usable_guile}" >&6; }
11153
11154 ;;
11155[\\/]* | ?:[\\/]*)
e1402065 11156 if test -x "${with_guile}"; then
ed3ef339
DE
11157
11158 pkg_config=${with_guile}
11159 guile_version_list=${try_guile_versions}
11160 flag_errors=yes
11161
ed3ef339
DE
11162 found_usable_guile=checking
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11164$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11165 for guile_version in ${guile_version_list}; do
11166 ${pkg_config} --exists ${guile_version} 2>/dev/null
11167 if test $? != 0; then
11168 continue
11169 fi
11170 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11171 if test $? != 0; then
d0ac1c44 11172 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11173 fi
11174 new_LIBS=`${pkg_config} --libs ${guile_version}`
11175 if test $? != 0; then
d0ac1c44 11176 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11177 fi
11178 found_usable_guile=${guile_version}
11179 break
11180 done
11181 if test "${found_usable_guile}" = "checking"; then
11182 if test "${flag_errors}" = "yes"; then
d0ac1c44 11183 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11184 else
11185 found_usable_guile=no
11186 fi
11187 fi
11188 if test "${found_usable_guile}" != no; then
11189 save_CPPFLAGS=$CPPFLAGS
11190 save_LIBS=$LIBS
11191 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11192 LIBS="$LIBS $new_LIBS"
11193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11194/* end confdefs.h. */
11195#include "libguile.h"
11196int
11197main ()
11198{
11199scm_init_guile ();
11200 ;
11201 return 0;
11202}
11203_ACEOF
11204if ac_fn_c_try_link "$LINENO"; then :
11205 have_libguile=yes
11206 GUILE_CPPFLAGS=$new_CPPFLAGS
11207 GUILE_LIBS=$new_LIBS
11208else
11209 found_usable_guile=no
11210fi
11211rm -f core conftest.err conftest.$ac_objext \
11212 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11213 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11214if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11215
11216$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11217
11218
11219fi
11220
ed3ef339
DE
11221 CPPFLAGS=$save_CPPFLAGS
11222 LIBS=$save_LIBS
11223 if test "${found_usable_guile}" = no; then
11224 if test "${flag_errors}" = yes; then
11225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11226$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11227as_fn_error $? "linking guile version ${guile_version} test program failed
11228See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11229 fi
11230 fi
11231 fi
11232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11233$as_echo "${found_usable_guile}" >&6; }
11234
e1402065 11235 else
d0ac1c44 11236 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11237 fi
ed3ef339
DE
11238 ;;
11239"" | */*)
11240 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11241 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11242 ;;
11243*)
11244 # A space separate list of guile versions to try, in order.
e1402065 11245 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11246 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11247 fi
ed3ef339
DE
11248
11249 pkg_config=${pkg_config_prog_path}
11250 guile_version_list=${with_guile}
11251 flag_errors=yes
11252
ed3ef339
DE
11253 found_usable_guile=checking
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11255$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11256 for guile_version in ${guile_version_list}; do
11257 ${pkg_config} --exists ${guile_version} 2>/dev/null
11258 if test $? != 0; then
11259 continue
11260 fi
11261 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11262 if test $? != 0; then
d0ac1c44 11263 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11264 fi
11265 new_LIBS=`${pkg_config} --libs ${guile_version}`
11266 if test $? != 0; then
d0ac1c44 11267 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11268 fi
11269 found_usable_guile=${guile_version}
11270 break
11271 done
11272 if test "${found_usable_guile}" = "checking"; then
11273 if test "${flag_errors}" = "yes"; then
d0ac1c44 11274 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11275 else
11276 found_usable_guile=no
11277 fi
11278 fi
11279 if test "${found_usable_guile}" != no; then
11280 save_CPPFLAGS=$CPPFLAGS
11281 save_LIBS=$LIBS
11282 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11283 LIBS="$LIBS $new_LIBS"
11284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11285/* end confdefs.h. */
11286#include "libguile.h"
11287int
11288main ()
11289{
11290scm_init_guile ();
11291 ;
11292 return 0;
11293}
11294_ACEOF
11295if ac_fn_c_try_link "$LINENO"; then :
11296 have_libguile=yes
11297 GUILE_CPPFLAGS=$new_CPPFLAGS
11298 GUILE_LIBS=$new_LIBS
11299else
11300 found_usable_guile=no
11301fi
11302rm -f core conftest.err conftest.$ac_objext \
11303 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11304 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11305if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11306
11307$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11308
11309
11310fi
11311
ed3ef339
DE
11312 CPPFLAGS=$save_CPPFLAGS
11313 LIBS=$save_LIBS
11314 if test "${found_usable_guile}" = no; then
11315 if test "${flag_errors}" = yes; then
11316 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11317$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11318as_fn_error $? "linking guile version ${guile_version} test program failed
11319See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11320 fi
11321 fi
11322 fi
11323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11324$as_echo "${found_usable_guile}" >&6; }
11325
11326 ;;
11327esac
11328
e76c5d17 11329if test "${have_libguile}" != no; then
d342a0da
DE
11330 case "${with_guile}" in
11331 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11332
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11334$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11335if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11336 $as_echo_n "(cached) " >&6
11337else
d342a0da 11338 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11339
11340 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11341 # the 'guild' and 'bindir' variables. In that case, try to guess
11342 # what the program name is, at the risk of getting it wrong if
11343 # Guile was configured with '--program-suffix' or similar.
11344 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11345 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11346 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11347 fi
11348
11349fi
11350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11351$as_echo "$ac_cv_guild_program_name" >&6; }
11352
11353 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11354 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11355 fi
11356
11357 GUILD="$ac_cv_guild_program_name"
11358
11359
d342a0da
DE
11360 ;;
11361 *)
11362
11363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11364$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11365if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11366 $as_echo_n "(cached) " >&6
11367else
11368 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11369
11370 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11371 # the 'guild' and 'bindir' variables. In that case, try to guess
11372 # what the program name is, at the risk of getting it wrong if
11373 # Guile was configured with '--program-suffix' or similar.
11374 if test "x$ac_cv_guild_program_name" = "x"; then
11375 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11376 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11377 fi
11378
11379fi
11380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11381$as_echo "$ac_cv_guild_program_name" >&6; }
11382
11383 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11384 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11385 fi
11386
11387 GUILD="$ac_cv_guild_program_name"
11388
11389
11390 ;;
11391 esac
e76c5d17
DE
11392
11393
11394 if test "$cross_compiling" = no; then
11395 GUILD_TARGET_FLAG=
11396 else
11397 GUILD_TARGET_FLAG="--target=$host"
11398 fi
11399
11400
11401
11402
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11404$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11405if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11406 $as_echo_n "(cached) " >&6
11407else
11408 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11409 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11410 ac_cv_guild_ok=yes
11411 else
11412 ac_cv_guild_ok=no
11413 fi
11414fi
11415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11416$as_echo "$ac_cv_guild_ok" >&6; }
11417
11418 if test "$ac_cv_guild_ok" = no; then
11419 have_libguile=no
11420 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11421$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11422 fi
11423fi
11424
ed3ef339
DE
11425if test "${have_libguile}" != no; then
11426
11427$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11428
11429 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11430 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11431 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11432 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11433 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11434
11435 save_LIBS="$LIBS"
11436 save_CPPFLAGS="$CPPFLAGS"
11437 LIBS="$GUILE_LIBS"
11438 CPPFLAGS="$GUILE_CPPFLAGS"
11439 for ac_func in scm_new_smob
11440do :
11441 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11442if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11443 cat >>confdefs.h <<_ACEOF
11444#define HAVE_SCM_NEW_SMOB 1
11445_ACEOF
11446
11447fi
11448done
11449
11450 LIBS="$save_LIBS"
11451 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11452else
11453 # Even if Guile support is not compiled in, we need to have these files
11454 # included.
bd810fff 11455 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11456 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11457fi
9a156167 11458
ac534cba 11459
4df42755
DE
11460 if test "${have_libguile}" != no; then
11461 HAVE_GUILE_TRUE=
11462 HAVE_GUILE_FALSE='#'
11463else
11464 HAVE_GUILE_TRUE='#'
11465 HAVE_GUILE_FALSE=
11466fi
11467
ac534cba 11468
d344e670
DE
11469# --------------------- #
11470# Check for libmcheck. #
11471# --------------------- #
11472
a8db4212
YPK
11473# Enable -lmcheck by default (it provides cheap-enough memory mangling),
11474# but turn it off if Python is enabled with threads, since -lmcheck is
11475# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11476# and for releases.
17ef446e
PA
11477if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11478 && $development; then
11479 libmcheck_default=yes
11480else
11481 libmcheck_default=no
a8db4212
YPK
11482fi
11483
17ef446e
PA
11484 # Check whether --enable-libmcheck was given.
11485if test "${enable_libmcheck+set}" = set; then :
11486 enableval=$enable_libmcheck; case "${enableval}" in
11487 yes | y) ENABLE_LIBMCHECK="yes" ;;
11488 no | n) ENABLE_LIBMCHECK="no" ;;
d0ac1c44 11489 *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
17ef446e
PA
11490 esac
11491fi
11492
11493
11494 if test -z "${ENABLE_LIBMCHECK}"; then
11495 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 11496 fi
17ef446e
PA
11497
11498 if test "$ENABLE_LIBMCHECK" = "yes" ; then
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212 11500$as_echo_n "checking for main in -lmcheck... " >&6; }
d0ac1c44 11501if ${ac_cv_lib_mcheck_main+:} false; then :
a8db4212
YPK
11502 $as_echo_n "(cached) " >&6
11503else
11504 ac_check_lib_save_LIBS=$LIBS
11505LIBS="-lmcheck $LIBS"
11506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11507/* end confdefs.h. */
11508
11509
11510int
11511main ()
11512{
11513return main ();
11514 ;
11515 return 0;
11516}
11517_ACEOF
11518if ac_fn_c_try_link "$LINENO"; then :
11519 ac_cv_lib_mcheck_main=yes
11520else
11521 ac_cv_lib_mcheck_main=no
11522fi
11523rm -f core conftest.err conftest.$ac_objext \
11524 conftest$ac_exeext conftest.$ac_ext
11525LIBS=$ac_check_lib_save_LIBS
11526fi
11527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11528$as_echo "$ac_cv_lib_mcheck_main" >&6; }
d0ac1c44 11529if test "x$ac_cv_lib_mcheck_main" = xyes; then :
a8db4212
YPK
11530 cat >>confdefs.h <<_ACEOF
11531#define HAVE_LIBMCHECK 1
11532_ACEOF
11533
11534 LIBS="-lmcheck $LIBS"
11535
11536fi
11537
17ef446e
PA
11538 fi
11539
11540
11541if test "$ENABLE_LIBMCHECK" = "yes" \
11542 -a "${have_libpython}" != "no" \
11543 -a "${python_has_threads}" = "yes" ; then
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11545$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
11546fi
11547
58bfce93
MM
11548
11549# Check whether --with-intel_pt was given.
11550if test "${with_intel_pt+set}" = set; then :
11551 withval=$with_intel_pt;
11552else
11553 with_intel_pt=auto
11554fi
11555
11556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11557$as_echo_n "checking whether to use intel pt... " >&6; }
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11559$as_echo "$with_intel_pt" >&6; }
11560
11561if test "${with_intel_pt}" = no; then
bc504a31
PA
11562 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11563$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11564 HAVE_LIBIPT=no
11565else
5599c404
MM
11566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11567/* end confdefs.h. */
11568
11569#include <linux/perf_event.h>
11570#ifndef PERF_ATTR_SIZE_VER5
11571# error
11572#endif
11573
11574_ACEOF
11575if ac_fn_c_try_cpp "$LINENO"; then :
11576 perf_event=yes
11577else
11578 perf_event=no
11579fi
d0ac1c44 11580rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11581 if test "$perf_event" != yes; then
11582 if test "$with_intel_pt" = yes; then
d0ac1c44 11583 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11584 else
11585 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11586$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11587 fi
11588 fi
11589
58bfce93
MM
11590
11591
11592
11593
11594
11595
11596
11597
11598 use_additional=yes
11599
11600 acl_save_prefix="$prefix"
11601 prefix="$acl_final_prefix"
11602 acl_save_exec_prefix="$exec_prefix"
11603 exec_prefix="$acl_final_exec_prefix"
11604
11605 eval additional_includedir=\"$includedir\"
11606 eval additional_libdir=\"$libdir\"
11607
11608 exec_prefix="$acl_save_exec_prefix"
11609 prefix="$acl_save_prefix"
11610
11611
11612# Check whether --with-libipt-prefix was given.
11613if test "${with_libipt_prefix+set}" = set; then :
11614 withval=$with_libipt_prefix;
11615 if test "X$withval" = "Xno"; then
11616 use_additional=no
11617 else
11618 if test "X$withval" = "X"; then
11619
11620 acl_save_prefix="$prefix"
11621 prefix="$acl_final_prefix"
11622 acl_save_exec_prefix="$exec_prefix"
11623 exec_prefix="$acl_final_exec_prefix"
11624
11625 eval additional_includedir=\"$includedir\"
11626 eval additional_libdir=\"$libdir\"
11627
11628 exec_prefix="$acl_save_exec_prefix"
11629 prefix="$acl_save_prefix"
11630
11631 else
11632 additional_includedir="$withval/include"
11633 additional_libdir="$withval/lib"
11634 fi
11635 fi
11636
11637fi
11638
11639 LIBIPT=
11640 LTLIBIPT=
11641 INCIPT=
11642 rpathdirs=
11643 ltrpathdirs=
11644 names_already_handled=
11645 names_next_round='ipt '
11646 while test -n "$names_next_round"; do
11647 names_this_round="$names_next_round"
11648 names_next_round=
11649 for name in $names_this_round; do
11650 already_handled=
11651 for n in $names_already_handled; do
11652 if test "$n" = "$name"; then
11653 already_handled=yes
11654 break
11655 fi
11656 done
11657 if test -z "$already_handled"; then
11658 names_already_handled="$names_already_handled $name"
11659 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11660 eval value=\"\$HAVE_LIB$uppername\"
11661 if test -n "$value"; then
11662 if test "$value" = yes; then
11663 eval value=\"\$LIB$uppername\"
11664 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11665 eval value=\"\$LTLIB$uppername\"
11666 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11667 else
11668 :
11669 fi
11670 else
11671 found_dir=
11672 found_la=
11673 found_so=
11674 found_a=
11675 if test $use_additional = yes; then
11676 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11677 found_dir="$additional_libdir"
11678 found_so="$additional_libdir/lib$name.$shlibext"
11679 if test -f "$additional_libdir/lib$name.la"; then
11680 found_la="$additional_libdir/lib$name.la"
11681 fi
11682 else
11683 if test -f "$additional_libdir/lib$name.$libext"; then
11684 found_dir="$additional_libdir"
11685 found_a="$additional_libdir/lib$name.$libext"
11686 if test -f "$additional_libdir/lib$name.la"; then
11687 found_la="$additional_libdir/lib$name.la"
11688 fi
11689 fi
11690 fi
11691 fi
11692 if test "X$found_dir" = "X"; then
11693 for x in $LDFLAGS $LTLIBIPT; do
11694
11695 acl_save_prefix="$prefix"
11696 prefix="$acl_final_prefix"
11697 acl_save_exec_prefix="$exec_prefix"
11698 exec_prefix="$acl_final_exec_prefix"
11699 eval x=\"$x\"
11700 exec_prefix="$acl_save_exec_prefix"
11701 prefix="$acl_save_prefix"
11702
11703 case "$x" in
11704 -L*)
11705 dir=`echo "X$x" | sed -e 's/^X-L//'`
11706 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11707 found_dir="$dir"
11708 found_so="$dir/lib$name.$shlibext"
11709 if test -f "$dir/lib$name.la"; then
11710 found_la="$dir/lib$name.la"
11711 fi
11712 else
11713 if test -f "$dir/lib$name.$libext"; then
11714 found_dir="$dir"
11715 found_a="$dir/lib$name.$libext"
11716 if test -f "$dir/lib$name.la"; then
11717 found_la="$dir/lib$name.la"
11718 fi
11719 fi
11720 fi
11721 ;;
11722 esac
11723 if test "X$found_dir" != "X"; then
11724 break
11725 fi
11726 done
11727 fi
11728 if test "X$found_dir" != "X"; then
11729 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11730 if test "X$found_so" != "X"; then
11731 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11732 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11733 else
11734 haveit=
11735 for x in $ltrpathdirs; do
11736 if test "X$x" = "X$found_dir"; then
11737 haveit=yes
11738 break
11739 fi
11740 done
11741 if test -z "$haveit"; then
11742 ltrpathdirs="$ltrpathdirs $found_dir"
11743 fi
11744 if test "$hardcode_direct" = yes; then
11745 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11746 else
11747 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11748 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11749 haveit=
11750 for x in $rpathdirs; do
11751 if test "X$x" = "X$found_dir"; then
11752 haveit=yes
11753 break
11754 fi
11755 done
11756 if test -z "$haveit"; then
11757 rpathdirs="$rpathdirs $found_dir"
11758 fi
11759 else
11760 haveit=
11761 for x in $LDFLAGS $LIBIPT; do
11762
11763 acl_save_prefix="$prefix"
11764 prefix="$acl_final_prefix"
11765 acl_save_exec_prefix="$exec_prefix"
11766 exec_prefix="$acl_final_exec_prefix"
11767 eval x=\"$x\"
11768 exec_prefix="$acl_save_exec_prefix"
11769 prefix="$acl_save_prefix"
11770
11771 if test "X$x" = "X-L$found_dir"; then
11772 haveit=yes
11773 break
11774 fi
11775 done
11776 if test -z "$haveit"; then
11777 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11778 fi
11779 if test "$hardcode_minus_L" != no; then
11780 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11781 else
11782 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11783 fi
11784 fi
11785 fi
11786 fi
11787 else
11788 if test "X$found_a" != "X"; then
11789 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11790 else
11791 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11792 fi
11793 fi
11794 additional_includedir=
11795 case "$found_dir" in
11796 */lib | */lib/)
11797 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11798 additional_includedir="$basedir/include"
11799 ;;
11800 esac
11801 if test "X$additional_includedir" != "X"; then
11802 if test "X$additional_includedir" != "X/usr/include"; then
11803 haveit=
11804 if test "X$additional_includedir" = "X/usr/local/include"; then
11805 if test -n "$GCC"; then
11806 case $host_os in
11807 linux*) haveit=yes;;
11808 esac
11809 fi
11810 fi
11811 if test -z "$haveit"; then
11812 for x in $CPPFLAGS $INCIPT; do
11813
11814 acl_save_prefix="$prefix"
11815 prefix="$acl_final_prefix"
11816 acl_save_exec_prefix="$exec_prefix"
11817 exec_prefix="$acl_final_exec_prefix"
11818 eval x=\"$x\"
11819 exec_prefix="$acl_save_exec_prefix"
11820 prefix="$acl_save_prefix"
11821
11822 if test "X$x" = "X-I$additional_includedir"; then
11823 haveit=yes
11824 break
11825 fi
11826 done
11827 if test -z "$haveit"; then
11828 if test -d "$additional_includedir"; then
11829 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11830 fi
11831 fi
11832 fi
11833 fi
11834 fi
11835 if test -n "$found_la"; then
11836 save_libdir="$libdir"
11837 case "$found_la" in
11838 */* | *\\*) . "$found_la" ;;
11839 *) . "./$found_la" ;;
11840 esac
11841 libdir="$save_libdir"
11842 for dep in $dependency_libs; do
11843 case "$dep" in
11844 -L*)
11845 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11846 if test "X$additional_libdir" != "X/usr/lib"; then
11847 haveit=
11848 if test "X$additional_libdir" = "X/usr/local/lib"; then
11849 if test -n "$GCC"; then
11850 case $host_os in
11851 linux*) haveit=yes;;
11852 esac
11853 fi
11854 fi
11855 if test -z "$haveit"; then
11856 haveit=
11857 for x in $LDFLAGS $LIBIPT; do
11858
11859 acl_save_prefix="$prefix"
11860 prefix="$acl_final_prefix"
11861 acl_save_exec_prefix="$exec_prefix"
11862 exec_prefix="$acl_final_exec_prefix"
11863 eval x=\"$x\"
11864 exec_prefix="$acl_save_exec_prefix"
11865 prefix="$acl_save_prefix"
11866
11867 if test "X$x" = "X-L$additional_libdir"; then
11868 haveit=yes
11869 break
11870 fi
11871 done
11872 if test -z "$haveit"; then
11873 if test -d "$additional_libdir"; then
11874 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11875 fi
11876 fi
11877 haveit=
11878 for x in $LDFLAGS $LTLIBIPT; do
11879
11880 acl_save_prefix="$prefix"
11881 prefix="$acl_final_prefix"
11882 acl_save_exec_prefix="$exec_prefix"
11883 exec_prefix="$acl_final_exec_prefix"
11884 eval x=\"$x\"
11885 exec_prefix="$acl_save_exec_prefix"
11886 prefix="$acl_save_prefix"
11887
11888 if test "X$x" = "X-L$additional_libdir"; then
11889 haveit=yes
11890 break
11891 fi
11892 done
11893 if test -z "$haveit"; then
11894 if test -d "$additional_libdir"; then
11895 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11896 fi
11897 fi
11898 fi
11899 fi
11900 ;;
11901 -R*)
11902 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11903 if test "$enable_rpath" != no; then
11904 haveit=
11905 for x in $rpathdirs; do
11906 if test "X$x" = "X$dir"; then
11907 haveit=yes
11908 break
11909 fi
11910 done
11911 if test -z "$haveit"; then
11912 rpathdirs="$rpathdirs $dir"
11913 fi
11914 haveit=
11915 for x in $ltrpathdirs; do
11916 if test "X$x" = "X$dir"; then
11917 haveit=yes
11918 break
11919 fi
11920 done
11921 if test -z "$haveit"; then
11922 ltrpathdirs="$ltrpathdirs $dir"
11923 fi
11924 fi
11925 ;;
11926 -l*)
11927 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11928 ;;
11929 *.la)
11930 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11931 ;;
11932 *)
11933 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11934 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11935 ;;
11936 esac
11937 done
11938 fi
11939 else
11940 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11941 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11942 fi
11943 fi
11944 fi
11945 done
11946 done
11947 if test "X$rpathdirs" != "X"; then
11948 if test -n "$hardcode_libdir_separator"; then
11949 alldirs=
11950 for found_dir in $rpathdirs; do
11951 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11952 done
11953 acl_save_libdir="$libdir"
11954 libdir="$alldirs"
11955 eval flag=\"$hardcode_libdir_flag_spec\"
11956 libdir="$acl_save_libdir"
11957 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11958 else
11959 for found_dir in $rpathdirs; do
11960 acl_save_libdir="$libdir"
11961 libdir="$found_dir"
11962 eval flag=\"$hardcode_libdir_flag_spec\"
11963 libdir="$acl_save_libdir"
11964 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11965 done
11966 fi
11967 fi
11968 if test "X$ltrpathdirs" != "X"; then
11969 for found_dir in $ltrpathdirs; do
11970 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11971 done
11972 fi
11973
11974
11975 ac_save_CPPFLAGS="$CPPFLAGS"
11976
11977 for element in $INCIPT; do
11978 haveit=
11979 for x in $CPPFLAGS; do
11980
11981 acl_save_prefix="$prefix"
11982 prefix="$acl_final_prefix"
11983 acl_save_exec_prefix="$exec_prefix"
11984 exec_prefix="$acl_final_exec_prefix"
11985 eval x=\"$x\"
11986 exec_prefix="$acl_save_exec_prefix"
11987 prefix="$acl_save_prefix"
11988
11989 if test "X$x" = "X$element"; then
11990 haveit=yes
11991 break
11992 fi
11993 done
11994 if test -z "$haveit"; then
11995 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11996 fi
11997 done
11998
11999
12000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
12001$as_echo_n "checking for libipt... " >&6; }
d0ac1c44 12002if ${ac_cv_libipt+:} false; then :
58bfce93
MM
12003 $as_echo_n "(cached) " >&6
12004else
12005
12006 ac_save_LIBS="$LIBS"
12007 LIBS="$LIBS $LIBIPT"
12008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12009/* end confdefs.h. */
12010#include "intel-pt.h"
12011int
12012main ()
12013{
12014pt_insn_alloc_decoder (0);
12015 ;
12016 return 0;
12017}
12018_ACEOF
12019if ac_fn_c_try_link "$LINENO"; then :
12020 ac_cv_libipt=yes
12021else
12022 ac_cv_libipt=no
12023fi
12024rm -f core conftest.err conftest.$ac_objext \
12025 conftest$ac_exeext conftest.$ac_ext
12026 LIBS="$ac_save_LIBS"
12027
12028fi
12029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
12030$as_echo "$ac_cv_libipt" >&6; }
12031 if test "$ac_cv_libipt" = yes; then
12032 HAVE_LIBIPT=yes
12033
12034$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
12035
12036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
12037$as_echo_n "checking how to link with libipt... " >&6; }
12038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
12039$as_echo "$LIBIPT" >&6; }
12040 else
12041 HAVE_LIBIPT=no
12042 CPPFLAGS="$ac_save_CPPFLAGS"
12043 LIBIPT=
12044 LTLIBIPT=
12045 fi
12046
12047
12048
12049
12050
12051
12052 if test "$HAVE_LIBIPT" != yes; then
12053 if test "$with_intel_pt" = yes; then
d0ac1c44 12054 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
12055 else
12056 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
12057$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
12058 fi
c56ccc05
MM
12059 else
12060 save_LIBS=$LIBS
12061 LIBS="$LIBS $LIBIPT"
12062 for ac_func in pt_insn_event
12063do :
12064 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
d0ac1c44 12065if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
12066 cat >>confdefs.h <<_ACEOF
12067#define HAVE_PT_INSN_EVENT 1
12068_ACEOF
12069
12070fi
12071done
12072
12073 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
12074"
d0ac1c44 12075if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
12076
12077cat >>confdefs.h <<_ACEOF
12078#define HAVE_STRUCT_PT_INSN_ENABLED 1
12079_ACEOF
12080
12081
12082fi
12083ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
12084"
d0ac1c44 12085if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
12086
12087cat >>confdefs.h <<_ACEOF
12088#define HAVE_STRUCT_PT_INSN_RESYNCED 1
12089_ACEOF
12090
12091
12092fi
12093
12094 LIBS=$save_LIBS
58bfce93
MM
12095 fi
12096fi
12097
81ecdfbb
RW
12098# ------------------------- #
12099# Checks for header files. #
12100# ------------------------- #
c890192f 12101
81ecdfbb
RW
12102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12103$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 12104if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12105 $as_echo_n "(cached) " >&6
bec39cab 12106else
81ecdfbb 12107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12108/* end confdefs.h. */
81ecdfbb
RW
12109#include <stdlib.h>
12110#include <stdarg.h>
12111#include <string.h>
12112#include <float.h>
12113
a9322a30
TT
12114int
12115main ()
12116{
a9322a30
TT
12117
12118 ;
12119 return 0;
12120}
bec39cab 12121_ACEOF
81ecdfbb
RW
12122if ac_fn_c_try_compile "$LINENO"; then :
12123 ac_cv_header_stdc=yes
bec39cab 12124else
81ecdfbb 12125 ac_cv_header_stdc=no
a9322a30 12126fi
81ecdfbb 12127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12128
81ecdfbb
RW
12129if test $ac_cv_header_stdc = yes; then
12130 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12132/* end confdefs.h. */
12133#include <string.h>
bec39cab 12134
81ecdfbb
RW
12135_ACEOF
12136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12137 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12138
bec39cab 12139else
81ecdfbb
RW
12140 ac_cv_header_stdc=no
12141fi
12142rm -f conftest*
12143
12144fi
12145
12146if test $ac_cv_header_stdc = yes; then
12147 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12149/* end confdefs.h. */
12150#include <stdlib.h>
12151
bec39cab 12152_ACEOF
81ecdfbb
RW
12153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12154 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 12155
81ecdfbb
RW
12156else
12157 ac_cv_header_stdc=no
12158fi
12159rm -f conftest*
bec39cab 12160
bec39cab 12161fi
81ecdfbb
RW
12162
12163if test $ac_cv_header_stdc = yes; then
12164 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12165 if test "$cross_compiling" = yes; then :
12166 :
bec39cab 12167else
81ecdfbb 12168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12169/* end confdefs.h. */
81ecdfbb
RW
12170#include <ctype.h>
12171#include <stdlib.h>
12172#if ((' ' & 0x0FF) == 0x020)
12173# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12174# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12175#else
12176# define ISLOWER(c) \
12177 (('a' <= (c) && (c) <= 'i') \
12178 || ('j' <= (c) && (c) <= 'r') \
12179 || ('s' <= (c) && (c) <= 'z'))
12180# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12181#endif
12182
12183#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12184int
12185main ()
12186{
81ecdfbb
RW
12187 int i;
12188 for (i = 0; i < 256; i++)
12189 if (XOR (islower (i), ISLOWER (i))
12190 || toupper (i) != TOUPPER (i))
12191 return 2;
a9322a30
TT
12192 return 0;
12193}
bec39cab 12194_ACEOF
81ecdfbb
RW
12195if ac_fn_c_try_run "$LINENO"; then :
12196
bec39cab 12197else
81ecdfbb
RW
12198 ac_cv_header_stdc=no
12199fi
12200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12201 conftest.$ac_objext conftest.beam conftest.$ac_ext
12202fi
bec39cab 12203
bec39cab 12204fi
a9322a30 12205fi
81ecdfbb
RW
12206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12207$as_echo "$ac_cv_header_stdc" >&6; }
12208if test $ac_cv_header_stdc = yes; then
bec39cab 12209
81ecdfbb 12210$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12211
81ecdfbb 12212fi
bec39cab 12213
81ecdfbb 12214# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12215for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
43b7e92b 12216 thread_db.h linux/elf.h \
81ecdfbb
RW
12217 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12218 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 12219 sys/reg.h sys/debugreg.h sys/select.h \
726e1356 12220 termios.h elf_hp.h \
9467110b 12221 dlfcn.h
81ecdfbb
RW
12222do :
12223 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12224ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12225if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12226 cat >>confdefs.h <<_ACEOF
81ecdfbb 12227#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12228_ACEOF
c906108c 12229
bec39cab 12230fi
81ecdfbb
RW
12231
12232done
12233
81ecdfbb
RW
12234for ac_header in sys/user.h
12235do :
12236 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12237# include <sys/param.h>
a9322a30
TT
12238#endif
12239
81ecdfbb 12240"
d0ac1c44 12241if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
12242 cat >>confdefs.h <<_ACEOF
12243#define HAVE_SYS_USER_H 1
bec39cab 12244_ACEOF
bec39cab 12245
a9322a30 12246fi
bec39cab 12247
81ecdfbb 12248done
5ee754fc 12249
5ee754fc 12250
5007d765 12251for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12252do :
12253 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12254ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12255if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12256 cat >>confdefs.h <<_ACEOF
81ecdfbb 12257#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12258_ACEOF
5ee754fc
MK
12259
12260fi
12261
81ecdfbb 12262done
bec39cab 12263
81ecdfbb
RW
12264for ac_header in term.h
12265do :
12266 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12267# include <curses.h>
12268#endif
bec39cab 12269
81ecdfbb 12270"
d0ac1c44 12271if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12272 cat >>confdefs.h <<_ACEOF
12273#define HAVE_TERM_H 1
a8111142 12274_ACEOF
a8111142 12275
a8111142 12276fi
a8111142 12277
81ecdfbb 12278done
a8111142
TT
12279
12280
81ecdfbb
RW
12281# ------------------------- #
12282# Checks for declarations. #
12283# ------------------------- #
a9322a30 12284
07697489
PA
12285
12286 # Check for presence and size of long long.
12287 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 12288if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12289
12290cat >>confdefs.h <<_ACEOF
12291#define HAVE_LONG_LONG 1
12292_ACEOF
12293
12294# The cast to long int works around a bug in the HP C Compiler
12295# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12296# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12297# This bug is HP SR number 8606223364.
12298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12299$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 12300if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12301 $as_echo_n "(cached) " >&6
12302else
12303 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12304
12305else
12306 if test "$ac_cv_type_long_long" = yes; then
12307 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12308$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
12309as_fn_error 77 "cannot compute sizeof (long long)
12310See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12311 else
12312 ac_cv_sizeof_long_long=0
12313 fi
12314fi
12315
12316fi
12317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12318$as_echo "$ac_cv_sizeof_long_long" >&6; }
12319
12320
12321
12322cat >>confdefs.h <<_ACEOF
12323#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12324_ACEOF
12325
12326
12327fi
12328
12329
d0ac1c44
SM
12330 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12331ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12332if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12333 ac_have_decl=1
12334else
12335 ac_have_decl=0
12336fi
12337
12338cat >>confdefs.h <<_ACEOF
12339#define HAVE_DECL_BASENAME $ac_have_decl
12340_ACEOF
12341ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 12342if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12343 ac_have_decl=1
12344else
12345 ac_have_decl=0
12346fi
12347
12348cat >>confdefs.h <<_ACEOF
12349#define HAVE_DECL_FFS $ac_have_decl
12350_ACEOF
12351ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 12352if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12353 ac_have_decl=1
12354else
12355 ac_have_decl=0
12356fi
12357
12358cat >>confdefs.h <<_ACEOF
12359#define HAVE_DECL_ASPRINTF $ac_have_decl
12360_ACEOF
12361ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 12362if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12363 ac_have_decl=1
12364else
12365 ac_have_decl=0
12366fi
12367
12368cat >>confdefs.h <<_ACEOF
12369#define HAVE_DECL_VASPRINTF $ac_have_decl
12370_ACEOF
12371ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12372if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12373 ac_have_decl=1
12374else
12375 ac_have_decl=0
12376fi
12377
12378cat >>confdefs.h <<_ACEOF
12379#define HAVE_DECL_SNPRINTF $ac_have_decl
12380_ACEOF
12381ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 12382if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12383 ac_have_decl=1
12384else
12385 ac_have_decl=0
12386fi
12387
12388cat >>confdefs.h <<_ACEOF
12389#define HAVE_DECL_VSNPRINTF $ac_have_decl
12390_ACEOF
12391
12392 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 12393if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
12394 ac_have_decl=1
12395else
12396 ac_have_decl=0
12397fi
12398
12399cat >>confdefs.h <<_ACEOF
12400#define HAVE_DECL_STRTOL $ac_have_decl
12401_ACEOF
12402ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 12403if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
12404 ac_have_decl=1
12405else
12406 ac_have_decl=0
12407fi
12408
12409cat >>confdefs.h <<_ACEOF
12410#define HAVE_DECL_STRTOUL $ac_have_decl
12411_ACEOF
12412ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 12413if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
12414 ac_have_decl=1
12415else
12416 ac_have_decl=0
12417fi
12418
12419cat >>confdefs.h <<_ACEOF
12420#define HAVE_DECL_STRTOLL $ac_have_decl
12421_ACEOF
12422ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 12423if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12424 ac_have_decl=1
12425else
12426 ac_have_decl=0
12427fi
12428
12429cat >>confdefs.h <<_ACEOF
12430#define HAVE_DECL_STRTOULL $ac_have_decl
12431_ACEOF
12432
12433 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 12434if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
12435 ac_have_decl=1
12436else
12437 ac_have_decl=0
12438fi
12439
12440cat >>confdefs.h <<_ACEOF
12441#define HAVE_DECL_STRVERSCMP $ac_have_decl
12442_ACEOF
12443
12444
12445
81ecdfbb 12446ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12447if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12448 ac_have_decl=1
12449else
12450 ac_have_decl=0
5ee754fc 12451fi
81ecdfbb
RW
12452
12453cat >>confdefs.h <<_ACEOF
12454#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12455_ACEOF
5ee754fc 12456
5ee754fc 12457
81ecdfbb
RW
12458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12459$as_echo_n "checking for LC_MESSAGES... " >&6; }
d0ac1c44 12460if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12461 $as_echo_n "(cached) " >&6
bec39cab 12462else
81ecdfbb 12463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12464/* end confdefs.h. */
81ecdfbb 12465#include <locale.h>
a9322a30
TT
12466int
12467main ()
12468{
81ecdfbb 12469return LC_MESSAGES
a9322a30
TT
12470 ;
12471 return 0;
12472}
bec39cab 12473_ACEOF
81ecdfbb
RW
12474if ac_fn_c_try_link "$LINENO"; then :
12475 am_cv_val_LC_MESSAGES=yes
bec39cab 12476else
81ecdfbb
RW
12477 am_cv_val_LC_MESSAGES=no
12478fi
12479rm -f core conftest.err conftest.$ac_objext \
12480 conftest$ac_exeext conftest.$ac_ext
12481fi
12482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12483$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12484 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12485
81ecdfbb
RW
12486$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12487
12488 fi
12489
12490
12491# ----------------------- #
12492# Checks for structures. #
12493# ----------------------- #
12494
12495ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 12496if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12497
12498cat >>confdefs.h <<_ACEOF
12499#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12500_ACEOF
7eb368b3 12501
81ecdfbb 12502
7eb368b3 12503fi
81ecdfbb 12504ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 12505if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12506
a9322a30
TT
12507cat >>confdefs.h <<_ACEOF
12508#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12509_ACEOF
12510
a9322a30 12511
7eb368b3
NR
12512fi
12513
7eb368b3 12514
a9322a30
TT
12515# ------------------ #
12516# Checks for types. #
12517# ------------------ #
7eb368b3 12518
81ecdfbb 12519ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12520#include <sys/socket.h>
12521
81ecdfbb 12522"
d0ac1c44 12523if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12524
a9322a30
TT
12525cat >>confdefs.h <<_ACEOF
12526#define HAVE_SOCKLEN_T 1
12527_ACEOF
12528
12529
12530fi
12531
12532
12533# ------------------------------------- #
12534# Checks for compiler characteristics. #
12535# ------------------------------------- #
12536
81ecdfbb
RW
12537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12538$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
d0ac1c44 12539if ${ac_cv_c_const+:} false; then :
81ecdfbb 12540 $as_echo_n "(cached) " >&6
a9322a30 12541else
81ecdfbb 12542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12543/* end confdefs.h. */
a9322a30
TT
12544
12545int
12546main ()
12547{
d0ac1c44 12548
a9322a30 12549#ifndef __cplusplus
d0ac1c44 12550 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12551 typedef int charset[2];
d0ac1c44 12552 const charset cs = { 0, 0 };
a9322a30 12553 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12554 char const *const *pcpcc;
12555 char **ppc;
a9322a30
TT
12556 /* NEC SVR4.0.2 mips cc rejects this. */
12557 struct point {int x, y;};
12558 static struct point const zero = {0,0};
12559 /* AIX XL C 1.02.0.0 rejects this.
12560 It does not let you subtract one const X* pointer from another in
12561 an arm of an if-expression whose if-part is not a constant
12562 expression */
12563 const char *g = "string";
81ecdfbb 12564 pcpcc = &g + (g ? g-g : 0);
a9322a30 12565 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12566 ++pcpcc;
12567 ppc = (char**) pcpcc;
12568 pcpcc = (char const *const *) ppc;
d0ac1c44
SM
12569 { /* SCO 3.2v4 cc rejects this sort of thing. */
12570 char tx;
12571 char *t = &tx;
a9322a30
TT
12572 char const *s = 0 ? (char *) 0 : (char const *) 0;
12573
12574 *t++ = 0;
81ecdfbb 12575 if (s) return 0;
a9322a30
TT
12576 }
12577 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12578 int x[] = {25, 17};
12579 const int *foo = &x[0];
12580 ++foo;
12581 }
12582 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12583 typedef const int *iptr;
12584 iptr p = 0;
12585 ++p;
12586 }
d0ac1c44 12587 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12588 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
d0ac1c44
SM
12589 struct s { int j; const int *ap[3]; } bx;
12590 struct s *b = &bx; b->j = 5;
a9322a30
TT
12591 }
12592 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12593 const int foo = 10;
81ecdfbb 12594 if (!foo) return 0;
a9322a30 12595 }
81ecdfbb 12596 return !cs[0] && !zero.x;
a9322a30
TT
12597#endif
12598
12599 ;
12600 return 0;
12601}
bec39cab 12602_ACEOF
81ecdfbb 12603if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12604 ac_cv_c_const=yes
5ee754fc 12605else
81ecdfbb 12606 ac_cv_c_const=no
5ee754fc 12607fi
81ecdfbb 12608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12609fi
81ecdfbb
RW
12610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12611$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12612if test $ac_cv_c_const = no; then
bec39cab 12613
81ecdfbb 12614$as_echo "#define const /**/" >>confdefs.h
bec39cab 12615
5ee754fc 12616fi
bec39cab 12617
81ecdfbb
RW
12618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12619$as_echo_n "checking for inline... " >&6; }
d0ac1c44 12620if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12621 $as_echo_n "(cached) " >&6
bec39cab 12622else
a9322a30
TT
12623 ac_cv_c_inline=no
12624for ac_kw in inline __inline__ __inline; do
81ecdfbb 12625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12626/* end confdefs.h. */
a9322a30
TT
12627#ifndef __cplusplus
12628typedef int foo_t;
12629static $ac_kw foo_t static_foo () {return 0; }
12630$ac_kw foo_t foo () {return 0; }
12631#endif
12632
bec39cab 12633_ACEOF
81ecdfbb
RW
12634if ac_fn_c_try_compile "$LINENO"; then :
12635 ac_cv_c_inline=$ac_kw
bec39cab 12636fi
81ecdfbb
RW
12637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12638 test "$ac_cv_c_inline" != no && break
a9322a30 12639done
bec39cab 12640
5ee754fc 12641fi
81ecdfbb
RW
12642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12643$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12644
a9322a30
TT
12645case $ac_cv_c_inline in
12646 inline | yes) ;;
12647 *)
12648 case $ac_cv_c_inline in
12649 no) ac_val=;;
12650 *) ac_val=$ac_cv_c_inline;;
12651 esac
12652 cat >>confdefs.h <<_ACEOF
12653#ifndef __cplusplus
12654#define inline $ac_val
12655#endif
12656_ACEOF
bec39cab
AC
12657 ;;
12658esac
bec39cab 12659
81ecdfbb
RW
12660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12661$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12662if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12663 $as_echo_n "(cached) " >&6
bec39cab 12664else
81ecdfbb
RW
12665 ac_cv_c_bigendian=unknown
12666 # See if we're dealing with a universal compiler.
12667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12668/* end confdefs.h. */
12669#ifndef __APPLE_CC__
12670 not a universal capable compiler
12671 #endif
12672 typedef int dummy;
12673
12674_ACEOF
12675if ac_fn_c_try_compile "$LINENO"; then :
12676
12677 # Check for potential -arch flags. It is not universal unless
12678 # there are at least two -arch flags with different values.
12679 ac_arch=
12680 ac_prev=
12681 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12682 if test -n "$ac_prev"; then
12683 case $ac_word in
12684 i?86 | x86_64 | ppc | ppc64)
12685 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12686 ac_arch=$ac_word
12687 else
12688 ac_cv_c_bigendian=universal
12689 break
12690 fi
12691 ;;
12692 esac
12693 ac_prev=
12694 elif test "x$ac_word" = "x-arch"; then
12695 ac_prev=arch
12696 fi
12697 done
12698fi
12699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12700 if test $ac_cv_c_bigendian = unknown; then
12701 # See if sys/param.h defines the BYTE_ORDER macro.
12702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12703/* end confdefs.h. */
a9322a30 12704#include <sys/types.h>
81ecdfbb 12705 #include <sys/param.h>
a9322a30
TT
12706
12707int
12708main ()
12709{
81ecdfbb
RW
12710#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12711 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12712 && LITTLE_ENDIAN)
12713 bogus endian macros
12714 #endif
a9322a30
TT
12715
12716 ;
12717 return 0;
12718}
bec39cab 12719_ACEOF
81ecdfbb 12720if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12721 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12723/* end confdefs.h. */
a9322a30 12724#include <sys/types.h>
81ecdfbb 12725 #include <sys/param.h>
a9322a30
TT
12726
12727int
12728main ()
12729{
12730#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12731 not big endian
12732 #endif
a9322a30
TT
12733
12734 ;
12735 return 0;
12736}
bec39cab 12737_ACEOF
81ecdfbb 12738if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12739 ac_cv_c_bigendian=yes
5ee754fc 12740else
81ecdfbb 12741 ac_cv_c_bigendian=no
5ee754fc 12742fi
81ecdfbb
RW
12743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12744fi
12745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12746 fi
12747 if test $ac_cv_c_bigendian = unknown; then
12748 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12750/* end confdefs.h. */
12751#include <limits.h>
bec39cab 12752
81ecdfbb
RW
12753int
12754main ()
12755{
12756#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12757 bogus endian macros
12758 #endif
12759
12760 ;
12761 return 0;
12762}
7eb368b3 12763_ACEOF
81ecdfbb
RW
12764if ac_fn_c_try_compile "$LINENO"; then :
12765 # It does; now see whether it defined to _BIG_ENDIAN or not.
12766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12767/* end confdefs.h. */
81ecdfbb
RW
12768#include <limits.h>
12769
7eb368b3
NR
12770int
12771main ()
12772{
81ecdfbb
RW
12773#ifndef _BIG_ENDIAN
12774 not big endian
12775 #endif
12776
7eb368b3
NR
12777 ;
12778 return 0;
12779}
12780_ACEOF
81ecdfbb 12781if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12782 ac_cv_c_bigendian=yes
81ecdfbb
RW
12783else
12784 ac_cv_c_bigendian=no
a9322a30 12785fi
81ecdfbb 12786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12787fi
81ecdfbb
RW
12788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12789 fi
12790 if test $ac_cv_c_bigendian = unknown; then
12791 # Compile a test program.
12792 if test "$cross_compiling" = yes; then :
12793 # Try to guess by grepping values from an object file.
12794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12795/* end confdefs.h. */
12796short int ascii_mm[] =
12797 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12798 short int ascii_ii[] =
12799 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12800 int use_ascii (int i) {
12801 return ascii_mm[i] + ascii_ii[i];
12802 }
12803 short int ebcdic_ii[] =
12804 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12805 short int ebcdic_mm[] =
12806 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12807 int use_ebcdic (int i) {
12808 return ebcdic_mm[i] + ebcdic_ii[i];
12809 }
12810 extern int foo;
7eb368b3 12811
81ecdfbb
RW
12812int
12813main ()
12814{
12815return use_ascii (foo) == use_ebcdic (foo);
12816 ;
12817 return 0;
12818}
12819_ACEOF
12820if ac_fn_c_try_compile "$LINENO"; then :
12821 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12822 ac_cv_c_bigendian=yes
12823 fi
12824 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12825 if test "$ac_cv_c_bigendian" = unknown; then
12826 ac_cv_c_bigendian=no
12827 else
12828 # finding both strings is unlikely to happen, but who knows?
12829 ac_cv_c_bigendian=unknown
12830 fi
12831 fi
7eb368b3 12832fi
81ecdfbb 12833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12834else
81ecdfbb 12835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12836/* end confdefs.h. */
81ecdfbb 12837$ac_includes_default
d3ea6809
MM
12838int
12839main ()
12840{
81ecdfbb
RW
12841
12842 /* Are we little or big endian? From Harbison&Steele. */
12843 union
12844 {
12845 long int l;
12846 char c[sizeof (long int)];
12847 } u;
12848 u.l = 1;
12849 return u.c[sizeof (long int) - 1] == 1;
12850
12851 ;
12852 return 0;
d3ea6809
MM
12853}
12854_ACEOF
81ecdfbb 12855if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12856 ac_cv_c_bigendian=no
d3ea6809 12857else
81ecdfbb 12858 ac_cv_c_bigendian=yes
d3ea6809 12859fi
81ecdfbb
RW
12860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12861 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12862fi
a9322a30 12863
81ecdfbb
RW
12864 fi
12865fi
12866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12867$as_echo "$ac_cv_c_bigendian" >&6; }
12868 case $ac_cv_c_bigendian in #(
12869 yes)
12870 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12871;; #(
12872 no)
12873 ;; #(
12874 universal)
12875
12876$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12877
12878 ;; #(
12879 *)
d0ac1c44 12880 as_fn_error $? "unknown endianness
81ecdfbb
RW
12881 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12882 esac
d3ea6809
MM
12883
12884
a9322a30
TT
12885# ------------------------------ #
12886# Checks for library functions. #
12887# ------------------------------ #
d3ea6809 12888
d0ac1c44
SM
12889
12890
12891
12892 for ac_header in $ac_header_list
81ecdfbb
RW
12893do :
12894 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
d0ac1c44
SM
12895ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12896"
12897if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12898 cat >>confdefs.h <<_ACEOF
81ecdfbb 12899#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12900_ACEOF
b757528f 12901
b757528f 12902fi
bec39cab 12903
a9322a30 12904done
a3828db0 12905
d0ac1c44
SM
12906
12907
12908
12909
12910
12911
12912
a9322a30 12913for ac_func in getpagesize
81ecdfbb
RW
12914do :
12915 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12916if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12917 cat >>confdefs.h <<_ACEOF
81ecdfbb 12918#define HAVE_GETPAGESIZE 1
bec39cab 12919_ACEOF
bcb3dc3d 12920
bcb3dc3d
MK
12921fi
12922done
12923
81ecdfbb
RW
12924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12925$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12926if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12927 $as_echo_n "(cached) " >&6
a9322a30 12928else
81ecdfbb 12929 if test "$cross_compiling" = yes; then :
a9322a30 12930 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12931else
81ecdfbb 12932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12933/* end confdefs.h. */
a9322a30
TT
12934$ac_includes_default
12935/* malloc might have been renamed as rpl_malloc. */
12936#undef malloc
bec39cab 12937
a9322a30
TT
12938/* Thanks to Mike Haertel and Jim Avera for this test.
12939 Here is a matrix of mmap possibilities:
12940 mmap private not fixed
12941 mmap private fixed at somewhere currently unmapped
12942 mmap private fixed at somewhere already mapped
12943 mmap shared not fixed
12944 mmap shared fixed at somewhere currently unmapped
12945 mmap shared fixed at somewhere already mapped
12946 For private mappings, we should verify that changes cannot be read()
12947 back from the file, nor mmap's back from the file at a different
12948 address. (There have been systems where private was not correctly
12949 implemented like the infamous i386 svr4.0, and systems where the
12950 VM page cache was not coherent with the file system buffer cache
12951 like early versions of FreeBSD and possibly contemporary NetBSD.)
12952 For shared mappings, we should conversely verify that changes get
12953 propagated back to all the places they're supposed to be.
bec39cab 12954
a9322a30
TT
12955 Grep wants private fixed already mapped.
12956 The main things grep needs to know about mmap are:
12957 * does it exist and is it safe to write into the mmap'd area
12958 * how to use it (BSD variants) */
8b9cf735 12959
a9322a30
TT
12960#include <fcntl.h>
12961#include <sys/mman.h>
8b9cf735 12962
81ecdfbb 12963#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12964char *malloc ();
a3828db0
MK
12965#endif
12966
a9322a30 12967/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12968#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12969# ifdef _SC_PAGESIZE
12970# define getpagesize() sysconf(_SC_PAGESIZE)
12971# else /* no _SC_PAGESIZE */
81ecdfbb 12972# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12973# include <sys/param.h>
12974# ifdef EXEC_PAGESIZE
12975# define getpagesize() EXEC_PAGESIZE
12976# else /* no EXEC_PAGESIZE */
12977# ifdef NBPG
12978# define getpagesize() NBPG * CLSIZE
12979# ifndef CLSIZE
12980# define CLSIZE 1
12981# endif /* no CLSIZE */
12982# else /* no NBPG */
12983# ifdef NBPC
12984# define getpagesize() NBPC
12985# else /* no NBPC */
12986# ifdef PAGESIZE
12987# define getpagesize() PAGESIZE
12988# endif /* PAGESIZE */
12989# endif /* no NBPC */
12990# endif /* no NBPG */
12991# endif /* no EXEC_PAGESIZE */
12992# else /* no HAVE_SYS_PARAM_H */
12993# define getpagesize() 8192 /* punt totally */
12994# endif /* no HAVE_SYS_PARAM_H */
12995# endif /* no _SC_PAGESIZE */
12996
12997#endif /* no HAVE_GETPAGESIZE */
12998
bec39cab
AC
12999int
13000main ()
13001{
a9322a30 13002 char *data, *data2, *data3;
d0ac1c44 13003 const char *cdata2;
a9322a30 13004 int i, pagesize;
d0ac1c44 13005 int fd, fd2;
a9322a30
TT
13006
13007 pagesize = getpagesize ();
13008
13009 /* First, make a file with some known garbage in it. */
13010 data = (char *) malloc (pagesize);
13011 if (!data)
81ecdfbb 13012 return 1;
a9322a30
TT
13013 for (i = 0; i < pagesize; ++i)
13014 *(data + i) = rand ();
13015 umask (0);
13016 fd = creat ("conftest.mmap", 0600);
13017 if (fd < 0)
d0ac1c44 13018 return 2;
a9322a30 13019 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 13020 return 3;
a9322a30
TT
13021 close (fd);
13022
d0ac1c44
SM
13023 /* Next, check that the tail of a page is zero-filled. File must have
13024 non-zero length, otherwise we risk SIGBUS for entire page. */
13025 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13026 if (fd2 < 0)
13027 return 4;
13028 cdata2 = "";
13029 if (write (fd2, cdata2, 1) != 1)
13030 return 5;
13031 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13032 if (data2 == MAP_FAILED)
13033 return 6;
13034 for (i = 0; i < pagesize; ++i)
13035 if (*(data2 + i))
13036 return 7;
13037 close (fd2);
13038 if (munmap (data2, pagesize))
13039 return 8;
13040
a9322a30
TT
13041 /* Next, try to mmap the file at a fixed address which already has
13042 something else allocated at it. If we can, also make sure that
13043 we see the same garbage. */
13044 fd = open ("conftest.mmap", O_RDWR);
13045 if (fd < 0)
d0ac1c44 13046 return 9;
a9322a30
TT
13047 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13048 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 13049 return 10;
a9322a30
TT
13050 for (i = 0; i < pagesize; ++i)
13051 if (*(data + i) != *(data2 + i))
d0ac1c44 13052 return 11;
a9322a30
TT
13053
13054 /* Finally, make sure that changes to the mapped area do not
13055 percolate back to the file as seen by read(). (This is a bug on
13056 some variants of i386 svr4.0.) */
13057 for (i = 0; i < pagesize; ++i)
13058 *(data2 + i) = *(data2 + i) + 1;
13059 data3 = (char *) malloc (pagesize);
13060 if (!data3)
d0ac1c44 13061 return 12;
a9322a30 13062 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 13063 return 13;
a9322a30
TT
13064 for (i = 0; i < pagesize; ++i)
13065 if (*(data + i) != *(data3 + i))
d0ac1c44 13066 return 14;
a9322a30 13067 close (fd);
81ecdfbb 13068 return 0;
bec39cab
AC
13069}
13070_ACEOF
81ecdfbb 13071if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13072 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13073else
81ecdfbb 13074 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13075fi
81ecdfbb
RW
13076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13077 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13078fi
81ecdfbb 13079
a9322a30 13080fi
81ecdfbb
RW
13081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13082$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13083if test $ac_cv_func_mmap_fixed_mapped = yes; then
13084
81ecdfbb 13085$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13086
086ec9eb 13087fi
d0ac1c44 13088rm -f conftest.mmap conftest.txt
a3828db0 13089
81ecdfbb 13090ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 13091if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 13092
a9322a30
TT
13093else
13094
13095cat >>confdefs.h <<_ACEOF
13096#define pid_t int
bec39cab 13097_ACEOF
086ec9eb
MK
13098
13099fi
13100
81ecdfbb
RW
13101for ac_header in vfork.h
13102do :
13103 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 13104if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13105 cat >>confdefs.h <<_ACEOF
81ecdfbb 13106#define HAVE_VFORK_H 1
bec39cab 13107_ACEOF
c906108c
SS
13108
13109fi
a9322a30 13110
a3828db0 13111done
c906108c 13112
a9322a30 13113for ac_func in fork vfork
81ecdfbb
RW
13114do :
13115 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13116ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13117if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13118 cat >>confdefs.h <<_ACEOF
81ecdfbb 13119#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13120_ACEOF
b83266a0 13121
97bf5e38 13122fi
a3828db0 13123done
b83266a0 13124
a9322a30 13125if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13127$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13128if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13129 $as_echo_n "(cached) " >&6
a9322a30 13130else
81ecdfbb 13131 if test "$cross_compiling" = yes; then :
a9322a30
TT
13132 ac_cv_func_fork_works=cross
13133else
81ecdfbb
RW
13134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13135/* end confdefs.h. */
13136$ac_includes_default
13137int
13138main ()
13139{
13140
13141 /* By Ruediger Kuhlmann. */
13142 return fork () < 0;
13143
13144 ;
13145 return 0;
13146}
a9322a30 13147_ACEOF
81ecdfbb 13148if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13149 ac_cv_func_fork_works=yes
13150else
81ecdfbb 13151 ac_cv_func_fork_works=no
a9322a30 13152fi
81ecdfbb
RW
13153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13154 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13155fi
81ecdfbb 13156
a9322a30 13157fi
81ecdfbb
RW
13158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13159$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13160
13161else
13162 ac_cv_func_fork_works=$ac_cv_func_fork
13163fi
13164if test "x$ac_cv_func_fork_works" = xcross; then
13165 case $host in
13166 *-*-amigaos* | *-*-msdosdjgpp*)
13167 # Override, as these systems have only a dummy fork() stub
13168 ac_cv_func_fork_works=no
13169 ;;
13170 *)
13171 ac_cv_func_fork_works=yes
13172 ;;
13173 esac
81ecdfbb
RW
13174 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13175$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13176fi
13177ac_cv_func_vfork_works=$ac_cv_func_vfork
13178if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13180$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13181if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13182 $as_echo_n "(cached) " >&6
a9322a30 13183else
81ecdfbb 13184 if test "$cross_compiling" = yes; then :
a9322a30
TT
13185 ac_cv_func_vfork_works=cross
13186else
81ecdfbb 13187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13188/* end confdefs.h. */
13189/* Thanks to Paul Eggert for this test. */
81ecdfbb 13190$ac_includes_default
a9322a30 13191#include <sys/wait.h>
81ecdfbb 13192#ifdef HAVE_VFORK_H
a9322a30
TT
13193# include <vfork.h>
13194#endif
13195/* On some sparc systems, changes by the child to local and incoming
13196 argument registers are propagated back to the parent. The compiler
13197 is told about this with #include <vfork.h>, but some compilers
13198 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13199 static variable whose address is put into a register that is
13200 clobbered by the vfork. */
13201static void
13202#ifdef __cplusplus
13203sparc_address_test (int arg)
13204# else
13205sparc_address_test (arg) int arg;
13206#endif
13207{
13208 static pid_t child;
13209 if (!child) {
13210 child = vfork ();
13211 if (child < 0) {
13212 perror ("vfork");
13213 _exit(2);
13214 }
13215 if (!child) {
13216 arg = getpid();
13217 write(-1, "", 0);
13218 _exit (arg);
13219 }
13220 }
13221}
13222
13223int
13224main ()
13225{
13226 pid_t parent = getpid ();
13227 pid_t child;
13228
13229 sparc_address_test (0);
13230
13231 child = vfork ();
13232
13233 if (child == 0) {
13234 /* Here is another test for sparc vfork register problems. This
13235 test uses lots of local variables, at least as many local
13236 variables as main has allocated so far including compiler
13237 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13238 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13239 reuse the register of parent for one of the local variables,
13240 since it will think that parent can't possibly be used any more
13241 in this routine. Assigning to the local variable will thus
13242 munge parent in the parent process. */
13243 pid_t
13244 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13245 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13246 /* Convince the compiler that p..p7 are live; otherwise, it might
13247 use the same hardware register for all 8 local variables. */
13248 if (p != p1 || p != p2 || p != p3 || p != p4
13249 || p != p5 || p != p6 || p != p7)
13250 _exit(1);
13251
13252 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13253 from child file descriptors. If the child closes a descriptor
13254 before it execs or exits, this munges the parent's descriptor
13255 as well. Test for this by closing stdout in the child. */
13256 _exit(close(fileno(stdout)) != 0);
13257 } else {
13258 int status;
13259 struct stat st;
13260
13261 while (wait(&status) != child)
13262 ;
81ecdfbb 13263 return (
a9322a30
TT
13264 /* Was there some problem with vforking? */
13265 child < 0
13266
13267 /* Did the child fail? (This shouldn't happen.) */
13268 || status
13269
13270 /* Did the vfork/compiler bug occur? */
13271 || parent != getpid()
13272
13273 /* Did the file descriptor bug occur? */
13274 || fstat(fileno(stdout), &st) != 0
13275 );
13276 }
13277}
13278_ACEOF
81ecdfbb 13279if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13280 ac_cv_func_vfork_works=yes
13281else
81ecdfbb 13282 ac_cv_func_vfork_works=no
a9322a30 13283fi
81ecdfbb
RW
13284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13285 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13286fi
81ecdfbb 13287
a9322a30 13288fi
81ecdfbb
RW
13289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13290$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13291
13292fi;
13293if test "x$ac_cv_func_fork_works" = xcross; then
13294 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13295 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13296$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13297fi
13298
13299if test "x$ac_cv_func_vfork_works" = xyes; then
13300
81ecdfbb 13301$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13302
13303else
13304
81ecdfbb 13305$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13306
13307fi
13308if test "x$ac_cv_func_fork_works" = xyes; then
13309
81ecdfbb 13310$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13311
13312fi
13313
cdf43629 13314for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13315 pipe poll pread pread64 pwrite resize_term \
e671cd59 13316 sbrk getpgid setpgid setpgrp setsid \
9467110b 13317 sigaction sigprocmask sigsetmask socketpair \
110ed339 13318 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13319 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 13320 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
13321do :
13322 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13323ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13324if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13325 cat >>confdefs.h <<_ACEOF
81ecdfbb 13326#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13327_ACEOF
13328
13329fi
13330done
13331
13332
81ecdfbb
RW
13333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13334$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13335if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13336 $as_echo_n "(cached) " >&6
6c7a06a3 13337else
81ecdfbb 13338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13339/* end confdefs.h. */
13340#include <langinfo.h>
13341int
13342main ()
13343{
13344char* cs = nl_langinfo(CODESET);
bec39cab
AC
13345 ;
13346 return 0;
13347}
13348_ACEOF
81ecdfbb 13349if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13350 am_cv_langinfo_codeset=yes
a4db0f07 13351else
81ecdfbb 13352 am_cv_langinfo_codeset=no
a4db0f07 13353fi
81ecdfbb
RW
13354rm -f core conftest.err conftest.$ac_objext \
13355 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13356
a4db0f07 13357fi
81ecdfbb
RW
13358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13359$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13360 if test $am_cv_langinfo_codeset = yes; then
13361
81ecdfbb 13362$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13363
6c7a06a3 13364 fi
c906108c 13365
d0ac1c44
SM
13366ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13367if test "x$ac_cv_type_size_t" = xyes; then :
13368
13369else
13370
13371cat >>confdefs.h <<_ACEOF
13372#define size_t unsigned int
13373_ACEOF
13374
13375fi
13376
06825bd1 13377
3266f10b
TT
13378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13379$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 13380if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13381 $as_echo_n "(cached) " >&6
13382else
13383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13384/* end confdefs.h. */
13385#include <stdlib.h>
13386#include <stdarg.h>
13387#include <string.h>
13388#include <float.h>
13389
13390int
13391main ()
13392{
13393
13394 ;
13395 return 0;
13396}
13397_ACEOF
13398if ac_fn_c_try_compile "$LINENO"; then :
13399 ac_cv_header_stdc=yes
13400else
13401 ac_cv_header_stdc=no
13402fi
13403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13404
13405if test $ac_cv_header_stdc = yes; then
13406 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13408/* end confdefs.h. */
13409#include <string.h>
13410
13411_ACEOF
13412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13413 $EGREP "memchr" >/dev/null 2>&1; then :
13414
13415else
13416 ac_cv_header_stdc=no
13417fi
13418rm -f conftest*
13419
13420fi
13421
13422if test $ac_cv_header_stdc = yes; then
13423 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13425/* end confdefs.h. */
13426#include <stdlib.h>
13427
13428_ACEOF
13429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13430 $EGREP "free" >/dev/null 2>&1; then :
13431
13432else
13433 ac_cv_header_stdc=no
13434fi
13435rm -f conftest*
13436
13437fi
13438
13439if test $ac_cv_header_stdc = yes; then
13440 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13441 if test "$cross_compiling" = yes; then :
13442 :
13443else
13444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13445/* end confdefs.h. */
13446#include <ctype.h>
13447#include <stdlib.h>
13448#if ((' ' & 0x0FF) == 0x020)
13449# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13450# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13451#else
13452# define ISLOWER(c) \
13453 (('a' <= (c) && (c) <= 'i') \
13454 || ('j' <= (c) && (c) <= 'r') \
13455 || ('s' <= (c) && (c) <= 'z'))
13456# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13457#endif
13458
13459#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13460int
13461main ()
13462{
13463 int i;
13464 for (i = 0; i < 256; i++)
13465 if (XOR (islower (i), ISLOWER (i))
13466 || toupper (i) != TOUPPER (i))
13467 return 2;
13468 return 0;
13469}
13470_ACEOF
13471if ac_fn_c_try_run "$LINENO"; then :
13472
13473else
13474 ac_cv_header_stdc=no
13475fi
13476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13477 conftest.$ac_objext conftest.beam conftest.$ac_ext
13478fi
13479
13480fi
13481fi
13482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13483$as_echo "$ac_cv_header_stdc" >&6; }
13484if test $ac_cv_header_stdc = yes; then
13485
13486$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13487
3266f10b
TT
13488fi
13489
13490 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13491# for constant arguments. Useless!
13492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13493$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 13494if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13495 $as_echo_n "(cached) " >&6
13496else
13497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13498/* end confdefs.h. */
13499#include <alloca.h>
13500int
13501main ()
13502{
13503char *p = (char *) alloca (2 * sizeof (int));
13504 if (p) return 0;
13505 ;
13506 return 0;
13507}
13508_ACEOF
13509if ac_fn_c_try_link "$LINENO"; then :
13510 ac_cv_working_alloca_h=yes
13511else
13512 ac_cv_working_alloca_h=no
13513fi
13514rm -f core conftest.err conftest.$ac_objext \
13515 conftest$ac_exeext conftest.$ac_ext
13516fi
13517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13518$as_echo "$ac_cv_working_alloca_h" >&6; }
13519if test $ac_cv_working_alloca_h = yes; then
13520
13521$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13522
13523fi
13524
13525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13526$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 13527if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13528 $as_echo_n "(cached) " >&6
13529else
13530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13531/* end confdefs.h. */
13532#ifdef __GNUC__
13533# define alloca __builtin_alloca
13534#else
13535# ifdef _MSC_VER
13536# include <malloc.h>
13537# define alloca _alloca
13538# else
13539# ifdef HAVE_ALLOCA_H
13540# include <alloca.h>
13541# else
13542# ifdef _AIX
13543 #pragma alloca
13544# else
13545# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 13546void *alloca (size_t);
3266f10b
TT
13547# endif
13548# endif
13549# endif
13550# endif
13551#endif
13552
13553int
13554main ()
13555{
13556char *p = (char *) alloca (1);
13557 if (p) return 0;
13558 ;
13559 return 0;
13560}
13561_ACEOF
13562if ac_fn_c_try_link "$LINENO"; then :
13563 ac_cv_func_alloca_works=yes
13564else
13565 ac_cv_func_alloca_works=no
13566fi
13567rm -f core conftest.err conftest.$ac_objext \
13568 conftest$ac_exeext conftest.$ac_ext
13569fi
13570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13571$as_echo "$ac_cv_func_alloca_works" >&6; }
13572
13573if test $ac_cv_func_alloca_works = yes; then
13574
13575$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13576
13577else
13578 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13579# that cause trouble. Some versions do not even contain alloca or
13580# contain a buggy version. If you still want to use their alloca,
13581# use ar to extract alloca.o from them instead of compiling alloca.c.
13582
13583ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13584
13585$as_echo "#define C_ALLOCA 1" >>confdefs.h
13586
13587
13588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13589$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 13590if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13591 $as_echo_n "(cached) " >&6
13592else
13593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13594/* end confdefs.h. */
13595#if defined CRAY && ! defined CRAY2
13596webecray
13597#else
13598wenotbecray
13599#endif
13600
13601_ACEOF
13602if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13603 $EGREP "webecray" >/dev/null 2>&1; then :
13604 ac_cv_os_cray=yes
13605else
13606 ac_cv_os_cray=no
13607fi
13608rm -f conftest*
13609
13610fi
13611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13612$as_echo "$ac_cv_os_cray" >&6; }
13613if test $ac_cv_os_cray = yes; then
13614 for ac_func in _getb67 GETB67 getb67; do
13615 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13616ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13617if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13618
13619cat >>confdefs.h <<_ACEOF
13620#define CRAY_STACKSEG_END $ac_func
13621_ACEOF
13622
13623 break
13624fi
13625
13626 done
13627fi
13628
13629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13630$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 13631if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13632 $as_echo_n "(cached) " >&6
13633else
13634 if test "$cross_compiling" = yes; then :
13635 ac_cv_c_stack_direction=0
13636else
13637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13638/* end confdefs.h. */
13639$ac_includes_default
13640int
d0ac1c44 13641find_stack_direction (int *addr, int depth)
3266f10b 13642{
d0ac1c44
SM
13643 int dir, dummy = 0;
13644 if (! addr)
13645 addr = &dummy;
13646 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13647 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13648 return dir + dummy;
3266f10b
TT
13649}
13650
13651int
d0ac1c44 13652main (int argc, char **argv)
3266f10b 13653{
d0ac1c44 13654 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13655}
13656_ACEOF
13657if ac_fn_c_try_run "$LINENO"; then :
13658 ac_cv_c_stack_direction=1
13659else
13660 ac_cv_c_stack_direction=-1
13661fi
13662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13663 conftest.$ac_objext conftest.beam conftest.$ac_ext
13664fi
13665
13666fi
13667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13668$as_echo "$ac_cv_c_stack_direction" >&6; }
13669cat >>confdefs.h <<_ACEOF
13670#define STACK_DIRECTION $ac_cv_c_stack_direction
13671_ACEOF
13672
13673
13674fi
13675
13676
13677
13678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13679$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13680if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13681 $as_echo_n "(cached) " >&6
13682else
13683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13684/* end confdefs.h. */
13685#include <langinfo.h>
13686int
13687main ()
13688{
13689char* cs = nl_langinfo(CODESET);
13690 ;
13691 return 0;
13692}
13693_ACEOF
13694if ac_fn_c_try_link "$LINENO"; then :
13695 am_cv_langinfo_codeset=yes
13696else
13697 am_cv_langinfo_codeset=no
13698fi
13699rm -f core conftest.err conftest.$ac_objext \
13700 conftest$ac_exeext conftest.$ac_ext
13701
13702fi
13703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13704$as_echo "$am_cv_langinfo_codeset" >&6; }
13705 if test $am_cv_langinfo_codeset = yes; then
13706
13707$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13708
13709 fi
13710
13711
44122162 13712 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
13713do :
13714 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13715ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13716if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13717 cat >>confdefs.h <<_ACEOF
13718#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13719_ACEOF
13720
13721fi
13722
13723done
13724
13725
f348d89a 13726 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13727do :
13728 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13729ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13730if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13731 cat >>confdefs.h <<_ACEOF
13732#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13733_ACEOF
13734
13735fi
13736done
13737
13738
13739 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
d0ac1c44 13740if test "x$ac_cv_have_decl_strerror" = xyes; then :
3266f10b
TT
13741 ac_have_decl=1
13742else
13743 ac_have_decl=0
13744fi
13745
13746cat >>confdefs.h <<_ACEOF
13747#define HAVE_DECL_STRERROR $ac_have_decl
13748_ACEOF
13749ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 13750if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13751 ac_have_decl=1
13752else
13753 ac_have_decl=0
13754fi
13755
13756cat >>confdefs.h <<_ACEOF
13757#define HAVE_DECL_STRSTR $ac_have_decl
13758_ACEOF
13759
13760
e9bcb658
GB
13761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13762$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 13763if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
13764 $as_echo_n "(cached) " >&6
13765else
13766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13767/* end confdefs.h. */
13768
13769#include <setjmp.h>
13770
13771int
13772main ()
13773{
13774sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13775 ;
13776 return 0;
13777}
13778_ACEOF
13779if ac_fn_c_try_compile "$LINENO"; then :
13780 gdb_cv_func_sigsetjmp=yes
13781else
13782 gdb_cv_func_sigsetjmp=no
13783fi
13784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13785fi
13786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13787$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13788if test $gdb_cv_func_sigsetjmp = yes; then
13789
13790$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13791
13792fi
13793
3266f10b 13794
54019719
PA
13795# Check the return and argument types of ptrace.
13796
13797
54019719
PA
13798for ac_header in sys/ptrace.h ptrace.h
13799do :
13800 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13801ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13802if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
13803 cat >>confdefs.h <<_ACEOF
13804#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13805_ACEOF
13806
13807fi
13808
13809done
13810
13811
a3828db0 13812gdb_ptrace_headers='
4ff70b84 13813#include <sys/types.h>
a3828db0
MK
13814#if HAVE_SYS_PTRACE_H
13815# include <sys/ptrace.h>
13816#endif
13817#if HAVE_UNISTD_H
13818# include <unistd.h>
13819#endif
13820'
13821# There is no point in checking if we don't have a prototype.
9b30624b 13822ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 13823"
d0ac1c44 13824if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 13825 ac_have_decl=1
06825bd1 13826else
81ecdfbb 13827 ac_have_decl=0
06825bd1 13828fi
06825bd1 13829
a3828db0 13830cat >>confdefs.h <<_ACEOF
81ecdfbb 13831#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13832_ACEOF
81ecdfbb 13833if test $ac_have_decl = 1; then :
bec39cab 13834
a3828db0 13835else
a3828db0
MK
13836
13837 : ${gdb_cv_func_ptrace_ret='int'}
13838 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13839
06825bd1
MK
13840fi
13841
064ef605
DJ
13842# Check return type. Varargs (used on GNU/Linux) conflict with the
13843# empty argument list, so check for that explicitly.
81ecdfbb
RW
13844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13845$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 13846if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 13847 $as_echo_n "(cached) " >&6
bec39cab 13848else
81ecdfbb 13849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13850/* end confdefs.h. */
a3828db0 13851$gdb_ptrace_headers
bec39cab
AC
13852int
13853main ()
13854{
064ef605
DJ
13855extern long ptrace (enum __ptrace_request, ...);
13856 ;
13857 return 0;
13858}
13859_ACEOF
9b30624b 13860if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13861 gdb_cv_func_ptrace_ret='long'
13862else
81ecdfbb 13863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13864/* end confdefs.h. */
13865$gdb_ptrace_headers
13866int
13867main ()
13868{
a3828db0 13869extern int ptrace ();
bec39cab
AC
13870 ;
13871 return 0;
13872}
13873_ACEOF
9b30624b 13874if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13875 gdb_cv_func_ptrace_ret='int'
70f9f479 13876else
81ecdfbb 13877 gdb_cv_func_ptrace_ret='long'
70f9f479 13878fi
81ecdfbb 13879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13880fi
81ecdfbb 13881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13882fi
81ecdfbb
RW
13883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13884$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13885
a3828db0
MK
13886cat >>confdefs.h <<_ACEOF
13887#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13888_ACEOF
70f9f479 13889
a3828db0 13890# Check argument types.
81ecdfbb
RW
13891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13892$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 13893if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 13894 $as_echo_n "(cached) " >&6
bec39cab 13895else
a3828db0 13896
81ecdfbb 13897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13898/* end confdefs.h. */
13899$gdb_ptrace_headers
13900int
13901main ()
13902{
13903extern long ptrace (enum __ptrace_request, ...);
13904 ;
13905 return 0;
13906}
13907_ACEOF
9b30624b 13908if ac_fn_c_try_compile "$LINENO"; then :
54019719 13909 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13910else
064ef605 13911
a3828db0
MK
13912for gdb_arg1 in 'int' 'long'; do
13913 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13914 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13915 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13917/* end confdefs.h. */
a3828db0 13918$gdb_ptrace_headers
bec39cab
AC
13919int
13920main ()
13921{
a3828db0
MK
13922
13923extern $gdb_cv_func_ptrace_ret
13924 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13925
bec39cab
AC
13926 ;
13927 return 0;
13928}
13929_ACEOF
9b30624b 13930if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13931 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13932 break 4;
5c7f2947 13933fi
81ecdfbb 13934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13935 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13937/* end confdefs.h. */
a3828db0 13938$gdb_ptrace_headers
bec39cab
AC
13939int
13940main ()
13941{
a3828db0
MK
13942
13943extern $gdb_cv_func_ptrace_ret
13944 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13945
bec39cab
AC
13946 ;
13947 return 0;
13948}
13949_ACEOF
9b30624b 13950if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13951
13952gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13953 break 5;
78434e59 13954fi
81ecdfbb 13955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13956 done
13957 done
13958 done
13959 done
13960done
13961# Provide a safe default value.
13962: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13963
064ef605 13964fi
81ecdfbb 13965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13966fi
81ecdfbb
RW
13967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13968$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13969ac_save_IFS=$IFS; IFS=','
13970set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13971IFS=$ac_save_IFS
13972shift
bec39cab 13973
54019719
PA
13974cat >>confdefs.h <<_ACEOF
13975#define PTRACE_TYPE_ARG1 $1
13976_ACEOF
13977
13978
a3828db0
MK
13979cat >>confdefs.h <<_ACEOF
13980#define PTRACE_TYPE_ARG3 $3
13981_ACEOF
13982
96d7229d
LM
13983
13984cat >>confdefs.h <<_ACEOF
13985#define PTRACE_TYPE_ARG4 $4
13986_ACEOF
13987
a3828db0
MK
13988if test -n "$5"; then
13989
13990cat >>confdefs.h <<_ACEOF
13991#define PTRACE_TYPE_ARG5 $5
bec39cab 13992_ACEOF
78434e59
MK
13993
13994fi
13995
54019719 13996
a3828db0 13997if test "$cross_compiling" = no; then
81ecdfbb
RW
13998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13999$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 14000if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14001 $as_echo_n "(cached) " >&6
a3828db0 14002else
81ecdfbb 14003 if test "$cross_compiling" = yes; then :
d0ac1c44 14004 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 14005else
81ecdfbb 14006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14007/* end confdefs.h. */
81ecdfbb 14008$ac_includes_default
bec39cab
AC
14009int
14010main ()
14011{
a3828db0
MK
14012/* If this system has a BSD-style setpgrp which takes arguments,
14013 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14014 exit successfully. */
81ecdfbb 14015 return setpgrp (1,1) != -1;
bec39cab
AC
14016 ;
14017 return 0;
14018}
14019_ACEOF
81ecdfbb 14020if ac_fn_c_try_run "$LINENO"; then :
a3828db0 14021 ac_cv_func_setpgrp_void=no
c906108c 14022else
81ecdfbb 14023 ac_cv_func_setpgrp_void=yes
c906108c 14024fi
81ecdfbb
RW
14025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14026 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14027fi
81ecdfbb 14028
a3828db0 14029fi
81ecdfbb
RW
14030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14031$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
14032if test $ac_cv_func_setpgrp_void = yes; then
14033
81ecdfbb 14034$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
14035
14036fi
a3828db0
MK
14037
14038else
81ecdfbb
RW
14039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14040$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 14041if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14042 $as_echo_n "(cached) " >&6
97bf5e38 14043else
81ecdfbb 14044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14045/* end confdefs.h. */
a3828db0
MK
14046
14047#include <unistd.h>
14048
bec39cab
AC
14049int
14050main ()
14051{
a3828db0
MK
14052
14053 if (setpgrp(1,1) == -1)
14054 exit (0);
14055 else
14056 exit (1);
14057
bec39cab
AC
14058 ;
14059 return 0;
14060}
14061_ACEOF
81ecdfbb 14062if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14063 ac_cv_func_setpgrp_void=no
c906108c 14064else
81ecdfbb 14065 ac_cv_func_setpgrp_void=yes
c906108c 14066fi
81ecdfbb 14067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14068fi
81ecdfbb
RW
14069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14070$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 14071if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 14072 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 14073
a3828db0 14074fi
c906108c
SS
14075fi
14076
db1ff28b
JK
14077# Assume we'll default to using the included libiberty regex.
14078gdb_use_included_regex=yes
14079
14080# However, if the system regex is GNU regex, then default to *not*
14081# using the included regex.
14082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14083$as_echo_n "checking for GNU regex... " >&6; }
d0ac1c44 14084if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
14085 $as_echo_n "(cached) " >&6
14086else
14087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14088/* end confdefs.h. */
14089#include <gnu-versions.h>
14090int
14091main ()
14092{
14093#define REGEX_INTERFACE_VERSION 1
14094#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14095# error "Version mismatch"
14096#endif
14097 ;
14098 return 0;
14099}
14100_ACEOF
14101if ac_fn_c_try_compile "$LINENO"; then :
14102 gdb_cv_have_gnu_regex=yes
14103else
14104 gdb_cv_have_gnu_regex=no
14105fi
14106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14107fi
14108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14109$as_echo "$gdb_cv_have_gnu_regex" >&6; }
14110if test $gdb_cv_have_gnu_regex = yes; then
14111 gdb_use_included_regex=no
14112fi
14113
14114
14115# Check whether --with-included-regex was given.
14116if test "${with_included_regex+set}" = set; then :
14117 withval=$with_included_regex; gdb_with_regex=$withval
14118else
14119 gdb_with_regex=$gdb_use_included_regex
14120fi
14121
14122if test "$gdb_with_regex" = yes; then
14123
14124$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14125
14126fi
14127
81ecdfbb
RW
14128# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14129ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14130#include <sys/proc.h>
14131
14132"
d0ac1c44 14133if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 14134
5c45e068 14135cat >>confdefs.h <<_ACEOF
a3828db0 14136#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 14137_ACEOF
c906108c 14138
5c45e068 14139
97bf5e38 14140fi
c906108c 14141
5c45e068 14142
a3828db0 14143# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
14144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14145$as_echo_n "checking for struct lwp... " >&6; }
d0ac1c44 14146if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 14147 $as_echo_n "(cached) " >&6
bec39cab 14148else
81ecdfbb 14149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14150/* end confdefs.h. */
a3828db0 14151#include <sys/param.h>
c49fbc6c 14152#define _KMEMUSER
a3828db0 14153#include <sys/lwp.h>
bec39cab
AC
14154int
14155main ()
14156{
a3828db0 14157struct lwp l;
bec39cab
AC
14158 ;
14159 return 0;
14160}
14161_ACEOF
81ecdfbb 14162if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14163 gdb_cv_struct_lwp=yes
c906108c 14164else
81ecdfbb 14165 gdb_cv_struct_lwp=no
c906108c 14166fi
81ecdfbb 14167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14168fi
81ecdfbb
RW
14169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14170$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 14171if test $gdb_cv_struct_lwp = yes; then
c906108c 14172
81ecdfbb 14173$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 14174
97bf5e38 14175fi
c906108c 14176
a3828db0 14177# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
14178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14179$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
d0ac1c44 14180if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 14181 $as_echo_n "(cached) " >&6
bec39cab 14182else
81ecdfbb 14183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14184/* end confdefs.h. */
a3828db0
MK
14185#include <sys/types.h>
14186#include <machine/reg.h>
bec39cab
AC
14187int
14188main ()
14189{
a3828db0 14190struct reg r;
bec39cab
AC
14191 ;
14192 return 0;
14193}
14194_ACEOF
81ecdfbb 14195if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14196 gdb_cv_struct_reg=yes
27ca5dad 14197else
81ecdfbb 14198 gdb_cv_struct_reg=no
27ca5dad 14199fi
81ecdfbb 14200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14201fi
81ecdfbb
RW
14202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14203$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 14204if test $gdb_cv_struct_reg = yes; then
bec39cab 14205
81ecdfbb 14206$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14207
14208fi
97bf5e38 14209
a3828db0
MK
14210# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14211# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14212ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14213#include <machine/reg.h>
81ecdfbb 14214"
d0ac1c44 14215if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
14216
14217cat >>confdefs.h <<_ACEOF
a3828db0 14218#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14219_ACEOF
3862412b 14220
5c45e068 14221
97bf5e38 14222fi
a6e69c1f
JB
14223ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14224#include <machine/reg.h>
81ecdfbb 14225"
d0ac1c44 14226if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
14227
14228cat >>confdefs.h <<_ACEOF
a3828db0 14229#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14230_ACEOF
3862412b 14231
5c45e068 14232
97bf5e38 14233fi
3862412b 14234
5c45e068 14235
6fea9e18
L
14236# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14237# Older amd64 Linux's don't have the fs_base and gs_base members of
14238# `struct user_regs_struct'.
f517c180
EA
14239ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14240#include <sys/user.h>
6fea9e18 14241"
d0ac1c44 14242if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
14243
14244cat >>confdefs.h <<_ACEOF
14245#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14246_ACEOF
14247
14248
14249fi
f517c180
EA
14250ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14251#include <sys/user.h>
6fea9e18 14252"
d0ac1c44 14253if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14254
14255cat >>confdefs.h <<_ACEOF
14256#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14257_ACEOF
14258
14259
14260fi
14261
14262
a3828db0 14263# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14265$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14266if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14267 $as_echo_n "(cached) " >&6
451928c5 14268else
81ecdfbb 14269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14270/* end confdefs.h. */
a3828db0 14271#include <sys/ptrace.h>
bec39cab
AC
14272int
14273main ()
14274{
a3828db0 14275PTRACE_GETREGS;
bec39cab
AC
14276 ;
14277 return 0;
14278}
14279_ACEOF
81ecdfbb 14280if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14281 gdb_cv_have_ptrace_getregs=yes
451928c5 14282else
81ecdfbb 14283 gdb_cv_have_ptrace_getregs=no
451928c5 14284fi
81ecdfbb 14285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14286fi
14287
81ecdfbb
RW
14288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14289$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14290if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14291
81ecdfbb 14292$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14293
97bf5e38 14294fi
451928c5 14295
a3828db0 14296# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14298$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14299if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14300 $as_echo_n "(cached) " >&6
451928c5 14301else
81ecdfbb 14302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14303/* end confdefs.h. */
a3828db0 14304#include <sys/ptrace.h>
bec39cab
AC
14305int
14306main ()
14307{
a3828db0 14308PTRACE_GETFPXREGS;
bec39cab
AC
14309 ;
14310 return 0;
14311}
14312_ACEOF
81ecdfbb 14313if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14314 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14315else
81ecdfbb 14316 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14317fi
81ecdfbb 14318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14319fi
14320
81ecdfbb
RW
14321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14322$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14323if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14324
81ecdfbb 14325$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14326
97bf5e38 14327fi
451928c5 14328
a3828db0 14329# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14331$as_echo_n "checking for PT_GETDBREGS... " >&6; }
d0ac1c44 14332if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 14333 $as_echo_n "(cached) " >&6
3862412b 14334else
81ecdfbb 14335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14336/* end confdefs.h. */
a3828db0
MK
14337#include <sys/types.h>
14338#include <sys/ptrace.h>
bec39cab
AC
14339int
14340main ()
14341{
a3828db0 14342PT_GETDBREGS;
bec39cab
AC
14343 ;
14344 return 0;
14345}
14346_ACEOF
81ecdfbb 14347if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14348 gdb_cv_have_pt_getdbregs=yes
3862412b 14349else
81ecdfbb 14350 gdb_cv_have_pt_getdbregs=no
3862412b 14351fi
81ecdfbb 14352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14353fi
14354
81ecdfbb
RW
14355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14356$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14357if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14358
81ecdfbb 14359$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14360
97bf5e38 14361fi
3862412b 14362
a3828db0 14363# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14365$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
d0ac1c44 14366if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 14367 $as_echo_n "(cached) " >&6
3862412b 14368else
81ecdfbb 14369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14370/* end confdefs.h. */
a3828db0
MK
14371#include <sys/types.h>
14372#include <sys/ptrace.h>
bec39cab
AC
14373int
14374main ()
14375{
a3828db0 14376PT_GETXMMREGS;
bec39cab
AC
14377 ;
14378 return 0;
14379}
14380_ACEOF
81ecdfbb 14381if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14382 gdb_cv_have_pt_getxmmregs=yes
3862412b 14383else
81ecdfbb 14384 gdb_cv_have_pt_getxmmregs=no
3862412b 14385fi
81ecdfbb 14386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14387fi
14388
81ecdfbb
RW
14389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14390$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14391if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14392
81ecdfbb 14393$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14394
97bf5e38 14395fi
3862412b 14396
6e9567fe
JB
14397# See if <sys/ptrace.h> supports LWP names on FreeBSD
14398# Older FreeBSD versions don't have the pl_tdname member of
14399# `struct ptrace_lwpinfo'.
14400ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14401"
d0ac1c44 14402if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
14403
14404cat >>confdefs.h <<_ACEOF
14405#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14406_ACEOF
14407
14408
14409fi
14410
14411
e6cdd38e
JB
14412# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14413# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14414# FreeBSD 10.3.
14415ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14416"
d0ac1c44 14417if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
14418
14419cat >>confdefs.h <<_ACEOF
14420#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14421_ACEOF
14422
14423
14424fi
14425
6e9567fe 14426
97bf5e38 14427if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14429$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14430 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 14431 $as_echo_n "(cached) " >&6
596c9d4b 14432else
81ecdfbb 14433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14434/* end confdefs.h. */
596c9d4b
KB
14435
14436#define _SYSCALL32
d30c5336
JK
14437/* Needed for new procfs interface on sparc-solaris. */
14438#define _STRUCTURED_PROC 1
596c9d4b 14439#include <sys/procfs.h>
bec39cab
AC
14440int
14441main ()
14442{
97bf5e38 14443gregset_t avar
bec39cab
AC
14444 ;
14445 return 0;
14446}
14447_ACEOF
81ecdfbb 14448if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14449 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14450else
81ecdfbb 14451 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14452
596c9d4b 14453fi
81ecdfbb 14454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14455fi
14456
97bf5e38 14457 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14458
81ecdfbb 14459$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14460
14461 fi
81ecdfbb
RW
14462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14463$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14464
81ecdfbb
RW
14465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14466$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14467 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14468 $as_echo_n "(cached) " >&6
d84dd0c5 14469else
81ecdfbb 14470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14471/* end confdefs.h. */
97bf5e38
MK
14472
14473#define _SYSCALL32
d30c5336
JK
14474/* Needed for new procfs interface on sparc-solaris. */
14475#define _STRUCTURED_PROC 1
d84dd0c5 14476#include <sys/procfs.h>
bec39cab
AC
14477int
14478main ()
14479{
97bf5e38 14480fpregset_t avar
bec39cab
AC
14481 ;
14482 return 0;
14483}
14484_ACEOF
81ecdfbb 14485if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14486 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14487else
81ecdfbb 14488 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14489
d84dd0c5 14490fi
81ecdfbb 14491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14492fi
14493
97bf5e38 14494 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14495
81ecdfbb 14496$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14497
97bf5e38 14498 fi
81ecdfbb
RW
14499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14500$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14501
81ecdfbb
RW
14502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14503$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14504 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 14505 $as_echo_n "(cached) " >&6
c906108c 14506else
81ecdfbb 14507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14508/* end confdefs.h. */
c906108c 14509
97bf5e38 14510#define _SYSCALL32
d30c5336
JK
14511/* Needed for new procfs interface on sparc-solaris. */
14512#define _STRUCTURED_PROC 1
97bf5e38 14513#include <sys/procfs.h>
bec39cab
AC
14514int
14515main ()
14516{
97bf5e38 14517prgregset_t avar
bec39cab
AC
14518 ;
14519 return 0;
14520}
14521_ACEOF
81ecdfbb 14522if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14523 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14524else
81ecdfbb 14525 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14526
c906108c 14527fi
81ecdfbb 14528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14529fi
14530
97bf5e38 14531 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14532
81ecdfbb 14533$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14534
97bf5e38 14535 fi
81ecdfbb
RW
14536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14537$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14538
81ecdfbb
RW
14539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14540$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14541 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14542 $as_echo_n "(cached) " >&6
d45fe813 14543else
81ecdfbb 14544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14545/* end confdefs.h. */
97bf5e38
MK
14546
14547#define _SYSCALL32
d30c5336
JK
14548/* Needed for new procfs interface on sparc-solaris. */
14549#define _STRUCTURED_PROC 1
97bf5e38 14550#include <sys/procfs.h>
bec39cab
AC
14551int
14552main ()
14553{
97bf5e38 14554prfpregset_t avar
bec39cab
AC
14555 ;
14556 return 0;
14557}
14558_ACEOF
81ecdfbb 14559if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14560 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14561else
81ecdfbb 14562 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14563
d45fe813 14564fi
81ecdfbb 14565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14566fi
14567
97bf5e38 14568 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14569
81ecdfbb 14570$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14571
97bf5e38 14572 fi
81ecdfbb
RW
14573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14574$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14575
81ecdfbb
RW
14576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14577$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
d0ac1c44 14578 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 14579 $as_echo_n "(cached) " >&6
d45fe813 14580else
81ecdfbb 14581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14582/* end confdefs.h. */
97bf5e38
MK
14583
14584#define _SYSCALL32
d30c5336
JK
14585/* Needed for new procfs interface on sparc-solaris. */
14586#define _STRUCTURED_PROC 1
97bf5e38 14587#include <sys/procfs.h>
bec39cab
AC
14588int
14589main ()
14590{
97bf5e38 14591prgregset32_t avar
bec39cab
AC
14592 ;
14593 return 0;
14594}
14595_ACEOF
81ecdfbb 14596if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14597 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14598else
81ecdfbb 14599 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14600
d45fe813 14601fi
81ecdfbb 14602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14603fi
14604
97bf5e38 14605 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14606
81ecdfbb 14607$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14608
97bf5e38 14609 fi
81ecdfbb
RW
14610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14611$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14612
81ecdfbb
RW
14613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14614$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 14615 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14616 $as_echo_n "(cached) " >&6
d45fe813 14617else
81ecdfbb 14618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14619/* end confdefs.h. */
97bf5e38 14620
d45fe813 14621#define _SYSCALL32
d30c5336
JK
14622/* Needed for new procfs interface on sparc-solaris. */
14623#define _STRUCTURED_PROC 1
97bf5e38 14624#include <sys/procfs.h>
bec39cab
AC
14625int
14626main ()
14627{
97bf5e38 14628lwpid_t avar
bec39cab
AC
14629 ;
14630 return 0;
14631}
14632_ACEOF
81ecdfbb 14633if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14634 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14635else
81ecdfbb 14636 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14637
d45fe813 14638fi
81ecdfbb 14639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14640fi
14641
97bf5e38 14642 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14643
81ecdfbb 14644$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14645
97bf5e38 14646 fi
81ecdfbb
RW
14647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14648$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14649
81ecdfbb
RW
14650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14651$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 14652 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14653 $as_echo_n "(cached) " >&6
c906108c 14654else
81ecdfbb 14655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14656/* end confdefs.h. */
c906108c 14657
97bf5e38 14658#define _SYSCALL32
d30c5336
JK
14659/* Needed for new procfs interface on sparc-solaris. */
14660#define _STRUCTURED_PROC 1
97bf5e38 14661#include <sys/procfs.h>
bec39cab
AC
14662int
14663main ()
14664{
97bf5e38 14665psaddr_t avar
bec39cab
AC
14666 ;
14667 return 0;
14668}
14669_ACEOF
81ecdfbb 14670if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14671 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14672else
81ecdfbb 14673 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14674
c906108c 14675fi
81ecdfbb 14676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14677fi
14678
97bf5e38 14679 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14680
81ecdfbb 14681$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14682
97bf5e38 14683 fi
81ecdfbb
RW
14684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14685$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14686
43b7e92b
GB
14687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14688$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14689 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14690 $as_echo_n "(cached) " >&6
14691else
14692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14693/* end confdefs.h. */
14694
14695#define _SYSCALL32
14696/* Needed for new procfs interface on sparc-solaris. */
14697#define _STRUCTURED_PROC 1
14698#include <sys/procfs.h>
14699int
14700main ()
14701{
14702elf_fpregset_t avar
14703 ;
14704 return 0;
14705}
14706_ACEOF
14707if ac_fn_c_try_compile "$LINENO"; then :
14708 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14709else
14710 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14711
14712fi
14713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14714fi
14715
14716 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14717
14718$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14719
14720 fi
14721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14722$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14723
c906108c 14724fi
c906108c 14725
bc8bcb4b 14726# Check if the compiler supports the `long long' type.
c906108c 14727
81ecdfbb
RW
14728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14729$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 14730if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 14731 $as_echo_n "(cached) " >&6
97bf5e38 14732else
81ecdfbb 14733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14734/* end confdefs.h. */
bc8bcb4b 14735extern long long foo;
bec39cab
AC
14736int
14737main ()
14738{
bc8bcb4b 14739switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14740 ;
14741 return 0;
14742}
14743_ACEOF
81ecdfbb 14744if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14745 gdb_cv_c_long_long=yes
14746else
81ecdfbb 14747 gdb_cv_c_long_long=no
97bf5e38 14748fi
81ecdfbb 14749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14750fi
81ecdfbb
RW
14751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14752$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14753if test $gdb_cv_c_long_long != yes; then
14754 # libdecnumber requires long long.
d0ac1c44 14755 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14756fi
14757
bc8bcb4b 14758# Check if the compiler and runtime support printing long longs.
97bf5e38 14759
81ecdfbb
RW
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14761$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 14762if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 14763 $as_echo_n "(cached) " >&6
97bf5e38 14764else
81ecdfbb 14765 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14766 gdb_cv_printf_has_long_long=no
14767else
81ecdfbb 14768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14769/* end confdefs.h. */
bc8bcb4b
MK
14770$ac_includes_default
14771int
14772main ()
14773{
14774char buf[32];
97bf5e38
MK
14775 long long l = 0;
14776 l = (l << 16) + 0x0123;
14777 l = (l << 16) + 0x4567;
14778 l = (l << 16) + 0x89ab;
14779 l = (l << 16) + 0xcdef;
14780 sprintf (buf, "0x%016llx", l);
14781 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14782 ;
14783 return 0;
c906108c 14784}
bec39cab 14785_ACEOF
81ecdfbb 14786if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14787 gdb_cv_printf_has_long_long=yes
14788else
81ecdfbb 14789 gdb_cv_printf_has_long_long=no
97bf5e38 14790fi
81ecdfbb
RW
14791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14792 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14793fi
81ecdfbb 14794
97bf5e38 14795fi
81ecdfbb
RW
14796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14797$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14798if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14799
81ecdfbb 14800$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14801
14802fi
97bf5e38 14803
1a619819
LM
14804# Check if the compiler and runtime support printing decfloats.
14805
81ecdfbb
RW
14806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14807$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 14808if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 14809 $as_echo_n "(cached) " >&6
1a619819 14810else
81ecdfbb 14811 if test "$cross_compiling" = yes; then :
1a619819
LM
14812 gdb_cv_printf_has_decfloat=no
14813else
81ecdfbb 14814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14815/* end confdefs.h. */
14816$ac_includes_default
14817int
14818main ()
14819{
14820char buf[64];
14821 _Decimal32 d32 = 1.2345df;
14822 _Decimal64 d64 = 1.2345dd;
14823 _Decimal128 d128 = 1.2345dl;
14824 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14825 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14826 ;
14827 return 0;
14828}
14829_ACEOF
81ecdfbb 14830if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14831 gdb_cv_printf_has_decfloat=yes
14832else
81ecdfbb 14833 gdb_cv_printf_has_decfloat=no
1a619819 14834fi
81ecdfbb
RW
14835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14836 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14837fi
81ecdfbb 14838
1a619819 14839fi
81ecdfbb
RW
14840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14841$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14842if test $gdb_cv_printf_has_decfloat = yes; then
14843
81ecdfbb 14844$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14845
14846fi
14847
bc8bcb4b
MK
14848# Check if the compiler supports the `long double' type. We can't use
14849# AC_C_LONG_DOUBLE because that one does additional checks on the
14850# constants defined in <float.h> that fail on some systems,
14851# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14852
81ecdfbb
RW
14853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14854$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 14855if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 14856 $as_echo_n "(cached) " >&6
97bf5e38 14857else
81ecdfbb 14858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14859/* end confdefs.h. */
97bf5e38 14860long double foo;
bec39cab 14861_ACEOF
81ecdfbb 14862if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14863 gdb_cv_c_long_double=yes
97bf5e38 14864else
81ecdfbb 14865 gdb_cv_c_long_double=no
97bf5e38 14866fi
81ecdfbb 14867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14868fi
81ecdfbb
RW
14869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14870$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14871if test $gdb_cv_c_long_double = yes; then
c906108c 14872
81ecdfbb 14873$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14874
14875fi
14876
bc8bcb4b 14877# Check if the compiler and runtime support printing long doubles.
97bf5e38 14878
81ecdfbb
RW
14879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14880$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 14881if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 14882 $as_echo_n "(cached) " >&6
97bf5e38 14883else
81ecdfbb 14884 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14885 gdb_cv_printf_has_long_double=no
14886else
81ecdfbb 14887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14888/* end confdefs.h. */
bc8bcb4b
MK
14889$ac_includes_default
14890int
14891main ()
14892{
14893char buf[16];
97bf5e38
MK
14894 long double f = 3.141592653;
14895 sprintf (buf, "%Lg", f);
14896 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14897 ;
14898 return 0;
97bf5e38 14899}
bec39cab 14900_ACEOF
81ecdfbb 14901if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14902 gdb_cv_printf_has_long_double=yes
c906108c 14903else
81ecdfbb 14904 gdb_cv_printf_has_long_double=no
c906108c 14905fi
81ecdfbb
RW
14906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14907 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14908fi
81ecdfbb 14909
c906108c 14910fi
81ecdfbb
RW
14911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14912$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14913if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14914
81ecdfbb 14915$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14916
14917fi
97bf5e38 14918
bc8bcb4b 14919# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14920
81ecdfbb
RW
14921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14922$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 14923if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 14924 $as_echo_n "(cached) " >&6
97bf5e38 14925else
81ecdfbb 14926 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14927 gdb_cv_scanf_has_long_double=no
14928else
81ecdfbb 14929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14930/* end confdefs.h. */
bc8bcb4b
MK
14931#include <stdio.h>
14932int
14933main ()
14934{
14935char *buf = "3.141592653";
97bf5e38
MK
14936 long double f = 0;
14937 sscanf (buf, "%Lg", &f);
14938 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14939 ;
14940 return 0;
97bf5e38 14941}
bec39cab 14942_ACEOF
81ecdfbb 14943if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14944 gdb_cv_scanf_has_long_double=yes
14945else
81ecdfbb 14946 gdb_cv_scanf_has_long_double=no
97bf5e38 14947fi
81ecdfbb
RW
14948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14949 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14950fi
81ecdfbb 14951
c906108c 14952fi
81ecdfbb
RW
14953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14954$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14955if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14956
81ecdfbb 14957$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14958
14959fi
c906108c 14960
438013df
AO
14961case ${host_os} in
14962aix*)
81ecdfbb
RW
14963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14964$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 14965if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 14966 $as_echo_n "(cached) " >&6
438013df 14967else
bec39cab 14968
438013df
AO
14969 SAVE_LDFLAGS=$LDFLAGS
14970
14971 case $GCC in
14972 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14973 *) gdb_cv_bigtoc=-bbigtoc ;;
14974 esac
14975
14976 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14978/* end confdefs.h. */
438013df 14979
bec39cab
AC
14980int
14981main ()
14982{
438013df 14983int i;
bec39cab
AC
14984 ;
14985 return 0;
14986}
14987_ACEOF
81ecdfbb 14988if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14989
81ecdfbb
RW
14990else
14991 gdb_cv_bigtoc=
438013df 14992fi
81ecdfbb
RW
14993rm -f core conftest.err conftest.$ac_objext \
14994 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14995 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14996
bec39cab 14997fi
81ecdfbb
RW
14998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14999$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
15000 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15001 ;;
15002esac
15003
38f6b338 15004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 15005$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
15006dynamic_list=false
15007if test "${gdb_native}" = yes; then
15008 # The dynamically loaded libthread_db needs access to symbols in the gdb
15009 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15010 # may not be supported there.
15011 old_LDFLAGS="$LDFLAGS"
15012 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15013 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15014 LDFLAGS="$LDFLAGS $RDYNAMIC"
15015 if test "${have_libpython}" = no; then
15016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
15017/* end confdefs.h. */
15018
15019int
15020main ()
15021{
15022
15023 ;
15024 return 0;
15025}
15026_ACEOF
15027if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
15028 dynamic_list=true
15029fi
15030rm -f core conftest.err conftest.$ac_objext \
15031 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
15032 else
15033 # Workaround http://bugs.python.org/issue4434 where static
15034 # libpythonX.Y.a would get its symbols required for
15035 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15036 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
15037
15038 # Note the workaround for Python
15039 # http://bugs.python.org/issue10112 earlier has removed
15040 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15041 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15042 # always pass.
38f6b338
JK
15043 old_CFLAGS="$CFLAGS"
15044 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
15045 old_LIBS="$LIBS"
15046 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
15047 old_CPPFLAGS="$CPPFLAGS"
15048 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 15049 if test "$cross_compiling" = yes; then :
3bebe2f2 15050 true
f6528abd 15051else
3bebe2f2
JK
15052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15053/* end confdefs.h. */
1b4f615e 15054#include "Python.h"
3bebe2f2
JK
15055int
15056main ()
15057{
15058int err;
38f6b338
JK
15059 Py_Initialize ();
15060 err = PyRun_SimpleString ("import itertools\n");
15061 Py_Finalize ();
15062 return err == 0 ? 0 : 1;
3bebe2f2
JK
15063 ;
15064 return 0;
15065}
15066_ACEOF
15067if ac_fn_c_try_run "$LINENO"; then :
15068 dynamic_list=true
15069fi
15070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15071 conftest.$ac_objext conftest.beam conftest.$ac_ext
15072fi
15073
8c1fb155 15074 LIBS="$old_LIBS"
38f6b338 15075 CFLAGS="$old_CFLAGS"
1b4f615e 15076 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
15077 fi
15078 LDFLAGS="$old_LDFLAGS"
15079fi
15080if $dynamic_list; then
15081 found="-Wl,--dynamic-list"
15082 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15083else
38f6b338
JK
15084 found="-rdynamic"
15085 RDYNAMIC="-rdynamic"
f6528abd 15086fi
f6528abd 15087
38f6b338 15088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15089$as_echo "$found" >&6; }
0407b3f1 15090
f6528abd 15091
0407b3f1 15092if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 15093 case ${host_os} in
d92419e5 15094 aix*)
81ecdfbb
RW
15095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15096$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 15097 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 15098 $as_echo_n "(cached) " >&6
bec39cab 15099else
81ecdfbb 15100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15101/* end confdefs.h. */
d92419e5 15102#include <sys/pthdebug.h>
bec39cab
AC
15103int
15104main ()
15105{
d92419e5
JB
15106#ifndef PTHDB_VERSION_3
15107 #error
15108 #endif
bec39cab
AC
15109 ;
15110 return 0;
15111}
15112_ACEOF
81ecdfbb 15113if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15114 gdb_cv_have_aix_thread_debug=yes
15115else
81ecdfbb 15116 gdb_cv_have_aix_thread_debug=no
d92419e5 15117fi
81ecdfbb 15118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15119fi
15120
81ecdfbb
RW
15121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15122$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
15123 if test $gdb_cv_have_aix_thread_debug = yes; then
15124 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15125 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15126 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15127
15128 # Older versions of AIX do not provide the declaration for
15129 # the getthrds function (it appears that it was introduced
15130 # with AIX 6.x).
15131 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15132"
d0ac1c44 15133if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
15134 ac_have_decl=1
15135else
15136 ac_have_decl=0
15137fi
15138
15139cat >>confdefs.h <<_ACEOF
15140#define HAVE_DECL_GETTHRDS $ac_have_decl
15141_ACEOF
15142
d92419e5
JB
15143 fi
15144 ;;
c906108c 15145 esac
bec39cab 15146
c906108c
SS
15147fi
15148
3f47be5c 15149if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15151$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 15152if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 15153 $as_echo_n "(cached) " >&6
bec39cab 15154else
81ecdfbb 15155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15156/* end confdefs.h. */
3f47be5c 15157#include <thread_db.h>
bec39cab
AC
15158int
15159main ()
15160{
3f47be5c 15161int i = TD_NOTALLOC;
bec39cab
AC
15162 ;
15163 return 0;
15164}
15165_ACEOF
81ecdfbb 15166if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15167 gdb_cv_thread_db_h_has_td_notalloc=yes
15168else
81ecdfbb 15169 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15170
3f47be5c 15171fi
81ecdfbb 15172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15173
bec39cab 15174fi
81ecdfbb
RW
15175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15176$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15178$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 15179if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 15180 $as_echo_n "(cached) " >&6
59f80f10 15181else
81ecdfbb 15182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15183/* end confdefs.h. */
15184#include <thread_db.h>
15185int
15186main ()
15187{
15188int i = TD_VERSION;
15189 ;
15190 return 0;
15191}
15192_ACEOF
81ecdfbb 15193if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15194 gdb_cv_thread_db_h_has_td_version=yes
15195else
81ecdfbb 15196 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15197
15198fi
81ecdfbb 15199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15200
15201fi
81ecdfbb
RW
15202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15203$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15205$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 15206if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15207 $as_echo_n "(cached) " >&6
59f80f10 15208else
81ecdfbb 15209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15210/* end confdefs.h. */
15211#include <thread_db.h>
15212int
15213main ()
15214{
15215int i = TD_NOTLS;
15216 ;
15217 return 0;
15218}
15219_ACEOF
81ecdfbb 15220if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15221 gdb_cv_thread_db_h_has_td_notls=yes
15222else
81ecdfbb 15223 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15224
15225fi
81ecdfbb 15226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15227
15228fi
81ecdfbb
RW
15229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15230$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15231fi
15232if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15233
81ecdfbb 15234$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15235
59f80f10
DJ
15236fi
15237if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15238
81ecdfbb 15239$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15240
15241fi
15242if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15243
81ecdfbb 15244$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15245
3f47be5c
EZ
15246fi
15247
81ecdfbb
RW
15248ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15249"
d0ac1c44 15250if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15251 ac_have_decl=1
10568435 15252else
81ecdfbb 15253 ac_have_decl=0
10568435 15254fi
10568435
JK
15255
15256cat >>confdefs.h <<_ACEOF
81ecdfbb 15257#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15258_ACEOF
15259
15260
81ecdfbb
RW
15261if test "$cross_compiling" = yes; then :
15262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15263/* end confdefs.h. */
15264#include <sys/personality.h>
15265int
15266main ()
15267{
15268
15269# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15270# define ADDR_NO_RANDOMIZE 0x0040000
15271# endif
15272 /* Test the flag could be set and stays set. */
15273 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15274 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15275 return 1
15276 ;
15277 return 0;
15278}
15279_ACEOF
81ecdfbb 15280if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15281 have_personality=true
15282else
81ecdfbb 15283 have_personality=false
10568435 15284fi
81ecdfbb
RW
15285rm -f core conftest.err conftest.$ac_objext \
15286 conftest$ac_exeext conftest.$ac_ext
10568435 15287else
81ecdfbb 15288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15289/* end confdefs.h. */
15290#include <sys/personality.h>
15291int
15292main ()
15293{
15294
15295# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15296# define ADDR_NO_RANDOMIZE 0x0040000
15297# endif
15298 /* Test the flag could be set and stays set. */
15299 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15300 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15301 return 1
15302 ;
15303 return 0;
15304}
15305_ACEOF
81ecdfbb 15306if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15307 have_personality=true
15308else
81ecdfbb 15309 have_personality=false
10568435 15310fi
81ecdfbb
RW
15311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15312 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15313fi
81ecdfbb 15314
10568435
JK
15315if $have_personality
15316then
15317
81ecdfbb 15318$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15319
15320fi
15321
e655c1a2
PA
15322case $host_os in
15323 go32* | *djgpp*)
15324 gdbinit=gdb.ini
15325 ;;
15326 *)
15327 gdbinit=.gdbinit
15328 ;;
15329esac
15330
15331cat >>confdefs.h <<_ACEOF
15332#define GDBINIT "$gdbinit"
15333_ACEOF
15334
15335
fb40c209 15336
f83d8a90
DE
15337# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15338# except that the argument to --with-sysroot is optional.
15339# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15340if test "x$with_sysroot" = xyes; then
15341 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15342fi
bec39cab 15343
81ecdfbb
RW
15344# Check whether --with-sysroot was given.
15345if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15346 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15347else
15348 TARGET_SYSTEM_ROOT=
15349fi
030292b7 15350
030292b7 15351
f83d8a90
DE
15352 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15353 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15354 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15355 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15356
f83d8a90
DE
15357cat >>confdefs.h <<_ACEOF
15358#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15359_ACEOF
bec39cab 15360
030292b7 15361
b14b1491 15362
f83d8a90
DE
15363
15364 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15365 if test "x$prefix" = xNONE; then
15366 test_prefix=/usr/local
15367 else
15368 test_prefix=$prefix
15369 fi
15370 else
15371 test_prefix=$exec_prefix
15372 fi
15373 value=0
15374 case ${ac_define_dir} in
15375 "${test_prefix}"|"${test_prefix}/"*|\
15376 '${exec_prefix}'|'${exec_prefix}/'*)
15377 value=1
15378 ;;
15379 esac
15380
15381cat >>confdefs.h <<_ACEOF
15382#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15383_ACEOF
030292b7
DJ
15384
15385
15386
16e7150e 15387
16e7150e 15388
81ecdfbb
RW
15389# Check whether --with-system-gdbinit was given.
15390if test "${with_system_gdbinit+set}" = set; then :
15391 withval=$with_system_gdbinit;
b14b1491
TT
15392 SYSTEM_GDBINIT=$withval
15393else
15394 SYSTEM_GDBINIT=
81ecdfbb
RW
15395fi
15396
16e7150e
JG
15397
15398 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15399 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15400 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15401 ac_define_dir=`eval echo $ac_define_dir`
15402
15403cat >>confdefs.h <<_ACEOF
15404#define SYSTEM_GDBINIT "$ac_define_dir"
15405_ACEOF
15406
15407
15408
0c4a4063 15409
b14b1491
TT
15410 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15411 if test "x$prefix" = xNONE; then
15412 test_prefix=/usr/local
15413 else
15414 test_prefix=$prefix
15415 fi
15416 else
15417 test_prefix=$exec_prefix
15418 fi
15419 value=0
15420 case ${ac_define_dir} in
15421 "${test_prefix}"|"${test_prefix}/"*|\
15422 '${exec_prefix}'|'${exec_prefix}/'*)
15423 value=1
15424 ;;
15425 esac
16e7150e 15426
b14b1491
TT
15427cat >>confdefs.h <<_ACEOF
15428#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15429_ACEOF
15430
b14b1491 15431
16e7150e 15432
0c4a4063 15433
b835bb52 15434
81ecdfbb
RW
15435# Check whether --enable-werror was given.
15436if test "${enable_werror+set}" = set; then :
15437 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15438 yes | y) ERROR_ON_WARNING="yes" ;;
15439 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 15440 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15441 esac
81ecdfbb
RW
15442fi
15443
094a342e 15444
9a084706
PA
15445# Enable -Werror by default when using gcc. Turn it off for releases.
15446if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15447 ERROR_ON_WARNING=yes
15448fi
15449
15450WERROR_CFLAGS=""
15451if test "${ERROR_ON_WARNING}" = yes ; then
15452 WERROR_CFLAGS="-Werror"
15453fi
15454
cf6de44d 15455# The options we'll try to enable.
aac331e4 15456build_warnings="-Wall -Wpointer-arith \
a0de763e 15457-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 15458-Wno-switch -Wno-char-subscripts \
cf6de44d 15459-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 15460-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 15461-Wno-mismatched-tags \
632e107b 15462-Wno-error=deprecated-register \
85e26832 15463-Wsuggest-override \
1a34f210 15464-Wimplicit-fallthrough=3 \
96643e35
TT
15465-Wduplicated-cond \
15466-Wshadow=local"
3bc3d82a 15467
3526781e 15468case "${host}" in
4fa7574e
RO
15469 *-*-mingw32*)
15470 # Enable -Wno-format by default when using gcc on mingw since many
15471 # GCC versions complain about %I64.
15472 build_warnings="$build_warnings -Wno-format" ;;
15473 *-*-solaris*)
15474 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15475 # doesn't understand.
15476 build_warnings="$build_warnings -Wno-unknown-pragmas"
15477 # Solaris 11 <unistd.h> marks vfork deprecated.
15478 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
15479 *)
15480 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
15481 # but there's a special case for this below.
15482 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15483esac
15484
81ecdfbb
RW
15485# Check whether --enable-build-warnings was given.
15486if test "${enable_build_warnings+set}" = set; then :
15487 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15488 yes) ;;
15489 no) build_warnings="-w";;
15490 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15491 build_warnings="${build_warnings} ${t}";;
15492 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15493 build_warnings="${t} ${build_warnings}";;
15494 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15495esac
d4f3574e 15496if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15497 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15498fi
81ecdfbb
RW
15499fi
15500# Check whether --enable-gdb-build-warnings was given.
15501if test "${enable_gdb_build_warnings+set}" = set; then :
15502 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15503 yes) ;;
15504 no) build_warnings="-w";;
15505 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15506 build_warnings="${build_warnings} ${t}";;
15507 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15508 build_warnings="${t} ${build_warnings}";;
15509 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15510esac
15511if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15512 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15513fi
81ecdfbb 15514fi
3bc3d82a
PA
15515
15516# The set of warnings supported by a C++ compiler is not the same as
15517# of the C compiler.
cf6de44d 15518ac_ext=cpp
3bc3d82a
PA
15519ac_cpp='$CXXCPP $CPPFLAGS'
15520ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15521ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15522ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15523
3bc3d82a 15524
81ecdfbb 15525WARN_CFLAGS=""
c906108c
SS
15526if test "x${build_warnings}" != x -a "x$GCC" = xyes
15527then
81ecdfbb
RW
15528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15529$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15530 # Separate out the -Werror flag as some files just cannot be
15531 # compiled with it enabled.
15532 for w in ${build_warnings}; do
7544db95
PA
15533 # GCC does not complain about -Wno-unknown-warning. Invert
15534 # and test -Wunknown-warning instead.
15535 case $w in
15536 -Wno-*)
15537 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
15538 -Wformat-nonliteral)
15539 # gcc requires -Wformat before -Wformat-nonliteral
15540 # will work, so stick them together.
15541 w="-Wformat $w"
15542 wtest="$w"
15543 ;;
7544db95
PA
15544 *)
15545 wtest=$w ;;
15546 esac
15547
746a987d
AC
15548 case $w in
15549 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15550 *)
15551 # Check whether GCC accepts it.
4536bbc6 15552 saved_CFLAGS="$CFLAGS"
3e019bdc 15553 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15554 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15555 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
15556 if test "x$w" = "x-Wunused-variable"; then
15557 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
15558 # fixed in GCC 4.9. This test is derived from the gdb
15559 # source code that triggered this bug in GCC.
15560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15561/* end confdefs.h. */
15562struct scoped_restore_base {};
15563 struct scoped_restore_tmpl : public scoped_restore_base {
15564 ~scoped_restore_tmpl() {}
15565 };
15566int
15567main ()
15568{
15569const scoped_restore_base &b = scoped_restore_tmpl();
15570 ;
15571 return 0;
15572}
15573_ACEOF
15574if ac_fn_cxx_try_compile "$LINENO"; then :
15575 WARN_CFLAGS="${WARN_CFLAGS} $w"
15576fi
15577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15578 else
15579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15580/* end confdefs.h. */
4536bbc6 15581
bec39cab
AC
15582int
15583main ()
15584{
4536bbc6 15585
bec39cab
AC
15586 ;
15587 return 0;
15588}
15589_ACEOF
3bc3d82a 15590if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15591 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15592fi
81ecdfbb 15593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 15594 fi
4536bbc6 15595 CFLAGS="$saved_CFLAGS"
3bc3d82a 15596 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15597 esac
15598 done
81ecdfbb
RW
15599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15600$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15601fi
15602
15603
104c1213 15604
cf6de44d 15605ac_ext=c
3bc3d82a
PA
15606ac_cpp='$CPP $CPPFLAGS'
15607ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15608ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15609ac_compiler_gnu=$ac_cv_c_compiler_gnu
15610
3bc3d82a 15611
b835bb52 15612
f35d5ade
TT
15613# Check whether --enable-ubsan was given.
15614if test "${enable_ubsan+set}" = set; then :
15615 enableval=$enable_ubsan;
15616else
eff98030 15617 enable_ubsan=no
f35d5ade
TT
15618fi
15619
15620if test "x$enable_ubsan" = xauto; then
15621 if $development; then
15622 enable_ubsan=yes
15623 fi
15624fi
15625ac_ext=cpp
15626ac_cpp='$CXXCPP $CPPFLAGS'
15627ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15628ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15629ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15630
15631if test "x$enable_ubsan" = xyes; then
15632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
15633$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
15634 saved_CXXFLAGS="$CXXFLAGS"
15635 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15637/* end confdefs.h. */
15638
15639int
15640main ()
15641{
15642
15643 ;
15644 return 0;
15645}
15646_ACEOF
15647if ac_fn_cxx_try_link "$LINENO"; then :
15648 enable_ubsan=yes
15649else
15650 enable_ubsan=no
15651fi
15652rm -f core conftest.err conftest.$ac_objext \
15653 conftest$ac_exeext conftest.$ac_ext
15654 CXXFLAGS="$saved_CXXFLAGS"
15655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
15656$as_echo "$enable_ubsan" >&6; }
15657 if test "x$enable_ubsan" = xyes; then
15658 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15659 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
15660 fi
15661fi
15662ac_ext=c
15663ac_cpp='$CPP $CPPFLAGS'
15664ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15665ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15666ac_compiler_gnu=$ac_cv_c_compiler_gnu
15667
15668
15669
7a292a7a 15670# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15672$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 15673if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 15674 $as_echo_n "(cached) " >&6
bec39cab 15675else
81ecdfbb 15676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15677/* end confdefs.h. */
7a292a7a
SS
15678
15679#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15680lose
15681#endif
bec39cab 15682_ACEOF
7a292a7a 15683if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15684 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15685 gdb_cv_os_cygwin=yes
15686else
7a292a7a
SS
15687 gdb_cv_os_cygwin=no
15688fi
15689rm -f conftest*
15690
15691fi
81ecdfbb
RW
15692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15693$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15694
aff38e61 15695
3eb25fda 15696SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15697case ${host} in
95cbc983
AC
15698 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15699 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15700 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 15701 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
15702esac
15703
15704
cd0fc7c3
SS
15705# libreadline needs libuser32.a in a cygwin environment
15706WIN32LIBS=
15707if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15708 WIN32LIBS="-luser32"
15709 case "${target}" in
15710 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15711 ;;
15712 esac
cd0fc7c3 15713fi
c906108c 15714
b4505029
MM
15715# The ser-tcp.c module requires sockets.
15716case ${host} in
15717 *mingw32*)
15718
81ecdfbb 15719$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15720
15721 WIN32LIBS="$WIN32LIBS -lws2_32"
15722 ;;
15723esac
15724
7a292a7a 15725
31d99776 15726# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15727
15728 OLD_CFLAGS=$CFLAGS
15729 OLD_LDFLAGS=$LDFLAGS
15730 OLD_LIBS=$LIBS
15731 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15732 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15733 # always want our bfd.
15734 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15735 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15736 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15737 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15738 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 15740$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 15741if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 15742 $as_echo_n "(cached) " >&6
31d99776 15743else
81ecdfbb 15744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15745/* end confdefs.h. */
15746#include <stdlib.h>
def63ff0
TT
15747 #include "bfd.h"
15748 #include "elf-bfd.h"
31d99776
DJ
15749
15750int
15751main ()
15752{
def63ff0 15753return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15754 ;
15755 return 0;
15756}
15757_ACEOF
81ecdfbb 15758if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15759 gdb_cv_var_elf=yes
15760else
81ecdfbb 15761 gdb_cv_var_elf=no
31d99776 15762fi
81ecdfbb
RW
15763rm -f core conftest.err conftest.$ac_objext \
15764 conftest$ac_exeext conftest.$ac_ext
31d99776 15765fi
81ecdfbb
RW
15766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15767$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15768 CFLAGS=$OLD_CFLAGS
15769 LDFLAGS=$OLD_LDFLAGS
15770 LIBS=$OLD_LIBS
31d99776 15771if test $gdb_cv_var_elf = yes; then
d4777acb 15772 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15773
81ecdfbb 15774$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15775
075ff26d
JK
15776 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15777 if test "$plugins" = "yes"; then
a48b32c0
L
15778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15779$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 15780if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15781 $as_echo_n "(cached) " >&6
15782else
15783 ac_func_search_save_LIBS=$LIBS
15784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15785/* end confdefs.h. */
15786
15787/* Override any GCC internal prototype to avoid an error.
15788 Use char because int might match the return type of a GCC
15789 builtin and then its argument prototype would still apply. */
15790#ifdef __cplusplus
15791extern "C"
15792#endif
15793char dlopen ();
15794int
15795main ()
15796{
15797return dlopen ();
15798 ;
15799 return 0;
15800}
15801_ACEOF
15802for ac_lib in '' dl; do
15803 if test -z "$ac_lib"; then
15804 ac_res="none required"
15805 else
15806 ac_res=-l$ac_lib
15807 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15808 fi
15809 if ac_fn_c_try_link "$LINENO"; then :
15810 ac_cv_search_dlopen=$ac_res
15811fi
15812rm -f core conftest.err conftest.$ac_objext \
15813 conftest$ac_exeext
d0ac1c44 15814 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15815 break
15816fi
15817done
d0ac1c44 15818if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15819
15820else
15821 ac_cv_search_dlopen=no
15822fi
15823rm conftest.$ac_ext
15824LIBS=$ac_func_search_save_LIBS
15825fi
15826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15827$as_echo "$ac_cv_search_dlopen" >&6; }
15828ac_res=$ac_cv_search_dlopen
15829if test "$ac_res" != no; then :
15830 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15831
15832fi
15833
075ff26d 15834 fi
31d99776 15835fi
31d99776 15836
4f05add4
TT
15837# Add macho support to GDB, but only if BFD includes it.
15838
15839 OLD_CFLAGS=$CFLAGS
15840 OLD_LDFLAGS=$LDFLAGS
15841 OLD_LIBS=$LIBS
15842 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15843 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15844 # always want our bfd.
15845 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15846 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15847 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15848 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15849 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15851$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 15852if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
15853 $as_echo_n "(cached) " >&6
15854else
15855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15856/* end confdefs.h. */
15857#include <stdlib.h>
15858 #include "bfd.h"
15859 #include "mach-o.h"
15860
15861int
15862main ()
15863{
15864return bfd_mach_o_lookup_command (NULL, 0, NULL);
15865 ;
15866 return 0;
15867}
15868_ACEOF
15869if ac_fn_c_try_link "$LINENO"; then :
15870 gdb_cv_var_macho=yes
15871else
15872 gdb_cv_var_macho=no
15873fi
15874rm -f core conftest.err conftest.$ac_objext \
15875 conftest$ac_exeext conftest.$ac_ext
15876fi
15877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15878$as_echo "$gdb_cv_var_macho" >&6; }
15879 CFLAGS=$OLD_CFLAGS
15880 LDFLAGS=$OLD_LDFLAGS
15881 LIBS=$OLD_LIBS
15882if test $gdb_cv_var_macho = yes; then
15883 CONFIG_OBS="$CONFIG_OBS machoread.o"
15884fi
15885
121ce6e5
DJ
15886# Add any host-specific objects to GDB.
15887CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15888
608e2dbb
TT
15889# If building on ELF, look for lzma support for embedded compressed debug info.
15890if test $gdb_cv_var_elf = yes; then
15891
15892# Check whether --with-lzma was given.
15893if test "${with_lzma+set}" = set; then :
15894 withval=$with_lzma;
15895else
15896 with_lzma=auto
15897fi
15898
15899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15900$as_echo_n "checking whether to use lzma... " >&6; }
15901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15902$as_echo "$with_lzma" >&6; }
15903
15904 if test "${with_lzma}" != no; then
15905
15906
15907
15908
15909
15910
15911
15912
15913 use_additional=yes
15914
15915 acl_save_prefix="$prefix"
15916 prefix="$acl_final_prefix"
15917 acl_save_exec_prefix="$exec_prefix"
15918 exec_prefix="$acl_final_exec_prefix"
15919
15920 eval additional_includedir=\"$includedir\"
15921 eval additional_libdir=\"$libdir\"
15922
15923 exec_prefix="$acl_save_exec_prefix"
15924 prefix="$acl_save_prefix"
15925
15926
15927# Check whether --with-liblzma-prefix was given.
15928if test "${with_liblzma_prefix+set}" = set; then :
15929 withval=$with_liblzma_prefix;
15930 if test "X$withval" = "Xno"; then
15931 use_additional=no
15932 else
15933 if test "X$withval" = "X"; then
15934
15935 acl_save_prefix="$prefix"
15936 prefix="$acl_final_prefix"
15937 acl_save_exec_prefix="$exec_prefix"
15938 exec_prefix="$acl_final_exec_prefix"
15939
15940 eval additional_includedir=\"$includedir\"
15941 eval additional_libdir=\"$libdir\"
15942
15943 exec_prefix="$acl_save_exec_prefix"
15944 prefix="$acl_save_prefix"
15945
15946 else
15947 additional_includedir="$withval/include"
15948 additional_libdir="$withval/lib"
15949 fi
15950 fi
15951
15952fi
15953
15954 LIBLZMA=
15955 LTLIBLZMA=
15956 INCLZMA=
15957 rpathdirs=
15958 ltrpathdirs=
15959 names_already_handled=
15960 names_next_round='lzma '
15961 while test -n "$names_next_round"; do
15962 names_this_round="$names_next_round"
15963 names_next_round=
15964 for name in $names_this_round; do
15965 already_handled=
15966 for n in $names_already_handled; do
15967 if test "$n" = "$name"; then
15968 already_handled=yes
15969 break
15970 fi
15971 done
15972 if test -z "$already_handled"; then
15973 names_already_handled="$names_already_handled $name"
15974 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15975 eval value=\"\$HAVE_LIB$uppername\"
15976 if test -n "$value"; then
15977 if test "$value" = yes; then
15978 eval value=\"\$LIB$uppername\"
15979 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15980 eval value=\"\$LTLIB$uppername\"
15981 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15982 else
15983 :
15984 fi
15985 else
15986 found_dir=
15987 found_la=
15988 found_so=
15989 found_a=
15990 if test $use_additional = yes; then
15991 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15992 found_dir="$additional_libdir"
15993 found_so="$additional_libdir/lib$name.$shlibext"
15994 if test -f "$additional_libdir/lib$name.la"; then
15995 found_la="$additional_libdir/lib$name.la"
15996 fi
15997 else
15998 if test -f "$additional_libdir/lib$name.$libext"; then
15999 found_dir="$additional_libdir"
16000 found_a="$additional_libdir/lib$name.$libext"
16001 if test -f "$additional_libdir/lib$name.la"; then
16002 found_la="$additional_libdir/lib$name.la"
16003 fi
16004 fi
16005 fi
16006 fi
16007 if test "X$found_dir" = "X"; then
16008 for x in $LDFLAGS $LTLIBLZMA; do
16009
16010 acl_save_prefix="$prefix"
16011 prefix="$acl_final_prefix"
16012 acl_save_exec_prefix="$exec_prefix"
16013 exec_prefix="$acl_final_exec_prefix"
16014 eval x=\"$x\"
16015 exec_prefix="$acl_save_exec_prefix"
16016 prefix="$acl_save_prefix"
16017
16018 case "$x" in
16019 -L*)
16020 dir=`echo "X$x" | sed -e 's/^X-L//'`
16021 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16022 found_dir="$dir"
16023 found_so="$dir/lib$name.$shlibext"
16024 if test -f "$dir/lib$name.la"; then
16025 found_la="$dir/lib$name.la"
16026 fi
16027 else
16028 if test -f "$dir/lib$name.$libext"; then
16029 found_dir="$dir"
16030 found_a="$dir/lib$name.$libext"
16031 if test -f "$dir/lib$name.la"; then
16032 found_la="$dir/lib$name.la"
16033 fi
16034 fi
16035 fi
16036 ;;
16037 esac
16038 if test "X$found_dir" != "X"; then
16039 break
16040 fi
16041 done
16042 fi
16043 if test "X$found_dir" != "X"; then
16044 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16045 if test "X$found_so" != "X"; then
16046 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16047 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16048 else
16049 haveit=
16050 for x in $ltrpathdirs; do
16051 if test "X$x" = "X$found_dir"; then
16052 haveit=yes
16053 break
16054 fi
16055 done
16056 if test -z "$haveit"; then
16057 ltrpathdirs="$ltrpathdirs $found_dir"
16058 fi
16059 if test "$hardcode_direct" = yes; then
16060 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16061 else
16062 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16063 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16064 haveit=
16065 for x in $rpathdirs; do
16066 if test "X$x" = "X$found_dir"; then
16067 haveit=yes
16068 break
16069 fi
16070 done
16071 if test -z "$haveit"; then
16072 rpathdirs="$rpathdirs $found_dir"
16073 fi
16074 else
16075 haveit=
16076 for x in $LDFLAGS $LIBLZMA; do
16077
16078 acl_save_prefix="$prefix"
16079 prefix="$acl_final_prefix"
16080 acl_save_exec_prefix="$exec_prefix"
16081 exec_prefix="$acl_final_exec_prefix"
16082 eval x=\"$x\"
16083 exec_prefix="$acl_save_exec_prefix"
16084 prefix="$acl_save_prefix"
16085
16086 if test "X$x" = "X-L$found_dir"; then
16087 haveit=yes
16088 break
16089 fi
16090 done
16091 if test -z "$haveit"; then
16092 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16093 fi
16094 if test "$hardcode_minus_L" != no; then
16095 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16096 else
16097 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16098 fi
16099 fi
16100 fi
16101 fi
16102 else
16103 if test "X$found_a" != "X"; then
16104 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16105 else
16106 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16107 fi
16108 fi
16109 additional_includedir=
16110 case "$found_dir" in
16111 */lib | */lib/)
16112 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16113 additional_includedir="$basedir/include"
16114 ;;
16115 esac
16116 if test "X$additional_includedir" != "X"; then
16117 if test "X$additional_includedir" != "X/usr/include"; then
16118 haveit=
16119 if test "X$additional_includedir" = "X/usr/local/include"; then
16120 if test -n "$GCC"; then
16121 case $host_os in
16122 linux*) haveit=yes;;
16123 esac
16124 fi
16125 fi
16126 if test -z "$haveit"; then
16127 for x in $CPPFLAGS $INCLZMA; do
16128
16129 acl_save_prefix="$prefix"
16130 prefix="$acl_final_prefix"
16131 acl_save_exec_prefix="$exec_prefix"
16132 exec_prefix="$acl_final_exec_prefix"
16133 eval x=\"$x\"
16134 exec_prefix="$acl_save_exec_prefix"
16135 prefix="$acl_save_prefix"
16136
16137 if test "X$x" = "X-I$additional_includedir"; then
16138 haveit=yes
16139 break
16140 fi
16141 done
16142 if test -z "$haveit"; then
16143 if test -d "$additional_includedir"; then
16144 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16145 fi
16146 fi
16147 fi
16148 fi
16149 fi
16150 if test -n "$found_la"; then
16151 save_libdir="$libdir"
16152 case "$found_la" in
16153 */* | *\\*) . "$found_la" ;;
16154 *) . "./$found_la" ;;
16155 esac
16156 libdir="$save_libdir"
16157 for dep in $dependency_libs; do
16158 case "$dep" in
16159 -L*)
16160 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16161 if test "X$additional_libdir" != "X/usr/lib"; then
16162 haveit=
16163 if test "X$additional_libdir" = "X/usr/local/lib"; then
16164 if test -n "$GCC"; then
16165 case $host_os in
16166 linux*) haveit=yes;;
16167 esac
16168 fi
16169 fi
16170 if test -z "$haveit"; then
16171 haveit=
16172 for x in $LDFLAGS $LIBLZMA; do
16173
16174 acl_save_prefix="$prefix"
16175 prefix="$acl_final_prefix"
16176 acl_save_exec_prefix="$exec_prefix"
16177 exec_prefix="$acl_final_exec_prefix"
16178 eval x=\"$x\"
16179 exec_prefix="$acl_save_exec_prefix"
16180 prefix="$acl_save_prefix"
16181
16182 if test "X$x" = "X-L$additional_libdir"; then
16183 haveit=yes
16184 break
16185 fi
16186 done
16187 if test -z "$haveit"; then
16188 if test -d "$additional_libdir"; then
16189 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16190 fi
16191 fi
16192 haveit=
16193 for x in $LDFLAGS $LTLIBLZMA; do
16194
16195 acl_save_prefix="$prefix"
16196 prefix="$acl_final_prefix"
16197 acl_save_exec_prefix="$exec_prefix"
16198 exec_prefix="$acl_final_exec_prefix"
16199 eval x=\"$x\"
16200 exec_prefix="$acl_save_exec_prefix"
16201 prefix="$acl_save_prefix"
16202
16203 if test "X$x" = "X-L$additional_libdir"; then
16204 haveit=yes
16205 break
16206 fi
16207 done
16208 if test -z "$haveit"; then
16209 if test -d "$additional_libdir"; then
16210 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16211 fi
16212 fi
16213 fi
16214 fi
16215 ;;
16216 -R*)
16217 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16218 if test "$enable_rpath" != no; then
16219 haveit=
16220 for x in $rpathdirs; do
16221 if test "X$x" = "X$dir"; then
16222 haveit=yes
16223 break
16224 fi
16225 done
16226 if test -z "$haveit"; then
16227 rpathdirs="$rpathdirs $dir"
16228 fi
16229 haveit=
16230 for x in $ltrpathdirs; do
16231 if test "X$x" = "X$dir"; then
16232 haveit=yes
16233 break
16234 fi
16235 done
16236 if test -z "$haveit"; then
16237 ltrpathdirs="$ltrpathdirs $dir"
16238 fi
16239 fi
16240 ;;
16241 -l*)
16242 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16243 ;;
16244 *.la)
16245 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16246 ;;
16247 *)
16248 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16249 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16250 ;;
16251 esac
16252 done
16253 fi
16254 else
16255 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16256 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16257 fi
16258 fi
16259 fi
16260 done
16261 done
16262 if test "X$rpathdirs" != "X"; then
16263 if test -n "$hardcode_libdir_separator"; then
16264 alldirs=
16265 for found_dir in $rpathdirs; do
16266 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16267 done
16268 acl_save_libdir="$libdir"
16269 libdir="$alldirs"
16270 eval flag=\"$hardcode_libdir_flag_spec\"
16271 libdir="$acl_save_libdir"
16272 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16273 else
16274 for found_dir in $rpathdirs; do
16275 acl_save_libdir="$libdir"
16276 libdir="$found_dir"
16277 eval flag=\"$hardcode_libdir_flag_spec\"
16278 libdir="$acl_save_libdir"
16279 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16280 done
16281 fi
16282 fi
16283 if test "X$ltrpathdirs" != "X"; then
16284 for found_dir in $ltrpathdirs; do
16285 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16286 done
16287 fi
16288
16289
16290 ac_save_CPPFLAGS="$CPPFLAGS"
16291
16292 for element in $INCLZMA; do
16293 haveit=
16294 for x in $CPPFLAGS; do
16295
16296 acl_save_prefix="$prefix"
16297 prefix="$acl_final_prefix"
16298 acl_save_exec_prefix="$exec_prefix"
16299 exec_prefix="$acl_final_exec_prefix"
16300 eval x=\"$x\"
16301 exec_prefix="$acl_save_exec_prefix"
16302 prefix="$acl_save_prefix"
16303
16304 if test "X$x" = "X$element"; then
16305 haveit=yes
16306 break
16307 fi
16308 done
16309 if test -z "$haveit"; then
16310 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16311 fi
16312 done
16313
16314
16315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16316$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16317if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16318 $as_echo_n "(cached) " >&6
16319else
16320
16321 ac_save_LIBS="$LIBS"
16322 LIBS="$LIBS $LIBLZMA"
16323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16324/* end confdefs.h. */
16325#include "lzma.h"
16326int
16327main ()
16328{
16329lzma_index_iter iter;
16330 lzma_index_iter_init (&iter, 0);
16331 lzma_mf_is_supported (LZMA_MF_HC3);
16332 ;
16333 return 0;
16334}
16335_ACEOF
16336if ac_fn_c_try_link "$LINENO"; then :
16337 ac_cv_liblzma=yes
16338else
16339 ac_cv_liblzma=no
16340fi
16341rm -f core conftest.err conftest.$ac_objext \
16342 conftest$ac_exeext conftest.$ac_ext
16343 LIBS="$ac_save_LIBS"
16344
16345fi
16346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16347$as_echo "$ac_cv_liblzma" >&6; }
16348 if test "$ac_cv_liblzma" = yes; then
16349 HAVE_LIBLZMA=yes
16350
16351$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16352
16353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16354$as_echo_n "checking how to link with liblzma... " >&6; }
16355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16356$as_echo "$LIBLZMA" >&6; }
16357 else
16358 HAVE_LIBLZMA=no
16359 CPPFLAGS="$ac_save_CPPFLAGS"
16360 LIBLZMA=
16361 LTLIBLZMA=
16362 fi
16363
16364
16365
16366
16367
16368
16369 if test "$HAVE_LIBLZMA" != yes; then
16370 if test "$with_lzma" = yes; then
d0ac1c44 16371 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
16372 fi
16373 fi
16374 fi
16375fi
16376
3fc11d3e
JM
16377LIBGUI="../libgui/src/libgui.a"
16378GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16379
16380
7a292a7a 16381
3fc11d3e
JM
16382WIN32LDAPP=
16383
16384
16385
d91670b9 16386case "${host}" in
686a5eed 16387*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16388 configdir="win"
16389 ;;
16390*)
16391 configdir="unix"
16392 ;;
16393esac
3fc11d3e
JM
16394
16395GDBTKLIBS=
16396if test "${enable_gdbtk}" = "yes"; then
16397
d1c3b63a
KS
16398 # Gdbtk must have an absolute path to srcdir in order to run
16399 # properly when not installed.
16400 here=`pwd`
16401 cd ${srcdir}
16402 GDBTK_SRC_DIR=`pwd`
16403 cd $here
16404
bec39cab 16405
5062cc19
KS
16406 #
16407 # Ok, lets find the tcl configuration
16408 # First, look for one uninstalled.
16409 # the alternative search directory is invoked by --with-tcl
16410 #
3fc11d3e 16411
5062cc19
KS
16412 if test x"${no_tcl}" = x ; then
16413 # we reset no_tcl in case something fails here
16414 no_tcl=true
bec39cab 16415
81ecdfbb
RW
16416# Check whether --with-tcl was given.
16417if test "${with_tcl+set}" = set; then :
16418 withval=$with_tcl; with_tclconfig=${withval}
16419fi
16420
16421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16422$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 16423 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 16424 $as_echo_n "(cached) " >&6
3fc11d3e 16425else
bec39cab 16426
3fc11d3e 16427
5062cc19
KS
16428 # First check to see if --with-tcl was specified.
16429 case "${host}" in
16430 *-*-cygwin*) platDir="win" ;;
16431 *) platDir="unix" ;;
16432 esac
16433 if test x"${with_tclconfig}" != x ; then
16434 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16435 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16436 else
d0ac1c44 16437 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16438 fi
16439 fi
16440
16441 # then check for a private Tcl installation
16442 if test x"${ac_cv_c_tclconfig}" = x ; then
16443 for i in \
16444 ../tcl \
16445 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16446 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16447 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16448 ../../tcl \
16449 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16450 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16451 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16452 ../../../tcl \
16453 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16454 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16455 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16456 if test -f "$i/$platDir/tclConfig.sh" ; then
16457 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16458 break
16459 fi
16460 done
16461 fi
16462
16463 # on Darwin, check in Framework installation locations
16464 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16465 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16466 `ls -d /Library/Frameworks 2>/dev/null` \
16467 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16468 `ls -d /System/Library/Frameworks 2>/dev/null` \
16469 ; do
16470 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16471 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16472 break
16473 fi
16474 done
16475 fi
16476
16477 # check in a few common install locations
16478 if test x"${ac_cv_c_tclconfig}" = x ; then
16479 for i in `ls -d ${libdir} 2>/dev/null` \
16480 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16481 `ls -d ${prefix}/lib 2>/dev/null` \
16482 `ls -d /usr/local/lib 2>/dev/null` \
16483 `ls -d /usr/contrib/lib 2>/dev/null` \
16484 `ls -d /usr/lib 2>/dev/null` \
16485 ; do
16486 if test -f "$i/tclConfig.sh" ; then
16487 ac_cv_c_tclconfig=`(cd $i; pwd)`
16488 break
16489 fi
16490 done
16491 fi
3fc11d3e 16492
5062cc19
KS
16493 # check in a few other private locations
16494 if test x"${ac_cv_c_tclconfig}" = x ; then
16495 for i in \
16496 ${srcdir}/../tcl \
16497 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16498 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16499 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16500 if test -f "$i/$platDir/tclConfig.sh" ; then
16501 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16502 break
16503 fi
16504 done
16505 fi
bec39cab 16506
3fc11d3e
JM
16507fi
16508
5062cc19
KS
16509
16510 if test x"${ac_cv_c_tclconfig}" = x ; then
16511 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16513$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16514 else
16515 no_tcl=
16516 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16518$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16519 fi
16520 fi
3fc11d3e 16521
bec39cab 16522
85541719
DE
16523 # If $no_tk is nonempty, then we can't do Tk, and there is no
16524 # point to doing Tcl.
bec39cab 16525
5062cc19
KS
16526 #
16527 # Ok, lets find the tk configuration
16528 # First, look for one uninstalled.
16529 # the alternative search directory is invoked by --with-tk
16530 #
3fc11d3e 16531
5062cc19
KS
16532 if test x"${no_tk}" = x ; then
16533 # we reset no_tk in case something fails here
16534 no_tk=true
bec39cab 16535
81ecdfbb
RW
16536# Check whether --with-tk was given.
16537if test "${with_tk+set}" = set; then :
16538 withval=$with_tk; with_tkconfig=${withval}
16539fi
16540
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16542$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 16543 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 16544 $as_echo_n "(cached) " >&6
bec39cab 16545else
3fc11d3e
JM
16546
16547
5062cc19
KS
16548 # First check to see if --with-tkconfig was specified.
16549 if test x"${with_tkconfig}" != x ; then
16550 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16551 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16552 else
d0ac1c44 16553 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16554 fi
16555 fi
3fc11d3e 16556
5062cc19
KS
16557 # then check for a private Tk library
16558 case "${host}" in
16559 *-*-cygwin*) platDir="win" ;;
16560 *) platDir="unix" ;;
16561 esac
16562 if test x"${ac_cv_c_tkconfig}" = x ; then
16563 for i in \
16564 ../tk \
16565 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16566 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16567 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16568 ../../tk \
16569 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16570 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16571 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16572 ../../../tk \
16573 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16574 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16575 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16576 if test -f "$i/$platDir/tkConfig.sh" ; then
16577 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16578 break
16579 fi
16580 done
16581 fi
16582
16583 # on Darwin, check in Framework installation locations
16584 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16585 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16586 `ls -d /Library/Frameworks 2>/dev/null` \
16587 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16588 `ls -d /System/Library/Frameworks 2>/dev/null` \
16589 ; do
16590 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16591 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16592 break
16593 fi
16594 done
16595 fi
16596
16597 # check in a few common install locations
16598 if test x"${ac_cv_c_tkconfig}" = x ; then
16599 for i in `ls -d ${libdir} 2>/dev/null` \
16600 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16601 `ls -d ${prefix}/lib 2>/dev/null` \
16602 `ls -d /usr/local/lib 2>/dev/null` \
16603 `ls -d /usr/contrib/lib 2>/dev/null` \
16604 `ls -d /usr/lib 2>/dev/null` \
16605 ; do
16606 if test -f "$i/tkConfig.sh" ; then
16607 ac_cv_c_tkconfig=`(cd $i; pwd)`
16608 break
16609 fi
16610 done
16611 fi
16612 # check in a few other private locations
16613 if test x"${ac_cv_c_tkconfig}" = x ; then
16614 for i in \
16615 ${srcdir}/../tk \
16616 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16617 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16618 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16619 if test -f "$i/$platDir/tkConfig.sh" ; then
16620 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16621 break
16622 fi
16623 done
16624 fi
3fc11d3e 16625
3fc11d3e
JM
16626fi
16627
16628
5062cc19
KS
16629 if test x"${ac_cv_c_tkconfig}" = x ; then
16630 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16631 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16632$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16633 else
16634 no_tk=
16635 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16637$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16638 fi
3fc11d3e 16639 fi
dd2504ab 16640
dd2504ab 16641
85541719
DE
16642 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16643
81ecdfbb
RW
16644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16645$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16646
16647 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16649$as_echo "loading" >&6; }
85541719
DE
16650 . ${TCL_BIN_DIR}/tclConfig.sh
16651 else
81ecdfbb
RW
16652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16653$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16654 fi
16655
16656 # eval is required to do the TCL_DBGX substitution
16657 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16658 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16659
16660 # If the TCL_BIN_DIR is the build directory (not the install directory),
16661 # then set the common variable name to the value of the build variables.
16662 # For example, the variable TCL_LIB_SPEC will be set to the value
16663 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16664 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16665 # installed and uninstalled version of Tcl.
16666 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16667 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16668 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16669 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16670 elif test "`uname -s`" = "Darwin"; then
16671 # If Tcl was built as a framework, attempt to use the libraries
16672 # from the framework at the given location so that linking works
a68ffae9 16673 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16674 case ${TCL_DEFS} in
16675 *TCL_FRAMEWORK*)
16676 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16677 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16678 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16679 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16680 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16681 break
16682 fi
16683 done
16684 fi
16685 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16686 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16687 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16688 fi
16689 ;;
16690 esac
16691 fi
16692
16693 # eval is required to do the TCL_DBGX substitution
16694 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16695 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16696 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16697 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713 # Check for in-tree tcl
16714 here=`pwd`
16715 cd ${srcdir}/..
16716 topdir=`pwd`
16717 cd ${here}
16718
16719 intree="no"
16720 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16721 intree="yes"
16722 fi
16723
16724 # Find Tcl private headers
16725 if test x"${intree}" = xno; then
16726
81ecdfbb
RW
16727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16728$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16729 private_dir=""
16730 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16731 if test -f ${dir}/tclInt.h ; then
16732 private_dir=${dir}
16733 fi
16734
16735 if test x"${private_dir}" = x; then
d0ac1c44 16736 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16737 else
16738 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16740$as_echo "${private_dir}" >&6; }
85541719
DE
16741 fi
16742
16743 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16744 TCL_LIBRARY="${TCL_LIB_SPEC}"
16745 TCL_DEPS=""
16746 else
16747 # If building tcl in the same src tree, private headers
16748 # are not needed, but we need to be sure to use the right
16749 # headers library
16750 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16751 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16752 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16753 fi
16754
16755
16756
16757
16758
81ecdfbb
RW
16759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16760$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16761
5062cc19 16762 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16764$as_echo "loading" >&6; }
5062cc19 16765 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16766 else
81ecdfbb
RW
16767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16768$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16769 fi
bec39cab 16770
5062cc19
KS
16771 # eval is required to do the TK_DBGX substitution
16772 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16773 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16774
16775 # If the TK_BIN_DIR is the build directory (not the install directory),
16776 # then set the common variable name to the value of the build variables.
16777 # For example, the variable TK_LIB_SPEC will be set to the value
16778 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16779 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16780 # installed and uninstalled version of Tcl.
85541719 16781 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16782 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16783 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16784 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16785 elif test "`uname -s`" = "Darwin"; then
16786 # If Tk was built as a framework, attempt to use the libraries
16787 # from the framework at the given location so that linking works
a68ffae9 16788 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16789 case ${TK_DEFS} in
16790 *TK_FRAMEWORK*)
85541719 16791 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16792 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16793 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16794 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16795 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16796 break
16797 fi
16798 done
16799 fi
85541719 16800 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16801 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16802 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16803 fi
16804 ;;
16805 esac
3fc11d3e
JM
16806 fi
16807
5062cc19
KS
16808 # eval is required to do the TK_DBGX substitution
16809 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16810 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16811 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16812 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16813
3fc11d3e
JM
16814
16815
bec39cab
AC
16816
16817
16818
16819
16820
16821
16822
3fc11d3e 16823
3fc11d3e 16824
bec39cab 16825
bec39cab 16826
85541719
DE
16827 # Check for in-tree Tk
16828 intree="no"
16829 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16830 intree="yes"
16831 fi
3fc11d3e 16832
85541719
DE
16833 # Find Tk private headers
16834 if test x"${intree}" = xno; then
3fc11d3e 16835
81ecdfbb
RW
16836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16837$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16838 private_dir=""
16839 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16840 if test -f ${dir}/tkInt.h; then
16841 private_dir=${dir}
3fc11d3e 16842 fi
bec39cab 16843
5062cc19 16844 if test x"${private_dir}" = x; then
d0ac1c44 16845 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16846 else
5062cc19 16847 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16849$as_echo "${private_dir}" >&6; }
3fc11d3e 16850 fi
3fc11d3e 16851
85541719
DE
16852 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16853 TK_LIBRARY=${TK_LIB_SPEC}
16854 TK_DEPS=""
16855 else
16856 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16857 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16858 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16859 fi
3fc11d3e
JM
16860
16861
3fc11d3e
JM
16862
16863
3fc11d3e 16864
85541719 16865 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16866
85541719
DE
16867 # Include some libraries that Tcl and Tk want.
16868 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16869 # Yes, the ordering seems wrong here. But it isn't.
16870 # TK_LIBS is the list of libraries that need to be linked
16871 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16872 # were in LIBS then any link tests after this point would
16873 # try to include things like `$(LIBGUI)', which wouldn't work.
16874 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16875
85541719
DE
16876 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16877 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16878 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16879 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16880 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16881 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16882 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16883
85541719
DE
16884 if test x$gdb_cv_os_cygwin = xyes; then
16885 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16886 WIN32LDAPP="-Wl,--subsystem,console"
16887 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16888 fi
ffc6a242 16889
81ecdfbb 16890 subdirs="$subdirs gdbtk"
3ace7edb 16891
85541719 16892 fi
3fc11d3e
JM
16893fi
16894
16895
16896
16897
16898
16899
16900
16901
81ecdfbb
RW
16902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16903$as_echo_n "checking for X... " >&6; }
bec39cab 16904
c906108c 16905
81ecdfbb
RW
16906# Check whether --with-x was given.
16907if test "${with_x+set}" = set; then :
16908 withval=$with_x;
16909fi
c906108c
SS
16910
16911# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16912if test "x$with_x" = xno; then
16913 # The user explicitly disabled X.
16914 have_x=disabled
16915else
81ecdfbb 16916 case $x_includes,$x_libraries in #(
d0ac1c44
SM
16917 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16918 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 16919 $as_echo_n "(cached) " >&6
c906108c
SS
16920else
16921 # One or both of the vars are not set, and there is no cached value.
bec39cab 16922ac_x_includes=no ac_x_libraries=no
81ecdfbb 16923rm -f -r conftest.dir
bec39cab
AC
16924if mkdir conftest.dir; then
16925 cd conftest.dir
bec39cab 16926 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16927incroot:
16928 @echo incroot='${INCROOT}'
16929usrlibdir:
16930 @echo usrlibdir='${USRLIBDIR}'
16931libdir:
16932 @echo libdir='${LIBDIR}'
16933_ACEOF
16934 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 16935 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
16936 for ac_var in incroot usrlibdir libdir; do
16937 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16938 done
c906108c 16939 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16940 for ac_extension in a so sl dylib la dll; do
16941 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16942 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16943 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16944 fi
16945 done
16946 # Screen out bogus values from the imake configuration. They are
16947 # bogus both because they are the default anyway, and because
16948 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16949 case $ac_im_incroot in
81ecdfbb 16950 /usr/include) ac_x_includes= ;;
bec39cab 16951 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16952 esac
bec39cab 16953 case $ac_im_usrlibdir in
81ecdfbb 16954 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16955 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16956 esac
16957 fi
16958 cd ..
81ecdfbb 16959 rm -f -r conftest.dir
c906108c
SS
16960fi
16961
bec39cab
AC
16962# Standard set of common directories for X headers.
16963# Check X11 before X11Rn because it is often a symlink to the current release.
16964ac_x_header_dirs='
16965/usr/X11/include
81ecdfbb 16966/usr/X11R7/include
bec39cab
AC
16967/usr/X11R6/include
16968/usr/X11R5/include
16969/usr/X11R4/include
16970
16971/usr/include/X11
81ecdfbb 16972/usr/include/X11R7
bec39cab
AC
16973/usr/include/X11R6
16974/usr/include/X11R5
16975/usr/include/X11R4
16976
16977/usr/local/X11/include
81ecdfbb 16978/usr/local/X11R7/include
bec39cab
AC
16979/usr/local/X11R6/include
16980/usr/local/X11R5/include
16981/usr/local/X11R4/include
16982
16983/usr/local/include/X11
81ecdfbb 16984/usr/local/include/X11R7
bec39cab
AC
16985/usr/local/include/X11R6
16986/usr/local/include/X11R5
16987/usr/local/include/X11R4
16988
16989/usr/X386/include
16990/usr/x386/include
16991/usr/XFree86/include/X11
16992
16993/usr/include
16994/usr/local/include
16995/usr/unsupported/include
16996/usr/athena/include
16997/usr/local/x11r5/include
16998/usr/lpp/Xamples/include
16999
17000/usr/openwin/include
17001/usr/openwin/share/include'
17002
17003if test "$ac_x_includes" = no; then
81ecdfbb 17004 # Guess where to find include files, by looking for Xlib.h.
c906108c 17005 # First, try using that file with no special directory specified.
81ecdfbb 17006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17007/* end confdefs.h. */
81ecdfbb 17008#include <X11/Xlib.h>
bec39cab 17009_ACEOF
81ecdfbb 17010if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
17011 # We can compile using X headers with no special include directory.
17012ac_x_includes=
17013else
bec39cab 17014 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 17015 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
17016 ac_x_includes=$ac_dir
17017 break
17018 fi
17019done
c906108c 17020fi
d0ac1c44 17021rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 17022fi # $ac_x_includes = no
c906108c 17023
bec39cab 17024if test "$ac_x_libraries" = no; then
c906108c 17025 # Check for the libraries.
c906108c
SS
17026 # See if we find them without any special options.
17027 # Don't add to $LIBS permanently.
bec39cab 17028 ac_save_LIBS=$LIBS
81ecdfbb
RW
17029 LIBS="-lX11 $LIBS"
17030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17031/* end confdefs.h. */
81ecdfbb 17032#include <X11/Xlib.h>
bec39cab
AC
17033int
17034main ()
17035{
81ecdfbb 17036XrmInitialize ()
bec39cab
AC
17037 ;
17038 return 0;
17039}
17040_ACEOF
81ecdfbb 17041if ac_fn_c_try_link "$LINENO"; then :
bec39cab 17042 LIBS=$ac_save_LIBS
c906108c
SS
17043# We can link X programs with no special library path.
17044ac_x_libraries=
17045else
81ecdfbb
RW
17046 LIBS=$ac_save_LIBS
17047for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 17048do
bec39cab 17049 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
17050 for ac_extension in a so sl dylib la dll; do
17051 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
17052 ac_x_libraries=$ac_dir
17053 break 2
17054 fi
17055 done
17056done
17057fi
81ecdfbb
RW
17058rm -f core conftest.err conftest.$ac_objext \
17059 conftest$ac_exeext conftest.$ac_ext
bec39cab 17060fi # $ac_x_libraries = no
c906108c 17061
81ecdfbb
RW
17062case $ac_x_includes,$ac_x_libraries in #(
17063 no,* | *,no | *\'*)
17064 # Didn't find X, or a directory has "'" in its name.
17065 ac_cv_have_x="have_x=no";; #(
17066 *)
17067 # Record where we found X for the cache.
17068 ac_cv_have_x="have_x=yes\
17069 ac_x_includes='$ac_x_includes'\
17070 ac_x_libraries='$ac_x_libraries'"
17071esac
c906108c 17072fi
81ecdfbb
RW
17073;; #(
17074 *) have_x=yes;;
17075 esac
c906108c
SS
17076 eval "$ac_cv_have_x"
17077fi # $with_x != no
17078
17079if test "$have_x" != yes; then
81ecdfbb
RW
17080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17081$as_echo "$have_x" >&6; }
c906108c
SS
17082 no_x=yes
17083else
17084 # If each of the values was on the command line, it overrides each guess.
17085 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17086 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17087 # Update the cache value to reflect the command line values.
81ecdfbb
RW
17088 ac_cv_have_x="have_x=yes\
17089 ac_x_includes='$x_includes'\
17090 ac_x_libraries='$x_libraries'"
17091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17092$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
17093fi
17094
17095
bec39cab 17096# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 17097# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
17098# This code just checks for a few cases where we'd like to ignore those
17099# definitions, even when they're present in the '.mt' file. These cases
17100# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 17101# not part of the source tree.
7a292a7a 17102#
81ecdfbb
RW
17103# Check whether --enable-sim was given.
17104if test "${enable_sim+set}" = set; then :
17105 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
17106 echo "enableval = ${enableval}";
17107 case "${enableval}" in
17108 yes) ignore_sim=false ;;
17109 no) ignore_sim=true ;;
17110 *) ignore_sim=false ;;
17111 esac
17112else
17113 ignore_sim=false
81ecdfbb
RW
17114fi
17115
7a292a7a
SS
17116
17117if test ! -d "${srcdir}/../sim"; then
17118 ignore_sim=true
17119fi
17120
9b624dbe
UW
17121SIM=
17122SIM_OBS=
17123if test "${ignore_sim}" = "false"; then
17124 if test x"${gdb_sim}" != x ; then
17125 SIM="${gdb_sim}"
17126 SIM_OBS="remote-sim.o"
60ca704f 17127
81ecdfbb 17128$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17129
976102cd
PA
17130
17131 # Some tdep code should only be compiled in when the ppc sim is
17132 # built. PR sim/13418.
17133 case $target in
17134 powerpc*-*-*)
17135
17136$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17137
17138 ;;
17139 esac
9b624dbe 17140 fi
7a292a7a
SS
17141fi
17142
17143
17144
c906108c
SS
17145
17146
17147
17148
17149
17150
dfcd3bfb 17151
e56ac5c3
AC
17152
17153
b3a90332
AC
17154
17155
c35f4ffc 17156# List of host floatformats.
bec39cab
AC
17157
17158cat >>confdefs.h <<_ACEOF
c35f4ffc 17159#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17160_ACEOF
c35f4ffc 17161
bec39cab
AC
17162
17163cat >>confdefs.h <<_ACEOF
c35f4ffc 17164#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17165_ACEOF
17166
c35f4ffc 17167
bec39cab 17168cat >>confdefs.h <<_ACEOF
c35f4ffc 17169#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17170_ACEOF
c35f4ffc
AC
17171
17172
c906108c
SS
17173# target_subdir is used by the testsuite to find the target libraries.
17174target_subdir=
17175if test "${host}" != "${target}"; then
17176 target_subdir="${target_alias}/"
17177fi
17178
17179
21ea5acd 17180# Import nat definitions.
2b351b19 17181nat_makefile_frag=/dev/null
771b4502 17182if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17183 . ${srcdir}/configure.nat
17184 nativefile=$NAT_FILE
c906108c 17185fi
c906108c 17186
c906108c
SS
17187
17188
17189
21ea5acd
SDJ
17190
17191
17192
17193
17194
c906108c
SS
17195
17196
b00a8037 17197if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17198
17199cat >>confdefs.h <<_ACEOF
b00a8037 17200#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17201_ACEOF
b00a8037
DJ
17202
17203fi
17204
496c0e1b
JB
17205# Check whether --enable-gdbserver was given.
17206if test "${enable_gdbserver+set}" = set; then :
17207 enableval=$enable_gdbserver; case "${enableval}" in
17208 yes| no|auto) ;;
d0ac1c44 17209 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17210esac
17211else
17212 enable_gdbserver=auto
17213fi
17214
17215
17216# We only build gdbserver automatically in a native configuration, and
17217# only if the user did not explicitly disable its build.
17218if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17220$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17221 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17223$as_echo "yes" >&6; }
17224 subdirs="$subdirs gdbserver"
3ace7edb 17225
496c0e1b 17226 gdbserver_build_enabled=yes
8dcde887 17227 else
81ecdfbb
RW
17228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17229$as_echo "no" >&6; }
8dcde887
MK
17230 fi
17231fi
17232
496c0e1b
JB
17233# If the user explicitly request the gdbserver to be built, verify that
17234# we were in fact able to enable it.
17235if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17236 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17237fi
17238
393fd4c3
YQ
17239# Check for babeltrace and babeltrace-ctf
17240
17241# Check whether --with-babeltrace was given.
17242if test "${with_babeltrace+set}" = set; then :
17243 withval=$with_babeltrace;
17244else
17245 with_babeltrace=auto
17246fi
17247
17248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17249$as_echo_n "checking whether to use babeltrace... " >&6; }
17250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17251$as_echo "$with_babeltrace" >&6; }
17252
17253if test "x$with_babeltrace" = "xno"; then
17254 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17255$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17256else
17257 # Append -Werror to CFLAGS so that configure can catch the warning
17258 # "assignment from incompatible pointer type", which is related to
17259 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17260 # in GDB, while babeltrace 1.0.3 is broken.
17261 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17262 # safe to save and restore CFLAGS here.
17263 saved_CFLAGS=$CFLAGS
17264 CFLAGS="$CFLAGS -Werror"
17265
17266
17267
17268
17269
17270
17271
17272
17273 use_additional=yes
17274
17275 acl_save_prefix="$prefix"
17276 prefix="$acl_final_prefix"
17277 acl_save_exec_prefix="$exec_prefix"
17278 exec_prefix="$acl_final_exec_prefix"
17279
17280 eval additional_includedir=\"$includedir\"
17281 eval additional_libdir=\"$libdir\"
17282
17283 exec_prefix="$acl_save_exec_prefix"
17284 prefix="$acl_save_prefix"
17285
17286
17287# Check whether --with-libbabeltrace-prefix was given.
17288if test "${with_libbabeltrace_prefix+set}" = set; then :
17289 withval=$with_libbabeltrace_prefix;
17290 if test "X$withval" = "Xno"; then
17291 use_additional=no
17292 else
17293 if test "X$withval" = "X"; then
17294
17295 acl_save_prefix="$prefix"
17296 prefix="$acl_final_prefix"
17297 acl_save_exec_prefix="$exec_prefix"
17298 exec_prefix="$acl_final_exec_prefix"
17299
17300 eval additional_includedir=\"$includedir\"
17301 eval additional_libdir=\"$libdir\"
17302
17303 exec_prefix="$acl_save_exec_prefix"
17304 prefix="$acl_save_prefix"
17305
17306 else
17307 additional_includedir="$withval/include"
17308 additional_libdir="$withval/lib"
17309 fi
17310 fi
17311
17312fi
17313
17314 LIBBABELTRACE=
17315 LTLIBBABELTRACE=
17316 INCBABELTRACE=
17317 rpathdirs=
17318 ltrpathdirs=
17319 names_already_handled=
17320 names_next_round='babeltrace babeltrace-ctf'
17321 while test -n "$names_next_round"; do
17322 names_this_round="$names_next_round"
17323 names_next_round=
17324 for name in $names_this_round; do
17325 already_handled=
17326 for n in $names_already_handled; do
17327 if test "$n" = "$name"; then
17328 already_handled=yes
17329 break
17330 fi
17331 done
17332 if test -z "$already_handled"; then
17333 names_already_handled="$names_already_handled $name"
17334 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17335 eval value=\"\$HAVE_LIB$uppername\"
17336 if test -n "$value"; then
17337 if test "$value" = yes; then
17338 eval value=\"\$LIB$uppername\"
17339 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17340 eval value=\"\$LTLIB$uppername\"
17341 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17342 else
17343 :
17344 fi
17345 else
17346 found_dir=
17347 found_la=
17348 found_so=
17349 found_a=
17350 if test $use_additional = yes; then
17351 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17352 found_dir="$additional_libdir"
17353 found_so="$additional_libdir/lib$name.$shlibext"
17354 if test -f "$additional_libdir/lib$name.la"; then
17355 found_la="$additional_libdir/lib$name.la"
17356 fi
17357 else
17358 if test -f "$additional_libdir/lib$name.$libext"; then
17359 found_dir="$additional_libdir"
17360 found_a="$additional_libdir/lib$name.$libext"
17361 if test -f "$additional_libdir/lib$name.la"; then
17362 found_la="$additional_libdir/lib$name.la"
17363 fi
17364 fi
17365 fi
17366 fi
17367 if test "X$found_dir" = "X"; then
17368 for x in $LDFLAGS $LTLIBBABELTRACE; do
17369
17370 acl_save_prefix="$prefix"
17371 prefix="$acl_final_prefix"
17372 acl_save_exec_prefix="$exec_prefix"
17373 exec_prefix="$acl_final_exec_prefix"
17374 eval x=\"$x\"
17375 exec_prefix="$acl_save_exec_prefix"
17376 prefix="$acl_save_prefix"
17377
17378 case "$x" in
17379 -L*)
17380 dir=`echo "X$x" | sed -e 's/^X-L//'`
17381 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17382 found_dir="$dir"
17383 found_so="$dir/lib$name.$shlibext"
17384 if test -f "$dir/lib$name.la"; then
17385 found_la="$dir/lib$name.la"
17386 fi
17387 else
17388 if test -f "$dir/lib$name.$libext"; then
17389 found_dir="$dir"
17390 found_a="$dir/lib$name.$libext"
17391 if test -f "$dir/lib$name.la"; then
17392 found_la="$dir/lib$name.la"
17393 fi
17394 fi
17395 fi
17396 ;;
17397 esac
17398 if test "X$found_dir" != "X"; then
17399 break
17400 fi
17401 done
17402 fi
17403 if test "X$found_dir" != "X"; then
17404 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17405 if test "X$found_so" != "X"; then
17406 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17407 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17408 else
17409 haveit=
17410 for x in $ltrpathdirs; do
17411 if test "X$x" = "X$found_dir"; then
17412 haveit=yes
17413 break
17414 fi
17415 done
17416 if test -z "$haveit"; then
17417 ltrpathdirs="$ltrpathdirs $found_dir"
17418 fi
17419 if test "$hardcode_direct" = yes; then
17420 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17421 else
17422 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17423 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17424 haveit=
17425 for x in $rpathdirs; do
17426 if test "X$x" = "X$found_dir"; then
17427 haveit=yes
17428 break
17429 fi
17430 done
17431 if test -z "$haveit"; then
17432 rpathdirs="$rpathdirs $found_dir"
17433 fi
17434 else
17435 haveit=
17436 for x in $LDFLAGS $LIBBABELTRACE; do
17437
17438 acl_save_prefix="$prefix"
17439 prefix="$acl_final_prefix"
17440 acl_save_exec_prefix="$exec_prefix"
17441 exec_prefix="$acl_final_exec_prefix"
17442 eval x=\"$x\"
17443 exec_prefix="$acl_save_exec_prefix"
17444 prefix="$acl_save_prefix"
17445
17446 if test "X$x" = "X-L$found_dir"; then
17447 haveit=yes
17448 break
17449 fi
17450 done
17451 if test -z "$haveit"; then
17452 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17453 fi
17454 if test "$hardcode_minus_L" != no; then
17455 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17456 else
17457 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17458 fi
17459 fi
17460 fi
17461 fi
17462 else
17463 if test "X$found_a" != "X"; then
17464 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17465 else
17466 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17467 fi
17468 fi
17469 additional_includedir=
17470 case "$found_dir" in
17471 */lib | */lib/)
17472 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17473 additional_includedir="$basedir/include"
17474 ;;
17475 esac
17476 if test "X$additional_includedir" != "X"; then
17477 if test "X$additional_includedir" != "X/usr/include"; then
17478 haveit=
17479 if test "X$additional_includedir" = "X/usr/local/include"; then
17480 if test -n "$GCC"; then
17481 case $host_os in
17482 linux*) haveit=yes;;
17483 esac
17484 fi
17485 fi
17486 if test -z "$haveit"; then
17487 for x in $CPPFLAGS $INCBABELTRACE; do
17488
17489 acl_save_prefix="$prefix"
17490 prefix="$acl_final_prefix"
17491 acl_save_exec_prefix="$exec_prefix"
17492 exec_prefix="$acl_final_exec_prefix"
17493 eval x=\"$x\"
17494 exec_prefix="$acl_save_exec_prefix"
17495 prefix="$acl_save_prefix"
17496
17497 if test "X$x" = "X-I$additional_includedir"; then
17498 haveit=yes
17499 break
17500 fi
17501 done
17502 if test -z "$haveit"; then
17503 if test -d "$additional_includedir"; then
17504 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17505 fi
17506 fi
17507 fi
17508 fi
17509 fi
17510 if test -n "$found_la"; then
17511 save_libdir="$libdir"
17512 case "$found_la" in
17513 */* | *\\*) . "$found_la" ;;
17514 *) . "./$found_la" ;;
17515 esac
17516 libdir="$save_libdir"
17517 for dep in $dependency_libs; do
17518 case "$dep" in
17519 -L*)
17520 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17521 if test "X$additional_libdir" != "X/usr/lib"; then
17522 haveit=
17523 if test "X$additional_libdir" = "X/usr/local/lib"; then
17524 if test -n "$GCC"; then
17525 case $host_os in
17526 linux*) haveit=yes;;
17527 esac
17528 fi
17529 fi
17530 if test -z "$haveit"; then
17531 haveit=
17532 for x in $LDFLAGS $LIBBABELTRACE; do
17533
17534 acl_save_prefix="$prefix"
17535 prefix="$acl_final_prefix"
17536 acl_save_exec_prefix="$exec_prefix"
17537 exec_prefix="$acl_final_exec_prefix"
17538 eval x=\"$x\"
17539 exec_prefix="$acl_save_exec_prefix"
17540 prefix="$acl_save_prefix"
17541
17542 if test "X$x" = "X-L$additional_libdir"; then
17543 haveit=yes
17544 break
17545 fi
17546 done
17547 if test -z "$haveit"; then
17548 if test -d "$additional_libdir"; then
17549 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17550 fi
17551 fi
17552 haveit=
17553 for x in $LDFLAGS $LTLIBBABELTRACE; do
17554
17555 acl_save_prefix="$prefix"
17556 prefix="$acl_final_prefix"
17557 acl_save_exec_prefix="$exec_prefix"
17558 exec_prefix="$acl_final_exec_prefix"
17559 eval x=\"$x\"
17560 exec_prefix="$acl_save_exec_prefix"
17561 prefix="$acl_save_prefix"
17562
17563 if test "X$x" = "X-L$additional_libdir"; then
17564 haveit=yes
17565 break
17566 fi
17567 done
17568 if test -z "$haveit"; then
17569 if test -d "$additional_libdir"; then
17570 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17571 fi
17572 fi
17573 fi
17574 fi
17575 ;;
17576 -R*)
17577 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17578 if test "$enable_rpath" != no; then
17579 haveit=
17580 for x in $rpathdirs; do
17581 if test "X$x" = "X$dir"; then
17582 haveit=yes
17583 break
17584 fi
17585 done
17586 if test -z "$haveit"; then
17587 rpathdirs="$rpathdirs $dir"
17588 fi
17589 haveit=
17590 for x in $ltrpathdirs; do
17591 if test "X$x" = "X$dir"; then
17592 haveit=yes
17593 break
17594 fi
17595 done
17596 if test -z "$haveit"; then
17597 ltrpathdirs="$ltrpathdirs $dir"
17598 fi
17599 fi
17600 ;;
17601 -l*)
17602 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17603 ;;
17604 *.la)
17605 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17606 ;;
17607 *)
17608 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17609 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17610 ;;
17611 esac
17612 done
17613 fi
17614 else
17615 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17616 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17617 fi
17618 fi
17619 fi
17620 done
17621 done
17622 if test "X$rpathdirs" != "X"; then
17623 if test -n "$hardcode_libdir_separator"; then
17624 alldirs=
17625 for found_dir in $rpathdirs; do
17626 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17627 done
17628 acl_save_libdir="$libdir"
17629 libdir="$alldirs"
17630 eval flag=\"$hardcode_libdir_flag_spec\"
17631 libdir="$acl_save_libdir"
17632 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17633 else
17634 for found_dir in $rpathdirs; do
17635 acl_save_libdir="$libdir"
17636 libdir="$found_dir"
17637 eval flag=\"$hardcode_libdir_flag_spec\"
17638 libdir="$acl_save_libdir"
17639 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17640 done
17641 fi
17642 fi
17643 if test "X$ltrpathdirs" != "X"; then
17644 for found_dir in $ltrpathdirs; do
17645 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17646 done
17647 fi
17648
17649
17650 ac_save_CPPFLAGS="$CPPFLAGS"
17651
17652 for element in $INCBABELTRACE; do
17653 haveit=
17654 for x in $CPPFLAGS; do
17655
17656 acl_save_prefix="$prefix"
17657 prefix="$acl_final_prefix"
17658 acl_save_exec_prefix="$exec_prefix"
17659 exec_prefix="$acl_final_exec_prefix"
17660 eval x=\"$x\"
17661 exec_prefix="$acl_save_exec_prefix"
17662 prefix="$acl_save_prefix"
17663
17664 if test "X$x" = "X$element"; then
17665 haveit=yes
17666 break
17667 fi
17668 done
17669 if test -z "$haveit"; then
17670 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17671 fi
17672 done
17673
17674
17675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17676$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 17677if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
17678 $as_echo_n "(cached) " >&6
17679else
17680
17681 ac_save_LIBS="$LIBS"
17682 LIBS="$LIBS $LIBBABELTRACE"
17683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17684/* end confdefs.h. */
17685#include <babeltrace/babeltrace.h>
17686 #include <babeltrace/ctf/events.h>
17687 #include <babeltrace/ctf/iterator.h>
17688int
17689main ()
17690{
17691struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17692 struct bt_ctf_event *event = NULL;
17693 const struct bt_definition *scope;
17694
13cdc2af 17695 pos->type = BT_SEEK_BEGIN;
65c749e7 17696 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17697 scope = bt_ctf_get_top_level_scope (event,
17698 BT_STREAM_EVENT_HEADER);
17699 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17700
17701 ;
17702 return 0;
17703}
17704_ACEOF
17705if ac_fn_c_try_link "$LINENO"; then :
17706 ac_cv_libbabeltrace=yes
17707else
17708 ac_cv_libbabeltrace=no
17709fi
17710rm -f core conftest.err conftest.$ac_objext \
17711 conftest$ac_exeext conftest.$ac_ext
17712 LIBS="$ac_save_LIBS"
17713
17714fi
17715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17716$as_echo "$ac_cv_libbabeltrace" >&6; }
17717 if test "$ac_cv_libbabeltrace" = yes; then
17718 HAVE_LIBBABELTRACE=yes
17719
17720$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17721
17722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17723$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17725$as_echo "$LIBBABELTRACE" >&6; }
17726 else
17727 HAVE_LIBBABELTRACE=no
17728 CPPFLAGS="$ac_save_CPPFLAGS"
17729 LIBBABELTRACE=
17730 LTLIBBABELTRACE=
17731 fi
17732
17733
17734
17735
17736
17737
17738 CFLAGS=$saved_CFLAGS
17739
17740 if test "$HAVE_LIBBABELTRACE" != yes; then
17741 if test "$with_babeltrace" = yes; then
d0ac1c44 17742 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
17743 else
17744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17745$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17746 fi
17747 fi
17748fi
17749
21ea5acd
SDJ
17750# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17751# empty version.
c906108c
SS
17752
17753files=
17754links=
5a2402b8 17755
c906108c
SS
17756rm -f nm.h
17757if test "${nativefile}" != ""; then
0f475e27
AC
17758 case "${nativefile}" in
17759 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17760 * ) GDB_NM_FILE="${nativefile}"
17761 esac
5a2402b8
AC
17762 files="${files} ${GDB_NM_FILE}"
17763 links="${links} nm.h"
60ca704f
SE
17764
17765cat >>confdefs.h <<_ACEOF
b78960be 17766#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17767_ACEOF
5a2402b8 17768
c906108c 17769fi
5a2402b8
AC
17770
17771
e3487908
GKB
17772for ac_prog in xsltproc
17773do
17774 # Extract the first word of "$ac_prog", so it can be a program name with args.
17775set dummy $ac_prog; ac_word=$2
17776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17777$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 17778if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
17779 $as_echo_n "(cached) " >&6
17780else
17781 case $XSLTPROC in
17782 [\\/]* | ?:[\\/]*)
17783 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17784 ;;
17785 *)
17786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17787for as_dir in $PATH
17788do
17789 IFS=$as_save_IFS
17790 test -z "$as_dir" && as_dir=.
17791 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 17792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
17793 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17795 break 2
17796 fi
17797done
17798 done
17799IFS=$as_save_IFS
17800
17801 ;;
17802esac
17803fi
17804XSLTPROC=$ac_cv_path_XSLTPROC
17805if test -n "$XSLTPROC"; then
17806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17807$as_echo "$XSLTPROC" >&6; }
17808else
17809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17810$as_echo "no" >&6; }
17811fi
17812
17813
17814 test -n "$XSLTPROC" && break
17815done
17816test -n "$XSLTPROC" || XSLTPROC="missing"
17817
17818if test "x$USE_MAINTAINER_MODE" = xyes; then
17819 if test "${XSLTPROC}" = missing; then
d0ac1c44 17820 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
17821 fi
17822fi
17823
17824
bec39cab
AC
17825ac_sources="$files"
17826ac_dests="$links"
17827while test -n "$ac_sources"; do
17828 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17829 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17830 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17831done
81ecdfbb 17832ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17833
17834
c906108c
SS
17835
17836
c906108c 17837
81ecdfbb 17838$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17839
bec39cab 17840
dcd1f979
TT
17841if $development; then
17842
17843$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17844
b5884fa7 17845 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o"
1e5ded6c 17846 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c"
dcd1f979
TT
17847fi
17848
b292c783 17849
f6a88844
JM
17850 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17851 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17852 if test "x$GDB_TRANSFORM_NAME" = x; then
17853 GDB_TRANSFORM_NAME=gdb
17854 fi
17855
17856
17857
17858 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17859 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17860 if test "x$GCORE_TRANSFORM_NAME" = x; then
17861 GCORE_TRANSFORM_NAME=gcore
17862 fi
17863
b292c783
JK
17864
17865ac_config_files="$ac_config_files gcore"
17866
141ec9f6 17867ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 17868
89a34d1b 17869
bec39cab
AC
17870cat >confcache <<\_ACEOF
17871# This file is a shell script that caches the results of configure
17872# tests run on this system so they can be shared between configure
17873# scripts and configure runs, see configure's option --config-cache.
17874# It is not useful on other systems. If it contains results you don't
17875# want to keep, you may remove or edit it.
17876#
17877# config.status only pays attention to the cache file if you give it
17878# the --recheck option to rerun configure.
17879#
17880# `ac_cv_env_foo' variables (set or unset) will be overridden when
17881# loading this file, other *unset* `ac_cv_foo' will be assigned the
17882# following values.
17883
17884_ACEOF
17885
17886# The following way of writing the cache mishandles newlines in values,
17887# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17888# So, we kill variables containing newlines.
bec39cab
AC
17889# Ultrix sh set writes to stderr and can't be redirected directly,
17890# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17891(
17892 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17893 eval ac_val=\$$ac_var
17894 case $ac_val in #(
17895 *${as_nl}*)
17896 case $ac_var in #(
17897 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17898$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17899 esac
17900 case $ac_var in #(
17901 _ | IFS | as_nl) ;; #(
17902 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17903 *) { eval $ac_var=; unset $ac_var;} ;;
17904 esac ;;
17905 esac
17906 done
17907
bec39cab 17908 (set) 2>&1 |
81ecdfbb
RW
17909 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17910 *${as_nl}ac_space=\ *)
17911 # `set' does not quote correctly, so add quotes: double-quote
17912 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17913 sed -n \
17914 "s/'/'\\\\''/g;
17915 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17916 ;; #(
bec39cab
AC
17917 *)
17918 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17919 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17920 ;;
81ecdfbb
RW
17921 esac |
17922 sort
17923) |
bec39cab 17924 sed '
81ecdfbb 17925 /^ac_cv_env_/b end
bec39cab 17926 t clear
81ecdfbb 17927 :clear
bec39cab
AC
17928 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17929 t end
81ecdfbb
RW
17930 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17931 :end' >>confcache
17932if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17933 if test -w "$cache_file"; then
d0ac1c44 17934 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
17935 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17936$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
17937 if test ! -f "$cache_file" || test -h "$cache_file"; then
17938 cat confcache >"$cache_file"
17939 else
17940 case $cache_file in #(
17941 */* | ?:*)
17942 mv -f confcache "$cache_file"$$ &&
17943 mv -f "$cache_file"$$ "$cache_file" ;; #(
17944 *)
17945 mv -f confcache "$cache_file" ;;
17946 esac
17947 fi
17948 fi
bec39cab 17949 else
81ecdfbb
RW
17950 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17951$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17952 fi
17953fi
17954rm -f confcache
17955
17956test "x$prefix" = xNONE && prefix=$ac_default_prefix
17957# Let make expand exec_prefix.
17958test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17959
bec39cab
AC
17960DEFS=-DHAVE_CONFIG_H
17961
17962ac_libobjs=
17963ac_ltlibobjs=
d0ac1c44 17964U=
bec39cab
AC
17965for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17966 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17967 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17968 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17969 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17970 # will be set to the directory where LIBOBJS objects are built.
17971 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17972 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17973done
17974LIBOBJS=$ac_libobjs
17975
17976LTLIBOBJS=$ac_ltlibobjs
17977
17978
85981d60 17979if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 17980 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 17981Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17982fi
4df42755 17983if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 17984 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
17985Usually this means the macro was only invoked conditionally." "$LINENO" 5
17986fi
17987if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 17988 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
17989Usually this means the macro was only invoked conditionally." "$LINENO" 5
17990fi
81ecdfbb
RW
17991
17992
d0ac1c44 17993: "${CONFIG_STATUS=./config.status}"
81ecdfbb 17994ac_write_fail=0
bec39cab
AC
17995ac_clean_files_save=$ac_clean_files
17996ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17997{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17998$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17999as_write_fail=0
18000cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
18001#! $SHELL
18002# Generated by $as_me.
18003# Run this file to recreate the current configuration.
18004# Compiler output produced by configure, useful for debugging
18005# configure, is in config.log if it exists.
18006
18007debug=false
18008ac_cs_recheck=false
18009ac_cs_silent=false
bec39cab 18010
81ecdfbb
RW
18011SHELL=\${CONFIG_SHELL-$SHELL}
18012export SHELL
18013_ASEOF
18014cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18015## -------------------- ##
18016## M4sh Initialization. ##
18017## -------------------- ##
18018
18019# Be more Bourne compatible
18020DUALCASE=1; export DUALCASE # for MKS sh
18021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18022 emulate sh
18023 NULLCMD=:
81ecdfbb 18024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
18025 # is contrary to our usage. Disable this feature.
18026 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
18027 setopt NO_GLOB_SUBST
18028else
18029 case `(set -o) 2>/dev/null` in #(
18030 *posix*) :
18031 set -o posix ;; #(
18032 *) :
18033 ;;
18034esac
bec39cab 18035fi
bec39cab 18036
81ecdfbb
RW
18037
18038as_nl='
18039'
18040export as_nl
18041# Printing a long string crashes Solaris 7 /usr/bin/printf.
18042as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18043as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18044as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18045# Prefer a ksh shell builtin over an external printf program on Solaris,
18046# but without wasting forks for bash or zsh.
18047if test -z "$BASH_VERSION$ZSH_VERSION" \
18048 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18049 as_echo='print -r --'
18050 as_echo_n='print -rn --'
18051elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18052 as_echo='printf %s\n'
18053 as_echo_n='printf %s'
18054else
18055 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18056 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18057 as_echo_n='/usr/ucb/echo -n'
18058 else
18059 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18060 as_echo_n_body='eval
18061 arg=$1;
18062 case $arg in #(
18063 *"$as_nl"*)
18064 expr "X$arg" : "X\\(.*\\)$as_nl";
18065 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18066 esac;
18067 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18068 '
18069 export as_echo_n_body
18070 as_echo_n='sh -c $as_echo_n_body as_echo'
18071 fi
18072 export as_echo_body
18073 as_echo='sh -c $as_echo_body as_echo'
18074fi
18075
18076# The user is always right.
18077if test "${PATH_SEPARATOR+set}" != set; then
18078 PATH_SEPARATOR=:
18079 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18080 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18081 PATH_SEPARATOR=';'
18082 }
bec39cab
AC
18083fi
18084
18085
81ecdfbb
RW
18086# IFS
18087# We need space, tab and new line, in precisely that order. Quoting is
18088# there to prevent editors from complaining about space-tab.
18089# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18090# splitting by setting IFS to empty value.)
18091IFS=" "" $as_nl"
18092
18093# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 18094as_myself=
81ecdfbb
RW
18095case $0 in #((
18096 *[\\/]* ) as_myself=$0 ;;
18097 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18098for as_dir in $PATH
18099do
18100 IFS=$as_save_IFS
18101 test -z "$as_dir" && as_dir=.
18102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18103 done
18104IFS=$as_save_IFS
18105
18106 ;;
18107esac
18108# We did not find ourselves, most probably we were run as `sh COMMAND'
18109# in which case we are not to be found in the path.
18110if test "x$as_myself" = x; then
18111 as_myself=$0
18112fi
18113if test ! -f "$as_myself"; then
18114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18115 exit 1
18116fi
18117
18118# Unset variables that we do not need and which cause bugs (e.g. in
18119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18120# suppresses any "Segmentation fault" message there. '((' could
18121# trigger a bug in pdksh 5.2.14.
18122for as_var in BASH_ENV ENV MAIL MAILPATH
18123do eval test x\${$as_var+set} = xset \
18124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18125done
bec39cab
AC
18126PS1='$ '
18127PS2='> '
18128PS4='+ '
18129
18130# NLS nuisances.
81ecdfbb
RW
18131LC_ALL=C
18132export LC_ALL
18133LANGUAGE=C
18134export LANGUAGE
18135
18136# CDPATH.
18137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18138
18139
d0ac1c44
SM
18140# as_fn_error STATUS ERROR [LINENO LOG_FD]
18141# ----------------------------------------
81ecdfbb
RW
18142# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18143# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 18144# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
18145as_fn_error ()
18146{
d0ac1c44
SM
18147 as_status=$1; test $as_status -eq 0 && as_status=1
18148 if test "$4"; then
18149 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18150 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 18151 fi
d0ac1c44 18152 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
18153 as_fn_exit $as_status
18154} # as_fn_error
18155
18156
18157# as_fn_set_status STATUS
18158# -----------------------
18159# Set $? to STATUS, without forking.
18160as_fn_set_status ()
18161{
18162 return $1
18163} # as_fn_set_status
18164
18165# as_fn_exit STATUS
18166# -----------------
18167# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18168as_fn_exit ()
18169{
18170 set +e
18171 as_fn_set_status $1
18172 exit $1
18173} # as_fn_exit
18174
18175# as_fn_unset VAR
18176# ---------------
18177# Portably unset VAR.
18178as_fn_unset ()
18179{
18180 { eval $1=; unset $1;}
18181}
18182as_unset=as_fn_unset
18183# as_fn_append VAR VALUE
18184# ----------------------
18185# Append the text in VALUE to the end of the definition contained in VAR. Take
18186# advantage of any shell optimizations that allow amortized linear growth over
18187# repeated appends, instead of the typical quadratic growth present in naive
18188# implementations.
18189if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18190 eval 'as_fn_append ()
18191 {
18192 eval $1+=\$2
18193 }'
18194else
18195 as_fn_append ()
18196 {
18197 eval $1=\$$1\$2
18198 }
18199fi # as_fn_append
18200
18201# as_fn_arith ARG...
18202# ------------------
18203# Perform arithmetic evaluation on the ARGs, and store the result in the
18204# global $as_val. Take advantage of shells that can avoid forks. The arguments
18205# must be portable across $(()) and expr.
18206if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18207 eval 'as_fn_arith ()
18208 {
18209 as_val=$(( $* ))
18210 }'
18211else
18212 as_fn_arith ()
18213 {
18214 as_val=`expr "$@" || test $? -eq 1`
18215 }
18216fi # as_fn_arith
bec39cab 18217
81ecdfbb
RW
18218
18219if expr a : '\(a\)' >/dev/null 2>&1 &&
18220 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18221 as_expr=expr
18222else
18223 as_expr=false
18224fi
18225
81ecdfbb 18226if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18227 as_basename=basename
18228else
18229 as_basename=false
18230fi
18231
81ecdfbb
RW
18232if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18233 as_dirname=dirname
18234else
18235 as_dirname=false
18236fi
bec39cab 18237
81ecdfbb 18238as_me=`$as_basename -- "$0" ||
bec39cab
AC
18239$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18240 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18241 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18242$as_echo X/"$0" |
18243 sed '/^.*\/\([^/][^/]*\)\/*$/{
18244 s//\1/
18245 q
18246 }
18247 /^X\/\(\/\/\)$/{
18248 s//\1/
18249 q
18250 }
18251 /^X\/\(\/\).*/{
18252 s//\1/
18253 q
18254 }
18255 s/.*/./; q'`
b4e70030 18256
b4e70030
JB
18257# Avoid depending upon Character Ranges.
18258as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18259as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18260as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18261as_cr_digits='0123456789'
18262as_cr_alnum=$as_cr_Letters$as_cr_digits
18263
81ecdfbb
RW
18264ECHO_C= ECHO_N= ECHO_T=
18265case `echo -n x` in #(((((
18266-n*)
18267 case `echo 'xy\c'` in
18268 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18269 xy) ECHO_C='\c';;
18270 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18271 ECHO_T=' ';;
18272 esac;;
18273*)
18274 ECHO_N='-n';;
bec39cab
AC
18275esac
18276
81ecdfbb
RW
18277rm -f conf$$ conf$$.exe conf$$.file
18278if test -d conf$$.dir; then
18279 rm -f conf$$.dir/conf$$.file
bec39cab 18280else
81ecdfbb
RW
18281 rm -f conf$$.dir
18282 mkdir conf$$.dir 2>/dev/null
bec39cab 18283fi
81ecdfbb
RW
18284if (echo >conf$$.file) 2>/dev/null; then
18285 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18286 as_ln_s='ln -s'
81ecdfbb
RW
18287 # ... but there are two gotchas:
18288 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18289 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 18290 # In both cases, we have to default to `cp -pR'.
81ecdfbb 18291 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 18292 as_ln_s='cp -pR'
81ecdfbb
RW
18293 elif ln conf$$.file conf$$ 2>/dev/null; then
18294 as_ln_s=ln
18295 else
d0ac1c44 18296 as_ln_s='cp -pR'
b4e70030 18297 fi
bec39cab 18298else
d0ac1c44 18299 as_ln_s='cp -pR'
bec39cab 18300fi
81ecdfbb
RW
18301rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18302rmdir conf$$.dir 2>/dev/null
18303
18304
18305# as_fn_mkdir_p
18306# -------------
18307# Create "$as_dir" as a directory, including parents if necessary.
18308as_fn_mkdir_p ()
18309{
18310
18311 case $as_dir in #(
18312 -*) as_dir=./$as_dir;;
18313 esac
18314 test -d "$as_dir" || eval $as_mkdir_p || {
18315 as_dirs=
18316 while :; do
18317 case $as_dir in #(
18318 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18319 *) as_qdir=$as_dir;;
18320 esac
18321 as_dirs="'$as_qdir' $as_dirs"
18322 as_dir=`$as_dirname -- "$as_dir" ||
18323$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18324 X"$as_dir" : 'X\(//\)[^/]' \| \
18325 X"$as_dir" : 'X\(//\)$' \| \
18326 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18327$as_echo X"$as_dir" |
18328 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18329 s//\1/
18330 q
18331 }
18332 /^X\(\/\/\)[^/].*/{
18333 s//\1/
18334 q
18335 }
18336 /^X\(\/\/\)$/{
18337 s//\1/
18338 q
18339 }
18340 /^X\(\/\).*/{
18341 s//\1/
18342 q
18343 }
18344 s/.*/./; q'`
18345 test -d "$as_dir" && break
18346 done
18347 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 18348 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 18349
bec39cab 18350
81ecdfbb 18351} # as_fn_mkdir_p
bec39cab 18352if mkdir -p . 2>/dev/null; then
81ecdfbb 18353 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18354else
18355 test -d ./-p && rmdir ./-p
18356 as_mkdir_p=false
18357fi
18358
d0ac1c44
SM
18359
18360# as_fn_executable_p FILE
18361# -----------------------
18362# Test if FILE is an executable regular file.
18363as_fn_executable_p ()
18364{
18365 test -f "$1" && test -x "$1"
18366} # as_fn_executable_p
18367as_test_x='test -x'
18368as_executable_p=as_fn_executable_p
bec39cab
AC
18369
18370# Sed expression to map a string onto a valid CPP name.
18371as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18372
18373# Sed expression to map a string onto a valid variable name.
18374as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18375
18376
bec39cab 18377exec 6>&1
81ecdfbb
RW
18378## ----------------------------------- ##
18379## Main body of $CONFIG_STATUS script. ##
18380## ----------------------------------- ##
18381_ASEOF
18382test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18383
18384cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18385# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18386# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18387# values after options handling.
18388ac_log="
bec39cab 18389This file was extended by $as_me, which was
d0ac1c44 18390generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
18391
18392 CONFIG_FILES = $CONFIG_FILES
18393 CONFIG_HEADERS = $CONFIG_HEADERS
18394 CONFIG_LINKS = $CONFIG_LINKS
18395 CONFIG_COMMANDS = $CONFIG_COMMANDS
18396 $ $0 $@
18397
81ecdfbb
RW
18398on `(hostname || uname -n) 2>/dev/null | sed 1q`
18399"
18400
bec39cab
AC
18401_ACEOF
18402
81ecdfbb
RW
18403case $ac_config_files in *"
18404"*) set x $ac_config_files; shift; ac_config_files=$*;;
18405esac
234b45d4 18406
81ecdfbb
RW
18407case $ac_config_headers in *"
18408"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18409esac
b4e70030 18410
b4e70030 18411
81ecdfbb
RW
18412cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18413# Files that config.status was made for.
18414config_files="$ac_config_files"
18415config_headers="$ac_config_headers"
18416config_links="$ac_config_links"
18417config_commands="$ac_config_commands"
234b45d4 18418
81ecdfbb 18419_ACEOF
b4e70030 18420
81ecdfbb 18421cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18422ac_cs_usage="\
81ecdfbb
RW
18423\`$as_me' instantiates files and other configuration actions
18424from templates according to the current configuration. Unless the files
18425and actions are specified as TAGs, all are instantiated by default.
234b45d4 18426
81ecdfbb 18427Usage: $0 [OPTION]... [TAG]...
234b45d4 18428
bec39cab 18429 -h, --help print this help, then exit
81ecdfbb 18430 -V, --version print version number and configuration settings, then exit
d0ac1c44 18431 --config print configuration, then exit
81ecdfbb
RW
18432 -q, --quiet, --silent
18433 do not print progress messages
bec39cab
AC
18434 -d, --debug don't remove temporary files
18435 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18436 --file=FILE[:TEMPLATE]
18437 instantiate the configuration file FILE
18438 --header=FILE[:TEMPLATE]
18439 instantiate the configuration header FILE
234b45d4 18440
bec39cab
AC
18441Configuration files:
18442$config_files
234b45d4 18443
bec39cab
AC
18444Configuration headers:
18445$config_headers
234b45d4 18446
bec39cab
AC
18447Configuration links:
18448$config_links
234b45d4 18449
bec39cab
AC
18450Configuration commands:
18451$config_commands
18452
81ecdfbb 18453Report bugs to the package provider."
b4e70030 18454
81ecdfbb
RW
18455_ACEOF
18456cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18457ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
18458ac_cs_version="\\
18459config.status
d0ac1c44
SM
18460configured by $0, generated by GNU Autoconf 2.69,
18461 with options \\"\$ac_cs_config\\"
bec39cab 18462
d0ac1c44 18463Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
18464This config.status script is free software; the Free Software Foundation
18465gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18466
18467ac_pwd='$ac_pwd'
18468srcdir='$srcdir'
18469INSTALL='$INSTALL'
81ecdfbb
RW
18470AWK='$AWK'
18471test -n "\$AWK" || AWK=awk
bec39cab
AC
18472_ACEOF
18473
81ecdfbb
RW
18474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18475# The default lists apply if the user does not specify any file.
bec39cab
AC
18476ac_need_defaults=:
18477while test $# != 0
18478do
18479 case $1 in
d0ac1c44 18480 --*=?*)
81ecdfbb
RW
18481 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18482 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18483 ac_shift=:
c906108c 18484 ;;
d0ac1c44
SM
18485 --*=)
18486 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18487 ac_optarg=
18488 ac_shift=:
18489 ;;
81ecdfbb 18490 *)
bec39cab
AC
18491 ac_option=$1
18492 ac_optarg=$2
18493 ac_shift=shift
c906108c 18494 ;;
bec39cab 18495 esac
c906108c 18496
bec39cab
AC
18497 case $ac_option in
18498 # Handling of the options.
bec39cab
AC
18499 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18500 ac_cs_recheck=: ;;
81ecdfbb
RW
18501 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18502 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
18503 --config | --confi | --conf | --con | --co | --c )
18504 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 18505 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18506 debug=: ;;
18507 --file | --fil | --fi | --f )
18508 $ac_shift
81ecdfbb
RW
18509 case $ac_optarg in
18510 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 18511 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
18512 esac
18513 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18514 ac_need_defaults=false;;
18515 --header | --heade | --head | --hea )
18516 $ac_shift
81ecdfbb
RW
18517 case $ac_optarg in
18518 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18519 esac
18520 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18521 ac_need_defaults=false;;
81ecdfbb
RW
18522 --he | --h)
18523 # Conflict between --help and --header
d0ac1c44 18524 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
18525Try \`$0 --help' for more information.";;
18526 --help | --hel | -h )
18527 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18529 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18530 ac_cs_silent=: ;;
c906108c 18531
bec39cab 18532 # This is an error.
d0ac1c44 18533 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 18534Try \`$0 --help' for more information." ;;
c906108c 18535
81ecdfbb
RW
18536 *) as_fn_append ac_config_targets " $1"
18537 ac_need_defaults=false ;;
c906108c 18538
bec39cab
AC
18539 esac
18540 shift
18541done
c906108c 18542
bec39cab 18543ac_configure_extra_args=
c906108c 18544
bec39cab
AC
18545if $ac_cs_silent; then
18546 exec 6>/dev/null
18547 ac_configure_extra_args="$ac_configure_extra_args --silent"
18548fi
c906108c 18549
bec39cab 18550_ACEOF
81ecdfbb 18551cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18552if \$ac_cs_recheck; then
d0ac1c44 18553 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
18554 shift
18555 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18556 CONFIG_SHELL='$SHELL'
18557 export CONFIG_SHELL
18558 exec "\$@"
bec39cab
AC
18559fi
18560
18561_ACEOF
81ecdfbb
RW
18562cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18563exec 5>>config.log
18564{
18565 echo
18566 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18567## Running $as_me. ##
18568_ASBOX
18569 $as_echo "$ac_log"
18570} >&5
bec39cab 18571
81ecdfbb
RW
18572_ACEOF
18573cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18574#
81ecdfbb 18575# INIT-COMMANDS
c906108c 18576#
a417dc56 18577ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 18578
bec39cab
AC
18579_ACEOF
18580
81ecdfbb 18581cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18582
81ecdfbb 18583# Handling of arguments.
bec39cab 18584for ac_config_target in $ac_config_targets
c906108c 18585do
81ecdfbb
RW
18586 case $ac_config_target in
18587 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18588 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18589 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18590 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18591 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18592 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18593 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 18594 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 18595 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18596 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 18597
d0ac1c44 18598 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18599 esac
18600done
18601
81ecdfbb 18602
bec39cab
AC
18603# If the user did not use the arguments to specify the items to instantiate,
18604# then the envvar interface is used. Set only those that are not.
18605# We use the long form for the default assignment because of an extremely
18606# bizarre bug on SunOS 4.1.3.
18607if $ac_need_defaults; then
18608 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18609 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18610 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18611 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18612fi
18613
b4e70030 18614# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18615# simply because there is no reason against having it here, and in addition,
b4e70030 18616# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18617# Hook for its removal unless debugging.
18618# Note that there is a small window in which the directory will not be cleaned:
18619# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18620$debug ||
18621{
d0ac1c44 18622 tmp= ac_tmp=
81ecdfbb 18623 trap 'exit_status=$?
d0ac1c44
SM
18624 : "${ac_tmp:=$tmp}"
18625 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
18626' 0
18627 trap 'as_fn_exit 1' 1 2 13 15
18628}
18629# Create a (secure) tmp directory for tmp files.
18630
18631{
18632 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 18633 test -d "$tmp"
81ecdfbb
RW
18634} ||
18635{
18636 tmp=./conf$$-$RANDOM
18637 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
18638} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18639ac_tmp=$tmp
81ecdfbb
RW
18640
18641# Set up the scripts for CONFIG_FILES section.
18642# No need to generate them if there are no CONFIG_FILES.
18643# This happens for instance with `./config.status config.h'.
18644if test -n "$CONFIG_FILES"; then
18645
18646if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18647 ac_cs_awk_getline=:
18648 ac_cs_awk_pipe_init=
18649 ac_cs_awk_read_file='
18650 while ((getline aline < (F[key])) > 0)
18651 print(aline)
18652 close(F[key])'
18653 ac_cs_awk_pipe_fini=
18654else
18655 ac_cs_awk_getline=false
18656 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18657 ac_cs_awk_read_file='
18658 print "|#_!!_#|"
18659 print "cat " F[key] " &&"
18660 '$ac_cs_awk_pipe_init
18661 # The final `:' finishes the AND list.
18662 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18663fi
18664ac_cr=`echo X | tr X '\015'`
18665# On cygwin, bash can eat \r inside `` if the user requested igncr.
18666# But we know of no other shell where ac_cr would be empty at this
18667# point, so we can use a bashism as a fallback.
18668if test "x$ac_cr" = x; then
18669 eval ac_cr=\$\'\\r\'
18670fi
18671ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18672if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 18673 ac_cs_awk_cr='\\r'
81ecdfbb
RW
18674else
18675 ac_cs_awk_cr=$ac_cr
18676fi
18677
d0ac1c44 18678echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
18679_ACEOF
18680
18681# Create commands to substitute file output variables.
18682{
18683 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 18684 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
18685 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18686 echo "_ACAWK" &&
18687 echo "_ACEOF"
18688} >conf$$files.sh &&
18689. ./conf$$files.sh ||
d0ac1c44 18690 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18691rm -f conf$$files.sh
18692
18693{
18694 echo "cat >conf$$subs.awk <<_ACEOF" &&
18695 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18696 echo "_ACEOF"
18697} >conf$$subs.sh ||
d0ac1c44
SM
18698 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18699ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
18700ac_delim='%!_!# '
18701for ac_last_try in false false false false false :; do
18702 . ./conf$$subs.sh ||
d0ac1c44 18703 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18704
18705 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18706 if test $ac_delim_n = $ac_delim_num; then
18707 break
18708 elif $ac_last_try; then
d0ac1c44 18709 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18710 else
18711 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18712 fi
18713done
18714rm -f conf$$subs.sh
18715
18716cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18717cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
18718_ACEOF
18719sed -n '
18720h
18721s/^/S["/; s/!.*/"]=/
18722p
18723g
18724s/^[^!]*!//
18725:repl
18726t repl
18727s/'"$ac_delim"'$//
18728t delim
18729:nl
18730h
d0ac1c44 18731s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18732t more1
18733s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18734p
18735n
18736b repl
18737:more1
18738s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18739p
18740g
18741s/.\{148\}//
18742t nl
18743:delim
18744h
d0ac1c44 18745s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18746t more2
18747s/["\\]/\\&/g; s/^/"/; s/$/"/
18748p
18749b
18750:more2
18751s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18752p
18753g
18754s/.\{148\}//
18755t delim
18756' <conf$$subs.awk | sed '
18757/^[^""]/{
18758 N
18759 s/\n//
18760}
18761' >>$CONFIG_STATUS || ac_write_fail=1
18762rm -f conf$$subs.awk
18763cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18764_ACAWK
d0ac1c44 18765cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
18766 for (key in S) S_is_set[key] = 1
18767 FS = "\a"
18768 \$ac_cs_awk_pipe_init
18769}
18770{
18771 line = $ 0
18772 nfields = split(line, field, "@")
18773 substed = 0
18774 len = length(field[1])
18775 for (i = 2; i < nfields; i++) {
18776 key = field[i]
18777 keylen = length(key)
18778 if (S_is_set[key]) {
18779 value = S[key]
18780 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18781 len += length(value) + length(field[++i])
18782 substed = 1
18783 } else
18784 len += 1 + keylen
18785 }
18786 if (nfields == 3 && !substed) {
18787 key = field[2]
18788 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18789 \$ac_cs_awk_read_file
18790 next
18791 }
18792 }
18793 print line
b4e70030 18794}
81ecdfbb
RW
18795\$ac_cs_awk_pipe_fini
18796_ACAWK
18797_ACEOF
18798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18799if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18800 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18801else
18802 cat
d0ac1c44
SM
18803fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18804 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
18805_ACEOF
18806
d0ac1c44
SM
18807# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18808# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
18809# trailing colons and then remove the whole line if VPATH becomes empty
18810# (actually we leave an empty line to preserve line numbers).
18811if test "x$srcdir" = x.; then
d0ac1c44
SM
18812 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18813h
18814s///
18815s/^/:/
18816s/[ ]*$/:/
18817s/:\$(srcdir):/:/g
18818s/:\${srcdir}:/:/g
18819s/:@srcdir@:/:/g
18820s/^:*//
81ecdfbb 18821s/:*$//
d0ac1c44
SM
18822x
18823s/\(=[ ]*\).*/\1/
18824G
18825s/\n//
81ecdfbb
RW
18826s/^[^=]*=[ ]*$//
18827}'
18828fi
18829
18830cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18831fi # test -n "$CONFIG_FILES"
18832
18833# Set up the scripts for CONFIG_HEADERS section.
18834# No need to generate them if there are no CONFIG_HEADERS.
18835# This happens for instance with `./config.status Makefile'.
18836if test -n "$CONFIG_HEADERS"; then
d0ac1c44 18837cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
18838BEGIN {
18839_ACEOF
18840
18841# Transform confdefs.h into an awk script `defines.awk', embedded as
18842# here-document in config.status, that substitutes the proper values into
18843# config.h.in to produce config.h.
4e8d927d 18844
81ecdfbb
RW
18845# Create a delimiter string that does not exist in confdefs.h, to ease
18846# handling of long lines.
18847ac_delim='%!_!# '
18848for ac_last_try in false false :; do
d0ac1c44
SM
18849 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18850 if test -z "$ac_tt"; then
81ecdfbb
RW
18851 break
18852 elif $ac_last_try; then
d0ac1c44 18853 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
18854 else
18855 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18856 fi
18857done
4e8d927d 18858
81ecdfbb
RW
18859# For the awk script, D is an array of macro values keyed by name,
18860# likewise P contains macro parameters if any. Preserve backslash
18861# newline sequences.
18862
18863ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18864sed -n '
18865s/.\{148\}/&'"$ac_delim"'/g
18866t rset
18867:rset
18868s/^[ ]*#[ ]*define[ ][ ]*/ /
18869t def
18870d
18871:def
18872s/\\$//
18873t bsnl
18874s/["\\]/\\&/g
18875s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18876D["\1"]=" \3"/p
18877s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18878d
18879:bsnl
18880s/["\\]/\\&/g
18881s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18882D["\1"]=" \3\\\\\\n"\\/p
18883t cont
18884s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18885t cont
18886d
18887:cont
18888n
18889s/.\{148\}/&'"$ac_delim"'/g
18890t clear
18891:clear
18892s/\\$//
18893t bsnlc
18894s/["\\]/\\&/g; s/^/"/; s/$/"/p
18895d
18896:bsnlc
18897s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18898b cont
18899' <confdefs.h | sed '
18900s/'"$ac_delim"'/"\\\
18901"/g' >>$CONFIG_STATUS || ac_write_fail=1
18902
18903cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18904 for (key in D) D_is_set[key] = 1
18905 FS = "\a"
18906}
18907/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18908 line = \$ 0
18909 split(line, arg, " ")
18910 if (arg[1] == "#") {
18911 defundef = arg[2]
18912 mac1 = arg[3]
18913 } else {
18914 defundef = substr(arg[1], 2)
18915 mac1 = arg[2]
18916 }
18917 split(mac1, mac2, "(") #)
18918 macro = mac2[1]
18919 prefix = substr(line, 1, index(line, defundef) - 1)
18920 if (D_is_set[macro]) {
18921 # Preserve the white space surrounding the "#".
18922 print prefix "define", macro P[macro] D[macro]
18923 next
18924 } else {
18925 # Replace #undef with comments. This is necessary, for example,
18926 # in the case of _POSIX_SOURCE, which is predefined and required
18927 # on some systems where configure will not decide to define it.
18928 if (defundef == "undef") {
18929 print "/*", prefix defundef, macro, "*/"
18930 next
18931 }
18932 }
b4e70030 18933}
81ecdfbb
RW
18934{ print }
18935_ACAWK
b4e70030 18936_ACEOF
81ecdfbb 18937cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 18938 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 18939fi # test -n "$CONFIG_HEADERS"
4e8d927d 18940
4e8d927d 18941
81ecdfbb
RW
18942eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18943shift
18944for ac_tag
18945do
18946 case $ac_tag in
18947 :[FHLC]) ac_mode=$ac_tag; continue;;
18948 esac
18949 case $ac_mode$ac_tag in
18950 :[FHL]*:*);;
d0ac1c44 18951 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
18952 :[FH]-) ac_tag=-:-;;
18953 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18954 esac
18955 ac_save_IFS=$IFS
18956 IFS=:
18957 set x $ac_tag
18958 IFS=$ac_save_IFS
18959 shift
18960 ac_file=$1
18961 shift
4e8d927d 18962
81ecdfbb
RW
18963 case $ac_mode in
18964 :L) ac_source=$1;;
18965 :[FH])
18966 ac_file_inputs=
18967 for ac_f
18968 do
18969 case $ac_f in
d0ac1c44 18970 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
18971 *) # Look for the file first in the build tree, then in the source tree
18972 # (if the path is not absolute). The absolute path cannot be DOS-style,
18973 # because $ac_f cannot contain `:'.
18974 test -f "$ac_f" ||
18975 case $ac_f in
18976 [\\/$]*) false;;
18977 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18978 esac ||
d0ac1c44 18979 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
18980 esac
18981 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18982 as_fn_append ac_file_inputs " '$ac_f'"
18983 done
18984
18985 # Let's still pretend it is `configure' which instantiates (i.e., don't
18986 # use $as_me), people would be surprised to read:
18987 # /* config.h. Generated by config.status. */
18988 configure_input='Generated from '`
18989 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18990 `' by configure.'
18991 if test x"$ac_file" != x-; then
18992 configure_input="$ac_file. $configure_input"
18993 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18994$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18995 fi
81ecdfbb
RW
18996 # Neutralize special characters interpreted by sed in replacement strings.
18997 case $configure_input in #(
18998 *\&* | *\|* | *\\* )
18999 ac_sed_conf_input=`$as_echo "$configure_input" |
19000 sed 's/[\\\\&|]/\\\\&/g'`;; #(
19001 *) ac_sed_conf_input=$configure_input;;
19002 esac
4e8d927d 19003
81ecdfbb 19004 case $ac_tag in
d0ac1c44
SM
19005 *:-:* | *:-) cat >"$ac_tmp/stdin" \
19006 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
19007 esac
19008 ;;
c906108c
SS
19009 esac
19010
81ecdfbb 19011 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
19012$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19013 X"$ac_file" : 'X\(//\)[^/]' \| \
19014 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
19015 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19016$as_echo X"$ac_file" |
19017 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19018 s//\1/
19019 q
19020 }
19021 /^X\(\/\/\)[^/].*/{
19022 s//\1/
19023 q
19024 }
19025 /^X\(\/\/\)$/{
19026 s//\1/
19027 q
19028 }
19029 /^X\(\/\).*/{
19030 s//\1/
19031 q
19032 }
19033 s/.*/./; q'`
19034 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19035 ac_builddir=.
19036
81ecdfbb
RW
19037case "$ac_dir" in
19038.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19039*)
19040 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19041 # A ".." for each directory in $ac_dir_suffix.
19042 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19043 case $ac_top_builddir_sub in
19044 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19045 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19046 esac ;;
19047esac
19048ac_abs_top_builddir=$ac_pwd
19049ac_abs_builddir=$ac_pwd$ac_dir_suffix
19050# for backward compatibility:
19051ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19052
19053case $srcdir in
81ecdfbb 19054 .) # We are building in place.
bec39cab 19055 ac_srcdir=.
81ecdfbb
RW
19056 ac_top_srcdir=$ac_top_builddir_sub
19057 ac_abs_top_srcdir=$ac_pwd ;;
19058 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19059 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19060 ac_top_srcdir=$srcdir
19061 ac_abs_top_srcdir=$srcdir ;;
19062 *) # Relative name.
19063 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19064 ac_top_srcdir=$ac_top_build_prefix$srcdir
19065 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19066esac
81ecdfbb 19067ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 19068
c906108c 19069
81ecdfbb
RW
19070 case $ac_mode in
19071 :F)
19072 #
19073 # CONFIG_FILE
19074 #
c906108c 19075
bec39cab
AC
19076 case $INSTALL in
19077 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 19078 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 19079 esac
81ecdfbb 19080_ACEOF
121ce6e5 19081
81ecdfbb
RW
19082cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19083# If the template does not know about datarootdir, expand it.
19084# FIXME: This hack should be removed a few years after 2.60.
19085ac_datarootdir_hack=; ac_datarootdir_seen=
19086ac_sed_dataroot='
19087/datarootdir/ {
19088 p
19089 q
19090}
19091/@datadir@/p
19092/@docdir@/p
19093/@infodir@/p
19094/@localedir@/p
19095/@mandir@/p'
19096case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19097*datarootdir*) ac_datarootdir_seen=yes;;
19098*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19100$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19101_ACEOF
19102cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19103 ac_datarootdir_hack='
19104 s&@datadir@&$datadir&g
19105 s&@docdir@&$docdir&g
19106 s&@infodir@&$infodir&g
19107 s&@localedir@&$localedir&g
19108 s&@mandir@&$mandir&g
19109 s&\\\${datarootdir}&$datarootdir&g' ;;
19110esac
4e8d927d 19111_ACEOF
81ecdfbb
RW
19112
19113# Neutralize VPATH when `$srcdir' = `.'.
19114# Shell code in configure.ac might set extrasub.
19115# FIXME: do we really want to maintain this feature?
19116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19117ac_sed_extra="$ac_vpsub
bec39cab
AC
19118$extrasub
19119_ACEOF
81ecdfbb 19120cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
19121:t
19122/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
19123s|@configure_input@|$ac_sed_conf_input|;t t
19124s&@top_builddir@&$ac_top_builddir_sub&;t t
19125s&@top_build_prefix@&$ac_top_build_prefix&;t t
19126s&@srcdir@&$ac_srcdir&;t t
19127s&@abs_srcdir@&$ac_abs_srcdir&;t t
19128s&@top_srcdir@&$ac_top_srcdir&;t t
19129s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19130s&@builddir@&$ac_builddir&;t t
19131s&@abs_builddir@&$ac_abs_builddir&;t t
19132s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19133s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
19134$ac_datarootdir_hack
19135"
19136eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19137if $ac_cs_awk_getline; then
d0ac1c44 19138 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 19139else
d0ac1c44
SM
19140 $AWK -f "$ac_tmp/subs.awk" | $SHELL
19141fi \
19142 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19143
19144test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
19145 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19146 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19147 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 19148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19149which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 19150$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19151which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 19152
d0ac1c44 19153 rm -f "$ac_tmp/stdin"
bec39cab 19154 case $ac_file in
d0ac1c44
SM
19155 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19156 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 19157 esac \
d0ac1c44 19158 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19159 ;;
19160 :H)
19161 #
19162 # CONFIG_HEADER
19163 #
bec39cab 19164 if test x"$ac_file" != x-; then
81ecdfbb
RW
19165 {
19166 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19167 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19168 } >"$ac_tmp/config.h" \
19169 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19170 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
19171 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19172$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 19173 else
81ecdfbb 19174 rm -f "$ac_file"
d0ac1c44
SM
19175 mv "$ac_tmp/config.h" "$ac_file" \
19176 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
19177 fi
19178 else
81ecdfbb 19179 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19180 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19181 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 19182 fi
81ecdfbb
RW
19183 ;;
19184 :L)
19185 #
19186 # CONFIG_LINK
19187 #
c906108c 19188
81ecdfbb
RW
19189 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19190 :
b4e70030 19191 else
81ecdfbb
RW
19192 # Prefer the file from the source tree if names are identical.
19193 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19194 ac_source=$srcdir/$ac_source
19195 fi
b4e70030 19196
81ecdfbb
RW
19197 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19198$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 19199
81ecdfbb 19200 if test ! -r "$ac_source"; then
d0ac1c44 19201 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
19202 fi
19203 rm -f "$ac_file"
bec39cab 19204
81ecdfbb 19205 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 19206 case $ac_source in
81ecdfbb
RW
19207 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19208 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19209 esac
19210 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19211 ln "$ac_source" "$ac_file" 2>/dev/null ||
19212 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 19213 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
19214 fi
19215 ;;
19216 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19217$as_echo "$as_me: executing $ac_file commands" >&6;}
19218 ;;
c906108c 19219 esac
b4e70030 19220
bec39cab 19221
81ecdfbb
RW
19222 case $ac_file$ac_mode in
19223 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 19224 "gcore":F) chmod +x gcore ;;
1e94266c
SM
19225 "Makefile":F)
19226case x$CONFIG_HEADERS in
19227xconfig.h:config.in)
19228echo > stamp-h ;;
19229esac
19230 ;;
19231 "gdb-gdb.gdb":F)
19232case x$CONFIG_HEADERS in
19233xconfig.h:config.in)
19234echo > stamp-h ;;
141ec9f6
SM
19235esac
19236 ;;
19237 "gdb-gdb.py":F)
19238case x$CONFIG_HEADERS in
19239xconfig.h:config.in)
19240echo > stamp-h ;;
1e94266c
SM
19241esac
19242 ;;
19243 "doc/Makefile":F)
19244case x$CONFIG_HEADERS in
19245xconfig.h:config.in)
19246echo > stamp-h ;;
19247esac
19248 ;;
19249 "data-directory/Makefile":F)
c906108c
SS
19250case x$CONFIG_HEADERS in
19251xconfig.h:config.in)
19252echo > stamp-h ;;
19253esac
bec39cab 19254 ;;
81ecdfbb 19255
bec39cab 19256 esac
81ecdfbb 19257done # for ac_tag
c906108c 19258
bec39cab 19259
81ecdfbb 19260as_fn_exit 0
bec39cab 19261_ACEOF
bec39cab
AC
19262ac_clean_files=$ac_clean_files_save
19263
81ecdfbb 19264test $ac_write_fail = 0 ||
d0ac1c44 19265 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 19266
bec39cab
AC
19267
19268# configure is writing to config.log, and then calls config.status.
19269# config.status does its own redirection, appending to config.log.
19270# Unfortunately, on DOS this fails, as config.log is still kept open
19271# by configure, so config.status won't be able to write to it; its
19272# output is simply discarded. So we exec the FD to /dev/null,
19273# effectively closing config.log, so it can be properly (re)opened and
19274# appended to by config.status. When coming back to configure, we
19275# need to make the FD available again.
19276if test "$no_create" != yes; then
19277 ac_cs_success=:
19278 ac_config_status_args=
19279 test "$silent" = yes &&
19280 ac_config_status_args="$ac_config_status_args --quiet"
19281 exec 5>/dev/null
19282 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19283 exec 5>>config.log
19284 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19285 # would make configure fail if this is the last instruction.
d0ac1c44 19286 $ac_cs_success || as_fn_exit 1
bec39cab 19287fi
c906108c 19288
bec39cab 19289#
81ecdfbb 19290# CONFIG_SUBDIRS section.
bec39cab 19291#
c906108c
SS
19292if test "$no_recursion" != yes; then
19293
81ecdfbb
RW
19294 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19295 # so they do not pile up.
c906108c
SS
19296 ac_sub_configure_args=
19297 ac_prev=
fdc59709
PB
19298 eval "set x $ac_configure_args"
19299 shift
19300 for ac_arg
19301 do
c906108c
SS
19302 if test -n "$ac_prev"; then
19303 ac_prev=
19304 continue
19305 fi
bec39cab 19306 case $ac_arg in
c906108c
SS
19307 -cache-file | --cache-file | --cache-fil | --cache-fi \
19308 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19309 ac_prev=cache_file ;;
19310 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19311 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19312 | --c=*)
19313 ;;
19314 --config-cache | -C)
c906108c
SS
19315 ;;
19316 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19317 ac_prev=srcdir ;;
19318 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19319 ;;
bec39cab
AC
19320 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19321 ac_prev=prefix ;;
19322 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19323 ;;
81ecdfbb
RW
19324 --disable-option-checking)
19325 ;;
fdc59709
PB
19326 *)
19327 case $ac_arg in
81ecdfbb 19328 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19329 esac
81ecdfbb 19330 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19331 esac
19332 done
19333
bec39cab
AC
19334 # Always prepend --prefix to ensure using the same prefix
19335 # in subdir configurations.
fdc59709
PB
19336 ac_arg="--prefix=$prefix"
19337 case $ac_arg in
81ecdfbb 19338 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19339 esac
81ecdfbb
RW
19340 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19341
19342 # Pass --silent
19343 if test "$silent" = yes; then
19344 ac_sub_configure_args="--silent $ac_sub_configure_args"
19345 fi
19346
19347 # Always prepend --disable-option-checking to silence warnings, since
19348 # different subdirs can have different --enable and --with options.
19349 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19350
b4e70030 19351 ac_popdir=`pwd`
bec39cab 19352 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19353
19354 # Do not complain, so a configure script can configure whichever
19355 # parts of a large source tree are present.
fdc59709 19356 test -d "$srcdir/$ac_dir" || continue
c906108c 19357
81ecdfbb
RW
19358 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19359 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19360 $as_echo "$ac_msg" >&6
19361 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19362 ac_builddir=.
19363
81ecdfbb
RW
19364case "$ac_dir" in
19365.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19366*)
19367 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19368 # A ".." for each directory in $ac_dir_suffix.
19369 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19370 case $ac_top_builddir_sub in
19371 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19372 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19373 esac ;;
19374esac
19375ac_abs_top_builddir=$ac_pwd
19376ac_abs_builddir=$ac_pwd$ac_dir_suffix
19377# for backward compatibility:
19378ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19379
19380case $srcdir in
81ecdfbb 19381 .) # We are building in place.
bec39cab 19382 ac_srcdir=.
81ecdfbb
RW
19383 ac_top_srcdir=$ac_top_builddir_sub
19384 ac_abs_top_srcdir=$ac_pwd ;;
19385 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19386 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19387 ac_top_srcdir=$srcdir
19388 ac_abs_top_srcdir=$srcdir ;;
19389 *) # Relative name.
19390 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19391 ac_top_srcdir=$ac_top_build_prefix$srcdir
19392 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19393esac
81ecdfbb 19394ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19395
c906108c 19396
fdc59709 19397 cd "$ac_dir"
c906108c
SS
19398
19399 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19400 if test -f "$ac_srcdir/configure.gnu"; then
19401 ac_sub_configure=$ac_srcdir/configure.gnu
19402 elif test -f "$ac_srcdir/configure"; then
19403 ac_sub_configure=$ac_srcdir/configure
19404 elif test -f "$ac_srcdir/configure.in"; then
19405 # This should be Cygnus configure.
19406 ac_sub_configure=$ac_aux_dir/configure
c906108c 19407 else
81ecdfbb
RW
19408 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19409$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19410 ac_sub_configure=
19411 fi
19412
19413 # The recursion is here.
19414 if test -n "$ac_sub_configure"; then
c906108c 19415 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19416 case $cache_file in
19417 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19418 *) # Relative name.
19419 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19420 esac
c906108c 19421
81ecdfbb
RW
19422 { $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
19423$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19424 # The eval makes quoting arguments work.
fdc59709
PB
19425 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19426 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 19427 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19428 fi
19429
fdc59709 19430 cd "$ac_popdir"
c906108c
SS
19431 done
19432fi
81ecdfbb
RW
19433if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19434 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19435$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19436fi
c906108c 19437
This page took 3.427185 seconds and 4 git commands to generate.