Move gdbserver to top level
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 90as_myself=
81ecdfbb
RW
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
81ecdfbb
RW
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 211do
81ecdfbb
RW
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
81ecdfbb
RW
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 266 else
81ecdfbb
RW
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
bec39cab 271 fi
81ecdfbb
RW
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
bec39cab 301
81ecdfbb
RW
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
81ecdfbb
RW
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
81ecdfbb
RW
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
421 as_expr=expr
422else
423 as_expr=false
424fi
425
81ecdfbb 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
427 as_basename=basename
428else
429 as_basename=false
430fi
431
81ecdfbb
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
bec39cab 437
81ecdfbb 438as_me=`$as_basename -- "$0" ||
bec39cab
AC
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
bec39cab 456
b4e70030
JB
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 463
bec39cab 464
81ecdfbb
RW
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
bec39cab 474 sed '
81ecdfbb
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
bec39cab 479 N
81ecdfbb
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 482 t loop
81ecdfbb 483 s/-\n.*//
bec39cab 484 ' >$as_me.lineno &&
81ecdfbb
RW
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab 487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
bec39cab
AC
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
bec39cab
AC
496 # Exit status is that of the last command.
497 exit
498}
499
81ecdfbb
RW
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
bec39cab
AC
511esac
512
81ecdfbb
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
bec39cab 516else
81ecdfbb
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
bec39cab 519fi
81ecdfbb
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 522 as_ln_s='ln -s'
81ecdfbb
RW
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
81ecdfbb 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
81ecdfbb
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
b4e70030 533 fi
bec39cab 534else
d0ac1c44 535 as_ln_s='cp -pR'
bec39cab 536fi
81ecdfbb
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
bec39cab
AC
539
540if mkdir -p . 2>/dev/null; then
81ecdfbb 541 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
bec39cab
AC
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c906108c 559
bec39cab 560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
bec39cab
AC
565#
566# Initializations.
567#
c906108c 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
b4e70030 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab
AC
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
81ecdfbb 622enable_option_checking=no
d0ac1c44 623ac_header_list=
c971b7fa 624ac_subst_vars='LTLIBOBJS
81ecdfbb 625LIBOBJS
b292c783
JK
626GCORE_TRANSFORM_NAME
627GDB_TRANSFORM_NAME
e3487908 628XSLTPROC
a0a461e5 629NM_H
81ecdfbb 630GDB_NM_FILE
ccb1ba62
CB
631LTLIBXXHASH
632LIBXXHASH
633HAVE_LIBXXHASH
393fd4c3
YQ
634LTLIBBABELTRACE
635LIBBABELTRACE
636HAVE_LIBBABELTRACE
21ea5acd
SDJ
637HAVE_NATIVE_GCORE_HOST
638NAT_GENERATED_FILES
639XM_CLIBS
640MH_CFLAGS
641LOADLIBES
642NAT_CDEPS
643NATDEPFILES
644NAT_FILE
81ecdfbb
RW
645target_subdir
646CONFIG_UNINSTALL
647CONFIG_INSTALL
648CONFIG_CLEAN
649CONFIG_ALL
650CONFIG_SRCS
651CONFIG_DEPS
652CONFIG_OBS
653PROFILE_CFLAGS
654ENABLE_CFLAGS
655SIM_OBS
656SIM
657XMKMF
658GDBTK_SRC_DIR
659GDBTK_CFLAGS
660GDBTKLIBS
661X_LIBS
662X_LDFLAGS
663X_CFLAGS
664TK_XINCLUDES
665TK_DEPS
666TK_LIBRARY
667TK_INCLUDE
668TK_STUB_LIB_SPEC
669TK_STUB_LIB_FLAG
670TK_STUB_LIB_FILE
671TK_LIB_SPEC
672TK_LIB_FLAG
673TK_LIB_FILE
674TK_SRC_DIR
675TK_BIN_DIR
676TK_VERSION
677TCL_DEPS
678TCL_LIBRARY
679TCL_INCLUDE
680TCL_STUB_LIB_SPEC
681TCL_STUB_LIB_FLAG
682TCL_STUB_LIB_FILE
683TCL_LIB_SPEC
684TCL_LIB_FLAG
685TCL_LIB_FILE
686TCL_SRC_DIR
687TCL_BIN_DIR
688TCL_PATCH_LEVEL
689TCL_VERSION
690WIN32LDAPP
b2ceabe8 691WIN32LIBS
81ecdfbb
RW
692GUI_CFLAGS_X
693LIBGUI
608e2dbb
TT
694LTLIBLZMA
695LIBLZMA
696HAVE_LIBLZMA
81ecdfbb
RW
697SER_HARDWIRE
698WERROR_CFLAGS
699WARN_CFLAGS
ed2a2229 700SYSTEM_GDBINIT_DIR
81ecdfbb 701SYSTEM_GDBINIT
81ecdfbb
RW
702TARGET_SYSTEM_ROOT
703CONFIG_LDFLAGS
f6528abd 704RDYNAMIC
05ea2a05
TT
705LTLIBIPT
706LIBIPT
707HAVE_LIBIPT
5e030278
TT
708PTHREAD_CFLAGS
709PTHREAD_LIBS
710PTHREAD_CC
711ax_pthread_config
712SED
81ecdfbb 713ALLOCA
62f29fda
TT
714SRCHIGH_CFLAGS
715SRCHIGH_LIBS
4df42755
DE
716HAVE_GUILE_FALSE
717HAVE_GUILE_TRUE
ed3ef339
DE
718GUILE_LIBS
719GUILE_CPPFLAGS
e76c5d17
DE
720GUILD_TARGET_FLAG
721GUILD
ed3ef339 722pkg_config_prog_path
4df42755
DE
723HAVE_PYTHON_FALSE
724HAVE_PYTHON_TRUE
ac534cba
JB
725PYTHON_LIBS
726PYTHON_CPPFLAGS
81ecdfbb 727PYTHON_CFLAGS
ec685c5e 728python_prog_path
2400729e
UW
729LTLIBMPFR
730LIBMPFR
731HAVE_LIBMPFR
81ecdfbb
RW
732LTLIBEXPAT
733LIBEXPAT
734HAVE_LIBEXPAT
b8e0a31c 735JIT_READER_DIR
f997c383 736TARGET_PTR
39037522 737READLINE_TEXI_INCFLAG
81ecdfbb
RW
738READLINE_CFLAGS
739READLINE_DEPS
740READLINE
016a3251
DD
741LTLIBICONV
742LIBICONV
711a72d3
L
743zlibinc
744zlibdir
81ecdfbb
RW
745MIG
746WINDRES
747DLLTOOL
c971b7fa 748AR
81ecdfbb
RW
749YFLAGS
750YACC
c971b7fa 751RANLIB
81ecdfbb 752LN_S
c971b7fa
PA
753INSTALL_DATA
754INSTALL_SCRIPT
755INSTALL_PROGRAM
756AWK
81ecdfbb
RW
757REPORT_BUGS_TEXI
758REPORT_BUGS_TO
759PKGVERSION
44cee4fd 760CODESIGN_CERT
b292c783 761HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
762TARGET_OBS
763subdirs
764GDB_DATADIR
765DEBUGDIR
5048e516
JK
766MAKEINFO_EXTRA_FLAGS
767MAKEINFOFLAGS
768MAKEINFO
81ecdfbb 769PACKAGE
81ecdfbb
RW
770CATOBJEXT
771GENCAT
772INSTOBJEXT
773DATADIRNAME
774CATALOGS
775POSUB
776GMSGFMT
777XGETTEXT
778INCINTL
779LIBINTL_DEP
780LIBINTL
781USE_NLS
81ecdfbb
RW
782CCDEPMODE
783DEPDIR
784am__leading_dot
0bcda685
PA
785CXX_DIALECT
786HAVE_CXX11
4869db5e
RM
787INSTALL_STRIP_PROGRAM
788STRIP
789install_sh
81ecdfbb
RW
790target_os
791target_vendor
792target_cpu
793target
794host_os
795host_vendor
796host_cpu
797host
798build_os
799build_vendor
800build_cpu
801build
c971b7fa
PA
802EGREP
803GREP
804CPP
3bc3d82a
PA
805ac_ct_CXX
806CXXFLAGS
807CXX
81ecdfbb
RW
808OBJEXT
809EXEEXT
810ac_ct_CC
811CPPFLAGS
812LDFLAGS
813CFLAGS
814CC
815MAINT
816MAINTAINER_MODE_FALSE
817MAINTAINER_MODE_TRUE
818target_alias
819host_alias
820build_alias
821LIBS
822ECHO_T
823ECHO_N
824ECHO_C
825DEFS
826mandir
827localedir
828libdir
829psdir
830pdfdir
831dvidir
832htmldir
833infodir
834docdir
835oldincludedir
836includedir
837localstatedir
838sharedstatedir
839sysconfdir
840datadir
841datarootdir
842libexecdir
843sbindir
844bindir
845program_transform_name
846prefix
847exec_prefix
848PACKAGE_URL
849PACKAGE_BUGREPORT
850PACKAGE_STRING
851PACKAGE_VERSION
852PACKAGE_TARNAME
853PACKAGE_NAME
854PATH_SEPARATOR
855SHELL'
2b351b19 856ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
857ac_user_opts='
858enable_option_checking
859enable_maintainer_mode
da2f07f1
JK
860enable_plugins
861enable_largefile
81ecdfbb
RW
862with_separate_debug_dir
863with_gdb_datadir
864with_relocated_sources
7349ff92 865with_auto_load_dir
bccbefd2 866with_auto_load_safe_path
81ecdfbb
RW
867enable_targets
868enable_64_bit_bfd
81ecdfbb
RW
869enable_gdbmi
870enable_tui
871enable_gdbtk
05e7c244 872with_libunwind_ia64
81ecdfbb
RW
873with_curses
874enable_profiling
44cee4fd 875enable_codesign
81ecdfbb
RW
876with_pkgversion
877with_bugurl
711a72d3 878with_system_zlib
016a3251
DD
879with_gnu_ld
880enable_rpath
81ecdfbb 881with_libiconv_prefix
478aac75 882with_iconv_bin
81ecdfbb 883with_system_readline
b8e0a31c 884with_jit_reader_dir
81ecdfbb 885with_expat
81ecdfbb 886with_libexpat_prefix
2400729e
UW
887with_mpfr
888with_libmpfr_prefix
81ecdfbb 889with_python
ed3ef339 890with_guile
189b8c2e 891enable_source_highlight
58bfce93
MM
892with_intel_pt
893with_libipt_prefix
81ecdfbb
RW
894with_included_regex
895with_sysroot
896with_system_gdbinit
ed2a2229 897with_system_gdbinit_dir
81ecdfbb
RW
898enable_werror
899enable_build_warnings
900enable_gdb_build_warnings
f35d5ade 901enable_ubsan
608e2dbb
TT
902with_lzma
903with_liblzma_prefix
81ecdfbb
RW
904with_tcl
905with_tk
906with_x
907enable_sim
393fd4c3
YQ
908with_babeltrace
909with_libbabeltrace_prefix
ccb1ba62
CB
910with_xxhash
911with_libxxhash_prefix
8ecfd7bd 912enable_unit_tests
81ecdfbb
RW
913'
914 ac_precious_vars='build_alias
915host_alias
916target_alias
917CC
918CFLAGS
919LDFLAGS
920LIBS
921CPPFLAGS
3bc3d82a
PA
922CXX
923CXXFLAGS
924CCC
81ecdfbb 925CPP
f06e05e0
JK
926MAKEINFO
927MAKEINFOFLAGS
81ecdfbb
RW
928YACC
929YFLAGS
930XMKMF'
5ae98d25 931ac_subdirs_all='testsuite
919adfe8 932gdbtk'
c906108c
SS
933
934# Initialize some variables set by options.
bec39cab
AC
935ac_init_help=
936ac_init_version=false
81ecdfbb
RW
937ac_unrecognized_opts=
938ac_unrecognized_sep=
c906108c
SS
939# The variables have the same names as the options, with
940# dashes changed to underlines.
bec39cab 941cache_file=/dev/null
c906108c 942exec_prefix=NONE
c906108c 943no_create=
c906108c
SS
944no_recursion=
945prefix=NONE
946program_prefix=NONE
947program_suffix=NONE
948program_transform_name=s,x,x,
949silent=
950site=
951srcdir=
c906108c
SS
952verbose=
953x_includes=NONE
954x_libraries=NONE
bec39cab
AC
955
956# Installation directory options.
957# These are left unexpanded so users can "make install exec_prefix=/foo"
958# and all the variables that are supposed to be based on exec_prefix
959# by default will actually change.
960# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 961# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
962bindir='${exec_prefix}/bin'
963sbindir='${exec_prefix}/sbin'
964libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
965datarootdir='${prefix}/share'
966datadir='${datarootdir}'
c906108c
SS
967sysconfdir='${prefix}/etc'
968sharedstatedir='${prefix}/com'
969localstatedir='${prefix}/var'
c906108c
SS
970includedir='${prefix}/include'
971oldincludedir='/usr/include'
81ecdfbb
RW
972docdir='${datarootdir}/doc/${PACKAGE}'
973infodir='${datarootdir}/info'
974htmldir='${docdir}'
975dvidir='${docdir}'
976pdfdir='${docdir}'
977psdir='${docdir}'
978libdir='${exec_prefix}/lib'
979localedir='${datarootdir}/locale'
980mandir='${datarootdir}/man'
c906108c 981
c906108c 982ac_prev=
81ecdfbb 983ac_dashdash=
c906108c
SS
984for ac_option
985do
c906108c
SS
986 # If the previous option needs an argument, assign it.
987 if test -n "$ac_prev"; then
81ecdfbb 988 eval $ac_prev=\$ac_option
c906108c
SS
989 ac_prev=
990 continue
991 fi
992
81ecdfbb 993 case $ac_option in
d0ac1c44
SM
994 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
995 *=) ac_optarg= ;;
996 *) ac_optarg=yes ;;
81ecdfbb 997 esac
c906108c
SS
998
999 # Accept the important Cygnus configure options, so we can diagnose typos.
1000
81ecdfbb
RW
1001 case $ac_dashdash$ac_option in
1002 --)
1003 ac_dashdash=yes ;;
c906108c
SS
1004
1005 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1006 ac_prev=bindir ;;
1007 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1008 bindir=$ac_optarg ;;
c906108c
SS
1009
1010 -build | --build | --buil | --bui | --bu)
bec39cab 1011 ac_prev=build_alias ;;
c906108c 1012 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1013 build_alias=$ac_optarg ;;
c906108c
SS
1014
1015 -cache-file | --cache-file | --cache-fil | --cache-fi \
1016 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1017 ac_prev=cache_file ;;
1018 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1019 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1020 cache_file=$ac_optarg ;;
1021
1022 --config-cache | -C)
1023 cache_file=config.cache ;;
c906108c 1024
81ecdfbb 1025 -datadir | --datadir | --datadi | --datad)
c906108c 1026 ac_prev=datadir ;;
81ecdfbb 1027 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1028 datadir=$ac_optarg ;;
c906108c 1029
81ecdfbb
RW
1030 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1031 | --dataroo | --dataro | --datar)
1032 ac_prev=datarootdir ;;
1033 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1034 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1035 datarootdir=$ac_optarg ;;
1036
c906108c 1037 -disable-* | --disable-*)
81ecdfbb 1038 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1039 # Reject names that are not valid shell variable names.
81ecdfbb 1040 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1041 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1042 ac_useropt_orig=$ac_useropt
1043 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1044 case $ac_user_opts in
1045 *"
1046"enable_$ac_useropt"
1047"*) ;;
1048 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1049 ac_unrecognized_sep=', ';;
1050 esac
1051 eval enable_$ac_useropt=no ;;
1052
1053 -docdir | --docdir | --docdi | --doc | --do)
1054 ac_prev=docdir ;;
1055 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1056 docdir=$ac_optarg ;;
1057
1058 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1059 ac_prev=dvidir ;;
1060 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1061 dvidir=$ac_optarg ;;
c906108c
SS
1062
1063 -enable-* | --enable-*)
81ecdfbb 1064 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1065 # Reject names that are not valid shell variable names.
81ecdfbb 1066 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1067 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1068 ac_useropt_orig=$ac_useropt
1069 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1070 case $ac_user_opts in
1071 *"
1072"enable_$ac_useropt"
1073"*) ;;
1074 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1075 ac_unrecognized_sep=', ';;
b4e70030 1076 esac
81ecdfbb 1077 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1078
1079 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1080 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1081 | --exec | --exe | --ex)
1082 ac_prev=exec_prefix ;;
1083 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1084 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1085 | --exec=* | --exe=* | --ex=*)
bec39cab 1086 exec_prefix=$ac_optarg ;;
c906108c
SS
1087
1088 -gas | --gas | --ga | --g)
1089 # Obsolete; use --with-gas.
1090 with_gas=yes ;;
1091
bec39cab
AC
1092 -help | --help | --hel | --he | -h)
1093 ac_init_help=long ;;
1094 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1095 ac_init_help=recursive ;;
1096 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1097 ac_init_help=short ;;
c906108c
SS
1098
1099 -host | --host | --hos | --ho)
bec39cab 1100 ac_prev=host_alias ;;
c906108c 1101 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1102 host_alias=$ac_optarg ;;
c906108c 1103
81ecdfbb
RW
1104 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1105 ac_prev=htmldir ;;
1106 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1107 | --ht=*)
1108 htmldir=$ac_optarg ;;
1109
c906108c
SS
1110 -includedir | --includedir | --includedi | --included | --include \
1111 | --includ | --inclu | --incl | --inc)
1112 ac_prev=includedir ;;
1113 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1114 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1115 includedir=$ac_optarg ;;
c906108c
SS
1116
1117 -infodir | --infodir | --infodi | --infod | --info | --inf)
1118 ac_prev=infodir ;;
1119 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1120 infodir=$ac_optarg ;;
c906108c
SS
1121
1122 -libdir | --libdir | --libdi | --libd)
1123 ac_prev=libdir ;;
1124 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1125 libdir=$ac_optarg ;;
c906108c
SS
1126
1127 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1128 | --libexe | --libex | --libe)
1129 ac_prev=libexecdir ;;
1130 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1131 | --libexe=* | --libex=* | --libe=*)
bec39cab 1132 libexecdir=$ac_optarg ;;
c906108c 1133
81ecdfbb
RW
1134 -localedir | --localedir | --localedi | --localed | --locale)
1135 ac_prev=localedir ;;
1136 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1137 localedir=$ac_optarg ;;
1138
c906108c 1139 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1140 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1141 ac_prev=localstatedir ;;
1142 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1143 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1144 localstatedir=$ac_optarg ;;
c906108c
SS
1145
1146 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1147 ac_prev=mandir ;;
1148 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1149 mandir=$ac_optarg ;;
c906108c
SS
1150
1151 -nfp | --nfp | --nf)
1152 # Obsolete; use --without-fp.
1153 with_fp=no ;;
1154
1155 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1156 | --no-cr | --no-c | -n)
c906108c
SS
1157 no_create=yes ;;
1158
1159 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1160 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1161 no_recursion=yes ;;
1162
1163 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1164 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1165 | --oldin | --oldi | --old | --ol | --o)
1166 ac_prev=oldincludedir ;;
1167 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1168 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1169 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1170 oldincludedir=$ac_optarg ;;
c906108c
SS
1171
1172 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1173 ac_prev=prefix ;;
1174 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1175 prefix=$ac_optarg ;;
c906108c
SS
1176
1177 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1178 | --program-pre | --program-pr | --program-p)
1179 ac_prev=program_prefix ;;
1180 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1181 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1182 program_prefix=$ac_optarg ;;
c906108c
SS
1183
1184 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1185 | --program-suf | --program-su | --program-s)
1186 ac_prev=program_suffix ;;
1187 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1188 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1189 program_suffix=$ac_optarg ;;
c906108c
SS
1190
1191 -program-transform-name | --program-transform-name \
1192 | --program-transform-nam | --program-transform-na \
1193 | --program-transform-n | --program-transform- \
1194 | --program-transform | --program-transfor \
1195 | --program-transfo | --program-transf \
1196 | --program-trans | --program-tran \
1197 | --progr-tra | --program-tr | --program-t)
1198 ac_prev=program_transform_name ;;
1199 -program-transform-name=* | --program-transform-name=* \
1200 | --program-transform-nam=* | --program-transform-na=* \
1201 | --program-transform-n=* | --program-transform-=* \
1202 | --program-transform=* | --program-transfor=* \
1203 | --program-transfo=* | --program-transf=* \
1204 | --program-trans=* | --program-tran=* \
1205 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1206 program_transform_name=$ac_optarg ;;
c906108c 1207
81ecdfbb
RW
1208 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1209 ac_prev=pdfdir ;;
1210 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1211 pdfdir=$ac_optarg ;;
1212
1213 -psdir | --psdir | --psdi | --psd | --ps)
1214 ac_prev=psdir ;;
1215 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1216 psdir=$ac_optarg ;;
1217
c906108c
SS
1218 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1219 | -silent | --silent | --silen | --sile | --sil)
1220 silent=yes ;;
1221
1222 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1223 ac_prev=sbindir ;;
1224 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1225 | --sbi=* | --sb=*)
bec39cab 1226 sbindir=$ac_optarg ;;
c906108c
SS
1227
1228 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1229 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1230 | --sharedst | --shareds | --shared | --share | --shar \
1231 | --sha | --sh)
1232 ac_prev=sharedstatedir ;;
1233 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1234 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1235 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1236 | --sha=* | --sh=*)
bec39cab 1237 sharedstatedir=$ac_optarg ;;
c906108c
SS
1238
1239 -site | --site | --sit)
1240 ac_prev=site ;;
1241 -site=* | --site=* | --sit=*)
bec39cab 1242 site=$ac_optarg ;;
3ace7edb 1243
c906108c
SS
1244 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1245 ac_prev=srcdir ;;
1246 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1247 srcdir=$ac_optarg ;;
c906108c
SS
1248
1249 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1250 | --syscon | --sysco | --sysc | --sys | --sy)
1251 ac_prev=sysconfdir ;;
1252 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1253 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1254 sysconfdir=$ac_optarg ;;
c906108c
SS
1255
1256 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1257 ac_prev=target_alias ;;
c906108c 1258 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1259 target_alias=$ac_optarg ;;
c906108c
SS
1260
1261 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1262 verbose=yes ;;
1263
bec39cab
AC
1264 -version | --version | --versio | --versi | --vers | -V)
1265 ac_init_version=: ;;
c906108c
SS
1266
1267 -with-* | --with-*)
81ecdfbb 1268 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1269 # Reject names that are not valid shell variable names.
81ecdfbb 1270 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1271 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1272 ac_useropt_orig=$ac_useropt
1273 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1274 case $ac_user_opts in
1275 *"
1276"with_$ac_useropt"
1277"*) ;;
1278 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1279 ac_unrecognized_sep=', ';;
b4e70030 1280 esac
81ecdfbb 1281 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1282
1283 -without-* | --without-*)
81ecdfbb 1284 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1285 # Reject names that are not valid shell variable names.
81ecdfbb 1286 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1287 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1288 ac_useropt_orig=$ac_useropt
1289 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1290 case $ac_user_opts in
1291 *"
1292"with_$ac_useropt"
1293"*) ;;
1294 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1295 ac_unrecognized_sep=', ';;
1296 esac
1297 eval with_$ac_useropt=no ;;
c906108c
SS
1298
1299 --x)
1300 # Obsolete; use --with-x.
1301 with_x=yes ;;
1302
1303 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1304 | --x-incl | --x-inc | --x-in | --x-i)
1305 ac_prev=x_includes ;;
1306 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1307 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1308 x_includes=$ac_optarg ;;
c906108c
SS
1309
1310 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1311 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1312 ac_prev=x_libraries ;;
1313 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1314 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1315 x_libraries=$ac_optarg ;;
c906108c 1316
d0ac1c44
SM
1317 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1318Try \`$0 --help' for more information"
c906108c
SS
1319 ;;
1320
bec39cab
AC
1321 *=*)
1322 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1323 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1324 case $ac_envvar in #(
1325 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1326 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1327 esac
1328 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1329 export $ac_envvar ;;
1330
c906108c 1331 *)
bec39cab 1332 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1333 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1334 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1335 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1336 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1337 ;;
1338
1339 esac
1340done
1341
1342if test -n "$ac_prev"; then
bec39cab 1343 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1344 as_fn_error $? "missing argument to $ac_option"
c906108c 1345fi
c906108c 1346
81ecdfbb
RW
1347if test -n "$ac_unrecognized_opts"; then
1348 case $enable_option_checking in
1349 no) ;;
d0ac1c44 1350 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1351 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1352 esac
81ecdfbb 1353fi
b4e70030 1354
81ecdfbb
RW
1355# Check all directory arguments for consistency.
1356for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1357 datadir sysconfdir sharedstatedir localstatedir includedir \
1358 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1359 libdir localedir mandir
b4e70030 1360do
81ecdfbb
RW
1361 eval ac_val=\$$ac_var
1362 # Remove trailing slashes.
1363 case $ac_val in
1364 */ )
1365 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1366 eval $ac_var=\$ac_val;;
1367 esac
1368 # Be sure to have absolute directory names.
b4e70030 1369 case $ac_val in
81ecdfbb
RW
1370 [\\/$]* | ?:[\\/]* ) continue;;
1371 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1372 esac
d0ac1c44 1373 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1374done
1375
bec39cab
AC
1376# There might be people who depend on the old broken behavior: `$host'
1377# used to hold the argument of --host etc.
1378# FIXME: To remove some day.
1379build=$build_alias
1380host=$host_alias
1381target=$target_alias
1382
1383# FIXME: To remove some day.
1384if test "x$host_alias" != x; then
1385 if test "x$build_alias" = x; then
1386 cross_compiling=maybe
bec39cab
AC
1387 elif test "x$build_alias" != "x$host_alias"; then
1388 cross_compiling=yes
1389 fi
1390fi
c906108c 1391
bec39cab
AC
1392ac_tool_prefix=
1393test -n "$host_alias" && ac_tool_prefix=$host_alias-
1394
1395test "$silent" = yes && exec 6>/dev/null
c906108c 1396
c906108c 1397
81ecdfbb
RW
1398ac_pwd=`pwd` && test -n "$ac_pwd" &&
1399ac_ls_di=`ls -di .` &&
1400ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1401 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1402test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1403 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1404
1405
c906108c
SS
1406# Find the source files, if location was not specified.
1407if test -z "$srcdir"; then
1408 ac_srcdir_defaulted=yes
81ecdfbb
RW
1409 # Try the directory containing this script, then the parent directory.
1410 ac_confdir=`$as_dirname -- "$as_myself" ||
1411$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1412 X"$as_myself" : 'X\(//\)[^/]' \| \
1413 X"$as_myself" : 'X\(//\)$' \| \
1414 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1415$as_echo X"$as_myself" |
1416 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1417 s//\1/
1418 q
1419 }
1420 /^X\(\/\/\)[^/].*/{
1421 s//\1/
1422 q
1423 }
1424 /^X\(\/\/\)$/{
1425 s//\1/
1426 q
1427 }
1428 /^X\(\/\).*/{
1429 s//\1/
1430 q
1431 }
1432 s/.*/./; q'`
c906108c 1433 srcdir=$ac_confdir
81ecdfbb 1434 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1435 srcdir=..
1436 fi
1437else
1438 ac_srcdir_defaulted=no
1439fi
81ecdfbb
RW
1440if test ! -r "$srcdir/$ac_unique_file"; then
1441 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1442 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1443fi
1444ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1445ac_abs_confdir=`(
d0ac1c44 1446 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1447 pwd)`
1448# When building in place, set srcdir=.
1449if test "$ac_abs_confdir" = "$ac_pwd"; then
1450 srcdir=.
1451fi
1452# Remove unnecessary trailing slashes from srcdir.
1453# Double slashes in file names in object file debugging info
1454# mess up M-x gdb in Emacs.
1455case $srcdir in
1456*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1457esac
1458for ac_var in $ac_precious_vars; do
1459 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1460 eval ac_env_${ac_var}_value=\$${ac_var}
1461 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1462 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1463done
c906108c 1464
bec39cab
AC
1465#
1466# Report the --help message.
1467#
1468if test "$ac_init_help" = "long"; then
1469 # Omit some internal or obsolete options to make the list less imposing.
1470 # This message is too long to be a string in the A/UX 3.1 sh.
1471 cat <<_ACEOF
1472\`configure' configures this package to adapt to many kinds of systems.
1473
1474Usage: $0 [OPTION]... [VAR=VALUE]...
1475
1476To assign environment variables (e.g., CC, CFLAGS...), specify them as
1477VAR=VALUE. See below for descriptions of some of the useful variables.
1478
1479Defaults for the options are specified in brackets.
1480
1481Configuration:
1482 -h, --help display this help and exit
1483 --help=short display options specific to this package
1484 --help=recursive display the short help of all the included packages
1485 -V, --version display version information and exit
d0ac1c44 1486 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1487 --cache-file=FILE cache test results in FILE [disabled]
1488 -C, --config-cache alias for \`--cache-file=config.cache'
1489 -n, --no-create do not create output files
1490 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1491
bec39cab
AC
1492Installation directories:
1493 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1494 [$ac_default_prefix]
bec39cab 1495 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1496 [PREFIX]
bec39cab
AC
1497
1498By default, \`make install' will install all the files in
1499\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1500an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1501for instance \`--prefix=\$HOME'.
1502
1503For better control, use the options below.
1504
1505Fine tuning of the installation directories:
81ecdfbb
RW
1506 --bindir=DIR user executables [EPREFIX/bin]
1507 --sbindir=DIR system admin executables [EPREFIX/sbin]
1508 --libexecdir=DIR program executables [EPREFIX/libexec]
1509 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1510 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1511 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1512 --libdir=DIR object code libraries [EPREFIX/lib]
1513 --includedir=DIR C header files [PREFIX/include]
1514 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1515 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1516 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1517 --infodir=DIR info documentation [DATAROOTDIR/info]
1518 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1519 --mandir=DIR man documentation [DATAROOTDIR/man]
1520 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1521 --htmldir=DIR html documentation [DOCDIR]
1522 --dvidir=DIR dvi documentation [DOCDIR]
1523 --pdfdir=DIR pdf documentation [DOCDIR]
1524 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1525_ACEOF
1526
1527 cat <<\_ACEOF
1528
9009e1ae
MR
1529Program names:
1530 --program-prefix=PREFIX prepend PREFIX to installed program names
1531 --program-suffix=SUFFIX append SUFFIX to installed program names
1532 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1533
bec39cab
AC
1534X features:
1535 --x-includes=DIR X include files are in DIR
1536 --x-libraries=DIR X library files are in DIR
1537
1538System types:
1539 --build=BUILD configure for building on BUILD [guessed]
1540 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1541 --target=TARGET configure for building compilers for TARGET [HOST]
1542_ACEOF
1543fi
1544
1545if test -n "$ac_init_help"; then
1546
1547 cat <<\_ACEOF
1548
1549Optional Features:
81ecdfbb 1550 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1551 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1552 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1553 --enable-maintainer-mode
1554 enable make rules and dependencies not useful (and
1555 sometimes confusing) to the casual installer
2974be62 1556 --enable-plugins Enable support for plugins
da2f07f1 1557 --disable-largefile omit support for large files
a1220294
TT
1558 --enable-targets=TARGETS
1559 alternative target configurations
c0993dbe 1560 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1561 --disable-gdbmi disable machine-interface (MI)
1562 --enable-tui enable full-screen terminal user interface (TUI)
1563 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1564 --enable-profiling enable profiling of GDB
44cee4fd 1565 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1566 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1567 --enable-source-highlight
1568 enable source-highlight for source listings
a1220294 1569 --enable-werror treat compile warnings as errors
32c1c914 1570 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1571 --enable-gdb-build-warnings
32c1c914 1572 enable GDB specific build-time compiler warnings if
a1220294 1573 gcc is used
f35d5ade 1574 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1575 --enable-sim link gdb with simulator
8ecfd7bd
SDJ
1576 --enable-unit-tests Enable the inclusion of unit tests when compiling
1577 GDB
bec39cab
AC
1578
1579Optional Packages:
1580 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1581 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1582 --with-separate-debug-dir=PATH
32c1c914 1583 look for global separate debug info in this path
62e4f60c 1584 [LIBDIR/debug]
b14b1491
TT
1585 --with-gdb-datadir=PATH look for global separate data files in this path
1586 [DATADIR/gdb]
29b0e8a2 1587 --with-relocated-sources=PATH
32c1c914 1588 automatically relocate this path for source files
7349ff92 1589 --with-auto-load-dir=PATH
aff139ff 1590 directories from which to load auto-loaded scripts
1564a261 1591 [$debugdir:$datadir/auto-load]
bccbefd2 1592 --with-auto-load-safe-path=PATH
aff139ff 1593 directories safe to hold auto-loaded files
7349ff92 1594 [--with-auto-load-dir]
bccbefd2
JK
1595 --without-auto-load-safe-path
1596 do not restrict auto-loaded files locations
05e7c244 1597 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1598 --with-curses use the curses library instead of the termcap
1599 library
c16158bc
JM
1600 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1601 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1602 --with-system-zlib use installed libz
016a3251
DD
1603 --with-gnu-ld assume the C compiler uses GNU ld default=no
1604 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1605 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1606 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1607 --with-system-readline use installed readline library
b8e0a31c
SD
1608 --with-jit-reader-dir=PATH
1609 directory to load the JIT readers from
5c39566f 1610 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1611 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1612 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1613 --with-mpfr include MPFR support (auto/yes/no)
1614 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1615 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1616 --with-python[=PYTHON] include python support
1617 (auto/yes/no/<python-program>)
ed3ef339
DE
1618 --with-guile[=GUILE] include guile support
1619 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1620 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1621 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1622 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1623 --without-included-regex
1624 don't use included regex; this is the default on
1625 systems with version 2 of the GNU C library (use
1626 with caution on other system)
81ecdfbb 1627 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1628 --with-system-gdbinit=PATH
32c1c914 1629 automatically load a system-wide gdbinit file
ed2a2229
CB
1630 --with-system-gdbinit-dir=PATH
1631 automatically load system-wide gdbinit files from
1632 this directory
608e2dbb
TT
1633 --with-lzma support lzma compression (auto/yes/no)
1634 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1635 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1636 --with-tcl directory containing tcl configuration (tclConfig.sh)
1637 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1638 --with-x use the X Window System
393fd4c3
YQ
1639 --with-babeltrace include babeltrace support (auto/yes/no)
1640 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1641 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
ccb1ba62
CB
1642 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1643 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1644 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
bec39cab
AC
1645
1646Some influential environment variables:
1647 CC C compiler command
1648 CFLAGS C compiler flags
1649 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1650 nonstandard directory <lib dir>
81ecdfbb 1651 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1652 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1653 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1654 CXX C++ compiler command
1655 CXXFLAGS C++ compiler flags
bec39cab 1656 CPP C preprocessor
f06e05e0
JK
1657 MAKEINFO Parent configure detects if it is of sufficient version.
1658 MAKEINFOFLAGS
1659 Parameters for MAKEINFO.
d0ac1c44
SM
1660 YACC The `Yet Another Compiler Compiler' implementation to use.
1661 Defaults to the first program found out of: `bison -y', `byacc',
1662 `yacc'.
81ecdfbb
RW
1663 YFLAGS The list of arguments that will be passed by default to $YACC.
1664 This script will default YFLAGS to the empty string to avoid a
1665 default value of `-d' given by some make applications.
1666 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1667
1668Use these variables to override the choices made by `configure' or to help
1669it to find libraries and programs with nonstandard names/locations.
1670
81ecdfbb 1671Report bugs to the package provider.
bec39cab 1672_ACEOF
81ecdfbb 1673ac_status=$?
bec39cab
AC
1674fi
1675
1676if test "$ac_init_help" = "recursive"; then
1677 # If there are subdirs, report their specific --help.
bec39cab 1678 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1679 test -d "$ac_dir" ||
1680 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1681 continue
bec39cab
AC
1682 ac_builddir=.
1683
81ecdfbb
RW
1684case "$ac_dir" in
1685.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1686*)
1687 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1688 # A ".." for each directory in $ac_dir_suffix.
1689 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1690 case $ac_top_builddir_sub in
1691 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1692 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1693 esac ;;
1694esac
1695ac_abs_top_builddir=$ac_pwd
1696ac_abs_builddir=$ac_pwd$ac_dir_suffix
1697# for backward compatibility:
1698ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1699
1700case $srcdir in
81ecdfbb 1701 .) # We are building in place.
bec39cab 1702 ac_srcdir=.
81ecdfbb
RW
1703 ac_top_srcdir=$ac_top_builddir_sub
1704 ac_abs_top_srcdir=$ac_pwd ;;
1705 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1706 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1707 ac_top_srcdir=$srcdir
1708 ac_abs_top_srcdir=$srcdir ;;
1709 *) # Relative name.
1710 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1711 ac_top_srcdir=$ac_top_build_prefix$srcdir
1712 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1713esac
81ecdfbb 1714ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1715
81ecdfbb
RW
1716 cd "$ac_dir" || { ac_status=$?; continue; }
1717 # Check for guested configure.
1718 if test -f "$ac_srcdir/configure.gnu"; then
1719 echo &&
1720 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1721 elif test -f "$ac_srcdir/configure"; then
1722 echo &&
1723 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1724 else
81ecdfbb
RW
1725 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1726 fi || ac_status=$?
1727 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1728 done
1729fi
1730
81ecdfbb 1731test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1732if $ac_init_version; then
1733 cat <<\_ACEOF
81ecdfbb 1734configure
d0ac1c44 1735generated by GNU Autoconf 2.69
bec39cab 1736
d0ac1c44 1737Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1738This configure script is free software; the Free Software Foundation
1739gives unlimited permission to copy, distribute and modify it.
1740_ACEOF
81ecdfbb 1741 exit
bec39cab 1742fi
bec39cab 1743
81ecdfbb
RW
1744## ------------------------ ##
1745## Autoconf initialization. ##
1746## ------------------------ ##
bec39cab 1747
81ecdfbb
RW
1748# ac_fn_c_try_compile LINENO
1749# --------------------------
1750# Try to compile conftest.$ac_ext, and return whether this succeeded.
1751ac_fn_c_try_compile ()
1752{
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 rm -f conftest.$ac_objext
1755 if { { ac_try="$ac_compile"
1756case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759esac
1760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761$as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_compile") 2>conftest.err
1763 ac_status=$?
1764 if test -s conftest.err; then
1765 grep -v '^ *+' conftest.err >conftest.er1
1766 cat conftest.er1 >&5
1767 mv -f conftest.er1 conftest.err
1768 fi
1769 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1770 test $ac_status = 0; } && {
1771 test -z "$ac_c_werror_flag" ||
1772 test ! -s conftest.err
1773 } && test -s conftest.$ac_objext; then :
1774 ac_retval=0
1775else
1776 $as_echo "$as_me: failed program was:" >&5
1777sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1778
81ecdfbb
RW
1779 ac_retval=1
1780fi
d0ac1c44
SM
1781 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1782 as_fn_set_status $ac_retval
81ecdfbb
RW
1783
1784} # ac_fn_c_try_compile
1785
3bc3d82a
PA
1786# ac_fn_cxx_try_compile LINENO
1787# ----------------------------
1788# Try to compile conftest.$ac_ext, and return whether this succeeded.
1789ac_fn_cxx_try_compile ()
1790{
1791 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1792 rm -f conftest.$ac_objext
1793 if { { ac_try="$ac_compile"
1794case "(($ac_try" in
1795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1796 *) ac_try_echo=$ac_try;;
1797esac
1798eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1799$as_echo "$ac_try_echo"; } >&5
1800 (eval "$ac_compile") 2>conftest.err
1801 ac_status=$?
1802 if test -s conftest.err; then
1803 grep -v '^ *+' conftest.err >conftest.er1
1804 cat conftest.er1 >&5
1805 mv -f conftest.er1 conftest.err
1806 fi
1807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1808 test $ac_status = 0; } && {
1809 test -z "$ac_cxx_werror_flag" ||
1810 test ! -s conftest.err
1811 } && test -s conftest.$ac_objext; then :
1812 ac_retval=0
1813else
1814 $as_echo "$as_me: failed program was:" >&5
1815sed 's/^/| /' conftest.$ac_ext >&5
1816
1817 ac_retval=1
1818fi
d0ac1c44
SM
1819 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1820 as_fn_set_status $ac_retval
3bc3d82a
PA
1821
1822} # ac_fn_cxx_try_compile
1823
81ecdfbb
RW
1824# ac_fn_c_try_cpp LINENO
1825# ----------------------
1826# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1827ac_fn_c_try_cpp ()
bec39cab 1828{
81ecdfbb
RW
1829 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1830 if { { ac_try="$ac_cpp conftest.$ac_ext"
1831case "(($ac_try" in
1832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1833 *) ac_try_echo=$ac_try;;
1834esac
1835eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1836$as_echo "$ac_try_echo"; } >&5
1837 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1838 ac_status=$?
1839 if test -s conftest.err; then
1840 grep -v '^ *+' conftest.err >conftest.er1
1841 cat conftest.er1 >&5
1842 mv -f conftest.er1 conftest.err
1843 fi
1844 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1845 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1846 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1847 test ! -s conftest.err
1848 }; then :
1849 ac_retval=0
1850else
1851 $as_echo "$as_me: failed program was:" >&5
1852sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1853
81ecdfbb
RW
1854 ac_retval=1
1855fi
d0ac1c44
SM
1856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1857 as_fn_set_status $ac_retval
bec39cab 1858
81ecdfbb 1859} # ac_fn_c_try_cpp
bec39cab 1860
81ecdfbb
RW
1861# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1862# -------------------------------------------------------
1863# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1864# the include files in INCLUDES and setting the cache variable VAR
1865# accordingly.
1866ac_fn_c_check_header_mongrel ()
1867{
1868 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1869 if eval \${$3+:} false; then :
81ecdfbb
RW
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1871$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1872if eval \${$3+:} false; then :
81ecdfbb
RW
1873 $as_echo_n "(cached) " >&6
1874fi
1875eval ac_res=\$$3
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1877$as_echo "$ac_res" >&6; }
1878else
1879 # Is the header compilable?
1880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1881$as_echo_n "checking $2 usability... " >&6; }
1882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883/* end confdefs.h. */
1884$4
1885#include <$2>
1886_ACEOF
1887if ac_fn_c_try_compile "$LINENO"; then :
1888 ac_header_compiler=yes
1889else
1890 ac_header_compiler=no
1891fi
1892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1894$as_echo "$ac_header_compiler" >&6; }
bec39cab 1895
81ecdfbb
RW
1896# Is the header present?
1897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1898$as_echo_n "checking $2 presence... " >&6; }
1899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900/* end confdefs.h. */
1901#include <$2>
1902_ACEOF
1903if ac_fn_c_try_cpp "$LINENO"; then :
1904 ac_header_preproc=yes
1905else
1906 ac_header_preproc=no
1907fi
d0ac1c44 1908rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1910$as_echo "$ac_header_preproc" >&6; }
bec39cab 1911
81ecdfbb
RW
1912# So? What about this header?
1913case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1914 yes:no: )
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1916$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1918$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1919 ;;
1920 no:yes:* )
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1922$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1924$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1926$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1928$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1930$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1931 ;;
1932esac
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1935if eval \${$3+:} false; then :
81ecdfbb
RW
1936 $as_echo_n "(cached) " >&6
1937else
1938 eval "$3=\$ac_header_compiler"
1939fi
1940eval ac_res=\$$3
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942$as_echo "$ac_res" >&6; }
1943fi
d0ac1c44 1944 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1945
81ecdfbb 1946} # ac_fn_c_check_header_mongrel
bec39cab 1947
81ecdfbb
RW
1948# ac_fn_c_try_run LINENO
1949# ----------------------
1950# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1951# that executables *can* be run.
1952ac_fn_c_try_run ()
1953{
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 if { { ac_try="$ac_link"
1956case "(($ac_try" in
1957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1958 *) ac_try_echo=$ac_try;;
1959esac
1960eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1961$as_echo "$ac_try_echo"; } >&5
1962 (eval "$ac_link") 2>&5
1963 ac_status=$?
1964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1965 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1966 { { case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969esac
1970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971$as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_try") 2>&5
1973 ac_status=$?
1974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975 test $ac_status = 0; }; }; then :
1976 ac_retval=0
1977else
1978 $as_echo "$as_me: program exited with status $ac_status" >&5
1979 $as_echo "$as_me: failed program was:" >&5
1980sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1981
81ecdfbb
RW
1982 ac_retval=$ac_status
1983fi
1984 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1985 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1986 as_fn_set_status $ac_retval
bec39cab 1987
81ecdfbb 1988} # ac_fn_c_try_run
bec39cab 1989
81ecdfbb
RW
1990# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1991# -------------------------------------------------------
1992# Tests whether HEADER exists and can be compiled using the include files in
1993# INCLUDES, setting the cache variable VAR accordingly.
1994ac_fn_c_check_header_compile ()
1995{
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1998$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1999if eval \${$3+:} false; then :
81ecdfbb
RW
2000 $as_echo_n "(cached) " >&6
2001else
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h. */
2004$4
2005#include <$2>
bec39cab 2006_ACEOF
81ecdfbb
RW
2007if ac_fn_c_try_compile "$LINENO"; then :
2008 eval "$3=yes"
2009else
2010 eval "$3=no"
2011fi
2012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2013fi
2014eval ac_res=\$$3
2015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2016$as_echo "$ac_res" >&6; }
d0ac1c44 2017 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2018
81ecdfbb 2019} # ac_fn_c_check_header_compile
bec39cab 2020
2974be62
AM
2021# ac_fn_c_try_link LINENO
2022# -----------------------
2023# Try to link conftest.$ac_ext, and return whether this succeeded.
2024ac_fn_c_try_link ()
2025{
2026 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 rm -f conftest.$ac_objext conftest$ac_exeext
2028 if { { ac_try="$ac_link"
2029case "(($ac_try" in
2030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2031 *) ac_try_echo=$ac_try;;
2032esac
2033eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2034$as_echo "$ac_try_echo"; } >&5
2035 (eval "$ac_link") 2>conftest.err
2036 ac_status=$?
2037 if test -s conftest.err; then
2038 grep -v '^ *+' conftest.err >conftest.er1
2039 cat conftest.er1 >&5
2040 mv -f conftest.er1 conftest.err
2041 fi
2042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2043 test $ac_status = 0; } && {
2044 test -z "$ac_c_werror_flag" ||
2045 test ! -s conftest.err
2046 } && test -s conftest$ac_exeext && {
2047 test "$cross_compiling" = yes ||
d0ac1c44 2048 test -x conftest$ac_exeext
2974be62
AM
2049 }; then :
2050 ac_retval=0
2051else
2052 $as_echo "$as_me: failed program was:" >&5
2053sed 's/^/| /' conftest.$ac_ext >&5
2054
2055 ac_retval=1
2056fi
2057 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2058 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2059 # interfere with the next link command; also delete a directory that is
2060 # left behind by Apple's compiler. We do this before executing the actions.
2061 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2062 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2063 as_fn_set_status $ac_retval
2974be62
AM
2064
2065} # ac_fn_c_try_link
2066
81ecdfbb
RW
2067# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2068# --------------------------------------------
2069# Tries to find the compile-time value of EXPR in a program that includes
2070# INCLUDES, setting VAR accordingly. Returns whether the value could be
2071# computed
2072ac_fn_c_compute_int ()
2073{
2074 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2075 if test "$cross_compiling" = yes; then
2076 # Depending upon the size, compute the lo and hi bounds.
2077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078/* end confdefs.h. */
2079$4
2080int
2081main ()
2082{
2083static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2084test_array [0] = 0;
2085return test_array [0];
bec39cab 2086
81ecdfbb
RW
2087 ;
2088 return 0;
2089}
2090_ACEOF
2091if ac_fn_c_try_compile "$LINENO"; then :
2092 ac_lo=0 ac_mid=0
2093 while :; do
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2101test_array [0] = 0;
2102return test_array [0];
bec39cab 2103
81ecdfbb
RW
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid; break
2110else
2111 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2112 if test $ac_lo -le $ac_mid; then
2113 ac_lo= ac_hi=
2114 break
2115 fi
2116 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2117fi
81ecdfbb
RW
2118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119 done
c906108c 2120else
81ecdfbb
RW
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124int
2125main ()
2126{
2127static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2128test_array [0] = 0;
2129return test_array [0];
bec39cab 2130
81ecdfbb
RW
2131 ;
2132 return 0;
2133}
2134_ACEOF
2135if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_hi=-1 ac_mid=-1
2137 while :; do
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h. */
2140$4
2141int
2142main ()
2143{
2144static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2145test_array [0] = 0;
2146return test_array [0];
bec39cab 2147
81ecdfbb
RW
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_compile "$LINENO"; then :
2153 ac_lo=$ac_mid; break
2154else
2155 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2156 if test $ac_mid -le $ac_hi; then
2157 ac_lo= ac_hi=
2158 break
2159 fi
2160 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2161fi
2162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163 done
2164else
2165 ac_lo= ac_hi=
2166fi
2167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2168fi
2169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170# Binary search between lo and hi bounds.
2171while test "x$ac_lo" != "x$ac_hi"; do
2172 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174/* end confdefs.h. */
2175$4
2176int
2177main ()
2178{
2179static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2180test_array [0] = 0;
2181return test_array [0];
bec39cab 2182
81ecdfbb
RW
2183 ;
2184 return 0;
2185}
2186_ACEOF
2187if ac_fn_c_try_compile "$LINENO"; then :
2188 ac_hi=$ac_mid
2189else
2190 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2191fi
2192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2193done
2194case $ac_lo in #((
2195?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2196'') ac_retval=1 ;;
2197esac
2198 else
2199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200/* end confdefs.h. */
2201$4
2202static long int longval () { return $2; }
2203static unsigned long int ulongval () { return $2; }
2204#include <stdio.h>
2205#include <stdlib.h>
2206int
2207main ()
2208{
bec39cab 2209
81ecdfbb
RW
2210 FILE *f = fopen ("conftest.val", "w");
2211 if (! f)
2212 return 1;
2213 if (($2) < 0)
2214 {
2215 long int i = longval ();
2216 if (i != ($2))
2217 return 1;
2218 fprintf (f, "%ld", i);
2219 }
2220 else
2221 {
2222 unsigned long int i = ulongval ();
2223 if (i != ($2))
2224 return 1;
2225 fprintf (f, "%lu", i);
2226 }
2227 /* Do not output a trailing newline, as this causes \r\n confusion
2228 on some platforms. */
2229 return ferror (f) || fclose (f) != 0;
bec39cab 2230
81ecdfbb
RW
2231 ;
2232 return 0;
2233}
2234_ACEOF
2235if ac_fn_c_try_run "$LINENO"; then :
2236 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2237else
2238 ac_retval=1
2239fi
2240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2241 conftest.$ac_objext conftest.beam conftest.$ac_ext
2242rm -f conftest.val
bec39cab 2243
81ecdfbb 2244 fi
d0ac1c44
SM
2245 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2246 as_fn_set_status $ac_retval
bec39cab 2247
81ecdfbb 2248} # ac_fn_c_compute_int
bec39cab 2249
55a8c076
YQ
2250# ac_fn_c_check_func LINENO FUNC VAR
2251# ----------------------------------
2252# Tests whether FUNC exists, setting the cache variable VAR accordingly
2253ac_fn_c_check_func ()
81ecdfbb
RW
2254{
2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2257$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2258if eval \${$3+:} false; then :
81ecdfbb
RW
2259 $as_echo_n "(cached) " >&6
2260else
81ecdfbb
RW
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
55a8c076
YQ
2263/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2264 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2265#define $2 innocuous_$2
2266
2267/* System header to define __stub macros and hopefully few prototypes,
2268 which can conflict with char $2 (); below.
2269 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2270 <limits.h> exists even on freestanding compilers. */
2271
2272#ifdef __STDC__
2273# include <limits.h>
2274#else
2275# include <assert.h>
2276#endif
2277
2278#undef $2
2279
2280/* Override any GCC internal prototype to avoid an error.
2281 Use char because int might match the return type of a GCC
2282 builtin and then its argument prototype would still apply. */
2283#ifdef __cplusplus
2284extern "C"
2285#endif
2286char $2 ();
2287/* The GNU C library defines this for functions which it implements
2288 to always fail with ENOSYS. Some functions are actually named
2289 something starting with __ and the normal name is an alias. */
2290#if defined __stub_$2 || defined __stub___$2
2291choke me
2292#endif
2293
2294int
2295main ()
2296{
2297return $2 ();
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302if ac_fn_c_try_link "$LINENO"; then :
2303 eval "$3=yes"
2304else
2305 eval "$3=no"
2306fi
2307rm -f core conftest.err conftest.$ac_objext \
2308 conftest$ac_exeext conftest.$ac_ext
2309fi
2310eval ac_res=\$$3
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2312$as_echo "$ac_res" >&6; }
d0ac1c44 2313 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2314
2315} # ac_fn_c_check_func
2316
07697489
PA
2317# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2318# -------------------------------------------
2319# Tests whether TYPE exists after having included INCLUDES, setting cache
2320# variable VAR accordingly.
2321ac_fn_c_check_type ()
2322{
2323 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2325$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2326if eval \${$3+:} false; then :
07697489
PA
2327 $as_echo_n "(cached) " >&6
2328else
2329 eval "$3=no"
2330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331/* end confdefs.h. */
2332$4
2333int
2334main ()
2335{
2336if (sizeof ($2))
2337 return 0;
2338 ;
2339 return 0;
2340}
2341_ACEOF
2342if ac_fn_c_try_compile "$LINENO"; then :
2343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344/* end confdefs.h. */
2345$4
2346int
2347main ()
2348{
2349if (sizeof (($2)))
2350 return 0;
2351 ;
2352 return 0;
2353}
2354_ACEOF
2355if ac_fn_c_try_compile "$LINENO"; then :
2356
2357else
2358 eval "$3=yes"
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363fi
2364eval ac_res=\$$3
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2366$as_echo "$ac_res" >&6; }
d0ac1c44 2367 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2368
2369} # ac_fn_c_check_type
2370
d0ac1c44
SM
2371# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2372# ---------------------------------------------
2373# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2374# accordingly.
770d76d7
PA
2375ac_fn_c_check_decl ()
2376{
2377 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2378 as_decl_name=`echo $2|sed 's/ *(.*//'`
2379 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2381$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2382if eval \${$3+:} false; then :
770d76d7
PA
2383 $as_echo_n "(cached) " >&6
2384else
2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386/* end confdefs.h. */
2387$4
2388int
2389main ()
2390{
2391#ifndef $as_decl_name
2392#ifdef __cplusplus
2393 (void) $as_decl_use;
2394#else
2395 (void) $as_decl_name;
2396#endif
2397#endif
2398
2399 ;
2400 return 0;
2401}
2402_ACEOF
2403if ac_fn_c_try_compile "$LINENO"; then :
2404 eval "$3=yes"
2405else
2406 eval "$3=no"
2407fi
2408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409fi
2410eval ac_res=\$$3
2411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2412$as_echo "$ac_res" >&6; }
d0ac1c44 2413 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2414
2415} # ac_fn_c_check_decl
f35d5ade 2416
05ea2a05
TT
2417# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2418# ----------------------------------------------------
2419# Tries to find if the field MEMBER exists in type AGGR, after including
2420# INCLUDES, setting cache variable VAR accordingly.
2421ac_fn_c_check_member ()
2422{
2423 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2425$as_echo_n "checking for $2.$3... " >&6; }
2426if eval \${$4+:} false; then :
2427 $as_echo_n "(cached) " >&6
2428else
2429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2430/* end confdefs.h. */
2431$5
2432int
2433main ()
2434{
2435static $2 ac_aggr;
2436if (ac_aggr.$3)
2437return 0;
2438 ;
2439 return 0;
2440}
2441_ACEOF
2442if ac_fn_c_try_compile "$LINENO"; then :
2443 eval "$4=yes"
2444else
2445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2446/* end confdefs.h. */
2447$5
2448int
2449main ()
2450{
2451static $2 ac_aggr;
2452if (sizeof ac_aggr.$3)
2453return 0;
2454 ;
2455 return 0;
2456}
2457_ACEOF
2458if ac_fn_c_try_compile "$LINENO"; then :
2459 eval "$4=yes"
2460else
2461 eval "$4=no"
2462fi
2463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2464fi
2465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2466fi
2467eval ac_res=\$$4
2468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2469$as_echo "$ac_res" >&6; }
2470 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2471
2472} # ac_fn_c_check_member
2473
f35d5ade
TT
2474# ac_fn_cxx_try_link LINENO
2475# -------------------------
2476# Try to link conftest.$ac_ext, and return whether this succeeded.
2477ac_fn_cxx_try_link ()
2478{
2479 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2480 rm -f conftest.$ac_objext conftest$ac_exeext
2481 if { { ac_try="$ac_link"
2482case "(($ac_try" in
2483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2484 *) ac_try_echo=$ac_try;;
2485esac
2486eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2487$as_echo "$ac_try_echo"; } >&5
2488 (eval "$ac_link") 2>conftest.err
2489 ac_status=$?
2490 if test -s conftest.err; then
2491 grep -v '^ *+' conftest.err >conftest.er1
2492 cat conftest.er1 >&5
2493 mv -f conftest.er1 conftest.err
2494 fi
2495 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2496 test $ac_status = 0; } && {
2497 test -z "$ac_cxx_werror_flag" ||
2498 test ! -s conftest.err
2499 } && test -s conftest$ac_exeext && {
2500 test "$cross_compiling" = yes ||
2501 test -x conftest$ac_exeext
2502 }; then :
2503 ac_retval=0
2504else
2505 $as_echo "$as_me: failed program was:" >&5
2506sed 's/^/| /' conftest.$ac_ext >&5
2507
2508 ac_retval=1
2509fi
2510 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2511 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2512 # interfere with the next link command; also delete a directory that is
2513 # left behind by Apple's compiler. We do this before executing the actions.
2514 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2515 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2516 as_fn_set_status $ac_retval
2517
2518} # ac_fn_cxx_try_link
21987b9c
TT
2519
2520# ac_fn_cxx_check_func LINENO FUNC VAR
2521# ------------------------------------
2522# Tests whether FUNC exists, setting the cache variable VAR accordingly
2523ac_fn_cxx_check_func ()
2524{
2525 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2527$as_echo_n "checking for $2... " >&6; }
2528if eval \${$3+:} false; then :
2529 $as_echo_n "(cached) " >&6
2530else
2531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2532/* end confdefs.h. */
2533/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2534 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2535#define $2 innocuous_$2
2536
2537/* System header to define __stub macros and hopefully few prototypes,
2538 which can conflict with char $2 (); below.
2539 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2540 <limits.h> exists even on freestanding compilers. */
2541
2542#ifdef __STDC__
2543# include <limits.h>
2544#else
2545# include <assert.h>
2546#endif
2547
2548#undef $2
2549
2550/* Override any GCC internal prototype to avoid an error.
2551 Use char because int might match the return type of a GCC
2552 builtin and then its argument prototype would still apply. */
2553#ifdef __cplusplus
2554extern "C"
2555#endif
2556char $2 ();
2557/* The GNU C library defines this for functions which it implements
2558 to always fail with ENOSYS. Some functions are actually named
2559 something starting with __ and the normal name is an alias. */
2560#if defined __stub_$2 || defined __stub___$2
2561choke me
2562#endif
2563
2564int
2565main ()
2566{
2567return $2 ();
2568 ;
2569 return 0;
2570}
2571_ACEOF
2572if ac_fn_cxx_try_link "$LINENO"; then :
2573 eval "$3=yes"
2574else
2575 eval "$3=no"
2576fi
2577rm -f core conftest.err conftest.$ac_objext \
2578 conftest$ac_exeext conftest.$ac_ext
2579fi
2580eval ac_res=\$$3
2581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2582$as_echo "$ac_res" >&6; }
2583 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2584
2585} # ac_fn_cxx_check_func
81ecdfbb
RW
2586cat >config.log <<_ACEOF
2587This file contains any messages produced by compilers while
2588running configure, to aid debugging if configure makes a mistake.
d5af19ba 2589
81ecdfbb 2590It was created by $as_me, which was
d0ac1c44 2591generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2592
81ecdfbb 2593 $ $0 $@
413ccac7 2594
81ecdfbb
RW
2595_ACEOF
2596exec 5>>config.log
2597{
2598cat <<_ASUNAME
2599## --------- ##
2600## Platform. ##
2601## --------- ##
413ccac7 2602
81ecdfbb
RW
2603hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2604uname -m = `(uname -m) 2>/dev/null || echo unknown`
2605uname -r = `(uname -r) 2>/dev/null || echo unknown`
2606uname -s = `(uname -s) 2>/dev/null || echo unknown`
2607uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2608
81ecdfbb
RW
2609/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2610/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2611
81ecdfbb
RW
2612/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2613/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2614/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2615/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2616/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2617/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2618/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2619
81ecdfbb 2620_ASUNAME
bec39cab 2621
bec39cab
AC
2622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2623for as_dir in $PATH
2624do
2625 IFS=$as_save_IFS
2626 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2627 $as_echo "PATH: $as_dir"
2628 done
2629IFS=$as_save_IFS
bec39cab 2630
81ecdfbb 2631} >&5
bec39cab 2632
81ecdfbb 2633cat >&5 <<_ACEOF
bec39cab 2634
bec39cab 2635
81ecdfbb
RW
2636## ----------- ##
2637## Core tests. ##
2638## ----------- ##
2639
2640_ACEOF
2641
2642
2643# Keep a trace of the command line.
2644# Strip out --no-create and --no-recursion so they do not pile up.
2645# Strip out --silent because we don't want to record it for future runs.
2646# Also quote any args containing shell meta-characters.
2647# Make two passes to allow for proper duplicate-argument suppression.
2648ac_configure_args=
2649ac_configure_args0=
2650ac_configure_args1=
2651ac_must_keep_next=false
2652for ac_pass in 1 2
2653do
2654 for ac_arg
2655 do
2656 case $ac_arg in
2657 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2658 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2659 | -silent | --silent | --silen | --sile | --sil)
2660 continue ;;
2661 *\'*)
2662 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2663 esac
2664 case $ac_pass in
2665 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2666 2)
2667 as_fn_append ac_configure_args1 " '$ac_arg'"
2668 if test $ac_must_keep_next = true; then
2669 ac_must_keep_next=false # Got value, back to normal.
2670 else
2671 case $ac_arg in
2672 *=* | --config-cache | -C | -disable-* | --disable-* \
2673 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2674 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2675 | -with-* | --with-* | -without-* | --without-* | --x)
2676 case "$ac_configure_args0 " in
2677 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2678 esac
2679 ;;
2680 -* ) ac_must_keep_next=true ;;
2681 esac
2682 fi
2683 as_fn_append ac_configure_args " '$ac_arg'"
2684 ;;
2685 esac
2686 done
2687done
2688{ ac_configure_args0=; unset ac_configure_args0;}
2689{ ac_configure_args1=; unset ac_configure_args1;}
2690
2691# When interrupted or exit'd, cleanup temporary files, and complete
2692# config.log. We remove comments because anyway the quotes in there
2693# would cause problems or look ugly.
2694# WARNING: Use '\'' to represent an apostrophe within the trap.
2695# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2696trap 'exit_status=$?
2697 # Save into config.log some information that might help in debugging.
2698 {
2699 echo
2700
d0ac1c44 2701 $as_echo "## ---------------- ##
81ecdfbb 2702## Cache variables. ##
d0ac1c44 2703## ---------------- ##"
81ecdfbb
RW
2704 echo
2705 # The following way of writing the cache mishandles newlines in values,
2706(
2707 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2708 eval ac_val=\$$ac_var
2709 case $ac_val in #(
2710 *${as_nl}*)
2711 case $ac_var in #(
2712 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2713$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2714 esac
2715 case $ac_var in #(
2716 _ | IFS | as_nl) ;; #(
2717 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2718 *) { eval $ac_var=; unset $ac_var;} ;;
2719 esac ;;
2720 esac
2721 done
2722 (set) 2>&1 |
2723 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2724 *${as_nl}ac_space=\ *)
2725 sed -n \
2726 "s/'\''/'\''\\\\'\'''\''/g;
2727 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2728 ;; #(
2729 *)
2730 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2731 ;;
2732 esac |
2733 sort
2734)
2735 echo
2736
d0ac1c44 2737 $as_echo "## ----------------- ##
81ecdfbb 2738## Output variables. ##
d0ac1c44 2739## ----------------- ##"
81ecdfbb
RW
2740 echo
2741 for ac_var in $ac_subst_vars
2742 do
2743 eval ac_val=\$$ac_var
2744 case $ac_val in
2745 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2746 esac
2747 $as_echo "$ac_var='\''$ac_val'\''"
2748 done | sort
2749 echo
2750
2751 if test -n "$ac_subst_files"; then
d0ac1c44 2752 $as_echo "## ------------------- ##
81ecdfbb 2753## File substitutions. ##
d0ac1c44 2754## ------------------- ##"
81ecdfbb
RW
2755 echo
2756 for ac_var in $ac_subst_files
2757 do
2758 eval ac_val=\$$ac_var
2759 case $ac_val in
2760 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2761 esac
2762 $as_echo "$ac_var='\''$ac_val'\''"
2763 done | sort
2764 echo
2765 fi
2766
2767 if test -s confdefs.h; then
d0ac1c44 2768 $as_echo "## ----------- ##
81ecdfbb 2769## confdefs.h. ##
d0ac1c44 2770## ----------- ##"
81ecdfbb
RW
2771 echo
2772 cat confdefs.h
2773 echo
2774 fi
2775 test "$ac_signal" != 0 &&
2776 $as_echo "$as_me: caught signal $ac_signal"
2777 $as_echo "$as_me: exit $exit_status"
2778 } >&5
2779 rm -f core *.core core.conftest.* &&
2780 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2781 exit $exit_status
2782' 0
2783for ac_signal in 1 2 13 15; do
2784 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2785done
2786ac_signal=0
2787
2788# confdefs.h avoids OS command line length limits that DEFS can exceed.
2789rm -f -r conftest* confdefs.h
2790
2791$as_echo "/* confdefs.h */" > confdefs.h
2792
2793# Predefined preprocessor variables.
2794
2795cat >>confdefs.h <<_ACEOF
2796#define PACKAGE_NAME "$PACKAGE_NAME"
2797_ACEOF
2798
2799cat >>confdefs.h <<_ACEOF
2800#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2801_ACEOF
2802
2803cat >>confdefs.h <<_ACEOF
2804#define PACKAGE_VERSION "$PACKAGE_VERSION"
2805_ACEOF
2806
2807cat >>confdefs.h <<_ACEOF
2808#define PACKAGE_STRING "$PACKAGE_STRING"
2809_ACEOF
2810
2811cat >>confdefs.h <<_ACEOF
2812#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2813_ACEOF
2814
2815cat >>confdefs.h <<_ACEOF
2816#define PACKAGE_URL "$PACKAGE_URL"
2817_ACEOF
2818
2819
2820# Let the site file select an alternate cache file if it wants to.
2821# Prefer an explicitly selected file to automatically selected ones.
2822ac_site_file1=NONE
2823ac_site_file2=NONE
2824if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2825 # We do not want a PATH search for config.site.
2826 case $CONFIG_SITE in #((
2827 -*) ac_site_file1=./$CONFIG_SITE;;
2828 */*) ac_site_file1=$CONFIG_SITE;;
2829 *) ac_site_file1=./$CONFIG_SITE;;
2830 esac
81ecdfbb
RW
2831elif test "x$prefix" != xNONE; then
2832 ac_site_file1=$prefix/share/config.site
2833 ac_site_file2=$prefix/etc/config.site
2834else
2835 ac_site_file1=$ac_default_prefix/share/config.site
2836 ac_site_file2=$ac_default_prefix/etc/config.site
2837fi
2838for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2839do
2840 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2841 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2843$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2844 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2845 . "$ac_site_file" \
2846 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2847$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2848as_fn_error $? "failed to load site script $ac_site_file
2849See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2850 fi
2851done
2852
2853if test -r "$cache_file"; then
d0ac1c44
SM
2854 # Some versions of bash will fail to source /dev/null (special files
2855 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2856 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2857 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2858$as_echo "$as_me: loading cache $cache_file" >&6;}
2859 case $cache_file in
2860 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2861 *) . "./$cache_file";;
2862 esac
2863 fi
2864else
2865 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2866$as_echo "$as_me: creating cache $cache_file" >&6;}
2867 >$cache_file
bec39cab
AC
2868fi
2869
d0ac1c44
SM
2870as_fn_append ac_header_list " stdlib.h"
2871as_fn_append ac_header_list " unistd.h"
2872as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2873# Check that the precious variables saved in the cache have kept the same
2874# value.
2875ac_cache_corrupted=false
2876for ac_var in $ac_precious_vars; do
2877 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2878 eval ac_new_set=\$ac_env_${ac_var}_set
2879 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2880 eval ac_new_val=\$ac_env_${ac_var}_value
2881 case $ac_old_set,$ac_new_set in
2882 set,)
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2884$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2885 ac_cache_corrupted=: ;;
2886 ,set)
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2888$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2889 ac_cache_corrupted=: ;;
2890 ,);;
2891 *)
2892 if test "x$ac_old_val" != "x$ac_new_val"; then
2893 # differences in whitespace do not lead to failure.
2894 ac_old_val_w=`echo x $ac_old_val`
2895 ac_new_val_w=`echo x $ac_new_val`
2896 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2898$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2899 ac_cache_corrupted=:
2900 else
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2902$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2903 eval $ac_var=\$ac_old_val
2904 fi
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2906$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2908$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2909 fi;;
2910 esac
2911 # Pass precious variables to config.status.
2912 if test "$ac_new_set" = set; then
2913 case $ac_new_val in
2914 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2915 *) ac_arg=$ac_var=$ac_new_val ;;
2916 esac
2917 case " $ac_configure_args " in
2918 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2919 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2920 esac
2921 fi
2922done
2923if $ac_cache_corrupted; then
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2925$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2927$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2928 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2929fi
2930## -------------------- ##
2931## Main body of script. ##
2932## -------------------- ##
2933
2934ac_ext=c
2935ac_cpp='$CPP $CPPFLAGS'
2936ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2937ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2938ac_compiler_gnu=$ac_cv_c_compiler_gnu
2939
2940
2941
2942
2943
2944ac_config_headers="$ac_config_headers config.h:config.in"
2945
2946
2947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2948$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2949 # Check whether --enable-maintainer-mode was given.
2950if test "${enable_maintainer_mode+set}" = set; then :
2951 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2952else
2953 USE_MAINTAINER_MODE=no
2954fi
2955
2956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2957$as_echo "$USE_MAINTAINER_MODE" >&6; }
2958 if test $USE_MAINTAINER_MODE = yes; then
2959 MAINTAINER_MODE_TRUE=
2960 MAINTAINER_MODE_FALSE='#'
2961else
2962 MAINTAINER_MODE_TRUE='#'
2963 MAINTAINER_MODE_FALSE=
2964fi
2965
2966 MAINT=$MAINTAINER_MODE_TRUE
2967
2968
2969
17ef446e 2970# Set the 'development' global.
270c9937 2971. $srcdir/../bfd/development.sh
f5f1cdb6 2972
81ecdfbb
RW
2973ac_ext=c
2974ac_cpp='$CPP $CPPFLAGS'
2975ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2976ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2977ac_compiler_gnu=$ac_cv_c_compiler_gnu
2978if test -n "$ac_tool_prefix"; then
2979 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2980set dummy ${ac_tool_prefix}gcc; ac_word=$2
2981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2982$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2983if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2984 $as_echo_n "(cached) " >&6
c906108c
SS
2985else
2986 if test -n "$CC"; then
2987 ac_cv_prog_CC="$CC" # Let the user override the test.
2988else
bec39cab
AC
2989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2990for as_dir in $PATH
2991do
2992 IFS=$as_save_IFS
2993 test -z "$as_dir" && as_dir=.
81ecdfbb 2994 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2995 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2996 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2997 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2998 break 2
2999 fi
3000done
81ecdfbb
RW
3001 done
3002IFS=$as_save_IFS
bec39cab 3003
c906108c
SS
3004fi
3005fi
bec39cab 3006CC=$ac_cv_prog_CC
c906108c 3007if test -n "$CC"; then
81ecdfbb
RW
3008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3009$as_echo "$CC" >&6; }
c906108c 3010else
81ecdfbb
RW
3011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3012$as_echo "no" >&6; }
c906108c
SS
3013fi
3014
81ecdfbb 3015
b4e70030
JB
3016fi
3017if test -z "$ac_cv_prog_CC"; then
3018 ac_ct_CC=$CC
81ecdfbb
RW
3019 # Extract the first word of "gcc", so it can be a program name with args.
3020set dummy gcc; ac_word=$2
3021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3022$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3023if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3024 $as_echo_n "(cached) " >&6
b4e70030
JB
3025else
3026 if test -n "$ac_ct_CC"; then
3027 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3028else
3029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3030for as_dir in $PATH
3031do
3032 IFS=$as_save_IFS
3033 test -z "$as_dir" && as_dir=.
81ecdfbb 3034 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3036 ac_cv_prog_ac_ct_CC="gcc"
3037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 3038 break 2
4e8d927d 3039 fi
b4e70030 3040done
81ecdfbb
RW
3041 done
3042IFS=$as_save_IFS
b4e70030
JB
3043
3044fi
3045fi
3046ac_ct_CC=$ac_cv_prog_ac_ct_CC
3047if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3049$as_echo "$ac_ct_CC" >&6; }
b4e70030 3050else
81ecdfbb
RW
3051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3052$as_echo "no" >&6; }
b4e70030
JB
3053fi
3054
81ecdfbb
RW
3055 if test "x$ac_ct_CC" = x; then
3056 CC=""
3057 else
3058 case $cross_compiling:$ac_tool_warned in
3059yes:)
3060{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3061$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3062ac_tool_warned=yes ;;
3063esac
3064 CC=$ac_ct_CC
3065 fi
b4e70030
JB
3066else
3067 CC="$ac_cv_prog_CC"
3068fi
3069
c906108c 3070if test -z "$CC"; then
81ecdfbb
RW
3071 if test -n "$ac_tool_prefix"; then
3072 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3073set dummy ${ac_tool_prefix}cc; ac_word=$2
3074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3075$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3076if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3077 $as_echo_n "(cached) " >&6
c906108c
SS
3078else
3079 if test -n "$CC"; then
3080 ac_cv_prog_CC="$CC" # Let the user override the test.
3081else
bec39cab
AC
3082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3083for as_dir in $PATH
3084do
3085 IFS=$as_save_IFS
3086 test -z "$as_dir" && as_dir=.
81ecdfbb 3087 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3088 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3089 ac_cv_prog_CC="${ac_tool_prefix}cc"
3090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3091 break 2
3092 fi
3093done
81ecdfbb
RW
3094 done
3095IFS=$as_save_IFS
3096
3097fi
3098fi
3099CC=$ac_cv_prog_CC
3100if test -n "$CC"; then
3101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3102$as_echo "$CC" >&6; }
3103else
3104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3105$as_echo "no" >&6; }
3106fi
3107
3108
3109 fi
3110fi
3111if test -z "$CC"; then
3112 # Extract the first word of "cc", so it can be a program name with args.
3113set dummy cc; ac_word=$2
3114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3115$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3116if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3117 $as_echo_n "(cached) " >&6
3118else
3119 if test -n "$CC"; then
3120 ac_cv_prog_CC="$CC" # Let the user override the test.
3121else
3122 ac_prog_rejected=no
3123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3124for as_dir in $PATH
3125do
3126 IFS=$as_save_IFS
3127 test -z "$as_dir" && as_dir=.
3128 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3130 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3131 ac_prog_rejected=yes
3132 continue
3133 fi
3134 ac_cv_prog_CC="cc"
3135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3136 break 2
3137 fi
3138done
3139 done
3140IFS=$as_save_IFS
bec39cab 3141
c906108c
SS
3142if test $ac_prog_rejected = yes; then
3143 # We found a bogon in the path, so make sure we never use it.
3144 set dummy $ac_cv_prog_CC
3145 shift
bec39cab 3146 if test $# != 0; then
c906108c
SS
3147 # We chose a different compiler from the bogus one.
3148 # However, it has the same basename, so the bogon will be chosen
3149 # first if we set CC to just the basename; use the full file name.
3150 shift
bec39cab 3151 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3152 fi
3153fi
3154fi
3155fi
bec39cab 3156CC=$ac_cv_prog_CC
c906108c 3157if test -n "$CC"; then
81ecdfbb
RW
3158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3159$as_echo "$CC" >&6; }
c906108c 3160else
81ecdfbb
RW
3161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3162$as_echo "no" >&6; }
c906108c
SS
3163fi
3164
81ecdfbb 3165
bec39cab
AC
3166fi
3167if test -z "$CC"; then
3168 if test -n "$ac_tool_prefix"; then
81ecdfbb 3169 for ac_prog in cl.exe
bec39cab
AC
3170 do
3171 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3172set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3174$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3175if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3176 $as_echo_n "(cached) " >&6
c906108c
SS
3177else
3178 if test -n "$CC"; then
3179 ac_cv_prog_CC="$CC" # Let the user override the test.
3180else
bec39cab
AC
3181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3182for as_dir in $PATH
3183do
3184 IFS=$as_save_IFS
3185 test -z "$as_dir" && as_dir=.
81ecdfbb 3186 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3187 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3188 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3190 break 2
3191 fi
3192done
81ecdfbb
RW
3193 done
3194IFS=$as_save_IFS
bec39cab 3195
c906108c
SS
3196fi
3197fi
bec39cab 3198CC=$ac_cv_prog_CC
c906108c 3199if test -n "$CC"; then
81ecdfbb
RW
3200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3201$as_echo "$CC" >&6; }
c906108c 3202else
81ecdfbb
RW
3203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3204$as_echo "no" >&6; }
c906108c 3205fi
bec39cab 3206
81ecdfbb 3207
bec39cab
AC
3208 test -n "$CC" && break
3209 done
3210fi
3211if test -z "$CC"; then
3212 ac_ct_CC=$CC
81ecdfbb 3213 for ac_prog in cl.exe
bec39cab
AC
3214do
3215 # Extract the first word of "$ac_prog", so it can be a program name with args.
3216set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3218$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3219if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3220 $as_echo_n "(cached) " >&6
bec39cab
AC
3221else
3222 if test -n "$ac_ct_CC"; then
3223 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3224else
3225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3226for as_dir in $PATH
3227do
3228 IFS=$as_save_IFS
3229 test -z "$as_dir" && as_dir=.
81ecdfbb 3230 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3231 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3232 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3233 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3234 break 2
c906108c 3235 fi
bec39cab 3236done
81ecdfbb
RW
3237 done
3238IFS=$as_save_IFS
bec39cab
AC
3239
3240fi
3241fi
3242ac_ct_CC=$ac_cv_prog_ac_ct_CC
3243if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3245$as_echo "$ac_ct_CC" >&6; }
bec39cab 3246else
81ecdfbb
RW
3247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3248$as_echo "no" >&6; }
c906108c
SS
3249fi
3250
81ecdfbb 3251
bec39cab
AC
3252 test -n "$ac_ct_CC" && break
3253done
c906108c 3254
81ecdfbb
RW
3255 if test "x$ac_ct_CC" = x; then
3256 CC=""
3257 else
3258 case $cross_compiling:$ac_tool_warned in
3259yes:)
3260{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3261$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3262ac_tool_warned=yes ;;
3263esac
3264 CC=$ac_ct_CC
3265 fi
bec39cab
AC
3266fi
3267
3268fi
3269
3270
81ecdfbb
RW
3271test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3272$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3273as_fn_error $? "no acceptable C compiler found in \$PATH
3274See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3275
3276# Provide some information about the compiler.
81ecdfbb
RW
3277$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3278set X $ac_compile
3279ac_compiler=$2
3280for ac_option in --version -v -V -qversion; do
3281 { { ac_try="$ac_compiler $ac_option >&5"
3282case "(($ac_try" in
3283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3284 *) ac_try_echo=$ac_try;;
3285esac
3286eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3287$as_echo "$ac_try_echo"; } >&5
3288 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3289 ac_status=$?
81ecdfbb
RW
3290 if test -s conftest.err; then
3291 sed '10a\
3292... rest of stderr output deleted ...
3293 10q' conftest.err >conftest.er1
3294 cat conftest.er1 >&5
81ecdfbb 3295 fi
d0ac1c44 3296 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3297 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3298 test $ac_status = 0; }
3299done
bec39cab 3300
81ecdfbb 3301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3302/* end confdefs.h. */
3303
3304int
3305main ()
3306{
3307
3308 ;
3309 return 0;
3310}
3311_ACEOF
3312ac_clean_files_save=$ac_clean_files
d0ac1c44 3313ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3314# Try to create an executable without -o first, disregard a.out.
3315# It will help us diagnose broken compilers, and finding out an intuition
3316# of exeext.
d0ac1c44
SM
3317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3318$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3319ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3320
3321# The possible output files:
3322ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3323
3324ac_rmfiles=
3325for ac_file in $ac_files
3326do
3327 case $ac_file in
3328 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3329 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3330 esac
3331done
3332rm -f $ac_rmfiles
3333
3334if { { ac_try="$ac_link_default"
3335case "(($ac_try" in
3336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3337 *) ac_try_echo=$ac_try;;
3338esac
3339eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3340$as_echo "$ac_try_echo"; } >&5
3341 (eval "$ac_link_default") 2>&5
3342 ac_status=$?
3343 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3344 test $ac_status = 0; }; then :
3345 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3346# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3347# in a Makefile. We should not override ac_cv_exeext if it was cached,
3348# so that the user can short-circuit this test for compilers unknown to
3349# Autoconf.
3350for ac_file in $ac_files ''
bec39cab
AC
3351do
3352 test -f "$ac_file" || continue
3353 case $ac_file in
81ecdfbb 3354 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3355 ;;
3356 [ab].out )
3357 # We found the default executable, but exeext='' is most
3358 # certainly right.
3359 break;;
3360 *.* )
81ecdfbb
RW
3361 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3362 then :; else
3363 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3364 fi
3365 # We set ac_cv_exeext here because the later test for it is not
3366 # safe: cross compilers may not add the suffix if given an `-o'
3367 # argument, so we may need to know it at that point already.
3368 # Even if this section looks crufty: it has the advantage of
3369 # actually working.
b4e70030
JB
3370 break;;
3371 * )
3372 break;;
bec39cab
AC
3373 esac
3374done
81ecdfbb
RW
3375test "$ac_cv_exeext" = no && ac_cv_exeext=
3376
bec39cab 3377else
81ecdfbb
RW
3378 ac_file=''
3379fi
81ecdfbb 3380if test -z "$ac_file"; then :
d0ac1c44
SM
3381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3382$as_echo "no" >&6; }
3383$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3384sed 's/^/| /' conftest.$ac_ext >&5
3385
81ecdfbb
RW
3386{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3388as_fn_error 77 "C compiler cannot create executables
3389See \`config.log' for more details" "$LINENO" 5; }
3390else
3391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3392$as_echo "yes" >&6; }
bec39cab 3393fi
d0ac1c44
SM
3394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3395$as_echo_n "checking for C compiler default output file name... " >&6; }
3396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3397$as_echo "$ac_file" >&6; }
b4e70030 3398ac_exeext=$ac_cv_exeext
b4e70030 3399
d0ac1c44 3400rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3401ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3403$as_echo_n "checking for suffix of executables... " >&6; }
3404if { { ac_try="$ac_link"
3405case "(($ac_try" in
3406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3407 *) ac_try_echo=$ac_try;;
3408esac
3409eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3410$as_echo "$ac_try_echo"; } >&5
3411 (eval "$ac_link") 2>&5
bec39cab 3412 ac_status=$?
81ecdfbb
RW
3413 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3414 test $ac_status = 0; }; then :
b4e70030
JB
3415 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3416# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3417# work properly (i.e., refer to `conftest.exe'), while it won't with
3418# `rm'.
3419for ac_file in conftest.exe conftest conftest.*; do
3420 test -f "$ac_file" || continue
3421 case $ac_file in
81ecdfbb 3422 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3423 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3424 break;;
3425 * ) break;;
3426 esac
3427done
c906108c 3428else
81ecdfbb
RW
3429 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3431as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3432See \`config.log' for more details" "$LINENO" 5; }
c906108c 3433fi
d0ac1c44 3434rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3436$as_echo "$ac_cv_exeext" >&6; }
c906108c 3437
b4e70030 3438rm -f conftest.$ac_ext
bec39cab
AC
3439EXEEXT=$ac_cv_exeext
3440ac_exeext=$EXEEXT
d0ac1c44
SM
3441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3442/* end confdefs.h. */
3443#include <stdio.h>
3444int
3445main ()
3446{
3447FILE *f = fopen ("conftest.out", "w");
3448 return ferror (f) || fclose (f) != 0;
3449
3450 ;
3451 return 0;
3452}
3453_ACEOF
3454ac_clean_files="$ac_clean_files conftest.out"
3455# Check that the compiler produces executables we can run. If not, either
3456# the compiler is broken, or we cross compile.
3457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3458$as_echo_n "checking whether we are cross compiling... " >&6; }
3459if test "$cross_compiling" != yes; then
3460 { { ac_try="$ac_link"
3461case "(($ac_try" in
3462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3463 *) ac_try_echo=$ac_try;;
3464esac
3465eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3466$as_echo "$ac_try_echo"; } >&5
3467 (eval "$ac_link") 2>&5
3468 ac_status=$?
3469 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3470 test $ac_status = 0; }
3471 if { ac_try='./conftest$ac_cv_exeext'
3472 { { case "(($ac_try" in
3473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3474 *) ac_try_echo=$ac_try;;
3475esac
3476eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3477$as_echo "$ac_try_echo"; } >&5
3478 (eval "$ac_try") 2>&5
3479 ac_status=$?
3480 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3481 test $ac_status = 0; }; }; then
3482 cross_compiling=no
3483 else
3484 if test "$cross_compiling" = maybe; then
3485 cross_compiling=yes
3486 else
3487 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3488$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3489as_fn_error $? "cannot run C compiled programs.
3490If you meant to cross compile, use \`--host'.
3491See \`config.log' for more details" "$LINENO" 5; }
3492 fi
3493 fi
3494fi
3495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3496$as_echo "$cross_compiling" >&6; }
3497
3498rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3499ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3501$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3502if ${ac_cv_objext+:} false; then :
81ecdfbb 3503 $as_echo_n "(cached) " >&6
bec39cab 3504else
81ecdfbb 3505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3506/* end confdefs.h. */
3507
3508int
3509main ()
3510{
3511
3512 ;
3513 return 0;
3514}
3515_ACEOF
3516rm -f conftest.o conftest.obj
81ecdfbb
RW
3517if { { ac_try="$ac_compile"
3518case "(($ac_try" in
3519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3520 *) ac_try_echo=$ac_try;;
3521esac
3522eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3523$as_echo "$ac_try_echo"; } >&5
3524 (eval "$ac_compile") 2>&5
3525 ac_status=$?
3526 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3527 test $ac_status = 0; }; then :
3528 for ac_file in conftest.o conftest.obj conftest.*; do
3529 test -f "$ac_file" || continue;
bec39cab 3530 case $ac_file in
81ecdfbb 3531 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3532 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3533 break;;
3534 esac
3535done
c906108c 3536else
81ecdfbb 3537 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3538sed 's/^/| /' conftest.$ac_ext >&5
3539
81ecdfbb
RW
3540{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3541$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3542as_fn_error $? "cannot compute suffix of object files: cannot compile
3543See \`config.log' for more details" "$LINENO" 5; }
c906108c 3544fi
b4e70030 3545rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3546fi
81ecdfbb
RW
3547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3548$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3549OBJEXT=$ac_cv_objext
3550ac_objext=$OBJEXT
81ecdfbb
RW
3551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3552$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3553if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3554 $as_echo_n "(cached) " >&6
c906108c 3555else
81ecdfbb 3556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3557/* end confdefs.h. */
3558
3559int
3560main ()
3561{
3562#ifndef __GNUC__
3563 choke me
3564#endif
3565
3566 ;
3567 return 0;
3568}
3569_ACEOF
81ecdfbb 3570if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3571 ac_compiler_gnu=yes
3572else
81ecdfbb 3573 ac_compiler_gnu=no
bec39cab 3574fi
81ecdfbb 3575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3576ac_cv_c_compiler_gnu=$ac_compiler_gnu
3577
3578fi
81ecdfbb
RW
3579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3580$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3581if test $ac_compiler_gnu = yes; then
3582 GCC=yes
3583else
3584 GCC=
3585fi
bec39cab
AC
3586ac_test_CFLAGS=${CFLAGS+set}
3587ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3589$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3590if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3591 $as_echo_n "(cached) " >&6
bec39cab 3592else
81ecdfbb
RW
3593 ac_save_c_werror_flag=$ac_c_werror_flag
3594 ac_c_werror_flag=yes
3595 ac_cv_prog_cc_g=no
3596 CFLAGS="-g"
3597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3598/* end confdefs.h. */
3599
3600int
3601main ()
3602{
3603
3604 ;
3605 return 0;
3606}
3607_ACEOF
81ecdfbb 3608if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3609 ac_cv_prog_cc_g=yes
3610else
81ecdfbb
RW
3611 CFLAGS=""
3612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3613/* end confdefs.h. */
3614
3615int
3616main ()
3617{
3618
3619 ;
3620 return 0;
3621}
3622_ACEOF
3623if ac_fn_c_try_compile "$LINENO"; then :
3624
3625else
3626 ac_c_werror_flag=$ac_save_c_werror_flag
3627 CFLAGS="-g"
3628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3629/* end confdefs.h. */
3630
3631int
3632main ()
3633{
c906108c 3634
81ecdfbb
RW
3635 ;
3636 return 0;
3637}
3638_ACEOF
3639if ac_fn_c_try_compile "$LINENO"; then :
3640 ac_cv_prog_cc_g=yes
3641fi
3642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3643fi
3644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3645fi
81ecdfbb
RW
3646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3647 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3648fi
81ecdfbb
RW
3649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3650$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3651if test "$ac_test_CFLAGS" = set; then
bec39cab 3652 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3653elif test $ac_cv_prog_cc_g = yes; then
3654 if test "$GCC" = yes; then
3655 CFLAGS="-g -O2"
3656 else
3657 CFLAGS="-g"
3658 fi
3659else
3660 if test "$GCC" = yes; then
3661 CFLAGS="-O2"
3662 else
3663 CFLAGS=
3664 fi
3665fi
81ecdfbb
RW
3666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3667$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3668if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3669 $as_echo_n "(cached) " >&6
bec39cab 3670else
81ecdfbb 3671 ac_cv_prog_cc_c89=no
bec39cab 3672ac_save_CC=$CC
81ecdfbb 3673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3674/* end confdefs.h. */
c906108c
SS
3675#include <stdarg.h>
3676#include <stdio.h>
d0ac1c44 3677struct stat;
c906108c
SS
3678/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3679struct buf { int x; };
3680FILE * (*rcsopen) (struct buf *, struct stat *, int);
3681static char *e (p, i)
3682 char **p;
3683 int i;
3684{
3685 return p[i];
3686}
3687static char *f (char * (*g) (char **, int), char **p, ...)
3688{
3689 char *s;
3690 va_list v;
3691 va_start (v,p);
3692 s = g (p, va_arg (v,int));
3693 va_end (v);
3694 return s;
3695}
bec39cab
AC
3696
3697/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3698 function prototypes and stuff, but not '\xHH' hex character constants.
3699 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3700 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3701 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3702 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3703 that's true only with -std. */
bec39cab
AC
3704int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3705
81ecdfbb
RW
3706/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3707 inside strings and character constants. */
3708#define FOO(x) 'x'
3709int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3710
c906108c
SS
3711int test (int i, double x);
3712struct s1 {int (*f) (int a);};
3713struct s2 {int (*f) (double a);};
3714int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3715int argc;
3716char **argv;
bec39cab
AC
3717int
3718main ()
3719{
c906108c 3720return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3721 ;
3722 return 0;
3723}
3724_ACEOF
81ecdfbb
RW
3725for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3726 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3727do
3728 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3729 if ac_fn_c_try_compile "$LINENO"; then :
3730 ac_cv_prog_cc_c89=$ac_arg
c906108c 3731fi
81ecdfbb
RW
3732rm -f core conftest.err conftest.$ac_objext
3733 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3734done
81ecdfbb 3735rm -f conftest.$ac_ext
bec39cab 3736CC=$ac_save_CC
c906108c
SS
3737
3738fi
81ecdfbb
RW
3739# AC_CACHE_VAL
3740case "x$ac_cv_prog_cc_c89" in
3741 x)
3742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3743$as_echo "none needed" >&6; } ;;
3744 xno)
3745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3746$as_echo "unsupported" >&6; } ;;
bec39cab 3747 *)
81ecdfbb
RW
3748 CC="$CC $ac_cv_prog_cc_c89"
3749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3750$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3751esac
81ecdfbb 3752if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3753
b4e70030
JB
3754fi
3755
bec39cab
AC
3756ac_ext=c
3757ac_cpp='$CPP $CPPFLAGS'
3758ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3759ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3760ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3761
3bc3d82a
PA
3762ac_ext=cpp
3763ac_cpp='$CXXCPP $CPPFLAGS'
3764ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3765ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3766ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3767if test -z "$CXX"; then
3768 if test -n "$CCC"; then
3769 CXX=$CCC
3770 else
3771 if test -n "$ac_tool_prefix"; then
3772 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3773 do
3774 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3775set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3777$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3778if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3779 $as_echo_n "(cached) " >&6
3780else
3781 if test -n "$CXX"; then
3782 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3783else
3784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3785for as_dir in $PATH
3786do
3787 IFS=$as_save_IFS
3788 test -z "$as_dir" && as_dir=.
3789 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3791 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3793 break 2
3794 fi
3795done
3796 done
3797IFS=$as_save_IFS
3798
3799fi
3800fi
3801CXX=$ac_cv_prog_CXX
3802if test -n "$CXX"; then
3803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3804$as_echo "$CXX" >&6; }
3805else
3806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3807$as_echo "no" >&6; }
3808fi
3809
3810
3811 test -n "$CXX" && break
3812 done
3813fi
3814if test -z "$CXX"; then
3815 ac_ct_CXX=$CXX
3816 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3817do
3818 # Extract the first word of "$ac_prog", so it can be a program name with args.
3819set dummy $ac_prog; ac_word=$2
3820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3821$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3822if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3823 $as_echo_n "(cached) " >&6
3824else
3825 if test -n "$ac_ct_CXX"; then
3826 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3827else
3828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3829for as_dir in $PATH
3830do
3831 IFS=$as_save_IFS
3832 test -z "$as_dir" && as_dir=.
3833 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3834 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3835 ac_cv_prog_ac_ct_CXX="$ac_prog"
3836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3837 break 2
3838 fi
3839done
3840 done
3841IFS=$as_save_IFS
3842
3843fi
3844fi
3845ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3846if test -n "$ac_ct_CXX"; then
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3848$as_echo "$ac_ct_CXX" >&6; }
3849else
3850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3851$as_echo "no" >&6; }
3852fi
3853
3854
3855 test -n "$ac_ct_CXX" && break
3856done
3857
3858 if test "x$ac_ct_CXX" = x; then
3859 CXX="g++"
3860 else
3861 case $cross_compiling:$ac_tool_warned in
3862yes:)
3863{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3864$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3865ac_tool_warned=yes ;;
3866esac
3867 CXX=$ac_ct_CXX
3868 fi
3869fi
3870
3871 fi
3872fi
3873# Provide some information about the compiler.
3874$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3875set X $ac_compile
3876ac_compiler=$2
3877for ac_option in --version -v -V -qversion; do
3878 { { ac_try="$ac_compiler $ac_option >&5"
3879case "(($ac_try" in
3880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3881 *) ac_try_echo=$ac_try;;
3882esac
3883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3884$as_echo "$ac_try_echo"; } >&5
3885 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3886 ac_status=$?
3887 if test -s conftest.err; then
3888 sed '10a\
3889... rest of stderr output deleted ...
3890 10q' conftest.err >conftest.er1
3891 cat conftest.er1 >&5
3bc3d82a 3892 fi
d0ac1c44 3893 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3895 test $ac_status = 0; }
3896done
3897
3898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3899$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3900if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3901 $as_echo_n "(cached) " >&6
3902else
3903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3904/* end confdefs.h. */
3905
3906int
3907main ()
3908{
3909#ifndef __GNUC__
3910 choke me
3911#endif
3912
3913 ;
3914 return 0;
3915}
3916_ACEOF
3917if ac_fn_cxx_try_compile "$LINENO"; then :
3918 ac_compiler_gnu=yes
3919else
3920 ac_compiler_gnu=no
3921fi
3922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3923ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3924
3925fi
3926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3927$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3928if test $ac_compiler_gnu = yes; then
3929 GXX=yes
3930else
3931 GXX=
3932fi
3933ac_test_CXXFLAGS=${CXXFLAGS+set}
3934ac_save_CXXFLAGS=$CXXFLAGS
3935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3936$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3937if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3938 $as_echo_n "(cached) " >&6
3939else
3940 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3941 ac_cxx_werror_flag=yes
3942 ac_cv_prog_cxx_g=no
3943 CXXFLAGS="-g"
3944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3945/* end confdefs.h. */
3946
3947int
3948main ()
3949{
3950
3951 ;
3952 return 0;
3953}
3954_ACEOF
3955if ac_fn_cxx_try_compile "$LINENO"; then :
3956 ac_cv_prog_cxx_g=yes
3957else
3958 CXXFLAGS=""
3959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3960/* end confdefs.h. */
3961
3962int
3963main ()
3964{
3965
3966 ;
3967 return 0;
3968}
3969_ACEOF
3970if ac_fn_cxx_try_compile "$LINENO"; then :
3971
3972else
3973 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3974 CXXFLAGS="-g"
3975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3976/* end confdefs.h. */
3977
3978int
3979main ()
3980{
3981
3982 ;
3983 return 0;
3984}
3985_ACEOF
3986if ac_fn_cxx_try_compile "$LINENO"; then :
3987 ac_cv_prog_cxx_g=yes
3988fi
3989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3990fi
3991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3992fi
3993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3994 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3995fi
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3997$as_echo "$ac_cv_prog_cxx_g" >&6; }
3998if test "$ac_test_CXXFLAGS" = set; then
3999 CXXFLAGS=$ac_save_CXXFLAGS
4000elif test $ac_cv_prog_cxx_g = yes; then
4001 if test "$GXX" = yes; then
4002 CXXFLAGS="-g -O2"
4003 else
4004 CXXFLAGS="-g"
4005 fi
4006else
4007 if test "$GXX" = yes; then
4008 CXXFLAGS="-O2"
4009 else
4010 CXXFLAGS=
4011 fi
4012fi
4013ac_ext=c
4014ac_cpp='$CPP $CPPFLAGS'
4015ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4016ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4017ac_compiler_gnu=$ac_cv_c_compiler_gnu
4018
4019
60ca704f 4020
bec39cab
AC
4021ac_ext=c
4022ac_cpp='$CPP $CPPFLAGS'
4023ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4024ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4025ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4027$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
4028# On Suns, sometimes $CPP names a directory.
4029if test -n "$CPP" && test -d "$CPP"; then
4030 CPP=
8bb2c122 4031fi
bec39cab 4032if test -z "$CPP"; then
d0ac1c44 4033 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 4034 $as_echo_n "(cached) " >&6
bec39cab
AC
4035else
4036 # Double quotes because CPP needs to be expanded
4037 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4038 do
4039 ac_preproc_ok=false
4040for ac_c_preproc_warn_flag in '' yes
4041do
4042 # Use a header file that comes with gcc, so configuring glibc
4043 # with a fresh cross-compiler works.
4044 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4045 # <limits.h> exists even on freestanding compilers.
4046 # On the NeXT, cc -E runs the code through the compiler's parser,
4047 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4049/* end confdefs.h. */
4050#ifdef __STDC__
4051# include <limits.h>
4052#else
4053# include <assert.h>
4054#endif
4055 Syntax error
4056_ACEOF
81ecdfbb 4057if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4058
81ecdfbb 4059else
bec39cab
AC
4060 # Broken: fails on valid input.
4061continue
4062fi
d0ac1c44 4063rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4064
81ecdfbb 4065 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4066 # can be detected and how.
81ecdfbb 4067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4068/* end confdefs.h. */
4069#include <ac_nonexistent.h>
4070_ACEOF
81ecdfbb 4071if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4072 # Broken: success on invalid input.
4073continue
8bb2c122 4074else
bec39cab
AC
4075 # Passes both tests.
4076ac_preproc_ok=:
4077break
8bb2c122 4078fi
d0ac1c44 4079rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4080
bec39cab
AC
4081done
4082# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4083rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4084if $ac_preproc_ok; then :
bec39cab
AC
4085 break
4086fi
8bb2c122 4087
bec39cab
AC
4088 done
4089 ac_cv_prog_CPP=$CPP
ddc9cd0f 4090
c906108c 4091fi
bec39cab
AC
4092 CPP=$ac_cv_prog_CPP
4093else
4094 ac_cv_prog_CPP=$CPP
c906108c 4095fi
81ecdfbb
RW
4096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4097$as_echo "$CPP" >&6; }
bec39cab
AC
4098ac_preproc_ok=false
4099for ac_c_preproc_warn_flag in '' yes
4100do
4101 # Use a header file that comes with gcc, so configuring glibc
4102 # with a fresh cross-compiler works.
4103 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4104 # <limits.h> exists even on freestanding compilers.
4105 # On the NeXT, cc -E runs the code through the compiler's parser,
4106 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4108/* end confdefs.h. */
4109#ifdef __STDC__
4110# include <limits.h>
4111#else
4112# include <assert.h>
4113#endif
4114 Syntax error
4115_ACEOF
81ecdfbb 4116if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4117
81ecdfbb 4118else
bec39cab
AC
4119 # Broken: fails on valid input.
4120continue
4121fi
d0ac1c44 4122rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4123
81ecdfbb 4124 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4125 # can be detected and how.
81ecdfbb 4126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4127/* end confdefs.h. */
4128#include <ac_nonexistent.h>
4129_ACEOF
81ecdfbb 4130if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4131 # Broken: success on invalid input.
4132continue
c906108c 4133else
bec39cab
AC
4134 # Passes both tests.
4135ac_preproc_ok=:
4136break
c906108c 4137fi
d0ac1c44 4138rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4139
bec39cab
AC
4140done
4141# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4142rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4143if $ac_preproc_ok; then :
4144
c906108c 4145else
81ecdfbb
RW
4146 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4148as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4149See \`config.log' for more details" "$LINENO" 5; }
c906108c 4150fi
c906108c 4151
bec39cab
AC
4152ac_ext=c
4153ac_cpp='$CPP $CPPFLAGS'
4154ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4155ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4156ac_compiler_gnu=$ac_cv_c_compiler_gnu
4157
4158
81ecdfbb
RW
4159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4160$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4161if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4162 $as_echo_n "(cached) " >&6
4e8d927d 4163else
81ecdfbb
RW
4164 if test -z "$GREP"; then
4165 ac_path_GREP_found=false
4166 # Loop through the user's path and test for each of PROGNAME-LIST
4167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4168for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4169do
4170 IFS=$as_save_IFS
4171 test -z "$as_dir" && as_dir=.
4172 for ac_prog in grep ggrep; do
4173 for ac_exec_ext in '' $ac_executable_extensions; do
4174 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4175 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4176# Check for GNU ac_path_GREP and select it if it is found.
4177 # Check for GNU $ac_path_GREP
4178case `"$ac_path_GREP" --version 2>&1` in
4179*GNU*)
4180 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4181*)
4182 ac_count=0
4183 $as_echo_n 0123456789 >"conftest.in"
4184 while :
4185 do
4186 cat "conftest.in" "conftest.in" >"conftest.tmp"
4187 mv "conftest.tmp" "conftest.in"
4188 cp "conftest.in" "conftest.nl"
4189 $as_echo 'GREP' >> "conftest.nl"
4190 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4191 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4192 as_fn_arith $ac_count + 1 && ac_count=$as_val
4193 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4194 # Best one so far, save it but keep looking for a better one
4195 ac_cv_path_GREP="$ac_path_GREP"
4196 ac_path_GREP_max=$ac_count
bec39cab 4197 fi
81ecdfbb
RW
4198 # 10*(2^10) chars as input seems more than enough
4199 test $ac_count -gt 10 && break
4200 done
4201 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4202esac
bec39cab 4203
81ecdfbb
RW
4204 $ac_path_GREP_found && break 3
4205 done
4206 done
4207 done
4208IFS=$as_save_IFS
4209 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4210 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4211 fi
c906108c 4212else
81ecdfbb 4213 ac_cv_path_GREP=$GREP
c906108c 4214fi
c906108c 4215
81ecdfbb
RW
4216fi
4217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4218$as_echo "$ac_cv_path_GREP" >&6; }
4219 GREP="$ac_cv_path_GREP"
c906108c 4220
c906108c 4221
81ecdfbb
RW
4222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4223$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4224if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4225 $as_echo_n "(cached) " >&6
783e057b 4226else
81ecdfbb
RW
4227 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4228 then ac_cv_path_EGREP="$GREP -E"
4229 else
4230 if test -z "$EGREP"; then
4231 ac_path_EGREP_found=false
4232 # Loop through the user's path and test for each of PROGNAME-LIST
4233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4234for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4235do
4236 IFS=$as_save_IFS
4237 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4238 for ac_prog in egrep; do
4239 for ac_exec_ext in '' $ac_executable_extensions; do
4240 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4241 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4242# Check for GNU ac_path_EGREP and select it if it is found.
4243 # Check for GNU $ac_path_EGREP
4244case `"$ac_path_EGREP" --version 2>&1` in
4245*GNU*)
4246 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4247*)
4248 ac_count=0
4249 $as_echo_n 0123456789 >"conftest.in"
4250 while :
4251 do
4252 cat "conftest.in" "conftest.in" >"conftest.tmp"
4253 mv "conftest.tmp" "conftest.in"
4254 cp "conftest.in" "conftest.nl"
4255 $as_echo 'EGREP' >> "conftest.nl"
4256 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4257 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4258 as_fn_arith $ac_count + 1 && ac_count=$as_val
4259 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4260 # Best one so far, save it but keep looking for a better one
4261 ac_cv_path_EGREP="$ac_path_EGREP"
4262 ac_path_EGREP_max=$ac_count
4263 fi
4264 # 10*(2^10) chars as input seems more than enough
4265 test $ac_count -gt 10 && break
4266 done
4267 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4268esac
bec39cab 4269
81ecdfbb
RW
4270 $ac_path_EGREP_found && break 3
4271 done
4272 done
4273 done
4274IFS=$as_save_IFS
4275 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4276 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4277 fi
783e057b 4278else
81ecdfbb 4279 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4280fi
4281
81ecdfbb 4282 fi
783e057b 4283fi
81ecdfbb
RW
4284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4285$as_echo "$ac_cv_path_EGREP" >&6; }
4286 EGREP="$ac_cv_path_EGREP"
4287
783e057b 4288
81ecdfbb
RW
4289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4290$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4291if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4292 $as_echo_n "(cached) " >&6
783e057b 4293else
81ecdfbb 4294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4295/* end confdefs.h. */
783e057b 4296#include <stdlib.h>
bec39cab 4297#include <stdarg.h>
783e057b
DJ
4298#include <string.h>
4299#include <float.h>
c906108c 4300
bec39cab
AC
4301int
4302main ()
4303{
c906108c 4304
bec39cab
AC
4305 ;
4306 return 0;
4307}
4308_ACEOF
81ecdfbb 4309if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4310 ac_cv_header_stdc=yes
c906108c 4311else
81ecdfbb 4312 ac_cv_header_stdc=no
c906108c 4313fi
81ecdfbb 4314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4315
783e057b
DJ
4316if test $ac_cv_header_stdc = yes; then
4317 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4319/* end confdefs.h. */
4320#include <string.h>
c906108c 4321
783e057b
DJ
4322_ACEOF
4323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4324 $EGREP "memchr" >/dev/null 2>&1; then :
4325
c906108c 4326else
783e057b 4327 ac_cv_header_stdc=no
c906108c 4328fi
783e057b 4329rm -f conftest*
c906108c
SS
4330
4331fi
4332
783e057b
DJ
4333if test $ac_cv_header_stdc = yes; then
4334 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4336/* end confdefs.h. */
4337#include <stdlib.h>
bec39cab 4338
783e057b
DJ
4339_ACEOF
4340if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4341 $EGREP "free" >/dev/null 2>&1; then :
4342
bec39cab 4343else
783e057b 4344 ac_cv_header_stdc=no
bec39cab 4345fi
783e057b 4346rm -f conftest*
bec39cab
AC
4347
4348fi
bec39cab 4349
783e057b
DJ
4350if test $ac_cv_header_stdc = yes; then
4351 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4352 if test "$cross_compiling" = yes; then :
783e057b 4353 :
bec39cab 4354else
81ecdfbb 4355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4356/* end confdefs.h. */
4357#include <ctype.h>
81ecdfbb 4358#include <stdlib.h>
783e057b
DJ
4359#if ((' ' & 0x0FF) == 0x020)
4360# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4361# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4362#else
4363# define ISLOWER(c) \
4364 (('a' <= (c) && (c) <= 'i') \
4365 || ('j' <= (c) && (c) <= 'r') \
4366 || ('s' <= (c) && (c) <= 'z'))
4367# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4368#endif
4369
4370#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4371int
4372main ()
4373{
4374 int i;
4375 for (i = 0; i < 256; i++)
4376 if (XOR (islower (i), ISLOWER (i))
4377 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4378 return 2;
4379 return 0;
783e057b
DJ
4380}
4381_ACEOF
81ecdfbb 4382if ac_fn_c_try_run "$LINENO"; then :
783e057b 4383
81ecdfbb
RW
4384else
4385 ac_cv_header_stdc=no
783e057b 4386fi
81ecdfbb
RW
4387rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4388 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4389fi
81ecdfbb 4390
783e057b
DJ
4391fi
4392fi
81ecdfbb
RW
4393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4394$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4395if test $ac_cv_header_stdc = yes; then
4396
81ecdfbb 4397$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4398
4399fi
4400
4401# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4402for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4403 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4404do :
4405 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4406ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4407"
d0ac1c44 4408if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4409 cat >>confdefs.h <<_ACEOF
81ecdfbb 4410#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4411_ACEOF
4412
4413fi
4414
4415done
4416
4417
4418
81ecdfbb 4419 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4420if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4421 MINIX=yes
4422else
4423 MINIX=
4424fi
4425
4426
4427 if test "$MINIX" = yes; then
4428
81ecdfbb 4429$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4430
4431
81ecdfbb 4432$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4433
4434
81ecdfbb 4435$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4436
4437 fi
4438
4439
81ecdfbb
RW
4440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4441$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4442if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4443 $as_echo_n "(cached) " >&6
783e057b 4444else
81ecdfbb 4445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4446/* end confdefs.h. */
4447
d0ac1c44
SM
4448# define __EXTENSIONS__ 1
4449 $ac_includes_default
783e057b
DJ
4450int
4451main ()
4452{
4453
4454 ;
4455 return 0;
4456}
4457_ACEOF
81ecdfbb 4458if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4459 ac_cv_safe_to_define___extensions__=yes
4460else
81ecdfbb 4461 ac_cv_safe_to_define___extensions__=no
783e057b 4462fi
81ecdfbb 4463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4464fi
81ecdfbb
RW
4465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4466$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4467 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4468 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4469
81ecdfbb 4470 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4471
81ecdfbb 4472 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4473
81ecdfbb 4474 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4475
81ecdfbb 4476 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4477
4478
c971b7fa
PA
4479ac_aux_dir=
4480for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4481 if test -f "$ac_dir/install-sh"; then
4482 ac_aux_dir=$ac_dir
4483 ac_install_sh="$ac_aux_dir/install-sh -c"
4484 break
4485 elif test -f "$ac_dir/install.sh"; then
4486 ac_aux_dir=$ac_dir
4487 ac_install_sh="$ac_aux_dir/install.sh -c"
4488 break
4489 elif test -f "$ac_dir/shtool"; then
4490 ac_aux_dir=$ac_dir
4491 ac_install_sh="$ac_aux_dir/shtool install -c"
4492 break
4493 fi
c971b7fa
PA
4494done
4495if test -z "$ac_aux_dir"; then
d0ac1c44 4496 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4497fi
770d76d7 4498
c971b7fa
PA
4499# These three variables are undocumented and unsupported,
4500# and are intended to be withdrawn in a future Autoconf release.
4501# They can cause serious problems if a builder's source tree is in a directory
4502# whose full name contains unusual characters.
4503ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4504ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4505ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4506
770d76d7 4507
c971b7fa
PA
4508# Make sure we can run config.sub.
4509$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4510 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4511
c971b7fa
PA
4512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4513$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4514if ${ac_cv_build+:} false; then :
c971b7fa 4515 $as_echo_n "(cached) " >&6
770d76d7 4516else
c971b7fa
PA
4517 ac_build_alias=$build_alias
4518test "x$ac_build_alias" = x &&
4519 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4520test "x$ac_build_alias" = x &&
d0ac1c44 4521 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4522ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4523 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4524
770d76d7 4525fi
c971b7fa
PA
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4527$as_echo "$ac_cv_build" >&6; }
4528case $ac_cv_build in
4529*-*-*) ;;
d0ac1c44 4530*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4531esac
c971b7fa
PA
4532build=$ac_cv_build
4533ac_save_IFS=$IFS; IFS='-'
4534set x $ac_cv_build
4535shift
4536build_cpu=$1
4537build_vendor=$2
4538shift; shift
4539# Remember, the first character of IFS is used to create $*,
4540# except with old shells:
4541build_os=$*
4542IFS=$ac_save_IFS
4543case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4544
4545
c971b7fa
PA
4546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4547$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4548if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4549 $as_echo_n "(cached) " >&6
4550else
c971b7fa
PA
4551 if test "x$host_alias" = x; then
4552 ac_cv_host=$ac_cv_build
81ecdfbb 4553else
c971b7fa 4554 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4555 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4556fi
81ecdfbb
RW
4557
4558fi
c971b7fa
PA
4559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4560$as_echo "$ac_cv_host" >&6; }
4561case $ac_cv_host in
4562*-*-*) ;;
d0ac1c44 4563*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4564esac
c971b7fa
PA
4565host=$ac_cv_host
4566ac_save_IFS=$IFS; IFS='-'
4567set x $ac_cv_host
4568shift
4569host_cpu=$1
4570host_vendor=$2
4571shift; shift
4572# Remember, the first character of IFS is used to create $*,
4573# except with old shells:
4574host_os=$*
4575IFS=$ac_save_IFS
4576case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4577
4578
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4580$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4581if ${ac_cv_target+:} false; then :
3388710e
JM
4582 $as_echo_n "(cached) " >&6
4583else
4584 if test "x$target_alias" = x; then
4585 ac_cv_target=$ac_cv_host
4586else
4587 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4588 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4589fi
4590
4591fi
4592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4593$as_echo "$ac_cv_target" >&6; }
4594case $ac_cv_target in
4595*-*-*) ;;
d0ac1c44 4596*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4597esac
4598target=$ac_cv_target
4599ac_save_IFS=$IFS; IFS='-'
4600set x $ac_cv_target
4601shift
4602target_cpu=$1
4603target_vendor=$2
4604shift; shift
4605# Remember, the first character of IFS is used to create $*,
4606# except with old shells:
4607target_os=$*
4608IFS=$ac_save_IFS
4609case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4610
4611
4612# The aliases save the names the user supplied, while $host etc.
4613# will get canonicalized.
4614test -n "$target_alias" &&
4615 test "$program_prefix$program_suffix$program_transform_name" = \
4616 NONENONEs,x,x, &&
4617 program_prefix=${target_alias}-
4618
4619# The tests for host and target for $enable_largefile require
4620# canonical names.
4621
4622
81ecdfbb 4623
da2f07f1
JK
4624# As the $enable_largefile decision depends on --enable-plugins we must set it
4625# even in directories otherwise not depending on the $plugins option.
4626
4627
2974be62
AM
4628 maybe_plugins=no
4629 for ac_header in dlfcn.h
4630do :
4631 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4632"
d0ac1c44 4633if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4634 cat >>confdefs.h <<_ACEOF
4635#define HAVE_DLFCN_H 1
4636_ACEOF
4637 maybe_plugins=yes
4638fi
4639
4640done
4641
4642 for ac_header in windows.h
4643do :
4644 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4645"
d0ac1c44 4646if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4647 cat >>confdefs.h <<_ACEOF
4648#define HAVE_WINDOWS_H 1
4649_ACEOF
4650 maybe_plugins=yes
4651fi
4652
4653done
4654
4655
4656 # Check whether --enable-plugins was given.
da2f07f1
JK
4657if test "${enable_plugins+set}" = set; then :
4658 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4659 no) plugins=no ;;
4660 *) plugins=yes
4661 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4662 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4663 fi ;;
4664 esac
da2f07f1 4665else
2974be62
AM
4666 plugins=$maybe_plugins
4667
da2f07f1
JK
4668fi
4669
2974be62 4670 if test "$plugins" = "yes"; then
458412c3
TT
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4672$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4673if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4674 $as_echo_n "(cached) " >&6
4675else
4676 ac_func_search_save_LIBS=$LIBS
4677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4678/* end confdefs.h. */
4679
4680/* Override any GCC internal prototype to avoid an error.
4681 Use char because int might match the return type of a GCC
4682 builtin and then its argument prototype would still apply. */
4683#ifdef __cplusplus
4684extern "C"
4685#endif
458412c3 4686char dlsym ();
2974be62
AM
4687int
4688main ()
4689{
458412c3 4690return dlsym ();
2974be62
AM
4691 ;
4692 return 0;
4693}
4694_ACEOF
4695for ac_lib in '' dl; do
4696 if test -z "$ac_lib"; then
4697 ac_res="none required"
4698 else
4699 ac_res=-l$ac_lib
4700 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4701 fi
4702 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4703 ac_cv_search_dlsym=$ac_res
2974be62
AM
4704fi
4705rm -f core conftest.err conftest.$ac_objext \
4706 conftest$ac_exeext
d0ac1c44 4707 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4708 break
4709fi
4710done
d0ac1c44 4711if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4712
4713else
458412c3 4714 ac_cv_search_dlsym=no
2974be62
AM
4715fi
4716rm conftest.$ac_ext
4717LIBS=$ac_func_search_save_LIBS
4718fi
458412c3
TT
4719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4720$as_echo "$ac_cv_search_dlsym" >&6; }
4721ac_res=$ac_cv_search_dlsym
2974be62
AM
4722if test "$ac_res" != no; then :
4723 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4724
4725fi
4726
4727 fi
da2f07f1
JK
4728
4729
4730case "${host}" in
4731 sparc-*-solaris*|i[3-7]86-*-solaris*)
4732 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4733 # are mutually exclusive; and without procfs support, the bfd/ elf module
4734 # cannot provide certain routines such as elfcore_write_prpsinfo
4735 # or elfcore_write_prstatus. So unless the user explicitly requested
4736 # large-file support through the --enable-largefile switch, disable
4737 # large-file support in favor of procfs support.
4738 test "${target}" = "${host}" -a "x$plugins" = xno \
4739 && : ${enable_largefile="no"}
4740 ;;
4741esac
4742
4743# Check whether --enable-largefile was given.
4744if test "${enable_largefile+set}" = set; then :
4745 enableval=$enable_largefile;
4746fi
4747
4748if test "$enable_largefile" != no; then
4749
4750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4751$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4752if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4753 $as_echo_n "(cached) " >&6
4754else
4755 ac_cv_sys_largefile_CC=no
4756 if test "$GCC" != yes; then
4757 ac_save_CC=$CC
4758 while :; do
4759 # IRIX 6.2 and later do not support large files by default,
4760 # so use the C compiler's -n32 option if that helps.
4761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4762/* end confdefs.h. */
4763#include <sys/types.h>
4764 /* Check that off_t can represent 2**63 - 1 correctly.
4765 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4766 since some C++ compilers masquerading as C compilers
4767 incorrectly reject 9223372036854775807. */
4768#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4769 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4770 && LARGE_OFF_T % 2147483647 == 1)
4771 ? 1 : -1];
4772int
4773main ()
4774{
4775
4776 ;
4777 return 0;
4778}
4779_ACEOF
4780 if ac_fn_c_try_compile "$LINENO"; then :
4781 break
4782fi
4783rm -f core conftest.err conftest.$ac_objext
4784 CC="$CC -n32"
4785 if ac_fn_c_try_compile "$LINENO"; then :
4786 ac_cv_sys_largefile_CC=' -n32'; break
4787fi
4788rm -f core conftest.err conftest.$ac_objext
4789 break
4790 done
4791 CC=$ac_save_CC
4792 rm -f conftest.$ac_ext
4793 fi
4794fi
4795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4796$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4797 if test "$ac_cv_sys_largefile_CC" != no; then
4798 CC=$CC$ac_cv_sys_largefile_CC
4799 fi
4800
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4802$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4803if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4804 $as_echo_n "(cached) " >&6
4805else
4806 while :; do
4807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4808/* end confdefs.h. */
4809#include <sys/types.h>
4810 /* Check that off_t can represent 2**63 - 1 correctly.
4811 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4812 since some C++ compilers masquerading as C compilers
4813 incorrectly reject 9223372036854775807. */
4814#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4815 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4816 && LARGE_OFF_T % 2147483647 == 1)
4817 ? 1 : -1];
4818int
4819main ()
4820{
4821
4822 ;
4823 return 0;
4824}
4825_ACEOF
4826if ac_fn_c_try_compile "$LINENO"; then :
4827 ac_cv_sys_file_offset_bits=no; break
4828fi
4829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4831/* end confdefs.h. */
4832#define _FILE_OFFSET_BITS 64
4833#include <sys/types.h>
4834 /* Check that off_t can represent 2**63 - 1 correctly.
4835 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4836 since some C++ compilers masquerading as C compilers
4837 incorrectly reject 9223372036854775807. */
4838#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4839 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4840 && LARGE_OFF_T % 2147483647 == 1)
4841 ? 1 : -1];
4842int
4843main ()
4844{
4845
4846 ;
4847 return 0;
4848}
4849_ACEOF
4850if ac_fn_c_try_compile "$LINENO"; then :
4851 ac_cv_sys_file_offset_bits=64; break
4852fi
4853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4854 ac_cv_sys_file_offset_bits=unknown
4855 break
4856done
4857fi
4858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4859$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4860case $ac_cv_sys_file_offset_bits in #(
4861 no | unknown) ;;
4862 *)
4863cat >>confdefs.h <<_ACEOF
4864#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4865_ACEOF
4866;;
4867esac
4868rm -rf conftest*
4869 if test $ac_cv_sys_file_offset_bits = unknown; then
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4871$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4872if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4873 $as_echo_n "(cached) " >&6
4874else
4875 while :; do
4876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4877/* end confdefs.h. */
4878#include <sys/types.h>
4879 /* Check that off_t can represent 2**63 - 1 correctly.
4880 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4881 since some C++ compilers masquerading as C compilers
4882 incorrectly reject 9223372036854775807. */
4883#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4884 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4885 && LARGE_OFF_T % 2147483647 == 1)
4886 ? 1 : -1];
4887int
4888main ()
4889{
4890
4891 ;
4892 return 0;
4893}
4894_ACEOF
4895if ac_fn_c_try_compile "$LINENO"; then :
4896 ac_cv_sys_large_files=no; break
4897fi
4898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4900/* end confdefs.h. */
4901#define _LARGE_FILES 1
4902#include <sys/types.h>
4903 /* Check that off_t can represent 2**63 - 1 correctly.
4904 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4905 since some C++ compilers masquerading as C compilers
4906 incorrectly reject 9223372036854775807. */
4907#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4908 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4909 && LARGE_OFF_T % 2147483647 == 1)
4910 ? 1 : -1];
4911int
4912main ()
4913{
4914
4915 ;
4916 return 0;
4917}
4918_ACEOF
4919if ac_fn_c_try_compile "$LINENO"; then :
4920 ac_cv_sys_large_files=1; break
4921fi
4922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4923 ac_cv_sys_large_files=unknown
4924 break
4925done
4926fi
4927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4928$as_echo "$ac_cv_sys_large_files" >&6; }
4929case $ac_cv_sys_large_files in #(
4930 no | unknown) ;;
4931 *)
4932cat >>confdefs.h <<_ACEOF
4933#define _LARGE_FILES $ac_cv_sys_large_files
4934_ACEOF
4935;;
4936esac
4937rm -rf conftest*
4938 fi
d0ac1c44
SM
4939
4940
da2f07f1
JK
4941fi
4942
4943
4944
81ecdfbb
RW
4945
4946
4947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4948$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4949if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4950 $as_echo_n "(cached) " >&6
4951else
4952 am_cv_prog_cc_stdc=no
4953ac_save_CC="$CC"
4954# Don't try gcc -ansi; that turns off useful extensions and
4955# breaks some systems' header files.
4956# AIX -qlanglvl=ansi
4957# Ultrix and OSF/1 -std1
4958# HP-UX 10.20 and later -Ae
4959# HP-UX older versions -Aa -D_HPUX_SOURCE
4960# SVR4 -Xc -D__EXTENSIONS__
4961for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4962do
783e057b 4963 CC="$ac_save_CC $ac_arg"
81ecdfbb 4964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4965/* end confdefs.h. */
4966#include <stdarg.h>
4967#include <stdio.h>
4968#include <sys/types.h>
4969#include <sys/stat.h>
4970/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4971struct buf { int x; };
4972FILE * (*rcsopen) (struct buf *, struct stat *, int);
4973static char *e (p, i)
4974 char **p;
4975 int i;
4976{
4977 return p[i];
4978}
4979static char *f (char * (*g) (char **, int), char **p, ...)
4980{
4981 char *s;
4982 va_list v;
4983 va_start (v,p);
4984 s = g (p, va_arg (v,int));
4985 va_end (v);
4986 return s;
4987}
4988int test (int i, double x);
4989struct s1 {int (*f) (int a);};
4990struct s2 {int (*f) (double a);};
4991int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4992int argc;
4993char **argv;
4994
4995int
4996main ()
4997{
4998
4999return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5000
5001 ;
5002 return 0;
5003}
5004_ACEOF
81ecdfbb 5005if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5006 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 5007fi
81ecdfbb 5008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5009done
5010CC="$ac_save_CC"
5011
5012fi
5013
5014if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
5015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5016$as_echo "none needed" >&6; }
783e057b 5017else
81ecdfbb
RW
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5019$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
5020fi
5021case "x$am_cv_prog_cc_stdc" in
5022 x|xno) ;;
5023 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5024esac
5025
d0ac1c44
SM
5026# Expand $ac_aux_dir to an absolute path.
5027am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 5028
d0ac1c44 5029if test x"${install_sh+set}" != xset; then
4869db5e
RM
5030 case $am_aux_dir in
5031 *\ * | *\ *)
5032 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5033 *)
5034 install_sh="\${SHELL} $am_aux_dir/install-sh"
5035 esac
5036fi
5037
d0ac1c44
SM
5038# Installed binaries are usually stripped using 'strip' when the user
5039# run "make install-strip". However 'strip' might not be the right
4869db5e 5040# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 5041# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
5042if test "$cross_compiling" != no; then
5043 if test -n "$ac_tool_prefix"; then
5044 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5045set dummy ${ac_tool_prefix}strip; ac_word=$2
5046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5047$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5048if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
5049 $as_echo_n "(cached) " >&6
5050else
5051 if test -n "$STRIP"; then
5052 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5053else
5054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5055for as_dir in $PATH
5056do
5057 IFS=$as_save_IFS
5058 test -z "$as_dir" && as_dir=.
5059 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5060 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5061 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5063 break 2
5064 fi
5065done
5066 done
5067IFS=$as_save_IFS
5068
5069fi
5070fi
5071STRIP=$ac_cv_prog_STRIP
5072if test -n "$STRIP"; then
5073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5074$as_echo "$STRIP" >&6; }
5075else
5076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5077$as_echo "no" >&6; }
5078fi
5079
5080
5081fi
5082if test -z "$ac_cv_prog_STRIP"; then
5083 ac_ct_STRIP=$STRIP
5084 # Extract the first word of "strip", so it can be a program name with args.
5085set dummy strip; ac_word=$2
5086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5087$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5088if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5089 $as_echo_n "(cached) " >&6
5090else
5091 if test -n "$ac_ct_STRIP"; then
5092 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5093else
5094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5095for as_dir in $PATH
5096do
5097 IFS=$as_save_IFS
5098 test -z "$as_dir" && as_dir=.
5099 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5101 ac_cv_prog_ac_ct_STRIP="strip"
5102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5103 break 2
5104 fi
5105done
5106 done
5107IFS=$as_save_IFS
5108
5109fi
5110fi
5111ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5112if test -n "$ac_ct_STRIP"; then
5113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5114$as_echo "$ac_ct_STRIP" >&6; }
5115else
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5117$as_echo "no" >&6; }
5118fi
5119
5120 if test "x$ac_ct_STRIP" = x; then
5121 STRIP=":"
5122 else
5123 case $cross_compiling:$ac_tool_warned in
5124yes:)
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5126$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5127ac_tool_warned=yes ;;
5128esac
5129 STRIP=$ac_ct_STRIP
5130 fi
5131else
5132 STRIP="$ac_cv_prog_STRIP"
5133fi
5134
5135fi
5136INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5137
783e057b
DJ
5138
5139ac_aux_dir=
81ecdfbb 5140for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5141 if test -f "$ac_dir/install-sh"; then
5142 ac_aux_dir=$ac_dir
5143 ac_install_sh="$ac_aux_dir/install-sh -c"
5144 break
5145 elif test -f "$ac_dir/install.sh"; then
5146 ac_aux_dir=$ac_dir
5147 ac_install_sh="$ac_aux_dir/install.sh -c"
5148 break
5149 elif test -f "$ac_dir/shtool"; then
5150 ac_aux_dir=$ac_dir
5151 ac_install_sh="$ac_aux_dir/shtool install -c"
5152 break
5153 fi
783e057b
DJ
5154done
5155if test -z "$ac_aux_dir"; then
d0ac1c44 5156 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5157fi
81ecdfbb
RW
5158
5159# These three variables are undocumented and unsupported,
5160# and are intended to be withdrawn in a future Autoconf release.
5161# They can cause serious problems if a builder's source tree is in a directory
5162# whose full name contains unusual characters.
5163ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5164ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5165ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5166
783e057b 5167
783e057b 5168
9009e1ae
MR
5169test "$program_prefix" != NONE &&
5170 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5171# Use a double $ so make ignores it.
5172test "$program_suffix" != NONE &&
5173 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5174# Double any \ or $.
5175# By default was `s,x,x', remove it if useless.
5176ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5177program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5178
81ecdfbb 5179
0bcda685
PA
5180# We require a C++11 compiler. Check if one is available, and if
5181# necessary, set CXX_DIALECT to some -std=xxx switch.
5182
41260ac2 5183 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5184 ac_ext=cpp
5185ac_cpp='$CXXCPP $CPPFLAGS'
5186ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5187ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5188ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5189 CXX_DIALECT=""
5190 ac_success=no
5191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5192$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5193if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5194 $as_echo_n "(cached) " >&6
5195else
5196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5197/* end confdefs.h. */
5198
5199
5200// If the compiler admits that it is not ready for C++11, why torture it?
5201// Hopefully, this will speed up the test.
5202
5203#ifndef __cplusplus
5204
5205#error "This is not a C++ compiler"
5206
5207#elif __cplusplus < 201103L
5208
5209#error "This is not a C++11 compiler"
5210
5211#else
5212
5213namespace cxx11
5214{
5215
5216 namespace test_static_assert
5217 {
5218
5219 template <typename T>
5220 struct check
5221 {
5222 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5223 };
5224
5225 }
5226
5227 namespace test_final_override
5228 {
5229
5230 struct Base
5231 {
5232 virtual void f() {}
5233 };
5234
5235 struct Derived : public Base
5236 {
5237 virtual void f() override {}
5238 };
5239
5240 }
5241
5242 namespace test_double_right_angle_brackets
5243 {
5244
5245 template < typename T >
5246 struct check {};
5247
5248 typedef check<void> single_type;
5249 typedef check<check<void>> double_type;
5250 typedef check<check<check<void>>> triple_type;
5251 typedef check<check<check<check<void>>>> quadruple_type;
5252
5253 }
5254
5255 namespace test_decltype
5256 {
5257
5258 int
5259 f()
5260 {
5261 int a = 1;
5262 decltype(a) b = 2;
5263 return a + b;
5264 }
5265
5266 }
5267
5268 namespace test_type_deduction
5269 {
5270
5271 template < typename T1, typename T2 >
5272 struct is_same
5273 {
5274 static const bool value = false;
5275 };
5276
5277 template < typename T >
5278 struct is_same<T, T>
5279 {
5280 static const bool value = true;
5281 };
5282
5283 template < typename T1, typename T2 >
5284 auto
5285 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5286 {
5287 return a1 + a2;
5288 }
5289
5290 int
5291 test(const int c, volatile int v)
5292 {
5293 static_assert(is_same<int, decltype(0)>::value == true, "");
5294 static_assert(is_same<int, decltype(c)>::value == false, "");
5295 static_assert(is_same<int, decltype(v)>::value == false, "");
5296 auto ac = c;
5297 auto av = v;
5298 auto sumi = ac + av + 'x';
5299 auto sumf = ac + av + 1.0;
5300 static_assert(is_same<int, decltype(ac)>::value == true, "");
5301 static_assert(is_same<int, decltype(av)>::value == true, "");
5302 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5303 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5304 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5305 return (sumf > 0.0) ? sumi : add(c, v);
5306 }
5307
5308 }
5309
5310 namespace test_noexcept
5311 {
5312
5313 int f() { return 0; }
5314 int g() noexcept { return 0; }
5315
5316 static_assert(noexcept(f()) == false, "");
5317 static_assert(noexcept(g()) == true, "");
5318
5319 }
5320
5321 namespace test_constexpr
5322 {
5323
5324 template < typename CharT >
5325 unsigned long constexpr
5326 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5327 {
5328 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5329 }
5330
5331 template < typename CharT >
5332 unsigned long constexpr
5333 strlen_c(const CharT *const s) noexcept
5334 {
5335 return strlen_c_r(s, 0UL);
5336 }
5337
5338 static_assert(strlen_c("") == 0UL, "");
5339 static_assert(strlen_c("1") == 1UL, "");
5340 static_assert(strlen_c("example") == 7UL, "");
5341 static_assert(strlen_c("another\0example") == 7UL, "");
5342
5343 }
5344
5345 namespace test_rvalue_references
5346 {
5347
5348 template < int N >
5349 struct answer
5350 {
5351 static constexpr int value = N;
5352 };
5353
5354 answer<1> f(int&) { return answer<1>(); }
5355 answer<2> f(const int&) { return answer<2>(); }
5356 answer<3> f(int&&) { return answer<3>(); }
5357
5358 void
5359 test()
5360 {
5361 int i = 0;
5362 const int c = 0;
5363 static_assert(decltype(f(i))::value == 1, "");
5364 static_assert(decltype(f(c))::value == 2, "");
5365 static_assert(decltype(f(0))::value == 3, "");
5366 }
5367
5368 }
5369
5370 namespace test_uniform_initialization
5371 {
5372
5373 struct test
5374 {
5375 static const int zero {};
5376 static const int one {1};
5377 };
5378
5379 static_assert(test::zero == 0, "");
5380 static_assert(test::one == 1, "");
5381
5382 }
5383
5384 namespace test_lambdas
5385 {
5386
5387 void
5388 test1()
5389 {
5390 auto lambda1 = [](){};
5391 auto lambda2 = lambda1;
5392 lambda1();
5393 lambda2();
5394 }
5395
5396 int
5397 test2()
5398 {
5399 auto a = [](int i, int j){ return i + j; }(1, 2);
5400 auto b = []() -> int { return '0'; }();
5401 auto c = [=](){ return a + b; }();
5402 auto d = [&](){ return c; }();
5403 auto e = [a, &b](int x) mutable {
5404 const auto identity = [](int y){ return y; };
5405 for (auto i = 0; i < a; ++i)
5406 a += b--;
5407 return x + identity(a + b);
5408 }(0);
5409 return a + b + c + d + e;
5410 }
5411
5412 int
5413 test3()
5414 {
5415 const auto nullary = [](){ return 0; };
5416 const auto unary = [](int x){ return x; };
5417 using nullary_t = decltype(nullary);
5418 using unary_t = decltype(unary);
5419 const auto higher1st = [](nullary_t f){ return f(); };
5420 const auto higher2nd = [unary](nullary_t f1){
5421 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5422 };
5423 return higher1st(nullary) + higher2nd(nullary)(unary);
5424 }
5425
5426 }
5427
5428 namespace test_variadic_templates
5429 {
5430
5431 template <int...>
5432 struct sum;
5433
5434 template <int N0, int... N1toN>
5435 struct sum<N0, N1toN...>
5436 {
5437 static constexpr auto value = N0 + sum<N1toN...>::value;
5438 };
5439
5440 template <>
5441 struct sum<>
5442 {
5443 static constexpr auto value = 0;
5444 };
5445
5446 static_assert(sum<>::value == 0, "");
5447 static_assert(sum<1>::value == 1, "");
5448 static_assert(sum<23>::value == 23, "");
5449 static_assert(sum<1, 2>::value == 3, "");
5450 static_assert(sum<5, 5, 11>::value == 21, "");
5451 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5452
5453 }
5454
5455 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5456 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5457 // because of this.
5458 namespace test_template_alias_sfinae
5459 {
5460
5461 struct foo {};
5462
5463 template<typename T>
5464 using member = typename T::member_type;
5465
5466 template<typename T>
5467 void func(...) {}
5468
5469 template<typename T>
5470 void func(member<T>*) {}
5471
5472 void test();
5473
5474 void test() { func<foo>(0); }
5475
5476 }
5477
5478} // namespace cxx11
5479
5480#endif // __cplusplus >= 201103L
5481
5482
5483
5484_ACEOF
5485if ac_fn_cxx_try_compile "$LINENO"; then :
5486 ax_cv_cxx_compile_cxx11=yes
5487else
5488 ax_cv_cxx_compile_cxx11=no
5489fi
5490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5491fi
5492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5493$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5494 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5495 ac_success=yes
5496 fi
5497
5498 if test x$ac_success = xno; then
41260ac2
SM
5499 for alternative in ${ax_cxx_compile_alternatives}; do
5500 switch="-std=gnu++${alternative}"
0bcda685
PA
5501 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5503$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5504if eval \${$cachevar+:} false; then :
0bcda685
PA
5505 $as_echo_n "(cached) " >&6
5506else
5507 ac_save_CXX="$CXX"
5508 CXX="$CXX $switch"
5509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5510/* end confdefs.h. */
5511
5512
5513// If the compiler admits that it is not ready for C++11, why torture it?
5514// Hopefully, this will speed up the test.
5515
5516#ifndef __cplusplus
5517
5518#error "This is not a C++ compiler"
5519
5520#elif __cplusplus < 201103L
5521
5522#error "This is not a C++11 compiler"
5523
5524#else
5525
5526namespace cxx11
5527{
5528
5529 namespace test_static_assert
5530 {
5531
5532 template <typename T>
5533 struct check
5534 {
5535 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5536 };
5537
5538 }
5539
5540 namespace test_final_override
5541 {
5542
5543 struct Base
5544 {
5545 virtual void f() {}
5546 };
5547
5548 struct Derived : public Base
5549 {
5550 virtual void f() override {}
5551 };
5552
5553 }
5554
5555 namespace test_double_right_angle_brackets
5556 {
5557
5558 template < typename T >
5559 struct check {};
5560
5561 typedef check<void> single_type;
5562 typedef check<check<void>> double_type;
5563 typedef check<check<check<void>>> triple_type;
5564 typedef check<check<check<check<void>>>> quadruple_type;
5565
5566 }
5567
5568 namespace test_decltype
5569 {
5570
5571 int
5572 f()
5573 {
5574 int a = 1;
5575 decltype(a) b = 2;
5576 return a + b;
5577 }
5578
5579 }
5580
5581 namespace test_type_deduction
5582 {
5583
5584 template < typename T1, typename T2 >
5585 struct is_same
5586 {
5587 static const bool value = false;
5588 };
5589
5590 template < typename T >
5591 struct is_same<T, T>
5592 {
5593 static const bool value = true;
5594 };
5595
5596 template < typename T1, typename T2 >
5597 auto
5598 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5599 {
5600 return a1 + a2;
5601 }
5602
5603 int
5604 test(const int c, volatile int v)
5605 {
5606 static_assert(is_same<int, decltype(0)>::value == true, "");
5607 static_assert(is_same<int, decltype(c)>::value == false, "");
5608 static_assert(is_same<int, decltype(v)>::value == false, "");
5609 auto ac = c;
5610 auto av = v;
5611 auto sumi = ac + av + 'x';
5612 auto sumf = ac + av + 1.0;
5613 static_assert(is_same<int, decltype(ac)>::value == true, "");
5614 static_assert(is_same<int, decltype(av)>::value == true, "");
5615 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5616 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5617 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5618 return (sumf > 0.0) ? sumi : add(c, v);
5619 }
5620
5621 }
5622
5623 namespace test_noexcept
5624 {
5625
5626 int f() { return 0; }
5627 int g() noexcept { return 0; }
5628
5629 static_assert(noexcept(f()) == false, "");
5630 static_assert(noexcept(g()) == true, "");
5631
5632 }
5633
5634 namespace test_constexpr
5635 {
5636
5637 template < typename CharT >
5638 unsigned long constexpr
5639 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5640 {
5641 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5642 }
5643
5644 template < typename CharT >
5645 unsigned long constexpr
5646 strlen_c(const CharT *const s) noexcept
5647 {
5648 return strlen_c_r(s, 0UL);
5649 }
5650
5651 static_assert(strlen_c("") == 0UL, "");
5652 static_assert(strlen_c("1") == 1UL, "");
5653 static_assert(strlen_c("example") == 7UL, "");
5654 static_assert(strlen_c("another\0example") == 7UL, "");
5655
5656 }
5657
5658 namespace test_rvalue_references
5659 {
5660
5661 template < int N >
5662 struct answer
5663 {
5664 static constexpr int value = N;
5665 };
5666
5667 answer<1> f(int&) { return answer<1>(); }
5668 answer<2> f(const int&) { return answer<2>(); }
5669 answer<3> f(int&&) { return answer<3>(); }
5670
5671 void
5672 test()
5673 {
5674 int i = 0;
5675 const int c = 0;
5676 static_assert(decltype(f(i))::value == 1, "");
5677 static_assert(decltype(f(c))::value == 2, "");
5678 static_assert(decltype(f(0))::value == 3, "");
5679 }
5680
5681 }
5682
5683 namespace test_uniform_initialization
5684 {
5685
5686 struct test
5687 {
5688 static const int zero {};
5689 static const int one {1};
5690 };
5691
5692 static_assert(test::zero == 0, "");
5693 static_assert(test::one == 1, "");
5694
5695 }
5696
5697 namespace test_lambdas
5698 {
5699
5700 void
5701 test1()
5702 {
5703 auto lambda1 = [](){};
5704 auto lambda2 = lambda1;
5705 lambda1();
5706 lambda2();
5707 }
5708
5709 int
5710 test2()
5711 {
5712 auto a = [](int i, int j){ return i + j; }(1, 2);
5713 auto b = []() -> int { return '0'; }();
5714 auto c = [=](){ return a + b; }();
5715 auto d = [&](){ return c; }();
5716 auto e = [a, &b](int x) mutable {
5717 const auto identity = [](int y){ return y; };
5718 for (auto i = 0; i < a; ++i)
5719 a += b--;
5720 return x + identity(a + b);
5721 }(0);
5722 return a + b + c + d + e;
5723 }
5724
5725 int
5726 test3()
5727 {
5728 const auto nullary = [](){ return 0; };
5729 const auto unary = [](int x){ return x; };
5730 using nullary_t = decltype(nullary);
5731 using unary_t = decltype(unary);
5732 const auto higher1st = [](nullary_t f){ return f(); };
5733 const auto higher2nd = [unary](nullary_t f1){
5734 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5735 };
5736 return higher1st(nullary) + higher2nd(nullary)(unary);
5737 }
5738
5739 }
5740
5741 namespace test_variadic_templates
5742 {
5743
5744 template <int...>
5745 struct sum;
5746
5747 template <int N0, int... N1toN>
5748 struct sum<N0, N1toN...>
5749 {
5750 static constexpr auto value = N0 + sum<N1toN...>::value;
5751 };
5752
5753 template <>
5754 struct sum<>
5755 {
5756 static constexpr auto value = 0;
5757 };
5758
5759 static_assert(sum<>::value == 0, "");
5760 static_assert(sum<1>::value == 1, "");
5761 static_assert(sum<23>::value == 23, "");
5762 static_assert(sum<1, 2>::value == 3, "");
5763 static_assert(sum<5, 5, 11>::value == 21, "");
5764 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5765
5766 }
5767
5768 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5769 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5770 // because of this.
5771 namespace test_template_alias_sfinae
5772 {
5773
5774 struct foo {};
5775
5776 template<typename T>
5777 using member = typename T::member_type;
5778
5779 template<typename T>
5780 void func(...) {}
5781
5782 template<typename T>
5783 void func(member<T>*) {}
5784
5785 void test();
5786
5787 void test() { func<foo>(0); }
5788
5789 }
5790
5791} // namespace cxx11
5792
5793#endif // __cplusplus >= 201103L
5794
5795
5796
5797_ACEOF
5798if ac_fn_cxx_try_compile "$LINENO"; then :
5799 eval $cachevar=yes
5800else
5801 eval $cachevar=no
5802fi
5803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5804 CXX="$ac_save_CXX"
5805fi
5806eval ac_res=\$$cachevar
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5808$as_echo "$ac_res" >&6; }
5809 if eval test x\$$cachevar = xyes; then
5810 CXX_DIALECT="$switch"
5811 ac_success=yes
5812 break
5813 fi
5814 done
5815 fi
5816
5817 if test x$ac_success = xno; then
41260ac2
SM
5818 for alternative in ${ax_cxx_compile_alternatives}; do
5819 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5820 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5822$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5823if eval \${$cachevar+:} false; then :
0bcda685
PA
5824 $as_echo_n "(cached) " >&6
5825else
5826 ac_save_CXX="$CXX"
41260ac2
SM
5827 CXX="$CXX $switch"
5828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5829/* end confdefs.h. */
5830
5831
5832// If the compiler admits that it is not ready for C++11, why torture it?
5833// Hopefully, this will speed up the test.
5834
5835#ifndef __cplusplus
5836
5837#error "This is not a C++ compiler"
5838
5839#elif __cplusplus < 201103L
5840
5841#error "This is not a C++11 compiler"
5842
5843#else
5844
5845namespace cxx11
5846{
5847
5848 namespace test_static_assert
5849 {
5850
5851 template <typename T>
5852 struct check
5853 {
5854 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5855 };
5856
5857 }
5858
5859 namespace test_final_override
5860 {
5861
5862 struct Base
5863 {
5864 virtual void f() {}
5865 };
5866
5867 struct Derived : public Base
5868 {
5869 virtual void f() override {}
5870 };
5871
5872 }
5873
5874 namespace test_double_right_angle_brackets
5875 {
5876
5877 template < typename T >
5878 struct check {};
5879
5880 typedef check<void> single_type;
5881 typedef check<check<void>> double_type;
5882 typedef check<check<check<void>>> triple_type;
5883 typedef check<check<check<check<void>>>> quadruple_type;
5884
5885 }
5886
5887 namespace test_decltype
5888 {
5889
5890 int
5891 f()
5892 {
5893 int a = 1;
5894 decltype(a) b = 2;
5895 return a + b;
5896 }
5897
5898 }
5899
5900 namespace test_type_deduction
5901 {
5902
5903 template < typename T1, typename T2 >
5904 struct is_same
5905 {
5906 static const bool value = false;
5907 };
5908
5909 template < typename T >
5910 struct is_same<T, T>
5911 {
5912 static const bool value = true;
5913 };
5914
5915 template < typename T1, typename T2 >
5916 auto
5917 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5918 {
5919 return a1 + a2;
5920 }
5921
5922 int
5923 test(const int c, volatile int v)
5924 {
5925 static_assert(is_same<int, decltype(0)>::value == true, "");
5926 static_assert(is_same<int, decltype(c)>::value == false, "");
5927 static_assert(is_same<int, decltype(v)>::value == false, "");
5928 auto ac = c;
5929 auto av = v;
5930 auto sumi = ac + av + 'x';
5931 auto sumf = ac + av + 1.0;
5932 static_assert(is_same<int, decltype(ac)>::value == true, "");
5933 static_assert(is_same<int, decltype(av)>::value == true, "");
5934 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5935 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5936 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5937 return (sumf > 0.0) ? sumi : add(c, v);
5938 }
5939
5940 }
5941
5942 namespace test_noexcept
5943 {
5944
5945 int f() { return 0; }
5946 int g() noexcept { return 0; }
5947
5948 static_assert(noexcept(f()) == false, "");
5949 static_assert(noexcept(g()) == true, "");
5950
5951 }
5952
5953 namespace test_constexpr
5954 {
5955
5956 template < typename CharT >
5957 unsigned long constexpr
5958 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5959 {
5960 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5961 }
5962
5963 template < typename CharT >
5964 unsigned long constexpr
5965 strlen_c(const CharT *const s) noexcept
5966 {
5967 return strlen_c_r(s, 0UL);
5968 }
5969
5970 static_assert(strlen_c("") == 0UL, "");
5971 static_assert(strlen_c("1") == 1UL, "");
5972 static_assert(strlen_c("example") == 7UL, "");
5973 static_assert(strlen_c("another\0example") == 7UL, "");
5974
5975 }
5976
5977 namespace test_rvalue_references
5978 {
5979
5980 template < int N >
5981 struct answer
5982 {
5983 static constexpr int value = N;
5984 };
5985
5986 answer<1> f(int&) { return answer<1>(); }
5987 answer<2> f(const int&) { return answer<2>(); }
5988 answer<3> f(int&&) { return answer<3>(); }
5989
5990 void
5991 test()
5992 {
5993 int i = 0;
5994 const int c = 0;
5995 static_assert(decltype(f(i))::value == 1, "");
5996 static_assert(decltype(f(c))::value == 2, "");
5997 static_assert(decltype(f(0))::value == 3, "");
5998 }
5999
6000 }
6001
6002 namespace test_uniform_initialization
6003 {
6004
6005 struct test
6006 {
6007 static const int zero {};
6008 static const int one {1};
6009 };
6010
6011 static_assert(test::zero == 0, "");
6012 static_assert(test::one == 1, "");
6013
6014 }
6015
6016 namespace test_lambdas
6017 {
6018
6019 void
6020 test1()
6021 {
6022 auto lambda1 = [](){};
6023 auto lambda2 = lambda1;
6024 lambda1();
6025 lambda2();
6026 }
6027
6028 int
6029 test2()
6030 {
6031 auto a = [](int i, int j){ return i + j; }(1, 2);
6032 auto b = []() -> int { return '0'; }();
6033 auto c = [=](){ return a + b; }();
6034 auto d = [&](){ return c; }();
6035 auto e = [a, &b](int x) mutable {
6036 const auto identity = [](int y){ return y; };
6037 for (auto i = 0; i < a; ++i)
6038 a += b--;
6039 return x + identity(a + b);
6040 }(0);
6041 return a + b + c + d + e;
6042 }
6043
6044 int
6045 test3()
6046 {
6047 const auto nullary = [](){ return 0; };
6048 const auto unary = [](int x){ return x; };
6049 using nullary_t = decltype(nullary);
6050 using unary_t = decltype(unary);
6051 const auto higher1st = [](nullary_t f){ return f(); };
6052 const auto higher2nd = [unary](nullary_t f1){
6053 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6054 };
6055 return higher1st(nullary) + higher2nd(nullary)(unary);
6056 }
6057
6058 }
6059
6060 namespace test_variadic_templates
6061 {
6062
6063 template <int...>
6064 struct sum;
6065
6066 template <int N0, int... N1toN>
6067 struct sum<N0, N1toN...>
6068 {
6069 static constexpr auto value = N0 + sum<N1toN...>::value;
6070 };
6071
6072 template <>
6073 struct sum<>
6074 {
6075 static constexpr auto value = 0;
6076 };
6077
6078 static_assert(sum<>::value == 0, "");
6079 static_assert(sum<1>::value == 1, "");
6080 static_assert(sum<23>::value == 23, "");
6081 static_assert(sum<1, 2>::value == 3, "");
6082 static_assert(sum<5, 5, 11>::value == 21, "");
6083 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6084
6085 }
6086
6087 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6088 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6089 // because of this.
6090 namespace test_template_alias_sfinae
6091 {
6092
6093 struct foo {};
6094
6095 template<typename T>
6096 using member = typename T::member_type;
6097
6098 template<typename T>
6099 void func(...) {}
6100
6101 template<typename T>
6102 void func(member<T>*) {}
6103
6104 void test();
6105
6106 void test() { func<foo>(0); }
6107
6108 }
6109
6110} // namespace cxx11
6111
6112#endif // __cplusplus >= 201103L
6113
6114
6115
6116_ACEOF
6117if ac_fn_cxx_try_compile "$LINENO"; then :
6118 eval $cachevar=yes
6119else
6120 eval $cachevar=no
6121fi
6122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6123 CXX="$ac_save_CXX"
0bcda685
PA
6124fi
6125eval ac_res=\$$cachevar
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6127$as_echo "$ac_res" >&6; }
41260ac2
SM
6128 if eval test x\$$cachevar = xyes; then
6129 CXX_DIALECT="$switch"
6130 ac_success=yes
6131 break
6132 fi
6133 done
6134 if test x$ac_success = xyes; then
0bcda685
PA
6135 break
6136 fi
6137 done
6138 fi
6139 ac_ext=c
6140ac_cpp='$CPP $CPPFLAGS'
6141ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6142ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6143ac_compiler_gnu=$ac_cv_c_compiler_gnu
6144
6145 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6146 if test x$ac_success = xno; then
d0ac1c44 6147 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6148 fi
6149 fi
6150 if test x$ac_success = xno; then
6151 HAVE_CXX11=0
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6153$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6154 else
6155 HAVE_CXX11=1
6156
6157$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6158
6159 fi
6160
6161
6162
6163
a417dc56
RW
6164# Dependency checking.
6165rm -rf .tst 2>/dev/null
6166mkdir .tst 2>/dev/null
6167if test -d .tst; then
6168 am__leading_dot=.
6169else
6170 am__leading_dot=_
6171fi
6172rmdir .tst 2>/dev/null
6173
6174DEPDIR="${am__leading_dot}deps"
6175
81ecdfbb 6176ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6177
6178
6179depcc="$CC" am_compiler_list=
6180
6181am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6183$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6184if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6185 $as_echo_n "(cached) " >&6
a417dc56
RW
6186else
6187 if test -f "$am_depcomp"; then
6188 # We make a subdir and do the tests there. Otherwise we can end up
6189 # making bogus files that we don't know about and never remove. For
6190 # instance it was reported that on HP-UX the gcc test will end up
6191 # making a dummy file named `D' -- because `-MD' means `put the output
6192 # in D'.
6193 mkdir conftest.dir
6194 # Copy depcomp to subdir because otherwise we won't find it if we're
6195 # using a relative directory.
6196 cp "$am_depcomp" conftest.dir
6197 cd conftest.dir
6198 # We will build objects and dependencies in a subdirectory because
6199 # it helps to detect inapplicable dependency modes. For instance
6200 # both Tru64's cc and ICC support -MD to output dependencies as a
6201 # side effect of compilation, but ICC will put the dependencies in
6202 # the current directory while Tru64 will put them in the object
6203 # directory.
6204 mkdir sub
6205
6206 am_cv_CC_dependencies_compiler_type=none
6207 if test "$am_compiler_list" = ""; then
6208 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6209 fi
6210 for depmode in $am_compiler_list; do
6211 if test $depmode = none; then break; fi
6212
81ecdfbb 6213 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6214 # Setup a source with many dependencies, because some compilers
6215 # like to wrap large dependency lists on column 80 (with \), and
6216 # we should not choose a depcomp mode which is confused by this.
6217 #
6218 # We need to recreate these files for each test, as the compiler may
6219 # overwrite some of them when testing with obscure command lines.
6220 # This happens at least with the AIX C compiler.
6221 : > sub/conftest.c
6222 for i in 1 2 3 4 5 6; do
6223 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6224 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6225 # Solaris 8's {/usr,}/bin/sh.
6226 touch sub/conftst$i.h
6227 done
6228 echo "include sub/conftest.Po" > confmf
6229
6230 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6231 # mode. It turns out that the SunPro C++ compiler does not properly
6232 # handle `-M -o', and we need to detect this.
6233 depcmd="depmode=$depmode \
6234 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6235 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6236 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6237 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6238 if env $depcmd > conftest.err 2>&1 &&
6239 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6240 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6241 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6242 # icc doesn't choke on unknown options, it will just issue warnings
6243 # or remarks (even with -Werror). So we grep stderr for any message
6244 # that says an option was ignored or not supported.
6245 # When given -MP, icc 7.0 and 7.1 complain thusly:
6246 # icc: Command line warning: ignoring option '-M'; no argument required
6247 # The diagnosis changed in icc 8.0:
6248 # icc: Command line remark: option '-MP' not supported
6249 if (grep 'ignoring option' conftest.err ||
6250 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6251 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6252 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6253 break
6254 fi
6255 fi
81ecdfbb 6256 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6257 sed -e 's/^/| /' < conftest.err >&5
6258 done
6259
6260 cd ..
6261 rm -rf conftest.dir
6262else
6263 am_cv_CC_dependencies_compiler_type=none
6264fi
6265
6266fi
81ecdfbb
RW
6267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6268$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6269if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6270then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6271else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6272
6273fi
6274
6275
c971b7fa
PA
6276
6277CONFIG_OBS=
6278CONFIG_DEPS=
6279CONFIG_SRCS=
6280ENABLE_CFLAGS=
6281
6282CONFIG_ALL=
6283CONFIG_CLEAN=
6284CONFIG_INSTALL=
6285CONFIG_UNINSTALL=
6286
6287# If we haven't got the data from the intl directory,
6288# assume NLS is disabled.
6289USE_NLS=no
6290LIBINTL=
6291LIBINTL_DEP=
6292INCINTL=
6293XGETTEXT=
6294GMSGFMT=
6295POSUB=
783e057b
DJ
6296
6297if test -f ../intl/config.intl; then
6298 . ../intl/config.intl
6299fi
81ecdfbb
RW
6300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6301$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6302if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6304$as_echo "no" >&6; }
783e057b 6305else
81ecdfbb
RW
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6307$as_echo "yes" >&6; }
783e057b 6308
81ecdfbb 6309$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6310
6311
81ecdfbb
RW
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6313$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6314 # Look for .po and .gmo files in the source directory.
6315 CATALOGS=
6316 XLINGUAS=
6317 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6318 # If there aren't any .gmo files the shell will give us the
6319 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6320 # weeded out.
6321 case "$cat" in *\**)
6322 continue;;
6323 esac
6324 # The quadruple backslash is collapsed to a double backslash
6325 # by the backticks, then collapsed again by the double quotes,
6326 # leaving us with one backslash in the sed expression (right
6327 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6328 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6329 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6330 # The user is allowed to set LINGUAS to a list of languages to
6331 # install catalogs for. If it's empty that means "all of them."
6332 if test "x$LINGUAS" = x; then
6333 CATALOGS="$CATALOGS $cat"
6334 XLINGUAS="$XLINGUAS $lang"
6335 else
6336 case "$LINGUAS" in *$lang*)
6337 CATALOGS="$CATALOGS $cat"
6338 XLINGUAS="$XLINGUAS $lang"
6339 ;;
6340 esac
e28b3332
DJ
6341 fi
6342 done
c971b7fa
PA
6343 LINGUAS="$XLINGUAS"
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6345$as_echo "$LINGUAS" >&6; }
6346
6347
6348 DATADIRNAME=share
6349
6350 INSTOBJEXT=.mo
6351
6352 GENCAT=gencat
6353
6354 CATOBJEXT=.gmo
e28b3332 6355
e28b3332
DJ
6356fi
6357
c971b7fa
PA
6358localedir='${datadir}/locale'
6359
6360
6361if test x"$USE_NLS" = xyes; then
6362 CONFIG_ALL="$CONFIG_ALL all-po"
6363 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6364 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6365 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6366fi
e28b3332 6367
c971b7fa
PA
6368PACKAGE=gdb
6369
6370cat >>confdefs.h <<_ACEOF
6371#define PACKAGE "$PACKAGE"
6372_ACEOF
6373
6374
6375
6376# We never need to detect it in this sub-configure.
6377# But preserve it for config.status --recheck.
6378
6379
6380
6381MAKEINFO_EXTRA_FLAGS=""
6382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6383$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6384if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6385 $as_echo_n "(cached) " >&6
6386else
6387 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6388 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6389 gdb_cv_have_makeinfo_click=yes
6390 else
6391 gdb_cv_have_makeinfo_click=no
6392 fi
6393fi
6394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6395$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6396if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6397 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6398fi
e28b3332
DJ
6399
6400
bec39cab
AC
6401
6402
81ecdfbb
RW
6403# Check whether --with-separate-debug-dir was given.
6404if test "${with_separate_debug_dir+set}" = set; then :
6405 withval=$with_separate_debug_dir;
b14b1491
TT
6406 DEBUGDIR=$withval
6407else
6408 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6409fi
6410
20e95c23 6411
783e057b
DJ
6412 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6413 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6414 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6415 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6416
783e057b
DJ
6417cat >>confdefs.h <<_ACEOF
6418#define DEBUGDIR "$ac_define_dir"
20e95c23 6419_ACEOF
20e95c23 6420
20e95c23 6421
20e95c23 6422
0c4a4063 6423
b14b1491
TT
6424 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6425 if test "x$prefix" = xNONE; then
6426 test_prefix=/usr/local
6427 else
6428 test_prefix=$prefix
6429 fi
783e057b 6430 else
b14b1491 6431 test_prefix=$exec_prefix
783e057b 6432 fi
b14b1491
TT
6433 value=0
6434 case ${ac_define_dir} in
6435 "${test_prefix}"|"${test_prefix}/"*|\
6436 '${exec_prefix}'|'${exec_prefix}/'*)
6437 value=1
6438 ;;
6439 esac
6440
6441cat >>confdefs.h <<_ACEOF
6442#define DEBUGDIR_RELOCATABLE $value
6443_ACEOF
6444
6445
6446
0c4a4063 6447
f83d8a90
DE
6448# We can't pass paths as command line arguments.
6449# Mingw32 tries to be clever and will convert the paths for us.
6450# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6451# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6452# This breaks GDB's relocatable path conversions since paths passed in
6453# config.h would not get so translated, the path prefixes no longer match.
6454
6455 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6456 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6457 ac_define_dir=`eval echo $bindir`
6458 ac_define_dir=`eval echo $ac_define_dir`
6459
6460cat >>confdefs.h <<_ACEOF
6461#define BINDIR "$ac_define_dir"
6462_ACEOF
6463
6464
6465
b14b1491
TT
6466# GDB's datadir relocation
6467
6468
6469
81ecdfbb
RW
6470# Check whether --with-gdb-datadir was given.
6471if test "${with_gdb_datadir+set}" = set; then :
6472 withval=$with_gdb_datadir;
b14b1491 6473 GDB_DATADIR=$withval
20e95c23 6474else
b14b1491 6475 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6476fi
6477
20e95c23 6478
b14b1491
TT
6479 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6480 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6481 ac_define_dir=`eval echo $GDB_DATADIR`
6482 ac_define_dir=`eval echo $ac_define_dir`
6483
6484cat >>confdefs.h <<_ACEOF
6485#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6486_ACEOF
6487
b14b1491
TT
6488
6489
0c4a4063 6490
b14b1491
TT
6491 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6492 if test "x$prefix" = xNONE; then
6493 test_prefix=/usr/local
6494 else
6495 test_prefix=$prefix
6496 fi
6497 else
6498 test_prefix=$exec_prefix
6499 fi
6500 value=0
6501 case ${ac_define_dir} in
6502 "${test_prefix}"|"${test_prefix}/"*|\
6503 '${exec_prefix}'|'${exec_prefix}/'*)
6504 value=1
6505 ;;
6506 esac
6507
6508cat >>confdefs.h <<_ACEOF
6509#define GDB_DATADIR_RELOCATABLE $value
6510_ACEOF
6511
6512
783e057b 6513
20e95c23 6514
0c4a4063 6515
81ecdfbb
RW
6516# Check whether --with-relocated-sources was given.
6517if test "${with_relocated_sources+set}" = set; then :
6518 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6519
6520 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6521 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6522 ac_define_dir=`eval echo $reloc_srcdir`
6523 ac_define_dir=`eval echo $ac_define_dir`
6524
6525cat >>confdefs.h <<_ACEOF
6526#define RELOC_SRCDIR "$ac_define_dir"
6527_ACEOF
6528
6529
6530
81ecdfbb
RW
6531fi
6532
29b0e8a2 6533
7349ff92
JK
6534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6535$as_echo_n "checking for default auto-load directory... " >&6; }
6536
6537# Check whether --with-auto-load-dir was given.
6538if test "${with_auto_load_dir+set}" = set; then :
6539 withval=$with_auto_load_dir;
6540else
1564a261 6541 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6542fi
6543
2861ee4f 6544escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6545
6546 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6547 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6548 ac_define_dir=`eval echo $escape_dir`
6549 ac_define_dir=`eval echo $ac_define_dir`
6550
6551cat >>confdefs.h <<_ACEOF
6552#define AUTO_LOAD_DIR "$ac_define_dir"
6553_ACEOF
6554
6555
6556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6557$as_echo "$with_auto_load_dir" >&6; }
6558
bccbefd2
JK
6559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6560$as_echo_n "checking for default auto-load safe-path... " >&6; }
6561
6562# Check whether --with-auto-load-safe-path was given.
6563if test "${with_auto_load_safe_path+set}" = set; then :
6564 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6565 with_auto_load_safe_path="/"
6566 fi
bccbefd2 6567else
7349ff92 6568 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6569fi
6570
2861ee4f 6571escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6572
6573 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6574 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6575 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6576 ac_define_dir=`eval echo $ac_define_dir`
6577
6578cat >>confdefs.h <<_ACEOF
6dea1fbd 6579#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6580_ACEOF
6581
6582
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6584$as_echo "$with_auto_load_safe_path" >&6; }
6585
29b0e8a2 6586
20e95c23 6587
5ae98d25 6588subdirs="$subdirs testsuite"
20e95c23
DJ
6589
6590
783e057b 6591# Check whether to support alternative target configurations
81ecdfbb
RW
6592# Check whether --enable-targets was given.
6593if test "${enable_targets+set}" = set; then :
6594 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6595 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6596 ;;
6597 no) enable_targets= ;;
6598 *) enable_targets=$enableval ;;
6599esac
81ecdfbb
RW
6600fi
6601
20e95c23 6602
783e057b 6603# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6604# Check whether --enable-64-bit-bfd was given.
6605if test "${enable_64_bit_bfd+set}" = set; then :
6606 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6607 yes) want64=true ;;
6608 no) want64=false ;;
d0ac1c44 6609 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6610esac
6611else
6612 want64=false
81ecdfbb
RW
6613fi
6614
783e057b
DJ
6615# Provide defaults for some variables set by the per-host and per-target
6616# configuration.
6617gdb_host_obs=posix-hdep.o
20e95c23 6618
783e057b
DJ
6619if test "${target}" = "${host}"; then
6620 gdb_native=yes
6621else
6622 gdb_native=no
6623fi
20e95c23 6624
783e057b 6625. $srcdir/configure.host
20e95c23 6626
783e057b 6627# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6628
783e057b
DJ
6629TARGET_OBS=
6630all_targets=
b292c783 6631HAVE_NATIVE_GCORE_TARGET=
20e95c23 6632
783e057b 6633for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6634do
783e057b
DJ
6635 if test "$targ_alias" = "all"; then
6636 all_targets=true
6637 else
6638 # Canonicalize the secondary target names.
6639 result=`$ac_config_sub $targ_alias 2>/dev/null`
6640 if test -n "$result"; then
6641 targ=$result
6642 else
6643 targ=$targ_alias
6644 fi
20e95c23 6645
783e057b 6646 . ${srcdir}/configure.tgt
20e95c23 6647
bf307134 6648 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6649 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6650fi
6651
783e057b
DJ
6652 # Target-specific object files
6653 for i in ${gdb_target_obs}; do
6654 case " $TARGET_OBS " in
6655 *" ${i} "*) ;;
6656 *)
6657 TARGET_OBS="$TARGET_OBS ${i}"
6658 ;;
6659 esac
6660 done
20e95c23 6661
783e057b
DJ
6662 # Check whether this target needs 64-bit CORE_ADDR
6663 if test x${want64} = xfalse; then
6664 . ${srcdir}/../bfd/config.bfd
6665 fi
b292c783
JK
6666
6667 # Check whether this target is native and supports gcore.
6668 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6669 && $gdb_have_gcore; then
6670 HAVE_NATIVE_GCORE_TARGET=1
6671 fi
783e057b 6672 fi
20e95c23
DJ
6673done
6674
783e057b
DJ
6675if test x${all_targets} = xtrue; then
6676
6677 # We want all 64-bit targets if we either:
6678 # - run on a 64-bit host or
6679 # - already require 64-bit support for some other target or
6680 # - the --enable-64-bit-bfd option was supplied
6681 # Otherwise we only support all 32-bit targets.
6682 #
6683 # NOTE: This test must be in sync with the corresponding
6684 # tests in BFD!
20e95c23 6685
783e057b 6686 if test x${want64} = xfalse; then
81ecdfbb
RW
6687 # The cast to long int works around a bug in the HP C Compiler
6688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6690# This bug is HP SR number 8606223364.
6691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6692$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6693if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6694 $as_echo_n "(cached) " >&6
c0993dbe 6695else
81ecdfbb 6696 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6697
81ecdfbb
RW
6698else
6699 if test "$ac_cv_type_long" = yes; then
6700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6702as_fn_error 77 "cannot compute sizeof (long)
6703See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6704 else
6705 ac_cv_sizeof_long=0
6706 fi
c0993dbe 6707fi
81ecdfbb 6708
c0993dbe 6709fi
81ecdfbb
RW
6710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6711$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6712
c0993dbe 6713
c0993dbe 6714
c0993dbe
UW
6715cat >>confdefs.h <<_ACEOF
6716#define SIZEOF_LONG $ac_cv_sizeof_long
6717_ACEOF
6718
6719
6720 if test "x${ac_cv_sizeof_long}" = "x8"; then
6721 want64=true
6722 fi
6723 fi
6724 if test x${want64} = xtrue; then
6725 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6726 else
6727 TARGET_OBS='$(ALL_TARGET_OBS)'
6728 fi
6729fi
6730
6731
6732
b292c783 6733
c0993dbe
UW
6734# For other settings, only the main target counts.
6735gdb_sim=
6736gdb_osabi=
c0993dbe
UW
6737targ=$target; . ${srcdir}/configure.tgt
6738
6739# Fetch the default architecture and default target vector from BFD.
6740targ=$target; . $srcdir/../bfd/config.bfd
6741
6742# We only want the first architecture, so strip off the others if
6743# there is more than one.
6744targ_archs=`echo $targ_archs | sed 's/ .*//'`
6745
6746if test "x$targ_archs" != x; then
6747
6748cat >>confdefs.h <<_ACEOF
6749#define DEFAULT_BFD_ARCH $targ_archs
6750_ACEOF
6751
6752fi
6753if test "x$targ_defvec" != x; then
6754
6755cat >>confdefs.h <<_ACEOF
6756#define DEFAULT_BFD_VEC $targ_defvec
6757_ACEOF
6758
6759fi
6760
c0993dbe 6761# Enable MI.
81ecdfbb
RW
6762# Check whether --enable-gdbmi was given.
6763if test "${enable_gdbmi+set}" = set; then :
6764 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6765 yes | no)
6766 ;;
6767 *)
d0ac1c44 6768 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6769 esac
6770else
6771 enable_gdbmi=yes
81ecdfbb
RW
6772fi
6773
c0993dbe 6774if test x"$enable_gdbmi" = xyes; then
0ad6b8ee 6775 if test -d "$srcdir/mi"; then
c0993dbe
UW
6776 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6777 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6778 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6779 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6780 fi
6781fi
6782
6783# Enable TUI.
81ecdfbb
RW
6784# Check whether --enable-tui was given.
6785if test "${enable_tui+set}" = set; then :
6786 enableval=$enable_tui; case $enableval in
3ca64bd3 6787 yes | no | auto)
c0993dbe
UW
6788 ;;
6789 *)
d0ac1c44 6790 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6791 esac
6792else
3ca64bd3 6793 enable_tui=auto
81ecdfbb
RW
6794fi
6795
c0993dbe
UW
6796
6797# Enable gdbtk.
81ecdfbb
RW
6798# Check whether --enable-gdbtk was given.
6799if test "${enable_gdbtk+set}" = set; then :
6800 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6801 yes | no)
6802 ;;
6803 *)
d0ac1c44 6804 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6805 esac
6806else
0ad6b8ee 6807 if test -d "$srcdir/gdbtk"; then
c0993dbe
UW
6808 enable_gdbtk=yes
6809 else
6810 enable_gdbtk=no
6811 fi
81ecdfbb
RW
6812fi
6813
c0993dbe
UW
6814# We unconditionally disable gdbtk tests on selected platforms.
6815case $host_os in
6816 go32* | windows*)
81ecdfbb
RW
6817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6818$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6819 enable_gdbtk=no ;;
6820esac
6821
05e7c244 6822# Libunwind support for ia64.
bec39cab 6823
05e7c244
JK
6824
6825# Check whether --with-libunwind-ia64 was given.
6826if test "${with_libunwind_ia64+set}" = set; then :
6827 withval=$with_libunwind_ia64;
bec39cab 6828else
05e7c244
JK
6829 with_libunwind_ia64=auto
6830fi
bec39cab 6831
05e7c244
JK
6832
6833# Backward compatibility option.
6834if test "${with_libunwind+set}" = set; then
6835 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6836 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6837 fi
6838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6839$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6840 with_libunwind_ia64="$with_libunwind"
6841fi
6842
6843case "$with_libunwind_ia64" in
6844 yes | no)
6845 ;;
6846 auto)
6847 for ac_header in libunwind-ia64.h
81ecdfbb 6848do :
b54a8fd7 6849 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6850if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6851 cat >>confdefs.h <<_ACEOF
b54a8fd7 6852#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6853_ACEOF
6854
6855fi
6856
6857done
6858
05e7c244
JK
6859 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6860 ;;
6861 *)
d0ac1c44 6862 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6863 ;;
6864esac
bec39cab 6865
05e7c244 6866if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6867 for ac_header in libunwind-ia64.h
81ecdfbb 6868do :
b54a8fd7 6869 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6870if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6871 cat >>confdefs.h <<_ACEOF
b54a8fd7 6872#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6873_ACEOF
6874
6875fi
6876
6877done
6878
05e7c244 6879 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6880 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6881 fi
6882 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6883 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6884 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6885fi
6886
cb01cfba
JB
6887opt_curses=no
6888
81ecdfbb
RW
6889# Check whether --with-curses was given.
6890if test "${with_curses+set}" = set; then :
6891 withval=$with_curses; opt_curses=$withval
6892fi
6893
cb01cfba 6894
76a39ba7 6895prefer_curses=no
cb01cfba 6896if test "$opt_curses" = "yes"; then
76a39ba7 6897 prefer_curses=yes
cb01cfba
JB
6898fi
6899
a9322a30 6900# Profiling support.
81ecdfbb
RW
6901# Check whether --enable-profiling was given.
6902if test "${enable_profiling+set}" = set; then :
6903 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6904 yes | no)
6905 ;;
6906 *)
d0ac1c44 6907 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6908 esac
6909else
6910 enable_profiling=no
81ecdfbb 6911fi
bec39cab 6912
a9322a30
TT
6913
6914for ac_func in monstartup _mcleanup
81ecdfbb
RW
6915do :
6916 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6917ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6918if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6919 cat >>confdefs.h <<_ACEOF
6920#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6921_ACEOF
a9322a30 6922
81ecdfbb
RW
6923fi
6924done
a9322a30 6925
81ecdfbb
RW
6926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6927$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6928if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6929 $as_echo_n "(cached) " >&6
6930else
6931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6932/* end confdefs.h. */
6933#include <stdlib.h>
6934extern char _etext;
a9322a30
TT
6935
6936int
6937main ()
6938{
6939free (&_etext);
6940 ;
6941 return 0;
6942}
bec39cab 6943_ACEOF
81ecdfbb 6944if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6945 ac_cv_var__etext=yes
bec39cab 6946else
81ecdfbb 6947 ac_cv_var__etext=no
bec39cab 6948fi
81ecdfbb
RW
6949rm -f core conftest.err conftest.$ac_objext \
6950 conftest$ac_exeext conftest.$ac_ext
bec39cab 6951fi
81ecdfbb
RW
6952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6953$as_echo "$ac_cv_var__etext" >&6; }
0ad6b8ee 6954if test "$ac_cv_var__etext" = yes; then
60ca704f 6955
81ecdfbb 6956$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6957
bec39cab 6958fi
81ecdfbb
RW
6959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6960$as_echo_n "checking for etext... " >&6; }
d0ac1c44 6961if ${ac_cv_var_etext+:} false; then :
81ecdfbb 6962 $as_echo_n "(cached) " >&6
bec39cab 6963else
81ecdfbb 6964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6965/* end confdefs.h. */
a9322a30
TT
6966#include <stdlib.h>
6967extern char etext;
bec39cab
AC
6968
6969int
6970main ()
6971{
a9322a30 6972free (&etext);
bec39cab
AC
6973 ;
6974 return 0;
6975}
6976_ACEOF
81ecdfbb 6977if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6978 ac_cv_var_etext=yes
bec39cab 6979else
81ecdfbb 6980 ac_cv_var_etext=no
bec39cab 6981fi
81ecdfbb
RW
6982rm -f core conftest.err conftest.$ac_objext \
6983 conftest$ac_exeext conftest.$ac_ext
bec39cab 6984fi
81ecdfbb
RW
6985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6986$as_echo "$ac_cv_var_etext" >&6; }
0ad6b8ee 6987if test "$ac_cv_var_etext" = yes; then
a9322a30 6988
81ecdfbb 6989$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6990
6991fi
a9322a30 6992if test "$enable_profiling" = yes ; then
0ad6b8ee 6993 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
d0ac1c44 6994 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6995 fi
6996 PROFILE_CFLAGS=-pg
6997 OLD_CFLAGS="$CFLAGS"
6998 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6999
81ecdfbb
RW
7000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7001$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7002if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7003 $as_echo_n "(cached) " >&6
bec39cab 7004else
81ecdfbb 7005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7006/* end confdefs.h. */
bec39cab
AC
7007
7008int
7009main ()
7010{
a9322a30 7011int x;
bec39cab
AC
7012 ;
7013 return 0;
7014}
7015_ACEOF
81ecdfbb 7016if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7017 ac_cv_cc_supports_pg=yes
bec39cab 7018else
81ecdfbb 7019 ac_cv_cc_supports_pg=no
bec39cab 7020fi
81ecdfbb 7021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7022fi
81ecdfbb
RW
7023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7024$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7025
0ad6b8ee 7026 if test "$ac_cv_cc_supports_pg" = no; then
d0ac1c44 7027 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7028 fi
bec39cab 7029
a9322a30 7030 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7031fi
7032
44cee4fd
TT
7033CODESIGN_CERT=
7034# Check whether --enable-codesign was given.
7035if test "${enable_codesign+set}" = set; then :
7036 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7037fi
7038
7039
7040
c16158bc
JM
7041
7042
81ecdfbb
RW
7043# Check whether --with-pkgversion was given.
7044if test "${with_pkgversion+set}" = set; then :
7045 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7046 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7047 no) PKGVERSION= ;;
7048 *) PKGVERSION="($withval) " ;;
7049 esac
7050else
7051 PKGVERSION="(GDB) "
7052
81ecdfbb 7053fi
c16158bc
JM
7054
7055
7056
7057
81ecdfbb
RW
7058
7059# Check whether --with-bugurl was given.
7060if test "${with_bugurl+set}" = set; then :
7061 withval=$with_bugurl; case "$withval" in
d0ac1c44 7062 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7063 no) BUGURL=
7064 ;;
7065 *) BUGURL="$withval"
7066 ;;
7067 esac
7068else
7069 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7070
81ecdfbb
RW
7071fi
7072
c16158bc
JM
7073 case ${BUGURL} in
7074 "")
7075 REPORT_BUGS_TO=
7076 REPORT_BUGS_TEXI=
7077 ;;
7078 *)
7079 REPORT_BUGS_TO="<$BUGURL>"
7080 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7081 ;;
7082 esac;
7083
7084
7085
7086
7087cat >>confdefs.h <<_ACEOF
7088#define PKGVERSION "$PKGVERSION"
7089_ACEOF
7090
7091
7092cat >>confdefs.h <<_ACEOF
7093#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7094_ACEOF
7095
7096
bec39cab
AC
7097# --------------------- #
7098# Checks for programs. #
7099# --------------------- #
7100
7101for ac_prog in gawk mawk nawk awk
7102do
7103 # Extract the first word of "$ac_prog", so it can be a program name with args.
7104set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7106$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7107if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7108 $as_echo_n "(cached) " >&6
bec39cab
AC
7109else
7110 if test -n "$AWK"; then
7111 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7112else
7113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7114for as_dir in $PATH
7115do
7116 IFS=$as_save_IFS
7117 test -z "$as_dir" && as_dir=.
81ecdfbb 7118 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7119 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7120 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7122 break 2
7123 fi
7124done
81ecdfbb
RW
7125 done
7126IFS=$as_save_IFS
bec39cab
AC
7127
7128fi
7129fi
7130AWK=$ac_cv_prog_AWK
7131if test -n "$AWK"; then
81ecdfbb
RW
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7133$as_echo "$AWK" >&6; }
bec39cab 7134else
81ecdfbb
RW
7135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7136$as_echo "no" >&6; }
bec39cab
AC
7137fi
7138
bec39cab 7139
81ecdfbb 7140 test -n "$AWK" && break
bec39cab
AC
7141done
7142
c971b7fa
PA
7143# Find a good install program. We prefer a C program (faster),
7144# so one script is as good as another. But avoid the broken or
7145# incompatible versions:
7146# SysV /etc/install, /usr/sbin/install
7147# SunOS /usr/etc/install
7148# IRIX /sbin/install
7149# AIX /bin/install
7150# AmigaOS /C/install, which installs bootblocks on floppy discs
7151# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7152# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7153# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7154# OS/2's system install, which has a completely different semantic
7155# ./install, which can be erroneously created by make from ./install.sh.
7156# Reject install programs that cannot install multiple files.
7157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7158$as_echo_n "checking for a BSD-compatible install... " >&6; }
7159if test -z "$INSTALL"; then
d0ac1c44 7160if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7161 $as_echo_n "(cached) " >&6
7162else
7163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7164for as_dir in $PATH
7165do
7166 IFS=$as_save_IFS
7167 test -z "$as_dir" && as_dir=.
7168 # Account for people who put trailing slashes in PATH elements.
7169case $as_dir/ in #((
7170 ./ | .// | /[cC]/* | \
7171 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7172 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7173 /usr/ucb/* ) ;;
7174 *)
7175 # OSF1 and SCO ODT 3.0 have their own names for install.
7176 # Don't use installbsd from OSF since it installs stuff as root
7177 # by default.
7178 for ac_prog in ginstall scoinst install; do
7179 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7180 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7181 if test $ac_prog = install &&
7182 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7183 # AIX install. It has an incompatible calling convention.
7184 :
7185 elif test $ac_prog = install &&
7186 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7187 # program-specific install script used by HP pwplus--don't use.
7188 :
7189 else
7190 rm -rf conftest.one conftest.two conftest.dir
7191 echo one > conftest.one
7192 echo two > conftest.two
7193 mkdir conftest.dir
7194 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7195 test -s conftest.one && test -s conftest.two &&
7196 test -s conftest.dir/conftest.one &&
7197 test -s conftest.dir/conftest.two
7198 then
7199 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7200 break 3
7201 fi
7202 fi
7203 fi
7204 done
7205 done
7206 ;;
7207esac
7208
7209 done
7210IFS=$as_save_IFS
7211
7212rm -rf conftest.one conftest.two conftest.dir
7213
7214fi
7215 if test "${ac_cv_path_install+set}" = set; then
7216 INSTALL=$ac_cv_path_install
7217 else
7218 # As a last resort, use the slow shell script. Don't cache a
7219 # value for INSTALL within a source directory, because that will
7220 # break other packages using the cache if that directory is
7221 # removed, or if the value is a relative name.
7222 INSTALL=$ac_install_sh
7223 fi
7224fi
7225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7226$as_echo "$INSTALL" >&6; }
7227
7228# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7229# It thinks the first close brace ends the variable substitution.
7230test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7231
7232test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7233
7234test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7235
81ecdfbb
RW
7236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7237$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7238LN_S=$as_ln_s
7239if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7241$as_echo "yes" >&6; }
bec39cab 7242else
81ecdfbb
RW
7243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7244$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7245fi
7246
7247if test -n "$ac_tool_prefix"; then
7248 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7249set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7251$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7252if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7253 $as_echo_n "(cached) " >&6
bec39cab
AC
7254else
7255 if test -n "$RANLIB"; then
7256 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7257else
7258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7259for as_dir in $PATH
7260do
7261 IFS=$as_save_IFS
7262 test -z "$as_dir" && as_dir=.
81ecdfbb 7263 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7264 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7265 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7267 break 2
7268 fi
7269done
81ecdfbb
RW
7270 done
7271IFS=$as_save_IFS
bec39cab
AC
7272
7273fi
7274fi
7275RANLIB=$ac_cv_prog_RANLIB
7276if test -n "$RANLIB"; then
81ecdfbb
RW
7277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7278$as_echo "$RANLIB" >&6; }
bec39cab 7279else
81ecdfbb
RW
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7281$as_echo "no" >&6; }
bec39cab
AC
7282fi
7283
81ecdfbb 7284
bec39cab
AC
7285fi
7286if test -z "$ac_cv_prog_RANLIB"; then
7287 ac_ct_RANLIB=$RANLIB
7288 # Extract the first word of "ranlib", so it can be a program name with args.
7289set dummy 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_ac_ct_RANLIB+:} false; then :
81ecdfbb 7293 $as_echo_n "(cached) " >&6
bec39cab
AC
7294else
7295 if test -n "$ac_ct_RANLIB"; then
7296 ac_cv_prog_ac_ct_RANLIB="$ac_ct_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_ac_ct_RANLIB="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 7312
bec39cab
AC
7313fi
7314fi
7315ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7316if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7318$as_echo "$ac_ct_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
RW
7324 if test "x$ac_ct_RANLIB" = x; then
7325 RANLIB=":"
7326 else
7327 case $cross_compiling:$ac_tool_warned in
7328yes:)
7329{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7330$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7331ac_tool_warned=yes ;;
7332esac
7333 RANLIB=$ac_ct_RANLIB
7334 fi
bec39cab
AC
7335else
7336 RANLIB="$ac_cv_prog_RANLIB"
7337fi
7338
7339for ac_prog in 'bison -y' byacc
7340do
7341 # Extract the first word of "$ac_prog", so it can be a program name with args.
7342set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7344$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7345if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7346 $as_echo_n "(cached) " >&6
bec39cab
AC
7347else
7348 if test -n "$YACC"; then
7349 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7350else
7351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7352for as_dir in $PATH
7353do
7354 IFS=$as_save_IFS
7355 test -z "$as_dir" && as_dir=.
81ecdfbb 7356 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7357 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7358 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7359 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7360 break 2
7361 fi
7362done
81ecdfbb
RW
7363 done
7364IFS=$as_save_IFS
bec39cab
AC
7365
7366fi
7367fi
7368YACC=$ac_cv_prog_YACC
7369if test -n "$YACC"; then
81ecdfbb
RW
7370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7371$as_echo "$YACC" >&6; }
bec39cab 7372else
81ecdfbb
RW
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7374$as_echo "no" >&6; }
bec39cab
AC
7375fi
7376
81ecdfbb 7377
bec39cab
AC
7378 test -n "$YACC" && break
7379done
7380test -n "$YACC" || YACC="yacc"
7381
7382
7383if test -n "$ac_tool_prefix"; then
7384 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7385set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7387$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7388if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7389 $as_echo_n "(cached) " >&6
bec39cab
AC
7390else
7391 if test -n "$AR"; then
7392 ac_cv_prog_AR="$AR" # Let the user override the test.
7393else
7394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7395for as_dir in $PATH
7396do
7397 IFS=$as_save_IFS
7398 test -z "$as_dir" && as_dir=.
81ecdfbb 7399 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7401 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7403 break 2
7404 fi
7405done
81ecdfbb
RW
7406 done
7407IFS=$as_save_IFS
bec39cab
AC
7408
7409fi
7410fi
7411AR=$ac_cv_prog_AR
7412if test -n "$AR"; then
81ecdfbb
RW
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7414$as_echo "$AR" >&6; }
bec39cab 7415else
81ecdfbb
RW
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417$as_echo "no" >&6; }
bec39cab
AC
7418fi
7419
81ecdfbb 7420
bec39cab
AC
7421fi
7422if test -z "$ac_cv_prog_AR"; then
7423 ac_ct_AR=$AR
7424 # Extract the first word of "ar", so it can be a program name with args.
7425set dummy 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_ac_ct_AR+:} false; then :
81ecdfbb 7429 $as_echo_n "(cached) " >&6
bec39cab
AC
7430else
7431 if test -n "$ac_ct_AR"; then
7432 ac_cv_prog_ac_ct_AR="$ac_ct_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_ac_ct_AR="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
7451ac_ct_AR=$ac_cv_prog_ac_ct_AR
7452if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7454$as_echo "$ac_ct_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
RW
7460 if test "x$ac_ct_AR" = x; then
7461 AR=""
7462 else
7463 case $cross_compiling:$ac_tool_warned in
7464yes:)
7465{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7466$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7467ac_tool_warned=yes ;;
7468esac
7469 AR=$ac_ct_AR
7470 fi
bec39cab
AC
7471else
7472 AR="$ac_cv_prog_AR"
7473fi
7474
7475if test -n "$ac_tool_prefix"; then
7476 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7477set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7479$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7480if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7481 $as_echo_n "(cached) " >&6
bec39cab
AC
7482else
7483 if test -n "$DLLTOOL"; then
7484 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7485else
7486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7487for as_dir in $PATH
7488do
7489 IFS=$as_save_IFS
7490 test -z "$as_dir" && as_dir=.
81ecdfbb 7491 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7492 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7493 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7495 break 2
7496 fi
7497done
81ecdfbb
RW
7498 done
7499IFS=$as_save_IFS
bec39cab
AC
7500
7501fi
7502fi
7503DLLTOOL=$ac_cv_prog_DLLTOOL
7504if test -n "$DLLTOOL"; then
81ecdfbb
RW
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7506$as_echo "$DLLTOOL" >&6; }
bec39cab 7507else
81ecdfbb
RW
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7509$as_echo "no" >&6; }
bec39cab
AC
7510fi
7511
81ecdfbb 7512
bec39cab
AC
7513fi
7514if test -z "$ac_cv_prog_DLLTOOL"; then
7515 ac_ct_DLLTOOL=$DLLTOOL
7516 # Extract the first word of "dlltool", so it can be a program name with args.
7517set dummy 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_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7521 $as_echo_n "(cached) " >&6
bec39cab
AC
7522else
7523 if test -n "$ac_ct_DLLTOOL"; then
7524 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_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_ac_ct_DLLTOOL="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
7543ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7544if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7546$as_echo "$ac_ct_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
RW
7552 if test "x$ac_ct_DLLTOOL" = x; then
7553 DLLTOOL=""
7554 else
7555 case $cross_compiling:$ac_tool_warned in
7556yes:)
7557{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7558$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7559ac_tool_warned=yes ;;
7560esac
7561 DLLTOOL=$ac_ct_DLLTOOL
7562 fi
bec39cab
AC
7563else
7564 DLLTOOL="$ac_cv_prog_DLLTOOL"
7565fi
7566
7567if test -n "$ac_tool_prefix"; then
7568 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7569set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7571$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7572if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7573 $as_echo_n "(cached) " >&6
bec39cab
AC
7574else
7575 if test -n "$WINDRES"; then
7576 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7577else
7578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7579for as_dir in $PATH
7580do
7581 IFS=$as_save_IFS
7582 test -z "$as_dir" && as_dir=.
81ecdfbb 7583 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7585 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7587 break 2
7588 fi
7589done
81ecdfbb
RW
7590 done
7591IFS=$as_save_IFS
bec39cab
AC
7592
7593fi
7594fi
7595WINDRES=$ac_cv_prog_WINDRES
7596if test -n "$WINDRES"; then
81ecdfbb
RW
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7598$as_echo "$WINDRES" >&6; }
bec39cab 7599else
81ecdfbb
RW
7600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7601$as_echo "no" >&6; }
bec39cab
AC
7602fi
7603
81ecdfbb 7604
bec39cab
AC
7605fi
7606if test -z "$ac_cv_prog_WINDRES"; then
7607 ac_ct_WINDRES=$WINDRES
7608 # Extract the first word of "windres", so it can be a program name with args.
7609set dummy 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_ac_ct_WINDRES+:} false; then :
81ecdfbb 7613 $as_echo_n "(cached) " >&6
bec39cab
AC
7614else
7615 if test -n "$ac_ct_WINDRES"; then
7616 ac_cv_prog_ac_ct_WINDRES="$ac_ct_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_ac_ct_WINDRES="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
7635ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7636if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7638$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7639else
81ecdfbb
RW
7640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7641$as_echo "no" >&6; }
c906108c 7642fi
bec39cab 7643
81ecdfbb
RW
7644 if test "x$ac_ct_WINDRES" = x; then
7645 WINDRES=""
7646 else
7647 case $cross_compiling:$ac_tool_warned in
7648yes:)
7649{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7650$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7651ac_tool_warned=yes ;;
7652esac
7653 WINDRES=$ac_ct_WINDRES
7654 fi
c906108c 7655else
bec39cab 7656 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7657fi
7658
bec39cab 7659
036c3acb
TS
7660case $host_os in
7661 gnu*)
7662 # Needed for GNU Hurd hosts.
7663 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7664 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7665set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7667$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7668if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7669 $as_echo_n "(cached) " >&6
c906108c 7670else
bec39cab
AC
7671 if test -n "$MIG"; then
7672 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7673else
7674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7675for as_dir in $PATH
7676do
7677 IFS=$as_save_IFS
7678 test -z "$as_dir" && as_dir=.
81ecdfbb 7679 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7681 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7683 break 2
7684 fi
7685done
81ecdfbb
RW
7686 done
7687IFS=$as_save_IFS
bec39cab 7688
c906108c 7689fi
bec39cab
AC
7690fi
7691MIG=$ac_cv_prog_MIG
7692if test -n "$MIG"; then
81ecdfbb
RW
7693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7694$as_echo "$MIG" >&6; }
c906108c 7695else
81ecdfbb
RW
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7697$as_echo "no" >&6; }
c906108c
SS
7698fi
7699
81ecdfbb 7700
bec39cab
AC
7701fi
7702if test -z "$ac_cv_prog_MIG"; then
7703 ac_ct_MIG=$MIG
7704 # Extract the first word of "mig", so it can be a program name with args.
7705set dummy 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_ac_ct_MIG+:} false; then :
81ecdfbb 7709 $as_echo_n "(cached) " >&6
bec39cab
AC
7710else
7711 if test -n "$ac_ct_MIG"; then
7712 ac_cv_prog_ac_ct_MIG="$ac_ct_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_ac_ct_MIG="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
c906108c 7728
bec39cab
AC
7729fi
7730fi
7731ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7732if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7734$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7735else
81ecdfbb
RW
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7737$as_echo "no" >&6; }
bec39cab 7738fi
c906108c 7739
81ecdfbb
RW
7740 if test "x$ac_ct_MIG" = x; then
7741 MIG=""
7742 else
7743 case $cross_compiling:$ac_tool_warned in
7744yes:)
7745{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7746$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7747ac_tool_warned=yes ;;
7748esac
7749 MIG=$ac_ct_MIG
7750 fi
bec39cab
AC
7751else
7752 MIG="$ac_cv_prog_MIG"
7753fi
c906108c 7754
036c3acb 7755 if test x"$MIG" = x; then
d0ac1c44 7756 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7757 fi
7758 ;;
7759esac
c906108c 7760
bec39cab
AC
7761# ---------------------- #
7762# Checks for libraries. #
7763# ---------------------- #
c906108c 7764
bec39cab 7765# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7767$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7768if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7769 $as_echo_n "(cached) " >&6
bec39cab
AC
7770else
7771 ac_check_lib_save_LIBS=$LIBS
7772LIBS="-lm $LIBS"
81ecdfbb 7773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7774/* end confdefs.h. */
c906108c 7775
c906108c 7776
bec39cab
AC
7777int
7778main ()
7779{
81ecdfbb 7780return main ();
bec39cab
AC
7781 ;
7782 return 0;
7783}
7784_ACEOF
81ecdfbb 7785if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7786 ac_cv_lib_m_main=yes
7787else
81ecdfbb 7788 ac_cv_lib_m_main=no
bec39cab 7789fi
81ecdfbb
RW
7790rm -f core conftest.err conftest.$ac_objext \
7791 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7792LIBS=$ac_check_lib_save_LIBS
7793fi
81ecdfbb
RW
7794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7795$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7796if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7797 cat >>confdefs.h <<_ACEOF
7798#define HAVE_LIBM 1
7799_ACEOF
7800
7801 LIBS="-lm $LIBS"
c906108c 7802
c906108c 7803fi
bec39cab
AC
7804
7805
bec39cab 7806# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7808$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7809if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7810 $as_echo_n "(cached) " >&6
bec39cab
AC
7811else
7812 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7814/* end confdefs.h. */
ddc9cd0f 7815
81ecdfbb
RW
7816/* Override any GCC internal prototype to avoid an error.
7817 Use char because int might match the return type of a GCC
7818 builtin and then its argument prototype would still apply. */
bec39cab
AC
7819#ifdef __cplusplus
7820extern "C"
7821#endif
bec39cab
AC
7822char gethostbyname ();
7823int
7824main ()
7825{
81ecdfbb 7826return gethostbyname ();
bec39cab
AC
7827 ;
7828 return 0;
7829}
7830_ACEOF
81ecdfbb
RW
7831for ac_lib in '' nsl; do
7832 if test -z "$ac_lib"; then
7833 ac_res="none required"
7834 else
7835 ac_res=-l$ac_lib
b4e70030 7836 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7837 fi
7838 if ac_fn_c_try_link "$LINENO"; then :
7839 ac_cv_search_gethostbyname=$ac_res
7840fi
7841rm -f core conftest.err conftest.$ac_objext \
7842 conftest$ac_exeext
d0ac1c44 7843 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7844 break
7845fi
7846done
d0ac1c44 7847if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7848
bec39cab 7849else
81ecdfbb 7850 ac_cv_search_gethostbyname=no
bec39cab 7851fi
81ecdfbb 7852rm conftest.$ac_ext
bec39cab
AC
7853LIBS=$ac_func_search_save_LIBS
7854fi
81ecdfbb
RW
7855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7856$as_echo "$ac_cv_search_gethostbyname" >&6; }
7857ac_res=$ac_cv_search_gethostbyname
7858if test "$ac_res" != no; then :
7859 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7860
bec39cab 7861fi
96baa820 7862
c906108c 7863
b4e70030 7864# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7866$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7867if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7868 $as_echo_n "(cached) " >&6
b4e70030
JB
7869else
7870 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7872/* end confdefs.h. */
7873
81ecdfbb
RW
7874/* Override any GCC internal prototype to avoid an error.
7875 Use char because int might match the return type of a GCC
7876 builtin and then its argument prototype would still apply. */
b4e70030
JB
7877#ifdef __cplusplus
7878extern "C"
7879#endif
b4e70030
JB
7880char socketpair ();
7881int
7882main ()
7883{
81ecdfbb 7884return socketpair ();
b4e70030
JB
7885 ;
7886 return 0;
7887}
7888_ACEOF
81ecdfbb
RW
7889for ac_lib in '' socket; do
7890 if test -z "$ac_lib"; then
7891 ac_res="none required"
7892 else
7893 ac_res=-l$ac_lib
b4e70030 7894 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7895 fi
7896 if ac_fn_c_try_link "$LINENO"; then :
7897 ac_cv_search_socketpair=$ac_res
7898fi
7899rm -f core conftest.err conftest.$ac_objext \
7900 conftest$ac_exeext
d0ac1c44 7901 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7902 break
7903fi
7904done
d0ac1c44 7905if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7906
b4e70030 7907else
81ecdfbb 7908 ac_cv_search_socketpair=no
b4e70030 7909fi
81ecdfbb 7910rm conftest.$ac_ext
b4e70030
JB
7911LIBS=$ac_func_search_save_LIBS
7912fi
81ecdfbb
RW
7913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7914$as_echo "$ac_cv_search_socketpair" >&6; }
7915ac_res=$ac_cv_search_socketpair
7916if test "$ac_res" != no; then :
7917 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7918
7919fi
7920
7921
233a11ab 7922# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7923
711a72d3 7924 # Use the system's zlib library.
39f3de7c
L
7925 zlibdir="-L\$(top_builddir)/../zlib"
7926 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7927
711a72d3
L
7928# Check whether --with-system-zlib was given.
7929if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7930 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7931 zlibdir=
7932 zlibinc=
7933 fi
b040ad30 7934
233a11ab 7935fi
233a11ab 7936
233a11ab 7937
233a11ab 7938
b040ad30 7939
233a11ab 7940
25268153 7941# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7942# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7944$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7945if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7946 $as_echo_n "(cached) " >&6
7947else
7948 ac_func_search_save_LIBS=$LIBS
7949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7950/* end confdefs.h. */
7951
7952/* Override any GCC internal prototype to avoid an error.
7953 Use char because int might match the return type of a GCC
7954 builtin and then its argument prototype would still apply. */
7955#ifdef __cplusplus
7956extern "C"
7957#endif
7958char kinfo_getvmmap ();
7959int
7960main ()
7961{
7962return kinfo_getvmmap ();
7963 ;
7964 return 0;
7965}
7966_ACEOF
37773e78 7967for ac_lib in '' util util-freebsd; do
25268153
JB
7968 if test -z "$ac_lib"; then
7969 ac_res="none required"
7970 else
7971 ac_res=-l$ac_lib
7972 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7973 fi
7974 if ac_fn_c_try_link "$LINENO"; then :
7975 ac_cv_search_kinfo_getvmmap=$ac_res
7976fi
7977rm -f core conftest.err conftest.$ac_objext \
7978 conftest$ac_exeext
d0ac1c44 7979 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7980 break
7981fi
7982done
d0ac1c44 7983if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7984
7985else
7986 ac_cv_search_kinfo_getvmmap=no
7987fi
7988rm conftest.$ac_ext
7989LIBS=$ac_func_search_save_LIBS
7990fi
7991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7992$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7993ac_res=$ac_cv_search_kinfo_getvmmap
7994if test "$ac_res" != no; then :
7995 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7996
7997$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7998
7999fi
8000
8001
77f120bf 8002
016a3251
DD
8003 if test "X$prefix" = "XNONE"; then
8004 acl_final_prefix="$ac_default_prefix"
8005 else
8006 acl_final_prefix="$prefix"
8007 fi
8008 if test "X$exec_prefix" = "XNONE"; then
8009 acl_final_exec_prefix='${prefix}'
8010 else
8011 acl_final_exec_prefix="$exec_prefix"
8012 fi
8013 acl_save_prefix="$prefix"
8014 prefix="$acl_final_prefix"
8015 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8016 prefix="$acl_save_prefix"
8017
8018
8019# Check whether --with-gnu-ld was given.
8020if test "${with_gnu_ld+set}" = set; then :
8021 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8022else
8023 with_gnu_ld=no
8024fi
8025
8026# Prepare PATH_SEPARATOR.
8027# The user is always right.
8028if test "${PATH_SEPARATOR+set}" != set; then
8029 echo "#! /bin/sh" >conf$$.sh
8030 echo "exit 0" >>conf$$.sh
8031 chmod +x conf$$.sh
8032 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8033 PATH_SEPARATOR=';'
8034 else
8035 PATH_SEPARATOR=:
8036 fi
8037 rm -f conf$$.sh
8038fi
8039ac_prog=ld
8040if test "$GCC" = yes; then
8041 # Check if gcc -print-prog-name=ld gives a path.
8042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8043$as_echo_n "checking for ld used by GCC... " >&6; }
8044 case $host in
8045 *-*-mingw*)
8046 # gcc leaves a trailing carriage return which upsets mingw
8047 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8048 *)
8049 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8050 esac
8051 case $ac_prog in
8052 # Accept absolute paths.
8053 [\\/]* | [A-Za-z]:[\\/]*)
8054 re_direlt='/[^/][^/]*/\.\./'
8055 # Canonicalize the path of ld
8056 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8057 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8058 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8059 done
8060 test -z "$LD" && LD="$ac_prog"
8061 ;;
8062 "")
8063 # If it fails, then pretend we aren't using GCC.
8064 ac_prog=ld
8065 ;;
8066 *)
8067 # If it is relative, then search for the first ld in PATH.
8068 with_gnu_ld=unknown
8069 ;;
8070 esac
8071elif test "$with_gnu_ld" = yes; then
8072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8073$as_echo_n "checking for GNU ld... " >&6; }
8074else
8075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8076$as_echo_n "checking for non-GNU ld... " >&6; }
8077fi
d0ac1c44 8078if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8079 $as_echo_n "(cached) " >&6
8080else
8081 if test -z "$LD"; then
8082 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8083 for ac_dir in $PATH; do
8084 test -z "$ac_dir" && ac_dir=.
8085 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8086 acl_cv_path_LD="$ac_dir/$ac_prog"
8087 # Check to see if the program is GNU ld. I'd rather use --version,
8088 # but apparently some GNU ld's only accept -v.
8089 # Break only if it was the GNU/non-GNU ld that we prefer.
8090 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8091 test "$with_gnu_ld" != no && break
8092 else
8093 test "$with_gnu_ld" != yes && break
8094 fi
8095 fi
8096 done
8097 IFS="$ac_save_ifs"
8098else
8099 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8100fi
8101fi
8102
8103LD="$acl_cv_path_LD"
8104if test -n "$LD"; then
8105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8106$as_echo "$LD" >&6; }
8107else
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8109$as_echo "no" >&6; }
8110fi
d0ac1c44 8111test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8113$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8114if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8115 $as_echo_n "(cached) " >&6
8116else
8117 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8118if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8119 acl_cv_prog_gnu_ld=yes
8120else
8121 acl_cv_prog_gnu_ld=no
8122fi
8123fi
8124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8125$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8126with_gnu_ld=$acl_cv_prog_gnu_ld
8127
8128
8129
8130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8131$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8132if ${acl_cv_rpath+:} false; then :
016a3251
DD
8133 $as_echo_n "(cached) " >&6
8134else
8135
8136 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8137 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8138 . ./conftest.sh
8139 rm -f ./conftest.sh
8140 acl_cv_rpath=done
8141
8142fi
8143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8144$as_echo "$acl_cv_rpath" >&6; }
8145 wl="$acl_cv_wl"
8146 libext="$acl_cv_libext"
8147 shlibext="$acl_cv_shlibext"
8148 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8149 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8150 hardcode_direct="$acl_cv_hardcode_direct"
8151 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8152 # Check whether --enable-rpath was given.
8153if test "${enable_rpath+set}" = set; then :
8154 enableval=$enable_rpath; :
8155else
8156 enable_rpath=yes
8157fi
8158
8159
8160
8161
8162
8163
8164
8165
8166 use_additional=yes
8167
8168 acl_save_prefix="$prefix"
8169 prefix="$acl_final_prefix"
8170 acl_save_exec_prefix="$exec_prefix"
8171 exec_prefix="$acl_final_exec_prefix"
8172
8173 eval additional_includedir=\"$includedir\"
8174 eval additional_libdir=\"$libdir\"
8175
8176 exec_prefix="$acl_save_exec_prefix"
8177 prefix="$acl_save_prefix"
77f120bf 8178
6c7a06a3 8179
81ecdfbb
RW
8180# Check whether --with-libiconv-prefix was given.
8181if test "${with_libiconv_prefix+set}" = set; then :
8182 withval=$with_libiconv_prefix;
016a3251
DD
8183 if test "X$withval" = "Xno"; then
8184 use_additional=no
8185 else
8186 if test "X$withval" = "X"; then
8187
8188 acl_save_prefix="$prefix"
8189 prefix="$acl_final_prefix"
8190 acl_save_exec_prefix="$exec_prefix"
8191 exec_prefix="$acl_final_exec_prefix"
8192
8193 eval additional_includedir=\"$includedir\"
8194 eval additional_libdir=\"$libdir\"
8195
8196 exec_prefix="$acl_save_exec_prefix"
8197 prefix="$acl_save_prefix"
8198
8199 else
8200 additional_includedir="$withval/include"
8201 additional_libdir="$withval/lib"
8202 fi
8203 fi
6c7a06a3 8204
81ecdfbb
RW
8205fi
8206
016a3251
DD
8207 LIBICONV=
8208 LTLIBICONV=
8209 INCICONV=
8210 rpathdirs=
8211 ltrpathdirs=
8212 names_already_handled=
8213 names_next_round='iconv '
8214 while test -n "$names_next_round"; do
8215 names_this_round="$names_next_round"
8216 names_next_round=
8217 for name in $names_this_round; do
8218 already_handled=
8219 for n in $names_already_handled; do
8220 if test "$n" = "$name"; then
8221 already_handled=yes
8222 break
8223 fi
8224 done
8225 if test -z "$already_handled"; then
8226 names_already_handled="$names_already_handled $name"
8227 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8228 eval value=\"\$HAVE_LIB$uppername\"
8229 if test -n "$value"; then
8230 if test "$value" = yes; then
8231 eval value=\"\$LIB$uppername\"
8232 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8233 eval value=\"\$LTLIB$uppername\"
8234 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8235 else
8236 :
8237 fi
8238 else
8239 found_dir=
8240 found_la=
8241 found_so=
8242 found_a=
8243 if test $use_additional = yes; then
8244 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8245 found_dir="$additional_libdir"
8246 found_so="$additional_libdir/lib$name.$shlibext"
8247 if test -f "$additional_libdir/lib$name.la"; then
8248 found_la="$additional_libdir/lib$name.la"
8249 fi
8250 else
8251 if test -f "$additional_libdir/lib$name.$libext"; then
8252 found_dir="$additional_libdir"
8253 found_a="$additional_libdir/lib$name.$libext"
8254 if test -f "$additional_libdir/lib$name.la"; then
8255 found_la="$additional_libdir/lib$name.la"
8256 fi
8257 fi
8258 fi
8259 fi
8260 if test "X$found_dir" = "X"; then
8261 for x in $LDFLAGS $LTLIBICONV; do
8262
8263 acl_save_prefix="$prefix"
8264 prefix="$acl_final_prefix"
8265 acl_save_exec_prefix="$exec_prefix"
8266 exec_prefix="$acl_final_exec_prefix"
8267 eval x=\"$x\"
8268 exec_prefix="$acl_save_exec_prefix"
8269 prefix="$acl_save_prefix"
8270
8271 case "$x" in
8272 -L*)
8273 dir=`echo "X$x" | sed -e 's/^X-L//'`
8274 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8275 found_dir="$dir"
8276 found_so="$dir/lib$name.$shlibext"
8277 if test -f "$dir/lib$name.la"; then
8278 found_la="$dir/lib$name.la"
8279 fi
8280 else
8281 if test -f "$dir/lib$name.$libext"; then
8282 found_dir="$dir"
8283 found_a="$dir/lib$name.$libext"
8284 if test -f "$dir/lib$name.la"; then
8285 found_la="$dir/lib$name.la"
8286 fi
8287 fi
8288 fi
8289 ;;
8290 esac
8291 if test "X$found_dir" != "X"; then
8292 break
8293 fi
8294 done
8295 fi
8296 if test "X$found_dir" != "X"; then
8297 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8298 if test "X$found_so" != "X"; then
8299 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8300 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8301 else
8302 haveit=
8303 for x in $ltrpathdirs; do
8304 if test "X$x" = "X$found_dir"; then
8305 haveit=yes
8306 break
8307 fi
8308 done
8309 if test -z "$haveit"; then
8310 ltrpathdirs="$ltrpathdirs $found_dir"
8311 fi
8312 if test "$hardcode_direct" = yes; then
8313 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8314 else
8315 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8316 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8317 haveit=
8318 for x in $rpathdirs; do
8319 if test "X$x" = "X$found_dir"; then
8320 haveit=yes
8321 break
8322 fi
8323 done
8324 if test -z "$haveit"; then
8325 rpathdirs="$rpathdirs $found_dir"
8326 fi
8327 else
8328 haveit=
8329 for x in $LDFLAGS $LIBICONV; do
8330
8331 acl_save_prefix="$prefix"
8332 prefix="$acl_final_prefix"
8333 acl_save_exec_prefix="$exec_prefix"
8334 exec_prefix="$acl_final_exec_prefix"
8335 eval x=\"$x\"
8336 exec_prefix="$acl_save_exec_prefix"
8337 prefix="$acl_save_prefix"
8338
8339 if test "X$x" = "X-L$found_dir"; then
8340 haveit=yes
8341 break
8342 fi
8343 done
8344 if test -z "$haveit"; then
8345 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8346 fi
8347 if test "$hardcode_minus_L" != no; then
8348 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8349 else
8350 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8351 fi
8352 fi
8353 fi
8354 fi
8355 else
8356 if test "X$found_a" != "X"; then
8357 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8358 else
8359 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8360 fi
8361 fi
8362 additional_includedir=
8363 case "$found_dir" in
8364 */lib | */lib/)
8365 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8366 additional_includedir="$basedir/include"
8367 ;;
8368 esac
8369 if test "X$additional_includedir" != "X"; then
8370 if test "X$additional_includedir" != "X/usr/include"; then
8371 haveit=
8372 if test "X$additional_includedir" = "X/usr/local/include"; then
8373 if test -n "$GCC"; then
8374 case $host_os in
8375 linux*) haveit=yes;;
8376 esac
8377 fi
8378 fi
8379 if test -z "$haveit"; then
8380 for x in $CPPFLAGS $INCICONV; do
8381
8382 acl_save_prefix="$prefix"
8383 prefix="$acl_final_prefix"
8384 acl_save_exec_prefix="$exec_prefix"
8385 exec_prefix="$acl_final_exec_prefix"
8386 eval x=\"$x\"
8387 exec_prefix="$acl_save_exec_prefix"
8388 prefix="$acl_save_prefix"
8389
8390 if test "X$x" = "X-I$additional_includedir"; then
8391 haveit=yes
8392 break
8393 fi
8394 done
8395 if test -z "$haveit"; then
8396 if test -d "$additional_includedir"; then
8397 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8398 fi
8399 fi
8400 fi
8401 fi
8402 fi
8403 if test -n "$found_la"; then
8404 save_libdir="$libdir"
8405 case "$found_la" in
8406 */* | *\\*) . "$found_la" ;;
8407 *) . "./$found_la" ;;
8408 esac
8409 libdir="$save_libdir"
8410 for dep in $dependency_libs; do
8411 case "$dep" in
8412 -L*)
8413 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8414 if test "X$additional_libdir" != "X/usr/lib"; then
8415 haveit=
8416 if test "X$additional_libdir" = "X/usr/local/lib"; then
8417 if test -n "$GCC"; then
8418 case $host_os in
8419 linux*) haveit=yes;;
8420 esac
8421 fi
8422 fi
8423 if test -z "$haveit"; then
8424 haveit=
8425 for x in $LDFLAGS $LIBICONV; do
8426
8427 acl_save_prefix="$prefix"
8428 prefix="$acl_final_prefix"
8429 acl_save_exec_prefix="$exec_prefix"
8430 exec_prefix="$acl_final_exec_prefix"
8431 eval x=\"$x\"
8432 exec_prefix="$acl_save_exec_prefix"
8433 prefix="$acl_save_prefix"
8434
8435 if test "X$x" = "X-L$additional_libdir"; then
8436 haveit=yes
8437 break
8438 fi
8439 done
8440 if test -z "$haveit"; then
8441 if test -d "$additional_libdir"; then
8442 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8443 fi
8444 fi
8445 haveit=
8446 for x in $LDFLAGS $LTLIBICONV; do
8447
8448 acl_save_prefix="$prefix"
8449 prefix="$acl_final_prefix"
8450 acl_save_exec_prefix="$exec_prefix"
8451 exec_prefix="$acl_final_exec_prefix"
8452 eval x=\"$x\"
8453 exec_prefix="$acl_save_exec_prefix"
8454 prefix="$acl_save_prefix"
8455
8456 if test "X$x" = "X-L$additional_libdir"; then
8457 haveit=yes
8458 break
8459 fi
8460 done
8461 if test -z "$haveit"; then
8462 if test -d "$additional_libdir"; then
8463 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8464 fi
8465 fi
8466 fi
8467 fi
8468 ;;
8469 -R*)
8470 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8471 if test "$enable_rpath" != no; then
8472 haveit=
8473 for x in $rpathdirs; do
8474 if test "X$x" = "X$dir"; then
8475 haveit=yes
8476 break
8477 fi
8478 done
8479 if test -z "$haveit"; then
8480 rpathdirs="$rpathdirs $dir"
8481 fi
8482 haveit=
8483 for x in $ltrpathdirs; do
8484 if test "X$x" = "X$dir"; then
8485 haveit=yes
8486 break
8487 fi
8488 done
8489 if test -z "$haveit"; then
8490 ltrpathdirs="$ltrpathdirs $dir"
8491 fi
8492 fi
8493 ;;
8494 -l*)
8495 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8496 ;;
8497 *.la)
8498 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8499 ;;
8500 *)
8501 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8502 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8503 ;;
8504 esac
8505 done
8506 fi
8507 else
8508 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8509 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8510 fi
8511 fi
8512 fi
8513 done
8514 done
8515 if test "X$rpathdirs" != "X"; then
8516 if test -n "$hardcode_libdir_separator"; then
8517 alldirs=
8518 for found_dir in $rpathdirs; do
8519 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8520 done
8521 acl_save_libdir="$libdir"
8522 libdir="$alldirs"
8523 eval flag=\"$hardcode_libdir_flag_spec\"
8524 libdir="$acl_save_libdir"
8525 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8526 else
8527 for found_dir in $rpathdirs; do
8528 acl_save_libdir="$libdir"
8529 libdir="$found_dir"
8530 eval flag=\"$hardcode_libdir_flag_spec\"
8531 libdir="$acl_save_libdir"
8532 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8533 done
8534 fi
8535 fi
8536 if test "X$ltrpathdirs" != "X"; then
8537 for found_dir in $ltrpathdirs; do
8538 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8539 done
8540 fi
8541
8542
8543
8544
8545
6c7a06a3 8546
6c7a06a3 8547
81ecdfbb
RW
8548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8549$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8550if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8551 $as_echo_n "(cached) " >&6
d542061a 8552else
6c7a06a3
TT
8553
8554 am_cv_func_iconv="no, consider installing GNU libiconv"
8555 am_cv_lib_iconv=no
016a3251
DD
8556 am_save_CPPFLAGS="$CPPFLAGS"
8557 CPPFLAGS="$CPPFLAGS $INCICONV"
8558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8559/* end confdefs.h. */
6c7a06a3
TT
8560#include <stdlib.h>
8561#include <iconv.h>
d542061a
UW
8562int
8563main ()
8564{
6c7a06a3 8565iconv_t cd = iconv_open("","");
016a3251
DD
8566 iconv(cd,NULL,NULL,NULL,NULL);
8567 iconv_close(cd);
d542061a
UW
8568 ;
8569 return 0;
8570}
8571_ACEOF
81ecdfbb 8572if ac_fn_c_try_link "$LINENO"; then :
016a3251 8573 am_cv_func_iconv=yes
d542061a 8574fi
81ecdfbb
RW
8575rm -f core conftest.err conftest.$ac_objext \
8576 conftest$ac_exeext conftest.$ac_ext
016a3251 8577 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8578
016a3251
DD
8579 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8580 for _libs in .libs _libs; do
8581 am_save_CPPFLAGS="$CPPFLAGS"
8582 am_save_LIBS="$LIBS"
8583 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8584 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8586/* end confdefs.h. */
6c7a06a3
TT
8587#include <stdlib.h>
8588#include <iconv.h>
d542061a
UW
8589int
8590main ()
8591{
6c7a06a3 8592iconv_t cd = iconv_open("","");
016a3251
DD
8593 iconv(cd,NULL,NULL,NULL,NULL);
8594 iconv_close(cd);
d542061a
UW
8595 ;
8596 return 0;
8597}
8598_ACEOF
81ecdfbb 8599if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8600 INCICONV="-I../libiconv/include"
8601 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8602 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8603 am_cv_lib_iconv=yes
8604 am_cv_func_iconv=yes
d542061a 8605fi
81ecdfbb
RW
8606rm -f core conftest.err conftest.$ac_objext \
8607 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8608 CPPFLAGS="$am_save_CPPFLAGS"
8609 LIBS="$am_save_LIBS"
8610 if test "$am_cv_func_iconv" = "yes"; then
8611 break
8612 fi
8613 done
77f120bf 8614 fi
94ae1714 8615
4edb1e84 8616 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8617 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8618 am_save_LIBS="$LIBS"
5d762de0 8619 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8620 LIBS="$LIBS $LIBICONV"
81ecdfbb 8621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8622/* end confdefs.h. */
6c7a06a3
TT
8623#include <stdlib.h>
8624#include <iconv.h>
bec39cab
AC
8625int
8626main ()
8627{
6c7a06a3
TT
8628iconv_t cd = iconv_open("","");
8629 iconv(cd,NULL,NULL,NULL,NULL);
8630 iconv_close(cd);
bec39cab
AC
8631 ;
8632 return 0;
8633}
8634_ACEOF
81ecdfbb 8635if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8636 am_cv_lib_iconv=yes
6c7a06a3 8637 am_cv_func_iconv=yes
627af7ea 8638fi
81ecdfbb
RW
8639rm -f core conftest.err conftest.$ac_objext \
8640 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8641 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8642 LIBS="$am_save_LIBS"
6c7a06a3
TT
8643 fi
8644
8645fi
81ecdfbb
RW
8646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8647$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8648 if test "$am_cv_func_iconv" = yes; then
8649
8650$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8651
016a3251 8652 fi
fc3b640d 8653 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8654
8655 for element in $INCICONV; do
8656 haveit=
8657 for x in $CPPFLAGS; do
8658
8659 acl_save_prefix="$prefix"
8660 prefix="$acl_final_prefix"
8661 acl_save_exec_prefix="$exec_prefix"
8662 exec_prefix="$acl_final_exec_prefix"
8663 eval x=\"$x\"
8664 exec_prefix="$acl_save_exec_prefix"
8665 prefix="$acl_save_prefix"
8666
8667 if test "X$x" = "X$element"; then
8668 haveit=yes
8669 break
8670 fi
8671 done
8672 if test -z "$haveit"; then
8673 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8674 fi
8675 done
8676
8677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8678$as_echo_n "checking how to link with libiconv... " >&6; }
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8680$as_echo "$LIBICONV" >&6; }
94ae1714 8681 else
016a3251
DD
8682 LIBICONV=
8683 LTLIBICONV=
fc3b640d 8684 fi
94ae1714 8685
6c7a06a3 8686
6c7a06a3 8687
016a3251 8688 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8690$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8691 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8692 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8693else
8694
81ecdfbb 8695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8696/* end confdefs.h. */
8697
6c7a06a3
TT
8698#include <stdlib.h>
8699#include <iconv.h>
8700extern
b4e70030 8701#ifdef __cplusplus
6c7a06a3 8702"C"
b4e70030 8703#endif
6c7a06a3
TT
8704#if defined(__STDC__) || defined(__cplusplus)
8705size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8706#else
8707size_t iconv();
8708#endif
8709
b4e70030
JB
8710int
8711main ()
8712{
6c7a06a3 8713
b4e70030
JB
8714 ;
8715 return 0;
8716}
8717_ACEOF
81ecdfbb 8718if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8719 am_cv_proto_iconv_arg1=""
4e8d927d 8720else
81ecdfbb 8721 am_cv_proto_iconv_arg1="const"
b4e70030 8722fi
81ecdfbb 8723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8724 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);"
8725fi
8726
8727 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8729 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8730$as_echo "${ac_t:-
8731 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8732
8733cat >>confdefs.h <<_ACEOF
8734#define ICONV_CONST $am_cv_proto_iconv_arg1
8735_ACEOF
8736
8737 fi
6c7a06a3
TT
8738
8739
478aac75
DE
8740# GDB may fork/exec the iconv program to get the list of supported character
8741# sets. Allow the user to specify where to find it.
8742# There are several factors affecting the choice of option name:
8743# - There is already --with-libiconv-prefix but we can't use it, it specifies
8744# the build-time location of libiconv files.
8745# - The program we need to find is iconv, which comes with glibc. The user
8746# doesn't necessarily have libiconv installed. Therefore naming this
8747# --with-libiconv-foo feels wrong.
8748# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8749# defined to work on directories not files (though it really doesn't know
8750# the difference).
8751# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8752# with --with-libiconv-prefix.
8753# Putting these together is why the option name is --with-iconv-bin.
8754
8755
8756# Check whether --with-iconv-bin was given.
8757if test "${with_iconv_bin+set}" = set; then :
8758 withval=$with_iconv_bin; iconv_bin="${withval}"
8759
8760cat >>confdefs.h <<_ACEOF
8761#define ICONV_BIN "${iconv_bin}"
8762_ACEOF
8763
8764
8765 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8766 if test "x$prefix" = xNONE; then
8767 test_prefix=/usr/local
8768 else
8769 test_prefix=$prefix
8770 fi
8771 else
8772 test_prefix=$exec_prefix
8773 fi
8774 value=0
8775 case ${iconv_bin} in
8776 "${test_prefix}"|"${test_prefix}/"*|\
8777 '${exec_prefix}'|'${exec_prefix}/'*)
8778 value=1
8779 ;;
8780 esac
8781
8782cat >>confdefs.h <<_ACEOF
8783#define ICONV_BIN_RELOCATABLE $value
8784_ACEOF
8785
8786
8787
8788fi
8789
8790
cb01cfba 8791# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8792if test x"$enable_tui" != xno; then
cb01cfba
JB
8793 prefer_curses=yes
8794fi
8795
8796curses_found=no
8797if test x"$prefer_curses" = xyes; then
8798 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8799 # curses library because the latter might not provide all the
8800 # functionality we need. However, this leads to problems on systems
8801 # where the linker searches /usr/local/lib, but the compiler doesn't
8802 # search /usr/local/include, if ncurses is installed in /usr/local. A
8803 # default installation of ncurses on alpha*-dec-osf* will lead to such
8804 # a situation.
81ecdfbb
RW
8805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8806$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8807if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8808 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8809else
8810 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8812/* end confdefs.h. */
8813
81ecdfbb
RW
8814/* Override any GCC internal prototype to avoid an error.
8815 Use char because int might match the return type of a GCC
8816 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8817#ifdef __cplusplus
8818extern "C"
8819#endif
6c7a06a3
TT
8820char waddstr ();
8821int
8822main ()
8823{
81ecdfbb 8824return waddstr ();
6c7a06a3
TT
8825 ;
8826 return 0;
8827}
8828_ACEOF
5007d765 8829for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8830 if test -z "$ac_lib"; then
8831 ac_res="none required"
8832 else
8833 ac_res=-l$ac_lib
8834 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8835 fi
8836 if ac_fn_c_try_link "$LINENO"; then :
8837 ac_cv_search_waddstr=$ac_res
8838fi
8839rm -f core conftest.err conftest.$ac_objext \
8840 conftest$ac_exeext
d0ac1c44 8841 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8842 break
8843fi
8844done
d0ac1c44 8845if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8846
6c7a06a3 8847else
81ecdfbb
RW
8848 ac_cv_search_waddstr=no
8849fi
8850rm conftest.$ac_ext
8851LIBS=$ac_func_search_save_LIBS
8852fi
8853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8854$as_echo "$ac_cv_search_waddstr" >&6; }
8855ac_res=$ac_cv_search_waddstr
8856if test "$ac_res" != no; then :
8857 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8858
8859fi
8860
8861
cb01cfba
JB
8862 if test "$ac_cv_search_waddstr" != no; then
8863 curses_found=yes
8864 fi
8865fi
8866
8867# Check whether we should enable the TUI, but only do so if we really
8868# can.
8869if test x"$enable_tui" != xno; then
0ad6b8ee 8870 if test -d "$srcdir/tui"; then
cb01cfba 8871 if test "$curses_found" != no; then
6c7a06a3
TT
8872 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8873 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8874 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8875 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8876 else
8877 if test x"$enable_tui" = xyes; then
d0ac1c44 8878 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8879 else
81ecdfbb
RW
8880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8881$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8882 fi
8883 fi
8884 fi
8885fi
8886
8887# Since GDB uses Readline, we need termcap functionality. In many
8888# cases this will be provided by the curses library, but some systems
96fe4562 8889# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8890
8891case $host_os in
8892 cygwin*)
0ad6b8ee 8893 if test -d "$srcdir/libtermcap"; then
6c7a06a3
TT
8894 LIBS="../libtermcap/libtermcap.a $LIBS"
8895 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8896 fi ;;
8897 go32* | *djgpp*)
8898 ac_cv_search_tgetent="none required"
8899 ;;
6c7a06a3
TT
8900esac
8901
8902# These are the libraries checked by Readline.
81ecdfbb
RW
8903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8904$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 8905if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 8906 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8907else
8908 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8910/* end confdefs.h. */
8911
81ecdfbb
RW
8912/* Override any GCC internal prototype to avoid an error.
8913 Use char because int might match the return type of a GCC
8914 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8915#ifdef __cplusplus
8916extern "C"
8917#endif
6c7a06a3
TT
8918char tgetent ();
8919int
8920main ()
8921{
81ecdfbb 8922return tgetent ();
6c7a06a3
TT
8923 ;
8924 return 0;
8925}
8926_ACEOF
2578ecb1 8927for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
8928 if test -z "$ac_lib"; then
8929 ac_res="none required"
8930 else
8931 ac_res=-l$ac_lib
6c7a06a3 8932 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8933 fi
8934 if ac_fn_c_try_link "$LINENO"; then :
8935 ac_cv_search_tgetent=$ac_res
8936fi
8937rm -f core conftest.err conftest.$ac_objext \
8938 conftest$ac_exeext
d0ac1c44 8939 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
8940 break
8941fi
8942done
d0ac1c44 8943if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 8944
6c7a06a3 8945else
81ecdfbb 8946 ac_cv_search_tgetent=no
6c7a06a3 8947fi
81ecdfbb 8948rm conftest.$ac_ext
6c7a06a3
TT
8949LIBS=$ac_func_search_save_LIBS
8950fi
81ecdfbb
RW
8951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8952$as_echo "$ac_cv_search_tgetent" >&6; }
8953ac_res=$ac_cv_search_tgetent
8954if test "$ac_res" != no; then :
8955 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8956
06825bd1
MK
8957fi
8958
06825bd1 8959
bec39cab 8960if test "$ac_cv_search_tgetent" = no; then
7a85168d 8961 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8962fi
8963
3841debe 8964
81ecdfbb
RW
8965# Check whether --with-system-readline was given.
8966if test "${with_system_readline+set}" = set; then :
8967 withval=$with_system_readline;
8968fi
6a30b0a5 8969
6a30b0a5
AS
8970
8971if test "$with_system_readline" = yes; then
86c6b807
TT
8972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
8973$as_echo_n "checking whether system readline is new enough... " >&6; }
8974if ${gdb_cv_readline_ok+:} false; then :
8975 $as_echo_n "(cached) " >&6
8976else
8977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8978/* end confdefs.h. */
8979#include <stdio.h>
8980#include <readline/readline.h>
8981int
8982main ()
8983{
8984#if RL_VERSION_MAJOR < 7
8985# error "readline version 7 required"
8986#endif
8987 ;
8988 return 0;
8989}
8990_ACEOF
8991if ac_fn_c_try_compile "$LINENO"; then :
8992 gdb_cv_readline_ok=yes
8993else
8994 gdb_cv_readline_ok=no
8995fi
8996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8997fi
8998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
8999$as_echo "$gdb_cv_readline_ok" >&6; }
9000 if test "$gdb_cv_readline_ok" != yes; then
9001 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9002 fi
9003
6a30b0a5
AS
9004 READLINE=-lreadline
9005 READLINE_DEPS=
9006 READLINE_CFLAGS=
39037522 9007 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9008else
9009 READLINE='$(READLINE_DIR)/libreadline.a'
9010 READLINE_DEPS='$(READLINE)'
9011 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9012 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9013fi
9014
9015
9016
9017
9018
f997c383
SD
9019# Generate jit-reader.h
9020
9021# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9022TARGET_PTR=
9023
9024# The cast to long int works around a bug in the HP C Compiler
9025# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9026# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9027# This bug is HP SR number 8606223364.
9028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9029$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9030if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9031 $as_echo_n "(cached) " >&6
9032else
9033 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9034
9035else
9036 if test "$ac_cv_type_unsigned_long_long" = yes; then
9037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9038$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9039as_fn_error 77 "cannot compute sizeof (unsigned long long)
9040See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9041 else
9042 ac_cv_sizeof_unsigned_long_long=0
9043 fi
9044fi
9045
9046fi
9047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9048$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9049
9050
9051
9052cat >>confdefs.h <<_ACEOF
9053#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9054_ACEOF
9055
9056
9057# The cast to long int works around a bug in the HP C Compiler
9058# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9059# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9060# This bug is HP SR number 8606223364.
9061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9062$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9063if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9064 $as_echo_n "(cached) " >&6
9065else
9066 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9067
9068else
9069 if test "$ac_cv_type_unsigned_long" = yes; then
9070 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9072as_fn_error 77 "cannot compute sizeof (unsigned long)
9073See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9074 else
9075 ac_cv_sizeof_unsigned_long=0
9076 fi
9077fi
9078
9079fi
9080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9081$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9082
9083
9084
9085cat >>confdefs.h <<_ACEOF
9086#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9087_ACEOF
9088
9089
9090# The cast to long int works around a bug in the HP C Compiler
9091# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9092# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9093# This bug is HP SR number 8606223364.
9094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9095$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9096if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9097 $as_echo_n "(cached) " >&6
9098else
9099 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9100
9101else
9102 if test "$ac_cv_type_unsigned___int128" = yes; then
9103 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9104$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9105as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9106See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9107 else
9108 ac_cv_sizeof_unsigned___int128=0
9109 fi
9110fi
9111
9112fi
9113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9114$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9115
9116
9117
9118cat >>confdefs.h <<_ACEOF
9119#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9120_ACEOF
9121
9122
9123
9124if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9125 TARGET_PTR="unsigned long"
9126elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9127 TARGET_PTR="unsigned long long"
9128elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9129 TARGET_PTR="unsigned __int128"
9130else
9131 TARGET_PTR="unsigned long"
9132fi
9133
9134
9135ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9136
9137
a2d08b9e
SD
9138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9139$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9140if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9141 $as_echo_n "(cached) " >&6
9142else
9143 ac_func_search_save_LIBS=$LIBS
9144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9145/* end confdefs.h. */
9146
9147/* Override any GCC internal prototype to avoid an error.
9148 Use char because int might match the return type of a GCC
9149 builtin and then its argument prototype would still apply. */
9150#ifdef __cplusplus
9151extern "C"
9152#endif
9153char dlopen ();
9154int
9155main ()
9156{
9157return dlopen ();
9158 ;
9159 return 0;
9160}
9161_ACEOF
9162for ac_lib in '' dl; do
9163 if test -z "$ac_lib"; then
9164 ac_res="none required"
9165 else
9166 ac_res=-l$ac_lib
9167 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9168 fi
9169 if ac_fn_c_try_link "$LINENO"; then :
9170 ac_cv_search_dlopen=$ac_res
9171fi
9172rm -f core conftest.err conftest.$ac_objext \
9173 conftest$ac_exeext
d0ac1c44 9174 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9175 break
9176fi
9177done
d0ac1c44 9178if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9179
9180else
9181 ac_cv_search_dlopen=no
9182fi
9183rm conftest.$ac_ext
9184LIBS=$ac_func_search_save_LIBS
9185fi
9186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9187$as_echo "$ac_cv_search_dlopen" >&6; }
9188ac_res=$ac_cv_search_dlopen
9189if test "$ac_res" != no; then :
9190 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9191
9192fi
9193
9194
39037522 9195
b8e0a31c
SD
9196
9197# Check whether --with-jit-reader-dir was given.
9198if test "${with_jit_reader_dir+set}" = set; then :
9199 withval=$with_jit_reader_dir;
9200 JIT_READER_DIR=$withval
9201else
9202 JIT_READER_DIR=${libdir}/gdb
9203fi
9204
9205
9206 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9207 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9208 ac_define_dir=`eval echo $JIT_READER_DIR`
9209 ac_define_dir=`eval echo $ac_define_dir`
9210
9211cat >>confdefs.h <<_ACEOF
9212#define JIT_READER_DIR "$ac_define_dir"
9213_ACEOF
9214
9215
9216
9217
9218 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9219 if test "x$prefix" = xNONE; then
9220 test_prefix=/usr/local
9221 else
9222 test_prefix=$prefix
9223 fi
9224 else
9225 test_prefix=$exec_prefix
9226 fi
9227 value=0
9228 case ${ac_define_dir} in
9229 "${test_prefix}"|"${test_prefix}/"*|\
9230 '${exec_prefix}'|'${exec_prefix}/'*)
9231 value=1
9232 ;;
9233 esac
9234
9235cat >>confdefs.h <<_ACEOF
9236#define JIT_READER_DIR_RELOCATABLE $value
9237_ACEOF
9238
9239
9240
9241
9242
81ecdfbb
RW
9243# Check whether --with-expat was given.
9244if test "${with_expat+set}" = set; then :
9245 withval=$with_expat;
5c39566f
DJ
9246else
9247 with_expat=auto
81ecdfbb
RW
9248fi
9249
9250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9251$as_echo_n "checking whether to use expat... " >&6; }
9252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9253$as_echo "$with_expat" >&6; }
5c39566f
DJ
9254
9255if test "${with_expat}" = no; then
81ecdfbb
RW
9256 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9257$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9258 HAVE_LIBEXPAT=no
9259else
9260
3841debe
DJ
9261
9262
9263
9264
9265
9266
9267
9268 use_additional=yes
9269
9270 acl_save_prefix="$prefix"
9271 prefix="$acl_final_prefix"
9272 acl_save_exec_prefix="$exec_prefix"
9273 exec_prefix="$acl_final_exec_prefix"
9274
9275 eval additional_includedir=\"$includedir\"
9276 eval additional_libdir=\"$libdir\"
9277
9278 exec_prefix="$acl_save_exec_prefix"
9279 prefix="$acl_save_prefix"
9280
9281
81ecdfbb
RW
9282# Check whether --with-libexpat-prefix was given.
9283if test "${with_libexpat_prefix+set}" = set; then :
9284 withval=$with_libexpat_prefix;
3841debe
DJ
9285 if test "X$withval" = "Xno"; then
9286 use_additional=no
9287 else
9288 if test "X$withval" = "X"; then
9289
9290 acl_save_prefix="$prefix"
9291 prefix="$acl_final_prefix"
9292 acl_save_exec_prefix="$exec_prefix"
9293 exec_prefix="$acl_final_exec_prefix"
9294
9295 eval additional_includedir=\"$includedir\"
9296 eval additional_libdir=\"$libdir\"
9297
9298 exec_prefix="$acl_save_exec_prefix"
9299 prefix="$acl_save_prefix"
9300
9301 else
9302 additional_includedir="$withval/include"
9303 additional_libdir="$withval/lib"
9304 fi
9305 fi
9306
81ecdfbb
RW
9307fi
9308
3841debe
DJ
9309 LIBEXPAT=
9310 LTLIBEXPAT=
9311 INCEXPAT=
9312 rpathdirs=
9313 ltrpathdirs=
9314 names_already_handled=
9315 names_next_round='expat '
9316 while test -n "$names_next_round"; do
9317 names_this_round="$names_next_round"
9318 names_next_round=
9319 for name in $names_this_round; do
9320 already_handled=
9321 for n in $names_already_handled; do
9322 if test "$n" = "$name"; then
9323 already_handled=yes
9324 break
9325 fi
9326 done
9327 if test -z "$already_handled"; then
9328 names_already_handled="$names_already_handled $name"
9329 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9330 eval value=\"\$HAVE_LIB$uppername\"
9331 if test -n "$value"; then
9332 if test "$value" = yes; then
9333 eval value=\"\$LIB$uppername\"
9334 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9335 eval value=\"\$LTLIB$uppername\"
9336 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9337 else
9338 :
9339 fi
9340 else
9341 found_dir=
9342 found_la=
9343 found_so=
9344 found_a=
9345 if test $use_additional = yes; then
9346 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9347 found_dir="$additional_libdir"
9348 found_so="$additional_libdir/lib$name.$shlibext"
9349 if test -f "$additional_libdir/lib$name.la"; then
9350 found_la="$additional_libdir/lib$name.la"
9351 fi
9352 else
9353 if test -f "$additional_libdir/lib$name.$libext"; then
9354 found_dir="$additional_libdir"
9355 found_a="$additional_libdir/lib$name.$libext"
9356 if test -f "$additional_libdir/lib$name.la"; then
9357 found_la="$additional_libdir/lib$name.la"
9358 fi
9359 fi
9360 fi
9361 fi
9362 if test "X$found_dir" = "X"; then
9363 for x in $LDFLAGS $LTLIBEXPAT; do
9364
9365 acl_save_prefix="$prefix"
9366 prefix="$acl_final_prefix"
9367 acl_save_exec_prefix="$exec_prefix"
9368 exec_prefix="$acl_final_exec_prefix"
9369 eval x=\"$x\"
9370 exec_prefix="$acl_save_exec_prefix"
9371 prefix="$acl_save_prefix"
9372
9373 case "$x" in
9374 -L*)
9375 dir=`echo "X$x" | sed -e 's/^X-L//'`
9376 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9377 found_dir="$dir"
9378 found_so="$dir/lib$name.$shlibext"
9379 if test -f "$dir/lib$name.la"; then
9380 found_la="$dir/lib$name.la"
9381 fi
9382 else
9383 if test -f "$dir/lib$name.$libext"; then
9384 found_dir="$dir"
9385 found_a="$dir/lib$name.$libext"
9386 if test -f "$dir/lib$name.la"; then
9387 found_la="$dir/lib$name.la"
9388 fi
9389 fi
9390 fi
9391 ;;
9392 esac
9393 if test "X$found_dir" != "X"; then
9394 break
9395 fi
9396 done
9397 fi
9398 if test "X$found_dir" != "X"; then
9399 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9400 if test "X$found_so" != "X"; then
9401 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9402 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9403 else
9404 haveit=
9405 for x in $ltrpathdirs; do
9406 if test "X$x" = "X$found_dir"; then
9407 haveit=yes
9408 break
9409 fi
9410 done
9411 if test -z "$haveit"; then
9412 ltrpathdirs="$ltrpathdirs $found_dir"
9413 fi
9414 if test "$hardcode_direct" = yes; then
9415 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9416 else
9417 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9418 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9419 haveit=
9420 for x in $rpathdirs; do
9421 if test "X$x" = "X$found_dir"; then
9422 haveit=yes
9423 break
9424 fi
9425 done
9426 if test -z "$haveit"; then
9427 rpathdirs="$rpathdirs $found_dir"
9428 fi
9429 else
9430 haveit=
9431 for x in $LDFLAGS $LIBEXPAT; 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 if test "X$x" = "X-L$found_dir"; then
9442 haveit=yes
9443 break
9444 fi
9445 done
9446 if test -z "$haveit"; then
9447 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9448 fi
9449 if test "$hardcode_minus_L" != no; then
9450 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9451 else
9452 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9453 fi
9454 fi
9455 fi
9456 fi
9457 else
9458 if test "X$found_a" != "X"; then
9459 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9460 else
9461 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9462 fi
9463 fi
9464 additional_includedir=
9465 case "$found_dir" in
9466 */lib | */lib/)
9467 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9468 additional_includedir="$basedir/include"
9469 ;;
9470 esac
9471 if test "X$additional_includedir" != "X"; then
9472 if test "X$additional_includedir" != "X/usr/include"; then
9473 haveit=
9474 if test "X$additional_includedir" = "X/usr/local/include"; then
9475 if test -n "$GCC"; then
9476 case $host_os in
9477 linux*) haveit=yes;;
9478 esac
9479 fi
9480 fi
9481 if test -z "$haveit"; then
9482 for x in $CPPFLAGS $INCEXPAT; do
9483
9484 acl_save_prefix="$prefix"
9485 prefix="$acl_final_prefix"
9486 acl_save_exec_prefix="$exec_prefix"
9487 exec_prefix="$acl_final_exec_prefix"
9488 eval x=\"$x\"
9489 exec_prefix="$acl_save_exec_prefix"
9490 prefix="$acl_save_prefix"
9491
9492 if test "X$x" = "X-I$additional_includedir"; then
9493 haveit=yes
9494 break
9495 fi
9496 done
9497 if test -z "$haveit"; then
9498 if test -d "$additional_includedir"; then
9499 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9500 fi
9501 fi
9502 fi
9503 fi
9504 fi
9505 if test -n "$found_la"; then
9506 save_libdir="$libdir"
9507 case "$found_la" in
9508 */* | *\\*) . "$found_la" ;;
9509 *) . "./$found_la" ;;
9510 esac
9511 libdir="$save_libdir"
9512 for dep in $dependency_libs; do
9513 case "$dep" in
9514 -L*)
9515 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9516 if test "X$additional_libdir" != "X/usr/lib"; then
9517 haveit=
9518 if test "X$additional_libdir" = "X/usr/local/lib"; then
9519 if test -n "$GCC"; then
9520 case $host_os in
9521 linux*) haveit=yes;;
9522 esac
9523 fi
9524 fi
9525 if test -z "$haveit"; then
9526 haveit=
9527 for x in $LDFLAGS $LIBEXPAT; do
9528
9529 acl_save_prefix="$prefix"
9530 prefix="$acl_final_prefix"
9531 acl_save_exec_prefix="$exec_prefix"
9532 exec_prefix="$acl_final_exec_prefix"
9533 eval x=\"$x\"
9534 exec_prefix="$acl_save_exec_prefix"
9535 prefix="$acl_save_prefix"
9536
9537 if test "X$x" = "X-L$additional_libdir"; then
9538 haveit=yes
9539 break
9540 fi
9541 done
9542 if test -z "$haveit"; then
9543 if test -d "$additional_libdir"; then
9544 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9545 fi
9546 fi
9547 haveit=
9548 for x in $LDFLAGS $LTLIBEXPAT; do
9549
9550 acl_save_prefix="$prefix"
9551 prefix="$acl_final_prefix"
9552 acl_save_exec_prefix="$exec_prefix"
9553 exec_prefix="$acl_final_exec_prefix"
9554 eval x=\"$x\"
9555 exec_prefix="$acl_save_exec_prefix"
9556 prefix="$acl_save_prefix"
9557
9558 if test "X$x" = "X-L$additional_libdir"; then
9559 haveit=yes
9560 break
9561 fi
9562 done
9563 if test -z "$haveit"; then
9564 if test -d "$additional_libdir"; then
9565 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9566 fi
9567 fi
9568 fi
9569 fi
9570 ;;
9571 -R*)
9572 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9573 if test "$enable_rpath" != no; then
9574 haveit=
9575 for x in $rpathdirs; do
9576 if test "X$x" = "X$dir"; then
9577 haveit=yes
9578 break
9579 fi
9580 done
9581 if test -z "$haveit"; then
9582 rpathdirs="$rpathdirs $dir"
9583 fi
9584 haveit=
9585 for x in $ltrpathdirs; do
9586 if test "X$x" = "X$dir"; then
9587 haveit=yes
9588 break
9589 fi
9590 done
9591 if test -z "$haveit"; then
9592 ltrpathdirs="$ltrpathdirs $dir"
9593 fi
9594 fi
9595 ;;
9596 -l*)
9597 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9598 ;;
9599 *.la)
9600 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9601 ;;
9602 *)
9603 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9604 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9605 ;;
81ecdfbb
RW
9606 esac
9607 done
9608 fi
9609 else
9610 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9611 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9612 fi
9613 fi
9614 fi
9615 done
9616 done
9617 if test "X$rpathdirs" != "X"; then
9618 if test -n "$hardcode_libdir_separator"; then
9619 alldirs=
9620 for found_dir in $rpathdirs; do
9621 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9622 done
9623 acl_save_libdir="$libdir"
9624 libdir="$alldirs"
9625 eval flag=\"$hardcode_libdir_flag_spec\"
9626 libdir="$acl_save_libdir"
9627 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9628 else
9629 for found_dir in $rpathdirs; do
9630 acl_save_libdir="$libdir"
9631 libdir="$found_dir"
9632 eval flag=\"$hardcode_libdir_flag_spec\"
9633 libdir="$acl_save_libdir"
9634 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9635 done
9636 fi
9637 fi
9638 if test "X$ltrpathdirs" != "X"; then
9639 for found_dir in $ltrpathdirs; do
9640 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9641 done
9642 fi
a9322a30
TT
9643
9644
81ecdfbb 9645 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9646
81ecdfbb
RW
9647 for element in $INCEXPAT; do
9648 haveit=
9649 for x in $CPPFLAGS; do
a9322a30 9650
81ecdfbb
RW
9651 acl_save_prefix="$prefix"
9652 prefix="$acl_final_prefix"
9653 acl_save_exec_prefix="$exec_prefix"
9654 exec_prefix="$acl_final_exec_prefix"
9655 eval x=\"$x\"
9656 exec_prefix="$acl_save_exec_prefix"
9657 prefix="$acl_save_prefix"
a8111142 9658
81ecdfbb
RW
9659 if test "X$x" = "X$element"; then
9660 haveit=yes
9661 break
9662 fi
9663 done
9664 if test -z "$haveit"; then
9665 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9666 fi
9667 done
a9322a30
TT
9668
9669
81ecdfbb
RW
9670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9671$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9672if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9673 $as_echo_n "(cached) " >&6
bec39cab 9674else
bec39cab 9675
81ecdfbb
RW
9676 ac_save_LIBS="$LIBS"
9677 LIBS="$LIBS $LIBEXPAT"
9678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9679/* end confdefs.h. */
81ecdfbb
RW
9680#include "expat.h"
9681int
9682main ()
9683{
9684XML_Parser p = XML_ParserCreate (0);
9685 ;
9686 return 0;
9687}
bec39cab 9688_ACEOF
81ecdfbb
RW
9689if ac_fn_c_try_link "$LINENO"; then :
9690 ac_cv_libexpat=yes
c906108c 9691else
81ecdfbb 9692 ac_cv_libexpat=no
bec39cab 9693fi
81ecdfbb
RW
9694rm -f core conftest.err conftest.$ac_objext \
9695 conftest$ac_exeext conftest.$ac_ext
9696 LIBS="$ac_save_LIBS"
c906108c 9697
95ca63c4 9698fi
81ecdfbb
RW
9699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9700$as_echo "$ac_cv_libexpat" >&6; }
9701 if test "$ac_cv_libexpat" = yes; then
9702 HAVE_LIBEXPAT=yes
bec39cab 9703
81ecdfbb 9704$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9705
81ecdfbb
RW
9706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9707$as_echo_n "checking how to link with libexpat... " >&6; }
9708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9709$as_echo "$LIBEXPAT" >&6; }
9710 else
9711 HAVE_LIBEXPAT=no
9712 CPPFLAGS="$ac_save_CPPFLAGS"
9713 LIBEXPAT=
9714 LTLIBEXPAT=
9715 fi
95ca63c4
CF
9716
9717
9718
7cb9022a
MK
9719
9720
bec39cab 9721
81ecdfbb
RW
9722 if test "$HAVE_LIBEXPAT" != yes; then
9723 if test "$with_expat" = yes; then
d0ac1c44 9724 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9725 else
9726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9727$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9728 fi
9729 else
9730 save_LIBS=$LIBS
9731 LIBS="$LIBS $LIBEXPAT"
9732 for ac_func in XML_StopParser
9733do :
9734 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9735if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9736 cat >>confdefs.h <<_ACEOF
81ecdfbb 9737#define HAVE_XML_STOPPARSER 1
bec39cab 9738_ACEOF
95ca63c4 9739
bec39cab 9740fi
bec39cab 9741done
95ca63c4 9742
81ecdfbb
RW
9743 LIBS=$save_LIBS
9744 fi
a9322a30
TT
9745fi
9746
2400729e
UW
9747
9748# Check whether --with-mpfr was given.
9749if test "${with_mpfr+set}" = set; then :
9750 withval=$with_mpfr;
9751else
9752 with_mpfr=auto
9753fi
9754
9755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9756$as_echo_n "checking whether to use MPFR... " >&6; }
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9758$as_echo "$with_mpfr" >&6; }
9759
9760if test "${with_mpfr}" = no; then
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9762$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9763 HAVE_LIBMPFR=no
9764else
9765
9766
9767
9768
9769
9770
9771
9772
9773 use_additional=yes
9774
9775 acl_save_prefix="$prefix"
9776 prefix="$acl_final_prefix"
9777 acl_save_exec_prefix="$exec_prefix"
9778 exec_prefix="$acl_final_exec_prefix"
9779
9780 eval additional_includedir=\"$includedir\"
9781 eval additional_libdir=\"$libdir\"
9782
9783 exec_prefix="$acl_save_exec_prefix"
9784 prefix="$acl_save_prefix"
9785
9786
9787# Check whether --with-libmpfr-prefix was given.
9788if test "${with_libmpfr_prefix+set}" = set; then :
9789 withval=$with_libmpfr_prefix;
9790 if test "X$withval" = "Xno"; then
9791 use_additional=no
9792 else
9793 if test "X$withval" = "X"; then
9794
9795 acl_save_prefix="$prefix"
9796 prefix="$acl_final_prefix"
9797 acl_save_exec_prefix="$exec_prefix"
9798 exec_prefix="$acl_final_exec_prefix"
9799
9800 eval additional_includedir=\"$includedir\"
9801 eval additional_libdir=\"$libdir\"
9802
9803 exec_prefix="$acl_save_exec_prefix"
9804 prefix="$acl_save_prefix"
9805
9806 else
9807 additional_includedir="$withval/include"
9808 additional_libdir="$withval/lib"
9809 fi
9810 fi
9811
9812fi
9813
9814 LIBMPFR=
9815 LTLIBMPFR=
9816 INCMPFR=
9817 rpathdirs=
9818 ltrpathdirs=
9819 names_already_handled=
da658607 9820 names_next_round='mpfr gmp'
2400729e
UW
9821 while test -n "$names_next_round"; do
9822 names_this_round="$names_next_round"
9823 names_next_round=
9824 for name in $names_this_round; do
9825 already_handled=
9826 for n in $names_already_handled; do
9827 if test "$n" = "$name"; then
9828 already_handled=yes
9829 break
9830 fi
9831 done
9832 if test -z "$already_handled"; then
9833 names_already_handled="$names_already_handled $name"
9834 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9835 eval value=\"\$HAVE_LIB$uppername\"
9836 if test -n "$value"; then
9837 if test "$value" = yes; then
9838 eval value=\"\$LIB$uppername\"
9839 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9840 eval value=\"\$LTLIB$uppername\"
9841 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9842 else
9843 :
9844 fi
9845 else
9846 found_dir=
9847 found_la=
9848 found_so=
9849 found_a=
9850 if test $use_additional = yes; then
9851 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9852 found_dir="$additional_libdir"
9853 found_so="$additional_libdir/lib$name.$shlibext"
9854 if test -f "$additional_libdir/lib$name.la"; then
9855 found_la="$additional_libdir/lib$name.la"
9856 fi
9857 else
9858 if test -f "$additional_libdir/lib$name.$libext"; then
9859 found_dir="$additional_libdir"
9860 found_a="$additional_libdir/lib$name.$libext"
9861 if test -f "$additional_libdir/lib$name.la"; then
9862 found_la="$additional_libdir/lib$name.la"
9863 fi
9864 fi
9865 fi
9866 fi
9867 if test "X$found_dir" = "X"; then
9868 for x in $LDFLAGS $LTLIBMPFR; do
9869
9870 acl_save_prefix="$prefix"
9871 prefix="$acl_final_prefix"
9872 acl_save_exec_prefix="$exec_prefix"
9873 exec_prefix="$acl_final_exec_prefix"
9874 eval x=\"$x\"
9875 exec_prefix="$acl_save_exec_prefix"
9876 prefix="$acl_save_prefix"
9877
9878 case "$x" in
9879 -L*)
9880 dir=`echo "X$x" | sed -e 's/^X-L//'`
9881 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9882 found_dir="$dir"
9883 found_so="$dir/lib$name.$shlibext"
9884 if test -f "$dir/lib$name.la"; then
9885 found_la="$dir/lib$name.la"
9886 fi
9887 else
9888 if test -f "$dir/lib$name.$libext"; then
9889 found_dir="$dir"
9890 found_a="$dir/lib$name.$libext"
9891 if test -f "$dir/lib$name.la"; then
9892 found_la="$dir/lib$name.la"
9893 fi
9894 fi
9895 fi
9896 ;;
9897 esac
9898 if test "X$found_dir" != "X"; then
9899 break
9900 fi
9901 done
9902 fi
9903 if test "X$found_dir" != "X"; then
9904 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9905 if test "X$found_so" != "X"; then
9906 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9907 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9908 else
9909 haveit=
9910 for x in $ltrpathdirs; do
9911 if test "X$x" = "X$found_dir"; then
9912 haveit=yes
9913 break
9914 fi
9915 done
9916 if test -z "$haveit"; then
9917 ltrpathdirs="$ltrpathdirs $found_dir"
9918 fi
9919 if test "$hardcode_direct" = yes; then
9920 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9921 else
9922 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9923 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9924 haveit=
9925 for x in $rpathdirs; do
9926 if test "X$x" = "X$found_dir"; then
9927 haveit=yes
9928 break
9929 fi
9930 done
9931 if test -z "$haveit"; then
9932 rpathdirs="$rpathdirs $found_dir"
9933 fi
9934 else
9935 haveit=
9936 for x in $LDFLAGS $LIBMPFR; 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 if test "X$x" = "X-L$found_dir"; then
9947 haveit=yes
9948 break
9949 fi
9950 done
9951 if test -z "$haveit"; then
9952 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9953 fi
9954 if test "$hardcode_minus_L" != no; then
9955 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9956 else
9957 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9958 fi
9959 fi
9960 fi
9961 fi
9962 else
9963 if test "X$found_a" != "X"; then
9964 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
9965 else
9966 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
9967 fi
9968 fi
9969 additional_includedir=
9970 case "$found_dir" in
9971 */lib | */lib/)
9972 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9973 additional_includedir="$basedir/include"
9974 ;;
9975 esac
9976 if test "X$additional_includedir" != "X"; then
9977 if test "X$additional_includedir" != "X/usr/include"; then
9978 haveit=
9979 if test "X$additional_includedir" = "X/usr/local/include"; then
9980 if test -n "$GCC"; then
9981 case $host_os in
9982 linux*) haveit=yes;;
9983 esac
9984 fi
9985 fi
9986 if test -z "$haveit"; then
9987 for x in $CPPFLAGS $INCMPFR; do
9988
9989 acl_save_prefix="$prefix"
9990 prefix="$acl_final_prefix"
9991 acl_save_exec_prefix="$exec_prefix"
9992 exec_prefix="$acl_final_exec_prefix"
9993 eval x=\"$x\"
9994 exec_prefix="$acl_save_exec_prefix"
9995 prefix="$acl_save_prefix"
9996
9997 if test "X$x" = "X-I$additional_includedir"; then
9998 haveit=yes
9999 break
10000 fi
10001 done
10002 if test -z "$haveit"; then
10003 if test -d "$additional_includedir"; then
10004 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10005 fi
10006 fi
10007 fi
10008 fi
10009 fi
10010 if test -n "$found_la"; then
10011 save_libdir="$libdir"
10012 case "$found_la" in
10013 */* | *\\*) . "$found_la" ;;
10014 *) . "./$found_la" ;;
10015 esac
10016 libdir="$save_libdir"
10017 for dep in $dependency_libs; do
10018 case "$dep" in
10019 -L*)
10020 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10021 if test "X$additional_libdir" != "X/usr/lib"; then
10022 haveit=
10023 if test "X$additional_libdir" = "X/usr/local/lib"; then
10024 if test -n "$GCC"; then
10025 case $host_os in
10026 linux*) haveit=yes;;
10027 esac
10028 fi
10029 fi
10030 if test -z "$haveit"; then
10031 haveit=
10032 for x in $LDFLAGS $LIBMPFR; do
10033
10034 acl_save_prefix="$prefix"
10035 prefix="$acl_final_prefix"
10036 acl_save_exec_prefix="$exec_prefix"
10037 exec_prefix="$acl_final_exec_prefix"
10038 eval x=\"$x\"
10039 exec_prefix="$acl_save_exec_prefix"
10040 prefix="$acl_save_prefix"
10041
10042 if test "X$x" = "X-L$additional_libdir"; then
10043 haveit=yes
10044 break
10045 fi
10046 done
10047 if test -z "$haveit"; then
10048 if test -d "$additional_libdir"; then
10049 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10050 fi
10051 fi
10052 haveit=
10053 for x in $LDFLAGS $LTLIBMPFR; do
10054
10055 acl_save_prefix="$prefix"
10056 prefix="$acl_final_prefix"
10057 acl_save_exec_prefix="$exec_prefix"
10058 exec_prefix="$acl_final_exec_prefix"
10059 eval x=\"$x\"
10060 exec_prefix="$acl_save_exec_prefix"
10061 prefix="$acl_save_prefix"
10062
10063 if test "X$x" = "X-L$additional_libdir"; then
10064 haveit=yes
10065 break
10066 fi
10067 done
10068 if test -z "$haveit"; then
10069 if test -d "$additional_libdir"; then
10070 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10071 fi
10072 fi
10073 fi
10074 fi
10075 ;;
10076 -R*)
10077 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10078 if test "$enable_rpath" != no; then
10079 haveit=
10080 for x in $rpathdirs; do
10081 if test "X$x" = "X$dir"; then
10082 haveit=yes
10083 break
10084 fi
10085 done
10086 if test -z "$haveit"; then
10087 rpathdirs="$rpathdirs $dir"
10088 fi
10089 haveit=
10090 for x in $ltrpathdirs; do
10091 if test "X$x" = "X$dir"; then
10092 haveit=yes
10093 break
10094 fi
10095 done
10096 if test -z "$haveit"; then
10097 ltrpathdirs="$ltrpathdirs $dir"
10098 fi
10099 fi
10100 ;;
10101 -l*)
10102 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10103 ;;
10104 *.la)
10105 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10106 ;;
10107 *)
10108 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10109 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10110 ;;
10111 esac
10112 done
10113 fi
10114 else
10115 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10116 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10117 fi
10118 fi
10119 fi
10120 done
10121 done
10122 if test "X$rpathdirs" != "X"; then
10123 if test -n "$hardcode_libdir_separator"; then
10124 alldirs=
10125 for found_dir in $rpathdirs; do
10126 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10127 done
10128 acl_save_libdir="$libdir"
10129 libdir="$alldirs"
10130 eval flag=\"$hardcode_libdir_flag_spec\"
10131 libdir="$acl_save_libdir"
10132 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10133 else
10134 for found_dir in $rpathdirs; do
10135 acl_save_libdir="$libdir"
10136 libdir="$found_dir"
10137 eval flag=\"$hardcode_libdir_flag_spec\"
10138 libdir="$acl_save_libdir"
10139 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10140 done
10141 fi
10142 fi
10143 if test "X$ltrpathdirs" != "X"; then
10144 for found_dir in $ltrpathdirs; do
10145 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10146 done
10147 fi
10148
10149
10150 ac_save_CPPFLAGS="$CPPFLAGS"
10151
10152 for element in $INCMPFR; do
10153 haveit=
10154 for x in $CPPFLAGS; do
10155
10156 acl_save_prefix="$prefix"
10157 prefix="$acl_final_prefix"
10158 acl_save_exec_prefix="$exec_prefix"
10159 exec_prefix="$acl_final_exec_prefix"
10160 eval x=\"$x\"
10161 exec_prefix="$acl_save_exec_prefix"
10162 prefix="$acl_save_prefix"
10163
10164 if test "X$x" = "X$element"; then
10165 haveit=yes
10166 break
10167 fi
10168 done
10169 if test -z "$haveit"; then
10170 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10171 fi
10172 done
10173
10174
10175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10176$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10177if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10178 $as_echo_n "(cached) " >&6
10179else
10180
10181 ac_save_LIBS="$LIBS"
10182 LIBS="$LIBS $LIBMPFR"
10183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10184/* end confdefs.h. */
10185#include <mpfr.h>
10186int
10187main ()
10188{
10189mpfr_exp_t exp; mpfr_t x;
10190 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10191 ;
10192 return 0;
10193}
10194_ACEOF
10195if ac_fn_c_try_link "$LINENO"; then :
10196 ac_cv_libmpfr=yes
10197else
10198 ac_cv_libmpfr=no
10199fi
10200rm -f core conftest.err conftest.$ac_objext \
10201 conftest$ac_exeext conftest.$ac_ext
10202 LIBS="$ac_save_LIBS"
10203
10204fi
10205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10206$as_echo "$ac_cv_libmpfr" >&6; }
10207 if test "$ac_cv_libmpfr" = yes; then
10208 HAVE_LIBMPFR=yes
10209
10210$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10211
10212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10213$as_echo_n "checking how to link with libmpfr... " >&6; }
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10215$as_echo "$LIBMPFR" >&6; }
10216 else
10217 HAVE_LIBMPFR=no
10218 CPPFLAGS="$ac_save_CPPFLAGS"
10219 LIBMPFR=
10220 LTLIBMPFR=
10221 fi
10222
10223
10224
10225
10226
10227
10228 if test "$HAVE_LIBMPFR" != yes; then
10229 if test "$with_mpfr" = yes; then
d0ac1c44 10230 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10231 else
10232 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10233$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10234 fi
10235 fi
10236fi
10237
d344e670
DE
10238# --------------------- #
10239# Check for libpython. #
10240# --------------------- #
10241
a9322a30 10242
a9322a30
TT
10243
10244
ec685c5e 10245
0c4a4063 10246
81ecdfbb
RW
10247# Check whether --with-python was given.
10248if test "${with_python+set}" = set; then :
10249 withval=$with_python;
bec39cab 10250else
81ecdfbb 10251 with_python=auto
bec39cab 10252fi
bec39cab 10253
81ecdfbb
RW
10254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10255$as_echo_n "checking whether to use python... " >&6; }
10256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10257$as_echo "$with_python" >&6; }
9a156167 10258
81ecdfbb
RW
10259if test "${with_python}" = no; then
10260 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10261$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10262 have_libpython=no
bec39cab 10263else
81ecdfbb 10264 case "${with_python}" in
8c85a4e2 10265 [\\/]* | ?:[\\/]*)
0ad6b8ee 10266 if test -d "${with_python}"; then
ec685c5e 10267 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10268 python_prog="${with_python}/bin/python"
0c4a4063 10269 python_prefix=
9c4ea6c5
JB
10270 # If python does not exit ${with_python}/bin, then try in
10271 # ${with_python}. On Windows/MinGW, this is where the Python
10272 # executable is.
10273 if test ! -x "${python_prog}"; then
10274 python_prog="${with_python}/python"
10275 python_prefix=
10276 fi
e7a30f46 10277 if test ! -x "${python_prog}"; then
ec685c5e
DE
10278 # Fall back to gdb 7.0/7.1 behaviour.
10279 python_prog=missing
0c4a4063 10280 python_prefix=${with_python}
ec685c5e 10281 fi
e7a30f46 10282 elif test -x "${with_python}"; then
ec685c5e
DE
10283 # While we can't run python compiled for $host (unless host == build),
10284 # the user could write a script that provides the needed information,
10285 # so we support that.
ec685c5e 10286 python_prog=${with_python}
0c4a4063 10287 python_prefix=
ec685c5e 10288 else
d0ac1c44 10289 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10290 fi
81ecdfbb 10291 ;;
ec685c5e
DE
10292 */*)
10293 # Disallow --with-python=foo/bar.
d0ac1c44 10294 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10295 ;;
ec685c5e
DE
10296 *)
10297 # The user has either specified auto, yes, or the name of the python
10298 # program assumed to be in $PATH.
10299 python_prefix=
10300 case "${with_python}" in
10301 yes | auto)
0ad6b8ee 10302 if test "${build}" = "${host}"; then
ec685c5e
DE
10303 # Extract the first word of "python", so it can be a program name with args.
10304set dummy python; ac_word=$2
10305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10306$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10307if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10308 $as_echo_n "(cached) " >&6
10309else
10310 case $python_prog_path in
10311 [\\/]* | ?:[\\/]*)
10312 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10313 ;;
10314 *)
10315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10316for as_dir in $PATH
10317do
10318 IFS=$as_save_IFS
10319 test -z "$as_dir" && as_dir=.
10320 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10321 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10322 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10323 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10324 break 2
10325 fi
10326done
10327 done
10328IFS=$as_save_IFS
10329
10330 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10331 ;;
10332esac
10333fi
10334python_prog_path=$ac_cv_path_python_prog_path
10335if test -n "$python_prog_path"; then
10336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10337$as_echo "$python_prog_path" >&6; }
10338else
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10340$as_echo "no" >&6; }
10341fi
10342
10343
10344 if test "${python_prog_path}" = missing; then
10345 python_prog=missing
10346 else
10347 python_prog=${python_prog_path}
10348 fi
10349 else
10350 # Not much we can do except assume the cross-compiler will find the
10351 # right files.
10352 python_prog=missing
10353 fi
10354 ;;
10355 *)
10356 # While we can't run python compiled for $host (unless host == build),
10357 # the user could write a script that provides the needed information,
10358 # so we support that.
10359 python_prog="${with_python}"
10360 # Extract the first word of "${python_prog}", so it can be a program name with args.
10361set dummy ${python_prog}; ac_word=$2
10362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10363$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10364if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10365 $as_echo_n "(cached) " >&6
10366else
10367 case $python_prog_path in
10368 [\\/]* | ?:[\\/]*)
10369 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10370 ;;
10371 *)
10372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10373for as_dir in $PATH
10374do
10375 IFS=$as_save_IFS
10376 test -z "$as_dir" && as_dir=.
10377 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10378 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10379 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10380 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10381 break 2
10382 fi
10383done
10384 done
10385IFS=$as_save_IFS
10386
10387 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10388 ;;
10389esac
10390fi
10391python_prog_path=$ac_cv_path_python_prog_path
10392if test -n "$python_prog_path"; then
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10394$as_echo "$python_prog_path" >&6; }
10395else
10396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10397$as_echo "no" >&6; }
10398fi
10399
10400
10401 if test "${python_prog_path}" = missing; then
d0ac1c44 10402 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10403 fi
10404 ;;
10405 esac
81ecdfbb
RW
10406 esac
10407
ec685c5e 10408 if test "${python_prog}" != missing; then
e7a30f46
DE
10409 # We have a python program to use, but it may be too old.
10410 # Don't flag an error for --with-python=auto (the default).
10411 have_python_config=yes
ec685c5e
DE
10412 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10413 if test $? != 0; then
e7a30f46
DE
10414 have_python_config=failed
10415 if test "${with_python}" != auto; then
d0ac1c44 10416 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10417 fi
ec685c5e
DE
10418 fi
10419 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10420 if test $? != 0; then
e7a30f46
DE
10421 have_python_config=failed
10422 if test "${with_python}" != auto; then
d0ac1c44 10423 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10424 fi
ec685c5e 10425 fi
0c4a4063
DE
10426 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10427 if test $? != 0; then
e7a30f46
DE
10428 have_python_config=failed
10429 if test "${with_python}" != auto; then
d0ac1c44 10430 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10431 fi
0c4a4063 10432 fi
ec685c5e 10433 else
ac534cba
JB
10434 # We do not have a python executable we can use to determine where
10435 # to find the Python headers and libs. We cannot guess the include
10436 # path from the python_prefix either, because that include path
10437 # depends on the Python version. So, there is nothing much we can
10438 # do except assume that the compiler will be able to find those files.
10439 python_includes=
10440 python_libs=
0c4a4063 10441 have_python_config=no
ec685c5e 10442 fi
bec39cab 10443
ec685c5e
DE
10444 # If we have python-config, only try the configuration it provides.
10445 # Otherwise fallback on the old way of trying different versions of
10446 # python in turn.
81ecdfbb 10447
ec685c5e
DE
10448 have_libpython=no
10449 if test "${have_python_config}" = yes; then
71737c43 10450
ec685c5e
DE
10451
10452 new_CPPFLAGS=${python_includes}
10453 new_LIBS=${python_libs}
71737c43
CB
10454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10455$as_echo_n "checking for python... " >&6; }
ec685c5e 10456 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10457 save_LIBS=$LIBS
ec685c5e 10458 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10459 LIBS="$new_LIBS $LIBS"
ec685c5e 10460 found_usable_python=no
81ecdfbb 10461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10462/* end confdefs.h. */
ac534cba 10463#include "Python.h"
81ecdfbb
RW
10464int
10465main ()
10466{
10467Py_Initialize ();
10468 ;
10469 return 0;
10470}
bec39cab 10471_ACEOF
81ecdfbb 10472if ac_fn_c_try_link "$LINENO"; then :
71737c43 10473 have_libpython=yes
ec685c5e 10474 found_usable_python=yes
ac534cba
JB
10475 PYTHON_CPPFLAGS=$new_CPPFLAGS
10476 PYTHON_LIBS=$new_LIBS
9a156167 10477fi
81ecdfbb
RW
10478rm -f core conftest.err conftest.$ac_objext \
10479 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10480 CPPFLAGS=$save_CPPFLAGS
10481 LIBS=$save_LIBS
ec685c5e
DE
10482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10483$as_echo "${found_usable_python}" >&6; }
9a156167 10484
e7a30f46 10485 elif test "${have_python_config}" != failed; then
ec685c5e 10486 if test "${have_libpython}" = no; then
9a156167 10487
420697bb
TT
10488
10489 new_CPPFLAGS=${python_includes}
bf27f0e2 10490 new_LIBS="-lpython2.7 ${python_libs}"
71737c43
CB
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10492$as_echo_n "checking for python... " >&6; }
420697bb
TT
10493 save_CPPFLAGS=$CPPFLAGS
10494 save_LIBS=$LIBS
10495 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10496 LIBS="$new_LIBS $LIBS"
420697bb
TT
10497 found_usable_python=no
10498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10499/* end confdefs.h. */
ac534cba 10500#include "Python.h"
420697bb
TT
10501int
10502main ()
10503{
10504Py_Initialize ();
10505 ;
10506 return 0;
10507}
10508_ACEOF
10509if ac_fn_c_try_link "$LINENO"; then :
71737c43 10510 have_libpython=yes
420697bb 10511 found_usable_python=yes
ac534cba
JB
10512 PYTHON_CPPFLAGS=$new_CPPFLAGS
10513 PYTHON_LIBS=$new_LIBS
420697bb
TT
10514fi
10515rm -f core conftest.err conftest.$ac_objext \
10516 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10517 CPPFLAGS=$save_CPPFLAGS
10518 LIBS=$save_LIBS
420697bb
TT
10519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10520$as_echo "${found_usable_python}" >&6; }
10521
10522 fi
10523 if test "${have_libpython}" = no; then
10524
ec685c5e
DE
10525
10526 new_CPPFLAGS=${python_includes}
bf27f0e2 10527 new_LIBS="-lpython2.6 ${python_libs}"
71737c43
CB
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10529$as_echo_n "checking for python... " >&6; }
ec685c5e
DE
10530 save_CPPFLAGS=$CPPFLAGS
10531 save_LIBS=$LIBS
10532 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10533 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10534 found_usable_python=no
10535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10536/* end confdefs.h. */
ac534cba 10537#include "Python.h"
ec685c5e
DE
10538int
10539main ()
10540{
10541Py_Initialize ();
10542 ;
10543 return 0;
10544}
10545_ACEOF
10546if ac_fn_c_try_link "$LINENO"; then :
71737c43 10547 have_libpython=yes
ec685c5e 10548 found_usable_python=yes
ac534cba
JB
10549 PYTHON_CPPFLAGS=$new_CPPFLAGS
10550 PYTHON_LIBS=$new_LIBS
ec685c5e 10551fi
81ecdfbb
RW
10552rm -f core conftest.err conftest.$ac_objext \
10553 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10554 CPPFLAGS=$save_CPPFLAGS
10555 LIBS=$save_LIBS
ec685c5e
DE
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10557$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10558
ec685c5e
DE
10559 fi
10560 fi
ec685c5e
DE
10561
10562 if test "${have_libpython}" = no; then
81ecdfbb
RW
10563 case "${with_python}" in
10564 yes)
d0ac1c44 10565 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10566 ;;
10567 auto)
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10569$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10570 ;;
10571 *)
d0ac1c44 10572 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10573 ;;
10574 esac
0c4a4063
DE
10575 else
10576 if test -n "${python_prefix}"; then
10577
10578cat >>confdefs.h <<_ACEOF
10579#define WITH_PYTHON_PATH "${python_prefix}"
10580_ACEOF
10581
10582
10583 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10584 if test "x$prefix" = xNONE; then
10585 test_prefix=/usr/local
10586 else
10587 test_prefix=$prefix
10588 fi
10589 else
10590 test_prefix=$exec_prefix
10591 fi
10592 value=0
10593 case ${python_prefix} in
10594 "${test_prefix}"|"${test_prefix}/"*|\
10595 '${exec_prefix}'|'${exec_prefix}/'*)
10596 value=1
10597 ;;
10598 esac
10599
10600cat >>confdefs.h <<_ACEOF
10601#define PYTHON_PATH_RELOCATABLE $value
10602_ACEOF
10603
10604
10605 fi
81ecdfbb 10606 fi
436868fb 10607fi
436868fb 10608
ec685c5e 10609if test "${have_libpython}" != no; then
436868fb 10610
81ecdfbb 10611$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10612
81ecdfbb
RW
10613 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10614 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10615 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10616 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10617 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10618
81ecdfbb
RW
10619 # Flags needed to compile Python code (taken from python-config --cflags).
10620 # We cannot call python-config directly because it will output whatever was
10621 # used when compiling the Python interpreter itself, including flags which
10622 # would make the python-related objects be compiled differently from the
10623 # rest of GDB (e.g., -O2 and -fPIC).
10624 if test "${GCC}" = yes; then
ae292b3a
TT
10625 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10626 # Python headers recommend -DNDEBUG, but it's unclear if that just
10627 # refers to building Python itself. In release mode, though, it
10628 # doesn't hurt for the Python code in gdb to follow.
10629 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10630 fi
436868fb 10631
81ecdfbb
RW
10632 if test "x${tentative_python_cflags}" != x; then
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10634$as_echo_n "checking compiler flags for python code... " >&6; }
10635 for flag in ${tentative_python_cflags}; do
10636 # Check that the compiler accepts it
10637 saved_CFLAGS="$CFLAGS"
10638 CFLAGS="$CFLAGS $flag"
10639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10640/* end confdefs.h. */
81ecdfbb 10641
a9322a30
TT
10642int
10643main ()
10644{
a9322a30
TT
10645
10646 ;
10647 return 0;
10648}
bec39cab 10649_ACEOF
81ecdfbb
RW
10650if ac_fn_c_try_compile "$LINENO"; then :
10651 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10652fi
81ecdfbb
RW
10653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10654 CFLAGS="$saved_CFLAGS"
10655 done
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10657$as_echo "${PYTHON_CFLAGS}" >&6; }
10658 fi
043b6510 10659
c83393b9
JB
10660 # On x64 Windows, Python's include headers, and pyconfig.h in
10661 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10662 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10663 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10664 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10665 # The issue was reported to the Python community, but still isn't
10666 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10667
043b6510 10668 case "$gdb_host" in
c83393b9
JB
10669 mingw64)
10670 if test "${GCC}" = yes; then
10671 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10672 fi
10673 ;;
043b6510 10674 esac
81ecdfbb 10675else
6dddc817
DE
10676 # Even if Python support is not compiled in, we need to have this file
10677 # included so that the "python" command, et.al., still exists.
8fd8d003 10678 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10679 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10680fi
9a156167 10681
a4a1c157
PA
10682# Work around Python http://bugs.python.org/issue10112. See also
10683# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10684# no effect. Note that the only test after this that uses Python is
10685# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10686# run without -export-dynamic too.
10687PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10688
10689
ed3ef339
DE
10690
10691
4df42755
DE
10692 if test "${have_libpython}" != no; then
10693 HAVE_PYTHON_TRUE=
10694 HAVE_PYTHON_FALSE='#'
10695else
10696 HAVE_PYTHON_TRUE='#'
10697 HAVE_PYTHON_FALSE=
10698fi
10699
ed3ef339
DE
10700
10701# -------------------- #
10702# Check for libguile. #
10703# -------------------- #
10704
10705
e1402065
DE
10706
10707
10708
10709
10710# Check whether --with-guile was given.
10711if test "${with_guile+set}" = set; then :
10712 withval=$with_guile;
10713else
10714 with_guile=auto
10715fi
10716
10717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10718$as_echo_n "checking whether to use guile... " >&6; }
10719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10720$as_echo "$with_guile" >&6; }
10721
ed3ef339
DE
10722# Extract the first word of "pkg-config", so it can be a program name with args.
10723set dummy pkg-config; ac_word=$2
10724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10725$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10726if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10727 $as_echo_n "(cached) " >&6
10728else
10729 case $pkg_config_prog_path in
10730 [\\/]* | ?:[\\/]*)
10731 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10732 ;;
10733 *)
10734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10735for as_dir in $PATH
10736do
10737 IFS=$as_save_IFS
10738 test -z "$as_dir" && as_dir=.
10739 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10741 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10743 break 2
10744 fi
10745done
10746 done
10747IFS=$as_save_IFS
10748
10749 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10750 ;;
10751esac
10752fi
10753pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10754if test -n "$pkg_config_prog_path"; then
10755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10756$as_echo "$pkg_config_prog_path" >&6; }
10757else
10758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10759$as_echo "no" >&6; }
10760fi
10761
10762
10763
6e66f753 10764try_guile_versions="guile-2.0"
ed3ef339
DE
10765have_libguile=no
10766case "${with_guile}" in
10767no)
10768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10769$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10770 ;;
10771auto)
e1402065
DE
10772 if test "${pkg_config_prog_path}" = "missing"; then
10773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10774$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10775 else
ed3ef339
DE
10776
10777 pkg_config=${pkg_config_prog_path}
10778 guile_version_list=${try_guile_versions}
10779 flag_errors=no
10780
ed3ef339
DE
10781 found_usable_guile=checking
10782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10783$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10784 for guile_version in ${guile_version_list}; do
10785 ${pkg_config} --exists ${guile_version} 2>/dev/null
10786 if test $? != 0; then
10787 continue
10788 fi
10789 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10790 if test $? != 0; then
d0ac1c44 10791 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10792 fi
10793 new_LIBS=`${pkg_config} --libs ${guile_version}`
10794 if test $? != 0; then
d0ac1c44 10795 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10796 fi
10797 found_usable_guile=${guile_version}
10798 break
10799 done
10800 if test "${found_usable_guile}" = "checking"; then
10801 if test "${flag_errors}" = "yes"; then
d0ac1c44 10802 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10803 else
10804 found_usable_guile=no
10805 fi
10806 fi
10807 if test "${found_usable_guile}" != no; then
10808 save_CPPFLAGS=$CPPFLAGS
10809 save_LIBS=$LIBS
10810 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10811 LIBS="$LIBS $new_LIBS"
10812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10813/* end confdefs.h. */
10814#include "libguile.h"
10815int
10816main ()
10817{
10818scm_init_guile ();
10819 ;
10820 return 0;
10821}
10822_ACEOF
10823if ac_fn_c_try_link "$LINENO"; then :
10824 have_libguile=yes
10825 GUILE_CPPFLAGS=$new_CPPFLAGS
10826 GUILE_LIBS=$new_LIBS
10827else
10828 found_usable_guile=no
10829fi
10830rm -f core conftest.err conftest.$ac_objext \
10831 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10832 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10833if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10834
10835$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10836
10837
10838fi
10839
ed3ef339
DE
10840 CPPFLAGS=$save_CPPFLAGS
10841 LIBS=$save_LIBS
10842 if test "${found_usable_guile}" = no; then
10843 if test "${flag_errors}" = yes; then
10844 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10846as_fn_error $? "linking guile version ${guile_version} test program failed
10847See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10848 fi
10849 fi
10850 fi
10851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10852$as_echo "${found_usable_guile}" >&6; }
10853
e1402065 10854 fi
ed3ef339
DE
10855 ;;
10856yes)
e1402065 10857 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 10858 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 10859 fi
ed3ef339
DE
10860
10861 pkg_config=${pkg_config_prog_path}
10862 guile_version_list=${try_guile_versions}
10863 flag_errors=yes
10864
ed3ef339
DE
10865 found_usable_guile=checking
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10867$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10868 for guile_version in ${guile_version_list}; do
10869 ${pkg_config} --exists ${guile_version} 2>/dev/null
10870 if test $? != 0; then
10871 continue
10872 fi
10873 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10874 if test $? != 0; then
d0ac1c44 10875 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10876 fi
10877 new_LIBS=`${pkg_config} --libs ${guile_version}`
10878 if test $? != 0; then
d0ac1c44 10879 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10880 fi
10881 found_usable_guile=${guile_version}
10882 break
10883 done
10884 if test "${found_usable_guile}" = "checking"; then
10885 if test "${flag_errors}" = "yes"; then
d0ac1c44 10886 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10887 else
10888 found_usable_guile=no
10889 fi
10890 fi
10891 if test "${found_usable_guile}" != no; then
10892 save_CPPFLAGS=$CPPFLAGS
10893 save_LIBS=$LIBS
10894 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10895 LIBS="$LIBS $new_LIBS"
10896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10897/* end confdefs.h. */
10898#include "libguile.h"
10899int
10900main ()
10901{
10902scm_init_guile ();
10903 ;
10904 return 0;
10905}
10906_ACEOF
10907if ac_fn_c_try_link "$LINENO"; then :
10908 have_libguile=yes
10909 GUILE_CPPFLAGS=$new_CPPFLAGS
10910 GUILE_LIBS=$new_LIBS
10911else
10912 found_usable_guile=no
10913fi
10914rm -f core conftest.err conftest.$ac_objext \
10915 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10916 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10917if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10918
10919$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10920
10921
10922fi
10923
ed3ef339
DE
10924 CPPFLAGS=$save_CPPFLAGS
10925 LIBS=$save_LIBS
10926 if test "${found_usable_guile}" = no; then
10927 if test "${flag_errors}" = yes; then
10928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10930as_fn_error $? "linking guile version ${guile_version} test program failed
10931See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10932 fi
10933 fi
10934 fi
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10936$as_echo "${found_usable_guile}" >&6; }
10937
10938 ;;
10939[\\/]* | ?:[\\/]*)
e1402065 10940 if test -x "${with_guile}"; then
ed3ef339
DE
10941
10942 pkg_config=${with_guile}
10943 guile_version_list=${try_guile_versions}
10944 flag_errors=yes
10945
ed3ef339
DE
10946 found_usable_guile=checking
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10948$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10949 for guile_version in ${guile_version_list}; do
10950 ${pkg_config} --exists ${guile_version} 2>/dev/null
10951 if test $? != 0; then
10952 continue
10953 fi
10954 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10955 if test $? != 0; then
d0ac1c44 10956 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10957 fi
10958 new_LIBS=`${pkg_config} --libs ${guile_version}`
10959 if test $? != 0; then
d0ac1c44 10960 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10961 fi
10962 found_usable_guile=${guile_version}
10963 break
10964 done
10965 if test "${found_usable_guile}" = "checking"; then
10966 if test "${flag_errors}" = "yes"; then
d0ac1c44 10967 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10968 else
10969 found_usable_guile=no
10970 fi
10971 fi
10972 if test "${found_usable_guile}" != no; then
10973 save_CPPFLAGS=$CPPFLAGS
10974 save_LIBS=$LIBS
10975 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10976 LIBS="$LIBS $new_LIBS"
10977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10978/* end confdefs.h. */
10979#include "libguile.h"
10980int
10981main ()
10982{
10983scm_init_guile ();
10984 ;
10985 return 0;
10986}
10987_ACEOF
10988if ac_fn_c_try_link "$LINENO"; then :
10989 have_libguile=yes
10990 GUILE_CPPFLAGS=$new_CPPFLAGS
10991 GUILE_LIBS=$new_LIBS
10992else
10993 found_usable_guile=no
10994fi
10995rm -f core conftest.err conftest.$ac_objext \
10996 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10997 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10998if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10999
11000$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11001
11002
11003fi
11004
ed3ef339
DE
11005 CPPFLAGS=$save_CPPFLAGS
11006 LIBS=$save_LIBS
11007 if test "${found_usable_guile}" = no; then
11008 if test "${flag_errors}" = yes; then
11009 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11011as_fn_error $? "linking guile version ${guile_version} test program failed
11012See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11013 fi
11014 fi
11015 fi
11016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11017$as_echo "${found_usable_guile}" >&6; }
11018
e1402065 11019 else
d0ac1c44 11020 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11021 fi
ed3ef339
DE
11022 ;;
11023"" | */*)
11024 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11025 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11026 ;;
11027*)
11028 # A space separate list of guile versions to try, in order.
e1402065 11029 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11030 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11031 fi
ed3ef339
DE
11032
11033 pkg_config=${pkg_config_prog_path}
11034 guile_version_list=${with_guile}
11035 flag_errors=yes
11036
ed3ef339
DE
11037 found_usable_guile=checking
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11039$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11040 for guile_version in ${guile_version_list}; do
11041 ${pkg_config} --exists ${guile_version} 2>/dev/null
11042 if test $? != 0; then
11043 continue
11044 fi
11045 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11046 if test $? != 0; then
d0ac1c44 11047 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11048 fi
11049 new_LIBS=`${pkg_config} --libs ${guile_version}`
11050 if test $? != 0; then
d0ac1c44 11051 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11052 fi
11053 found_usable_guile=${guile_version}
11054 break
11055 done
11056 if test "${found_usable_guile}" = "checking"; then
11057 if test "${flag_errors}" = "yes"; then
d0ac1c44 11058 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11059 else
11060 found_usable_guile=no
11061 fi
11062 fi
11063 if test "${found_usable_guile}" != no; then
11064 save_CPPFLAGS=$CPPFLAGS
11065 save_LIBS=$LIBS
11066 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11067 LIBS="$LIBS $new_LIBS"
11068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11069/* end confdefs.h. */
11070#include "libguile.h"
11071int
11072main ()
11073{
11074scm_init_guile ();
11075 ;
11076 return 0;
11077}
11078_ACEOF
11079if ac_fn_c_try_link "$LINENO"; then :
11080 have_libguile=yes
11081 GUILE_CPPFLAGS=$new_CPPFLAGS
11082 GUILE_LIBS=$new_LIBS
11083else
11084 found_usable_guile=no
11085fi
11086rm -f core conftest.err conftest.$ac_objext \
11087 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11088 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11089if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11090
11091$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11092
11093
11094fi
11095
ed3ef339
DE
11096 CPPFLAGS=$save_CPPFLAGS
11097 LIBS=$save_LIBS
11098 if test "${found_usable_guile}" = no; then
11099 if test "${flag_errors}" = yes; then
11100 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11102as_fn_error $? "linking guile version ${guile_version} test program failed
11103See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11104 fi
11105 fi
11106 fi
11107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11108$as_echo "${found_usable_guile}" >&6; }
11109
11110 ;;
11111esac
11112
e76c5d17 11113if test "${have_libguile}" != no; then
d342a0da
DE
11114 case "${with_guile}" in
11115 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11116
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11118$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11119if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11120 $as_echo_n "(cached) " >&6
11121else
d342a0da 11122 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11123
11124 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11125 # the 'guild' and 'bindir' variables. In that case, try to guess
11126 # what the program name is, at the risk of getting it wrong if
11127 # Guile was configured with '--program-suffix' or similar.
11128 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11129 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11130 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11131 fi
11132
11133fi
11134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11135$as_echo "$ac_cv_guild_program_name" >&6; }
11136
11137 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11138 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11139 fi
11140
11141 GUILD="$ac_cv_guild_program_name"
11142
11143
d342a0da
DE
11144 ;;
11145 *)
11146
11147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11148$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11149if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11150 $as_echo_n "(cached) " >&6
11151else
11152 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11153
11154 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11155 # the 'guild' and 'bindir' variables. In that case, try to guess
11156 # what the program name is, at the risk of getting it wrong if
11157 # Guile was configured with '--program-suffix' or similar.
11158 if test "x$ac_cv_guild_program_name" = "x"; then
11159 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11160 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11161 fi
11162
11163fi
11164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11165$as_echo "$ac_cv_guild_program_name" >&6; }
11166
11167 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11168 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11169 fi
11170
11171 GUILD="$ac_cv_guild_program_name"
11172
11173
11174 ;;
11175 esac
e76c5d17
DE
11176
11177
11178 if test "$cross_compiling" = no; then
11179 GUILD_TARGET_FLAG=
11180 else
11181 GUILD_TARGET_FLAG="--target=$host"
11182 fi
11183
11184
11185
11186
11187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11188$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11189if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11190 $as_echo_n "(cached) " >&6
11191else
11192 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11193 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11194 ac_cv_guild_ok=yes
11195 else
11196 ac_cv_guild_ok=no
11197 fi
11198fi
11199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11200$as_echo "$ac_cv_guild_ok" >&6; }
11201
11202 if test "$ac_cv_guild_ok" = no; then
11203 have_libguile=no
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11205$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11206 fi
11207fi
11208
ed3ef339
DE
11209if test "${have_libguile}" != no; then
11210
11211$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11212
11213 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11214 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11215 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11216 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11217 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11218
11219 save_LIBS="$LIBS"
11220 save_CPPFLAGS="$CPPFLAGS"
11221 LIBS="$GUILE_LIBS"
11222 CPPFLAGS="$GUILE_CPPFLAGS"
11223 for ac_func in scm_new_smob
11224do :
11225 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11226if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11227 cat >>confdefs.h <<_ACEOF
11228#define HAVE_SCM_NEW_SMOB 1
11229_ACEOF
11230
11231fi
11232done
11233
11234 LIBS="$save_LIBS"
11235 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11236else
11237 # Even if Guile support is not compiled in, we need to have these files
11238 # included.
bd810fff 11239 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11240 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11241fi
9a156167 11242
ac534cba 11243
4df42755
DE
11244 if test "${have_libguile}" != no; then
11245 HAVE_GUILE_TRUE=
11246 HAVE_GUILE_FALSE='#'
11247else
11248 HAVE_GUILE_TRUE='#'
11249 HAVE_GUILE_FALSE=
11250fi
11251
ac534cba 11252
62f29fda
TT
11253# ---------------------------- #
11254# Check for source highlight. #
11255# ---------------------------- #
11256
11257SRCHIGH_LIBS=
11258SRCHIGH_CFLAGS=
189b8c2e
ST
11259
11260# Check whether --enable-source-highlight was given.
11261if test "${enable_source_highlight+set}" = set; then :
11262 enableval=$enable_source_highlight; case "${enableval}" in
11263 yes) enable_source_highlight=yes ;;
11264 no) enable_source_highlight=no ;;
11265 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11266esac
11267else
11268 enable_source_highlight=auto
11269fi
11270
11271
11272if test "${enable_source_highlight}" != "no"; then
11273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11274$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11275 if test "${pkg_config_prog_path}" = "missing"; then
11276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11277$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11278 if test "${enable_source_highlight}" = "yes"; then
11279 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11280 fi
11281 else
d806ea2d
TT
11282 case "$LDFLAGS" in
11283 *static-libstdc*)
11284 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11285 ;;
11286 esac
11287
189b8c2e 11288 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11289 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11290 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11291
11292$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11293
11294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11295$as_echo "yes" >&6; }
189b8c2e 11296 else
62f29fda
TT
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11298$as_echo "no" >&6; }
189b8c2e
ST
11299 if test "${enable_source_highlight}" = "yes"; then
11300 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11301 fi
11302 fi
11303 fi
62f29fda
TT
11304fi
11305
11306
11307
05ea2a05
TT
11308# ------------------------- #
11309# Checks for header files. #
11310# ------------------------- #
58bfce93 11311
05ea2a05
TT
11312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11313$as_echo_n "checking for ANSI C header files... " >&6; }
11314if ${ac_cv_header_stdc+:} false; then :
11315 $as_echo_n "(cached) " >&6
58bfce93 11316else
5599c404
MM
11317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11318/* end confdefs.h. */
05ea2a05
TT
11319#include <stdlib.h>
11320#include <stdarg.h>
11321#include <string.h>
11322#include <float.h>
5599c404 11323
05ea2a05
TT
11324int
11325main ()
11326{
5599c404 11327
05ea2a05
TT
11328 ;
11329 return 0;
11330}
5599c404 11331_ACEOF
05ea2a05
TT
11332if ac_fn_c_try_compile "$LINENO"; then :
11333 ac_cv_header_stdc=yes
5599c404 11334else
05ea2a05 11335 ac_cv_header_stdc=no
5599c404 11336fi
05ea2a05 11337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58bfce93 11338
05ea2a05
TT
11339if test $ac_cv_header_stdc = yes; then
11340 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11342/* end confdefs.h. */
11343#include <string.h>
58bfce93 11344
05ea2a05
TT
11345_ACEOF
11346if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11347 $EGREP "memchr" >/dev/null 2>&1; then :
58bfce93 11348
05ea2a05
TT
11349else
11350 ac_cv_header_stdc=no
11351fi
11352rm -f conftest*
58bfce93 11353
05ea2a05 11354fi
58bfce93 11355
05ea2a05
TT
11356if test $ac_cv_header_stdc = yes; then
11357 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11359/* end confdefs.h. */
11360#include <stdlib.h>
58bfce93 11361
05ea2a05
TT
11362_ACEOF
11363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11364 $EGREP "free" >/dev/null 2>&1; then :
58bfce93 11365
05ea2a05
TT
11366else
11367 ac_cv_header_stdc=no
11368fi
11369rm -f conftest*
58bfce93 11370
05ea2a05 11371fi
58bfce93 11372
05ea2a05
TT
11373if test $ac_cv_header_stdc = yes; then
11374 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11375 if test "$cross_compiling" = yes; then :
11376 :
11377else
11378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11379/* end confdefs.h. */
11380#include <ctype.h>
11381#include <stdlib.h>
11382#if ((' ' & 0x0FF) == 0x020)
11383# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11384# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11385#else
11386# define ISLOWER(c) \
11387 (('a' <= (c) && (c) <= 'i') \
11388 || ('j' <= (c) && (c) <= 'r') \
11389 || ('s' <= (c) && (c) <= 'z'))
11390# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11391#endif
58bfce93 11392
05ea2a05
TT
11393#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11394int
11395main ()
11396{
11397 int i;
11398 for (i = 0; i < 256; i++)
11399 if (XOR (islower (i), ISLOWER (i))
11400 || toupper (i) != TOUPPER (i))
11401 return 2;
11402 return 0;
11403}
11404_ACEOF
11405if ac_fn_c_try_run "$LINENO"; then :
58bfce93 11406
05ea2a05
TT
11407else
11408 ac_cv_header_stdc=no
11409fi
11410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11411 conftest.$ac_objext conftest.beam conftest.$ac_ext
11412fi
58bfce93 11413
05ea2a05
TT
11414fi
11415fi
11416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11417$as_echo "$ac_cv_header_stdc" >&6; }
11418if test $ac_cv_header_stdc = yes; then
58bfce93 11419
05ea2a05 11420$as_echo "#define STDC_HEADERS 1" >>confdefs.h
58bfce93 11421
05ea2a05 11422fi
58bfce93 11423
05ea2a05
TT
11424# elf_hp.h is for HP/UX 64-bit shared library support.
11425for ac_header in nlist.h machine/reg.h poll.h sys/poll.h \
11426 thread_db.h \
11427 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11428 sys/resource.h sys/ptrace.h ptrace.h \
11429 sys/reg.h sys/debugreg.h sys/select.h \
11430 termios.h elf_hp.h
11431do :
11432 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11433ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11434if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11435 cat >>confdefs.h <<_ACEOF
11436#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11437_ACEOF
58bfce93
MM
11438
11439fi
11440
05ea2a05 11441done
58bfce93 11442
05ea2a05
TT
11443for ac_header in sys/user.h
11444do :
11445 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11446# include <sys/param.h>
11447#endif
58bfce93 11448
05ea2a05
TT
11449"
11450if test "x$ac_cv_header_sys_user_h" = xyes; then :
11451 cat >>confdefs.h <<_ACEOF
11452#define HAVE_SYS_USER_H 1
11453_ACEOF
58bfce93 11454
05ea2a05 11455fi
58bfce93 11456
05ea2a05 11457done
58bfce93 11458
58bfce93 11459
05ea2a05
TT
11460for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11461do :
11462 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11463ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11464if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11465 cat >>confdefs.h <<_ACEOF
11466#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11467_ACEOF
58bfce93 11468
05ea2a05 11469fi
58bfce93 11470
05ea2a05 11471done
58bfce93 11472
05ea2a05
TT
11473for ac_header in term.h
11474do :
11475 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11476# include <curses.h>
11477#endif
58bfce93 11478
05ea2a05
TT
11479"
11480if test "x$ac_cv_header_term_h" = xyes; then :
11481 cat >>confdefs.h <<_ACEOF
11482#define HAVE_TERM_H 1
11483_ACEOF
58bfce93 11484
05ea2a05 11485fi
58bfce93 11486
05ea2a05 11487done
58bfce93 11488
58bfce93 11489
05ea2a05
TT
11490# ------------------------- #
11491# Checks for declarations. #
11492# ------------------------- #
58bfce93 11493
58bfce93 11494
05ea2a05
TT
11495 # Check for presence and size of long long.
11496 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11497if test "x$ac_cv_type_long_long" = xyes; then :
58bfce93 11498
05ea2a05
TT
11499cat >>confdefs.h <<_ACEOF
11500#define HAVE_LONG_LONG 1
11501_ACEOF
11502
11503# The cast to long int works around a bug in the HP C Compiler
11504# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11505# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11506# This bug is HP SR number 8606223364.
11507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11508$as_echo_n "checking size of long long... " >&6; }
11509if ${ac_cv_sizeof_long_long+:} false; then :
58bfce93
MM
11510 $as_echo_n "(cached) " >&6
11511else
05ea2a05 11512 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
58bfce93 11513
58bfce93 11514else
05ea2a05
TT
11515 if test "$ac_cv_type_long_long" = yes; then
11516 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11517$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11518as_fn_error 77 "cannot compute sizeof (long long)
11519See \`config.log' for more details" "$LINENO" 5; }
11520 else
11521 ac_cv_sizeof_long_long=0
11522 fi
58bfce93 11523fi
58bfce93
MM
11524
11525fi
05ea2a05
TT
11526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11527$as_echo "$ac_cv_sizeof_long_long" >&6; }
58bfce93 11528
58bfce93 11529
58bfce93 11530
05ea2a05
TT
11531cat >>confdefs.h <<_ACEOF
11532#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11533_ACEOF
58bfce93
MM
11534
11535
05ea2a05 11536fi
58bfce93
MM
11537
11538
05ea2a05
TT
11539 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11540ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11541if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11542 ac_have_decl=1
11543else
11544 ac_have_decl=0
11545fi
58bfce93 11546
05ea2a05
TT
11547cat >>confdefs.h <<_ACEOF
11548#define HAVE_DECL_BASENAME $ac_have_decl
c56ccc05 11549_ACEOF
05ea2a05
TT
11550ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11551if test "x$ac_cv_have_decl_ffs" = xyes; then :
11552 ac_have_decl=1
11553else
11554 ac_have_decl=0
c56ccc05 11555fi
c56ccc05
MM
11556
11557cat >>confdefs.h <<_ACEOF
05ea2a05 11558#define HAVE_DECL_FFS $ac_have_decl
c56ccc05 11559_ACEOF
05ea2a05
TT
11560ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11561if test "x$ac_cv_have_decl_asprintf" = xyes; then :
11562 ac_have_decl=1
11563else
11564 ac_have_decl=0
c56ccc05 11565fi
c56ccc05
MM
11566
11567cat >>confdefs.h <<_ACEOF
05ea2a05 11568#define HAVE_DECL_ASPRINTF $ac_have_decl
c56ccc05 11569_ACEOF
05ea2a05
TT
11570ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11571if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11572 ac_have_decl=1
11573else
11574 ac_have_decl=0
11575fi
c56ccc05 11576
05ea2a05
TT
11577cat >>confdefs.h <<_ACEOF
11578#define HAVE_DECL_VASPRINTF $ac_have_decl
11579_ACEOF
11580ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11581if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11582 ac_have_decl=1
11583else
11584 ac_have_decl=0
c56ccc05
MM
11585fi
11586
05ea2a05
TT
11587cat >>confdefs.h <<_ACEOF
11588#define HAVE_DECL_SNPRINTF $ac_have_decl
11589_ACEOF
11590ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11591if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11592 ac_have_decl=1
11593else
11594 ac_have_decl=0
58bfce93
MM
11595fi
11596
05ea2a05
TT
11597cat >>confdefs.h <<_ACEOF
11598#define HAVE_DECL_VSNPRINTF $ac_have_decl
11599_ACEOF
c890192f 11600
05ea2a05
TT
11601 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11602if test "x$ac_cv_have_decl_strtol" = xyes; then :
11603 ac_have_decl=1
bec39cab 11604else
05ea2a05
TT
11605 ac_have_decl=0
11606fi
81ecdfbb 11607
05ea2a05
TT
11608cat >>confdefs.h <<_ACEOF
11609#define HAVE_DECL_STRTOL $ac_have_decl
11610_ACEOF
11611ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11612if test "x$ac_cv_have_decl_strtoul" = xyes; then :
11613 ac_have_decl=1
11614else
11615 ac_have_decl=0
11616fi
a9322a30 11617
05ea2a05
TT
11618cat >>confdefs.h <<_ACEOF
11619#define HAVE_DECL_STRTOUL $ac_have_decl
bec39cab 11620_ACEOF
05ea2a05
TT
11621ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11622if test "x$ac_cv_have_decl_strtoll" = xyes; then :
11623 ac_have_decl=1
bec39cab 11624else
05ea2a05 11625 ac_have_decl=0
a9322a30 11626fi
bec39cab 11627
05ea2a05
TT
11628cat >>confdefs.h <<_ACEOF
11629#define HAVE_DECL_STRTOLL $ac_have_decl
11630_ACEOF
11631ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11632if test "x$ac_cv_have_decl_strtoull" = xyes; then :
11633 ac_have_decl=1
11634else
11635 ac_have_decl=0
11636fi
bec39cab 11637
05ea2a05
TT
11638cat >>confdefs.h <<_ACEOF
11639#define HAVE_DECL_STRTOULL $ac_have_decl
81ecdfbb 11640_ACEOF
bec39cab 11641
05ea2a05
TT
11642 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11643if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
11644 ac_have_decl=1
bec39cab 11645else
05ea2a05 11646 ac_have_decl=0
81ecdfbb 11647fi
81ecdfbb 11648
05ea2a05
TT
11649cat >>confdefs.h <<_ACEOF
11650#define HAVE_DECL_STRVERSCMP $ac_have_decl
11651_ACEOF
81ecdfbb 11652
81ecdfbb 11653
06825bd1 11654
05ea2a05
TT
11655ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11656if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11657 ac_have_decl=1
81ecdfbb 11658else
05ea2a05 11659 ac_have_decl=0
81ecdfbb 11660fi
bec39cab 11661
05ea2a05
TT
11662cat >>confdefs.h <<_ACEOF
11663#define HAVE_DECL_SNPRINTF $ac_have_decl
11664_ACEOF
81ecdfbb 11665
05ea2a05
TT
11666
11667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11668$as_echo_n "checking for LC_MESSAGES... " >&6; }
11669if ${am_cv_val_LC_MESSAGES+:} false; then :
11670 $as_echo_n "(cached) " >&6
bec39cab 11671else
81ecdfbb 11672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11673/* end confdefs.h. */
05ea2a05 11674#include <locale.h>
a9322a30
TT
11675int
11676main ()
11677{
05ea2a05
TT
11678return LC_MESSAGES
11679 ;
a9322a30
TT
11680 return 0;
11681}
bec39cab 11682_ACEOF
05ea2a05
TT
11683if ac_fn_c_try_link "$LINENO"; then :
11684 am_cv_val_LC_MESSAGES=yes
bec39cab 11685else
05ea2a05 11686 am_cv_val_LC_MESSAGES=no
81ecdfbb 11687fi
05ea2a05
TT
11688rm -f core conftest.err conftest.$ac_objext \
11689 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 11690fi
05ea2a05
TT
11691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11692$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11693 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11694
05ea2a05 11695$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
bec39cab 11696
05ea2a05 11697 fi
5ee754fc 11698
bec39cab 11699
05ea2a05
TT
11700# ------------------ #
11701# Checks for types. #
11702# ------------------ #
11703
11704ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
11705#include <sys/socket.h>
11706
11707"
11708if test "x$ac_cv_type_socklen_t" = xyes; then :
11709
11710cat >>confdefs.h <<_ACEOF
11711#define HAVE_SOCKLEN_T 1
bec39cab 11712_ACEOF
c906108c 11713
05ea2a05 11714
bec39cab 11715fi
81ecdfbb 11716
81ecdfbb 11717
05ea2a05
TT
11718# ------------------------------------- #
11719# Checks for compiler characteristics. #
11720# ------------------------------------- #
a9322a30 11721
05ea2a05
TT
11722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11723$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11724if ${ac_cv_c_const+:} false; then :
11725 $as_echo_n "(cached) " >&6
11726else
11727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11728/* end confdefs.h. */
bec39cab 11729
05ea2a05
TT
11730int
11731main ()
11732{
bec39cab 11733
05ea2a05
TT
11734#ifndef __cplusplus
11735 /* Ultrix mips cc rejects this sort of thing. */
11736 typedef int charset[2];
11737 const charset cs = { 0, 0 };
11738 /* SunOS 4.1.1 cc rejects this. */
11739 char const *const *pcpcc;
11740 char **ppc;
11741 /* NEC SVR4.0.2 mips cc rejects this. */
11742 struct point {int x, y;};
11743 static struct point const zero = {0,0};
11744 /* AIX XL C 1.02.0.0 rejects this.
11745 It does not let you subtract one const X* pointer from another in
11746 an arm of an if-expression whose if-part is not a constant
11747 expression */
11748 const char *g = "string";
11749 pcpcc = &g + (g ? g-g : 0);
11750 /* HPUX 7.0 cc rejects these. */
11751 ++pcpcc;
11752 ppc = (char**) pcpcc;
11753 pcpcc = (char const *const *) ppc;
11754 { /* SCO 3.2v4 cc rejects this sort of thing. */
11755 char tx;
11756 char *t = &tx;
11757 char const *s = 0 ? (char *) 0 : (char const *) 0;
5ee754fc 11758
05ea2a05
TT
11759 *t++ = 0;
11760 if (s) return 0;
11761 }
11762 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11763 int x[] = {25, 17};
11764 const int *foo = &x[0];
11765 ++foo;
11766 }
11767 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11768 typedef const int *iptr;
11769 iptr p = 0;
11770 ++p;
11771 }
11772 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
11773 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11774 struct s { int j; const int *ap[3]; } bx;
11775 struct s *b = &bx; b->j = 5;
11776 }
11777 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11778 const int foo = 10;
11779 if (!foo) return 0;
11780 }
11781 return !cs[0] && !zero.x;
11782#endif
5ee754fc 11783
05ea2a05
TT
11784 ;
11785 return 0;
11786}
bec39cab 11787_ACEOF
05ea2a05
TT
11788if ac_fn_c_try_compile "$LINENO"; then :
11789 ac_cv_c_const=yes
11790else
11791 ac_cv_c_const=no
11792fi
11793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11794fi
05ea2a05
TT
11795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11796$as_echo "$ac_cv_c_const" >&6; }
11797if test $ac_cv_c_const = no; then
5ee754fc 11798
05ea2a05 11799$as_echo "#define const /**/" >>confdefs.h
bec39cab 11800
05ea2a05
TT
11801fi
11802
11803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11804$as_echo_n "checking for inline... " >&6; }
11805if ${ac_cv_c_inline+:} false; then :
11806 $as_echo_n "(cached) " >&6
11807else
11808 ac_cv_c_inline=no
11809for ac_kw in inline __inline__ __inline; do
11810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11811/* end confdefs.h. */
11812#ifndef __cplusplus
11813typedef int foo_t;
11814static $ac_kw foo_t static_foo () {return 0; }
11815$ac_kw foo_t foo () {return 0; }
81ecdfbb 11816#endif
bec39cab 11817
a8111142 11818_ACEOF
05ea2a05
TT
11819if ac_fn_c_try_compile "$LINENO"; then :
11820 ac_cv_c_inline=$ac_kw
a8111142 11821fi
05ea2a05
TT
11822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11823 test "$ac_cv_c_inline" != no && break
81ecdfbb 11824done
a8111142 11825
05ea2a05
TT
11826fi
11827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11828$as_echo "$ac_cv_c_inline" >&6; }
a8111142 11829
05ea2a05
TT
11830case $ac_cv_c_inline in
11831 inline | yes) ;;
11832 *)
11833 case $ac_cv_c_inline in
11834 no) ac_val=;;
11835 *) ac_val=$ac_cv_c_inline;;
11836 esac
11837 cat >>confdefs.h <<_ACEOF
11838#ifndef __cplusplus
11839#define inline $ac_val
11840#endif
07697489 11841_ACEOF
05ea2a05
TT
11842 ;;
11843esac
07697489 11844
05ea2a05
TT
11845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11846$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11847if ${ac_cv_c_bigendian+:} false; then :
07697489
PA
11848 $as_echo_n "(cached) " >&6
11849else
05ea2a05
TT
11850 ac_cv_c_bigendian=unknown
11851 # See if we're dealing with a universal compiler.
11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853/* end confdefs.h. */
11854#ifndef __APPLE_CC__
11855 not a universal capable compiler
11856 #endif
11857 typedef int dummy;
07697489 11858
05ea2a05
TT
11859_ACEOF
11860if ac_fn_c_try_compile "$LINENO"; then :
07697489 11861
05ea2a05
TT
11862 # Check for potential -arch flags. It is not universal unless
11863 # there are at least two -arch flags with different values.
11864 ac_arch=
11865 ac_prev=
11866 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11867 if test -n "$ac_prev"; then
11868 case $ac_word in
11869 i?86 | x86_64 | ppc | ppc64)
11870 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11871 ac_arch=$ac_word
11872 else
11873 ac_cv_c_bigendian=universal
11874 break
11875 fi
11876 ;;
11877 esac
11878 ac_prev=
11879 elif test "x$ac_word" = "x-arch"; then
11880 ac_prev=arch
11881 fi
11882 done
07697489 11883fi
05ea2a05
TT
11884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11885 if test $ac_cv_c_bigendian = unknown; then
11886 # See if sys/param.h defines the BYTE_ORDER macro.
11887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11888/* end confdefs.h. */
11889#include <sys/types.h>
11890 #include <sys/param.h>
07697489 11891
05ea2a05
TT
11892int
11893main ()
11894{
11895#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11896 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11897 && LITTLE_ENDIAN)
11898 bogus endian macros
11899 #endif
07697489 11900
05ea2a05
TT
11901 ;
11902 return 0;
11903}
07697489 11904_ACEOF
05ea2a05
TT
11905if ac_fn_c_try_compile "$LINENO"; then :
11906 # It does; now see whether it defined to BIG_ENDIAN or not.
11907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11908/* end confdefs.h. */
11909#include <sys/types.h>
11910 #include <sys/param.h>
07697489 11911
05ea2a05
TT
11912int
11913main ()
11914{
11915#if BYTE_ORDER != BIG_ENDIAN
11916 not big endian
11917 #endif
07697489 11918
05ea2a05
TT
11919 ;
11920 return 0;
11921}
07697489 11922_ACEOF
05ea2a05
TT
11923if ac_fn_c_try_compile "$LINENO"; then :
11924 ac_cv_c_bigendian=yes
07697489 11925else
05ea2a05 11926 ac_cv_c_bigendian=no
07697489 11927fi
05ea2a05 11928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 11929fi
05ea2a05
TT
11930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11931 fi
11932 if test $ac_cv_c_bigendian = unknown; then
11933 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11935/* end confdefs.h. */
11936#include <limits.h>
07697489 11937
05ea2a05
TT
11938int
11939main ()
11940{
11941#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11942 bogus endian macros
11943 #endif
07697489 11944
05ea2a05
TT
11945 ;
11946 return 0;
11947}
07697489 11948_ACEOF
05ea2a05
TT
11949if ac_fn_c_try_compile "$LINENO"; then :
11950 # It does; now see whether it defined to _BIG_ENDIAN or not.
11951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11952/* end confdefs.h. */
11953#include <limits.h>
07697489 11954
05ea2a05
TT
11955int
11956main ()
11957{
11958#ifndef _BIG_ENDIAN
11959 not big endian
11960 #endif
07697489 11961
05ea2a05
TT
11962 ;
11963 return 0;
11964}
07697489 11965_ACEOF
05ea2a05
TT
11966if ac_fn_c_try_compile "$LINENO"; then :
11967 ac_cv_c_bigendian=yes
07697489 11968else
05ea2a05 11969 ac_cv_c_bigendian=no
07697489 11970fi
05ea2a05 11971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 11972fi
05ea2a05
TT
11973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11974 fi
11975 if test $ac_cv_c_bigendian = unknown; then
11976 # Compile a test program.
11977 if test "$cross_compiling" = yes; then :
11978 # Try to guess by grepping values from an object file.
11979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11980/* end confdefs.h. */
11981short int ascii_mm[] =
11982 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11983 short int ascii_ii[] =
11984 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11985 int use_ascii (int i) {
11986 return ascii_mm[i] + ascii_ii[i];
11987 }
11988 short int ebcdic_ii[] =
11989 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11990 short int ebcdic_mm[] =
11991 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11992 int use_ebcdic (int i) {
11993 return ebcdic_mm[i] + ebcdic_ii[i];
11994 }
11995 extern int foo;
07697489 11996
05ea2a05
TT
11997int
11998main ()
11999{
12000return use_ascii (foo) == use_ebcdic (foo);
12001 ;
12002 return 0;
12003}
07697489 12004_ACEOF
05ea2a05
TT
12005if ac_fn_c_try_compile "$LINENO"; then :
12006 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12007 ac_cv_c_bigendian=yes
12008 fi
12009 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12010 if test "$ac_cv_c_bigendian" = unknown; then
12011 ac_cv_c_bigendian=no
12012 else
12013 # finding both strings is unlikely to happen, but who knows?
12014 ac_cv_c_bigendian=unknown
12015 fi
12016 fi
07697489 12017fi
05ea2a05
TT
12018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12019else
12020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12021/* end confdefs.h. */
12022$ac_includes_default
12023int
12024main ()
12025{
07697489 12026
05ea2a05
TT
12027 /* Are we little or big endian? From Harbison&Steele. */
12028 union
12029 {
12030 long int l;
12031 char c[sizeof (long int)];
12032 } u;
12033 u.l = 1;
12034 return u.c[sizeof (long int) - 1] == 1;
12035
12036 ;
12037 return 0;
12038}
07697489 12039_ACEOF
05ea2a05
TT
12040if ac_fn_c_try_run "$LINENO"; then :
12041 ac_cv_c_bigendian=no
07697489 12042else
05ea2a05
TT
12043 ac_cv_c_bigendian=yes
12044fi
12045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12046 conftest.$ac_objext conftest.beam conftest.$ac_ext
07697489
PA
12047fi
12048
05ea2a05 12049 fi
07697489 12050fi
05ea2a05
TT
12051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12052$as_echo "$ac_cv_c_bigendian" >&6; }
12053 case $ac_cv_c_bigendian in #(
12054 yes)
12055 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12056;; #(
12057 no)
12058 ;; #(
12059 universal)
07697489 12060
05ea2a05 12061$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
07697489 12062
05ea2a05
TT
12063 ;; #(
12064 *)
12065 as_fn_error $? "unknown endianness
12066 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12067 esac
07697489
PA
12068
12069
05ea2a05
TT
12070# ------------------------------ #
12071# Checks for library functions. #
12072# ------------------------------ #
81ecdfbb 12073
05ea2a05
TT
12074for ac_func in getuid getgid \
12075 pipe poll pread pread64 pwrite resize_term \
12076 getpgid setsid \
12077 sigaction sigsetmask socketpair \
12078 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12079 setrlimit getrlimit posix_madvise waitpid \
12080 use_default_colors
12081do :
12082 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12083ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12084if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12085 cat >>confdefs.h <<_ACEOF
12086#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
a9322a30 12087_ACEOF
5ee754fc 12088
05ea2a05
TT
12089fi
12090done
5ee754fc 12091
05ea2a05
TT
12092
12093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12094$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12095if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 12096 $as_echo_n "(cached) " >&6
bec39cab 12097else
81ecdfbb 12098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12099/* end confdefs.h. */
05ea2a05 12100#include <langinfo.h>
a9322a30
TT
12101int
12102main ()
12103{
05ea2a05 12104char* cs = nl_langinfo(CODESET);
a9322a30
TT
12105 ;
12106 return 0;
12107}
bec39cab 12108_ACEOF
81ecdfbb 12109if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 12110 am_cv_langinfo_codeset=yes
bec39cab 12111else
05ea2a05 12112 am_cv_langinfo_codeset=no
81ecdfbb
RW
12113fi
12114rm -f core conftest.err conftest.$ac_objext \
12115 conftest$ac_exeext conftest.$ac_ext
05ea2a05 12116
81ecdfbb 12117fi
05ea2a05
TT
12118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12119$as_echo "$am_cv_langinfo_codeset" >&6; }
12120 if test $am_cv_langinfo_codeset = yes; then
bec39cab 12121
05ea2a05 12122$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
81ecdfbb
RW
12123
12124 fi
12125
05ea2a05
TT
12126ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12127if test "x$ac_cv_type_size_t" = xyes; then :
81ecdfbb 12128
05ea2a05 12129else
81ecdfbb
RW
12130
12131cat >>confdefs.h <<_ACEOF
05ea2a05 12132#define size_t unsigned int
7eb368b3 12133_ACEOF
7eb368b3 12134
7eb368b3 12135fi
7eb368b3 12136
7eb368b3 12137
a9322a30 12138
7eb368b3 12139
05ea2a05
TT
12140 for ac_header in $ac_header_list
12141do :
12142 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12143ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12144"
12145if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12146 cat >>confdefs.h <<_ACEOF
12147#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12148_ACEOF
7eb368b3 12149
05ea2a05 12150fi
7eb368b3 12151
05ea2a05 12152done
a9322a30 12153
05ea2a05
TT
12154
12155
12156
12157
12158
12159
12160ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12161if test "x$ac_cv_type_pid_t" = xyes; then :
12162
12163else
bec39cab 12164
a9322a30 12165cat >>confdefs.h <<_ACEOF
05ea2a05 12166#define pid_t int
a9322a30
TT
12167_ACEOF
12168
05ea2a05
TT
12169fi
12170
12171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12172$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12173if ${ac_cv_path_SED+:} false; then :
12174 $as_echo_n "(cached) " >&6
12175else
12176 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12177 for ac_i in 1 2 3 4 5 6 7; do
12178 ac_script="$ac_script$as_nl$ac_script"
12179 done
12180 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12181 { ac_script=; unset ac_script;}
12182 if test -z "$SED"; then
12183 ac_path_SED_found=false
12184 # Loop through the user's path and test for each of PROGNAME-LIST
12185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12186for as_dir in $PATH
12187do
12188 IFS=$as_save_IFS
12189 test -z "$as_dir" && as_dir=.
12190 for ac_prog in sed gsed; do
12191 for ac_exec_ext in '' $ac_executable_extensions; do
12192 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12193 as_fn_executable_p "$ac_path_SED" || continue
12194# Check for GNU ac_path_SED and select it if it is found.
12195 # Check for GNU $ac_path_SED
12196case `"$ac_path_SED" --version 2>&1` in
12197*GNU*)
12198 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12199*)
12200 ac_count=0
12201 $as_echo_n 0123456789 >"conftest.in"
12202 while :
12203 do
12204 cat "conftest.in" "conftest.in" >"conftest.tmp"
12205 mv "conftest.tmp" "conftest.in"
12206 cp "conftest.in" "conftest.nl"
12207 $as_echo '' >> "conftest.nl"
12208 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12209 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12210 as_fn_arith $ac_count + 1 && ac_count=$as_val
12211 if test $ac_count -gt ${ac_path_SED_max-0}; then
12212 # Best one so far, save it but keep looking for a better one
12213 ac_cv_path_SED="$ac_path_SED"
12214 ac_path_SED_max=$ac_count
12215 fi
12216 # 10*(2^10) chars as input seems more than enough
12217 test $ac_count -gt 10 && break
12218 done
12219 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12220esac
a9322a30 12221
05ea2a05
TT
12222 $ac_path_SED_found && break 3
12223 done
12224 done
12225 done
12226IFS=$as_save_IFS
12227 if test -z "$ac_cv_path_SED"; then
12228 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12229 fi
12230else
12231 ac_cv_path_SED=$SED
a9322a30
TT
12232fi
12233
05ea2a05
TT
12234fi
12235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12236$as_echo "$ac_cv_path_SED" >&6; }
12237 SED="$ac_cv_path_SED"
12238 rm -f conftest.sed
a9322a30 12239
a9322a30 12240
05ea2a05
TT
12241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12242$as_echo_n "checking for ANSI C header files... " >&6; }
12243if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12244 $as_echo_n "(cached) " >&6
a9322a30 12245else
81ecdfbb 12246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12247/* end confdefs.h. */
05ea2a05
TT
12248#include <stdlib.h>
12249#include <stdarg.h>
12250#include <string.h>
12251#include <float.h>
a9322a30
TT
12252
12253int
12254main ()
12255{
d0ac1c44 12256
a9322a30
TT
12257 ;
12258 return 0;
12259}
bec39cab 12260_ACEOF
81ecdfbb 12261if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 12262 ac_cv_header_stdc=yes
5ee754fc 12263else
05ea2a05 12264 ac_cv_header_stdc=no
5ee754fc 12265fi
81ecdfbb 12266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12267
05ea2a05
TT
12268if test $ac_cv_header_stdc = yes; then
12269 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12271/* end confdefs.h. */
12272#include <string.h>
bec39cab 12273
05ea2a05
TT
12274_ACEOF
12275if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12276 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12277
bec39cab 12278else
05ea2a05
TT
12279 ac_cv_header_stdc=no
12280fi
12281rm -f conftest*
12282
12283fi
12284
12285if test $ac_cv_header_stdc = yes; then
12286 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 12287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12288/* end confdefs.h. */
05ea2a05 12289#include <stdlib.h>
a9322a30 12290
bec39cab 12291_ACEOF
05ea2a05
TT
12292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12293 $EGREP "free" >/dev/null 2>&1; then :
bec39cab 12294
05ea2a05
TT
12295else
12296 ac_cv_header_stdc=no
5ee754fc 12297fi
05ea2a05 12298rm -f conftest*
5ee754fc 12299
05ea2a05 12300fi
bec39cab 12301
05ea2a05
TT
12302if test $ac_cv_header_stdc = yes; then
12303 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12304 if test "$cross_compiling" = yes; then :
12305 :
bec39cab 12306else
05ea2a05 12307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 12308/* end confdefs.h. */
05ea2a05
TT
12309#include <ctype.h>
12310#include <stdlib.h>
12311#if ((' ' & 0x0FF) == 0x020)
12312# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12313# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12314#else
12315# define ISLOWER(c) \
12316 (('a' <= (c) && (c) <= 'i') \
12317 || ('j' <= (c) && (c) <= 'r') \
12318 || ('s' <= (c) && (c) <= 'z'))
12319# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12320#endif
a9322a30 12321
05ea2a05 12322#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12323int
12324main ()
12325{
05ea2a05
TT
12326 int i;
12327 for (i = 0; i < 256; i++)
12328 if (XOR (islower (i), ISLOWER (i))
12329 || toupper (i) != TOUPPER (i))
12330 return 2;
a9322a30
TT
12331 return 0;
12332}
bec39cab 12333_ACEOF
05ea2a05 12334if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12335
5ee754fc 12336else
05ea2a05 12337 ac_cv_header_stdc=no
5ee754fc 12338fi
05ea2a05
TT
12339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12340 conftest.$ac_objext conftest.beam conftest.$ac_ext
81ecdfbb 12341fi
bec39cab 12342
05ea2a05
TT
12343fi
12344fi
12345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12346$as_echo "$ac_cv_header_stdc" >&6; }
12347if test $ac_cv_header_stdc = yes; then
81ecdfbb 12348
05ea2a05
TT
12349$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12350
12351fi
81ecdfbb 12352
05ea2a05
TT
12353 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12354# for constant arguments. Useless!
12355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12356$as_echo_n "checking for working alloca.h... " >&6; }
12357if ${ac_cv_working_alloca_h+:} false; then :
12358 $as_echo_n "(cached) " >&6
12359else
12360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12361/* end confdefs.h. */
12362#include <alloca.h>
7eb368b3
NR
12363int
12364main ()
12365{
05ea2a05
TT
12366char *p = (char *) alloca (2 * sizeof (int));
12367 if (p) return 0;
7eb368b3
NR
12368 ;
12369 return 0;
12370}
12371_ACEOF
05ea2a05
TT
12372if ac_fn_c_try_link "$LINENO"; then :
12373 ac_cv_working_alloca_h=yes
81ecdfbb 12374else
05ea2a05 12375 ac_cv_working_alloca_h=no
a9322a30 12376fi
05ea2a05
TT
12377rm -f core conftest.err conftest.$ac_objext \
12378 conftest$ac_exeext conftest.$ac_ext
a9322a30 12379fi
05ea2a05
TT
12380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12381$as_echo "$ac_cv_working_alloca_h" >&6; }
12382if test $ac_cv_working_alloca_h = yes; then
12383
12384$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7eb368b3 12385
7eb368b3 12386fi
05ea2a05
TT
12387
12388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12389$as_echo_n "checking for alloca... " >&6; }
12390if ${ac_cv_func_alloca_works+:} false; then :
12391 $as_echo_n "(cached) " >&6
bec39cab 12392else
81ecdfbb 12393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12394/* end confdefs.h. */
05ea2a05
TT
12395#ifdef __GNUC__
12396# define alloca __builtin_alloca
12397#else
12398# ifdef _MSC_VER
12399# include <malloc.h>
12400# define alloca _alloca
12401# else
12402# ifdef HAVE_ALLOCA_H
12403# include <alloca.h>
12404# else
12405# ifdef _AIX
12406 #pragma alloca
12407# else
12408# ifndef alloca /* predefined by HP cc +Olibcalls */
12409void *alloca (size_t);
12410# endif
12411# endif
12412# endif
12413# endif
12414#endif
12415
d3ea6809
MM
12416int
12417main ()
12418{
05ea2a05
TT
12419char *p = (char *) alloca (1);
12420 if (p) return 0;
81ecdfbb
RW
12421 ;
12422 return 0;
d3ea6809
MM
12423}
12424_ACEOF
05ea2a05
TT
12425if ac_fn_c_try_link "$LINENO"; then :
12426 ac_cv_func_alloca_works=yes
d3ea6809 12427else
05ea2a05 12428 ac_cv_func_alloca_works=no
a9322a30 12429fi
05ea2a05
TT
12430rm -f core conftest.err conftest.$ac_objext \
12431 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 12432fi
05ea2a05
TT
12433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12434$as_echo "$ac_cv_func_alloca_works" >&6; }
81ecdfbb 12435
05ea2a05 12436if test $ac_cv_func_alloca_works = yes; then
d3ea6809 12437
05ea2a05 12438$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
d3ea6809 12439
05ea2a05
TT
12440else
12441 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12442# that cause trouble. Some versions do not even contain alloca or
12443# contain a buggy version. If you still want to use their alloca,
12444# use ar to extract alloca.o from them instead of compiling alloca.c.
d3ea6809 12445
05ea2a05 12446ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
d0ac1c44 12447
05ea2a05 12448$as_echo "#define C_ALLOCA 1" >>confdefs.h
d0ac1c44
SM
12449
12450
05ea2a05
TT
12451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12452$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12453if ${ac_cv_os_cray+:} false; then :
12454 $as_echo_n "(cached) " >&6
12455else
12456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12457/* end confdefs.h. */
12458#if defined CRAY && ! defined CRAY2
12459webecray
12460#else
12461wenotbecray
12462#endif
12463
12464_ACEOF
12465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12466 $EGREP "webecray" >/dev/null 2>&1; then :
12467 ac_cv_os_cray=yes
12468else
12469 ac_cv_os_cray=no
12470fi
12471rm -f conftest*
12472
12473fi
12474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12475$as_echo "$ac_cv_os_cray" >&6; }
12476if test $ac_cv_os_cray = yes; then
12477 for ac_func in _getb67 GETB67 getb67; do
12478 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12479ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12480if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12481
12482cat >>confdefs.h <<_ACEOF
12483#define CRAY_STACKSEG_END $ac_func
12484_ACEOF
12485
12486 break
12487fi
12488
12489 done
12490fi
12491
12492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12493$as_echo_n "checking stack direction for C alloca... " >&6; }
12494if ${ac_cv_c_stack_direction+:} false; then :
12495 $as_echo_n "(cached) " >&6
12496else
12497 if test "$cross_compiling" = yes; then :
12498 ac_cv_c_stack_direction=0
12499else
12500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12501/* end confdefs.h. */
12502$ac_includes_default
12503int
12504find_stack_direction (int *addr, int depth)
12505{
12506 int dir, dummy = 0;
12507 if (! addr)
12508 addr = &dummy;
12509 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12510 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12511 return dir + dummy;
12512}
12513
12514int
12515main (int argc, char **argv)
12516{
12517 return find_stack_direction (0, argc + !argv + 20) < 0;
12518}
12519_ACEOF
12520if ac_fn_c_try_run "$LINENO"; then :
12521 ac_cv_c_stack_direction=1
12522else
12523 ac_cv_c_stack_direction=-1
12524fi
12525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12526 conftest.$ac_objext conftest.beam conftest.$ac_ext
12527fi
12528
12529fi
12530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12531$as_echo "$ac_cv_c_stack_direction" >&6; }
12532cat >>confdefs.h <<_ACEOF
12533#define STACK_DIRECTION $ac_cv_c_stack_direction
12534_ACEOF
12535
12536
12537fi
12538
12539
12540 WIN32APILIBS=
12541 case ${host} in
12542 *mingw32*)
12543
12544$as_echo "#define USE_WIN32API 1" >>confdefs.h
12545
12546 WIN32APILIBS="-lws2_32"
12547 ;;
12548 esac
12549
12550
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12552$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12553if ${am_cv_langinfo_codeset+:} false; then :
12554 $as_echo_n "(cached) " >&6
12555else
12556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12557/* end confdefs.h. */
12558#include <langinfo.h>
12559int
12560main ()
12561{
12562char* cs = nl_langinfo(CODESET);
12563 ;
12564 return 0;
12565}
12566_ACEOF
12567if ac_fn_c_try_link "$LINENO"; then :
12568 am_cv_langinfo_codeset=yes
12569else
12570 am_cv_langinfo_codeset=no
12571fi
12572rm -f core conftest.err conftest.$ac_objext \
12573 conftest$ac_exeext conftest.$ac_ext
12574
12575fi
12576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12577$as_echo "$am_cv_langinfo_codeset" >&6; }
12578 if test $am_cv_langinfo_codeset = yes; then
12579
12580$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12581
12582 fi
12583
12584
12585 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 dlfcn.h linux/elf.h sys/procfs.h proc_service.h
81ecdfbb
RW
12586do :
12587 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
05ea2a05 12588ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12589if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12590 cat >>confdefs.h <<_ACEOF
81ecdfbb 12591#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12592_ACEOF
b757528f 12593
b757528f 12594fi
bec39cab 12595
a9322a30 12596done
a3828db0 12597
d0ac1c44
SM
12598
12599
a9322a30 12600for ac_func in getpagesize
81ecdfbb
RW
12601do :
12602 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12603if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12604 cat >>confdefs.h <<_ACEOF
81ecdfbb 12605#define HAVE_GETPAGESIZE 1
bec39cab 12606_ACEOF
bcb3dc3d 12607
bcb3dc3d
MK
12608fi
12609done
12610
81ecdfbb
RW
12611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12612$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12613if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12614 $as_echo_n "(cached) " >&6
a9322a30 12615else
81ecdfbb 12616 if test "$cross_compiling" = yes; then :
a9322a30 12617 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12618else
81ecdfbb 12619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12620/* end confdefs.h. */
a9322a30
TT
12621$ac_includes_default
12622/* malloc might have been renamed as rpl_malloc. */
12623#undef malloc
bec39cab 12624
a9322a30
TT
12625/* Thanks to Mike Haertel and Jim Avera for this test.
12626 Here is a matrix of mmap possibilities:
12627 mmap private not fixed
12628 mmap private fixed at somewhere currently unmapped
12629 mmap private fixed at somewhere already mapped
12630 mmap shared not fixed
12631 mmap shared fixed at somewhere currently unmapped
12632 mmap shared fixed at somewhere already mapped
12633 For private mappings, we should verify that changes cannot be read()
12634 back from the file, nor mmap's back from the file at a different
12635 address. (There have been systems where private was not correctly
12636 implemented like the infamous i386 svr4.0, and systems where the
12637 VM page cache was not coherent with the file system buffer cache
12638 like early versions of FreeBSD and possibly contemporary NetBSD.)
12639 For shared mappings, we should conversely verify that changes get
12640 propagated back to all the places they're supposed to be.
bec39cab 12641
a9322a30
TT
12642 Grep wants private fixed already mapped.
12643 The main things grep needs to know about mmap are:
12644 * does it exist and is it safe to write into the mmap'd area
12645 * how to use it (BSD variants) */
8b9cf735 12646
a9322a30
TT
12647#include <fcntl.h>
12648#include <sys/mman.h>
8b9cf735 12649
81ecdfbb 12650#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12651char *malloc ();
a3828db0
MK
12652#endif
12653
a9322a30 12654/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12655#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12656# ifdef _SC_PAGESIZE
12657# define getpagesize() sysconf(_SC_PAGESIZE)
12658# else /* no _SC_PAGESIZE */
81ecdfbb 12659# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12660# include <sys/param.h>
12661# ifdef EXEC_PAGESIZE
12662# define getpagesize() EXEC_PAGESIZE
12663# else /* no EXEC_PAGESIZE */
12664# ifdef NBPG
12665# define getpagesize() NBPG * CLSIZE
12666# ifndef CLSIZE
12667# define CLSIZE 1
12668# endif /* no CLSIZE */
12669# else /* no NBPG */
12670# ifdef NBPC
12671# define getpagesize() NBPC
12672# else /* no NBPC */
12673# ifdef PAGESIZE
12674# define getpagesize() PAGESIZE
12675# endif /* PAGESIZE */
12676# endif /* no NBPC */
12677# endif /* no NBPG */
12678# endif /* no EXEC_PAGESIZE */
12679# else /* no HAVE_SYS_PARAM_H */
12680# define getpagesize() 8192 /* punt totally */
12681# endif /* no HAVE_SYS_PARAM_H */
12682# endif /* no _SC_PAGESIZE */
12683
12684#endif /* no HAVE_GETPAGESIZE */
12685
bec39cab
AC
12686int
12687main ()
12688{
a9322a30 12689 char *data, *data2, *data3;
d0ac1c44 12690 const char *cdata2;
a9322a30 12691 int i, pagesize;
d0ac1c44 12692 int fd, fd2;
a9322a30
TT
12693
12694 pagesize = getpagesize ();
12695
12696 /* First, make a file with some known garbage in it. */
12697 data = (char *) malloc (pagesize);
12698 if (!data)
81ecdfbb 12699 return 1;
a9322a30
TT
12700 for (i = 0; i < pagesize; ++i)
12701 *(data + i) = rand ();
12702 umask (0);
12703 fd = creat ("conftest.mmap", 0600);
12704 if (fd < 0)
d0ac1c44 12705 return 2;
a9322a30 12706 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 12707 return 3;
a9322a30
TT
12708 close (fd);
12709
d0ac1c44
SM
12710 /* Next, check that the tail of a page is zero-filled. File must have
12711 non-zero length, otherwise we risk SIGBUS for entire page. */
12712 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12713 if (fd2 < 0)
12714 return 4;
12715 cdata2 = "";
12716 if (write (fd2, cdata2, 1) != 1)
12717 return 5;
12718 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12719 if (data2 == MAP_FAILED)
12720 return 6;
12721 for (i = 0; i < pagesize; ++i)
12722 if (*(data2 + i))
12723 return 7;
12724 close (fd2);
12725 if (munmap (data2, pagesize))
12726 return 8;
12727
a9322a30
TT
12728 /* Next, try to mmap the file at a fixed address which already has
12729 something else allocated at it. If we can, also make sure that
12730 we see the same garbage. */
12731 fd = open ("conftest.mmap", O_RDWR);
12732 if (fd < 0)
d0ac1c44 12733 return 9;
a9322a30
TT
12734 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12735 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 12736 return 10;
a9322a30
TT
12737 for (i = 0; i < pagesize; ++i)
12738 if (*(data + i) != *(data2 + i))
d0ac1c44 12739 return 11;
a9322a30
TT
12740
12741 /* Finally, make sure that changes to the mapped area do not
12742 percolate back to the file as seen by read(). (This is a bug on
12743 some variants of i386 svr4.0.) */
12744 for (i = 0; i < pagesize; ++i)
12745 *(data2 + i) = *(data2 + i) + 1;
12746 data3 = (char *) malloc (pagesize);
12747 if (!data3)
d0ac1c44 12748 return 12;
a9322a30 12749 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 12750 return 13;
a9322a30
TT
12751 for (i = 0; i < pagesize; ++i)
12752 if (*(data + i) != *(data3 + i))
d0ac1c44 12753 return 14;
a9322a30 12754 close (fd);
81ecdfbb 12755 return 0;
bec39cab
AC
12756}
12757_ACEOF
81ecdfbb 12758if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12759 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12760else
81ecdfbb 12761 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12762fi
81ecdfbb
RW
12763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12764 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12765fi
81ecdfbb 12766
a9322a30 12767fi
81ecdfbb
RW
12768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12769$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12770if test $ac_cv_func_mmap_fixed_mapped = yes; then
12771
81ecdfbb 12772$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12773
086ec9eb 12774fi
d0ac1c44 12775rm -f conftest.mmap conftest.txt
a3828db0 12776
05ea2a05 12777 for ac_header in vfork.h
81ecdfbb
RW
12778do :
12779 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 12780if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 12781 cat >>confdefs.h <<_ACEOF
81ecdfbb 12782#define HAVE_VFORK_H 1
bec39cab 12783_ACEOF
c906108c
SS
12784
12785fi
a9322a30 12786
a3828db0 12787done
c906108c 12788
a9322a30 12789for ac_func in fork vfork
81ecdfbb
RW
12790do :
12791 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12792ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 12793if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 12794 cat >>confdefs.h <<_ACEOF
81ecdfbb 12795#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12796_ACEOF
b83266a0 12797
97bf5e38 12798fi
a3828db0 12799done
b83266a0 12800
a9322a30 12801if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12803$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 12804if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 12805 $as_echo_n "(cached) " >&6
a9322a30 12806else
81ecdfbb 12807 if test "$cross_compiling" = yes; then :
a9322a30
TT
12808 ac_cv_func_fork_works=cross
12809else
81ecdfbb
RW
12810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12811/* end confdefs.h. */
12812$ac_includes_default
12813int
12814main ()
12815{
12816
12817 /* By Ruediger Kuhlmann. */
12818 return fork () < 0;
12819
12820 ;
12821 return 0;
12822}
a9322a30 12823_ACEOF
81ecdfbb 12824if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12825 ac_cv_func_fork_works=yes
12826else
81ecdfbb 12827 ac_cv_func_fork_works=no
a9322a30 12828fi
81ecdfbb
RW
12829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12830 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12831fi
81ecdfbb 12832
a9322a30 12833fi
81ecdfbb
RW
12834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12835$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12836
12837else
12838 ac_cv_func_fork_works=$ac_cv_func_fork
12839fi
12840if test "x$ac_cv_func_fork_works" = xcross; then
12841 case $host in
12842 *-*-amigaos* | *-*-msdosdjgpp*)
12843 # Override, as these systems have only a dummy fork() stub
12844 ac_cv_func_fork_works=no
12845 ;;
12846 *)
12847 ac_cv_func_fork_works=yes
12848 ;;
12849 esac
81ecdfbb
RW
12850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12851$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12852fi
12853ac_cv_func_vfork_works=$ac_cv_func_vfork
12854if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12856$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 12857if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 12858 $as_echo_n "(cached) " >&6
a9322a30 12859else
81ecdfbb 12860 if test "$cross_compiling" = yes; then :
a9322a30
TT
12861 ac_cv_func_vfork_works=cross
12862else
81ecdfbb 12863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12864/* end confdefs.h. */
12865/* Thanks to Paul Eggert for this test. */
81ecdfbb 12866$ac_includes_default
a9322a30 12867#include <sys/wait.h>
81ecdfbb 12868#ifdef HAVE_VFORK_H
a9322a30
TT
12869# include <vfork.h>
12870#endif
12871/* On some sparc systems, changes by the child to local and incoming
12872 argument registers are propagated back to the parent. The compiler
12873 is told about this with #include <vfork.h>, but some compilers
12874 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12875 static variable whose address is put into a register that is
12876 clobbered by the vfork. */
12877static void
12878#ifdef __cplusplus
12879sparc_address_test (int arg)
12880# else
12881sparc_address_test (arg) int arg;
12882#endif
12883{
12884 static pid_t child;
12885 if (!child) {
12886 child = vfork ();
12887 if (child < 0) {
12888 perror ("vfork");
12889 _exit(2);
12890 }
12891 if (!child) {
12892 arg = getpid();
12893 write(-1, "", 0);
12894 _exit (arg);
12895 }
12896 }
12897}
12898
12899int
12900main ()
12901{
12902 pid_t parent = getpid ();
12903 pid_t child;
12904
12905 sparc_address_test (0);
12906
12907 child = vfork ();
12908
12909 if (child == 0) {
12910 /* Here is another test for sparc vfork register problems. This
12911 test uses lots of local variables, at least as many local
12912 variables as main has allocated so far including compiler
12913 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12914 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12915 reuse the register of parent for one of the local variables,
12916 since it will think that parent can't possibly be used any more
12917 in this routine. Assigning to the local variable will thus
12918 munge parent in the parent process. */
12919 pid_t
12920 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12921 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12922 /* Convince the compiler that p..p7 are live; otherwise, it might
12923 use the same hardware register for all 8 local variables. */
12924 if (p != p1 || p != p2 || p != p3 || p != p4
12925 || p != p5 || p != p6 || p != p7)
12926 _exit(1);
12927
12928 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12929 from child file descriptors. If the child closes a descriptor
12930 before it execs or exits, this munges the parent's descriptor
12931 as well. Test for this by closing stdout in the child. */
12932 _exit(close(fileno(stdout)) != 0);
12933 } else {
12934 int status;
12935 struct stat st;
12936
12937 while (wait(&status) != child)
12938 ;
81ecdfbb 12939 return (
a9322a30
TT
12940 /* Was there some problem with vforking? */
12941 child < 0
12942
12943 /* Did the child fail? (This shouldn't happen.) */
12944 || status
12945
12946 /* Did the vfork/compiler bug occur? */
12947 || parent != getpid()
12948
12949 /* Did the file descriptor bug occur? */
12950 || fstat(fileno(stdout), &st) != 0
12951 );
12952 }
12953}
12954_ACEOF
81ecdfbb 12955if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12956 ac_cv_func_vfork_works=yes
12957else
81ecdfbb 12958 ac_cv_func_vfork_works=no
a9322a30 12959fi
81ecdfbb
RW
12960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12961 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12962fi
81ecdfbb 12963
a9322a30 12964fi
81ecdfbb
RW
12965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12966$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12967
12968fi;
12969if test "x$ac_cv_func_fork_works" = xcross; then
12970 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12972$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12973fi
12974
12975if test "x$ac_cv_func_vfork_works" = xyes; then
12976
81ecdfbb 12977$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12978
12979else
12980
81ecdfbb 12981$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12982
12983fi
12984if test "x$ac_cv_func_fork_works" = xyes; then
12985
81ecdfbb 12986$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12987
12988fi
12989
05ea2a05
TT
12990 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
12991 ptrace64 sbrk setns sigaltstack sigprocmask \
12992 setpgid setpgrp getrusage getauxval
81ecdfbb
RW
12993do :
12994 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12995ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 12996if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 12997 cat >>confdefs.h <<_ACEOF
81ecdfbb 12998#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12999_ACEOF
13000
13001fi
13002done
13003
13004
05ea2a05
TT
13005 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13006"
13007if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13008 ac_have_decl=1
6c7a06a3 13009else
05ea2a05
TT
13010 ac_have_decl=0
13011fi
13012
13013cat >>confdefs.h <<_ACEOF
13014#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13015_ACEOF
13016
13017
13018 if test "$cross_compiling" = yes; then :
81ecdfbb 13019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3 13020/* end confdefs.h. */
05ea2a05 13021#include <sys/personality.h>
6c7a06a3
TT
13022int
13023main ()
13024{
05ea2a05
TT
13025
13026 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13027 # define ADDR_NO_RANDOMIZE 0x0040000
13028 # endif
13029 /* Test the flag could be set and stays set. */
13030 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13031 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13032 return 1
bec39cab
AC
13033 ;
13034 return 0;
13035}
13036_ACEOF
81ecdfbb 13037if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13038 have_personality=true
a4db0f07 13039else
05ea2a05 13040 have_personality=false
a4db0f07 13041fi
81ecdfbb
RW
13042rm -f core conftest.err conftest.$ac_objext \
13043 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13044else
13045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13046/* end confdefs.h. */
13047#include <sys/personality.h>
13048int
13049main ()
13050{
6c7a06a3 13051
05ea2a05
TT
13052 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13053 # define ADDR_NO_RANDOMIZE 0x0040000
13054 # endif
13055 /* Test the flag could be set and stays set. */
13056 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13057 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13058 return 1
13059 ;
13060 return 0;
13061}
13062_ACEOF
13063if ac_fn_c_try_run "$LINENO"; then :
13064 have_personality=true
13065else
13066 have_personality=false
13067fi
13068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13069 conftest.$ac_objext conftest.beam conftest.$ac_ext
a4db0f07 13070fi
6c7a06a3 13071
05ea2a05
TT
13072 if $have_personality
13073 then
a4db0f07 13074
05ea2a05 13075$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
c906108c 13076
05ea2a05 13077 fi
d0ac1c44 13078
05ea2a05
TT
13079 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13080if test "x$ac_cv_have_decl_strstr" = xyes; then :
13081 ac_have_decl=1
d0ac1c44 13082else
05ea2a05
TT
13083 ac_have_decl=0
13084fi
d0ac1c44
SM
13085
13086cat >>confdefs.h <<_ACEOF
05ea2a05
TT
13087#define HAVE_DECL_STRSTR $ac_have_decl
13088_ACEOF
13089
13090
13091 # ----------------------- #
13092 # Checks for structures. #
13093 # ----------------------- #
13094
13095 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13096if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13097
13098cat >>confdefs.h <<_ACEOF
13099#define HAVE_STRUCT_STAT_ST_BLOCKS 1
d0ac1c44
SM
13100_ACEOF
13101
05ea2a05 13102
d0ac1c44 13103fi
05ea2a05
TT
13104ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13105if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
d0ac1c44 13106
05ea2a05
TT
13107cat >>confdefs.h <<_ACEOF
13108#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13109_ACEOF
13110
13111
13112fi
13113
13114
13115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13116$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13117if ${ac_cv_search_kinfo_getfile+:} false; then :
5e030278
TT
13118 $as_echo_n "(cached) " >&6
13119else
05ea2a05
TT
13120 ac_func_search_save_LIBS=$LIBS
13121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13122/* end confdefs.h. */
3266f10b 13123
05ea2a05
TT
13124/* Override any GCC internal prototype to avoid an error.
13125 Use char because int might match the return type of a GCC
13126 builtin and then its argument prototype would still apply. */
13127#ifdef __cplusplus
13128extern "C"
13129#endif
13130char kinfo_getfile ();
3266f10b
TT
13131int
13132main ()
13133{
05ea2a05 13134return kinfo_getfile ();
3266f10b
TT
13135 ;
13136 return 0;
13137}
13138_ACEOF
05ea2a05
TT
13139for ac_lib in '' util util-freebsd; do
13140 if test -z "$ac_lib"; then
13141 ac_res="none required"
13142 else
13143 ac_res=-l$ac_lib
13144 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13145 fi
13146 if ac_fn_c_try_link "$LINENO"; then :
13147 ac_cv_search_kinfo_getfile=$ac_res
3266f10b 13148fi
05ea2a05
TT
13149rm -f core conftest.err conftest.$ac_objext \
13150 conftest$ac_exeext
13151 if ${ac_cv_search_kinfo_getfile+:} false; then :
13152 break
13153fi
13154done
13155if ${ac_cv_search_kinfo_getfile+:} false; then :
3266f10b
TT
13156
13157else
05ea2a05 13158 ac_cv_search_kinfo_getfile=no
3266f10b 13159fi
05ea2a05
TT
13160rm conftest.$ac_ext
13161LIBS=$ac_func_search_save_LIBS
13162fi
13163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13164$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13165ac_res=$ac_cv_search_kinfo_getfile
13166if test "$ac_res" != no; then :
13167 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13168
13169$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
3266f10b
TT
13170
13171fi
13172
3266f10b 13173
05ea2a05
TT
13174 # Check for std::thread. This does not work on some platforms, like
13175 # mingw and DJGPP.
13176 ac_ext=cpp
13177ac_cpp='$CXXCPP $CPPFLAGS'
13178ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13179ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13180ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3266f10b 13181
3266f10b 13182
3266f10b 13183
3266f10b 13184
3266f10b 13185
05ea2a05
TT
13186ac_ext=c
13187ac_cpp='$CPP $CPPFLAGS'
13188ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13189ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13190ac_compiler_gnu=$ac_cv_c_compiler_gnu
3266f10b 13191
05ea2a05 13192ax_pthread_ok=no
3266f10b 13193
05ea2a05
TT
13194# We used to check for pthread.h first, but this fails if pthread.h
13195# requires special compiler flags (e.g. on Tru64 or Sequent).
13196# It gets checked for in the link test anyway.
3266f10b 13197
05ea2a05
TT
13198# First of all, check if the user has set any of the PTHREAD_LIBS,
13199# etcetera environment variables, and if threads linking works using
13200# them:
13201if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13202 ax_pthread_save_CC="$CC"
13203 ax_pthread_save_CFLAGS="$CFLAGS"
13204 ax_pthread_save_LIBS="$LIBS"
13205 if test "x$PTHREAD_CC" != "x"; then :
13206 CC="$PTHREAD_CC"
3266f10b 13207fi
05ea2a05
TT
13208 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13209 LIBS="$PTHREAD_LIBS $LIBS"
13210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13211$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13213/* end confdefs.h. */
05ea2a05
TT
13214
13215/* Override any GCC internal prototype to avoid an error.
13216 Use char because int might match the return type of a GCC
13217 builtin and then its argument prototype would still apply. */
13218#ifdef __cplusplus
13219extern "C"
13220#endif
13221char pthread_join ();
3266f10b
TT
13222int
13223main ()
13224{
05ea2a05 13225return pthread_join ();
3266f10b
TT
13226 ;
13227 return 0;
13228}
13229_ACEOF
13230if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13231 ax_pthread_ok=yes
3266f10b
TT
13232fi
13233rm -f core conftest.err conftest.$ac_objext \
13234 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13236$as_echo "$ax_pthread_ok" >&6; }
13237 if test "x$ax_pthread_ok" = "xno"; then
13238 PTHREAD_LIBS=""
13239 PTHREAD_CFLAGS=""
13240 fi
13241 CC="$ax_pthread_save_CC"
13242 CFLAGS="$ax_pthread_save_CFLAGS"
13243 LIBS="$ax_pthread_save_LIBS"
3266f10b 13244fi
3266f10b 13245
05ea2a05
TT
13246# We must check for the threads library under a number of different
13247# names; the ordering is very important because some systems
13248# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13249# libraries is broken (non-POSIX).
3266f10b 13250
05ea2a05
TT
13251# Create a list of thread flags to try. Items starting with a "-" are
13252# C compiler flags, and other items are library names, except for "none"
13253# which indicates that we try without any flags at all, and "pthread-config"
13254# which is a program returning the flags for the Pth emulation library.
3266f10b 13255
05ea2a05 13256ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3266f10b 13257
05ea2a05
TT
13258# The ordering *is* (sometimes) important. Some notes on the
13259# individual items follow:
3266f10b 13260
05ea2a05
TT
13261# pthreads: AIX (must check this before -lpthread)
13262# none: in case threads are in libc; should be tried before -Kthread and
13263# other compiler flags to prevent continual compiler warnings
13264# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13265# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13266# (Note: HP C rejects this with "bad form for `-t' option")
13267# -pthreads: Solaris/gcc (Note: HP C also rejects)
13268# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13269# doesn't hurt to check since this sometimes defines pthreads and
13270# -D_REENTRANT too), HP C (must be checked before -lpthread, which
13271# is present but should not be used directly; and before -mthreads,
13272# because the compiler interprets this as "-mt" + "-hreads")
13273# -mthreads: Mingw32/gcc, Lynx/gcc
13274# pthread: Linux, etcetera
13275# --thread-safe: KAI C++
13276# pthread-config: use pthread-config program (for GNU Pth library)
3266f10b 13277
05ea2a05 13278case $host_os in
3266f10b 13279
05ea2a05 13280 freebsd*)
3266f10b 13281
05ea2a05
TT
13282 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13283 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3266f10b 13284
05ea2a05
TT
13285 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13286 ;;
3266f10b 13287
05ea2a05 13288 hpux*)
3266f10b 13289
05ea2a05
TT
13290 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13291 # multi-threading and also sets -lpthread."
13292
13293 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13294 ;;
13295
13296 openedition*)
13297
13298 # IBM z/OS requires a feature-test macro to be defined in order to
13299 # enable POSIX threads at all, so give the user a hint if this is
13300 # not set. (We don't define these ourselves, as they can affect
13301 # other portions of the system API in unpredictable ways.)
13302
13303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13304/* end confdefs.h. */
05ea2a05
TT
13305
13306# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13307 AX_PTHREAD_ZOS_MISSING
13308# endif
3266f10b
TT
13309
13310_ACEOF
13311if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
05ea2a05
TT
13312 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13313 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13314$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
3266f10b
TT
13315fi
13316rm -f conftest*
13317
05ea2a05 13318 ;;
3266f10b 13319
05ea2a05 13320 solaris*)
3266f10b 13321
05ea2a05
TT
13322 # On Solaris (at least, for some versions), libc contains stubbed
13323 # (non-functional) versions of the pthreads routines, so link-based
13324 # tests will erroneously succeed. (N.B.: The stubs are missing
13325 # pthread_cleanup_push, or rather a function called by this macro,
13326 # so we could check for that, but who knows whether they'll stub
13327 # that too in a future libc.) So we'll check first for the
13328 # standard Solaris way of linking pthreads (-mt -lpthread).
13329
13330 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13331 ;;
13332esac
13333
13334# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13335
13336if test "x$GCC" = "xyes"; then :
13337 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
3266f10b
TT
13338fi
13339
05ea2a05
TT
13340# The presence of a feature test macro requesting re-entrant function
13341# definitions is, on some systems, a strong hint that pthreads support is
13342# correctly enabled
13343
13344case $host_os in
13345 darwin* | hpux* | linux* | osf* | solaris*)
13346 ax_pthread_check_macro="_REENTRANT"
13347 ;;
13348
13349 aix*)
13350 ax_pthread_check_macro="_THREAD_SAFE"
13351 ;;
13352
13353 *)
13354 ax_pthread_check_macro="--"
13355 ;;
13356esac
13357if test "x$ax_pthread_check_macro" = "x--"; then :
13358 ax_pthread_check_cond=0
13359else
13360 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
3266f10b
TT
13361fi
13362
05ea2a05
TT
13363# Are we compiling with Clang?
13364
13365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13366$as_echo_n "checking whether $CC is Clang... " >&6; }
13367if ${ax_cv_PTHREAD_CLANG+:} false; then :
3266f10b
TT
13368 $as_echo_n "(cached) " >&6
13369else
05ea2a05
TT
13370 ax_cv_PTHREAD_CLANG=no
13371 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13372 if test "x$GCC" = "xyes"; then
13373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13374/* end confdefs.h. */
05ea2a05
TT
13375/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13376# if defined(__clang__) && defined(__llvm__)
13377 AX_PTHREAD_CC_IS_CLANG
13378# endif
3266f10b 13379
3266f10b 13380_ACEOF
05ea2a05
TT
13381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13382 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13383 ax_cv_PTHREAD_CLANG=yes
3266f10b 13384fi
05ea2a05
TT
13385rm -f conftest*
13386
13387 fi
3266f10b
TT
13388
13389fi
05ea2a05
TT
13390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13391$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13392ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
3266f10b 13393
05ea2a05 13394ax_pthread_clang_warning=no
3266f10b 13395
05ea2a05
TT
13396# Clang needs special handling, because older versions handle the -pthread
13397# option in a rather... idiosyncratic way
3266f10b 13398
05ea2a05 13399if test "x$ax_pthread_clang" = "xyes"; then
3266f10b 13400
05ea2a05 13401 # Clang takes -pthread; it has never supported any other flag
b2ceabe8 13402
05ea2a05
TT
13403 # (Note 1: This will need to be revisited if a system that Clang
13404 # supports has POSIX threads in a separate library. This tends not
13405 # to be the way of modern systems, but it's conceivable.)
b2ceabe8 13406
05ea2a05
TT
13407 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13408 # to get POSIX threads support; the API is always present and
13409 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13410 # -pthread does define _REENTRANT, and while the Darwin headers
13411 # ignore this macro, third-party headers might not.)
b2ceabe8 13412
05ea2a05
TT
13413 PTHREAD_CFLAGS="-pthread"
13414 PTHREAD_LIBS=
3266f10b 13415
05ea2a05
TT
13416 ax_pthread_ok=yes
13417
13418 # However, older versions of Clang make a point of warning the user
13419 # that, in an invocation where only linking and no compilation is
13420 # taking place, the -pthread option has no effect ("argument unused
13421 # during compilation"). They expect -pthread to be passed in only
13422 # when source code is being compiled.
13423 #
13424 # Problem is, this is at odds with the way Automake and most other
13425 # C build frameworks function, which is that the same flags used in
13426 # compilation (CFLAGS) are also used in linking. Many systems
13427 # supported by AX_PTHREAD require exactly this for POSIX threads
13428 # support, and in fact it is often not straightforward to specify a
13429 # flag that is used only in the compilation phase and not in
13430 # linking. Such a scenario is extremely rare in practice.
13431 #
13432 # Even though use of the -pthread flag in linking would only print
13433 # a warning, this can be a nuisance for well-run software projects
13434 # that build with -Werror. So if the active version of Clang has
13435 # this misfeature, we search for an option to squash it.
13436
13437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13438$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13439if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13440 $as_echo_n "(cached) " >&6
13441else
13442 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13443 # Create an alternate version of $ac_link that compiles and
13444 # links in two steps (.c -> .o, .o -> exe) instead of one
13445 # (.c -> exe), because the warning occurs only in the second
13446 # step
13447 ax_pthread_save_ac_link="$ac_link"
13448 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13449 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13450 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13451 ax_pthread_save_CFLAGS="$CFLAGS"
13452 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13453 if test "x$ax_pthread_try" = "xunknown"; then :
13454 break
13455fi
13456 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13457 ac_link="$ax_pthread_save_ac_link"
13458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13459/* end confdefs.h. */
13460int main(void){return 0;}
3266f10b
TT
13461_ACEOF
13462if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
13463 ac_link="$ax_pthread_2step_ac_link"
13464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13465/* end confdefs.h. */
13466int main(void){return 0;}
13467_ACEOF
13468if ac_fn_c_try_link "$LINENO"; then :
13469 break
3266f10b
TT
13470fi
13471rm -f core conftest.err conftest.$ac_objext \
13472 conftest$ac_exeext conftest.$ac_ext
13473
13474fi
05ea2a05
TT
13475rm -f core conftest.err conftest.$ac_objext \
13476 conftest$ac_exeext conftest.$ac_ext
13477 done
13478 ac_link="$ax_pthread_save_ac_link"
13479 CFLAGS="$ax_pthread_save_CFLAGS"
13480 if test "x$ax_pthread_try" = "x"; then :
13481 ax_pthread_try=no
13482fi
13483 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
3266f10b 13484
05ea2a05
TT
13485fi
13486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13487$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
3266f10b 13488
05ea2a05
TT
13489 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13490 no | unknown) ;;
13491 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13492 esac
3266f10b 13493
05ea2a05 13494fi # $ax_pthread_clang = yes
3266f10b 13495
05ea2a05
TT
13496if test "x$ax_pthread_ok" = "xno"; then
13497for ax_pthread_try_flag in $ax_pthread_flags; do
3266f10b 13498
05ea2a05
TT
13499 case $ax_pthread_try_flag in
13500 none)
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13502$as_echo_n "checking whether pthreads work without any flags... " >&6; }
13503 ;;
3266f10b 13504
05ea2a05
TT
13505 -mt,pthread)
13506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13507$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13508 PTHREAD_CFLAGS="-mt"
13509 PTHREAD_LIBS="-lpthread"
13510 ;;
3266f10b 13511
05ea2a05
TT
13512 -*)
13513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13514$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13515 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13516 ;;
3266f10b 13517
05ea2a05
TT
13518 pthread-config)
13519 # Extract the first word of "pthread-config", so it can be a program name with args.
13520set dummy pthread-config; ac_word=$2
13521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13522$as_echo_n "checking for $ac_word... " >&6; }
13523if ${ac_cv_prog_ax_pthread_config+:} false; then :
13524 $as_echo_n "(cached) " >&6
13525else
13526 if test -n "$ax_pthread_config"; then
13527 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13528else
13529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13530for as_dir in $PATH
13531do
13532 IFS=$as_save_IFS
13533 test -z "$as_dir" && as_dir=.
13534 for ac_exec_ext in '' $ac_executable_extensions; do
13535 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13536 ac_cv_prog_ax_pthread_config="yes"
13537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13538 break 2
13539 fi
3266f10b 13540done
05ea2a05
TT
13541 done
13542IFS=$as_save_IFS
3266f10b 13543
05ea2a05
TT
13544 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13545fi
13546fi
13547ax_pthread_config=$ac_cv_prog_ax_pthread_config
13548if test -n "$ax_pthread_config"; then
13549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13550$as_echo "$ax_pthread_config" >&6; }
3266f10b 13551else
05ea2a05
TT
13552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13553$as_echo "no" >&6; }
3266f10b
TT
13554fi
13555
5e030278 13556
05ea2a05
TT
13557 if test "x$ax_pthread_config" = "xno"; then :
13558 continue
13559fi
13560 PTHREAD_CFLAGS="`pthread-config --cflags`"
13561 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13562 ;;
5e030278 13563
05ea2a05
TT
13564 *)
13565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13566$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13567 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13568 ;;
13569 esac
5e030278 13570
5e030278
TT
13571 ax_pthread_save_CFLAGS="$CFLAGS"
13572 ax_pthread_save_LIBS="$LIBS"
5e030278
TT
13573 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13574 LIBS="$PTHREAD_LIBS $LIBS"
05ea2a05
TT
13575
13576 # Check for various functions. We must include pthread.h,
13577 # since some functions may be macros. (On the Sequent, we
13578 # need a special flag -Kthread to make this header compile.)
13579 # We check for pthread_join because it is in -lpthread on IRIX
13580 # while pthread_create is in libc. We check for pthread_attr_init
13581 # due to DEC craziness with -lpthreads. We check for
13582 # pthread_cleanup_push because it is one of the few pthread
13583 # functions on Solaris that doesn't have a non-functional libc stub.
13584 # We try pthread_create on general principles.
13585
5e030278
TT
13586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13587/* end confdefs.h. */
05ea2a05
TT
13588#include <pthread.h>
13589# if $ax_pthread_check_cond
13590# error "$ax_pthread_check_macro must be defined"
13591# endif
13592 static void routine(void *a) { a = 0; }
13593 static void *start_routine(void *a) { return a; }
5e030278
TT
13594int
13595main ()
13596{
05ea2a05
TT
13597pthread_t th; pthread_attr_t attr;
13598 pthread_create(&th, 0, start_routine, 0);
13599 pthread_join(th, 0);
13600 pthread_attr_init(&attr);
13601 pthread_cleanup_push(routine, 0);
13602 pthread_cleanup_pop(0) /* ; */
5e030278
TT
13603 ;
13604 return 0;
13605}
13606_ACEOF
13607if ac_fn_c_try_link "$LINENO"; then :
13608 ax_pthread_ok=yes
13609fi
13610rm -f core conftest.err conftest.$ac_objext \
13611 conftest$ac_exeext conftest.$ac_ext
05ea2a05 13612
5e030278
TT
13613 CFLAGS="$ax_pthread_save_CFLAGS"
13614 LIBS="$ax_pthread_save_LIBS"
05ea2a05
TT
13615
13616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13617$as_echo "$ax_pthread_ok" >&6; }
13618 if test "x$ax_pthread_ok" = "xyes"; then :
13619 break
5e030278
TT
13620fi
13621
05ea2a05
TT
13622 PTHREAD_LIBS=""
13623 PTHREAD_CFLAGS=""
13624done
13625fi
5e030278 13626
05ea2a05
TT
13627# Various other checks:
13628if test "x$ax_pthread_ok" = "xyes"; then
13629 ax_pthread_save_CFLAGS="$CFLAGS"
13630 ax_pthread_save_LIBS="$LIBS"
13631 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13632 LIBS="$PTHREAD_LIBS $LIBS"
5e030278 13633
05ea2a05
TT
13634 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
13635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
13636$as_echo_n "checking for joinable pthread attribute... " >&6; }
13637if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
13638 $as_echo_n "(cached) " >&6
13639else
13640 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
13641 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
13642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13643/* end confdefs.h. */
13644#include <pthread.h>
13645int
13646main ()
13647{
13648int attr = $ax_pthread_attr; return attr /* ; */
13649 ;
13650 return 0;
13651}
13652_ACEOF
13653if ac_fn_c_try_link "$LINENO"; then :
13654 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
13655fi
13656rm -f core conftest.err conftest.$ac_objext \
13657 conftest$ac_exeext conftest.$ac_ext
13658 done
5e030278 13659
05ea2a05
TT
13660fi
13661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
13662$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
13663 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
13664 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
13665 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
5e030278 13666
05ea2a05
TT
13667cat >>confdefs.h <<_ACEOF
13668#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
13669_ACEOF
5e030278 13670
05ea2a05 13671 ax_pthread_joinable_attr_defined=yes
5e030278 13672
05ea2a05 13673fi
5e030278 13674
05ea2a05
TT
13675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
13676$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
13677if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
13678 $as_echo_n "(cached) " >&6
13679else
13680 ax_cv_PTHREAD_SPECIAL_FLAGS=no
13681 case $host_os in
13682 solaris*)
13683 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
13684 ;;
13685 esac
5e030278 13686
05ea2a05
TT
13687fi
13688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
13689$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
13690 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
13691 test "x$ax_pthread_special_flags_added" != "xyes"; then :
13692 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
13693 ax_pthread_special_flags_added=yes
13694fi
5e030278 13695
05ea2a05
TT
13696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
13697$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
13698if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
13699 $as_echo_n "(cached) " >&6
13700else
13701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13702/* end confdefs.h. */
13703#include <pthread.h>
13704int
13705main ()
13706{
13707int i = PTHREAD_PRIO_INHERIT;
13708 ;
13709 return 0;
13710}
13711_ACEOF
13712if ac_fn_c_try_link "$LINENO"; then :
13713 ax_cv_PTHREAD_PRIO_INHERIT=yes
13714else
13715 ax_cv_PTHREAD_PRIO_INHERIT=no
13716fi
13717rm -f core conftest.err conftest.$ac_objext \
13718 conftest$ac_exeext conftest.$ac_ext
5e030278 13719
05ea2a05
TT
13720fi
13721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
13722$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
13723 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
13724 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
5e030278 13725
05ea2a05 13726$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
5e030278 13727
05ea2a05 13728 ax_pthread_prio_inherit_defined=yes
5e030278 13729
05ea2a05 13730fi
5e030278 13731
05ea2a05
TT
13732 CFLAGS="$ax_pthread_save_CFLAGS"
13733 LIBS="$ax_pthread_save_LIBS"
5e030278 13734
05ea2a05
TT
13735 # More AIX lossage: compile with *_r variant
13736 if test "x$GCC" != "xyes"; then
13737 case $host_os in
13738 aix*)
13739 case "x/$CC" in #(
13740 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
13741 #handle absolute path differently from PATH based program lookup
13742 case "x$CC" in #(
13743 x/*) :
13744 if as_fn_executable_p ${CC}_r; then :
13745 PTHREAD_CC="${CC}_r"
13746fi ;; #(
13747 *) :
13748 for ac_prog in ${CC}_r
13749do
13750 # Extract the first word of "$ac_prog", so it can be a program name with args.
13751set dummy $ac_prog; ac_word=$2
13752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13753$as_echo_n "checking for $ac_word... " >&6; }
13754if ${ac_cv_prog_PTHREAD_CC+:} false; then :
13755 $as_echo_n "(cached) " >&6
13756else
13757 if test -n "$PTHREAD_CC"; then
13758 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
13759else
13760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13761for as_dir in $PATH
13762do
13763 IFS=$as_save_IFS
13764 test -z "$as_dir" && as_dir=.
13765 for ac_exec_ext in '' $ac_executable_extensions; do
13766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13767 ac_cv_prog_PTHREAD_CC="$ac_prog"
13768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13769 break 2
13770 fi
13771done
13772 done
13773IFS=$as_save_IFS
5e030278 13774
5e030278 13775fi
05ea2a05
TT
13776fi
13777PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
13778if test -n "$PTHREAD_CC"; then
13779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
13780$as_echo "$PTHREAD_CC" >&6; }
13781else
13782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13783$as_echo "no" >&6; }
13784fi
5e030278 13785
5e030278 13786
05ea2a05
TT
13787 test -n "$PTHREAD_CC" && break
13788done
13789test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
13790 ;;
13791esac ;; #(
13792 *) :
13793 ;;
5e030278 13794esac
05ea2a05
TT
13795 ;;
13796 esac
13797 fi
13798fi
5e030278 13799
05ea2a05 13800test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
5e030278 13801
5e030278 13802
5e030278 13803
5e030278 13804
5e030278 13805
05ea2a05
TT
13806# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
13807if test "x$ax_pthread_ok" = "xyes"; then
13808 threads=yes
13809 :
5e030278 13810else
05ea2a05
TT
13811 ax_pthread_ok=no
13812 threads=no
5e030278 13813fi
05ea2a05
TT
13814ac_ext=cpp
13815ac_cpp='$CXXCPP $CPPFLAGS'
13816ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13817ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13818ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5e030278 13819
5e030278 13820
05ea2a05
TT
13821 if test "$threads" = "yes"; then
13822 save_LIBS="$LIBS"
13823 LIBS="$PTHREAD_LIBS $LIBS"
13824 save_CXXFLAGS="$CXXFLAGS"
13825 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
13826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
13827$as_echo_n "checking for std::thread... " >&6; }
13828if ${gdb_cv_cxx_std_thread+:} false; then :
13829 $as_echo_n "(cached) " >&6
13830else
13831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 13832/* end confdefs.h. */
05ea2a05
TT
13833#include <thread>
13834 void callback() { }
13835int
13836main ()
13837{
13838std::thread t(callback);
13839 ;
13840 return 0;
13841}
5e030278 13842_ACEOF
05ea2a05
TT
13843if ac_fn_cxx_try_compile "$LINENO"; then :
13844 gdb_cv_cxx_std_thread=yes
13845else
13846 gdb_cv_cxx_std_thread=no
5e030278 13847fi
05ea2a05
TT
13848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13849fi
13850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
13851$as_echo "$gdb_cv_cxx_std_thread" >&6; }
5e030278 13852
05ea2a05
TT
13853 # This check must be here, while LIBS includes any necessary
13854 # threading library.
13855 for ac_func in pthread_sigmask pthread_setname_np
13856do :
13857 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13858ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
13859if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13860 cat >>confdefs.h <<_ACEOF
13861#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13862_ACEOF
5e030278
TT
13863
13864fi
05ea2a05 13865done
5e030278 13866
5e030278 13867
05ea2a05
TT
13868 LIBS="$save_LIBS"
13869 CXXFLAGS="$save_CXXFLAGS"
13870 fi
13871 if test "$gdb_cv_cxx_std_thread" = "yes"; then
5e030278 13872
05ea2a05 13873$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
5e030278 13874
05ea2a05
TT
13875 fi
13876 ac_ext=c
13877ac_cpp='$CPP $CPPFLAGS'
13878ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13879ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13880ac_compiler_gnu=$ac_cv_c_compiler_gnu
5e030278 13881
5e030278 13882
05ea2a05
TT
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13884$as_echo_n "checking for sigsetjmp... " >&6; }
13885if ${gdb_cv_func_sigsetjmp+:} false; then :
13886 $as_echo_n "(cached) " >&6
13887else
13888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13889/* end confdefs.h. */
5e030278 13890
05ea2a05 13891 #include <setjmp.h>
5e030278 13892
05ea2a05
TT
13893int
13894main ()
13895{
13896sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13897 ;
13898 return 0;
13899}
13900_ACEOF
13901if ac_fn_c_try_compile "$LINENO"; then :
13902 gdb_cv_func_sigsetjmp=yes
13903else
13904 gdb_cv_func_sigsetjmp=no
13905fi
13906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13907fi
13908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13909$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13910 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
5e030278 13911
05ea2a05 13912$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
5e030278 13913
05ea2a05
TT
13914 fi
13915
13916
13917# Check whether --with-intel_pt was given.
13918if test "${with_intel_pt+set}" = set; then :
13919 withval=$with_intel_pt;
5e030278 13920else
05ea2a05 13921 with_intel_pt=auto
5e030278 13922fi
05ea2a05
TT
13923
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
13925$as_echo_n "checking whether to use intel pt... " >&6; }
13926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
13927$as_echo "$with_intel_pt" >&6; }
13928
13929 if test "${with_intel_pt}" = no; then
13930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
13931$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
13932 HAVE_LIBIPT=no
13933 else
13934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 13935/* end confdefs.h. */
5e030278 13936
05ea2a05
TT
13937 #include <linux/perf_event.h>
13938 #ifndef PERF_ATTR_SIZE_VER5
13939 # error
13940 #endif
5e030278 13941
05ea2a05
TT
13942_ACEOF
13943if ac_fn_c_try_cpp "$LINENO"; then :
13944 perf_event=yes
13945else
13946 perf_event=no
5e030278 13947fi
05ea2a05
TT
13948rm -f conftest.err conftest.i conftest.$ac_ext
13949 if test "$perf_event" != yes; then
13950 if test "$with_intel_pt" = yes; then
13951 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
13952 else
13953 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
13954$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
13955 fi
13956 fi
5e030278 13957
5e030278 13958
5e030278 13959
5e030278 13960
5e030278 13961
5e030278 13962
5e030278 13963
5e030278 13964
5e030278 13965
05ea2a05 13966 use_additional=yes
5e030278 13967
05ea2a05
TT
13968 acl_save_prefix="$prefix"
13969 prefix="$acl_final_prefix"
13970 acl_save_exec_prefix="$exec_prefix"
13971 exec_prefix="$acl_final_exec_prefix"
5e030278 13972
05ea2a05
TT
13973 eval additional_includedir=\"$includedir\"
13974 eval additional_libdir=\"$libdir\"
5e030278 13975
05ea2a05
TT
13976 exec_prefix="$acl_save_exec_prefix"
13977 prefix="$acl_save_prefix"
5e030278 13978
5e030278 13979
05ea2a05
TT
13980# Check whether --with-libipt-prefix was given.
13981if test "${with_libipt_prefix+set}" = set; then :
13982 withval=$with_libipt_prefix;
13983 if test "X$withval" = "Xno"; then
13984 use_additional=no
13985 else
13986 if test "X$withval" = "X"; then
5e030278 13987
05ea2a05
TT
13988 acl_save_prefix="$prefix"
13989 prefix="$acl_final_prefix"
13990 acl_save_exec_prefix="$exec_prefix"
13991 exec_prefix="$acl_final_exec_prefix"
5e030278 13992
05ea2a05
TT
13993 eval additional_includedir=\"$includedir\"
13994 eval additional_libdir=\"$libdir\"
5e030278 13995
05ea2a05
TT
13996 exec_prefix="$acl_save_exec_prefix"
13997 prefix="$acl_save_prefix"
5e030278 13998
05ea2a05
TT
13999 else
14000 additional_includedir="$withval/include"
14001 additional_libdir="$withval/lib"
14002 fi
14003 fi
5e030278
TT
14004
14005fi
5e030278 14006
05ea2a05
TT
14007 LIBIPT=
14008 LTLIBIPT=
14009 INCIPT=
14010 rpathdirs=
14011 ltrpathdirs=
14012 names_already_handled=
14013 names_next_round='ipt '
14014 while test -n "$names_next_round"; do
14015 names_this_round="$names_next_round"
14016 names_next_round=
14017 for name in $names_this_round; do
14018 already_handled=
14019 for n in $names_already_handled; do
14020 if test "$n" = "$name"; then
14021 already_handled=yes
14022 break
14023 fi
14024 done
14025 if test -z "$already_handled"; then
14026 names_already_handled="$names_already_handled $name"
14027 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14028 eval value=\"\$HAVE_LIB$uppername\"
14029 if test -n "$value"; then
14030 if test "$value" = yes; then
14031 eval value=\"\$LIB$uppername\"
14032 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14033 eval value=\"\$LTLIB$uppername\"
14034 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14035 else
14036 :
14037 fi
14038 else
14039 found_dir=
14040 found_la=
14041 found_so=
14042 found_a=
14043 if test $use_additional = yes; then
14044 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14045 found_dir="$additional_libdir"
14046 found_so="$additional_libdir/lib$name.$shlibext"
14047 if test -f "$additional_libdir/lib$name.la"; then
14048 found_la="$additional_libdir/lib$name.la"
14049 fi
14050 else
14051 if test -f "$additional_libdir/lib$name.$libext"; then
14052 found_dir="$additional_libdir"
14053 found_a="$additional_libdir/lib$name.$libext"
14054 if test -f "$additional_libdir/lib$name.la"; then
14055 found_la="$additional_libdir/lib$name.la"
14056 fi
14057 fi
14058 fi
14059 fi
14060 if test "X$found_dir" = "X"; then
14061 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14062
05ea2a05
TT
14063 acl_save_prefix="$prefix"
14064 prefix="$acl_final_prefix"
14065 acl_save_exec_prefix="$exec_prefix"
14066 exec_prefix="$acl_final_exec_prefix"
14067 eval x=\"$x\"
14068 exec_prefix="$acl_save_exec_prefix"
14069 prefix="$acl_save_prefix"
5e030278 14070
05ea2a05
TT
14071 case "$x" in
14072 -L*)
14073 dir=`echo "X$x" | sed -e 's/^X-L//'`
14074 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14075 found_dir="$dir"
14076 found_so="$dir/lib$name.$shlibext"
14077 if test -f "$dir/lib$name.la"; then
14078 found_la="$dir/lib$name.la"
14079 fi
14080 else
14081 if test -f "$dir/lib$name.$libext"; then
14082 found_dir="$dir"
14083 found_a="$dir/lib$name.$libext"
14084 if test -f "$dir/lib$name.la"; then
14085 found_la="$dir/lib$name.la"
14086 fi
14087 fi
14088 fi
14089 ;;
14090 esac
14091 if test "X$found_dir" != "X"; then
14092 break
14093 fi
14094 done
14095 fi
14096 if test "X$found_dir" != "X"; then
14097 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14098 if test "X$found_so" != "X"; then
14099 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14100 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14101 else
14102 haveit=
14103 for x in $ltrpathdirs; do
14104 if test "X$x" = "X$found_dir"; then
14105 haveit=yes
14106 break
14107 fi
14108 done
14109 if test -z "$haveit"; then
14110 ltrpathdirs="$ltrpathdirs $found_dir"
14111 fi
14112 if test "$hardcode_direct" = yes; then
14113 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14114 else
14115 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14116 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14117 haveit=
14118 for x in $rpathdirs; do
14119 if test "X$x" = "X$found_dir"; then
14120 haveit=yes
14121 break
14122 fi
14123 done
14124 if test -z "$haveit"; then
14125 rpathdirs="$rpathdirs $found_dir"
14126 fi
14127 else
14128 haveit=
14129 for x in $LDFLAGS $LIBIPT; do
5e030278 14130
05ea2a05
TT
14131 acl_save_prefix="$prefix"
14132 prefix="$acl_final_prefix"
14133 acl_save_exec_prefix="$exec_prefix"
14134 exec_prefix="$acl_final_exec_prefix"
14135 eval x=\"$x\"
14136 exec_prefix="$acl_save_exec_prefix"
14137 prefix="$acl_save_prefix"
5e030278 14138
05ea2a05
TT
14139 if test "X$x" = "X-L$found_dir"; then
14140 haveit=yes
14141 break
14142 fi
14143 done
14144 if test -z "$haveit"; then
14145 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14146 fi
14147 if test "$hardcode_minus_L" != no; then
14148 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14149 else
14150 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14151 fi
14152 fi
14153 fi
14154 fi
14155 else
14156 if test "X$found_a" != "X"; then
14157 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14158 else
14159 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14160 fi
14161 fi
14162 additional_includedir=
14163 case "$found_dir" in
14164 */lib | */lib/)
14165 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14166 additional_includedir="$basedir/include"
14167 ;;
14168 esac
14169 if test "X$additional_includedir" != "X"; then
14170 if test "X$additional_includedir" != "X/usr/include"; then
14171 haveit=
14172 if test "X$additional_includedir" = "X/usr/local/include"; then
14173 if test -n "$GCC"; then
14174 case $host_os in
14175 linux*) haveit=yes;;
14176 esac
14177 fi
14178 fi
14179 if test -z "$haveit"; then
14180 for x in $CPPFLAGS $INCIPT; do
5e030278 14181
05ea2a05
TT
14182 acl_save_prefix="$prefix"
14183 prefix="$acl_final_prefix"
14184 acl_save_exec_prefix="$exec_prefix"
14185 exec_prefix="$acl_final_exec_prefix"
14186 eval x=\"$x\"
14187 exec_prefix="$acl_save_exec_prefix"
14188 prefix="$acl_save_prefix"
5e030278 14189
05ea2a05
TT
14190 if test "X$x" = "X-I$additional_includedir"; then
14191 haveit=yes
14192 break
14193 fi
14194 done
14195 if test -z "$haveit"; then
14196 if test -d "$additional_includedir"; then
14197 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14198 fi
14199 fi
14200 fi
14201 fi
14202 fi
14203 if test -n "$found_la"; then
14204 save_libdir="$libdir"
14205 case "$found_la" in
14206 */* | *\\*) . "$found_la" ;;
14207 *) . "./$found_la" ;;
14208 esac
14209 libdir="$save_libdir"
14210 for dep in $dependency_libs; do
14211 case "$dep" in
14212 -L*)
14213 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14214 if test "X$additional_libdir" != "X/usr/lib"; then
14215 haveit=
14216 if test "X$additional_libdir" = "X/usr/local/lib"; then
14217 if test -n "$GCC"; then
14218 case $host_os in
14219 linux*) haveit=yes;;
14220 esac
14221 fi
14222 fi
14223 if test -z "$haveit"; then
14224 haveit=
14225 for x in $LDFLAGS $LIBIPT; do
5e030278 14226
05ea2a05
TT
14227 acl_save_prefix="$prefix"
14228 prefix="$acl_final_prefix"
14229 acl_save_exec_prefix="$exec_prefix"
14230 exec_prefix="$acl_final_exec_prefix"
14231 eval x=\"$x\"
14232 exec_prefix="$acl_save_exec_prefix"
14233 prefix="$acl_save_prefix"
5e030278 14234
05ea2a05
TT
14235 if test "X$x" = "X-L$additional_libdir"; then
14236 haveit=yes
14237 break
14238 fi
14239 done
14240 if test -z "$haveit"; then
14241 if test -d "$additional_libdir"; then
14242 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14243 fi
14244 fi
14245 haveit=
14246 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14247
05ea2a05
TT
14248 acl_save_prefix="$prefix"
14249 prefix="$acl_final_prefix"
14250 acl_save_exec_prefix="$exec_prefix"
14251 exec_prefix="$acl_final_exec_prefix"
14252 eval x=\"$x\"
14253 exec_prefix="$acl_save_exec_prefix"
14254 prefix="$acl_save_prefix"
5e030278 14255
05ea2a05
TT
14256 if test "X$x" = "X-L$additional_libdir"; then
14257 haveit=yes
14258 break
14259 fi
14260 done
14261 if test -z "$haveit"; then
14262 if test -d "$additional_libdir"; then
14263 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14264 fi
14265 fi
14266 fi
14267 fi
14268 ;;
14269 -R*)
14270 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14271 if test "$enable_rpath" != no; then
14272 haveit=
14273 for x in $rpathdirs; do
14274 if test "X$x" = "X$dir"; then
14275 haveit=yes
14276 break
14277 fi
14278 done
14279 if test -z "$haveit"; then
14280 rpathdirs="$rpathdirs $dir"
14281 fi
14282 haveit=
14283 for x in $ltrpathdirs; do
14284 if test "X$x" = "X$dir"; then
14285 haveit=yes
14286 break
14287 fi
14288 done
14289 if test -z "$haveit"; then
14290 ltrpathdirs="$ltrpathdirs $dir"
14291 fi
14292 fi
14293 ;;
14294 -l*)
14295 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14296 ;;
14297 *.la)
14298 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14299 ;;
14300 *)
14301 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14302 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14303 ;;
14304 esac
14305 done
14306 fi
14307 else
14308 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14309 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14310 fi
5e030278 14311 fi
05ea2a05
TT
14312 fi
14313 done
14314 done
14315 if test "X$rpathdirs" != "X"; then
14316 if test -n "$hardcode_libdir_separator"; then
14317 alldirs=
14318 for found_dir in $rpathdirs; do
14319 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14320 done
14321 acl_save_libdir="$libdir"
14322 libdir="$alldirs"
14323 eval flag=\"$hardcode_libdir_flag_spec\"
14324 libdir="$acl_save_libdir"
14325 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14326 else
14327 for found_dir in $rpathdirs; do
14328 acl_save_libdir="$libdir"
14329 libdir="$found_dir"
14330 eval flag=\"$hardcode_libdir_flag_spec\"
14331 libdir="$acl_save_libdir"
14332 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14333 done
14334 fi
14335 fi
14336 if test "X$ltrpathdirs" != "X"; then
14337 for found_dir in $ltrpathdirs; do
14338 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14339 done
14340 fi
5e030278
TT
14341
14342
05ea2a05 14343 ac_save_CPPFLAGS="$CPPFLAGS"
5e030278 14344
05ea2a05
TT
14345 for element in $INCIPT; do
14346 haveit=
14347 for x in $CPPFLAGS; do
5e030278 14348
05ea2a05
TT
14349 acl_save_prefix="$prefix"
14350 prefix="$acl_final_prefix"
14351 acl_save_exec_prefix="$exec_prefix"
14352 exec_prefix="$acl_final_exec_prefix"
14353 eval x=\"$x\"
14354 exec_prefix="$acl_save_exec_prefix"
14355 prefix="$acl_save_prefix"
5e030278 14356
05ea2a05
TT
14357 if test "X$x" = "X$element"; then
14358 haveit=yes
14359 break
14360 fi
14361 done
14362 if test -z "$haveit"; then
14363 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14364 fi
14365 done
5e030278
TT
14366
14367
05ea2a05
TT
14368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14369$as_echo_n "checking for libipt... " >&6; }
14370if ${ac_cv_libipt+:} false; then :
5e030278
TT
14371 $as_echo_n "(cached) " >&6
14372else
05ea2a05
TT
14373
14374 ac_save_LIBS="$LIBS"
14375 LIBS="$LIBS $LIBIPT"
14376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14377/* end confdefs.h. */
05ea2a05 14378#include "intel-pt.h"
5e030278
TT
14379int
14380main ()
14381{
05ea2a05 14382pt_insn_alloc_decoder (0);
5e030278
TT
14383 ;
14384 return 0;
14385}
14386_ACEOF
05ea2a05
TT
14387if ac_fn_c_try_link "$LINENO"; then :
14388 ac_cv_libipt=yes
5e030278 14389else
05ea2a05 14390 ac_cv_libipt=no
5e030278 14391fi
05ea2a05
TT
14392rm -f core conftest.err conftest.$ac_objext \
14393 conftest$ac_exeext conftest.$ac_ext
14394 LIBS="$ac_save_LIBS"
14395
5e030278 14396fi
05ea2a05
TT
14397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14398$as_echo "$ac_cv_libipt" >&6; }
14399 if test "$ac_cv_libipt" = yes; then
14400 HAVE_LIBIPT=yes
21987b9c 14401
05ea2a05
TT
14402$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14403
14404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14405$as_echo_n "checking how to link with libipt... " >&6; }
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14407$as_echo "$LIBIPT" >&6; }
14408 else
14409 HAVE_LIBIPT=no
14410 CPPFLAGS="$ac_save_CPPFLAGS"
14411 LIBIPT=
14412 LTLIBIPT=
14413 fi
14414
14415
14416
14417
14418
14419
14420 if test "$HAVE_LIBIPT" != yes; then
14421 if test "$with_intel_pt" = yes; then
14422 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14423 else
14424 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14425$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14426 fi
14427 else
14428 save_LIBS=$LIBS
14429 LIBS="$LIBS $LIBIPT"
14430 for ac_func in pt_insn_event
21987b9c 14431do :
05ea2a05
TT
14432 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14433if test "x$ac_cv_func_pt_insn_event" = xyes; then :
21987b9c 14434 cat >>confdefs.h <<_ACEOF
05ea2a05 14435#define HAVE_PT_INSN_EVENT 1
21987b9c
TT
14436_ACEOF
14437
14438fi
14439done
14440
05ea2a05
TT
14441 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14442"
14443if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
21987b9c 14444
05ea2a05
TT
14445cat >>confdefs.h <<_ACEOF
14446#define HAVE_STRUCT_PT_INSN_ENABLED 1
14447_ACEOF
5e030278 14448
5e030278 14449
05ea2a05
TT
14450fi
14451ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14452"
14453if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14454
14455cat >>confdefs.h <<_ACEOF
14456#define HAVE_STRUCT_PT_INSN_RESYNCED 1
14457_ACEOF
5e030278
TT
14458
14459
05ea2a05
TT
14460fi
14461
14462 LIBS=$save_LIBS
14463 fi
14464 fi
14465
14466 if test "$ac_cv_header_sys_procfs_h" = yes; then
14467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14468$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14469 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
e9bcb658
GB
14470 $as_echo_n "(cached) " >&6
14471else
14472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14473/* end confdefs.h. */
14474
05ea2a05
TT
14475#define _SYSCALL32
14476/* Needed for new procfs interface on sparc-solaris. */
14477#define _STRUCTURED_PROC 1
14478#include <sys/procfs.h>
e9bcb658
GB
14479int
14480main ()
14481{
05ea2a05 14482gregset_t avar
e9bcb658
GB
14483 ;
14484 return 0;
14485}
14486_ACEOF
14487if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14488 bfd_cv_have_sys_procfs_type_gregset_t=yes
e9bcb658 14489else
05ea2a05 14490 bfd_cv_have_sys_procfs_type_gregset_t=no
54019719
PA
14491
14492fi
05ea2a05 14493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 14494fi
06825bd1 14495
05ea2a05 14496 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
a3828db0 14497
05ea2a05 14498$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
06825bd1 14499
05ea2a05
TT
14500 fi
14501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14502$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14503
14504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14505$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14506 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14507 $as_echo_n "(cached) " >&6
bec39cab 14508else
81ecdfbb 14509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14510/* end confdefs.h. */
05ea2a05
TT
14511
14512#define _SYSCALL32
14513/* Needed for new procfs interface on sparc-solaris. */
14514#define _STRUCTURED_PROC 1
14515#include <sys/procfs.h>
bec39cab
AC
14516int
14517main ()
14518{
05ea2a05 14519fpregset_t avar
064ef605
DJ
14520 ;
14521 return 0;
14522}
14523_ACEOF
9b30624b 14524if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
14525 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14526else
14527 bfd_cv_have_sys_procfs_type_fpregset_t=no
14528
14529fi
14530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14531fi
14532
14533 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14534
14535$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14536
14537 fi
14538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14539$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14540
14541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14542$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14543 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14544 $as_echo_n "(cached) " >&6
064ef605 14545else
81ecdfbb 14546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 14547/* end confdefs.h. */
05ea2a05
TT
14548
14549#define _SYSCALL32
14550/* Needed for new procfs interface on sparc-solaris. */
14551#define _STRUCTURED_PROC 1
14552#include <sys/procfs.h>
064ef605
DJ
14553int
14554main ()
14555{
05ea2a05 14556prgregset_t avar
bec39cab
AC
14557 ;
14558 return 0;
14559}
14560_ACEOF
9b30624b 14561if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14562 bfd_cv_have_sys_procfs_type_prgregset_t=yes
70f9f479 14563else
05ea2a05
TT
14564 bfd_cv_have_sys_procfs_type_prgregset_t=no
14565
70f9f479 14566fi
81ecdfbb 14567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 14568fi
bec39cab 14569
05ea2a05 14570 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
70f9f479 14571
05ea2a05
TT
14572$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14573
14574 fi
14575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14576$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14577
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14579$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14580 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14581 $as_echo_n "(cached) " >&6
bec39cab 14582else
81ecdfbb 14583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 14584/* end confdefs.h. */
05ea2a05
TT
14585
14586#define _SYSCALL32
14587/* Needed for new procfs interface on sparc-solaris. */
14588#define _STRUCTURED_PROC 1
14589#include <sys/procfs.h>
064ef605
DJ
14590int
14591main ()
14592{
05ea2a05 14593prfpregset_t avar
064ef605
DJ
14594 ;
14595 return 0;
14596}
14597_ACEOF
9b30624b 14598if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14599 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
064ef605 14600else
05ea2a05 14601 bfd_cv_have_sys_procfs_type_prfpregset_t=no
064ef605 14602
5c7f2947 14603fi
81ecdfbb 14604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
05ea2a05
TT
14605fi
14606
14607 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14608
14609$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14610
14611 fi
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14613$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14614
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14616$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14617 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14618 $as_echo_n "(cached) " >&6
14619else
14620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14621/* end confdefs.h. */
05ea2a05
TT
14622
14623#define _SYSCALL32
14624/* Needed for new procfs interface on sparc-solaris. */
14625#define _STRUCTURED_PROC 1
14626#include <sys/procfs.h>
bec39cab
AC
14627int
14628main ()
14629{
05ea2a05 14630prgregset32_t avar
bec39cab
AC
14631 ;
14632 return 0;
14633}
14634_ACEOF
9b30624b 14635if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
14636 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14637else
14638 bfd_cv_have_sys_procfs_type_prgregset32_t=no
a3828db0 14639
064ef605 14640fi
81ecdfbb 14641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 14642fi
96d7229d 14643
05ea2a05 14644 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
78434e59 14645
05ea2a05 14646$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
78434e59 14647
05ea2a05
TT
14648 fi
14649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14650$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
54019719 14651
05ea2a05
TT
14652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14653$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14654 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14655 $as_echo_n "(cached) " >&6
bec39cab 14656else
81ecdfbb 14657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14658/* end confdefs.h. */
05ea2a05
TT
14659
14660#define _SYSCALL32
14661/* Needed for new procfs interface on sparc-solaris. */
14662#define _STRUCTURED_PROC 1
14663#include <sys/procfs.h>
bec39cab
AC
14664int
14665main ()
14666{
05ea2a05 14667lwpid_t avar
bec39cab
AC
14668 ;
14669 return 0;
14670}
14671_ACEOF
05ea2a05
TT
14672if ac_fn_c_try_compile "$LINENO"; then :
14673 bfd_cv_have_sys_procfs_type_lwpid_t=yes
c906108c 14674else
05ea2a05
TT
14675 bfd_cv_have_sys_procfs_type_lwpid_t=no
14676
c906108c 14677fi
05ea2a05 14678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14679fi
81ecdfbb 14680
05ea2a05 14681 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
a3828db0 14682
05ea2a05 14683$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
97bf5e38 14684
05ea2a05
TT
14685 fi
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14687$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
a3828db0 14688
05ea2a05
TT
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14690$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14691 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14692 $as_echo_n "(cached) " >&6
97bf5e38 14693else
81ecdfbb 14694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14695/* end confdefs.h. */
a3828db0 14696
05ea2a05
TT
14697#define _SYSCALL32
14698/* Needed for new procfs interface on sparc-solaris. */
14699#define _STRUCTURED_PROC 1
14700#include <sys/procfs.h>
bec39cab
AC
14701int
14702main ()
14703{
05ea2a05 14704psaddr_t avar
bec39cab
AC
14705 ;
14706 return 0;
14707}
14708_ACEOF
81ecdfbb 14709if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14710 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14711else
05ea2a05
TT
14712 bfd_cv_have_sys_procfs_type_psaddr_t=no
14713
c906108c 14714fi
81ecdfbb 14715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14716fi
c3f6f71d 14717
05ea2a05 14718 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
c906108c 14719
05ea2a05 14720$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
db1ff28b 14721
05ea2a05
TT
14722 fi
14723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14724$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14725
14726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14727$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14728 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
db1ff28b
JK
14729 $as_echo_n "(cached) " >&6
14730else
14731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14732/* end confdefs.h. */
05ea2a05
TT
14733
14734#define _SYSCALL32
14735/* Needed for new procfs interface on sparc-solaris. */
14736#define _STRUCTURED_PROC 1
14737#include <sys/procfs.h>
db1ff28b
JK
14738int
14739main ()
14740{
05ea2a05 14741elf_fpregset_t avar
db1ff28b
JK
14742 ;
14743 return 0;
14744}
14745_ACEOF
14746if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14747 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
db1ff28b 14748else
05ea2a05
TT
14749 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14750
db1ff28b
JK
14751fi
14752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14753fi
db1ff28b 14754
05ea2a05 14755 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
db1ff28b 14756
05ea2a05 14757$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
db1ff28b 14758
05ea2a05
TT
14759 fi
14760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14761$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
db1ff28b 14762
05ea2a05
TT
14763 fi
14764
14765
14766# Check the return and argument types of ptrace.
14767
14768
14769for ac_header in sys/ptrace.h ptrace.h
14770do :
14771 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14772ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14773if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14774 cat >>confdefs.h <<_ACEOF
14775#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14776_ACEOF
db1ff28b
JK
14777
14778fi
14779
05ea2a05
TT
14780done
14781
81ecdfbb 14782
05ea2a05
TT
14783gdb_ptrace_headers='
14784#include <sys/types.h>
14785#if HAVE_SYS_PTRACE_H
14786# include <sys/ptrace.h>
14787#endif
14788#if HAVE_UNISTD_H
14789# include <unistd.h>
14790#endif
14791'
14792# There is no point in checking if we don't have a prototype.
14793ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 14794"
05ea2a05
TT
14795if test "x$ac_cv_have_decl_ptrace" = xyes; then :
14796 ac_have_decl=1
14797else
14798 ac_have_decl=0
14799fi
c906108c 14800
5c45e068 14801cat >>confdefs.h <<_ACEOF
05ea2a05 14802#define HAVE_DECL_PTRACE $ac_have_decl
bec39cab 14803_ACEOF
05ea2a05 14804if test $ac_have_decl = 1; then :
c906108c 14805
05ea2a05 14806else
5c45e068 14807
05ea2a05
TT
14808 : ${gdb_cv_func_ptrace_ret='int'}
14809 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
c906108c 14810
05ea2a05 14811fi
5c45e068 14812
05ea2a05
TT
14813# Check return type. Varargs (used on GNU/Linux) conflict with the
14814# empty argument list, so check for that explicitly.
14815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
14816$as_echo_n "checking return type of ptrace... " >&6; }
14817if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 14818 $as_echo_n "(cached) " >&6
bec39cab 14819else
81ecdfbb 14820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14821/* end confdefs.h. */
05ea2a05 14822$gdb_ptrace_headers
bec39cab
AC
14823int
14824main ()
14825{
05ea2a05 14826extern long ptrace (enum __ptrace_request, ...);
bec39cab
AC
14827 ;
14828 return 0;
14829}
14830_ACEOF
81ecdfbb 14831if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14832 gdb_cv_func_ptrace_ret='long'
bec39cab 14833else
81ecdfbb 14834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14835/* end confdefs.h. */
05ea2a05 14836$gdb_ptrace_headers
bec39cab
AC
14837int
14838main ()
14839{
05ea2a05 14840extern int ptrace ();
bec39cab
AC
14841 ;
14842 return 0;
14843}
14844_ACEOF
81ecdfbb 14845if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14846 gdb_cv_func_ptrace_ret='int'
27ca5dad 14847else
05ea2a05 14848 gdb_cv_func_ptrace_ret='long'
27ca5dad 14849fi
81ecdfbb 14850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14851fi
05ea2a05 14852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14853fi
05ea2a05
TT
14854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
14855$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
5c45e068
MK
14856
14857cat >>confdefs.h <<_ACEOF
05ea2a05 14858#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 14859_ACEOF
3862412b 14860
05ea2a05
TT
14861# Check argument types.
14862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
14863$as_echo_n "checking types of arguments for ptrace... " >&6; }
14864if ${gdb_cv_func_ptrace_args+:} false; then :
14865 $as_echo_n "(cached) " >&6
14866else
5c45e068 14867
05ea2a05
TT
14868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14869/* end confdefs.h. */
14870$gdb_ptrace_headers
14871int
14872main ()
14873{
14874extern long ptrace (enum __ptrace_request, ...);
14875 ;
14876 return 0;
14877}
bec39cab 14878_ACEOF
05ea2a05
TT
14879if ac_fn_c_try_compile "$LINENO"; then :
14880 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
14881else
14882
14883for gdb_arg1 in 'int' 'long'; do
14884 for gdb_arg2 in 'pid_t' 'int' 'long'; do
14885 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
14886 for gdb_arg4 in 'int' 'long' 'void *'; do
14887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14888/* end confdefs.h. */
14889$gdb_ptrace_headers
14890int
14891main ()
14892{
3862412b 14893
05ea2a05
TT
14894extern $gdb_cv_func_ptrace_ret
14895 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
5c45e068 14896
05ea2a05
TT
14897 ;
14898 return 0;
14899}
14900_ACEOF
14901if ac_fn_c_try_compile "$LINENO"; then :
14902 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
14903 break 4;
97bf5e38 14904fi
05ea2a05
TT
14905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14906 for gdb_arg5 in 'int *' 'int' 'long'; do
14907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14908/* end confdefs.h. */
14909$gdb_ptrace_headers
14910int
14911main ()
14912{
3862412b 14913
05ea2a05
TT
14914extern $gdb_cv_func_ptrace_ret
14915 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
5c45e068 14916
05ea2a05
TT
14917 ;
14918 return 0;
14919}
6fea9e18 14920_ACEOF
05ea2a05 14921if ac_fn_c_try_compile "$LINENO"; then :
6fea9e18 14922
05ea2a05
TT
14923gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
14924 break 5;
14925fi
14926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14927 done
14928 done
14929 done
14930 done
14931done
14932# Provide a safe default value.
14933: ${gdb_cv_func_ptrace_args='int,int,long,long'}
6fea9e18
L
14934
14935fi
05ea2a05
TT
14936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14937fi
14938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
14939$as_echo "$gdb_cv_func_ptrace_args" >&6; }
14940ac_save_IFS=$IFS; IFS=','
14941set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
14942IFS=$ac_save_IFS
14943shift
6fea9e18
L
14944
14945cat >>confdefs.h <<_ACEOF
05ea2a05 14946#define PTRACE_TYPE_ARG1 $1
6fea9e18
L
14947_ACEOF
14948
14949
05ea2a05
TT
14950cat >>confdefs.h <<_ACEOF
14951#define PTRACE_TYPE_ARG3 $3
bec39cab 14952_ACEOF
451928c5 14953
60ca704f 14954
05ea2a05
TT
14955cat >>confdefs.h <<_ACEOF
14956#define PTRACE_TYPE_ARG4 $4
14957_ACEOF
14958
14959if test -n "$5"; then
14960
14961cat >>confdefs.h <<_ACEOF
14962#define PTRACE_TYPE_ARG5 $5
14963_ACEOF
451928c5 14964
97bf5e38 14965fi
451928c5 14966
05ea2a05
TT
14967
14968if test "$cross_compiling" = no; then
14969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14970$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
14971if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14972 $as_echo_n "(cached) " >&6
05ea2a05
TT
14973else
14974 if test "$cross_compiling" = yes; then :
14975 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
451928c5 14976else
81ecdfbb 14977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14978/* end confdefs.h. */
05ea2a05 14979$ac_includes_default
bec39cab
AC
14980int
14981main ()
14982{
05ea2a05
TT
14983/* If this system has a BSD-style setpgrp which takes arguments,
14984 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14985 exit successfully. */
14986 return setpgrp (1,1) != -1;
bec39cab
AC
14987 ;
14988 return 0;
14989}
14990_ACEOF
05ea2a05
TT
14991if ac_fn_c_try_run "$LINENO"; then :
14992 ac_cv_func_setpgrp_void=no
451928c5 14993else
05ea2a05 14994 ac_cv_func_setpgrp_void=yes
451928c5 14995fi
05ea2a05
TT
14996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14997 conftest.$ac_objext conftest.beam conftest.$ac_ext
451928c5
AC
14998fi
14999
05ea2a05
TT
15000fi
15001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15002$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15003if test $ac_cv_func_setpgrp_void = yes; then
60ca704f 15004
05ea2a05 15005$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
451928c5 15006
97bf5e38 15007fi
451928c5 15008
05ea2a05
TT
15009else
15010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15011$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15012if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15013 $as_echo_n "(cached) " >&6
3862412b 15014else
81ecdfbb 15015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15016/* end confdefs.h. */
05ea2a05
TT
15017
15018#include <unistd.h>
15019
bec39cab
AC
15020int
15021main ()
15022{
05ea2a05
TT
15023
15024 if (setpgrp(1,1) == -1)
15025 exit (0);
15026 else
15027 exit (1);
15028
bec39cab
AC
15029 ;
15030 return 0;
15031}
15032_ACEOF
81ecdfbb 15033if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15034 ac_cv_func_setpgrp_void=no
3862412b 15035else
05ea2a05 15036 ac_cv_func_setpgrp_void=yes
3862412b 15037fi
81ecdfbb 15038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 15039fi
05ea2a05
TT
15040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15041$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15042if test "$ac_cv_func_setpgrp_void" = yes; then
15043 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
3862412b 15044
05ea2a05 15045fi
97bf5e38 15046fi
3862412b 15047
05ea2a05
TT
15048# Assume we'll default to using the included libiberty regex.
15049gdb_use_included_regex=yes
15050
15051# However, if the system regex is GNU regex, then default to *not*
15052# using the included regex.
15053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15054$as_echo_n "checking for GNU regex... " >&6; }
15055if ${gdb_cv_have_gnu_regex+:} false; then :
81ecdfbb 15056 $as_echo_n "(cached) " >&6
3862412b 15057else
81ecdfbb 15058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15059/* end confdefs.h. */
05ea2a05 15060#include <gnu-versions.h>
bec39cab
AC
15061int
15062main ()
15063{
05ea2a05
TT
15064#define REGEX_INTERFACE_VERSION 1
15065#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15066# error "Version mismatch"
15067#endif
bec39cab
AC
15068 ;
15069 return 0;
15070}
15071_ACEOF
81ecdfbb 15072if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15073 gdb_cv_have_gnu_regex=yes
3862412b 15074else
05ea2a05 15075 gdb_cv_have_gnu_regex=no
3862412b 15076fi
81ecdfbb 15077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 15078fi
05ea2a05
TT
15079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15080$as_echo "$gdb_cv_have_gnu_regex" >&6; }
15081if test "$gdb_cv_have_gnu_regex" = yes; then
15082 gdb_use_included_regex=no
15083fi
3862412b 15084
3862412b 15085
05ea2a05
TT
15086# Check whether --with-included-regex was given.
15087if test "${with_included_regex+set}" = set; then :
15088 withval=$with_included_regex; gdb_with_regex=$withval
15089else
15090 gdb_with_regex=$gdb_use_included_regex
97bf5e38 15091fi
3862412b 15092
05ea2a05 15093if test "$gdb_with_regex" = yes; then
6e9567fe 15094
05ea2a05 15095$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
6e9567fe
JB
15096
15097fi
15098
05ea2a05
TT
15099# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15100ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15101#include <sys/proc.h>
6e9567fe 15102
e6cdd38e 15103"
05ea2a05 15104if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
e6cdd38e
JB
15105
15106cat >>confdefs.h <<_ACEOF
05ea2a05 15107#define HAVE_STRUCT_THREAD_TD_PCB 1
e6cdd38e
JB
15108_ACEOF
15109
15110
15111fi
15112
6e9567fe 15113
05ea2a05
TT
15114# See if <sys/lwp.h> defines `struct lwp`.
15115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15116$as_echo_n "checking for struct lwp... " >&6; }
15117if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 15118 $as_echo_n "(cached) " >&6
596c9d4b 15119else
81ecdfbb 15120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15121/* end confdefs.h. */
05ea2a05
TT
15122#include <sys/param.h>
15123#define _KMEMUSER
15124#include <sys/lwp.h>
bec39cab
AC
15125int
15126main ()
15127{
05ea2a05 15128struct lwp l;
bec39cab
AC
15129 ;
15130 return 0;
15131}
15132_ACEOF
81ecdfbb 15133if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15134 gdb_cv_struct_lwp=yes
596c9d4b 15135else
05ea2a05 15136 gdb_cv_struct_lwp=no
596c9d4b 15137fi
81ecdfbb 15138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b 15139fi
05ea2a05
TT
15140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15141$as_echo "$gdb_cv_struct_lwp" >&6; }
15142if test "$gdb_cv_struct_lwp" = yes; then
596c9d4b 15143
05ea2a05 15144$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
596c9d4b 15145
05ea2a05 15146fi
451928c5 15147
05ea2a05
TT
15148# See if <machine/reg.h> degines `struct reg'.
15149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15150$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15151if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 15152 $as_echo_n "(cached) " >&6
d84dd0c5 15153else
81ecdfbb 15154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15155/* end confdefs.h. */
05ea2a05
TT
15156#include <sys/types.h>
15157#include <machine/reg.h>
bec39cab
AC
15158int
15159main ()
15160{
05ea2a05 15161struct reg r;
bec39cab
AC
15162 ;
15163 return 0;
15164}
15165_ACEOF
81ecdfbb 15166if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15167 gdb_cv_struct_reg=yes
d84dd0c5 15168else
05ea2a05 15169 gdb_cv_struct_reg=no
d84dd0c5 15170fi
81ecdfbb 15171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5 15172fi
05ea2a05
TT
15173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15174$as_echo "$gdb_cv_struct_reg" >&6; }
15175if test "$gdb_cv_struct_reg" = yes; then
d84dd0c5 15176
05ea2a05 15177$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
bec39cab 15178
05ea2a05 15179fi
d84dd0c5 15180
05ea2a05
TT
15181# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15182# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15183ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15184#include <machine/reg.h>
15185"
15186if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
d84dd0c5 15187
05ea2a05
TT
15188cat >>confdefs.h <<_ACEOF
15189#define HAVE_STRUCT_REG_R_FS 1
15190_ACEOF
15191
15192
15193fi
15194ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15195#include <machine/reg.h>
15196"
15197if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15198
15199cat >>confdefs.h <<_ACEOF
15200#define HAVE_STRUCT_REG_R_GS 1
15201_ACEOF
15202
15203
15204fi
15205
15206
15207# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
15208# Older amd64 Linux's don't have the fs_base and gs_base members of
15209# `struct user_regs_struct'.
15210ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
15211#include <sys/user.h>
15212"
15213if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
c906108c 15214
05ea2a05
TT
15215cat >>confdefs.h <<_ACEOF
15216#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
bec39cab 15217_ACEOF
05ea2a05 15218
bec39cab 15219
c906108c 15220fi
05ea2a05
TT
15221ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
15222#include <sys/user.h>
15223"
15224if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
c906108c 15225
05ea2a05
TT
15226cat >>confdefs.h <<_ACEOF
15227#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
15228_ACEOF
bec39cab 15229
c906108c 15230
05ea2a05 15231fi
c906108c 15232
05ea2a05
TT
15233
15234# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15236$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15237if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 15238 $as_echo_n "(cached) " >&6
d45fe813 15239else
81ecdfbb 15240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15241/* end confdefs.h. */
05ea2a05 15242#include <sys/ptrace.h>
bec39cab
AC
15243int
15244main ()
15245{
05ea2a05 15246PTRACE_GETREGS;
bec39cab
AC
15247 ;
15248 return 0;
15249}
15250_ACEOF
81ecdfbb 15251if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15252 gdb_cv_have_ptrace_getregs=yes
d45fe813 15253else
05ea2a05 15254 gdb_cv_have_ptrace_getregs=no
d45fe813 15255fi
81ecdfbb 15256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15257fi
15258
05ea2a05
TT
15259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15260$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15261if test "$gdb_cv_have_ptrace_getregs" = yes; then
bec39cab 15262
05ea2a05 15263$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
d45fe813 15264
05ea2a05 15265fi
d45fe813 15266
05ea2a05
TT
15267# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15269$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15270if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 15271 $as_echo_n "(cached) " >&6
d45fe813 15272else
81ecdfbb 15273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15274/* end confdefs.h. */
05ea2a05 15275#include <sys/ptrace.h>
bec39cab
AC
15276int
15277main ()
15278{
05ea2a05 15279PTRACE_GETFPXREGS;
bec39cab
AC
15280 ;
15281 return 0;
15282}
15283_ACEOF
81ecdfbb 15284if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15285 gdb_cv_have_ptrace_getfpxregs=yes
d45fe813 15286else
05ea2a05 15287 gdb_cv_have_ptrace_getfpxregs=no
d45fe813 15288fi
81ecdfbb 15289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15290fi
15291
05ea2a05
TT
15292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15293$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15294if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
bec39cab 15295
05ea2a05 15296$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
d45fe813 15297
05ea2a05 15298fi
d45fe813 15299
05ea2a05
TT
15300# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15302$as_echo_n "checking for PT_GETDBREGS... " >&6; }
15303if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 15304 $as_echo_n "(cached) " >&6
d45fe813 15305else
81ecdfbb 15306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15307/* end confdefs.h. */
05ea2a05
TT
15308#include <sys/types.h>
15309#include <sys/ptrace.h>
bec39cab
AC
15310int
15311main ()
15312{
05ea2a05 15313PT_GETDBREGS;
bec39cab
AC
15314 ;
15315 return 0;
15316}
15317_ACEOF
81ecdfbb 15318if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15319 gdb_cv_have_pt_getdbregs=yes
d45fe813 15320else
05ea2a05 15321 gdb_cv_have_pt_getdbregs=no
d45fe813 15322fi
81ecdfbb 15323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15324fi
15325
05ea2a05
TT
15326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15327$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15328if test "$gdb_cv_have_pt_getdbregs" = yes; then
bec39cab 15329
05ea2a05 15330$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
d45fe813 15331
05ea2a05 15332fi
c906108c 15333
05ea2a05
TT
15334# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15336$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15337if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 15338 $as_echo_n "(cached) " >&6
c906108c 15339else
81ecdfbb 15340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15341/* end confdefs.h. */
05ea2a05
TT
15342#include <sys/types.h>
15343#include <sys/ptrace.h>
bec39cab
AC
15344int
15345main ()
15346{
05ea2a05 15347PT_GETXMMREGS;
bec39cab
AC
15348 ;
15349 return 0;
15350}
15351_ACEOF
81ecdfbb 15352if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15353 gdb_cv_have_pt_getxmmregs=yes
c906108c 15354else
05ea2a05 15355 gdb_cv_have_pt_getxmmregs=no
c906108c 15356fi
81ecdfbb 15357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15358fi
15359
05ea2a05
TT
15360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15361$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15362if test "$gdb_cv_have_pt_getxmmregs" = yes; then
bec39cab 15363
05ea2a05 15364$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
c906108c 15365
05ea2a05 15366fi
c906108c 15367
05ea2a05
TT
15368# See if <sys/ptrace.h> supports LWP names on FreeBSD
15369# Older FreeBSD versions don't have the pl_tdname member of
15370# `struct ptrace_lwpinfo'.
15371ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15372"
15373if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
43b7e92b 15374
05ea2a05
TT
15375cat >>confdefs.h <<_ACEOF
15376#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
43b7e92b 15377_ACEOF
43b7e92b 15378
05ea2a05 15379
43b7e92b
GB
15380fi
15381
43b7e92b 15382
05ea2a05
TT
15383# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15384# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15385# FreeBSD 10.3.
15386ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
15387"
15388if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15389
15390cat >>confdefs.h <<_ACEOF
15391#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15392_ACEOF
43b7e92b 15393
43b7e92b 15394
c906108c 15395fi
c906108c 15396
05ea2a05 15397
bc8bcb4b 15398# Check if the compiler supports the `long long' type.
c906108c 15399
81ecdfbb
RW
15400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15401$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 15402if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 15403 $as_echo_n "(cached) " >&6
97bf5e38 15404else
81ecdfbb 15405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15406/* end confdefs.h. */
bc8bcb4b 15407extern long long foo;
bec39cab
AC
15408int
15409main ()
15410{
bc8bcb4b 15411switch (foo & 2) { case 0: return 1; }
bec39cab
AC
15412 ;
15413 return 0;
15414}
15415_ACEOF
81ecdfbb 15416if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15417 gdb_cv_c_long_long=yes
15418else
81ecdfbb 15419 gdb_cv_c_long_long=no
97bf5e38 15420fi
81ecdfbb 15421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15422fi
81ecdfbb
RW
15423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15424$as_echo "$gdb_cv_c_long_long" >&6; }
0ad6b8ee 15425if test "$gdb_cv_c_long_long" != yes; then
74a0d9f6 15426 # libdecnumber requires long long.
d0ac1c44 15427 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
15428fi
15429
bc8bcb4b 15430# Check if the compiler and runtime support printing long longs.
97bf5e38 15431
81ecdfbb
RW
15432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15433$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 15434if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 15435 $as_echo_n "(cached) " >&6
97bf5e38 15436else
81ecdfbb 15437 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15438 gdb_cv_printf_has_long_long=no
15439else
81ecdfbb 15440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15441/* end confdefs.h. */
bc8bcb4b
MK
15442$ac_includes_default
15443int
15444main ()
15445{
15446char buf[32];
97bf5e38
MK
15447 long long l = 0;
15448 l = (l << 16) + 0x0123;
15449 l = (l << 16) + 0x4567;
15450 l = (l << 16) + 0x89ab;
15451 l = (l << 16) + 0xcdef;
15452 sprintf (buf, "0x%016llx", l);
15453 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
15454 ;
15455 return 0;
c906108c 15456}
bec39cab 15457_ACEOF
81ecdfbb 15458if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15459 gdb_cv_printf_has_long_long=yes
15460else
81ecdfbb 15461 gdb_cv_printf_has_long_long=no
97bf5e38 15462fi
81ecdfbb
RW
15463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15464 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15465fi
81ecdfbb 15466
97bf5e38 15467fi
81ecdfbb
RW
15468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15469$as_echo "$gdb_cv_printf_has_long_long" >&6; }
0ad6b8ee 15470if test "$gdb_cv_printf_has_long_long" = yes; then
bc8bcb4b 15471
81ecdfbb 15472$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
15473
15474fi
97bf5e38 15475
1a619819
LM
15476# Check if the compiler and runtime support printing decfloats.
15477
81ecdfbb
RW
15478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15479$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 15480if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 15481 $as_echo_n "(cached) " >&6
1a619819 15482else
81ecdfbb 15483 if test "$cross_compiling" = yes; then :
1a619819
LM
15484 gdb_cv_printf_has_decfloat=no
15485else
81ecdfbb 15486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
15487/* end confdefs.h. */
15488$ac_includes_default
15489int
15490main ()
15491{
15492char buf[64];
15493 _Decimal32 d32 = 1.2345df;
15494 _Decimal64 d64 = 1.2345dd;
15495 _Decimal128 d128 = 1.2345dl;
15496 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15497 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15498 ;
15499 return 0;
15500}
15501_ACEOF
81ecdfbb 15502if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
15503 gdb_cv_printf_has_decfloat=yes
15504else
81ecdfbb 15505 gdb_cv_printf_has_decfloat=no
1a619819 15506fi
81ecdfbb
RW
15507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15508 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 15509fi
81ecdfbb 15510
1a619819 15511fi
81ecdfbb
RW
15512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15513$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
0ad6b8ee 15514if test "$gdb_cv_printf_has_decfloat" = yes; then
1a619819 15515
81ecdfbb 15516$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
15517
15518fi
15519
bc8bcb4b
MK
15520# Check if the compiler supports the `long double' type. We can't use
15521# AC_C_LONG_DOUBLE because that one does additional checks on the
15522# constants defined in <float.h> that fail on some systems,
15523# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 15524
81ecdfbb
RW
15525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15526$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 15527if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 15528 $as_echo_n "(cached) " >&6
97bf5e38 15529else
81ecdfbb 15530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15531/* end confdefs.h. */
97bf5e38 15532long double foo;
bec39cab 15533_ACEOF
81ecdfbb 15534if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 15535 gdb_cv_c_long_double=yes
97bf5e38 15536else
81ecdfbb 15537 gdb_cv_c_long_double=no
97bf5e38 15538fi
81ecdfbb 15539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15540fi
81ecdfbb
RW
15541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15542$as_echo "$gdb_cv_c_long_double" >&6; }
0ad6b8ee 15543if test "$gdb_cv_c_long_double" = yes; then
c906108c 15544
81ecdfbb 15545$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15546
15547fi
15548
bc8bcb4b 15549# Check if the compiler and runtime support printing long doubles.
97bf5e38 15550
81ecdfbb
RW
15551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15552$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 15553if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 15554 $as_echo_n "(cached) " >&6
97bf5e38 15555else
81ecdfbb 15556 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15557 gdb_cv_printf_has_long_double=no
15558else
81ecdfbb 15559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15560/* end confdefs.h. */
bc8bcb4b
MK
15561$ac_includes_default
15562int
15563main ()
15564{
15565char buf[16];
97bf5e38
MK
15566 long double f = 3.141592653;
15567 sprintf (buf, "%Lg", f);
15568 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
15569 ;
15570 return 0;
97bf5e38 15571}
bec39cab 15572_ACEOF
81ecdfbb 15573if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 15574 gdb_cv_printf_has_long_double=yes
c906108c 15575else
81ecdfbb 15576 gdb_cv_printf_has_long_double=no
c906108c 15577fi
81ecdfbb
RW
15578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15579 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 15580fi
81ecdfbb 15581
c906108c 15582fi
81ecdfbb
RW
15583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15584$as_echo "$gdb_cv_printf_has_long_double" >&6; }
0ad6b8ee 15585if test "$gdb_cv_printf_has_long_double" = yes; then
bc8bcb4b 15586
81ecdfbb 15587$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15588
15589fi
97bf5e38 15590
bc8bcb4b 15591# Check if the compiler and runtime support scanning long doubles.
97bf5e38 15592
81ecdfbb
RW
15593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15594$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 15595if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 15596 $as_echo_n "(cached) " >&6
97bf5e38 15597else
81ecdfbb 15598 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15599 gdb_cv_scanf_has_long_double=no
15600else
81ecdfbb 15601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15602/* end confdefs.h. */
bc8bcb4b
MK
15603#include <stdio.h>
15604int
15605main ()
15606{
15607char *buf = "3.141592653";
97bf5e38
MK
15608 long double f = 0;
15609 sscanf (buf, "%Lg", &f);
15610 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
15611 ;
15612 return 0;
97bf5e38 15613}
bec39cab 15614_ACEOF
81ecdfbb 15615if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15616 gdb_cv_scanf_has_long_double=yes
15617else
81ecdfbb 15618 gdb_cv_scanf_has_long_double=no
97bf5e38 15619fi
81ecdfbb
RW
15620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15621 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15622fi
81ecdfbb 15623
c906108c 15624fi
81ecdfbb
RW
15625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15626$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
0ad6b8ee 15627if test "$gdb_cv_scanf_has_long_double" = yes; then
bc8bcb4b 15628
81ecdfbb 15629$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15630
15631fi
c906108c 15632
438013df
AO
15633case ${host_os} in
15634aix*)
81ecdfbb
RW
15635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15636$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 15637if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 15638 $as_echo_n "(cached) " >&6
438013df 15639else
bec39cab 15640
438013df
AO
15641 SAVE_LDFLAGS=$LDFLAGS
15642
15643 case $GCC in
15644 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15645 *) gdb_cv_bigtoc=-bbigtoc ;;
15646 esac
15647
15648 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 15649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15650/* end confdefs.h. */
438013df 15651
bec39cab
AC
15652int
15653main ()
15654{
438013df 15655int i;
bec39cab
AC
15656 ;
15657 return 0;
15658}
15659_ACEOF
81ecdfbb 15660if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15661
81ecdfbb
RW
15662else
15663 gdb_cv_bigtoc=
438013df 15664fi
81ecdfbb
RW
15665rm -f core conftest.err conftest.$ac_objext \
15666 conftest$ac_exeext conftest.$ac_ext
ec76baa5 15667 LDFLAGS="${SAVE_LDFLAGS}"
438013df 15668
bec39cab 15669fi
81ecdfbb
RW
15670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15671$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
15672 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15673 ;;
15674esac
15675
38f6b338 15676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 15677$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
15678dynamic_list=false
15679if test "${gdb_native}" = yes; then
15680 # The dynamically loaded libthread_db needs access to symbols in the gdb
15681 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15682 # may not be supported there.
15683 old_LDFLAGS="$LDFLAGS"
15684 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15685 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15686 LDFLAGS="$LDFLAGS $RDYNAMIC"
15687 if test "${have_libpython}" = no; then
15688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
15689/* end confdefs.h. */
15690
15691int
15692main ()
15693{
15694
15695 ;
15696 return 0;
15697}
15698_ACEOF
15699if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
15700 dynamic_list=true
15701fi
15702rm -f core conftest.err conftest.$ac_objext \
15703 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
15704 else
15705 # Workaround http://bugs.python.org/issue4434 where static
15706 # libpythonX.Y.a would get its symbols required for
15707 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15708 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
15709
15710 # Note the workaround for Python
15711 # http://bugs.python.org/issue10112 earlier has removed
15712 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15713 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15714 # always pass.
38f6b338
JK
15715 old_CFLAGS="$CFLAGS"
15716 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
15717 old_LIBS="$LIBS"
15718 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
15719 old_CPPFLAGS="$CPPFLAGS"
15720 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 15721 if test "$cross_compiling" = yes; then :
3bebe2f2 15722 true
f6528abd 15723else
3bebe2f2
JK
15724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15725/* end confdefs.h. */
1b4f615e 15726#include "Python.h"
3bebe2f2
JK
15727int
15728main ()
15729{
15730int err;
38f6b338
JK
15731 Py_Initialize ();
15732 err = PyRun_SimpleString ("import itertools\n");
15733 Py_Finalize ();
15734 return err == 0 ? 0 : 1;
3bebe2f2
JK
15735 ;
15736 return 0;
15737}
15738_ACEOF
15739if ac_fn_c_try_run "$LINENO"; then :
15740 dynamic_list=true
15741fi
15742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15743 conftest.$ac_objext conftest.beam conftest.$ac_ext
15744fi
15745
8c1fb155 15746 LIBS="$old_LIBS"
38f6b338 15747 CFLAGS="$old_CFLAGS"
1b4f615e 15748 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
15749 fi
15750 LDFLAGS="$old_LDFLAGS"
15751fi
15752if $dynamic_list; then
15753 found="-Wl,--dynamic-list"
15754 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15755else
38f6b338
JK
15756 found="-rdynamic"
15757 RDYNAMIC="-rdynamic"
f6528abd 15758fi
f6528abd 15759
38f6b338 15760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15761$as_echo "$found" >&6; }
0407b3f1 15762
f6528abd 15763
0ad6b8ee 15764if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
c906108c 15765 case ${host_os} in
d92419e5 15766 aix*)
81ecdfbb
RW
15767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15768$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 15769 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 15770 $as_echo_n "(cached) " >&6
bec39cab 15771else
81ecdfbb 15772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15773/* end confdefs.h. */
d92419e5 15774#include <sys/pthdebug.h>
bec39cab
AC
15775int
15776main ()
15777{
d92419e5
JB
15778#ifndef PTHDB_VERSION_3
15779 #error
15780 #endif
bec39cab
AC
15781 ;
15782 return 0;
15783}
15784_ACEOF
81ecdfbb 15785if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15786 gdb_cv_have_aix_thread_debug=yes
15787else
81ecdfbb 15788 gdb_cv_have_aix_thread_debug=no
d92419e5 15789fi
81ecdfbb 15790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15791fi
15792
81ecdfbb
RW
15793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15794$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
0ad6b8ee 15795 if test "$gdb_cv_have_aix_thread_debug" = yes; then
d92419e5 15796 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15797 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15798 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15799
15800 # Older versions of AIX do not provide the declaration for
15801 # the getthrds function (it appears that it was introduced
15802 # with AIX 6.x).
15803 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15804"
d0ac1c44 15805if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
15806 ac_have_decl=1
15807else
15808 ac_have_decl=0
15809fi
15810
15811cat >>confdefs.h <<_ACEOF
15812#define HAVE_DECL_GETTHRDS $ac_have_decl
15813_ACEOF
15814
d92419e5
JB
15815 fi
15816 ;;
c906108c 15817 esac
bec39cab 15818
c906108c
SS
15819fi
15820
3f47be5c 15821if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15823$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 15824if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 15825 $as_echo_n "(cached) " >&6
bec39cab 15826else
81ecdfbb 15827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15828/* end confdefs.h. */
3f47be5c 15829#include <thread_db.h>
bec39cab
AC
15830int
15831main ()
15832{
3f47be5c 15833int i = TD_NOTALLOC;
bec39cab
AC
15834 ;
15835 return 0;
15836}
15837_ACEOF
81ecdfbb 15838if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15839 gdb_cv_thread_db_h_has_td_notalloc=yes
15840else
81ecdfbb 15841 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15842
3f47be5c 15843fi
81ecdfbb 15844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15845
bec39cab 15846fi
81ecdfbb
RW
15847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15848$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15850$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 15851if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 15852 $as_echo_n "(cached) " >&6
59f80f10 15853else
81ecdfbb 15854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15855/* end confdefs.h. */
15856#include <thread_db.h>
15857int
15858main ()
15859{
15860int i = TD_VERSION;
15861 ;
15862 return 0;
15863}
15864_ACEOF
81ecdfbb 15865if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15866 gdb_cv_thread_db_h_has_td_version=yes
15867else
81ecdfbb 15868 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15869
15870fi
81ecdfbb 15871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15872
15873fi
81ecdfbb
RW
15874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15875$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15877$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 15878if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15879 $as_echo_n "(cached) " >&6
59f80f10 15880else
81ecdfbb 15881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15882/* end confdefs.h. */
15883#include <thread_db.h>
15884int
15885main ()
15886{
15887int i = TD_NOTLS;
15888 ;
15889 return 0;
15890}
15891_ACEOF
81ecdfbb 15892if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15893 gdb_cv_thread_db_h_has_td_notls=yes
15894else
81ecdfbb 15895 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15896
15897fi
81ecdfbb 15898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15899
15900fi
81ecdfbb
RW
15901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15902$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15903fi
15904if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15905
81ecdfbb 15906$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15907
59f80f10
DJ
15908fi
15909if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15910
81ecdfbb 15911$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15912
15913fi
15914if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15915
81ecdfbb 15916$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15917
3f47be5c
EZ
15918fi
15919
e655c1a2
PA
15920case $host_os in
15921 go32* | *djgpp*)
15922 gdbinit=gdb.ini
15923 ;;
15924 *)
15925 gdbinit=.gdbinit
15926 ;;
15927esac
15928
15929cat >>confdefs.h <<_ACEOF
15930#define GDBINIT "$gdbinit"
15931_ACEOF
15932
15933
fb40c209 15934
f83d8a90
DE
15935# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15936# except that the argument to --with-sysroot is optional.
15937# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15938if test "x$with_sysroot" = xyes; then
15939 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15940fi
bec39cab 15941
81ecdfbb
RW
15942# Check whether --with-sysroot was given.
15943if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15944 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15945else
15946 TARGET_SYSTEM_ROOT=
15947fi
030292b7 15948
030292b7 15949
f83d8a90
DE
15950 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15951 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15952 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15953 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15954
f83d8a90
DE
15955cat >>confdefs.h <<_ACEOF
15956#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15957_ACEOF
bec39cab 15958
030292b7 15959
b14b1491 15960
f83d8a90
DE
15961
15962 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15963 if test "x$prefix" = xNONE; then
15964 test_prefix=/usr/local
15965 else
15966 test_prefix=$prefix
15967 fi
15968 else
15969 test_prefix=$exec_prefix
15970 fi
15971 value=0
15972 case ${ac_define_dir} in
15973 "${test_prefix}"|"${test_prefix}/"*|\
15974 '${exec_prefix}'|'${exec_prefix}/'*)
15975 value=1
15976 ;;
15977 esac
15978
15979cat >>confdefs.h <<_ACEOF
15980#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15981_ACEOF
030292b7
DJ
15982
15983
15984
16e7150e 15985
16e7150e 15986
81ecdfbb
RW
15987# Check whether --with-system-gdbinit was given.
15988if test "${with_system_gdbinit+set}" = set; then :
15989 withval=$with_system_gdbinit;
b14b1491
TT
15990 SYSTEM_GDBINIT=$withval
15991else
15992 SYSTEM_GDBINIT=
81ecdfbb
RW
15993fi
15994
16e7150e
JG
15995
15996 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15997 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15998 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15999 ac_define_dir=`eval echo $ac_define_dir`
16000
16001cat >>confdefs.h <<_ACEOF
16002#define SYSTEM_GDBINIT "$ac_define_dir"
16003_ACEOF
16004
16005
16006
0c4a4063 16007
b14b1491
TT
16008 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16009 if test "x$prefix" = xNONE; then
16010 test_prefix=/usr/local
16011 else
16012 test_prefix=$prefix
16013 fi
16014 else
16015 test_prefix=$exec_prefix
16016 fi
16017 value=0
16018 case ${ac_define_dir} in
16019 "${test_prefix}"|"${test_prefix}/"*|\
16020 '${exec_prefix}'|'${exec_prefix}/'*)
16021 value=1
16022 ;;
16023 esac
16e7150e 16024
b14b1491
TT
16025cat >>confdefs.h <<_ACEOF
16026#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
16027_ACEOF
16028
b14b1491 16029
16e7150e 16030
0c4a4063 16031
b835bb52 16032
ed2a2229
CB
16033# Check whether --with-system-gdbinit-dir was given.
16034if test "${with_system_gdbinit_dir+set}" = set; then :
16035 withval=$with_system_gdbinit_dir;
16036 SYSTEM_GDBINIT_DIR=$withval
16037else
16038 SYSTEM_GDBINIT_DIR=
16039fi
16040
16041
16042 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16043 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16044 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16045 ac_define_dir=`eval echo $ac_define_dir`
16046
16047cat >>confdefs.h <<_ACEOF
16048#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16049_ACEOF
16050
16051
16052
16053
16054 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16055 if test "x$prefix" = xNONE; then
16056 test_prefix=/usr/local
16057 else
16058 test_prefix=$prefix
16059 fi
16060 else
16061 test_prefix=$exec_prefix
16062 fi
16063 value=0
16064 case ${ac_define_dir} in
16065 "${test_prefix}"|"${test_prefix}/"*|\
16066 '${exec_prefix}'|'${exec_prefix}/'*)
16067 value=1
16068 ;;
16069 esac
16070
16071cat >>confdefs.h <<_ACEOF
16072#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16073_ACEOF
16074
16075
16076
16077
16078
81ecdfbb
RW
16079# Check whether --enable-werror was given.
16080if test "${enable_werror+set}" = set; then :
16081 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
16082 yes | y) ERROR_ON_WARNING="yes" ;;
16083 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 16084 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 16085 esac
81ecdfbb
RW
16086fi
16087
094a342e 16088
9a084706
PA
16089# Enable -Werror by default when using gcc. Turn it off for releases.
16090if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
16091 ERROR_ON_WARNING=yes
16092fi
16093
16094WERROR_CFLAGS=""
16095if test "${ERROR_ON_WARNING}" = yes ; then
16096 WERROR_CFLAGS="-Werror"
16097fi
16098
cf6de44d 16099# The options we'll try to enable.
aac331e4 16100build_warnings="-Wall -Wpointer-arith \
a0de763e 16101-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 16102-Wno-switch -Wno-char-subscripts \
cf6de44d 16103-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 16104-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 16105-Wno-mismatched-tags \
632e107b 16106-Wno-error=deprecated-register \
85e26832 16107-Wsuggest-override \
1a34f210 16108-Wimplicit-fallthrough=3 \
96643e35 16109-Wduplicated-cond \
33a6bc35
TT
16110-Wshadow=local \
16111-Wdeprecated-copy \
16112-Wdeprecated-copy-dtor \
bb564c58
SM
16113-Wredundant-move \
16114-Wmissing-declarations"
3bc3d82a 16115
3526781e 16116case "${host}" in
4fa7574e
RO
16117 *-*-mingw32*)
16118 # Enable -Wno-format by default when using gcc on mingw since many
16119 # GCC versions complain about %I64.
16120 build_warnings="$build_warnings -Wno-format" ;;
16121 *-*-solaris*)
16122 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16123 # doesn't understand.
16124 build_warnings="$build_warnings -Wno-unknown-pragmas"
16125 # Solaris 11 <unistd.h> marks vfork deprecated.
16126 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
16127 *)
16128 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16129 # but there's a special case for this below.
16130 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
16131esac
16132
81ecdfbb
RW
16133# Check whether --enable-build-warnings was given.
16134if test "${enable_build_warnings+set}" = set; then :
16135 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
16136 yes) ;;
16137 no) build_warnings="-w";;
16138 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16139 build_warnings="${build_warnings} ${t}";;
16140 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16141 build_warnings="${t} ${build_warnings}";;
16142 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16143esac
d4f3574e 16144if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 16145 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 16146fi
81ecdfbb
RW
16147fi
16148# Check whether --enable-gdb-build-warnings was given.
16149if test "${enable_gdb_build_warnings+set}" = set; then :
16150 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
16151 yes) ;;
16152 no) build_warnings="-w";;
16153 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16154 build_warnings="${build_warnings} ${t}";;
16155 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16156 build_warnings="${t} ${build_warnings}";;
16157 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16158esac
16159if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16160 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16161fi
81ecdfbb 16162fi
3bc3d82a
PA
16163
16164# The set of warnings supported by a C++ compiler is not the same as
16165# of the C compiler.
cf6de44d 16166ac_ext=cpp
3bc3d82a
PA
16167ac_cpp='$CXXCPP $CPPFLAGS'
16168ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16169ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16170ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16171
3bc3d82a 16172
81ecdfbb 16173WARN_CFLAGS=""
c906108c
SS
16174if test "x${build_warnings}" != x -a "x$GCC" = xyes
16175then
81ecdfbb
RW
16176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16177$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
16178 # Separate out the -Werror flag as some files just cannot be
16179 # compiled with it enabled.
16180 for w in ${build_warnings}; do
7544db95
PA
16181 # GCC does not complain about -Wno-unknown-warning. Invert
16182 # and test -Wunknown-warning instead.
16183 case $w in
16184 -Wno-*)
16185 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
16186 -Wformat-nonliteral)
16187 # gcc requires -Wformat before -Wformat-nonliteral
16188 # will work, so stick them together.
16189 w="-Wformat $w"
16190 wtest="$w"
16191 ;;
7544db95
PA
16192 *)
16193 wtest=$w ;;
16194 esac
16195
746a987d
AC
16196 case $w in
16197 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
16198 *)
16199 # Check whether GCC accepts it.
4536bbc6 16200 saved_CFLAGS="$CFLAGS"
3e019bdc 16201 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 16202 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 16203 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
16204 if test "x$w" = "x-Wunused-variable"; then
16205 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16206 # fixed in GCC 4.9. This test is derived from the gdb
16207 # source code that triggered this bug in GCC.
16208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16209/* end confdefs.h. */
16210struct scoped_restore_base {};
16211 struct scoped_restore_tmpl : public scoped_restore_base {
16212 ~scoped_restore_tmpl() {}
16213 };
16214int
16215main ()
16216{
16217const scoped_restore_base &b = scoped_restore_tmpl();
16218 ;
16219 return 0;
16220}
16221_ACEOF
16222if ac_fn_cxx_try_compile "$LINENO"; then :
16223 WARN_CFLAGS="${WARN_CFLAGS} $w"
16224fi
16225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16226 else
16227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16228/* end confdefs.h. */
4536bbc6 16229
bec39cab
AC
16230int
16231main ()
16232{
4536bbc6 16233
bec39cab
AC
16234 ;
16235 return 0;
16236}
16237_ACEOF
3bc3d82a 16238if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 16239 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 16240fi
81ecdfbb 16241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 16242 fi
4536bbc6 16243 CFLAGS="$saved_CFLAGS"
3bc3d82a 16244 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
16245 esac
16246 done
81ecdfbb
RW
16247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16248$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
16249fi
16250
16251
104c1213 16252
cf6de44d 16253ac_ext=c
3bc3d82a
PA
16254ac_cpp='$CPP $CPPFLAGS'
16255ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16256ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16257ac_compiler_gnu=$ac_cv_c_compiler_gnu
16258
3bc3d82a 16259
b835bb52 16260
f35d5ade
TT
16261# Check whether --enable-ubsan was given.
16262if test "${enable_ubsan+set}" = set; then :
16263 enableval=$enable_ubsan;
16264else
eff98030 16265 enable_ubsan=no
f35d5ade
TT
16266fi
16267
16268if test "x$enable_ubsan" = xauto; then
16269 if $development; then
16270 enable_ubsan=yes
16271 fi
16272fi
16273ac_ext=cpp
16274ac_cpp='$CXXCPP $CPPFLAGS'
16275ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16276ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16277ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16278
16279if test "x$enable_ubsan" = xyes; then
16280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16281$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16282 saved_CXXFLAGS="$CXXFLAGS"
16283 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16285/* end confdefs.h. */
16286
16287int
16288main ()
16289{
16290
16291 ;
16292 return 0;
16293}
16294_ACEOF
16295if ac_fn_cxx_try_link "$LINENO"; then :
16296 enable_ubsan=yes
16297else
16298 enable_ubsan=no
16299fi
16300rm -f core conftest.err conftest.$ac_objext \
16301 conftest$ac_exeext conftest.$ac_ext
16302 CXXFLAGS="$saved_CXXFLAGS"
16303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16304$as_echo "$enable_ubsan" >&6; }
16305 if test "x$enable_ubsan" = xyes; then
16306 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16307 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16308 fi
16309fi
16310ac_ext=c
16311ac_cpp='$CPP $CPPFLAGS'
16312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16314ac_compiler_gnu=$ac_cv_c_compiler_gnu
16315
16316
16317
7a292a7a 16318# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
16319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16320$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 16321if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 16322 $as_echo_n "(cached) " >&6
bec39cab 16323else
81ecdfbb 16324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16325/* end confdefs.h. */
7a292a7a
SS
16326
16327#if defined (__CYGWIN__) || defined (__CYGWIN32__)
16328lose
16329#endif
bec39cab 16330_ACEOF
7a292a7a 16331if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 16332 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
16333 gdb_cv_os_cygwin=yes
16334else
7a292a7a
SS
16335 gdb_cv_os_cygwin=no
16336fi
16337rm -f conftest*
16338
16339fi
81ecdfbb
RW
16340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16341$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 16342
aff38e61 16343
3eb25fda 16344SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 16345case ${host} in
95cbc983
AC
16346 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16347 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 16348 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 16349 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
16350esac
16351
16352
cd0fc7c3
SS
16353# libreadline needs libuser32.a in a cygwin environment
16354WIN32LIBS=
0ad6b8ee 16355if test x"$gdb_cv_os_cygwin" = xyes; then
c5394b80
JM
16356 WIN32LIBS="-luser32"
16357 case "${target}" in
16358 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16359 ;;
16360 esac
cd0fc7c3 16361fi
c906108c 16362
b4505029 16363# The ser-tcp.c module requires sockets.
b2ceabe8
TT
16364# Note that WIN32APILIBS is set by GDB_AC_COMMON.
16365WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
7a292a7a 16366
31d99776 16367# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
16368
16369 OLD_CFLAGS=$CFLAGS
16370 OLD_LDFLAGS=$LDFLAGS
16371 OLD_LIBS=$LIBS
16372 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16373 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16374 # always want our bfd.
16375 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16376 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16377 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 16378 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16379 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 16380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 16381$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 16382if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 16383 $as_echo_n "(cached) " >&6
31d99776 16384else
81ecdfbb 16385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
16386/* end confdefs.h. */
16387#include <stdlib.h>
def63ff0
TT
16388 #include "bfd.h"
16389 #include "elf-bfd.h"
31d99776
DJ
16390
16391int
16392main ()
16393{
def63ff0 16394return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
16395 ;
16396 return 0;
16397}
16398_ACEOF
81ecdfbb 16399if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
16400 gdb_cv_var_elf=yes
16401else
81ecdfbb 16402 gdb_cv_var_elf=no
31d99776 16403fi
81ecdfbb
RW
16404rm -f core conftest.err conftest.$ac_objext \
16405 conftest$ac_exeext conftest.$ac_ext
31d99776 16406fi
81ecdfbb
RW
16407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16408$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
16409 CFLAGS=$OLD_CFLAGS
16410 LDFLAGS=$OLD_LDFLAGS
16411 LIBS=$OLD_LIBS
0ad6b8ee 16412if test "$gdb_cv_var_elf" = yes; then
d4777acb 16413 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 16414
81ecdfbb 16415$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 16416
075ff26d
JK
16417 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16418 if test "$plugins" = "yes"; then
a48b32c0
L
16419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16420$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 16421if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16422 $as_echo_n "(cached) " >&6
16423else
16424 ac_func_search_save_LIBS=$LIBS
16425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16426/* end confdefs.h. */
16427
16428/* Override any GCC internal prototype to avoid an error.
16429 Use char because int might match the return type of a GCC
16430 builtin and then its argument prototype would still apply. */
16431#ifdef __cplusplus
16432extern "C"
16433#endif
16434char dlopen ();
16435int
16436main ()
16437{
16438return dlopen ();
16439 ;
16440 return 0;
16441}
16442_ACEOF
16443for ac_lib in '' dl; do
16444 if test -z "$ac_lib"; then
16445 ac_res="none required"
16446 else
16447 ac_res=-l$ac_lib
16448 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16449 fi
16450 if ac_fn_c_try_link "$LINENO"; then :
16451 ac_cv_search_dlopen=$ac_res
16452fi
16453rm -f core conftest.err conftest.$ac_objext \
16454 conftest$ac_exeext
d0ac1c44 16455 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16456 break
16457fi
16458done
d0ac1c44 16459if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16460
16461else
16462 ac_cv_search_dlopen=no
16463fi
16464rm conftest.$ac_ext
16465LIBS=$ac_func_search_save_LIBS
16466fi
16467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16468$as_echo "$ac_cv_search_dlopen" >&6; }
16469ac_res=$ac_cv_search_dlopen
16470if test "$ac_res" != no; then :
16471 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16472
16473fi
16474
075ff26d 16475 fi
31d99776 16476fi
31d99776 16477
4f05add4
TT
16478# Add macho support to GDB, but only if BFD includes it.
16479
16480 OLD_CFLAGS=$CFLAGS
16481 OLD_LDFLAGS=$LDFLAGS
16482 OLD_LIBS=$LIBS
16483 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16484 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16485 # always want our bfd.
16486 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16487 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16488 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 16489 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16490 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
16491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16492$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 16493if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
16494 $as_echo_n "(cached) " >&6
16495else
16496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16497/* end confdefs.h. */
16498#include <stdlib.h>
16499 #include "bfd.h"
16500 #include "mach-o.h"
16501
16502int
16503main ()
16504{
16505return bfd_mach_o_lookup_command (NULL, 0, NULL);
16506 ;
16507 return 0;
16508}
16509_ACEOF
16510if ac_fn_c_try_link "$LINENO"; then :
16511 gdb_cv_var_macho=yes
16512else
16513 gdb_cv_var_macho=no
16514fi
16515rm -f core conftest.err conftest.$ac_objext \
16516 conftest$ac_exeext conftest.$ac_ext
16517fi
16518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16519$as_echo "$gdb_cv_var_macho" >&6; }
16520 CFLAGS=$OLD_CFLAGS
16521 LDFLAGS=$OLD_LDFLAGS
16522 LIBS=$OLD_LIBS
0ad6b8ee 16523if test "$gdb_cv_var_macho" = yes; then
4f05add4
TT
16524 CONFIG_OBS="$CONFIG_OBS machoread.o"
16525fi
16526
121ce6e5
DJ
16527# Add any host-specific objects to GDB.
16528CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16529
608e2dbb 16530# If building on ELF, look for lzma support for embedded compressed debug info.
0ad6b8ee 16531if test "$gdb_cv_var_elf" = yes; then
608e2dbb
TT
16532
16533# Check whether --with-lzma was given.
16534if test "${with_lzma+set}" = set; then :
16535 withval=$with_lzma;
16536else
16537 with_lzma=auto
16538fi
16539
16540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16541$as_echo_n "checking whether to use lzma... " >&6; }
16542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16543$as_echo "$with_lzma" >&6; }
16544
16545 if test "${with_lzma}" != no; then
16546
16547
16548
16549
16550
16551
16552
16553
16554 use_additional=yes
16555
16556 acl_save_prefix="$prefix"
16557 prefix="$acl_final_prefix"
16558 acl_save_exec_prefix="$exec_prefix"
16559 exec_prefix="$acl_final_exec_prefix"
16560
16561 eval additional_includedir=\"$includedir\"
16562 eval additional_libdir=\"$libdir\"
16563
16564 exec_prefix="$acl_save_exec_prefix"
16565 prefix="$acl_save_prefix"
16566
16567
16568# Check whether --with-liblzma-prefix was given.
16569if test "${with_liblzma_prefix+set}" = set; then :
16570 withval=$with_liblzma_prefix;
16571 if test "X$withval" = "Xno"; then
16572 use_additional=no
16573 else
16574 if test "X$withval" = "X"; then
16575
16576 acl_save_prefix="$prefix"
16577 prefix="$acl_final_prefix"
16578 acl_save_exec_prefix="$exec_prefix"
16579 exec_prefix="$acl_final_exec_prefix"
16580
16581 eval additional_includedir=\"$includedir\"
16582 eval additional_libdir=\"$libdir\"
16583
16584 exec_prefix="$acl_save_exec_prefix"
16585 prefix="$acl_save_prefix"
16586
16587 else
16588 additional_includedir="$withval/include"
16589 additional_libdir="$withval/lib"
16590 fi
16591 fi
16592
16593fi
16594
16595 LIBLZMA=
16596 LTLIBLZMA=
16597 INCLZMA=
16598 rpathdirs=
16599 ltrpathdirs=
16600 names_already_handled=
16601 names_next_round='lzma '
16602 while test -n "$names_next_round"; do
16603 names_this_round="$names_next_round"
16604 names_next_round=
16605 for name in $names_this_round; do
16606 already_handled=
16607 for n in $names_already_handled; do
16608 if test "$n" = "$name"; then
16609 already_handled=yes
16610 break
16611 fi
16612 done
16613 if test -z "$already_handled"; then
16614 names_already_handled="$names_already_handled $name"
16615 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16616 eval value=\"\$HAVE_LIB$uppername\"
16617 if test -n "$value"; then
16618 if test "$value" = yes; then
16619 eval value=\"\$LIB$uppername\"
16620 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16621 eval value=\"\$LTLIB$uppername\"
16622 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16623 else
16624 :
16625 fi
16626 else
16627 found_dir=
16628 found_la=
16629 found_so=
16630 found_a=
16631 if test $use_additional = yes; then
16632 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16633 found_dir="$additional_libdir"
16634 found_so="$additional_libdir/lib$name.$shlibext"
16635 if test -f "$additional_libdir/lib$name.la"; then
16636 found_la="$additional_libdir/lib$name.la"
16637 fi
16638 else
16639 if test -f "$additional_libdir/lib$name.$libext"; then
16640 found_dir="$additional_libdir"
16641 found_a="$additional_libdir/lib$name.$libext"
16642 if test -f "$additional_libdir/lib$name.la"; then
16643 found_la="$additional_libdir/lib$name.la"
16644 fi
16645 fi
16646 fi
16647 fi
16648 if test "X$found_dir" = "X"; then
16649 for x in $LDFLAGS $LTLIBLZMA; do
16650
16651 acl_save_prefix="$prefix"
16652 prefix="$acl_final_prefix"
16653 acl_save_exec_prefix="$exec_prefix"
16654 exec_prefix="$acl_final_exec_prefix"
16655 eval x=\"$x\"
16656 exec_prefix="$acl_save_exec_prefix"
16657 prefix="$acl_save_prefix"
16658
16659 case "$x" in
16660 -L*)
16661 dir=`echo "X$x" | sed -e 's/^X-L//'`
16662 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16663 found_dir="$dir"
16664 found_so="$dir/lib$name.$shlibext"
16665 if test -f "$dir/lib$name.la"; then
16666 found_la="$dir/lib$name.la"
16667 fi
16668 else
16669 if test -f "$dir/lib$name.$libext"; then
16670 found_dir="$dir"
16671 found_a="$dir/lib$name.$libext"
16672 if test -f "$dir/lib$name.la"; then
16673 found_la="$dir/lib$name.la"
16674 fi
16675 fi
16676 fi
16677 ;;
16678 esac
16679 if test "X$found_dir" != "X"; then
16680 break
16681 fi
16682 done
16683 fi
16684 if test "X$found_dir" != "X"; then
16685 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16686 if test "X$found_so" != "X"; then
16687 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16688 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16689 else
16690 haveit=
16691 for x in $ltrpathdirs; do
16692 if test "X$x" = "X$found_dir"; then
16693 haveit=yes
16694 break
16695 fi
16696 done
16697 if test -z "$haveit"; then
16698 ltrpathdirs="$ltrpathdirs $found_dir"
16699 fi
16700 if test "$hardcode_direct" = yes; then
16701 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16702 else
16703 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16704 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16705 haveit=
16706 for x in $rpathdirs; do
16707 if test "X$x" = "X$found_dir"; then
16708 haveit=yes
16709 break
16710 fi
16711 done
16712 if test -z "$haveit"; then
16713 rpathdirs="$rpathdirs $found_dir"
16714 fi
16715 else
16716 haveit=
16717 for x in $LDFLAGS $LIBLZMA; do
16718
16719 acl_save_prefix="$prefix"
16720 prefix="$acl_final_prefix"
16721 acl_save_exec_prefix="$exec_prefix"
16722 exec_prefix="$acl_final_exec_prefix"
16723 eval x=\"$x\"
16724 exec_prefix="$acl_save_exec_prefix"
16725 prefix="$acl_save_prefix"
16726
16727 if test "X$x" = "X-L$found_dir"; then
16728 haveit=yes
16729 break
16730 fi
16731 done
16732 if test -z "$haveit"; then
16733 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16734 fi
16735 if test "$hardcode_minus_L" != no; then
16736 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16737 else
16738 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16739 fi
16740 fi
16741 fi
16742 fi
16743 else
16744 if test "X$found_a" != "X"; then
16745 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16746 else
16747 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16748 fi
16749 fi
16750 additional_includedir=
16751 case "$found_dir" in
16752 */lib | */lib/)
16753 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16754 additional_includedir="$basedir/include"
16755 ;;
16756 esac
16757 if test "X$additional_includedir" != "X"; then
16758 if test "X$additional_includedir" != "X/usr/include"; then
16759 haveit=
16760 if test "X$additional_includedir" = "X/usr/local/include"; then
16761 if test -n "$GCC"; then
16762 case $host_os in
16763 linux*) haveit=yes;;
16764 esac
16765 fi
16766 fi
16767 if test -z "$haveit"; then
16768 for x in $CPPFLAGS $INCLZMA; do
16769
16770 acl_save_prefix="$prefix"
16771 prefix="$acl_final_prefix"
16772 acl_save_exec_prefix="$exec_prefix"
16773 exec_prefix="$acl_final_exec_prefix"
16774 eval x=\"$x\"
16775 exec_prefix="$acl_save_exec_prefix"
16776 prefix="$acl_save_prefix"
16777
16778 if test "X$x" = "X-I$additional_includedir"; then
16779 haveit=yes
16780 break
16781 fi
16782 done
16783 if test -z "$haveit"; then
16784 if test -d "$additional_includedir"; then
16785 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16786 fi
16787 fi
16788 fi
16789 fi
16790 fi
16791 if test -n "$found_la"; then
16792 save_libdir="$libdir"
16793 case "$found_la" in
16794 */* | *\\*) . "$found_la" ;;
16795 *) . "./$found_la" ;;
16796 esac
16797 libdir="$save_libdir"
16798 for dep in $dependency_libs; do
16799 case "$dep" in
16800 -L*)
16801 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16802 if test "X$additional_libdir" != "X/usr/lib"; then
16803 haveit=
16804 if test "X$additional_libdir" = "X/usr/local/lib"; then
16805 if test -n "$GCC"; then
16806 case $host_os in
16807 linux*) haveit=yes;;
16808 esac
16809 fi
16810 fi
16811 if test -z "$haveit"; then
16812 haveit=
16813 for x in $LDFLAGS $LIBLZMA; do
16814
16815 acl_save_prefix="$prefix"
16816 prefix="$acl_final_prefix"
16817 acl_save_exec_prefix="$exec_prefix"
16818 exec_prefix="$acl_final_exec_prefix"
16819 eval x=\"$x\"
16820 exec_prefix="$acl_save_exec_prefix"
16821 prefix="$acl_save_prefix"
16822
16823 if test "X$x" = "X-L$additional_libdir"; then
16824 haveit=yes
16825 break
16826 fi
16827 done
16828 if test -z "$haveit"; then
16829 if test -d "$additional_libdir"; then
16830 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16831 fi
16832 fi
16833 haveit=
16834 for x in $LDFLAGS $LTLIBLZMA; do
16835
16836 acl_save_prefix="$prefix"
16837 prefix="$acl_final_prefix"
16838 acl_save_exec_prefix="$exec_prefix"
16839 exec_prefix="$acl_final_exec_prefix"
16840 eval x=\"$x\"
16841 exec_prefix="$acl_save_exec_prefix"
16842 prefix="$acl_save_prefix"
16843
16844 if test "X$x" = "X-L$additional_libdir"; then
16845 haveit=yes
16846 break
16847 fi
16848 done
16849 if test -z "$haveit"; then
16850 if test -d "$additional_libdir"; then
16851 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16852 fi
16853 fi
16854 fi
16855 fi
16856 ;;
16857 -R*)
16858 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16859 if test "$enable_rpath" != no; then
16860 haveit=
16861 for x in $rpathdirs; do
16862 if test "X$x" = "X$dir"; then
16863 haveit=yes
16864 break
16865 fi
16866 done
16867 if test -z "$haveit"; then
16868 rpathdirs="$rpathdirs $dir"
16869 fi
16870 haveit=
16871 for x in $ltrpathdirs; do
16872 if test "X$x" = "X$dir"; then
16873 haveit=yes
16874 break
16875 fi
16876 done
16877 if test -z "$haveit"; then
16878 ltrpathdirs="$ltrpathdirs $dir"
16879 fi
16880 fi
16881 ;;
16882 -l*)
16883 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16884 ;;
16885 *.la)
16886 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16887 ;;
16888 *)
16889 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16890 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16891 ;;
16892 esac
16893 done
16894 fi
16895 else
16896 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16897 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16898 fi
16899 fi
16900 fi
16901 done
16902 done
16903 if test "X$rpathdirs" != "X"; then
16904 if test -n "$hardcode_libdir_separator"; then
16905 alldirs=
16906 for found_dir in $rpathdirs; do
16907 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16908 done
16909 acl_save_libdir="$libdir"
16910 libdir="$alldirs"
16911 eval flag=\"$hardcode_libdir_flag_spec\"
16912 libdir="$acl_save_libdir"
16913 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16914 else
16915 for found_dir in $rpathdirs; do
16916 acl_save_libdir="$libdir"
16917 libdir="$found_dir"
16918 eval flag=\"$hardcode_libdir_flag_spec\"
16919 libdir="$acl_save_libdir"
16920 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16921 done
16922 fi
16923 fi
16924 if test "X$ltrpathdirs" != "X"; then
16925 for found_dir in $ltrpathdirs; do
16926 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16927 done
16928 fi
16929
16930
16931 ac_save_CPPFLAGS="$CPPFLAGS"
16932
16933 for element in $INCLZMA; do
16934 haveit=
16935 for x in $CPPFLAGS; do
16936
16937 acl_save_prefix="$prefix"
16938 prefix="$acl_final_prefix"
16939 acl_save_exec_prefix="$exec_prefix"
16940 exec_prefix="$acl_final_exec_prefix"
16941 eval x=\"$x\"
16942 exec_prefix="$acl_save_exec_prefix"
16943 prefix="$acl_save_prefix"
16944
16945 if test "X$x" = "X$element"; then
16946 haveit=yes
16947 break
16948 fi
16949 done
16950 if test -z "$haveit"; then
16951 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16952 fi
16953 done
16954
16955
16956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16957$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16958if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16959 $as_echo_n "(cached) " >&6
16960else
16961
16962 ac_save_LIBS="$LIBS"
16963 LIBS="$LIBS $LIBLZMA"
16964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16965/* end confdefs.h. */
16966#include "lzma.h"
16967int
16968main ()
16969{
16970lzma_index_iter iter;
16971 lzma_index_iter_init (&iter, 0);
16972 lzma_mf_is_supported (LZMA_MF_HC3);
16973 ;
16974 return 0;
16975}
16976_ACEOF
16977if ac_fn_c_try_link "$LINENO"; then :
16978 ac_cv_liblzma=yes
16979else
16980 ac_cv_liblzma=no
16981fi
16982rm -f core conftest.err conftest.$ac_objext \
16983 conftest$ac_exeext conftest.$ac_ext
16984 LIBS="$ac_save_LIBS"
16985
16986fi
16987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16988$as_echo "$ac_cv_liblzma" >&6; }
16989 if test "$ac_cv_liblzma" = yes; then
16990 HAVE_LIBLZMA=yes
16991
16992$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16993
16994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16995$as_echo_n "checking how to link with liblzma... " >&6; }
16996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16997$as_echo "$LIBLZMA" >&6; }
16998 else
16999 HAVE_LIBLZMA=no
17000 CPPFLAGS="$ac_save_CPPFLAGS"
17001 LIBLZMA=
17002 LTLIBLZMA=
17003 fi
17004
17005
17006
17007
17008
17009
17010 if test "$HAVE_LIBLZMA" != yes; then
17011 if test "$with_lzma" = yes; then
d0ac1c44 17012 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
17013 fi
17014 fi
17015 fi
17016fi
17017
3fc11d3e
JM
17018LIBGUI="../libgui/src/libgui.a"
17019GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17020
17021
7a292a7a 17022
3fc11d3e
JM
17023WIN32LDAPP=
17024
17025
17026
d91670b9 17027case "${host}" in
686a5eed 17028*-*-cygwin* | *-*-mingw* )
d91670b9
CV
17029 configdir="win"
17030 ;;
17031*)
17032 configdir="unix"
17033 ;;
17034esac
3fc11d3e
JM
17035
17036GDBTKLIBS=
17037if test "${enable_gdbtk}" = "yes"; then
17038
d1c3b63a
KS
17039 # Gdbtk must have an absolute path to srcdir in order to run
17040 # properly when not installed.
17041 here=`pwd`
17042 cd ${srcdir}
17043 GDBTK_SRC_DIR=`pwd`
17044 cd $here
17045
bec39cab 17046
5062cc19
KS
17047 #
17048 # Ok, lets find the tcl configuration
17049 # First, look for one uninstalled.
17050 # the alternative search directory is invoked by --with-tcl
17051 #
3fc11d3e 17052
5062cc19
KS
17053 if test x"${no_tcl}" = x ; then
17054 # we reset no_tcl in case something fails here
17055 no_tcl=true
bec39cab 17056
81ecdfbb
RW
17057# Check whether --with-tcl was given.
17058if test "${with_tcl+set}" = set; then :
17059 withval=$with_tcl; with_tclconfig=${withval}
17060fi
17061
17062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17063$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 17064 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 17065 $as_echo_n "(cached) " >&6
3fc11d3e 17066else
bec39cab 17067
3fc11d3e 17068
5062cc19
KS
17069 # First check to see if --with-tcl was specified.
17070 case "${host}" in
17071 *-*-cygwin*) platDir="win" ;;
17072 *) platDir="unix" ;;
17073 esac
17074 if test x"${with_tclconfig}" != x ; then
17075 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17076 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17077 else
d0ac1c44 17078 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
17079 fi
17080 fi
17081
17082 # then check for a private Tcl installation
17083 if test x"${ac_cv_c_tclconfig}" = x ; then
17084 for i in \
17085 ../tcl \
17086 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17087 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17088 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17089 ../../tcl \
17090 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17091 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17092 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17093 ../../../tcl \
17094 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17095 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17096 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17097 if test -f "$i/$platDir/tclConfig.sh" ; then
17098 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17099 break
17100 fi
17101 done
17102 fi
17103
17104 # on Darwin, check in Framework installation locations
17105 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17106 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17107 `ls -d /Library/Frameworks 2>/dev/null` \
17108 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17109 `ls -d /System/Library/Frameworks 2>/dev/null` \
17110 ; do
17111 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17112 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17113 break
17114 fi
17115 done
17116 fi
17117
17118 # check in a few common install locations
17119 if test x"${ac_cv_c_tclconfig}" = x ; then
17120 for i in `ls -d ${libdir} 2>/dev/null` \
17121 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17122 `ls -d ${prefix}/lib 2>/dev/null` \
17123 `ls -d /usr/local/lib 2>/dev/null` \
17124 `ls -d /usr/contrib/lib 2>/dev/null` \
17125 `ls -d /usr/lib 2>/dev/null` \
17126 ; do
17127 if test -f "$i/tclConfig.sh" ; then
17128 ac_cv_c_tclconfig=`(cd $i; pwd)`
17129 break
17130 fi
17131 done
17132 fi
3fc11d3e 17133
5062cc19
KS
17134 # check in a few other private locations
17135 if test x"${ac_cv_c_tclconfig}" = x ; then
17136 for i in \
17137 ${srcdir}/../tcl \
17138 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17139 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17140 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17141 if test -f "$i/$platDir/tclConfig.sh" ; then
17142 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17143 break
17144 fi
17145 done
17146 fi
bec39cab 17147
3fc11d3e
JM
17148fi
17149
5062cc19
KS
17150
17151 if test x"${ac_cv_c_tclconfig}" = x ; then
17152 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
17153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17154$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
17155 else
17156 no_tcl=
17157 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
17158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17159$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
17160 fi
17161 fi
3fc11d3e 17162
bec39cab 17163
85541719
DE
17164 # If $no_tk is nonempty, then we can't do Tk, and there is no
17165 # point to doing Tcl.
bec39cab 17166
5062cc19
KS
17167 #
17168 # Ok, lets find the tk configuration
17169 # First, look for one uninstalled.
17170 # the alternative search directory is invoked by --with-tk
17171 #
3fc11d3e 17172
5062cc19
KS
17173 if test x"${no_tk}" = x ; then
17174 # we reset no_tk in case something fails here
17175 no_tk=true
bec39cab 17176
81ecdfbb
RW
17177# Check whether --with-tk was given.
17178if test "${with_tk+set}" = set; then :
17179 withval=$with_tk; with_tkconfig=${withval}
17180fi
17181
17182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17183$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 17184 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 17185 $as_echo_n "(cached) " >&6
bec39cab 17186else
3fc11d3e
JM
17187
17188
5062cc19
KS
17189 # First check to see if --with-tkconfig was specified.
17190 if test x"${with_tkconfig}" != x ; then
17191 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17192 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17193 else
d0ac1c44 17194 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
17195 fi
17196 fi
3fc11d3e 17197
5062cc19
KS
17198 # then check for a private Tk library
17199 case "${host}" in
17200 *-*-cygwin*) platDir="win" ;;
17201 *) platDir="unix" ;;
17202 esac
17203 if test x"${ac_cv_c_tkconfig}" = x ; then
17204 for i in \
17205 ../tk \
17206 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17207 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17208 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17209 ../../tk \
17210 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17211 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17212 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17213 ../../../tk \
17214 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17215 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17216 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17217 if test -f "$i/$platDir/tkConfig.sh" ; then
17218 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17219 break
17220 fi
17221 done
17222 fi
17223
17224 # on Darwin, check in Framework installation locations
17225 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17226 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17227 `ls -d /Library/Frameworks 2>/dev/null` \
17228 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17229 `ls -d /System/Library/Frameworks 2>/dev/null` \
17230 ; do
17231 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17232 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17233 break
17234 fi
17235 done
17236 fi
17237
17238 # check in a few common install locations
17239 if test x"${ac_cv_c_tkconfig}" = x ; then
17240 for i in `ls -d ${libdir} 2>/dev/null` \
17241 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17242 `ls -d ${prefix}/lib 2>/dev/null` \
17243 `ls -d /usr/local/lib 2>/dev/null` \
17244 `ls -d /usr/contrib/lib 2>/dev/null` \
17245 `ls -d /usr/lib 2>/dev/null` \
17246 ; do
17247 if test -f "$i/tkConfig.sh" ; then
17248 ac_cv_c_tkconfig=`(cd $i; pwd)`
17249 break
17250 fi
17251 done
17252 fi
17253 # check in a few other private locations
17254 if test x"${ac_cv_c_tkconfig}" = x ; then
17255 for i in \
17256 ${srcdir}/../tk \
17257 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17258 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17259 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17260 if test -f "$i/$platDir/tkConfig.sh" ; then
17261 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17262 break
17263 fi
17264 done
17265 fi
3fc11d3e 17266
3fc11d3e
JM
17267fi
17268
17269
5062cc19
KS
17270 if test x"${ac_cv_c_tkconfig}" = x ; then
17271 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
17272 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17273$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
17274 else
17275 no_tk=
17276 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
17277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17278$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 17279 fi
3fc11d3e 17280 fi
dd2504ab 17281
dd2504ab 17282
85541719
DE
17283 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17284
81ecdfbb
RW
17285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17286$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
17287
17288 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
17289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17290$as_echo "loading" >&6; }
85541719
DE
17291 . ${TCL_BIN_DIR}/tclConfig.sh
17292 else
81ecdfbb
RW
17293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17294$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
17295 fi
17296
17297 # eval is required to do the TCL_DBGX substitution
17298 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17299 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17300
17301 # If the TCL_BIN_DIR is the build directory (not the install directory),
17302 # then set the common variable name to the value of the build variables.
17303 # For example, the variable TCL_LIB_SPEC will be set to the value
17304 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17305 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17306 # installed and uninstalled version of Tcl.
17307 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17308 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17309 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17310 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17311 elif test "`uname -s`" = "Darwin"; then
17312 # If Tcl was built as a framework, attempt to use the libraries
17313 # from the framework at the given location so that linking works
a68ffae9 17314 # against Tcl.framework installed in an arbitrary location.
85541719
DE
17315 case ${TCL_DEFS} in
17316 *TCL_FRAMEWORK*)
17317 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17318 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17319 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17320 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17321 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17322 break
17323 fi
17324 done
17325 fi
17326 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17327 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17328 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17329 fi
17330 ;;
17331 esac
17332 fi
17333
17334 # eval is required to do the TCL_DBGX substitution
17335 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17336 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17337 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17338 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354 # Check for in-tree tcl
17355 here=`pwd`
17356 cd ${srcdir}/..
17357 topdir=`pwd`
17358 cd ${here}
17359
17360 intree="no"
17361 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17362 intree="yes"
17363 fi
17364
17365 # Find Tcl private headers
17366 if test x"${intree}" = xno; then
17367
81ecdfbb
RW
17368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17369$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
17370 private_dir=""
17371 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17372 if test -f ${dir}/tclInt.h ; then
17373 private_dir=${dir}
17374 fi
17375
17376 if test x"${private_dir}" = x; then
d0ac1c44 17377 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
17378 else
17379 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17381$as_echo "${private_dir}" >&6; }
85541719
DE
17382 fi
17383
17384 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17385 TCL_LIBRARY="${TCL_LIB_SPEC}"
17386 TCL_DEPS=""
17387 else
17388 # If building tcl in the same src tree, private headers
17389 # are not needed, but we need to be sure to use the right
17390 # headers library
17391 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17392 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17393 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17394 fi
17395
17396
17397
17398
17399
81ecdfbb
RW
17400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17401$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 17402
5062cc19 17403 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
17404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17405$as_echo "loading" >&6; }
5062cc19 17406 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 17407 else
81ecdfbb
RW
17408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17409$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 17410 fi
bec39cab 17411
5062cc19
KS
17412 # eval is required to do the TK_DBGX substitution
17413 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17414 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17415
17416 # If the TK_BIN_DIR is the build directory (not the install directory),
17417 # then set the common variable name to the value of the build variables.
17418 # For example, the variable TK_LIB_SPEC will be set to the value
17419 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17420 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17421 # installed and uninstalled version of Tcl.
85541719 17422 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
17423 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17424 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17425 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17426 elif test "`uname -s`" = "Darwin"; then
17427 # If Tk was built as a framework, attempt to use the libraries
17428 # from the framework at the given location so that linking works
a68ffae9 17429 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
17430 case ${TK_DEFS} in
17431 *TK_FRAMEWORK*)
85541719 17432 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
17433 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17434 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17435 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17436 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17437 break
17438 fi
17439 done
17440 fi
85541719 17441 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
17442 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17443 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17444 fi
17445 ;;
17446 esac
3fc11d3e
JM
17447 fi
17448
5062cc19
KS
17449 # eval is required to do the TK_DBGX substitution
17450 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17451 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17452 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17453 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 17454
3fc11d3e
JM
17455
17456
bec39cab
AC
17457
17458
17459
17460
17461
17462
17463
3fc11d3e 17464
3fc11d3e 17465
bec39cab 17466
bec39cab 17467
85541719
DE
17468 # Check for in-tree Tk
17469 intree="no"
17470 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17471 intree="yes"
17472 fi
3fc11d3e 17473
85541719
DE
17474 # Find Tk private headers
17475 if test x"${intree}" = xno; then
3fc11d3e 17476
81ecdfbb
RW
17477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17478$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
17479 private_dir=""
17480 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17481 if test -f ${dir}/tkInt.h; then
17482 private_dir=${dir}
3fc11d3e 17483 fi
bec39cab 17484
5062cc19 17485 if test x"${private_dir}" = x; then
d0ac1c44 17486 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 17487 else
5062cc19 17488 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17490$as_echo "${private_dir}" >&6; }
3fc11d3e 17491 fi
3fc11d3e 17492
85541719
DE
17493 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17494 TK_LIBRARY=${TK_LIB_SPEC}
17495 TK_DEPS=""
17496 else
17497 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17498 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17499 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17500 fi
3fc11d3e
JM
17501
17502
3fc11d3e
JM
17503
17504
3fc11d3e 17505
85541719 17506 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 17507
85541719
DE
17508 # Include some libraries that Tcl and Tk want.
17509 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17510 # Yes, the ordering seems wrong here. But it isn't.
17511 # TK_LIBS is the list of libraries that need to be linked
17512 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17513 # were in LIBS then any link tests after this point would
17514 # try to include things like `$(LIBGUI)', which wouldn't work.
17515 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 17516
85541719
DE
17517 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17518 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17519 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17520 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17521 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17522 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17523 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 17524
0ad6b8ee 17525 if test x"$gdb_cv_os_cygwin" = xyes; then
85541719
DE
17526 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17527 WIN32LDAPP="-Wl,--subsystem,console"
17528 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 17529 fi
ffc6a242 17530
81ecdfbb 17531 subdirs="$subdirs gdbtk"
3ace7edb 17532
85541719 17533 fi
3fc11d3e
JM
17534fi
17535
17536
17537
17538
17539
17540
17541
17542
81ecdfbb
RW
17543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17544$as_echo_n "checking for X... " >&6; }
bec39cab 17545
c906108c 17546
81ecdfbb
RW
17547# Check whether --with-x was given.
17548if test "${with_x+set}" = set; then :
17549 withval=$with_x;
17550fi
c906108c
SS
17551
17552# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17553if test "x$with_x" = xno; then
17554 # The user explicitly disabled X.
17555 have_x=disabled
17556else
81ecdfbb 17557 case $x_includes,$x_libraries in #(
d0ac1c44
SM
17558 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17559 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 17560 $as_echo_n "(cached) " >&6
c906108c
SS
17561else
17562 # One or both of the vars are not set, and there is no cached value.
bec39cab 17563ac_x_includes=no ac_x_libraries=no
81ecdfbb 17564rm -f -r conftest.dir
bec39cab
AC
17565if mkdir conftest.dir; then
17566 cd conftest.dir
bec39cab 17567 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
17568incroot:
17569 @echo incroot='${INCROOT}'
17570usrlibdir:
17571 @echo usrlibdir='${USRLIBDIR}'
17572libdir:
17573 @echo libdir='${LIBDIR}'
17574_ACEOF
17575 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 17576 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
17577 for ac_var in incroot usrlibdir libdir; do
17578 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17579 done
c906108c 17580 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
17581 for ac_extension in a so sl dylib la dll; do
17582 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17583 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 17584 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
17585 fi
17586 done
17587 # Screen out bogus values from the imake configuration. They are
17588 # bogus both because they are the default anyway, and because
17589 # using them would break gcc on systems where it needs fixed includes.
bec39cab 17590 case $ac_im_incroot in
81ecdfbb 17591 /usr/include) ac_x_includes= ;;
bec39cab 17592 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 17593 esac
bec39cab 17594 case $ac_im_usrlibdir in
81ecdfbb 17595 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 17596 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
17597 esac
17598 fi
17599 cd ..
81ecdfbb 17600 rm -f -r conftest.dir
c906108c
SS
17601fi
17602
bec39cab
AC
17603# Standard set of common directories for X headers.
17604# Check X11 before X11Rn because it is often a symlink to the current release.
17605ac_x_header_dirs='
17606/usr/X11/include
81ecdfbb 17607/usr/X11R7/include
bec39cab
AC
17608/usr/X11R6/include
17609/usr/X11R5/include
17610/usr/X11R4/include
17611
17612/usr/include/X11
81ecdfbb 17613/usr/include/X11R7
bec39cab
AC
17614/usr/include/X11R6
17615/usr/include/X11R5
17616/usr/include/X11R4
17617
17618/usr/local/X11/include
81ecdfbb 17619/usr/local/X11R7/include
bec39cab
AC
17620/usr/local/X11R6/include
17621/usr/local/X11R5/include
17622/usr/local/X11R4/include
17623
17624/usr/local/include/X11
81ecdfbb 17625/usr/local/include/X11R7
bec39cab
AC
17626/usr/local/include/X11R6
17627/usr/local/include/X11R5
17628/usr/local/include/X11R4
17629
17630/usr/X386/include
17631/usr/x386/include
17632/usr/XFree86/include/X11
17633
17634/usr/include
17635/usr/local/include
17636/usr/unsupported/include
17637/usr/athena/include
17638/usr/local/x11r5/include
17639/usr/lpp/Xamples/include
17640
17641/usr/openwin/include
17642/usr/openwin/share/include'
17643
17644if test "$ac_x_includes" = no; then
81ecdfbb 17645 # Guess where to find include files, by looking for Xlib.h.
c906108c 17646 # First, try using that file with no special directory specified.
81ecdfbb 17647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17648/* end confdefs.h. */
81ecdfbb 17649#include <X11/Xlib.h>
bec39cab 17650_ACEOF
81ecdfbb 17651if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
17652 # We can compile using X headers with no special include directory.
17653ac_x_includes=
17654else
bec39cab 17655 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 17656 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
17657 ac_x_includes=$ac_dir
17658 break
17659 fi
17660done
c906108c 17661fi
d0ac1c44 17662rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 17663fi # $ac_x_includes = no
c906108c 17664
bec39cab 17665if test "$ac_x_libraries" = no; then
c906108c 17666 # Check for the libraries.
c906108c
SS
17667 # See if we find them without any special options.
17668 # Don't add to $LIBS permanently.
bec39cab 17669 ac_save_LIBS=$LIBS
81ecdfbb
RW
17670 LIBS="-lX11 $LIBS"
17671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17672/* end confdefs.h. */
81ecdfbb 17673#include <X11/Xlib.h>
bec39cab
AC
17674int
17675main ()
17676{
81ecdfbb 17677XrmInitialize ()
bec39cab
AC
17678 ;
17679 return 0;
17680}
17681_ACEOF
81ecdfbb 17682if ac_fn_c_try_link "$LINENO"; then :
bec39cab 17683 LIBS=$ac_save_LIBS
c906108c
SS
17684# We can link X programs with no special library path.
17685ac_x_libraries=
17686else
81ecdfbb
RW
17687 LIBS=$ac_save_LIBS
17688for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 17689do
bec39cab 17690 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
17691 for ac_extension in a so sl dylib la dll; do
17692 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
17693 ac_x_libraries=$ac_dir
17694 break 2
17695 fi
17696 done
17697done
17698fi
81ecdfbb
RW
17699rm -f core conftest.err conftest.$ac_objext \
17700 conftest$ac_exeext conftest.$ac_ext
bec39cab 17701fi # $ac_x_libraries = no
c906108c 17702
81ecdfbb
RW
17703case $ac_x_includes,$ac_x_libraries in #(
17704 no,* | *,no | *\'*)
17705 # Didn't find X, or a directory has "'" in its name.
17706 ac_cv_have_x="have_x=no";; #(
17707 *)
17708 # Record where we found X for the cache.
17709 ac_cv_have_x="have_x=yes\
17710 ac_x_includes='$ac_x_includes'\
17711 ac_x_libraries='$ac_x_libraries'"
17712esac
c906108c 17713fi
81ecdfbb
RW
17714;; #(
17715 *) have_x=yes;;
17716 esac
c906108c
SS
17717 eval "$ac_cv_have_x"
17718fi # $with_x != no
17719
17720if test "$have_x" != yes; then
81ecdfbb
RW
17721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17722$as_echo "$have_x" >&6; }
c906108c
SS
17723 no_x=yes
17724else
17725 # If each of the values was on the command line, it overrides each guess.
17726 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17727 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17728 # Update the cache value to reflect the command line values.
81ecdfbb
RW
17729 ac_cv_have_x="have_x=yes\
17730 ac_x_includes='$x_includes'\
17731 ac_x_libraries='$x_libraries'"
17732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17733$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
17734fi
17735
17736
bec39cab 17737# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 17738# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
17739# This code just checks for a few cases where we'd like to ignore those
17740# definitions, even when they're present in the '.mt' file. These cases
17741# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 17742# not part of the source tree.
7a292a7a 17743#
81ecdfbb
RW
17744# Check whether --enable-sim was given.
17745if test "${enable_sim+set}" = set; then :
17746 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
17747 echo "enableval = ${enableval}";
17748 case "${enableval}" in
17749 yes) ignore_sim=false ;;
17750 no) ignore_sim=true ;;
17751 *) ignore_sim=false ;;
17752 esac
17753else
17754 ignore_sim=false
81ecdfbb
RW
17755fi
17756
7a292a7a
SS
17757
17758if test ! -d "${srcdir}/../sim"; then
17759 ignore_sim=true
17760fi
17761
9b624dbe
UW
17762SIM=
17763SIM_OBS=
17764if test "${ignore_sim}" = "false"; then
17765 if test x"${gdb_sim}" != x ; then
17766 SIM="${gdb_sim}"
17767 SIM_OBS="remote-sim.o"
60ca704f 17768
81ecdfbb 17769$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17770
976102cd
PA
17771
17772 # Some tdep code should only be compiled in when the ppc sim is
17773 # built. PR sim/13418.
17774 case $target in
17775 powerpc*-*-*)
17776
17777$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17778
17779 ;;
17780 esac
9b624dbe 17781 fi
7a292a7a
SS
17782fi
17783
17784
17785
c906108c
SS
17786
17787
17788
17789
17790
17791
dfcd3bfb 17792
e56ac5c3
AC
17793
17794
b3a90332
AC
17795
17796
c35f4ffc 17797# List of host floatformats.
bec39cab
AC
17798
17799cat >>confdefs.h <<_ACEOF
c35f4ffc 17800#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17801_ACEOF
c35f4ffc 17802
bec39cab
AC
17803
17804cat >>confdefs.h <<_ACEOF
c35f4ffc 17805#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17806_ACEOF
17807
c35f4ffc 17808
bec39cab 17809cat >>confdefs.h <<_ACEOF
c35f4ffc 17810#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17811_ACEOF
c35f4ffc
AC
17812
17813
c906108c
SS
17814# target_subdir is used by the testsuite to find the target libraries.
17815target_subdir=
17816if test "${host}" != "${target}"; then
17817 target_subdir="${target_alias}/"
17818fi
17819
17820
21ea5acd 17821# Import nat definitions.
2b351b19 17822nat_makefile_frag=/dev/null
771b4502 17823if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17824 . ${srcdir}/configure.nat
17825 nativefile=$NAT_FILE
c906108c 17826fi
c906108c 17827
c906108c
SS
17828
17829
17830
21ea5acd
SDJ
17831
17832
17833
17834
17835
c906108c
SS
17836
17837
b00a8037 17838if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17839
17840cat >>confdefs.h <<_ACEOF
b00a8037 17841#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17842_ACEOF
b00a8037
DJ
17843
17844fi
17845
393fd4c3
YQ
17846# Check for babeltrace and babeltrace-ctf
17847
17848# Check whether --with-babeltrace was given.
17849if test "${with_babeltrace+set}" = set; then :
17850 withval=$with_babeltrace;
17851else
17852 with_babeltrace=auto
17853fi
17854
17855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17856$as_echo_n "checking whether to use babeltrace... " >&6; }
17857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17858$as_echo "$with_babeltrace" >&6; }
17859
17860if test "x$with_babeltrace" = "xno"; then
17861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17862$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17863else
17864 # Append -Werror to CFLAGS so that configure can catch the warning
17865 # "assignment from incompatible pointer type", which is related to
17866 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17867 # in GDB, while babeltrace 1.0.3 is broken.
17868 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17869 # safe to save and restore CFLAGS here.
17870 saved_CFLAGS=$CFLAGS
17871 CFLAGS="$CFLAGS -Werror"
17872
17873
17874
17875
17876
17877
17878
17879
17880 use_additional=yes
17881
17882 acl_save_prefix="$prefix"
17883 prefix="$acl_final_prefix"
17884 acl_save_exec_prefix="$exec_prefix"
17885 exec_prefix="$acl_final_exec_prefix"
17886
17887 eval additional_includedir=\"$includedir\"
17888 eval additional_libdir=\"$libdir\"
17889
17890 exec_prefix="$acl_save_exec_prefix"
17891 prefix="$acl_save_prefix"
17892
17893
17894# Check whether --with-libbabeltrace-prefix was given.
17895if test "${with_libbabeltrace_prefix+set}" = set; then :
17896 withval=$with_libbabeltrace_prefix;
17897 if test "X$withval" = "Xno"; then
17898 use_additional=no
17899 else
17900 if test "X$withval" = "X"; then
17901
17902 acl_save_prefix="$prefix"
17903 prefix="$acl_final_prefix"
17904 acl_save_exec_prefix="$exec_prefix"
17905 exec_prefix="$acl_final_exec_prefix"
17906
17907 eval additional_includedir=\"$includedir\"
17908 eval additional_libdir=\"$libdir\"
17909
17910 exec_prefix="$acl_save_exec_prefix"
17911 prefix="$acl_save_prefix"
17912
17913 else
17914 additional_includedir="$withval/include"
17915 additional_libdir="$withval/lib"
17916 fi
17917 fi
17918
17919fi
17920
17921 LIBBABELTRACE=
17922 LTLIBBABELTRACE=
17923 INCBABELTRACE=
17924 rpathdirs=
17925 ltrpathdirs=
17926 names_already_handled=
17927 names_next_round='babeltrace babeltrace-ctf'
17928 while test -n "$names_next_round"; do
17929 names_this_round="$names_next_round"
17930 names_next_round=
17931 for name in $names_this_round; do
17932 already_handled=
17933 for n in $names_already_handled; do
17934 if test "$n" = "$name"; then
17935 already_handled=yes
17936 break
17937 fi
17938 done
17939 if test -z "$already_handled"; then
17940 names_already_handled="$names_already_handled $name"
17941 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17942 eval value=\"\$HAVE_LIB$uppername\"
17943 if test -n "$value"; then
17944 if test "$value" = yes; then
17945 eval value=\"\$LIB$uppername\"
17946 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17947 eval value=\"\$LTLIB$uppername\"
17948 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17949 else
17950 :
17951 fi
17952 else
17953 found_dir=
17954 found_la=
17955 found_so=
17956 found_a=
17957 if test $use_additional = yes; then
17958 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17959 found_dir="$additional_libdir"
17960 found_so="$additional_libdir/lib$name.$shlibext"
17961 if test -f "$additional_libdir/lib$name.la"; then
17962 found_la="$additional_libdir/lib$name.la"
17963 fi
17964 else
17965 if test -f "$additional_libdir/lib$name.$libext"; then
17966 found_dir="$additional_libdir"
17967 found_a="$additional_libdir/lib$name.$libext"
17968 if test -f "$additional_libdir/lib$name.la"; then
17969 found_la="$additional_libdir/lib$name.la"
17970 fi
17971 fi
17972 fi
17973 fi
17974 if test "X$found_dir" = "X"; then
17975 for x in $LDFLAGS $LTLIBBABELTRACE; do
17976
17977 acl_save_prefix="$prefix"
17978 prefix="$acl_final_prefix"
17979 acl_save_exec_prefix="$exec_prefix"
17980 exec_prefix="$acl_final_exec_prefix"
17981 eval x=\"$x\"
17982 exec_prefix="$acl_save_exec_prefix"
17983 prefix="$acl_save_prefix"
17984
17985 case "$x" in
17986 -L*)
17987 dir=`echo "X$x" | sed -e 's/^X-L//'`
17988 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17989 found_dir="$dir"
17990 found_so="$dir/lib$name.$shlibext"
17991 if test -f "$dir/lib$name.la"; then
17992 found_la="$dir/lib$name.la"
17993 fi
17994 else
17995 if test -f "$dir/lib$name.$libext"; then
17996 found_dir="$dir"
17997 found_a="$dir/lib$name.$libext"
17998 if test -f "$dir/lib$name.la"; then
17999 found_la="$dir/lib$name.la"
18000 fi
18001 fi
18002 fi
18003 ;;
18004 esac
18005 if test "X$found_dir" != "X"; then
18006 break
18007 fi
18008 done
18009 fi
18010 if test "X$found_dir" != "X"; then
18011 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18012 if test "X$found_so" != "X"; then
18013 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18014 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18015 else
18016 haveit=
18017 for x in $ltrpathdirs; do
18018 if test "X$x" = "X$found_dir"; then
18019 haveit=yes
18020 break
18021 fi
18022 done
18023 if test -z "$haveit"; then
18024 ltrpathdirs="$ltrpathdirs $found_dir"
18025 fi
18026 if test "$hardcode_direct" = yes; then
18027 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18028 else
18029 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18030 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18031 haveit=
18032 for x in $rpathdirs; do
18033 if test "X$x" = "X$found_dir"; then
18034 haveit=yes
18035 break
18036 fi
18037 done
18038 if test -z "$haveit"; then
18039 rpathdirs="$rpathdirs $found_dir"
18040 fi
18041 else
18042 haveit=
18043 for x in $LDFLAGS $LIBBABELTRACE; do
18044
18045 acl_save_prefix="$prefix"
18046 prefix="$acl_final_prefix"
18047 acl_save_exec_prefix="$exec_prefix"
18048 exec_prefix="$acl_final_exec_prefix"
18049 eval x=\"$x\"
18050 exec_prefix="$acl_save_exec_prefix"
18051 prefix="$acl_save_prefix"
18052
18053 if test "X$x" = "X-L$found_dir"; then
18054 haveit=yes
18055 break
18056 fi
18057 done
18058 if test -z "$haveit"; then
18059 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18060 fi
18061 if test "$hardcode_minus_L" != no; then
18062 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18063 else
18064 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18065 fi
18066 fi
18067 fi
18068 fi
18069 else
18070 if test "X$found_a" != "X"; then
18071 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18072 else
18073 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18074 fi
18075 fi
18076 additional_includedir=
18077 case "$found_dir" in
18078 */lib | */lib/)
18079 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18080 additional_includedir="$basedir/include"
18081 ;;
18082 esac
18083 if test "X$additional_includedir" != "X"; then
18084 if test "X$additional_includedir" != "X/usr/include"; then
18085 haveit=
18086 if test "X$additional_includedir" = "X/usr/local/include"; then
18087 if test -n "$GCC"; then
18088 case $host_os in
18089 linux*) haveit=yes;;
18090 esac
18091 fi
18092 fi
18093 if test -z "$haveit"; then
18094 for x in $CPPFLAGS $INCBABELTRACE; do
18095
18096 acl_save_prefix="$prefix"
18097 prefix="$acl_final_prefix"
18098 acl_save_exec_prefix="$exec_prefix"
18099 exec_prefix="$acl_final_exec_prefix"
18100 eval x=\"$x\"
18101 exec_prefix="$acl_save_exec_prefix"
18102 prefix="$acl_save_prefix"
18103
18104 if test "X$x" = "X-I$additional_includedir"; then
18105 haveit=yes
18106 break
18107 fi
18108 done
18109 if test -z "$haveit"; then
18110 if test -d "$additional_includedir"; then
18111 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18112 fi
18113 fi
18114 fi
18115 fi
18116 fi
18117 if test -n "$found_la"; then
18118 save_libdir="$libdir"
18119 case "$found_la" in
18120 */* | *\\*) . "$found_la" ;;
18121 *) . "./$found_la" ;;
18122 esac
18123 libdir="$save_libdir"
18124 for dep in $dependency_libs; do
18125 case "$dep" in
18126 -L*)
18127 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18128 if test "X$additional_libdir" != "X/usr/lib"; then
18129 haveit=
18130 if test "X$additional_libdir" = "X/usr/local/lib"; then
18131 if test -n "$GCC"; then
18132 case $host_os in
18133 linux*) haveit=yes;;
18134 esac
18135 fi
18136 fi
18137 if test -z "$haveit"; then
18138 haveit=
18139 for x in $LDFLAGS $LIBBABELTRACE; do
18140
18141 acl_save_prefix="$prefix"
18142 prefix="$acl_final_prefix"
18143 acl_save_exec_prefix="$exec_prefix"
18144 exec_prefix="$acl_final_exec_prefix"
18145 eval x=\"$x\"
18146 exec_prefix="$acl_save_exec_prefix"
18147 prefix="$acl_save_prefix"
18148
18149 if test "X$x" = "X-L$additional_libdir"; then
18150 haveit=yes
18151 break
18152 fi
18153 done
18154 if test -z "$haveit"; then
18155 if test -d "$additional_libdir"; then
18156 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18157 fi
18158 fi
18159 haveit=
18160 for x in $LDFLAGS $LTLIBBABELTRACE; do
18161
18162 acl_save_prefix="$prefix"
18163 prefix="$acl_final_prefix"
18164 acl_save_exec_prefix="$exec_prefix"
18165 exec_prefix="$acl_final_exec_prefix"
18166 eval x=\"$x\"
18167 exec_prefix="$acl_save_exec_prefix"
18168 prefix="$acl_save_prefix"
18169
18170 if test "X$x" = "X-L$additional_libdir"; then
18171 haveit=yes
18172 break
18173 fi
18174 done
18175 if test -z "$haveit"; then
18176 if test -d "$additional_libdir"; then
18177 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18178 fi
18179 fi
18180 fi
18181 fi
18182 ;;
18183 -R*)
18184 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18185 if test "$enable_rpath" != no; then
18186 haveit=
18187 for x in $rpathdirs; do
18188 if test "X$x" = "X$dir"; then
18189 haveit=yes
18190 break
18191 fi
18192 done
18193 if test -z "$haveit"; then
18194 rpathdirs="$rpathdirs $dir"
18195 fi
18196 haveit=
18197 for x in $ltrpathdirs; do
18198 if test "X$x" = "X$dir"; then
18199 haveit=yes
18200 break
18201 fi
18202 done
18203 if test -z "$haveit"; then
18204 ltrpathdirs="$ltrpathdirs $dir"
18205 fi
18206 fi
18207 ;;
18208 -l*)
18209 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18210 ;;
18211 *.la)
18212 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18213 ;;
18214 *)
18215 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18216 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18217 ;;
18218 esac
18219 done
18220 fi
18221 else
18222 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18223 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18224 fi
18225 fi
18226 fi
18227 done
18228 done
18229 if test "X$rpathdirs" != "X"; then
18230 if test -n "$hardcode_libdir_separator"; then
18231 alldirs=
18232 for found_dir in $rpathdirs; do
18233 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18234 done
18235 acl_save_libdir="$libdir"
18236 libdir="$alldirs"
18237 eval flag=\"$hardcode_libdir_flag_spec\"
18238 libdir="$acl_save_libdir"
18239 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18240 else
18241 for found_dir in $rpathdirs; do
18242 acl_save_libdir="$libdir"
18243 libdir="$found_dir"
18244 eval flag=\"$hardcode_libdir_flag_spec\"
18245 libdir="$acl_save_libdir"
18246 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18247 done
18248 fi
18249 fi
18250 if test "X$ltrpathdirs" != "X"; then
18251 for found_dir in $ltrpathdirs; do
18252 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18253 done
18254 fi
18255
18256
18257 ac_save_CPPFLAGS="$CPPFLAGS"
18258
18259 for element in $INCBABELTRACE; do
18260 haveit=
18261 for x in $CPPFLAGS; do
18262
18263 acl_save_prefix="$prefix"
18264 prefix="$acl_final_prefix"
18265 acl_save_exec_prefix="$exec_prefix"
18266 exec_prefix="$acl_final_exec_prefix"
18267 eval x=\"$x\"
18268 exec_prefix="$acl_save_exec_prefix"
18269 prefix="$acl_save_prefix"
18270
18271 if test "X$x" = "X$element"; then
18272 haveit=yes
18273 break
18274 fi
18275 done
18276 if test -z "$haveit"; then
18277 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18278 fi
18279 done
18280
18281
18282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18283$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 18284if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
18285 $as_echo_n "(cached) " >&6
18286else
18287
18288 ac_save_LIBS="$LIBS"
18289 LIBS="$LIBS $LIBBABELTRACE"
18290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18291/* end confdefs.h. */
18292#include <babeltrace/babeltrace.h>
18293 #include <babeltrace/ctf/events.h>
18294 #include <babeltrace/ctf/iterator.h>
18295int
18296main ()
18297{
18298struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18299 struct bt_ctf_event *event = NULL;
18300 const struct bt_definition *scope;
18301
13cdc2af 18302 pos->type = BT_SEEK_BEGIN;
65c749e7 18303 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
18304 scope = bt_ctf_get_top_level_scope (event,
18305 BT_STREAM_EVENT_HEADER);
18306 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18307
18308 ;
18309 return 0;
18310}
18311_ACEOF
18312if ac_fn_c_try_link "$LINENO"; then :
18313 ac_cv_libbabeltrace=yes
18314else
18315 ac_cv_libbabeltrace=no
18316fi
18317rm -f core conftest.err conftest.$ac_objext \
18318 conftest$ac_exeext conftest.$ac_ext
18319 LIBS="$ac_save_LIBS"
18320
18321fi
18322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18323$as_echo "$ac_cv_libbabeltrace" >&6; }
18324 if test "$ac_cv_libbabeltrace" = yes; then
18325 HAVE_LIBBABELTRACE=yes
18326
18327$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18328
18329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18330$as_echo_n "checking how to link with libbabeltrace... " >&6; }
18331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18332$as_echo "$LIBBABELTRACE" >&6; }
18333 else
18334 HAVE_LIBBABELTRACE=no
18335 CPPFLAGS="$ac_save_CPPFLAGS"
18336 LIBBABELTRACE=
18337 LTLIBBABELTRACE=
18338 fi
18339
18340
18341
18342
18343
18344
18345 CFLAGS=$saved_CFLAGS
18346
18347 if test "$HAVE_LIBBABELTRACE" != yes; then
18348 if test "$with_babeltrace" = yes; then
d0ac1c44 18349 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
18350 else
18351 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18352$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18353 fi
18354 fi
18355fi
18356
ccb1ba62
CB
18357# Check for xxhash
18358
18359# Check whether --with-xxhash was given.
18360if test "${with_xxhash+set}" = set; then :
18361 withval=$with_xxhash;
18362else
18363 with_xxhash=auto
18364fi
18365
18366
18367if test "x$with_xxhash" != "xno"; then
18368
18369
18370
18371
18372
18373
18374
18375
18376 use_additional=yes
18377
18378 acl_save_prefix="$prefix"
18379 prefix="$acl_final_prefix"
18380 acl_save_exec_prefix="$exec_prefix"
18381 exec_prefix="$acl_final_exec_prefix"
18382
18383 eval additional_includedir=\"$includedir\"
18384 eval additional_libdir=\"$libdir\"
18385
18386 exec_prefix="$acl_save_exec_prefix"
18387 prefix="$acl_save_prefix"
18388
18389
18390# Check whether --with-libxxhash-prefix was given.
18391if test "${with_libxxhash_prefix+set}" = set; then :
18392 withval=$with_libxxhash_prefix;
18393 if test "X$withval" = "Xno"; then
18394 use_additional=no
18395 else
18396 if test "X$withval" = "X"; then
18397
18398 acl_save_prefix="$prefix"
18399 prefix="$acl_final_prefix"
18400 acl_save_exec_prefix="$exec_prefix"
18401 exec_prefix="$acl_final_exec_prefix"
18402
18403 eval additional_includedir=\"$includedir\"
18404 eval additional_libdir=\"$libdir\"
18405
18406 exec_prefix="$acl_save_exec_prefix"
18407 prefix="$acl_save_prefix"
18408
18409 else
18410 additional_includedir="$withval/include"
18411 additional_libdir="$withval/lib"
18412 fi
18413 fi
18414
18415fi
18416
18417 LIBXXHASH=
18418 LTLIBXXHASH=
18419 INCXXHASH=
18420 rpathdirs=
18421 ltrpathdirs=
18422 names_already_handled=
18423 names_next_round='xxhash '
18424 while test -n "$names_next_round"; do
18425 names_this_round="$names_next_round"
18426 names_next_round=
18427 for name in $names_this_round; do
18428 already_handled=
18429 for n in $names_already_handled; do
18430 if test "$n" = "$name"; then
18431 already_handled=yes
18432 break
18433 fi
18434 done
18435 if test -z "$already_handled"; then
18436 names_already_handled="$names_already_handled $name"
18437 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18438 eval value=\"\$HAVE_LIB$uppername\"
18439 if test -n "$value"; then
18440 if test "$value" = yes; then
18441 eval value=\"\$LIB$uppername\"
18442 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18443 eval value=\"\$LTLIB$uppername\"
18444 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18445 else
18446 :
18447 fi
18448 else
18449 found_dir=
18450 found_la=
18451 found_so=
18452 found_a=
18453 if test $use_additional = yes; then
18454 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
18455 found_dir="$additional_libdir"
18456 found_so="$additional_libdir/lib$name.$shlibext"
18457 if test -f "$additional_libdir/lib$name.la"; then
18458 found_la="$additional_libdir/lib$name.la"
18459 fi
18460 else
18461 if test -f "$additional_libdir/lib$name.$libext"; then
18462 found_dir="$additional_libdir"
18463 found_a="$additional_libdir/lib$name.$libext"
18464 if test -f "$additional_libdir/lib$name.la"; then
18465 found_la="$additional_libdir/lib$name.la"
18466 fi
18467 fi
18468 fi
18469 fi
18470 if test "X$found_dir" = "X"; then
18471 for x in $LDFLAGS $LTLIBXXHASH; do
18472
18473 acl_save_prefix="$prefix"
18474 prefix="$acl_final_prefix"
18475 acl_save_exec_prefix="$exec_prefix"
18476 exec_prefix="$acl_final_exec_prefix"
18477 eval x=\"$x\"
18478 exec_prefix="$acl_save_exec_prefix"
18479 prefix="$acl_save_prefix"
18480
18481 case "$x" in
18482 -L*)
18483 dir=`echo "X$x" | sed -e 's/^X-L//'`
18484 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
18485 found_dir="$dir"
18486 found_so="$dir/lib$name.$shlibext"
18487 if test -f "$dir/lib$name.la"; then
18488 found_la="$dir/lib$name.la"
18489 fi
18490 else
18491 if test -f "$dir/lib$name.$libext"; then
18492 found_dir="$dir"
18493 found_a="$dir/lib$name.$libext"
18494 if test -f "$dir/lib$name.la"; then
18495 found_la="$dir/lib$name.la"
18496 fi
18497 fi
18498 fi
18499 ;;
18500 esac
18501 if test "X$found_dir" != "X"; then
18502 break
18503 fi
18504 done
18505 fi
18506 if test "X$found_dir" != "X"; then
18507 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18508 if test "X$found_so" != "X"; then
18509 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18510 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18511 else
18512 haveit=
18513 for x in $ltrpathdirs; do
18514 if test "X$x" = "X$found_dir"; then
18515 haveit=yes
18516 break
18517 fi
18518 done
18519 if test -z "$haveit"; then
18520 ltrpathdirs="$ltrpathdirs $found_dir"
18521 fi
18522 if test "$hardcode_direct" = yes; then
18523 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18524 else
18525 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18526 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18527 haveit=
18528 for x in $rpathdirs; do
18529 if test "X$x" = "X$found_dir"; then
18530 haveit=yes
18531 break
18532 fi
18533 done
18534 if test -z "$haveit"; then
18535 rpathdirs="$rpathdirs $found_dir"
18536 fi
18537 else
18538 haveit=
18539 for x in $LDFLAGS $LIBXXHASH; do
18540
18541 acl_save_prefix="$prefix"
18542 prefix="$acl_final_prefix"
18543 acl_save_exec_prefix="$exec_prefix"
18544 exec_prefix="$acl_final_exec_prefix"
18545 eval x=\"$x\"
18546 exec_prefix="$acl_save_exec_prefix"
18547 prefix="$acl_save_prefix"
18548
18549 if test "X$x" = "X-L$found_dir"; then
18550 haveit=yes
18551 break
18552 fi
18553 done
18554 if test -z "$haveit"; then
18555 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18556 fi
18557 if test "$hardcode_minus_L" != no; then
18558 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18559 else
18560 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18561 fi
18562 fi
18563 fi
18564 fi
18565 else
18566 if test "X$found_a" != "X"; then
18567 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
18568 else
18569 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
18570 fi
18571 fi
18572 additional_includedir=
18573 case "$found_dir" in
18574 */lib | */lib/)
18575 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18576 additional_includedir="$basedir/include"
18577 ;;
18578 esac
18579 if test "X$additional_includedir" != "X"; then
18580 if test "X$additional_includedir" != "X/usr/include"; then
18581 haveit=
18582 if test "X$additional_includedir" = "X/usr/local/include"; then
18583 if test -n "$GCC"; then
18584 case $host_os in
18585 linux*) haveit=yes;;
18586 esac
18587 fi
18588 fi
18589 if test -z "$haveit"; then
18590 for x in $CPPFLAGS $INCXXHASH; do
18591
18592 acl_save_prefix="$prefix"
18593 prefix="$acl_final_prefix"
18594 acl_save_exec_prefix="$exec_prefix"
18595 exec_prefix="$acl_final_exec_prefix"
18596 eval x=\"$x\"
18597 exec_prefix="$acl_save_exec_prefix"
18598 prefix="$acl_save_prefix"
18599
18600 if test "X$x" = "X-I$additional_includedir"; then
18601 haveit=yes
18602 break
18603 fi
18604 done
18605 if test -z "$haveit"; then
18606 if test -d "$additional_includedir"; then
18607 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
18608 fi
18609 fi
18610 fi
18611 fi
18612 fi
18613 if test -n "$found_la"; then
18614 save_libdir="$libdir"
18615 case "$found_la" in
18616 */* | *\\*) . "$found_la" ;;
18617 *) . "./$found_la" ;;
18618 esac
18619 libdir="$save_libdir"
18620 for dep in $dependency_libs; do
18621 case "$dep" in
18622 -L*)
18623 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18624 if test "X$additional_libdir" != "X/usr/lib"; then
18625 haveit=
18626 if test "X$additional_libdir" = "X/usr/local/lib"; then
18627 if test -n "$GCC"; then
18628 case $host_os in
18629 linux*) haveit=yes;;
18630 esac
18631 fi
18632 fi
18633 if test -z "$haveit"; then
18634 haveit=
18635 for x in $LDFLAGS $LIBXXHASH; do
18636
18637 acl_save_prefix="$prefix"
18638 prefix="$acl_final_prefix"
18639 acl_save_exec_prefix="$exec_prefix"
18640 exec_prefix="$acl_final_exec_prefix"
18641 eval x=\"$x\"
18642 exec_prefix="$acl_save_exec_prefix"
18643 prefix="$acl_save_prefix"
18644
18645 if test "X$x" = "X-L$additional_libdir"; then
18646 haveit=yes
18647 break
18648 fi
18649 done
18650 if test -z "$haveit"; then
18651 if test -d "$additional_libdir"; then
18652 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
18653 fi
18654 fi
18655 haveit=
18656 for x in $LDFLAGS $LTLIBXXHASH; do
18657
18658 acl_save_prefix="$prefix"
18659 prefix="$acl_final_prefix"
18660 acl_save_exec_prefix="$exec_prefix"
18661 exec_prefix="$acl_final_exec_prefix"
18662 eval x=\"$x\"
18663 exec_prefix="$acl_save_exec_prefix"
18664 prefix="$acl_save_prefix"
18665
18666 if test "X$x" = "X-L$additional_libdir"; then
18667 haveit=yes
18668 break
18669 fi
18670 done
18671 if test -z "$haveit"; then
18672 if test -d "$additional_libdir"; then
18673 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
18674 fi
18675 fi
18676 fi
18677 fi
18678 ;;
18679 -R*)
18680 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18681 if test "$enable_rpath" != no; then
18682 haveit=
18683 for x in $rpathdirs; do
18684 if test "X$x" = "X$dir"; then
18685 haveit=yes
18686 break
18687 fi
18688 done
18689 if test -z "$haveit"; then
18690 rpathdirs="$rpathdirs $dir"
18691 fi
18692 haveit=
18693 for x in $ltrpathdirs; do
18694 if test "X$x" = "X$dir"; then
18695 haveit=yes
18696 break
18697 fi
18698 done
18699 if test -z "$haveit"; then
18700 ltrpathdirs="$ltrpathdirs $dir"
18701 fi
18702 fi
18703 ;;
18704 -l*)
18705 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18706 ;;
18707 *.la)
18708 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18709 ;;
18710 *)
18711 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
18712 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
18713 ;;
18714 esac
18715 done
18716 fi
18717 else
18718 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18719 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
18720 fi
18721 fi
18722 fi
18723 done
18724 done
18725 if test "X$rpathdirs" != "X"; then
18726 if test -n "$hardcode_libdir_separator"; then
18727 alldirs=
18728 for found_dir in $rpathdirs; do
18729 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18730 done
18731 acl_save_libdir="$libdir"
18732 libdir="$alldirs"
18733 eval flag=\"$hardcode_libdir_flag_spec\"
18734 libdir="$acl_save_libdir"
18735 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18736 else
18737 for found_dir in $rpathdirs; do
18738 acl_save_libdir="$libdir"
18739 libdir="$found_dir"
18740 eval flag=\"$hardcode_libdir_flag_spec\"
18741 libdir="$acl_save_libdir"
18742 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18743 done
18744 fi
18745 fi
18746 if test "X$ltrpathdirs" != "X"; then
18747 for found_dir in $ltrpathdirs; do
18748 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
18749 done
18750 fi
18751
18752
18753 ac_save_CPPFLAGS="$CPPFLAGS"
18754
18755 for element in $INCXXHASH; do
18756 haveit=
18757 for x in $CPPFLAGS; do
18758
18759 acl_save_prefix="$prefix"
18760 prefix="$acl_final_prefix"
18761 acl_save_exec_prefix="$exec_prefix"
18762 exec_prefix="$acl_final_exec_prefix"
18763 eval x=\"$x\"
18764 exec_prefix="$acl_save_exec_prefix"
18765 prefix="$acl_save_prefix"
18766
18767 if test "X$x" = "X$element"; then
18768 haveit=yes
18769 break
18770 fi
18771 done
18772 if test -z "$haveit"; then
18773 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18774 fi
18775 done
18776
18777
18778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
18779$as_echo_n "checking for libxxhash... " >&6; }
18780if ${ac_cv_libxxhash+:} false; then :
18781 $as_echo_n "(cached) " >&6
18782else
18783
18784 ac_save_LIBS="$LIBS"
18785 LIBS="$LIBS $LIBXXHASH"
18786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18787/* end confdefs.h. */
18788#include <xxhash.h>
18789int
18790main ()
18791{
18792XXH32("foo", 3, 0);
18793
18794 ;
18795 return 0;
18796}
18797_ACEOF
18798if ac_fn_c_try_link "$LINENO"; then :
18799 ac_cv_libxxhash=yes
18800else
18801 ac_cv_libxxhash=no
18802fi
18803rm -f core conftest.err conftest.$ac_objext \
18804 conftest$ac_exeext conftest.$ac_ext
18805 LIBS="$ac_save_LIBS"
18806
18807fi
18808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
18809$as_echo "$ac_cv_libxxhash" >&6; }
18810 if test "$ac_cv_libxxhash" = yes; then
18811 HAVE_LIBXXHASH=yes
18812
18813$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
18814
18815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
18816$as_echo_n "checking how to link with libxxhash... " >&6; }
18817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
18818$as_echo "$LIBXXHASH" >&6; }
18819 else
18820 HAVE_LIBXXHASH=no
18821 CPPFLAGS="$ac_save_CPPFLAGS"
18822 LIBXXHASH=
18823 LTLIBXXHASH=
18824 fi
18825
18826
18827
18828
18829
18830
18831 if test "$HAVE_LIBXXHASH" != yes; then
18832 if test "$with_xxhash" = yes; then
18833 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
18834 fi
18835 fi
18836 if test "x$with_xxhash" = "xauto"; then
18837 with_xxhash="$HAVE_LIBXXHASH"
18838 fi
18839fi
18840
18841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
18842$as_echo_n "checking whether to use xxhash... " >&6; }
18843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
18844$as_echo "$with_xxhash" >&6; }
18845
a0a461e5 18846NM_H=
c906108c
SS
18847rm -f nm.h
18848if test "${nativefile}" != ""; then
0f475e27
AC
18849 case "${nativefile}" in
18850 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
18851 * ) GDB_NM_FILE="${nativefile}"
18852 esac
a0a461e5
TT
18853 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
18854
60ca704f
SE
18855
18856cat >>confdefs.h <<_ACEOF
b78960be 18857#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 18858_ACEOF
5a2402b8 18859
a0a461e5 18860 NM_H=nm.h
c906108c 18861fi
5a2402b8
AC
18862
18863
a0a461e5 18864
e3487908
GKB
18865for ac_prog in xsltproc
18866do
18867 # Extract the first word of "$ac_prog", so it can be a program name with args.
18868set dummy $ac_prog; ac_word=$2
18869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18870$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 18871if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
18872 $as_echo_n "(cached) " >&6
18873else
18874 case $XSLTPROC in
18875 [\\/]* | ?:[\\/]*)
18876 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18877 ;;
18878 *)
18879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18880for as_dir in $PATH
18881do
18882 IFS=$as_save_IFS
18883 test -z "$as_dir" && as_dir=.
18884 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 18885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
18886 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18888 break 2
18889 fi
18890done
18891 done
18892IFS=$as_save_IFS
18893
18894 ;;
18895esac
18896fi
18897XSLTPROC=$ac_cv_path_XSLTPROC
18898if test -n "$XSLTPROC"; then
18899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18900$as_echo "$XSLTPROC" >&6; }
18901else
18902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18903$as_echo "no" >&6; }
18904fi
18905
18906
18907 test -n "$XSLTPROC" && break
18908done
18909test -n "$XSLTPROC" || XSLTPROC="missing"
18910
18911if test "x$USE_MAINTAINER_MODE" = xyes; then
18912 if test "${XSLTPROC}" = missing; then
d0ac1c44 18913 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
18914 fi
18915fi
18916
18917
c906108c
SS
18918
18919
c906108c 18920
81ecdfbb 18921$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 18922
bec39cab 18923
8ecfd7bd
SDJ
18924
18925# Check whether we will enable the inclusion of unit tests when
18926# compiling GDB.
18927#
18928# The default value of this option changes depending whether we're on
18929# development mode (in which case it's "true") or not (in which case
18930# it's "false").
18931# Check whether --enable-unit-tests was given.
18932if test "${enable_unit_tests+set}" = set; then :
18933 enableval=$enable_unit_tests; case "${enableval}" in
18934 yes) enable_unittests=true ;;
18935 no) enable_unittests=false ;;
18936 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
18937esac
18938else
18939 enable_unittests=$development
18940fi
18941
18942
18943if $enable_unittests; then
dcd1f979
TT
18944
18945$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
18946
8ecfd7bd 18947
01027315
TT
18948 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) selftest-arch.o"
18949 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) selftest-arch.c"
8ecfd7bd 18950
dcd1f979
TT
18951fi
18952
b292c783 18953
8ecfd7bd 18954
f6a88844
JM
18955 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
18956 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
18957 if test "x$GDB_TRANSFORM_NAME" = x; then
18958 GDB_TRANSFORM_NAME=gdb
18959 fi
18960
18961
18962
18963 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
18964 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
18965 if test "x$GCORE_TRANSFORM_NAME" = x; then
18966 GCORE_TRANSFORM_NAME=gcore
18967 fi
18968
b292c783
JK
18969
18970ac_config_files="$ac_config_files gcore"
18971
141ec9f6 18972ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 18973
89a34d1b 18974
bec39cab
AC
18975cat >confcache <<\_ACEOF
18976# This file is a shell script that caches the results of configure
18977# tests run on this system so they can be shared between configure
18978# scripts and configure runs, see configure's option --config-cache.
18979# It is not useful on other systems. If it contains results you don't
18980# want to keep, you may remove or edit it.
18981#
18982# config.status only pays attention to the cache file if you give it
18983# the --recheck option to rerun configure.
18984#
18985# `ac_cv_env_foo' variables (set or unset) will be overridden when
18986# loading this file, other *unset* `ac_cv_foo' will be assigned the
18987# following values.
18988
18989_ACEOF
18990
18991# The following way of writing the cache mishandles newlines in values,
18992# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 18993# So, we kill variables containing newlines.
bec39cab
AC
18994# Ultrix sh set writes to stderr and can't be redirected directly,
18995# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
18996(
18997 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18998 eval ac_val=\$$ac_var
18999 case $ac_val in #(
19000 *${as_nl}*)
19001 case $ac_var in #(
19002 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19003$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19004 esac
19005 case $ac_var in #(
19006 _ | IFS | as_nl) ;; #(
19007 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19008 *) { eval $ac_var=; unset $ac_var;} ;;
19009 esac ;;
19010 esac
19011 done
19012
bec39cab 19013 (set) 2>&1 |
81ecdfbb
RW
19014 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19015 *${as_nl}ac_space=\ *)
19016 # `set' does not quote correctly, so add quotes: double-quote
19017 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
19018 sed -n \
19019 "s/'/'\\\\''/g;
19020 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 19021 ;; #(
bec39cab
AC
19022 *)
19023 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 19024 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 19025 ;;
81ecdfbb
RW
19026 esac |
19027 sort
19028) |
bec39cab 19029 sed '
81ecdfbb 19030 /^ac_cv_env_/b end
bec39cab 19031 t clear
81ecdfbb 19032 :clear
bec39cab
AC
19033 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19034 t end
81ecdfbb
RW
19035 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19036 :end' >>confcache
19037if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19038 if test -w "$cache_file"; then
d0ac1c44 19039 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
19040 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19041$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
19042 if test ! -f "$cache_file" || test -h "$cache_file"; then
19043 cat confcache >"$cache_file"
19044 else
19045 case $cache_file in #(
19046 */* | ?:*)
19047 mv -f confcache "$cache_file"$$ &&
19048 mv -f "$cache_file"$$ "$cache_file" ;; #(
19049 *)
19050 mv -f confcache "$cache_file" ;;
19051 esac
19052 fi
19053 fi
bec39cab 19054 else
81ecdfbb
RW
19055 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19056$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
19057 fi
19058fi
19059rm -f confcache
19060
19061test "x$prefix" = xNONE && prefix=$ac_default_prefix
19062# Let make expand exec_prefix.
19063test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19064
bec39cab
AC
19065DEFS=-DHAVE_CONFIG_H
19066
19067ac_libobjs=
19068ac_ltlibobjs=
d0ac1c44 19069U=
bec39cab
AC
19070for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19071 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
19072 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19073 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19074 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19075 # will be set to the directory where LIBOBJS objects are built.
19076 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19077 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
19078done
19079LIBOBJS=$ac_libobjs
19080
19081LTLIBOBJS=$ac_ltlibobjs
19082
19083
85981d60 19084if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 19085 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 19086Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 19087fi
4df42755 19088if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 19089 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
19090Usually this means the macro was only invoked conditionally." "$LINENO" 5
19091fi
19092if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 19093 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
19094Usually this means the macro was only invoked conditionally." "$LINENO" 5
19095fi
81ecdfbb
RW
19096
19097
d0ac1c44 19098: "${CONFIG_STATUS=./config.status}"
81ecdfbb 19099ac_write_fail=0
bec39cab
AC
19100ac_clean_files_save=$ac_clean_files
19101ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
19102{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19103$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19104as_write_fail=0
19105cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
19106#! $SHELL
19107# Generated by $as_me.
19108# Run this file to recreate the current configuration.
19109# Compiler output produced by configure, useful for debugging
19110# configure, is in config.log if it exists.
19111
19112debug=false
19113ac_cs_recheck=false
19114ac_cs_silent=false
bec39cab 19115
81ecdfbb
RW
19116SHELL=\${CONFIG_SHELL-$SHELL}
19117export SHELL
19118_ASEOF
19119cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19120## -------------------- ##
19121## M4sh Initialization. ##
19122## -------------------- ##
19123
19124# Be more Bourne compatible
19125DUALCASE=1; export DUALCASE # for MKS sh
19126if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
19127 emulate sh
19128 NULLCMD=:
81ecdfbb 19129 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
19130 # is contrary to our usage. Disable this feature.
19131 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
19132 setopt NO_GLOB_SUBST
19133else
19134 case `(set -o) 2>/dev/null` in #(
19135 *posix*) :
19136 set -o posix ;; #(
19137 *) :
19138 ;;
19139esac
bec39cab 19140fi
bec39cab 19141
81ecdfbb
RW
19142
19143as_nl='
19144'
19145export as_nl
19146# Printing a long string crashes Solaris 7 /usr/bin/printf.
19147as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19148as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19149as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19150# Prefer a ksh shell builtin over an external printf program on Solaris,
19151# but without wasting forks for bash or zsh.
19152if test -z "$BASH_VERSION$ZSH_VERSION" \
19153 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19154 as_echo='print -r --'
19155 as_echo_n='print -rn --'
19156elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19157 as_echo='printf %s\n'
19158 as_echo_n='printf %s'
19159else
19160 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19161 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19162 as_echo_n='/usr/ucb/echo -n'
19163 else
19164 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19165 as_echo_n_body='eval
19166 arg=$1;
19167 case $arg in #(
19168 *"$as_nl"*)
19169 expr "X$arg" : "X\\(.*\\)$as_nl";
19170 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19171 esac;
19172 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19173 '
19174 export as_echo_n_body
19175 as_echo_n='sh -c $as_echo_n_body as_echo'
19176 fi
19177 export as_echo_body
19178 as_echo='sh -c $as_echo_body as_echo'
19179fi
19180
19181# The user is always right.
19182if test "${PATH_SEPARATOR+set}" != set; then
19183 PATH_SEPARATOR=:
19184 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19185 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19186 PATH_SEPARATOR=';'
19187 }
bec39cab
AC
19188fi
19189
19190
81ecdfbb
RW
19191# IFS
19192# We need space, tab and new line, in precisely that order. Quoting is
19193# there to prevent editors from complaining about space-tab.
19194# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19195# splitting by setting IFS to empty value.)
19196IFS=" "" $as_nl"
19197
19198# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 19199as_myself=
81ecdfbb
RW
19200case $0 in #((
19201 *[\\/]* ) as_myself=$0 ;;
19202 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19203for as_dir in $PATH
19204do
19205 IFS=$as_save_IFS
19206 test -z "$as_dir" && as_dir=.
19207 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19208 done
19209IFS=$as_save_IFS
19210
19211 ;;
19212esac
19213# We did not find ourselves, most probably we were run as `sh COMMAND'
19214# in which case we are not to be found in the path.
19215if test "x$as_myself" = x; then
19216 as_myself=$0
19217fi
19218if test ! -f "$as_myself"; then
19219 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19220 exit 1
19221fi
19222
19223# Unset variables that we do not need and which cause bugs (e.g. in
19224# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19225# suppresses any "Segmentation fault" message there. '((' could
19226# trigger a bug in pdksh 5.2.14.
19227for as_var in BASH_ENV ENV MAIL MAILPATH
19228do eval test x\${$as_var+set} = xset \
19229 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19230done
bec39cab
AC
19231PS1='$ '
19232PS2='> '
19233PS4='+ '
19234
19235# NLS nuisances.
81ecdfbb
RW
19236LC_ALL=C
19237export LC_ALL
19238LANGUAGE=C
19239export LANGUAGE
19240
19241# CDPATH.
19242(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19243
19244
d0ac1c44
SM
19245# as_fn_error STATUS ERROR [LINENO LOG_FD]
19246# ----------------------------------------
81ecdfbb
RW
19247# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19248# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 19249# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
19250as_fn_error ()
19251{
d0ac1c44
SM
19252 as_status=$1; test $as_status -eq 0 && as_status=1
19253 if test "$4"; then
19254 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19255 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 19256 fi
d0ac1c44 19257 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
19258 as_fn_exit $as_status
19259} # as_fn_error
19260
19261
19262# as_fn_set_status STATUS
19263# -----------------------
19264# Set $? to STATUS, without forking.
19265as_fn_set_status ()
19266{
19267 return $1
19268} # as_fn_set_status
19269
19270# as_fn_exit STATUS
19271# -----------------
19272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19273as_fn_exit ()
19274{
19275 set +e
19276 as_fn_set_status $1
19277 exit $1
19278} # as_fn_exit
19279
19280# as_fn_unset VAR
19281# ---------------
19282# Portably unset VAR.
19283as_fn_unset ()
19284{
19285 { eval $1=; unset $1;}
19286}
19287as_unset=as_fn_unset
19288# as_fn_append VAR VALUE
19289# ----------------------
19290# Append the text in VALUE to the end of the definition contained in VAR. Take
19291# advantage of any shell optimizations that allow amortized linear growth over
19292# repeated appends, instead of the typical quadratic growth present in naive
19293# implementations.
19294if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19295 eval 'as_fn_append ()
19296 {
19297 eval $1+=\$2
19298 }'
19299else
19300 as_fn_append ()
19301 {
19302 eval $1=\$$1\$2
19303 }
19304fi # as_fn_append
19305
19306# as_fn_arith ARG...
19307# ------------------
19308# Perform arithmetic evaluation on the ARGs, and store the result in the
19309# global $as_val. Take advantage of shells that can avoid forks. The arguments
19310# must be portable across $(()) and expr.
19311if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19312 eval 'as_fn_arith ()
19313 {
19314 as_val=$(( $* ))
19315 }'
19316else
19317 as_fn_arith ()
19318 {
19319 as_val=`expr "$@" || test $? -eq 1`
19320 }
19321fi # as_fn_arith
bec39cab 19322
81ecdfbb
RW
19323
19324if expr a : '\(a\)' >/dev/null 2>&1 &&
19325 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
19326 as_expr=expr
19327else
19328 as_expr=false
19329fi
19330
81ecdfbb 19331if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
19332 as_basename=basename
19333else
19334 as_basename=false
19335fi
19336
81ecdfbb
RW
19337if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19338 as_dirname=dirname
19339else
19340 as_dirname=false
19341fi
bec39cab 19342
81ecdfbb 19343as_me=`$as_basename -- "$0" ||
bec39cab
AC
19344$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19345 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
19346 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19347$as_echo X/"$0" |
19348 sed '/^.*\/\([^/][^/]*\)\/*$/{
19349 s//\1/
19350 q
19351 }
19352 /^X\/\(\/\/\)$/{
19353 s//\1/
19354 q
19355 }
19356 /^X\/\(\/\).*/{
19357 s//\1/
19358 q
19359 }
19360 s/.*/./; q'`
b4e70030 19361
b4e70030
JB
19362# Avoid depending upon Character Ranges.
19363as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19364as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19365as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19366as_cr_digits='0123456789'
19367as_cr_alnum=$as_cr_Letters$as_cr_digits
19368
81ecdfbb
RW
19369ECHO_C= ECHO_N= ECHO_T=
19370case `echo -n x` in #(((((
19371-n*)
19372 case `echo 'xy\c'` in
19373 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19374 xy) ECHO_C='\c';;
19375 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19376 ECHO_T=' ';;
19377 esac;;
19378*)
19379 ECHO_N='-n';;
bec39cab
AC
19380esac
19381
81ecdfbb
RW
19382rm -f conf$$ conf$$.exe conf$$.file
19383if test -d conf$$.dir; then
19384 rm -f conf$$.dir/conf$$.file
bec39cab 19385else
81ecdfbb
RW
19386 rm -f conf$$.dir
19387 mkdir conf$$.dir 2>/dev/null
bec39cab 19388fi
81ecdfbb
RW
19389if (echo >conf$$.file) 2>/dev/null; then
19390 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 19391 as_ln_s='ln -s'
81ecdfbb
RW
19392 # ... but there are two gotchas:
19393 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19394 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 19395 # In both cases, we have to default to `cp -pR'.
81ecdfbb 19396 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 19397 as_ln_s='cp -pR'
81ecdfbb
RW
19398 elif ln conf$$.file conf$$ 2>/dev/null; then
19399 as_ln_s=ln
19400 else
d0ac1c44 19401 as_ln_s='cp -pR'
b4e70030 19402 fi
bec39cab 19403else
d0ac1c44 19404 as_ln_s='cp -pR'
bec39cab 19405fi
81ecdfbb
RW
19406rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19407rmdir conf$$.dir 2>/dev/null
19408
19409
19410# as_fn_mkdir_p
19411# -------------
19412# Create "$as_dir" as a directory, including parents if necessary.
19413as_fn_mkdir_p ()
19414{
19415
19416 case $as_dir in #(
19417 -*) as_dir=./$as_dir;;
19418 esac
19419 test -d "$as_dir" || eval $as_mkdir_p || {
19420 as_dirs=
19421 while :; do
19422 case $as_dir in #(
19423 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19424 *) as_qdir=$as_dir;;
19425 esac
19426 as_dirs="'$as_qdir' $as_dirs"
19427 as_dir=`$as_dirname -- "$as_dir" ||
19428$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19429 X"$as_dir" : 'X\(//\)[^/]' \| \
19430 X"$as_dir" : 'X\(//\)$' \| \
19431 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19432$as_echo X"$as_dir" |
19433 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19434 s//\1/
19435 q
19436 }
19437 /^X\(\/\/\)[^/].*/{
19438 s//\1/
19439 q
19440 }
19441 /^X\(\/\/\)$/{
19442 s//\1/
19443 q
19444 }
19445 /^X\(\/\).*/{
19446 s//\1/
19447 q
19448 }
19449 s/.*/./; q'`
19450 test -d "$as_dir" && break
19451 done
19452 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 19453 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 19454
bec39cab 19455
81ecdfbb 19456} # as_fn_mkdir_p
bec39cab 19457if mkdir -p . 2>/dev/null; then
81ecdfbb 19458 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
19459else
19460 test -d ./-p && rmdir ./-p
19461 as_mkdir_p=false
19462fi
19463
d0ac1c44
SM
19464
19465# as_fn_executable_p FILE
19466# -----------------------
19467# Test if FILE is an executable regular file.
19468as_fn_executable_p ()
19469{
19470 test -f "$1" && test -x "$1"
19471} # as_fn_executable_p
19472as_test_x='test -x'
19473as_executable_p=as_fn_executable_p
bec39cab
AC
19474
19475# Sed expression to map a string onto a valid CPP name.
19476as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19477
19478# Sed expression to map a string onto a valid variable name.
19479as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19480
19481
bec39cab 19482exec 6>&1
81ecdfbb
RW
19483## ----------------------------------- ##
19484## Main body of $CONFIG_STATUS script. ##
19485## ----------------------------------- ##
19486_ASEOF
19487test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19488
19489cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19490# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 19491# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
19492# values after options handling.
19493ac_log="
bec39cab 19494This file was extended by $as_me, which was
d0ac1c44 19495generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
19496
19497 CONFIG_FILES = $CONFIG_FILES
19498 CONFIG_HEADERS = $CONFIG_HEADERS
19499 CONFIG_LINKS = $CONFIG_LINKS
19500 CONFIG_COMMANDS = $CONFIG_COMMANDS
19501 $ $0 $@
19502
81ecdfbb
RW
19503on `(hostname || uname -n) 2>/dev/null | sed 1q`
19504"
19505
bec39cab
AC
19506_ACEOF
19507
81ecdfbb
RW
19508case $ac_config_files in *"
19509"*) set x $ac_config_files; shift; ac_config_files=$*;;
19510esac
234b45d4 19511
81ecdfbb
RW
19512case $ac_config_headers in *"
19513"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19514esac
b4e70030 19515
b4e70030 19516
81ecdfbb
RW
19517cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19518# Files that config.status was made for.
19519config_files="$ac_config_files"
19520config_headers="$ac_config_headers"
19521config_links="$ac_config_links"
19522config_commands="$ac_config_commands"
234b45d4 19523
81ecdfbb 19524_ACEOF
b4e70030 19525
81ecdfbb 19526cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 19527ac_cs_usage="\
81ecdfbb
RW
19528\`$as_me' instantiates files and other configuration actions
19529from templates according to the current configuration. Unless the files
19530and actions are specified as TAGs, all are instantiated by default.
234b45d4 19531
81ecdfbb 19532Usage: $0 [OPTION]... [TAG]...
234b45d4 19533
bec39cab 19534 -h, --help print this help, then exit
81ecdfbb 19535 -V, --version print version number and configuration settings, then exit
d0ac1c44 19536 --config print configuration, then exit
81ecdfbb
RW
19537 -q, --quiet, --silent
19538 do not print progress messages
bec39cab
AC
19539 -d, --debug don't remove temporary files
19540 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
19541 --file=FILE[:TEMPLATE]
19542 instantiate the configuration file FILE
19543 --header=FILE[:TEMPLATE]
19544 instantiate the configuration header FILE
234b45d4 19545
bec39cab
AC
19546Configuration files:
19547$config_files
234b45d4 19548
bec39cab
AC
19549Configuration headers:
19550$config_headers
234b45d4 19551
bec39cab
AC
19552Configuration links:
19553$config_links
234b45d4 19554
bec39cab
AC
19555Configuration commands:
19556$config_commands
19557
81ecdfbb 19558Report bugs to the package provider."
b4e70030 19559
81ecdfbb
RW
19560_ACEOF
19561cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 19562ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
19563ac_cs_version="\\
19564config.status
d0ac1c44
SM
19565configured by $0, generated by GNU Autoconf 2.69,
19566 with options \\"\$ac_cs_config\\"
bec39cab 19567
d0ac1c44 19568Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
19569This config.status script is free software; the Free Software Foundation
19570gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
19571
19572ac_pwd='$ac_pwd'
19573srcdir='$srcdir'
19574INSTALL='$INSTALL'
81ecdfbb
RW
19575AWK='$AWK'
19576test -n "\$AWK" || AWK=awk
bec39cab
AC
19577_ACEOF
19578
81ecdfbb
RW
19579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19580# The default lists apply if the user does not specify any file.
bec39cab
AC
19581ac_need_defaults=:
19582while test $# != 0
19583do
19584 case $1 in
d0ac1c44 19585 --*=?*)
81ecdfbb
RW
19586 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19587 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 19588 ac_shift=:
c906108c 19589 ;;
d0ac1c44
SM
19590 --*=)
19591 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19592 ac_optarg=
19593 ac_shift=:
19594 ;;
81ecdfbb 19595 *)
bec39cab
AC
19596 ac_option=$1
19597 ac_optarg=$2
19598 ac_shift=shift
c906108c 19599 ;;
bec39cab 19600 esac
c906108c 19601
bec39cab
AC
19602 case $ac_option in
19603 # Handling of the options.
bec39cab
AC
19604 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19605 ac_cs_recheck=: ;;
81ecdfbb
RW
19606 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19607 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
19608 --config | --confi | --conf | --con | --co | --c )
19609 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 19610 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
19611 debug=: ;;
19612 --file | --fil | --fi | --f )
19613 $ac_shift
81ecdfbb
RW
19614 case $ac_optarg in
19615 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 19616 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
19617 esac
19618 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
19619 ac_need_defaults=false;;
19620 --header | --heade | --head | --hea )
19621 $ac_shift
81ecdfbb
RW
19622 case $ac_optarg in
19623 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19624 esac
19625 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 19626 ac_need_defaults=false;;
81ecdfbb
RW
19627 --he | --h)
19628 # Conflict between --help and --header
d0ac1c44 19629 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
19630Try \`$0 --help' for more information.";;
19631 --help | --hel | -h )
19632 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
19633 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19634 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19635 ac_cs_silent=: ;;
c906108c 19636
bec39cab 19637 # This is an error.
d0ac1c44 19638 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 19639Try \`$0 --help' for more information." ;;
c906108c 19640
81ecdfbb
RW
19641 *) as_fn_append ac_config_targets " $1"
19642 ac_need_defaults=false ;;
c906108c 19643
bec39cab
AC
19644 esac
19645 shift
19646done
c906108c 19647
bec39cab 19648ac_configure_extra_args=
c906108c 19649
bec39cab
AC
19650if $ac_cs_silent; then
19651 exec 6>/dev/null
19652 ac_configure_extra_args="$ac_configure_extra_args --silent"
19653fi
c906108c 19654
bec39cab 19655_ACEOF
81ecdfbb 19656cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 19657if \$ac_cs_recheck; then
d0ac1c44 19658 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
19659 shift
19660 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19661 CONFIG_SHELL='$SHELL'
19662 export CONFIG_SHELL
19663 exec "\$@"
bec39cab
AC
19664fi
19665
19666_ACEOF
81ecdfbb
RW
19667cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19668exec 5>>config.log
19669{
19670 echo
19671 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19672## Running $as_me. ##
19673_ASBOX
19674 $as_echo "$ac_log"
19675} >&5
bec39cab 19676
81ecdfbb
RW
19677_ACEOF
19678cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 19679#
81ecdfbb 19680# INIT-COMMANDS
c906108c 19681#
a417dc56 19682ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 19683GDB_NM_FILE=$GDB_NM_FILE
b4e70030 19684
bec39cab
AC
19685_ACEOF
19686
81ecdfbb 19687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 19688
81ecdfbb 19689# Handling of arguments.
bec39cab 19690for ac_config_target in $ac_config_targets
c906108c 19691do
81ecdfbb
RW
19692 case $ac_config_target in
19693 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
19694 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 19695 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 19696 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 19697 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 19698 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 19699 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 19700 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 19701 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 19702 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 19703
d0ac1c44 19704 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
19705 esac
19706done
19707
81ecdfbb 19708
bec39cab
AC
19709# If the user did not use the arguments to specify the items to instantiate,
19710# then the envvar interface is used. Set only those that are not.
19711# We use the long form for the default assignment because of an extremely
19712# bizarre bug on SunOS 4.1.3.
19713if $ac_need_defaults; then
19714 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19715 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19716 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19717 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19718fi
19719
b4e70030 19720# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 19721# simply because there is no reason against having it here, and in addition,
b4e70030 19722# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
19723# Hook for its removal unless debugging.
19724# Note that there is a small window in which the directory will not be cleaned:
19725# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
19726$debug ||
19727{
d0ac1c44 19728 tmp= ac_tmp=
81ecdfbb 19729 trap 'exit_status=$?
d0ac1c44
SM
19730 : "${ac_tmp:=$tmp}"
19731 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
19732' 0
19733 trap 'as_fn_exit 1' 1 2 13 15
19734}
19735# Create a (secure) tmp directory for tmp files.
19736
19737{
19738 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 19739 test -d "$tmp"
81ecdfbb
RW
19740} ||
19741{
19742 tmp=./conf$$-$RANDOM
19743 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
19744} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19745ac_tmp=$tmp
81ecdfbb
RW
19746
19747# Set up the scripts for CONFIG_FILES section.
19748# No need to generate them if there are no CONFIG_FILES.
19749# This happens for instance with `./config.status config.h'.
19750if test -n "$CONFIG_FILES"; then
19751
19752if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
19753 ac_cs_awk_getline=:
19754 ac_cs_awk_pipe_init=
19755 ac_cs_awk_read_file='
19756 while ((getline aline < (F[key])) > 0)
19757 print(aline)
19758 close(F[key])'
19759 ac_cs_awk_pipe_fini=
19760else
19761 ac_cs_awk_getline=false
19762 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
19763 ac_cs_awk_read_file='
19764 print "|#_!!_#|"
19765 print "cat " F[key] " &&"
19766 '$ac_cs_awk_pipe_init
19767 # The final `:' finishes the AND list.
19768 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
19769fi
19770ac_cr=`echo X | tr X '\015'`
19771# On cygwin, bash can eat \r inside `` if the user requested igncr.
19772# But we know of no other shell where ac_cr would be empty at this
19773# point, so we can use a bashism as a fallback.
19774if test "x$ac_cr" = x; then
19775 eval ac_cr=\$\'\\r\'
19776fi
19777ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19778if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 19779 ac_cs_awk_cr='\\r'
81ecdfbb
RW
19780else
19781 ac_cs_awk_cr=$ac_cr
19782fi
19783
d0ac1c44 19784echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
19785_ACEOF
19786
19787# Create commands to substitute file output variables.
19788{
19789 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 19790 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
19791 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
19792 echo "_ACAWK" &&
19793 echo "_ACEOF"
19794} >conf$$files.sh &&
19795. ./conf$$files.sh ||
d0ac1c44 19796 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19797rm -f conf$$files.sh
19798
19799{
19800 echo "cat >conf$$subs.awk <<_ACEOF" &&
19801 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19802 echo "_ACEOF"
19803} >conf$$subs.sh ||
d0ac1c44
SM
19804 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19805ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
19806ac_delim='%!_!# '
19807for ac_last_try in false false false false false :; do
19808 . ./conf$$subs.sh ||
d0ac1c44 19809 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19810
19811 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19812 if test $ac_delim_n = $ac_delim_num; then
19813 break
19814 elif $ac_last_try; then
d0ac1c44 19815 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19816 else
19817 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19818 fi
19819done
19820rm -f conf$$subs.sh
19821
19822cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 19823cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
19824_ACEOF
19825sed -n '
19826h
19827s/^/S["/; s/!.*/"]=/
19828p
19829g
19830s/^[^!]*!//
19831:repl
19832t repl
19833s/'"$ac_delim"'$//
19834t delim
19835:nl
19836h
d0ac1c44 19837s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
19838t more1
19839s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19840p
19841n
19842b repl
19843:more1
19844s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19845p
19846g
19847s/.\{148\}//
19848t nl
19849:delim
19850h
d0ac1c44 19851s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
19852t more2
19853s/["\\]/\\&/g; s/^/"/; s/$/"/
19854p
19855b
19856:more2
19857s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19858p
19859g
19860s/.\{148\}//
19861t delim
19862' <conf$$subs.awk | sed '
19863/^[^""]/{
19864 N
19865 s/\n//
19866}
19867' >>$CONFIG_STATUS || ac_write_fail=1
19868rm -f conf$$subs.awk
19869cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19870_ACAWK
d0ac1c44 19871cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
19872 for (key in S) S_is_set[key] = 1
19873 FS = "\a"
19874 \$ac_cs_awk_pipe_init
19875}
19876{
19877 line = $ 0
19878 nfields = split(line, field, "@")
19879 substed = 0
19880 len = length(field[1])
19881 for (i = 2; i < nfields; i++) {
19882 key = field[i]
19883 keylen = length(key)
19884 if (S_is_set[key]) {
19885 value = S[key]
19886 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19887 len += length(value) + length(field[++i])
19888 substed = 1
19889 } else
19890 len += 1 + keylen
19891 }
19892 if (nfields == 3 && !substed) {
19893 key = field[2]
19894 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
19895 \$ac_cs_awk_read_file
19896 next
19897 }
19898 }
19899 print line
b4e70030 19900}
81ecdfbb
RW
19901\$ac_cs_awk_pipe_fini
19902_ACAWK
19903_ACEOF
19904cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19905if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19906 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19907else
19908 cat
d0ac1c44
SM
19909fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19910 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
19911_ACEOF
19912
d0ac1c44
SM
19913# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19914# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
19915# trailing colons and then remove the whole line if VPATH becomes empty
19916# (actually we leave an empty line to preserve line numbers).
19917if test "x$srcdir" = x.; then
d0ac1c44
SM
19918 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19919h
19920s///
19921s/^/:/
19922s/[ ]*$/:/
19923s/:\$(srcdir):/:/g
19924s/:\${srcdir}:/:/g
19925s/:@srcdir@:/:/g
19926s/^:*//
81ecdfbb 19927s/:*$//
d0ac1c44
SM
19928x
19929s/\(=[ ]*\).*/\1/
19930G
19931s/\n//
81ecdfbb
RW
19932s/^[^=]*=[ ]*$//
19933}'
19934fi
19935
19936cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19937fi # test -n "$CONFIG_FILES"
19938
19939# Set up the scripts for CONFIG_HEADERS section.
19940# No need to generate them if there are no CONFIG_HEADERS.
19941# This happens for instance with `./config.status Makefile'.
19942if test -n "$CONFIG_HEADERS"; then
d0ac1c44 19943cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
19944BEGIN {
19945_ACEOF
19946
19947# Transform confdefs.h into an awk script `defines.awk', embedded as
19948# here-document in config.status, that substitutes the proper values into
19949# config.h.in to produce config.h.
4e8d927d 19950
81ecdfbb
RW
19951# Create a delimiter string that does not exist in confdefs.h, to ease
19952# handling of long lines.
19953ac_delim='%!_!# '
19954for ac_last_try in false false :; do
d0ac1c44
SM
19955 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19956 if test -z "$ac_tt"; then
81ecdfbb
RW
19957 break
19958 elif $ac_last_try; then
d0ac1c44 19959 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
19960 else
19961 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19962 fi
19963done
4e8d927d 19964
81ecdfbb
RW
19965# For the awk script, D is an array of macro values keyed by name,
19966# likewise P contains macro parameters if any. Preserve backslash
19967# newline sequences.
19968
19969ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19970sed -n '
19971s/.\{148\}/&'"$ac_delim"'/g
19972t rset
19973:rset
19974s/^[ ]*#[ ]*define[ ][ ]*/ /
19975t def
19976d
19977:def
19978s/\\$//
19979t bsnl
19980s/["\\]/\\&/g
19981s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19982D["\1"]=" \3"/p
19983s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
19984d
19985:bsnl
19986s/["\\]/\\&/g
19987s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19988D["\1"]=" \3\\\\\\n"\\/p
19989t cont
19990s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19991t cont
19992d
19993:cont
19994n
19995s/.\{148\}/&'"$ac_delim"'/g
19996t clear
19997:clear
19998s/\\$//
19999t bsnlc
20000s/["\\]/\\&/g; s/^/"/; s/$/"/p
20001d
20002:bsnlc
20003s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20004b cont
20005' <confdefs.h | sed '
20006s/'"$ac_delim"'/"\\\
20007"/g' >>$CONFIG_STATUS || ac_write_fail=1
20008
20009cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20010 for (key in D) D_is_set[key] = 1
20011 FS = "\a"
20012}
20013/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20014 line = \$ 0
20015 split(line, arg, " ")
20016 if (arg[1] == "#") {
20017 defundef = arg[2]
20018 mac1 = arg[3]
20019 } else {
20020 defundef = substr(arg[1], 2)
20021 mac1 = arg[2]
20022 }
20023 split(mac1, mac2, "(") #)
20024 macro = mac2[1]
20025 prefix = substr(line, 1, index(line, defundef) - 1)
20026 if (D_is_set[macro]) {
20027 # Preserve the white space surrounding the "#".
20028 print prefix "define", macro P[macro] D[macro]
20029 next
20030 } else {
20031 # Replace #undef with comments. This is necessary, for example,
20032 # in the case of _POSIX_SOURCE, which is predefined and required
20033 # on some systems where configure will not decide to define it.
20034 if (defundef == "undef") {
20035 print "/*", prefix defundef, macro, "*/"
20036 next
20037 }
20038 }
b4e70030 20039}
81ecdfbb
RW
20040{ print }
20041_ACAWK
b4e70030 20042_ACEOF
81ecdfbb 20043cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 20044 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 20045fi # test -n "$CONFIG_HEADERS"
4e8d927d 20046
4e8d927d 20047
81ecdfbb
RW
20048eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20049shift
20050for ac_tag
20051do
20052 case $ac_tag in
20053 :[FHLC]) ac_mode=$ac_tag; continue;;
20054 esac
20055 case $ac_mode$ac_tag in
20056 :[FHL]*:*);;
d0ac1c44 20057 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
20058 :[FH]-) ac_tag=-:-;;
20059 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20060 esac
20061 ac_save_IFS=$IFS
20062 IFS=:
20063 set x $ac_tag
20064 IFS=$ac_save_IFS
20065 shift
20066 ac_file=$1
20067 shift
4e8d927d 20068
81ecdfbb
RW
20069 case $ac_mode in
20070 :L) ac_source=$1;;
20071 :[FH])
20072 ac_file_inputs=
20073 for ac_f
20074 do
20075 case $ac_f in
d0ac1c44 20076 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
20077 *) # Look for the file first in the build tree, then in the source tree
20078 # (if the path is not absolute). The absolute path cannot be DOS-style,
20079 # because $ac_f cannot contain `:'.
20080 test -f "$ac_f" ||
20081 case $ac_f in
20082 [\\/$]*) false;;
20083 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20084 esac ||
d0ac1c44 20085 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
20086 esac
20087 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20088 as_fn_append ac_file_inputs " '$ac_f'"
20089 done
20090
20091 # Let's still pretend it is `configure' which instantiates (i.e., don't
20092 # use $as_me), people would be surprised to read:
20093 # /* config.h. Generated by config.status. */
20094 configure_input='Generated from '`
20095 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20096 `' by configure.'
20097 if test x"$ac_file" != x-; then
20098 configure_input="$ac_file. $configure_input"
20099 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20100$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 20101 fi
81ecdfbb
RW
20102 # Neutralize special characters interpreted by sed in replacement strings.
20103 case $configure_input in #(
20104 *\&* | *\|* | *\\* )
20105 ac_sed_conf_input=`$as_echo "$configure_input" |
20106 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20107 *) ac_sed_conf_input=$configure_input;;
20108 esac
4e8d927d 20109
81ecdfbb 20110 case $ac_tag in
d0ac1c44
SM
20111 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20112 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
20113 esac
20114 ;;
c906108c
SS
20115 esac
20116
81ecdfbb 20117 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
20118$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20119 X"$ac_file" : 'X\(//\)[^/]' \| \
20120 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
20121 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20122$as_echo X"$ac_file" |
20123 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20124 s//\1/
20125 q
20126 }
20127 /^X\(\/\/\)[^/].*/{
20128 s//\1/
20129 q
20130 }
20131 /^X\(\/\/\)$/{
20132 s//\1/
20133 q
20134 }
20135 /^X\(\/\).*/{
20136 s//\1/
20137 q
20138 }
20139 s/.*/./; q'`
20140 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20141 ac_builddir=.
20142
81ecdfbb
RW
20143case "$ac_dir" in
20144.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20145*)
20146 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20147 # A ".." for each directory in $ac_dir_suffix.
20148 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20149 case $ac_top_builddir_sub in
20150 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20151 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20152 esac ;;
20153esac
20154ac_abs_top_builddir=$ac_pwd
20155ac_abs_builddir=$ac_pwd$ac_dir_suffix
20156# for backward compatibility:
20157ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20158
20159case $srcdir in
81ecdfbb 20160 .) # We are building in place.
bec39cab 20161 ac_srcdir=.
81ecdfbb
RW
20162 ac_top_srcdir=$ac_top_builddir_sub
20163 ac_abs_top_srcdir=$ac_pwd ;;
20164 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20165 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20166 ac_top_srcdir=$srcdir
20167 ac_abs_top_srcdir=$srcdir ;;
20168 *) # Relative name.
20169 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20170 ac_top_srcdir=$ac_top_build_prefix$srcdir
20171 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20172esac
81ecdfbb 20173ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 20174
c906108c 20175
81ecdfbb
RW
20176 case $ac_mode in
20177 :F)
20178 #
20179 # CONFIG_FILE
20180 #
c906108c 20181
bec39cab
AC
20182 case $INSTALL in
20183 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 20184 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 20185 esac
81ecdfbb 20186_ACEOF
121ce6e5 20187
81ecdfbb
RW
20188cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20189# If the template does not know about datarootdir, expand it.
20190# FIXME: This hack should be removed a few years after 2.60.
20191ac_datarootdir_hack=; ac_datarootdir_seen=
20192ac_sed_dataroot='
20193/datarootdir/ {
20194 p
20195 q
20196}
20197/@datadir@/p
20198/@docdir@/p
20199/@infodir@/p
20200/@localedir@/p
20201/@mandir@/p'
20202case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20203*datarootdir*) ac_datarootdir_seen=yes;;
20204*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20205 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20206$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20207_ACEOF
20208cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20209 ac_datarootdir_hack='
20210 s&@datadir@&$datadir&g
20211 s&@docdir@&$docdir&g
20212 s&@infodir@&$infodir&g
20213 s&@localedir@&$localedir&g
20214 s&@mandir@&$mandir&g
20215 s&\\\${datarootdir}&$datarootdir&g' ;;
20216esac
4e8d927d 20217_ACEOF
81ecdfbb
RW
20218
20219# Neutralize VPATH when `$srcdir' = `.'.
20220# Shell code in configure.ac might set extrasub.
20221# FIXME: do we really want to maintain this feature?
20222cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20223ac_sed_extra="$ac_vpsub
bec39cab
AC
20224$extrasub
20225_ACEOF
81ecdfbb 20226cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
20227:t
20228/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
20229s|@configure_input@|$ac_sed_conf_input|;t t
20230s&@top_builddir@&$ac_top_builddir_sub&;t t
20231s&@top_build_prefix@&$ac_top_build_prefix&;t t
20232s&@srcdir@&$ac_srcdir&;t t
20233s&@abs_srcdir@&$ac_abs_srcdir&;t t
20234s&@top_srcdir@&$ac_top_srcdir&;t t
20235s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20236s&@builddir@&$ac_builddir&;t t
20237s&@abs_builddir@&$ac_abs_builddir&;t t
20238s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20239s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
20240$ac_datarootdir_hack
20241"
20242eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20243if $ac_cs_awk_getline; then
d0ac1c44 20244 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 20245else
d0ac1c44
SM
20246 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20247fi \
20248 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20249
20250test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
20251 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20252 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20253 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 20254 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20255which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 20256$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20257which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 20258
d0ac1c44 20259 rm -f "$ac_tmp/stdin"
bec39cab 20260 case $ac_file in
d0ac1c44
SM
20261 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20262 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 20263 esac \
d0ac1c44 20264 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20265 ;;
20266 :H)
20267 #
20268 # CONFIG_HEADER
20269 #
bec39cab 20270 if test x"$ac_file" != x-; then
81ecdfbb
RW
20271 {
20272 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20273 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20274 } >"$ac_tmp/config.h" \
20275 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20276 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
20277 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20278$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 20279 else
81ecdfbb 20280 rm -f "$ac_file"
d0ac1c44
SM
20281 mv "$ac_tmp/config.h" "$ac_file" \
20282 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
20283 fi
20284 else
81ecdfbb 20285 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20286 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20287 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 20288 fi
81ecdfbb
RW
20289 ;;
20290 :L)
20291 #
20292 # CONFIG_LINK
20293 #
c906108c 20294
81ecdfbb
RW
20295 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20296 :
b4e70030 20297 else
81ecdfbb
RW
20298 # Prefer the file from the source tree if names are identical.
20299 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20300 ac_source=$srcdir/$ac_source
20301 fi
b4e70030 20302
81ecdfbb
RW
20303 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20304$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 20305
81ecdfbb 20306 if test ! -r "$ac_source"; then
d0ac1c44 20307 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
20308 fi
20309 rm -f "$ac_file"
bec39cab 20310
81ecdfbb 20311 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 20312 case $ac_source in
81ecdfbb
RW
20313 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20314 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20315 esac
20316 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20317 ln "$ac_source" "$ac_file" 2>/dev/null ||
20318 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 20319 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
20320 fi
20321 ;;
20322 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20323$as_echo "$as_me: executing $ac_file commands" >&6;}
20324 ;;
c906108c 20325 esac
b4e70030 20326
bec39cab 20327
81ecdfbb 20328 case $ac_file$ac_mode in
c5adaa19 20329 "config.h":H) echo > stamp-h ;;
81ecdfbb 20330 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 20331 "nm.h":L) echo > stamp-nmh ;;
b292c783 20332 "gcore":F) chmod +x gcore ;;
81ecdfbb 20333
bec39cab 20334 esac
81ecdfbb 20335done # for ac_tag
c906108c 20336
bec39cab 20337
81ecdfbb 20338as_fn_exit 0
bec39cab 20339_ACEOF
bec39cab
AC
20340ac_clean_files=$ac_clean_files_save
20341
81ecdfbb 20342test $ac_write_fail = 0 ||
d0ac1c44 20343 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 20344
bec39cab
AC
20345
20346# configure is writing to config.log, and then calls config.status.
20347# config.status does its own redirection, appending to config.log.
20348# Unfortunately, on DOS this fails, as config.log is still kept open
20349# by configure, so config.status won't be able to write to it; its
20350# output is simply discarded. So we exec the FD to /dev/null,
20351# effectively closing config.log, so it can be properly (re)opened and
20352# appended to by config.status. When coming back to configure, we
20353# need to make the FD available again.
20354if test "$no_create" != yes; then
20355 ac_cs_success=:
20356 ac_config_status_args=
20357 test "$silent" = yes &&
20358 ac_config_status_args="$ac_config_status_args --quiet"
20359 exec 5>/dev/null
20360 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20361 exec 5>>config.log
20362 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20363 # would make configure fail if this is the last instruction.
d0ac1c44 20364 $ac_cs_success || as_fn_exit 1
bec39cab 20365fi
c906108c 20366
bec39cab 20367#
81ecdfbb 20368# CONFIG_SUBDIRS section.
bec39cab 20369#
c906108c
SS
20370if test "$no_recursion" != yes; then
20371
81ecdfbb
RW
20372 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20373 # so they do not pile up.
c906108c
SS
20374 ac_sub_configure_args=
20375 ac_prev=
fdc59709
PB
20376 eval "set x $ac_configure_args"
20377 shift
20378 for ac_arg
20379 do
c906108c
SS
20380 if test -n "$ac_prev"; then
20381 ac_prev=
20382 continue
20383 fi
bec39cab 20384 case $ac_arg in
c906108c
SS
20385 -cache-file | --cache-file | --cache-fil | --cache-fi \
20386 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20387 ac_prev=cache_file ;;
20388 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
20389 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20390 | --c=*)
20391 ;;
20392 --config-cache | -C)
c906108c
SS
20393 ;;
20394 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20395 ac_prev=srcdir ;;
20396 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20397 ;;
bec39cab
AC
20398 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20399 ac_prev=prefix ;;
20400 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20401 ;;
81ecdfbb
RW
20402 --disable-option-checking)
20403 ;;
fdc59709
PB
20404 *)
20405 case $ac_arg in
81ecdfbb 20406 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20407 esac
81ecdfbb 20408 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
20409 esac
20410 done
20411
bec39cab
AC
20412 # Always prepend --prefix to ensure using the same prefix
20413 # in subdir configurations.
fdc59709
PB
20414 ac_arg="--prefix=$prefix"
20415 case $ac_arg in
81ecdfbb 20416 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20417 esac
81ecdfbb
RW
20418 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20419
20420 # Pass --silent
20421 if test "$silent" = yes; then
20422 ac_sub_configure_args="--silent $ac_sub_configure_args"
20423 fi
20424
20425 # Always prepend --disable-option-checking to silence warnings, since
20426 # different subdirs can have different --enable and --with options.
20427 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 20428
b4e70030 20429 ac_popdir=`pwd`
bec39cab 20430 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
20431
20432 # Do not complain, so a configure script can configure whichever
20433 # parts of a large source tree are present.
fdc59709 20434 test -d "$srcdir/$ac_dir" || continue
c906108c 20435
81ecdfbb
RW
20436 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20437 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20438 $as_echo "$ac_msg" >&6
20439 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20440 ac_builddir=.
20441
81ecdfbb
RW
20442case "$ac_dir" in
20443.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20444*)
20445 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20446 # A ".." for each directory in $ac_dir_suffix.
20447 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20448 case $ac_top_builddir_sub in
20449 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20450 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20451 esac ;;
20452esac
20453ac_abs_top_builddir=$ac_pwd
20454ac_abs_builddir=$ac_pwd$ac_dir_suffix
20455# for backward compatibility:
20456ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20457
20458case $srcdir in
81ecdfbb 20459 .) # We are building in place.
bec39cab 20460 ac_srcdir=.
81ecdfbb
RW
20461 ac_top_srcdir=$ac_top_builddir_sub
20462 ac_abs_top_srcdir=$ac_pwd ;;
20463 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20464 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20465 ac_top_srcdir=$srcdir
20466 ac_abs_top_srcdir=$srcdir ;;
20467 *) # Relative name.
20468 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20469 ac_top_srcdir=$ac_top_build_prefix$srcdir
20470 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20471esac
81ecdfbb 20472ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 20473
c906108c 20474
fdc59709 20475 cd "$ac_dir"
c906108c
SS
20476
20477 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
20478 if test -f "$ac_srcdir/configure.gnu"; then
20479 ac_sub_configure=$ac_srcdir/configure.gnu
20480 elif test -f "$ac_srcdir/configure"; then
20481 ac_sub_configure=$ac_srcdir/configure
20482 elif test -f "$ac_srcdir/configure.in"; then
20483 # This should be Cygnus configure.
20484 ac_sub_configure=$ac_aux_dir/configure
c906108c 20485 else
81ecdfbb
RW
20486 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20487$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
20488 ac_sub_configure=
20489 fi
20490
20491 # The recursion is here.
20492 if test -n "$ac_sub_configure"; then
c906108c 20493 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
20494 case $cache_file in
20495 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
20496 *) # Relative name.
20497 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 20498 esac
c906108c 20499
81ecdfbb
RW
20500 { $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
20501$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 20502 # The eval makes quoting arguments work.
fdc59709
PB
20503 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20504 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 20505 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
20506 fi
20507
fdc59709 20508 cd "$ac_popdir"
c906108c
SS
20509 done
20510fi
81ecdfbb
RW
20511if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20513$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20514fi
c906108c 20515
This page took 4.201322 seconds and 4 git commands to generate.