sim: don't rely on inferior_ptid in gdbsim_target::wait
[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
496c0e1b 908enable_gdbserver
393fd4c3
YQ
909with_babeltrace
910with_libbabeltrace_prefix
ccb1ba62
CB
911with_xxhash
912with_libxxhash_prefix
8ecfd7bd 913enable_unit_tests
81ecdfbb
RW
914'
915 ac_precious_vars='build_alias
916host_alias
917target_alias
918CC
919CFLAGS
920LDFLAGS
921LIBS
922CPPFLAGS
3bc3d82a
PA
923CXX
924CXXFLAGS
925CCC
81ecdfbb 926CPP
f06e05e0
JK
927MAKEINFO
928MAKEINFOFLAGS
81ecdfbb
RW
929YACC
930YFLAGS
931XMKMF'
5ae98d25 932ac_subdirs_all='testsuite
81ecdfbb 933gdbtk
81ecdfbb 934gdbserver'
c906108c
SS
935
936# Initialize some variables set by options.
bec39cab
AC
937ac_init_help=
938ac_init_version=false
81ecdfbb
RW
939ac_unrecognized_opts=
940ac_unrecognized_sep=
c906108c
SS
941# The variables have the same names as the options, with
942# dashes changed to underlines.
bec39cab 943cache_file=/dev/null
c906108c 944exec_prefix=NONE
c906108c 945no_create=
c906108c
SS
946no_recursion=
947prefix=NONE
948program_prefix=NONE
949program_suffix=NONE
950program_transform_name=s,x,x,
951silent=
952site=
953srcdir=
c906108c
SS
954verbose=
955x_includes=NONE
956x_libraries=NONE
bec39cab
AC
957
958# Installation directory options.
959# These are left unexpanded so users can "make install exec_prefix=/foo"
960# and all the variables that are supposed to be based on exec_prefix
961# by default will actually change.
962# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 963# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
964bindir='${exec_prefix}/bin'
965sbindir='${exec_prefix}/sbin'
966libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
967datarootdir='${prefix}/share'
968datadir='${datarootdir}'
c906108c
SS
969sysconfdir='${prefix}/etc'
970sharedstatedir='${prefix}/com'
971localstatedir='${prefix}/var'
c906108c
SS
972includedir='${prefix}/include'
973oldincludedir='/usr/include'
81ecdfbb
RW
974docdir='${datarootdir}/doc/${PACKAGE}'
975infodir='${datarootdir}/info'
976htmldir='${docdir}'
977dvidir='${docdir}'
978pdfdir='${docdir}'
979psdir='${docdir}'
980libdir='${exec_prefix}/lib'
981localedir='${datarootdir}/locale'
982mandir='${datarootdir}/man'
c906108c 983
c906108c 984ac_prev=
81ecdfbb 985ac_dashdash=
c906108c
SS
986for ac_option
987do
c906108c
SS
988 # If the previous option needs an argument, assign it.
989 if test -n "$ac_prev"; then
81ecdfbb 990 eval $ac_prev=\$ac_option
c906108c
SS
991 ac_prev=
992 continue
993 fi
994
81ecdfbb 995 case $ac_option in
d0ac1c44
SM
996 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
997 *=) ac_optarg= ;;
998 *) ac_optarg=yes ;;
81ecdfbb 999 esac
c906108c
SS
1000
1001 # Accept the important Cygnus configure options, so we can diagnose typos.
1002
81ecdfbb
RW
1003 case $ac_dashdash$ac_option in
1004 --)
1005 ac_dashdash=yes ;;
c906108c
SS
1006
1007 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1008 ac_prev=bindir ;;
1009 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1010 bindir=$ac_optarg ;;
c906108c
SS
1011
1012 -build | --build | --buil | --bui | --bu)
bec39cab 1013 ac_prev=build_alias ;;
c906108c 1014 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1015 build_alias=$ac_optarg ;;
c906108c
SS
1016
1017 -cache-file | --cache-file | --cache-fil | --cache-fi \
1018 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1019 ac_prev=cache_file ;;
1020 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1021 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1022 cache_file=$ac_optarg ;;
1023
1024 --config-cache | -C)
1025 cache_file=config.cache ;;
c906108c 1026
81ecdfbb 1027 -datadir | --datadir | --datadi | --datad)
c906108c 1028 ac_prev=datadir ;;
81ecdfbb 1029 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1030 datadir=$ac_optarg ;;
c906108c 1031
81ecdfbb
RW
1032 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1033 | --dataroo | --dataro | --datar)
1034 ac_prev=datarootdir ;;
1035 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1036 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1037 datarootdir=$ac_optarg ;;
1038
c906108c 1039 -disable-* | --disable-*)
81ecdfbb 1040 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1041 # Reject names that are not valid shell variable names.
81ecdfbb 1042 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1043 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1044 ac_useropt_orig=$ac_useropt
1045 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1046 case $ac_user_opts in
1047 *"
1048"enable_$ac_useropt"
1049"*) ;;
1050 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1051 ac_unrecognized_sep=', ';;
1052 esac
1053 eval enable_$ac_useropt=no ;;
1054
1055 -docdir | --docdir | --docdi | --doc | --do)
1056 ac_prev=docdir ;;
1057 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1058 docdir=$ac_optarg ;;
1059
1060 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1061 ac_prev=dvidir ;;
1062 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1063 dvidir=$ac_optarg ;;
c906108c
SS
1064
1065 -enable-* | --enable-*)
81ecdfbb 1066 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1067 # Reject names that are not valid shell variable names.
81ecdfbb 1068 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1069 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1070 ac_useropt_orig=$ac_useropt
1071 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1072 case $ac_user_opts in
1073 *"
1074"enable_$ac_useropt"
1075"*) ;;
1076 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1077 ac_unrecognized_sep=', ';;
b4e70030 1078 esac
81ecdfbb 1079 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1080
1081 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1082 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1083 | --exec | --exe | --ex)
1084 ac_prev=exec_prefix ;;
1085 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1086 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1087 | --exec=* | --exe=* | --ex=*)
bec39cab 1088 exec_prefix=$ac_optarg ;;
c906108c
SS
1089
1090 -gas | --gas | --ga | --g)
1091 # Obsolete; use --with-gas.
1092 with_gas=yes ;;
1093
bec39cab
AC
1094 -help | --help | --hel | --he | -h)
1095 ac_init_help=long ;;
1096 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1097 ac_init_help=recursive ;;
1098 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1099 ac_init_help=short ;;
c906108c
SS
1100
1101 -host | --host | --hos | --ho)
bec39cab 1102 ac_prev=host_alias ;;
c906108c 1103 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1104 host_alias=$ac_optarg ;;
c906108c 1105
81ecdfbb
RW
1106 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1107 ac_prev=htmldir ;;
1108 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1109 | --ht=*)
1110 htmldir=$ac_optarg ;;
1111
c906108c
SS
1112 -includedir | --includedir | --includedi | --included | --include \
1113 | --includ | --inclu | --incl | --inc)
1114 ac_prev=includedir ;;
1115 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1116 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1117 includedir=$ac_optarg ;;
c906108c
SS
1118
1119 -infodir | --infodir | --infodi | --infod | --info | --inf)
1120 ac_prev=infodir ;;
1121 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1122 infodir=$ac_optarg ;;
c906108c
SS
1123
1124 -libdir | --libdir | --libdi | --libd)
1125 ac_prev=libdir ;;
1126 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1127 libdir=$ac_optarg ;;
c906108c
SS
1128
1129 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1130 | --libexe | --libex | --libe)
1131 ac_prev=libexecdir ;;
1132 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1133 | --libexe=* | --libex=* | --libe=*)
bec39cab 1134 libexecdir=$ac_optarg ;;
c906108c 1135
81ecdfbb
RW
1136 -localedir | --localedir | --localedi | --localed | --locale)
1137 ac_prev=localedir ;;
1138 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1139 localedir=$ac_optarg ;;
1140
c906108c 1141 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1142 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1143 ac_prev=localstatedir ;;
1144 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1145 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1146 localstatedir=$ac_optarg ;;
c906108c
SS
1147
1148 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1149 ac_prev=mandir ;;
1150 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1151 mandir=$ac_optarg ;;
c906108c
SS
1152
1153 -nfp | --nfp | --nf)
1154 # Obsolete; use --without-fp.
1155 with_fp=no ;;
1156
1157 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1158 | --no-cr | --no-c | -n)
c906108c
SS
1159 no_create=yes ;;
1160
1161 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1162 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1163 no_recursion=yes ;;
1164
1165 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1166 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1167 | --oldin | --oldi | --old | --ol | --o)
1168 ac_prev=oldincludedir ;;
1169 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1170 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1171 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1172 oldincludedir=$ac_optarg ;;
c906108c
SS
1173
1174 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1175 ac_prev=prefix ;;
1176 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1177 prefix=$ac_optarg ;;
c906108c
SS
1178
1179 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1180 | --program-pre | --program-pr | --program-p)
1181 ac_prev=program_prefix ;;
1182 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1183 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1184 program_prefix=$ac_optarg ;;
c906108c
SS
1185
1186 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1187 | --program-suf | --program-su | --program-s)
1188 ac_prev=program_suffix ;;
1189 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1190 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1191 program_suffix=$ac_optarg ;;
c906108c
SS
1192
1193 -program-transform-name | --program-transform-name \
1194 | --program-transform-nam | --program-transform-na \
1195 | --program-transform-n | --program-transform- \
1196 | --program-transform | --program-transfor \
1197 | --program-transfo | --program-transf \
1198 | --program-trans | --program-tran \
1199 | --progr-tra | --program-tr | --program-t)
1200 ac_prev=program_transform_name ;;
1201 -program-transform-name=* | --program-transform-name=* \
1202 | --program-transform-nam=* | --program-transform-na=* \
1203 | --program-transform-n=* | --program-transform-=* \
1204 | --program-transform=* | --program-transfor=* \
1205 | --program-transfo=* | --program-transf=* \
1206 | --program-trans=* | --program-tran=* \
1207 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1208 program_transform_name=$ac_optarg ;;
c906108c 1209
81ecdfbb
RW
1210 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1211 ac_prev=pdfdir ;;
1212 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1213 pdfdir=$ac_optarg ;;
1214
1215 -psdir | --psdir | --psdi | --psd | --ps)
1216 ac_prev=psdir ;;
1217 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1218 psdir=$ac_optarg ;;
1219
c906108c
SS
1220 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1221 | -silent | --silent | --silen | --sile | --sil)
1222 silent=yes ;;
1223
1224 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1225 ac_prev=sbindir ;;
1226 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1227 | --sbi=* | --sb=*)
bec39cab 1228 sbindir=$ac_optarg ;;
c906108c
SS
1229
1230 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1231 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1232 | --sharedst | --shareds | --shared | --share | --shar \
1233 | --sha | --sh)
1234 ac_prev=sharedstatedir ;;
1235 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1236 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1237 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1238 | --sha=* | --sh=*)
bec39cab 1239 sharedstatedir=$ac_optarg ;;
c906108c
SS
1240
1241 -site | --site | --sit)
1242 ac_prev=site ;;
1243 -site=* | --site=* | --sit=*)
bec39cab 1244 site=$ac_optarg ;;
3ace7edb 1245
c906108c
SS
1246 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1247 ac_prev=srcdir ;;
1248 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1249 srcdir=$ac_optarg ;;
c906108c
SS
1250
1251 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1252 | --syscon | --sysco | --sysc | --sys | --sy)
1253 ac_prev=sysconfdir ;;
1254 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1255 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1256 sysconfdir=$ac_optarg ;;
c906108c
SS
1257
1258 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1259 ac_prev=target_alias ;;
c906108c 1260 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1261 target_alias=$ac_optarg ;;
c906108c
SS
1262
1263 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1264 verbose=yes ;;
1265
bec39cab
AC
1266 -version | --version | --versio | --versi | --vers | -V)
1267 ac_init_version=: ;;
c906108c
SS
1268
1269 -with-* | --with-*)
81ecdfbb 1270 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1271 # Reject names that are not valid shell variable names.
81ecdfbb 1272 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1273 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1274 ac_useropt_orig=$ac_useropt
1275 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1276 case $ac_user_opts in
1277 *"
1278"with_$ac_useropt"
1279"*) ;;
1280 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1281 ac_unrecognized_sep=', ';;
b4e70030 1282 esac
81ecdfbb 1283 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1284
1285 -without-* | --without-*)
81ecdfbb 1286 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1287 # Reject names that are not valid shell variable names.
81ecdfbb 1288 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1289 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1290 ac_useropt_orig=$ac_useropt
1291 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1292 case $ac_user_opts in
1293 *"
1294"with_$ac_useropt"
1295"*) ;;
1296 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1297 ac_unrecognized_sep=', ';;
1298 esac
1299 eval with_$ac_useropt=no ;;
c906108c
SS
1300
1301 --x)
1302 # Obsolete; use --with-x.
1303 with_x=yes ;;
1304
1305 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1306 | --x-incl | --x-inc | --x-in | --x-i)
1307 ac_prev=x_includes ;;
1308 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1309 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1310 x_includes=$ac_optarg ;;
c906108c
SS
1311
1312 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1313 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1314 ac_prev=x_libraries ;;
1315 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1316 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1317 x_libraries=$ac_optarg ;;
c906108c 1318
d0ac1c44
SM
1319 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1320Try \`$0 --help' for more information"
c906108c
SS
1321 ;;
1322
bec39cab
AC
1323 *=*)
1324 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1325 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1326 case $ac_envvar in #(
1327 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1328 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1329 esac
1330 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1331 export $ac_envvar ;;
1332
c906108c 1333 *)
bec39cab 1334 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1335 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1336 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1337 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1338 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1339 ;;
1340
1341 esac
1342done
1343
1344if test -n "$ac_prev"; then
bec39cab 1345 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1346 as_fn_error $? "missing argument to $ac_option"
c906108c 1347fi
c906108c 1348
81ecdfbb
RW
1349if test -n "$ac_unrecognized_opts"; then
1350 case $enable_option_checking in
1351 no) ;;
d0ac1c44 1352 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1353 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1354 esac
81ecdfbb 1355fi
b4e70030 1356
81ecdfbb
RW
1357# Check all directory arguments for consistency.
1358for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1359 datadir sysconfdir sharedstatedir localstatedir includedir \
1360 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1361 libdir localedir mandir
b4e70030 1362do
81ecdfbb
RW
1363 eval ac_val=\$$ac_var
1364 # Remove trailing slashes.
1365 case $ac_val in
1366 */ )
1367 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1368 eval $ac_var=\$ac_val;;
1369 esac
1370 # Be sure to have absolute directory names.
b4e70030 1371 case $ac_val in
81ecdfbb
RW
1372 [\\/$]* | ?:[\\/]* ) continue;;
1373 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1374 esac
d0ac1c44 1375 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1376done
1377
bec39cab
AC
1378# There might be people who depend on the old broken behavior: `$host'
1379# used to hold the argument of --host etc.
1380# FIXME: To remove some day.
1381build=$build_alias
1382host=$host_alias
1383target=$target_alias
1384
1385# FIXME: To remove some day.
1386if test "x$host_alias" != x; then
1387 if test "x$build_alias" = x; then
1388 cross_compiling=maybe
bec39cab
AC
1389 elif test "x$build_alias" != "x$host_alias"; then
1390 cross_compiling=yes
1391 fi
1392fi
c906108c 1393
bec39cab
AC
1394ac_tool_prefix=
1395test -n "$host_alias" && ac_tool_prefix=$host_alias-
1396
1397test "$silent" = yes && exec 6>/dev/null
c906108c 1398
c906108c 1399
81ecdfbb
RW
1400ac_pwd=`pwd` && test -n "$ac_pwd" &&
1401ac_ls_di=`ls -di .` &&
1402ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1403 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1404test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1405 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1406
1407
c906108c
SS
1408# Find the source files, if location was not specified.
1409if test -z "$srcdir"; then
1410 ac_srcdir_defaulted=yes
81ecdfbb
RW
1411 # Try the directory containing this script, then the parent directory.
1412 ac_confdir=`$as_dirname -- "$as_myself" ||
1413$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1414 X"$as_myself" : 'X\(//\)[^/]' \| \
1415 X"$as_myself" : 'X\(//\)$' \| \
1416 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1417$as_echo X"$as_myself" |
1418 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1419 s//\1/
1420 q
1421 }
1422 /^X\(\/\/\)[^/].*/{
1423 s//\1/
1424 q
1425 }
1426 /^X\(\/\/\)$/{
1427 s//\1/
1428 q
1429 }
1430 /^X\(\/\).*/{
1431 s//\1/
1432 q
1433 }
1434 s/.*/./; q'`
c906108c 1435 srcdir=$ac_confdir
81ecdfbb 1436 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1437 srcdir=..
1438 fi
1439else
1440 ac_srcdir_defaulted=no
1441fi
81ecdfbb
RW
1442if test ! -r "$srcdir/$ac_unique_file"; then
1443 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1444 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1445fi
1446ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1447ac_abs_confdir=`(
d0ac1c44 1448 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1449 pwd)`
1450# When building in place, set srcdir=.
1451if test "$ac_abs_confdir" = "$ac_pwd"; then
1452 srcdir=.
1453fi
1454# Remove unnecessary trailing slashes from srcdir.
1455# Double slashes in file names in object file debugging info
1456# mess up M-x gdb in Emacs.
1457case $srcdir in
1458*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1459esac
1460for ac_var in $ac_precious_vars; do
1461 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1462 eval ac_env_${ac_var}_value=\$${ac_var}
1463 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1464 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1465done
c906108c 1466
bec39cab
AC
1467#
1468# Report the --help message.
1469#
1470if test "$ac_init_help" = "long"; then
1471 # Omit some internal or obsolete options to make the list less imposing.
1472 # This message is too long to be a string in the A/UX 3.1 sh.
1473 cat <<_ACEOF
1474\`configure' configures this package to adapt to many kinds of systems.
1475
1476Usage: $0 [OPTION]... [VAR=VALUE]...
1477
1478To assign environment variables (e.g., CC, CFLAGS...), specify them as
1479VAR=VALUE. See below for descriptions of some of the useful variables.
1480
1481Defaults for the options are specified in brackets.
1482
1483Configuration:
1484 -h, --help display this help and exit
1485 --help=short display options specific to this package
1486 --help=recursive display the short help of all the included packages
1487 -V, --version display version information and exit
d0ac1c44 1488 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1489 --cache-file=FILE cache test results in FILE [disabled]
1490 -C, --config-cache alias for \`--cache-file=config.cache'
1491 -n, --no-create do not create output files
1492 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1493
bec39cab
AC
1494Installation directories:
1495 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1496 [$ac_default_prefix]
bec39cab 1497 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1498 [PREFIX]
bec39cab
AC
1499
1500By default, \`make install' will install all the files in
1501\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1502an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1503for instance \`--prefix=\$HOME'.
1504
1505For better control, use the options below.
1506
1507Fine tuning of the installation directories:
81ecdfbb
RW
1508 --bindir=DIR user executables [EPREFIX/bin]
1509 --sbindir=DIR system admin executables [EPREFIX/sbin]
1510 --libexecdir=DIR program executables [EPREFIX/libexec]
1511 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1512 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1513 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1514 --libdir=DIR object code libraries [EPREFIX/lib]
1515 --includedir=DIR C header files [PREFIX/include]
1516 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1517 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1518 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1519 --infodir=DIR info documentation [DATAROOTDIR/info]
1520 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1521 --mandir=DIR man documentation [DATAROOTDIR/man]
1522 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1523 --htmldir=DIR html documentation [DOCDIR]
1524 --dvidir=DIR dvi documentation [DOCDIR]
1525 --pdfdir=DIR pdf documentation [DOCDIR]
1526 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1527_ACEOF
1528
1529 cat <<\_ACEOF
1530
9009e1ae
MR
1531Program names:
1532 --program-prefix=PREFIX prepend PREFIX to installed program names
1533 --program-suffix=SUFFIX append SUFFIX to installed program names
1534 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1535
bec39cab
AC
1536X features:
1537 --x-includes=DIR X include files are in DIR
1538 --x-libraries=DIR X library files are in DIR
1539
1540System types:
1541 --build=BUILD configure for building on BUILD [guessed]
1542 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1543 --target=TARGET configure for building compilers for TARGET [HOST]
1544_ACEOF
1545fi
1546
1547if test -n "$ac_init_help"; then
1548
1549 cat <<\_ACEOF
1550
1551Optional Features:
81ecdfbb 1552 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1553 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1554 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1555 --enable-maintainer-mode
1556 enable make rules and dependencies not useful (and
1557 sometimes confusing) to the casual installer
2974be62 1558 --enable-plugins Enable support for plugins
da2f07f1 1559 --disable-largefile omit support for large files
a1220294
TT
1560 --enable-targets=TARGETS
1561 alternative target configurations
c0993dbe 1562 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1563 --disable-gdbmi disable machine-interface (MI)
1564 --enable-tui enable full-screen terminal user interface (TUI)
1565 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1566 --enable-profiling enable profiling of GDB
44cee4fd 1567 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1568 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1569 --enable-source-highlight
1570 enable source-highlight for source listings
a1220294 1571 --enable-werror treat compile warnings as errors
32c1c914 1572 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1573 --enable-gdb-build-warnings
32c1c914 1574 enable GDB specific build-time compiler warnings if
a1220294 1575 gcc is used
f35d5ade 1576 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1577 --enable-sim link gdb with simulator
496c0e1b
JB
1578 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1579 is auto)
8ecfd7bd
SDJ
1580 --enable-unit-tests Enable the inclusion of unit tests when compiling
1581 GDB
bec39cab
AC
1582
1583Optional Packages:
1584 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1585 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1586 --with-separate-debug-dir=PATH
32c1c914 1587 look for global separate debug info in this path
62e4f60c 1588 [LIBDIR/debug]
b14b1491
TT
1589 --with-gdb-datadir=PATH look for global separate data files in this path
1590 [DATADIR/gdb]
29b0e8a2 1591 --with-relocated-sources=PATH
32c1c914 1592 automatically relocate this path for source files
7349ff92 1593 --with-auto-load-dir=PATH
aff139ff 1594 directories from which to load auto-loaded scripts
1564a261 1595 [$debugdir:$datadir/auto-load]
bccbefd2 1596 --with-auto-load-safe-path=PATH
aff139ff 1597 directories safe to hold auto-loaded files
7349ff92 1598 [--with-auto-load-dir]
bccbefd2
JK
1599 --without-auto-load-safe-path
1600 do not restrict auto-loaded files locations
05e7c244 1601 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1602 --with-curses use the curses library instead of the termcap
1603 library
c16158bc
JM
1604 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1605 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1606 --with-system-zlib use installed libz
016a3251
DD
1607 --with-gnu-ld assume the C compiler uses GNU ld default=no
1608 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1609 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1610 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1611 --with-system-readline use installed readline library
b8e0a31c
SD
1612 --with-jit-reader-dir=PATH
1613 directory to load the JIT readers from
5c39566f 1614 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1615 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1616 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1617 --with-mpfr include MPFR support (auto/yes/no)
1618 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1619 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1620 --with-python[=PYTHON] include python support
1621 (auto/yes/no/<python-program>)
ed3ef339
DE
1622 --with-guile[=GUILE] include guile support
1623 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1624 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1625 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1626 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1627 --without-included-regex
1628 don't use included regex; this is the default on
1629 systems with version 2 of the GNU C library (use
1630 with caution on other system)
81ecdfbb 1631 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1632 --with-system-gdbinit=PATH
32c1c914 1633 automatically load a system-wide gdbinit file
ed2a2229
CB
1634 --with-system-gdbinit-dir=PATH
1635 automatically load system-wide gdbinit files from
1636 this directory
608e2dbb
TT
1637 --with-lzma support lzma compression (auto/yes/no)
1638 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1639 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1640 --with-tcl directory containing tcl configuration (tclConfig.sh)
1641 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1642 --with-x use the X Window System
393fd4c3
YQ
1643 --with-babeltrace include babeltrace support (auto/yes/no)
1644 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1645 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
ccb1ba62
CB
1646 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1647 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1648 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
bec39cab
AC
1649
1650Some influential environment variables:
1651 CC C compiler command
1652 CFLAGS C compiler flags
1653 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1654 nonstandard directory <lib dir>
81ecdfbb 1655 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1656 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1657 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1658 CXX C++ compiler command
1659 CXXFLAGS C++ compiler flags
bec39cab 1660 CPP C preprocessor
f06e05e0
JK
1661 MAKEINFO Parent configure detects if it is of sufficient version.
1662 MAKEINFOFLAGS
1663 Parameters for MAKEINFO.
d0ac1c44
SM
1664 YACC The `Yet Another Compiler Compiler' implementation to use.
1665 Defaults to the first program found out of: `bison -y', `byacc',
1666 `yacc'.
81ecdfbb
RW
1667 YFLAGS The list of arguments that will be passed by default to $YACC.
1668 This script will default YFLAGS to the empty string to avoid a
1669 default value of `-d' given by some make applications.
1670 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1671
1672Use these variables to override the choices made by `configure' or to help
1673it to find libraries and programs with nonstandard names/locations.
1674
81ecdfbb 1675Report bugs to the package provider.
bec39cab 1676_ACEOF
81ecdfbb 1677ac_status=$?
bec39cab
AC
1678fi
1679
1680if test "$ac_init_help" = "recursive"; then
1681 # If there are subdirs, report their specific --help.
bec39cab 1682 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1683 test -d "$ac_dir" ||
1684 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1685 continue
bec39cab
AC
1686 ac_builddir=.
1687
81ecdfbb
RW
1688case "$ac_dir" in
1689.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1690*)
1691 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1692 # A ".." for each directory in $ac_dir_suffix.
1693 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1694 case $ac_top_builddir_sub in
1695 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1696 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1697 esac ;;
1698esac
1699ac_abs_top_builddir=$ac_pwd
1700ac_abs_builddir=$ac_pwd$ac_dir_suffix
1701# for backward compatibility:
1702ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1703
1704case $srcdir in
81ecdfbb 1705 .) # We are building in place.
bec39cab 1706 ac_srcdir=.
81ecdfbb
RW
1707 ac_top_srcdir=$ac_top_builddir_sub
1708 ac_abs_top_srcdir=$ac_pwd ;;
1709 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1710 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1711 ac_top_srcdir=$srcdir
1712 ac_abs_top_srcdir=$srcdir ;;
1713 *) # Relative name.
1714 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1715 ac_top_srcdir=$ac_top_build_prefix$srcdir
1716 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1717esac
81ecdfbb 1718ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1719
81ecdfbb
RW
1720 cd "$ac_dir" || { ac_status=$?; continue; }
1721 # Check for guested configure.
1722 if test -f "$ac_srcdir/configure.gnu"; then
1723 echo &&
1724 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1725 elif test -f "$ac_srcdir/configure"; then
1726 echo &&
1727 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1728 else
81ecdfbb
RW
1729 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1730 fi || ac_status=$?
1731 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1732 done
1733fi
1734
81ecdfbb 1735test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1736if $ac_init_version; then
1737 cat <<\_ACEOF
81ecdfbb 1738configure
d0ac1c44 1739generated by GNU Autoconf 2.69
bec39cab 1740
d0ac1c44 1741Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1742This configure script is free software; the Free Software Foundation
1743gives unlimited permission to copy, distribute and modify it.
1744_ACEOF
81ecdfbb 1745 exit
bec39cab 1746fi
bec39cab 1747
81ecdfbb
RW
1748## ------------------------ ##
1749## Autoconf initialization. ##
1750## ------------------------ ##
bec39cab 1751
81ecdfbb
RW
1752# ac_fn_c_try_compile LINENO
1753# --------------------------
1754# Try to compile conftest.$ac_ext, and return whether this succeeded.
1755ac_fn_c_try_compile ()
1756{
1757 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1758 rm -f conftest.$ac_objext
1759 if { { ac_try="$ac_compile"
1760case "(($ac_try" in
1761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1762 *) ac_try_echo=$ac_try;;
1763esac
1764eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1765$as_echo "$ac_try_echo"; } >&5
1766 (eval "$ac_compile") 2>conftest.err
1767 ac_status=$?
1768 if test -s conftest.err; then
1769 grep -v '^ *+' conftest.err >conftest.er1
1770 cat conftest.er1 >&5
1771 mv -f conftest.er1 conftest.err
1772 fi
1773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1774 test $ac_status = 0; } && {
1775 test -z "$ac_c_werror_flag" ||
1776 test ! -s conftest.err
1777 } && test -s conftest.$ac_objext; then :
1778 ac_retval=0
1779else
1780 $as_echo "$as_me: failed program was:" >&5
1781sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1782
81ecdfbb
RW
1783 ac_retval=1
1784fi
d0ac1c44
SM
1785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1786 as_fn_set_status $ac_retval
81ecdfbb
RW
1787
1788} # ac_fn_c_try_compile
1789
3bc3d82a
PA
1790# ac_fn_cxx_try_compile LINENO
1791# ----------------------------
1792# Try to compile conftest.$ac_ext, and return whether this succeeded.
1793ac_fn_cxx_try_compile ()
1794{
1795 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1796 rm -f conftest.$ac_objext
1797 if { { ac_try="$ac_compile"
1798case "(($ac_try" in
1799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1800 *) ac_try_echo=$ac_try;;
1801esac
1802eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1803$as_echo "$ac_try_echo"; } >&5
1804 (eval "$ac_compile") 2>conftest.err
1805 ac_status=$?
1806 if test -s conftest.err; then
1807 grep -v '^ *+' conftest.err >conftest.er1
1808 cat conftest.er1 >&5
1809 mv -f conftest.er1 conftest.err
1810 fi
1811 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1812 test $ac_status = 0; } && {
1813 test -z "$ac_cxx_werror_flag" ||
1814 test ! -s conftest.err
1815 } && test -s conftest.$ac_objext; then :
1816 ac_retval=0
1817else
1818 $as_echo "$as_me: failed program was:" >&5
1819sed 's/^/| /' conftest.$ac_ext >&5
1820
1821 ac_retval=1
1822fi
d0ac1c44
SM
1823 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1824 as_fn_set_status $ac_retval
3bc3d82a
PA
1825
1826} # ac_fn_cxx_try_compile
1827
81ecdfbb
RW
1828# ac_fn_c_try_cpp LINENO
1829# ----------------------
1830# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1831ac_fn_c_try_cpp ()
bec39cab 1832{
81ecdfbb
RW
1833 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1834 if { { ac_try="$ac_cpp conftest.$ac_ext"
1835case "(($ac_try" in
1836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1837 *) ac_try_echo=$ac_try;;
1838esac
1839eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1840$as_echo "$ac_try_echo"; } >&5
1841 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1842 ac_status=$?
1843 if test -s conftest.err; then
1844 grep -v '^ *+' conftest.err >conftest.er1
1845 cat conftest.er1 >&5
1846 mv -f conftest.er1 conftest.err
1847 fi
1848 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1849 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1850 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1851 test ! -s conftest.err
1852 }; then :
1853 ac_retval=0
1854else
1855 $as_echo "$as_me: failed program was:" >&5
1856sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1857
81ecdfbb
RW
1858 ac_retval=1
1859fi
d0ac1c44
SM
1860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1861 as_fn_set_status $ac_retval
bec39cab 1862
81ecdfbb 1863} # ac_fn_c_try_cpp
bec39cab 1864
81ecdfbb
RW
1865# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1866# -------------------------------------------------------
1867# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1868# the include files in INCLUDES and setting the cache variable VAR
1869# accordingly.
1870ac_fn_c_check_header_mongrel ()
1871{
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1873 if eval \${$3+:} false; then :
81ecdfbb
RW
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1875$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1876if eval \${$3+:} false; then :
81ecdfbb
RW
1877 $as_echo_n "(cached) " >&6
1878fi
1879eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881$as_echo "$ac_res" >&6; }
1882else
1883 # Is the header compilable?
1884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1885$as_echo_n "checking $2 usability... " >&6; }
1886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887/* end confdefs.h. */
1888$4
1889#include <$2>
1890_ACEOF
1891if ac_fn_c_try_compile "$LINENO"; then :
1892 ac_header_compiler=yes
1893else
1894 ac_header_compiler=no
1895fi
1896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1898$as_echo "$ac_header_compiler" >&6; }
bec39cab 1899
81ecdfbb
RW
1900# Is the header present?
1901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1902$as_echo_n "checking $2 presence... " >&6; }
1903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h. */
1905#include <$2>
1906_ACEOF
1907if ac_fn_c_try_cpp "$LINENO"; then :
1908 ac_header_preproc=yes
1909else
1910 ac_header_preproc=no
1911fi
d0ac1c44 1912rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1914$as_echo "$ac_header_preproc" >&6; }
bec39cab 1915
81ecdfbb
RW
1916# So? What about this header?
1917case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1918 yes:no: )
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1920$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1922$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1923 ;;
1924 no:yes:* )
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1926$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1928$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1930$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1932$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1934$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1935 ;;
1936esac
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1938$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1939if eval \${$3+:} false; then :
81ecdfbb
RW
1940 $as_echo_n "(cached) " >&6
1941else
1942 eval "$3=\$ac_header_compiler"
1943fi
1944eval ac_res=\$$3
1945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1946$as_echo "$ac_res" >&6; }
1947fi
d0ac1c44 1948 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1949
81ecdfbb 1950} # ac_fn_c_check_header_mongrel
bec39cab 1951
81ecdfbb
RW
1952# ac_fn_c_try_run LINENO
1953# ----------------------
1954# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1955# that executables *can* be run.
1956ac_fn_c_try_run ()
1957{
1958 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1959 if { { ac_try="$ac_link"
1960case "(($ac_try" in
1961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1962 *) ac_try_echo=$ac_try;;
1963esac
1964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1965$as_echo "$ac_try_echo"; } >&5
1966 (eval "$ac_link") 2>&5
1967 ac_status=$?
1968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1969 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1970 { { case "(($ac_try" in
1971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1972 *) ac_try_echo=$ac_try;;
1973esac
1974eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1975$as_echo "$ac_try_echo"; } >&5
1976 (eval "$ac_try") 2>&5
1977 ac_status=$?
1978 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1979 test $ac_status = 0; }; }; then :
1980 ac_retval=0
1981else
1982 $as_echo "$as_me: program exited with status $ac_status" >&5
1983 $as_echo "$as_me: failed program was:" >&5
1984sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1985
81ecdfbb
RW
1986 ac_retval=$ac_status
1987fi
1988 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1989 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1990 as_fn_set_status $ac_retval
bec39cab 1991
81ecdfbb 1992} # ac_fn_c_try_run
bec39cab 1993
81ecdfbb
RW
1994# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1995# -------------------------------------------------------
1996# Tests whether HEADER exists and can be compiled using the include files in
1997# INCLUDES, setting the cache variable VAR accordingly.
1998ac_fn_c_check_header_compile ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2002$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2003if eval \${$3+:} false; then :
81ecdfbb
RW
2004 $as_echo_n "(cached) " >&6
2005else
2006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008$4
2009#include <$2>
bec39cab 2010_ACEOF
81ecdfbb
RW
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 eval "$3=yes"
2013else
2014 eval "$3=no"
2015fi
2016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2017fi
2018eval ac_res=\$$3
2019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2020$as_echo "$ac_res" >&6; }
d0ac1c44 2021 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2022
81ecdfbb 2023} # ac_fn_c_check_header_compile
bec39cab 2024
2974be62
AM
2025# ac_fn_c_try_link LINENO
2026# -----------------------
2027# Try to link conftest.$ac_ext, and return whether this succeeded.
2028ac_fn_c_try_link ()
2029{
2030 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031 rm -f conftest.$ac_objext conftest$ac_exeext
2032 if { { ac_try="$ac_link"
2033case "(($ac_try" in
2034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035 *) ac_try_echo=$ac_try;;
2036esac
2037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038$as_echo "$ac_try_echo"; } >&5
2039 (eval "$ac_link") 2>conftest.err
2040 ac_status=$?
2041 if test -s conftest.err; then
2042 grep -v '^ *+' conftest.err >conftest.er1
2043 cat conftest.er1 >&5
2044 mv -f conftest.er1 conftest.err
2045 fi
2046 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047 test $ac_status = 0; } && {
2048 test -z "$ac_c_werror_flag" ||
2049 test ! -s conftest.err
2050 } && test -s conftest$ac_exeext && {
2051 test "$cross_compiling" = yes ||
d0ac1c44 2052 test -x conftest$ac_exeext
2974be62
AM
2053 }; then :
2054 ac_retval=0
2055else
2056 $as_echo "$as_me: failed program was:" >&5
2057sed 's/^/| /' conftest.$ac_ext >&5
2058
2059 ac_retval=1
2060fi
2061 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2062 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2063 # interfere with the next link command; also delete a directory that is
2064 # left behind by Apple's compiler. We do this before executing the actions.
2065 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2066 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2067 as_fn_set_status $ac_retval
2974be62
AM
2068
2069} # ac_fn_c_try_link
2070
81ecdfbb
RW
2071# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2072# --------------------------------------------
2073# Tries to find the compile-time value of EXPR in a program that includes
2074# INCLUDES, setting VAR accordingly. Returns whether the value could be
2075# computed
2076ac_fn_c_compute_int ()
2077{
2078 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2079 if test "$cross_compiling" = yes; then
2080 # Depending upon the size, compute the lo and hi bounds.
2081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2082/* end confdefs.h. */
2083$4
2084int
2085main ()
2086{
2087static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2088test_array [0] = 0;
2089return test_array [0];
bec39cab 2090
81ecdfbb
RW
2091 ;
2092 return 0;
2093}
2094_ACEOF
2095if ac_fn_c_try_compile "$LINENO"; then :
2096 ac_lo=0 ac_mid=0
2097 while :; do
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099/* end confdefs.h. */
2100$4
2101int
2102main ()
2103{
2104static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2105test_array [0] = 0;
2106return test_array [0];
bec39cab 2107
81ecdfbb
RW
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112if ac_fn_c_try_compile "$LINENO"; then :
2113 ac_hi=$ac_mid; break
2114else
2115 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2116 if test $ac_lo -le $ac_mid; then
2117 ac_lo= ac_hi=
2118 break
2119 fi
2120 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2121fi
81ecdfbb
RW
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123 done
c906108c 2124else
81ecdfbb
RW
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h. */
2127$4
2128int
2129main ()
2130{
2131static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2132test_array [0] = 0;
2133return test_array [0];
bec39cab 2134
81ecdfbb
RW
2135 ;
2136 return 0;
2137}
2138_ACEOF
2139if ac_fn_c_try_compile "$LINENO"; then :
2140 ac_hi=-1 ac_mid=-1
2141 while :; do
2142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143/* end confdefs.h. */
2144$4
2145int
2146main ()
2147{
2148static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2149test_array [0] = 0;
2150return test_array [0];
bec39cab 2151
81ecdfbb
RW
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_compile "$LINENO"; then :
2157 ac_lo=$ac_mid; break
2158else
2159 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2160 if test $ac_mid -le $ac_hi; then
2161 ac_lo= ac_hi=
2162 break
2163 fi
2164 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167 done
2168else
2169 ac_lo= ac_hi=
2170fi
2171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2172fi
2173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2174# Binary search between lo and hi bounds.
2175while test "x$ac_lo" != "x$ac_hi"; do
2176 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179$4
2180int
2181main ()
2182{
2183static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2184test_array [0] = 0;
2185return test_array [0];
bec39cab 2186
81ecdfbb
RW
2187 ;
2188 return 0;
2189}
2190_ACEOF
2191if ac_fn_c_try_compile "$LINENO"; then :
2192 ac_hi=$ac_mid
2193else
2194 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2195fi
2196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197done
2198case $ac_lo in #((
2199?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2200'') ac_retval=1 ;;
2201esac
2202 else
2203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204/* end confdefs.h. */
2205$4
2206static long int longval () { return $2; }
2207static unsigned long int ulongval () { return $2; }
2208#include <stdio.h>
2209#include <stdlib.h>
2210int
2211main ()
2212{
bec39cab 2213
81ecdfbb
RW
2214 FILE *f = fopen ("conftest.val", "w");
2215 if (! f)
2216 return 1;
2217 if (($2) < 0)
2218 {
2219 long int i = longval ();
2220 if (i != ($2))
2221 return 1;
2222 fprintf (f, "%ld", i);
2223 }
2224 else
2225 {
2226 unsigned long int i = ulongval ();
2227 if (i != ($2))
2228 return 1;
2229 fprintf (f, "%lu", i);
2230 }
2231 /* Do not output a trailing newline, as this causes \r\n confusion
2232 on some platforms. */
2233 return ferror (f) || fclose (f) != 0;
bec39cab 2234
81ecdfbb
RW
2235 ;
2236 return 0;
2237}
2238_ACEOF
2239if ac_fn_c_try_run "$LINENO"; then :
2240 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2241else
2242 ac_retval=1
2243fi
2244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2245 conftest.$ac_objext conftest.beam conftest.$ac_ext
2246rm -f conftest.val
bec39cab 2247
81ecdfbb 2248 fi
d0ac1c44
SM
2249 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2250 as_fn_set_status $ac_retval
bec39cab 2251
81ecdfbb 2252} # ac_fn_c_compute_int
bec39cab 2253
55a8c076
YQ
2254# ac_fn_c_check_func LINENO FUNC VAR
2255# ----------------------------------
2256# Tests whether FUNC exists, setting the cache variable VAR accordingly
2257ac_fn_c_check_func ()
81ecdfbb
RW
2258{
2259 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2261$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2262if eval \${$3+:} false; then :
81ecdfbb
RW
2263 $as_echo_n "(cached) " >&6
2264else
81ecdfbb
RW
2265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266/* end confdefs.h. */
55a8c076
YQ
2267/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2268 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2269#define $2 innocuous_$2
2270
2271/* System header to define __stub macros and hopefully few prototypes,
2272 which can conflict with char $2 (); below.
2273 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2274 <limits.h> exists even on freestanding compilers. */
2275
2276#ifdef __STDC__
2277# include <limits.h>
2278#else
2279# include <assert.h>
2280#endif
2281
2282#undef $2
2283
2284/* Override any GCC internal prototype to avoid an error.
2285 Use char because int might match the return type of a GCC
2286 builtin and then its argument prototype would still apply. */
2287#ifdef __cplusplus
2288extern "C"
2289#endif
2290char $2 ();
2291/* The GNU C library defines this for functions which it implements
2292 to always fail with ENOSYS. Some functions are actually named
2293 something starting with __ and the normal name is an alias. */
2294#if defined __stub_$2 || defined __stub___$2
2295choke me
2296#endif
2297
2298int
2299main ()
2300{
2301return $2 ();
2302 ;
2303 return 0;
2304}
2305_ACEOF
2306if ac_fn_c_try_link "$LINENO"; then :
2307 eval "$3=yes"
2308else
2309 eval "$3=no"
2310fi
2311rm -f core conftest.err conftest.$ac_objext \
2312 conftest$ac_exeext conftest.$ac_ext
2313fi
2314eval ac_res=\$$3
2315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2316$as_echo "$ac_res" >&6; }
d0ac1c44 2317 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2318
2319} # ac_fn_c_check_func
2320
07697489
PA
2321# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2322# -------------------------------------------
2323# Tests whether TYPE exists after having included INCLUDES, setting cache
2324# variable VAR accordingly.
2325ac_fn_c_check_type ()
2326{
2327 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2329$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2330if eval \${$3+:} false; then :
07697489
PA
2331 $as_echo_n "(cached) " >&6
2332else
2333 eval "$3=no"
2334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2335/* end confdefs.h. */
2336$4
2337int
2338main ()
2339{
2340if (sizeof ($2))
2341 return 0;
2342 ;
2343 return 0;
2344}
2345_ACEOF
2346if ac_fn_c_try_compile "$LINENO"; then :
2347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348/* end confdefs.h. */
2349$4
2350int
2351main ()
2352{
2353if (sizeof (($2)))
2354 return 0;
2355 ;
2356 return 0;
2357}
2358_ACEOF
2359if ac_fn_c_try_compile "$LINENO"; then :
2360
2361else
2362 eval "$3=yes"
2363fi
2364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2365fi
2366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2367fi
2368eval ac_res=\$$3
2369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2370$as_echo "$ac_res" >&6; }
d0ac1c44 2371 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2372
2373} # ac_fn_c_check_type
2374
d0ac1c44
SM
2375# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2376# ---------------------------------------------
2377# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2378# accordingly.
770d76d7
PA
2379ac_fn_c_check_decl ()
2380{
2381 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2382 as_decl_name=`echo $2|sed 's/ *(.*//'`
2383 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2385$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2386if eval \${$3+:} false; then :
770d76d7
PA
2387 $as_echo_n "(cached) " >&6
2388else
2389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2390/* end confdefs.h. */
2391$4
2392int
2393main ()
2394{
2395#ifndef $as_decl_name
2396#ifdef __cplusplus
2397 (void) $as_decl_use;
2398#else
2399 (void) $as_decl_name;
2400#endif
2401#endif
2402
2403 ;
2404 return 0;
2405}
2406_ACEOF
2407if ac_fn_c_try_compile "$LINENO"; then :
2408 eval "$3=yes"
2409else
2410 eval "$3=no"
2411fi
2412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2413fi
2414eval ac_res=\$$3
2415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2416$as_echo "$ac_res" >&6; }
d0ac1c44 2417 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2418
2419} # ac_fn_c_check_decl
f35d5ade 2420
05ea2a05
TT
2421# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2422# ----------------------------------------------------
2423# Tries to find if the field MEMBER exists in type AGGR, after including
2424# INCLUDES, setting cache variable VAR accordingly.
2425ac_fn_c_check_member ()
2426{
2427 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2429$as_echo_n "checking for $2.$3... " >&6; }
2430if eval \${$4+:} false; then :
2431 $as_echo_n "(cached) " >&6
2432else
2433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434/* end confdefs.h. */
2435$5
2436int
2437main ()
2438{
2439static $2 ac_aggr;
2440if (ac_aggr.$3)
2441return 0;
2442 ;
2443 return 0;
2444}
2445_ACEOF
2446if ac_fn_c_try_compile "$LINENO"; then :
2447 eval "$4=yes"
2448else
2449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2450/* end confdefs.h. */
2451$5
2452int
2453main ()
2454{
2455static $2 ac_aggr;
2456if (sizeof ac_aggr.$3)
2457return 0;
2458 ;
2459 return 0;
2460}
2461_ACEOF
2462if ac_fn_c_try_compile "$LINENO"; then :
2463 eval "$4=yes"
2464else
2465 eval "$4=no"
2466fi
2467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2468fi
2469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2470fi
2471eval ac_res=\$$4
2472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2473$as_echo "$ac_res" >&6; }
2474 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2475
2476} # ac_fn_c_check_member
2477
f35d5ade
TT
2478# ac_fn_cxx_try_link LINENO
2479# -------------------------
2480# Try to link conftest.$ac_ext, and return whether this succeeded.
2481ac_fn_cxx_try_link ()
2482{
2483 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2484 rm -f conftest.$ac_objext conftest$ac_exeext
2485 if { { ac_try="$ac_link"
2486case "(($ac_try" in
2487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2488 *) ac_try_echo=$ac_try;;
2489esac
2490eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2491$as_echo "$ac_try_echo"; } >&5
2492 (eval "$ac_link") 2>conftest.err
2493 ac_status=$?
2494 if test -s conftest.err; then
2495 grep -v '^ *+' conftest.err >conftest.er1
2496 cat conftest.er1 >&5
2497 mv -f conftest.er1 conftest.err
2498 fi
2499 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2500 test $ac_status = 0; } && {
2501 test -z "$ac_cxx_werror_flag" ||
2502 test ! -s conftest.err
2503 } && test -s conftest$ac_exeext && {
2504 test "$cross_compiling" = yes ||
2505 test -x conftest$ac_exeext
2506 }; then :
2507 ac_retval=0
2508else
2509 $as_echo "$as_me: failed program was:" >&5
2510sed 's/^/| /' conftest.$ac_ext >&5
2511
2512 ac_retval=1
2513fi
2514 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2515 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2516 # interfere with the next link command; also delete a directory that is
2517 # left behind by Apple's compiler. We do this before executing the actions.
2518 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2519 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2520 as_fn_set_status $ac_retval
2521
2522} # ac_fn_cxx_try_link
21987b9c
TT
2523
2524# ac_fn_cxx_check_func LINENO FUNC VAR
2525# ------------------------------------
2526# Tests whether FUNC exists, setting the cache variable VAR accordingly
2527ac_fn_cxx_check_func ()
2528{
2529 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2531$as_echo_n "checking for $2... " >&6; }
2532if eval \${$3+:} false; then :
2533 $as_echo_n "(cached) " >&6
2534else
2535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2536/* end confdefs.h. */
2537/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2538 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2539#define $2 innocuous_$2
2540
2541/* System header to define __stub macros and hopefully few prototypes,
2542 which can conflict with char $2 (); below.
2543 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2544 <limits.h> exists even on freestanding compilers. */
2545
2546#ifdef __STDC__
2547# include <limits.h>
2548#else
2549# include <assert.h>
2550#endif
2551
2552#undef $2
2553
2554/* Override any GCC internal prototype to avoid an error.
2555 Use char because int might match the return type of a GCC
2556 builtin and then its argument prototype would still apply. */
2557#ifdef __cplusplus
2558extern "C"
2559#endif
2560char $2 ();
2561/* The GNU C library defines this for functions which it implements
2562 to always fail with ENOSYS. Some functions are actually named
2563 something starting with __ and the normal name is an alias. */
2564#if defined __stub_$2 || defined __stub___$2
2565choke me
2566#endif
2567
2568int
2569main ()
2570{
2571return $2 ();
2572 ;
2573 return 0;
2574}
2575_ACEOF
2576if ac_fn_cxx_try_link "$LINENO"; then :
2577 eval "$3=yes"
2578else
2579 eval "$3=no"
2580fi
2581rm -f core conftest.err conftest.$ac_objext \
2582 conftest$ac_exeext conftest.$ac_ext
2583fi
2584eval ac_res=\$$3
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2586$as_echo "$ac_res" >&6; }
2587 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2588
2589} # ac_fn_cxx_check_func
81ecdfbb
RW
2590cat >config.log <<_ACEOF
2591This file contains any messages produced by compilers while
2592running configure, to aid debugging if configure makes a mistake.
d5af19ba 2593
81ecdfbb 2594It was created by $as_me, which was
d0ac1c44 2595generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2596
81ecdfbb 2597 $ $0 $@
413ccac7 2598
81ecdfbb
RW
2599_ACEOF
2600exec 5>>config.log
2601{
2602cat <<_ASUNAME
2603## --------- ##
2604## Platform. ##
2605## --------- ##
413ccac7 2606
81ecdfbb
RW
2607hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2608uname -m = `(uname -m) 2>/dev/null || echo unknown`
2609uname -r = `(uname -r) 2>/dev/null || echo unknown`
2610uname -s = `(uname -s) 2>/dev/null || echo unknown`
2611uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2612
81ecdfbb
RW
2613/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2614/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2615
81ecdfbb
RW
2616/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2617/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2618/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2619/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2620/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2621/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2622/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2623
81ecdfbb 2624_ASUNAME
bec39cab 2625
bec39cab
AC
2626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2627for as_dir in $PATH
2628do
2629 IFS=$as_save_IFS
2630 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2631 $as_echo "PATH: $as_dir"
2632 done
2633IFS=$as_save_IFS
bec39cab 2634
81ecdfbb 2635} >&5
bec39cab 2636
81ecdfbb 2637cat >&5 <<_ACEOF
bec39cab 2638
bec39cab 2639
81ecdfbb
RW
2640## ----------- ##
2641## Core tests. ##
2642## ----------- ##
2643
2644_ACEOF
2645
2646
2647# Keep a trace of the command line.
2648# Strip out --no-create and --no-recursion so they do not pile up.
2649# Strip out --silent because we don't want to record it for future runs.
2650# Also quote any args containing shell meta-characters.
2651# Make two passes to allow for proper duplicate-argument suppression.
2652ac_configure_args=
2653ac_configure_args0=
2654ac_configure_args1=
2655ac_must_keep_next=false
2656for ac_pass in 1 2
2657do
2658 for ac_arg
2659 do
2660 case $ac_arg in
2661 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2662 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2663 | -silent | --silent | --silen | --sile | --sil)
2664 continue ;;
2665 *\'*)
2666 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2667 esac
2668 case $ac_pass in
2669 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2670 2)
2671 as_fn_append ac_configure_args1 " '$ac_arg'"
2672 if test $ac_must_keep_next = true; then
2673 ac_must_keep_next=false # Got value, back to normal.
2674 else
2675 case $ac_arg in
2676 *=* | --config-cache | -C | -disable-* | --disable-* \
2677 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2678 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2679 | -with-* | --with-* | -without-* | --without-* | --x)
2680 case "$ac_configure_args0 " in
2681 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2682 esac
2683 ;;
2684 -* ) ac_must_keep_next=true ;;
2685 esac
2686 fi
2687 as_fn_append ac_configure_args " '$ac_arg'"
2688 ;;
2689 esac
2690 done
2691done
2692{ ac_configure_args0=; unset ac_configure_args0;}
2693{ ac_configure_args1=; unset ac_configure_args1;}
2694
2695# When interrupted or exit'd, cleanup temporary files, and complete
2696# config.log. We remove comments because anyway the quotes in there
2697# would cause problems or look ugly.
2698# WARNING: Use '\'' to represent an apostrophe within the trap.
2699# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2700trap 'exit_status=$?
2701 # Save into config.log some information that might help in debugging.
2702 {
2703 echo
2704
d0ac1c44 2705 $as_echo "## ---------------- ##
81ecdfbb 2706## Cache variables. ##
d0ac1c44 2707## ---------------- ##"
81ecdfbb
RW
2708 echo
2709 # The following way of writing the cache mishandles newlines in values,
2710(
2711 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2712 eval ac_val=\$$ac_var
2713 case $ac_val in #(
2714 *${as_nl}*)
2715 case $ac_var in #(
2716 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2717$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2718 esac
2719 case $ac_var in #(
2720 _ | IFS | as_nl) ;; #(
2721 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2722 *) { eval $ac_var=; unset $ac_var;} ;;
2723 esac ;;
2724 esac
2725 done
2726 (set) 2>&1 |
2727 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2728 *${as_nl}ac_space=\ *)
2729 sed -n \
2730 "s/'\''/'\''\\\\'\'''\''/g;
2731 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2732 ;; #(
2733 *)
2734 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2735 ;;
2736 esac |
2737 sort
2738)
2739 echo
2740
d0ac1c44 2741 $as_echo "## ----------------- ##
81ecdfbb 2742## Output variables. ##
d0ac1c44 2743## ----------------- ##"
81ecdfbb
RW
2744 echo
2745 for ac_var in $ac_subst_vars
2746 do
2747 eval ac_val=\$$ac_var
2748 case $ac_val in
2749 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2750 esac
2751 $as_echo "$ac_var='\''$ac_val'\''"
2752 done | sort
2753 echo
2754
2755 if test -n "$ac_subst_files"; then
d0ac1c44 2756 $as_echo "## ------------------- ##
81ecdfbb 2757## File substitutions. ##
d0ac1c44 2758## ------------------- ##"
81ecdfbb
RW
2759 echo
2760 for ac_var in $ac_subst_files
2761 do
2762 eval ac_val=\$$ac_var
2763 case $ac_val in
2764 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2765 esac
2766 $as_echo "$ac_var='\''$ac_val'\''"
2767 done | sort
2768 echo
2769 fi
2770
2771 if test -s confdefs.h; then
d0ac1c44 2772 $as_echo "## ----------- ##
81ecdfbb 2773## confdefs.h. ##
d0ac1c44 2774## ----------- ##"
81ecdfbb
RW
2775 echo
2776 cat confdefs.h
2777 echo
2778 fi
2779 test "$ac_signal" != 0 &&
2780 $as_echo "$as_me: caught signal $ac_signal"
2781 $as_echo "$as_me: exit $exit_status"
2782 } >&5
2783 rm -f core *.core core.conftest.* &&
2784 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2785 exit $exit_status
2786' 0
2787for ac_signal in 1 2 13 15; do
2788 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2789done
2790ac_signal=0
2791
2792# confdefs.h avoids OS command line length limits that DEFS can exceed.
2793rm -f -r conftest* confdefs.h
2794
2795$as_echo "/* confdefs.h */" > confdefs.h
2796
2797# Predefined preprocessor variables.
2798
2799cat >>confdefs.h <<_ACEOF
2800#define PACKAGE_NAME "$PACKAGE_NAME"
2801_ACEOF
2802
2803cat >>confdefs.h <<_ACEOF
2804#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2805_ACEOF
2806
2807cat >>confdefs.h <<_ACEOF
2808#define PACKAGE_VERSION "$PACKAGE_VERSION"
2809_ACEOF
2810
2811cat >>confdefs.h <<_ACEOF
2812#define PACKAGE_STRING "$PACKAGE_STRING"
2813_ACEOF
2814
2815cat >>confdefs.h <<_ACEOF
2816#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2817_ACEOF
2818
2819cat >>confdefs.h <<_ACEOF
2820#define PACKAGE_URL "$PACKAGE_URL"
2821_ACEOF
2822
2823
2824# Let the site file select an alternate cache file if it wants to.
2825# Prefer an explicitly selected file to automatically selected ones.
2826ac_site_file1=NONE
2827ac_site_file2=NONE
2828if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2829 # We do not want a PATH search for config.site.
2830 case $CONFIG_SITE in #((
2831 -*) ac_site_file1=./$CONFIG_SITE;;
2832 */*) ac_site_file1=$CONFIG_SITE;;
2833 *) ac_site_file1=./$CONFIG_SITE;;
2834 esac
81ecdfbb
RW
2835elif test "x$prefix" != xNONE; then
2836 ac_site_file1=$prefix/share/config.site
2837 ac_site_file2=$prefix/etc/config.site
2838else
2839 ac_site_file1=$ac_default_prefix/share/config.site
2840 ac_site_file2=$ac_default_prefix/etc/config.site
2841fi
2842for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2843do
2844 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2845 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2846 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2847$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2848 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2849 . "$ac_site_file" \
2850 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2851$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2852as_fn_error $? "failed to load site script $ac_site_file
2853See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2854 fi
2855done
2856
2857if test -r "$cache_file"; then
d0ac1c44
SM
2858 # Some versions of bash will fail to source /dev/null (special files
2859 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2860 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2862$as_echo "$as_me: loading cache $cache_file" >&6;}
2863 case $cache_file in
2864 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2865 *) . "./$cache_file";;
2866 esac
2867 fi
2868else
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2870$as_echo "$as_me: creating cache $cache_file" >&6;}
2871 >$cache_file
bec39cab
AC
2872fi
2873
d0ac1c44
SM
2874as_fn_append ac_header_list " stdlib.h"
2875as_fn_append ac_header_list " unistd.h"
2876as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2877# Check that the precious variables saved in the cache have kept the same
2878# value.
2879ac_cache_corrupted=false
2880for ac_var in $ac_precious_vars; do
2881 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2882 eval ac_new_set=\$ac_env_${ac_var}_set
2883 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2884 eval ac_new_val=\$ac_env_${ac_var}_value
2885 case $ac_old_set,$ac_new_set in
2886 set,)
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2888$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2889 ac_cache_corrupted=: ;;
2890 ,set)
2891 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2892$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2893 ac_cache_corrupted=: ;;
2894 ,);;
2895 *)
2896 if test "x$ac_old_val" != "x$ac_new_val"; then
2897 # differences in whitespace do not lead to failure.
2898 ac_old_val_w=`echo x $ac_old_val`
2899 ac_new_val_w=`echo x $ac_new_val`
2900 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2902$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2903 ac_cache_corrupted=:
2904 else
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2906$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2907 eval $ac_var=\$ac_old_val
2908 fi
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2910$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2912$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2913 fi;;
2914 esac
2915 # Pass precious variables to config.status.
2916 if test "$ac_new_set" = set; then
2917 case $ac_new_val in
2918 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2919 *) ac_arg=$ac_var=$ac_new_val ;;
2920 esac
2921 case " $ac_configure_args " in
2922 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2923 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2924 esac
2925 fi
2926done
2927if $ac_cache_corrupted; then
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2931$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2932 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2933fi
2934## -------------------- ##
2935## Main body of script. ##
2936## -------------------- ##
2937
2938ac_ext=c
2939ac_cpp='$CPP $CPPFLAGS'
2940ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2941ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2942ac_compiler_gnu=$ac_cv_c_compiler_gnu
2943
2944
2945
2946
2947
2948ac_config_headers="$ac_config_headers config.h:config.in"
2949
2950
2951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2952$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2953 # Check whether --enable-maintainer-mode was given.
2954if test "${enable_maintainer_mode+set}" = set; then :
2955 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2956else
2957 USE_MAINTAINER_MODE=no
2958fi
2959
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2961$as_echo "$USE_MAINTAINER_MODE" >&6; }
2962 if test $USE_MAINTAINER_MODE = yes; then
2963 MAINTAINER_MODE_TRUE=
2964 MAINTAINER_MODE_FALSE='#'
2965else
2966 MAINTAINER_MODE_TRUE='#'
2967 MAINTAINER_MODE_FALSE=
2968fi
2969
2970 MAINT=$MAINTAINER_MODE_TRUE
2971
2972
2973
17ef446e 2974# Set the 'development' global.
270c9937 2975. $srcdir/../bfd/development.sh
f5f1cdb6 2976
81ecdfbb
RW
2977ac_ext=c
2978ac_cpp='$CPP $CPPFLAGS'
2979ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2980ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2981ac_compiler_gnu=$ac_cv_c_compiler_gnu
2982if test -n "$ac_tool_prefix"; then
2983 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2984set dummy ${ac_tool_prefix}gcc; ac_word=$2
2985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2986$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2987if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2988 $as_echo_n "(cached) " >&6
c906108c
SS
2989else
2990 if test -n "$CC"; then
2991 ac_cv_prog_CC="$CC" # Let the user override the test.
2992else
bec39cab
AC
2993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2994for as_dir in $PATH
2995do
2996 IFS=$as_save_IFS
2997 test -z "$as_dir" && as_dir=.
81ecdfbb 2998 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3000 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3002 break 2
3003 fi
3004done
81ecdfbb
RW
3005 done
3006IFS=$as_save_IFS
bec39cab 3007
c906108c
SS
3008fi
3009fi
bec39cab 3010CC=$ac_cv_prog_CC
c906108c 3011if test -n "$CC"; then
81ecdfbb
RW
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3013$as_echo "$CC" >&6; }
c906108c 3014else
81ecdfbb
RW
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3016$as_echo "no" >&6; }
c906108c
SS
3017fi
3018
81ecdfbb 3019
b4e70030
JB
3020fi
3021if test -z "$ac_cv_prog_CC"; then
3022 ac_ct_CC=$CC
81ecdfbb
RW
3023 # Extract the first word of "gcc", so it can be a program name with args.
3024set dummy gcc; ac_word=$2
3025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3026$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3027if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3028 $as_echo_n "(cached) " >&6
b4e70030
JB
3029else
3030 if test -n "$ac_ct_CC"; then
3031 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3032else
3033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3034for as_dir in $PATH
3035do
3036 IFS=$as_save_IFS
3037 test -z "$as_dir" && as_dir=.
81ecdfbb 3038 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3040 ac_cv_prog_ac_ct_CC="gcc"
3041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 3042 break 2
4e8d927d 3043 fi
b4e70030 3044done
81ecdfbb
RW
3045 done
3046IFS=$as_save_IFS
b4e70030
JB
3047
3048fi
3049fi
3050ac_ct_CC=$ac_cv_prog_ac_ct_CC
3051if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3053$as_echo "$ac_ct_CC" >&6; }
b4e70030 3054else
81ecdfbb
RW
3055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3056$as_echo "no" >&6; }
b4e70030
JB
3057fi
3058
81ecdfbb
RW
3059 if test "x$ac_ct_CC" = x; then
3060 CC=""
3061 else
3062 case $cross_compiling:$ac_tool_warned in
3063yes:)
3064{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3065$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3066ac_tool_warned=yes ;;
3067esac
3068 CC=$ac_ct_CC
3069 fi
b4e70030
JB
3070else
3071 CC="$ac_cv_prog_CC"
3072fi
3073
c906108c 3074if test -z "$CC"; then
81ecdfbb
RW
3075 if test -n "$ac_tool_prefix"; then
3076 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3077set dummy ${ac_tool_prefix}cc; ac_word=$2
3078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3079$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3080if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3081 $as_echo_n "(cached) " >&6
c906108c
SS
3082else
3083 if test -n "$CC"; then
3084 ac_cv_prog_CC="$CC" # Let the user override the test.
3085else
bec39cab
AC
3086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3087for as_dir in $PATH
3088do
3089 IFS=$as_save_IFS
3090 test -z "$as_dir" && as_dir=.
81ecdfbb 3091 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3092 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3093 ac_cv_prog_CC="${ac_tool_prefix}cc"
3094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3095 break 2
3096 fi
3097done
81ecdfbb
RW
3098 done
3099IFS=$as_save_IFS
3100
3101fi
3102fi
3103CC=$ac_cv_prog_CC
3104if test -n "$CC"; then
3105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3106$as_echo "$CC" >&6; }
3107else
3108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3109$as_echo "no" >&6; }
3110fi
3111
3112
3113 fi
3114fi
3115if test -z "$CC"; then
3116 # Extract the first word of "cc", so it can be a program name with args.
3117set dummy cc; ac_word=$2
3118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3119$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3120if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3121 $as_echo_n "(cached) " >&6
3122else
3123 if test -n "$CC"; then
3124 ac_cv_prog_CC="$CC" # Let the user override the test.
3125else
3126 ac_prog_rejected=no
3127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3128for as_dir in $PATH
3129do
3130 IFS=$as_save_IFS
3131 test -z "$as_dir" && as_dir=.
3132 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3133 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3134 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3135 ac_prog_rejected=yes
3136 continue
3137 fi
3138 ac_cv_prog_CC="cc"
3139 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3140 break 2
3141 fi
3142done
3143 done
3144IFS=$as_save_IFS
bec39cab 3145
c906108c
SS
3146if test $ac_prog_rejected = yes; then
3147 # We found a bogon in the path, so make sure we never use it.
3148 set dummy $ac_cv_prog_CC
3149 shift
bec39cab 3150 if test $# != 0; then
c906108c
SS
3151 # We chose a different compiler from the bogus one.
3152 # However, it has the same basename, so the bogon will be chosen
3153 # first if we set CC to just the basename; use the full file name.
3154 shift
bec39cab 3155 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3156 fi
3157fi
3158fi
3159fi
bec39cab 3160CC=$ac_cv_prog_CC
c906108c 3161if test -n "$CC"; then
81ecdfbb
RW
3162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3163$as_echo "$CC" >&6; }
c906108c 3164else
81ecdfbb
RW
3165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3166$as_echo "no" >&6; }
c906108c
SS
3167fi
3168
81ecdfbb 3169
bec39cab
AC
3170fi
3171if test -z "$CC"; then
3172 if test -n "$ac_tool_prefix"; then
81ecdfbb 3173 for ac_prog in cl.exe
bec39cab
AC
3174 do
3175 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3176set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3178$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3179if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3180 $as_echo_n "(cached) " >&6
c906108c
SS
3181else
3182 if test -n "$CC"; then
3183 ac_cv_prog_CC="$CC" # Let the user override the test.
3184else
bec39cab
AC
3185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3186for as_dir in $PATH
3187do
3188 IFS=$as_save_IFS
3189 test -z "$as_dir" && as_dir=.
81ecdfbb 3190 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3191 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3192 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3193 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3194 break 2
3195 fi
3196done
81ecdfbb
RW
3197 done
3198IFS=$as_save_IFS
bec39cab 3199
c906108c
SS
3200fi
3201fi
bec39cab 3202CC=$ac_cv_prog_CC
c906108c 3203if test -n "$CC"; then
81ecdfbb
RW
3204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3205$as_echo "$CC" >&6; }
c906108c 3206else
81ecdfbb
RW
3207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3208$as_echo "no" >&6; }
c906108c 3209fi
bec39cab 3210
81ecdfbb 3211
bec39cab
AC
3212 test -n "$CC" && break
3213 done
3214fi
3215if test -z "$CC"; then
3216 ac_ct_CC=$CC
81ecdfbb 3217 for ac_prog in cl.exe
bec39cab
AC
3218do
3219 # Extract the first word of "$ac_prog", so it can be a program name with args.
3220set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3222$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3223if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3224 $as_echo_n "(cached) " >&6
bec39cab
AC
3225else
3226 if test -n "$ac_ct_CC"; then
3227 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3228else
3229as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3230for as_dir in $PATH
3231do
3232 IFS=$as_save_IFS
3233 test -z "$as_dir" && as_dir=.
81ecdfbb 3234 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3235 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3236 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3237 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3238 break 2
c906108c 3239 fi
bec39cab 3240done
81ecdfbb
RW
3241 done
3242IFS=$as_save_IFS
bec39cab
AC
3243
3244fi
3245fi
3246ac_ct_CC=$ac_cv_prog_ac_ct_CC
3247if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3249$as_echo "$ac_ct_CC" >&6; }
bec39cab 3250else
81ecdfbb
RW
3251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3252$as_echo "no" >&6; }
c906108c
SS
3253fi
3254
81ecdfbb 3255
bec39cab
AC
3256 test -n "$ac_ct_CC" && break
3257done
c906108c 3258
81ecdfbb
RW
3259 if test "x$ac_ct_CC" = x; then
3260 CC=""
3261 else
3262 case $cross_compiling:$ac_tool_warned in
3263yes:)
3264{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3265$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3266ac_tool_warned=yes ;;
3267esac
3268 CC=$ac_ct_CC
3269 fi
bec39cab
AC
3270fi
3271
3272fi
3273
3274
81ecdfbb
RW
3275test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3277as_fn_error $? "no acceptable C compiler found in \$PATH
3278See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3279
3280# Provide some information about the compiler.
81ecdfbb
RW
3281$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3282set X $ac_compile
3283ac_compiler=$2
3284for ac_option in --version -v -V -qversion; do
3285 { { ac_try="$ac_compiler $ac_option >&5"
3286case "(($ac_try" in
3287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3288 *) ac_try_echo=$ac_try;;
3289esac
3290eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3291$as_echo "$ac_try_echo"; } >&5
3292 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3293 ac_status=$?
81ecdfbb
RW
3294 if test -s conftest.err; then
3295 sed '10a\
3296... rest of stderr output deleted ...
3297 10q' conftest.err >conftest.er1
3298 cat conftest.er1 >&5
81ecdfbb 3299 fi
d0ac1c44 3300 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3301 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3302 test $ac_status = 0; }
3303done
bec39cab 3304
81ecdfbb 3305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3306/* end confdefs.h. */
3307
3308int
3309main ()
3310{
3311
3312 ;
3313 return 0;
3314}
3315_ACEOF
3316ac_clean_files_save=$ac_clean_files
d0ac1c44 3317ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3318# Try to create an executable without -o first, disregard a.out.
3319# It will help us diagnose broken compilers, and finding out an intuition
3320# of exeext.
d0ac1c44
SM
3321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3322$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3323ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3324
3325# The possible output files:
3326ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3327
3328ac_rmfiles=
3329for ac_file in $ac_files
3330do
3331 case $ac_file in
3332 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3333 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3334 esac
3335done
3336rm -f $ac_rmfiles
3337
3338if { { ac_try="$ac_link_default"
3339case "(($ac_try" in
3340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3341 *) ac_try_echo=$ac_try;;
3342esac
3343eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3344$as_echo "$ac_try_echo"; } >&5
3345 (eval "$ac_link_default") 2>&5
3346 ac_status=$?
3347 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3348 test $ac_status = 0; }; then :
3349 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3350# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3351# in a Makefile. We should not override ac_cv_exeext if it was cached,
3352# so that the user can short-circuit this test for compilers unknown to
3353# Autoconf.
3354for ac_file in $ac_files ''
bec39cab
AC
3355do
3356 test -f "$ac_file" || continue
3357 case $ac_file in
81ecdfbb 3358 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3359 ;;
3360 [ab].out )
3361 # We found the default executable, but exeext='' is most
3362 # certainly right.
3363 break;;
3364 *.* )
81ecdfbb
RW
3365 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3366 then :; else
3367 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3368 fi
3369 # We set ac_cv_exeext here because the later test for it is not
3370 # safe: cross compilers may not add the suffix if given an `-o'
3371 # argument, so we may need to know it at that point already.
3372 # Even if this section looks crufty: it has the advantage of
3373 # actually working.
b4e70030
JB
3374 break;;
3375 * )
3376 break;;
bec39cab
AC
3377 esac
3378done
81ecdfbb
RW
3379test "$ac_cv_exeext" = no && ac_cv_exeext=
3380
bec39cab 3381else
81ecdfbb
RW
3382 ac_file=''
3383fi
81ecdfbb 3384if test -z "$ac_file"; then :
d0ac1c44
SM
3385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3386$as_echo "no" >&6; }
3387$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3388sed 's/^/| /' conftest.$ac_ext >&5
3389
81ecdfbb
RW
3390{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3391$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3392as_fn_error 77 "C compiler cannot create executables
3393See \`config.log' for more details" "$LINENO" 5; }
3394else
3395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3396$as_echo "yes" >&6; }
bec39cab 3397fi
d0ac1c44
SM
3398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3399$as_echo_n "checking for C compiler default output file name... " >&6; }
3400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3401$as_echo "$ac_file" >&6; }
b4e70030 3402ac_exeext=$ac_cv_exeext
b4e70030 3403
d0ac1c44 3404rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3405ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3407$as_echo_n "checking for suffix of executables... " >&6; }
3408if { { ac_try="$ac_link"
3409case "(($ac_try" in
3410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3411 *) ac_try_echo=$ac_try;;
3412esac
3413eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3414$as_echo "$ac_try_echo"; } >&5
3415 (eval "$ac_link") 2>&5
bec39cab 3416 ac_status=$?
81ecdfbb
RW
3417 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3418 test $ac_status = 0; }; then :
b4e70030
JB
3419 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3420# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3421# work properly (i.e., refer to `conftest.exe'), while it won't with
3422# `rm'.
3423for ac_file in conftest.exe conftest conftest.*; do
3424 test -f "$ac_file" || continue
3425 case $ac_file in
81ecdfbb 3426 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3427 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3428 break;;
3429 * ) break;;
3430 esac
3431done
c906108c 3432else
81ecdfbb
RW
3433 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3434$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3435as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3436See \`config.log' for more details" "$LINENO" 5; }
c906108c 3437fi
d0ac1c44 3438rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3440$as_echo "$ac_cv_exeext" >&6; }
c906108c 3441
b4e70030 3442rm -f conftest.$ac_ext
bec39cab
AC
3443EXEEXT=$ac_cv_exeext
3444ac_exeext=$EXEEXT
d0ac1c44
SM
3445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3446/* end confdefs.h. */
3447#include <stdio.h>
3448int
3449main ()
3450{
3451FILE *f = fopen ("conftest.out", "w");
3452 return ferror (f) || fclose (f) != 0;
3453
3454 ;
3455 return 0;
3456}
3457_ACEOF
3458ac_clean_files="$ac_clean_files conftest.out"
3459# Check that the compiler produces executables we can run. If not, either
3460# the compiler is broken, or we cross compile.
3461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3462$as_echo_n "checking whether we are cross compiling... " >&6; }
3463if test "$cross_compiling" != yes; then
3464 { { ac_try="$ac_link"
3465case "(($ac_try" in
3466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3467 *) ac_try_echo=$ac_try;;
3468esac
3469eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3470$as_echo "$ac_try_echo"; } >&5
3471 (eval "$ac_link") 2>&5
3472 ac_status=$?
3473 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3474 test $ac_status = 0; }
3475 if { ac_try='./conftest$ac_cv_exeext'
3476 { { case "(($ac_try" in
3477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3478 *) ac_try_echo=$ac_try;;
3479esac
3480eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3481$as_echo "$ac_try_echo"; } >&5
3482 (eval "$ac_try") 2>&5
3483 ac_status=$?
3484 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3485 test $ac_status = 0; }; }; then
3486 cross_compiling=no
3487 else
3488 if test "$cross_compiling" = maybe; then
3489 cross_compiling=yes
3490 else
3491 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3493as_fn_error $? "cannot run C compiled programs.
3494If you meant to cross compile, use \`--host'.
3495See \`config.log' for more details" "$LINENO" 5; }
3496 fi
3497 fi
3498fi
3499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3500$as_echo "$cross_compiling" >&6; }
3501
3502rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3503ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3505$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3506if ${ac_cv_objext+:} false; then :
81ecdfbb 3507 $as_echo_n "(cached) " >&6
bec39cab 3508else
81ecdfbb 3509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3510/* end confdefs.h. */
3511
3512int
3513main ()
3514{
3515
3516 ;
3517 return 0;
3518}
3519_ACEOF
3520rm -f conftest.o conftest.obj
81ecdfbb
RW
3521if { { ac_try="$ac_compile"
3522case "(($ac_try" in
3523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3524 *) ac_try_echo=$ac_try;;
3525esac
3526eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3527$as_echo "$ac_try_echo"; } >&5
3528 (eval "$ac_compile") 2>&5
3529 ac_status=$?
3530 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3531 test $ac_status = 0; }; then :
3532 for ac_file in conftest.o conftest.obj conftest.*; do
3533 test -f "$ac_file" || continue;
bec39cab 3534 case $ac_file in
81ecdfbb 3535 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3536 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3537 break;;
3538 esac
3539done
c906108c 3540else
81ecdfbb 3541 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3542sed 's/^/| /' conftest.$ac_ext >&5
3543
81ecdfbb
RW
3544{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3545$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3546as_fn_error $? "cannot compute suffix of object files: cannot compile
3547See \`config.log' for more details" "$LINENO" 5; }
c906108c 3548fi
b4e70030 3549rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3550fi
81ecdfbb
RW
3551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3552$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3553OBJEXT=$ac_cv_objext
3554ac_objext=$OBJEXT
81ecdfbb
RW
3555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3556$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3557if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3558 $as_echo_n "(cached) " >&6
c906108c 3559else
81ecdfbb 3560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3561/* end confdefs.h. */
3562
3563int
3564main ()
3565{
3566#ifndef __GNUC__
3567 choke me
3568#endif
3569
3570 ;
3571 return 0;
3572}
3573_ACEOF
81ecdfbb 3574if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3575 ac_compiler_gnu=yes
3576else
81ecdfbb 3577 ac_compiler_gnu=no
bec39cab 3578fi
81ecdfbb 3579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3580ac_cv_c_compiler_gnu=$ac_compiler_gnu
3581
3582fi
81ecdfbb
RW
3583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3584$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3585if test $ac_compiler_gnu = yes; then
3586 GCC=yes
3587else
3588 GCC=
3589fi
bec39cab
AC
3590ac_test_CFLAGS=${CFLAGS+set}
3591ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3593$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3594if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3595 $as_echo_n "(cached) " >&6
bec39cab 3596else
81ecdfbb
RW
3597 ac_save_c_werror_flag=$ac_c_werror_flag
3598 ac_c_werror_flag=yes
3599 ac_cv_prog_cc_g=no
3600 CFLAGS="-g"
3601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3602/* end confdefs.h. */
3603
3604int
3605main ()
3606{
3607
3608 ;
3609 return 0;
3610}
3611_ACEOF
81ecdfbb 3612if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3613 ac_cv_prog_cc_g=yes
3614else
81ecdfbb
RW
3615 CFLAGS=""
3616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3617/* end confdefs.h. */
3618
3619int
3620main ()
3621{
3622
3623 ;
3624 return 0;
3625}
3626_ACEOF
3627if ac_fn_c_try_compile "$LINENO"; then :
3628
3629else
3630 ac_c_werror_flag=$ac_save_c_werror_flag
3631 CFLAGS="-g"
3632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3633/* end confdefs.h. */
3634
3635int
3636main ()
3637{
c906108c 3638
81ecdfbb
RW
3639 ;
3640 return 0;
3641}
3642_ACEOF
3643if ac_fn_c_try_compile "$LINENO"; then :
3644 ac_cv_prog_cc_g=yes
3645fi
3646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3647fi
3648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3649fi
81ecdfbb
RW
3650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3651 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3652fi
81ecdfbb
RW
3653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3654$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3655if test "$ac_test_CFLAGS" = set; then
bec39cab 3656 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3657elif test $ac_cv_prog_cc_g = yes; then
3658 if test "$GCC" = yes; then
3659 CFLAGS="-g -O2"
3660 else
3661 CFLAGS="-g"
3662 fi
3663else
3664 if test "$GCC" = yes; then
3665 CFLAGS="-O2"
3666 else
3667 CFLAGS=
3668 fi
3669fi
81ecdfbb
RW
3670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3671$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3672if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3673 $as_echo_n "(cached) " >&6
bec39cab 3674else
81ecdfbb 3675 ac_cv_prog_cc_c89=no
bec39cab 3676ac_save_CC=$CC
81ecdfbb 3677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3678/* end confdefs.h. */
c906108c
SS
3679#include <stdarg.h>
3680#include <stdio.h>
d0ac1c44 3681struct stat;
c906108c
SS
3682/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3683struct buf { int x; };
3684FILE * (*rcsopen) (struct buf *, struct stat *, int);
3685static char *e (p, i)
3686 char **p;
3687 int i;
3688{
3689 return p[i];
3690}
3691static char *f (char * (*g) (char **, int), char **p, ...)
3692{
3693 char *s;
3694 va_list v;
3695 va_start (v,p);
3696 s = g (p, va_arg (v,int));
3697 va_end (v);
3698 return s;
3699}
bec39cab
AC
3700
3701/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3702 function prototypes and stuff, but not '\xHH' hex character constants.
3703 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3704 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3705 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3706 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3707 that's true only with -std. */
bec39cab
AC
3708int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3709
81ecdfbb
RW
3710/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3711 inside strings and character constants. */
3712#define FOO(x) 'x'
3713int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3714
c906108c
SS
3715int test (int i, double x);
3716struct s1 {int (*f) (int a);};
3717struct s2 {int (*f) (double a);};
3718int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3719int argc;
3720char **argv;
bec39cab
AC
3721int
3722main ()
3723{
c906108c 3724return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3725 ;
3726 return 0;
3727}
3728_ACEOF
81ecdfbb
RW
3729for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3730 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3731do
3732 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3733 if ac_fn_c_try_compile "$LINENO"; then :
3734 ac_cv_prog_cc_c89=$ac_arg
c906108c 3735fi
81ecdfbb
RW
3736rm -f core conftest.err conftest.$ac_objext
3737 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3738done
81ecdfbb 3739rm -f conftest.$ac_ext
bec39cab 3740CC=$ac_save_CC
c906108c
SS
3741
3742fi
81ecdfbb
RW
3743# AC_CACHE_VAL
3744case "x$ac_cv_prog_cc_c89" in
3745 x)
3746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3747$as_echo "none needed" >&6; } ;;
3748 xno)
3749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3750$as_echo "unsupported" >&6; } ;;
bec39cab 3751 *)
81ecdfbb
RW
3752 CC="$CC $ac_cv_prog_cc_c89"
3753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3754$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3755esac
81ecdfbb 3756if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3757
b4e70030
JB
3758fi
3759
bec39cab
AC
3760ac_ext=c
3761ac_cpp='$CPP $CPPFLAGS'
3762ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3763ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3764ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3765
3bc3d82a
PA
3766ac_ext=cpp
3767ac_cpp='$CXXCPP $CPPFLAGS'
3768ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3769ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3770ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3771if test -z "$CXX"; then
3772 if test -n "$CCC"; then
3773 CXX=$CCC
3774 else
3775 if test -n "$ac_tool_prefix"; then
3776 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3777 do
3778 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3779set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3781$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3782if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3783 $as_echo_n "(cached) " >&6
3784else
3785 if test -n "$CXX"; then
3786 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3787else
3788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3789for as_dir in $PATH
3790do
3791 IFS=$as_save_IFS
3792 test -z "$as_dir" && as_dir=.
3793 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3795 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3797 break 2
3798 fi
3799done
3800 done
3801IFS=$as_save_IFS
3802
3803fi
3804fi
3805CXX=$ac_cv_prog_CXX
3806if test -n "$CXX"; then
3807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3808$as_echo "$CXX" >&6; }
3809else
3810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3811$as_echo "no" >&6; }
3812fi
3813
3814
3815 test -n "$CXX" && break
3816 done
3817fi
3818if test -z "$CXX"; then
3819 ac_ct_CXX=$CXX
3820 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3821do
3822 # Extract the first word of "$ac_prog", so it can be a program name with args.
3823set dummy $ac_prog; ac_word=$2
3824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3825$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3826if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3827 $as_echo_n "(cached) " >&6
3828else
3829 if test -n "$ac_ct_CXX"; then
3830 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3831else
3832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3833for as_dir in $PATH
3834do
3835 IFS=$as_save_IFS
3836 test -z "$as_dir" && as_dir=.
3837 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3839 ac_cv_prog_ac_ct_CXX="$ac_prog"
3840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3841 break 2
3842 fi
3843done
3844 done
3845IFS=$as_save_IFS
3846
3847fi
3848fi
3849ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3850if test -n "$ac_ct_CXX"; then
3851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3852$as_echo "$ac_ct_CXX" >&6; }
3853else
3854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3855$as_echo "no" >&6; }
3856fi
3857
3858
3859 test -n "$ac_ct_CXX" && break
3860done
3861
3862 if test "x$ac_ct_CXX" = x; then
3863 CXX="g++"
3864 else
3865 case $cross_compiling:$ac_tool_warned in
3866yes:)
3867{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3868$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3869ac_tool_warned=yes ;;
3870esac
3871 CXX=$ac_ct_CXX
3872 fi
3873fi
3874
3875 fi
3876fi
3877# Provide some information about the compiler.
3878$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3879set X $ac_compile
3880ac_compiler=$2
3881for ac_option in --version -v -V -qversion; do
3882 { { ac_try="$ac_compiler $ac_option >&5"
3883case "(($ac_try" in
3884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3885 *) ac_try_echo=$ac_try;;
3886esac
3887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3888$as_echo "$ac_try_echo"; } >&5
3889 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3890 ac_status=$?
3891 if test -s conftest.err; then
3892 sed '10a\
3893... rest of stderr output deleted ...
3894 10q' conftest.err >conftest.er1
3895 cat conftest.er1 >&5
3bc3d82a 3896 fi
d0ac1c44 3897 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3899 test $ac_status = 0; }
3900done
3901
3902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3903$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3904if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3905 $as_echo_n "(cached) " >&6
3906else
3907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3908/* end confdefs.h. */
3909
3910int
3911main ()
3912{
3913#ifndef __GNUC__
3914 choke me
3915#endif
3916
3917 ;
3918 return 0;
3919}
3920_ACEOF
3921if ac_fn_cxx_try_compile "$LINENO"; then :
3922 ac_compiler_gnu=yes
3923else
3924 ac_compiler_gnu=no
3925fi
3926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3927ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3928
3929fi
3930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3931$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3932if test $ac_compiler_gnu = yes; then
3933 GXX=yes
3934else
3935 GXX=
3936fi
3937ac_test_CXXFLAGS=${CXXFLAGS+set}
3938ac_save_CXXFLAGS=$CXXFLAGS
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3940$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3941if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3942 $as_echo_n "(cached) " >&6
3943else
3944 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3945 ac_cxx_werror_flag=yes
3946 ac_cv_prog_cxx_g=no
3947 CXXFLAGS="-g"
3948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3949/* end confdefs.h. */
3950
3951int
3952main ()
3953{
3954
3955 ;
3956 return 0;
3957}
3958_ACEOF
3959if ac_fn_cxx_try_compile "$LINENO"; then :
3960 ac_cv_prog_cxx_g=yes
3961else
3962 CXXFLAGS=""
3963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3964/* end confdefs.h. */
3965
3966int
3967main ()
3968{
3969
3970 ;
3971 return 0;
3972}
3973_ACEOF
3974if ac_fn_cxx_try_compile "$LINENO"; then :
3975
3976else
3977 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3978 CXXFLAGS="-g"
3979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3980/* end confdefs.h. */
3981
3982int
3983main ()
3984{
3985
3986 ;
3987 return 0;
3988}
3989_ACEOF
3990if ac_fn_cxx_try_compile "$LINENO"; then :
3991 ac_cv_prog_cxx_g=yes
3992fi
3993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3994fi
3995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3996fi
3997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3998 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3999fi
4000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4001$as_echo "$ac_cv_prog_cxx_g" >&6; }
4002if test "$ac_test_CXXFLAGS" = set; then
4003 CXXFLAGS=$ac_save_CXXFLAGS
4004elif test $ac_cv_prog_cxx_g = yes; then
4005 if test "$GXX" = yes; then
4006 CXXFLAGS="-g -O2"
4007 else
4008 CXXFLAGS="-g"
4009 fi
4010else
4011 if test "$GXX" = yes; then
4012 CXXFLAGS="-O2"
4013 else
4014 CXXFLAGS=
4015 fi
4016fi
4017ac_ext=c
4018ac_cpp='$CPP $CPPFLAGS'
4019ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4020ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4021ac_compiler_gnu=$ac_cv_c_compiler_gnu
4022
4023
60ca704f 4024
bec39cab
AC
4025ac_ext=c
4026ac_cpp='$CPP $CPPFLAGS'
4027ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4028ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4029ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4031$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
4032# On Suns, sometimes $CPP names a directory.
4033if test -n "$CPP" && test -d "$CPP"; then
4034 CPP=
8bb2c122 4035fi
bec39cab 4036if test -z "$CPP"; then
d0ac1c44 4037 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 4038 $as_echo_n "(cached) " >&6
bec39cab
AC
4039else
4040 # Double quotes because CPP needs to be expanded
4041 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4042 do
4043 ac_preproc_ok=false
4044for ac_c_preproc_warn_flag in '' yes
4045do
4046 # Use a header file that comes with gcc, so configuring glibc
4047 # with a fresh cross-compiler works.
4048 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4049 # <limits.h> exists even on freestanding compilers.
4050 # On the NeXT, cc -E runs the code through the compiler's parser,
4051 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4053/* end confdefs.h. */
4054#ifdef __STDC__
4055# include <limits.h>
4056#else
4057# include <assert.h>
4058#endif
4059 Syntax error
4060_ACEOF
81ecdfbb 4061if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4062
81ecdfbb 4063else
bec39cab
AC
4064 # Broken: fails on valid input.
4065continue
4066fi
d0ac1c44 4067rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4068
81ecdfbb 4069 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4070 # can be detected and how.
81ecdfbb 4071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4072/* end confdefs.h. */
4073#include <ac_nonexistent.h>
4074_ACEOF
81ecdfbb 4075if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4076 # Broken: success on invalid input.
4077continue
8bb2c122 4078else
bec39cab
AC
4079 # Passes both tests.
4080ac_preproc_ok=:
4081break
8bb2c122 4082fi
d0ac1c44 4083rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4084
bec39cab
AC
4085done
4086# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4087rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4088if $ac_preproc_ok; then :
bec39cab
AC
4089 break
4090fi
8bb2c122 4091
bec39cab
AC
4092 done
4093 ac_cv_prog_CPP=$CPP
ddc9cd0f 4094
c906108c 4095fi
bec39cab
AC
4096 CPP=$ac_cv_prog_CPP
4097else
4098 ac_cv_prog_CPP=$CPP
c906108c 4099fi
81ecdfbb
RW
4100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4101$as_echo "$CPP" >&6; }
bec39cab
AC
4102ac_preproc_ok=false
4103for ac_c_preproc_warn_flag in '' yes
4104do
4105 # Use a header file that comes with gcc, so configuring glibc
4106 # with a fresh cross-compiler works.
4107 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4108 # <limits.h> exists even on freestanding compilers.
4109 # On the NeXT, cc -E runs the code through the compiler's parser,
4110 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4112/* end confdefs.h. */
4113#ifdef __STDC__
4114# include <limits.h>
4115#else
4116# include <assert.h>
4117#endif
4118 Syntax error
4119_ACEOF
81ecdfbb 4120if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4121
81ecdfbb 4122else
bec39cab
AC
4123 # Broken: fails on valid input.
4124continue
4125fi
d0ac1c44 4126rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4127
81ecdfbb 4128 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4129 # can be detected and how.
81ecdfbb 4130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4131/* end confdefs.h. */
4132#include <ac_nonexistent.h>
4133_ACEOF
81ecdfbb 4134if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4135 # Broken: success on invalid input.
4136continue
c906108c 4137else
bec39cab
AC
4138 # Passes both tests.
4139ac_preproc_ok=:
4140break
c906108c 4141fi
d0ac1c44 4142rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4143
bec39cab
AC
4144done
4145# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4146rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4147if $ac_preproc_ok; then :
4148
c906108c 4149else
81ecdfbb
RW
4150 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4152as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4153See \`config.log' for more details" "$LINENO" 5; }
c906108c 4154fi
c906108c 4155
bec39cab
AC
4156ac_ext=c
4157ac_cpp='$CPP $CPPFLAGS'
4158ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4159ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4160ac_compiler_gnu=$ac_cv_c_compiler_gnu
4161
4162
81ecdfbb
RW
4163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4164$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4165if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4166 $as_echo_n "(cached) " >&6
4e8d927d 4167else
81ecdfbb
RW
4168 if test -z "$GREP"; then
4169 ac_path_GREP_found=false
4170 # Loop through the user's path and test for each of PROGNAME-LIST
4171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4172for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4173do
4174 IFS=$as_save_IFS
4175 test -z "$as_dir" && as_dir=.
4176 for ac_prog in grep ggrep; do
4177 for ac_exec_ext in '' $ac_executable_extensions; do
4178 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4179 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4180# Check for GNU ac_path_GREP and select it if it is found.
4181 # Check for GNU $ac_path_GREP
4182case `"$ac_path_GREP" --version 2>&1` in
4183*GNU*)
4184 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4185*)
4186 ac_count=0
4187 $as_echo_n 0123456789 >"conftest.in"
4188 while :
4189 do
4190 cat "conftest.in" "conftest.in" >"conftest.tmp"
4191 mv "conftest.tmp" "conftest.in"
4192 cp "conftest.in" "conftest.nl"
4193 $as_echo 'GREP' >> "conftest.nl"
4194 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4195 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4196 as_fn_arith $ac_count + 1 && ac_count=$as_val
4197 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4198 # Best one so far, save it but keep looking for a better one
4199 ac_cv_path_GREP="$ac_path_GREP"
4200 ac_path_GREP_max=$ac_count
bec39cab 4201 fi
81ecdfbb
RW
4202 # 10*(2^10) chars as input seems more than enough
4203 test $ac_count -gt 10 && break
4204 done
4205 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4206esac
bec39cab 4207
81ecdfbb
RW
4208 $ac_path_GREP_found && break 3
4209 done
4210 done
4211 done
4212IFS=$as_save_IFS
4213 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4214 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4215 fi
c906108c 4216else
81ecdfbb 4217 ac_cv_path_GREP=$GREP
c906108c 4218fi
c906108c 4219
81ecdfbb
RW
4220fi
4221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4222$as_echo "$ac_cv_path_GREP" >&6; }
4223 GREP="$ac_cv_path_GREP"
c906108c 4224
c906108c 4225
81ecdfbb
RW
4226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4227$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4228if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4229 $as_echo_n "(cached) " >&6
783e057b 4230else
81ecdfbb
RW
4231 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4232 then ac_cv_path_EGREP="$GREP -E"
4233 else
4234 if test -z "$EGREP"; then
4235 ac_path_EGREP_found=false
4236 # Loop through the user's path and test for each of PROGNAME-LIST
4237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4238for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4239do
4240 IFS=$as_save_IFS
4241 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4242 for ac_prog in egrep; do
4243 for ac_exec_ext in '' $ac_executable_extensions; do
4244 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4245 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4246# Check for GNU ac_path_EGREP and select it if it is found.
4247 # Check for GNU $ac_path_EGREP
4248case `"$ac_path_EGREP" --version 2>&1` in
4249*GNU*)
4250 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4251*)
4252 ac_count=0
4253 $as_echo_n 0123456789 >"conftest.in"
4254 while :
4255 do
4256 cat "conftest.in" "conftest.in" >"conftest.tmp"
4257 mv "conftest.tmp" "conftest.in"
4258 cp "conftest.in" "conftest.nl"
4259 $as_echo 'EGREP' >> "conftest.nl"
4260 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4261 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4262 as_fn_arith $ac_count + 1 && ac_count=$as_val
4263 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4264 # Best one so far, save it but keep looking for a better one
4265 ac_cv_path_EGREP="$ac_path_EGREP"
4266 ac_path_EGREP_max=$ac_count
4267 fi
4268 # 10*(2^10) chars as input seems more than enough
4269 test $ac_count -gt 10 && break
4270 done
4271 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4272esac
bec39cab 4273
81ecdfbb
RW
4274 $ac_path_EGREP_found && break 3
4275 done
4276 done
4277 done
4278IFS=$as_save_IFS
4279 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4280 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4281 fi
783e057b 4282else
81ecdfbb 4283 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4284fi
4285
81ecdfbb 4286 fi
783e057b 4287fi
81ecdfbb
RW
4288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4289$as_echo "$ac_cv_path_EGREP" >&6; }
4290 EGREP="$ac_cv_path_EGREP"
4291
783e057b 4292
81ecdfbb
RW
4293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4294$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4295if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4296 $as_echo_n "(cached) " >&6
783e057b 4297else
81ecdfbb 4298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4299/* end confdefs.h. */
783e057b 4300#include <stdlib.h>
bec39cab 4301#include <stdarg.h>
783e057b
DJ
4302#include <string.h>
4303#include <float.h>
c906108c 4304
bec39cab
AC
4305int
4306main ()
4307{
c906108c 4308
bec39cab
AC
4309 ;
4310 return 0;
4311}
4312_ACEOF
81ecdfbb 4313if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4314 ac_cv_header_stdc=yes
c906108c 4315else
81ecdfbb 4316 ac_cv_header_stdc=no
c906108c 4317fi
81ecdfbb 4318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4319
783e057b
DJ
4320if test $ac_cv_header_stdc = yes; then
4321 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4323/* end confdefs.h. */
4324#include <string.h>
c906108c 4325
783e057b
DJ
4326_ACEOF
4327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4328 $EGREP "memchr" >/dev/null 2>&1; then :
4329
c906108c 4330else
783e057b 4331 ac_cv_header_stdc=no
c906108c 4332fi
783e057b 4333rm -f conftest*
c906108c
SS
4334
4335fi
4336
783e057b
DJ
4337if test $ac_cv_header_stdc = yes; then
4338 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4340/* end confdefs.h. */
4341#include <stdlib.h>
bec39cab 4342
783e057b
DJ
4343_ACEOF
4344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4345 $EGREP "free" >/dev/null 2>&1; then :
4346
bec39cab 4347else
783e057b 4348 ac_cv_header_stdc=no
bec39cab 4349fi
783e057b 4350rm -f conftest*
bec39cab
AC
4351
4352fi
bec39cab 4353
783e057b
DJ
4354if test $ac_cv_header_stdc = yes; then
4355 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4356 if test "$cross_compiling" = yes; then :
783e057b 4357 :
bec39cab 4358else
81ecdfbb 4359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4360/* end confdefs.h. */
4361#include <ctype.h>
81ecdfbb 4362#include <stdlib.h>
783e057b
DJ
4363#if ((' ' & 0x0FF) == 0x020)
4364# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4365# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4366#else
4367# define ISLOWER(c) \
4368 (('a' <= (c) && (c) <= 'i') \
4369 || ('j' <= (c) && (c) <= 'r') \
4370 || ('s' <= (c) && (c) <= 'z'))
4371# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4372#endif
4373
4374#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4375int
4376main ()
4377{
4378 int i;
4379 for (i = 0; i < 256; i++)
4380 if (XOR (islower (i), ISLOWER (i))
4381 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4382 return 2;
4383 return 0;
783e057b
DJ
4384}
4385_ACEOF
81ecdfbb 4386if ac_fn_c_try_run "$LINENO"; then :
783e057b 4387
81ecdfbb
RW
4388else
4389 ac_cv_header_stdc=no
783e057b 4390fi
81ecdfbb
RW
4391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4392 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4393fi
81ecdfbb 4394
783e057b
DJ
4395fi
4396fi
81ecdfbb
RW
4397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4398$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4399if test $ac_cv_header_stdc = yes; then
4400
81ecdfbb 4401$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4402
4403fi
4404
4405# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4406for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4407 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4408do :
4409 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4410ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4411"
d0ac1c44 4412if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4413 cat >>confdefs.h <<_ACEOF
81ecdfbb 4414#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4415_ACEOF
4416
4417fi
4418
4419done
4420
4421
4422
81ecdfbb 4423 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4424if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4425 MINIX=yes
4426else
4427 MINIX=
4428fi
4429
4430
4431 if test "$MINIX" = yes; then
4432
81ecdfbb 4433$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4434
4435
81ecdfbb 4436$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4437
4438
81ecdfbb 4439$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4440
4441 fi
4442
4443
81ecdfbb
RW
4444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4445$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4446if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4447 $as_echo_n "(cached) " >&6
783e057b 4448else
81ecdfbb 4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4450/* end confdefs.h. */
4451
d0ac1c44
SM
4452# define __EXTENSIONS__ 1
4453 $ac_includes_default
783e057b
DJ
4454int
4455main ()
4456{
4457
4458 ;
4459 return 0;
4460}
4461_ACEOF
81ecdfbb 4462if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4463 ac_cv_safe_to_define___extensions__=yes
4464else
81ecdfbb 4465 ac_cv_safe_to_define___extensions__=no
783e057b 4466fi
81ecdfbb 4467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4468fi
81ecdfbb
RW
4469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4470$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4471 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4472 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4473
81ecdfbb 4474 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4475
81ecdfbb 4476 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4477
81ecdfbb 4478 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4479
81ecdfbb 4480 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4481
4482
c971b7fa
PA
4483ac_aux_dir=
4484for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4485 if 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/install.sh"; then
4490 ac_aux_dir=$ac_dir
4491 ac_install_sh="$ac_aux_dir/install.sh -c"
4492 break
4493 elif test -f "$ac_dir/shtool"; then
4494 ac_aux_dir=$ac_dir
4495 ac_install_sh="$ac_aux_dir/shtool install -c"
4496 break
4497 fi
c971b7fa
PA
4498done
4499if test -z "$ac_aux_dir"; then
d0ac1c44 4500 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4501fi
770d76d7 4502
c971b7fa
PA
4503# These three variables are undocumented and unsupported,
4504# and are intended to be withdrawn in a future Autoconf release.
4505# They can cause serious problems if a builder's source tree is in a directory
4506# whose full name contains unusual characters.
4507ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4508ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4509ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4510
770d76d7 4511
c971b7fa
PA
4512# Make sure we can run config.sub.
4513$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4514 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4515
c971b7fa
PA
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4517$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4518if ${ac_cv_build+:} false; then :
c971b7fa 4519 $as_echo_n "(cached) " >&6
770d76d7 4520else
c971b7fa
PA
4521 ac_build_alias=$build_alias
4522test "x$ac_build_alias" = x &&
4523 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4524test "x$ac_build_alias" = x &&
d0ac1c44 4525 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4526ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4527 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4528
770d76d7 4529fi
c971b7fa
PA
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4531$as_echo "$ac_cv_build" >&6; }
4532case $ac_cv_build in
4533*-*-*) ;;
d0ac1c44 4534*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4535esac
c971b7fa
PA
4536build=$ac_cv_build
4537ac_save_IFS=$IFS; IFS='-'
4538set x $ac_cv_build
4539shift
4540build_cpu=$1
4541build_vendor=$2
4542shift; shift
4543# Remember, the first character of IFS is used to create $*,
4544# except with old shells:
4545build_os=$*
4546IFS=$ac_save_IFS
4547case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4548
4549
c971b7fa
PA
4550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4551$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4552if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4553 $as_echo_n "(cached) " >&6
4554else
c971b7fa
PA
4555 if test "x$host_alias" = x; then
4556 ac_cv_host=$ac_cv_build
81ecdfbb 4557else
c971b7fa 4558 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4559 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4560fi
81ecdfbb
RW
4561
4562fi
c971b7fa
PA
4563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4564$as_echo "$ac_cv_host" >&6; }
4565case $ac_cv_host in
4566*-*-*) ;;
d0ac1c44 4567*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4568esac
c971b7fa
PA
4569host=$ac_cv_host
4570ac_save_IFS=$IFS; IFS='-'
4571set x $ac_cv_host
4572shift
4573host_cpu=$1
4574host_vendor=$2
4575shift; shift
4576# Remember, the first character of IFS is used to create $*,
4577# except with old shells:
4578host_os=$*
4579IFS=$ac_save_IFS
4580case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4581
4582
4583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4584$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4585if ${ac_cv_target+:} false; then :
3388710e
JM
4586 $as_echo_n "(cached) " >&6
4587else
4588 if test "x$target_alias" = x; then
4589 ac_cv_target=$ac_cv_host
4590else
4591 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4592 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4593fi
4594
4595fi
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4597$as_echo "$ac_cv_target" >&6; }
4598case $ac_cv_target in
4599*-*-*) ;;
d0ac1c44 4600*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4601esac
4602target=$ac_cv_target
4603ac_save_IFS=$IFS; IFS='-'
4604set x $ac_cv_target
4605shift
4606target_cpu=$1
4607target_vendor=$2
4608shift; shift
4609# Remember, the first character of IFS is used to create $*,
4610# except with old shells:
4611target_os=$*
4612IFS=$ac_save_IFS
4613case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4614
4615
4616# The aliases save the names the user supplied, while $host etc.
4617# will get canonicalized.
4618test -n "$target_alias" &&
4619 test "$program_prefix$program_suffix$program_transform_name" = \
4620 NONENONEs,x,x, &&
4621 program_prefix=${target_alias}-
4622
4623# The tests for host and target for $enable_largefile require
4624# canonical names.
4625
4626
81ecdfbb 4627
da2f07f1
JK
4628# As the $enable_largefile decision depends on --enable-plugins we must set it
4629# even in directories otherwise not depending on the $plugins option.
4630
4631
2974be62
AM
4632 maybe_plugins=no
4633 for ac_header in dlfcn.h
4634do :
4635 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4636"
d0ac1c44 4637if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4638 cat >>confdefs.h <<_ACEOF
4639#define HAVE_DLFCN_H 1
4640_ACEOF
4641 maybe_plugins=yes
4642fi
4643
4644done
4645
4646 for ac_header in windows.h
4647do :
4648 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4649"
d0ac1c44 4650if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4651 cat >>confdefs.h <<_ACEOF
4652#define HAVE_WINDOWS_H 1
4653_ACEOF
4654 maybe_plugins=yes
4655fi
4656
4657done
4658
4659
4660 # Check whether --enable-plugins was given.
da2f07f1
JK
4661if test "${enable_plugins+set}" = set; then :
4662 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4663 no) plugins=no ;;
4664 *) plugins=yes
4665 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4666 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4667 fi ;;
4668 esac
da2f07f1 4669else
2974be62
AM
4670 plugins=$maybe_plugins
4671
da2f07f1
JK
4672fi
4673
2974be62 4674 if test "$plugins" = "yes"; then
458412c3
TT
4675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4676$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4677if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4678 $as_echo_n "(cached) " >&6
4679else
4680 ac_func_search_save_LIBS=$LIBS
4681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4682/* end confdefs.h. */
4683
4684/* Override any GCC internal prototype to avoid an error.
4685 Use char because int might match the return type of a GCC
4686 builtin and then its argument prototype would still apply. */
4687#ifdef __cplusplus
4688extern "C"
4689#endif
458412c3 4690char dlsym ();
2974be62
AM
4691int
4692main ()
4693{
458412c3 4694return dlsym ();
2974be62
AM
4695 ;
4696 return 0;
4697}
4698_ACEOF
4699for ac_lib in '' dl; do
4700 if test -z "$ac_lib"; then
4701 ac_res="none required"
4702 else
4703 ac_res=-l$ac_lib
4704 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4705 fi
4706 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4707 ac_cv_search_dlsym=$ac_res
2974be62
AM
4708fi
4709rm -f core conftest.err conftest.$ac_objext \
4710 conftest$ac_exeext
d0ac1c44 4711 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4712 break
4713fi
4714done
d0ac1c44 4715if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4716
4717else
458412c3 4718 ac_cv_search_dlsym=no
2974be62
AM
4719fi
4720rm conftest.$ac_ext
4721LIBS=$ac_func_search_save_LIBS
4722fi
458412c3
TT
4723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4724$as_echo "$ac_cv_search_dlsym" >&6; }
4725ac_res=$ac_cv_search_dlsym
2974be62
AM
4726if test "$ac_res" != no; then :
4727 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4728
4729fi
4730
4731 fi
da2f07f1
JK
4732
4733
4734case "${host}" in
4735 sparc-*-solaris*|i[3-7]86-*-solaris*)
4736 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4737 # are mutually exclusive; and without procfs support, the bfd/ elf module
4738 # cannot provide certain routines such as elfcore_write_prpsinfo
4739 # or elfcore_write_prstatus. So unless the user explicitly requested
4740 # large-file support through the --enable-largefile switch, disable
4741 # large-file support in favor of procfs support.
4742 test "${target}" = "${host}" -a "x$plugins" = xno \
4743 && : ${enable_largefile="no"}
4744 ;;
4745esac
4746
4747# Check whether --enable-largefile was given.
4748if test "${enable_largefile+set}" = set; then :
4749 enableval=$enable_largefile;
4750fi
4751
4752if test "$enable_largefile" != no; then
4753
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4755$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4756if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4757 $as_echo_n "(cached) " >&6
4758else
4759 ac_cv_sys_largefile_CC=no
4760 if test "$GCC" != yes; then
4761 ac_save_CC=$CC
4762 while :; do
4763 # IRIX 6.2 and later do not support large files by default,
4764 # so use the C compiler's -n32 option if that helps.
4765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4766/* end confdefs.h. */
4767#include <sys/types.h>
4768 /* Check that off_t can represent 2**63 - 1 correctly.
4769 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4770 since some C++ compilers masquerading as C compilers
4771 incorrectly reject 9223372036854775807. */
4772#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4773 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4774 && LARGE_OFF_T % 2147483647 == 1)
4775 ? 1 : -1];
4776int
4777main ()
4778{
4779
4780 ;
4781 return 0;
4782}
4783_ACEOF
4784 if ac_fn_c_try_compile "$LINENO"; then :
4785 break
4786fi
4787rm -f core conftest.err conftest.$ac_objext
4788 CC="$CC -n32"
4789 if ac_fn_c_try_compile "$LINENO"; then :
4790 ac_cv_sys_largefile_CC=' -n32'; break
4791fi
4792rm -f core conftest.err conftest.$ac_objext
4793 break
4794 done
4795 CC=$ac_save_CC
4796 rm -f conftest.$ac_ext
4797 fi
4798fi
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4800$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4801 if test "$ac_cv_sys_largefile_CC" != no; then
4802 CC=$CC$ac_cv_sys_largefile_CC
4803 fi
4804
4805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4806$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4807if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4808 $as_echo_n "(cached) " >&6
4809else
4810 while :; do
4811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4812/* end confdefs.h. */
4813#include <sys/types.h>
4814 /* Check that off_t can represent 2**63 - 1 correctly.
4815 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4816 since some C++ compilers masquerading as C compilers
4817 incorrectly reject 9223372036854775807. */
4818#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4819 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4820 && LARGE_OFF_T % 2147483647 == 1)
4821 ? 1 : -1];
4822int
4823main ()
4824{
4825
4826 ;
4827 return 0;
4828}
4829_ACEOF
4830if ac_fn_c_try_compile "$LINENO"; then :
4831 ac_cv_sys_file_offset_bits=no; break
4832fi
4833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4835/* end confdefs.h. */
4836#define _FILE_OFFSET_BITS 64
4837#include <sys/types.h>
4838 /* Check that off_t can represent 2**63 - 1 correctly.
4839 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4840 since some C++ compilers masquerading as C compilers
4841 incorrectly reject 9223372036854775807. */
4842#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4843 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4844 && LARGE_OFF_T % 2147483647 == 1)
4845 ? 1 : -1];
4846int
4847main ()
4848{
4849
4850 ;
4851 return 0;
4852}
4853_ACEOF
4854if ac_fn_c_try_compile "$LINENO"; then :
4855 ac_cv_sys_file_offset_bits=64; break
4856fi
4857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4858 ac_cv_sys_file_offset_bits=unknown
4859 break
4860done
4861fi
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4863$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4864case $ac_cv_sys_file_offset_bits in #(
4865 no | unknown) ;;
4866 *)
4867cat >>confdefs.h <<_ACEOF
4868#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4869_ACEOF
4870;;
4871esac
4872rm -rf conftest*
4873 if test $ac_cv_sys_file_offset_bits = unknown; then
4874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4875$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4876if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4877 $as_echo_n "(cached) " >&6
4878else
4879 while :; do
4880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4881/* end confdefs.h. */
4882#include <sys/types.h>
4883 /* Check that off_t can represent 2**63 - 1 correctly.
4884 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4885 since some C++ compilers masquerading as C compilers
4886 incorrectly reject 9223372036854775807. */
4887#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4888 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4889 && LARGE_OFF_T % 2147483647 == 1)
4890 ? 1 : -1];
4891int
4892main ()
4893{
4894
4895 ;
4896 return 0;
4897}
4898_ACEOF
4899if ac_fn_c_try_compile "$LINENO"; then :
4900 ac_cv_sys_large_files=no; break
4901fi
4902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4904/* end confdefs.h. */
4905#define _LARGE_FILES 1
4906#include <sys/types.h>
4907 /* Check that off_t can represent 2**63 - 1 correctly.
4908 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4909 since some C++ compilers masquerading as C compilers
4910 incorrectly reject 9223372036854775807. */
4911#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4912 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4913 && LARGE_OFF_T % 2147483647 == 1)
4914 ? 1 : -1];
4915int
4916main ()
4917{
4918
4919 ;
4920 return 0;
4921}
4922_ACEOF
4923if ac_fn_c_try_compile "$LINENO"; then :
4924 ac_cv_sys_large_files=1; break
4925fi
4926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4927 ac_cv_sys_large_files=unknown
4928 break
4929done
4930fi
4931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4932$as_echo "$ac_cv_sys_large_files" >&6; }
4933case $ac_cv_sys_large_files in #(
4934 no | unknown) ;;
4935 *)
4936cat >>confdefs.h <<_ACEOF
4937#define _LARGE_FILES $ac_cv_sys_large_files
4938_ACEOF
4939;;
4940esac
4941rm -rf conftest*
4942 fi
d0ac1c44
SM
4943
4944
da2f07f1
JK
4945fi
4946
4947
4948
81ecdfbb
RW
4949
4950
4951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4952$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4953if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4954 $as_echo_n "(cached) " >&6
4955else
4956 am_cv_prog_cc_stdc=no
4957ac_save_CC="$CC"
4958# Don't try gcc -ansi; that turns off useful extensions and
4959# breaks some systems' header files.
4960# AIX -qlanglvl=ansi
4961# Ultrix and OSF/1 -std1
4962# HP-UX 10.20 and later -Ae
4963# HP-UX older versions -Aa -D_HPUX_SOURCE
4964# SVR4 -Xc -D__EXTENSIONS__
4965for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4966do
783e057b 4967 CC="$ac_save_CC $ac_arg"
81ecdfbb 4968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4969/* end confdefs.h. */
4970#include <stdarg.h>
4971#include <stdio.h>
4972#include <sys/types.h>
4973#include <sys/stat.h>
4974/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4975struct buf { int x; };
4976FILE * (*rcsopen) (struct buf *, struct stat *, int);
4977static char *e (p, i)
4978 char **p;
4979 int i;
4980{
4981 return p[i];
4982}
4983static char *f (char * (*g) (char **, int), char **p, ...)
4984{
4985 char *s;
4986 va_list v;
4987 va_start (v,p);
4988 s = g (p, va_arg (v,int));
4989 va_end (v);
4990 return s;
4991}
4992int test (int i, double x);
4993struct s1 {int (*f) (int a);};
4994struct s2 {int (*f) (double a);};
4995int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4996int argc;
4997char **argv;
4998
4999int
5000main ()
5001{
5002
5003return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5004
5005 ;
5006 return 0;
5007}
5008_ACEOF
81ecdfbb 5009if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5010 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 5011fi
81ecdfbb 5012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5013done
5014CC="$ac_save_CC"
5015
5016fi
5017
5018if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
5019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5020$as_echo "none needed" >&6; }
783e057b 5021else
81ecdfbb
RW
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5023$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
5024fi
5025case "x$am_cv_prog_cc_stdc" in
5026 x|xno) ;;
5027 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5028esac
5029
d0ac1c44
SM
5030# Expand $ac_aux_dir to an absolute path.
5031am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 5032
d0ac1c44 5033if test x"${install_sh+set}" != xset; then
4869db5e
RM
5034 case $am_aux_dir in
5035 *\ * | *\ *)
5036 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5037 *)
5038 install_sh="\${SHELL} $am_aux_dir/install-sh"
5039 esac
5040fi
5041
d0ac1c44
SM
5042# Installed binaries are usually stripped using 'strip' when the user
5043# run "make install-strip". However 'strip' might not be the right
4869db5e 5044# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 5045# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
5046if test "$cross_compiling" != no; then
5047 if test -n "$ac_tool_prefix"; then
5048 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5049set dummy ${ac_tool_prefix}strip; ac_word=$2
5050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5051$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5052if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
5053 $as_echo_n "(cached) " >&6
5054else
5055 if test -n "$STRIP"; then
5056 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5057else
5058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5059for as_dir in $PATH
5060do
5061 IFS=$as_save_IFS
5062 test -z "$as_dir" && as_dir=.
5063 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5064 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5065 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5066 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5067 break 2
5068 fi
5069done
5070 done
5071IFS=$as_save_IFS
5072
5073fi
5074fi
5075STRIP=$ac_cv_prog_STRIP
5076if test -n "$STRIP"; then
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5078$as_echo "$STRIP" >&6; }
5079else
5080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5081$as_echo "no" >&6; }
5082fi
5083
5084
5085fi
5086if test -z "$ac_cv_prog_STRIP"; then
5087 ac_ct_STRIP=$STRIP
5088 # Extract the first word of "strip", so it can be a program name with args.
5089set dummy strip; ac_word=$2
5090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5091$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5092if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5093 $as_echo_n "(cached) " >&6
5094else
5095 if test -n "$ac_ct_STRIP"; then
5096 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5097else
5098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099for as_dir in $PATH
5100do
5101 IFS=$as_save_IFS
5102 test -z "$as_dir" && as_dir=.
5103 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5105 ac_cv_prog_ac_ct_STRIP="strip"
5106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5107 break 2
5108 fi
5109done
5110 done
5111IFS=$as_save_IFS
5112
5113fi
5114fi
5115ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5116if test -n "$ac_ct_STRIP"; then
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5118$as_echo "$ac_ct_STRIP" >&6; }
5119else
5120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5121$as_echo "no" >&6; }
5122fi
5123
5124 if test "x$ac_ct_STRIP" = x; then
5125 STRIP=":"
5126 else
5127 case $cross_compiling:$ac_tool_warned in
5128yes:)
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5130$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5131ac_tool_warned=yes ;;
5132esac
5133 STRIP=$ac_ct_STRIP
5134 fi
5135else
5136 STRIP="$ac_cv_prog_STRIP"
5137fi
5138
5139fi
5140INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5141
783e057b
DJ
5142
5143ac_aux_dir=
81ecdfbb 5144for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5145 if 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/install.sh"; then
5150 ac_aux_dir=$ac_dir
5151 ac_install_sh="$ac_aux_dir/install.sh -c"
5152 break
5153 elif test -f "$ac_dir/shtool"; then
5154 ac_aux_dir=$ac_dir
5155 ac_install_sh="$ac_aux_dir/shtool install -c"
5156 break
5157 fi
783e057b
DJ
5158done
5159if test -z "$ac_aux_dir"; then
d0ac1c44 5160 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5161fi
81ecdfbb
RW
5162
5163# These three variables are undocumented and unsupported,
5164# and are intended to be withdrawn in a future Autoconf release.
5165# They can cause serious problems if a builder's source tree is in a directory
5166# whose full name contains unusual characters.
5167ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5168ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5169ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5170
783e057b 5171
783e057b 5172
9009e1ae
MR
5173test "$program_prefix" != NONE &&
5174 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5175# Use a double $ so make ignores it.
5176test "$program_suffix" != NONE &&
5177 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5178# Double any \ or $.
5179# By default was `s,x,x', remove it if useless.
5180ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5181program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5182
81ecdfbb 5183
0bcda685
PA
5184# We require a C++11 compiler. Check if one is available, and if
5185# necessary, set CXX_DIALECT to some -std=xxx switch.
5186
41260ac2 5187 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5188 ac_ext=cpp
5189ac_cpp='$CXXCPP $CPPFLAGS'
5190ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5191ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5192ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5193 CXX_DIALECT=""
5194 ac_success=no
5195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5196$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5197if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5198 $as_echo_n "(cached) " >&6
5199else
5200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5201/* end confdefs.h. */
5202
5203
5204// If the compiler admits that it is not ready for C++11, why torture it?
5205// Hopefully, this will speed up the test.
5206
5207#ifndef __cplusplus
5208
5209#error "This is not a C++ compiler"
5210
5211#elif __cplusplus < 201103L
5212
5213#error "This is not a C++11 compiler"
5214
5215#else
5216
5217namespace cxx11
5218{
5219
5220 namespace test_static_assert
5221 {
5222
5223 template <typename T>
5224 struct check
5225 {
5226 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5227 };
5228
5229 }
5230
5231 namespace test_final_override
5232 {
5233
5234 struct Base
5235 {
5236 virtual void f() {}
5237 };
5238
5239 struct Derived : public Base
5240 {
5241 virtual void f() override {}
5242 };
5243
5244 }
5245
5246 namespace test_double_right_angle_brackets
5247 {
5248
5249 template < typename T >
5250 struct check {};
5251
5252 typedef check<void> single_type;
5253 typedef check<check<void>> double_type;
5254 typedef check<check<check<void>>> triple_type;
5255 typedef check<check<check<check<void>>>> quadruple_type;
5256
5257 }
5258
5259 namespace test_decltype
5260 {
5261
5262 int
5263 f()
5264 {
5265 int a = 1;
5266 decltype(a) b = 2;
5267 return a + b;
5268 }
5269
5270 }
5271
5272 namespace test_type_deduction
5273 {
5274
5275 template < typename T1, typename T2 >
5276 struct is_same
5277 {
5278 static const bool value = false;
5279 };
5280
5281 template < typename T >
5282 struct is_same<T, T>
5283 {
5284 static const bool value = true;
5285 };
5286
5287 template < typename T1, typename T2 >
5288 auto
5289 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5290 {
5291 return a1 + a2;
5292 }
5293
5294 int
5295 test(const int c, volatile int v)
5296 {
5297 static_assert(is_same<int, decltype(0)>::value == true, "");
5298 static_assert(is_same<int, decltype(c)>::value == false, "");
5299 static_assert(is_same<int, decltype(v)>::value == false, "");
5300 auto ac = c;
5301 auto av = v;
5302 auto sumi = ac + av + 'x';
5303 auto sumf = ac + av + 1.0;
5304 static_assert(is_same<int, decltype(ac)>::value == true, "");
5305 static_assert(is_same<int, decltype(av)>::value == true, "");
5306 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5307 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5308 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5309 return (sumf > 0.0) ? sumi : add(c, v);
5310 }
5311
5312 }
5313
5314 namespace test_noexcept
5315 {
5316
5317 int f() { return 0; }
5318 int g() noexcept { return 0; }
5319
5320 static_assert(noexcept(f()) == false, "");
5321 static_assert(noexcept(g()) == true, "");
5322
5323 }
5324
5325 namespace test_constexpr
5326 {
5327
5328 template < typename CharT >
5329 unsigned long constexpr
5330 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5331 {
5332 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5333 }
5334
5335 template < typename CharT >
5336 unsigned long constexpr
5337 strlen_c(const CharT *const s) noexcept
5338 {
5339 return strlen_c_r(s, 0UL);
5340 }
5341
5342 static_assert(strlen_c("") == 0UL, "");
5343 static_assert(strlen_c("1") == 1UL, "");
5344 static_assert(strlen_c("example") == 7UL, "");
5345 static_assert(strlen_c("another\0example") == 7UL, "");
5346
5347 }
5348
5349 namespace test_rvalue_references
5350 {
5351
5352 template < int N >
5353 struct answer
5354 {
5355 static constexpr int value = N;
5356 };
5357
5358 answer<1> f(int&) { return answer<1>(); }
5359 answer<2> f(const int&) { return answer<2>(); }
5360 answer<3> f(int&&) { return answer<3>(); }
5361
5362 void
5363 test()
5364 {
5365 int i = 0;
5366 const int c = 0;
5367 static_assert(decltype(f(i))::value == 1, "");
5368 static_assert(decltype(f(c))::value == 2, "");
5369 static_assert(decltype(f(0))::value == 3, "");
5370 }
5371
5372 }
5373
5374 namespace test_uniform_initialization
5375 {
5376
5377 struct test
5378 {
5379 static const int zero {};
5380 static const int one {1};
5381 };
5382
5383 static_assert(test::zero == 0, "");
5384 static_assert(test::one == 1, "");
5385
5386 }
5387
5388 namespace test_lambdas
5389 {
5390
5391 void
5392 test1()
5393 {
5394 auto lambda1 = [](){};
5395 auto lambda2 = lambda1;
5396 lambda1();
5397 lambda2();
5398 }
5399
5400 int
5401 test2()
5402 {
5403 auto a = [](int i, int j){ return i + j; }(1, 2);
5404 auto b = []() -> int { return '0'; }();
5405 auto c = [=](){ return a + b; }();
5406 auto d = [&](){ return c; }();
5407 auto e = [a, &b](int x) mutable {
5408 const auto identity = [](int y){ return y; };
5409 for (auto i = 0; i < a; ++i)
5410 a += b--;
5411 return x + identity(a + b);
5412 }(0);
5413 return a + b + c + d + e;
5414 }
5415
5416 int
5417 test3()
5418 {
5419 const auto nullary = [](){ return 0; };
5420 const auto unary = [](int x){ return x; };
5421 using nullary_t = decltype(nullary);
5422 using unary_t = decltype(unary);
5423 const auto higher1st = [](nullary_t f){ return f(); };
5424 const auto higher2nd = [unary](nullary_t f1){
5425 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5426 };
5427 return higher1st(nullary) + higher2nd(nullary)(unary);
5428 }
5429
5430 }
5431
5432 namespace test_variadic_templates
5433 {
5434
5435 template <int...>
5436 struct sum;
5437
5438 template <int N0, int... N1toN>
5439 struct sum<N0, N1toN...>
5440 {
5441 static constexpr auto value = N0 + sum<N1toN...>::value;
5442 };
5443
5444 template <>
5445 struct sum<>
5446 {
5447 static constexpr auto value = 0;
5448 };
5449
5450 static_assert(sum<>::value == 0, "");
5451 static_assert(sum<1>::value == 1, "");
5452 static_assert(sum<23>::value == 23, "");
5453 static_assert(sum<1, 2>::value == 3, "");
5454 static_assert(sum<5, 5, 11>::value == 21, "");
5455 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5456
5457 }
5458
5459 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5460 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5461 // because of this.
5462 namespace test_template_alias_sfinae
5463 {
5464
5465 struct foo {};
5466
5467 template<typename T>
5468 using member = typename T::member_type;
5469
5470 template<typename T>
5471 void func(...) {}
5472
5473 template<typename T>
5474 void func(member<T>*) {}
5475
5476 void test();
5477
5478 void test() { func<foo>(0); }
5479
5480 }
5481
5482} // namespace cxx11
5483
5484#endif // __cplusplus >= 201103L
5485
5486
5487
5488_ACEOF
5489if ac_fn_cxx_try_compile "$LINENO"; then :
5490 ax_cv_cxx_compile_cxx11=yes
5491else
5492 ax_cv_cxx_compile_cxx11=no
5493fi
5494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5495fi
5496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5497$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5498 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5499 ac_success=yes
5500 fi
5501
5502 if test x$ac_success = xno; then
41260ac2
SM
5503 for alternative in ${ax_cxx_compile_alternatives}; do
5504 switch="-std=gnu++${alternative}"
0bcda685
PA
5505 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5507$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5508if eval \${$cachevar+:} false; then :
0bcda685
PA
5509 $as_echo_n "(cached) " >&6
5510else
5511 ac_save_CXX="$CXX"
5512 CXX="$CXX $switch"
5513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5514/* end confdefs.h. */
5515
5516
5517// If the compiler admits that it is not ready for C++11, why torture it?
5518// Hopefully, this will speed up the test.
5519
5520#ifndef __cplusplus
5521
5522#error "This is not a C++ compiler"
5523
5524#elif __cplusplus < 201103L
5525
5526#error "This is not a C++11 compiler"
5527
5528#else
5529
5530namespace cxx11
5531{
5532
5533 namespace test_static_assert
5534 {
5535
5536 template <typename T>
5537 struct check
5538 {
5539 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5540 };
5541
5542 }
5543
5544 namespace test_final_override
5545 {
5546
5547 struct Base
5548 {
5549 virtual void f() {}
5550 };
5551
5552 struct Derived : public Base
5553 {
5554 virtual void f() override {}
5555 };
5556
5557 }
5558
5559 namespace test_double_right_angle_brackets
5560 {
5561
5562 template < typename T >
5563 struct check {};
5564
5565 typedef check<void> single_type;
5566 typedef check<check<void>> double_type;
5567 typedef check<check<check<void>>> triple_type;
5568 typedef check<check<check<check<void>>>> quadruple_type;
5569
5570 }
5571
5572 namespace test_decltype
5573 {
5574
5575 int
5576 f()
5577 {
5578 int a = 1;
5579 decltype(a) b = 2;
5580 return a + b;
5581 }
5582
5583 }
5584
5585 namespace test_type_deduction
5586 {
5587
5588 template < typename T1, typename T2 >
5589 struct is_same
5590 {
5591 static const bool value = false;
5592 };
5593
5594 template < typename T >
5595 struct is_same<T, T>
5596 {
5597 static const bool value = true;
5598 };
5599
5600 template < typename T1, typename T2 >
5601 auto
5602 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5603 {
5604 return a1 + a2;
5605 }
5606
5607 int
5608 test(const int c, volatile int v)
5609 {
5610 static_assert(is_same<int, decltype(0)>::value == true, "");
5611 static_assert(is_same<int, decltype(c)>::value == false, "");
5612 static_assert(is_same<int, decltype(v)>::value == false, "");
5613 auto ac = c;
5614 auto av = v;
5615 auto sumi = ac + av + 'x';
5616 auto sumf = ac + av + 1.0;
5617 static_assert(is_same<int, decltype(ac)>::value == true, "");
5618 static_assert(is_same<int, decltype(av)>::value == true, "");
5619 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5620 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5621 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5622 return (sumf > 0.0) ? sumi : add(c, v);
5623 }
5624
5625 }
5626
5627 namespace test_noexcept
5628 {
5629
5630 int f() { return 0; }
5631 int g() noexcept { return 0; }
5632
5633 static_assert(noexcept(f()) == false, "");
5634 static_assert(noexcept(g()) == true, "");
5635
5636 }
5637
5638 namespace test_constexpr
5639 {
5640
5641 template < typename CharT >
5642 unsigned long constexpr
5643 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5644 {
5645 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5646 }
5647
5648 template < typename CharT >
5649 unsigned long constexpr
5650 strlen_c(const CharT *const s) noexcept
5651 {
5652 return strlen_c_r(s, 0UL);
5653 }
5654
5655 static_assert(strlen_c("") == 0UL, "");
5656 static_assert(strlen_c("1") == 1UL, "");
5657 static_assert(strlen_c("example") == 7UL, "");
5658 static_assert(strlen_c("another\0example") == 7UL, "");
5659
5660 }
5661
5662 namespace test_rvalue_references
5663 {
5664
5665 template < int N >
5666 struct answer
5667 {
5668 static constexpr int value = N;
5669 };
5670
5671 answer<1> f(int&) { return answer<1>(); }
5672 answer<2> f(const int&) { return answer<2>(); }
5673 answer<3> f(int&&) { return answer<3>(); }
5674
5675 void
5676 test()
5677 {
5678 int i = 0;
5679 const int c = 0;
5680 static_assert(decltype(f(i))::value == 1, "");
5681 static_assert(decltype(f(c))::value == 2, "");
5682 static_assert(decltype(f(0))::value == 3, "");
5683 }
5684
5685 }
5686
5687 namespace test_uniform_initialization
5688 {
5689
5690 struct test
5691 {
5692 static const int zero {};
5693 static const int one {1};
5694 };
5695
5696 static_assert(test::zero == 0, "");
5697 static_assert(test::one == 1, "");
5698
5699 }
5700
5701 namespace test_lambdas
5702 {
5703
5704 void
5705 test1()
5706 {
5707 auto lambda1 = [](){};
5708 auto lambda2 = lambda1;
5709 lambda1();
5710 lambda2();
5711 }
5712
5713 int
5714 test2()
5715 {
5716 auto a = [](int i, int j){ return i + j; }(1, 2);
5717 auto b = []() -> int { return '0'; }();
5718 auto c = [=](){ return a + b; }();
5719 auto d = [&](){ return c; }();
5720 auto e = [a, &b](int x) mutable {
5721 const auto identity = [](int y){ return y; };
5722 for (auto i = 0; i < a; ++i)
5723 a += b--;
5724 return x + identity(a + b);
5725 }(0);
5726 return a + b + c + d + e;
5727 }
5728
5729 int
5730 test3()
5731 {
5732 const auto nullary = [](){ return 0; };
5733 const auto unary = [](int x){ return x; };
5734 using nullary_t = decltype(nullary);
5735 using unary_t = decltype(unary);
5736 const auto higher1st = [](nullary_t f){ return f(); };
5737 const auto higher2nd = [unary](nullary_t f1){
5738 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5739 };
5740 return higher1st(nullary) + higher2nd(nullary)(unary);
5741 }
5742
5743 }
5744
5745 namespace test_variadic_templates
5746 {
5747
5748 template <int...>
5749 struct sum;
5750
5751 template <int N0, int... N1toN>
5752 struct sum<N0, N1toN...>
5753 {
5754 static constexpr auto value = N0 + sum<N1toN...>::value;
5755 };
5756
5757 template <>
5758 struct sum<>
5759 {
5760 static constexpr auto value = 0;
5761 };
5762
5763 static_assert(sum<>::value == 0, "");
5764 static_assert(sum<1>::value == 1, "");
5765 static_assert(sum<23>::value == 23, "");
5766 static_assert(sum<1, 2>::value == 3, "");
5767 static_assert(sum<5, 5, 11>::value == 21, "");
5768 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5769
5770 }
5771
5772 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5773 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5774 // because of this.
5775 namespace test_template_alias_sfinae
5776 {
5777
5778 struct foo {};
5779
5780 template<typename T>
5781 using member = typename T::member_type;
5782
5783 template<typename T>
5784 void func(...) {}
5785
5786 template<typename T>
5787 void func(member<T>*) {}
5788
5789 void test();
5790
5791 void test() { func<foo>(0); }
5792
5793 }
5794
5795} // namespace cxx11
5796
5797#endif // __cplusplus >= 201103L
5798
5799
5800
5801_ACEOF
5802if ac_fn_cxx_try_compile "$LINENO"; then :
5803 eval $cachevar=yes
5804else
5805 eval $cachevar=no
5806fi
5807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5808 CXX="$ac_save_CXX"
5809fi
5810eval ac_res=\$$cachevar
5811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5812$as_echo "$ac_res" >&6; }
5813 if eval test x\$$cachevar = xyes; then
5814 CXX_DIALECT="$switch"
5815 ac_success=yes
5816 break
5817 fi
5818 done
5819 fi
5820
5821 if test x$ac_success = xno; then
41260ac2
SM
5822 for alternative in ${ax_cxx_compile_alternatives}; do
5823 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5824 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5826$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5827if eval \${$cachevar+:} false; then :
0bcda685
PA
5828 $as_echo_n "(cached) " >&6
5829else
5830 ac_save_CXX="$CXX"
41260ac2
SM
5831 CXX="$CXX $switch"
5832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5833/* end confdefs.h. */
5834
5835
5836// If the compiler admits that it is not ready for C++11, why torture it?
5837// Hopefully, this will speed up the test.
5838
5839#ifndef __cplusplus
5840
5841#error "This is not a C++ compiler"
5842
5843#elif __cplusplus < 201103L
5844
5845#error "This is not a C++11 compiler"
5846
5847#else
5848
5849namespace cxx11
5850{
5851
5852 namespace test_static_assert
5853 {
5854
5855 template <typename T>
5856 struct check
5857 {
5858 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5859 };
5860
5861 }
5862
5863 namespace test_final_override
5864 {
5865
5866 struct Base
5867 {
5868 virtual void f() {}
5869 };
5870
5871 struct Derived : public Base
5872 {
5873 virtual void f() override {}
5874 };
5875
5876 }
5877
5878 namespace test_double_right_angle_brackets
5879 {
5880
5881 template < typename T >
5882 struct check {};
5883
5884 typedef check<void> single_type;
5885 typedef check<check<void>> double_type;
5886 typedef check<check<check<void>>> triple_type;
5887 typedef check<check<check<check<void>>>> quadruple_type;
5888
5889 }
5890
5891 namespace test_decltype
5892 {
5893
5894 int
5895 f()
5896 {
5897 int a = 1;
5898 decltype(a) b = 2;
5899 return a + b;
5900 }
5901
5902 }
5903
5904 namespace test_type_deduction
5905 {
5906
5907 template < typename T1, typename T2 >
5908 struct is_same
5909 {
5910 static const bool value = false;
5911 };
5912
5913 template < typename T >
5914 struct is_same<T, T>
5915 {
5916 static const bool value = true;
5917 };
5918
5919 template < typename T1, typename T2 >
5920 auto
5921 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5922 {
5923 return a1 + a2;
5924 }
5925
5926 int
5927 test(const int c, volatile int v)
5928 {
5929 static_assert(is_same<int, decltype(0)>::value == true, "");
5930 static_assert(is_same<int, decltype(c)>::value == false, "");
5931 static_assert(is_same<int, decltype(v)>::value == false, "");
5932 auto ac = c;
5933 auto av = v;
5934 auto sumi = ac + av + 'x';
5935 auto sumf = ac + av + 1.0;
5936 static_assert(is_same<int, decltype(ac)>::value == true, "");
5937 static_assert(is_same<int, decltype(av)>::value == true, "");
5938 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5939 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5940 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5941 return (sumf > 0.0) ? sumi : add(c, v);
5942 }
5943
5944 }
5945
5946 namespace test_noexcept
5947 {
5948
5949 int f() { return 0; }
5950 int g() noexcept { return 0; }
5951
5952 static_assert(noexcept(f()) == false, "");
5953 static_assert(noexcept(g()) == true, "");
5954
5955 }
5956
5957 namespace test_constexpr
5958 {
5959
5960 template < typename CharT >
5961 unsigned long constexpr
5962 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5963 {
5964 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5965 }
5966
5967 template < typename CharT >
5968 unsigned long constexpr
5969 strlen_c(const CharT *const s) noexcept
5970 {
5971 return strlen_c_r(s, 0UL);
5972 }
5973
5974 static_assert(strlen_c("") == 0UL, "");
5975 static_assert(strlen_c("1") == 1UL, "");
5976 static_assert(strlen_c("example") == 7UL, "");
5977 static_assert(strlen_c("another\0example") == 7UL, "");
5978
5979 }
5980
5981 namespace test_rvalue_references
5982 {
5983
5984 template < int N >
5985 struct answer
5986 {
5987 static constexpr int value = N;
5988 };
5989
5990 answer<1> f(int&) { return answer<1>(); }
5991 answer<2> f(const int&) { return answer<2>(); }
5992 answer<3> f(int&&) { return answer<3>(); }
5993
5994 void
5995 test()
5996 {
5997 int i = 0;
5998 const int c = 0;
5999 static_assert(decltype(f(i))::value == 1, "");
6000 static_assert(decltype(f(c))::value == 2, "");
6001 static_assert(decltype(f(0))::value == 3, "");
6002 }
6003
6004 }
6005
6006 namespace test_uniform_initialization
6007 {
6008
6009 struct test
6010 {
6011 static const int zero {};
6012 static const int one {1};
6013 };
6014
6015 static_assert(test::zero == 0, "");
6016 static_assert(test::one == 1, "");
6017
6018 }
6019
6020 namespace test_lambdas
6021 {
6022
6023 void
6024 test1()
6025 {
6026 auto lambda1 = [](){};
6027 auto lambda2 = lambda1;
6028 lambda1();
6029 lambda2();
6030 }
6031
6032 int
6033 test2()
6034 {
6035 auto a = [](int i, int j){ return i + j; }(1, 2);
6036 auto b = []() -> int { return '0'; }();
6037 auto c = [=](){ return a + b; }();
6038 auto d = [&](){ return c; }();
6039 auto e = [a, &b](int x) mutable {
6040 const auto identity = [](int y){ return y; };
6041 for (auto i = 0; i < a; ++i)
6042 a += b--;
6043 return x + identity(a + b);
6044 }(0);
6045 return a + b + c + d + e;
6046 }
6047
6048 int
6049 test3()
6050 {
6051 const auto nullary = [](){ return 0; };
6052 const auto unary = [](int x){ return x; };
6053 using nullary_t = decltype(nullary);
6054 using unary_t = decltype(unary);
6055 const auto higher1st = [](nullary_t f){ return f(); };
6056 const auto higher2nd = [unary](nullary_t f1){
6057 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6058 };
6059 return higher1st(nullary) + higher2nd(nullary)(unary);
6060 }
6061
6062 }
6063
6064 namespace test_variadic_templates
6065 {
6066
6067 template <int...>
6068 struct sum;
6069
6070 template <int N0, int... N1toN>
6071 struct sum<N0, N1toN...>
6072 {
6073 static constexpr auto value = N0 + sum<N1toN...>::value;
6074 };
6075
6076 template <>
6077 struct sum<>
6078 {
6079 static constexpr auto value = 0;
6080 };
6081
6082 static_assert(sum<>::value == 0, "");
6083 static_assert(sum<1>::value == 1, "");
6084 static_assert(sum<23>::value == 23, "");
6085 static_assert(sum<1, 2>::value == 3, "");
6086 static_assert(sum<5, 5, 11>::value == 21, "");
6087 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6088
6089 }
6090
6091 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6092 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6093 // because of this.
6094 namespace test_template_alias_sfinae
6095 {
6096
6097 struct foo {};
6098
6099 template<typename T>
6100 using member = typename T::member_type;
6101
6102 template<typename T>
6103 void func(...) {}
6104
6105 template<typename T>
6106 void func(member<T>*) {}
6107
6108 void test();
6109
6110 void test() { func<foo>(0); }
6111
6112 }
6113
6114} // namespace cxx11
6115
6116#endif // __cplusplus >= 201103L
6117
6118
6119
6120_ACEOF
6121if ac_fn_cxx_try_compile "$LINENO"; then :
6122 eval $cachevar=yes
6123else
6124 eval $cachevar=no
6125fi
6126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6127 CXX="$ac_save_CXX"
0bcda685
PA
6128fi
6129eval ac_res=\$$cachevar
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6131$as_echo "$ac_res" >&6; }
41260ac2
SM
6132 if eval test x\$$cachevar = xyes; then
6133 CXX_DIALECT="$switch"
6134 ac_success=yes
6135 break
6136 fi
6137 done
6138 if test x$ac_success = xyes; then
0bcda685
PA
6139 break
6140 fi
6141 done
6142 fi
6143 ac_ext=c
6144ac_cpp='$CPP $CPPFLAGS'
6145ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6146ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6147ac_compiler_gnu=$ac_cv_c_compiler_gnu
6148
6149 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6150 if test x$ac_success = xno; then
d0ac1c44 6151 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6152 fi
6153 fi
6154 if test x$ac_success = xno; then
6155 HAVE_CXX11=0
6156 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6157$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6158 else
6159 HAVE_CXX11=1
6160
6161$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6162
6163 fi
6164
6165
6166
6167
a417dc56
RW
6168# Dependency checking.
6169rm -rf .tst 2>/dev/null
6170mkdir .tst 2>/dev/null
6171if test -d .tst; then
6172 am__leading_dot=.
6173else
6174 am__leading_dot=_
6175fi
6176rmdir .tst 2>/dev/null
6177
6178DEPDIR="${am__leading_dot}deps"
6179
81ecdfbb 6180ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6181
6182
6183depcc="$CC" am_compiler_list=
6184
6185am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6187$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6188if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6189 $as_echo_n "(cached) " >&6
a417dc56
RW
6190else
6191 if test -f "$am_depcomp"; then
6192 # We make a subdir and do the tests there. Otherwise we can end up
6193 # making bogus files that we don't know about and never remove. For
6194 # instance it was reported that on HP-UX the gcc test will end up
6195 # making a dummy file named `D' -- because `-MD' means `put the output
6196 # in D'.
6197 mkdir conftest.dir
6198 # Copy depcomp to subdir because otherwise we won't find it if we're
6199 # using a relative directory.
6200 cp "$am_depcomp" conftest.dir
6201 cd conftest.dir
6202 # We will build objects and dependencies in a subdirectory because
6203 # it helps to detect inapplicable dependency modes. For instance
6204 # both Tru64's cc and ICC support -MD to output dependencies as a
6205 # side effect of compilation, but ICC will put the dependencies in
6206 # the current directory while Tru64 will put them in the object
6207 # directory.
6208 mkdir sub
6209
6210 am_cv_CC_dependencies_compiler_type=none
6211 if test "$am_compiler_list" = ""; then
6212 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6213 fi
6214 for depmode in $am_compiler_list; do
6215 if test $depmode = none; then break; fi
6216
81ecdfbb 6217 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6218 # Setup a source with many dependencies, because some compilers
6219 # like to wrap large dependency lists on column 80 (with \), and
6220 # we should not choose a depcomp mode which is confused by this.
6221 #
6222 # We need to recreate these files for each test, as the compiler may
6223 # overwrite some of them when testing with obscure command lines.
6224 # This happens at least with the AIX C compiler.
6225 : > sub/conftest.c
6226 for i in 1 2 3 4 5 6; do
6227 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6228 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6229 # Solaris 8's {/usr,}/bin/sh.
6230 touch sub/conftst$i.h
6231 done
6232 echo "include sub/conftest.Po" > confmf
6233
6234 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6235 # mode. It turns out that the SunPro C++ compiler does not properly
6236 # handle `-M -o', and we need to detect this.
6237 depcmd="depmode=$depmode \
6238 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6239 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6240 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6241 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6242 if env $depcmd > conftest.err 2>&1 &&
6243 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6244 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6245 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6246 # icc doesn't choke on unknown options, it will just issue warnings
6247 # or remarks (even with -Werror). So we grep stderr for any message
6248 # that says an option was ignored or not supported.
6249 # When given -MP, icc 7.0 and 7.1 complain thusly:
6250 # icc: Command line warning: ignoring option '-M'; no argument required
6251 # The diagnosis changed in icc 8.0:
6252 # icc: Command line remark: option '-MP' not supported
6253 if (grep 'ignoring option' conftest.err ||
6254 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6255 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6256 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6257 break
6258 fi
6259 fi
81ecdfbb 6260 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6261 sed -e 's/^/| /' < conftest.err >&5
6262 done
6263
6264 cd ..
6265 rm -rf conftest.dir
6266else
6267 am_cv_CC_dependencies_compiler_type=none
6268fi
6269
6270fi
81ecdfbb
RW
6271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6272$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6273if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6274then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6275else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6276
6277fi
6278
6279
c971b7fa
PA
6280
6281CONFIG_OBS=
6282CONFIG_DEPS=
6283CONFIG_SRCS=
6284ENABLE_CFLAGS=
6285
6286CONFIG_ALL=
6287CONFIG_CLEAN=
6288CONFIG_INSTALL=
6289CONFIG_UNINSTALL=
6290
6291# If we haven't got the data from the intl directory,
6292# assume NLS is disabled.
6293USE_NLS=no
6294LIBINTL=
6295LIBINTL_DEP=
6296INCINTL=
6297XGETTEXT=
6298GMSGFMT=
6299POSUB=
783e057b
DJ
6300
6301if test -f ../intl/config.intl; then
6302 . ../intl/config.intl
6303fi
81ecdfbb
RW
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6305$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6306if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6308$as_echo "no" >&6; }
783e057b 6309else
81ecdfbb
RW
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6311$as_echo "yes" >&6; }
783e057b 6312
81ecdfbb 6313$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6314
6315
81ecdfbb
RW
6316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6317$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6318 # Look for .po and .gmo files in the source directory.
6319 CATALOGS=
6320 XLINGUAS=
6321 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6322 # If there aren't any .gmo files the shell will give us the
6323 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6324 # weeded out.
6325 case "$cat" in *\**)
6326 continue;;
6327 esac
6328 # The quadruple backslash is collapsed to a double backslash
6329 # by the backticks, then collapsed again by the double quotes,
6330 # leaving us with one backslash in the sed expression (right
6331 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6332 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6333 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6334 # The user is allowed to set LINGUAS to a list of languages to
6335 # install catalogs for. If it's empty that means "all of them."
6336 if test "x$LINGUAS" = x; then
6337 CATALOGS="$CATALOGS $cat"
6338 XLINGUAS="$XLINGUAS $lang"
6339 else
6340 case "$LINGUAS" in *$lang*)
6341 CATALOGS="$CATALOGS $cat"
6342 XLINGUAS="$XLINGUAS $lang"
6343 ;;
6344 esac
e28b3332
DJ
6345 fi
6346 done
c971b7fa
PA
6347 LINGUAS="$XLINGUAS"
6348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6349$as_echo "$LINGUAS" >&6; }
6350
6351
6352 DATADIRNAME=share
6353
6354 INSTOBJEXT=.mo
6355
6356 GENCAT=gencat
6357
6358 CATOBJEXT=.gmo
e28b3332 6359
e28b3332
DJ
6360fi
6361
c971b7fa
PA
6362localedir='${datadir}/locale'
6363
6364
6365if test x"$USE_NLS" = xyes; then
6366 CONFIG_ALL="$CONFIG_ALL all-po"
6367 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6368 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6369 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6370fi
e28b3332 6371
c971b7fa
PA
6372PACKAGE=gdb
6373
6374cat >>confdefs.h <<_ACEOF
6375#define PACKAGE "$PACKAGE"
6376_ACEOF
6377
6378
6379
6380# We never need to detect it in this sub-configure.
6381# But preserve it for config.status --recheck.
6382
6383
6384
6385MAKEINFO_EXTRA_FLAGS=""
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6387$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6388if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6389 $as_echo_n "(cached) " >&6
6390else
6391 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6392 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6393 gdb_cv_have_makeinfo_click=yes
6394 else
6395 gdb_cv_have_makeinfo_click=no
6396 fi
6397fi
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6399$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6400if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6401 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6402fi
e28b3332
DJ
6403
6404
bec39cab
AC
6405
6406
81ecdfbb
RW
6407# Check whether --with-separate-debug-dir was given.
6408if test "${with_separate_debug_dir+set}" = set; then :
6409 withval=$with_separate_debug_dir;
b14b1491
TT
6410 DEBUGDIR=$withval
6411else
6412 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6413fi
6414
20e95c23 6415
783e057b
DJ
6416 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6417 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6418 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6419 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6420
783e057b
DJ
6421cat >>confdefs.h <<_ACEOF
6422#define DEBUGDIR "$ac_define_dir"
20e95c23 6423_ACEOF
20e95c23 6424
20e95c23 6425
20e95c23 6426
0c4a4063 6427
b14b1491
TT
6428 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6429 if test "x$prefix" = xNONE; then
6430 test_prefix=/usr/local
6431 else
6432 test_prefix=$prefix
6433 fi
783e057b 6434 else
b14b1491 6435 test_prefix=$exec_prefix
783e057b 6436 fi
b14b1491
TT
6437 value=0
6438 case ${ac_define_dir} in
6439 "${test_prefix}"|"${test_prefix}/"*|\
6440 '${exec_prefix}'|'${exec_prefix}/'*)
6441 value=1
6442 ;;
6443 esac
6444
6445cat >>confdefs.h <<_ACEOF
6446#define DEBUGDIR_RELOCATABLE $value
6447_ACEOF
6448
6449
6450
0c4a4063 6451
f83d8a90
DE
6452# We can't pass paths as command line arguments.
6453# Mingw32 tries to be clever and will convert the paths for us.
6454# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6455# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6456# This breaks GDB's relocatable path conversions since paths passed in
6457# config.h would not get so translated, the path prefixes no longer match.
6458
6459 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6460 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6461 ac_define_dir=`eval echo $bindir`
6462 ac_define_dir=`eval echo $ac_define_dir`
6463
6464cat >>confdefs.h <<_ACEOF
6465#define BINDIR "$ac_define_dir"
6466_ACEOF
6467
6468
6469
b14b1491
TT
6470# GDB's datadir relocation
6471
6472
6473
81ecdfbb
RW
6474# Check whether --with-gdb-datadir was given.
6475if test "${with_gdb_datadir+set}" = set; then :
6476 withval=$with_gdb_datadir;
b14b1491 6477 GDB_DATADIR=$withval
20e95c23 6478else
b14b1491 6479 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6480fi
6481
20e95c23 6482
b14b1491
TT
6483 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6484 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6485 ac_define_dir=`eval echo $GDB_DATADIR`
6486 ac_define_dir=`eval echo $ac_define_dir`
6487
6488cat >>confdefs.h <<_ACEOF
6489#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6490_ACEOF
6491
b14b1491
TT
6492
6493
0c4a4063 6494
b14b1491
TT
6495 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6496 if test "x$prefix" = xNONE; then
6497 test_prefix=/usr/local
6498 else
6499 test_prefix=$prefix
6500 fi
6501 else
6502 test_prefix=$exec_prefix
6503 fi
6504 value=0
6505 case ${ac_define_dir} in
6506 "${test_prefix}"|"${test_prefix}/"*|\
6507 '${exec_prefix}'|'${exec_prefix}/'*)
6508 value=1
6509 ;;
6510 esac
6511
6512cat >>confdefs.h <<_ACEOF
6513#define GDB_DATADIR_RELOCATABLE $value
6514_ACEOF
6515
6516
783e057b 6517
20e95c23 6518
0c4a4063 6519
81ecdfbb
RW
6520# Check whether --with-relocated-sources was given.
6521if test "${with_relocated_sources+set}" = set; then :
6522 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6523
6524 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6525 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6526 ac_define_dir=`eval echo $reloc_srcdir`
6527 ac_define_dir=`eval echo $ac_define_dir`
6528
6529cat >>confdefs.h <<_ACEOF
6530#define RELOC_SRCDIR "$ac_define_dir"
6531_ACEOF
6532
6533
6534
81ecdfbb
RW
6535fi
6536
29b0e8a2 6537
7349ff92
JK
6538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6539$as_echo_n "checking for default auto-load directory... " >&6; }
6540
6541# Check whether --with-auto-load-dir was given.
6542if test "${with_auto_load_dir+set}" = set; then :
6543 withval=$with_auto_load_dir;
6544else
1564a261 6545 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6546fi
6547
2861ee4f 6548escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6549
6550 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6551 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6552 ac_define_dir=`eval echo $escape_dir`
6553 ac_define_dir=`eval echo $ac_define_dir`
6554
6555cat >>confdefs.h <<_ACEOF
6556#define AUTO_LOAD_DIR "$ac_define_dir"
6557_ACEOF
6558
6559
6560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6561$as_echo "$with_auto_load_dir" >&6; }
6562
bccbefd2
JK
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6564$as_echo_n "checking for default auto-load safe-path... " >&6; }
6565
6566# Check whether --with-auto-load-safe-path was given.
6567if test "${with_auto_load_safe_path+set}" = set; then :
6568 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6569 with_auto_load_safe_path="/"
6570 fi
bccbefd2 6571else
7349ff92 6572 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6573fi
6574
2861ee4f 6575escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6576
6577 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6578 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6579 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6580 ac_define_dir=`eval echo $ac_define_dir`
6581
6582cat >>confdefs.h <<_ACEOF
6dea1fbd 6583#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6584_ACEOF
6585
6586
6587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6588$as_echo "$with_auto_load_safe_path" >&6; }
6589
29b0e8a2 6590
20e95c23 6591
5ae98d25 6592subdirs="$subdirs testsuite"
20e95c23
DJ
6593
6594
783e057b 6595# Check whether to support alternative target configurations
81ecdfbb
RW
6596# Check whether --enable-targets was given.
6597if test "${enable_targets+set}" = set; then :
6598 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6599 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6600 ;;
6601 no) enable_targets= ;;
6602 *) enable_targets=$enableval ;;
6603esac
81ecdfbb
RW
6604fi
6605
20e95c23 6606
783e057b 6607# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6608# Check whether --enable-64-bit-bfd was given.
6609if test "${enable_64_bit_bfd+set}" = set; then :
6610 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6611 yes) want64=true ;;
6612 no) want64=false ;;
d0ac1c44 6613 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6614esac
6615else
6616 want64=false
81ecdfbb
RW
6617fi
6618
783e057b
DJ
6619# Provide defaults for some variables set by the per-host and per-target
6620# configuration.
6621gdb_host_obs=posix-hdep.o
20e95c23 6622
783e057b
DJ
6623if test "${target}" = "${host}"; then
6624 gdb_native=yes
6625else
6626 gdb_native=no
6627fi
20e95c23 6628
783e057b 6629. $srcdir/configure.host
20e95c23 6630
783e057b 6631# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6632
783e057b
DJ
6633TARGET_OBS=
6634all_targets=
b292c783 6635HAVE_NATIVE_GCORE_TARGET=
20e95c23 6636
783e057b 6637for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6638do
783e057b
DJ
6639 if test "$targ_alias" = "all"; then
6640 all_targets=true
6641 else
6642 # Canonicalize the secondary target names.
6643 result=`$ac_config_sub $targ_alias 2>/dev/null`
6644 if test -n "$result"; then
6645 targ=$result
6646 else
6647 targ=$targ_alias
6648 fi
20e95c23 6649
783e057b 6650 . ${srcdir}/configure.tgt
20e95c23 6651
bf307134 6652 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6653 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6654fi
6655
783e057b
DJ
6656 # Target-specific object files
6657 for i in ${gdb_target_obs}; do
6658 case " $TARGET_OBS " in
6659 *" ${i} "*) ;;
6660 *)
6661 TARGET_OBS="$TARGET_OBS ${i}"
6662 ;;
6663 esac
6664 done
20e95c23 6665
783e057b
DJ
6666 # Check whether this target needs 64-bit CORE_ADDR
6667 if test x${want64} = xfalse; then
6668 . ${srcdir}/../bfd/config.bfd
6669 fi
b292c783
JK
6670
6671 # Check whether this target is native and supports gcore.
6672 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6673 && $gdb_have_gcore; then
6674 HAVE_NATIVE_GCORE_TARGET=1
6675 fi
783e057b 6676 fi
20e95c23
DJ
6677done
6678
783e057b
DJ
6679if test x${all_targets} = xtrue; then
6680
6681 # We want all 64-bit targets if we either:
6682 # - run on a 64-bit host or
6683 # - already require 64-bit support for some other target or
6684 # - the --enable-64-bit-bfd option was supplied
6685 # Otherwise we only support all 32-bit targets.
6686 #
6687 # NOTE: This test must be in sync with the corresponding
6688 # tests in BFD!
20e95c23 6689
783e057b 6690 if test x${want64} = xfalse; then
81ecdfbb
RW
6691 # The cast to long int works around a bug in the HP C Compiler
6692# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6693# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6694# This bug is HP SR number 8606223364.
6695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6696$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6697if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6698 $as_echo_n "(cached) " >&6
c0993dbe 6699else
81ecdfbb 6700 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6701
81ecdfbb
RW
6702else
6703 if test "$ac_cv_type_long" = yes; then
6704 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6706as_fn_error 77 "cannot compute sizeof (long)
6707See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6708 else
6709 ac_cv_sizeof_long=0
6710 fi
c0993dbe 6711fi
81ecdfbb 6712
c0993dbe 6713fi
81ecdfbb
RW
6714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6715$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6716
c0993dbe 6717
c0993dbe 6718
c0993dbe
UW
6719cat >>confdefs.h <<_ACEOF
6720#define SIZEOF_LONG $ac_cv_sizeof_long
6721_ACEOF
6722
6723
6724 if test "x${ac_cv_sizeof_long}" = "x8"; then
6725 want64=true
6726 fi
6727 fi
6728 if test x${want64} = xtrue; then
6729 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6730 else
6731 TARGET_OBS='$(ALL_TARGET_OBS)'
6732 fi
6733fi
6734
6735
6736
b292c783 6737
c0993dbe
UW
6738# For other settings, only the main target counts.
6739gdb_sim=
6740gdb_osabi=
6741build_gdbserver=
6742targ=$target; . ${srcdir}/configure.tgt
6743
6744# Fetch the default architecture and default target vector from BFD.
6745targ=$target; . $srcdir/../bfd/config.bfd
6746
6747# We only want the first architecture, so strip off the others if
6748# there is more than one.
6749targ_archs=`echo $targ_archs | sed 's/ .*//'`
6750
6751if test "x$targ_archs" != x; then
6752
6753cat >>confdefs.h <<_ACEOF
6754#define DEFAULT_BFD_ARCH $targ_archs
6755_ACEOF
6756
6757fi
6758if test "x$targ_defvec" != x; then
6759
6760cat >>confdefs.h <<_ACEOF
6761#define DEFAULT_BFD_VEC $targ_defvec
6762_ACEOF
6763
6764fi
6765
c0993dbe 6766# Enable MI.
81ecdfbb
RW
6767# Check whether --enable-gdbmi was given.
6768if test "${enable_gdbmi+set}" = set; then :
6769 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6770 yes | no)
6771 ;;
6772 *)
d0ac1c44 6773 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6774 esac
6775else
6776 enable_gdbmi=yes
81ecdfbb
RW
6777fi
6778
c0993dbe 6779if test x"$enable_gdbmi" = xyes; then
0ad6b8ee 6780 if test -d "$srcdir/mi"; then
c0993dbe
UW
6781 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6782 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6783 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6784 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6785 fi
6786fi
6787
6788# Enable TUI.
81ecdfbb
RW
6789# Check whether --enable-tui was given.
6790if test "${enable_tui+set}" = set; then :
6791 enableval=$enable_tui; case $enableval in
3ca64bd3 6792 yes | no | auto)
c0993dbe
UW
6793 ;;
6794 *)
d0ac1c44 6795 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6796 esac
6797else
3ca64bd3 6798 enable_tui=auto
81ecdfbb
RW
6799fi
6800
c0993dbe
UW
6801
6802# Enable gdbtk.
81ecdfbb
RW
6803# Check whether --enable-gdbtk was given.
6804if test "${enable_gdbtk+set}" = set; then :
6805 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6806 yes | no)
6807 ;;
6808 *)
d0ac1c44 6809 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6810 esac
6811else
0ad6b8ee 6812 if test -d "$srcdir/gdbtk"; then
c0993dbe
UW
6813 enable_gdbtk=yes
6814 else
6815 enable_gdbtk=no
6816 fi
81ecdfbb
RW
6817fi
6818
c0993dbe
UW
6819# We unconditionally disable gdbtk tests on selected platforms.
6820case $host_os in
6821 go32* | windows*)
81ecdfbb
RW
6822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6823$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6824 enable_gdbtk=no ;;
6825esac
6826
05e7c244 6827# Libunwind support for ia64.
bec39cab 6828
05e7c244
JK
6829
6830# Check whether --with-libunwind-ia64 was given.
6831if test "${with_libunwind_ia64+set}" = set; then :
6832 withval=$with_libunwind_ia64;
bec39cab 6833else
05e7c244
JK
6834 with_libunwind_ia64=auto
6835fi
bec39cab 6836
05e7c244
JK
6837
6838# Backward compatibility option.
6839if test "${with_libunwind+set}" = set; then
6840 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6841 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6842 fi
6843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6844$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6845 with_libunwind_ia64="$with_libunwind"
6846fi
6847
6848case "$with_libunwind_ia64" in
6849 yes | no)
6850 ;;
6851 auto)
6852 for ac_header in libunwind-ia64.h
81ecdfbb 6853do :
b54a8fd7 6854 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6855if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6856 cat >>confdefs.h <<_ACEOF
b54a8fd7 6857#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6858_ACEOF
6859
6860fi
6861
6862done
6863
05e7c244
JK
6864 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6865 ;;
6866 *)
d0ac1c44 6867 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6868 ;;
6869esac
bec39cab 6870
05e7c244 6871if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6872 for ac_header in libunwind-ia64.h
81ecdfbb 6873do :
b54a8fd7 6874 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6875if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6876 cat >>confdefs.h <<_ACEOF
b54a8fd7 6877#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6878_ACEOF
6879
6880fi
6881
6882done
6883
05e7c244 6884 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6885 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6886 fi
6887 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6888 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6889 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6890fi
6891
cb01cfba
JB
6892opt_curses=no
6893
81ecdfbb
RW
6894# Check whether --with-curses was given.
6895if test "${with_curses+set}" = set; then :
6896 withval=$with_curses; opt_curses=$withval
6897fi
6898
cb01cfba 6899
76a39ba7 6900prefer_curses=no
cb01cfba 6901if test "$opt_curses" = "yes"; then
76a39ba7 6902 prefer_curses=yes
cb01cfba
JB
6903fi
6904
a9322a30 6905# Profiling support.
81ecdfbb
RW
6906# Check whether --enable-profiling was given.
6907if test "${enable_profiling+set}" = set; then :
6908 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6909 yes | no)
6910 ;;
6911 *)
d0ac1c44 6912 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6913 esac
6914else
6915 enable_profiling=no
81ecdfbb 6916fi
bec39cab 6917
a9322a30
TT
6918
6919for ac_func in monstartup _mcleanup
81ecdfbb
RW
6920do :
6921 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6922ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6923if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6924 cat >>confdefs.h <<_ACEOF
6925#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6926_ACEOF
a9322a30 6927
81ecdfbb
RW
6928fi
6929done
a9322a30 6930
81ecdfbb
RW
6931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6932$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6933if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6934 $as_echo_n "(cached) " >&6
6935else
6936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6937/* end confdefs.h. */
6938#include <stdlib.h>
6939extern char _etext;
a9322a30
TT
6940
6941int
6942main ()
6943{
6944free (&_etext);
6945 ;
6946 return 0;
6947}
bec39cab 6948_ACEOF
81ecdfbb 6949if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6950 ac_cv_var__etext=yes
bec39cab 6951else
81ecdfbb 6952 ac_cv_var__etext=no
bec39cab 6953fi
81ecdfbb
RW
6954rm -f core conftest.err conftest.$ac_objext \
6955 conftest$ac_exeext conftest.$ac_ext
bec39cab 6956fi
81ecdfbb
RW
6957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6958$as_echo "$ac_cv_var__etext" >&6; }
0ad6b8ee 6959if test "$ac_cv_var__etext" = yes; then
60ca704f 6960
81ecdfbb 6961$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6962
bec39cab 6963fi
81ecdfbb
RW
6964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6965$as_echo_n "checking for etext... " >&6; }
d0ac1c44 6966if ${ac_cv_var_etext+:} false; then :
81ecdfbb 6967 $as_echo_n "(cached) " >&6
bec39cab 6968else
81ecdfbb 6969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6970/* end confdefs.h. */
a9322a30
TT
6971#include <stdlib.h>
6972extern char etext;
bec39cab
AC
6973
6974int
6975main ()
6976{
a9322a30 6977free (&etext);
bec39cab
AC
6978 ;
6979 return 0;
6980}
6981_ACEOF
81ecdfbb 6982if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6983 ac_cv_var_etext=yes
bec39cab 6984else
81ecdfbb 6985 ac_cv_var_etext=no
bec39cab 6986fi
81ecdfbb
RW
6987rm -f core conftest.err conftest.$ac_objext \
6988 conftest$ac_exeext conftest.$ac_ext
bec39cab 6989fi
81ecdfbb
RW
6990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6991$as_echo "$ac_cv_var_etext" >&6; }
0ad6b8ee 6992if test "$ac_cv_var_etext" = yes; then
a9322a30 6993
81ecdfbb 6994$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6995
6996fi
a9322a30 6997if test "$enable_profiling" = yes ; then
0ad6b8ee 6998 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
d0ac1c44 6999 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7000 fi
7001 PROFILE_CFLAGS=-pg
7002 OLD_CFLAGS="$CFLAGS"
7003 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7004
81ecdfbb
RW
7005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7006$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7007if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7008 $as_echo_n "(cached) " >&6
bec39cab 7009else
81ecdfbb 7010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7011/* end confdefs.h. */
bec39cab
AC
7012
7013int
7014main ()
7015{
a9322a30 7016int x;
bec39cab
AC
7017 ;
7018 return 0;
7019}
7020_ACEOF
81ecdfbb 7021if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7022 ac_cv_cc_supports_pg=yes
bec39cab 7023else
81ecdfbb 7024 ac_cv_cc_supports_pg=no
bec39cab 7025fi
81ecdfbb 7026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7027fi
81ecdfbb
RW
7028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7029$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7030
0ad6b8ee 7031 if test "$ac_cv_cc_supports_pg" = no; then
d0ac1c44 7032 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7033 fi
bec39cab 7034
a9322a30 7035 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7036fi
7037
44cee4fd
TT
7038CODESIGN_CERT=
7039# Check whether --enable-codesign was given.
7040if test "${enable_codesign+set}" = set; then :
7041 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7042fi
7043
7044
7045
c16158bc
JM
7046
7047
81ecdfbb
RW
7048# Check whether --with-pkgversion was given.
7049if test "${with_pkgversion+set}" = set; then :
7050 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7051 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7052 no) PKGVERSION= ;;
7053 *) PKGVERSION="($withval) " ;;
7054 esac
7055else
7056 PKGVERSION="(GDB) "
7057
81ecdfbb 7058fi
c16158bc
JM
7059
7060
7061
7062
81ecdfbb
RW
7063
7064# Check whether --with-bugurl was given.
7065if test "${with_bugurl+set}" = set; then :
7066 withval=$with_bugurl; case "$withval" in
d0ac1c44 7067 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7068 no) BUGURL=
7069 ;;
7070 *) BUGURL="$withval"
7071 ;;
7072 esac
7073else
7074 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7075
81ecdfbb
RW
7076fi
7077
c16158bc
JM
7078 case ${BUGURL} in
7079 "")
7080 REPORT_BUGS_TO=
7081 REPORT_BUGS_TEXI=
7082 ;;
7083 *)
7084 REPORT_BUGS_TO="<$BUGURL>"
7085 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7086 ;;
7087 esac;
7088
7089
7090
7091
7092cat >>confdefs.h <<_ACEOF
7093#define PKGVERSION "$PKGVERSION"
7094_ACEOF
7095
7096
7097cat >>confdefs.h <<_ACEOF
7098#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7099_ACEOF
7100
7101
bec39cab
AC
7102# --------------------- #
7103# Checks for programs. #
7104# --------------------- #
7105
7106for ac_prog in gawk mawk nawk awk
7107do
7108 # Extract the first word of "$ac_prog", so it can be a program name with args.
7109set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7111$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7112if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7113 $as_echo_n "(cached) " >&6
bec39cab
AC
7114else
7115 if test -n "$AWK"; then
7116 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7117else
7118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7119for as_dir in $PATH
7120do
7121 IFS=$as_save_IFS
7122 test -z "$as_dir" && as_dir=.
81ecdfbb 7123 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7124 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7125 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7127 break 2
7128 fi
7129done
81ecdfbb
RW
7130 done
7131IFS=$as_save_IFS
bec39cab
AC
7132
7133fi
7134fi
7135AWK=$ac_cv_prog_AWK
7136if test -n "$AWK"; then
81ecdfbb
RW
7137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7138$as_echo "$AWK" >&6; }
bec39cab 7139else
81ecdfbb
RW
7140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7141$as_echo "no" >&6; }
bec39cab
AC
7142fi
7143
bec39cab 7144
81ecdfbb 7145 test -n "$AWK" && break
bec39cab
AC
7146done
7147
c971b7fa
PA
7148# Find a good install program. We prefer a C program (faster),
7149# so one script is as good as another. But avoid the broken or
7150# incompatible versions:
7151# SysV /etc/install, /usr/sbin/install
7152# SunOS /usr/etc/install
7153# IRIX /sbin/install
7154# AIX /bin/install
7155# AmigaOS /C/install, which installs bootblocks on floppy discs
7156# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7157# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7158# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7159# OS/2's system install, which has a completely different semantic
7160# ./install, which can be erroneously created by make from ./install.sh.
7161# Reject install programs that cannot install multiple files.
7162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7163$as_echo_n "checking for a BSD-compatible install... " >&6; }
7164if test -z "$INSTALL"; then
d0ac1c44 7165if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7166 $as_echo_n "(cached) " >&6
7167else
7168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7169for as_dir in $PATH
7170do
7171 IFS=$as_save_IFS
7172 test -z "$as_dir" && as_dir=.
7173 # Account for people who put trailing slashes in PATH elements.
7174case $as_dir/ in #((
7175 ./ | .// | /[cC]/* | \
7176 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7177 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7178 /usr/ucb/* ) ;;
7179 *)
7180 # OSF1 and SCO ODT 3.0 have their own names for install.
7181 # Don't use installbsd from OSF since it installs stuff as root
7182 # by default.
7183 for ac_prog in ginstall scoinst install; do
7184 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7185 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7186 if test $ac_prog = install &&
7187 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7188 # AIX install. It has an incompatible calling convention.
7189 :
7190 elif test $ac_prog = install &&
7191 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7192 # program-specific install script used by HP pwplus--don't use.
7193 :
7194 else
7195 rm -rf conftest.one conftest.two conftest.dir
7196 echo one > conftest.one
7197 echo two > conftest.two
7198 mkdir conftest.dir
7199 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7200 test -s conftest.one && test -s conftest.two &&
7201 test -s conftest.dir/conftest.one &&
7202 test -s conftest.dir/conftest.two
7203 then
7204 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7205 break 3
7206 fi
7207 fi
7208 fi
7209 done
7210 done
7211 ;;
7212esac
7213
7214 done
7215IFS=$as_save_IFS
7216
7217rm -rf conftest.one conftest.two conftest.dir
7218
7219fi
7220 if test "${ac_cv_path_install+set}" = set; then
7221 INSTALL=$ac_cv_path_install
7222 else
7223 # As a last resort, use the slow shell script. Don't cache a
7224 # value for INSTALL within a source directory, because that will
7225 # break other packages using the cache if that directory is
7226 # removed, or if the value is a relative name.
7227 INSTALL=$ac_install_sh
7228 fi
7229fi
7230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7231$as_echo "$INSTALL" >&6; }
7232
7233# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7234# It thinks the first close brace ends the variable substitution.
7235test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7236
7237test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7238
7239test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7240
81ecdfbb
RW
7241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7242$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7243LN_S=$as_ln_s
7244if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7246$as_echo "yes" >&6; }
bec39cab 7247else
81ecdfbb
RW
7248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7249$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7250fi
7251
7252if test -n "$ac_tool_prefix"; then
7253 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7254set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7256$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7257if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7258 $as_echo_n "(cached) " >&6
bec39cab
AC
7259else
7260 if test -n "$RANLIB"; then
7261 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7262else
7263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7264for as_dir in $PATH
7265do
7266 IFS=$as_save_IFS
7267 test -z "$as_dir" && as_dir=.
81ecdfbb 7268 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7269 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7270 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7271 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7272 break 2
7273 fi
7274done
81ecdfbb
RW
7275 done
7276IFS=$as_save_IFS
bec39cab
AC
7277
7278fi
7279fi
7280RANLIB=$ac_cv_prog_RANLIB
7281if test -n "$RANLIB"; then
81ecdfbb
RW
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7283$as_echo "$RANLIB" >&6; }
bec39cab 7284else
81ecdfbb
RW
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7286$as_echo "no" >&6; }
bec39cab
AC
7287fi
7288
81ecdfbb 7289
bec39cab
AC
7290fi
7291if test -z "$ac_cv_prog_RANLIB"; then
7292 ac_ct_RANLIB=$RANLIB
7293 # Extract the first word of "ranlib", so it can be a program name with args.
7294set dummy ranlib; ac_word=$2
81ecdfbb
RW
7295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7296$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7297if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7298 $as_echo_n "(cached) " >&6
bec39cab
AC
7299else
7300 if test -n "$ac_ct_RANLIB"; then
7301 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7302else
7303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7304for as_dir in $PATH
7305do
7306 IFS=$as_save_IFS
7307 test -z "$as_dir" && as_dir=.
81ecdfbb 7308 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7309 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7310 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7311 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7312 break 2
7313 fi
7314done
81ecdfbb
RW
7315 done
7316IFS=$as_save_IFS
bec39cab 7317
bec39cab
AC
7318fi
7319fi
7320ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7321if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7323$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7324else
81ecdfbb
RW
7325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7326$as_echo "no" >&6; }
bec39cab
AC
7327fi
7328
81ecdfbb
RW
7329 if test "x$ac_ct_RANLIB" = x; then
7330 RANLIB=":"
7331 else
7332 case $cross_compiling:$ac_tool_warned in
7333yes:)
7334{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7335$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7336ac_tool_warned=yes ;;
7337esac
7338 RANLIB=$ac_ct_RANLIB
7339 fi
bec39cab
AC
7340else
7341 RANLIB="$ac_cv_prog_RANLIB"
7342fi
7343
7344for ac_prog in 'bison -y' byacc
7345do
7346 # Extract the first word of "$ac_prog", so it can be a program name with args.
7347set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7349$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7350if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7351 $as_echo_n "(cached) " >&6
bec39cab
AC
7352else
7353 if test -n "$YACC"; then
7354 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7355else
7356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7357for as_dir in $PATH
7358do
7359 IFS=$as_save_IFS
7360 test -z "$as_dir" && as_dir=.
81ecdfbb 7361 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7362 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7363 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7365 break 2
7366 fi
7367done
81ecdfbb
RW
7368 done
7369IFS=$as_save_IFS
bec39cab
AC
7370
7371fi
7372fi
7373YACC=$ac_cv_prog_YACC
7374if test -n "$YACC"; then
81ecdfbb
RW
7375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7376$as_echo "$YACC" >&6; }
bec39cab 7377else
81ecdfbb
RW
7378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379$as_echo "no" >&6; }
bec39cab
AC
7380fi
7381
81ecdfbb 7382
bec39cab
AC
7383 test -n "$YACC" && break
7384done
7385test -n "$YACC" || YACC="yacc"
7386
7387
7388if test -n "$ac_tool_prefix"; then
7389 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7390set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7392$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7393if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7394 $as_echo_n "(cached) " >&6
bec39cab
AC
7395else
7396 if test -n "$AR"; then
7397 ac_cv_prog_AR="$AR" # Let the user override the test.
7398else
7399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7400for as_dir in $PATH
7401do
7402 IFS=$as_save_IFS
7403 test -z "$as_dir" && as_dir=.
81ecdfbb 7404 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7405 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7406 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7407 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7408 break 2
7409 fi
7410done
81ecdfbb
RW
7411 done
7412IFS=$as_save_IFS
bec39cab
AC
7413
7414fi
7415fi
7416AR=$ac_cv_prog_AR
7417if test -n "$AR"; then
81ecdfbb
RW
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7419$as_echo "$AR" >&6; }
bec39cab 7420else
81ecdfbb
RW
7421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7422$as_echo "no" >&6; }
bec39cab
AC
7423fi
7424
81ecdfbb 7425
bec39cab
AC
7426fi
7427if test -z "$ac_cv_prog_AR"; then
7428 ac_ct_AR=$AR
7429 # Extract the first word of "ar", so it can be a program name with args.
7430set dummy ar; ac_word=$2
81ecdfbb
RW
7431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7433if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7434 $as_echo_n "(cached) " >&6
bec39cab
AC
7435else
7436 if test -n "$ac_ct_AR"; then
7437 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7438else
7439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7440for as_dir in $PATH
7441do
7442 IFS=$as_save_IFS
7443 test -z "$as_dir" && as_dir=.
81ecdfbb 7444 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7445 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7446 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7447 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7448 break 2
7449 fi
7450done
81ecdfbb
RW
7451 done
7452IFS=$as_save_IFS
bec39cab
AC
7453
7454fi
7455fi
7456ac_ct_AR=$ac_cv_prog_ac_ct_AR
7457if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7459$as_echo "$ac_ct_AR" >&6; }
bec39cab 7460else
81ecdfbb
RW
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7462$as_echo "no" >&6; }
bec39cab
AC
7463fi
7464
81ecdfbb
RW
7465 if test "x$ac_ct_AR" = x; then
7466 AR=""
7467 else
7468 case $cross_compiling:$ac_tool_warned in
7469yes:)
7470{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7471$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7472ac_tool_warned=yes ;;
7473esac
7474 AR=$ac_ct_AR
7475 fi
bec39cab
AC
7476else
7477 AR="$ac_cv_prog_AR"
7478fi
7479
7480if test -n "$ac_tool_prefix"; then
7481 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7482set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7484$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7485if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7486 $as_echo_n "(cached) " >&6
bec39cab
AC
7487else
7488 if test -n "$DLLTOOL"; then
7489 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7490else
7491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7492for as_dir in $PATH
7493do
7494 IFS=$as_save_IFS
7495 test -z "$as_dir" && as_dir=.
81ecdfbb 7496 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7497 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7498 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7500 break 2
7501 fi
7502done
81ecdfbb
RW
7503 done
7504IFS=$as_save_IFS
bec39cab
AC
7505
7506fi
7507fi
7508DLLTOOL=$ac_cv_prog_DLLTOOL
7509if test -n "$DLLTOOL"; then
81ecdfbb
RW
7510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7511$as_echo "$DLLTOOL" >&6; }
bec39cab 7512else
81ecdfbb
RW
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7514$as_echo "no" >&6; }
bec39cab
AC
7515fi
7516
81ecdfbb 7517
bec39cab
AC
7518fi
7519if test -z "$ac_cv_prog_DLLTOOL"; then
7520 ac_ct_DLLTOOL=$DLLTOOL
7521 # Extract the first word of "dlltool", so it can be a program name with args.
7522set dummy dlltool; ac_word=$2
81ecdfbb
RW
7523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7524$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7525if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7526 $as_echo_n "(cached) " >&6
bec39cab
AC
7527else
7528 if test -n "$ac_ct_DLLTOOL"; then
7529 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7530else
7531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7532for as_dir in $PATH
7533do
7534 IFS=$as_save_IFS
7535 test -z "$as_dir" && as_dir=.
81ecdfbb 7536 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7538 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7540 break 2
7541 fi
7542done
81ecdfbb
RW
7543 done
7544IFS=$as_save_IFS
bec39cab
AC
7545
7546fi
7547fi
7548ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7549if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7551$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7552else
81ecdfbb
RW
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554$as_echo "no" >&6; }
bec39cab
AC
7555fi
7556
81ecdfbb
RW
7557 if test "x$ac_ct_DLLTOOL" = x; then
7558 DLLTOOL=""
7559 else
7560 case $cross_compiling:$ac_tool_warned in
7561yes:)
7562{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7563$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7564ac_tool_warned=yes ;;
7565esac
7566 DLLTOOL=$ac_ct_DLLTOOL
7567 fi
bec39cab
AC
7568else
7569 DLLTOOL="$ac_cv_prog_DLLTOOL"
7570fi
7571
7572if test -n "$ac_tool_prefix"; then
7573 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7574set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7576$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7577if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7578 $as_echo_n "(cached) " >&6
bec39cab
AC
7579else
7580 if test -n "$WINDRES"; then
7581 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7582else
7583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7584for as_dir in $PATH
7585do
7586 IFS=$as_save_IFS
7587 test -z "$as_dir" && as_dir=.
81ecdfbb 7588 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7589 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7590 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7592 break 2
7593 fi
7594done
81ecdfbb
RW
7595 done
7596IFS=$as_save_IFS
bec39cab
AC
7597
7598fi
7599fi
7600WINDRES=$ac_cv_prog_WINDRES
7601if test -n "$WINDRES"; then
81ecdfbb
RW
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7603$as_echo "$WINDRES" >&6; }
bec39cab 7604else
81ecdfbb
RW
7605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7606$as_echo "no" >&6; }
bec39cab
AC
7607fi
7608
81ecdfbb 7609
bec39cab
AC
7610fi
7611if test -z "$ac_cv_prog_WINDRES"; then
7612 ac_ct_WINDRES=$WINDRES
7613 # Extract the first word of "windres", so it can be a program name with args.
7614set dummy windres; ac_word=$2
81ecdfbb
RW
7615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7616$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7617if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7618 $as_echo_n "(cached) " >&6
bec39cab
AC
7619else
7620 if test -n "$ac_ct_WINDRES"; then
7621 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7622else
7623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7624for as_dir in $PATH
7625do
7626 IFS=$as_save_IFS
7627 test -z "$as_dir" && as_dir=.
81ecdfbb 7628 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7630 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7632 break 2
7633 fi
7634done
81ecdfbb
RW
7635 done
7636IFS=$as_save_IFS
bec39cab
AC
7637
7638fi
7639fi
7640ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7641if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7643$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7644else
81ecdfbb
RW
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7646$as_echo "no" >&6; }
c906108c 7647fi
bec39cab 7648
81ecdfbb
RW
7649 if test "x$ac_ct_WINDRES" = x; then
7650 WINDRES=""
7651 else
7652 case $cross_compiling:$ac_tool_warned in
7653yes:)
7654{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7655$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7656ac_tool_warned=yes ;;
7657esac
7658 WINDRES=$ac_ct_WINDRES
7659 fi
c906108c 7660else
bec39cab 7661 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7662fi
7663
bec39cab 7664
036c3acb
TS
7665case $host_os in
7666 gnu*)
7667 # Needed for GNU Hurd hosts.
7668 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7669 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7670set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7672$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7673if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7674 $as_echo_n "(cached) " >&6
c906108c 7675else
bec39cab
AC
7676 if test -n "$MIG"; then
7677 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7678else
7679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7680for as_dir in $PATH
7681do
7682 IFS=$as_save_IFS
7683 test -z "$as_dir" && as_dir=.
81ecdfbb 7684 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7686 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7688 break 2
7689 fi
7690done
81ecdfbb
RW
7691 done
7692IFS=$as_save_IFS
bec39cab 7693
c906108c 7694fi
bec39cab
AC
7695fi
7696MIG=$ac_cv_prog_MIG
7697if test -n "$MIG"; then
81ecdfbb
RW
7698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7699$as_echo "$MIG" >&6; }
c906108c 7700else
81ecdfbb
RW
7701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7702$as_echo "no" >&6; }
c906108c
SS
7703fi
7704
81ecdfbb 7705
bec39cab
AC
7706fi
7707if test -z "$ac_cv_prog_MIG"; then
7708 ac_ct_MIG=$MIG
7709 # Extract the first word of "mig", so it can be a program name with args.
7710set dummy mig; ac_word=$2
81ecdfbb
RW
7711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7712$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7713if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7714 $as_echo_n "(cached) " >&6
bec39cab
AC
7715else
7716 if test -n "$ac_ct_MIG"; then
7717 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7718else
7719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7720for as_dir in $PATH
7721do
7722 IFS=$as_save_IFS
7723 test -z "$as_dir" && as_dir=.
81ecdfbb 7724 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7726 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7728 break 2
7729 fi
7730done
81ecdfbb
RW
7731 done
7732IFS=$as_save_IFS
c906108c 7733
bec39cab
AC
7734fi
7735fi
7736ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7737if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7739$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7740else
81ecdfbb
RW
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7742$as_echo "no" >&6; }
bec39cab 7743fi
c906108c 7744
81ecdfbb
RW
7745 if test "x$ac_ct_MIG" = x; then
7746 MIG=""
7747 else
7748 case $cross_compiling:$ac_tool_warned in
7749yes:)
7750{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7751$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7752ac_tool_warned=yes ;;
7753esac
7754 MIG=$ac_ct_MIG
7755 fi
bec39cab
AC
7756else
7757 MIG="$ac_cv_prog_MIG"
7758fi
c906108c 7759
036c3acb 7760 if test x"$MIG" = x; then
d0ac1c44 7761 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7762 fi
7763 ;;
7764esac
c906108c 7765
bec39cab
AC
7766# ---------------------- #
7767# Checks for libraries. #
7768# ---------------------- #
c906108c 7769
bec39cab 7770# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7772$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7773if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7774 $as_echo_n "(cached) " >&6
bec39cab
AC
7775else
7776 ac_check_lib_save_LIBS=$LIBS
7777LIBS="-lm $LIBS"
81ecdfbb 7778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7779/* end confdefs.h. */
c906108c 7780
c906108c 7781
bec39cab
AC
7782int
7783main ()
7784{
81ecdfbb 7785return main ();
bec39cab
AC
7786 ;
7787 return 0;
7788}
7789_ACEOF
81ecdfbb 7790if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7791 ac_cv_lib_m_main=yes
7792else
81ecdfbb 7793 ac_cv_lib_m_main=no
bec39cab 7794fi
81ecdfbb
RW
7795rm -f core conftest.err conftest.$ac_objext \
7796 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7797LIBS=$ac_check_lib_save_LIBS
7798fi
81ecdfbb
RW
7799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7800$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7801if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7802 cat >>confdefs.h <<_ACEOF
7803#define HAVE_LIBM 1
7804_ACEOF
7805
7806 LIBS="-lm $LIBS"
c906108c 7807
c906108c 7808fi
bec39cab
AC
7809
7810
bec39cab 7811# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7813$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7814if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7815 $as_echo_n "(cached) " >&6
bec39cab
AC
7816else
7817 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7819/* end confdefs.h. */
ddc9cd0f 7820
81ecdfbb
RW
7821/* Override any GCC internal prototype to avoid an error.
7822 Use char because int might match the return type of a GCC
7823 builtin and then its argument prototype would still apply. */
bec39cab
AC
7824#ifdef __cplusplus
7825extern "C"
7826#endif
bec39cab
AC
7827char gethostbyname ();
7828int
7829main ()
7830{
81ecdfbb 7831return gethostbyname ();
bec39cab
AC
7832 ;
7833 return 0;
7834}
7835_ACEOF
81ecdfbb
RW
7836for ac_lib in '' nsl; do
7837 if test -z "$ac_lib"; then
7838 ac_res="none required"
7839 else
7840 ac_res=-l$ac_lib
b4e70030 7841 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7842 fi
7843 if ac_fn_c_try_link "$LINENO"; then :
7844 ac_cv_search_gethostbyname=$ac_res
7845fi
7846rm -f core conftest.err conftest.$ac_objext \
7847 conftest$ac_exeext
d0ac1c44 7848 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7849 break
7850fi
7851done
d0ac1c44 7852if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7853
bec39cab 7854else
81ecdfbb 7855 ac_cv_search_gethostbyname=no
bec39cab 7856fi
81ecdfbb 7857rm conftest.$ac_ext
bec39cab
AC
7858LIBS=$ac_func_search_save_LIBS
7859fi
81ecdfbb
RW
7860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7861$as_echo "$ac_cv_search_gethostbyname" >&6; }
7862ac_res=$ac_cv_search_gethostbyname
7863if test "$ac_res" != no; then :
7864 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7865
bec39cab 7866fi
96baa820 7867
c906108c 7868
b4e70030 7869# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7871$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7872if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7873 $as_echo_n "(cached) " >&6
b4e70030
JB
7874else
7875 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7877/* end confdefs.h. */
7878
81ecdfbb
RW
7879/* Override any GCC internal prototype to avoid an error.
7880 Use char because int might match the return type of a GCC
7881 builtin and then its argument prototype would still apply. */
b4e70030
JB
7882#ifdef __cplusplus
7883extern "C"
7884#endif
b4e70030
JB
7885char socketpair ();
7886int
7887main ()
7888{
81ecdfbb 7889return socketpair ();
b4e70030
JB
7890 ;
7891 return 0;
7892}
7893_ACEOF
81ecdfbb
RW
7894for ac_lib in '' socket; do
7895 if test -z "$ac_lib"; then
7896 ac_res="none required"
7897 else
7898 ac_res=-l$ac_lib
b4e70030 7899 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7900 fi
7901 if ac_fn_c_try_link "$LINENO"; then :
7902 ac_cv_search_socketpair=$ac_res
7903fi
7904rm -f core conftest.err conftest.$ac_objext \
7905 conftest$ac_exeext
d0ac1c44 7906 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7907 break
7908fi
7909done
d0ac1c44 7910if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7911
b4e70030 7912else
81ecdfbb 7913 ac_cv_search_socketpair=no
b4e70030 7914fi
81ecdfbb 7915rm conftest.$ac_ext
b4e70030
JB
7916LIBS=$ac_func_search_save_LIBS
7917fi
81ecdfbb
RW
7918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7919$as_echo "$ac_cv_search_socketpair" >&6; }
7920ac_res=$ac_cv_search_socketpair
7921if test "$ac_res" != no; then :
7922 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7923
7924fi
7925
7926
233a11ab 7927# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7928
711a72d3 7929 # Use the system's zlib library.
39f3de7c
L
7930 zlibdir="-L\$(top_builddir)/../zlib"
7931 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7932
711a72d3
L
7933# Check whether --with-system-zlib was given.
7934if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7935 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7936 zlibdir=
7937 zlibinc=
7938 fi
b040ad30 7939
233a11ab 7940fi
233a11ab 7941
233a11ab 7942
233a11ab 7943
b040ad30 7944
233a11ab 7945
25268153 7946# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7947# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7949$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7950if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7951 $as_echo_n "(cached) " >&6
7952else
7953 ac_func_search_save_LIBS=$LIBS
7954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7955/* end confdefs.h. */
7956
7957/* Override any GCC internal prototype to avoid an error.
7958 Use char because int might match the return type of a GCC
7959 builtin and then its argument prototype would still apply. */
7960#ifdef __cplusplus
7961extern "C"
7962#endif
7963char kinfo_getvmmap ();
7964int
7965main ()
7966{
7967return kinfo_getvmmap ();
7968 ;
7969 return 0;
7970}
7971_ACEOF
37773e78 7972for ac_lib in '' util util-freebsd; do
25268153
JB
7973 if test -z "$ac_lib"; then
7974 ac_res="none required"
7975 else
7976 ac_res=-l$ac_lib
7977 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7978 fi
7979 if ac_fn_c_try_link "$LINENO"; then :
7980 ac_cv_search_kinfo_getvmmap=$ac_res
7981fi
7982rm -f core conftest.err conftest.$ac_objext \
7983 conftest$ac_exeext
d0ac1c44 7984 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7985 break
7986fi
7987done
d0ac1c44 7988if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7989
7990else
7991 ac_cv_search_kinfo_getvmmap=no
7992fi
7993rm conftest.$ac_ext
7994LIBS=$ac_func_search_save_LIBS
7995fi
7996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7997$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7998ac_res=$ac_cv_search_kinfo_getvmmap
7999if test "$ac_res" != no; then :
8000 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8001
8002$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8003
8004fi
8005
8006
77f120bf 8007
016a3251
DD
8008 if test "X$prefix" = "XNONE"; then
8009 acl_final_prefix="$ac_default_prefix"
8010 else
8011 acl_final_prefix="$prefix"
8012 fi
8013 if test "X$exec_prefix" = "XNONE"; then
8014 acl_final_exec_prefix='${prefix}'
8015 else
8016 acl_final_exec_prefix="$exec_prefix"
8017 fi
8018 acl_save_prefix="$prefix"
8019 prefix="$acl_final_prefix"
8020 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8021 prefix="$acl_save_prefix"
8022
8023
8024# Check whether --with-gnu-ld was given.
8025if test "${with_gnu_ld+set}" = set; then :
8026 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8027else
8028 with_gnu_ld=no
8029fi
8030
8031# Prepare PATH_SEPARATOR.
8032# The user is always right.
8033if test "${PATH_SEPARATOR+set}" != set; then
8034 echo "#! /bin/sh" >conf$$.sh
8035 echo "exit 0" >>conf$$.sh
8036 chmod +x conf$$.sh
8037 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8038 PATH_SEPARATOR=';'
8039 else
8040 PATH_SEPARATOR=:
8041 fi
8042 rm -f conf$$.sh
8043fi
8044ac_prog=ld
8045if test "$GCC" = yes; then
8046 # Check if gcc -print-prog-name=ld gives a path.
8047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8048$as_echo_n "checking for ld used by GCC... " >&6; }
8049 case $host in
8050 *-*-mingw*)
8051 # gcc leaves a trailing carriage return which upsets mingw
8052 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8053 *)
8054 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8055 esac
8056 case $ac_prog in
8057 # Accept absolute paths.
8058 [\\/]* | [A-Za-z]:[\\/]*)
8059 re_direlt='/[^/][^/]*/\.\./'
8060 # Canonicalize the path of ld
8061 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8062 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8063 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8064 done
8065 test -z "$LD" && LD="$ac_prog"
8066 ;;
8067 "")
8068 # If it fails, then pretend we aren't using GCC.
8069 ac_prog=ld
8070 ;;
8071 *)
8072 # If it is relative, then search for the first ld in PATH.
8073 with_gnu_ld=unknown
8074 ;;
8075 esac
8076elif test "$with_gnu_ld" = yes; then
8077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8078$as_echo_n "checking for GNU ld... " >&6; }
8079else
8080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8081$as_echo_n "checking for non-GNU ld... " >&6; }
8082fi
d0ac1c44 8083if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8084 $as_echo_n "(cached) " >&6
8085else
8086 if test -z "$LD"; then
8087 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8088 for ac_dir in $PATH; do
8089 test -z "$ac_dir" && ac_dir=.
8090 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8091 acl_cv_path_LD="$ac_dir/$ac_prog"
8092 # Check to see if the program is GNU ld. I'd rather use --version,
8093 # but apparently some GNU ld's only accept -v.
8094 # Break only if it was the GNU/non-GNU ld that we prefer.
8095 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8096 test "$with_gnu_ld" != no && break
8097 else
8098 test "$with_gnu_ld" != yes && break
8099 fi
8100 fi
8101 done
8102 IFS="$ac_save_ifs"
8103else
8104 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8105fi
8106fi
8107
8108LD="$acl_cv_path_LD"
8109if test -n "$LD"; then
8110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8111$as_echo "$LD" >&6; }
8112else
8113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8114$as_echo "no" >&6; }
8115fi
d0ac1c44 8116test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8118$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8119if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8120 $as_echo_n "(cached) " >&6
8121else
8122 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8123if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8124 acl_cv_prog_gnu_ld=yes
8125else
8126 acl_cv_prog_gnu_ld=no
8127fi
8128fi
8129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8130$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8131with_gnu_ld=$acl_cv_prog_gnu_ld
8132
8133
8134
8135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8136$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8137if ${acl_cv_rpath+:} false; then :
016a3251
DD
8138 $as_echo_n "(cached) " >&6
8139else
8140
8141 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8142 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8143 . ./conftest.sh
8144 rm -f ./conftest.sh
8145 acl_cv_rpath=done
8146
8147fi
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8149$as_echo "$acl_cv_rpath" >&6; }
8150 wl="$acl_cv_wl"
8151 libext="$acl_cv_libext"
8152 shlibext="$acl_cv_shlibext"
8153 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8154 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8155 hardcode_direct="$acl_cv_hardcode_direct"
8156 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8157 # Check whether --enable-rpath was given.
8158if test "${enable_rpath+set}" = set; then :
8159 enableval=$enable_rpath; :
8160else
8161 enable_rpath=yes
8162fi
8163
8164
8165
8166
8167
8168
8169
8170
8171 use_additional=yes
8172
8173 acl_save_prefix="$prefix"
8174 prefix="$acl_final_prefix"
8175 acl_save_exec_prefix="$exec_prefix"
8176 exec_prefix="$acl_final_exec_prefix"
8177
8178 eval additional_includedir=\"$includedir\"
8179 eval additional_libdir=\"$libdir\"
8180
8181 exec_prefix="$acl_save_exec_prefix"
8182 prefix="$acl_save_prefix"
77f120bf 8183
6c7a06a3 8184
81ecdfbb
RW
8185# Check whether --with-libiconv-prefix was given.
8186if test "${with_libiconv_prefix+set}" = set; then :
8187 withval=$with_libiconv_prefix;
016a3251
DD
8188 if test "X$withval" = "Xno"; then
8189 use_additional=no
8190 else
8191 if test "X$withval" = "X"; then
8192
8193 acl_save_prefix="$prefix"
8194 prefix="$acl_final_prefix"
8195 acl_save_exec_prefix="$exec_prefix"
8196 exec_prefix="$acl_final_exec_prefix"
8197
8198 eval additional_includedir=\"$includedir\"
8199 eval additional_libdir=\"$libdir\"
8200
8201 exec_prefix="$acl_save_exec_prefix"
8202 prefix="$acl_save_prefix"
8203
8204 else
8205 additional_includedir="$withval/include"
8206 additional_libdir="$withval/lib"
8207 fi
8208 fi
6c7a06a3 8209
81ecdfbb
RW
8210fi
8211
016a3251
DD
8212 LIBICONV=
8213 LTLIBICONV=
8214 INCICONV=
8215 rpathdirs=
8216 ltrpathdirs=
8217 names_already_handled=
8218 names_next_round='iconv '
8219 while test -n "$names_next_round"; do
8220 names_this_round="$names_next_round"
8221 names_next_round=
8222 for name in $names_this_round; do
8223 already_handled=
8224 for n in $names_already_handled; do
8225 if test "$n" = "$name"; then
8226 already_handled=yes
8227 break
8228 fi
8229 done
8230 if test -z "$already_handled"; then
8231 names_already_handled="$names_already_handled $name"
8232 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8233 eval value=\"\$HAVE_LIB$uppername\"
8234 if test -n "$value"; then
8235 if test "$value" = yes; then
8236 eval value=\"\$LIB$uppername\"
8237 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8238 eval value=\"\$LTLIB$uppername\"
8239 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8240 else
8241 :
8242 fi
8243 else
8244 found_dir=
8245 found_la=
8246 found_so=
8247 found_a=
8248 if test $use_additional = yes; then
8249 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8250 found_dir="$additional_libdir"
8251 found_so="$additional_libdir/lib$name.$shlibext"
8252 if test -f "$additional_libdir/lib$name.la"; then
8253 found_la="$additional_libdir/lib$name.la"
8254 fi
8255 else
8256 if test -f "$additional_libdir/lib$name.$libext"; then
8257 found_dir="$additional_libdir"
8258 found_a="$additional_libdir/lib$name.$libext"
8259 if test -f "$additional_libdir/lib$name.la"; then
8260 found_la="$additional_libdir/lib$name.la"
8261 fi
8262 fi
8263 fi
8264 fi
8265 if test "X$found_dir" = "X"; then
8266 for x in $LDFLAGS $LTLIBICONV; do
8267
8268 acl_save_prefix="$prefix"
8269 prefix="$acl_final_prefix"
8270 acl_save_exec_prefix="$exec_prefix"
8271 exec_prefix="$acl_final_exec_prefix"
8272 eval x=\"$x\"
8273 exec_prefix="$acl_save_exec_prefix"
8274 prefix="$acl_save_prefix"
8275
8276 case "$x" in
8277 -L*)
8278 dir=`echo "X$x" | sed -e 's/^X-L//'`
8279 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8280 found_dir="$dir"
8281 found_so="$dir/lib$name.$shlibext"
8282 if test -f "$dir/lib$name.la"; then
8283 found_la="$dir/lib$name.la"
8284 fi
8285 else
8286 if test -f "$dir/lib$name.$libext"; then
8287 found_dir="$dir"
8288 found_a="$dir/lib$name.$libext"
8289 if test -f "$dir/lib$name.la"; then
8290 found_la="$dir/lib$name.la"
8291 fi
8292 fi
8293 fi
8294 ;;
8295 esac
8296 if test "X$found_dir" != "X"; then
8297 break
8298 fi
8299 done
8300 fi
8301 if test "X$found_dir" != "X"; then
8302 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8303 if test "X$found_so" != "X"; then
8304 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8305 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8306 else
8307 haveit=
8308 for x in $ltrpathdirs; do
8309 if test "X$x" = "X$found_dir"; then
8310 haveit=yes
8311 break
8312 fi
8313 done
8314 if test -z "$haveit"; then
8315 ltrpathdirs="$ltrpathdirs $found_dir"
8316 fi
8317 if test "$hardcode_direct" = yes; then
8318 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8319 else
8320 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8321 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8322 haveit=
8323 for x in $rpathdirs; do
8324 if test "X$x" = "X$found_dir"; then
8325 haveit=yes
8326 break
8327 fi
8328 done
8329 if test -z "$haveit"; then
8330 rpathdirs="$rpathdirs $found_dir"
8331 fi
8332 else
8333 haveit=
8334 for x in $LDFLAGS $LIBICONV; do
8335
8336 acl_save_prefix="$prefix"
8337 prefix="$acl_final_prefix"
8338 acl_save_exec_prefix="$exec_prefix"
8339 exec_prefix="$acl_final_exec_prefix"
8340 eval x=\"$x\"
8341 exec_prefix="$acl_save_exec_prefix"
8342 prefix="$acl_save_prefix"
8343
8344 if test "X$x" = "X-L$found_dir"; then
8345 haveit=yes
8346 break
8347 fi
8348 done
8349 if test -z "$haveit"; then
8350 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8351 fi
8352 if test "$hardcode_minus_L" != no; then
8353 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8354 else
8355 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8356 fi
8357 fi
8358 fi
8359 fi
8360 else
8361 if test "X$found_a" != "X"; then
8362 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8363 else
8364 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8365 fi
8366 fi
8367 additional_includedir=
8368 case "$found_dir" in
8369 */lib | */lib/)
8370 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8371 additional_includedir="$basedir/include"
8372 ;;
8373 esac
8374 if test "X$additional_includedir" != "X"; then
8375 if test "X$additional_includedir" != "X/usr/include"; then
8376 haveit=
8377 if test "X$additional_includedir" = "X/usr/local/include"; then
8378 if test -n "$GCC"; then
8379 case $host_os in
8380 linux*) haveit=yes;;
8381 esac
8382 fi
8383 fi
8384 if test -z "$haveit"; then
8385 for x in $CPPFLAGS $INCICONV; do
8386
8387 acl_save_prefix="$prefix"
8388 prefix="$acl_final_prefix"
8389 acl_save_exec_prefix="$exec_prefix"
8390 exec_prefix="$acl_final_exec_prefix"
8391 eval x=\"$x\"
8392 exec_prefix="$acl_save_exec_prefix"
8393 prefix="$acl_save_prefix"
8394
8395 if test "X$x" = "X-I$additional_includedir"; then
8396 haveit=yes
8397 break
8398 fi
8399 done
8400 if test -z "$haveit"; then
8401 if test -d "$additional_includedir"; then
8402 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8403 fi
8404 fi
8405 fi
8406 fi
8407 fi
8408 if test -n "$found_la"; then
8409 save_libdir="$libdir"
8410 case "$found_la" in
8411 */* | *\\*) . "$found_la" ;;
8412 *) . "./$found_la" ;;
8413 esac
8414 libdir="$save_libdir"
8415 for dep in $dependency_libs; do
8416 case "$dep" in
8417 -L*)
8418 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8419 if test "X$additional_libdir" != "X/usr/lib"; then
8420 haveit=
8421 if test "X$additional_libdir" = "X/usr/local/lib"; then
8422 if test -n "$GCC"; then
8423 case $host_os in
8424 linux*) haveit=yes;;
8425 esac
8426 fi
8427 fi
8428 if test -z "$haveit"; then
8429 haveit=
8430 for x in $LDFLAGS $LIBICONV; do
8431
8432 acl_save_prefix="$prefix"
8433 prefix="$acl_final_prefix"
8434 acl_save_exec_prefix="$exec_prefix"
8435 exec_prefix="$acl_final_exec_prefix"
8436 eval x=\"$x\"
8437 exec_prefix="$acl_save_exec_prefix"
8438 prefix="$acl_save_prefix"
8439
8440 if test "X$x" = "X-L$additional_libdir"; then
8441 haveit=yes
8442 break
8443 fi
8444 done
8445 if test -z "$haveit"; then
8446 if test -d "$additional_libdir"; then
8447 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8448 fi
8449 fi
8450 haveit=
8451 for x in $LDFLAGS $LTLIBICONV; do
8452
8453 acl_save_prefix="$prefix"
8454 prefix="$acl_final_prefix"
8455 acl_save_exec_prefix="$exec_prefix"
8456 exec_prefix="$acl_final_exec_prefix"
8457 eval x=\"$x\"
8458 exec_prefix="$acl_save_exec_prefix"
8459 prefix="$acl_save_prefix"
8460
8461 if test "X$x" = "X-L$additional_libdir"; then
8462 haveit=yes
8463 break
8464 fi
8465 done
8466 if test -z "$haveit"; then
8467 if test -d "$additional_libdir"; then
8468 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8469 fi
8470 fi
8471 fi
8472 fi
8473 ;;
8474 -R*)
8475 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8476 if test "$enable_rpath" != no; then
8477 haveit=
8478 for x in $rpathdirs; do
8479 if test "X$x" = "X$dir"; then
8480 haveit=yes
8481 break
8482 fi
8483 done
8484 if test -z "$haveit"; then
8485 rpathdirs="$rpathdirs $dir"
8486 fi
8487 haveit=
8488 for x in $ltrpathdirs; do
8489 if test "X$x" = "X$dir"; then
8490 haveit=yes
8491 break
8492 fi
8493 done
8494 if test -z "$haveit"; then
8495 ltrpathdirs="$ltrpathdirs $dir"
8496 fi
8497 fi
8498 ;;
8499 -l*)
8500 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8501 ;;
8502 *.la)
8503 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8504 ;;
8505 *)
8506 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8507 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8508 ;;
8509 esac
8510 done
8511 fi
8512 else
8513 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8514 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8515 fi
8516 fi
8517 fi
8518 done
8519 done
8520 if test "X$rpathdirs" != "X"; then
8521 if test -n "$hardcode_libdir_separator"; then
8522 alldirs=
8523 for found_dir in $rpathdirs; do
8524 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8525 done
8526 acl_save_libdir="$libdir"
8527 libdir="$alldirs"
8528 eval flag=\"$hardcode_libdir_flag_spec\"
8529 libdir="$acl_save_libdir"
8530 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8531 else
8532 for found_dir in $rpathdirs; do
8533 acl_save_libdir="$libdir"
8534 libdir="$found_dir"
8535 eval flag=\"$hardcode_libdir_flag_spec\"
8536 libdir="$acl_save_libdir"
8537 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8538 done
8539 fi
8540 fi
8541 if test "X$ltrpathdirs" != "X"; then
8542 for found_dir in $ltrpathdirs; do
8543 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8544 done
8545 fi
8546
8547
8548
8549
8550
6c7a06a3 8551
6c7a06a3 8552
81ecdfbb
RW
8553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8554$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8555if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8556 $as_echo_n "(cached) " >&6
d542061a 8557else
6c7a06a3
TT
8558
8559 am_cv_func_iconv="no, consider installing GNU libiconv"
8560 am_cv_lib_iconv=no
016a3251
DD
8561 am_save_CPPFLAGS="$CPPFLAGS"
8562 CPPFLAGS="$CPPFLAGS $INCICONV"
8563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8564/* end confdefs.h. */
6c7a06a3
TT
8565#include <stdlib.h>
8566#include <iconv.h>
d542061a
UW
8567int
8568main ()
8569{
6c7a06a3 8570iconv_t cd = iconv_open("","");
016a3251
DD
8571 iconv(cd,NULL,NULL,NULL,NULL);
8572 iconv_close(cd);
d542061a
UW
8573 ;
8574 return 0;
8575}
8576_ACEOF
81ecdfbb 8577if ac_fn_c_try_link "$LINENO"; then :
016a3251 8578 am_cv_func_iconv=yes
d542061a 8579fi
81ecdfbb
RW
8580rm -f core conftest.err conftest.$ac_objext \
8581 conftest$ac_exeext conftest.$ac_ext
016a3251 8582 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8583
016a3251
DD
8584 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8585 for _libs in .libs _libs; do
8586 am_save_CPPFLAGS="$CPPFLAGS"
8587 am_save_LIBS="$LIBS"
8588 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8589 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8591/* end confdefs.h. */
6c7a06a3
TT
8592#include <stdlib.h>
8593#include <iconv.h>
d542061a
UW
8594int
8595main ()
8596{
6c7a06a3 8597iconv_t cd = iconv_open("","");
016a3251
DD
8598 iconv(cd,NULL,NULL,NULL,NULL);
8599 iconv_close(cd);
d542061a
UW
8600 ;
8601 return 0;
8602}
8603_ACEOF
81ecdfbb 8604if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8605 INCICONV="-I../libiconv/include"
8606 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8607 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8608 am_cv_lib_iconv=yes
8609 am_cv_func_iconv=yes
d542061a 8610fi
81ecdfbb
RW
8611rm -f core conftest.err conftest.$ac_objext \
8612 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8613 CPPFLAGS="$am_save_CPPFLAGS"
8614 LIBS="$am_save_LIBS"
8615 if test "$am_cv_func_iconv" = "yes"; then
8616 break
8617 fi
8618 done
77f120bf 8619 fi
94ae1714 8620
4edb1e84 8621 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8622 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8623 am_save_LIBS="$LIBS"
5d762de0 8624 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8625 LIBS="$LIBS $LIBICONV"
81ecdfbb 8626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8627/* end confdefs.h. */
6c7a06a3
TT
8628#include <stdlib.h>
8629#include <iconv.h>
bec39cab
AC
8630int
8631main ()
8632{
6c7a06a3
TT
8633iconv_t cd = iconv_open("","");
8634 iconv(cd,NULL,NULL,NULL,NULL);
8635 iconv_close(cd);
bec39cab
AC
8636 ;
8637 return 0;
8638}
8639_ACEOF
81ecdfbb 8640if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8641 am_cv_lib_iconv=yes
6c7a06a3 8642 am_cv_func_iconv=yes
627af7ea 8643fi
81ecdfbb
RW
8644rm -f core conftest.err conftest.$ac_objext \
8645 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8646 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8647 LIBS="$am_save_LIBS"
6c7a06a3
TT
8648 fi
8649
8650fi
81ecdfbb
RW
8651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8652$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8653 if test "$am_cv_func_iconv" = yes; then
8654
8655$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8656
016a3251 8657 fi
fc3b640d 8658 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8659
8660 for element in $INCICONV; do
8661 haveit=
8662 for x in $CPPFLAGS; do
8663
8664 acl_save_prefix="$prefix"
8665 prefix="$acl_final_prefix"
8666 acl_save_exec_prefix="$exec_prefix"
8667 exec_prefix="$acl_final_exec_prefix"
8668 eval x=\"$x\"
8669 exec_prefix="$acl_save_exec_prefix"
8670 prefix="$acl_save_prefix"
8671
8672 if test "X$x" = "X$element"; then
8673 haveit=yes
8674 break
8675 fi
8676 done
8677 if test -z "$haveit"; then
8678 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8679 fi
8680 done
8681
8682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8683$as_echo_n "checking how to link with libiconv... " >&6; }
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8685$as_echo "$LIBICONV" >&6; }
94ae1714 8686 else
016a3251
DD
8687 LIBICONV=
8688 LTLIBICONV=
fc3b640d 8689 fi
94ae1714 8690
6c7a06a3 8691
6c7a06a3 8692
016a3251 8693 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8695$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8696 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8697 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8698else
8699
81ecdfbb 8700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8701/* end confdefs.h. */
8702
6c7a06a3
TT
8703#include <stdlib.h>
8704#include <iconv.h>
8705extern
b4e70030 8706#ifdef __cplusplus
6c7a06a3 8707"C"
b4e70030 8708#endif
6c7a06a3
TT
8709#if defined(__STDC__) || defined(__cplusplus)
8710size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8711#else
8712size_t iconv();
8713#endif
8714
b4e70030
JB
8715int
8716main ()
8717{
6c7a06a3 8718
b4e70030
JB
8719 ;
8720 return 0;
8721}
8722_ACEOF
81ecdfbb 8723if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8724 am_cv_proto_iconv_arg1=""
4e8d927d 8725else
81ecdfbb 8726 am_cv_proto_iconv_arg1="const"
b4e70030 8727fi
81ecdfbb 8728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8729 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);"
8730fi
8731
8732 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8734 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8735$as_echo "${ac_t:-
8736 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8737
8738cat >>confdefs.h <<_ACEOF
8739#define ICONV_CONST $am_cv_proto_iconv_arg1
8740_ACEOF
8741
8742 fi
6c7a06a3
TT
8743
8744
478aac75
DE
8745# GDB may fork/exec the iconv program to get the list of supported character
8746# sets. Allow the user to specify where to find it.
8747# There are several factors affecting the choice of option name:
8748# - There is already --with-libiconv-prefix but we can't use it, it specifies
8749# the build-time location of libiconv files.
8750# - The program we need to find is iconv, which comes with glibc. The user
8751# doesn't necessarily have libiconv installed. Therefore naming this
8752# --with-libiconv-foo feels wrong.
8753# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8754# defined to work on directories not files (though it really doesn't know
8755# the difference).
8756# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8757# with --with-libiconv-prefix.
8758# Putting these together is why the option name is --with-iconv-bin.
8759
8760
8761# Check whether --with-iconv-bin was given.
8762if test "${with_iconv_bin+set}" = set; then :
8763 withval=$with_iconv_bin; iconv_bin="${withval}"
8764
8765cat >>confdefs.h <<_ACEOF
8766#define ICONV_BIN "${iconv_bin}"
8767_ACEOF
8768
8769
8770 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8771 if test "x$prefix" = xNONE; then
8772 test_prefix=/usr/local
8773 else
8774 test_prefix=$prefix
8775 fi
8776 else
8777 test_prefix=$exec_prefix
8778 fi
8779 value=0
8780 case ${iconv_bin} in
8781 "${test_prefix}"|"${test_prefix}/"*|\
8782 '${exec_prefix}'|'${exec_prefix}/'*)
8783 value=1
8784 ;;
8785 esac
8786
8787cat >>confdefs.h <<_ACEOF
8788#define ICONV_BIN_RELOCATABLE $value
8789_ACEOF
8790
8791
8792
8793fi
8794
8795
cb01cfba 8796# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8797if test x"$enable_tui" != xno; then
cb01cfba
JB
8798 prefer_curses=yes
8799fi
8800
8801curses_found=no
8802if test x"$prefer_curses" = xyes; then
8803 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8804 # curses library because the latter might not provide all the
8805 # functionality we need. However, this leads to problems on systems
8806 # where the linker searches /usr/local/lib, but the compiler doesn't
8807 # search /usr/local/include, if ncurses is installed in /usr/local. A
8808 # default installation of ncurses on alpha*-dec-osf* will lead to such
8809 # a situation.
81ecdfbb
RW
8810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8811$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8812if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8813 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8814else
8815 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8817/* end confdefs.h. */
8818
81ecdfbb
RW
8819/* Override any GCC internal prototype to avoid an error.
8820 Use char because int might match the return type of a GCC
8821 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8822#ifdef __cplusplus
8823extern "C"
8824#endif
6c7a06a3
TT
8825char waddstr ();
8826int
8827main ()
8828{
81ecdfbb 8829return waddstr ();
6c7a06a3
TT
8830 ;
8831 return 0;
8832}
8833_ACEOF
5007d765 8834for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8835 if test -z "$ac_lib"; then
8836 ac_res="none required"
8837 else
8838 ac_res=-l$ac_lib
8839 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8840 fi
8841 if ac_fn_c_try_link "$LINENO"; then :
8842 ac_cv_search_waddstr=$ac_res
8843fi
8844rm -f core conftest.err conftest.$ac_objext \
8845 conftest$ac_exeext
d0ac1c44 8846 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8847 break
8848fi
8849done
d0ac1c44 8850if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8851
6c7a06a3 8852else
81ecdfbb
RW
8853 ac_cv_search_waddstr=no
8854fi
8855rm conftest.$ac_ext
8856LIBS=$ac_func_search_save_LIBS
8857fi
8858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8859$as_echo "$ac_cv_search_waddstr" >&6; }
8860ac_res=$ac_cv_search_waddstr
8861if test "$ac_res" != no; then :
8862 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8863
8864fi
8865
8866
cb01cfba
JB
8867 if test "$ac_cv_search_waddstr" != no; then
8868 curses_found=yes
8869 fi
8870fi
8871
8872# Check whether we should enable the TUI, but only do so if we really
8873# can.
8874if test x"$enable_tui" != xno; then
0ad6b8ee 8875 if test -d "$srcdir/tui"; then
cb01cfba 8876 if test "$curses_found" != no; then
6c7a06a3
TT
8877 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8878 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8879 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8880 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8881 else
8882 if test x"$enable_tui" = xyes; then
d0ac1c44 8883 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8884 else
81ecdfbb
RW
8885 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8886$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8887 fi
8888 fi
8889 fi
8890fi
8891
8892# Since GDB uses Readline, we need termcap functionality. In many
8893# cases this will be provided by the curses library, but some systems
96fe4562 8894# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8895
8896case $host_os in
8897 cygwin*)
0ad6b8ee 8898 if test -d "$srcdir/libtermcap"; then
6c7a06a3
TT
8899 LIBS="../libtermcap/libtermcap.a $LIBS"
8900 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8901 fi ;;
8902 go32* | *djgpp*)
8903 ac_cv_search_tgetent="none required"
8904 ;;
6c7a06a3
TT
8905esac
8906
8907# These are the libraries checked by Readline.
81ecdfbb
RW
8908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8909$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 8910if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 8911 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8912else
8913 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8915/* end confdefs.h. */
8916
81ecdfbb
RW
8917/* Override any GCC internal prototype to avoid an error.
8918 Use char because int might match the return type of a GCC
8919 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8920#ifdef __cplusplus
8921extern "C"
8922#endif
6c7a06a3
TT
8923char tgetent ();
8924int
8925main ()
8926{
81ecdfbb 8927return tgetent ();
6c7a06a3
TT
8928 ;
8929 return 0;
8930}
8931_ACEOF
2578ecb1 8932for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
8933 if test -z "$ac_lib"; then
8934 ac_res="none required"
8935 else
8936 ac_res=-l$ac_lib
6c7a06a3 8937 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8938 fi
8939 if ac_fn_c_try_link "$LINENO"; then :
8940 ac_cv_search_tgetent=$ac_res
8941fi
8942rm -f core conftest.err conftest.$ac_objext \
8943 conftest$ac_exeext
d0ac1c44 8944 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
8945 break
8946fi
8947done
d0ac1c44 8948if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 8949
6c7a06a3 8950else
81ecdfbb 8951 ac_cv_search_tgetent=no
6c7a06a3 8952fi
81ecdfbb 8953rm conftest.$ac_ext
6c7a06a3
TT
8954LIBS=$ac_func_search_save_LIBS
8955fi
81ecdfbb
RW
8956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8957$as_echo "$ac_cv_search_tgetent" >&6; }
8958ac_res=$ac_cv_search_tgetent
8959if test "$ac_res" != no; then :
8960 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8961
06825bd1
MK
8962fi
8963
06825bd1 8964
bec39cab 8965if test "$ac_cv_search_tgetent" = no; then
7a85168d 8966 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8967fi
8968
3841debe 8969
81ecdfbb
RW
8970# Check whether --with-system-readline was given.
8971if test "${with_system_readline+set}" = set; then :
8972 withval=$with_system_readline;
8973fi
6a30b0a5 8974
6a30b0a5
AS
8975
8976if test "$with_system_readline" = yes; then
86c6b807
TT
8977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
8978$as_echo_n "checking whether system readline is new enough... " >&6; }
8979if ${gdb_cv_readline_ok+:} false; then :
8980 $as_echo_n "(cached) " >&6
8981else
8982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8983/* end confdefs.h. */
8984#include <stdio.h>
8985#include <readline/readline.h>
8986int
8987main ()
8988{
8989#if RL_VERSION_MAJOR < 7
8990# error "readline version 7 required"
8991#endif
8992 ;
8993 return 0;
8994}
8995_ACEOF
8996if ac_fn_c_try_compile "$LINENO"; then :
8997 gdb_cv_readline_ok=yes
8998else
8999 gdb_cv_readline_ok=no
9000fi
9001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9002fi
9003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9004$as_echo "$gdb_cv_readline_ok" >&6; }
9005 if test "$gdb_cv_readline_ok" != yes; then
9006 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9007 fi
9008
6a30b0a5
AS
9009 READLINE=-lreadline
9010 READLINE_DEPS=
9011 READLINE_CFLAGS=
39037522 9012 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9013else
9014 READLINE='$(READLINE_DIR)/libreadline.a'
9015 READLINE_DEPS='$(READLINE)'
9016 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9017 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9018fi
9019
9020
9021
9022
9023
f997c383
SD
9024# Generate jit-reader.h
9025
9026# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9027TARGET_PTR=
9028
9029# The cast to long int works around a bug in the HP C Compiler
9030# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9031# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9032# This bug is HP SR number 8606223364.
9033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9034$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9035if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9036 $as_echo_n "(cached) " >&6
9037else
9038 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9039
9040else
9041 if test "$ac_cv_type_unsigned_long_long" = yes; then
9042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9044as_fn_error 77 "cannot compute sizeof (unsigned long long)
9045See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9046 else
9047 ac_cv_sizeof_unsigned_long_long=0
9048 fi
9049fi
9050
9051fi
9052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9053$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9054
9055
9056
9057cat >>confdefs.h <<_ACEOF
9058#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9059_ACEOF
9060
9061
9062# The cast to long int works around a bug in the HP C Compiler
9063# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9064# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9065# This bug is HP SR number 8606223364.
9066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9067$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9068if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9069 $as_echo_n "(cached) " >&6
9070else
9071 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9072
9073else
9074 if test "$ac_cv_type_unsigned_long" = yes; then
9075 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9077as_fn_error 77 "cannot compute sizeof (unsigned long)
9078See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9079 else
9080 ac_cv_sizeof_unsigned_long=0
9081 fi
9082fi
9083
9084fi
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9086$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9087
9088
9089
9090cat >>confdefs.h <<_ACEOF
9091#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9092_ACEOF
9093
9094
9095# The cast to long int works around a bug in the HP C Compiler
9096# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9097# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9098# This bug is HP SR number 8606223364.
9099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9100$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9101if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9102 $as_echo_n "(cached) " >&6
9103else
9104 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9105
9106else
9107 if test "$ac_cv_type_unsigned___int128" = yes; then
9108 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9109$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9110as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9111See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9112 else
9113 ac_cv_sizeof_unsigned___int128=0
9114 fi
9115fi
9116
9117fi
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9119$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9120
9121
9122
9123cat >>confdefs.h <<_ACEOF
9124#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9125_ACEOF
9126
9127
9128
9129if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9130 TARGET_PTR="unsigned long"
9131elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9132 TARGET_PTR="unsigned long long"
9133elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9134 TARGET_PTR="unsigned __int128"
9135else
9136 TARGET_PTR="unsigned long"
9137fi
9138
9139
9140ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9141
9142
a2d08b9e
SD
9143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9144$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9145if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9146 $as_echo_n "(cached) " >&6
9147else
9148 ac_func_search_save_LIBS=$LIBS
9149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9150/* end confdefs.h. */
9151
9152/* Override any GCC internal prototype to avoid an error.
9153 Use char because int might match the return type of a GCC
9154 builtin and then its argument prototype would still apply. */
9155#ifdef __cplusplus
9156extern "C"
9157#endif
9158char dlopen ();
9159int
9160main ()
9161{
9162return dlopen ();
9163 ;
9164 return 0;
9165}
9166_ACEOF
9167for ac_lib in '' dl; do
9168 if test -z "$ac_lib"; then
9169 ac_res="none required"
9170 else
9171 ac_res=-l$ac_lib
9172 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9173 fi
9174 if ac_fn_c_try_link "$LINENO"; then :
9175 ac_cv_search_dlopen=$ac_res
9176fi
9177rm -f core conftest.err conftest.$ac_objext \
9178 conftest$ac_exeext
d0ac1c44 9179 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9180 break
9181fi
9182done
d0ac1c44 9183if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9184
9185else
9186 ac_cv_search_dlopen=no
9187fi
9188rm conftest.$ac_ext
9189LIBS=$ac_func_search_save_LIBS
9190fi
9191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9192$as_echo "$ac_cv_search_dlopen" >&6; }
9193ac_res=$ac_cv_search_dlopen
9194if test "$ac_res" != no; then :
9195 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9196
9197fi
9198
9199
39037522 9200
b8e0a31c
SD
9201
9202# Check whether --with-jit-reader-dir was given.
9203if test "${with_jit_reader_dir+set}" = set; then :
9204 withval=$with_jit_reader_dir;
9205 JIT_READER_DIR=$withval
9206else
9207 JIT_READER_DIR=${libdir}/gdb
9208fi
9209
9210
9211 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9212 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9213 ac_define_dir=`eval echo $JIT_READER_DIR`
9214 ac_define_dir=`eval echo $ac_define_dir`
9215
9216cat >>confdefs.h <<_ACEOF
9217#define JIT_READER_DIR "$ac_define_dir"
9218_ACEOF
9219
9220
9221
9222
9223 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9224 if test "x$prefix" = xNONE; then
9225 test_prefix=/usr/local
9226 else
9227 test_prefix=$prefix
9228 fi
9229 else
9230 test_prefix=$exec_prefix
9231 fi
9232 value=0
9233 case ${ac_define_dir} in
9234 "${test_prefix}"|"${test_prefix}/"*|\
9235 '${exec_prefix}'|'${exec_prefix}/'*)
9236 value=1
9237 ;;
9238 esac
9239
9240cat >>confdefs.h <<_ACEOF
9241#define JIT_READER_DIR_RELOCATABLE $value
9242_ACEOF
9243
9244
9245
9246
9247
81ecdfbb
RW
9248# Check whether --with-expat was given.
9249if test "${with_expat+set}" = set; then :
9250 withval=$with_expat;
5c39566f
DJ
9251else
9252 with_expat=auto
81ecdfbb
RW
9253fi
9254
9255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9256$as_echo_n "checking whether to use expat... " >&6; }
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9258$as_echo "$with_expat" >&6; }
5c39566f
DJ
9259
9260if test "${with_expat}" = no; then
81ecdfbb
RW
9261 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9262$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9263 HAVE_LIBEXPAT=no
9264else
9265
3841debe
DJ
9266
9267
9268
9269
9270
9271
9272
9273 use_additional=yes
9274
9275 acl_save_prefix="$prefix"
9276 prefix="$acl_final_prefix"
9277 acl_save_exec_prefix="$exec_prefix"
9278 exec_prefix="$acl_final_exec_prefix"
9279
9280 eval additional_includedir=\"$includedir\"
9281 eval additional_libdir=\"$libdir\"
9282
9283 exec_prefix="$acl_save_exec_prefix"
9284 prefix="$acl_save_prefix"
9285
9286
81ecdfbb
RW
9287# Check whether --with-libexpat-prefix was given.
9288if test "${with_libexpat_prefix+set}" = set; then :
9289 withval=$with_libexpat_prefix;
3841debe
DJ
9290 if test "X$withval" = "Xno"; then
9291 use_additional=no
9292 else
9293 if test "X$withval" = "X"; then
9294
9295 acl_save_prefix="$prefix"
9296 prefix="$acl_final_prefix"
9297 acl_save_exec_prefix="$exec_prefix"
9298 exec_prefix="$acl_final_exec_prefix"
9299
9300 eval additional_includedir=\"$includedir\"
9301 eval additional_libdir=\"$libdir\"
9302
9303 exec_prefix="$acl_save_exec_prefix"
9304 prefix="$acl_save_prefix"
9305
9306 else
9307 additional_includedir="$withval/include"
9308 additional_libdir="$withval/lib"
9309 fi
9310 fi
9311
81ecdfbb
RW
9312fi
9313
3841debe
DJ
9314 LIBEXPAT=
9315 LTLIBEXPAT=
9316 INCEXPAT=
9317 rpathdirs=
9318 ltrpathdirs=
9319 names_already_handled=
9320 names_next_round='expat '
9321 while test -n "$names_next_round"; do
9322 names_this_round="$names_next_round"
9323 names_next_round=
9324 for name in $names_this_round; do
9325 already_handled=
9326 for n in $names_already_handled; do
9327 if test "$n" = "$name"; then
9328 already_handled=yes
9329 break
9330 fi
9331 done
9332 if test -z "$already_handled"; then
9333 names_already_handled="$names_already_handled $name"
9334 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9335 eval value=\"\$HAVE_LIB$uppername\"
9336 if test -n "$value"; then
9337 if test "$value" = yes; then
9338 eval value=\"\$LIB$uppername\"
9339 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9340 eval value=\"\$LTLIB$uppername\"
9341 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9342 else
9343 :
9344 fi
9345 else
9346 found_dir=
9347 found_la=
9348 found_so=
9349 found_a=
9350 if test $use_additional = yes; then
9351 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9352 found_dir="$additional_libdir"
9353 found_so="$additional_libdir/lib$name.$shlibext"
9354 if test -f "$additional_libdir/lib$name.la"; then
9355 found_la="$additional_libdir/lib$name.la"
9356 fi
9357 else
9358 if test -f "$additional_libdir/lib$name.$libext"; then
9359 found_dir="$additional_libdir"
9360 found_a="$additional_libdir/lib$name.$libext"
9361 if test -f "$additional_libdir/lib$name.la"; then
9362 found_la="$additional_libdir/lib$name.la"
9363 fi
9364 fi
9365 fi
9366 fi
9367 if test "X$found_dir" = "X"; then
9368 for x in $LDFLAGS $LTLIBEXPAT; do
9369
9370 acl_save_prefix="$prefix"
9371 prefix="$acl_final_prefix"
9372 acl_save_exec_prefix="$exec_prefix"
9373 exec_prefix="$acl_final_exec_prefix"
9374 eval x=\"$x\"
9375 exec_prefix="$acl_save_exec_prefix"
9376 prefix="$acl_save_prefix"
9377
9378 case "$x" in
9379 -L*)
9380 dir=`echo "X$x" | sed -e 's/^X-L//'`
9381 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9382 found_dir="$dir"
9383 found_so="$dir/lib$name.$shlibext"
9384 if test -f "$dir/lib$name.la"; then
9385 found_la="$dir/lib$name.la"
9386 fi
9387 else
9388 if test -f "$dir/lib$name.$libext"; then
9389 found_dir="$dir"
9390 found_a="$dir/lib$name.$libext"
9391 if test -f "$dir/lib$name.la"; then
9392 found_la="$dir/lib$name.la"
9393 fi
9394 fi
9395 fi
9396 ;;
9397 esac
9398 if test "X$found_dir" != "X"; then
9399 break
9400 fi
9401 done
9402 fi
9403 if test "X$found_dir" != "X"; then
9404 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9405 if test "X$found_so" != "X"; then
9406 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9407 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9408 else
9409 haveit=
9410 for x in $ltrpathdirs; do
9411 if test "X$x" = "X$found_dir"; then
9412 haveit=yes
9413 break
9414 fi
9415 done
9416 if test -z "$haveit"; then
9417 ltrpathdirs="$ltrpathdirs $found_dir"
9418 fi
9419 if test "$hardcode_direct" = yes; then
9420 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9421 else
9422 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9423 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9424 haveit=
9425 for x in $rpathdirs; do
9426 if test "X$x" = "X$found_dir"; then
9427 haveit=yes
9428 break
9429 fi
9430 done
9431 if test -z "$haveit"; then
9432 rpathdirs="$rpathdirs $found_dir"
9433 fi
9434 else
9435 haveit=
9436 for x in $LDFLAGS $LIBEXPAT; do
9437
9438 acl_save_prefix="$prefix"
9439 prefix="$acl_final_prefix"
9440 acl_save_exec_prefix="$exec_prefix"
9441 exec_prefix="$acl_final_exec_prefix"
9442 eval x=\"$x\"
9443 exec_prefix="$acl_save_exec_prefix"
9444 prefix="$acl_save_prefix"
9445
9446 if test "X$x" = "X-L$found_dir"; then
9447 haveit=yes
9448 break
9449 fi
9450 done
9451 if test -z "$haveit"; then
9452 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9453 fi
9454 if test "$hardcode_minus_L" != no; then
9455 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9456 else
9457 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9458 fi
9459 fi
9460 fi
9461 fi
9462 else
9463 if test "X$found_a" != "X"; then
9464 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9465 else
9466 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9467 fi
9468 fi
9469 additional_includedir=
9470 case "$found_dir" in
9471 */lib | */lib/)
9472 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9473 additional_includedir="$basedir/include"
9474 ;;
9475 esac
9476 if test "X$additional_includedir" != "X"; then
9477 if test "X$additional_includedir" != "X/usr/include"; then
9478 haveit=
9479 if test "X$additional_includedir" = "X/usr/local/include"; then
9480 if test -n "$GCC"; then
9481 case $host_os in
9482 linux*) haveit=yes;;
9483 esac
9484 fi
9485 fi
9486 if test -z "$haveit"; then
9487 for x in $CPPFLAGS $INCEXPAT; do
9488
9489 acl_save_prefix="$prefix"
9490 prefix="$acl_final_prefix"
9491 acl_save_exec_prefix="$exec_prefix"
9492 exec_prefix="$acl_final_exec_prefix"
9493 eval x=\"$x\"
9494 exec_prefix="$acl_save_exec_prefix"
9495 prefix="$acl_save_prefix"
9496
9497 if test "X$x" = "X-I$additional_includedir"; then
9498 haveit=yes
9499 break
9500 fi
9501 done
9502 if test -z "$haveit"; then
9503 if test -d "$additional_includedir"; then
9504 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9505 fi
9506 fi
9507 fi
9508 fi
9509 fi
9510 if test -n "$found_la"; then
9511 save_libdir="$libdir"
9512 case "$found_la" in
9513 */* | *\\*) . "$found_la" ;;
9514 *) . "./$found_la" ;;
9515 esac
9516 libdir="$save_libdir"
9517 for dep in $dependency_libs; do
9518 case "$dep" in
9519 -L*)
9520 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9521 if test "X$additional_libdir" != "X/usr/lib"; then
9522 haveit=
9523 if test "X$additional_libdir" = "X/usr/local/lib"; then
9524 if test -n "$GCC"; then
9525 case $host_os in
9526 linux*) haveit=yes;;
9527 esac
9528 fi
9529 fi
9530 if test -z "$haveit"; then
9531 haveit=
9532 for x in $LDFLAGS $LIBEXPAT; do
9533
9534 acl_save_prefix="$prefix"
9535 prefix="$acl_final_prefix"
9536 acl_save_exec_prefix="$exec_prefix"
9537 exec_prefix="$acl_final_exec_prefix"
9538 eval x=\"$x\"
9539 exec_prefix="$acl_save_exec_prefix"
9540 prefix="$acl_save_prefix"
9541
9542 if test "X$x" = "X-L$additional_libdir"; then
9543 haveit=yes
9544 break
9545 fi
9546 done
9547 if test -z "$haveit"; then
9548 if test -d "$additional_libdir"; then
9549 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9550 fi
9551 fi
9552 haveit=
9553 for x in $LDFLAGS $LTLIBEXPAT; do
9554
9555 acl_save_prefix="$prefix"
9556 prefix="$acl_final_prefix"
9557 acl_save_exec_prefix="$exec_prefix"
9558 exec_prefix="$acl_final_exec_prefix"
9559 eval x=\"$x\"
9560 exec_prefix="$acl_save_exec_prefix"
9561 prefix="$acl_save_prefix"
9562
9563 if test "X$x" = "X-L$additional_libdir"; then
9564 haveit=yes
9565 break
9566 fi
9567 done
9568 if test -z "$haveit"; then
9569 if test -d "$additional_libdir"; then
9570 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9571 fi
9572 fi
9573 fi
9574 fi
9575 ;;
9576 -R*)
9577 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9578 if test "$enable_rpath" != no; then
9579 haveit=
9580 for x in $rpathdirs; do
9581 if test "X$x" = "X$dir"; then
9582 haveit=yes
9583 break
9584 fi
9585 done
9586 if test -z "$haveit"; then
9587 rpathdirs="$rpathdirs $dir"
9588 fi
9589 haveit=
9590 for x in $ltrpathdirs; do
9591 if test "X$x" = "X$dir"; then
9592 haveit=yes
9593 break
9594 fi
9595 done
9596 if test -z "$haveit"; then
9597 ltrpathdirs="$ltrpathdirs $dir"
9598 fi
9599 fi
9600 ;;
9601 -l*)
9602 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9603 ;;
9604 *.la)
9605 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9606 ;;
9607 *)
9608 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9609 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9610 ;;
81ecdfbb
RW
9611 esac
9612 done
9613 fi
9614 else
9615 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9616 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9617 fi
9618 fi
9619 fi
9620 done
9621 done
9622 if test "X$rpathdirs" != "X"; then
9623 if test -n "$hardcode_libdir_separator"; then
9624 alldirs=
9625 for found_dir in $rpathdirs; do
9626 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9627 done
9628 acl_save_libdir="$libdir"
9629 libdir="$alldirs"
9630 eval flag=\"$hardcode_libdir_flag_spec\"
9631 libdir="$acl_save_libdir"
9632 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9633 else
9634 for found_dir in $rpathdirs; do
9635 acl_save_libdir="$libdir"
9636 libdir="$found_dir"
9637 eval flag=\"$hardcode_libdir_flag_spec\"
9638 libdir="$acl_save_libdir"
9639 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9640 done
9641 fi
9642 fi
9643 if test "X$ltrpathdirs" != "X"; then
9644 for found_dir in $ltrpathdirs; do
9645 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9646 done
9647 fi
a9322a30
TT
9648
9649
81ecdfbb 9650 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9651
81ecdfbb
RW
9652 for element in $INCEXPAT; do
9653 haveit=
9654 for x in $CPPFLAGS; do
a9322a30 9655
81ecdfbb
RW
9656 acl_save_prefix="$prefix"
9657 prefix="$acl_final_prefix"
9658 acl_save_exec_prefix="$exec_prefix"
9659 exec_prefix="$acl_final_exec_prefix"
9660 eval x=\"$x\"
9661 exec_prefix="$acl_save_exec_prefix"
9662 prefix="$acl_save_prefix"
a8111142 9663
81ecdfbb
RW
9664 if test "X$x" = "X$element"; then
9665 haveit=yes
9666 break
9667 fi
9668 done
9669 if test -z "$haveit"; then
9670 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9671 fi
9672 done
a9322a30
TT
9673
9674
81ecdfbb
RW
9675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9676$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9677if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9678 $as_echo_n "(cached) " >&6
bec39cab 9679else
bec39cab 9680
81ecdfbb
RW
9681 ac_save_LIBS="$LIBS"
9682 LIBS="$LIBS $LIBEXPAT"
9683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9684/* end confdefs.h. */
81ecdfbb
RW
9685#include "expat.h"
9686int
9687main ()
9688{
9689XML_Parser p = XML_ParserCreate (0);
9690 ;
9691 return 0;
9692}
bec39cab 9693_ACEOF
81ecdfbb
RW
9694if ac_fn_c_try_link "$LINENO"; then :
9695 ac_cv_libexpat=yes
c906108c 9696else
81ecdfbb 9697 ac_cv_libexpat=no
bec39cab 9698fi
81ecdfbb
RW
9699rm -f core conftest.err conftest.$ac_objext \
9700 conftest$ac_exeext conftest.$ac_ext
9701 LIBS="$ac_save_LIBS"
c906108c 9702
95ca63c4 9703fi
81ecdfbb
RW
9704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9705$as_echo "$ac_cv_libexpat" >&6; }
9706 if test "$ac_cv_libexpat" = yes; then
9707 HAVE_LIBEXPAT=yes
bec39cab 9708
81ecdfbb 9709$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9710
81ecdfbb
RW
9711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9712$as_echo_n "checking how to link with libexpat... " >&6; }
9713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9714$as_echo "$LIBEXPAT" >&6; }
9715 else
9716 HAVE_LIBEXPAT=no
9717 CPPFLAGS="$ac_save_CPPFLAGS"
9718 LIBEXPAT=
9719 LTLIBEXPAT=
9720 fi
95ca63c4
CF
9721
9722
9723
7cb9022a
MK
9724
9725
bec39cab 9726
81ecdfbb
RW
9727 if test "$HAVE_LIBEXPAT" != yes; then
9728 if test "$with_expat" = yes; then
d0ac1c44 9729 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9730 else
9731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9732$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9733 fi
9734 else
9735 save_LIBS=$LIBS
9736 LIBS="$LIBS $LIBEXPAT"
9737 for ac_func in XML_StopParser
9738do :
9739 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9740if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9741 cat >>confdefs.h <<_ACEOF
81ecdfbb 9742#define HAVE_XML_STOPPARSER 1
bec39cab 9743_ACEOF
95ca63c4 9744
bec39cab 9745fi
bec39cab 9746done
95ca63c4 9747
81ecdfbb
RW
9748 LIBS=$save_LIBS
9749 fi
a9322a30
TT
9750fi
9751
2400729e
UW
9752
9753# Check whether --with-mpfr was given.
9754if test "${with_mpfr+set}" = set; then :
9755 withval=$with_mpfr;
9756else
9757 with_mpfr=auto
9758fi
9759
9760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9761$as_echo_n "checking whether to use MPFR... " >&6; }
9762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9763$as_echo "$with_mpfr" >&6; }
9764
9765if test "${with_mpfr}" = no; then
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9767$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9768 HAVE_LIBMPFR=no
9769else
9770
9771
9772
9773
9774
9775
9776
9777
9778 use_additional=yes
9779
9780 acl_save_prefix="$prefix"
9781 prefix="$acl_final_prefix"
9782 acl_save_exec_prefix="$exec_prefix"
9783 exec_prefix="$acl_final_exec_prefix"
9784
9785 eval additional_includedir=\"$includedir\"
9786 eval additional_libdir=\"$libdir\"
9787
9788 exec_prefix="$acl_save_exec_prefix"
9789 prefix="$acl_save_prefix"
9790
9791
9792# Check whether --with-libmpfr-prefix was given.
9793if test "${with_libmpfr_prefix+set}" = set; then :
9794 withval=$with_libmpfr_prefix;
9795 if test "X$withval" = "Xno"; then
9796 use_additional=no
9797 else
9798 if test "X$withval" = "X"; then
9799
9800 acl_save_prefix="$prefix"
9801 prefix="$acl_final_prefix"
9802 acl_save_exec_prefix="$exec_prefix"
9803 exec_prefix="$acl_final_exec_prefix"
9804
9805 eval additional_includedir=\"$includedir\"
9806 eval additional_libdir=\"$libdir\"
9807
9808 exec_prefix="$acl_save_exec_prefix"
9809 prefix="$acl_save_prefix"
9810
9811 else
9812 additional_includedir="$withval/include"
9813 additional_libdir="$withval/lib"
9814 fi
9815 fi
9816
9817fi
9818
9819 LIBMPFR=
9820 LTLIBMPFR=
9821 INCMPFR=
9822 rpathdirs=
9823 ltrpathdirs=
9824 names_already_handled=
da658607 9825 names_next_round='mpfr gmp'
2400729e
UW
9826 while test -n "$names_next_round"; do
9827 names_this_round="$names_next_round"
9828 names_next_round=
9829 for name in $names_this_round; do
9830 already_handled=
9831 for n in $names_already_handled; do
9832 if test "$n" = "$name"; then
9833 already_handled=yes
9834 break
9835 fi
9836 done
9837 if test -z "$already_handled"; then
9838 names_already_handled="$names_already_handled $name"
9839 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9840 eval value=\"\$HAVE_LIB$uppername\"
9841 if test -n "$value"; then
9842 if test "$value" = yes; then
9843 eval value=\"\$LIB$uppername\"
9844 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9845 eval value=\"\$LTLIB$uppername\"
9846 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9847 else
9848 :
9849 fi
9850 else
9851 found_dir=
9852 found_la=
9853 found_so=
9854 found_a=
9855 if test $use_additional = yes; then
9856 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9857 found_dir="$additional_libdir"
9858 found_so="$additional_libdir/lib$name.$shlibext"
9859 if test -f "$additional_libdir/lib$name.la"; then
9860 found_la="$additional_libdir/lib$name.la"
9861 fi
9862 else
9863 if test -f "$additional_libdir/lib$name.$libext"; then
9864 found_dir="$additional_libdir"
9865 found_a="$additional_libdir/lib$name.$libext"
9866 if test -f "$additional_libdir/lib$name.la"; then
9867 found_la="$additional_libdir/lib$name.la"
9868 fi
9869 fi
9870 fi
9871 fi
9872 if test "X$found_dir" = "X"; then
9873 for x in $LDFLAGS $LTLIBMPFR; do
9874
9875 acl_save_prefix="$prefix"
9876 prefix="$acl_final_prefix"
9877 acl_save_exec_prefix="$exec_prefix"
9878 exec_prefix="$acl_final_exec_prefix"
9879 eval x=\"$x\"
9880 exec_prefix="$acl_save_exec_prefix"
9881 prefix="$acl_save_prefix"
9882
9883 case "$x" in
9884 -L*)
9885 dir=`echo "X$x" | sed -e 's/^X-L//'`
9886 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9887 found_dir="$dir"
9888 found_so="$dir/lib$name.$shlibext"
9889 if test -f "$dir/lib$name.la"; then
9890 found_la="$dir/lib$name.la"
9891 fi
9892 else
9893 if test -f "$dir/lib$name.$libext"; then
9894 found_dir="$dir"
9895 found_a="$dir/lib$name.$libext"
9896 if test -f "$dir/lib$name.la"; then
9897 found_la="$dir/lib$name.la"
9898 fi
9899 fi
9900 fi
9901 ;;
9902 esac
9903 if test "X$found_dir" != "X"; then
9904 break
9905 fi
9906 done
9907 fi
9908 if test "X$found_dir" != "X"; then
9909 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9910 if test "X$found_so" != "X"; then
9911 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9912 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9913 else
9914 haveit=
9915 for x in $ltrpathdirs; do
9916 if test "X$x" = "X$found_dir"; then
9917 haveit=yes
9918 break
9919 fi
9920 done
9921 if test -z "$haveit"; then
9922 ltrpathdirs="$ltrpathdirs $found_dir"
9923 fi
9924 if test "$hardcode_direct" = yes; then
9925 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9926 else
9927 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9928 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9929 haveit=
9930 for x in $rpathdirs; do
9931 if test "X$x" = "X$found_dir"; then
9932 haveit=yes
9933 break
9934 fi
9935 done
9936 if test -z "$haveit"; then
9937 rpathdirs="$rpathdirs $found_dir"
9938 fi
9939 else
9940 haveit=
9941 for x in $LDFLAGS $LIBMPFR; do
9942
9943 acl_save_prefix="$prefix"
9944 prefix="$acl_final_prefix"
9945 acl_save_exec_prefix="$exec_prefix"
9946 exec_prefix="$acl_final_exec_prefix"
9947 eval x=\"$x\"
9948 exec_prefix="$acl_save_exec_prefix"
9949 prefix="$acl_save_prefix"
9950
9951 if test "X$x" = "X-L$found_dir"; then
9952 haveit=yes
9953 break
9954 fi
9955 done
9956 if test -z "$haveit"; then
9957 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9958 fi
9959 if test "$hardcode_minus_L" != no; then
9960 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9961 else
9962 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9963 fi
9964 fi
9965 fi
9966 fi
9967 else
9968 if test "X$found_a" != "X"; then
9969 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
9970 else
9971 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
9972 fi
9973 fi
9974 additional_includedir=
9975 case "$found_dir" in
9976 */lib | */lib/)
9977 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9978 additional_includedir="$basedir/include"
9979 ;;
9980 esac
9981 if test "X$additional_includedir" != "X"; then
9982 if test "X$additional_includedir" != "X/usr/include"; then
9983 haveit=
9984 if test "X$additional_includedir" = "X/usr/local/include"; then
9985 if test -n "$GCC"; then
9986 case $host_os in
9987 linux*) haveit=yes;;
9988 esac
9989 fi
9990 fi
9991 if test -z "$haveit"; then
9992 for x in $CPPFLAGS $INCMPFR; do
9993
9994 acl_save_prefix="$prefix"
9995 prefix="$acl_final_prefix"
9996 acl_save_exec_prefix="$exec_prefix"
9997 exec_prefix="$acl_final_exec_prefix"
9998 eval x=\"$x\"
9999 exec_prefix="$acl_save_exec_prefix"
10000 prefix="$acl_save_prefix"
10001
10002 if test "X$x" = "X-I$additional_includedir"; then
10003 haveit=yes
10004 break
10005 fi
10006 done
10007 if test -z "$haveit"; then
10008 if test -d "$additional_includedir"; then
10009 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10010 fi
10011 fi
10012 fi
10013 fi
10014 fi
10015 if test -n "$found_la"; then
10016 save_libdir="$libdir"
10017 case "$found_la" in
10018 */* | *\\*) . "$found_la" ;;
10019 *) . "./$found_la" ;;
10020 esac
10021 libdir="$save_libdir"
10022 for dep in $dependency_libs; do
10023 case "$dep" in
10024 -L*)
10025 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10026 if test "X$additional_libdir" != "X/usr/lib"; then
10027 haveit=
10028 if test "X$additional_libdir" = "X/usr/local/lib"; then
10029 if test -n "$GCC"; then
10030 case $host_os in
10031 linux*) haveit=yes;;
10032 esac
10033 fi
10034 fi
10035 if test -z "$haveit"; then
10036 haveit=
10037 for x in $LDFLAGS $LIBMPFR; do
10038
10039 acl_save_prefix="$prefix"
10040 prefix="$acl_final_prefix"
10041 acl_save_exec_prefix="$exec_prefix"
10042 exec_prefix="$acl_final_exec_prefix"
10043 eval x=\"$x\"
10044 exec_prefix="$acl_save_exec_prefix"
10045 prefix="$acl_save_prefix"
10046
10047 if test "X$x" = "X-L$additional_libdir"; then
10048 haveit=yes
10049 break
10050 fi
10051 done
10052 if test -z "$haveit"; then
10053 if test -d "$additional_libdir"; then
10054 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10055 fi
10056 fi
10057 haveit=
10058 for x in $LDFLAGS $LTLIBMPFR; do
10059
10060 acl_save_prefix="$prefix"
10061 prefix="$acl_final_prefix"
10062 acl_save_exec_prefix="$exec_prefix"
10063 exec_prefix="$acl_final_exec_prefix"
10064 eval x=\"$x\"
10065 exec_prefix="$acl_save_exec_prefix"
10066 prefix="$acl_save_prefix"
10067
10068 if test "X$x" = "X-L$additional_libdir"; then
10069 haveit=yes
10070 break
10071 fi
10072 done
10073 if test -z "$haveit"; then
10074 if test -d "$additional_libdir"; then
10075 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10076 fi
10077 fi
10078 fi
10079 fi
10080 ;;
10081 -R*)
10082 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10083 if test "$enable_rpath" != no; then
10084 haveit=
10085 for x in $rpathdirs; do
10086 if test "X$x" = "X$dir"; then
10087 haveit=yes
10088 break
10089 fi
10090 done
10091 if test -z "$haveit"; then
10092 rpathdirs="$rpathdirs $dir"
10093 fi
10094 haveit=
10095 for x in $ltrpathdirs; do
10096 if test "X$x" = "X$dir"; then
10097 haveit=yes
10098 break
10099 fi
10100 done
10101 if test -z "$haveit"; then
10102 ltrpathdirs="$ltrpathdirs $dir"
10103 fi
10104 fi
10105 ;;
10106 -l*)
10107 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10108 ;;
10109 *.la)
10110 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10111 ;;
10112 *)
10113 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10114 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10115 ;;
10116 esac
10117 done
10118 fi
10119 else
10120 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10121 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10122 fi
10123 fi
10124 fi
10125 done
10126 done
10127 if test "X$rpathdirs" != "X"; then
10128 if test -n "$hardcode_libdir_separator"; then
10129 alldirs=
10130 for found_dir in $rpathdirs; do
10131 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10132 done
10133 acl_save_libdir="$libdir"
10134 libdir="$alldirs"
10135 eval flag=\"$hardcode_libdir_flag_spec\"
10136 libdir="$acl_save_libdir"
10137 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10138 else
10139 for found_dir in $rpathdirs; do
10140 acl_save_libdir="$libdir"
10141 libdir="$found_dir"
10142 eval flag=\"$hardcode_libdir_flag_spec\"
10143 libdir="$acl_save_libdir"
10144 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10145 done
10146 fi
10147 fi
10148 if test "X$ltrpathdirs" != "X"; then
10149 for found_dir in $ltrpathdirs; do
10150 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10151 done
10152 fi
10153
10154
10155 ac_save_CPPFLAGS="$CPPFLAGS"
10156
10157 for element in $INCMPFR; do
10158 haveit=
10159 for x in $CPPFLAGS; do
10160
10161 acl_save_prefix="$prefix"
10162 prefix="$acl_final_prefix"
10163 acl_save_exec_prefix="$exec_prefix"
10164 exec_prefix="$acl_final_exec_prefix"
10165 eval x=\"$x\"
10166 exec_prefix="$acl_save_exec_prefix"
10167 prefix="$acl_save_prefix"
10168
10169 if test "X$x" = "X$element"; then
10170 haveit=yes
10171 break
10172 fi
10173 done
10174 if test -z "$haveit"; then
10175 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10176 fi
10177 done
10178
10179
10180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10181$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10182if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10183 $as_echo_n "(cached) " >&6
10184else
10185
10186 ac_save_LIBS="$LIBS"
10187 LIBS="$LIBS $LIBMPFR"
10188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10189/* end confdefs.h. */
10190#include <mpfr.h>
10191int
10192main ()
10193{
10194mpfr_exp_t exp; mpfr_t x;
10195 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10196 ;
10197 return 0;
10198}
10199_ACEOF
10200if ac_fn_c_try_link "$LINENO"; then :
10201 ac_cv_libmpfr=yes
10202else
10203 ac_cv_libmpfr=no
10204fi
10205rm -f core conftest.err conftest.$ac_objext \
10206 conftest$ac_exeext conftest.$ac_ext
10207 LIBS="$ac_save_LIBS"
10208
10209fi
10210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10211$as_echo "$ac_cv_libmpfr" >&6; }
10212 if test "$ac_cv_libmpfr" = yes; then
10213 HAVE_LIBMPFR=yes
10214
10215$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10216
10217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10218$as_echo_n "checking how to link with libmpfr... " >&6; }
10219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10220$as_echo "$LIBMPFR" >&6; }
10221 else
10222 HAVE_LIBMPFR=no
10223 CPPFLAGS="$ac_save_CPPFLAGS"
10224 LIBMPFR=
10225 LTLIBMPFR=
10226 fi
10227
10228
10229
10230
10231
10232
10233 if test "$HAVE_LIBMPFR" != yes; then
10234 if test "$with_mpfr" = yes; then
d0ac1c44 10235 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10236 else
10237 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10238$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10239 fi
10240 fi
10241fi
10242
d344e670
DE
10243# --------------------- #
10244# Check for libpython. #
10245# --------------------- #
10246
a9322a30 10247
a9322a30
TT
10248
10249
ec685c5e 10250
0c4a4063 10251
81ecdfbb
RW
10252# Check whether --with-python was given.
10253if test "${with_python+set}" = set; then :
10254 withval=$with_python;
bec39cab 10255else
81ecdfbb 10256 with_python=auto
bec39cab 10257fi
bec39cab 10258
81ecdfbb
RW
10259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10260$as_echo_n "checking whether to use python... " >&6; }
10261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10262$as_echo "$with_python" >&6; }
9a156167 10263
81ecdfbb
RW
10264if test "${with_python}" = no; then
10265 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10266$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10267 have_libpython=no
bec39cab 10268else
81ecdfbb 10269 case "${with_python}" in
8c85a4e2 10270 [\\/]* | ?:[\\/]*)
0ad6b8ee 10271 if test -d "${with_python}"; then
ec685c5e 10272 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10273 python_prog="${with_python}/bin/python"
0c4a4063 10274 python_prefix=
9c4ea6c5
JB
10275 # If python does not exit ${with_python}/bin, then try in
10276 # ${with_python}. On Windows/MinGW, this is where the Python
10277 # executable is.
10278 if test ! -x "${python_prog}"; then
10279 python_prog="${with_python}/python"
10280 python_prefix=
10281 fi
e7a30f46 10282 if test ! -x "${python_prog}"; then
ec685c5e
DE
10283 # Fall back to gdb 7.0/7.1 behaviour.
10284 python_prog=missing
0c4a4063 10285 python_prefix=${with_python}
ec685c5e 10286 fi
e7a30f46 10287 elif test -x "${with_python}"; then
ec685c5e
DE
10288 # While we can't run python compiled for $host (unless host == build),
10289 # the user could write a script that provides the needed information,
10290 # so we support that.
ec685c5e 10291 python_prog=${with_python}
0c4a4063 10292 python_prefix=
ec685c5e 10293 else
d0ac1c44 10294 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10295 fi
81ecdfbb 10296 ;;
ec685c5e
DE
10297 */*)
10298 # Disallow --with-python=foo/bar.
d0ac1c44 10299 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10300 ;;
ec685c5e
DE
10301 *)
10302 # The user has either specified auto, yes, or the name of the python
10303 # program assumed to be in $PATH.
10304 python_prefix=
10305 case "${with_python}" in
10306 yes | auto)
0ad6b8ee 10307 if test "${build}" = "${host}"; then
ec685c5e
DE
10308 # Extract the first word of "python", so it can be a program name with args.
10309set dummy python; ac_word=$2
10310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10311$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10312if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10313 $as_echo_n "(cached) " >&6
10314else
10315 case $python_prog_path in
10316 [\\/]* | ?:[\\/]*)
10317 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10318 ;;
10319 *)
10320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10321for as_dir in $PATH
10322do
10323 IFS=$as_save_IFS
10324 test -z "$as_dir" && as_dir=.
10325 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10326 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10327 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10328 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10329 break 2
10330 fi
10331done
10332 done
10333IFS=$as_save_IFS
10334
10335 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10336 ;;
10337esac
10338fi
10339python_prog_path=$ac_cv_path_python_prog_path
10340if test -n "$python_prog_path"; then
10341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10342$as_echo "$python_prog_path" >&6; }
10343else
10344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10345$as_echo "no" >&6; }
10346fi
10347
10348
10349 if test "${python_prog_path}" = missing; then
10350 python_prog=missing
10351 else
10352 python_prog=${python_prog_path}
10353 fi
10354 else
10355 # Not much we can do except assume the cross-compiler will find the
10356 # right files.
10357 python_prog=missing
10358 fi
10359 ;;
10360 *)
10361 # While we can't run python compiled for $host (unless host == build),
10362 # the user could write a script that provides the needed information,
10363 # so we support that.
10364 python_prog="${with_python}"
10365 # Extract the first word of "${python_prog}", so it can be a program name with args.
10366set dummy ${python_prog}; ac_word=$2
10367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10368$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10369if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10370 $as_echo_n "(cached) " >&6
10371else
10372 case $python_prog_path in
10373 [\\/]* | ?:[\\/]*)
10374 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10375 ;;
10376 *)
10377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10378for as_dir in $PATH
10379do
10380 IFS=$as_save_IFS
10381 test -z "$as_dir" && as_dir=.
10382 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10383 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10384 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10385 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10386 break 2
10387 fi
10388done
10389 done
10390IFS=$as_save_IFS
10391
10392 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10393 ;;
10394esac
10395fi
10396python_prog_path=$ac_cv_path_python_prog_path
10397if test -n "$python_prog_path"; then
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10399$as_echo "$python_prog_path" >&6; }
10400else
10401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10402$as_echo "no" >&6; }
10403fi
10404
10405
10406 if test "${python_prog_path}" = missing; then
d0ac1c44 10407 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10408 fi
10409 ;;
10410 esac
81ecdfbb
RW
10411 esac
10412
ec685c5e 10413 if test "${python_prog}" != missing; then
e7a30f46
DE
10414 # We have a python program to use, but it may be too old.
10415 # Don't flag an error for --with-python=auto (the default).
10416 have_python_config=yes
ec685c5e
DE
10417 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10418 if test $? != 0; then
e7a30f46
DE
10419 have_python_config=failed
10420 if test "${with_python}" != auto; then
d0ac1c44 10421 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10422 fi
ec685c5e
DE
10423 fi
10424 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10425 if test $? != 0; then
e7a30f46
DE
10426 have_python_config=failed
10427 if test "${with_python}" != auto; then
d0ac1c44 10428 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10429 fi
ec685c5e 10430 fi
0c4a4063
DE
10431 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10432 if test $? != 0; then
e7a30f46
DE
10433 have_python_config=failed
10434 if test "${with_python}" != auto; then
d0ac1c44 10435 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10436 fi
0c4a4063 10437 fi
ec685c5e 10438 else
ac534cba
JB
10439 # We do not have a python executable we can use to determine where
10440 # to find the Python headers and libs. We cannot guess the include
10441 # path from the python_prefix either, because that include path
10442 # depends on the Python version. So, there is nothing much we can
10443 # do except assume that the compiler will be able to find those files.
10444 python_includes=
10445 python_libs=
0c4a4063 10446 have_python_config=no
ec685c5e 10447 fi
bec39cab 10448
ec685c5e
DE
10449 # If we have python-config, only try the configuration it provides.
10450 # Otherwise fallback on the old way of trying different versions of
10451 # python in turn.
81ecdfbb 10452
ec685c5e
DE
10453 have_libpython=no
10454 if test "${have_python_config}" = yes; then
71737c43 10455
ec685c5e
DE
10456
10457 new_CPPFLAGS=${python_includes}
10458 new_LIBS=${python_libs}
71737c43
CB
10459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10460$as_echo_n "checking for python... " >&6; }
ec685c5e 10461 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10462 save_LIBS=$LIBS
ec685c5e 10463 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10464 LIBS="$new_LIBS $LIBS"
ec685c5e 10465 found_usable_python=no
81ecdfbb 10466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10467/* end confdefs.h. */
ac534cba 10468#include "Python.h"
81ecdfbb
RW
10469int
10470main ()
10471{
10472Py_Initialize ();
10473 ;
10474 return 0;
10475}
bec39cab 10476_ACEOF
81ecdfbb 10477if ac_fn_c_try_link "$LINENO"; then :
71737c43 10478 have_libpython=yes
ec685c5e 10479 found_usable_python=yes
ac534cba
JB
10480 PYTHON_CPPFLAGS=$new_CPPFLAGS
10481 PYTHON_LIBS=$new_LIBS
9a156167 10482fi
81ecdfbb
RW
10483rm -f core conftest.err conftest.$ac_objext \
10484 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10485 CPPFLAGS=$save_CPPFLAGS
10486 LIBS=$save_LIBS
ec685c5e
DE
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10488$as_echo "${found_usable_python}" >&6; }
9a156167 10489
e7a30f46 10490 elif test "${have_python_config}" != failed; then
ec685c5e 10491 if test "${have_libpython}" = no; then
9a156167 10492
420697bb
TT
10493
10494 new_CPPFLAGS=${python_includes}
bf27f0e2 10495 new_LIBS="-lpython2.7 ${python_libs}"
71737c43
CB
10496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10497$as_echo_n "checking for python... " >&6; }
420697bb
TT
10498 save_CPPFLAGS=$CPPFLAGS
10499 save_LIBS=$LIBS
10500 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10501 LIBS="$new_LIBS $LIBS"
420697bb
TT
10502 found_usable_python=no
10503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10504/* end confdefs.h. */
ac534cba 10505#include "Python.h"
420697bb
TT
10506int
10507main ()
10508{
10509Py_Initialize ();
10510 ;
10511 return 0;
10512}
10513_ACEOF
10514if ac_fn_c_try_link "$LINENO"; then :
71737c43 10515 have_libpython=yes
420697bb 10516 found_usable_python=yes
ac534cba
JB
10517 PYTHON_CPPFLAGS=$new_CPPFLAGS
10518 PYTHON_LIBS=$new_LIBS
420697bb
TT
10519fi
10520rm -f core conftest.err conftest.$ac_objext \
10521 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10522 CPPFLAGS=$save_CPPFLAGS
10523 LIBS=$save_LIBS
420697bb
TT
10524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10525$as_echo "${found_usable_python}" >&6; }
10526
10527 fi
10528 if test "${have_libpython}" = no; then
10529
ec685c5e
DE
10530
10531 new_CPPFLAGS=${python_includes}
bf27f0e2 10532 new_LIBS="-lpython2.6 ${python_libs}"
71737c43
CB
10533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10534$as_echo_n "checking for python... " >&6; }
ec685c5e
DE
10535 save_CPPFLAGS=$CPPFLAGS
10536 save_LIBS=$LIBS
10537 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10538 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10539 found_usable_python=no
10540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10541/* end confdefs.h. */
ac534cba 10542#include "Python.h"
ec685c5e
DE
10543int
10544main ()
10545{
10546Py_Initialize ();
10547 ;
10548 return 0;
10549}
10550_ACEOF
10551if ac_fn_c_try_link "$LINENO"; then :
71737c43 10552 have_libpython=yes
ec685c5e 10553 found_usable_python=yes
ac534cba
JB
10554 PYTHON_CPPFLAGS=$new_CPPFLAGS
10555 PYTHON_LIBS=$new_LIBS
ec685c5e 10556fi
81ecdfbb
RW
10557rm -f core conftest.err conftest.$ac_objext \
10558 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10559 CPPFLAGS=$save_CPPFLAGS
10560 LIBS=$save_LIBS
ec685c5e
DE
10561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10562$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10563
ec685c5e
DE
10564 fi
10565 fi
ec685c5e
DE
10566
10567 if test "${have_libpython}" = no; then
81ecdfbb
RW
10568 case "${with_python}" in
10569 yes)
d0ac1c44 10570 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10571 ;;
10572 auto)
10573 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10574$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10575 ;;
10576 *)
d0ac1c44 10577 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10578 ;;
10579 esac
0c4a4063
DE
10580 else
10581 if test -n "${python_prefix}"; then
10582
10583cat >>confdefs.h <<_ACEOF
10584#define WITH_PYTHON_PATH "${python_prefix}"
10585_ACEOF
10586
10587
10588 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10589 if test "x$prefix" = xNONE; then
10590 test_prefix=/usr/local
10591 else
10592 test_prefix=$prefix
10593 fi
10594 else
10595 test_prefix=$exec_prefix
10596 fi
10597 value=0
10598 case ${python_prefix} in
10599 "${test_prefix}"|"${test_prefix}/"*|\
10600 '${exec_prefix}'|'${exec_prefix}/'*)
10601 value=1
10602 ;;
10603 esac
10604
10605cat >>confdefs.h <<_ACEOF
10606#define PYTHON_PATH_RELOCATABLE $value
10607_ACEOF
10608
10609
10610 fi
81ecdfbb 10611 fi
436868fb 10612fi
436868fb 10613
ec685c5e 10614if test "${have_libpython}" != no; then
436868fb 10615
81ecdfbb 10616$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10617
81ecdfbb
RW
10618 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10619 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10620 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10621 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10622 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10623
81ecdfbb
RW
10624 # Flags needed to compile Python code (taken from python-config --cflags).
10625 # We cannot call python-config directly because it will output whatever was
10626 # used when compiling the Python interpreter itself, including flags which
10627 # would make the python-related objects be compiled differently from the
10628 # rest of GDB (e.g., -O2 and -fPIC).
10629 if test "${GCC}" = yes; then
ae292b3a
TT
10630 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10631 # Python headers recommend -DNDEBUG, but it's unclear if that just
10632 # refers to building Python itself. In release mode, though, it
10633 # doesn't hurt for the Python code in gdb to follow.
10634 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10635 fi
436868fb 10636
81ecdfbb
RW
10637 if test "x${tentative_python_cflags}" != x; then
10638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10639$as_echo_n "checking compiler flags for python code... " >&6; }
10640 for flag in ${tentative_python_cflags}; do
10641 # Check that the compiler accepts it
10642 saved_CFLAGS="$CFLAGS"
10643 CFLAGS="$CFLAGS $flag"
10644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10645/* end confdefs.h. */
81ecdfbb 10646
a9322a30
TT
10647int
10648main ()
10649{
a9322a30
TT
10650
10651 ;
10652 return 0;
10653}
bec39cab 10654_ACEOF
81ecdfbb
RW
10655if ac_fn_c_try_compile "$LINENO"; then :
10656 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10657fi
81ecdfbb
RW
10658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10659 CFLAGS="$saved_CFLAGS"
10660 done
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10662$as_echo "${PYTHON_CFLAGS}" >&6; }
10663 fi
043b6510 10664
c83393b9
JB
10665 # On x64 Windows, Python's include headers, and pyconfig.h in
10666 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10667 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10668 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10669 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10670 # The issue was reported to the Python community, but still isn't
10671 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10672
043b6510 10673 case "$gdb_host" in
c83393b9
JB
10674 mingw64)
10675 if test "${GCC}" = yes; then
10676 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10677 fi
10678 ;;
043b6510 10679 esac
81ecdfbb 10680else
6dddc817
DE
10681 # Even if Python support is not compiled in, we need to have this file
10682 # included so that the "python" command, et.al., still exists.
8fd8d003 10683 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10684 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10685fi
9a156167 10686
a4a1c157
PA
10687# Work around Python http://bugs.python.org/issue10112. See also
10688# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10689# no effect. Note that the only test after this that uses Python is
10690# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10691# run without -export-dynamic too.
10692PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10693
10694
ed3ef339
DE
10695
10696
4df42755
DE
10697 if test "${have_libpython}" != no; then
10698 HAVE_PYTHON_TRUE=
10699 HAVE_PYTHON_FALSE='#'
10700else
10701 HAVE_PYTHON_TRUE='#'
10702 HAVE_PYTHON_FALSE=
10703fi
10704
ed3ef339
DE
10705
10706# -------------------- #
10707# Check for libguile. #
10708# -------------------- #
10709
10710
e1402065
DE
10711
10712
10713
10714
10715# Check whether --with-guile was given.
10716if test "${with_guile+set}" = set; then :
10717 withval=$with_guile;
10718else
10719 with_guile=auto
10720fi
10721
10722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10723$as_echo_n "checking whether to use guile... " >&6; }
10724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10725$as_echo "$with_guile" >&6; }
10726
ed3ef339
DE
10727# Extract the first word of "pkg-config", so it can be a program name with args.
10728set dummy pkg-config; ac_word=$2
10729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10730$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10731if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10732 $as_echo_n "(cached) " >&6
10733else
10734 case $pkg_config_prog_path in
10735 [\\/]* | ?:[\\/]*)
10736 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10737 ;;
10738 *)
10739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10740for as_dir in $PATH
10741do
10742 IFS=$as_save_IFS
10743 test -z "$as_dir" && as_dir=.
10744 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10746 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10747 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10748 break 2
10749 fi
10750done
10751 done
10752IFS=$as_save_IFS
10753
10754 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10755 ;;
10756esac
10757fi
10758pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10759if test -n "$pkg_config_prog_path"; then
10760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10761$as_echo "$pkg_config_prog_path" >&6; }
10762else
10763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10764$as_echo "no" >&6; }
10765fi
10766
10767
10768
6e66f753 10769try_guile_versions="guile-2.0"
ed3ef339
DE
10770have_libguile=no
10771case "${with_guile}" in
10772no)
10773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10774$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10775 ;;
10776auto)
e1402065
DE
10777 if test "${pkg_config_prog_path}" = "missing"; then
10778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10779$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10780 else
ed3ef339
DE
10781
10782 pkg_config=${pkg_config_prog_path}
10783 guile_version_list=${try_guile_versions}
10784 flag_errors=no
10785
ed3ef339
DE
10786 found_usable_guile=checking
10787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10788$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10789 for guile_version in ${guile_version_list}; do
10790 ${pkg_config} --exists ${guile_version} 2>/dev/null
10791 if test $? != 0; then
10792 continue
10793 fi
10794 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10795 if test $? != 0; then
d0ac1c44 10796 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10797 fi
10798 new_LIBS=`${pkg_config} --libs ${guile_version}`
10799 if test $? != 0; then
d0ac1c44 10800 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10801 fi
10802 found_usable_guile=${guile_version}
10803 break
10804 done
10805 if test "${found_usable_guile}" = "checking"; then
10806 if test "${flag_errors}" = "yes"; then
d0ac1c44 10807 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10808 else
10809 found_usable_guile=no
10810 fi
10811 fi
10812 if test "${found_usable_guile}" != no; then
10813 save_CPPFLAGS=$CPPFLAGS
10814 save_LIBS=$LIBS
10815 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10816 LIBS="$LIBS $new_LIBS"
10817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10818/* end confdefs.h. */
10819#include "libguile.h"
10820int
10821main ()
10822{
10823scm_init_guile ();
10824 ;
10825 return 0;
10826}
10827_ACEOF
10828if ac_fn_c_try_link "$LINENO"; then :
10829 have_libguile=yes
10830 GUILE_CPPFLAGS=$new_CPPFLAGS
10831 GUILE_LIBS=$new_LIBS
10832else
10833 found_usable_guile=no
10834fi
10835rm -f core conftest.err conftest.$ac_objext \
10836 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10837 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10838if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10839
10840$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10841
10842
10843fi
10844
ed3ef339
DE
10845 CPPFLAGS=$save_CPPFLAGS
10846 LIBS=$save_LIBS
10847 if test "${found_usable_guile}" = no; then
10848 if test "${flag_errors}" = yes; then
10849 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10850$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10851as_fn_error $? "linking guile version ${guile_version} test program failed
10852See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10853 fi
10854 fi
10855 fi
10856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10857$as_echo "${found_usable_guile}" >&6; }
10858
e1402065 10859 fi
ed3ef339
DE
10860 ;;
10861yes)
e1402065 10862 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 10863 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 10864 fi
ed3ef339
DE
10865
10866 pkg_config=${pkg_config_prog_path}
10867 guile_version_list=${try_guile_versions}
10868 flag_errors=yes
10869
ed3ef339
DE
10870 found_usable_guile=checking
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10872$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10873 for guile_version in ${guile_version_list}; do
10874 ${pkg_config} --exists ${guile_version} 2>/dev/null
10875 if test $? != 0; then
10876 continue
10877 fi
10878 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10879 if test $? != 0; then
d0ac1c44 10880 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10881 fi
10882 new_LIBS=`${pkg_config} --libs ${guile_version}`
10883 if test $? != 0; then
d0ac1c44 10884 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10885 fi
10886 found_usable_guile=${guile_version}
10887 break
10888 done
10889 if test "${found_usable_guile}" = "checking"; then
10890 if test "${flag_errors}" = "yes"; then
d0ac1c44 10891 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10892 else
10893 found_usable_guile=no
10894 fi
10895 fi
10896 if test "${found_usable_guile}" != no; then
10897 save_CPPFLAGS=$CPPFLAGS
10898 save_LIBS=$LIBS
10899 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10900 LIBS="$LIBS $new_LIBS"
10901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10902/* end confdefs.h. */
10903#include "libguile.h"
10904int
10905main ()
10906{
10907scm_init_guile ();
10908 ;
10909 return 0;
10910}
10911_ACEOF
10912if ac_fn_c_try_link "$LINENO"; then :
10913 have_libguile=yes
10914 GUILE_CPPFLAGS=$new_CPPFLAGS
10915 GUILE_LIBS=$new_LIBS
10916else
10917 found_usable_guile=no
10918fi
10919rm -f core conftest.err conftest.$ac_objext \
10920 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10921 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10922if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10923
10924$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10925
10926
10927fi
10928
ed3ef339
DE
10929 CPPFLAGS=$save_CPPFLAGS
10930 LIBS=$save_LIBS
10931 if test "${found_usable_guile}" = no; then
10932 if test "${flag_errors}" = yes; then
10933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10935as_fn_error $? "linking guile version ${guile_version} test program failed
10936See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10937 fi
10938 fi
10939 fi
10940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10941$as_echo "${found_usable_guile}" >&6; }
10942
10943 ;;
10944[\\/]* | ?:[\\/]*)
e1402065 10945 if test -x "${with_guile}"; then
ed3ef339
DE
10946
10947 pkg_config=${with_guile}
10948 guile_version_list=${try_guile_versions}
10949 flag_errors=yes
10950
ed3ef339
DE
10951 found_usable_guile=checking
10952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10953$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10954 for guile_version in ${guile_version_list}; do
10955 ${pkg_config} --exists ${guile_version} 2>/dev/null
10956 if test $? != 0; then
10957 continue
10958 fi
10959 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10960 if test $? != 0; then
d0ac1c44 10961 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10962 fi
10963 new_LIBS=`${pkg_config} --libs ${guile_version}`
10964 if test $? != 0; then
d0ac1c44 10965 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10966 fi
10967 found_usable_guile=${guile_version}
10968 break
10969 done
10970 if test "${found_usable_guile}" = "checking"; then
10971 if test "${flag_errors}" = "yes"; then
d0ac1c44 10972 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10973 else
10974 found_usable_guile=no
10975 fi
10976 fi
10977 if test "${found_usable_guile}" != no; then
10978 save_CPPFLAGS=$CPPFLAGS
10979 save_LIBS=$LIBS
10980 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10981 LIBS="$LIBS $new_LIBS"
10982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10983/* end confdefs.h. */
10984#include "libguile.h"
10985int
10986main ()
10987{
10988scm_init_guile ();
10989 ;
10990 return 0;
10991}
10992_ACEOF
10993if ac_fn_c_try_link "$LINENO"; then :
10994 have_libguile=yes
10995 GUILE_CPPFLAGS=$new_CPPFLAGS
10996 GUILE_LIBS=$new_LIBS
10997else
10998 found_usable_guile=no
10999fi
11000rm -f core conftest.err conftest.$ac_objext \
11001 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11002 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11003if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11004
11005$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11006
11007
11008fi
11009
ed3ef339
DE
11010 CPPFLAGS=$save_CPPFLAGS
11011 LIBS=$save_LIBS
11012 if test "${found_usable_guile}" = no; then
11013 if test "${flag_errors}" = yes; then
11014 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11016as_fn_error $? "linking guile version ${guile_version} test program failed
11017See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11018 fi
11019 fi
11020 fi
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11022$as_echo "${found_usable_guile}" >&6; }
11023
e1402065 11024 else
d0ac1c44 11025 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11026 fi
ed3ef339
DE
11027 ;;
11028"" | */*)
11029 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11030 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11031 ;;
11032*)
11033 # A space separate list of guile versions to try, in order.
e1402065 11034 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11035 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11036 fi
ed3ef339
DE
11037
11038 pkg_config=${pkg_config_prog_path}
11039 guile_version_list=${with_guile}
11040 flag_errors=yes
11041
ed3ef339
DE
11042 found_usable_guile=checking
11043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11044$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11045 for guile_version in ${guile_version_list}; do
11046 ${pkg_config} --exists ${guile_version} 2>/dev/null
11047 if test $? != 0; then
11048 continue
11049 fi
11050 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11051 if test $? != 0; then
d0ac1c44 11052 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11053 fi
11054 new_LIBS=`${pkg_config} --libs ${guile_version}`
11055 if test $? != 0; then
d0ac1c44 11056 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11057 fi
11058 found_usable_guile=${guile_version}
11059 break
11060 done
11061 if test "${found_usable_guile}" = "checking"; then
11062 if test "${flag_errors}" = "yes"; then
d0ac1c44 11063 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11064 else
11065 found_usable_guile=no
11066 fi
11067 fi
11068 if test "${found_usable_guile}" != no; then
11069 save_CPPFLAGS=$CPPFLAGS
11070 save_LIBS=$LIBS
11071 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11072 LIBS="$LIBS $new_LIBS"
11073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11074/* end confdefs.h. */
11075#include "libguile.h"
11076int
11077main ()
11078{
11079scm_init_guile ();
11080 ;
11081 return 0;
11082}
11083_ACEOF
11084if ac_fn_c_try_link "$LINENO"; then :
11085 have_libguile=yes
11086 GUILE_CPPFLAGS=$new_CPPFLAGS
11087 GUILE_LIBS=$new_LIBS
11088else
11089 found_usable_guile=no
11090fi
11091rm -f core conftest.err conftest.$ac_objext \
11092 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11093 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11094if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11095
11096$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11097
11098
11099fi
11100
ed3ef339
DE
11101 CPPFLAGS=$save_CPPFLAGS
11102 LIBS=$save_LIBS
11103 if test "${found_usable_guile}" = no; then
11104 if test "${flag_errors}" = yes; then
11105 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11106$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11107as_fn_error $? "linking guile version ${guile_version} test program failed
11108See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11109 fi
11110 fi
11111 fi
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11113$as_echo "${found_usable_guile}" >&6; }
11114
11115 ;;
11116esac
11117
e76c5d17 11118if test "${have_libguile}" != no; then
d342a0da
DE
11119 case "${with_guile}" in
11120 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11121
11122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11123$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11124if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11125 $as_echo_n "(cached) " >&6
11126else
d342a0da 11127 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11128
11129 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11130 # the 'guild' and 'bindir' variables. In that case, try to guess
11131 # what the program name is, at the risk of getting it wrong if
11132 # Guile was configured with '--program-suffix' or similar.
11133 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11134 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11135 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11136 fi
11137
11138fi
11139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11140$as_echo "$ac_cv_guild_program_name" >&6; }
11141
11142 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11143 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11144 fi
11145
11146 GUILD="$ac_cv_guild_program_name"
11147
11148
d342a0da
DE
11149 ;;
11150 *)
11151
11152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11153$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11154if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11155 $as_echo_n "(cached) " >&6
11156else
11157 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11158
11159 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11160 # the 'guild' and 'bindir' variables. In that case, try to guess
11161 # what the program name is, at the risk of getting it wrong if
11162 # Guile was configured with '--program-suffix' or similar.
11163 if test "x$ac_cv_guild_program_name" = "x"; then
11164 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11165 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11166 fi
11167
11168fi
11169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11170$as_echo "$ac_cv_guild_program_name" >&6; }
11171
11172 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11173 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11174 fi
11175
11176 GUILD="$ac_cv_guild_program_name"
11177
11178
11179 ;;
11180 esac
e76c5d17
DE
11181
11182
11183 if test "$cross_compiling" = no; then
11184 GUILD_TARGET_FLAG=
11185 else
11186 GUILD_TARGET_FLAG="--target=$host"
11187 fi
11188
11189
11190
11191
11192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11193$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11194if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11195 $as_echo_n "(cached) " >&6
11196else
11197 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11198 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11199 ac_cv_guild_ok=yes
11200 else
11201 ac_cv_guild_ok=no
11202 fi
11203fi
11204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11205$as_echo "$ac_cv_guild_ok" >&6; }
11206
11207 if test "$ac_cv_guild_ok" = no; then
11208 have_libguile=no
11209 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11210$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11211 fi
11212fi
11213
ed3ef339
DE
11214if test "${have_libguile}" != no; then
11215
11216$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11217
11218 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11219 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11220 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11221 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11222 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11223
11224 save_LIBS="$LIBS"
11225 save_CPPFLAGS="$CPPFLAGS"
11226 LIBS="$GUILE_LIBS"
11227 CPPFLAGS="$GUILE_CPPFLAGS"
11228 for ac_func in scm_new_smob
11229do :
11230 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11231if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11232 cat >>confdefs.h <<_ACEOF
11233#define HAVE_SCM_NEW_SMOB 1
11234_ACEOF
11235
11236fi
11237done
11238
11239 LIBS="$save_LIBS"
11240 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11241else
11242 # Even if Guile support is not compiled in, we need to have these files
11243 # included.
bd810fff 11244 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11245 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11246fi
9a156167 11247
ac534cba 11248
4df42755
DE
11249 if test "${have_libguile}" != no; then
11250 HAVE_GUILE_TRUE=
11251 HAVE_GUILE_FALSE='#'
11252else
11253 HAVE_GUILE_TRUE='#'
11254 HAVE_GUILE_FALSE=
11255fi
11256
ac534cba 11257
62f29fda
TT
11258# ---------------------------- #
11259# Check for source highlight. #
11260# ---------------------------- #
11261
11262SRCHIGH_LIBS=
11263SRCHIGH_CFLAGS=
189b8c2e
ST
11264
11265# Check whether --enable-source-highlight was given.
11266if test "${enable_source_highlight+set}" = set; then :
11267 enableval=$enable_source_highlight; case "${enableval}" in
11268 yes) enable_source_highlight=yes ;;
11269 no) enable_source_highlight=no ;;
11270 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11271esac
11272else
11273 enable_source_highlight=auto
11274fi
11275
11276
11277if test "${enable_source_highlight}" != "no"; then
11278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11279$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11280 if test "${pkg_config_prog_path}" = "missing"; then
11281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11282$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11283 if test "${enable_source_highlight}" = "yes"; then
11284 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11285 fi
11286 else
d806ea2d
TT
11287 case "$LDFLAGS" in
11288 *static-libstdc*)
11289 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11290 ;;
11291 esac
11292
189b8c2e 11293 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11294 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11295 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11296
11297$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11298
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11300$as_echo "yes" >&6; }
189b8c2e 11301 else
62f29fda
TT
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11303$as_echo "no" >&6; }
189b8c2e
ST
11304 if test "${enable_source_highlight}" = "yes"; then
11305 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11306 fi
11307 fi
11308 fi
62f29fda
TT
11309fi
11310
11311
11312
05ea2a05
TT
11313# ------------------------- #
11314# Checks for header files. #
11315# ------------------------- #
58bfce93 11316
05ea2a05
TT
11317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11318$as_echo_n "checking for ANSI C header files... " >&6; }
11319if ${ac_cv_header_stdc+:} false; then :
11320 $as_echo_n "(cached) " >&6
58bfce93 11321else
5599c404
MM
11322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11323/* end confdefs.h. */
05ea2a05
TT
11324#include <stdlib.h>
11325#include <stdarg.h>
11326#include <string.h>
11327#include <float.h>
5599c404 11328
05ea2a05
TT
11329int
11330main ()
11331{
5599c404 11332
05ea2a05
TT
11333 ;
11334 return 0;
11335}
5599c404 11336_ACEOF
05ea2a05
TT
11337if ac_fn_c_try_compile "$LINENO"; then :
11338 ac_cv_header_stdc=yes
5599c404 11339else
05ea2a05 11340 ac_cv_header_stdc=no
5599c404 11341fi
05ea2a05 11342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58bfce93 11343
05ea2a05
TT
11344if test $ac_cv_header_stdc = yes; then
11345 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11347/* end confdefs.h. */
11348#include <string.h>
58bfce93 11349
05ea2a05
TT
11350_ACEOF
11351if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11352 $EGREP "memchr" >/dev/null 2>&1; then :
58bfce93 11353
05ea2a05
TT
11354else
11355 ac_cv_header_stdc=no
11356fi
11357rm -f conftest*
58bfce93 11358
05ea2a05 11359fi
58bfce93 11360
05ea2a05
TT
11361if test $ac_cv_header_stdc = yes; then
11362 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11364/* end confdefs.h. */
11365#include <stdlib.h>
58bfce93 11366
05ea2a05
TT
11367_ACEOF
11368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11369 $EGREP "free" >/dev/null 2>&1; then :
58bfce93 11370
05ea2a05
TT
11371else
11372 ac_cv_header_stdc=no
11373fi
11374rm -f conftest*
58bfce93 11375
05ea2a05 11376fi
58bfce93 11377
05ea2a05
TT
11378if test $ac_cv_header_stdc = yes; then
11379 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11380 if test "$cross_compiling" = yes; then :
11381 :
11382else
11383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11384/* end confdefs.h. */
11385#include <ctype.h>
11386#include <stdlib.h>
11387#if ((' ' & 0x0FF) == 0x020)
11388# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11389# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11390#else
11391# define ISLOWER(c) \
11392 (('a' <= (c) && (c) <= 'i') \
11393 || ('j' <= (c) && (c) <= 'r') \
11394 || ('s' <= (c) && (c) <= 'z'))
11395# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11396#endif
58bfce93 11397
05ea2a05
TT
11398#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11399int
11400main ()
11401{
11402 int i;
11403 for (i = 0; i < 256; i++)
11404 if (XOR (islower (i), ISLOWER (i))
11405 || toupper (i) != TOUPPER (i))
11406 return 2;
11407 return 0;
11408}
11409_ACEOF
11410if ac_fn_c_try_run "$LINENO"; then :
58bfce93 11411
05ea2a05
TT
11412else
11413 ac_cv_header_stdc=no
11414fi
11415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11416 conftest.$ac_objext conftest.beam conftest.$ac_ext
11417fi
58bfce93 11418
05ea2a05
TT
11419fi
11420fi
11421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11422$as_echo "$ac_cv_header_stdc" >&6; }
11423if test $ac_cv_header_stdc = yes; then
58bfce93 11424
05ea2a05 11425$as_echo "#define STDC_HEADERS 1" >>confdefs.h
58bfce93 11426
05ea2a05 11427fi
58bfce93 11428
05ea2a05
TT
11429# elf_hp.h is for HP/UX 64-bit shared library support.
11430for ac_header in nlist.h machine/reg.h poll.h sys/poll.h \
11431 thread_db.h \
11432 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11433 sys/resource.h sys/ptrace.h ptrace.h \
11434 sys/reg.h sys/debugreg.h sys/select.h \
11435 termios.h elf_hp.h
11436do :
11437 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11438ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11439if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11440 cat >>confdefs.h <<_ACEOF
11441#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11442_ACEOF
58bfce93
MM
11443
11444fi
11445
05ea2a05 11446done
58bfce93 11447
05ea2a05
TT
11448for ac_header in sys/user.h
11449do :
11450 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11451# include <sys/param.h>
11452#endif
58bfce93 11453
05ea2a05
TT
11454"
11455if test "x$ac_cv_header_sys_user_h" = xyes; then :
11456 cat >>confdefs.h <<_ACEOF
11457#define HAVE_SYS_USER_H 1
11458_ACEOF
58bfce93 11459
05ea2a05 11460fi
58bfce93 11461
05ea2a05 11462done
58bfce93 11463
58bfce93 11464
05ea2a05
TT
11465for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11466do :
11467 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11468ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11469if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11470 cat >>confdefs.h <<_ACEOF
11471#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11472_ACEOF
58bfce93 11473
05ea2a05 11474fi
58bfce93 11475
05ea2a05 11476done
58bfce93 11477
05ea2a05
TT
11478for ac_header in term.h
11479do :
11480 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11481# include <curses.h>
11482#endif
58bfce93 11483
05ea2a05
TT
11484"
11485if test "x$ac_cv_header_term_h" = xyes; then :
11486 cat >>confdefs.h <<_ACEOF
11487#define HAVE_TERM_H 1
11488_ACEOF
58bfce93 11489
05ea2a05 11490fi
58bfce93 11491
05ea2a05 11492done
58bfce93 11493
58bfce93 11494
05ea2a05
TT
11495# ------------------------- #
11496# Checks for declarations. #
11497# ------------------------- #
58bfce93 11498
58bfce93 11499
05ea2a05
TT
11500 # Check for presence and size of long long.
11501 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11502if test "x$ac_cv_type_long_long" = xyes; then :
58bfce93 11503
05ea2a05
TT
11504cat >>confdefs.h <<_ACEOF
11505#define HAVE_LONG_LONG 1
11506_ACEOF
11507
11508# The cast to long int works around a bug in the HP C Compiler
11509# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11510# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11511# This bug is HP SR number 8606223364.
11512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11513$as_echo_n "checking size of long long... " >&6; }
11514if ${ac_cv_sizeof_long_long+:} false; then :
58bfce93
MM
11515 $as_echo_n "(cached) " >&6
11516else
05ea2a05 11517 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
58bfce93 11518
58bfce93 11519else
05ea2a05
TT
11520 if test "$ac_cv_type_long_long" = yes; then
11521 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11522$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11523as_fn_error 77 "cannot compute sizeof (long long)
11524See \`config.log' for more details" "$LINENO" 5; }
11525 else
11526 ac_cv_sizeof_long_long=0
11527 fi
58bfce93 11528fi
58bfce93
MM
11529
11530fi
05ea2a05
TT
11531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11532$as_echo "$ac_cv_sizeof_long_long" >&6; }
58bfce93 11533
58bfce93 11534
58bfce93 11535
05ea2a05
TT
11536cat >>confdefs.h <<_ACEOF
11537#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11538_ACEOF
58bfce93
MM
11539
11540
05ea2a05 11541fi
58bfce93
MM
11542
11543
05ea2a05
TT
11544 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11545ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11546if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11547 ac_have_decl=1
11548else
11549 ac_have_decl=0
11550fi
58bfce93 11551
05ea2a05
TT
11552cat >>confdefs.h <<_ACEOF
11553#define HAVE_DECL_BASENAME $ac_have_decl
c56ccc05 11554_ACEOF
05ea2a05
TT
11555ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11556if test "x$ac_cv_have_decl_ffs" = xyes; then :
11557 ac_have_decl=1
11558else
11559 ac_have_decl=0
c56ccc05 11560fi
c56ccc05
MM
11561
11562cat >>confdefs.h <<_ACEOF
05ea2a05 11563#define HAVE_DECL_FFS $ac_have_decl
c56ccc05 11564_ACEOF
05ea2a05
TT
11565ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11566if test "x$ac_cv_have_decl_asprintf" = xyes; then :
11567 ac_have_decl=1
11568else
11569 ac_have_decl=0
c56ccc05 11570fi
c56ccc05
MM
11571
11572cat >>confdefs.h <<_ACEOF
05ea2a05 11573#define HAVE_DECL_ASPRINTF $ac_have_decl
c56ccc05 11574_ACEOF
05ea2a05
TT
11575ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11576if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11577 ac_have_decl=1
11578else
11579 ac_have_decl=0
11580fi
c56ccc05 11581
05ea2a05
TT
11582cat >>confdefs.h <<_ACEOF
11583#define HAVE_DECL_VASPRINTF $ac_have_decl
11584_ACEOF
11585ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11586if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11587 ac_have_decl=1
11588else
11589 ac_have_decl=0
c56ccc05
MM
11590fi
11591
05ea2a05
TT
11592cat >>confdefs.h <<_ACEOF
11593#define HAVE_DECL_SNPRINTF $ac_have_decl
11594_ACEOF
11595ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11596if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11597 ac_have_decl=1
11598else
11599 ac_have_decl=0
58bfce93
MM
11600fi
11601
05ea2a05
TT
11602cat >>confdefs.h <<_ACEOF
11603#define HAVE_DECL_VSNPRINTF $ac_have_decl
11604_ACEOF
c890192f 11605
05ea2a05
TT
11606 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11607if test "x$ac_cv_have_decl_strtol" = xyes; then :
11608 ac_have_decl=1
bec39cab 11609else
05ea2a05
TT
11610 ac_have_decl=0
11611fi
81ecdfbb 11612
05ea2a05
TT
11613cat >>confdefs.h <<_ACEOF
11614#define HAVE_DECL_STRTOL $ac_have_decl
11615_ACEOF
11616ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11617if test "x$ac_cv_have_decl_strtoul" = xyes; then :
11618 ac_have_decl=1
11619else
11620 ac_have_decl=0
11621fi
a9322a30 11622
05ea2a05
TT
11623cat >>confdefs.h <<_ACEOF
11624#define HAVE_DECL_STRTOUL $ac_have_decl
bec39cab 11625_ACEOF
05ea2a05
TT
11626ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11627if test "x$ac_cv_have_decl_strtoll" = xyes; then :
11628 ac_have_decl=1
bec39cab 11629else
05ea2a05 11630 ac_have_decl=0
a9322a30 11631fi
bec39cab 11632
05ea2a05
TT
11633cat >>confdefs.h <<_ACEOF
11634#define HAVE_DECL_STRTOLL $ac_have_decl
11635_ACEOF
11636ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11637if test "x$ac_cv_have_decl_strtoull" = xyes; then :
11638 ac_have_decl=1
11639else
11640 ac_have_decl=0
11641fi
bec39cab 11642
05ea2a05
TT
11643cat >>confdefs.h <<_ACEOF
11644#define HAVE_DECL_STRTOULL $ac_have_decl
81ecdfbb 11645_ACEOF
bec39cab 11646
05ea2a05
TT
11647 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11648if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
11649 ac_have_decl=1
bec39cab 11650else
05ea2a05 11651 ac_have_decl=0
81ecdfbb 11652fi
81ecdfbb 11653
05ea2a05
TT
11654cat >>confdefs.h <<_ACEOF
11655#define HAVE_DECL_STRVERSCMP $ac_have_decl
11656_ACEOF
81ecdfbb 11657
81ecdfbb 11658
06825bd1 11659
05ea2a05
TT
11660ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11661if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11662 ac_have_decl=1
81ecdfbb 11663else
05ea2a05 11664 ac_have_decl=0
81ecdfbb 11665fi
bec39cab 11666
05ea2a05
TT
11667cat >>confdefs.h <<_ACEOF
11668#define HAVE_DECL_SNPRINTF $ac_have_decl
11669_ACEOF
81ecdfbb 11670
05ea2a05
TT
11671
11672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11673$as_echo_n "checking for LC_MESSAGES... " >&6; }
11674if ${am_cv_val_LC_MESSAGES+:} false; then :
11675 $as_echo_n "(cached) " >&6
bec39cab 11676else
81ecdfbb 11677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11678/* end confdefs.h. */
05ea2a05 11679#include <locale.h>
a9322a30
TT
11680int
11681main ()
11682{
05ea2a05
TT
11683return LC_MESSAGES
11684 ;
a9322a30
TT
11685 return 0;
11686}
bec39cab 11687_ACEOF
05ea2a05
TT
11688if ac_fn_c_try_link "$LINENO"; then :
11689 am_cv_val_LC_MESSAGES=yes
bec39cab 11690else
05ea2a05 11691 am_cv_val_LC_MESSAGES=no
81ecdfbb 11692fi
05ea2a05
TT
11693rm -f core conftest.err conftest.$ac_objext \
11694 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 11695fi
05ea2a05
TT
11696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11697$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11698 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11699
05ea2a05 11700$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
bec39cab 11701
05ea2a05 11702 fi
5ee754fc 11703
bec39cab 11704
05ea2a05
TT
11705# ------------------ #
11706# Checks for types. #
11707# ------------------ #
11708
11709ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
11710#include <sys/socket.h>
11711
11712"
11713if test "x$ac_cv_type_socklen_t" = xyes; then :
11714
11715cat >>confdefs.h <<_ACEOF
11716#define HAVE_SOCKLEN_T 1
bec39cab 11717_ACEOF
c906108c 11718
05ea2a05 11719
bec39cab 11720fi
81ecdfbb 11721
81ecdfbb 11722
05ea2a05
TT
11723# ------------------------------------- #
11724# Checks for compiler characteristics. #
11725# ------------------------------------- #
a9322a30 11726
05ea2a05
TT
11727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11728$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11729if ${ac_cv_c_const+:} false; then :
11730 $as_echo_n "(cached) " >&6
11731else
11732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11733/* end confdefs.h. */
bec39cab 11734
05ea2a05
TT
11735int
11736main ()
11737{
bec39cab 11738
05ea2a05
TT
11739#ifndef __cplusplus
11740 /* Ultrix mips cc rejects this sort of thing. */
11741 typedef int charset[2];
11742 const charset cs = { 0, 0 };
11743 /* SunOS 4.1.1 cc rejects this. */
11744 char const *const *pcpcc;
11745 char **ppc;
11746 /* NEC SVR4.0.2 mips cc rejects this. */
11747 struct point {int x, y;};
11748 static struct point const zero = {0,0};
11749 /* AIX XL C 1.02.0.0 rejects this.
11750 It does not let you subtract one const X* pointer from another in
11751 an arm of an if-expression whose if-part is not a constant
11752 expression */
11753 const char *g = "string";
11754 pcpcc = &g + (g ? g-g : 0);
11755 /* HPUX 7.0 cc rejects these. */
11756 ++pcpcc;
11757 ppc = (char**) pcpcc;
11758 pcpcc = (char const *const *) ppc;
11759 { /* SCO 3.2v4 cc rejects this sort of thing. */
11760 char tx;
11761 char *t = &tx;
11762 char const *s = 0 ? (char *) 0 : (char const *) 0;
5ee754fc 11763
05ea2a05
TT
11764 *t++ = 0;
11765 if (s) return 0;
11766 }
11767 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11768 int x[] = {25, 17};
11769 const int *foo = &x[0];
11770 ++foo;
11771 }
11772 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11773 typedef const int *iptr;
11774 iptr p = 0;
11775 ++p;
11776 }
11777 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
11778 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11779 struct s { int j; const int *ap[3]; } bx;
11780 struct s *b = &bx; b->j = 5;
11781 }
11782 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11783 const int foo = 10;
11784 if (!foo) return 0;
11785 }
11786 return !cs[0] && !zero.x;
11787#endif
5ee754fc 11788
05ea2a05
TT
11789 ;
11790 return 0;
11791}
bec39cab 11792_ACEOF
05ea2a05
TT
11793if ac_fn_c_try_compile "$LINENO"; then :
11794 ac_cv_c_const=yes
11795else
11796 ac_cv_c_const=no
11797fi
11798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11799fi
05ea2a05
TT
11800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11801$as_echo "$ac_cv_c_const" >&6; }
11802if test $ac_cv_c_const = no; then
5ee754fc 11803
05ea2a05 11804$as_echo "#define const /**/" >>confdefs.h
bec39cab 11805
05ea2a05
TT
11806fi
11807
11808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11809$as_echo_n "checking for inline... " >&6; }
11810if ${ac_cv_c_inline+:} false; then :
11811 $as_echo_n "(cached) " >&6
11812else
11813 ac_cv_c_inline=no
11814for ac_kw in inline __inline__ __inline; do
11815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11816/* end confdefs.h. */
11817#ifndef __cplusplus
11818typedef int foo_t;
11819static $ac_kw foo_t static_foo () {return 0; }
11820$ac_kw foo_t foo () {return 0; }
81ecdfbb 11821#endif
bec39cab 11822
a8111142 11823_ACEOF
05ea2a05
TT
11824if ac_fn_c_try_compile "$LINENO"; then :
11825 ac_cv_c_inline=$ac_kw
a8111142 11826fi
05ea2a05
TT
11827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11828 test "$ac_cv_c_inline" != no && break
81ecdfbb 11829done
a8111142 11830
05ea2a05
TT
11831fi
11832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11833$as_echo "$ac_cv_c_inline" >&6; }
a8111142 11834
05ea2a05
TT
11835case $ac_cv_c_inline in
11836 inline | yes) ;;
11837 *)
11838 case $ac_cv_c_inline in
11839 no) ac_val=;;
11840 *) ac_val=$ac_cv_c_inline;;
11841 esac
11842 cat >>confdefs.h <<_ACEOF
11843#ifndef __cplusplus
11844#define inline $ac_val
11845#endif
07697489 11846_ACEOF
05ea2a05
TT
11847 ;;
11848esac
07697489 11849
05ea2a05
TT
11850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11851$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11852if ${ac_cv_c_bigendian+:} false; then :
07697489
PA
11853 $as_echo_n "(cached) " >&6
11854else
05ea2a05
TT
11855 ac_cv_c_bigendian=unknown
11856 # See if we're dealing with a universal compiler.
11857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11858/* end confdefs.h. */
11859#ifndef __APPLE_CC__
11860 not a universal capable compiler
11861 #endif
11862 typedef int dummy;
07697489 11863
05ea2a05
TT
11864_ACEOF
11865if ac_fn_c_try_compile "$LINENO"; then :
07697489 11866
05ea2a05
TT
11867 # Check for potential -arch flags. It is not universal unless
11868 # there are at least two -arch flags with different values.
11869 ac_arch=
11870 ac_prev=
11871 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11872 if test -n "$ac_prev"; then
11873 case $ac_word in
11874 i?86 | x86_64 | ppc | ppc64)
11875 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11876 ac_arch=$ac_word
11877 else
11878 ac_cv_c_bigendian=universal
11879 break
11880 fi
11881 ;;
11882 esac
11883 ac_prev=
11884 elif test "x$ac_word" = "x-arch"; then
11885 ac_prev=arch
11886 fi
11887 done
07697489 11888fi
05ea2a05
TT
11889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11890 if test $ac_cv_c_bigendian = unknown; then
11891 # See if sys/param.h defines the BYTE_ORDER macro.
11892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11893/* end confdefs.h. */
11894#include <sys/types.h>
11895 #include <sys/param.h>
07697489 11896
05ea2a05
TT
11897int
11898main ()
11899{
11900#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11901 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11902 && LITTLE_ENDIAN)
11903 bogus endian macros
11904 #endif
07697489 11905
05ea2a05
TT
11906 ;
11907 return 0;
11908}
07697489 11909_ACEOF
05ea2a05
TT
11910if ac_fn_c_try_compile "$LINENO"; then :
11911 # It does; now see whether it defined to BIG_ENDIAN or not.
11912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11913/* end confdefs.h. */
11914#include <sys/types.h>
11915 #include <sys/param.h>
07697489 11916
05ea2a05
TT
11917int
11918main ()
11919{
11920#if BYTE_ORDER != BIG_ENDIAN
11921 not big endian
11922 #endif
07697489 11923
05ea2a05
TT
11924 ;
11925 return 0;
11926}
07697489 11927_ACEOF
05ea2a05
TT
11928if ac_fn_c_try_compile "$LINENO"; then :
11929 ac_cv_c_bigendian=yes
07697489 11930else
05ea2a05 11931 ac_cv_c_bigendian=no
07697489 11932fi
05ea2a05 11933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 11934fi
05ea2a05
TT
11935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11936 fi
11937 if test $ac_cv_c_bigendian = unknown; then
11938 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11940/* end confdefs.h. */
11941#include <limits.h>
07697489 11942
05ea2a05
TT
11943int
11944main ()
11945{
11946#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11947 bogus endian macros
11948 #endif
07697489 11949
05ea2a05
TT
11950 ;
11951 return 0;
11952}
07697489 11953_ACEOF
05ea2a05
TT
11954if ac_fn_c_try_compile "$LINENO"; then :
11955 # It does; now see whether it defined to _BIG_ENDIAN or not.
11956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11957/* end confdefs.h. */
11958#include <limits.h>
07697489 11959
05ea2a05
TT
11960int
11961main ()
11962{
11963#ifndef _BIG_ENDIAN
11964 not big endian
11965 #endif
07697489 11966
05ea2a05
TT
11967 ;
11968 return 0;
11969}
07697489 11970_ACEOF
05ea2a05
TT
11971if ac_fn_c_try_compile "$LINENO"; then :
11972 ac_cv_c_bigendian=yes
07697489 11973else
05ea2a05 11974 ac_cv_c_bigendian=no
07697489 11975fi
05ea2a05 11976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 11977fi
05ea2a05
TT
11978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11979 fi
11980 if test $ac_cv_c_bigendian = unknown; then
11981 # Compile a test program.
11982 if test "$cross_compiling" = yes; then :
11983 # Try to guess by grepping values from an object file.
11984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11985/* end confdefs.h. */
11986short int ascii_mm[] =
11987 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11988 short int ascii_ii[] =
11989 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11990 int use_ascii (int i) {
11991 return ascii_mm[i] + ascii_ii[i];
11992 }
11993 short int ebcdic_ii[] =
11994 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11995 short int ebcdic_mm[] =
11996 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11997 int use_ebcdic (int i) {
11998 return ebcdic_mm[i] + ebcdic_ii[i];
11999 }
12000 extern int foo;
07697489 12001
05ea2a05
TT
12002int
12003main ()
12004{
12005return use_ascii (foo) == use_ebcdic (foo);
12006 ;
12007 return 0;
12008}
07697489 12009_ACEOF
05ea2a05
TT
12010if ac_fn_c_try_compile "$LINENO"; then :
12011 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12012 ac_cv_c_bigendian=yes
12013 fi
12014 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12015 if test "$ac_cv_c_bigendian" = unknown; then
12016 ac_cv_c_bigendian=no
12017 else
12018 # finding both strings is unlikely to happen, but who knows?
12019 ac_cv_c_bigendian=unknown
12020 fi
12021 fi
07697489 12022fi
05ea2a05
TT
12023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12024else
12025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12026/* end confdefs.h. */
12027$ac_includes_default
12028int
12029main ()
12030{
07697489 12031
05ea2a05
TT
12032 /* Are we little or big endian? From Harbison&Steele. */
12033 union
12034 {
12035 long int l;
12036 char c[sizeof (long int)];
12037 } u;
12038 u.l = 1;
12039 return u.c[sizeof (long int) - 1] == 1;
12040
12041 ;
12042 return 0;
12043}
07697489 12044_ACEOF
05ea2a05
TT
12045if ac_fn_c_try_run "$LINENO"; then :
12046 ac_cv_c_bigendian=no
07697489 12047else
05ea2a05
TT
12048 ac_cv_c_bigendian=yes
12049fi
12050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12051 conftest.$ac_objext conftest.beam conftest.$ac_ext
07697489
PA
12052fi
12053
05ea2a05 12054 fi
07697489 12055fi
05ea2a05
TT
12056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12057$as_echo "$ac_cv_c_bigendian" >&6; }
12058 case $ac_cv_c_bigendian in #(
12059 yes)
12060 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12061;; #(
12062 no)
12063 ;; #(
12064 universal)
07697489 12065
05ea2a05 12066$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
07697489 12067
05ea2a05
TT
12068 ;; #(
12069 *)
12070 as_fn_error $? "unknown endianness
12071 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12072 esac
07697489
PA
12073
12074
05ea2a05
TT
12075# ------------------------------ #
12076# Checks for library functions. #
12077# ------------------------------ #
81ecdfbb 12078
05ea2a05
TT
12079for ac_func in getuid getgid \
12080 pipe poll pread pread64 pwrite resize_term \
12081 getpgid setsid \
12082 sigaction sigsetmask socketpair \
12083 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12084 setrlimit getrlimit posix_madvise waitpid \
12085 use_default_colors
12086do :
12087 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12088ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12089if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12090 cat >>confdefs.h <<_ACEOF
12091#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
a9322a30 12092_ACEOF
5ee754fc 12093
05ea2a05
TT
12094fi
12095done
5ee754fc 12096
05ea2a05
TT
12097
12098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12099$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12100if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 12101 $as_echo_n "(cached) " >&6
bec39cab 12102else
81ecdfbb 12103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12104/* end confdefs.h. */
05ea2a05 12105#include <langinfo.h>
a9322a30
TT
12106int
12107main ()
12108{
05ea2a05 12109char* cs = nl_langinfo(CODESET);
a9322a30
TT
12110 ;
12111 return 0;
12112}
bec39cab 12113_ACEOF
81ecdfbb 12114if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 12115 am_cv_langinfo_codeset=yes
bec39cab 12116else
05ea2a05 12117 am_cv_langinfo_codeset=no
81ecdfbb
RW
12118fi
12119rm -f core conftest.err conftest.$ac_objext \
12120 conftest$ac_exeext conftest.$ac_ext
05ea2a05 12121
81ecdfbb 12122fi
05ea2a05
TT
12123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12124$as_echo "$am_cv_langinfo_codeset" >&6; }
12125 if test $am_cv_langinfo_codeset = yes; then
bec39cab 12126
05ea2a05 12127$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
81ecdfbb
RW
12128
12129 fi
12130
05ea2a05
TT
12131ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12132if test "x$ac_cv_type_size_t" = xyes; then :
81ecdfbb 12133
05ea2a05 12134else
81ecdfbb
RW
12135
12136cat >>confdefs.h <<_ACEOF
05ea2a05 12137#define size_t unsigned int
7eb368b3 12138_ACEOF
7eb368b3 12139
7eb368b3 12140fi
7eb368b3 12141
7eb368b3 12142
a9322a30 12143
7eb368b3 12144
05ea2a05
TT
12145 for ac_header in $ac_header_list
12146do :
12147 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12148ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12149"
12150if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12151 cat >>confdefs.h <<_ACEOF
12152#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12153_ACEOF
7eb368b3 12154
05ea2a05 12155fi
7eb368b3 12156
05ea2a05 12157done
a9322a30 12158
05ea2a05
TT
12159
12160
12161
12162
12163
12164
12165ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12166if test "x$ac_cv_type_pid_t" = xyes; then :
12167
12168else
bec39cab 12169
a9322a30 12170cat >>confdefs.h <<_ACEOF
05ea2a05 12171#define pid_t int
a9322a30
TT
12172_ACEOF
12173
05ea2a05
TT
12174fi
12175
12176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12177$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12178if ${ac_cv_path_SED+:} false; then :
12179 $as_echo_n "(cached) " >&6
12180else
12181 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12182 for ac_i in 1 2 3 4 5 6 7; do
12183 ac_script="$ac_script$as_nl$ac_script"
12184 done
12185 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12186 { ac_script=; unset ac_script;}
12187 if test -z "$SED"; then
12188 ac_path_SED_found=false
12189 # Loop through the user's path and test for each of PROGNAME-LIST
12190 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12191for as_dir in $PATH
12192do
12193 IFS=$as_save_IFS
12194 test -z "$as_dir" && as_dir=.
12195 for ac_prog in sed gsed; do
12196 for ac_exec_ext in '' $ac_executable_extensions; do
12197 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12198 as_fn_executable_p "$ac_path_SED" || continue
12199# Check for GNU ac_path_SED and select it if it is found.
12200 # Check for GNU $ac_path_SED
12201case `"$ac_path_SED" --version 2>&1` in
12202*GNU*)
12203 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12204*)
12205 ac_count=0
12206 $as_echo_n 0123456789 >"conftest.in"
12207 while :
12208 do
12209 cat "conftest.in" "conftest.in" >"conftest.tmp"
12210 mv "conftest.tmp" "conftest.in"
12211 cp "conftest.in" "conftest.nl"
12212 $as_echo '' >> "conftest.nl"
12213 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12214 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12215 as_fn_arith $ac_count + 1 && ac_count=$as_val
12216 if test $ac_count -gt ${ac_path_SED_max-0}; then
12217 # Best one so far, save it but keep looking for a better one
12218 ac_cv_path_SED="$ac_path_SED"
12219 ac_path_SED_max=$ac_count
12220 fi
12221 # 10*(2^10) chars as input seems more than enough
12222 test $ac_count -gt 10 && break
12223 done
12224 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12225esac
a9322a30 12226
05ea2a05
TT
12227 $ac_path_SED_found && break 3
12228 done
12229 done
12230 done
12231IFS=$as_save_IFS
12232 if test -z "$ac_cv_path_SED"; then
12233 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12234 fi
12235else
12236 ac_cv_path_SED=$SED
a9322a30
TT
12237fi
12238
05ea2a05
TT
12239fi
12240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12241$as_echo "$ac_cv_path_SED" >&6; }
12242 SED="$ac_cv_path_SED"
12243 rm -f conftest.sed
a9322a30 12244
a9322a30 12245
05ea2a05
TT
12246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12247$as_echo_n "checking for ANSI C header files... " >&6; }
12248if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12249 $as_echo_n "(cached) " >&6
a9322a30 12250else
81ecdfbb 12251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12252/* end confdefs.h. */
05ea2a05
TT
12253#include <stdlib.h>
12254#include <stdarg.h>
12255#include <string.h>
12256#include <float.h>
a9322a30
TT
12257
12258int
12259main ()
12260{
d0ac1c44 12261
a9322a30
TT
12262 ;
12263 return 0;
12264}
bec39cab 12265_ACEOF
81ecdfbb 12266if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 12267 ac_cv_header_stdc=yes
5ee754fc 12268else
05ea2a05 12269 ac_cv_header_stdc=no
5ee754fc 12270fi
81ecdfbb 12271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12272
05ea2a05
TT
12273if test $ac_cv_header_stdc = yes; then
12274 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12276/* end confdefs.h. */
12277#include <string.h>
bec39cab 12278
05ea2a05
TT
12279_ACEOF
12280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12281 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12282
bec39cab 12283else
05ea2a05
TT
12284 ac_cv_header_stdc=no
12285fi
12286rm -f conftest*
12287
12288fi
12289
12290if test $ac_cv_header_stdc = yes; then
12291 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 12292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12293/* end confdefs.h. */
05ea2a05 12294#include <stdlib.h>
a9322a30 12295
bec39cab 12296_ACEOF
05ea2a05
TT
12297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12298 $EGREP "free" >/dev/null 2>&1; then :
bec39cab 12299
05ea2a05
TT
12300else
12301 ac_cv_header_stdc=no
5ee754fc 12302fi
05ea2a05 12303rm -f conftest*
5ee754fc 12304
05ea2a05 12305fi
bec39cab 12306
05ea2a05
TT
12307if test $ac_cv_header_stdc = yes; then
12308 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12309 if test "$cross_compiling" = yes; then :
12310 :
bec39cab 12311else
05ea2a05 12312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 12313/* end confdefs.h. */
05ea2a05
TT
12314#include <ctype.h>
12315#include <stdlib.h>
12316#if ((' ' & 0x0FF) == 0x020)
12317# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12318# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12319#else
12320# define ISLOWER(c) \
12321 (('a' <= (c) && (c) <= 'i') \
12322 || ('j' <= (c) && (c) <= 'r') \
12323 || ('s' <= (c) && (c) <= 'z'))
12324# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12325#endif
a9322a30 12326
05ea2a05 12327#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12328int
12329main ()
12330{
05ea2a05
TT
12331 int i;
12332 for (i = 0; i < 256; i++)
12333 if (XOR (islower (i), ISLOWER (i))
12334 || toupper (i) != TOUPPER (i))
12335 return 2;
a9322a30
TT
12336 return 0;
12337}
bec39cab 12338_ACEOF
05ea2a05 12339if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12340
5ee754fc 12341else
05ea2a05 12342 ac_cv_header_stdc=no
5ee754fc 12343fi
05ea2a05
TT
12344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12345 conftest.$ac_objext conftest.beam conftest.$ac_ext
81ecdfbb 12346fi
bec39cab 12347
05ea2a05
TT
12348fi
12349fi
12350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12351$as_echo "$ac_cv_header_stdc" >&6; }
12352if test $ac_cv_header_stdc = yes; then
81ecdfbb 12353
05ea2a05
TT
12354$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12355
12356fi
81ecdfbb 12357
05ea2a05
TT
12358 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12359# for constant arguments. Useless!
12360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12361$as_echo_n "checking for working alloca.h... " >&6; }
12362if ${ac_cv_working_alloca_h+:} false; then :
12363 $as_echo_n "(cached) " >&6
12364else
12365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12366/* end confdefs.h. */
12367#include <alloca.h>
7eb368b3
NR
12368int
12369main ()
12370{
05ea2a05
TT
12371char *p = (char *) alloca (2 * sizeof (int));
12372 if (p) return 0;
7eb368b3
NR
12373 ;
12374 return 0;
12375}
12376_ACEOF
05ea2a05
TT
12377if ac_fn_c_try_link "$LINENO"; then :
12378 ac_cv_working_alloca_h=yes
81ecdfbb 12379else
05ea2a05 12380 ac_cv_working_alloca_h=no
a9322a30 12381fi
05ea2a05
TT
12382rm -f core conftest.err conftest.$ac_objext \
12383 conftest$ac_exeext conftest.$ac_ext
a9322a30 12384fi
05ea2a05
TT
12385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12386$as_echo "$ac_cv_working_alloca_h" >&6; }
12387if test $ac_cv_working_alloca_h = yes; then
12388
12389$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7eb368b3 12390
7eb368b3 12391fi
05ea2a05
TT
12392
12393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12394$as_echo_n "checking for alloca... " >&6; }
12395if ${ac_cv_func_alloca_works+:} false; then :
12396 $as_echo_n "(cached) " >&6
bec39cab 12397else
81ecdfbb 12398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12399/* end confdefs.h. */
05ea2a05
TT
12400#ifdef __GNUC__
12401# define alloca __builtin_alloca
12402#else
12403# ifdef _MSC_VER
12404# include <malloc.h>
12405# define alloca _alloca
12406# else
12407# ifdef HAVE_ALLOCA_H
12408# include <alloca.h>
12409# else
12410# ifdef _AIX
12411 #pragma alloca
12412# else
12413# ifndef alloca /* predefined by HP cc +Olibcalls */
12414void *alloca (size_t);
12415# endif
12416# endif
12417# endif
12418# endif
12419#endif
12420
d3ea6809
MM
12421int
12422main ()
12423{
05ea2a05
TT
12424char *p = (char *) alloca (1);
12425 if (p) return 0;
81ecdfbb
RW
12426 ;
12427 return 0;
d3ea6809
MM
12428}
12429_ACEOF
05ea2a05
TT
12430if ac_fn_c_try_link "$LINENO"; then :
12431 ac_cv_func_alloca_works=yes
d3ea6809 12432else
05ea2a05 12433 ac_cv_func_alloca_works=no
a9322a30 12434fi
05ea2a05
TT
12435rm -f core conftest.err conftest.$ac_objext \
12436 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 12437fi
05ea2a05
TT
12438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12439$as_echo "$ac_cv_func_alloca_works" >&6; }
81ecdfbb 12440
05ea2a05 12441if test $ac_cv_func_alloca_works = yes; then
d3ea6809 12442
05ea2a05 12443$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
d3ea6809 12444
05ea2a05
TT
12445else
12446 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12447# that cause trouble. Some versions do not even contain alloca or
12448# contain a buggy version. If you still want to use their alloca,
12449# use ar to extract alloca.o from them instead of compiling alloca.c.
d3ea6809 12450
05ea2a05 12451ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
d0ac1c44 12452
05ea2a05 12453$as_echo "#define C_ALLOCA 1" >>confdefs.h
d0ac1c44
SM
12454
12455
05ea2a05
TT
12456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12457$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12458if ${ac_cv_os_cray+:} false; then :
12459 $as_echo_n "(cached) " >&6
12460else
12461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12462/* end confdefs.h. */
12463#if defined CRAY && ! defined CRAY2
12464webecray
12465#else
12466wenotbecray
12467#endif
12468
12469_ACEOF
12470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12471 $EGREP "webecray" >/dev/null 2>&1; then :
12472 ac_cv_os_cray=yes
12473else
12474 ac_cv_os_cray=no
12475fi
12476rm -f conftest*
12477
12478fi
12479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12480$as_echo "$ac_cv_os_cray" >&6; }
12481if test $ac_cv_os_cray = yes; then
12482 for ac_func in _getb67 GETB67 getb67; do
12483 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12484ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12485if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12486
12487cat >>confdefs.h <<_ACEOF
12488#define CRAY_STACKSEG_END $ac_func
12489_ACEOF
12490
12491 break
12492fi
12493
12494 done
12495fi
12496
12497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12498$as_echo_n "checking stack direction for C alloca... " >&6; }
12499if ${ac_cv_c_stack_direction+:} false; then :
12500 $as_echo_n "(cached) " >&6
12501else
12502 if test "$cross_compiling" = yes; then :
12503 ac_cv_c_stack_direction=0
12504else
12505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12506/* end confdefs.h. */
12507$ac_includes_default
12508int
12509find_stack_direction (int *addr, int depth)
12510{
12511 int dir, dummy = 0;
12512 if (! addr)
12513 addr = &dummy;
12514 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12515 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12516 return dir + dummy;
12517}
12518
12519int
12520main (int argc, char **argv)
12521{
12522 return find_stack_direction (0, argc + !argv + 20) < 0;
12523}
12524_ACEOF
12525if ac_fn_c_try_run "$LINENO"; then :
12526 ac_cv_c_stack_direction=1
12527else
12528 ac_cv_c_stack_direction=-1
12529fi
12530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12531 conftest.$ac_objext conftest.beam conftest.$ac_ext
12532fi
12533
12534fi
12535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12536$as_echo "$ac_cv_c_stack_direction" >&6; }
12537cat >>confdefs.h <<_ACEOF
12538#define STACK_DIRECTION $ac_cv_c_stack_direction
12539_ACEOF
12540
12541
12542fi
12543
12544
12545 WIN32APILIBS=
12546 case ${host} in
12547 *mingw32*)
12548
12549$as_echo "#define USE_WIN32API 1" >>confdefs.h
12550
12551 WIN32APILIBS="-lws2_32"
12552 ;;
12553 esac
12554
12555
12556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12557$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12558if ${am_cv_langinfo_codeset+:} false; then :
12559 $as_echo_n "(cached) " >&6
12560else
12561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12562/* end confdefs.h. */
12563#include <langinfo.h>
12564int
12565main ()
12566{
12567char* cs = nl_langinfo(CODESET);
12568 ;
12569 return 0;
12570}
12571_ACEOF
12572if ac_fn_c_try_link "$LINENO"; then :
12573 am_cv_langinfo_codeset=yes
12574else
12575 am_cv_langinfo_codeset=no
12576fi
12577rm -f core conftest.err conftest.$ac_objext \
12578 conftest$ac_exeext conftest.$ac_ext
12579
12580fi
12581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12582$as_echo "$am_cv_langinfo_codeset" >&6; }
12583 if test $am_cv_langinfo_codeset = yes; then
12584
12585$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12586
12587 fi
12588
12589
12590 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
12591do :
12592 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
05ea2a05 12593ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12594if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12595 cat >>confdefs.h <<_ACEOF
81ecdfbb 12596#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12597_ACEOF
b757528f 12598
b757528f 12599fi
bec39cab 12600
a9322a30 12601done
a3828db0 12602
d0ac1c44
SM
12603
12604
a9322a30 12605for ac_func in getpagesize
81ecdfbb
RW
12606do :
12607 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12608if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12609 cat >>confdefs.h <<_ACEOF
81ecdfbb 12610#define HAVE_GETPAGESIZE 1
bec39cab 12611_ACEOF
bcb3dc3d 12612
bcb3dc3d
MK
12613fi
12614done
12615
81ecdfbb
RW
12616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12617$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12618if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12619 $as_echo_n "(cached) " >&6
a9322a30 12620else
81ecdfbb 12621 if test "$cross_compiling" = yes; then :
a9322a30 12622 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12623else
81ecdfbb 12624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12625/* end confdefs.h. */
a9322a30
TT
12626$ac_includes_default
12627/* malloc might have been renamed as rpl_malloc. */
12628#undef malloc
bec39cab 12629
a9322a30
TT
12630/* Thanks to Mike Haertel and Jim Avera for this test.
12631 Here is a matrix of mmap possibilities:
12632 mmap private not fixed
12633 mmap private fixed at somewhere currently unmapped
12634 mmap private fixed at somewhere already mapped
12635 mmap shared not fixed
12636 mmap shared fixed at somewhere currently unmapped
12637 mmap shared fixed at somewhere already mapped
12638 For private mappings, we should verify that changes cannot be read()
12639 back from the file, nor mmap's back from the file at a different
12640 address. (There have been systems where private was not correctly
12641 implemented like the infamous i386 svr4.0, and systems where the
12642 VM page cache was not coherent with the file system buffer cache
12643 like early versions of FreeBSD and possibly contemporary NetBSD.)
12644 For shared mappings, we should conversely verify that changes get
12645 propagated back to all the places they're supposed to be.
bec39cab 12646
a9322a30
TT
12647 Grep wants private fixed already mapped.
12648 The main things grep needs to know about mmap are:
12649 * does it exist and is it safe to write into the mmap'd area
12650 * how to use it (BSD variants) */
8b9cf735 12651
a9322a30
TT
12652#include <fcntl.h>
12653#include <sys/mman.h>
8b9cf735 12654
81ecdfbb 12655#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12656char *malloc ();
a3828db0
MK
12657#endif
12658
a9322a30 12659/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12660#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12661# ifdef _SC_PAGESIZE
12662# define getpagesize() sysconf(_SC_PAGESIZE)
12663# else /* no _SC_PAGESIZE */
81ecdfbb 12664# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12665# include <sys/param.h>
12666# ifdef EXEC_PAGESIZE
12667# define getpagesize() EXEC_PAGESIZE
12668# else /* no EXEC_PAGESIZE */
12669# ifdef NBPG
12670# define getpagesize() NBPG * CLSIZE
12671# ifndef CLSIZE
12672# define CLSIZE 1
12673# endif /* no CLSIZE */
12674# else /* no NBPG */
12675# ifdef NBPC
12676# define getpagesize() NBPC
12677# else /* no NBPC */
12678# ifdef PAGESIZE
12679# define getpagesize() PAGESIZE
12680# endif /* PAGESIZE */
12681# endif /* no NBPC */
12682# endif /* no NBPG */
12683# endif /* no EXEC_PAGESIZE */
12684# else /* no HAVE_SYS_PARAM_H */
12685# define getpagesize() 8192 /* punt totally */
12686# endif /* no HAVE_SYS_PARAM_H */
12687# endif /* no _SC_PAGESIZE */
12688
12689#endif /* no HAVE_GETPAGESIZE */
12690
bec39cab
AC
12691int
12692main ()
12693{
a9322a30 12694 char *data, *data2, *data3;
d0ac1c44 12695 const char *cdata2;
a9322a30 12696 int i, pagesize;
d0ac1c44 12697 int fd, fd2;
a9322a30
TT
12698
12699 pagesize = getpagesize ();
12700
12701 /* First, make a file with some known garbage in it. */
12702 data = (char *) malloc (pagesize);
12703 if (!data)
81ecdfbb 12704 return 1;
a9322a30
TT
12705 for (i = 0; i < pagesize; ++i)
12706 *(data + i) = rand ();
12707 umask (0);
12708 fd = creat ("conftest.mmap", 0600);
12709 if (fd < 0)
d0ac1c44 12710 return 2;
a9322a30 12711 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 12712 return 3;
a9322a30
TT
12713 close (fd);
12714
d0ac1c44
SM
12715 /* Next, check that the tail of a page is zero-filled. File must have
12716 non-zero length, otherwise we risk SIGBUS for entire page. */
12717 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12718 if (fd2 < 0)
12719 return 4;
12720 cdata2 = "";
12721 if (write (fd2, cdata2, 1) != 1)
12722 return 5;
12723 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12724 if (data2 == MAP_FAILED)
12725 return 6;
12726 for (i = 0; i < pagesize; ++i)
12727 if (*(data2 + i))
12728 return 7;
12729 close (fd2);
12730 if (munmap (data2, pagesize))
12731 return 8;
12732
a9322a30
TT
12733 /* Next, try to mmap the file at a fixed address which already has
12734 something else allocated at it. If we can, also make sure that
12735 we see the same garbage. */
12736 fd = open ("conftest.mmap", O_RDWR);
12737 if (fd < 0)
d0ac1c44 12738 return 9;
a9322a30
TT
12739 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12740 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 12741 return 10;
a9322a30
TT
12742 for (i = 0; i < pagesize; ++i)
12743 if (*(data + i) != *(data2 + i))
d0ac1c44 12744 return 11;
a9322a30
TT
12745
12746 /* Finally, make sure that changes to the mapped area do not
12747 percolate back to the file as seen by read(). (This is a bug on
12748 some variants of i386 svr4.0.) */
12749 for (i = 0; i < pagesize; ++i)
12750 *(data2 + i) = *(data2 + i) + 1;
12751 data3 = (char *) malloc (pagesize);
12752 if (!data3)
d0ac1c44 12753 return 12;
a9322a30 12754 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 12755 return 13;
a9322a30
TT
12756 for (i = 0; i < pagesize; ++i)
12757 if (*(data + i) != *(data3 + i))
d0ac1c44 12758 return 14;
a9322a30 12759 close (fd);
81ecdfbb 12760 return 0;
bec39cab
AC
12761}
12762_ACEOF
81ecdfbb 12763if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12764 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12765else
81ecdfbb 12766 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12767fi
81ecdfbb
RW
12768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12769 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12770fi
81ecdfbb 12771
a9322a30 12772fi
81ecdfbb
RW
12773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12774$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12775if test $ac_cv_func_mmap_fixed_mapped = yes; then
12776
81ecdfbb 12777$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12778
086ec9eb 12779fi
d0ac1c44 12780rm -f conftest.mmap conftest.txt
a3828db0 12781
05ea2a05 12782 for ac_header in vfork.h
81ecdfbb
RW
12783do :
12784 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 12785if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 12786 cat >>confdefs.h <<_ACEOF
81ecdfbb 12787#define HAVE_VFORK_H 1
bec39cab 12788_ACEOF
c906108c
SS
12789
12790fi
a9322a30 12791
a3828db0 12792done
c906108c 12793
a9322a30 12794for ac_func in fork vfork
81ecdfbb
RW
12795do :
12796 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12797ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 12798if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 12799 cat >>confdefs.h <<_ACEOF
81ecdfbb 12800#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12801_ACEOF
b83266a0 12802
97bf5e38 12803fi
a3828db0 12804done
b83266a0 12805
a9322a30 12806if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12808$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 12809if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 12810 $as_echo_n "(cached) " >&6
a9322a30 12811else
81ecdfbb 12812 if test "$cross_compiling" = yes; then :
a9322a30
TT
12813 ac_cv_func_fork_works=cross
12814else
81ecdfbb
RW
12815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12816/* end confdefs.h. */
12817$ac_includes_default
12818int
12819main ()
12820{
12821
12822 /* By Ruediger Kuhlmann. */
12823 return fork () < 0;
12824
12825 ;
12826 return 0;
12827}
a9322a30 12828_ACEOF
81ecdfbb 12829if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12830 ac_cv_func_fork_works=yes
12831else
81ecdfbb 12832 ac_cv_func_fork_works=no
a9322a30 12833fi
81ecdfbb
RW
12834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12835 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12836fi
81ecdfbb 12837
a9322a30 12838fi
81ecdfbb
RW
12839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12840$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12841
12842else
12843 ac_cv_func_fork_works=$ac_cv_func_fork
12844fi
12845if test "x$ac_cv_func_fork_works" = xcross; then
12846 case $host in
12847 *-*-amigaos* | *-*-msdosdjgpp*)
12848 # Override, as these systems have only a dummy fork() stub
12849 ac_cv_func_fork_works=no
12850 ;;
12851 *)
12852 ac_cv_func_fork_works=yes
12853 ;;
12854 esac
81ecdfbb
RW
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12856$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12857fi
12858ac_cv_func_vfork_works=$ac_cv_func_vfork
12859if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12861$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 12862if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 12863 $as_echo_n "(cached) " >&6
a9322a30 12864else
81ecdfbb 12865 if test "$cross_compiling" = yes; then :
a9322a30
TT
12866 ac_cv_func_vfork_works=cross
12867else
81ecdfbb 12868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12869/* end confdefs.h. */
12870/* Thanks to Paul Eggert for this test. */
81ecdfbb 12871$ac_includes_default
a9322a30 12872#include <sys/wait.h>
81ecdfbb 12873#ifdef HAVE_VFORK_H
a9322a30
TT
12874# include <vfork.h>
12875#endif
12876/* On some sparc systems, changes by the child to local and incoming
12877 argument registers are propagated back to the parent. The compiler
12878 is told about this with #include <vfork.h>, but some compilers
12879 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12880 static variable whose address is put into a register that is
12881 clobbered by the vfork. */
12882static void
12883#ifdef __cplusplus
12884sparc_address_test (int arg)
12885# else
12886sparc_address_test (arg) int arg;
12887#endif
12888{
12889 static pid_t child;
12890 if (!child) {
12891 child = vfork ();
12892 if (child < 0) {
12893 perror ("vfork");
12894 _exit(2);
12895 }
12896 if (!child) {
12897 arg = getpid();
12898 write(-1, "", 0);
12899 _exit (arg);
12900 }
12901 }
12902}
12903
12904int
12905main ()
12906{
12907 pid_t parent = getpid ();
12908 pid_t child;
12909
12910 sparc_address_test (0);
12911
12912 child = vfork ();
12913
12914 if (child == 0) {
12915 /* Here is another test for sparc vfork register problems. This
12916 test uses lots of local variables, at least as many local
12917 variables as main has allocated so far including compiler
12918 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12919 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12920 reuse the register of parent for one of the local variables,
12921 since it will think that parent can't possibly be used any more
12922 in this routine. Assigning to the local variable will thus
12923 munge parent in the parent process. */
12924 pid_t
12925 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12926 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12927 /* Convince the compiler that p..p7 are live; otherwise, it might
12928 use the same hardware register for all 8 local variables. */
12929 if (p != p1 || p != p2 || p != p3 || p != p4
12930 || p != p5 || p != p6 || p != p7)
12931 _exit(1);
12932
12933 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12934 from child file descriptors. If the child closes a descriptor
12935 before it execs or exits, this munges the parent's descriptor
12936 as well. Test for this by closing stdout in the child. */
12937 _exit(close(fileno(stdout)) != 0);
12938 } else {
12939 int status;
12940 struct stat st;
12941
12942 while (wait(&status) != child)
12943 ;
81ecdfbb 12944 return (
a9322a30
TT
12945 /* Was there some problem with vforking? */
12946 child < 0
12947
12948 /* Did the child fail? (This shouldn't happen.) */
12949 || status
12950
12951 /* Did the vfork/compiler bug occur? */
12952 || parent != getpid()
12953
12954 /* Did the file descriptor bug occur? */
12955 || fstat(fileno(stdout), &st) != 0
12956 );
12957 }
12958}
12959_ACEOF
81ecdfbb 12960if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12961 ac_cv_func_vfork_works=yes
12962else
81ecdfbb 12963 ac_cv_func_vfork_works=no
a9322a30 12964fi
81ecdfbb
RW
12965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12966 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12967fi
81ecdfbb 12968
a9322a30 12969fi
81ecdfbb
RW
12970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12971$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12972
12973fi;
12974if test "x$ac_cv_func_fork_works" = xcross; then
12975 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12976 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12977$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12978fi
12979
12980if test "x$ac_cv_func_vfork_works" = xyes; then
12981
81ecdfbb 12982$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12983
12984else
12985
81ecdfbb 12986$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12987
12988fi
12989if test "x$ac_cv_func_fork_works" = xyes; then
12990
81ecdfbb 12991$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12992
12993fi
12994
05ea2a05
TT
12995 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
12996 ptrace64 sbrk setns sigaltstack sigprocmask \
12997 setpgid setpgrp getrusage getauxval
81ecdfbb
RW
12998do :
12999 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13000ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13001if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13002 cat >>confdefs.h <<_ACEOF
81ecdfbb 13003#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13004_ACEOF
13005
13006fi
13007done
13008
13009
05ea2a05
TT
13010 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13011"
13012if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13013 ac_have_decl=1
6c7a06a3 13014else
05ea2a05
TT
13015 ac_have_decl=0
13016fi
13017
13018cat >>confdefs.h <<_ACEOF
13019#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13020_ACEOF
13021
13022
13023 if test "$cross_compiling" = yes; then :
81ecdfbb 13024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3 13025/* end confdefs.h. */
05ea2a05 13026#include <sys/personality.h>
6c7a06a3
TT
13027int
13028main ()
13029{
05ea2a05
TT
13030
13031 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13032 # define ADDR_NO_RANDOMIZE 0x0040000
13033 # endif
13034 /* Test the flag could be set and stays set. */
13035 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13036 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13037 return 1
bec39cab
AC
13038 ;
13039 return 0;
13040}
13041_ACEOF
81ecdfbb 13042if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13043 have_personality=true
a4db0f07 13044else
05ea2a05 13045 have_personality=false
a4db0f07 13046fi
81ecdfbb
RW
13047rm -f core conftest.err conftest.$ac_objext \
13048 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13049else
13050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13051/* end confdefs.h. */
13052#include <sys/personality.h>
13053int
13054main ()
13055{
6c7a06a3 13056
05ea2a05
TT
13057 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13058 # define ADDR_NO_RANDOMIZE 0x0040000
13059 # endif
13060 /* Test the flag could be set and stays set. */
13061 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13062 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13063 return 1
13064 ;
13065 return 0;
13066}
13067_ACEOF
13068if ac_fn_c_try_run "$LINENO"; then :
13069 have_personality=true
13070else
13071 have_personality=false
13072fi
13073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13074 conftest.$ac_objext conftest.beam conftest.$ac_ext
a4db0f07 13075fi
6c7a06a3 13076
05ea2a05
TT
13077 if $have_personality
13078 then
a4db0f07 13079
05ea2a05 13080$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
c906108c 13081
05ea2a05 13082 fi
d0ac1c44 13083
05ea2a05
TT
13084 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13085if test "x$ac_cv_have_decl_strstr" = xyes; then :
13086 ac_have_decl=1
d0ac1c44 13087else
05ea2a05
TT
13088 ac_have_decl=0
13089fi
d0ac1c44
SM
13090
13091cat >>confdefs.h <<_ACEOF
05ea2a05
TT
13092#define HAVE_DECL_STRSTR $ac_have_decl
13093_ACEOF
13094
13095
13096 # ----------------------- #
13097 # Checks for structures. #
13098 # ----------------------- #
13099
13100 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13101if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13102
13103cat >>confdefs.h <<_ACEOF
13104#define HAVE_STRUCT_STAT_ST_BLOCKS 1
d0ac1c44
SM
13105_ACEOF
13106
05ea2a05 13107
d0ac1c44 13108fi
05ea2a05
TT
13109ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13110if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
d0ac1c44 13111
05ea2a05
TT
13112cat >>confdefs.h <<_ACEOF
13113#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13114_ACEOF
13115
13116
13117fi
13118
13119
13120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13121$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13122if ${ac_cv_search_kinfo_getfile+:} false; then :
5e030278
TT
13123 $as_echo_n "(cached) " >&6
13124else
05ea2a05
TT
13125 ac_func_search_save_LIBS=$LIBS
13126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13127/* end confdefs.h. */
3266f10b 13128
05ea2a05
TT
13129/* Override any GCC internal prototype to avoid an error.
13130 Use char because int might match the return type of a GCC
13131 builtin and then its argument prototype would still apply. */
13132#ifdef __cplusplus
13133extern "C"
13134#endif
13135char kinfo_getfile ();
3266f10b
TT
13136int
13137main ()
13138{
05ea2a05 13139return kinfo_getfile ();
3266f10b
TT
13140 ;
13141 return 0;
13142}
13143_ACEOF
05ea2a05
TT
13144for ac_lib in '' util util-freebsd; do
13145 if test -z "$ac_lib"; then
13146 ac_res="none required"
13147 else
13148 ac_res=-l$ac_lib
13149 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13150 fi
13151 if ac_fn_c_try_link "$LINENO"; then :
13152 ac_cv_search_kinfo_getfile=$ac_res
3266f10b 13153fi
05ea2a05
TT
13154rm -f core conftest.err conftest.$ac_objext \
13155 conftest$ac_exeext
13156 if ${ac_cv_search_kinfo_getfile+:} false; then :
13157 break
13158fi
13159done
13160if ${ac_cv_search_kinfo_getfile+:} false; then :
3266f10b
TT
13161
13162else
05ea2a05 13163 ac_cv_search_kinfo_getfile=no
3266f10b 13164fi
05ea2a05
TT
13165rm conftest.$ac_ext
13166LIBS=$ac_func_search_save_LIBS
13167fi
13168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13169$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13170ac_res=$ac_cv_search_kinfo_getfile
13171if test "$ac_res" != no; then :
13172 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13173
13174$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
3266f10b
TT
13175
13176fi
13177
3266f10b 13178
05ea2a05
TT
13179 # Check for std::thread. This does not work on some platforms, like
13180 # mingw and DJGPP.
13181 ac_ext=cpp
13182ac_cpp='$CXXCPP $CPPFLAGS'
13183ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13184ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13185ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3266f10b 13186
3266f10b 13187
3266f10b 13188
3266f10b 13189
3266f10b 13190
05ea2a05
TT
13191ac_ext=c
13192ac_cpp='$CPP $CPPFLAGS'
13193ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13194ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13195ac_compiler_gnu=$ac_cv_c_compiler_gnu
3266f10b 13196
05ea2a05 13197ax_pthread_ok=no
3266f10b 13198
05ea2a05
TT
13199# We used to check for pthread.h first, but this fails if pthread.h
13200# requires special compiler flags (e.g. on Tru64 or Sequent).
13201# It gets checked for in the link test anyway.
3266f10b 13202
05ea2a05
TT
13203# First of all, check if the user has set any of the PTHREAD_LIBS,
13204# etcetera environment variables, and if threads linking works using
13205# them:
13206if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13207 ax_pthread_save_CC="$CC"
13208 ax_pthread_save_CFLAGS="$CFLAGS"
13209 ax_pthread_save_LIBS="$LIBS"
13210 if test "x$PTHREAD_CC" != "x"; then :
13211 CC="$PTHREAD_CC"
3266f10b 13212fi
05ea2a05
TT
13213 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13214 LIBS="$PTHREAD_LIBS $LIBS"
13215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13216$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13218/* end confdefs.h. */
05ea2a05
TT
13219
13220/* Override any GCC internal prototype to avoid an error.
13221 Use char because int might match the return type of a GCC
13222 builtin and then its argument prototype would still apply. */
13223#ifdef __cplusplus
13224extern "C"
13225#endif
13226char pthread_join ();
3266f10b
TT
13227int
13228main ()
13229{
05ea2a05 13230return pthread_join ();
3266f10b
TT
13231 ;
13232 return 0;
13233}
13234_ACEOF
13235if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13236 ax_pthread_ok=yes
3266f10b
TT
13237fi
13238rm -f core conftest.err conftest.$ac_objext \
13239 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13241$as_echo "$ax_pthread_ok" >&6; }
13242 if test "x$ax_pthread_ok" = "xno"; then
13243 PTHREAD_LIBS=""
13244 PTHREAD_CFLAGS=""
13245 fi
13246 CC="$ax_pthread_save_CC"
13247 CFLAGS="$ax_pthread_save_CFLAGS"
13248 LIBS="$ax_pthread_save_LIBS"
3266f10b 13249fi
3266f10b 13250
05ea2a05
TT
13251# We must check for the threads library under a number of different
13252# names; the ordering is very important because some systems
13253# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13254# libraries is broken (non-POSIX).
3266f10b 13255
05ea2a05
TT
13256# Create a list of thread flags to try. Items starting with a "-" are
13257# C compiler flags, and other items are library names, except for "none"
13258# which indicates that we try without any flags at all, and "pthread-config"
13259# which is a program returning the flags for the Pth emulation library.
3266f10b 13260
05ea2a05 13261ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3266f10b 13262
05ea2a05
TT
13263# The ordering *is* (sometimes) important. Some notes on the
13264# individual items follow:
3266f10b 13265
05ea2a05
TT
13266# pthreads: AIX (must check this before -lpthread)
13267# none: in case threads are in libc; should be tried before -Kthread and
13268# other compiler flags to prevent continual compiler warnings
13269# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13270# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13271# (Note: HP C rejects this with "bad form for `-t' option")
13272# -pthreads: Solaris/gcc (Note: HP C also rejects)
13273# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13274# doesn't hurt to check since this sometimes defines pthreads and
13275# -D_REENTRANT too), HP C (must be checked before -lpthread, which
13276# is present but should not be used directly; and before -mthreads,
13277# because the compiler interprets this as "-mt" + "-hreads")
13278# -mthreads: Mingw32/gcc, Lynx/gcc
13279# pthread: Linux, etcetera
13280# --thread-safe: KAI C++
13281# pthread-config: use pthread-config program (for GNU Pth library)
3266f10b 13282
05ea2a05 13283case $host_os in
3266f10b 13284
05ea2a05 13285 freebsd*)
3266f10b 13286
05ea2a05
TT
13287 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13288 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3266f10b 13289
05ea2a05
TT
13290 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13291 ;;
3266f10b 13292
05ea2a05 13293 hpux*)
3266f10b 13294
05ea2a05
TT
13295 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13296 # multi-threading and also sets -lpthread."
13297
13298 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13299 ;;
13300
13301 openedition*)
13302
13303 # IBM z/OS requires a feature-test macro to be defined in order to
13304 # enable POSIX threads at all, so give the user a hint if this is
13305 # not set. (We don't define these ourselves, as they can affect
13306 # other portions of the system API in unpredictable ways.)
13307
13308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13309/* end confdefs.h. */
05ea2a05
TT
13310
13311# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13312 AX_PTHREAD_ZOS_MISSING
13313# endif
3266f10b
TT
13314
13315_ACEOF
13316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
05ea2a05
TT
13317 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13318 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13319$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
3266f10b
TT
13320fi
13321rm -f conftest*
13322
05ea2a05 13323 ;;
3266f10b 13324
05ea2a05 13325 solaris*)
3266f10b 13326
05ea2a05
TT
13327 # On Solaris (at least, for some versions), libc contains stubbed
13328 # (non-functional) versions of the pthreads routines, so link-based
13329 # tests will erroneously succeed. (N.B.: The stubs are missing
13330 # pthread_cleanup_push, or rather a function called by this macro,
13331 # so we could check for that, but who knows whether they'll stub
13332 # that too in a future libc.) So we'll check first for the
13333 # standard Solaris way of linking pthreads (-mt -lpthread).
13334
13335 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13336 ;;
13337esac
13338
13339# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13340
13341if test "x$GCC" = "xyes"; then :
13342 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
3266f10b
TT
13343fi
13344
05ea2a05
TT
13345# The presence of a feature test macro requesting re-entrant function
13346# definitions is, on some systems, a strong hint that pthreads support is
13347# correctly enabled
13348
13349case $host_os in
13350 darwin* | hpux* | linux* | osf* | solaris*)
13351 ax_pthread_check_macro="_REENTRANT"
13352 ;;
13353
13354 aix*)
13355 ax_pthread_check_macro="_THREAD_SAFE"
13356 ;;
13357
13358 *)
13359 ax_pthread_check_macro="--"
13360 ;;
13361esac
13362if test "x$ax_pthread_check_macro" = "x--"; then :
13363 ax_pthread_check_cond=0
13364else
13365 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
3266f10b
TT
13366fi
13367
05ea2a05
TT
13368# Are we compiling with Clang?
13369
13370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13371$as_echo_n "checking whether $CC is Clang... " >&6; }
13372if ${ax_cv_PTHREAD_CLANG+:} false; then :
3266f10b
TT
13373 $as_echo_n "(cached) " >&6
13374else
05ea2a05
TT
13375 ax_cv_PTHREAD_CLANG=no
13376 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13377 if test "x$GCC" = "xyes"; then
13378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13379/* end confdefs.h. */
05ea2a05
TT
13380/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13381# if defined(__clang__) && defined(__llvm__)
13382 AX_PTHREAD_CC_IS_CLANG
13383# endif
3266f10b 13384
3266f10b 13385_ACEOF
05ea2a05
TT
13386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13387 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13388 ax_cv_PTHREAD_CLANG=yes
3266f10b 13389fi
05ea2a05
TT
13390rm -f conftest*
13391
13392 fi
3266f10b
TT
13393
13394fi
05ea2a05
TT
13395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13396$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13397ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
3266f10b 13398
05ea2a05 13399ax_pthread_clang_warning=no
3266f10b 13400
05ea2a05
TT
13401# Clang needs special handling, because older versions handle the -pthread
13402# option in a rather... idiosyncratic way
3266f10b 13403
05ea2a05 13404if test "x$ax_pthread_clang" = "xyes"; then
3266f10b 13405
05ea2a05 13406 # Clang takes -pthread; it has never supported any other flag
b2ceabe8 13407
05ea2a05
TT
13408 # (Note 1: This will need to be revisited if a system that Clang
13409 # supports has POSIX threads in a separate library. This tends not
13410 # to be the way of modern systems, but it's conceivable.)
b2ceabe8 13411
05ea2a05
TT
13412 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13413 # to get POSIX threads support; the API is always present and
13414 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13415 # -pthread does define _REENTRANT, and while the Darwin headers
13416 # ignore this macro, third-party headers might not.)
b2ceabe8 13417
05ea2a05
TT
13418 PTHREAD_CFLAGS="-pthread"
13419 PTHREAD_LIBS=
3266f10b 13420
05ea2a05
TT
13421 ax_pthread_ok=yes
13422
13423 # However, older versions of Clang make a point of warning the user
13424 # that, in an invocation where only linking and no compilation is
13425 # taking place, the -pthread option has no effect ("argument unused
13426 # during compilation"). They expect -pthread to be passed in only
13427 # when source code is being compiled.
13428 #
13429 # Problem is, this is at odds with the way Automake and most other
13430 # C build frameworks function, which is that the same flags used in
13431 # compilation (CFLAGS) are also used in linking. Many systems
13432 # supported by AX_PTHREAD require exactly this for POSIX threads
13433 # support, and in fact it is often not straightforward to specify a
13434 # flag that is used only in the compilation phase and not in
13435 # linking. Such a scenario is extremely rare in practice.
13436 #
13437 # Even though use of the -pthread flag in linking would only print
13438 # a warning, this can be a nuisance for well-run software projects
13439 # that build with -Werror. So if the active version of Clang has
13440 # this misfeature, we search for an option to squash it.
13441
13442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13443$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13444if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13445 $as_echo_n "(cached) " >&6
13446else
13447 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13448 # Create an alternate version of $ac_link that compiles and
13449 # links in two steps (.c -> .o, .o -> exe) instead of one
13450 # (.c -> exe), because the warning occurs only in the second
13451 # step
13452 ax_pthread_save_ac_link="$ac_link"
13453 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13454 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13455 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13456 ax_pthread_save_CFLAGS="$CFLAGS"
13457 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13458 if test "x$ax_pthread_try" = "xunknown"; then :
13459 break
13460fi
13461 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13462 ac_link="$ax_pthread_save_ac_link"
13463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13464/* end confdefs.h. */
13465int main(void){return 0;}
3266f10b
TT
13466_ACEOF
13467if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
13468 ac_link="$ax_pthread_2step_ac_link"
13469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13470/* end confdefs.h. */
13471int main(void){return 0;}
13472_ACEOF
13473if ac_fn_c_try_link "$LINENO"; then :
13474 break
3266f10b
TT
13475fi
13476rm -f core conftest.err conftest.$ac_objext \
13477 conftest$ac_exeext conftest.$ac_ext
13478
13479fi
05ea2a05
TT
13480rm -f core conftest.err conftest.$ac_objext \
13481 conftest$ac_exeext conftest.$ac_ext
13482 done
13483 ac_link="$ax_pthread_save_ac_link"
13484 CFLAGS="$ax_pthread_save_CFLAGS"
13485 if test "x$ax_pthread_try" = "x"; then :
13486 ax_pthread_try=no
13487fi
13488 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
3266f10b 13489
05ea2a05
TT
13490fi
13491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13492$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
3266f10b 13493
05ea2a05
TT
13494 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13495 no | unknown) ;;
13496 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13497 esac
3266f10b 13498
05ea2a05 13499fi # $ax_pthread_clang = yes
3266f10b 13500
05ea2a05
TT
13501if test "x$ax_pthread_ok" = "xno"; then
13502for ax_pthread_try_flag in $ax_pthread_flags; do
3266f10b 13503
05ea2a05
TT
13504 case $ax_pthread_try_flag in
13505 none)
13506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13507$as_echo_n "checking whether pthreads work without any flags... " >&6; }
13508 ;;
3266f10b 13509
05ea2a05
TT
13510 -mt,pthread)
13511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13512$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13513 PTHREAD_CFLAGS="-mt"
13514 PTHREAD_LIBS="-lpthread"
13515 ;;
3266f10b 13516
05ea2a05
TT
13517 -*)
13518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13519$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13520 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13521 ;;
3266f10b 13522
05ea2a05
TT
13523 pthread-config)
13524 # Extract the first word of "pthread-config", so it can be a program name with args.
13525set dummy pthread-config; ac_word=$2
13526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13527$as_echo_n "checking for $ac_word... " >&6; }
13528if ${ac_cv_prog_ax_pthread_config+:} false; then :
13529 $as_echo_n "(cached) " >&6
13530else
13531 if test -n "$ax_pthread_config"; then
13532 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13533else
13534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13535for as_dir in $PATH
13536do
13537 IFS=$as_save_IFS
13538 test -z "$as_dir" && as_dir=.
13539 for ac_exec_ext in '' $ac_executable_extensions; do
13540 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13541 ac_cv_prog_ax_pthread_config="yes"
13542 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13543 break 2
13544 fi
3266f10b 13545done
05ea2a05
TT
13546 done
13547IFS=$as_save_IFS
3266f10b 13548
05ea2a05
TT
13549 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13550fi
13551fi
13552ax_pthread_config=$ac_cv_prog_ax_pthread_config
13553if test -n "$ax_pthread_config"; then
13554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13555$as_echo "$ax_pthread_config" >&6; }
3266f10b 13556else
05ea2a05
TT
13557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13558$as_echo "no" >&6; }
3266f10b
TT
13559fi
13560
5e030278 13561
05ea2a05
TT
13562 if test "x$ax_pthread_config" = "xno"; then :
13563 continue
13564fi
13565 PTHREAD_CFLAGS="`pthread-config --cflags`"
13566 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13567 ;;
5e030278 13568
05ea2a05
TT
13569 *)
13570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13571$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13572 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13573 ;;
13574 esac
5e030278 13575
5e030278
TT
13576 ax_pthread_save_CFLAGS="$CFLAGS"
13577 ax_pthread_save_LIBS="$LIBS"
5e030278
TT
13578 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13579 LIBS="$PTHREAD_LIBS $LIBS"
05ea2a05
TT
13580
13581 # Check for various functions. We must include pthread.h,
13582 # since some functions may be macros. (On the Sequent, we
13583 # need a special flag -Kthread to make this header compile.)
13584 # We check for pthread_join because it is in -lpthread on IRIX
13585 # while pthread_create is in libc. We check for pthread_attr_init
13586 # due to DEC craziness with -lpthreads. We check for
13587 # pthread_cleanup_push because it is one of the few pthread
13588 # functions on Solaris that doesn't have a non-functional libc stub.
13589 # We try pthread_create on general principles.
13590
5e030278
TT
13591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13592/* end confdefs.h. */
05ea2a05
TT
13593#include <pthread.h>
13594# if $ax_pthread_check_cond
13595# error "$ax_pthread_check_macro must be defined"
13596# endif
13597 static void routine(void *a) { a = 0; }
13598 static void *start_routine(void *a) { return a; }
5e030278
TT
13599int
13600main ()
13601{
05ea2a05
TT
13602pthread_t th; pthread_attr_t attr;
13603 pthread_create(&th, 0, start_routine, 0);
13604 pthread_join(th, 0);
13605 pthread_attr_init(&attr);
13606 pthread_cleanup_push(routine, 0);
13607 pthread_cleanup_pop(0) /* ; */
5e030278
TT
13608 ;
13609 return 0;
13610}
13611_ACEOF
13612if ac_fn_c_try_link "$LINENO"; then :
13613 ax_pthread_ok=yes
13614fi
13615rm -f core conftest.err conftest.$ac_objext \
13616 conftest$ac_exeext conftest.$ac_ext
05ea2a05 13617
5e030278
TT
13618 CFLAGS="$ax_pthread_save_CFLAGS"
13619 LIBS="$ax_pthread_save_LIBS"
05ea2a05
TT
13620
13621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13622$as_echo "$ax_pthread_ok" >&6; }
13623 if test "x$ax_pthread_ok" = "xyes"; then :
13624 break
5e030278
TT
13625fi
13626
05ea2a05
TT
13627 PTHREAD_LIBS=""
13628 PTHREAD_CFLAGS=""
13629done
13630fi
5e030278 13631
05ea2a05
TT
13632# Various other checks:
13633if test "x$ax_pthread_ok" = "xyes"; then
13634 ax_pthread_save_CFLAGS="$CFLAGS"
13635 ax_pthread_save_LIBS="$LIBS"
13636 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13637 LIBS="$PTHREAD_LIBS $LIBS"
5e030278 13638
05ea2a05
TT
13639 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
13640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
13641$as_echo_n "checking for joinable pthread attribute... " >&6; }
13642if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
13643 $as_echo_n "(cached) " >&6
13644else
13645 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
13646 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
13647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13648/* end confdefs.h. */
13649#include <pthread.h>
13650int
13651main ()
13652{
13653int attr = $ax_pthread_attr; return attr /* ; */
13654 ;
13655 return 0;
13656}
13657_ACEOF
13658if ac_fn_c_try_link "$LINENO"; then :
13659 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
13660fi
13661rm -f core conftest.err conftest.$ac_objext \
13662 conftest$ac_exeext conftest.$ac_ext
13663 done
5e030278 13664
05ea2a05
TT
13665fi
13666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
13667$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
13668 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
13669 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
13670 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
5e030278 13671
05ea2a05
TT
13672cat >>confdefs.h <<_ACEOF
13673#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
13674_ACEOF
5e030278 13675
05ea2a05 13676 ax_pthread_joinable_attr_defined=yes
5e030278 13677
05ea2a05 13678fi
5e030278 13679
05ea2a05
TT
13680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
13681$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
13682if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
13683 $as_echo_n "(cached) " >&6
13684else
13685 ax_cv_PTHREAD_SPECIAL_FLAGS=no
13686 case $host_os in
13687 solaris*)
13688 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
13689 ;;
13690 esac
5e030278 13691
05ea2a05
TT
13692fi
13693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
13694$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
13695 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
13696 test "x$ax_pthread_special_flags_added" != "xyes"; then :
13697 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
13698 ax_pthread_special_flags_added=yes
13699fi
5e030278 13700
05ea2a05
TT
13701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
13702$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
13703if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
13704 $as_echo_n "(cached) " >&6
13705else
13706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13707/* end confdefs.h. */
13708#include <pthread.h>
13709int
13710main ()
13711{
13712int i = PTHREAD_PRIO_INHERIT;
13713 ;
13714 return 0;
13715}
13716_ACEOF
13717if ac_fn_c_try_link "$LINENO"; then :
13718 ax_cv_PTHREAD_PRIO_INHERIT=yes
13719else
13720 ax_cv_PTHREAD_PRIO_INHERIT=no
13721fi
13722rm -f core conftest.err conftest.$ac_objext \
13723 conftest$ac_exeext conftest.$ac_ext
5e030278 13724
05ea2a05
TT
13725fi
13726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
13727$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
13728 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
13729 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
5e030278 13730
05ea2a05 13731$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
5e030278 13732
05ea2a05 13733 ax_pthread_prio_inherit_defined=yes
5e030278 13734
05ea2a05 13735fi
5e030278 13736
05ea2a05
TT
13737 CFLAGS="$ax_pthread_save_CFLAGS"
13738 LIBS="$ax_pthread_save_LIBS"
5e030278 13739
05ea2a05
TT
13740 # More AIX lossage: compile with *_r variant
13741 if test "x$GCC" != "xyes"; then
13742 case $host_os in
13743 aix*)
13744 case "x/$CC" in #(
13745 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
13746 #handle absolute path differently from PATH based program lookup
13747 case "x$CC" in #(
13748 x/*) :
13749 if as_fn_executable_p ${CC}_r; then :
13750 PTHREAD_CC="${CC}_r"
13751fi ;; #(
13752 *) :
13753 for ac_prog in ${CC}_r
13754do
13755 # Extract the first word of "$ac_prog", so it can be a program name with args.
13756set dummy $ac_prog; ac_word=$2
13757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13758$as_echo_n "checking for $ac_word... " >&6; }
13759if ${ac_cv_prog_PTHREAD_CC+:} false; then :
13760 $as_echo_n "(cached) " >&6
13761else
13762 if test -n "$PTHREAD_CC"; then
13763 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
13764else
13765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13766for as_dir in $PATH
13767do
13768 IFS=$as_save_IFS
13769 test -z "$as_dir" && as_dir=.
13770 for ac_exec_ext in '' $ac_executable_extensions; do
13771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13772 ac_cv_prog_PTHREAD_CC="$ac_prog"
13773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13774 break 2
13775 fi
13776done
13777 done
13778IFS=$as_save_IFS
5e030278 13779
5e030278 13780fi
05ea2a05
TT
13781fi
13782PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
13783if test -n "$PTHREAD_CC"; then
13784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
13785$as_echo "$PTHREAD_CC" >&6; }
13786else
13787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13788$as_echo "no" >&6; }
13789fi
5e030278 13790
5e030278 13791
05ea2a05
TT
13792 test -n "$PTHREAD_CC" && break
13793done
13794test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
13795 ;;
13796esac ;; #(
13797 *) :
13798 ;;
5e030278 13799esac
05ea2a05
TT
13800 ;;
13801 esac
13802 fi
13803fi
5e030278 13804
05ea2a05 13805test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
5e030278 13806
5e030278 13807
5e030278 13808
5e030278 13809
5e030278 13810
05ea2a05
TT
13811# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
13812if test "x$ax_pthread_ok" = "xyes"; then
13813 threads=yes
13814 :
5e030278 13815else
05ea2a05
TT
13816 ax_pthread_ok=no
13817 threads=no
5e030278 13818fi
05ea2a05
TT
13819ac_ext=cpp
13820ac_cpp='$CXXCPP $CPPFLAGS'
13821ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13822ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13823ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5e030278 13824
5e030278 13825
05ea2a05
TT
13826 if test "$threads" = "yes"; then
13827 save_LIBS="$LIBS"
13828 LIBS="$PTHREAD_LIBS $LIBS"
13829 save_CXXFLAGS="$CXXFLAGS"
13830 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
13831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
13832$as_echo_n "checking for std::thread... " >&6; }
13833if ${gdb_cv_cxx_std_thread+:} false; then :
13834 $as_echo_n "(cached) " >&6
13835else
13836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 13837/* end confdefs.h. */
05ea2a05
TT
13838#include <thread>
13839 void callback() { }
13840int
13841main ()
13842{
13843std::thread t(callback);
13844 ;
13845 return 0;
13846}
5e030278 13847_ACEOF
05ea2a05
TT
13848if ac_fn_cxx_try_compile "$LINENO"; then :
13849 gdb_cv_cxx_std_thread=yes
13850else
13851 gdb_cv_cxx_std_thread=no
5e030278 13852fi
05ea2a05
TT
13853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13854fi
13855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
13856$as_echo "$gdb_cv_cxx_std_thread" >&6; }
5e030278 13857
05ea2a05
TT
13858 # This check must be here, while LIBS includes any necessary
13859 # threading library.
13860 for ac_func in pthread_sigmask pthread_setname_np
13861do :
13862 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13863ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
13864if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13865 cat >>confdefs.h <<_ACEOF
13866#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13867_ACEOF
5e030278
TT
13868
13869fi
05ea2a05 13870done
5e030278 13871
5e030278 13872
05ea2a05
TT
13873 LIBS="$save_LIBS"
13874 CXXFLAGS="$save_CXXFLAGS"
13875 fi
13876 if test "$gdb_cv_cxx_std_thread" = "yes"; then
5e030278 13877
05ea2a05 13878$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
5e030278 13879
05ea2a05
TT
13880 fi
13881 ac_ext=c
13882ac_cpp='$CPP $CPPFLAGS'
13883ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13884ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13885ac_compiler_gnu=$ac_cv_c_compiler_gnu
5e030278 13886
5e030278 13887
05ea2a05
TT
13888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13889$as_echo_n "checking for sigsetjmp... " >&6; }
13890if ${gdb_cv_func_sigsetjmp+:} false; then :
13891 $as_echo_n "(cached) " >&6
13892else
13893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13894/* end confdefs.h. */
5e030278 13895
05ea2a05 13896 #include <setjmp.h>
5e030278 13897
05ea2a05
TT
13898int
13899main ()
13900{
13901sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13902 ;
13903 return 0;
13904}
13905_ACEOF
13906if ac_fn_c_try_compile "$LINENO"; then :
13907 gdb_cv_func_sigsetjmp=yes
13908else
13909 gdb_cv_func_sigsetjmp=no
13910fi
13911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13912fi
13913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13914$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13915 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
5e030278 13916
05ea2a05 13917$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
5e030278 13918
05ea2a05
TT
13919 fi
13920
13921
13922# Check whether --with-intel_pt was given.
13923if test "${with_intel_pt+set}" = set; then :
13924 withval=$with_intel_pt;
5e030278 13925else
05ea2a05 13926 with_intel_pt=auto
5e030278 13927fi
05ea2a05
TT
13928
13929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
13930$as_echo_n "checking whether to use intel pt... " >&6; }
13931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
13932$as_echo "$with_intel_pt" >&6; }
13933
13934 if test "${with_intel_pt}" = no; then
13935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
13936$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
13937 HAVE_LIBIPT=no
13938 else
13939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 13940/* end confdefs.h. */
5e030278 13941
05ea2a05
TT
13942 #include <linux/perf_event.h>
13943 #ifndef PERF_ATTR_SIZE_VER5
13944 # error
13945 #endif
5e030278 13946
05ea2a05
TT
13947_ACEOF
13948if ac_fn_c_try_cpp "$LINENO"; then :
13949 perf_event=yes
13950else
13951 perf_event=no
5e030278 13952fi
05ea2a05
TT
13953rm -f conftest.err conftest.i conftest.$ac_ext
13954 if test "$perf_event" != yes; then
13955 if test "$with_intel_pt" = yes; then
13956 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
13957 else
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
13959$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
13960 fi
13961 fi
5e030278 13962
5e030278 13963
5e030278 13964
5e030278 13965
5e030278 13966
5e030278 13967
5e030278 13968
5e030278 13969
5e030278 13970
05ea2a05 13971 use_additional=yes
5e030278 13972
05ea2a05
TT
13973 acl_save_prefix="$prefix"
13974 prefix="$acl_final_prefix"
13975 acl_save_exec_prefix="$exec_prefix"
13976 exec_prefix="$acl_final_exec_prefix"
5e030278 13977
05ea2a05
TT
13978 eval additional_includedir=\"$includedir\"
13979 eval additional_libdir=\"$libdir\"
5e030278 13980
05ea2a05
TT
13981 exec_prefix="$acl_save_exec_prefix"
13982 prefix="$acl_save_prefix"
5e030278 13983
5e030278 13984
05ea2a05
TT
13985# Check whether --with-libipt-prefix was given.
13986if test "${with_libipt_prefix+set}" = set; then :
13987 withval=$with_libipt_prefix;
13988 if test "X$withval" = "Xno"; then
13989 use_additional=no
13990 else
13991 if test "X$withval" = "X"; then
5e030278 13992
05ea2a05
TT
13993 acl_save_prefix="$prefix"
13994 prefix="$acl_final_prefix"
13995 acl_save_exec_prefix="$exec_prefix"
13996 exec_prefix="$acl_final_exec_prefix"
5e030278 13997
05ea2a05
TT
13998 eval additional_includedir=\"$includedir\"
13999 eval additional_libdir=\"$libdir\"
5e030278 14000
05ea2a05
TT
14001 exec_prefix="$acl_save_exec_prefix"
14002 prefix="$acl_save_prefix"
5e030278 14003
05ea2a05
TT
14004 else
14005 additional_includedir="$withval/include"
14006 additional_libdir="$withval/lib"
14007 fi
14008 fi
5e030278
TT
14009
14010fi
5e030278 14011
05ea2a05
TT
14012 LIBIPT=
14013 LTLIBIPT=
14014 INCIPT=
14015 rpathdirs=
14016 ltrpathdirs=
14017 names_already_handled=
14018 names_next_round='ipt '
14019 while test -n "$names_next_round"; do
14020 names_this_round="$names_next_round"
14021 names_next_round=
14022 for name in $names_this_round; do
14023 already_handled=
14024 for n in $names_already_handled; do
14025 if test "$n" = "$name"; then
14026 already_handled=yes
14027 break
14028 fi
14029 done
14030 if test -z "$already_handled"; then
14031 names_already_handled="$names_already_handled $name"
14032 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14033 eval value=\"\$HAVE_LIB$uppername\"
14034 if test -n "$value"; then
14035 if test "$value" = yes; then
14036 eval value=\"\$LIB$uppername\"
14037 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14038 eval value=\"\$LTLIB$uppername\"
14039 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14040 else
14041 :
14042 fi
14043 else
14044 found_dir=
14045 found_la=
14046 found_so=
14047 found_a=
14048 if test $use_additional = yes; then
14049 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14050 found_dir="$additional_libdir"
14051 found_so="$additional_libdir/lib$name.$shlibext"
14052 if test -f "$additional_libdir/lib$name.la"; then
14053 found_la="$additional_libdir/lib$name.la"
14054 fi
14055 else
14056 if test -f "$additional_libdir/lib$name.$libext"; then
14057 found_dir="$additional_libdir"
14058 found_a="$additional_libdir/lib$name.$libext"
14059 if test -f "$additional_libdir/lib$name.la"; then
14060 found_la="$additional_libdir/lib$name.la"
14061 fi
14062 fi
14063 fi
14064 fi
14065 if test "X$found_dir" = "X"; then
14066 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14067
05ea2a05
TT
14068 acl_save_prefix="$prefix"
14069 prefix="$acl_final_prefix"
14070 acl_save_exec_prefix="$exec_prefix"
14071 exec_prefix="$acl_final_exec_prefix"
14072 eval x=\"$x\"
14073 exec_prefix="$acl_save_exec_prefix"
14074 prefix="$acl_save_prefix"
5e030278 14075
05ea2a05
TT
14076 case "$x" in
14077 -L*)
14078 dir=`echo "X$x" | sed -e 's/^X-L//'`
14079 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14080 found_dir="$dir"
14081 found_so="$dir/lib$name.$shlibext"
14082 if test -f "$dir/lib$name.la"; then
14083 found_la="$dir/lib$name.la"
14084 fi
14085 else
14086 if test -f "$dir/lib$name.$libext"; then
14087 found_dir="$dir"
14088 found_a="$dir/lib$name.$libext"
14089 if test -f "$dir/lib$name.la"; then
14090 found_la="$dir/lib$name.la"
14091 fi
14092 fi
14093 fi
14094 ;;
14095 esac
14096 if test "X$found_dir" != "X"; then
14097 break
14098 fi
14099 done
14100 fi
14101 if test "X$found_dir" != "X"; then
14102 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14103 if test "X$found_so" != "X"; then
14104 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14105 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14106 else
14107 haveit=
14108 for x in $ltrpathdirs; do
14109 if test "X$x" = "X$found_dir"; then
14110 haveit=yes
14111 break
14112 fi
14113 done
14114 if test -z "$haveit"; then
14115 ltrpathdirs="$ltrpathdirs $found_dir"
14116 fi
14117 if test "$hardcode_direct" = yes; then
14118 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14119 else
14120 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14121 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14122 haveit=
14123 for x in $rpathdirs; do
14124 if test "X$x" = "X$found_dir"; then
14125 haveit=yes
14126 break
14127 fi
14128 done
14129 if test -z "$haveit"; then
14130 rpathdirs="$rpathdirs $found_dir"
14131 fi
14132 else
14133 haveit=
14134 for x in $LDFLAGS $LIBIPT; do
5e030278 14135
05ea2a05
TT
14136 acl_save_prefix="$prefix"
14137 prefix="$acl_final_prefix"
14138 acl_save_exec_prefix="$exec_prefix"
14139 exec_prefix="$acl_final_exec_prefix"
14140 eval x=\"$x\"
14141 exec_prefix="$acl_save_exec_prefix"
14142 prefix="$acl_save_prefix"
5e030278 14143
05ea2a05
TT
14144 if test "X$x" = "X-L$found_dir"; then
14145 haveit=yes
14146 break
14147 fi
14148 done
14149 if test -z "$haveit"; then
14150 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14151 fi
14152 if test "$hardcode_minus_L" != no; then
14153 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14154 else
14155 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14156 fi
14157 fi
14158 fi
14159 fi
14160 else
14161 if test "X$found_a" != "X"; then
14162 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14163 else
14164 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14165 fi
14166 fi
14167 additional_includedir=
14168 case "$found_dir" in
14169 */lib | */lib/)
14170 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14171 additional_includedir="$basedir/include"
14172 ;;
14173 esac
14174 if test "X$additional_includedir" != "X"; then
14175 if test "X$additional_includedir" != "X/usr/include"; then
14176 haveit=
14177 if test "X$additional_includedir" = "X/usr/local/include"; then
14178 if test -n "$GCC"; then
14179 case $host_os in
14180 linux*) haveit=yes;;
14181 esac
14182 fi
14183 fi
14184 if test -z "$haveit"; then
14185 for x in $CPPFLAGS $INCIPT; do
5e030278 14186
05ea2a05
TT
14187 acl_save_prefix="$prefix"
14188 prefix="$acl_final_prefix"
14189 acl_save_exec_prefix="$exec_prefix"
14190 exec_prefix="$acl_final_exec_prefix"
14191 eval x=\"$x\"
14192 exec_prefix="$acl_save_exec_prefix"
14193 prefix="$acl_save_prefix"
5e030278 14194
05ea2a05
TT
14195 if test "X$x" = "X-I$additional_includedir"; then
14196 haveit=yes
14197 break
14198 fi
14199 done
14200 if test -z "$haveit"; then
14201 if test -d "$additional_includedir"; then
14202 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14203 fi
14204 fi
14205 fi
14206 fi
14207 fi
14208 if test -n "$found_la"; then
14209 save_libdir="$libdir"
14210 case "$found_la" in
14211 */* | *\\*) . "$found_la" ;;
14212 *) . "./$found_la" ;;
14213 esac
14214 libdir="$save_libdir"
14215 for dep in $dependency_libs; do
14216 case "$dep" in
14217 -L*)
14218 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14219 if test "X$additional_libdir" != "X/usr/lib"; then
14220 haveit=
14221 if test "X$additional_libdir" = "X/usr/local/lib"; then
14222 if test -n "$GCC"; then
14223 case $host_os in
14224 linux*) haveit=yes;;
14225 esac
14226 fi
14227 fi
14228 if test -z "$haveit"; then
14229 haveit=
14230 for x in $LDFLAGS $LIBIPT; do
5e030278 14231
05ea2a05
TT
14232 acl_save_prefix="$prefix"
14233 prefix="$acl_final_prefix"
14234 acl_save_exec_prefix="$exec_prefix"
14235 exec_prefix="$acl_final_exec_prefix"
14236 eval x=\"$x\"
14237 exec_prefix="$acl_save_exec_prefix"
14238 prefix="$acl_save_prefix"
5e030278 14239
05ea2a05
TT
14240 if test "X$x" = "X-L$additional_libdir"; then
14241 haveit=yes
14242 break
14243 fi
14244 done
14245 if test -z "$haveit"; then
14246 if test -d "$additional_libdir"; then
14247 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14248 fi
14249 fi
14250 haveit=
14251 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14252
05ea2a05
TT
14253 acl_save_prefix="$prefix"
14254 prefix="$acl_final_prefix"
14255 acl_save_exec_prefix="$exec_prefix"
14256 exec_prefix="$acl_final_exec_prefix"
14257 eval x=\"$x\"
14258 exec_prefix="$acl_save_exec_prefix"
14259 prefix="$acl_save_prefix"
5e030278 14260
05ea2a05
TT
14261 if test "X$x" = "X-L$additional_libdir"; then
14262 haveit=yes
14263 break
14264 fi
14265 done
14266 if test -z "$haveit"; then
14267 if test -d "$additional_libdir"; then
14268 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14269 fi
14270 fi
14271 fi
14272 fi
14273 ;;
14274 -R*)
14275 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14276 if test "$enable_rpath" != no; then
14277 haveit=
14278 for x in $rpathdirs; do
14279 if test "X$x" = "X$dir"; then
14280 haveit=yes
14281 break
14282 fi
14283 done
14284 if test -z "$haveit"; then
14285 rpathdirs="$rpathdirs $dir"
14286 fi
14287 haveit=
14288 for x in $ltrpathdirs; do
14289 if test "X$x" = "X$dir"; then
14290 haveit=yes
14291 break
14292 fi
14293 done
14294 if test -z "$haveit"; then
14295 ltrpathdirs="$ltrpathdirs $dir"
14296 fi
14297 fi
14298 ;;
14299 -l*)
14300 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14301 ;;
14302 *.la)
14303 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14304 ;;
14305 *)
14306 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14307 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14308 ;;
14309 esac
14310 done
14311 fi
14312 else
14313 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14314 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14315 fi
5e030278 14316 fi
05ea2a05
TT
14317 fi
14318 done
14319 done
14320 if test "X$rpathdirs" != "X"; then
14321 if test -n "$hardcode_libdir_separator"; then
14322 alldirs=
14323 for found_dir in $rpathdirs; do
14324 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14325 done
14326 acl_save_libdir="$libdir"
14327 libdir="$alldirs"
14328 eval flag=\"$hardcode_libdir_flag_spec\"
14329 libdir="$acl_save_libdir"
14330 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14331 else
14332 for found_dir in $rpathdirs; do
14333 acl_save_libdir="$libdir"
14334 libdir="$found_dir"
14335 eval flag=\"$hardcode_libdir_flag_spec\"
14336 libdir="$acl_save_libdir"
14337 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14338 done
14339 fi
14340 fi
14341 if test "X$ltrpathdirs" != "X"; then
14342 for found_dir in $ltrpathdirs; do
14343 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14344 done
14345 fi
5e030278
TT
14346
14347
05ea2a05 14348 ac_save_CPPFLAGS="$CPPFLAGS"
5e030278 14349
05ea2a05
TT
14350 for element in $INCIPT; do
14351 haveit=
14352 for x in $CPPFLAGS; do
5e030278 14353
05ea2a05
TT
14354 acl_save_prefix="$prefix"
14355 prefix="$acl_final_prefix"
14356 acl_save_exec_prefix="$exec_prefix"
14357 exec_prefix="$acl_final_exec_prefix"
14358 eval x=\"$x\"
14359 exec_prefix="$acl_save_exec_prefix"
14360 prefix="$acl_save_prefix"
5e030278 14361
05ea2a05
TT
14362 if test "X$x" = "X$element"; then
14363 haveit=yes
14364 break
14365 fi
14366 done
14367 if test -z "$haveit"; then
14368 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14369 fi
14370 done
5e030278
TT
14371
14372
05ea2a05
TT
14373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14374$as_echo_n "checking for libipt... " >&6; }
14375if ${ac_cv_libipt+:} false; then :
5e030278
TT
14376 $as_echo_n "(cached) " >&6
14377else
05ea2a05
TT
14378
14379 ac_save_LIBS="$LIBS"
14380 LIBS="$LIBS $LIBIPT"
14381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14382/* end confdefs.h. */
05ea2a05 14383#include "intel-pt.h"
5e030278
TT
14384int
14385main ()
14386{
05ea2a05 14387pt_insn_alloc_decoder (0);
5e030278
TT
14388 ;
14389 return 0;
14390}
14391_ACEOF
05ea2a05
TT
14392if ac_fn_c_try_link "$LINENO"; then :
14393 ac_cv_libipt=yes
5e030278 14394else
05ea2a05 14395 ac_cv_libipt=no
5e030278 14396fi
05ea2a05
TT
14397rm -f core conftest.err conftest.$ac_objext \
14398 conftest$ac_exeext conftest.$ac_ext
14399 LIBS="$ac_save_LIBS"
14400
5e030278 14401fi
05ea2a05
TT
14402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14403$as_echo "$ac_cv_libipt" >&6; }
14404 if test "$ac_cv_libipt" = yes; then
14405 HAVE_LIBIPT=yes
21987b9c 14406
05ea2a05
TT
14407$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14408
14409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14410$as_echo_n "checking how to link with libipt... " >&6; }
14411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14412$as_echo "$LIBIPT" >&6; }
14413 else
14414 HAVE_LIBIPT=no
14415 CPPFLAGS="$ac_save_CPPFLAGS"
14416 LIBIPT=
14417 LTLIBIPT=
14418 fi
14419
14420
14421
14422
14423
14424
14425 if test "$HAVE_LIBIPT" != yes; then
14426 if test "$with_intel_pt" = yes; then
14427 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14428 else
14429 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14430$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14431 fi
14432 else
14433 save_LIBS=$LIBS
14434 LIBS="$LIBS $LIBIPT"
14435 for ac_func in pt_insn_event
21987b9c 14436do :
05ea2a05
TT
14437 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14438if test "x$ac_cv_func_pt_insn_event" = xyes; then :
21987b9c 14439 cat >>confdefs.h <<_ACEOF
05ea2a05 14440#define HAVE_PT_INSN_EVENT 1
21987b9c
TT
14441_ACEOF
14442
14443fi
14444done
14445
05ea2a05
TT
14446 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14447"
14448if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
21987b9c 14449
05ea2a05
TT
14450cat >>confdefs.h <<_ACEOF
14451#define HAVE_STRUCT_PT_INSN_ENABLED 1
14452_ACEOF
5e030278 14453
5e030278 14454
05ea2a05
TT
14455fi
14456ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14457"
14458if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14459
14460cat >>confdefs.h <<_ACEOF
14461#define HAVE_STRUCT_PT_INSN_RESYNCED 1
14462_ACEOF
5e030278
TT
14463
14464
05ea2a05
TT
14465fi
14466
14467 LIBS=$save_LIBS
14468 fi
14469 fi
14470
14471 if test "$ac_cv_header_sys_procfs_h" = yes; then
14472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14473$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14474 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
e9bcb658
GB
14475 $as_echo_n "(cached) " >&6
14476else
14477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14478/* end confdefs.h. */
14479
05ea2a05
TT
14480#define _SYSCALL32
14481/* Needed for new procfs interface on sparc-solaris. */
14482#define _STRUCTURED_PROC 1
14483#include <sys/procfs.h>
e9bcb658
GB
14484int
14485main ()
14486{
05ea2a05 14487gregset_t avar
e9bcb658
GB
14488 ;
14489 return 0;
14490}
14491_ACEOF
14492if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14493 bfd_cv_have_sys_procfs_type_gregset_t=yes
e9bcb658 14494else
05ea2a05 14495 bfd_cv_have_sys_procfs_type_gregset_t=no
54019719
PA
14496
14497fi
05ea2a05 14498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 14499fi
06825bd1 14500
05ea2a05 14501 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
a3828db0 14502
05ea2a05 14503$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
06825bd1 14504
05ea2a05
TT
14505 fi
14506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14507$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14508
14509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14510$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14511 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14512 $as_echo_n "(cached) " >&6
bec39cab 14513else
81ecdfbb 14514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14515/* end confdefs.h. */
05ea2a05
TT
14516
14517#define _SYSCALL32
14518/* Needed for new procfs interface on sparc-solaris. */
14519#define _STRUCTURED_PROC 1
14520#include <sys/procfs.h>
bec39cab
AC
14521int
14522main ()
14523{
05ea2a05 14524fpregset_t avar
064ef605
DJ
14525 ;
14526 return 0;
14527}
14528_ACEOF
9b30624b 14529if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
14530 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14531else
14532 bfd_cv_have_sys_procfs_type_fpregset_t=no
14533
14534fi
14535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14536fi
14537
14538 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14539
14540$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14541
14542 fi
14543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14544$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14545
14546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14547$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14548 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14549 $as_echo_n "(cached) " >&6
064ef605 14550else
81ecdfbb 14551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 14552/* end confdefs.h. */
05ea2a05
TT
14553
14554#define _SYSCALL32
14555/* Needed for new procfs interface on sparc-solaris. */
14556#define _STRUCTURED_PROC 1
14557#include <sys/procfs.h>
064ef605
DJ
14558int
14559main ()
14560{
05ea2a05 14561prgregset_t avar
bec39cab
AC
14562 ;
14563 return 0;
14564}
14565_ACEOF
9b30624b 14566if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14567 bfd_cv_have_sys_procfs_type_prgregset_t=yes
70f9f479 14568else
05ea2a05
TT
14569 bfd_cv_have_sys_procfs_type_prgregset_t=no
14570
70f9f479 14571fi
81ecdfbb 14572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 14573fi
bec39cab 14574
05ea2a05 14575 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
70f9f479 14576
05ea2a05
TT
14577$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14578
14579 fi
14580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14581$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14582
14583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14584$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14585 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14586 $as_echo_n "(cached) " >&6
bec39cab 14587else
81ecdfbb 14588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 14589/* end confdefs.h. */
05ea2a05
TT
14590
14591#define _SYSCALL32
14592/* Needed for new procfs interface on sparc-solaris. */
14593#define _STRUCTURED_PROC 1
14594#include <sys/procfs.h>
064ef605
DJ
14595int
14596main ()
14597{
05ea2a05 14598prfpregset_t avar
064ef605
DJ
14599 ;
14600 return 0;
14601}
14602_ACEOF
9b30624b 14603if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14604 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
064ef605 14605else
05ea2a05 14606 bfd_cv_have_sys_procfs_type_prfpregset_t=no
064ef605 14607
5c7f2947 14608fi
81ecdfbb 14609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
05ea2a05
TT
14610fi
14611
14612 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14613
14614$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14615
14616 fi
14617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14618$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14619
14620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14621$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14622 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14623 $as_echo_n "(cached) " >&6
14624else
14625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14626/* end confdefs.h. */
05ea2a05
TT
14627
14628#define _SYSCALL32
14629/* Needed for new procfs interface on sparc-solaris. */
14630#define _STRUCTURED_PROC 1
14631#include <sys/procfs.h>
bec39cab
AC
14632int
14633main ()
14634{
05ea2a05 14635prgregset32_t avar
bec39cab
AC
14636 ;
14637 return 0;
14638}
14639_ACEOF
9b30624b 14640if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
14641 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14642else
14643 bfd_cv_have_sys_procfs_type_prgregset32_t=no
a3828db0 14644
064ef605 14645fi
81ecdfbb 14646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 14647fi
96d7229d 14648
05ea2a05 14649 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
78434e59 14650
05ea2a05 14651$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
78434e59 14652
05ea2a05
TT
14653 fi
14654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14655$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
54019719 14656
05ea2a05
TT
14657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14658$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14659 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14660 $as_echo_n "(cached) " >&6
bec39cab 14661else
81ecdfbb 14662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14663/* end confdefs.h. */
05ea2a05
TT
14664
14665#define _SYSCALL32
14666/* Needed for new procfs interface on sparc-solaris. */
14667#define _STRUCTURED_PROC 1
14668#include <sys/procfs.h>
bec39cab
AC
14669int
14670main ()
14671{
05ea2a05 14672lwpid_t avar
bec39cab
AC
14673 ;
14674 return 0;
14675}
14676_ACEOF
05ea2a05
TT
14677if ac_fn_c_try_compile "$LINENO"; then :
14678 bfd_cv_have_sys_procfs_type_lwpid_t=yes
c906108c 14679else
05ea2a05
TT
14680 bfd_cv_have_sys_procfs_type_lwpid_t=no
14681
c906108c 14682fi
05ea2a05 14683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14684fi
81ecdfbb 14685
05ea2a05 14686 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
a3828db0 14687
05ea2a05 14688$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
97bf5e38 14689
05ea2a05
TT
14690 fi
14691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14692$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
a3828db0 14693
05ea2a05
TT
14694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14695$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14696 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14697 $as_echo_n "(cached) " >&6
97bf5e38 14698else
81ecdfbb 14699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14700/* end confdefs.h. */
a3828db0 14701
05ea2a05
TT
14702#define _SYSCALL32
14703/* Needed for new procfs interface on sparc-solaris. */
14704#define _STRUCTURED_PROC 1
14705#include <sys/procfs.h>
bec39cab
AC
14706int
14707main ()
14708{
05ea2a05 14709psaddr_t avar
bec39cab
AC
14710 ;
14711 return 0;
14712}
14713_ACEOF
81ecdfbb 14714if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14715 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14716else
05ea2a05
TT
14717 bfd_cv_have_sys_procfs_type_psaddr_t=no
14718
c906108c 14719fi
81ecdfbb 14720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14721fi
c3f6f71d 14722
05ea2a05 14723 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
c906108c 14724
05ea2a05 14725$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
db1ff28b 14726
05ea2a05
TT
14727 fi
14728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14729$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14730
14731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14732$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14733 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
db1ff28b
JK
14734 $as_echo_n "(cached) " >&6
14735else
14736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14737/* end confdefs.h. */
05ea2a05
TT
14738
14739#define _SYSCALL32
14740/* Needed for new procfs interface on sparc-solaris. */
14741#define _STRUCTURED_PROC 1
14742#include <sys/procfs.h>
db1ff28b
JK
14743int
14744main ()
14745{
05ea2a05 14746elf_fpregset_t avar
db1ff28b
JK
14747 ;
14748 return 0;
14749}
14750_ACEOF
14751if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14752 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
db1ff28b 14753else
05ea2a05
TT
14754 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14755
db1ff28b
JK
14756fi
14757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14758fi
db1ff28b 14759
05ea2a05 14760 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
db1ff28b 14761
05ea2a05 14762$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
db1ff28b 14763
05ea2a05
TT
14764 fi
14765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14766$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
db1ff28b 14767
05ea2a05
TT
14768 fi
14769
14770
14771# Check the return and argument types of ptrace.
14772
14773
14774for ac_header in sys/ptrace.h ptrace.h
14775do :
14776 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14777ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14778if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14779 cat >>confdefs.h <<_ACEOF
14780#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14781_ACEOF
db1ff28b
JK
14782
14783fi
14784
05ea2a05
TT
14785done
14786
81ecdfbb 14787
05ea2a05
TT
14788gdb_ptrace_headers='
14789#include <sys/types.h>
14790#if HAVE_SYS_PTRACE_H
14791# include <sys/ptrace.h>
14792#endif
14793#if HAVE_UNISTD_H
14794# include <unistd.h>
14795#endif
14796'
14797# There is no point in checking if we don't have a prototype.
14798ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 14799"
05ea2a05
TT
14800if test "x$ac_cv_have_decl_ptrace" = xyes; then :
14801 ac_have_decl=1
14802else
14803 ac_have_decl=0
14804fi
c906108c 14805
5c45e068 14806cat >>confdefs.h <<_ACEOF
05ea2a05 14807#define HAVE_DECL_PTRACE $ac_have_decl
bec39cab 14808_ACEOF
05ea2a05 14809if test $ac_have_decl = 1; then :
c906108c 14810
05ea2a05 14811else
5c45e068 14812
05ea2a05
TT
14813 : ${gdb_cv_func_ptrace_ret='int'}
14814 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
c906108c 14815
05ea2a05 14816fi
5c45e068 14817
05ea2a05
TT
14818# Check return type. Varargs (used on GNU/Linux) conflict with the
14819# empty argument list, so check for that explicitly.
14820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
14821$as_echo_n "checking return type of ptrace... " >&6; }
14822if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 14823 $as_echo_n "(cached) " >&6
bec39cab 14824else
81ecdfbb 14825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14826/* end confdefs.h. */
05ea2a05 14827$gdb_ptrace_headers
bec39cab
AC
14828int
14829main ()
14830{
05ea2a05 14831extern long ptrace (enum __ptrace_request, ...);
bec39cab
AC
14832 ;
14833 return 0;
14834}
14835_ACEOF
81ecdfbb 14836if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14837 gdb_cv_func_ptrace_ret='long'
bec39cab 14838else
81ecdfbb 14839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14840/* end confdefs.h. */
05ea2a05 14841$gdb_ptrace_headers
bec39cab
AC
14842int
14843main ()
14844{
05ea2a05 14845extern int ptrace ();
bec39cab
AC
14846 ;
14847 return 0;
14848}
14849_ACEOF
81ecdfbb 14850if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14851 gdb_cv_func_ptrace_ret='int'
27ca5dad 14852else
05ea2a05 14853 gdb_cv_func_ptrace_ret='long'
27ca5dad 14854fi
81ecdfbb 14855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14856fi
05ea2a05 14857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14858fi
05ea2a05
TT
14859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
14860$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
5c45e068
MK
14861
14862cat >>confdefs.h <<_ACEOF
05ea2a05 14863#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 14864_ACEOF
3862412b 14865
05ea2a05
TT
14866# Check argument types.
14867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
14868$as_echo_n "checking types of arguments for ptrace... " >&6; }
14869if ${gdb_cv_func_ptrace_args+:} false; then :
14870 $as_echo_n "(cached) " >&6
14871else
5c45e068 14872
05ea2a05
TT
14873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14874/* end confdefs.h. */
14875$gdb_ptrace_headers
14876int
14877main ()
14878{
14879extern long ptrace (enum __ptrace_request, ...);
14880 ;
14881 return 0;
14882}
bec39cab 14883_ACEOF
05ea2a05
TT
14884if ac_fn_c_try_compile "$LINENO"; then :
14885 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
14886else
14887
14888for gdb_arg1 in 'int' 'long'; do
14889 for gdb_arg2 in 'pid_t' 'int' 'long'; do
14890 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
14891 for gdb_arg4 in 'int' 'long' 'void *'; do
14892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14893/* end confdefs.h. */
14894$gdb_ptrace_headers
14895int
14896main ()
14897{
3862412b 14898
05ea2a05
TT
14899extern $gdb_cv_func_ptrace_ret
14900 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
5c45e068 14901
05ea2a05
TT
14902 ;
14903 return 0;
14904}
14905_ACEOF
14906if ac_fn_c_try_compile "$LINENO"; then :
14907 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
14908 break 4;
97bf5e38 14909fi
05ea2a05
TT
14910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14911 for gdb_arg5 in 'int *' 'int' 'long'; do
14912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14913/* end confdefs.h. */
14914$gdb_ptrace_headers
14915int
14916main ()
14917{
3862412b 14918
05ea2a05
TT
14919extern $gdb_cv_func_ptrace_ret
14920 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
5c45e068 14921
05ea2a05
TT
14922 ;
14923 return 0;
14924}
6fea9e18 14925_ACEOF
05ea2a05 14926if ac_fn_c_try_compile "$LINENO"; then :
6fea9e18 14927
05ea2a05
TT
14928gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
14929 break 5;
14930fi
14931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14932 done
14933 done
14934 done
14935 done
14936done
14937# Provide a safe default value.
14938: ${gdb_cv_func_ptrace_args='int,int,long,long'}
6fea9e18
L
14939
14940fi
05ea2a05
TT
14941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14942fi
14943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
14944$as_echo "$gdb_cv_func_ptrace_args" >&6; }
14945ac_save_IFS=$IFS; IFS=','
14946set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
14947IFS=$ac_save_IFS
14948shift
6fea9e18
L
14949
14950cat >>confdefs.h <<_ACEOF
05ea2a05 14951#define PTRACE_TYPE_ARG1 $1
6fea9e18
L
14952_ACEOF
14953
14954
05ea2a05
TT
14955cat >>confdefs.h <<_ACEOF
14956#define PTRACE_TYPE_ARG3 $3
bec39cab 14957_ACEOF
451928c5 14958
60ca704f 14959
05ea2a05
TT
14960cat >>confdefs.h <<_ACEOF
14961#define PTRACE_TYPE_ARG4 $4
14962_ACEOF
14963
14964if test -n "$5"; then
14965
14966cat >>confdefs.h <<_ACEOF
14967#define PTRACE_TYPE_ARG5 $5
14968_ACEOF
451928c5 14969
97bf5e38 14970fi
451928c5 14971
05ea2a05
TT
14972
14973if test "$cross_compiling" = no; then
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14975$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
14976if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14977 $as_echo_n "(cached) " >&6
05ea2a05
TT
14978else
14979 if test "$cross_compiling" = yes; then :
14980 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
451928c5 14981else
81ecdfbb 14982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14983/* end confdefs.h. */
05ea2a05 14984$ac_includes_default
bec39cab
AC
14985int
14986main ()
14987{
05ea2a05
TT
14988/* If this system has a BSD-style setpgrp which takes arguments,
14989 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14990 exit successfully. */
14991 return setpgrp (1,1) != -1;
bec39cab
AC
14992 ;
14993 return 0;
14994}
14995_ACEOF
05ea2a05
TT
14996if ac_fn_c_try_run "$LINENO"; then :
14997 ac_cv_func_setpgrp_void=no
451928c5 14998else
05ea2a05 14999 ac_cv_func_setpgrp_void=yes
451928c5 15000fi
05ea2a05
TT
15001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15002 conftest.$ac_objext conftest.beam conftest.$ac_ext
451928c5
AC
15003fi
15004
05ea2a05
TT
15005fi
15006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15007$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15008if test $ac_cv_func_setpgrp_void = yes; then
60ca704f 15009
05ea2a05 15010$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
451928c5 15011
97bf5e38 15012fi
451928c5 15013
05ea2a05
TT
15014else
15015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15016$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15017if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15018 $as_echo_n "(cached) " >&6
3862412b 15019else
81ecdfbb 15020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15021/* end confdefs.h. */
05ea2a05
TT
15022
15023#include <unistd.h>
15024
bec39cab
AC
15025int
15026main ()
15027{
05ea2a05
TT
15028
15029 if (setpgrp(1,1) == -1)
15030 exit (0);
15031 else
15032 exit (1);
15033
bec39cab
AC
15034 ;
15035 return 0;
15036}
15037_ACEOF
81ecdfbb 15038if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15039 ac_cv_func_setpgrp_void=no
3862412b 15040else
05ea2a05 15041 ac_cv_func_setpgrp_void=yes
3862412b 15042fi
81ecdfbb 15043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 15044fi
05ea2a05
TT
15045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15046$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15047if test "$ac_cv_func_setpgrp_void" = yes; then
15048 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
3862412b 15049
05ea2a05 15050fi
97bf5e38 15051fi
3862412b 15052
05ea2a05
TT
15053# Assume we'll default to using the included libiberty regex.
15054gdb_use_included_regex=yes
15055
15056# However, if the system regex is GNU regex, then default to *not*
15057# using the included regex.
15058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15059$as_echo_n "checking for GNU regex... " >&6; }
15060if ${gdb_cv_have_gnu_regex+:} false; then :
81ecdfbb 15061 $as_echo_n "(cached) " >&6
3862412b 15062else
81ecdfbb 15063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15064/* end confdefs.h. */
05ea2a05 15065#include <gnu-versions.h>
bec39cab
AC
15066int
15067main ()
15068{
05ea2a05
TT
15069#define REGEX_INTERFACE_VERSION 1
15070#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15071# error "Version mismatch"
15072#endif
bec39cab
AC
15073 ;
15074 return 0;
15075}
15076_ACEOF
81ecdfbb 15077if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15078 gdb_cv_have_gnu_regex=yes
3862412b 15079else
05ea2a05 15080 gdb_cv_have_gnu_regex=no
3862412b 15081fi
81ecdfbb 15082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 15083fi
05ea2a05
TT
15084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15085$as_echo "$gdb_cv_have_gnu_regex" >&6; }
15086if test "$gdb_cv_have_gnu_regex" = yes; then
15087 gdb_use_included_regex=no
15088fi
3862412b 15089
3862412b 15090
05ea2a05
TT
15091# Check whether --with-included-regex was given.
15092if test "${with_included_regex+set}" = set; then :
15093 withval=$with_included_regex; gdb_with_regex=$withval
15094else
15095 gdb_with_regex=$gdb_use_included_regex
97bf5e38 15096fi
3862412b 15097
05ea2a05 15098if test "$gdb_with_regex" = yes; then
6e9567fe 15099
05ea2a05 15100$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
6e9567fe
JB
15101
15102fi
15103
05ea2a05
TT
15104# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15105ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15106#include <sys/proc.h>
6e9567fe 15107
e6cdd38e 15108"
05ea2a05 15109if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
e6cdd38e
JB
15110
15111cat >>confdefs.h <<_ACEOF
05ea2a05 15112#define HAVE_STRUCT_THREAD_TD_PCB 1
e6cdd38e
JB
15113_ACEOF
15114
15115
15116fi
15117
6e9567fe 15118
05ea2a05
TT
15119# See if <sys/lwp.h> defines `struct lwp`.
15120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15121$as_echo_n "checking for struct lwp... " >&6; }
15122if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 15123 $as_echo_n "(cached) " >&6
596c9d4b 15124else
81ecdfbb 15125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15126/* end confdefs.h. */
05ea2a05
TT
15127#include <sys/param.h>
15128#define _KMEMUSER
15129#include <sys/lwp.h>
bec39cab
AC
15130int
15131main ()
15132{
05ea2a05 15133struct lwp l;
bec39cab
AC
15134 ;
15135 return 0;
15136}
15137_ACEOF
81ecdfbb 15138if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15139 gdb_cv_struct_lwp=yes
596c9d4b 15140else
05ea2a05 15141 gdb_cv_struct_lwp=no
596c9d4b 15142fi
81ecdfbb 15143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b 15144fi
05ea2a05
TT
15145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15146$as_echo "$gdb_cv_struct_lwp" >&6; }
15147if test "$gdb_cv_struct_lwp" = yes; then
596c9d4b 15148
05ea2a05 15149$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
596c9d4b 15150
05ea2a05 15151fi
451928c5 15152
05ea2a05
TT
15153# See if <machine/reg.h> degines `struct reg'.
15154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15155$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15156if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 15157 $as_echo_n "(cached) " >&6
d84dd0c5 15158else
81ecdfbb 15159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15160/* end confdefs.h. */
05ea2a05
TT
15161#include <sys/types.h>
15162#include <machine/reg.h>
bec39cab
AC
15163int
15164main ()
15165{
05ea2a05 15166struct reg r;
bec39cab
AC
15167 ;
15168 return 0;
15169}
15170_ACEOF
81ecdfbb 15171if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15172 gdb_cv_struct_reg=yes
d84dd0c5 15173else
05ea2a05 15174 gdb_cv_struct_reg=no
d84dd0c5 15175fi
81ecdfbb 15176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5 15177fi
05ea2a05
TT
15178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15179$as_echo "$gdb_cv_struct_reg" >&6; }
15180if test "$gdb_cv_struct_reg" = yes; then
d84dd0c5 15181
05ea2a05 15182$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
bec39cab 15183
05ea2a05 15184fi
d84dd0c5 15185
05ea2a05
TT
15186# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15187# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15188ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15189#include <machine/reg.h>
15190"
15191if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
d84dd0c5 15192
05ea2a05
TT
15193cat >>confdefs.h <<_ACEOF
15194#define HAVE_STRUCT_REG_R_FS 1
15195_ACEOF
15196
15197
15198fi
15199ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15200#include <machine/reg.h>
15201"
15202if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15203
15204cat >>confdefs.h <<_ACEOF
15205#define HAVE_STRUCT_REG_R_GS 1
15206_ACEOF
15207
15208
15209fi
15210
15211
15212# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
15213# Older amd64 Linux's don't have the fs_base and gs_base members of
15214# `struct user_regs_struct'.
15215ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
15216#include <sys/user.h>
15217"
15218if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
c906108c 15219
05ea2a05
TT
15220cat >>confdefs.h <<_ACEOF
15221#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
bec39cab 15222_ACEOF
05ea2a05 15223
bec39cab 15224
c906108c 15225fi
05ea2a05
TT
15226ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
15227#include <sys/user.h>
15228"
15229if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
c906108c 15230
05ea2a05
TT
15231cat >>confdefs.h <<_ACEOF
15232#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
15233_ACEOF
bec39cab 15234
c906108c 15235
05ea2a05 15236fi
c906108c 15237
05ea2a05
TT
15238
15239# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15241$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15242if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 15243 $as_echo_n "(cached) " >&6
d45fe813 15244else
81ecdfbb 15245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15246/* end confdefs.h. */
05ea2a05 15247#include <sys/ptrace.h>
bec39cab
AC
15248int
15249main ()
15250{
05ea2a05 15251PTRACE_GETREGS;
bec39cab
AC
15252 ;
15253 return 0;
15254}
15255_ACEOF
81ecdfbb 15256if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15257 gdb_cv_have_ptrace_getregs=yes
d45fe813 15258else
05ea2a05 15259 gdb_cv_have_ptrace_getregs=no
d45fe813 15260fi
81ecdfbb 15261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15262fi
15263
05ea2a05
TT
15264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15265$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15266if test "$gdb_cv_have_ptrace_getregs" = yes; then
bec39cab 15267
05ea2a05 15268$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
d45fe813 15269
05ea2a05 15270fi
d45fe813 15271
05ea2a05
TT
15272# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15274$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15275if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 15276 $as_echo_n "(cached) " >&6
d45fe813 15277else
81ecdfbb 15278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15279/* end confdefs.h. */
05ea2a05 15280#include <sys/ptrace.h>
bec39cab
AC
15281int
15282main ()
15283{
05ea2a05 15284PTRACE_GETFPXREGS;
bec39cab
AC
15285 ;
15286 return 0;
15287}
15288_ACEOF
81ecdfbb 15289if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15290 gdb_cv_have_ptrace_getfpxregs=yes
d45fe813 15291else
05ea2a05 15292 gdb_cv_have_ptrace_getfpxregs=no
d45fe813 15293fi
81ecdfbb 15294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15295fi
15296
05ea2a05
TT
15297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15298$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15299if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
bec39cab 15300
05ea2a05 15301$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
d45fe813 15302
05ea2a05 15303fi
d45fe813 15304
05ea2a05
TT
15305# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15307$as_echo_n "checking for PT_GETDBREGS... " >&6; }
15308if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 15309 $as_echo_n "(cached) " >&6
d45fe813 15310else
81ecdfbb 15311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15312/* end confdefs.h. */
05ea2a05
TT
15313#include <sys/types.h>
15314#include <sys/ptrace.h>
bec39cab
AC
15315int
15316main ()
15317{
05ea2a05 15318PT_GETDBREGS;
bec39cab
AC
15319 ;
15320 return 0;
15321}
15322_ACEOF
81ecdfbb 15323if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15324 gdb_cv_have_pt_getdbregs=yes
d45fe813 15325else
05ea2a05 15326 gdb_cv_have_pt_getdbregs=no
d45fe813 15327fi
81ecdfbb 15328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15329fi
15330
05ea2a05
TT
15331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15332$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15333if test "$gdb_cv_have_pt_getdbregs" = yes; then
bec39cab 15334
05ea2a05 15335$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
d45fe813 15336
05ea2a05 15337fi
c906108c 15338
05ea2a05
TT
15339# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15341$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15342if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 15343 $as_echo_n "(cached) " >&6
c906108c 15344else
81ecdfbb 15345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15346/* end confdefs.h. */
05ea2a05
TT
15347#include <sys/types.h>
15348#include <sys/ptrace.h>
bec39cab
AC
15349int
15350main ()
15351{
05ea2a05 15352PT_GETXMMREGS;
bec39cab
AC
15353 ;
15354 return 0;
15355}
15356_ACEOF
81ecdfbb 15357if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15358 gdb_cv_have_pt_getxmmregs=yes
c906108c 15359else
05ea2a05 15360 gdb_cv_have_pt_getxmmregs=no
c906108c 15361fi
81ecdfbb 15362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15363fi
15364
05ea2a05
TT
15365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15366$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15367if test "$gdb_cv_have_pt_getxmmregs" = yes; then
bec39cab 15368
05ea2a05 15369$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
c906108c 15370
05ea2a05 15371fi
c906108c 15372
05ea2a05
TT
15373# See if <sys/ptrace.h> supports LWP names on FreeBSD
15374# Older FreeBSD versions don't have the pl_tdname member of
15375# `struct ptrace_lwpinfo'.
15376ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15377"
15378if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
43b7e92b 15379
05ea2a05
TT
15380cat >>confdefs.h <<_ACEOF
15381#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
43b7e92b 15382_ACEOF
43b7e92b 15383
05ea2a05 15384
43b7e92b
GB
15385fi
15386
43b7e92b 15387
05ea2a05
TT
15388# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15389# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15390# FreeBSD 10.3.
15391ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
15392"
15393if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15394
15395cat >>confdefs.h <<_ACEOF
15396#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15397_ACEOF
43b7e92b 15398
43b7e92b 15399
c906108c 15400fi
c906108c 15401
05ea2a05 15402
bc8bcb4b 15403# Check if the compiler supports the `long long' type.
c906108c 15404
81ecdfbb
RW
15405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15406$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 15407if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 15408 $as_echo_n "(cached) " >&6
97bf5e38 15409else
81ecdfbb 15410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15411/* end confdefs.h. */
bc8bcb4b 15412extern long long foo;
bec39cab
AC
15413int
15414main ()
15415{
bc8bcb4b 15416switch (foo & 2) { case 0: return 1; }
bec39cab
AC
15417 ;
15418 return 0;
15419}
15420_ACEOF
81ecdfbb 15421if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15422 gdb_cv_c_long_long=yes
15423else
81ecdfbb 15424 gdb_cv_c_long_long=no
97bf5e38 15425fi
81ecdfbb 15426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15427fi
81ecdfbb
RW
15428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15429$as_echo "$gdb_cv_c_long_long" >&6; }
0ad6b8ee 15430if test "$gdb_cv_c_long_long" != yes; then
74a0d9f6 15431 # libdecnumber requires long long.
d0ac1c44 15432 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
15433fi
15434
bc8bcb4b 15435# Check if the compiler and runtime support printing long longs.
97bf5e38 15436
81ecdfbb
RW
15437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15438$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 15439if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 15440 $as_echo_n "(cached) " >&6
97bf5e38 15441else
81ecdfbb 15442 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15443 gdb_cv_printf_has_long_long=no
15444else
81ecdfbb 15445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15446/* end confdefs.h. */
bc8bcb4b
MK
15447$ac_includes_default
15448int
15449main ()
15450{
15451char buf[32];
97bf5e38
MK
15452 long long l = 0;
15453 l = (l << 16) + 0x0123;
15454 l = (l << 16) + 0x4567;
15455 l = (l << 16) + 0x89ab;
15456 l = (l << 16) + 0xcdef;
15457 sprintf (buf, "0x%016llx", l);
15458 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
15459 ;
15460 return 0;
c906108c 15461}
bec39cab 15462_ACEOF
81ecdfbb 15463if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15464 gdb_cv_printf_has_long_long=yes
15465else
81ecdfbb 15466 gdb_cv_printf_has_long_long=no
97bf5e38 15467fi
81ecdfbb
RW
15468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15469 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15470fi
81ecdfbb 15471
97bf5e38 15472fi
81ecdfbb
RW
15473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15474$as_echo "$gdb_cv_printf_has_long_long" >&6; }
0ad6b8ee 15475if test "$gdb_cv_printf_has_long_long" = yes; then
bc8bcb4b 15476
81ecdfbb 15477$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
15478
15479fi
97bf5e38 15480
1a619819
LM
15481# Check if the compiler and runtime support printing decfloats.
15482
81ecdfbb
RW
15483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15484$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 15485if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 15486 $as_echo_n "(cached) " >&6
1a619819 15487else
81ecdfbb 15488 if test "$cross_compiling" = yes; then :
1a619819
LM
15489 gdb_cv_printf_has_decfloat=no
15490else
81ecdfbb 15491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
15492/* end confdefs.h. */
15493$ac_includes_default
15494int
15495main ()
15496{
15497char buf[64];
15498 _Decimal32 d32 = 1.2345df;
15499 _Decimal64 d64 = 1.2345dd;
15500 _Decimal128 d128 = 1.2345dl;
15501 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15502 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15503 ;
15504 return 0;
15505}
15506_ACEOF
81ecdfbb 15507if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
15508 gdb_cv_printf_has_decfloat=yes
15509else
81ecdfbb 15510 gdb_cv_printf_has_decfloat=no
1a619819 15511fi
81ecdfbb
RW
15512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15513 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 15514fi
81ecdfbb 15515
1a619819 15516fi
81ecdfbb
RW
15517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15518$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
0ad6b8ee 15519if test "$gdb_cv_printf_has_decfloat" = yes; then
1a619819 15520
81ecdfbb 15521$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
15522
15523fi
15524
bc8bcb4b
MK
15525# Check if the compiler supports the `long double' type. We can't use
15526# AC_C_LONG_DOUBLE because that one does additional checks on the
15527# constants defined in <float.h> that fail on some systems,
15528# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 15529
81ecdfbb
RW
15530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15531$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 15532if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 15533 $as_echo_n "(cached) " >&6
97bf5e38 15534else
81ecdfbb 15535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15536/* end confdefs.h. */
97bf5e38 15537long double foo;
bec39cab 15538_ACEOF
81ecdfbb 15539if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 15540 gdb_cv_c_long_double=yes
97bf5e38 15541else
81ecdfbb 15542 gdb_cv_c_long_double=no
97bf5e38 15543fi
81ecdfbb 15544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15545fi
81ecdfbb
RW
15546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15547$as_echo "$gdb_cv_c_long_double" >&6; }
0ad6b8ee 15548if test "$gdb_cv_c_long_double" = yes; then
c906108c 15549
81ecdfbb 15550$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15551
15552fi
15553
bc8bcb4b 15554# Check if the compiler and runtime support printing long doubles.
97bf5e38 15555
81ecdfbb
RW
15556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15557$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 15558if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 15559 $as_echo_n "(cached) " >&6
97bf5e38 15560else
81ecdfbb 15561 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15562 gdb_cv_printf_has_long_double=no
15563else
81ecdfbb 15564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15565/* end confdefs.h. */
bc8bcb4b
MK
15566$ac_includes_default
15567int
15568main ()
15569{
15570char buf[16];
97bf5e38
MK
15571 long double f = 3.141592653;
15572 sprintf (buf, "%Lg", f);
15573 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
15574 ;
15575 return 0;
97bf5e38 15576}
bec39cab 15577_ACEOF
81ecdfbb 15578if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 15579 gdb_cv_printf_has_long_double=yes
c906108c 15580else
81ecdfbb 15581 gdb_cv_printf_has_long_double=no
c906108c 15582fi
81ecdfbb
RW
15583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15584 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 15585fi
81ecdfbb 15586
c906108c 15587fi
81ecdfbb
RW
15588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15589$as_echo "$gdb_cv_printf_has_long_double" >&6; }
0ad6b8ee 15590if test "$gdb_cv_printf_has_long_double" = yes; then
bc8bcb4b 15591
81ecdfbb 15592$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15593
15594fi
97bf5e38 15595
bc8bcb4b 15596# Check if the compiler and runtime support scanning long doubles.
97bf5e38 15597
81ecdfbb
RW
15598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15599$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 15600if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 15601 $as_echo_n "(cached) " >&6
97bf5e38 15602else
81ecdfbb 15603 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15604 gdb_cv_scanf_has_long_double=no
15605else
81ecdfbb 15606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15607/* end confdefs.h. */
bc8bcb4b
MK
15608#include <stdio.h>
15609int
15610main ()
15611{
15612char *buf = "3.141592653";
97bf5e38
MK
15613 long double f = 0;
15614 sscanf (buf, "%Lg", &f);
15615 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
15616 ;
15617 return 0;
97bf5e38 15618}
bec39cab 15619_ACEOF
81ecdfbb 15620if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15621 gdb_cv_scanf_has_long_double=yes
15622else
81ecdfbb 15623 gdb_cv_scanf_has_long_double=no
97bf5e38 15624fi
81ecdfbb
RW
15625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15626 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15627fi
81ecdfbb 15628
c906108c 15629fi
81ecdfbb
RW
15630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15631$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
0ad6b8ee 15632if test "$gdb_cv_scanf_has_long_double" = yes; then
bc8bcb4b 15633
81ecdfbb 15634$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15635
15636fi
c906108c 15637
438013df
AO
15638case ${host_os} in
15639aix*)
81ecdfbb
RW
15640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15641$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 15642if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 15643 $as_echo_n "(cached) " >&6
438013df 15644else
bec39cab 15645
438013df
AO
15646 SAVE_LDFLAGS=$LDFLAGS
15647
15648 case $GCC in
15649 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15650 *) gdb_cv_bigtoc=-bbigtoc ;;
15651 esac
15652
15653 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 15654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15655/* end confdefs.h. */
438013df 15656
bec39cab
AC
15657int
15658main ()
15659{
438013df 15660int i;
bec39cab
AC
15661 ;
15662 return 0;
15663}
15664_ACEOF
81ecdfbb 15665if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15666
81ecdfbb
RW
15667else
15668 gdb_cv_bigtoc=
438013df 15669fi
81ecdfbb
RW
15670rm -f core conftest.err conftest.$ac_objext \
15671 conftest$ac_exeext conftest.$ac_ext
ec76baa5 15672 LDFLAGS="${SAVE_LDFLAGS}"
438013df 15673
bec39cab 15674fi
81ecdfbb
RW
15675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15676$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
15677 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15678 ;;
15679esac
15680
38f6b338 15681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 15682$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
15683dynamic_list=false
15684if test "${gdb_native}" = yes; then
15685 # The dynamically loaded libthread_db needs access to symbols in the gdb
15686 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15687 # may not be supported there.
15688 old_LDFLAGS="$LDFLAGS"
15689 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15690 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15691 LDFLAGS="$LDFLAGS $RDYNAMIC"
15692 if test "${have_libpython}" = no; then
15693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
15694/* end confdefs.h. */
15695
15696int
15697main ()
15698{
15699
15700 ;
15701 return 0;
15702}
15703_ACEOF
15704if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
15705 dynamic_list=true
15706fi
15707rm -f core conftest.err conftest.$ac_objext \
15708 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
15709 else
15710 # Workaround http://bugs.python.org/issue4434 where static
15711 # libpythonX.Y.a would get its symbols required for
15712 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15713 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
15714
15715 # Note the workaround for Python
15716 # http://bugs.python.org/issue10112 earlier has removed
15717 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15718 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15719 # always pass.
38f6b338
JK
15720 old_CFLAGS="$CFLAGS"
15721 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
15722 old_LIBS="$LIBS"
15723 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
15724 old_CPPFLAGS="$CPPFLAGS"
15725 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 15726 if test "$cross_compiling" = yes; then :
3bebe2f2 15727 true
f6528abd 15728else
3bebe2f2
JK
15729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15730/* end confdefs.h. */
1b4f615e 15731#include "Python.h"
3bebe2f2
JK
15732int
15733main ()
15734{
15735int err;
38f6b338
JK
15736 Py_Initialize ();
15737 err = PyRun_SimpleString ("import itertools\n");
15738 Py_Finalize ();
15739 return err == 0 ? 0 : 1;
3bebe2f2
JK
15740 ;
15741 return 0;
15742}
15743_ACEOF
15744if ac_fn_c_try_run "$LINENO"; then :
15745 dynamic_list=true
15746fi
15747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15748 conftest.$ac_objext conftest.beam conftest.$ac_ext
15749fi
15750
8c1fb155 15751 LIBS="$old_LIBS"
38f6b338 15752 CFLAGS="$old_CFLAGS"
1b4f615e 15753 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
15754 fi
15755 LDFLAGS="$old_LDFLAGS"
15756fi
15757if $dynamic_list; then
15758 found="-Wl,--dynamic-list"
15759 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15760else
38f6b338
JK
15761 found="-rdynamic"
15762 RDYNAMIC="-rdynamic"
f6528abd 15763fi
f6528abd 15764
38f6b338 15765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15766$as_echo "$found" >&6; }
0407b3f1 15767
f6528abd 15768
0ad6b8ee 15769if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
c906108c 15770 case ${host_os} in
d92419e5 15771 aix*)
81ecdfbb
RW
15772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15773$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 15774 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 15775 $as_echo_n "(cached) " >&6
bec39cab 15776else
81ecdfbb 15777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15778/* end confdefs.h. */
d92419e5 15779#include <sys/pthdebug.h>
bec39cab
AC
15780int
15781main ()
15782{
d92419e5
JB
15783#ifndef PTHDB_VERSION_3
15784 #error
15785 #endif
bec39cab
AC
15786 ;
15787 return 0;
15788}
15789_ACEOF
81ecdfbb 15790if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15791 gdb_cv_have_aix_thread_debug=yes
15792else
81ecdfbb 15793 gdb_cv_have_aix_thread_debug=no
d92419e5 15794fi
81ecdfbb 15795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15796fi
15797
81ecdfbb
RW
15798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15799$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
0ad6b8ee 15800 if test "$gdb_cv_have_aix_thread_debug" = yes; then
d92419e5 15801 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15802 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15803 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15804
15805 # Older versions of AIX do not provide the declaration for
15806 # the getthrds function (it appears that it was introduced
15807 # with AIX 6.x).
15808 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15809"
d0ac1c44 15810if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
15811 ac_have_decl=1
15812else
15813 ac_have_decl=0
15814fi
15815
15816cat >>confdefs.h <<_ACEOF
15817#define HAVE_DECL_GETTHRDS $ac_have_decl
15818_ACEOF
15819
d92419e5
JB
15820 fi
15821 ;;
c906108c 15822 esac
bec39cab 15823
c906108c
SS
15824fi
15825
3f47be5c 15826if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15828$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 15829if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 15830 $as_echo_n "(cached) " >&6
bec39cab 15831else
81ecdfbb 15832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15833/* end confdefs.h. */
3f47be5c 15834#include <thread_db.h>
bec39cab
AC
15835int
15836main ()
15837{
3f47be5c 15838int i = TD_NOTALLOC;
bec39cab
AC
15839 ;
15840 return 0;
15841}
15842_ACEOF
81ecdfbb 15843if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15844 gdb_cv_thread_db_h_has_td_notalloc=yes
15845else
81ecdfbb 15846 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15847
3f47be5c 15848fi
81ecdfbb 15849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15850
bec39cab 15851fi
81ecdfbb
RW
15852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15853$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15855$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 15856if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 15857 $as_echo_n "(cached) " >&6
59f80f10 15858else
81ecdfbb 15859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15860/* end confdefs.h. */
15861#include <thread_db.h>
15862int
15863main ()
15864{
15865int i = TD_VERSION;
15866 ;
15867 return 0;
15868}
15869_ACEOF
81ecdfbb 15870if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15871 gdb_cv_thread_db_h_has_td_version=yes
15872else
81ecdfbb 15873 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15874
15875fi
81ecdfbb 15876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15877
15878fi
81ecdfbb
RW
15879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15880$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15882$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 15883if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15884 $as_echo_n "(cached) " >&6
59f80f10 15885else
81ecdfbb 15886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15887/* end confdefs.h. */
15888#include <thread_db.h>
15889int
15890main ()
15891{
15892int i = TD_NOTLS;
15893 ;
15894 return 0;
15895}
15896_ACEOF
81ecdfbb 15897if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15898 gdb_cv_thread_db_h_has_td_notls=yes
15899else
81ecdfbb 15900 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15901
15902fi
81ecdfbb 15903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15904
15905fi
81ecdfbb
RW
15906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15907$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15908fi
15909if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15910
81ecdfbb 15911$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15912
59f80f10
DJ
15913fi
15914if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15915
81ecdfbb 15916$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15917
15918fi
15919if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15920
81ecdfbb 15921$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15922
3f47be5c
EZ
15923fi
15924
e655c1a2
PA
15925case $host_os in
15926 go32* | *djgpp*)
15927 gdbinit=gdb.ini
15928 ;;
15929 *)
15930 gdbinit=.gdbinit
15931 ;;
15932esac
15933
15934cat >>confdefs.h <<_ACEOF
15935#define GDBINIT "$gdbinit"
15936_ACEOF
15937
15938
fb40c209 15939
f83d8a90
DE
15940# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15941# except that the argument to --with-sysroot is optional.
15942# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15943if test "x$with_sysroot" = xyes; then
15944 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15945fi
bec39cab 15946
81ecdfbb
RW
15947# Check whether --with-sysroot was given.
15948if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15949 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15950else
15951 TARGET_SYSTEM_ROOT=
15952fi
030292b7 15953
030292b7 15954
f83d8a90
DE
15955 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15956 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15957 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15958 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15959
f83d8a90
DE
15960cat >>confdefs.h <<_ACEOF
15961#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15962_ACEOF
bec39cab 15963
030292b7 15964
b14b1491 15965
f83d8a90
DE
15966
15967 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15968 if test "x$prefix" = xNONE; then
15969 test_prefix=/usr/local
15970 else
15971 test_prefix=$prefix
15972 fi
15973 else
15974 test_prefix=$exec_prefix
15975 fi
15976 value=0
15977 case ${ac_define_dir} in
15978 "${test_prefix}"|"${test_prefix}/"*|\
15979 '${exec_prefix}'|'${exec_prefix}/'*)
15980 value=1
15981 ;;
15982 esac
15983
15984cat >>confdefs.h <<_ACEOF
15985#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15986_ACEOF
030292b7
DJ
15987
15988
15989
16e7150e 15990
16e7150e 15991
81ecdfbb
RW
15992# Check whether --with-system-gdbinit was given.
15993if test "${with_system_gdbinit+set}" = set; then :
15994 withval=$with_system_gdbinit;
b14b1491
TT
15995 SYSTEM_GDBINIT=$withval
15996else
15997 SYSTEM_GDBINIT=
81ecdfbb
RW
15998fi
15999
16e7150e
JG
16000
16001 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16002 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 16003 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
16004 ac_define_dir=`eval echo $ac_define_dir`
16005
16006cat >>confdefs.h <<_ACEOF
16007#define SYSTEM_GDBINIT "$ac_define_dir"
16008_ACEOF
16009
16010
16011
0c4a4063 16012
b14b1491
TT
16013 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16014 if test "x$prefix" = xNONE; then
16015 test_prefix=/usr/local
16016 else
16017 test_prefix=$prefix
16018 fi
16019 else
16020 test_prefix=$exec_prefix
16021 fi
16022 value=0
16023 case ${ac_define_dir} in
16024 "${test_prefix}"|"${test_prefix}/"*|\
16025 '${exec_prefix}'|'${exec_prefix}/'*)
16026 value=1
16027 ;;
16028 esac
16e7150e 16029
b14b1491
TT
16030cat >>confdefs.h <<_ACEOF
16031#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
16032_ACEOF
16033
b14b1491 16034
16e7150e 16035
0c4a4063 16036
b835bb52 16037
ed2a2229
CB
16038# Check whether --with-system-gdbinit-dir was given.
16039if test "${with_system_gdbinit_dir+set}" = set; then :
16040 withval=$with_system_gdbinit_dir;
16041 SYSTEM_GDBINIT_DIR=$withval
16042else
16043 SYSTEM_GDBINIT_DIR=
16044fi
16045
16046
16047 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16048 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16049 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16050 ac_define_dir=`eval echo $ac_define_dir`
16051
16052cat >>confdefs.h <<_ACEOF
16053#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16054_ACEOF
16055
16056
16057
16058
16059 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16060 if test "x$prefix" = xNONE; then
16061 test_prefix=/usr/local
16062 else
16063 test_prefix=$prefix
16064 fi
16065 else
16066 test_prefix=$exec_prefix
16067 fi
16068 value=0
16069 case ${ac_define_dir} in
16070 "${test_prefix}"|"${test_prefix}/"*|\
16071 '${exec_prefix}'|'${exec_prefix}/'*)
16072 value=1
16073 ;;
16074 esac
16075
16076cat >>confdefs.h <<_ACEOF
16077#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16078_ACEOF
16079
16080
16081
16082
16083
81ecdfbb
RW
16084# Check whether --enable-werror was given.
16085if test "${enable_werror+set}" = set; then :
16086 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
16087 yes | y) ERROR_ON_WARNING="yes" ;;
16088 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 16089 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 16090 esac
81ecdfbb
RW
16091fi
16092
094a342e 16093
9a084706
PA
16094# Enable -Werror by default when using gcc. Turn it off for releases.
16095if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
16096 ERROR_ON_WARNING=yes
16097fi
16098
16099WERROR_CFLAGS=""
16100if test "${ERROR_ON_WARNING}" = yes ; then
16101 WERROR_CFLAGS="-Werror"
16102fi
16103
cf6de44d 16104# The options we'll try to enable.
aac331e4 16105build_warnings="-Wall -Wpointer-arith \
a0de763e 16106-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 16107-Wno-switch -Wno-char-subscripts \
cf6de44d 16108-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 16109-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 16110-Wno-mismatched-tags \
632e107b 16111-Wno-error=deprecated-register \
85e26832 16112-Wsuggest-override \
1a34f210 16113-Wimplicit-fallthrough=3 \
96643e35 16114-Wduplicated-cond \
33a6bc35
TT
16115-Wshadow=local \
16116-Wdeprecated-copy \
16117-Wdeprecated-copy-dtor \
bb564c58
SM
16118-Wredundant-move \
16119-Wmissing-declarations"
3bc3d82a 16120
3526781e 16121case "${host}" in
4fa7574e
RO
16122 *-*-mingw32*)
16123 # Enable -Wno-format by default when using gcc on mingw since many
16124 # GCC versions complain about %I64.
16125 build_warnings="$build_warnings -Wno-format" ;;
16126 *-*-solaris*)
16127 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16128 # doesn't understand.
16129 build_warnings="$build_warnings -Wno-unknown-pragmas"
16130 # Solaris 11 <unistd.h> marks vfork deprecated.
16131 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
16132 *)
16133 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16134 # but there's a special case for this below.
16135 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
16136esac
16137
81ecdfbb
RW
16138# Check whether --enable-build-warnings was given.
16139if test "${enable_build_warnings+set}" = set; then :
16140 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
16141 yes) ;;
16142 no) build_warnings="-w";;
16143 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16144 build_warnings="${build_warnings} ${t}";;
16145 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16146 build_warnings="${t} ${build_warnings}";;
16147 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16148esac
d4f3574e 16149if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 16150 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 16151fi
81ecdfbb
RW
16152fi
16153# Check whether --enable-gdb-build-warnings was given.
16154if test "${enable_gdb_build_warnings+set}" = set; then :
16155 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
16156 yes) ;;
16157 no) build_warnings="-w";;
16158 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16159 build_warnings="${build_warnings} ${t}";;
16160 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16161 build_warnings="${t} ${build_warnings}";;
16162 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16163esac
16164if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16165 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16166fi
81ecdfbb 16167fi
3bc3d82a
PA
16168
16169# The set of warnings supported by a C++ compiler is not the same as
16170# of the C compiler.
cf6de44d 16171ac_ext=cpp
3bc3d82a
PA
16172ac_cpp='$CXXCPP $CPPFLAGS'
16173ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16174ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16175ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16176
3bc3d82a 16177
81ecdfbb 16178WARN_CFLAGS=""
c906108c
SS
16179if test "x${build_warnings}" != x -a "x$GCC" = xyes
16180then
81ecdfbb
RW
16181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16182$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
16183 # Separate out the -Werror flag as some files just cannot be
16184 # compiled with it enabled.
16185 for w in ${build_warnings}; do
7544db95
PA
16186 # GCC does not complain about -Wno-unknown-warning. Invert
16187 # and test -Wunknown-warning instead.
16188 case $w in
16189 -Wno-*)
16190 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
16191 -Wformat-nonliteral)
16192 # gcc requires -Wformat before -Wformat-nonliteral
16193 # will work, so stick them together.
16194 w="-Wformat $w"
16195 wtest="$w"
16196 ;;
7544db95
PA
16197 *)
16198 wtest=$w ;;
16199 esac
16200
746a987d
AC
16201 case $w in
16202 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
16203 *)
16204 # Check whether GCC accepts it.
4536bbc6 16205 saved_CFLAGS="$CFLAGS"
3e019bdc 16206 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 16207 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 16208 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
16209 if test "x$w" = "x-Wunused-variable"; then
16210 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16211 # fixed in GCC 4.9. This test is derived from the gdb
16212 # source code that triggered this bug in GCC.
16213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16214/* end confdefs.h. */
16215struct scoped_restore_base {};
16216 struct scoped_restore_tmpl : public scoped_restore_base {
16217 ~scoped_restore_tmpl() {}
16218 };
16219int
16220main ()
16221{
16222const scoped_restore_base &b = scoped_restore_tmpl();
16223 ;
16224 return 0;
16225}
16226_ACEOF
16227if ac_fn_cxx_try_compile "$LINENO"; then :
16228 WARN_CFLAGS="${WARN_CFLAGS} $w"
16229fi
16230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16231 else
16232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16233/* end confdefs.h. */
4536bbc6 16234
bec39cab
AC
16235int
16236main ()
16237{
4536bbc6 16238
bec39cab
AC
16239 ;
16240 return 0;
16241}
16242_ACEOF
3bc3d82a 16243if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 16244 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 16245fi
81ecdfbb 16246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 16247 fi
4536bbc6 16248 CFLAGS="$saved_CFLAGS"
3bc3d82a 16249 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
16250 esac
16251 done
81ecdfbb
RW
16252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16253$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
16254fi
16255
16256
104c1213 16257
cf6de44d 16258ac_ext=c
3bc3d82a
PA
16259ac_cpp='$CPP $CPPFLAGS'
16260ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16261ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16262ac_compiler_gnu=$ac_cv_c_compiler_gnu
16263
3bc3d82a 16264
b835bb52 16265
f35d5ade
TT
16266# Check whether --enable-ubsan was given.
16267if test "${enable_ubsan+set}" = set; then :
16268 enableval=$enable_ubsan;
16269else
eff98030 16270 enable_ubsan=no
f35d5ade
TT
16271fi
16272
16273if test "x$enable_ubsan" = xauto; then
16274 if $development; then
16275 enable_ubsan=yes
16276 fi
16277fi
16278ac_ext=cpp
16279ac_cpp='$CXXCPP $CPPFLAGS'
16280ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16281ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16282ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16283
16284if test "x$enable_ubsan" = xyes; then
16285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16286$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16287 saved_CXXFLAGS="$CXXFLAGS"
16288 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16290/* end confdefs.h. */
16291
16292int
16293main ()
16294{
16295
16296 ;
16297 return 0;
16298}
16299_ACEOF
16300if ac_fn_cxx_try_link "$LINENO"; then :
16301 enable_ubsan=yes
16302else
16303 enable_ubsan=no
16304fi
16305rm -f core conftest.err conftest.$ac_objext \
16306 conftest$ac_exeext conftest.$ac_ext
16307 CXXFLAGS="$saved_CXXFLAGS"
16308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16309$as_echo "$enable_ubsan" >&6; }
16310 if test "x$enable_ubsan" = xyes; then
16311 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16312 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16313 fi
16314fi
16315ac_ext=c
16316ac_cpp='$CPP $CPPFLAGS'
16317ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16318ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16319ac_compiler_gnu=$ac_cv_c_compiler_gnu
16320
16321
16322
7a292a7a 16323# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
16324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16325$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 16326if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 16327 $as_echo_n "(cached) " >&6
bec39cab 16328else
81ecdfbb 16329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16330/* end confdefs.h. */
7a292a7a
SS
16331
16332#if defined (__CYGWIN__) || defined (__CYGWIN32__)
16333lose
16334#endif
bec39cab 16335_ACEOF
7a292a7a 16336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 16337 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
16338 gdb_cv_os_cygwin=yes
16339else
7a292a7a
SS
16340 gdb_cv_os_cygwin=no
16341fi
16342rm -f conftest*
16343
16344fi
81ecdfbb
RW
16345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16346$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 16347
aff38e61 16348
3eb25fda 16349SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 16350case ${host} in
95cbc983
AC
16351 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16352 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 16353 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 16354 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
16355esac
16356
16357
cd0fc7c3
SS
16358# libreadline needs libuser32.a in a cygwin environment
16359WIN32LIBS=
0ad6b8ee 16360if test x"$gdb_cv_os_cygwin" = xyes; then
c5394b80
JM
16361 WIN32LIBS="-luser32"
16362 case "${target}" in
16363 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16364 ;;
16365 esac
cd0fc7c3 16366fi
c906108c 16367
b4505029 16368# The ser-tcp.c module requires sockets.
b2ceabe8
TT
16369# Note that WIN32APILIBS is set by GDB_AC_COMMON.
16370WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
7a292a7a 16371
31d99776 16372# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
16373
16374 OLD_CFLAGS=$CFLAGS
16375 OLD_LDFLAGS=$LDFLAGS
16376 OLD_LIBS=$LIBS
16377 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16378 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16379 # always want our bfd.
16380 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16381 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16382 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 16383 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16384 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 16385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 16386$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 16387if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 16388 $as_echo_n "(cached) " >&6
31d99776 16389else
81ecdfbb 16390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
16391/* end confdefs.h. */
16392#include <stdlib.h>
def63ff0
TT
16393 #include "bfd.h"
16394 #include "elf-bfd.h"
31d99776
DJ
16395
16396int
16397main ()
16398{
def63ff0 16399return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
16400 ;
16401 return 0;
16402}
16403_ACEOF
81ecdfbb 16404if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
16405 gdb_cv_var_elf=yes
16406else
81ecdfbb 16407 gdb_cv_var_elf=no
31d99776 16408fi
81ecdfbb
RW
16409rm -f core conftest.err conftest.$ac_objext \
16410 conftest$ac_exeext conftest.$ac_ext
31d99776 16411fi
81ecdfbb
RW
16412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16413$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
16414 CFLAGS=$OLD_CFLAGS
16415 LDFLAGS=$OLD_LDFLAGS
16416 LIBS=$OLD_LIBS
0ad6b8ee 16417if test "$gdb_cv_var_elf" = yes; then
d4777acb 16418 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 16419
81ecdfbb 16420$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 16421
075ff26d
JK
16422 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16423 if test "$plugins" = "yes"; then
a48b32c0
L
16424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16425$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 16426if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16427 $as_echo_n "(cached) " >&6
16428else
16429 ac_func_search_save_LIBS=$LIBS
16430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16431/* end confdefs.h. */
16432
16433/* Override any GCC internal prototype to avoid an error.
16434 Use char because int might match the return type of a GCC
16435 builtin and then its argument prototype would still apply. */
16436#ifdef __cplusplus
16437extern "C"
16438#endif
16439char dlopen ();
16440int
16441main ()
16442{
16443return dlopen ();
16444 ;
16445 return 0;
16446}
16447_ACEOF
16448for ac_lib in '' dl; do
16449 if test -z "$ac_lib"; then
16450 ac_res="none required"
16451 else
16452 ac_res=-l$ac_lib
16453 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16454 fi
16455 if ac_fn_c_try_link "$LINENO"; then :
16456 ac_cv_search_dlopen=$ac_res
16457fi
16458rm -f core conftest.err conftest.$ac_objext \
16459 conftest$ac_exeext
d0ac1c44 16460 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16461 break
16462fi
16463done
d0ac1c44 16464if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16465
16466else
16467 ac_cv_search_dlopen=no
16468fi
16469rm conftest.$ac_ext
16470LIBS=$ac_func_search_save_LIBS
16471fi
16472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16473$as_echo "$ac_cv_search_dlopen" >&6; }
16474ac_res=$ac_cv_search_dlopen
16475if test "$ac_res" != no; then :
16476 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16477
16478fi
16479
075ff26d 16480 fi
31d99776 16481fi
31d99776 16482
4f05add4
TT
16483# Add macho support to GDB, but only if BFD includes it.
16484
16485 OLD_CFLAGS=$CFLAGS
16486 OLD_LDFLAGS=$LDFLAGS
16487 OLD_LIBS=$LIBS
16488 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16489 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16490 # always want our bfd.
16491 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16492 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16493 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 16494 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16495 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
16496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16497$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 16498if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
16499 $as_echo_n "(cached) " >&6
16500else
16501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16502/* end confdefs.h. */
16503#include <stdlib.h>
16504 #include "bfd.h"
16505 #include "mach-o.h"
16506
16507int
16508main ()
16509{
16510return bfd_mach_o_lookup_command (NULL, 0, NULL);
16511 ;
16512 return 0;
16513}
16514_ACEOF
16515if ac_fn_c_try_link "$LINENO"; then :
16516 gdb_cv_var_macho=yes
16517else
16518 gdb_cv_var_macho=no
16519fi
16520rm -f core conftest.err conftest.$ac_objext \
16521 conftest$ac_exeext conftest.$ac_ext
16522fi
16523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16524$as_echo "$gdb_cv_var_macho" >&6; }
16525 CFLAGS=$OLD_CFLAGS
16526 LDFLAGS=$OLD_LDFLAGS
16527 LIBS=$OLD_LIBS
0ad6b8ee 16528if test "$gdb_cv_var_macho" = yes; then
4f05add4
TT
16529 CONFIG_OBS="$CONFIG_OBS machoread.o"
16530fi
16531
121ce6e5
DJ
16532# Add any host-specific objects to GDB.
16533CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16534
608e2dbb 16535# If building on ELF, look for lzma support for embedded compressed debug info.
0ad6b8ee 16536if test "$gdb_cv_var_elf" = yes; then
608e2dbb
TT
16537
16538# Check whether --with-lzma was given.
16539if test "${with_lzma+set}" = set; then :
16540 withval=$with_lzma;
16541else
16542 with_lzma=auto
16543fi
16544
16545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16546$as_echo_n "checking whether to use lzma... " >&6; }
16547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16548$as_echo "$with_lzma" >&6; }
16549
16550 if test "${with_lzma}" != no; then
16551
16552
16553
16554
16555
16556
16557
16558
16559 use_additional=yes
16560
16561 acl_save_prefix="$prefix"
16562 prefix="$acl_final_prefix"
16563 acl_save_exec_prefix="$exec_prefix"
16564 exec_prefix="$acl_final_exec_prefix"
16565
16566 eval additional_includedir=\"$includedir\"
16567 eval additional_libdir=\"$libdir\"
16568
16569 exec_prefix="$acl_save_exec_prefix"
16570 prefix="$acl_save_prefix"
16571
16572
16573# Check whether --with-liblzma-prefix was given.
16574if test "${with_liblzma_prefix+set}" = set; then :
16575 withval=$with_liblzma_prefix;
16576 if test "X$withval" = "Xno"; then
16577 use_additional=no
16578 else
16579 if test "X$withval" = "X"; then
16580
16581 acl_save_prefix="$prefix"
16582 prefix="$acl_final_prefix"
16583 acl_save_exec_prefix="$exec_prefix"
16584 exec_prefix="$acl_final_exec_prefix"
16585
16586 eval additional_includedir=\"$includedir\"
16587 eval additional_libdir=\"$libdir\"
16588
16589 exec_prefix="$acl_save_exec_prefix"
16590 prefix="$acl_save_prefix"
16591
16592 else
16593 additional_includedir="$withval/include"
16594 additional_libdir="$withval/lib"
16595 fi
16596 fi
16597
16598fi
16599
16600 LIBLZMA=
16601 LTLIBLZMA=
16602 INCLZMA=
16603 rpathdirs=
16604 ltrpathdirs=
16605 names_already_handled=
16606 names_next_round='lzma '
16607 while test -n "$names_next_round"; do
16608 names_this_round="$names_next_round"
16609 names_next_round=
16610 for name in $names_this_round; do
16611 already_handled=
16612 for n in $names_already_handled; do
16613 if test "$n" = "$name"; then
16614 already_handled=yes
16615 break
16616 fi
16617 done
16618 if test -z "$already_handled"; then
16619 names_already_handled="$names_already_handled $name"
16620 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16621 eval value=\"\$HAVE_LIB$uppername\"
16622 if test -n "$value"; then
16623 if test "$value" = yes; then
16624 eval value=\"\$LIB$uppername\"
16625 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16626 eval value=\"\$LTLIB$uppername\"
16627 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16628 else
16629 :
16630 fi
16631 else
16632 found_dir=
16633 found_la=
16634 found_so=
16635 found_a=
16636 if test $use_additional = yes; then
16637 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16638 found_dir="$additional_libdir"
16639 found_so="$additional_libdir/lib$name.$shlibext"
16640 if test -f "$additional_libdir/lib$name.la"; then
16641 found_la="$additional_libdir/lib$name.la"
16642 fi
16643 else
16644 if test -f "$additional_libdir/lib$name.$libext"; then
16645 found_dir="$additional_libdir"
16646 found_a="$additional_libdir/lib$name.$libext"
16647 if test -f "$additional_libdir/lib$name.la"; then
16648 found_la="$additional_libdir/lib$name.la"
16649 fi
16650 fi
16651 fi
16652 fi
16653 if test "X$found_dir" = "X"; then
16654 for x in $LDFLAGS $LTLIBLZMA; do
16655
16656 acl_save_prefix="$prefix"
16657 prefix="$acl_final_prefix"
16658 acl_save_exec_prefix="$exec_prefix"
16659 exec_prefix="$acl_final_exec_prefix"
16660 eval x=\"$x\"
16661 exec_prefix="$acl_save_exec_prefix"
16662 prefix="$acl_save_prefix"
16663
16664 case "$x" in
16665 -L*)
16666 dir=`echo "X$x" | sed -e 's/^X-L//'`
16667 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16668 found_dir="$dir"
16669 found_so="$dir/lib$name.$shlibext"
16670 if test -f "$dir/lib$name.la"; then
16671 found_la="$dir/lib$name.la"
16672 fi
16673 else
16674 if test -f "$dir/lib$name.$libext"; then
16675 found_dir="$dir"
16676 found_a="$dir/lib$name.$libext"
16677 if test -f "$dir/lib$name.la"; then
16678 found_la="$dir/lib$name.la"
16679 fi
16680 fi
16681 fi
16682 ;;
16683 esac
16684 if test "X$found_dir" != "X"; then
16685 break
16686 fi
16687 done
16688 fi
16689 if test "X$found_dir" != "X"; then
16690 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16691 if test "X$found_so" != "X"; then
16692 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16693 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16694 else
16695 haveit=
16696 for x in $ltrpathdirs; do
16697 if test "X$x" = "X$found_dir"; then
16698 haveit=yes
16699 break
16700 fi
16701 done
16702 if test -z "$haveit"; then
16703 ltrpathdirs="$ltrpathdirs $found_dir"
16704 fi
16705 if test "$hardcode_direct" = yes; then
16706 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16707 else
16708 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16709 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16710 haveit=
16711 for x in $rpathdirs; do
16712 if test "X$x" = "X$found_dir"; then
16713 haveit=yes
16714 break
16715 fi
16716 done
16717 if test -z "$haveit"; then
16718 rpathdirs="$rpathdirs $found_dir"
16719 fi
16720 else
16721 haveit=
16722 for x in $LDFLAGS $LIBLZMA; do
16723
16724 acl_save_prefix="$prefix"
16725 prefix="$acl_final_prefix"
16726 acl_save_exec_prefix="$exec_prefix"
16727 exec_prefix="$acl_final_exec_prefix"
16728 eval x=\"$x\"
16729 exec_prefix="$acl_save_exec_prefix"
16730 prefix="$acl_save_prefix"
16731
16732 if test "X$x" = "X-L$found_dir"; then
16733 haveit=yes
16734 break
16735 fi
16736 done
16737 if test -z "$haveit"; then
16738 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16739 fi
16740 if test "$hardcode_minus_L" != no; then
16741 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16742 else
16743 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16744 fi
16745 fi
16746 fi
16747 fi
16748 else
16749 if test "X$found_a" != "X"; then
16750 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16751 else
16752 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16753 fi
16754 fi
16755 additional_includedir=
16756 case "$found_dir" in
16757 */lib | */lib/)
16758 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16759 additional_includedir="$basedir/include"
16760 ;;
16761 esac
16762 if test "X$additional_includedir" != "X"; then
16763 if test "X$additional_includedir" != "X/usr/include"; then
16764 haveit=
16765 if test "X$additional_includedir" = "X/usr/local/include"; then
16766 if test -n "$GCC"; then
16767 case $host_os in
16768 linux*) haveit=yes;;
16769 esac
16770 fi
16771 fi
16772 if test -z "$haveit"; then
16773 for x in $CPPFLAGS $INCLZMA; do
16774
16775 acl_save_prefix="$prefix"
16776 prefix="$acl_final_prefix"
16777 acl_save_exec_prefix="$exec_prefix"
16778 exec_prefix="$acl_final_exec_prefix"
16779 eval x=\"$x\"
16780 exec_prefix="$acl_save_exec_prefix"
16781 prefix="$acl_save_prefix"
16782
16783 if test "X$x" = "X-I$additional_includedir"; then
16784 haveit=yes
16785 break
16786 fi
16787 done
16788 if test -z "$haveit"; then
16789 if test -d "$additional_includedir"; then
16790 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16791 fi
16792 fi
16793 fi
16794 fi
16795 fi
16796 if test -n "$found_la"; then
16797 save_libdir="$libdir"
16798 case "$found_la" in
16799 */* | *\\*) . "$found_la" ;;
16800 *) . "./$found_la" ;;
16801 esac
16802 libdir="$save_libdir"
16803 for dep in $dependency_libs; do
16804 case "$dep" in
16805 -L*)
16806 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16807 if test "X$additional_libdir" != "X/usr/lib"; then
16808 haveit=
16809 if test "X$additional_libdir" = "X/usr/local/lib"; then
16810 if test -n "$GCC"; then
16811 case $host_os in
16812 linux*) haveit=yes;;
16813 esac
16814 fi
16815 fi
16816 if test -z "$haveit"; then
16817 haveit=
16818 for x in $LDFLAGS $LIBLZMA; do
16819
16820 acl_save_prefix="$prefix"
16821 prefix="$acl_final_prefix"
16822 acl_save_exec_prefix="$exec_prefix"
16823 exec_prefix="$acl_final_exec_prefix"
16824 eval x=\"$x\"
16825 exec_prefix="$acl_save_exec_prefix"
16826 prefix="$acl_save_prefix"
16827
16828 if test "X$x" = "X-L$additional_libdir"; then
16829 haveit=yes
16830 break
16831 fi
16832 done
16833 if test -z "$haveit"; then
16834 if test -d "$additional_libdir"; then
16835 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16836 fi
16837 fi
16838 haveit=
16839 for x in $LDFLAGS $LTLIBLZMA; do
16840
16841 acl_save_prefix="$prefix"
16842 prefix="$acl_final_prefix"
16843 acl_save_exec_prefix="$exec_prefix"
16844 exec_prefix="$acl_final_exec_prefix"
16845 eval x=\"$x\"
16846 exec_prefix="$acl_save_exec_prefix"
16847 prefix="$acl_save_prefix"
16848
16849 if test "X$x" = "X-L$additional_libdir"; then
16850 haveit=yes
16851 break
16852 fi
16853 done
16854 if test -z "$haveit"; then
16855 if test -d "$additional_libdir"; then
16856 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16857 fi
16858 fi
16859 fi
16860 fi
16861 ;;
16862 -R*)
16863 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16864 if test "$enable_rpath" != no; then
16865 haveit=
16866 for x in $rpathdirs; do
16867 if test "X$x" = "X$dir"; then
16868 haveit=yes
16869 break
16870 fi
16871 done
16872 if test -z "$haveit"; then
16873 rpathdirs="$rpathdirs $dir"
16874 fi
16875 haveit=
16876 for x in $ltrpathdirs; do
16877 if test "X$x" = "X$dir"; then
16878 haveit=yes
16879 break
16880 fi
16881 done
16882 if test -z "$haveit"; then
16883 ltrpathdirs="$ltrpathdirs $dir"
16884 fi
16885 fi
16886 ;;
16887 -l*)
16888 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16889 ;;
16890 *.la)
16891 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16892 ;;
16893 *)
16894 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16895 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16896 ;;
16897 esac
16898 done
16899 fi
16900 else
16901 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16902 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16903 fi
16904 fi
16905 fi
16906 done
16907 done
16908 if test "X$rpathdirs" != "X"; then
16909 if test -n "$hardcode_libdir_separator"; then
16910 alldirs=
16911 for found_dir in $rpathdirs; do
16912 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16913 done
16914 acl_save_libdir="$libdir"
16915 libdir="$alldirs"
16916 eval flag=\"$hardcode_libdir_flag_spec\"
16917 libdir="$acl_save_libdir"
16918 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16919 else
16920 for found_dir in $rpathdirs; do
16921 acl_save_libdir="$libdir"
16922 libdir="$found_dir"
16923 eval flag=\"$hardcode_libdir_flag_spec\"
16924 libdir="$acl_save_libdir"
16925 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16926 done
16927 fi
16928 fi
16929 if test "X$ltrpathdirs" != "X"; then
16930 for found_dir in $ltrpathdirs; do
16931 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16932 done
16933 fi
16934
16935
16936 ac_save_CPPFLAGS="$CPPFLAGS"
16937
16938 for element in $INCLZMA; do
16939 haveit=
16940 for x in $CPPFLAGS; do
16941
16942 acl_save_prefix="$prefix"
16943 prefix="$acl_final_prefix"
16944 acl_save_exec_prefix="$exec_prefix"
16945 exec_prefix="$acl_final_exec_prefix"
16946 eval x=\"$x\"
16947 exec_prefix="$acl_save_exec_prefix"
16948 prefix="$acl_save_prefix"
16949
16950 if test "X$x" = "X$element"; then
16951 haveit=yes
16952 break
16953 fi
16954 done
16955 if test -z "$haveit"; then
16956 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16957 fi
16958 done
16959
16960
16961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16962$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16963if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16964 $as_echo_n "(cached) " >&6
16965else
16966
16967 ac_save_LIBS="$LIBS"
16968 LIBS="$LIBS $LIBLZMA"
16969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16970/* end confdefs.h. */
16971#include "lzma.h"
16972int
16973main ()
16974{
16975lzma_index_iter iter;
16976 lzma_index_iter_init (&iter, 0);
16977 lzma_mf_is_supported (LZMA_MF_HC3);
16978 ;
16979 return 0;
16980}
16981_ACEOF
16982if ac_fn_c_try_link "$LINENO"; then :
16983 ac_cv_liblzma=yes
16984else
16985 ac_cv_liblzma=no
16986fi
16987rm -f core conftest.err conftest.$ac_objext \
16988 conftest$ac_exeext conftest.$ac_ext
16989 LIBS="$ac_save_LIBS"
16990
16991fi
16992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16993$as_echo "$ac_cv_liblzma" >&6; }
16994 if test "$ac_cv_liblzma" = yes; then
16995 HAVE_LIBLZMA=yes
16996
16997$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16998
16999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17000$as_echo_n "checking how to link with liblzma... " >&6; }
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17002$as_echo "$LIBLZMA" >&6; }
17003 else
17004 HAVE_LIBLZMA=no
17005 CPPFLAGS="$ac_save_CPPFLAGS"
17006 LIBLZMA=
17007 LTLIBLZMA=
17008 fi
17009
17010
17011
17012
17013
17014
17015 if test "$HAVE_LIBLZMA" != yes; then
17016 if test "$with_lzma" = yes; then
d0ac1c44 17017 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
17018 fi
17019 fi
17020 fi
17021fi
17022
3fc11d3e
JM
17023LIBGUI="../libgui/src/libgui.a"
17024GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17025
17026
7a292a7a 17027
3fc11d3e
JM
17028WIN32LDAPP=
17029
17030
17031
d91670b9 17032case "${host}" in
686a5eed 17033*-*-cygwin* | *-*-mingw* )
d91670b9
CV
17034 configdir="win"
17035 ;;
17036*)
17037 configdir="unix"
17038 ;;
17039esac
3fc11d3e
JM
17040
17041GDBTKLIBS=
17042if test "${enable_gdbtk}" = "yes"; then
17043
d1c3b63a
KS
17044 # Gdbtk must have an absolute path to srcdir in order to run
17045 # properly when not installed.
17046 here=`pwd`
17047 cd ${srcdir}
17048 GDBTK_SRC_DIR=`pwd`
17049 cd $here
17050
bec39cab 17051
5062cc19
KS
17052 #
17053 # Ok, lets find the tcl configuration
17054 # First, look for one uninstalled.
17055 # the alternative search directory is invoked by --with-tcl
17056 #
3fc11d3e 17057
5062cc19
KS
17058 if test x"${no_tcl}" = x ; then
17059 # we reset no_tcl in case something fails here
17060 no_tcl=true
bec39cab 17061
81ecdfbb
RW
17062# Check whether --with-tcl was given.
17063if test "${with_tcl+set}" = set; then :
17064 withval=$with_tcl; with_tclconfig=${withval}
17065fi
17066
17067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17068$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 17069 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 17070 $as_echo_n "(cached) " >&6
3fc11d3e 17071else
bec39cab 17072
3fc11d3e 17073
5062cc19
KS
17074 # First check to see if --with-tcl was specified.
17075 case "${host}" in
17076 *-*-cygwin*) platDir="win" ;;
17077 *) platDir="unix" ;;
17078 esac
17079 if test x"${with_tclconfig}" != x ; then
17080 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17081 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17082 else
d0ac1c44 17083 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
17084 fi
17085 fi
17086
17087 # then check for a private Tcl installation
17088 if test x"${ac_cv_c_tclconfig}" = x ; then
17089 for i in \
17090 ../tcl \
17091 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17092 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17093 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17094 ../../tcl \
17095 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17096 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17097 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17098 ../../../tcl \
17099 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17100 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17101 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17102 if test -f "$i/$platDir/tclConfig.sh" ; then
17103 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17104 break
17105 fi
17106 done
17107 fi
17108
17109 # on Darwin, check in Framework installation locations
17110 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17111 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17112 `ls -d /Library/Frameworks 2>/dev/null` \
17113 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17114 `ls -d /System/Library/Frameworks 2>/dev/null` \
17115 ; do
17116 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17117 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17118 break
17119 fi
17120 done
17121 fi
17122
17123 # check in a few common install locations
17124 if test x"${ac_cv_c_tclconfig}" = x ; then
17125 for i in `ls -d ${libdir} 2>/dev/null` \
17126 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17127 `ls -d ${prefix}/lib 2>/dev/null` \
17128 `ls -d /usr/local/lib 2>/dev/null` \
17129 `ls -d /usr/contrib/lib 2>/dev/null` \
17130 `ls -d /usr/lib 2>/dev/null` \
17131 ; do
17132 if test -f "$i/tclConfig.sh" ; then
17133 ac_cv_c_tclconfig=`(cd $i; pwd)`
17134 break
17135 fi
17136 done
17137 fi
3fc11d3e 17138
5062cc19
KS
17139 # check in a few other private locations
17140 if test x"${ac_cv_c_tclconfig}" = x ; then
17141 for i in \
17142 ${srcdir}/../tcl \
17143 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17144 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17145 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17146 if test -f "$i/$platDir/tclConfig.sh" ; then
17147 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17148 break
17149 fi
17150 done
17151 fi
bec39cab 17152
3fc11d3e
JM
17153fi
17154
5062cc19
KS
17155
17156 if test x"${ac_cv_c_tclconfig}" = x ; then
17157 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
17158 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17159$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
17160 else
17161 no_tcl=
17162 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
17163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17164$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
17165 fi
17166 fi
3fc11d3e 17167
bec39cab 17168
85541719
DE
17169 # If $no_tk is nonempty, then we can't do Tk, and there is no
17170 # point to doing Tcl.
bec39cab 17171
5062cc19
KS
17172 #
17173 # Ok, lets find the tk configuration
17174 # First, look for one uninstalled.
17175 # the alternative search directory is invoked by --with-tk
17176 #
3fc11d3e 17177
5062cc19
KS
17178 if test x"${no_tk}" = x ; then
17179 # we reset no_tk in case something fails here
17180 no_tk=true
bec39cab 17181
81ecdfbb
RW
17182# Check whether --with-tk was given.
17183if test "${with_tk+set}" = set; then :
17184 withval=$with_tk; with_tkconfig=${withval}
17185fi
17186
17187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17188$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 17189 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 17190 $as_echo_n "(cached) " >&6
bec39cab 17191else
3fc11d3e
JM
17192
17193
5062cc19
KS
17194 # First check to see if --with-tkconfig was specified.
17195 if test x"${with_tkconfig}" != x ; then
17196 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17197 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17198 else
d0ac1c44 17199 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
17200 fi
17201 fi
3fc11d3e 17202
5062cc19
KS
17203 # then check for a private Tk library
17204 case "${host}" in
17205 *-*-cygwin*) platDir="win" ;;
17206 *) platDir="unix" ;;
17207 esac
17208 if test x"${ac_cv_c_tkconfig}" = x ; then
17209 for i in \
17210 ../tk \
17211 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17212 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17213 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17214 ../../tk \
17215 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17216 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17217 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17218 ../../../tk \
17219 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17220 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17221 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17222 if test -f "$i/$platDir/tkConfig.sh" ; then
17223 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17224 break
17225 fi
17226 done
17227 fi
17228
17229 # on Darwin, check in Framework installation locations
17230 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17231 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17232 `ls -d /Library/Frameworks 2>/dev/null` \
17233 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17234 `ls -d /System/Library/Frameworks 2>/dev/null` \
17235 ; do
17236 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17237 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17238 break
17239 fi
17240 done
17241 fi
17242
17243 # check in a few common install locations
17244 if test x"${ac_cv_c_tkconfig}" = x ; then
17245 for i in `ls -d ${libdir} 2>/dev/null` \
17246 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17247 `ls -d ${prefix}/lib 2>/dev/null` \
17248 `ls -d /usr/local/lib 2>/dev/null` \
17249 `ls -d /usr/contrib/lib 2>/dev/null` \
17250 `ls -d /usr/lib 2>/dev/null` \
17251 ; do
17252 if test -f "$i/tkConfig.sh" ; then
17253 ac_cv_c_tkconfig=`(cd $i; pwd)`
17254 break
17255 fi
17256 done
17257 fi
17258 # check in a few other private locations
17259 if test x"${ac_cv_c_tkconfig}" = x ; then
17260 for i in \
17261 ${srcdir}/../tk \
17262 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17263 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17264 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17265 if test -f "$i/$platDir/tkConfig.sh" ; then
17266 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17267 break
17268 fi
17269 done
17270 fi
3fc11d3e 17271
3fc11d3e
JM
17272fi
17273
17274
5062cc19
KS
17275 if test x"${ac_cv_c_tkconfig}" = x ; then
17276 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
17277 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17278$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
17279 else
17280 no_tk=
17281 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
17282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17283$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 17284 fi
3fc11d3e 17285 fi
dd2504ab 17286
dd2504ab 17287
85541719
DE
17288 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17289
81ecdfbb
RW
17290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17291$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
17292
17293 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
17294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17295$as_echo "loading" >&6; }
85541719
DE
17296 . ${TCL_BIN_DIR}/tclConfig.sh
17297 else
81ecdfbb
RW
17298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17299$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
17300 fi
17301
17302 # eval is required to do the TCL_DBGX substitution
17303 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17304 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17305
17306 # If the TCL_BIN_DIR is the build directory (not the install directory),
17307 # then set the common variable name to the value of the build variables.
17308 # For example, the variable TCL_LIB_SPEC will be set to the value
17309 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17310 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17311 # installed and uninstalled version of Tcl.
17312 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17313 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17314 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17315 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17316 elif test "`uname -s`" = "Darwin"; then
17317 # If Tcl was built as a framework, attempt to use the libraries
17318 # from the framework at the given location so that linking works
a68ffae9 17319 # against Tcl.framework installed in an arbitrary location.
85541719
DE
17320 case ${TCL_DEFS} in
17321 *TCL_FRAMEWORK*)
17322 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17323 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17324 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17325 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17326 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17327 break
17328 fi
17329 done
17330 fi
17331 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17332 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17333 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17334 fi
17335 ;;
17336 esac
17337 fi
17338
17339 # eval is required to do the TCL_DBGX substitution
17340 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17341 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17342 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17343 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359 # Check for in-tree tcl
17360 here=`pwd`
17361 cd ${srcdir}/..
17362 topdir=`pwd`
17363 cd ${here}
17364
17365 intree="no"
17366 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17367 intree="yes"
17368 fi
17369
17370 # Find Tcl private headers
17371 if test x"${intree}" = xno; then
17372
81ecdfbb
RW
17373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17374$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
17375 private_dir=""
17376 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17377 if test -f ${dir}/tclInt.h ; then
17378 private_dir=${dir}
17379 fi
17380
17381 if test x"${private_dir}" = x; then
d0ac1c44 17382 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
17383 else
17384 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17386$as_echo "${private_dir}" >&6; }
85541719
DE
17387 fi
17388
17389 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17390 TCL_LIBRARY="${TCL_LIB_SPEC}"
17391 TCL_DEPS=""
17392 else
17393 # If building tcl in the same src tree, private headers
17394 # are not needed, but we need to be sure to use the right
17395 # headers library
17396 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17397 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17398 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17399 fi
17400
17401
17402
17403
17404
81ecdfbb
RW
17405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17406$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 17407
5062cc19 17408 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
17409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17410$as_echo "loading" >&6; }
5062cc19 17411 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 17412 else
81ecdfbb
RW
17413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17414$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 17415 fi
bec39cab 17416
5062cc19
KS
17417 # eval is required to do the TK_DBGX substitution
17418 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17419 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17420
17421 # If the TK_BIN_DIR is the build directory (not the install directory),
17422 # then set the common variable name to the value of the build variables.
17423 # For example, the variable TK_LIB_SPEC will be set to the value
17424 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17425 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17426 # installed and uninstalled version of Tcl.
85541719 17427 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
17428 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17429 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17430 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17431 elif test "`uname -s`" = "Darwin"; then
17432 # If Tk was built as a framework, attempt to use the libraries
17433 # from the framework at the given location so that linking works
a68ffae9 17434 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
17435 case ${TK_DEFS} in
17436 *TK_FRAMEWORK*)
85541719 17437 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
17438 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17439 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17440 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17441 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17442 break
17443 fi
17444 done
17445 fi
85541719 17446 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
17447 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17448 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17449 fi
17450 ;;
17451 esac
3fc11d3e
JM
17452 fi
17453
5062cc19
KS
17454 # eval is required to do the TK_DBGX substitution
17455 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17456 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17457 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17458 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 17459
3fc11d3e
JM
17460
17461
bec39cab
AC
17462
17463
17464
17465
17466
17467
17468
3fc11d3e 17469
3fc11d3e 17470
bec39cab 17471
bec39cab 17472
85541719
DE
17473 # Check for in-tree Tk
17474 intree="no"
17475 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17476 intree="yes"
17477 fi
3fc11d3e 17478
85541719
DE
17479 # Find Tk private headers
17480 if test x"${intree}" = xno; then
3fc11d3e 17481
81ecdfbb
RW
17482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17483$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
17484 private_dir=""
17485 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17486 if test -f ${dir}/tkInt.h; then
17487 private_dir=${dir}
3fc11d3e 17488 fi
bec39cab 17489
5062cc19 17490 if test x"${private_dir}" = x; then
d0ac1c44 17491 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 17492 else
5062cc19 17493 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17495$as_echo "${private_dir}" >&6; }
3fc11d3e 17496 fi
3fc11d3e 17497
85541719
DE
17498 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17499 TK_LIBRARY=${TK_LIB_SPEC}
17500 TK_DEPS=""
17501 else
17502 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17503 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17504 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17505 fi
3fc11d3e
JM
17506
17507
3fc11d3e
JM
17508
17509
3fc11d3e 17510
85541719 17511 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 17512
85541719
DE
17513 # Include some libraries that Tcl and Tk want.
17514 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17515 # Yes, the ordering seems wrong here. But it isn't.
17516 # TK_LIBS is the list of libraries that need to be linked
17517 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17518 # were in LIBS then any link tests after this point would
17519 # try to include things like `$(LIBGUI)', which wouldn't work.
17520 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 17521
85541719
DE
17522 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17523 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17524 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17525 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17526 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17527 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17528 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 17529
0ad6b8ee 17530 if test x"$gdb_cv_os_cygwin" = xyes; then
85541719
DE
17531 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17532 WIN32LDAPP="-Wl,--subsystem,console"
17533 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 17534 fi
ffc6a242 17535
81ecdfbb 17536 subdirs="$subdirs gdbtk"
3ace7edb 17537
85541719 17538 fi
3fc11d3e
JM
17539fi
17540
17541
17542
17543
17544
17545
17546
17547
81ecdfbb
RW
17548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17549$as_echo_n "checking for X... " >&6; }
bec39cab 17550
c906108c 17551
81ecdfbb
RW
17552# Check whether --with-x was given.
17553if test "${with_x+set}" = set; then :
17554 withval=$with_x;
17555fi
c906108c
SS
17556
17557# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17558if test "x$with_x" = xno; then
17559 # The user explicitly disabled X.
17560 have_x=disabled
17561else
81ecdfbb 17562 case $x_includes,$x_libraries in #(
d0ac1c44
SM
17563 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17564 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 17565 $as_echo_n "(cached) " >&6
c906108c
SS
17566else
17567 # One or both of the vars are not set, and there is no cached value.
bec39cab 17568ac_x_includes=no ac_x_libraries=no
81ecdfbb 17569rm -f -r conftest.dir
bec39cab
AC
17570if mkdir conftest.dir; then
17571 cd conftest.dir
bec39cab 17572 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
17573incroot:
17574 @echo incroot='${INCROOT}'
17575usrlibdir:
17576 @echo usrlibdir='${USRLIBDIR}'
17577libdir:
17578 @echo libdir='${LIBDIR}'
17579_ACEOF
17580 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 17581 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
17582 for ac_var in incroot usrlibdir libdir; do
17583 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17584 done
c906108c 17585 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
17586 for ac_extension in a so sl dylib la dll; do
17587 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17588 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 17589 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
17590 fi
17591 done
17592 # Screen out bogus values from the imake configuration. They are
17593 # bogus both because they are the default anyway, and because
17594 # using them would break gcc on systems where it needs fixed includes.
bec39cab 17595 case $ac_im_incroot in
81ecdfbb 17596 /usr/include) ac_x_includes= ;;
bec39cab 17597 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 17598 esac
bec39cab 17599 case $ac_im_usrlibdir in
81ecdfbb 17600 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 17601 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
17602 esac
17603 fi
17604 cd ..
81ecdfbb 17605 rm -f -r conftest.dir
c906108c
SS
17606fi
17607
bec39cab
AC
17608# Standard set of common directories for X headers.
17609# Check X11 before X11Rn because it is often a symlink to the current release.
17610ac_x_header_dirs='
17611/usr/X11/include
81ecdfbb 17612/usr/X11R7/include
bec39cab
AC
17613/usr/X11R6/include
17614/usr/X11R5/include
17615/usr/X11R4/include
17616
17617/usr/include/X11
81ecdfbb 17618/usr/include/X11R7
bec39cab
AC
17619/usr/include/X11R6
17620/usr/include/X11R5
17621/usr/include/X11R4
17622
17623/usr/local/X11/include
81ecdfbb 17624/usr/local/X11R7/include
bec39cab
AC
17625/usr/local/X11R6/include
17626/usr/local/X11R5/include
17627/usr/local/X11R4/include
17628
17629/usr/local/include/X11
81ecdfbb 17630/usr/local/include/X11R7
bec39cab
AC
17631/usr/local/include/X11R6
17632/usr/local/include/X11R5
17633/usr/local/include/X11R4
17634
17635/usr/X386/include
17636/usr/x386/include
17637/usr/XFree86/include/X11
17638
17639/usr/include
17640/usr/local/include
17641/usr/unsupported/include
17642/usr/athena/include
17643/usr/local/x11r5/include
17644/usr/lpp/Xamples/include
17645
17646/usr/openwin/include
17647/usr/openwin/share/include'
17648
17649if test "$ac_x_includes" = no; then
81ecdfbb 17650 # Guess where to find include files, by looking for Xlib.h.
c906108c 17651 # First, try using that file with no special directory specified.
81ecdfbb 17652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17653/* end confdefs.h. */
81ecdfbb 17654#include <X11/Xlib.h>
bec39cab 17655_ACEOF
81ecdfbb 17656if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
17657 # We can compile using X headers with no special include directory.
17658ac_x_includes=
17659else
bec39cab 17660 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 17661 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
17662 ac_x_includes=$ac_dir
17663 break
17664 fi
17665done
c906108c 17666fi
d0ac1c44 17667rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 17668fi # $ac_x_includes = no
c906108c 17669
bec39cab 17670if test "$ac_x_libraries" = no; then
c906108c 17671 # Check for the libraries.
c906108c
SS
17672 # See if we find them without any special options.
17673 # Don't add to $LIBS permanently.
bec39cab 17674 ac_save_LIBS=$LIBS
81ecdfbb
RW
17675 LIBS="-lX11 $LIBS"
17676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17677/* end confdefs.h. */
81ecdfbb 17678#include <X11/Xlib.h>
bec39cab
AC
17679int
17680main ()
17681{
81ecdfbb 17682XrmInitialize ()
bec39cab
AC
17683 ;
17684 return 0;
17685}
17686_ACEOF
81ecdfbb 17687if ac_fn_c_try_link "$LINENO"; then :
bec39cab 17688 LIBS=$ac_save_LIBS
c906108c
SS
17689# We can link X programs with no special library path.
17690ac_x_libraries=
17691else
81ecdfbb
RW
17692 LIBS=$ac_save_LIBS
17693for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 17694do
bec39cab 17695 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
17696 for ac_extension in a so sl dylib la dll; do
17697 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
17698 ac_x_libraries=$ac_dir
17699 break 2
17700 fi
17701 done
17702done
17703fi
81ecdfbb
RW
17704rm -f core conftest.err conftest.$ac_objext \
17705 conftest$ac_exeext conftest.$ac_ext
bec39cab 17706fi # $ac_x_libraries = no
c906108c 17707
81ecdfbb
RW
17708case $ac_x_includes,$ac_x_libraries in #(
17709 no,* | *,no | *\'*)
17710 # Didn't find X, or a directory has "'" in its name.
17711 ac_cv_have_x="have_x=no";; #(
17712 *)
17713 # Record where we found X for the cache.
17714 ac_cv_have_x="have_x=yes\
17715 ac_x_includes='$ac_x_includes'\
17716 ac_x_libraries='$ac_x_libraries'"
17717esac
c906108c 17718fi
81ecdfbb
RW
17719;; #(
17720 *) have_x=yes;;
17721 esac
c906108c
SS
17722 eval "$ac_cv_have_x"
17723fi # $with_x != no
17724
17725if test "$have_x" != yes; then
81ecdfbb
RW
17726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17727$as_echo "$have_x" >&6; }
c906108c
SS
17728 no_x=yes
17729else
17730 # If each of the values was on the command line, it overrides each guess.
17731 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17732 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17733 # Update the cache value to reflect the command line values.
81ecdfbb
RW
17734 ac_cv_have_x="have_x=yes\
17735 ac_x_includes='$x_includes'\
17736 ac_x_libraries='$x_libraries'"
17737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17738$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
17739fi
17740
17741
bec39cab 17742# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 17743# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
17744# This code just checks for a few cases where we'd like to ignore those
17745# definitions, even when they're present in the '.mt' file. These cases
17746# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 17747# not part of the source tree.
7a292a7a 17748#
81ecdfbb
RW
17749# Check whether --enable-sim was given.
17750if test "${enable_sim+set}" = set; then :
17751 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
17752 echo "enableval = ${enableval}";
17753 case "${enableval}" in
17754 yes) ignore_sim=false ;;
17755 no) ignore_sim=true ;;
17756 *) ignore_sim=false ;;
17757 esac
17758else
17759 ignore_sim=false
81ecdfbb
RW
17760fi
17761
7a292a7a
SS
17762
17763if test ! -d "${srcdir}/../sim"; then
17764 ignore_sim=true
17765fi
17766
9b624dbe
UW
17767SIM=
17768SIM_OBS=
17769if test "${ignore_sim}" = "false"; then
17770 if test x"${gdb_sim}" != x ; then
17771 SIM="${gdb_sim}"
17772 SIM_OBS="remote-sim.o"
60ca704f 17773
81ecdfbb 17774$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17775
976102cd
PA
17776
17777 # Some tdep code should only be compiled in when the ppc sim is
17778 # built. PR sim/13418.
17779 case $target in
17780 powerpc*-*-*)
17781
17782$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17783
17784 ;;
17785 esac
9b624dbe 17786 fi
7a292a7a
SS
17787fi
17788
17789
17790
c906108c
SS
17791
17792
17793
17794
17795
17796
dfcd3bfb 17797
e56ac5c3
AC
17798
17799
b3a90332
AC
17800
17801
c35f4ffc 17802# List of host floatformats.
bec39cab
AC
17803
17804cat >>confdefs.h <<_ACEOF
c35f4ffc 17805#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17806_ACEOF
c35f4ffc 17807
bec39cab
AC
17808
17809cat >>confdefs.h <<_ACEOF
c35f4ffc 17810#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17811_ACEOF
17812
c35f4ffc 17813
bec39cab 17814cat >>confdefs.h <<_ACEOF
c35f4ffc 17815#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17816_ACEOF
c35f4ffc
AC
17817
17818
c906108c
SS
17819# target_subdir is used by the testsuite to find the target libraries.
17820target_subdir=
17821if test "${host}" != "${target}"; then
17822 target_subdir="${target_alias}/"
17823fi
17824
17825
21ea5acd 17826# Import nat definitions.
2b351b19 17827nat_makefile_frag=/dev/null
771b4502 17828if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17829 . ${srcdir}/configure.nat
17830 nativefile=$NAT_FILE
c906108c 17831fi
c906108c 17832
c906108c
SS
17833
17834
17835
21ea5acd
SDJ
17836
17837
17838
17839
17840
c906108c
SS
17841
17842
b00a8037 17843if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17844
17845cat >>confdefs.h <<_ACEOF
b00a8037 17846#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17847_ACEOF
b00a8037
DJ
17848
17849fi
17850
496c0e1b
JB
17851# Check whether --enable-gdbserver was given.
17852if test "${enable_gdbserver+set}" = set; then :
17853 enableval=$enable_gdbserver; case "${enableval}" in
17854 yes| no|auto) ;;
d0ac1c44 17855 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17856esac
17857else
17858 enable_gdbserver=auto
17859fi
17860
17861
17862# We only build gdbserver automatically in a native configuration, and
17863# only if the user did not explicitly disable its build.
17864if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17866$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17867 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17869$as_echo "yes" >&6; }
17870 subdirs="$subdirs gdbserver"
3ace7edb 17871
496c0e1b 17872 gdbserver_build_enabled=yes
8dcde887 17873 else
81ecdfbb
RW
17874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17875$as_echo "no" >&6; }
8dcde887
MK
17876 fi
17877fi
17878
496c0e1b
JB
17879# If the user explicitly request the gdbserver to be built, verify that
17880# we were in fact able to enable it.
17881if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17882 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17883fi
17884
393fd4c3
YQ
17885# Check for babeltrace and babeltrace-ctf
17886
17887# Check whether --with-babeltrace was given.
17888if test "${with_babeltrace+set}" = set; then :
17889 withval=$with_babeltrace;
17890else
17891 with_babeltrace=auto
17892fi
17893
17894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17895$as_echo_n "checking whether to use babeltrace... " >&6; }
17896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17897$as_echo "$with_babeltrace" >&6; }
17898
17899if test "x$with_babeltrace" = "xno"; then
17900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17901$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17902else
17903 # Append -Werror to CFLAGS so that configure can catch the warning
17904 # "assignment from incompatible pointer type", which is related to
17905 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17906 # in GDB, while babeltrace 1.0.3 is broken.
17907 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17908 # safe to save and restore CFLAGS here.
17909 saved_CFLAGS=$CFLAGS
17910 CFLAGS="$CFLAGS -Werror"
17911
17912
17913
17914
17915
17916
17917
17918
17919 use_additional=yes
17920
17921 acl_save_prefix="$prefix"
17922 prefix="$acl_final_prefix"
17923 acl_save_exec_prefix="$exec_prefix"
17924 exec_prefix="$acl_final_exec_prefix"
17925
17926 eval additional_includedir=\"$includedir\"
17927 eval additional_libdir=\"$libdir\"
17928
17929 exec_prefix="$acl_save_exec_prefix"
17930 prefix="$acl_save_prefix"
17931
17932
17933# Check whether --with-libbabeltrace-prefix was given.
17934if test "${with_libbabeltrace_prefix+set}" = set; then :
17935 withval=$with_libbabeltrace_prefix;
17936 if test "X$withval" = "Xno"; then
17937 use_additional=no
17938 else
17939 if test "X$withval" = "X"; then
17940
17941 acl_save_prefix="$prefix"
17942 prefix="$acl_final_prefix"
17943 acl_save_exec_prefix="$exec_prefix"
17944 exec_prefix="$acl_final_exec_prefix"
17945
17946 eval additional_includedir=\"$includedir\"
17947 eval additional_libdir=\"$libdir\"
17948
17949 exec_prefix="$acl_save_exec_prefix"
17950 prefix="$acl_save_prefix"
17951
17952 else
17953 additional_includedir="$withval/include"
17954 additional_libdir="$withval/lib"
17955 fi
17956 fi
17957
17958fi
17959
17960 LIBBABELTRACE=
17961 LTLIBBABELTRACE=
17962 INCBABELTRACE=
17963 rpathdirs=
17964 ltrpathdirs=
17965 names_already_handled=
17966 names_next_round='babeltrace babeltrace-ctf'
17967 while test -n "$names_next_round"; do
17968 names_this_round="$names_next_round"
17969 names_next_round=
17970 for name in $names_this_round; do
17971 already_handled=
17972 for n in $names_already_handled; do
17973 if test "$n" = "$name"; then
17974 already_handled=yes
17975 break
17976 fi
17977 done
17978 if test -z "$already_handled"; then
17979 names_already_handled="$names_already_handled $name"
17980 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17981 eval value=\"\$HAVE_LIB$uppername\"
17982 if test -n "$value"; then
17983 if test "$value" = yes; then
17984 eval value=\"\$LIB$uppername\"
17985 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17986 eval value=\"\$LTLIB$uppername\"
17987 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17988 else
17989 :
17990 fi
17991 else
17992 found_dir=
17993 found_la=
17994 found_so=
17995 found_a=
17996 if test $use_additional = yes; then
17997 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17998 found_dir="$additional_libdir"
17999 found_so="$additional_libdir/lib$name.$shlibext"
18000 if test -f "$additional_libdir/lib$name.la"; then
18001 found_la="$additional_libdir/lib$name.la"
18002 fi
18003 else
18004 if test -f "$additional_libdir/lib$name.$libext"; then
18005 found_dir="$additional_libdir"
18006 found_a="$additional_libdir/lib$name.$libext"
18007 if test -f "$additional_libdir/lib$name.la"; then
18008 found_la="$additional_libdir/lib$name.la"
18009 fi
18010 fi
18011 fi
18012 fi
18013 if test "X$found_dir" = "X"; then
18014 for x in $LDFLAGS $LTLIBBABELTRACE; do
18015
18016 acl_save_prefix="$prefix"
18017 prefix="$acl_final_prefix"
18018 acl_save_exec_prefix="$exec_prefix"
18019 exec_prefix="$acl_final_exec_prefix"
18020 eval x=\"$x\"
18021 exec_prefix="$acl_save_exec_prefix"
18022 prefix="$acl_save_prefix"
18023
18024 case "$x" in
18025 -L*)
18026 dir=`echo "X$x" | sed -e 's/^X-L//'`
18027 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
18028 found_dir="$dir"
18029 found_so="$dir/lib$name.$shlibext"
18030 if test -f "$dir/lib$name.la"; then
18031 found_la="$dir/lib$name.la"
18032 fi
18033 else
18034 if test -f "$dir/lib$name.$libext"; then
18035 found_dir="$dir"
18036 found_a="$dir/lib$name.$libext"
18037 if test -f "$dir/lib$name.la"; then
18038 found_la="$dir/lib$name.la"
18039 fi
18040 fi
18041 fi
18042 ;;
18043 esac
18044 if test "X$found_dir" != "X"; then
18045 break
18046 fi
18047 done
18048 fi
18049 if test "X$found_dir" != "X"; then
18050 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18051 if test "X$found_so" != "X"; then
18052 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18053 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18054 else
18055 haveit=
18056 for x in $ltrpathdirs; do
18057 if test "X$x" = "X$found_dir"; then
18058 haveit=yes
18059 break
18060 fi
18061 done
18062 if test -z "$haveit"; then
18063 ltrpathdirs="$ltrpathdirs $found_dir"
18064 fi
18065 if test "$hardcode_direct" = yes; then
18066 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18067 else
18068 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18069 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18070 haveit=
18071 for x in $rpathdirs; do
18072 if test "X$x" = "X$found_dir"; then
18073 haveit=yes
18074 break
18075 fi
18076 done
18077 if test -z "$haveit"; then
18078 rpathdirs="$rpathdirs $found_dir"
18079 fi
18080 else
18081 haveit=
18082 for x in $LDFLAGS $LIBBABELTRACE; do
18083
18084 acl_save_prefix="$prefix"
18085 prefix="$acl_final_prefix"
18086 acl_save_exec_prefix="$exec_prefix"
18087 exec_prefix="$acl_final_exec_prefix"
18088 eval x=\"$x\"
18089 exec_prefix="$acl_save_exec_prefix"
18090 prefix="$acl_save_prefix"
18091
18092 if test "X$x" = "X-L$found_dir"; then
18093 haveit=yes
18094 break
18095 fi
18096 done
18097 if test -z "$haveit"; then
18098 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18099 fi
18100 if test "$hardcode_minus_L" != no; then
18101 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18102 else
18103 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18104 fi
18105 fi
18106 fi
18107 fi
18108 else
18109 if test "X$found_a" != "X"; then
18110 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18111 else
18112 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18113 fi
18114 fi
18115 additional_includedir=
18116 case "$found_dir" in
18117 */lib | */lib/)
18118 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18119 additional_includedir="$basedir/include"
18120 ;;
18121 esac
18122 if test "X$additional_includedir" != "X"; then
18123 if test "X$additional_includedir" != "X/usr/include"; then
18124 haveit=
18125 if test "X$additional_includedir" = "X/usr/local/include"; then
18126 if test -n "$GCC"; then
18127 case $host_os in
18128 linux*) haveit=yes;;
18129 esac
18130 fi
18131 fi
18132 if test -z "$haveit"; then
18133 for x in $CPPFLAGS $INCBABELTRACE; do
18134
18135 acl_save_prefix="$prefix"
18136 prefix="$acl_final_prefix"
18137 acl_save_exec_prefix="$exec_prefix"
18138 exec_prefix="$acl_final_exec_prefix"
18139 eval x=\"$x\"
18140 exec_prefix="$acl_save_exec_prefix"
18141 prefix="$acl_save_prefix"
18142
18143 if test "X$x" = "X-I$additional_includedir"; then
18144 haveit=yes
18145 break
18146 fi
18147 done
18148 if test -z "$haveit"; then
18149 if test -d "$additional_includedir"; then
18150 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18151 fi
18152 fi
18153 fi
18154 fi
18155 fi
18156 if test -n "$found_la"; then
18157 save_libdir="$libdir"
18158 case "$found_la" in
18159 */* | *\\*) . "$found_la" ;;
18160 *) . "./$found_la" ;;
18161 esac
18162 libdir="$save_libdir"
18163 for dep in $dependency_libs; do
18164 case "$dep" in
18165 -L*)
18166 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18167 if test "X$additional_libdir" != "X/usr/lib"; then
18168 haveit=
18169 if test "X$additional_libdir" = "X/usr/local/lib"; then
18170 if test -n "$GCC"; then
18171 case $host_os in
18172 linux*) haveit=yes;;
18173 esac
18174 fi
18175 fi
18176 if test -z "$haveit"; then
18177 haveit=
18178 for x in $LDFLAGS $LIBBABELTRACE; do
18179
18180 acl_save_prefix="$prefix"
18181 prefix="$acl_final_prefix"
18182 acl_save_exec_prefix="$exec_prefix"
18183 exec_prefix="$acl_final_exec_prefix"
18184 eval x=\"$x\"
18185 exec_prefix="$acl_save_exec_prefix"
18186 prefix="$acl_save_prefix"
18187
18188 if test "X$x" = "X-L$additional_libdir"; then
18189 haveit=yes
18190 break
18191 fi
18192 done
18193 if test -z "$haveit"; then
18194 if test -d "$additional_libdir"; then
18195 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18196 fi
18197 fi
18198 haveit=
18199 for x in $LDFLAGS $LTLIBBABELTRACE; do
18200
18201 acl_save_prefix="$prefix"
18202 prefix="$acl_final_prefix"
18203 acl_save_exec_prefix="$exec_prefix"
18204 exec_prefix="$acl_final_exec_prefix"
18205 eval x=\"$x\"
18206 exec_prefix="$acl_save_exec_prefix"
18207 prefix="$acl_save_prefix"
18208
18209 if test "X$x" = "X-L$additional_libdir"; then
18210 haveit=yes
18211 break
18212 fi
18213 done
18214 if test -z "$haveit"; then
18215 if test -d "$additional_libdir"; then
18216 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18217 fi
18218 fi
18219 fi
18220 fi
18221 ;;
18222 -R*)
18223 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18224 if test "$enable_rpath" != no; then
18225 haveit=
18226 for x in $rpathdirs; do
18227 if test "X$x" = "X$dir"; then
18228 haveit=yes
18229 break
18230 fi
18231 done
18232 if test -z "$haveit"; then
18233 rpathdirs="$rpathdirs $dir"
18234 fi
18235 haveit=
18236 for x in $ltrpathdirs; do
18237 if test "X$x" = "X$dir"; then
18238 haveit=yes
18239 break
18240 fi
18241 done
18242 if test -z "$haveit"; then
18243 ltrpathdirs="$ltrpathdirs $dir"
18244 fi
18245 fi
18246 ;;
18247 -l*)
18248 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18249 ;;
18250 *.la)
18251 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18252 ;;
18253 *)
18254 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18255 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18256 ;;
18257 esac
18258 done
18259 fi
18260 else
18261 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18262 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18263 fi
18264 fi
18265 fi
18266 done
18267 done
18268 if test "X$rpathdirs" != "X"; then
18269 if test -n "$hardcode_libdir_separator"; then
18270 alldirs=
18271 for found_dir in $rpathdirs; do
18272 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18273 done
18274 acl_save_libdir="$libdir"
18275 libdir="$alldirs"
18276 eval flag=\"$hardcode_libdir_flag_spec\"
18277 libdir="$acl_save_libdir"
18278 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18279 else
18280 for found_dir in $rpathdirs; do
18281 acl_save_libdir="$libdir"
18282 libdir="$found_dir"
18283 eval flag=\"$hardcode_libdir_flag_spec\"
18284 libdir="$acl_save_libdir"
18285 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18286 done
18287 fi
18288 fi
18289 if test "X$ltrpathdirs" != "X"; then
18290 for found_dir in $ltrpathdirs; do
18291 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18292 done
18293 fi
18294
18295
18296 ac_save_CPPFLAGS="$CPPFLAGS"
18297
18298 for element in $INCBABELTRACE; do
18299 haveit=
18300 for x in $CPPFLAGS; do
18301
18302 acl_save_prefix="$prefix"
18303 prefix="$acl_final_prefix"
18304 acl_save_exec_prefix="$exec_prefix"
18305 exec_prefix="$acl_final_exec_prefix"
18306 eval x=\"$x\"
18307 exec_prefix="$acl_save_exec_prefix"
18308 prefix="$acl_save_prefix"
18309
18310 if test "X$x" = "X$element"; then
18311 haveit=yes
18312 break
18313 fi
18314 done
18315 if test -z "$haveit"; then
18316 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18317 fi
18318 done
18319
18320
18321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18322$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 18323if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
18324 $as_echo_n "(cached) " >&6
18325else
18326
18327 ac_save_LIBS="$LIBS"
18328 LIBS="$LIBS $LIBBABELTRACE"
18329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18330/* end confdefs.h. */
18331#include <babeltrace/babeltrace.h>
18332 #include <babeltrace/ctf/events.h>
18333 #include <babeltrace/ctf/iterator.h>
18334int
18335main ()
18336{
18337struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18338 struct bt_ctf_event *event = NULL;
18339 const struct bt_definition *scope;
18340
13cdc2af 18341 pos->type = BT_SEEK_BEGIN;
65c749e7 18342 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
18343 scope = bt_ctf_get_top_level_scope (event,
18344 BT_STREAM_EVENT_HEADER);
18345 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18346
18347 ;
18348 return 0;
18349}
18350_ACEOF
18351if ac_fn_c_try_link "$LINENO"; then :
18352 ac_cv_libbabeltrace=yes
18353else
18354 ac_cv_libbabeltrace=no
18355fi
18356rm -f core conftest.err conftest.$ac_objext \
18357 conftest$ac_exeext conftest.$ac_ext
18358 LIBS="$ac_save_LIBS"
18359
18360fi
18361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18362$as_echo "$ac_cv_libbabeltrace" >&6; }
18363 if test "$ac_cv_libbabeltrace" = yes; then
18364 HAVE_LIBBABELTRACE=yes
18365
18366$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18367
18368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18369$as_echo_n "checking how to link with libbabeltrace... " >&6; }
18370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18371$as_echo "$LIBBABELTRACE" >&6; }
18372 else
18373 HAVE_LIBBABELTRACE=no
18374 CPPFLAGS="$ac_save_CPPFLAGS"
18375 LIBBABELTRACE=
18376 LTLIBBABELTRACE=
18377 fi
18378
18379
18380
18381
18382
18383
18384 CFLAGS=$saved_CFLAGS
18385
18386 if test "$HAVE_LIBBABELTRACE" != yes; then
18387 if test "$with_babeltrace" = yes; then
d0ac1c44 18388 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
18389 else
18390 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18391$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18392 fi
18393 fi
18394fi
18395
ccb1ba62
CB
18396# Check for xxhash
18397
18398# Check whether --with-xxhash was given.
18399if test "${with_xxhash+set}" = set; then :
18400 withval=$with_xxhash;
18401else
18402 with_xxhash=auto
18403fi
18404
18405
18406if test "x$with_xxhash" != "xno"; then
18407
18408
18409
18410
18411
18412
18413
18414
18415 use_additional=yes
18416
18417 acl_save_prefix="$prefix"
18418 prefix="$acl_final_prefix"
18419 acl_save_exec_prefix="$exec_prefix"
18420 exec_prefix="$acl_final_exec_prefix"
18421
18422 eval additional_includedir=\"$includedir\"
18423 eval additional_libdir=\"$libdir\"
18424
18425 exec_prefix="$acl_save_exec_prefix"
18426 prefix="$acl_save_prefix"
18427
18428
18429# Check whether --with-libxxhash-prefix was given.
18430if test "${with_libxxhash_prefix+set}" = set; then :
18431 withval=$with_libxxhash_prefix;
18432 if test "X$withval" = "Xno"; then
18433 use_additional=no
18434 else
18435 if test "X$withval" = "X"; then
18436
18437 acl_save_prefix="$prefix"
18438 prefix="$acl_final_prefix"
18439 acl_save_exec_prefix="$exec_prefix"
18440 exec_prefix="$acl_final_exec_prefix"
18441
18442 eval additional_includedir=\"$includedir\"
18443 eval additional_libdir=\"$libdir\"
18444
18445 exec_prefix="$acl_save_exec_prefix"
18446 prefix="$acl_save_prefix"
18447
18448 else
18449 additional_includedir="$withval/include"
18450 additional_libdir="$withval/lib"
18451 fi
18452 fi
18453
18454fi
18455
18456 LIBXXHASH=
18457 LTLIBXXHASH=
18458 INCXXHASH=
18459 rpathdirs=
18460 ltrpathdirs=
18461 names_already_handled=
18462 names_next_round='xxhash '
18463 while test -n "$names_next_round"; do
18464 names_this_round="$names_next_round"
18465 names_next_round=
18466 for name in $names_this_round; do
18467 already_handled=
18468 for n in $names_already_handled; do
18469 if test "$n" = "$name"; then
18470 already_handled=yes
18471 break
18472 fi
18473 done
18474 if test -z "$already_handled"; then
18475 names_already_handled="$names_already_handled $name"
18476 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18477 eval value=\"\$HAVE_LIB$uppername\"
18478 if test -n "$value"; then
18479 if test "$value" = yes; then
18480 eval value=\"\$LIB$uppername\"
18481 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18482 eval value=\"\$LTLIB$uppername\"
18483 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18484 else
18485 :
18486 fi
18487 else
18488 found_dir=
18489 found_la=
18490 found_so=
18491 found_a=
18492 if test $use_additional = yes; then
18493 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
18494 found_dir="$additional_libdir"
18495 found_so="$additional_libdir/lib$name.$shlibext"
18496 if test -f "$additional_libdir/lib$name.la"; then
18497 found_la="$additional_libdir/lib$name.la"
18498 fi
18499 else
18500 if test -f "$additional_libdir/lib$name.$libext"; then
18501 found_dir="$additional_libdir"
18502 found_a="$additional_libdir/lib$name.$libext"
18503 if test -f "$additional_libdir/lib$name.la"; then
18504 found_la="$additional_libdir/lib$name.la"
18505 fi
18506 fi
18507 fi
18508 fi
18509 if test "X$found_dir" = "X"; then
18510 for x in $LDFLAGS $LTLIBXXHASH; do
18511
18512 acl_save_prefix="$prefix"
18513 prefix="$acl_final_prefix"
18514 acl_save_exec_prefix="$exec_prefix"
18515 exec_prefix="$acl_final_exec_prefix"
18516 eval x=\"$x\"
18517 exec_prefix="$acl_save_exec_prefix"
18518 prefix="$acl_save_prefix"
18519
18520 case "$x" in
18521 -L*)
18522 dir=`echo "X$x" | sed -e 's/^X-L//'`
18523 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
18524 found_dir="$dir"
18525 found_so="$dir/lib$name.$shlibext"
18526 if test -f "$dir/lib$name.la"; then
18527 found_la="$dir/lib$name.la"
18528 fi
18529 else
18530 if test -f "$dir/lib$name.$libext"; then
18531 found_dir="$dir"
18532 found_a="$dir/lib$name.$libext"
18533 if test -f "$dir/lib$name.la"; then
18534 found_la="$dir/lib$name.la"
18535 fi
18536 fi
18537 fi
18538 ;;
18539 esac
18540 if test "X$found_dir" != "X"; then
18541 break
18542 fi
18543 done
18544 fi
18545 if test "X$found_dir" != "X"; then
18546 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18547 if test "X$found_so" != "X"; then
18548 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18549 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18550 else
18551 haveit=
18552 for x in $ltrpathdirs; do
18553 if test "X$x" = "X$found_dir"; then
18554 haveit=yes
18555 break
18556 fi
18557 done
18558 if test -z "$haveit"; then
18559 ltrpathdirs="$ltrpathdirs $found_dir"
18560 fi
18561 if test "$hardcode_direct" = yes; then
18562 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18563 else
18564 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18565 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18566 haveit=
18567 for x in $rpathdirs; do
18568 if test "X$x" = "X$found_dir"; then
18569 haveit=yes
18570 break
18571 fi
18572 done
18573 if test -z "$haveit"; then
18574 rpathdirs="$rpathdirs $found_dir"
18575 fi
18576 else
18577 haveit=
18578 for x in $LDFLAGS $LIBXXHASH; do
18579
18580 acl_save_prefix="$prefix"
18581 prefix="$acl_final_prefix"
18582 acl_save_exec_prefix="$exec_prefix"
18583 exec_prefix="$acl_final_exec_prefix"
18584 eval x=\"$x\"
18585 exec_prefix="$acl_save_exec_prefix"
18586 prefix="$acl_save_prefix"
18587
18588 if test "X$x" = "X-L$found_dir"; then
18589 haveit=yes
18590 break
18591 fi
18592 done
18593 if test -z "$haveit"; then
18594 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18595 fi
18596 if test "$hardcode_minus_L" != no; then
18597 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18598 else
18599 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18600 fi
18601 fi
18602 fi
18603 fi
18604 else
18605 if test "X$found_a" != "X"; then
18606 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
18607 else
18608 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
18609 fi
18610 fi
18611 additional_includedir=
18612 case "$found_dir" in
18613 */lib | */lib/)
18614 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18615 additional_includedir="$basedir/include"
18616 ;;
18617 esac
18618 if test "X$additional_includedir" != "X"; then
18619 if test "X$additional_includedir" != "X/usr/include"; then
18620 haveit=
18621 if test "X$additional_includedir" = "X/usr/local/include"; then
18622 if test -n "$GCC"; then
18623 case $host_os in
18624 linux*) haveit=yes;;
18625 esac
18626 fi
18627 fi
18628 if test -z "$haveit"; then
18629 for x in $CPPFLAGS $INCXXHASH; do
18630
18631 acl_save_prefix="$prefix"
18632 prefix="$acl_final_prefix"
18633 acl_save_exec_prefix="$exec_prefix"
18634 exec_prefix="$acl_final_exec_prefix"
18635 eval x=\"$x\"
18636 exec_prefix="$acl_save_exec_prefix"
18637 prefix="$acl_save_prefix"
18638
18639 if test "X$x" = "X-I$additional_includedir"; then
18640 haveit=yes
18641 break
18642 fi
18643 done
18644 if test -z "$haveit"; then
18645 if test -d "$additional_includedir"; then
18646 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
18647 fi
18648 fi
18649 fi
18650 fi
18651 fi
18652 if test -n "$found_la"; then
18653 save_libdir="$libdir"
18654 case "$found_la" in
18655 */* | *\\*) . "$found_la" ;;
18656 *) . "./$found_la" ;;
18657 esac
18658 libdir="$save_libdir"
18659 for dep in $dependency_libs; do
18660 case "$dep" in
18661 -L*)
18662 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18663 if test "X$additional_libdir" != "X/usr/lib"; then
18664 haveit=
18665 if test "X$additional_libdir" = "X/usr/local/lib"; then
18666 if test -n "$GCC"; then
18667 case $host_os in
18668 linux*) haveit=yes;;
18669 esac
18670 fi
18671 fi
18672 if test -z "$haveit"; then
18673 haveit=
18674 for x in $LDFLAGS $LIBXXHASH; do
18675
18676 acl_save_prefix="$prefix"
18677 prefix="$acl_final_prefix"
18678 acl_save_exec_prefix="$exec_prefix"
18679 exec_prefix="$acl_final_exec_prefix"
18680 eval x=\"$x\"
18681 exec_prefix="$acl_save_exec_prefix"
18682 prefix="$acl_save_prefix"
18683
18684 if test "X$x" = "X-L$additional_libdir"; then
18685 haveit=yes
18686 break
18687 fi
18688 done
18689 if test -z "$haveit"; then
18690 if test -d "$additional_libdir"; then
18691 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
18692 fi
18693 fi
18694 haveit=
18695 for x in $LDFLAGS $LTLIBXXHASH; do
18696
18697 acl_save_prefix="$prefix"
18698 prefix="$acl_final_prefix"
18699 acl_save_exec_prefix="$exec_prefix"
18700 exec_prefix="$acl_final_exec_prefix"
18701 eval x=\"$x\"
18702 exec_prefix="$acl_save_exec_prefix"
18703 prefix="$acl_save_prefix"
18704
18705 if test "X$x" = "X-L$additional_libdir"; then
18706 haveit=yes
18707 break
18708 fi
18709 done
18710 if test -z "$haveit"; then
18711 if test -d "$additional_libdir"; then
18712 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
18713 fi
18714 fi
18715 fi
18716 fi
18717 ;;
18718 -R*)
18719 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18720 if test "$enable_rpath" != no; then
18721 haveit=
18722 for x in $rpathdirs; do
18723 if test "X$x" = "X$dir"; then
18724 haveit=yes
18725 break
18726 fi
18727 done
18728 if test -z "$haveit"; then
18729 rpathdirs="$rpathdirs $dir"
18730 fi
18731 haveit=
18732 for x in $ltrpathdirs; do
18733 if test "X$x" = "X$dir"; then
18734 haveit=yes
18735 break
18736 fi
18737 done
18738 if test -z "$haveit"; then
18739 ltrpathdirs="$ltrpathdirs $dir"
18740 fi
18741 fi
18742 ;;
18743 -l*)
18744 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18745 ;;
18746 *.la)
18747 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18748 ;;
18749 *)
18750 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
18751 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
18752 ;;
18753 esac
18754 done
18755 fi
18756 else
18757 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18758 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
18759 fi
18760 fi
18761 fi
18762 done
18763 done
18764 if test "X$rpathdirs" != "X"; then
18765 if test -n "$hardcode_libdir_separator"; then
18766 alldirs=
18767 for found_dir in $rpathdirs; do
18768 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18769 done
18770 acl_save_libdir="$libdir"
18771 libdir="$alldirs"
18772 eval flag=\"$hardcode_libdir_flag_spec\"
18773 libdir="$acl_save_libdir"
18774 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18775 else
18776 for found_dir in $rpathdirs; do
18777 acl_save_libdir="$libdir"
18778 libdir="$found_dir"
18779 eval flag=\"$hardcode_libdir_flag_spec\"
18780 libdir="$acl_save_libdir"
18781 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18782 done
18783 fi
18784 fi
18785 if test "X$ltrpathdirs" != "X"; then
18786 for found_dir in $ltrpathdirs; do
18787 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
18788 done
18789 fi
18790
18791
18792 ac_save_CPPFLAGS="$CPPFLAGS"
18793
18794 for element in $INCXXHASH; do
18795 haveit=
18796 for x in $CPPFLAGS; do
18797
18798 acl_save_prefix="$prefix"
18799 prefix="$acl_final_prefix"
18800 acl_save_exec_prefix="$exec_prefix"
18801 exec_prefix="$acl_final_exec_prefix"
18802 eval x=\"$x\"
18803 exec_prefix="$acl_save_exec_prefix"
18804 prefix="$acl_save_prefix"
18805
18806 if test "X$x" = "X$element"; then
18807 haveit=yes
18808 break
18809 fi
18810 done
18811 if test -z "$haveit"; then
18812 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18813 fi
18814 done
18815
18816
18817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
18818$as_echo_n "checking for libxxhash... " >&6; }
18819if ${ac_cv_libxxhash+:} false; then :
18820 $as_echo_n "(cached) " >&6
18821else
18822
18823 ac_save_LIBS="$LIBS"
18824 LIBS="$LIBS $LIBXXHASH"
18825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18826/* end confdefs.h. */
18827#include <xxhash.h>
18828int
18829main ()
18830{
18831XXH32("foo", 3, 0);
18832
18833 ;
18834 return 0;
18835}
18836_ACEOF
18837if ac_fn_c_try_link "$LINENO"; then :
18838 ac_cv_libxxhash=yes
18839else
18840 ac_cv_libxxhash=no
18841fi
18842rm -f core conftest.err conftest.$ac_objext \
18843 conftest$ac_exeext conftest.$ac_ext
18844 LIBS="$ac_save_LIBS"
18845
18846fi
18847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
18848$as_echo "$ac_cv_libxxhash" >&6; }
18849 if test "$ac_cv_libxxhash" = yes; then
18850 HAVE_LIBXXHASH=yes
18851
18852$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
18853
18854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
18855$as_echo_n "checking how to link with libxxhash... " >&6; }
18856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
18857$as_echo "$LIBXXHASH" >&6; }
18858 else
18859 HAVE_LIBXXHASH=no
18860 CPPFLAGS="$ac_save_CPPFLAGS"
18861 LIBXXHASH=
18862 LTLIBXXHASH=
18863 fi
18864
18865
18866
18867
18868
18869
18870 if test "$HAVE_LIBXXHASH" != yes; then
18871 if test "$with_xxhash" = yes; then
18872 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
18873 fi
18874 fi
18875 if test "x$with_xxhash" = "xauto"; then
18876 with_xxhash="$HAVE_LIBXXHASH"
18877 fi
18878fi
18879
18880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
18881$as_echo_n "checking whether to use xxhash... " >&6; }
18882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
18883$as_echo "$with_xxhash" >&6; }
18884
a0a461e5 18885NM_H=
c906108c
SS
18886rm -f nm.h
18887if test "${nativefile}" != ""; then
0f475e27
AC
18888 case "${nativefile}" in
18889 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
18890 * ) GDB_NM_FILE="${nativefile}"
18891 esac
a0a461e5
TT
18892 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
18893
60ca704f
SE
18894
18895cat >>confdefs.h <<_ACEOF
b78960be 18896#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 18897_ACEOF
5a2402b8 18898
a0a461e5 18899 NM_H=nm.h
c906108c 18900fi
5a2402b8
AC
18901
18902
a0a461e5 18903
e3487908
GKB
18904for ac_prog in xsltproc
18905do
18906 # Extract the first word of "$ac_prog", so it can be a program name with args.
18907set dummy $ac_prog; ac_word=$2
18908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18909$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 18910if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
18911 $as_echo_n "(cached) " >&6
18912else
18913 case $XSLTPROC in
18914 [\\/]* | ?:[\\/]*)
18915 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18916 ;;
18917 *)
18918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18919for as_dir in $PATH
18920do
18921 IFS=$as_save_IFS
18922 test -z "$as_dir" && as_dir=.
18923 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 18924 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
18925 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18927 break 2
18928 fi
18929done
18930 done
18931IFS=$as_save_IFS
18932
18933 ;;
18934esac
18935fi
18936XSLTPROC=$ac_cv_path_XSLTPROC
18937if test -n "$XSLTPROC"; then
18938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18939$as_echo "$XSLTPROC" >&6; }
18940else
18941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18942$as_echo "no" >&6; }
18943fi
18944
18945
18946 test -n "$XSLTPROC" && break
18947done
18948test -n "$XSLTPROC" || XSLTPROC="missing"
18949
18950if test "x$USE_MAINTAINER_MODE" = xyes; then
18951 if test "${XSLTPROC}" = missing; then
d0ac1c44 18952 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
18953 fi
18954fi
18955
18956
c906108c
SS
18957
18958
c906108c 18959
81ecdfbb 18960$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 18961
bec39cab 18962
8ecfd7bd
SDJ
18963
18964# Check whether we will enable the inclusion of unit tests when
18965# compiling GDB.
18966#
18967# The default value of this option changes depending whether we're on
18968# development mode (in which case it's "true") or not (in which case
18969# it's "false").
18970# Check whether --enable-unit-tests was given.
18971if test "${enable_unit_tests+set}" = set; then :
18972 enableval=$enable_unit_tests; case "${enableval}" in
18973 yes) enable_unittests=true ;;
18974 no) enable_unittests=false ;;
18975 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
18976esac
18977else
18978 enable_unittests=$development
18979fi
18980
18981
18982if $enable_unittests; then
dcd1f979
TT
18983
18984$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
18985
8ecfd7bd 18986
01027315
TT
18987 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) selftest-arch.o"
18988 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) selftest-arch.c"
8ecfd7bd 18989
dcd1f979
TT
18990fi
18991
b292c783 18992
8ecfd7bd 18993
f6a88844
JM
18994 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
18995 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
18996 if test "x$GDB_TRANSFORM_NAME" = x; then
18997 GDB_TRANSFORM_NAME=gdb
18998 fi
18999
19000
19001
19002 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19003 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19004 if test "x$GCORE_TRANSFORM_NAME" = x; then
19005 GCORE_TRANSFORM_NAME=gcore
19006 fi
19007
b292c783
JK
19008
19009ac_config_files="$ac_config_files gcore"
19010
141ec9f6 19011ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 19012
89a34d1b 19013
bec39cab
AC
19014cat >confcache <<\_ACEOF
19015# This file is a shell script that caches the results of configure
19016# tests run on this system so they can be shared between configure
19017# scripts and configure runs, see configure's option --config-cache.
19018# It is not useful on other systems. If it contains results you don't
19019# want to keep, you may remove or edit it.
19020#
19021# config.status only pays attention to the cache file if you give it
19022# the --recheck option to rerun configure.
19023#
19024# `ac_cv_env_foo' variables (set or unset) will be overridden when
19025# loading this file, other *unset* `ac_cv_foo' will be assigned the
19026# following values.
19027
19028_ACEOF
19029
19030# The following way of writing the cache mishandles newlines in values,
19031# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 19032# So, we kill variables containing newlines.
bec39cab
AC
19033# Ultrix sh set writes to stderr and can't be redirected directly,
19034# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
19035(
19036 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19037 eval ac_val=\$$ac_var
19038 case $ac_val in #(
19039 *${as_nl}*)
19040 case $ac_var in #(
19041 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19042$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19043 esac
19044 case $ac_var in #(
19045 _ | IFS | as_nl) ;; #(
19046 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19047 *) { eval $ac_var=; unset $ac_var;} ;;
19048 esac ;;
19049 esac
19050 done
19051
bec39cab 19052 (set) 2>&1 |
81ecdfbb
RW
19053 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19054 *${as_nl}ac_space=\ *)
19055 # `set' does not quote correctly, so add quotes: double-quote
19056 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
19057 sed -n \
19058 "s/'/'\\\\''/g;
19059 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 19060 ;; #(
bec39cab
AC
19061 *)
19062 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 19063 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 19064 ;;
81ecdfbb
RW
19065 esac |
19066 sort
19067) |
bec39cab 19068 sed '
81ecdfbb 19069 /^ac_cv_env_/b end
bec39cab 19070 t clear
81ecdfbb 19071 :clear
bec39cab
AC
19072 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19073 t end
81ecdfbb
RW
19074 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19075 :end' >>confcache
19076if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19077 if test -w "$cache_file"; then
d0ac1c44 19078 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
19079 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19080$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
19081 if test ! -f "$cache_file" || test -h "$cache_file"; then
19082 cat confcache >"$cache_file"
19083 else
19084 case $cache_file in #(
19085 */* | ?:*)
19086 mv -f confcache "$cache_file"$$ &&
19087 mv -f "$cache_file"$$ "$cache_file" ;; #(
19088 *)
19089 mv -f confcache "$cache_file" ;;
19090 esac
19091 fi
19092 fi
bec39cab 19093 else
81ecdfbb
RW
19094 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19095$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
19096 fi
19097fi
19098rm -f confcache
19099
19100test "x$prefix" = xNONE && prefix=$ac_default_prefix
19101# Let make expand exec_prefix.
19102test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19103
bec39cab
AC
19104DEFS=-DHAVE_CONFIG_H
19105
19106ac_libobjs=
19107ac_ltlibobjs=
d0ac1c44 19108U=
bec39cab
AC
19109for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19110 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
19111 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19112 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19113 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19114 # will be set to the directory where LIBOBJS objects are built.
19115 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19116 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
19117done
19118LIBOBJS=$ac_libobjs
19119
19120LTLIBOBJS=$ac_ltlibobjs
19121
19122
85981d60 19123if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 19124 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 19125Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 19126fi
4df42755 19127if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 19128 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
19129Usually this means the macro was only invoked conditionally." "$LINENO" 5
19130fi
19131if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 19132 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
19133Usually this means the macro was only invoked conditionally." "$LINENO" 5
19134fi
81ecdfbb
RW
19135
19136
d0ac1c44 19137: "${CONFIG_STATUS=./config.status}"
81ecdfbb 19138ac_write_fail=0
bec39cab
AC
19139ac_clean_files_save=$ac_clean_files
19140ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
19141{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19142$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19143as_write_fail=0
19144cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
19145#! $SHELL
19146# Generated by $as_me.
19147# Run this file to recreate the current configuration.
19148# Compiler output produced by configure, useful for debugging
19149# configure, is in config.log if it exists.
19150
19151debug=false
19152ac_cs_recheck=false
19153ac_cs_silent=false
bec39cab 19154
81ecdfbb
RW
19155SHELL=\${CONFIG_SHELL-$SHELL}
19156export SHELL
19157_ASEOF
19158cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19159## -------------------- ##
19160## M4sh Initialization. ##
19161## -------------------- ##
19162
19163# Be more Bourne compatible
19164DUALCASE=1; export DUALCASE # for MKS sh
19165if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
19166 emulate sh
19167 NULLCMD=:
81ecdfbb 19168 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
19169 # is contrary to our usage. Disable this feature.
19170 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
19171 setopt NO_GLOB_SUBST
19172else
19173 case `(set -o) 2>/dev/null` in #(
19174 *posix*) :
19175 set -o posix ;; #(
19176 *) :
19177 ;;
19178esac
bec39cab 19179fi
bec39cab 19180
81ecdfbb
RW
19181
19182as_nl='
19183'
19184export as_nl
19185# Printing a long string crashes Solaris 7 /usr/bin/printf.
19186as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19187as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19188as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19189# Prefer a ksh shell builtin over an external printf program on Solaris,
19190# but without wasting forks for bash or zsh.
19191if test -z "$BASH_VERSION$ZSH_VERSION" \
19192 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19193 as_echo='print -r --'
19194 as_echo_n='print -rn --'
19195elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19196 as_echo='printf %s\n'
19197 as_echo_n='printf %s'
19198else
19199 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19200 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19201 as_echo_n='/usr/ucb/echo -n'
19202 else
19203 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19204 as_echo_n_body='eval
19205 arg=$1;
19206 case $arg in #(
19207 *"$as_nl"*)
19208 expr "X$arg" : "X\\(.*\\)$as_nl";
19209 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19210 esac;
19211 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19212 '
19213 export as_echo_n_body
19214 as_echo_n='sh -c $as_echo_n_body as_echo'
19215 fi
19216 export as_echo_body
19217 as_echo='sh -c $as_echo_body as_echo'
19218fi
19219
19220# The user is always right.
19221if test "${PATH_SEPARATOR+set}" != set; then
19222 PATH_SEPARATOR=:
19223 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19224 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19225 PATH_SEPARATOR=';'
19226 }
bec39cab
AC
19227fi
19228
19229
81ecdfbb
RW
19230# IFS
19231# We need space, tab and new line, in precisely that order. Quoting is
19232# there to prevent editors from complaining about space-tab.
19233# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19234# splitting by setting IFS to empty value.)
19235IFS=" "" $as_nl"
19236
19237# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 19238as_myself=
81ecdfbb
RW
19239case $0 in #((
19240 *[\\/]* ) as_myself=$0 ;;
19241 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19242for as_dir in $PATH
19243do
19244 IFS=$as_save_IFS
19245 test -z "$as_dir" && as_dir=.
19246 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19247 done
19248IFS=$as_save_IFS
19249
19250 ;;
19251esac
19252# We did not find ourselves, most probably we were run as `sh COMMAND'
19253# in which case we are not to be found in the path.
19254if test "x$as_myself" = x; then
19255 as_myself=$0
19256fi
19257if test ! -f "$as_myself"; then
19258 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19259 exit 1
19260fi
19261
19262# Unset variables that we do not need and which cause bugs (e.g. in
19263# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19264# suppresses any "Segmentation fault" message there. '((' could
19265# trigger a bug in pdksh 5.2.14.
19266for as_var in BASH_ENV ENV MAIL MAILPATH
19267do eval test x\${$as_var+set} = xset \
19268 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19269done
bec39cab
AC
19270PS1='$ '
19271PS2='> '
19272PS4='+ '
19273
19274# NLS nuisances.
81ecdfbb
RW
19275LC_ALL=C
19276export LC_ALL
19277LANGUAGE=C
19278export LANGUAGE
19279
19280# CDPATH.
19281(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19282
19283
d0ac1c44
SM
19284# as_fn_error STATUS ERROR [LINENO LOG_FD]
19285# ----------------------------------------
81ecdfbb
RW
19286# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19287# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 19288# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
19289as_fn_error ()
19290{
d0ac1c44
SM
19291 as_status=$1; test $as_status -eq 0 && as_status=1
19292 if test "$4"; then
19293 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19294 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 19295 fi
d0ac1c44 19296 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
19297 as_fn_exit $as_status
19298} # as_fn_error
19299
19300
19301# as_fn_set_status STATUS
19302# -----------------------
19303# Set $? to STATUS, without forking.
19304as_fn_set_status ()
19305{
19306 return $1
19307} # as_fn_set_status
19308
19309# as_fn_exit STATUS
19310# -----------------
19311# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19312as_fn_exit ()
19313{
19314 set +e
19315 as_fn_set_status $1
19316 exit $1
19317} # as_fn_exit
19318
19319# as_fn_unset VAR
19320# ---------------
19321# Portably unset VAR.
19322as_fn_unset ()
19323{
19324 { eval $1=; unset $1;}
19325}
19326as_unset=as_fn_unset
19327# as_fn_append VAR VALUE
19328# ----------------------
19329# Append the text in VALUE to the end of the definition contained in VAR. Take
19330# advantage of any shell optimizations that allow amortized linear growth over
19331# repeated appends, instead of the typical quadratic growth present in naive
19332# implementations.
19333if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19334 eval 'as_fn_append ()
19335 {
19336 eval $1+=\$2
19337 }'
19338else
19339 as_fn_append ()
19340 {
19341 eval $1=\$$1\$2
19342 }
19343fi # as_fn_append
19344
19345# as_fn_arith ARG...
19346# ------------------
19347# Perform arithmetic evaluation on the ARGs, and store the result in the
19348# global $as_val. Take advantage of shells that can avoid forks. The arguments
19349# must be portable across $(()) and expr.
19350if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19351 eval 'as_fn_arith ()
19352 {
19353 as_val=$(( $* ))
19354 }'
19355else
19356 as_fn_arith ()
19357 {
19358 as_val=`expr "$@" || test $? -eq 1`
19359 }
19360fi # as_fn_arith
bec39cab 19361
81ecdfbb
RW
19362
19363if expr a : '\(a\)' >/dev/null 2>&1 &&
19364 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
19365 as_expr=expr
19366else
19367 as_expr=false
19368fi
19369
81ecdfbb 19370if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
19371 as_basename=basename
19372else
19373 as_basename=false
19374fi
19375
81ecdfbb
RW
19376if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19377 as_dirname=dirname
19378else
19379 as_dirname=false
19380fi
bec39cab 19381
81ecdfbb 19382as_me=`$as_basename -- "$0" ||
bec39cab
AC
19383$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19384 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
19385 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19386$as_echo X/"$0" |
19387 sed '/^.*\/\([^/][^/]*\)\/*$/{
19388 s//\1/
19389 q
19390 }
19391 /^X\/\(\/\/\)$/{
19392 s//\1/
19393 q
19394 }
19395 /^X\/\(\/\).*/{
19396 s//\1/
19397 q
19398 }
19399 s/.*/./; q'`
b4e70030 19400
b4e70030
JB
19401# Avoid depending upon Character Ranges.
19402as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19403as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19404as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19405as_cr_digits='0123456789'
19406as_cr_alnum=$as_cr_Letters$as_cr_digits
19407
81ecdfbb
RW
19408ECHO_C= ECHO_N= ECHO_T=
19409case `echo -n x` in #(((((
19410-n*)
19411 case `echo 'xy\c'` in
19412 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19413 xy) ECHO_C='\c';;
19414 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19415 ECHO_T=' ';;
19416 esac;;
19417*)
19418 ECHO_N='-n';;
bec39cab
AC
19419esac
19420
81ecdfbb
RW
19421rm -f conf$$ conf$$.exe conf$$.file
19422if test -d conf$$.dir; then
19423 rm -f conf$$.dir/conf$$.file
bec39cab 19424else
81ecdfbb
RW
19425 rm -f conf$$.dir
19426 mkdir conf$$.dir 2>/dev/null
bec39cab 19427fi
81ecdfbb
RW
19428if (echo >conf$$.file) 2>/dev/null; then
19429 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 19430 as_ln_s='ln -s'
81ecdfbb
RW
19431 # ... but there are two gotchas:
19432 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19433 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 19434 # In both cases, we have to default to `cp -pR'.
81ecdfbb 19435 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 19436 as_ln_s='cp -pR'
81ecdfbb
RW
19437 elif ln conf$$.file conf$$ 2>/dev/null; then
19438 as_ln_s=ln
19439 else
d0ac1c44 19440 as_ln_s='cp -pR'
b4e70030 19441 fi
bec39cab 19442else
d0ac1c44 19443 as_ln_s='cp -pR'
bec39cab 19444fi
81ecdfbb
RW
19445rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19446rmdir conf$$.dir 2>/dev/null
19447
19448
19449# as_fn_mkdir_p
19450# -------------
19451# Create "$as_dir" as a directory, including parents if necessary.
19452as_fn_mkdir_p ()
19453{
19454
19455 case $as_dir in #(
19456 -*) as_dir=./$as_dir;;
19457 esac
19458 test -d "$as_dir" || eval $as_mkdir_p || {
19459 as_dirs=
19460 while :; do
19461 case $as_dir in #(
19462 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19463 *) as_qdir=$as_dir;;
19464 esac
19465 as_dirs="'$as_qdir' $as_dirs"
19466 as_dir=`$as_dirname -- "$as_dir" ||
19467$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19468 X"$as_dir" : 'X\(//\)[^/]' \| \
19469 X"$as_dir" : 'X\(//\)$' \| \
19470 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19471$as_echo X"$as_dir" |
19472 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19473 s//\1/
19474 q
19475 }
19476 /^X\(\/\/\)[^/].*/{
19477 s//\1/
19478 q
19479 }
19480 /^X\(\/\/\)$/{
19481 s//\1/
19482 q
19483 }
19484 /^X\(\/\).*/{
19485 s//\1/
19486 q
19487 }
19488 s/.*/./; q'`
19489 test -d "$as_dir" && break
19490 done
19491 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 19492 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 19493
bec39cab 19494
81ecdfbb 19495} # as_fn_mkdir_p
bec39cab 19496if mkdir -p . 2>/dev/null; then
81ecdfbb 19497 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
19498else
19499 test -d ./-p && rmdir ./-p
19500 as_mkdir_p=false
19501fi
19502
d0ac1c44
SM
19503
19504# as_fn_executable_p FILE
19505# -----------------------
19506# Test if FILE is an executable regular file.
19507as_fn_executable_p ()
19508{
19509 test -f "$1" && test -x "$1"
19510} # as_fn_executable_p
19511as_test_x='test -x'
19512as_executable_p=as_fn_executable_p
bec39cab
AC
19513
19514# Sed expression to map a string onto a valid CPP name.
19515as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19516
19517# Sed expression to map a string onto a valid variable name.
19518as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19519
19520
bec39cab 19521exec 6>&1
81ecdfbb
RW
19522## ----------------------------------- ##
19523## Main body of $CONFIG_STATUS script. ##
19524## ----------------------------------- ##
19525_ASEOF
19526test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19527
19528cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19529# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 19530# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
19531# values after options handling.
19532ac_log="
bec39cab 19533This file was extended by $as_me, which was
d0ac1c44 19534generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
19535
19536 CONFIG_FILES = $CONFIG_FILES
19537 CONFIG_HEADERS = $CONFIG_HEADERS
19538 CONFIG_LINKS = $CONFIG_LINKS
19539 CONFIG_COMMANDS = $CONFIG_COMMANDS
19540 $ $0 $@
19541
81ecdfbb
RW
19542on `(hostname || uname -n) 2>/dev/null | sed 1q`
19543"
19544
bec39cab
AC
19545_ACEOF
19546
81ecdfbb
RW
19547case $ac_config_files in *"
19548"*) set x $ac_config_files; shift; ac_config_files=$*;;
19549esac
234b45d4 19550
81ecdfbb
RW
19551case $ac_config_headers in *"
19552"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19553esac
b4e70030 19554
b4e70030 19555
81ecdfbb
RW
19556cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19557# Files that config.status was made for.
19558config_files="$ac_config_files"
19559config_headers="$ac_config_headers"
19560config_links="$ac_config_links"
19561config_commands="$ac_config_commands"
234b45d4 19562
81ecdfbb 19563_ACEOF
b4e70030 19564
81ecdfbb 19565cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 19566ac_cs_usage="\
81ecdfbb
RW
19567\`$as_me' instantiates files and other configuration actions
19568from templates according to the current configuration. Unless the files
19569and actions are specified as TAGs, all are instantiated by default.
234b45d4 19570
81ecdfbb 19571Usage: $0 [OPTION]... [TAG]...
234b45d4 19572
bec39cab 19573 -h, --help print this help, then exit
81ecdfbb 19574 -V, --version print version number and configuration settings, then exit
d0ac1c44 19575 --config print configuration, then exit
81ecdfbb
RW
19576 -q, --quiet, --silent
19577 do not print progress messages
bec39cab
AC
19578 -d, --debug don't remove temporary files
19579 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
19580 --file=FILE[:TEMPLATE]
19581 instantiate the configuration file FILE
19582 --header=FILE[:TEMPLATE]
19583 instantiate the configuration header FILE
234b45d4 19584
bec39cab
AC
19585Configuration files:
19586$config_files
234b45d4 19587
bec39cab
AC
19588Configuration headers:
19589$config_headers
234b45d4 19590
bec39cab
AC
19591Configuration links:
19592$config_links
234b45d4 19593
bec39cab
AC
19594Configuration commands:
19595$config_commands
19596
81ecdfbb 19597Report bugs to the package provider."
b4e70030 19598
81ecdfbb
RW
19599_ACEOF
19600cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 19601ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
19602ac_cs_version="\\
19603config.status
d0ac1c44
SM
19604configured by $0, generated by GNU Autoconf 2.69,
19605 with options \\"\$ac_cs_config\\"
bec39cab 19606
d0ac1c44 19607Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
19608This config.status script is free software; the Free Software Foundation
19609gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
19610
19611ac_pwd='$ac_pwd'
19612srcdir='$srcdir'
19613INSTALL='$INSTALL'
81ecdfbb
RW
19614AWK='$AWK'
19615test -n "\$AWK" || AWK=awk
bec39cab
AC
19616_ACEOF
19617
81ecdfbb
RW
19618cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19619# The default lists apply if the user does not specify any file.
bec39cab
AC
19620ac_need_defaults=:
19621while test $# != 0
19622do
19623 case $1 in
d0ac1c44 19624 --*=?*)
81ecdfbb
RW
19625 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19626 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 19627 ac_shift=:
c906108c 19628 ;;
d0ac1c44
SM
19629 --*=)
19630 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19631 ac_optarg=
19632 ac_shift=:
19633 ;;
81ecdfbb 19634 *)
bec39cab
AC
19635 ac_option=$1
19636 ac_optarg=$2
19637 ac_shift=shift
c906108c 19638 ;;
bec39cab 19639 esac
c906108c 19640
bec39cab
AC
19641 case $ac_option in
19642 # Handling of the options.
bec39cab
AC
19643 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19644 ac_cs_recheck=: ;;
81ecdfbb
RW
19645 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19646 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
19647 --config | --confi | --conf | --con | --co | --c )
19648 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 19649 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
19650 debug=: ;;
19651 --file | --fil | --fi | --f )
19652 $ac_shift
81ecdfbb
RW
19653 case $ac_optarg in
19654 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 19655 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
19656 esac
19657 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
19658 ac_need_defaults=false;;
19659 --header | --heade | --head | --hea )
19660 $ac_shift
81ecdfbb
RW
19661 case $ac_optarg in
19662 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19663 esac
19664 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 19665 ac_need_defaults=false;;
81ecdfbb
RW
19666 --he | --h)
19667 # Conflict between --help and --header
d0ac1c44 19668 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
19669Try \`$0 --help' for more information.";;
19670 --help | --hel | -h )
19671 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
19672 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19673 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19674 ac_cs_silent=: ;;
c906108c 19675
bec39cab 19676 # This is an error.
d0ac1c44 19677 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 19678Try \`$0 --help' for more information." ;;
c906108c 19679
81ecdfbb
RW
19680 *) as_fn_append ac_config_targets " $1"
19681 ac_need_defaults=false ;;
c906108c 19682
bec39cab
AC
19683 esac
19684 shift
19685done
c906108c 19686
bec39cab 19687ac_configure_extra_args=
c906108c 19688
bec39cab
AC
19689if $ac_cs_silent; then
19690 exec 6>/dev/null
19691 ac_configure_extra_args="$ac_configure_extra_args --silent"
19692fi
c906108c 19693
bec39cab 19694_ACEOF
81ecdfbb 19695cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 19696if \$ac_cs_recheck; then
d0ac1c44 19697 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
19698 shift
19699 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19700 CONFIG_SHELL='$SHELL'
19701 export CONFIG_SHELL
19702 exec "\$@"
bec39cab
AC
19703fi
19704
19705_ACEOF
81ecdfbb
RW
19706cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19707exec 5>>config.log
19708{
19709 echo
19710 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19711## Running $as_me. ##
19712_ASBOX
19713 $as_echo "$ac_log"
19714} >&5
bec39cab 19715
81ecdfbb
RW
19716_ACEOF
19717cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 19718#
81ecdfbb 19719# INIT-COMMANDS
c906108c 19720#
a417dc56 19721ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 19722GDB_NM_FILE=$GDB_NM_FILE
b4e70030 19723
bec39cab
AC
19724_ACEOF
19725
81ecdfbb 19726cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 19727
81ecdfbb 19728# Handling of arguments.
bec39cab 19729for ac_config_target in $ac_config_targets
c906108c 19730do
81ecdfbb
RW
19731 case $ac_config_target in
19732 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
19733 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 19734 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 19735 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 19736 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 19737 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 19738 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 19739 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 19740 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 19741 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 19742
d0ac1c44 19743 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
19744 esac
19745done
19746
81ecdfbb 19747
bec39cab
AC
19748# If the user did not use the arguments to specify the items to instantiate,
19749# then the envvar interface is used. Set only those that are not.
19750# We use the long form for the default assignment because of an extremely
19751# bizarre bug on SunOS 4.1.3.
19752if $ac_need_defaults; then
19753 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19754 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19755 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19756 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19757fi
19758
b4e70030 19759# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 19760# simply because there is no reason against having it here, and in addition,
b4e70030 19761# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
19762# Hook for its removal unless debugging.
19763# Note that there is a small window in which the directory will not be cleaned:
19764# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
19765$debug ||
19766{
d0ac1c44 19767 tmp= ac_tmp=
81ecdfbb 19768 trap 'exit_status=$?
d0ac1c44
SM
19769 : "${ac_tmp:=$tmp}"
19770 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
19771' 0
19772 trap 'as_fn_exit 1' 1 2 13 15
19773}
19774# Create a (secure) tmp directory for tmp files.
19775
19776{
19777 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 19778 test -d "$tmp"
81ecdfbb
RW
19779} ||
19780{
19781 tmp=./conf$$-$RANDOM
19782 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
19783} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19784ac_tmp=$tmp
81ecdfbb
RW
19785
19786# Set up the scripts for CONFIG_FILES section.
19787# No need to generate them if there are no CONFIG_FILES.
19788# This happens for instance with `./config.status config.h'.
19789if test -n "$CONFIG_FILES"; then
19790
19791if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
19792 ac_cs_awk_getline=:
19793 ac_cs_awk_pipe_init=
19794 ac_cs_awk_read_file='
19795 while ((getline aline < (F[key])) > 0)
19796 print(aline)
19797 close(F[key])'
19798 ac_cs_awk_pipe_fini=
19799else
19800 ac_cs_awk_getline=false
19801 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
19802 ac_cs_awk_read_file='
19803 print "|#_!!_#|"
19804 print "cat " F[key] " &&"
19805 '$ac_cs_awk_pipe_init
19806 # The final `:' finishes the AND list.
19807 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
19808fi
19809ac_cr=`echo X | tr X '\015'`
19810# On cygwin, bash can eat \r inside `` if the user requested igncr.
19811# But we know of no other shell where ac_cr would be empty at this
19812# point, so we can use a bashism as a fallback.
19813if test "x$ac_cr" = x; then
19814 eval ac_cr=\$\'\\r\'
19815fi
19816ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19817if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 19818 ac_cs_awk_cr='\\r'
81ecdfbb
RW
19819else
19820 ac_cs_awk_cr=$ac_cr
19821fi
19822
d0ac1c44 19823echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
19824_ACEOF
19825
19826# Create commands to substitute file output variables.
19827{
19828 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 19829 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
19830 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
19831 echo "_ACAWK" &&
19832 echo "_ACEOF"
19833} >conf$$files.sh &&
19834. ./conf$$files.sh ||
d0ac1c44 19835 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19836rm -f conf$$files.sh
19837
19838{
19839 echo "cat >conf$$subs.awk <<_ACEOF" &&
19840 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19841 echo "_ACEOF"
19842} >conf$$subs.sh ||
d0ac1c44
SM
19843 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19844ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
19845ac_delim='%!_!# '
19846for ac_last_try in false false false false false :; do
19847 . ./conf$$subs.sh ||
d0ac1c44 19848 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19849
19850 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19851 if test $ac_delim_n = $ac_delim_num; then
19852 break
19853 elif $ac_last_try; then
d0ac1c44 19854 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19855 else
19856 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19857 fi
19858done
19859rm -f conf$$subs.sh
19860
19861cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 19862cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
19863_ACEOF
19864sed -n '
19865h
19866s/^/S["/; s/!.*/"]=/
19867p
19868g
19869s/^[^!]*!//
19870:repl
19871t repl
19872s/'"$ac_delim"'$//
19873t delim
19874:nl
19875h
d0ac1c44 19876s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
19877t more1
19878s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19879p
19880n
19881b repl
19882:more1
19883s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19884p
19885g
19886s/.\{148\}//
19887t nl
19888:delim
19889h
d0ac1c44 19890s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
19891t more2
19892s/["\\]/\\&/g; s/^/"/; s/$/"/
19893p
19894b
19895:more2
19896s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19897p
19898g
19899s/.\{148\}//
19900t delim
19901' <conf$$subs.awk | sed '
19902/^[^""]/{
19903 N
19904 s/\n//
19905}
19906' >>$CONFIG_STATUS || ac_write_fail=1
19907rm -f conf$$subs.awk
19908cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19909_ACAWK
d0ac1c44 19910cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
19911 for (key in S) S_is_set[key] = 1
19912 FS = "\a"
19913 \$ac_cs_awk_pipe_init
19914}
19915{
19916 line = $ 0
19917 nfields = split(line, field, "@")
19918 substed = 0
19919 len = length(field[1])
19920 for (i = 2; i < nfields; i++) {
19921 key = field[i]
19922 keylen = length(key)
19923 if (S_is_set[key]) {
19924 value = S[key]
19925 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19926 len += length(value) + length(field[++i])
19927 substed = 1
19928 } else
19929 len += 1 + keylen
19930 }
19931 if (nfields == 3 && !substed) {
19932 key = field[2]
19933 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
19934 \$ac_cs_awk_read_file
19935 next
19936 }
19937 }
19938 print line
b4e70030 19939}
81ecdfbb
RW
19940\$ac_cs_awk_pipe_fini
19941_ACAWK
19942_ACEOF
19943cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19944if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19945 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19946else
19947 cat
d0ac1c44
SM
19948fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19949 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
19950_ACEOF
19951
d0ac1c44
SM
19952# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19953# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
19954# trailing colons and then remove the whole line if VPATH becomes empty
19955# (actually we leave an empty line to preserve line numbers).
19956if test "x$srcdir" = x.; then
d0ac1c44
SM
19957 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19958h
19959s///
19960s/^/:/
19961s/[ ]*$/:/
19962s/:\$(srcdir):/:/g
19963s/:\${srcdir}:/:/g
19964s/:@srcdir@:/:/g
19965s/^:*//
81ecdfbb 19966s/:*$//
d0ac1c44
SM
19967x
19968s/\(=[ ]*\).*/\1/
19969G
19970s/\n//
81ecdfbb
RW
19971s/^[^=]*=[ ]*$//
19972}'
19973fi
19974
19975cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19976fi # test -n "$CONFIG_FILES"
19977
19978# Set up the scripts for CONFIG_HEADERS section.
19979# No need to generate them if there are no CONFIG_HEADERS.
19980# This happens for instance with `./config.status Makefile'.
19981if test -n "$CONFIG_HEADERS"; then
d0ac1c44 19982cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
19983BEGIN {
19984_ACEOF
19985
19986# Transform confdefs.h into an awk script `defines.awk', embedded as
19987# here-document in config.status, that substitutes the proper values into
19988# config.h.in to produce config.h.
4e8d927d 19989
81ecdfbb
RW
19990# Create a delimiter string that does not exist in confdefs.h, to ease
19991# handling of long lines.
19992ac_delim='%!_!# '
19993for ac_last_try in false false :; do
d0ac1c44
SM
19994 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19995 if test -z "$ac_tt"; then
81ecdfbb
RW
19996 break
19997 elif $ac_last_try; then
d0ac1c44 19998 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
19999 else
20000 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20001 fi
20002done
4e8d927d 20003
81ecdfbb
RW
20004# For the awk script, D is an array of macro values keyed by name,
20005# likewise P contains macro parameters if any. Preserve backslash
20006# newline sequences.
20007
20008ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20009sed -n '
20010s/.\{148\}/&'"$ac_delim"'/g
20011t rset
20012:rset
20013s/^[ ]*#[ ]*define[ ][ ]*/ /
20014t def
20015d
20016:def
20017s/\\$//
20018t bsnl
20019s/["\\]/\\&/g
20020s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20021D["\1"]=" \3"/p
20022s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20023d
20024:bsnl
20025s/["\\]/\\&/g
20026s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20027D["\1"]=" \3\\\\\\n"\\/p
20028t cont
20029s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20030t cont
20031d
20032:cont
20033n
20034s/.\{148\}/&'"$ac_delim"'/g
20035t clear
20036:clear
20037s/\\$//
20038t bsnlc
20039s/["\\]/\\&/g; s/^/"/; s/$/"/p
20040d
20041:bsnlc
20042s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20043b cont
20044' <confdefs.h | sed '
20045s/'"$ac_delim"'/"\\\
20046"/g' >>$CONFIG_STATUS || ac_write_fail=1
20047
20048cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20049 for (key in D) D_is_set[key] = 1
20050 FS = "\a"
20051}
20052/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20053 line = \$ 0
20054 split(line, arg, " ")
20055 if (arg[1] == "#") {
20056 defundef = arg[2]
20057 mac1 = arg[3]
20058 } else {
20059 defundef = substr(arg[1], 2)
20060 mac1 = arg[2]
20061 }
20062 split(mac1, mac2, "(") #)
20063 macro = mac2[1]
20064 prefix = substr(line, 1, index(line, defundef) - 1)
20065 if (D_is_set[macro]) {
20066 # Preserve the white space surrounding the "#".
20067 print prefix "define", macro P[macro] D[macro]
20068 next
20069 } else {
20070 # Replace #undef with comments. This is necessary, for example,
20071 # in the case of _POSIX_SOURCE, which is predefined and required
20072 # on some systems where configure will not decide to define it.
20073 if (defundef == "undef") {
20074 print "/*", prefix defundef, macro, "*/"
20075 next
20076 }
20077 }
b4e70030 20078}
81ecdfbb
RW
20079{ print }
20080_ACAWK
b4e70030 20081_ACEOF
81ecdfbb 20082cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 20083 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 20084fi # test -n "$CONFIG_HEADERS"
4e8d927d 20085
4e8d927d 20086
81ecdfbb
RW
20087eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20088shift
20089for ac_tag
20090do
20091 case $ac_tag in
20092 :[FHLC]) ac_mode=$ac_tag; continue;;
20093 esac
20094 case $ac_mode$ac_tag in
20095 :[FHL]*:*);;
d0ac1c44 20096 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
20097 :[FH]-) ac_tag=-:-;;
20098 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20099 esac
20100 ac_save_IFS=$IFS
20101 IFS=:
20102 set x $ac_tag
20103 IFS=$ac_save_IFS
20104 shift
20105 ac_file=$1
20106 shift
4e8d927d 20107
81ecdfbb
RW
20108 case $ac_mode in
20109 :L) ac_source=$1;;
20110 :[FH])
20111 ac_file_inputs=
20112 for ac_f
20113 do
20114 case $ac_f in
d0ac1c44 20115 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
20116 *) # Look for the file first in the build tree, then in the source tree
20117 # (if the path is not absolute). The absolute path cannot be DOS-style,
20118 # because $ac_f cannot contain `:'.
20119 test -f "$ac_f" ||
20120 case $ac_f in
20121 [\\/$]*) false;;
20122 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20123 esac ||
d0ac1c44 20124 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
20125 esac
20126 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20127 as_fn_append ac_file_inputs " '$ac_f'"
20128 done
20129
20130 # Let's still pretend it is `configure' which instantiates (i.e., don't
20131 # use $as_me), people would be surprised to read:
20132 # /* config.h. Generated by config.status. */
20133 configure_input='Generated from '`
20134 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20135 `' by configure.'
20136 if test x"$ac_file" != x-; then
20137 configure_input="$ac_file. $configure_input"
20138 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20139$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 20140 fi
81ecdfbb
RW
20141 # Neutralize special characters interpreted by sed in replacement strings.
20142 case $configure_input in #(
20143 *\&* | *\|* | *\\* )
20144 ac_sed_conf_input=`$as_echo "$configure_input" |
20145 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20146 *) ac_sed_conf_input=$configure_input;;
20147 esac
4e8d927d 20148
81ecdfbb 20149 case $ac_tag in
d0ac1c44
SM
20150 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20151 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
20152 esac
20153 ;;
c906108c
SS
20154 esac
20155
81ecdfbb 20156 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
20157$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20158 X"$ac_file" : 'X\(//\)[^/]' \| \
20159 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
20160 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20161$as_echo X"$ac_file" |
20162 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20163 s//\1/
20164 q
20165 }
20166 /^X\(\/\/\)[^/].*/{
20167 s//\1/
20168 q
20169 }
20170 /^X\(\/\/\)$/{
20171 s//\1/
20172 q
20173 }
20174 /^X\(\/\).*/{
20175 s//\1/
20176 q
20177 }
20178 s/.*/./; q'`
20179 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20180 ac_builddir=.
20181
81ecdfbb
RW
20182case "$ac_dir" in
20183.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20184*)
20185 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20186 # A ".." for each directory in $ac_dir_suffix.
20187 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20188 case $ac_top_builddir_sub in
20189 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20190 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20191 esac ;;
20192esac
20193ac_abs_top_builddir=$ac_pwd
20194ac_abs_builddir=$ac_pwd$ac_dir_suffix
20195# for backward compatibility:
20196ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20197
20198case $srcdir in
81ecdfbb 20199 .) # We are building in place.
bec39cab 20200 ac_srcdir=.
81ecdfbb
RW
20201 ac_top_srcdir=$ac_top_builddir_sub
20202 ac_abs_top_srcdir=$ac_pwd ;;
20203 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20204 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20205 ac_top_srcdir=$srcdir
20206 ac_abs_top_srcdir=$srcdir ;;
20207 *) # Relative name.
20208 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20209 ac_top_srcdir=$ac_top_build_prefix$srcdir
20210 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20211esac
81ecdfbb 20212ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 20213
c906108c 20214
81ecdfbb
RW
20215 case $ac_mode in
20216 :F)
20217 #
20218 # CONFIG_FILE
20219 #
c906108c 20220
bec39cab
AC
20221 case $INSTALL in
20222 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 20223 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 20224 esac
81ecdfbb 20225_ACEOF
121ce6e5 20226
81ecdfbb
RW
20227cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20228# If the template does not know about datarootdir, expand it.
20229# FIXME: This hack should be removed a few years after 2.60.
20230ac_datarootdir_hack=; ac_datarootdir_seen=
20231ac_sed_dataroot='
20232/datarootdir/ {
20233 p
20234 q
20235}
20236/@datadir@/p
20237/@docdir@/p
20238/@infodir@/p
20239/@localedir@/p
20240/@mandir@/p'
20241case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20242*datarootdir*) ac_datarootdir_seen=yes;;
20243*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20245$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20246_ACEOF
20247cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20248 ac_datarootdir_hack='
20249 s&@datadir@&$datadir&g
20250 s&@docdir@&$docdir&g
20251 s&@infodir@&$infodir&g
20252 s&@localedir@&$localedir&g
20253 s&@mandir@&$mandir&g
20254 s&\\\${datarootdir}&$datarootdir&g' ;;
20255esac
4e8d927d 20256_ACEOF
81ecdfbb
RW
20257
20258# Neutralize VPATH when `$srcdir' = `.'.
20259# Shell code in configure.ac might set extrasub.
20260# FIXME: do we really want to maintain this feature?
20261cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20262ac_sed_extra="$ac_vpsub
bec39cab
AC
20263$extrasub
20264_ACEOF
81ecdfbb 20265cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
20266:t
20267/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
20268s|@configure_input@|$ac_sed_conf_input|;t t
20269s&@top_builddir@&$ac_top_builddir_sub&;t t
20270s&@top_build_prefix@&$ac_top_build_prefix&;t t
20271s&@srcdir@&$ac_srcdir&;t t
20272s&@abs_srcdir@&$ac_abs_srcdir&;t t
20273s&@top_srcdir@&$ac_top_srcdir&;t t
20274s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20275s&@builddir@&$ac_builddir&;t t
20276s&@abs_builddir@&$ac_abs_builddir&;t t
20277s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20278s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
20279$ac_datarootdir_hack
20280"
20281eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20282if $ac_cs_awk_getline; then
d0ac1c44 20283 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 20284else
d0ac1c44
SM
20285 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20286fi \
20287 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20288
20289test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
20290 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20291 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20292 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 20293 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20294which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 20295$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20296which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 20297
d0ac1c44 20298 rm -f "$ac_tmp/stdin"
bec39cab 20299 case $ac_file in
d0ac1c44
SM
20300 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20301 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 20302 esac \
d0ac1c44 20303 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20304 ;;
20305 :H)
20306 #
20307 # CONFIG_HEADER
20308 #
bec39cab 20309 if test x"$ac_file" != x-; then
81ecdfbb
RW
20310 {
20311 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20312 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20313 } >"$ac_tmp/config.h" \
20314 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20315 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
20316 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20317$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 20318 else
81ecdfbb 20319 rm -f "$ac_file"
d0ac1c44
SM
20320 mv "$ac_tmp/config.h" "$ac_file" \
20321 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
20322 fi
20323 else
81ecdfbb 20324 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20325 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20326 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 20327 fi
81ecdfbb
RW
20328 ;;
20329 :L)
20330 #
20331 # CONFIG_LINK
20332 #
c906108c 20333
81ecdfbb
RW
20334 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20335 :
b4e70030 20336 else
81ecdfbb
RW
20337 # Prefer the file from the source tree if names are identical.
20338 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20339 ac_source=$srcdir/$ac_source
20340 fi
b4e70030 20341
81ecdfbb
RW
20342 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20343$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 20344
81ecdfbb 20345 if test ! -r "$ac_source"; then
d0ac1c44 20346 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
20347 fi
20348 rm -f "$ac_file"
bec39cab 20349
81ecdfbb 20350 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 20351 case $ac_source in
81ecdfbb
RW
20352 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20353 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20354 esac
20355 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20356 ln "$ac_source" "$ac_file" 2>/dev/null ||
20357 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 20358 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
20359 fi
20360 ;;
20361 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20362$as_echo "$as_me: executing $ac_file commands" >&6;}
20363 ;;
c906108c 20364 esac
b4e70030 20365
bec39cab 20366
81ecdfbb 20367 case $ac_file$ac_mode in
c5adaa19 20368 "config.h":H) echo > stamp-h ;;
81ecdfbb 20369 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 20370 "nm.h":L) echo > stamp-nmh ;;
b292c783 20371 "gcore":F) chmod +x gcore ;;
81ecdfbb 20372
bec39cab 20373 esac
81ecdfbb 20374done # for ac_tag
c906108c 20375
bec39cab 20376
81ecdfbb 20377as_fn_exit 0
bec39cab 20378_ACEOF
bec39cab
AC
20379ac_clean_files=$ac_clean_files_save
20380
81ecdfbb 20381test $ac_write_fail = 0 ||
d0ac1c44 20382 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 20383
bec39cab
AC
20384
20385# configure is writing to config.log, and then calls config.status.
20386# config.status does its own redirection, appending to config.log.
20387# Unfortunately, on DOS this fails, as config.log is still kept open
20388# by configure, so config.status won't be able to write to it; its
20389# output is simply discarded. So we exec the FD to /dev/null,
20390# effectively closing config.log, so it can be properly (re)opened and
20391# appended to by config.status. When coming back to configure, we
20392# need to make the FD available again.
20393if test "$no_create" != yes; then
20394 ac_cs_success=:
20395 ac_config_status_args=
20396 test "$silent" = yes &&
20397 ac_config_status_args="$ac_config_status_args --quiet"
20398 exec 5>/dev/null
20399 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20400 exec 5>>config.log
20401 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20402 # would make configure fail if this is the last instruction.
d0ac1c44 20403 $ac_cs_success || as_fn_exit 1
bec39cab 20404fi
c906108c 20405
bec39cab 20406#
81ecdfbb 20407# CONFIG_SUBDIRS section.
bec39cab 20408#
c906108c
SS
20409if test "$no_recursion" != yes; then
20410
81ecdfbb
RW
20411 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20412 # so they do not pile up.
c906108c
SS
20413 ac_sub_configure_args=
20414 ac_prev=
fdc59709
PB
20415 eval "set x $ac_configure_args"
20416 shift
20417 for ac_arg
20418 do
c906108c
SS
20419 if test -n "$ac_prev"; then
20420 ac_prev=
20421 continue
20422 fi
bec39cab 20423 case $ac_arg in
c906108c
SS
20424 -cache-file | --cache-file | --cache-fil | --cache-fi \
20425 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20426 ac_prev=cache_file ;;
20427 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
20428 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20429 | --c=*)
20430 ;;
20431 --config-cache | -C)
c906108c
SS
20432 ;;
20433 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20434 ac_prev=srcdir ;;
20435 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20436 ;;
bec39cab
AC
20437 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20438 ac_prev=prefix ;;
20439 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20440 ;;
81ecdfbb
RW
20441 --disable-option-checking)
20442 ;;
fdc59709
PB
20443 *)
20444 case $ac_arg in
81ecdfbb 20445 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20446 esac
81ecdfbb 20447 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
20448 esac
20449 done
20450
bec39cab
AC
20451 # Always prepend --prefix to ensure using the same prefix
20452 # in subdir configurations.
fdc59709
PB
20453 ac_arg="--prefix=$prefix"
20454 case $ac_arg in
81ecdfbb 20455 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20456 esac
81ecdfbb
RW
20457 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20458
20459 # Pass --silent
20460 if test "$silent" = yes; then
20461 ac_sub_configure_args="--silent $ac_sub_configure_args"
20462 fi
20463
20464 # Always prepend --disable-option-checking to silence warnings, since
20465 # different subdirs can have different --enable and --with options.
20466 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 20467
b4e70030 20468 ac_popdir=`pwd`
bec39cab 20469 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
20470
20471 # Do not complain, so a configure script can configure whichever
20472 # parts of a large source tree are present.
fdc59709 20473 test -d "$srcdir/$ac_dir" || continue
c906108c 20474
81ecdfbb
RW
20475 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20476 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20477 $as_echo "$ac_msg" >&6
20478 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20479 ac_builddir=.
20480
81ecdfbb
RW
20481case "$ac_dir" in
20482.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20483*)
20484 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20485 # A ".." for each directory in $ac_dir_suffix.
20486 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20487 case $ac_top_builddir_sub in
20488 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20489 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20490 esac ;;
20491esac
20492ac_abs_top_builddir=$ac_pwd
20493ac_abs_builddir=$ac_pwd$ac_dir_suffix
20494# for backward compatibility:
20495ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20496
20497case $srcdir in
81ecdfbb 20498 .) # We are building in place.
bec39cab 20499 ac_srcdir=.
81ecdfbb
RW
20500 ac_top_srcdir=$ac_top_builddir_sub
20501 ac_abs_top_srcdir=$ac_pwd ;;
20502 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20503 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20504 ac_top_srcdir=$srcdir
20505 ac_abs_top_srcdir=$srcdir ;;
20506 *) # Relative name.
20507 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20508 ac_top_srcdir=$ac_top_build_prefix$srcdir
20509 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20510esac
81ecdfbb 20511ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 20512
c906108c 20513
fdc59709 20514 cd "$ac_dir"
c906108c
SS
20515
20516 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
20517 if test -f "$ac_srcdir/configure.gnu"; then
20518 ac_sub_configure=$ac_srcdir/configure.gnu
20519 elif test -f "$ac_srcdir/configure"; then
20520 ac_sub_configure=$ac_srcdir/configure
20521 elif test -f "$ac_srcdir/configure.in"; then
20522 # This should be Cygnus configure.
20523 ac_sub_configure=$ac_aux_dir/configure
c906108c 20524 else
81ecdfbb
RW
20525 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20526$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
20527 ac_sub_configure=
20528 fi
20529
20530 # The recursion is here.
20531 if test -n "$ac_sub_configure"; then
c906108c 20532 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
20533 case $cache_file in
20534 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
20535 *) # Relative name.
20536 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 20537 esac
c906108c 20538
81ecdfbb
RW
20539 { $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
20540$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 20541 # The eval makes quoting arguments work.
fdc59709
PB
20542 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20543 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 20544 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
20545 fi
20546
fdc59709 20547 cd "$ac_popdir"
c906108c
SS
20548 done
20549fi
81ecdfbb
RW
20550if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20551 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20552$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20553fi
c906108c 20554
This page took 5.572656 seconds and 4 git commands to generate.