[gdb/testsuite] Add target board cc-with-gnu-debuglink.exp
[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
1776e3e5
NA
634CTF_DEPS
635LIBCTF
636ENABLE_LIBCTF
393fd4c3
YQ
637LTLIBBABELTRACE
638LIBBABELTRACE
639HAVE_LIBBABELTRACE
21ea5acd
SDJ
640HAVE_NATIVE_GCORE_HOST
641NAT_GENERATED_FILES
642XM_CLIBS
643MH_CFLAGS
644LOADLIBES
645NAT_CDEPS
646NATDEPFILES
647NAT_FILE
81ecdfbb
RW
648target_subdir
649CONFIG_UNINSTALL
650CONFIG_INSTALL
651CONFIG_CLEAN
652CONFIG_ALL
653CONFIG_SRCS
654CONFIG_DEPS
655CONFIG_OBS
656PROFILE_CFLAGS
657ENABLE_CFLAGS
658SIM_OBS
659SIM
660XMKMF
661GDBTK_SRC_DIR
662GDBTK_CFLAGS
663GDBTKLIBS
664X_LIBS
665X_LDFLAGS
666X_CFLAGS
667TK_XINCLUDES
668TK_DEPS
669TK_LIBRARY
670TK_INCLUDE
671TK_STUB_LIB_SPEC
672TK_STUB_LIB_FLAG
673TK_STUB_LIB_FILE
674TK_LIB_SPEC
675TK_LIB_FLAG
676TK_LIB_FILE
677TK_SRC_DIR
678TK_BIN_DIR
679TK_VERSION
680TCL_DEPS
681TCL_LIBRARY
682TCL_INCLUDE
683TCL_STUB_LIB_SPEC
684TCL_STUB_LIB_FLAG
685TCL_STUB_LIB_FILE
686TCL_LIB_SPEC
687TCL_LIB_FLAG
688TCL_LIB_FILE
689TCL_SRC_DIR
690TCL_BIN_DIR
691TCL_PATCH_LEVEL
692TCL_VERSION
693WIN32LDAPP
b2ceabe8 694WIN32LIBS
81ecdfbb
RW
695GUI_CFLAGS_X
696LIBGUI
608e2dbb
TT
697LTLIBLZMA
698LIBLZMA
699HAVE_LIBLZMA
81ecdfbb
RW
700SER_HARDWIRE
701WERROR_CFLAGS
702WARN_CFLAGS
ed2a2229 703SYSTEM_GDBINIT_DIR
81ecdfbb 704SYSTEM_GDBINIT
81ecdfbb
RW
705TARGET_SYSTEM_ROOT
706CONFIG_LDFLAGS
f6528abd 707RDYNAMIC
05ea2a05
TT
708LTLIBIPT
709LIBIPT
710HAVE_LIBIPT
5e030278
TT
711PTHREAD_CFLAGS
712PTHREAD_LIBS
713PTHREAD_CC
714ax_pthread_config
715SED
81ecdfbb 716ALLOCA
62f29fda
TT
717SRCHIGH_CFLAGS
718SRCHIGH_LIBS
4df42755
DE
719HAVE_GUILE_FALSE
720HAVE_GUILE_TRUE
ed3ef339
DE
721GUILE_LIBS
722GUILE_CPPFLAGS
e76c5d17
DE
723GUILD_TARGET_FLAG
724GUILD
ed3ef339 725pkg_config_prog_path
4df42755
DE
726HAVE_PYTHON_FALSE
727HAVE_PYTHON_TRUE
ac534cba
JB
728PYTHON_LIBS
729PYTHON_CPPFLAGS
81ecdfbb 730PYTHON_CFLAGS
ec685c5e 731python_prog_path
2400729e
UW
732LTLIBMPFR
733LIBMPFR
734HAVE_LIBMPFR
2c947d9b
JB
735LTLIBGMP
736LIBGMP
737HAVE_LIBGMP
81ecdfbb
RW
738LTLIBEXPAT
739LIBEXPAT
740HAVE_LIBEXPAT
b8e0a31c 741JIT_READER_DIR
f997c383 742TARGET_PTR
39037522 743READLINE_TEXI_INCFLAG
81ecdfbb
RW
744READLINE_CFLAGS
745READLINE_DEPS
746READLINE
016a3251
DD
747LTLIBICONV
748LIBICONV
711a72d3
L
749zlibinc
750zlibdir
81ecdfbb
RW
751MIG
752WINDRES
753DLLTOOL
c971b7fa 754AR
81ecdfbb
RW
755YFLAGS
756YACC
c971b7fa 757RANLIB
81ecdfbb 758LN_S
c971b7fa
PA
759INSTALL_DATA
760INSTALL_SCRIPT
761INSTALL_PROGRAM
762AWK
81ecdfbb
RW
763REPORT_BUGS_TEXI
764REPORT_BUGS_TO
765PKGVERSION
44cee4fd 766CODESIGN_CERT
f6720b1c
AM
767DEBUGINFOD_LIBS
768DEBUGINFOD_CFLAGS
769PKG_CONFIG_LIBDIR
770PKG_CONFIG_PATH
771PKG_CONFIG
b292c783 772HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
773TARGET_OBS
774subdirs
775GDB_DATADIR
776DEBUGDIR
5048e516
JK
777MAKEINFO_EXTRA_FLAGS
778MAKEINFOFLAGS
779MAKEINFO
81ecdfbb 780PACKAGE
81ecdfbb
RW
781CATOBJEXT
782GENCAT
783INSTOBJEXT
784DATADIRNAME
785CATALOGS
786POSUB
787GMSGFMT
788XGETTEXT
789INCINTL
790LIBINTL_DEP
791LIBINTL
792USE_NLS
81ecdfbb
RW
793CCDEPMODE
794DEPDIR
795am__leading_dot
0bcda685
PA
796CXX_DIALECT
797HAVE_CXX11
4869db5e
RM
798INSTALL_STRIP_PROGRAM
799STRIP
800install_sh
c8693053 801LARGEFILE_CPPFLAGS
81ecdfbb
RW
802target_os
803target_vendor
804target_cpu
805target
806host_os
807host_vendor
808host_cpu
809host
810build_os
811build_vendor
812build_cpu
813build
c971b7fa
PA
814EGREP
815GREP
816CPP
3bc3d82a
PA
817ac_ct_CXX
818CXXFLAGS
819CXX
81ecdfbb
RW
820OBJEXT
821EXEEXT
822ac_ct_CC
823CPPFLAGS
824LDFLAGS
825CFLAGS
826CC
827MAINT
828MAINTAINER_MODE_FALSE
829MAINTAINER_MODE_TRUE
830target_alias
831host_alias
832build_alias
833LIBS
834ECHO_T
835ECHO_N
836ECHO_C
837DEFS
838mandir
839localedir
840libdir
841psdir
842pdfdir
843dvidir
844htmldir
845infodir
846docdir
847oldincludedir
848includedir
849localstatedir
850sharedstatedir
851sysconfdir
852datadir
853datarootdir
854libexecdir
855sbindir
856bindir
857program_transform_name
858prefix
859exec_prefix
860PACKAGE_URL
861PACKAGE_BUGREPORT
862PACKAGE_STRING
863PACKAGE_VERSION
864PACKAGE_TARNAME
865PACKAGE_NAME
866PATH_SEPARATOR
867SHELL'
2b351b19 868ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
869ac_user_opts='
870enable_option_checking
871enable_maintainer_mode
da2f07f1
JK
872enable_plugins
873enable_largefile
81ecdfbb
RW
874with_separate_debug_dir
875with_gdb_datadir
876with_relocated_sources
7349ff92 877with_auto_load_dir
bccbefd2 878with_auto_load_safe_path
81ecdfbb
RW
879enable_targets
880enable_64_bit_bfd
81ecdfbb
RW
881enable_gdbmi
882enable_tui
883enable_gdbtk
0d79cdc4 884with_debuginfod
05e7c244 885with_libunwind_ia64
81ecdfbb
RW
886with_curses
887enable_profiling
44cee4fd 888enable_codesign
81ecdfbb
RW
889with_pkgversion
890with_bugurl
711a72d3 891with_system_zlib
016a3251
DD
892with_gnu_ld
893enable_rpath
81ecdfbb 894with_libiconv_prefix
9f1528a1 895with_libiconv_type
478aac75 896with_iconv_bin
81ecdfbb 897with_system_readline
b8e0a31c 898with_jit_reader_dir
81ecdfbb 899with_expat
81ecdfbb 900with_libexpat_prefix
9f1528a1 901with_libexpat_type
2c947d9b
JB
902with_libgmp_prefix
903with_libgmp_type
2400729e
UW
904with_mpfr
905with_libmpfr_prefix
9f1528a1 906with_libmpfr_type
81ecdfbb 907with_python
d13c7322 908with_python_libdir
ed3ef339 909with_guile
189b8c2e 910enable_source_highlight
58bfce93
MM
911with_intel_pt
912with_libipt_prefix
9f1528a1 913with_libipt_type
81ecdfbb
RW
914with_sysroot
915with_system_gdbinit
ed2a2229 916with_system_gdbinit_dir
81ecdfbb
RW
917enable_werror
918enable_build_warnings
919enable_gdb_build_warnings
f35d5ade 920enable_ubsan
608e2dbb
TT
921with_lzma
922with_liblzma_prefix
9f1528a1 923with_liblzma_type
81ecdfbb
RW
924with_tcl
925with_tk
926with_x
927enable_sim
393fd4c3
YQ
928with_babeltrace
929with_libbabeltrace_prefix
9f1528a1 930with_libbabeltrace_type
ccb1ba62 931with_xxhash
1776e3e5 932enable_libctf
ccb1ba62 933with_libxxhash_prefix
9f1528a1 934with_libxxhash_type
8ecfd7bd 935enable_unit_tests
81ecdfbb
RW
936'
937 ac_precious_vars='build_alias
938host_alias
939target_alias
940CC
941CFLAGS
942LDFLAGS
943LIBS
944CPPFLAGS
3bc3d82a
PA
945CXX
946CXXFLAGS
947CCC
81ecdfbb 948CPP
f06e05e0
JK
949MAKEINFO
950MAKEINFOFLAGS
f6720b1c
AM
951PKG_CONFIG
952PKG_CONFIG_PATH
953PKG_CONFIG_LIBDIR
954DEBUGINFOD_CFLAGS
955DEBUGINFOD_LIBS
81ecdfbb
RW
956YACC
957YFLAGS
958XMKMF'
5ae98d25 959ac_subdirs_all='testsuite
919adfe8 960gdbtk'
c906108c
SS
961
962# Initialize some variables set by options.
bec39cab
AC
963ac_init_help=
964ac_init_version=false
81ecdfbb
RW
965ac_unrecognized_opts=
966ac_unrecognized_sep=
c906108c
SS
967# The variables have the same names as the options, with
968# dashes changed to underlines.
bec39cab 969cache_file=/dev/null
c906108c 970exec_prefix=NONE
c906108c 971no_create=
c906108c
SS
972no_recursion=
973prefix=NONE
974program_prefix=NONE
975program_suffix=NONE
976program_transform_name=s,x,x,
977silent=
978site=
979srcdir=
c906108c
SS
980verbose=
981x_includes=NONE
982x_libraries=NONE
bec39cab
AC
983
984# Installation directory options.
985# These are left unexpanded so users can "make install exec_prefix=/foo"
986# and all the variables that are supposed to be based on exec_prefix
987# by default will actually change.
988# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 989# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
990bindir='${exec_prefix}/bin'
991sbindir='${exec_prefix}/sbin'
992libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
993datarootdir='${prefix}/share'
994datadir='${datarootdir}'
c906108c
SS
995sysconfdir='${prefix}/etc'
996sharedstatedir='${prefix}/com'
997localstatedir='${prefix}/var'
c906108c
SS
998includedir='${prefix}/include'
999oldincludedir='/usr/include'
81ecdfbb
RW
1000docdir='${datarootdir}/doc/${PACKAGE}'
1001infodir='${datarootdir}/info'
1002htmldir='${docdir}'
1003dvidir='${docdir}'
1004pdfdir='${docdir}'
1005psdir='${docdir}'
1006libdir='${exec_prefix}/lib'
1007localedir='${datarootdir}/locale'
1008mandir='${datarootdir}/man'
c906108c 1009
c906108c 1010ac_prev=
81ecdfbb 1011ac_dashdash=
c906108c
SS
1012for ac_option
1013do
c906108c
SS
1014 # If the previous option needs an argument, assign it.
1015 if test -n "$ac_prev"; then
81ecdfbb 1016 eval $ac_prev=\$ac_option
c906108c
SS
1017 ac_prev=
1018 continue
1019 fi
1020
81ecdfbb 1021 case $ac_option in
d0ac1c44
SM
1022 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1023 *=) ac_optarg= ;;
1024 *) ac_optarg=yes ;;
81ecdfbb 1025 esac
c906108c
SS
1026
1027 # Accept the important Cygnus configure options, so we can diagnose typos.
1028
81ecdfbb
RW
1029 case $ac_dashdash$ac_option in
1030 --)
1031 ac_dashdash=yes ;;
c906108c
SS
1032
1033 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1034 ac_prev=bindir ;;
1035 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1036 bindir=$ac_optarg ;;
c906108c
SS
1037
1038 -build | --build | --buil | --bui | --bu)
bec39cab 1039 ac_prev=build_alias ;;
c906108c 1040 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1041 build_alias=$ac_optarg ;;
c906108c
SS
1042
1043 -cache-file | --cache-file | --cache-fil | --cache-fi \
1044 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1045 ac_prev=cache_file ;;
1046 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1047 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1048 cache_file=$ac_optarg ;;
1049
1050 --config-cache | -C)
1051 cache_file=config.cache ;;
c906108c 1052
81ecdfbb 1053 -datadir | --datadir | --datadi | --datad)
c906108c 1054 ac_prev=datadir ;;
81ecdfbb 1055 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1056 datadir=$ac_optarg ;;
c906108c 1057
81ecdfbb
RW
1058 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1059 | --dataroo | --dataro | --datar)
1060 ac_prev=datarootdir ;;
1061 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1062 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1063 datarootdir=$ac_optarg ;;
1064
c906108c 1065 -disable-* | --disable-*)
81ecdfbb 1066 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
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--disable-$ac_useropt_orig"
1077 ac_unrecognized_sep=', ';;
1078 esac
1079 eval enable_$ac_useropt=no ;;
1080
1081 -docdir | --docdir | --docdi | --doc | --do)
1082 ac_prev=docdir ;;
1083 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1084 docdir=$ac_optarg ;;
1085
1086 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1087 ac_prev=dvidir ;;
1088 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1089 dvidir=$ac_optarg ;;
c906108c
SS
1090
1091 -enable-* | --enable-*)
81ecdfbb 1092 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1093 # Reject names that are not valid shell variable names.
81ecdfbb 1094 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1095 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1096 ac_useropt_orig=$ac_useropt
1097 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1098 case $ac_user_opts in
1099 *"
1100"enable_$ac_useropt"
1101"*) ;;
1102 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1103 ac_unrecognized_sep=', ';;
b4e70030 1104 esac
81ecdfbb 1105 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1106
1107 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1108 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1109 | --exec | --exe | --ex)
1110 ac_prev=exec_prefix ;;
1111 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1112 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1113 | --exec=* | --exe=* | --ex=*)
bec39cab 1114 exec_prefix=$ac_optarg ;;
c906108c
SS
1115
1116 -gas | --gas | --ga | --g)
1117 # Obsolete; use --with-gas.
1118 with_gas=yes ;;
1119
bec39cab
AC
1120 -help | --help | --hel | --he | -h)
1121 ac_init_help=long ;;
1122 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1123 ac_init_help=recursive ;;
1124 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1125 ac_init_help=short ;;
c906108c
SS
1126
1127 -host | --host | --hos | --ho)
bec39cab 1128 ac_prev=host_alias ;;
c906108c 1129 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1130 host_alias=$ac_optarg ;;
c906108c 1131
81ecdfbb
RW
1132 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1133 ac_prev=htmldir ;;
1134 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1135 | --ht=*)
1136 htmldir=$ac_optarg ;;
1137
c906108c
SS
1138 -includedir | --includedir | --includedi | --included | --include \
1139 | --includ | --inclu | --incl | --inc)
1140 ac_prev=includedir ;;
1141 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1142 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1143 includedir=$ac_optarg ;;
c906108c
SS
1144
1145 -infodir | --infodir | --infodi | --infod | --info | --inf)
1146 ac_prev=infodir ;;
1147 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1148 infodir=$ac_optarg ;;
c906108c
SS
1149
1150 -libdir | --libdir | --libdi | --libd)
1151 ac_prev=libdir ;;
1152 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1153 libdir=$ac_optarg ;;
c906108c
SS
1154
1155 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1156 | --libexe | --libex | --libe)
1157 ac_prev=libexecdir ;;
1158 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1159 | --libexe=* | --libex=* | --libe=*)
bec39cab 1160 libexecdir=$ac_optarg ;;
c906108c 1161
81ecdfbb
RW
1162 -localedir | --localedir | --localedi | --localed | --locale)
1163 ac_prev=localedir ;;
1164 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1165 localedir=$ac_optarg ;;
1166
c906108c 1167 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1168 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1169 ac_prev=localstatedir ;;
1170 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1171 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1172 localstatedir=$ac_optarg ;;
c906108c
SS
1173
1174 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1175 ac_prev=mandir ;;
1176 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1177 mandir=$ac_optarg ;;
c906108c
SS
1178
1179 -nfp | --nfp | --nf)
1180 # Obsolete; use --without-fp.
1181 with_fp=no ;;
1182
1183 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1184 | --no-cr | --no-c | -n)
c906108c
SS
1185 no_create=yes ;;
1186
1187 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1188 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1189 no_recursion=yes ;;
1190
1191 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1192 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1193 | --oldin | --oldi | --old | --ol | --o)
1194 ac_prev=oldincludedir ;;
1195 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1196 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1197 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1198 oldincludedir=$ac_optarg ;;
c906108c
SS
1199
1200 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1201 ac_prev=prefix ;;
1202 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1203 prefix=$ac_optarg ;;
c906108c
SS
1204
1205 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1206 | --program-pre | --program-pr | --program-p)
1207 ac_prev=program_prefix ;;
1208 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1209 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1210 program_prefix=$ac_optarg ;;
c906108c
SS
1211
1212 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1213 | --program-suf | --program-su | --program-s)
1214 ac_prev=program_suffix ;;
1215 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1216 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1217 program_suffix=$ac_optarg ;;
c906108c
SS
1218
1219 -program-transform-name | --program-transform-name \
1220 | --program-transform-nam | --program-transform-na \
1221 | --program-transform-n | --program-transform- \
1222 | --program-transform | --program-transfor \
1223 | --program-transfo | --program-transf \
1224 | --program-trans | --program-tran \
1225 | --progr-tra | --program-tr | --program-t)
1226 ac_prev=program_transform_name ;;
1227 -program-transform-name=* | --program-transform-name=* \
1228 | --program-transform-nam=* | --program-transform-na=* \
1229 | --program-transform-n=* | --program-transform-=* \
1230 | --program-transform=* | --program-transfor=* \
1231 | --program-transfo=* | --program-transf=* \
1232 | --program-trans=* | --program-tran=* \
1233 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1234 program_transform_name=$ac_optarg ;;
c906108c 1235
81ecdfbb
RW
1236 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1237 ac_prev=pdfdir ;;
1238 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1239 pdfdir=$ac_optarg ;;
1240
1241 -psdir | --psdir | --psdi | --psd | --ps)
1242 ac_prev=psdir ;;
1243 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1244 psdir=$ac_optarg ;;
1245
c906108c
SS
1246 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1247 | -silent | --silent | --silen | --sile | --sil)
1248 silent=yes ;;
1249
1250 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1251 ac_prev=sbindir ;;
1252 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1253 | --sbi=* | --sb=*)
bec39cab 1254 sbindir=$ac_optarg ;;
c906108c
SS
1255
1256 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1257 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1258 | --sharedst | --shareds | --shared | --share | --shar \
1259 | --sha | --sh)
1260 ac_prev=sharedstatedir ;;
1261 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1262 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1263 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1264 | --sha=* | --sh=*)
bec39cab 1265 sharedstatedir=$ac_optarg ;;
c906108c
SS
1266
1267 -site | --site | --sit)
1268 ac_prev=site ;;
1269 -site=* | --site=* | --sit=*)
bec39cab 1270 site=$ac_optarg ;;
3ace7edb 1271
c906108c
SS
1272 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1273 ac_prev=srcdir ;;
1274 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1275 srcdir=$ac_optarg ;;
c906108c
SS
1276
1277 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1278 | --syscon | --sysco | --sysc | --sys | --sy)
1279 ac_prev=sysconfdir ;;
1280 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1281 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1282 sysconfdir=$ac_optarg ;;
c906108c
SS
1283
1284 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1285 ac_prev=target_alias ;;
c906108c 1286 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1287 target_alias=$ac_optarg ;;
c906108c
SS
1288
1289 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1290 verbose=yes ;;
1291
bec39cab
AC
1292 -version | --version | --versio | --versi | --vers | -V)
1293 ac_init_version=: ;;
c906108c
SS
1294
1295 -with-* | --with-*)
81ecdfbb 1296 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1297 # Reject names that are not valid shell variable names.
81ecdfbb 1298 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1299 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1300 ac_useropt_orig=$ac_useropt
1301 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1302 case $ac_user_opts in
1303 *"
1304"with_$ac_useropt"
1305"*) ;;
1306 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1307 ac_unrecognized_sep=', ';;
b4e70030 1308 esac
81ecdfbb 1309 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1310
1311 -without-* | --without-*)
81ecdfbb 1312 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1313 # Reject names that are not valid shell variable names.
81ecdfbb 1314 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1315 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1316 ac_useropt_orig=$ac_useropt
1317 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1318 case $ac_user_opts in
1319 *"
1320"with_$ac_useropt"
1321"*) ;;
1322 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1323 ac_unrecognized_sep=', ';;
1324 esac
1325 eval with_$ac_useropt=no ;;
c906108c
SS
1326
1327 --x)
1328 # Obsolete; use --with-x.
1329 with_x=yes ;;
1330
1331 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1332 | --x-incl | --x-inc | --x-in | --x-i)
1333 ac_prev=x_includes ;;
1334 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1335 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1336 x_includes=$ac_optarg ;;
c906108c
SS
1337
1338 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1339 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1340 ac_prev=x_libraries ;;
1341 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1342 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1343 x_libraries=$ac_optarg ;;
c906108c 1344
d0ac1c44
SM
1345 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1346Try \`$0 --help' for more information"
c906108c
SS
1347 ;;
1348
bec39cab
AC
1349 *=*)
1350 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1351 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1352 case $ac_envvar in #(
1353 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1354 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1355 esac
1356 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1357 export $ac_envvar ;;
1358
c906108c 1359 *)
bec39cab 1360 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1361 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1362 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1363 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1364 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1365 ;;
1366
1367 esac
1368done
1369
1370if test -n "$ac_prev"; then
bec39cab 1371 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1372 as_fn_error $? "missing argument to $ac_option"
c906108c 1373fi
c906108c 1374
81ecdfbb
RW
1375if test -n "$ac_unrecognized_opts"; then
1376 case $enable_option_checking in
1377 no) ;;
d0ac1c44 1378 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1379 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1380 esac
81ecdfbb 1381fi
b4e70030 1382
81ecdfbb
RW
1383# Check all directory arguments for consistency.
1384for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1385 datadir sysconfdir sharedstatedir localstatedir includedir \
1386 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1387 libdir localedir mandir
b4e70030 1388do
81ecdfbb
RW
1389 eval ac_val=\$$ac_var
1390 # Remove trailing slashes.
1391 case $ac_val in
1392 */ )
1393 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1394 eval $ac_var=\$ac_val;;
1395 esac
1396 # Be sure to have absolute directory names.
b4e70030 1397 case $ac_val in
81ecdfbb
RW
1398 [\\/$]* | ?:[\\/]* ) continue;;
1399 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1400 esac
d0ac1c44 1401 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1402done
1403
bec39cab
AC
1404# There might be people who depend on the old broken behavior: `$host'
1405# used to hold the argument of --host etc.
1406# FIXME: To remove some day.
1407build=$build_alias
1408host=$host_alias
1409target=$target_alias
1410
1411# FIXME: To remove some day.
1412if test "x$host_alias" != x; then
1413 if test "x$build_alias" = x; then
1414 cross_compiling=maybe
bec39cab
AC
1415 elif test "x$build_alias" != "x$host_alias"; then
1416 cross_compiling=yes
1417 fi
1418fi
c906108c 1419
bec39cab
AC
1420ac_tool_prefix=
1421test -n "$host_alias" && ac_tool_prefix=$host_alias-
1422
1423test "$silent" = yes && exec 6>/dev/null
c906108c 1424
c906108c 1425
81ecdfbb
RW
1426ac_pwd=`pwd` && test -n "$ac_pwd" &&
1427ac_ls_di=`ls -di .` &&
1428ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1429 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1430test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1431 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1432
1433
c906108c
SS
1434# Find the source files, if location was not specified.
1435if test -z "$srcdir"; then
1436 ac_srcdir_defaulted=yes
81ecdfbb
RW
1437 # Try the directory containing this script, then the parent directory.
1438 ac_confdir=`$as_dirname -- "$as_myself" ||
1439$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1440 X"$as_myself" : 'X\(//\)[^/]' \| \
1441 X"$as_myself" : 'X\(//\)$' \| \
1442 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1443$as_echo X"$as_myself" |
1444 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1445 s//\1/
1446 q
1447 }
1448 /^X\(\/\/\)[^/].*/{
1449 s//\1/
1450 q
1451 }
1452 /^X\(\/\/\)$/{
1453 s//\1/
1454 q
1455 }
1456 /^X\(\/\).*/{
1457 s//\1/
1458 q
1459 }
1460 s/.*/./; q'`
c906108c 1461 srcdir=$ac_confdir
81ecdfbb 1462 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1463 srcdir=..
1464 fi
1465else
1466 ac_srcdir_defaulted=no
1467fi
81ecdfbb
RW
1468if test ! -r "$srcdir/$ac_unique_file"; then
1469 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1470 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1471fi
1472ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1473ac_abs_confdir=`(
d0ac1c44 1474 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1475 pwd)`
1476# When building in place, set srcdir=.
1477if test "$ac_abs_confdir" = "$ac_pwd"; then
1478 srcdir=.
1479fi
1480# Remove unnecessary trailing slashes from srcdir.
1481# Double slashes in file names in object file debugging info
1482# mess up M-x gdb in Emacs.
1483case $srcdir in
1484*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1485esac
1486for ac_var in $ac_precious_vars; do
1487 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1488 eval ac_env_${ac_var}_value=\$${ac_var}
1489 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1490 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1491done
c906108c 1492
bec39cab
AC
1493#
1494# Report the --help message.
1495#
1496if test "$ac_init_help" = "long"; then
1497 # Omit some internal or obsolete options to make the list less imposing.
1498 # This message is too long to be a string in the A/UX 3.1 sh.
1499 cat <<_ACEOF
1500\`configure' configures this package to adapt to many kinds of systems.
1501
1502Usage: $0 [OPTION]... [VAR=VALUE]...
1503
1504To assign environment variables (e.g., CC, CFLAGS...), specify them as
1505VAR=VALUE. See below for descriptions of some of the useful variables.
1506
1507Defaults for the options are specified in brackets.
1508
1509Configuration:
1510 -h, --help display this help and exit
1511 --help=short display options specific to this package
1512 --help=recursive display the short help of all the included packages
1513 -V, --version display version information and exit
d0ac1c44 1514 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1515 --cache-file=FILE cache test results in FILE [disabled]
1516 -C, --config-cache alias for \`--cache-file=config.cache'
1517 -n, --no-create do not create output files
1518 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1519
bec39cab
AC
1520Installation directories:
1521 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1522 [$ac_default_prefix]
bec39cab 1523 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1524 [PREFIX]
bec39cab
AC
1525
1526By default, \`make install' will install all the files in
1527\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1528an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1529for instance \`--prefix=\$HOME'.
1530
1531For better control, use the options below.
1532
1533Fine tuning of the installation directories:
81ecdfbb
RW
1534 --bindir=DIR user executables [EPREFIX/bin]
1535 --sbindir=DIR system admin executables [EPREFIX/sbin]
1536 --libexecdir=DIR program executables [EPREFIX/libexec]
1537 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1538 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1539 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1540 --libdir=DIR object code libraries [EPREFIX/lib]
1541 --includedir=DIR C header files [PREFIX/include]
1542 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1543 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1544 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1545 --infodir=DIR info documentation [DATAROOTDIR/info]
1546 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1547 --mandir=DIR man documentation [DATAROOTDIR/man]
1548 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1549 --htmldir=DIR html documentation [DOCDIR]
1550 --dvidir=DIR dvi documentation [DOCDIR]
1551 --pdfdir=DIR pdf documentation [DOCDIR]
1552 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1553_ACEOF
1554
1555 cat <<\_ACEOF
1556
9009e1ae
MR
1557Program names:
1558 --program-prefix=PREFIX prepend PREFIX to installed program names
1559 --program-suffix=SUFFIX append SUFFIX to installed program names
1560 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1561
bec39cab
AC
1562X features:
1563 --x-includes=DIR X include files are in DIR
1564 --x-libraries=DIR X library files are in DIR
1565
1566System types:
1567 --build=BUILD configure for building on BUILD [guessed]
1568 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1569 --target=TARGET configure for building compilers for TARGET [HOST]
1570_ACEOF
1571fi
1572
1573if test -n "$ac_init_help"; then
1574
1575 cat <<\_ACEOF
1576
1577Optional Features:
81ecdfbb 1578 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1579 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1580 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1581 --enable-maintainer-mode
1582 enable make rules and dependencies not useful (and
1583 sometimes confusing) to the casual installer
2974be62 1584 --enable-plugins Enable support for plugins
da2f07f1 1585 --disable-largefile omit support for large files
a1220294
TT
1586 --enable-targets=TARGETS
1587 alternative target configurations
c0993dbe 1588 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1589 --disable-gdbmi disable machine-interface (MI)
1590 --enable-tui enable full-screen terminal user interface (TUI)
1591 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1592 --enable-profiling enable profiling of GDB
44cee4fd 1593 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1594 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1595 --enable-source-highlight
1596 enable source-highlight for source listings
a1220294 1597 --enable-werror treat compile warnings as errors
32c1c914 1598 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1599 --enable-gdb-build-warnings
32c1c914 1600 enable GDB specific build-time compiler warnings if
a1220294 1601 gcc is used
f35d5ade 1602 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1603 --enable-sim link gdb with simulator
1776e3e5 1604 --enable-libctf Handle .ctf type-info sections [default=yes]
8ecfd7bd
SDJ
1605 --enable-unit-tests Enable the inclusion of unit tests when compiling
1606 GDB
bec39cab
AC
1607
1608Optional Packages:
1609 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1610 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1611 --with-separate-debug-dir=PATH
32c1c914 1612 look for global separate debug info in this path
62e4f60c 1613 [LIBDIR/debug]
b14b1491
TT
1614 --with-gdb-datadir=PATH look for global separate data files in this path
1615 [DATADIR/gdb]
29b0e8a2 1616 --with-relocated-sources=PATH
32c1c914 1617 automatically relocate this path for source files
7349ff92 1618 --with-auto-load-dir=PATH
aff139ff 1619 directories from which to load auto-loaded scripts
1564a261 1620 [$debugdir:$datadir/auto-load]
bccbefd2 1621 --with-auto-load-safe-path=PATH
aff139ff 1622 directories safe to hold auto-loaded files
7349ff92 1623 [--with-auto-load-dir]
bccbefd2
JK
1624 --without-auto-load-safe-path
1625 do not restrict auto-loaded files locations
0d79cdc4
AM
1626 --with-debuginfod Enable debuginfo lookups with debuginfod
1627 (auto/yes/no)
05e7c244 1628 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1629 --with-curses use the curses library instead of the termcap
1630 library
c16158bc
JM
1631 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1632 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1633 --with-system-zlib use installed libz
016a3251
DD
1634 --with-gnu-ld assume the C compiler uses GNU ld default=no
1635 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1636 --without-libiconv-prefix don't search for libiconv in includedir and libdir
9f1528a1 1637 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
478aac75 1638 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1639 --with-system-readline use installed readline library
b8e0a31c
SD
1640 --with-jit-reader-dir=PATH
1641 directory to load the JIT readers from
5c39566f 1642 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1643 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1644 --without-libexpat-prefix don't search for libexpat in includedir and libdir
9f1528a1 1645 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
2c947d9b
JB
1646 --with-libgmp-prefix[=DIR] search for libgmp in DIR/include and DIR/lib
1647 --without-libgmp-prefix don't search for libgmp in includedir and libdir
1648 --with-libgmp-type=TYPE type of library to search for (auto/static/shared)
2400729e
UW
1649 --with-mpfr include MPFR support (auto/yes/no)
1650 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1651 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
9f1528a1 1652 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
0c4a4063
DE
1653 --with-python[=PYTHON] include python support
1654 (auto/yes/no/<python-program>)
d13c7322
AB
1655 --with-python-libdir[=DIR]
1656 search for python's libraries in DIR
ed3ef339
DE
1657 --with-guile[=GUILE] include guile support
1658 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1659 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1660 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1661 --without-libipt-prefix don't search for libipt in includedir and libdir
9f1528a1 1662 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
81ecdfbb 1663 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1664 --with-system-gdbinit=PATH
32c1c914 1665 automatically load a system-wide gdbinit file
ed2a2229
CB
1666 --with-system-gdbinit-dir=PATH
1667 automatically load system-wide gdbinit files from
1668 this directory
608e2dbb
TT
1669 --with-lzma support lzma compression (auto/yes/no)
1670 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1671 --without-liblzma-prefix don't search for liblzma in includedir and libdir
9f1528a1 1672 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
5062cc19
KS
1673 --with-tcl directory containing tcl configuration (tclConfig.sh)
1674 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1675 --with-x use the X Window System
393fd4c3
YQ
1676 --with-babeltrace include babeltrace support (auto/yes/no)
1677 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1678 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
9f1528a1 1679 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
ccb1ba62
CB
1680 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1681 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1682 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
9f1528a1 1683 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
bec39cab
AC
1684
1685Some influential environment variables:
1686 CC C compiler command
1687 CFLAGS C compiler flags
1688 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1689 nonstandard directory <lib dir>
81ecdfbb 1690 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1691 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1692 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1693 CXX C++ compiler command
1694 CXXFLAGS C++ compiler flags
bec39cab 1695 CPP C preprocessor
f06e05e0
JK
1696 MAKEINFO Parent configure detects if it is of sufficient version.
1697 MAKEINFOFLAGS
1698 Parameters for MAKEINFO.
f6720b1c
AM
1699 PKG_CONFIG path to pkg-config utility
1700 PKG_CONFIG_PATH
1701 directories to add to pkg-config's search path
1702 PKG_CONFIG_LIBDIR
1703 path overriding pkg-config's built-in search path
1704 DEBUGINFOD_CFLAGS
1705 C compiler flags for DEBUGINFOD, overriding pkg-config
1706 DEBUGINFOD_LIBS
1707 linker flags for DEBUGINFOD, overriding pkg-config
d0ac1c44
SM
1708 YACC The `Yet Another Compiler Compiler' implementation to use.
1709 Defaults to the first program found out of: `bison -y', `byacc',
1710 `yacc'.
81ecdfbb
RW
1711 YFLAGS The list of arguments that will be passed by default to $YACC.
1712 This script will default YFLAGS to the empty string to avoid a
1713 default value of `-d' given by some make applications.
1714 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1715
1716Use these variables to override the choices made by `configure' or to help
1717it to find libraries and programs with nonstandard names/locations.
1718
81ecdfbb 1719Report bugs to the package provider.
bec39cab 1720_ACEOF
81ecdfbb 1721ac_status=$?
bec39cab
AC
1722fi
1723
1724if test "$ac_init_help" = "recursive"; then
1725 # If there are subdirs, report their specific --help.
bec39cab 1726 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1727 test -d "$ac_dir" ||
1728 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1729 continue
bec39cab
AC
1730 ac_builddir=.
1731
81ecdfbb
RW
1732case "$ac_dir" in
1733.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1734*)
1735 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1736 # A ".." for each directory in $ac_dir_suffix.
1737 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1738 case $ac_top_builddir_sub in
1739 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1740 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1741 esac ;;
1742esac
1743ac_abs_top_builddir=$ac_pwd
1744ac_abs_builddir=$ac_pwd$ac_dir_suffix
1745# for backward compatibility:
1746ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1747
1748case $srcdir in
81ecdfbb 1749 .) # We are building in place.
bec39cab 1750 ac_srcdir=.
81ecdfbb
RW
1751 ac_top_srcdir=$ac_top_builddir_sub
1752 ac_abs_top_srcdir=$ac_pwd ;;
1753 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1754 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1755 ac_top_srcdir=$srcdir
1756 ac_abs_top_srcdir=$srcdir ;;
1757 *) # Relative name.
1758 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1759 ac_top_srcdir=$ac_top_build_prefix$srcdir
1760 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1761esac
81ecdfbb 1762ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1763
81ecdfbb
RW
1764 cd "$ac_dir" || { ac_status=$?; continue; }
1765 # Check for guested configure.
1766 if test -f "$ac_srcdir/configure.gnu"; then
1767 echo &&
1768 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1769 elif test -f "$ac_srcdir/configure"; then
1770 echo &&
1771 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1772 else
81ecdfbb
RW
1773 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1774 fi || ac_status=$?
1775 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1776 done
1777fi
1778
81ecdfbb 1779test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1780if $ac_init_version; then
1781 cat <<\_ACEOF
81ecdfbb 1782configure
d0ac1c44 1783generated by GNU Autoconf 2.69
bec39cab 1784
d0ac1c44 1785Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1786This configure script is free software; the Free Software Foundation
1787gives unlimited permission to copy, distribute and modify it.
1788_ACEOF
81ecdfbb 1789 exit
bec39cab 1790fi
bec39cab 1791
81ecdfbb
RW
1792## ------------------------ ##
1793## Autoconf initialization. ##
1794## ------------------------ ##
bec39cab 1795
81ecdfbb
RW
1796# ac_fn_c_try_compile LINENO
1797# --------------------------
1798# Try to compile conftest.$ac_ext, and return whether this succeeded.
1799ac_fn_c_try_compile ()
1800{
1801 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1802 rm -f conftest.$ac_objext
1803 if { { ac_try="$ac_compile"
1804case "(($ac_try" in
1805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1806 *) ac_try_echo=$ac_try;;
1807esac
1808eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1809$as_echo "$ac_try_echo"; } >&5
1810 (eval "$ac_compile") 2>conftest.err
1811 ac_status=$?
1812 if test -s conftest.err; then
1813 grep -v '^ *+' conftest.err >conftest.er1
1814 cat conftest.er1 >&5
1815 mv -f conftest.er1 conftest.err
1816 fi
1817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1818 test $ac_status = 0; } && {
1819 test -z "$ac_c_werror_flag" ||
1820 test ! -s conftest.err
1821 } && test -s conftest.$ac_objext; then :
1822 ac_retval=0
1823else
1824 $as_echo "$as_me: failed program was:" >&5
1825sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1826
81ecdfbb
RW
1827 ac_retval=1
1828fi
d0ac1c44
SM
1829 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1830 as_fn_set_status $ac_retval
81ecdfbb
RW
1831
1832} # ac_fn_c_try_compile
1833
3bc3d82a
PA
1834# ac_fn_cxx_try_compile LINENO
1835# ----------------------------
1836# Try to compile conftest.$ac_ext, and return whether this succeeded.
1837ac_fn_cxx_try_compile ()
1838{
1839 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1840 rm -f conftest.$ac_objext
1841 if { { ac_try="$ac_compile"
1842case "(($ac_try" in
1843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1844 *) ac_try_echo=$ac_try;;
1845esac
1846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1847$as_echo "$ac_try_echo"; } >&5
1848 (eval "$ac_compile") 2>conftest.err
1849 ac_status=$?
1850 if test -s conftest.err; then
1851 grep -v '^ *+' conftest.err >conftest.er1
1852 cat conftest.er1 >&5
1853 mv -f conftest.er1 conftest.err
1854 fi
1855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1856 test $ac_status = 0; } && {
1857 test -z "$ac_cxx_werror_flag" ||
1858 test ! -s conftest.err
1859 } && test -s conftest.$ac_objext; then :
1860 ac_retval=0
1861else
1862 $as_echo "$as_me: failed program was:" >&5
1863sed 's/^/| /' conftest.$ac_ext >&5
1864
1865 ac_retval=1
1866fi
d0ac1c44
SM
1867 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1868 as_fn_set_status $ac_retval
3bc3d82a
PA
1869
1870} # ac_fn_cxx_try_compile
1871
81ecdfbb
RW
1872# ac_fn_c_try_cpp LINENO
1873# ----------------------
1874# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1875ac_fn_c_try_cpp ()
bec39cab 1876{
81ecdfbb
RW
1877 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1878 if { { ac_try="$ac_cpp conftest.$ac_ext"
1879case "(($ac_try" in
1880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881 *) ac_try_echo=$ac_try;;
1882esac
1883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884$as_echo "$ac_try_echo"; } >&5
1885 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1886 ac_status=$?
1887 if test -s conftest.err; then
1888 grep -v '^ *+' conftest.err >conftest.er1
1889 cat conftest.er1 >&5
1890 mv -f conftest.er1 conftest.err
1891 fi
1892 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1893 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1894 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1895 test ! -s conftest.err
1896 }; then :
1897 ac_retval=0
1898else
1899 $as_echo "$as_me: failed program was:" >&5
1900sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1901
81ecdfbb
RW
1902 ac_retval=1
1903fi
d0ac1c44
SM
1904 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1905 as_fn_set_status $ac_retval
bec39cab 1906
81ecdfbb 1907} # ac_fn_c_try_cpp
bec39cab 1908
81ecdfbb
RW
1909# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1910# -------------------------------------------------------
1911# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1912# the include files in INCLUDES and setting the cache variable VAR
1913# accordingly.
1914ac_fn_c_check_header_mongrel ()
1915{
1916 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1917 if eval \${$3+:} false; then :
81ecdfbb
RW
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1920if eval \${$3+:} false; then :
81ecdfbb
RW
1921 $as_echo_n "(cached) " >&6
1922fi
1923eval ac_res=\$$3
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925$as_echo "$ac_res" >&6; }
1926else
1927 # Is the header compilable?
1928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1929$as_echo_n "checking $2 usability... " >&6; }
1930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1931/* end confdefs.h. */
1932$4
1933#include <$2>
1934_ACEOF
1935if ac_fn_c_try_compile "$LINENO"; then :
1936 ac_header_compiler=yes
1937else
1938 ac_header_compiler=no
1939fi
1940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1942$as_echo "$ac_header_compiler" >&6; }
bec39cab 1943
81ecdfbb
RW
1944# Is the header present?
1945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1946$as_echo_n "checking $2 presence... " >&6; }
1947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949#include <$2>
1950_ACEOF
1951if ac_fn_c_try_cpp "$LINENO"; then :
1952 ac_header_preproc=yes
1953else
1954 ac_header_preproc=no
1955fi
d0ac1c44 1956rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1958$as_echo "$ac_header_preproc" >&6; }
bec39cab 1959
81ecdfbb
RW
1960# So? What about this header?
1961case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1962 yes:no: )
1963 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1964$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1965 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1966$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1967 ;;
1968 no:yes:* )
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1970$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1972$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1974$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1975 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1976$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1978$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1979 ;;
1980esac
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1982$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1983if eval \${$3+:} false; then :
81ecdfbb
RW
1984 $as_echo_n "(cached) " >&6
1985else
1986 eval "$3=\$ac_header_compiler"
1987fi
1988eval ac_res=\$$3
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1990$as_echo "$ac_res" >&6; }
1991fi
d0ac1c44 1992 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1993
81ecdfbb 1994} # ac_fn_c_check_header_mongrel
bec39cab 1995
81ecdfbb
RW
1996# ac_fn_c_try_run LINENO
1997# ----------------------
1998# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1999# that executables *can* be run.
2000ac_fn_c_try_run ()
2001{
2002 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2003 if { { ac_try="$ac_link"
2004case "(($ac_try" in
2005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2006 *) ac_try_echo=$ac_try;;
2007esac
2008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2009$as_echo "$ac_try_echo"; } >&5
2010 (eval "$ac_link") 2>&5
2011 ac_status=$?
2012 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2013 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2014 { { case "(($ac_try" in
2015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2016 *) ac_try_echo=$ac_try;;
2017esac
2018eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2019$as_echo "$ac_try_echo"; } >&5
2020 (eval "$ac_try") 2>&5
2021 ac_status=$?
2022 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2023 test $ac_status = 0; }; }; then :
2024 ac_retval=0
2025else
2026 $as_echo "$as_me: program exited with status $ac_status" >&5
2027 $as_echo "$as_me: failed program was:" >&5
2028sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2029
81ecdfbb
RW
2030 ac_retval=$ac_status
2031fi
2032 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2033 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2034 as_fn_set_status $ac_retval
bec39cab 2035
81ecdfbb 2036} # ac_fn_c_try_run
bec39cab 2037
81ecdfbb
RW
2038# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2039# -------------------------------------------------------
2040# Tests whether HEADER exists and can be compiled using the include files in
2041# INCLUDES, setting the cache variable VAR accordingly.
2042ac_fn_c_check_header_compile ()
2043{
2044 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2046$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2047if eval \${$3+:} false; then :
81ecdfbb
RW
2048 $as_echo_n "(cached) " >&6
2049else
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053#include <$2>
bec39cab 2054_ACEOF
81ecdfbb
RW
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 eval "$3=yes"
2057else
2058 eval "$3=no"
2059fi
2060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2061fi
2062eval ac_res=\$$3
2063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2064$as_echo "$ac_res" >&6; }
d0ac1c44 2065 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2066
81ecdfbb 2067} # ac_fn_c_check_header_compile
bec39cab 2068
2974be62
AM
2069# ac_fn_c_try_link LINENO
2070# -----------------------
2071# Try to link conftest.$ac_ext, and return whether this succeeded.
2072ac_fn_c_try_link ()
2073{
2074 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2075 rm -f conftest.$ac_objext conftest$ac_exeext
2076 if { { ac_try="$ac_link"
2077case "(($ac_try" in
2078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2079 *) ac_try_echo=$ac_try;;
2080esac
2081eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2082$as_echo "$ac_try_echo"; } >&5
2083 (eval "$ac_link") 2>conftest.err
2084 ac_status=$?
2085 if test -s conftest.err; then
2086 grep -v '^ *+' conftest.err >conftest.er1
2087 cat conftest.er1 >&5
2088 mv -f conftest.er1 conftest.err
2089 fi
2090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2091 test $ac_status = 0; } && {
2092 test -z "$ac_c_werror_flag" ||
2093 test ! -s conftest.err
2094 } && test -s conftest$ac_exeext && {
2095 test "$cross_compiling" = yes ||
d0ac1c44 2096 test -x conftest$ac_exeext
2974be62
AM
2097 }; then :
2098 ac_retval=0
2099else
2100 $as_echo "$as_me: failed program was:" >&5
2101sed 's/^/| /' conftest.$ac_ext >&5
2102
2103 ac_retval=1
2104fi
2105 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2106 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2107 # interfere with the next link command; also delete a directory that is
2108 # left behind by Apple's compiler. We do this before executing the actions.
2109 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2110 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2111 as_fn_set_status $ac_retval
2974be62
AM
2112
2113} # ac_fn_c_try_link
2114
81ecdfbb
RW
2115# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2116# --------------------------------------------
2117# Tries to find the compile-time value of EXPR in a program that includes
2118# INCLUDES, setting VAR accordingly. Returns whether the value could be
2119# computed
2120ac_fn_c_compute_int ()
2121{
2122 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2123 if test "$cross_compiling" = yes; then
2124 # Depending upon the size, compute the lo and hi bounds.
2125cat 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_lo=0 ac_mid=0
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_hi=$ac_mid; break
2158else
2159 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2160 if test $ac_lo -le $ac_mid; then
2161 ac_lo= ac_hi=
2162 break
2163 fi
2164 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2165fi
81ecdfbb
RW
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167 done
c906108c 2168else
81ecdfbb
RW
2169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2170/* end confdefs.h. */
2171$4
2172int
2173main ()
2174{
2175static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2176test_array [0] = 0;
2177return test_array [0];
bec39cab 2178
81ecdfbb
RW
2179 ;
2180 return 0;
2181}
2182_ACEOF
2183if ac_fn_c_try_compile "$LINENO"; then :
2184 ac_hi=-1 ac_mid=-1
2185 while :; do
2186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187/* end confdefs.h. */
2188$4
2189int
2190main ()
2191{
2192static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2193test_array [0] = 0;
2194return test_array [0];
bec39cab 2195
81ecdfbb
RW
2196 ;
2197 return 0;
2198}
2199_ACEOF
2200if ac_fn_c_try_compile "$LINENO"; then :
2201 ac_lo=$ac_mid; break
2202else
2203 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2204 if test $ac_mid -le $ac_hi; then
2205 ac_lo= ac_hi=
2206 break
2207 fi
2208 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2209fi
2210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2211 done
2212else
2213 ac_lo= ac_hi=
2214fi
2215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2216fi
2217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2218# Binary search between lo and hi bounds.
2219while test "x$ac_lo" != "x$ac_hi"; do
2220 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2222/* end confdefs.h. */
2223$4
2224int
2225main ()
2226{
2227static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2228test_array [0] = 0;
2229return test_array [0];
bec39cab 2230
81ecdfbb
RW
2231 ;
2232 return 0;
2233}
2234_ACEOF
2235if ac_fn_c_try_compile "$LINENO"; then :
2236 ac_hi=$ac_mid
2237else
2238 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2239fi
2240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2241done
2242case $ac_lo in #((
2243?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2244'') ac_retval=1 ;;
2245esac
2246 else
2247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h. */
2249$4
2250static long int longval () { return $2; }
2251static unsigned long int ulongval () { return $2; }
2252#include <stdio.h>
2253#include <stdlib.h>
2254int
2255main ()
2256{
bec39cab 2257
81ecdfbb
RW
2258 FILE *f = fopen ("conftest.val", "w");
2259 if (! f)
2260 return 1;
2261 if (($2) < 0)
2262 {
2263 long int i = longval ();
2264 if (i != ($2))
2265 return 1;
2266 fprintf (f, "%ld", i);
2267 }
2268 else
2269 {
2270 unsigned long int i = ulongval ();
2271 if (i != ($2))
2272 return 1;
2273 fprintf (f, "%lu", i);
2274 }
2275 /* Do not output a trailing newline, as this causes \r\n confusion
2276 on some platforms. */
2277 return ferror (f) || fclose (f) != 0;
bec39cab 2278
81ecdfbb
RW
2279 ;
2280 return 0;
2281}
2282_ACEOF
2283if ac_fn_c_try_run "$LINENO"; then :
2284 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2285else
2286 ac_retval=1
2287fi
2288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2289 conftest.$ac_objext conftest.beam conftest.$ac_ext
2290rm -f conftest.val
bec39cab 2291
81ecdfbb 2292 fi
d0ac1c44
SM
2293 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2294 as_fn_set_status $ac_retval
bec39cab 2295
81ecdfbb 2296} # ac_fn_c_compute_int
bec39cab 2297
55a8c076
YQ
2298# ac_fn_c_check_func LINENO FUNC VAR
2299# ----------------------------------
2300# Tests whether FUNC exists, setting the cache variable VAR accordingly
2301ac_fn_c_check_func ()
81ecdfbb
RW
2302{
2303 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2305$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2306if eval \${$3+:} false; then :
81ecdfbb
RW
2307 $as_echo_n "(cached) " >&6
2308else
81ecdfbb
RW
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
55a8c076
YQ
2311/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2312 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2313#define $2 innocuous_$2
2314
2315/* System header to define __stub macros and hopefully few prototypes,
2316 which can conflict with char $2 (); below.
2317 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2318 <limits.h> exists even on freestanding compilers. */
2319
2320#ifdef __STDC__
2321# include <limits.h>
2322#else
2323# include <assert.h>
2324#endif
2325
2326#undef $2
2327
2328/* Override any GCC internal prototype to avoid an error.
2329 Use char because int might match the return type of a GCC
2330 builtin and then its argument prototype would still apply. */
2331#ifdef __cplusplus
2332extern "C"
2333#endif
2334char $2 ();
2335/* The GNU C library defines this for functions which it implements
2336 to always fail with ENOSYS. Some functions are actually named
2337 something starting with __ and the normal name is an alias. */
2338#if defined __stub_$2 || defined __stub___$2
2339choke me
2340#endif
2341
2342int
2343main ()
2344{
2345return $2 ();
2346 ;
2347 return 0;
2348}
2349_ACEOF
2350if ac_fn_c_try_link "$LINENO"; then :
2351 eval "$3=yes"
2352else
2353 eval "$3=no"
2354fi
2355rm -f core conftest.err conftest.$ac_objext \
2356 conftest$ac_exeext conftest.$ac_ext
2357fi
2358eval ac_res=\$$3
2359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2360$as_echo "$ac_res" >&6; }
d0ac1c44 2361 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2362
2363} # ac_fn_c_check_func
2364
07697489
PA
2365# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2366# -------------------------------------------
2367# Tests whether TYPE exists after having included INCLUDES, setting cache
2368# variable VAR accordingly.
2369ac_fn_c_check_type ()
2370{
2371 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2373$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2374if eval \${$3+:} false; then :
07697489
PA
2375 $as_echo_n "(cached) " >&6
2376else
2377 eval "$3=no"
2378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379/* end confdefs.h. */
2380$4
2381int
2382main ()
2383{
2384if (sizeof ($2))
2385 return 0;
2386 ;
2387 return 0;
2388}
2389_ACEOF
2390if ac_fn_c_try_compile "$LINENO"; then :
2391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392/* end confdefs.h. */
2393$4
2394int
2395main ()
2396{
2397if (sizeof (($2)))
2398 return 0;
2399 ;
2400 return 0;
2401}
2402_ACEOF
2403if ac_fn_c_try_compile "$LINENO"; then :
2404
2405else
2406 eval "$3=yes"
2407fi
2408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409fi
2410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2411fi
2412eval ac_res=\$$3
2413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2414$as_echo "$ac_res" >&6; }
d0ac1c44 2415 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2416
2417} # ac_fn_c_check_type
2418
f6720b1c
AM
2419# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2420# ---------------------------------------------
2421# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2422# accordingly.
2423ac_fn_c_check_decl ()
2424{
2425 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2426 as_decl_name=`echo $2|sed 's/ *(.*//'`
2427 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2429$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2430if eval \${$3+:} false; then :
2431 $as_echo_n "(cached) " >&6
2432else
2433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434/* end confdefs.h. */
2435$4
2436int
2437main ()
2438{
2439#ifndef $as_decl_name
2440#ifdef __cplusplus
2441 (void) $as_decl_use;
2442#else
2443 (void) $as_decl_name;
2444#endif
2445#endif
2446
2447 ;
2448 return 0;
2449}
2450_ACEOF
2451if ac_fn_c_try_compile "$LINENO"; then :
2452 eval "$3=yes"
2453else
2454 eval "$3=no"
2455fi
2456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2457fi
2458eval ac_res=\$$3
2459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2460$as_echo "$ac_res" >&6; }
2461 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2462
2463} # ac_fn_c_check_decl
2464
05ea2a05
TT
2465# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2466# ----------------------------------------------------
2467# Tries to find if the field MEMBER exists in type AGGR, after including
2468# INCLUDES, setting cache variable VAR accordingly.
2469ac_fn_c_check_member ()
2470{
2471 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2473$as_echo_n "checking for $2.$3... " >&6; }
2474if eval \${$4+:} false; then :
2475 $as_echo_n "(cached) " >&6
2476else
2477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2478/* end confdefs.h. */
2479$5
2480int
2481main ()
2482{
2483static $2 ac_aggr;
2484if (ac_aggr.$3)
2485return 0;
2486 ;
2487 return 0;
2488}
2489_ACEOF
2490if ac_fn_c_try_compile "$LINENO"; then :
2491 eval "$4=yes"
2492else
2493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2494/* end confdefs.h. */
2495$5
2496int
2497main ()
2498{
2499static $2 ac_aggr;
2500if (sizeof ac_aggr.$3)
2501return 0;
2502 ;
2503 return 0;
2504}
2505_ACEOF
2506if ac_fn_c_try_compile "$LINENO"; then :
2507 eval "$4=yes"
2508else
2509 eval "$4=no"
2510fi
2511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2512fi
2513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2514fi
2515eval ac_res=\$$4
2516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2517$as_echo "$ac_res" >&6; }
2518 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2519
2520} # ac_fn_c_check_member
2521
f35d5ade
TT
2522# ac_fn_cxx_try_link LINENO
2523# -------------------------
2524# Try to link conftest.$ac_ext, and return whether this succeeded.
2525ac_fn_cxx_try_link ()
2526{
2527 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528 rm -f conftest.$ac_objext conftest$ac_exeext
2529 if { { ac_try="$ac_link"
2530case "(($ac_try" in
2531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2532 *) ac_try_echo=$ac_try;;
2533esac
2534eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2535$as_echo "$ac_try_echo"; } >&5
2536 (eval "$ac_link") 2>conftest.err
2537 ac_status=$?
2538 if test -s conftest.err; then
2539 grep -v '^ *+' conftest.err >conftest.er1
2540 cat conftest.er1 >&5
2541 mv -f conftest.er1 conftest.err
2542 fi
2543 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2544 test $ac_status = 0; } && {
2545 test -z "$ac_cxx_werror_flag" ||
2546 test ! -s conftest.err
2547 } && test -s conftest$ac_exeext && {
2548 test "$cross_compiling" = yes ||
2549 test -x conftest$ac_exeext
2550 }; then :
2551 ac_retval=0
2552else
2553 $as_echo "$as_me: failed program was:" >&5
2554sed 's/^/| /' conftest.$ac_ext >&5
2555
2556 ac_retval=1
2557fi
2558 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2559 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2560 # interfere with the next link command; also delete a directory that is
2561 # left behind by Apple's compiler. We do this before executing the actions.
2562 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2563 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2564 as_fn_set_status $ac_retval
2565
2566} # ac_fn_cxx_try_link
21987b9c
TT
2567
2568# ac_fn_cxx_check_func LINENO FUNC VAR
2569# ------------------------------------
2570# Tests whether FUNC exists, setting the cache variable VAR accordingly
2571ac_fn_cxx_check_func ()
2572{
2573 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2575$as_echo_n "checking for $2... " >&6; }
2576if eval \${$3+:} false; then :
2577 $as_echo_n "(cached) " >&6
2578else
2579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2580/* end confdefs.h. */
2581/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2582 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2583#define $2 innocuous_$2
2584
2585/* System header to define __stub macros and hopefully few prototypes,
2586 which can conflict with char $2 (); below.
2587 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2588 <limits.h> exists even on freestanding compilers. */
2589
2590#ifdef __STDC__
2591# include <limits.h>
2592#else
2593# include <assert.h>
2594#endif
2595
2596#undef $2
2597
2598/* Override any GCC internal prototype to avoid an error.
2599 Use char because int might match the return type of a GCC
2600 builtin and then its argument prototype would still apply. */
2601#ifdef __cplusplus
2602extern "C"
2603#endif
2604char $2 ();
2605/* The GNU C library defines this for functions which it implements
2606 to always fail with ENOSYS. Some functions are actually named
2607 something starting with __ and the normal name is an alias. */
2608#if defined __stub_$2 || defined __stub___$2
2609choke me
2610#endif
2611
2612int
2613main ()
2614{
2615return $2 ();
2616 ;
2617 return 0;
2618}
2619_ACEOF
2620if ac_fn_cxx_try_link "$LINENO"; then :
2621 eval "$3=yes"
2622else
2623 eval "$3=no"
2624fi
2625rm -f core conftest.err conftest.$ac_objext \
2626 conftest$ac_exeext conftest.$ac_ext
2627fi
2628eval ac_res=\$$3
2629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2630$as_echo "$ac_res" >&6; }
2631 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2632
2633} # ac_fn_cxx_check_func
81ecdfbb
RW
2634cat >config.log <<_ACEOF
2635This file contains any messages produced by compilers while
2636running configure, to aid debugging if configure makes a mistake.
d5af19ba 2637
81ecdfbb 2638It was created by $as_me, which was
d0ac1c44 2639generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2640
81ecdfbb 2641 $ $0 $@
413ccac7 2642
81ecdfbb
RW
2643_ACEOF
2644exec 5>>config.log
2645{
2646cat <<_ASUNAME
2647## --------- ##
2648## Platform. ##
2649## --------- ##
413ccac7 2650
81ecdfbb
RW
2651hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2652uname -m = `(uname -m) 2>/dev/null || echo unknown`
2653uname -r = `(uname -r) 2>/dev/null || echo unknown`
2654uname -s = `(uname -s) 2>/dev/null || echo unknown`
2655uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2656
81ecdfbb
RW
2657/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2658/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2659
81ecdfbb
RW
2660/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2661/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2662/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2663/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2664/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2665/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2666/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2667
81ecdfbb 2668_ASUNAME
bec39cab 2669
bec39cab
AC
2670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2671for as_dir in $PATH
2672do
2673 IFS=$as_save_IFS
2674 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2675 $as_echo "PATH: $as_dir"
2676 done
2677IFS=$as_save_IFS
bec39cab 2678
81ecdfbb 2679} >&5
bec39cab 2680
81ecdfbb 2681cat >&5 <<_ACEOF
bec39cab 2682
bec39cab 2683
81ecdfbb
RW
2684## ----------- ##
2685## Core tests. ##
2686## ----------- ##
2687
2688_ACEOF
2689
2690
2691# Keep a trace of the command line.
2692# Strip out --no-create and --no-recursion so they do not pile up.
2693# Strip out --silent because we don't want to record it for future runs.
2694# Also quote any args containing shell meta-characters.
2695# Make two passes to allow for proper duplicate-argument suppression.
2696ac_configure_args=
2697ac_configure_args0=
2698ac_configure_args1=
2699ac_must_keep_next=false
2700for ac_pass in 1 2
2701do
2702 for ac_arg
2703 do
2704 case $ac_arg in
2705 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2706 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2707 | -silent | --silent | --silen | --sile | --sil)
2708 continue ;;
2709 *\'*)
2710 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2711 esac
2712 case $ac_pass in
2713 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2714 2)
2715 as_fn_append ac_configure_args1 " '$ac_arg'"
2716 if test $ac_must_keep_next = true; then
2717 ac_must_keep_next=false # Got value, back to normal.
2718 else
2719 case $ac_arg in
2720 *=* | --config-cache | -C | -disable-* | --disable-* \
2721 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2722 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2723 | -with-* | --with-* | -without-* | --without-* | --x)
2724 case "$ac_configure_args0 " in
2725 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2726 esac
2727 ;;
2728 -* ) ac_must_keep_next=true ;;
2729 esac
2730 fi
2731 as_fn_append ac_configure_args " '$ac_arg'"
2732 ;;
2733 esac
2734 done
2735done
2736{ ac_configure_args0=; unset ac_configure_args0;}
2737{ ac_configure_args1=; unset ac_configure_args1;}
2738
2739# When interrupted or exit'd, cleanup temporary files, and complete
2740# config.log. We remove comments because anyway the quotes in there
2741# would cause problems or look ugly.
2742# WARNING: Use '\'' to represent an apostrophe within the trap.
2743# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2744trap 'exit_status=$?
2745 # Save into config.log some information that might help in debugging.
2746 {
2747 echo
2748
d0ac1c44 2749 $as_echo "## ---------------- ##
81ecdfbb 2750## Cache variables. ##
d0ac1c44 2751## ---------------- ##"
81ecdfbb
RW
2752 echo
2753 # The following way of writing the cache mishandles newlines in values,
2754(
2755 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2756 eval ac_val=\$$ac_var
2757 case $ac_val in #(
2758 *${as_nl}*)
2759 case $ac_var in #(
2760 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2761$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2762 esac
2763 case $ac_var in #(
2764 _ | IFS | as_nl) ;; #(
2765 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2766 *) { eval $ac_var=; unset $ac_var;} ;;
2767 esac ;;
2768 esac
2769 done
2770 (set) 2>&1 |
2771 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2772 *${as_nl}ac_space=\ *)
2773 sed -n \
2774 "s/'\''/'\''\\\\'\'''\''/g;
2775 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2776 ;; #(
2777 *)
2778 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2779 ;;
2780 esac |
2781 sort
2782)
2783 echo
2784
d0ac1c44 2785 $as_echo "## ----------------- ##
81ecdfbb 2786## Output variables. ##
d0ac1c44 2787## ----------------- ##"
81ecdfbb
RW
2788 echo
2789 for ac_var in $ac_subst_vars
2790 do
2791 eval ac_val=\$$ac_var
2792 case $ac_val in
2793 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2794 esac
2795 $as_echo "$ac_var='\''$ac_val'\''"
2796 done | sort
2797 echo
2798
2799 if test -n "$ac_subst_files"; then
d0ac1c44 2800 $as_echo "## ------------------- ##
81ecdfbb 2801## File substitutions. ##
d0ac1c44 2802## ------------------- ##"
81ecdfbb
RW
2803 echo
2804 for ac_var in $ac_subst_files
2805 do
2806 eval ac_val=\$$ac_var
2807 case $ac_val in
2808 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2809 esac
2810 $as_echo "$ac_var='\''$ac_val'\''"
2811 done | sort
2812 echo
2813 fi
2814
2815 if test -s confdefs.h; then
d0ac1c44 2816 $as_echo "## ----------- ##
81ecdfbb 2817## confdefs.h. ##
d0ac1c44 2818## ----------- ##"
81ecdfbb
RW
2819 echo
2820 cat confdefs.h
2821 echo
2822 fi
2823 test "$ac_signal" != 0 &&
2824 $as_echo "$as_me: caught signal $ac_signal"
2825 $as_echo "$as_me: exit $exit_status"
2826 } >&5
2827 rm -f core *.core core.conftest.* &&
2828 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2829 exit $exit_status
2830' 0
2831for ac_signal in 1 2 13 15; do
2832 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2833done
2834ac_signal=0
2835
2836# confdefs.h avoids OS command line length limits that DEFS can exceed.
2837rm -f -r conftest* confdefs.h
2838
2839$as_echo "/* confdefs.h */" > confdefs.h
2840
2841# Predefined preprocessor variables.
2842
2843cat >>confdefs.h <<_ACEOF
2844#define PACKAGE_NAME "$PACKAGE_NAME"
2845_ACEOF
2846
2847cat >>confdefs.h <<_ACEOF
2848#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2849_ACEOF
2850
2851cat >>confdefs.h <<_ACEOF
2852#define PACKAGE_VERSION "$PACKAGE_VERSION"
2853_ACEOF
2854
2855cat >>confdefs.h <<_ACEOF
2856#define PACKAGE_STRING "$PACKAGE_STRING"
2857_ACEOF
2858
2859cat >>confdefs.h <<_ACEOF
2860#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2861_ACEOF
2862
2863cat >>confdefs.h <<_ACEOF
2864#define PACKAGE_URL "$PACKAGE_URL"
2865_ACEOF
2866
2867
2868# Let the site file select an alternate cache file if it wants to.
2869# Prefer an explicitly selected file to automatically selected ones.
2870ac_site_file1=NONE
2871ac_site_file2=NONE
2872if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2873 # We do not want a PATH search for config.site.
2874 case $CONFIG_SITE in #((
2875 -*) ac_site_file1=./$CONFIG_SITE;;
2876 */*) ac_site_file1=$CONFIG_SITE;;
2877 *) ac_site_file1=./$CONFIG_SITE;;
2878 esac
81ecdfbb
RW
2879elif test "x$prefix" != xNONE; then
2880 ac_site_file1=$prefix/share/config.site
2881 ac_site_file2=$prefix/etc/config.site
2882else
2883 ac_site_file1=$ac_default_prefix/share/config.site
2884 ac_site_file2=$ac_default_prefix/etc/config.site
2885fi
2886for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2887do
2888 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2889 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2890 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2891$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2892 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2893 . "$ac_site_file" \
2894 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2896as_fn_error $? "failed to load site script $ac_site_file
2897See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2898 fi
2899done
2900
2901if test -r "$cache_file"; then
d0ac1c44
SM
2902 # Some versions of bash will fail to source /dev/null (special files
2903 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2904 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2906$as_echo "$as_me: loading cache $cache_file" >&6;}
2907 case $cache_file in
2908 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2909 *) . "./$cache_file";;
2910 esac
2911 fi
2912else
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2914$as_echo "$as_me: creating cache $cache_file" >&6;}
2915 >$cache_file
bec39cab
AC
2916fi
2917
d0ac1c44
SM
2918as_fn_append ac_header_list " stdlib.h"
2919as_fn_append ac_header_list " unistd.h"
2920as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2921# Check that the precious variables saved in the cache have kept the same
2922# value.
2923ac_cache_corrupted=false
2924for ac_var in $ac_precious_vars; do
2925 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2926 eval ac_new_set=\$ac_env_${ac_var}_set
2927 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2928 eval ac_new_val=\$ac_env_${ac_var}_value
2929 case $ac_old_set,$ac_new_set in
2930 set,)
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2932$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2933 ac_cache_corrupted=: ;;
2934 ,set)
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2936$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2937 ac_cache_corrupted=: ;;
2938 ,);;
2939 *)
2940 if test "x$ac_old_val" != "x$ac_new_val"; then
2941 # differences in whitespace do not lead to failure.
2942 ac_old_val_w=`echo x $ac_old_val`
2943 ac_new_val_w=`echo x $ac_new_val`
2944 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2946$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2947 ac_cache_corrupted=:
2948 else
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2950$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2951 eval $ac_var=\$ac_old_val
2952 fi
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2954$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2956$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2957 fi;;
2958 esac
2959 # Pass precious variables to config.status.
2960 if test "$ac_new_set" = set; then
2961 case $ac_new_val in
2962 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2963 *) ac_arg=$ac_var=$ac_new_val ;;
2964 esac
2965 case " $ac_configure_args " in
2966 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2967 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2968 esac
2969 fi
2970done
2971if $ac_cache_corrupted; then
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2975$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2976 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2977fi
2978## -------------------- ##
2979## Main body of script. ##
2980## -------------------- ##
2981
2982ac_ext=c
2983ac_cpp='$CPP $CPPFLAGS'
2984ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2985ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2986ac_compiler_gnu=$ac_cv_c_compiler_gnu
2987
2988
2989
2990
2991
5593a99a 2992
81ecdfbb
RW
2993ac_config_headers="$ac_config_headers config.h:config.in"
2994
2995
2996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2997$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2998 # Check whether --enable-maintainer-mode was given.
2999if test "${enable_maintainer_mode+set}" = set; then :
3000 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3001else
3002 USE_MAINTAINER_MODE=no
3003fi
3004
3005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3006$as_echo "$USE_MAINTAINER_MODE" >&6; }
3007 if test $USE_MAINTAINER_MODE = yes; then
3008 MAINTAINER_MODE_TRUE=
3009 MAINTAINER_MODE_FALSE='#'
3010else
3011 MAINTAINER_MODE_TRUE='#'
3012 MAINTAINER_MODE_FALSE=
3013fi
3014
3015 MAINT=$MAINTAINER_MODE_TRUE
3016
3017
3018
3019ac_ext=c
3020ac_cpp='$CPP $CPPFLAGS'
3021ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3022ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3023ac_compiler_gnu=$ac_cv_c_compiler_gnu
3024if test -n "$ac_tool_prefix"; then
3025 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3026set dummy ${ac_tool_prefix}gcc; ac_word=$2
3027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3028$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3029if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3030 $as_echo_n "(cached) " >&6
c906108c
SS
3031else
3032 if test -n "$CC"; then
3033 ac_cv_prog_CC="$CC" # Let the user override the test.
3034else
bec39cab
AC
3035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3036for as_dir in $PATH
3037do
3038 IFS=$as_save_IFS
3039 test -z "$as_dir" && as_dir=.
81ecdfbb 3040 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3041 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3042 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3043 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3044 break 2
3045 fi
3046done
81ecdfbb
RW
3047 done
3048IFS=$as_save_IFS
bec39cab 3049
c906108c
SS
3050fi
3051fi
bec39cab 3052CC=$ac_cv_prog_CC
c906108c 3053if test -n "$CC"; then
81ecdfbb
RW
3054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3055$as_echo "$CC" >&6; }
c906108c 3056else
81ecdfbb
RW
3057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3058$as_echo "no" >&6; }
c906108c
SS
3059fi
3060
81ecdfbb 3061
b4e70030
JB
3062fi
3063if test -z "$ac_cv_prog_CC"; then
3064 ac_ct_CC=$CC
81ecdfbb
RW
3065 # Extract the first word of "gcc", so it can be a program name with args.
3066set dummy gcc; ac_word=$2
3067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3068$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3069if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3070 $as_echo_n "(cached) " >&6
b4e70030
JB
3071else
3072 if test -n "$ac_ct_CC"; then
3073 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3074else
3075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3076for as_dir in $PATH
3077do
3078 IFS=$as_save_IFS
3079 test -z "$as_dir" && as_dir=.
81ecdfbb 3080 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3081 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3082 ac_cv_prog_ac_ct_CC="gcc"
3083 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 3084 break 2
4e8d927d 3085 fi
b4e70030 3086done
81ecdfbb
RW
3087 done
3088IFS=$as_save_IFS
b4e70030
JB
3089
3090fi
3091fi
3092ac_ct_CC=$ac_cv_prog_ac_ct_CC
3093if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3095$as_echo "$ac_ct_CC" >&6; }
b4e70030 3096else
81ecdfbb
RW
3097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3098$as_echo "no" >&6; }
b4e70030
JB
3099fi
3100
81ecdfbb
RW
3101 if test "x$ac_ct_CC" = x; then
3102 CC=""
3103 else
3104 case $cross_compiling:$ac_tool_warned in
3105yes:)
3106{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3107$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3108ac_tool_warned=yes ;;
3109esac
3110 CC=$ac_ct_CC
3111 fi
b4e70030
JB
3112else
3113 CC="$ac_cv_prog_CC"
3114fi
3115
c906108c 3116if test -z "$CC"; then
81ecdfbb
RW
3117 if test -n "$ac_tool_prefix"; then
3118 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3119set dummy ${ac_tool_prefix}cc; ac_word=$2
3120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3121$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3122if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3123 $as_echo_n "(cached) " >&6
c906108c
SS
3124else
3125 if test -n "$CC"; then
3126 ac_cv_prog_CC="$CC" # Let the user override the test.
3127else
bec39cab
AC
3128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3129for as_dir in $PATH
3130do
3131 IFS=$as_save_IFS
3132 test -z "$as_dir" && as_dir=.
81ecdfbb 3133 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3134 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3135 ac_cv_prog_CC="${ac_tool_prefix}cc"
3136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3137 break 2
3138 fi
3139done
81ecdfbb
RW
3140 done
3141IFS=$as_save_IFS
3142
3143fi
3144fi
3145CC=$ac_cv_prog_CC
3146if test -n "$CC"; then
3147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3148$as_echo "$CC" >&6; }
3149else
3150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3151$as_echo "no" >&6; }
3152fi
3153
3154
3155 fi
3156fi
3157if test -z "$CC"; then
3158 # Extract the first word of "cc", so it can be a program name with args.
3159set dummy cc; ac_word=$2
3160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3161$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3162if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3163 $as_echo_n "(cached) " >&6
3164else
3165 if test -n "$CC"; then
3166 ac_cv_prog_CC="$CC" # Let the user override the test.
3167else
3168 ac_prog_rejected=no
3169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3170for as_dir in $PATH
3171do
3172 IFS=$as_save_IFS
3173 test -z "$as_dir" && as_dir=.
3174 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3176 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3177 ac_prog_rejected=yes
3178 continue
3179 fi
3180 ac_cv_prog_CC="cc"
3181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3182 break 2
3183 fi
3184done
3185 done
3186IFS=$as_save_IFS
bec39cab 3187
c906108c
SS
3188if test $ac_prog_rejected = yes; then
3189 # We found a bogon in the path, so make sure we never use it.
3190 set dummy $ac_cv_prog_CC
3191 shift
bec39cab 3192 if test $# != 0; then
c906108c
SS
3193 # We chose a different compiler from the bogus one.
3194 # However, it has the same basename, so the bogon will be chosen
3195 # first if we set CC to just the basename; use the full file name.
3196 shift
bec39cab 3197 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3198 fi
3199fi
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
SS
3209fi
3210
81ecdfbb 3211
bec39cab
AC
3212fi
3213if test -z "$CC"; then
3214 if test -n "$ac_tool_prefix"; then
81ecdfbb 3215 for ac_prog in cl.exe
bec39cab
AC
3216 do
3217 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3218set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3220$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3221if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3222 $as_echo_n "(cached) " >&6
c906108c
SS
3223else
3224 if test -n "$CC"; then
3225 ac_cv_prog_CC="$CC" # Let the user override the test.
3226else
bec39cab
AC
3227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3228for as_dir in $PATH
3229do
3230 IFS=$as_save_IFS
3231 test -z "$as_dir" && as_dir=.
81ecdfbb 3232 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3233 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3234 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3235 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3236 break 2
3237 fi
3238done
81ecdfbb
RW
3239 done
3240IFS=$as_save_IFS
bec39cab 3241
c906108c
SS
3242fi
3243fi
bec39cab 3244CC=$ac_cv_prog_CC
c906108c 3245if test -n "$CC"; then
81ecdfbb
RW
3246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3247$as_echo "$CC" >&6; }
c906108c 3248else
81ecdfbb
RW
3249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3250$as_echo "no" >&6; }
c906108c 3251fi
bec39cab 3252
81ecdfbb 3253
bec39cab
AC
3254 test -n "$CC" && break
3255 done
3256fi
3257if test -z "$CC"; then
3258 ac_ct_CC=$CC
81ecdfbb 3259 for ac_prog in cl.exe
bec39cab
AC
3260do
3261 # Extract the first word of "$ac_prog", so it can be a program name with args.
3262set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3264$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3265if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3266 $as_echo_n "(cached) " >&6
bec39cab
AC
3267else
3268 if test -n "$ac_ct_CC"; then
3269 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3270else
3271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3272for as_dir in $PATH
3273do
3274 IFS=$as_save_IFS
3275 test -z "$as_dir" && as_dir=.
81ecdfbb 3276 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3277 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3278 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3279 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3280 break 2
c906108c 3281 fi
bec39cab 3282done
81ecdfbb
RW
3283 done
3284IFS=$as_save_IFS
bec39cab
AC
3285
3286fi
3287fi
3288ac_ct_CC=$ac_cv_prog_ac_ct_CC
3289if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3291$as_echo "$ac_ct_CC" >&6; }
bec39cab 3292else
81ecdfbb
RW
3293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3294$as_echo "no" >&6; }
c906108c
SS
3295fi
3296
81ecdfbb 3297
bec39cab
AC
3298 test -n "$ac_ct_CC" && break
3299done
c906108c 3300
81ecdfbb
RW
3301 if test "x$ac_ct_CC" = x; then
3302 CC=""
3303 else
3304 case $cross_compiling:$ac_tool_warned in
3305yes:)
3306{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3307$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3308ac_tool_warned=yes ;;
3309esac
3310 CC=$ac_ct_CC
3311 fi
bec39cab
AC
3312fi
3313
3314fi
3315
3316
81ecdfbb
RW
3317test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3318$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3319as_fn_error $? "no acceptable C compiler found in \$PATH
3320See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3321
3322# Provide some information about the compiler.
81ecdfbb
RW
3323$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3324set X $ac_compile
3325ac_compiler=$2
3326for ac_option in --version -v -V -qversion; do
3327 { { ac_try="$ac_compiler $ac_option >&5"
3328case "(($ac_try" in
3329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3330 *) ac_try_echo=$ac_try;;
3331esac
3332eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3333$as_echo "$ac_try_echo"; } >&5
3334 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3335 ac_status=$?
81ecdfbb
RW
3336 if test -s conftest.err; then
3337 sed '10a\
3338... rest of stderr output deleted ...
3339 10q' conftest.err >conftest.er1
3340 cat conftest.er1 >&5
81ecdfbb 3341 fi
d0ac1c44 3342 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3343 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3344 test $ac_status = 0; }
3345done
bec39cab 3346
81ecdfbb 3347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3348/* end confdefs.h. */
3349
3350int
3351main ()
3352{
3353
3354 ;
3355 return 0;
3356}
3357_ACEOF
3358ac_clean_files_save=$ac_clean_files
d0ac1c44 3359ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3360# Try to create an executable without -o first, disregard a.out.
3361# It will help us diagnose broken compilers, and finding out an intuition
3362# of exeext.
d0ac1c44
SM
3363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3364$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3365ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3366
3367# The possible output files:
3368ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3369
3370ac_rmfiles=
3371for ac_file in $ac_files
3372do
3373 case $ac_file in
3374 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3375 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3376 esac
3377done
3378rm -f $ac_rmfiles
3379
3380if { { ac_try="$ac_link_default"
3381case "(($ac_try" in
3382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3383 *) ac_try_echo=$ac_try;;
3384esac
3385eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3386$as_echo "$ac_try_echo"; } >&5
3387 (eval "$ac_link_default") 2>&5
3388 ac_status=$?
3389 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3390 test $ac_status = 0; }; then :
3391 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3392# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3393# in a Makefile. We should not override ac_cv_exeext if it was cached,
3394# so that the user can short-circuit this test for compilers unknown to
3395# Autoconf.
3396for ac_file in $ac_files ''
bec39cab
AC
3397do
3398 test -f "$ac_file" || continue
3399 case $ac_file in
81ecdfbb 3400 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3401 ;;
3402 [ab].out )
3403 # We found the default executable, but exeext='' is most
3404 # certainly right.
3405 break;;
3406 *.* )
81ecdfbb
RW
3407 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3408 then :; else
3409 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3410 fi
3411 # We set ac_cv_exeext here because the later test for it is not
3412 # safe: cross compilers may not add the suffix if given an `-o'
3413 # argument, so we may need to know it at that point already.
3414 # Even if this section looks crufty: it has the advantage of
3415 # actually working.
b4e70030
JB
3416 break;;
3417 * )
3418 break;;
bec39cab
AC
3419 esac
3420done
81ecdfbb
RW
3421test "$ac_cv_exeext" = no && ac_cv_exeext=
3422
bec39cab 3423else
81ecdfbb
RW
3424 ac_file=''
3425fi
81ecdfbb 3426if test -z "$ac_file"; then :
d0ac1c44
SM
3427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3428$as_echo "no" >&6; }
3429$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3430sed 's/^/| /' conftest.$ac_ext >&5
3431
81ecdfbb
RW
3432{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3433$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3434as_fn_error 77 "C compiler cannot create executables
3435See \`config.log' for more details" "$LINENO" 5; }
3436else
3437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3438$as_echo "yes" >&6; }
bec39cab 3439fi
d0ac1c44
SM
3440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3441$as_echo_n "checking for C compiler default output file name... " >&6; }
3442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3443$as_echo "$ac_file" >&6; }
b4e70030 3444ac_exeext=$ac_cv_exeext
b4e70030 3445
d0ac1c44 3446rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3447ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3449$as_echo_n "checking for suffix of executables... " >&6; }
3450if { { ac_try="$ac_link"
3451case "(($ac_try" in
3452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3453 *) ac_try_echo=$ac_try;;
3454esac
3455eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3456$as_echo "$ac_try_echo"; } >&5
3457 (eval "$ac_link") 2>&5
bec39cab 3458 ac_status=$?
81ecdfbb
RW
3459 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3460 test $ac_status = 0; }; then :
b4e70030
JB
3461 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3462# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3463# work properly (i.e., refer to `conftest.exe'), while it won't with
3464# `rm'.
3465for ac_file in conftest.exe conftest conftest.*; do
3466 test -f "$ac_file" || continue
3467 case $ac_file in
81ecdfbb 3468 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3469 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3470 break;;
3471 * ) break;;
3472 esac
3473done
c906108c 3474else
81ecdfbb
RW
3475 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3476$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3477as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3478See \`config.log' for more details" "$LINENO" 5; }
c906108c 3479fi
d0ac1c44 3480rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3482$as_echo "$ac_cv_exeext" >&6; }
c906108c 3483
b4e70030 3484rm -f conftest.$ac_ext
bec39cab
AC
3485EXEEXT=$ac_cv_exeext
3486ac_exeext=$EXEEXT
d0ac1c44
SM
3487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3488/* end confdefs.h. */
3489#include <stdio.h>
3490int
3491main ()
3492{
3493FILE *f = fopen ("conftest.out", "w");
3494 return ferror (f) || fclose (f) != 0;
3495
3496 ;
3497 return 0;
3498}
3499_ACEOF
3500ac_clean_files="$ac_clean_files conftest.out"
3501# Check that the compiler produces executables we can run. If not, either
3502# the compiler is broken, or we cross compile.
3503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3504$as_echo_n "checking whether we are cross compiling... " >&6; }
3505if test "$cross_compiling" != yes; then
3506 { { ac_try="$ac_link"
3507case "(($ac_try" in
3508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3509 *) ac_try_echo=$ac_try;;
3510esac
3511eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3512$as_echo "$ac_try_echo"; } >&5
3513 (eval "$ac_link") 2>&5
3514 ac_status=$?
3515 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3516 test $ac_status = 0; }
3517 if { ac_try='./conftest$ac_cv_exeext'
3518 { { case "(($ac_try" in
3519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3520 *) ac_try_echo=$ac_try;;
3521esac
3522eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3523$as_echo "$ac_try_echo"; } >&5
3524 (eval "$ac_try") 2>&5
3525 ac_status=$?
3526 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3527 test $ac_status = 0; }; }; then
3528 cross_compiling=no
3529 else
3530 if test "$cross_compiling" = maybe; then
3531 cross_compiling=yes
3532 else
3533 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3534$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3535as_fn_error $? "cannot run C compiled programs.
3536If you meant to cross compile, use \`--host'.
3537See \`config.log' for more details" "$LINENO" 5; }
3538 fi
3539 fi
3540fi
3541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3542$as_echo "$cross_compiling" >&6; }
3543
3544rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3545ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3547$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3548if ${ac_cv_objext+:} false; then :
81ecdfbb 3549 $as_echo_n "(cached) " >&6
bec39cab 3550else
81ecdfbb 3551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3552/* end confdefs.h. */
3553
3554int
3555main ()
3556{
3557
3558 ;
3559 return 0;
3560}
3561_ACEOF
3562rm -f conftest.o conftest.obj
81ecdfbb
RW
3563if { { ac_try="$ac_compile"
3564case "(($ac_try" in
3565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3566 *) ac_try_echo=$ac_try;;
3567esac
3568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3569$as_echo "$ac_try_echo"; } >&5
3570 (eval "$ac_compile") 2>&5
3571 ac_status=$?
3572 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3573 test $ac_status = 0; }; then :
3574 for ac_file in conftest.o conftest.obj conftest.*; do
3575 test -f "$ac_file" || continue;
bec39cab 3576 case $ac_file in
81ecdfbb 3577 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3578 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3579 break;;
3580 esac
3581done
c906108c 3582else
81ecdfbb 3583 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3584sed 's/^/| /' conftest.$ac_ext >&5
3585
81ecdfbb
RW
3586{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3587$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3588as_fn_error $? "cannot compute suffix of object files: cannot compile
3589See \`config.log' for more details" "$LINENO" 5; }
c906108c 3590fi
b4e70030 3591rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3592fi
81ecdfbb
RW
3593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3594$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3595OBJEXT=$ac_cv_objext
3596ac_objext=$OBJEXT
81ecdfbb
RW
3597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3598$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3599if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3600 $as_echo_n "(cached) " >&6
c906108c 3601else
81ecdfbb 3602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3603/* end confdefs.h. */
3604
3605int
3606main ()
3607{
3608#ifndef __GNUC__
3609 choke me
3610#endif
3611
3612 ;
3613 return 0;
3614}
3615_ACEOF
81ecdfbb 3616if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3617 ac_compiler_gnu=yes
3618else
81ecdfbb 3619 ac_compiler_gnu=no
bec39cab 3620fi
81ecdfbb 3621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3622ac_cv_c_compiler_gnu=$ac_compiler_gnu
3623
3624fi
81ecdfbb
RW
3625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3626$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3627if test $ac_compiler_gnu = yes; then
3628 GCC=yes
3629else
3630 GCC=
3631fi
bec39cab
AC
3632ac_test_CFLAGS=${CFLAGS+set}
3633ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3635$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3636if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3637 $as_echo_n "(cached) " >&6
bec39cab 3638else
81ecdfbb
RW
3639 ac_save_c_werror_flag=$ac_c_werror_flag
3640 ac_c_werror_flag=yes
3641 ac_cv_prog_cc_g=no
3642 CFLAGS="-g"
3643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3644/* end confdefs.h. */
3645
3646int
3647main ()
3648{
3649
3650 ;
3651 return 0;
3652}
3653_ACEOF
81ecdfbb 3654if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3655 ac_cv_prog_cc_g=yes
3656else
81ecdfbb
RW
3657 CFLAGS=""
3658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3659/* end confdefs.h. */
3660
3661int
3662main ()
3663{
3664
3665 ;
3666 return 0;
3667}
3668_ACEOF
3669if ac_fn_c_try_compile "$LINENO"; then :
3670
3671else
3672 ac_c_werror_flag=$ac_save_c_werror_flag
3673 CFLAGS="-g"
3674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3675/* end confdefs.h. */
3676
3677int
3678main ()
3679{
c906108c 3680
81ecdfbb
RW
3681 ;
3682 return 0;
3683}
3684_ACEOF
3685if ac_fn_c_try_compile "$LINENO"; then :
3686 ac_cv_prog_cc_g=yes
3687fi
3688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3689fi
3690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3691fi
81ecdfbb
RW
3692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3693 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3694fi
81ecdfbb
RW
3695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3696$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3697if test "$ac_test_CFLAGS" = set; then
bec39cab 3698 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3699elif test $ac_cv_prog_cc_g = yes; then
3700 if test "$GCC" = yes; then
3701 CFLAGS="-g -O2"
3702 else
3703 CFLAGS="-g"
3704 fi
3705else
3706 if test "$GCC" = yes; then
3707 CFLAGS="-O2"
3708 else
3709 CFLAGS=
3710 fi
3711fi
81ecdfbb
RW
3712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3713$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3714if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3715 $as_echo_n "(cached) " >&6
bec39cab 3716else
81ecdfbb 3717 ac_cv_prog_cc_c89=no
bec39cab 3718ac_save_CC=$CC
81ecdfbb 3719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3720/* end confdefs.h. */
c906108c
SS
3721#include <stdarg.h>
3722#include <stdio.h>
d0ac1c44 3723struct stat;
c906108c
SS
3724/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3725struct buf { int x; };
3726FILE * (*rcsopen) (struct buf *, struct stat *, int);
3727static char *e (p, i)
3728 char **p;
3729 int i;
3730{
3731 return p[i];
3732}
3733static char *f (char * (*g) (char **, int), char **p, ...)
3734{
3735 char *s;
3736 va_list v;
3737 va_start (v,p);
3738 s = g (p, va_arg (v,int));
3739 va_end (v);
3740 return s;
3741}
bec39cab
AC
3742
3743/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3744 function prototypes and stuff, but not '\xHH' hex character constants.
3745 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3746 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3747 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3748 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3749 that's true only with -std. */
bec39cab
AC
3750int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3751
81ecdfbb
RW
3752/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3753 inside strings and character constants. */
3754#define FOO(x) 'x'
3755int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3756
c906108c
SS
3757int test (int i, double x);
3758struct s1 {int (*f) (int a);};
3759struct s2 {int (*f) (double a);};
3760int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3761int argc;
3762char **argv;
bec39cab
AC
3763int
3764main ()
3765{
c906108c 3766return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3767 ;
3768 return 0;
3769}
3770_ACEOF
81ecdfbb
RW
3771for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3772 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3773do
3774 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3775 if ac_fn_c_try_compile "$LINENO"; then :
3776 ac_cv_prog_cc_c89=$ac_arg
c906108c 3777fi
81ecdfbb
RW
3778rm -f core conftest.err conftest.$ac_objext
3779 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3780done
81ecdfbb 3781rm -f conftest.$ac_ext
bec39cab 3782CC=$ac_save_CC
c906108c
SS
3783
3784fi
81ecdfbb
RW
3785# AC_CACHE_VAL
3786case "x$ac_cv_prog_cc_c89" in
3787 x)
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3789$as_echo "none needed" >&6; } ;;
3790 xno)
3791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3792$as_echo "unsupported" >&6; } ;;
bec39cab 3793 *)
81ecdfbb
RW
3794 CC="$CC $ac_cv_prog_cc_c89"
3795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3796$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3797esac
81ecdfbb 3798if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3799
b4e70030
JB
3800fi
3801
bec39cab
AC
3802ac_ext=c
3803ac_cpp='$CPP $CPPFLAGS'
3804ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3805ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3806ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3807
3bc3d82a
PA
3808ac_ext=cpp
3809ac_cpp='$CXXCPP $CPPFLAGS'
3810ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3811ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3812ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3813if test -z "$CXX"; then
3814 if test -n "$CCC"; then
3815 CXX=$CCC
3816 else
3817 if test -n "$ac_tool_prefix"; then
3818 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3819 do
3820 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3821set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3823$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3824if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3825 $as_echo_n "(cached) " >&6
3826else
3827 if test -n "$CXX"; then
3828 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3829else
3830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3831for as_dir in $PATH
3832do
3833 IFS=$as_save_IFS
3834 test -z "$as_dir" && as_dir=.
3835 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3837 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3839 break 2
3840 fi
3841done
3842 done
3843IFS=$as_save_IFS
3844
3845fi
3846fi
3847CXX=$ac_cv_prog_CXX
3848if test -n "$CXX"; then
3849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3850$as_echo "$CXX" >&6; }
3851else
3852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3853$as_echo "no" >&6; }
3854fi
3855
3856
3857 test -n "$CXX" && break
3858 done
3859fi
3860if test -z "$CXX"; then
3861 ac_ct_CXX=$CXX
3862 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3863do
3864 # Extract the first word of "$ac_prog", so it can be a program name with args.
3865set dummy $ac_prog; ac_word=$2
3866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3867$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3868if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3869 $as_echo_n "(cached) " >&6
3870else
3871 if test -n "$ac_ct_CXX"; then
3872 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3873else
3874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3875for as_dir in $PATH
3876do
3877 IFS=$as_save_IFS
3878 test -z "$as_dir" && as_dir=.
3879 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3880 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3881 ac_cv_prog_ac_ct_CXX="$ac_prog"
3882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3883 break 2
3884 fi
3885done
3886 done
3887IFS=$as_save_IFS
3888
3889fi
3890fi
3891ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3892if test -n "$ac_ct_CXX"; then
3893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3894$as_echo "$ac_ct_CXX" >&6; }
3895else
3896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3897$as_echo "no" >&6; }
3898fi
3899
3900
3901 test -n "$ac_ct_CXX" && break
3902done
3903
3904 if test "x$ac_ct_CXX" = x; then
3905 CXX="g++"
3906 else
3907 case $cross_compiling:$ac_tool_warned in
3908yes:)
3909{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3910$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3911ac_tool_warned=yes ;;
3912esac
3913 CXX=$ac_ct_CXX
3914 fi
3915fi
3916
3917 fi
3918fi
3919# Provide some information about the compiler.
3920$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3921set X $ac_compile
3922ac_compiler=$2
3923for ac_option in --version -v -V -qversion; do
3924 { { ac_try="$ac_compiler $ac_option >&5"
3925case "(($ac_try" in
3926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3927 *) ac_try_echo=$ac_try;;
3928esac
3929eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3930$as_echo "$ac_try_echo"; } >&5
3931 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3932 ac_status=$?
3933 if test -s conftest.err; then
3934 sed '10a\
3935... rest of stderr output deleted ...
3936 10q' conftest.err >conftest.er1
3937 cat conftest.er1 >&5
3bc3d82a 3938 fi
d0ac1c44 3939 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3940 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3941 test $ac_status = 0; }
3942done
3943
3944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3945$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3946if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3947 $as_echo_n "(cached) " >&6
3948else
3949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3950/* end confdefs.h. */
3951
3952int
3953main ()
3954{
3955#ifndef __GNUC__
3956 choke me
3957#endif
3958
3959 ;
3960 return 0;
3961}
3962_ACEOF
3963if ac_fn_cxx_try_compile "$LINENO"; then :
3964 ac_compiler_gnu=yes
3965else
3966 ac_compiler_gnu=no
3967fi
3968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3969ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3970
3971fi
3972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3973$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3974if test $ac_compiler_gnu = yes; then
3975 GXX=yes
3976else
3977 GXX=
3978fi
3979ac_test_CXXFLAGS=${CXXFLAGS+set}
3980ac_save_CXXFLAGS=$CXXFLAGS
3981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3982$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3983if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3984 $as_echo_n "(cached) " >&6
3985else
3986 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3987 ac_cxx_werror_flag=yes
3988 ac_cv_prog_cxx_g=no
3989 CXXFLAGS="-g"
3990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3991/* end confdefs.h. */
3992
3993int
3994main ()
3995{
3996
3997 ;
3998 return 0;
3999}
4000_ACEOF
4001if ac_fn_cxx_try_compile "$LINENO"; then :
4002 ac_cv_prog_cxx_g=yes
4003else
4004 CXXFLAGS=""
4005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4006/* end confdefs.h. */
4007
4008int
4009main ()
4010{
4011
4012 ;
4013 return 0;
4014}
4015_ACEOF
4016if ac_fn_cxx_try_compile "$LINENO"; then :
4017
4018else
4019 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4020 CXXFLAGS="-g"
4021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4022/* end confdefs.h. */
4023
4024int
4025main ()
4026{
4027
4028 ;
4029 return 0;
4030}
4031_ACEOF
4032if ac_fn_cxx_try_compile "$LINENO"; then :
4033 ac_cv_prog_cxx_g=yes
4034fi
4035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4036fi
4037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4038fi
4039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4040 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4041fi
4042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4043$as_echo "$ac_cv_prog_cxx_g" >&6; }
4044if test "$ac_test_CXXFLAGS" = set; then
4045 CXXFLAGS=$ac_save_CXXFLAGS
4046elif test $ac_cv_prog_cxx_g = yes; then
4047 if test "$GXX" = yes; then
4048 CXXFLAGS="-g -O2"
4049 else
4050 CXXFLAGS="-g"
4051 fi
4052else
4053 if test "$GXX" = yes; then
4054 CXXFLAGS="-O2"
4055 else
4056 CXXFLAGS=
4057 fi
4058fi
4059ac_ext=c
4060ac_cpp='$CPP $CPPFLAGS'
4061ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4062ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4063ac_compiler_gnu=$ac_cv_c_compiler_gnu
4064
4065
60ca704f 4066
bec39cab
AC
4067ac_ext=c
4068ac_cpp='$CPP $CPPFLAGS'
4069ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4070ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4071ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
4072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4073$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
4074# On Suns, sometimes $CPP names a directory.
4075if test -n "$CPP" && test -d "$CPP"; then
4076 CPP=
8bb2c122 4077fi
bec39cab 4078if test -z "$CPP"; then
d0ac1c44 4079 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 4080 $as_echo_n "(cached) " >&6
bec39cab
AC
4081else
4082 # Double quotes because CPP needs to be expanded
4083 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4084 do
4085 ac_preproc_ok=false
4086for ac_c_preproc_warn_flag in '' yes
4087do
4088 # Use a header file that comes with gcc, so configuring glibc
4089 # with a fresh cross-compiler works.
4090 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4091 # <limits.h> exists even on freestanding compilers.
4092 # On the NeXT, cc -E runs the code through the compiler's parser,
4093 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4095/* end confdefs.h. */
4096#ifdef __STDC__
4097# include <limits.h>
4098#else
4099# include <assert.h>
4100#endif
4101 Syntax error
4102_ACEOF
81ecdfbb 4103if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4104
81ecdfbb 4105else
bec39cab
AC
4106 # Broken: fails on valid input.
4107continue
4108fi
d0ac1c44 4109rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4110
81ecdfbb 4111 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4112 # can be detected and how.
81ecdfbb 4113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4114/* end confdefs.h. */
4115#include <ac_nonexistent.h>
4116_ACEOF
81ecdfbb 4117if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4118 # Broken: success on invalid input.
4119continue
8bb2c122 4120else
bec39cab
AC
4121 # Passes both tests.
4122ac_preproc_ok=:
4123break
8bb2c122 4124fi
d0ac1c44 4125rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4126
bec39cab
AC
4127done
4128# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4129rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4130if $ac_preproc_ok; then :
bec39cab
AC
4131 break
4132fi
8bb2c122 4133
bec39cab
AC
4134 done
4135 ac_cv_prog_CPP=$CPP
ddc9cd0f 4136
c906108c 4137fi
bec39cab
AC
4138 CPP=$ac_cv_prog_CPP
4139else
4140 ac_cv_prog_CPP=$CPP
c906108c 4141fi
81ecdfbb
RW
4142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4143$as_echo "$CPP" >&6; }
bec39cab
AC
4144ac_preproc_ok=false
4145for ac_c_preproc_warn_flag in '' yes
4146do
4147 # Use a header file that comes with gcc, so configuring glibc
4148 # with a fresh cross-compiler works.
4149 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4150 # <limits.h> exists even on freestanding compilers.
4151 # On the NeXT, cc -E runs the code through the compiler's parser,
4152 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4154/* end confdefs.h. */
4155#ifdef __STDC__
4156# include <limits.h>
4157#else
4158# include <assert.h>
4159#endif
4160 Syntax error
4161_ACEOF
81ecdfbb 4162if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4163
81ecdfbb 4164else
bec39cab
AC
4165 # Broken: fails on valid input.
4166continue
4167fi
d0ac1c44 4168rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4169
81ecdfbb 4170 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4171 # can be detected and how.
81ecdfbb 4172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4173/* end confdefs.h. */
4174#include <ac_nonexistent.h>
4175_ACEOF
81ecdfbb 4176if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4177 # Broken: success on invalid input.
4178continue
c906108c 4179else
bec39cab
AC
4180 # Passes both tests.
4181ac_preproc_ok=:
4182break
c906108c 4183fi
d0ac1c44 4184rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4185
bec39cab
AC
4186done
4187# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4188rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4189if $ac_preproc_ok; then :
4190
c906108c 4191else
81ecdfbb
RW
4192 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4194as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4195See \`config.log' for more details" "$LINENO" 5; }
c906108c 4196fi
c906108c 4197
bec39cab
AC
4198ac_ext=c
4199ac_cpp='$CPP $CPPFLAGS'
4200ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4201ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4202ac_compiler_gnu=$ac_cv_c_compiler_gnu
4203
4204
81ecdfbb
RW
4205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4206$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4207if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4208 $as_echo_n "(cached) " >&6
4e8d927d 4209else
81ecdfbb
RW
4210 if test -z "$GREP"; then
4211 ac_path_GREP_found=false
4212 # Loop through the user's path and test for each of PROGNAME-LIST
4213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4214for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4215do
4216 IFS=$as_save_IFS
4217 test -z "$as_dir" && as_dir=.
4218 for ac_prog in grep ggrep; do
4219 for ac_exec_ext in '' $ac_executable_extensions; do
4220 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4221 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4222# Check for GNU ac_path_GREP and select it if it is found.
4223 # Check for GNU $ac_path_GREP
4224case `"$ac_path_GREP" --version 2>&1` in
4225*GNU*)
4226 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4227*)
4228 ac_count=0
4229 $as_echo_n 0123456789 >"conftest.in"
4230 while :
4231 do
4232 cat "conftest.in" "conftest.in" >"conftest.tmp"
4233 mv "conftest.tmp" "conftest.in"
4234 cp "conftest.in" "conftest.nl"
4235 $as_echo 'GREP' >> "conftest.nl"
4236 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4237 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4238 as_fn_arith $ac_count + 1 && ac_count=$as_val
4239 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4240 # Best one so far, save it but keep looking for a better one
4241 ac_cv_path_GREP="$ac_path_GREP"
4242 ac_path_GREP_max=$ac_count
bec39cab 4243 fi
81ecdfbb
RW
4244 # 10*(2^10) chars as input seems more than enough
4245 test $ac_count -gt 10 && break
4246 done
4247 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4248esac
bec39cab 4249
81ecdfbb
RW
4250 $ac_path_GREP_found && break 3
4251 done
4252 done
4253 done
4254IFS=$as_save_IFS
4255 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4256 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4257 fi
c906108c 4258else
81ecdfbb 4259 ac_cv_path_GREP=$GREP
c906108c 4260fi
c906108c 4261
81ecdfbb
RW
4262fi
4263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4264$as_echo "$ac_cv_path_GREP" >&6; }
4265 GREP="$ac_cv_path_GREP"
c906108c 4266
c906108c 4267
81ecdfbb
RW
4268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4269$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4270if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4271 $as_echo_n "(cached) " >&6
783e057b 4272else
81ecdfbb
RW
4273 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4274 then ac_cv_path_EGREP="$GREP -E"
4275 else
4276 if test -z "$EGREP"; then
4277 ac_path_EGREP_found=false
4278 # Loop through the user's path and test for each of PROGNAME-LIST
4279 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4280for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4281do
4282 IFS=$as_save_IFS
4283 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4284 for ac_prog in egrep; do
4285 for ac_exec_ext in '' $ac_executable_extensions; do
4286 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4287 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4288# Check for GNU ac_path_EGREP and select it if it is found.
4289 # Check for GNU $ac_path_EGREP
4290case `"$ac_path_EGREP" --version 2>&1` in
4291*GNU*)
4292 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4293*)
4294 ac_count=0
4295 $as_echo_n 0123456789 >"conftest.in"
4296 while :
4297 do
4298 cat "conftest.in" "conftest.in" >"conftest.tmp"
4299 mv "conftest.tmp" "conftest.in"
4300 cp "conftest.in" "conftest.nl"
4301 $as_echo 'EGREP' >> "conftest.nl"
4302 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4303 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4304 as_fn_arith $ac_count + 1 && ac_count=$as_val
4305 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4306 # Best one so far, save it but keep looking for a better one
4307 ac_cv_path_EGREP="$ac_path_EGREP"
4308 ac_path_EGREP_max=$ac_count
4309 fi
4310 # 10*(2^10) chars as input seems more than enough
4311 test $ac_count -gt 10 && break
4312 done
4313 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4314esac
bec39cab 4315
81ecdfbb
RW
4316 $ac_path_EGREP_found && break 3
4317 done
4318 done
4319 done
4320IFS=$as_save_IFS
4321 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4322 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4323 fi
783e057b 4324else
81ecdfbb 4325 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4326fi
4327
81ecdfbb 4328 fi
783e057b 4329fi
81ecdfbb
RW
4330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4331$as_echo "$ac_cv_path_EGREP" >&6; }
4332 EGREP="$ac_cv_path_EGREP"
4333
783e057b 4334
81ecdfbb
RW
4335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4336$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4337if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4338 $as_echo_n "(cached) " >&6
783e057b 4339else
81ecdfbb 4340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4341/* end confdefs.h. */
783e057b 4342#include <stdlib.h>
bec39cab 4343#include <stdarg.h>
783e057b
DJ
4344#include <string.h>
4345#include <float.h>
c906108c 4346
bec39cab
AC
4347int
4348main ()
4349{
c906108c 4350
bec39cab
AC
4351 ;
4352 return 0;
4353}
4354_ACEOF
81ecdfbb 4355if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4356 ac_cv_header_stdc=yes
c906108c 4357else
81ecdfbb 4358 ac_cv_header_stdc=no
c906108c 4359fi
81ecdfbb 4360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4361
783e057b
DJ
4362if test $ac_cv_header_stdc = yes; then
4363 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4365/* end confdefs.h. */
4366#include <string.h>
c906108c 4367
783e057b
DJ
4368_ACEOF
4369if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4370 $EGREP "memchr" >/dev/null 2>&1; then :
4371
c906108c 4372else
783e057b 4373 ac_cv_header_stdc=no
c906108c 4374fi
783e057b 4375rm -f conftest*
c906108c
SS
4376
4377fi
4378
783e057b
DJ
4379if test $ac_cv_header_stdc = yes; then
4380 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4382/* end confdefs.h. */
4383#include <stdlib.h>
bec39cab 4384
783e057b
DJ
4385_ACEOF
4386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4387 $EGREP "free" >/dev/null 2>&1; then :
4388
bec39cab 4389else
783e057b 4390 ac_cv_header_stdc=no
bec39cab 4391fi
783e057b 4392rm -f conftest*
bec39cab
AC
4393
4394fi
bec39cab 4395
783e057b
DJ
4396if test $ac_cv_header_stdc = yes; then
4397 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4398 if test "$cross_compiling" = yes; then :
783e057b 4399 :
bec39cab 4400else
81ecdfbb 4401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4402/* end confdefs.h. */
4403#include <ctype.h>
81ecdfbb 4404#include <stdlib.h>
783e057b
DJ
4405#if ((' ' & 0x0FF) == 0x020)
4406# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4407# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4408#else
4409# define ISLOWER(c) \
4410 (('a' <= (c) && (c) <= 'i') \
4411 || ('j' <= (c) && (c) <= 'r') \
4412 || ('s' <= (c) && (c) <= 'z'))
4413# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4414#endif
4415
4416#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4417int
4418main ()
4419{
4420 int i;
4421 for (i = 0; i < 256; i++)
4422 if (XOR (islower (i), ISLOWER (i))
4423 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4424 return 2;
4425 return 0;
783e057b
DJ
4426}
4427_ACEOF
81ecdfbb 4428if ac_fn_c_try_run "$LINENO"; then :
783e057b 4429
81ecdfbb
RW
4430else
4431 ac_cv_header_stdc=no
783e057b 4432fi
81ecdfbb
RW
4433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4434 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4435fi
81ecdfbb 4436
783e057b
DJ
4437fi
4438fi
81ecdfbb
RW
4439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4440$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4441if test $ac_cv_header_stdc = yes; then
4442
81ecdfbb 4443$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4444
4445fi
4446
4447# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4448for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4449 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4450do :
4451 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4452ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4453"
d0ac1c44 4454if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4455 cat >>confdefs.h <<_ACEOF
81ecdfbb 4456#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4457_ACEOF
4458
4459fi
4460
4461done
4462
4463
4464
81ecdfbb 4465 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4466if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4467 MINIX=yes
4468else
4469 MINIX=
4470fi
4471
4472
4473 if test "$MINIX" = yes; then
4474
81ecdfbb 4475$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4476
4477
81ecdfbb 4478$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4479
4480
81ecdfbb 4481$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4482
4483 fi
4484
4485
81ecdfbb
RW
4486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4487$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4488if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4489 $as_echo_n "(cached) " >&6
783e057b 4490else
81ecdfbb 4491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4492/* end confdefs.h. */
4493
d0ac1c44
SM
4494# define __EXTENSIONS__ 1
4495 $ac_includes_default
783e057b
DJ
4496int
4497main ()
4498{
4499
4500 ;
4501 return 0;
4502}
4503_ACEOF
81ecdfbb 4504if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4505 ac_cv_safe_to_define___extensions__=yes
4506else
81ecdfbb 4507 ac_cv_safe_to_define___extensions__=no
783e057b 4508fi
81ecdfbb 4509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4510fi
81ecdfbb
RW
4511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4512$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4513 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4514 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4515
81ecdfbb 4516 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4517
81ecdfbb 4518 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4519
81ecdfbb 4520 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4521
81ecdfbb 4522 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4523
4524
c971b7fa
PA
4525ac_aux_dir=
4526for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4527 if test -f "$ac_dir/install-sh"; then
4528 ac_aux_dir=$ac_dir
4529 ac_install_sh="$ac_aux_dir/install-sh -c"
4530 break
4531 elif test -f "$ac_dir/install.sh"; then
4532 ac_aux_dir=$ac_dir
4533 ac_install_sh="$ac_aux_dir/install.sh -c"
4534 break
4535 elif test -f "$ac_dir/shtool"; then
4536 ac_aux_dir=$ac_dir
4537 ac_install_sh="$ac_aux_dir/shtool install -c"
4538 break
4539 fi
c971b7fa
PA
4540done
4541if test -z "$ac_aux_dir"; then
d0ac1c44 4542 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4543fi
770d76d7 4544
c971b7fa
PA
4545# These three variables are undocumented and unsupported,
4546# and are intended to be withdrawn in a future Autoconf release.
4547# They can cause serious problems if a builder's source tree is in a directory
4548# whose full name contains unusual characters.
4549ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4550ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4551ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4552
770d76d7 4553
c971b7fa
PA
4554# Make sure we can run config.sub.
4555$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4556 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4557
c971b7fa
PA
4558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4559$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4560if ${ac_cv_build+:} false; then :
c971b7fa 4561 $as_echo_n "(cached) " >&6
770d76d7 4562else
c971b7fa
PA
4563 ac_build_alias=$build_alias
4564test "x$ac_build_alias" = x &&
4565 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4566test "x$ac_build_alias" = x &&
d0ac1c44 4567 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4568ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4569 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4570
770d76d7 4571fi
c971b7fa
PA
4572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4573$as_echo "$ac_cv_build" >&6; }
4574case $ac_cv_build in
4575*-*-*) ;;
d0ac1c44 4576*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4577esac
c971b7fa
PA
4578build=$ac_cv_build
4579ac_save_IFS=$IFS; IFS='-'
4580set x $ac_cv_build
4581shift
4582build_cpu=$1
4583build_vendor=$2
4584shift; shift
4585# Remember, the first character of IFS is used to create $*,
4586# except with old shells:
4587build_os=$*
4588IFS=$ac_save_IFS
4589case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4590
4591
c971b7fa
PA
4592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4593$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4594if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4595 $as_echo_n "(cached) " >&6
4596else
c971b7fa
PA
4597 if test "x$host_alias" = x; then
4598 ac_cv_host=$ac_cv_build
81ecdfbb 4599else
c971b7fa 4600 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4601 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4602fi
81ecdfbb
RW
4603
4604fi
c971b7fa
PA
4605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4606$as_echo "$ac_cv_host" >&6; }
4607case $ac_cv_host in
4608*-*-*) ;;
d0ac1c44 4609*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4610esac
c971b7fa
PA
4611host=$ac_cv_host
4612ac_save_IFS=$IFS; IFS='-'
4613set x $ac_cv_host
4614shift
4615host_cpu=$1
4616host_vendor=$2
4617shift; shift
4618# Remember, the first character of IFS is used to create $*,
4619# except with old shells:
4620host_os=$*
4621IFS=$ac_save_IFS
4622case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4623
4624
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4626$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4627if ${ac_cv_target+:} false; then :
3388710e
JM
4628 $as_echo_n "(cached) " >&6
4629else
4630 if test "x$target_alias" = x; then
4631 ac_cv_target=$ac_cv_host
4632else
4633 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4634 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4635fi
4636
4637fi
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4639$as_echo "$ac_cv_target" >&6; }
4640case $ac_cv_target in
4641*-*-*) ;;
d0ac1c44 4642*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4643esac
4644target=$ac_cv_target
4645ac_save_IFS=$IFS; IFS='-'
4646set x $ac_cv_target
4647shift
4648target_cpu=$1
4649target_vendor=$2
4650shift; shift
4651# Remember, the first character of IFS is used to create $*,
4652# except with old shells:
4653target_os=$*
4654IFS=$ac_save_IFS
4655case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4656
4657
4658# The aliases save the names the user supplied, while $host etc.
4659# will get canonicalized.
4660test -n "$target_alias" &&
4661 test "$program_prefix$program_suffix$program_transform_name" = \
4662 NONENONEs,x,x, &&
4663 program_prefix=${target_alias}-
4664
4665# The tests for host and target for $enable_largefile require
4666# canonical names.
4667
4668
81ecdfbb 4669
da2f07f1
JK
4670# As the $enable_largefile decision depends on --enable-plugins we must set it
4671# even in directories otherwise not depending on the $plugins option.
4672
4673
2974be62
AM
4674 maybe_plugins=no
4675 for ac_header in dlfcn.h
4676do :
4677 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4678"
d0ac1c44 4679if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4680 cat >>confdefs.h <<_ACEOF
4681#define HAVE_DLFCN_H 1
4682_ACEOF
4683 maybe_plugins=yes
4684fi
4685
4686done
4687
4688 for ac_header in windows.h
4689do :
4690 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4691"
d0ac1c44 4692if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4693 cat >>confdefs.h <<_ACEOF
4694#define HAVE_WINDOWS_H 1
4695_ACEOF
4696 maybe_plugins=yes
4697fi
4698
4699done
4700
4701
4702 # Check whether --enable-plugins was given.
da2f07f1
JK
4703if test "${enable_plugins+set}" = set; then :
4704 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4705 no) plugins=no ;;
4706 *) plugins=yes
4707 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4708 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4709 fi ;;
4710 esac
da2f07f1 4711else
2974be62
AM
4712 plugins=$maybe_plugins
4713
da2f07f1
JK
4714fi
4715
2974be62 4716 if test "$plugins" = "yes"; then
458412c3
TT
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4718$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4719if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4720 $as_echo_n "(cached) " >&6
4721else
4722 ac_func_search_save_LIBS=$LIBS
4723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4724/* end confdefs.h. */
4725
4726/* Override any GCC internal prototype to avoid an error.
4727 Use char because int might match the return type of a GCC
4728 builtin and then its argument prototype would still apply. */
4729#ifdef __cplusplus
4730extern "C"
4731#endif
458412c3 4732char dlsym ();
2974be62
AM
4733int
4734main ()
4735{
458412c3 4736return dlsym ();
2974be62
AM
4737 ;
4738 return 0;
4739}
4740_ACEOF
4741for ac_lib in '' dl; do
4742 if test -z "$ac_lib"; then
4743 ac_res="none required"
4744 else
4745 ac_res=-l$ac_lib
4746 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4747 fi
4748 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4749 ac_cv_search_dlsym=$ac_res
2974be62
AM
4750fi
4751rm -f core conftest.err conftest.$ac_objext \
4752 conftest$ac_exeext
d0ac1c44 4753 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4754 break
4755fi
4756done
d0ac1c44 4757if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4758
4759else
458412c3 4760 ac_cv_search_dlsym=no
2974be62
AM
4761fi
4762rm conftest.$ac_ext
4763LIBS=$ac_func_search_save_LIBS
4764fi
458412c3
TT
4765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4766$as_echo "$ac_cv_search_dlsym" >&6; }
4767ac_res=$ac_cv_search_dlsym
2974be62
AM
4768if test "$ac_res" != no; then :
4769 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4770
4771fi
4772
4773 fi
da2f07f1
JK
4774
4775
4776case "${host}" in
c8693053
RO
4777 sparc-*-solaris*|i?86-*-solaris*)
4778 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
4779 # were mutually exclusive until Solaris 11.3. Without procfs support,
4780 # the bfd/ elf module cannot provide certain routines such as
4781 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
4782 # explicitly requested large-file support through the
4783 # --enable-largefile switch, disable large-file support in favor of
4784 # procfs support.
4785 #
4786 # Check if <sys/procfs.h> is incompatible with large-file support.
4787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4788/* end confdefs.h. */
4789#define _FILE_OFFSET_BITS 64
4790#define _STRUCTURED_PROC 1
4791#include <sys/procfs.h>
4792int
4793main ()
4794{
4795
4796 ;
4797 return 0;
4798}
4799_ACEOF
4800if ac_fn_c_try_compile "$LINENO"; then :
4801 acx_cv_procfs_lfs=yes
4802else
4803 acx_cv_procfs_lfs=no
4804fi
4805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4806 #
4807 # Forcefully disable large-file support only if necessary, gdb is in
4808 # tree and enabled.
4809 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
4810 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
4811 : ${enable_largefile="no"}
4812 if test "$plugins" = yes; then
4813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4814plugin support disabled; require large-file support which is incompatible with GDB." >&5
4815$as_echo "$as_me: WARNING:
4816plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
4817 plugins=no
4818 fi
4819 fi
4820 #
4821 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
4822 # benefit of g++ 9+ which predefines it on Solaris.
4823 if test "$enable_largefile" = no; then
4824 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
4825
4826 fi
da2f07f1
JK
4827 ;;
4828esac
4829
4830# Check whether --enable-largefile was given.
4831if test "${enable_largefile+set}" = set; then :
4832 enableval=$enable_largefile;
4833fi
4834
4835if test "$enable_largefile" != no; then
4836
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4838$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4839if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4840 $as_echo_n "(cached) " >&6
4841else
4842 ac_cv_sys_largefile_CC=no
4843 if test "$GCC" != yes; then
4844 ac_save_CC=$CC
4845 while :; do
4846 # IRIX 6.2 and later do not support large files by default,
4847 # so use the C compiler's -n32 option if that helps.
4848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4849/* end confdefs.h. */
4850#include <sys/types.h>
4851 /* Check that off_t can represent 2**63 - 1 correctly.
4852 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4853 since some C++ compilers masquerading as C compilers
4854 incorrectly reject 9223372036854775807. */
4855#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4856 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4857 && LARGE_OFF_T % 2147483647 == 1)
4858 ? 1 : -1];
4859int
4860main ()
4861{
4862
4863 ;
4864 return 0;
4865}
4866_ACEOF
4867 if ac_fn_c_try_compile "$LINENO"; then :
4868 break
4869fi
4870rm -f core conftest.err conftest.$ac_objext
4871 CC="$CC -n32"
4872 if ac_fn_c_try_compile "$LINENO"; then :
4873 ac_cv_sys_largefile_CC=' -n32'; break
4874fi
4875rm -f core conftest.err conftest.$ac_objext
4876 break
4877 done
4878 CC=$ac_save_CC
4879 rm -f conftest.$ac_ext
4880 fi
4881fi
4882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4883$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4884 if test "$ac_cv_sys_largefile_CC" != no; then
4885 CC=$CC$ac_cv_sys_largefile_CC
4886 fi
4887
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4889$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4890if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4891 $as_echo_n "(cached) " >&6
4892else
4893 while :; do
4894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4895/* end confdefs.h. */
4896#include <sys/types.h>
4897 /* Check that off_t can represent 2**63 - 1 correctly.
4898 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4899 since some C++ compilers masquerading as C compilers
4900 incorrectly reject 9223372036854775807. */
4901#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4902 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4903 && LARGE_OFF_T % 2147483647 == 1)
4904 ? 1 : -1];
4905int
4906main ()
4907{
4908
4909 ;
4910 return 0;
4911}
4912_ACEOF
4913if ac_fn_c_try_compile "$LINENO"; then :
4914 ac_cv_sys_file_offset_bits=no; break
4915fi
4916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4918/* end confdefs.h. */
4919#define _FILE_OFFSET_BITS 64
4920#include <sys/types.h>
4921 /* Check that off_t can represent 2**63 - 1 correctly.
4922 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4923 since some C++ compilers masquerading as C compilers
4924 incorrectly reject 9223372036854775807. */
4925#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4926 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4927 && LARGE_OFF_T % 2147483647 == 1)
4928 ? 1 : -1];
4929int
4930main ()
4931{
4932
4933 ;
4934 return 0;
4935}
4936_ACEOF
4937if ac_fn_c_try_compile "$LINENO"; then :
4938 ac_cv_sys_file_offset_bits=64; break
4939fi
4940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4941 ac_cv_sys_file_offset_bits=unknown
4942 break
4943done
4944fi
4945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4946$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4947case $ac_cv_sys_file_offset_bits in #(
4948 no | unknown) ;;
4949 *)
4950cat >>confdefs.h <<_ACEOF
4951#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4952_ACEOF
4953;;
4954esac
4955rm -rf conftest*
4956 if test $ac_cv_sys_file_offset_bits = unknown; then
4957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4958$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4959if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4960 $as_echo_n "(cached) " >&6
4961else
4962 while :; do
4963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4964/* end confdefs.h. */
4965#include <sys/types.h>
4966 /* Check that off_t can represent 2**63 - 1 correctly.
4967 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4968 since some C++ compilers masquerading as C compilers
4969 incorrectly reject 9223372036854775807. */
4970#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4971 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4972 && LARGE_OFF_T % 2147483647 == 1)
4973 ? 1 : -1];
4974int
4975main ()
4976{
4977
4978 ;
4979 return 0;
4980}
4981_ACEOF
4982if ac_fn_c_try_compile "$LINENO"; then :
4983 ac_cv_sys_large_files=no; break
4984fi
4985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4987/* end confdefs.h. */
4988#define _LARGE_FILES 1
4989#include <sys/types.h>
4990 /* Check that off_t can represent 2**63 - 1 correctly.
4991 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4992 since some C++ compilers masquerading as C compilers
4993 incorrectly reject 9223372036854775807. */
4994#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4995 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4996 && LARGE_OFF_T % 2147483647 == 1)
4997 ? 1 : -1];
4998int
4999main ()
5000{
5001
5002 ;
5003 return 0;
5004}
5005_ACEOF
5006if ac_fn_c_try_compile "$LINENO"; then :
5007 ac_cv_sys_large_files=1; break
5008fi
5009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5010 ac_cv_sys_large_files=unknown
5011 break
5012done
5013fi
5014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5015$as_echo "$ac_cv_sys_large_files" >&6; }
5016case $ac_cv_sys_large_files in #(
5017 no | unknown) ;;
5018 *)
5019cat >>confdefs.h <<_ACEOF
5020#define _LARGE_FILES $ac_cv_sys_large_files
5021_ACEOF
5022;;
5023esac
5024rm -rf conftest*
5025 fi
d0ac1c44
SM
5026
5027
da2f07f1
JK
5028fi
5029
5030
d0ac1c44
SM
5031# Expand $ac_aux_dir to an absolute path.
5032am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 5033
d0ac1c44 5034if test x"${install_sh+set}" != xset; then
4869db5e
RM
5035 case $am_aux_dir in
5036 *\ * | *\ *)
5037 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5038 *)
5039 install_sh="\${SHELL} $am_aux_dir/install-sh"
5040 esac
5041fi
5042
d0ac1c44
SM
5043# Installed binaries are usually stripped using 'strip' when the user
5044# run "make install-strip". However 'strip' might not be the right
4869db5e 5045# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 5046# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
5047if test "$cross_compiling" != no; then
5048 if test -n "$ac_tool_prefix"; then
5049 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5050set dummy ${ac_tool_prefix}strip; ac_word=$2
5051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5052$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5053if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
5054 $as_echo_n "(cached) " >&6
5055else
5056 if test -n "$STRIP"; then
5057 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5058else
5059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5060for as_dir in $PATH
5061do
5062 IFS=$as_save_IFS
5063 test -z "$as_dir" && as_dir=.
5064 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5065 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5066 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5068 break 2
5069 fi
5070done
5071 done
5072IFS=$as_save_IFS
5073
5074fi
5075fi
5076STRIP=$ac_cv_prog_STRIP
5077if test -n "$STRIP"; then
5078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5079$as_echo "$STRIP" >&6; }
5080else
5081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5082$as_echo "no" >&6; }
5083fi
5084
5085
5086fi
5087if test -z "$ac_cv_prog_STRIP"; then
5088 ac_ct_STRIP=$STRIP
5089 # Extract the first word of "strip", so it can be a program name with args.
5090set dummy strip; ac_word=$2
5091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5092$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5093if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5094 $as_echo_n "(cached) " >&6
5095else
5096 if test -n "$ac_ct_STRIP"; then
5097 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5098else
5099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5100for as_dir in $PATH
5101do
5102 IFS=$as_save_IFS
5103 test -z "$as_dir" && as_dir=.
5104 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5106 ac_cv_prog_ac_ct_STRIP="strip"
5107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5108 break 2
5109 fi
5110done
5111 done
5112IFS=$as_save_IFS
5113
5114fi
5115fi
5116ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5117if test -n "$ac_ct_STRIP"; then
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5119$as_echo "$ac_ct_STRIP" >&6; }
5120else
5121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122$as_echo "no" >&6; }
5123fi
5124
5125 if test "x$ac_ct_STRIP" = x; then
5126 STRIP=":"
5127 else
5128 case $cross_compiling:$ac_tool_warned in
5129yes:)
5130{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5131$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5132ac_tool_warned=yes ;;
5133esac
5134 STRIP=$ac_ct_STRIP
5135 fi
5136else
5137 STRIP="$ac_cv_prog_STRIP"
5138fi
5139
5140fi
5141INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5142
783e057b
DJ
5143
5144ac_aux_dir=
81ecdfbb 5145for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5146 if test -f "$ac_dir/install-sh"; then
5147 ac_aux_dir=$ac_dir
5148 ac_install_sh="$ac_aux_dir/install-sh -c"
5149 break
5150 elif test -f "$ac_dir/install.sh"; then
5151 ac_aux_dir=$ac_dir
5152 ac_install_sh="$ac_aux_dir/install.sh -c"
5153 break
5154 elif test -f "$ac_dir/shtool"; then
5155 ac_aux_dir=$ac_dir
5156 ac_install_sh="$ac_aux_dir/shtool install -c"
5157 break
5158 fi
783e057b
DJ
5159done
5160if test -z "$ac_aux_dir"; then
d0ac1c44 5161 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5162fi
81ecdfbb
RW
5163
5164# These three variables are undocumented and unsupported,
5165# and are intended to be withdrawn in a future Autoconf release.
5166# They can cause serious problems if a builder's source tree is in a directory
5167# whose full name contains unusual characters.
5168ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5169ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5170ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5171
783e057b 5172
783e057b 5173
91e1a0ed
SM
5174# Set build, build_cpu, build_vendor and build_os.
5175
5176
5177# Set host, host_cpu, host_vendor, and host_os.
5178
5179
5180# Set target, target_cpu, target_vendor, and target_os.
5181
5182
9009e1ae
MR
5183test "$program_prefix" != NONE &&
5184 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5185# Use a double $ so make ignores it.
5186test "$program_suffix" != NONE &&
5187 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5188# Double any \ or $.
5189# By default was `s,x,x', remove it if useless.
5190ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5191program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5192
81ecdfbb 5193
0bcda685
PA
5194# We require a C++11 compiler. Check if one is available, and if
5195# necessary, set CXX_DIALECT to some -std=xxx switch.
5196
41260ac2 5197 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5198 ac_ext=cpp
5199ac_cpp='$CXXCPP $CPPFLAGS'
5200ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5201ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5202ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5203 CXX_DIALECT=""
5204 ac_success=no
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5206$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5207if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5208 $as_echo_n "(cached) " >&6
5209else
5210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5211/* end confdefs.h. */
5212
5213
5214// If the compiler admits that it is not ready for C++11, why torture it?
5215// Hopefully, this will speed up the test.
5216
5217#ifndef __cplusplus
5218
5219#error "This is not a C++ compiler"
5220
5221#elif __cplusplus < 201103L
5222
5223#error "This is not a C++11 compiler"
5224
5225#else
5226
5227namespace cxx11
5228{
5229
5230 namespace test_static_assert
5231 {
5232
5233 template <typename T>
5234 struct check
5235 {
5236 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5237 };
5238
5239 }
5240
5241 namespace test_final_override
5242 {
5243
5244 struct Base
5245 {
5246 virtual void f() {}
5247 };
5248
5249 struct Derived : public Base
5250 {
5251 virtual void f() override {}
5252 };
5253
5254 }
5255
5256 namespace test_double_right_angle_brackets
5257 {
5258
5259 template < typename T >
5260 struct check {};
5261
5262 typedef check<void> single_type;
5263 typedef check<check<void>> double_type;
5264 typedef check<check<check<void>>> triple_type;
5265 typedef check<check<check<check<void>>>> quadruple_type;
5266
5267 }
5268
5269 namespace test_decltype
5270 {
5271
5272 int
5273 f()
5274 {
5275 int a = 1;
5276 decltype(a) b = 2;
5277 return a + b;
5278 }
5279
5280 }
5281
5282 namespace test_type_deduction
5283 {
5284
5285 template < typename T1, typename T2 >
5286 struct is_same
5287 {
5288 static const bool value = false;
5289 };
5290
5291 template < typename T >
5292 struct is_same<T, T>
5293 {
5294 static const bool value = true;
5295 };
5296
5297 template < typename T1, typename T2 >
5298 auto
5299 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5300 {
5301 return a1 + a2;
5302 }
5303
5304 int
5305 test(const int c, volatile int v)
5306 {
5307 static_assert(is_same<int, decltype(0)>::value == true, "");
5308 static_assert(is_same<int, decltype(c)>::value == false, "");
5309 static_assert(is_same<int, decltype(v)>::value == false, "");
5310 auto ac = c;
5311 auto av = v;
5312 auto sumi = ac + av + 'x';
5313 auto sumf = ac + av + 1.0;
5314 static_assert(is_same<int, decltype(ac)>::value == true, "");
5315 static_assert(is_same<int, decltype(av)>::value == true, "");
5316 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5317 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5318 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5319 return (sumf > 0.0) ? sumi : add(c, v);
5320 }
5321
5322 }
5323
5324 namespace test_noexcept
5325 {
5326
5327 int f() { return 0; }
5328 int g() noexcept { return 0; }
5329
5330 static_assert(noexcept(f()) == false, "");
5331 static_assert(noexcept(g()) == true, "");
5332
5333 }
5334
5335 namespace test_constexpr
5336 {
5337
5338 template < typename CharT >
5339 unsigned long constexpr
5340 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5341 {
5342 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5343 }
5344
5345 template < typename CharT >
5346 unsigned long constexpr
5347 strlen_c(const CharT *const s) noexcept
5348 {
5349 return strlen_c_r(s, 0UL);
5350 }
5351
5352 static_assert(strlen_c("") == 0UL, "");
5353 static_assert(strlen_c("1") == 1UL, "");
5354 static_assert(strlen_c("example") == 7UL, "");
5355 static_assert(strlen_c("another\0example") == 7UL, "");
5356
5357 }
5358
5359 namespace test_rvalue_references
5360 {
5361
5362 template < int N >
5363 struct answer
5364 {
5365 static constexpr int value = N;
5366 };
5367
5368 answer<1> f(int&) { return answer<1>(); }
5369 answer<2> f(const int&) { return answer<2>(); }
5370 answer<3> f(int&&) { return answer<3>(); }
5371
5372 void
5373 test()
5374 {
5375 int i = 0;
5376 const int c = 0;
5377 static_assert(decltype(f(i))::value == 1, "");
5378 static_assert(decltype(f(c))::value == 2, "");
5379 static_assert(decltype(f(0))::value == 3, "");
5380 }
5381
5382 }
5383
5384 namespace test_uniform_initialization
5385 {
5386
5387 struct test
5388 {
5389 static const int zero {};
5390 static const int one {1};
5391 };
5392
5393 static_assert(test::zero == 0, "");
5394 static_assert(test::one == 1, "");
5395
5396 }
5397
5398 namespace test_lambdas
5399 {
5400
5401 void
5402 test1()
5403 {
5404 auto lambda1 = [](){};
5405 auto lambda2 = lambda1;
5406 lambda1();
5407 lambda2();
5408 }
5409
5410 int
5411 test2()
5412 {
5413 auto a = [](int i, int j){ return i + j; }(1, 2);
5414 auto b = []() -> int { return '0'; }();
5415 auto c = [=](){ return a + b; }();
5416 auto d = [&](){ return c; }();
5417 auto e = [a, &b](int x) mutable {
5418 const auto identity = [](int y){ return y; };
5419 for (auto i = 0; i < a; ++i)
5420 a += b--;
5421 return x + identity(a + b);
5422 }(0);
5423 return a + b + c + d + e;
5424 }
5425
5426 int
5427 test3()
5428 {
5429 const auto nullary = [](){ return 0; };
5430 const auto unary = [](int x){ return x; };
5431 using nullary_t = decltype(nullary);
5432 using unary_t = decltype(unary);
5433 const auto higher1st = [](nullary_t f){ return f(); };
5434 const auto higher2nd = [unary](nullary_t f1){
5435 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5436 };
5437 return higher1st(nullary) + higher2nd(nullary)(unary);
5438 }
5439
5440 }
5441
5442 namespace test_variadic_templates
5443 {
5444
5445 template <int...>
5446 struct sum;
5447
5448 template <int N0, int... N1toN>
5449 struct sum<N0, N1toN...>
5450 {
5451 static constexpr auto value = N0 + sum<N1toN...>::value;
5452 };
5453
5454 template <>
5455 struct sum<>
5456 {
5457 static constexpr auto value = 0;
5458 };
5459
5460 static_assert(sum<>::value == 0, "");
5461 static_assert(sum<1>::value == 1, "");
5462 static_assert(sum<23>::value == 23, "");
5463 static_assert(sum<1, 2>::value == 3, "");
5464 static_assert(sum<5, 5, 11>::value == 21, "");
5465 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5466
5467 }
5468
5469 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5470 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5471 // because of this.
5472 namespace test_template_alias_sfinae
5473 {
5474
5475 struct foo {};
5476
5477 template<typename T>
5478 using member = typename T::member_type;
5479
5480 template<typename T>
5481 void func(...) {}
5482
5483 template<typename T>
5484 void func(member<T>*) {}
5485
5486 void test();
5487
5488 void test() { func<foo>(0); }
5489
5490 }
5491
5492} // namespace cxx11
5493
5494#endif // __cplusplus >= 201103L
5495
5496
5497
5498_ACEOF
5499if ac_fn_cxx_try_compile "$LINENO"; then :
5500 ax_cv_cxx_compile_cxx11=yes
5501else
5502 ax_cv_cxx_compile_cxx11=no
5503fi
5504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5505fi
5506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5507$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5508 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5509 ac_success=yes
5510 fi
5511
5512 if test x$ac_success = xno; then
41260ac2
SM
5513 for alternative in ${ax_cxx_compile_alternatives}; do
5514 switch="-std=gnu++${alternative}"
0bcda685
PA
5515 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5517$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5518if eval \${$cachevar+:} false; then :
0bcda685
PA
5519 $as_echo_n "(cached) " >&6
5520else
5521 ac_save_CXX="$CXX"
5522 CXX="$CXX $switch"
5523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5524/* end confdefs.h. */
5525
5526
5527// If the compiler admits that it is not ready for C++11, why torture it?
5528// Hopefully, this will speed up the test.
5529
5530#ifndef __cplusplus
5531
5532#error "This is not a C++ compiler"
5533
5534#elif __cplusplus < 201103L
5535
5536#error "This is not a C++11 compiler"
5537
5538#else
5539
5540namespace cxx11
5541{
5542
5543 namespace test_static_assert
5544 {
5545
5546 template <typename T>
5547 struct check
5548 {
5549 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5550 };
5551
5552 }
5553
5554 namespace test_final_override
5555 {
5556
5557 struct Base
5558 {
5559 virtual void f() {}
5560 };
5561
5562 struct Derived : public Base
5563 {
5564 virtual void f() override {}
5565 };
5566
5567 }
5568
5569 namespace test_double_right_angle_brackets
5570 {
5571
5572 template < typename T >
5573 struct check {};
5574
5575 typedef check<void> single_type;
5576 typedef check<check<void>> double_type;
5577 typedef check<check<check<void>>> triple_type;
5578 typedef check<check<check<check<void>>>> quadruple_type;
5579
5580 }
5581
5582 namespace test_decltype
5583 {
5584
5585 int
5586 f()
5587 {
5588 int a = 1;
5589 decltype(a) b = 2;
5590 return a + b;
5591 }
5592
5593 }
5594
5595 namespace test_type_deduction
5596 {
5597
5598 template < typename T1, typename T2 >
5599 struct is_same
5600 {
5601 static const bool value = false;
5602 };
5603
5604 template < typename T >
5605 struct is_same<T, T>
5606 {
5607 static const bool value = true;
5608 };
5609
5610 template < typename T1, typename T2 >
5611 auto
5612 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5613 {
5614 return a1 + a2;
5615 }
5616
5617 int
5618 test(const int c, volatile int v)
5619 {
5620 static_assert(is_same<int, decltype(0)>::value == true, "");
5621 static_assert(is_same<int, decltype(c)>::value == false, "");
5622 static_assert(is_same<int, decltype(v)>::value == false, "");
5623 auto ac = c;
5624 auto av = v;
5625 auto sumi = ac + av + 'x';
5626 auto sumf = ac + av + 1.0;
5627 static_assert(is_same<int, decltype(ac)>::value == true, "");
5628 static_assert(is_same<int, decltype(av)>::value == true, "");
5629 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5630 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5631 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5632 return (sumf > 0.0) ? sumi : add(c, v);
5633 }
5634
5635 }
5636
5637 namespace test_noexcept
5638 {
5639
5640 int f() { return 0; }
5641 int g() noexcept { return 0; }
5642
5643 static_assert(noexcept(f()) == false, "");
5644 static_assert(noexcept(g()) == true, "");
5645
5646 }
5647
5648 namespace test_constexpr
5649 {
5650
5651 template < typename CharT >
5652 unsigned long constexpr
5653 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5654 {
5655 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5656 }
5657
5658 template < typename CharT >
5659 unsigned long constexpr
5660 strlen_c(const CharT *const s) noexcept
5661 {
5662 return strlen_c_r(s, 0UL);
5663 }
5664
5665 static_assert(strlen_c("") == 0UL, "");
5666 static_assert(strlen_c("1") == 1UL, "");
5667 static_assert(strlen_c("example") == 7UL, "");
5668 static_assert(strlen_c("another\0example") == 7UL, "");
5669
5670 }
5671
5672 namespace test_rvalue_references
5673 {
5674
5675 template < int N >
5676 struct answer
5677 {
5678 static constexpr int value = N;
5679 };
5680
5681 answer<1> f(int&) { return answer<1>(); }
5682 answer<2> f(const int&) { return answer<2>(); }
5683 answer<3> f(int&&) { return answer<3>(); }
5684
5685 void
5686 test()
5687 {
5688 int i = 0;
5689 const int c = 0;
5690 static_assert(decltype(f(i))::value == 1, "");
5691 static_assert(decltype(f(c))::value == 2, "");
5692 static_assert(decltype(f(0))::value == 3, "");
5693 }
5694
5695 }
5696
5697 namespace test_uniform_initialization
5698 {
5699
5700 struct test
5701 {
5702 static const int zero {};
5703 static const int one {1};
5704 };
5705
5706 static_assert(test::zero == 0, "");
5707 static_assert(test::one == 1, "");
5708
5709 }
5710
5711 namespace test_lambdas
5712 {
5713
5714 void
5715 test1()
5716 {
5717 auto lambda1 = [](){};
5718 auto lambda2 = lambda1;
5719 lambda1();
5720 lambda2();
5721 }
5722
5723 int
5724 test2()
5725 {
5726 auto a = [](int i, int j){ return i + j; }(1, 2);
5727 auto b = []() -> int { return '0'; }();
5728 auto c = [=](){ return a + b; }();
5729 auto d = [&](){ return c; }();
5730 auto e = [a, &b](int x) mutable {
5731 const auto identity = [](int y){ return y; };
5732 for (auto i = 0; i < a; ++i)
5733 a += b--;
5734 return x + identity(a + b);
5735 }(0);
5736 return a + b + c + d + e;
5737 }
5738
5739 int
5740 test3()
5741 {
5742 const auto nullary = [](){ return 0; };
5743 const auto unary = [](int x){ return x; };
5744 using nullary_t = decltype(nullary);
5745 using unary_t = decltype(unary);
5746 const auto higher1st = [](nullary_t f){ return f(); };
5747 const auto higher2nd = [unary](nullary_t f1){
5748 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5749 };
5750 return higher1st(nullary) + higher2nd(nullary)(unary);
5751 }
5752
5753 }
5754
5755 namespace test_variadic_templates
5756 {
5757
5758 template <int...>
5759 struct sum;
5760
5761 template <int N0, int... N1toN>
5762 struct sum<N0, N1toN...>
5763 {
5764 static constexpr auto value = N0 + sum<N1toN...>::value;
5765 };
5766
5767 template <>
5768 struct sum<>
5769 {
5770 static constexpr auto value = 0;
5771 };
5772
5773 static_assert(sum<>::value == 0, "");
5774 static_assert(sum<1>::value == 1, "");
5775 static_assert(sum<23>::value == 23, "");
5776 static_assert(sum<1, 2>::value == 3, "");
5777 static_assert(sum<5, 5, 11>::value == 21, "");
5778 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5779
5780 }
5781
5782 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5783 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5784 // because of this.
5785 namespace test_template_alias_sfinae
5786 {
5787
5788 struct foo {};
5789
5790 template<typename T>
5791 using member = typename T::member_type;
5792
5793 template<typename T>
5794 void func(...) {}
5795
5796 template<typename T>
5797 void func(member<T>*) {}
5798
5799 void test();
5800
5801 void test() { func<foo>(0); }
5802
5803 }
5804
5805} // namespace cxx11
5806
5807#endif // __cplusplus >= 201103L
5808
5809
5810
5811_ACEOF
5812if ac_fn_cxx_try_compile "$LINENO"; then :
5813 eval $cachevar=yes
5814else
5815 eval $cachevar=no
5816fi
5817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5818 CXX="$ac_save_CXX"
5819fi
5820eval ac_res=\$$cachevar
5821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5822$as_echo "$ac_res" >&6; }
5823 if eval test x\$$cachevar = xyes; then
5824 CXX_DIALECT="$switch"
5825 ac_success=yes
5826 break
5827 fi
5828 done
5829 fi
5830
5831 if test x$ac_success = xno; then
41260ac2
SM
5832 for alternative in ${ax_cxx_compile_alternatives}; do
5833 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5834 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5836$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5837if eval \${$cachevar+:} false; then :
0bcda685
PA
5838 $as_echo_n "(cached) " >&6
5839else
5840 ac_save_CXX="$CXX"
41260ac2
SM
5841 CXX="$CXX $switch"
5842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5843/* end confdefs.h. */
5844
5845
5846// If the compiler admits that it is not ready for C++11, why torture it?
5847// Hopefully, this will speed up the test.
5848
5849#ifndef __cplusplus
5850
5851#error "This is not a C++ compiler"
5852
5853#elif __cplusplus < 201103L
5854
5855#error "This is not a C++11 compiler"
5856
5857#else
5858
5859namespace cxx11
5860{
5861
5862 namespace test_static_assert
5863 {
5864
5865 template <typename T>
5866 struct check
5867 {
5868 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5869 };
5870
5871 }
5872
5873 namespace test_final_override
5874 {
5875
5876 struct Base
5877 {
5878 virtual void f() {}
5879 };
5880
5881 struct Derived : public Base
5882 {
5883 virtual void f() override {}
5884 };
5885
5886 }
5887
5888 namespace test_double_right_angle_brackets
5889 {
5890
5891 template < typename T >
5892 struct check {};
5893
5894 typedef check<void> single_type;
5895 typedef check<check<void>> double_type;
5896 typedef check<check<check<void>>> triple_type;
5897 typedef check<check<check<check<void>>>> quadruple_type;
5898
5899 }
5900
5901 namespace test_decltype
5902 {
5903
5904 int
5905 f()
5906 {
5907 int a = 1;
5908 decltype(a) b = 2;
5909 return a + b;
5910 }
5911
5912 }
5913
5914 namespace test_type_deduction
5915 {
5916
5917 template < typename T1, typename T2 >
5918 struct is_same
5919 {
5920 static const bool value = false;
5921 };
5922
5923 template < typename T >
5924 struct is_same<T, T>
5925 {
5926 static const bool value = true;
5927 };
5928
5929 template < typename T1, typename T2 >
5930 auto
5931 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5932 {
5933 return a1 + a2;
5934 }
5935
5936 int
5937 test(const int c, volatile int v)
5938 {
5939 static_assert(is_same<int, decltype(0)>::value == true, "");
5940 static_assert(is_same<int, decltype(c)>::value == false, "");
5941 static_assert(is_same<int, decltype(v)>::value == false, "");
5942 auto ac = c;
5943 auto av = v;
5944 auto sumi = ac + av + 'x';
5945 auto sumf = ac + av + 1.0;
5946 static_assert(is_same<int, decltype(ac)>::value == true, "");
5947 static_assert(is_same<int, decltype(av)>::value == true, "");
5948 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5949 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5950 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5951 return (sumf > 0.0) ? sumi : add(c, v);
5952 }
5953
5954 }
5955
5956 namespace test_noexcept
5957 {
5958
5959 int f() { return 0; }
5960 int g() noexcept { return 0; }
5961
5962 static_assert(noexcept(f()) == false, "");
5963 static_assert(noexcept(g()) == true, "");
5964
5965 }
5966
5967 namespace test_constexpr
5968 {
5969
5970 template < typename CharT >
5971 unsigned long constexpr
5972 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5973 {
5974 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5975 }
5976
5977 template < typename CharT >
5978 unsigned long constexpr
5979 strlen_c(const CharT *const s) noexcept
5980 {
5981 return strlen_c_r(s, 0UL);
5982 }
5983
5984 static_assert(strlen_c("") == 0UL, "");
5985 static_assert(strlen_c("1") == 1UL, "");
5986 static_assert(strlen_c("example") == 7UL, "");
5987 static_assert(strlen_c("another\0example") == 7UL, "");
5988
5989 }
5990
5991 namespace test_rvalue_references
5992 {
5993
5994 template < int N >
5995 struct answer
5996 {
5997 static constexpr int value = N;
5998 };
5999
6000 answer<1> f(int&) { return answer<1>(); }
6001 answer<2> f(const int&) { return answer<2>(); }
6002 answer<3> f(int&&) { return answer<3>(); }
6003
6004 void
6005 test()
6006 {
6007 int i = 0;
6008 const int c = 0;
6009 static_assert(decltype(f(i))::value == 1, "");
6010 static_assert(decltype(f(c))::value == 2, "");
6011 static_assert(decltype(f(0))::value == 3, "");
6012 }
6013
6014 }
6015
6016 namespace test_uniform_initialization
6017 {
6018
6019 struct test
6020 {
6021 static const int zero {};
6022 static const int one {1};
6023 };
6024
6025 static_assert(test::zero == 0, "");
6026 static_assert(test::one == 1, "");
6027
6028 }
6029
6030 namespace test_lambdas
6031 {
6032
6033 void
6034 test1()
6035 {
6036 auto lambda1 = [](){};
6037 auto lambda2 = lambda1;
6038 lambda1();
6039 lambda2();
6040 }
6041
6042 int
6043 test2()
6044 {
6045 auto a = [](int i, int j){ return i + j; }(1, 2);
6046 auto b = []() -> int { return '0'; }();
6047 auto c = [=](){ return a + b; }();
6048 auto d = [&](){ return c; }();
6049 auto e = [a, &b](int x) mutable {
6050 const auto identity = [](int y){ return y; };
6051 for (auto i = 0; i < a; ++i)
6052 a += b--;
6053 return x + identity(a + b);
6054 }(0);
6055 return a + b + c + d + e;
6056 }
6057
6058 int
6059 test3()
6060 {
6061 const auto nullary = [](){ return 0; };
6062 const auto unary = [](int x){ return x; };
6063 using nullary_t = decltype(nullary);
6064 using unary_t = decltype(unary);
6065 const auto higher1st = [](nullary_t f){ return f(); };
6066 const auto higher2nd = [unary](nullary_t f1){
6067 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6068 };
6069 return higher1st(nullary) + higher2nd(nullary)(unary);
6070 }
6071
6072 }
6073
6074 namespace test_variadic_templates
6075 {
6076
6077 template <int...>
6078 struct sum;
6079
6080 template <int N0, int... N1toN>
6081 struct sum<N0, N1toN...>
6082 {
6083 static constexpr auto value = N0 + sum<N1toN...>::value;
6084 };
6085
6086 template <>
6087 struct sum<>
6088 {
6089 static constexpr auto value = 0;
6090 };
6091
6092 static_assert(sum<>::value == 0, "");
6093 static_assert(sum<1>::value == 1, "");
6094 static_assert(sum<23>::value == 23, "");
6095 static_assert(sum<1, 2>::value == 3, "");
6096 static_assert(sum<5, 5, 11>::value == 21, "");
6097 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6098
6099 }
6100
6101 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6102 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6103 // because of this.
6104 namespace test_template_alias_sfinae
6105 {
6106
6107 struct foo {};
6108
6109 template<typename T>
6110 using member = typename T::member_type;
6111
6112 template<typename T>
6113 void func(...) {}
6114
6115 template<typename T>
6116 void func(member<T>*) {}
6117
6118 void test();
6119
6120 void test() { func<foo>(0); }
6121
6122 }
6123
6124} // namespace cxx11
6125
6126#endif // __cplusplus >= 201103L
6127
6128
6129
6130_ACEOF
6131if ac_fn_cxx_try_compile "$LINENO"; then :
6132 eval $cachevar=yes
6133else
6134 eval $cachevar=no
6135fi
6136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6137 CXX="$ac_save_CXX"
0bcda685
PA
6138fi
6139eval ac_res=\$$cachevar
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6141$as_echo "$ac_res" >&6; }
41260ac2
SM
6142 if eval test x\$$cachevar = xyes; then
6143 CXX_DIALECT="$switch"
6144 ac_success=yes
6145 break
6146 fi
6147 done
6148 if test x$ac_success = xyes; then
0bcda685
PA
6149 break
6150 fi
6151 done
6152 fi
6153 ac_ext=c
6154ac_cpp='$CPP $CPPFLAGS'
6155ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6156ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6157ac_compiler_gnu=$ac_cv_c_compiler_gnu
6158
6159 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6160 if test x$ac_success = xno; then
d0ac1c44 6161 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6162 fi
6163 fi
6164 if test x$ac_success = xno; then
6165 HAVE_CXX11=0
6166 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6167$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6168 else
6169 HAVE_CXX11=1
6170
6171$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6172
6173 fi
6174
6175
6176
6177
a417dc56
RW
6178# Dependency checking.
6179rm -rf .tst 2>/dev/null
6180mkdir .tst 2>/dev/null
6181if test -d .tst; then
6182 am__leading_dot=.
6183else
6184 am__leading_dot=_
6185fi
6186rmdir .tst 2>/dev/null
6187
6188DEPDIR="${am__leading_dot}deps"
6189
81ecdfbb 6190ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6191
6192
6193depcc="$CC" am_compiler_list=
6194
6195am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6197$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6198if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6199 $as_echo_n "(cached) " >&6
a417dc56
RW
6200else
6201 if test -f "$am_depcomp"; then
6202 # We make a subdir and do the tests there. Otherwise we can end up
6203 # making bogus files that we don't know about and never remove. For
6204 # instance it was reported that on HP-UX the gcc test will end up
6205 # making a dummy file named `D' -- because `-MD' means `put the output
6206 # in D'.
6207 mkdir conftest.dir
6208 # Copy depcomp to subdir because otherwise we won't find it if we're
6209 # using a relative directory.
6210 cp "$am_depcomp" conftest.dir
6211 cd conftest.dir
6212 # We will build objects and dependencies in a subdirectory because
6213 # it helps to detect inapplicable dependency modes. For instance
6214 # both Tru64's cc and ICC support -MD to output dependencies as a
6215 # side effect of compilation, but ICC will put the dependencies in
6216 # the current directory while Tru64 will put them in the object
6217 # directory.
6218 mkdir sub
6219
6220 am_cv_CC_dependencies_compiler_type=none
6221 if test "$am_compiler_list" = ""; then
6222 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6223 fi
6224 for depmode in $am_compiler_list; do
6225 if test $depmode = none; then break; fi
6226
81ecdfbb 6227 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6228 # Setup a source with many dependencies, because some compilers
6229 # like to wrap large dependency lists on column 80 (with \), and
6230 # we should not choose a depcomp mode which is confused by this.
6231 #
6232 # We need to recreate these files for each test, as the compiler may
6233 # overwrite some of them when testing with obscure command lines.
6234 # This happens at least with the AIX C compiler.
6235 : > sub/conftest.c
6236 for i in 1 2 3 4 5 6; do
6237 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6238 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6239 # Solaris 8's {/usr,}/bin/sh.
6240 touch sub/conftst$i.h
6241 done
6242 echo "include sub/conftest.Po" > confmf
6243
6244 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6245 # mode. It turns out that the SunPro C++ compiler does not properly
6246 # handle `-M -o', and we need to detect this.
6247 depcmd="depmode=$depmode \
6248 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6249 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6250 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6251 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6252 if env $depcmd > conftest.err 2>&1 &&
6253 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6254 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6255 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6256 # icc doesn't choke on unknown options, it will just issue warnings
6257 # or remarks (even with -Werror). So we grep stderr for any message
6258 # that says an option was ignored or not supported.
6259 # When given -MP, icc 7.0 and 7.1 complain thusly:
6260 # icc: Command line warning: ignoring option '-M'; no argument required
6261 # The diagnosis changed in icc 8.0:
6262 # icc: Command line remark: option '-MP' not supported
6263 if (grep 'ignoring option' conftest.err ||
6264 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6265 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6266 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6267 break
6268 fi
6269 fi
81ecdfbb 6270 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6271 sed -e 's/^/| /' < conftest.err >&5
6272 done
6273
6274 cd ..
6275 rm -rf conftest.dir
6276else
6277 am_cv_CC_dependencies_compiler_type=none
6278fi
6279
6280fi
81ecdfbb
RW
6281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6282$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6283if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6284then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6285else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6286
6287fi
6288
6289
c971b7fa
PA
6290
6291CONFIG_OBS=
6292CONFIG_DEPS=
6293CONFIG_SRCS=
6294ENABLE_CFLAGS=
6295
6296CONFIG_ALL=
6297CONFIG_CLEAN=
6298CONFIG_INSTALL=
6299CONFIG_UNINSTALL=
6300
6301# If we haven't got the data from the intl directory,
6302# assume NLS is disabled.
6303USE_NLS=no
6304LIBINTL=
6305LIBINTL_DEP=
6306INCINTL=
6307XGETTEXT=
6308GMSGFMT=
6309POSUB=
783e057b
DJ
6310
6311if test -f ../intl/config.intl; then
6312 . ../intl/config.intl
6313fi
81ecdfbb
RW
6314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6315$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6316if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6318$as_echo "no" >&6; }
783e057b 6319else
81ecdfbb
RW
6320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6321$as_echo "yes" >&6; }
783e057b 6322
81ecdfbb 6323$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6324
6325
81ecdfbb
RW
6326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6327$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6328 # Look for .po and .gmo files in the source directory.
6329 CATALOGS=
6330 XLINGUAS=
6331 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6332 # If there aren't any .gmo files the shell will give us the
6333 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6334 # weeded out.
6335 case "$cat" in *\**)
6336 continue;;
6337 esac
6338 # The quadruple backslash is collapsed to a double backslash
6339 # by the backticks, then collapsed again by the double quotes,
6340 # leaving us with one backslash in the sed expression (right
6341 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6342 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6343 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6344 # The user is allowed to set LINGUAS to a list of languages to
6345 # install catalogs for. If it's empty that means "all of them."
6346 if test "x$LINGUAS" = x; then
6347 CATALOGS="$CATALOGS $cat"
6348 XLINGUAS="$XLINGUAS $lang"
6349 else
6350 case "$LINGUAS" in *$lang*)
6351 CATALOGS="$CATALOGS $cat"
6352 XLINGUAS="$XLINGUAS $lang"
6353 ;;
6354 esac
e28b3332
DJ
6355 fi
6356 done
c971b7fa
PA
6357 LINGUAS="$XLINGUAS"
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6359$as_echo "$LINGUAS" >&6; }
6360
6361
6362 DATADIRNAME=share
6363
6364 INSTOBJEXT=.mo
6365
6366 GENCAT=gencat
6367
6368 CATOBJEXT=.gmo
e28b3332 6369
e28b3332
DJ
6370fi
6371
c971b7fa
PA
6372localedir='${datadir}/locale'
6373
6374
6375if test x"$USE_NLS" = xyes; then
6376 CONFIG_ALL="$CONFIG_ALL all-po"
6377 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6378 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6379 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6380fi
e28b3332 6381
c971b7fa
PA
6382PACKAGE=gdb
6383
6384cat >>confdefs.h <<_ACEOF
6385#define PACKAGE "$PACKAGE"
6386_ACEOF
6387
6388
6389
6390# We never need to detect it in this sub-configure.
6391# But preserve it for config.status --recheck.
6392
6393
6394
6395MAKEINFO_EXTRA_FLAGS=""
6396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6397$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6398if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6399 $as_echo_n "(cached) " >&6
6400else
6401 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6402 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6403 gdb_cv_have_makeinfo_click=yes
6404 else
6405 gdb_cv_have_makeinfo_click=no
6406 fi
6407fi
6408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6409$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6410if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6411 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6412fi
e28b3332
DJ
6413
6414
bec39cab
AC
6415
6416
81ecdfbb
RW
6417# Check whether --with-separate-debug-dir was given.
6418if test "${with_separate_debug_dir+set}" = set; then :
6419 withval=$with_separate_debug_dir;
b14b1491
TT
6420 DEBUGDIR=$withval
6421else
6422 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6423fi
6424
20e95c23 6425
783e057b
DJ
6426 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6427 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6428 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6429 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6430
783e057b
DJ
6431cat >>confdefs.h <<_ACEOF
6432#define DEBUGDIR "$ac_define_dir"
20e95c23 6433_ACEOF
20e95c23 6434
20e95c23 6435
20e95c23 6436
0c4a4063 6437
b14b1491
TT
6438 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6439 if test "x$prefix" = xNONE; then
6440 test_prefix=/usr/local
6441 else
6442 test_prefix=$prefix
6443 fi
783e057b 6444 else
b14b1491 6445 test_prefix=$exec_prefix
783e057b 6446 fi
b14b1491
TT
6447 value=0
6448 case ${ac_define_dir} in
6449 "${test_prefix}"|"${test_prefix}/"*|\
6450 '${exec_prefix}'|'${exec_prefix}/'*)
6451 value=1
6452 ;;
6453 esac
6454
6455cat >>confdefs.h <<_ACEOF
6456#define DEBUGDIR_RELOCATABLE $value
6457_ACEOF
6458
6459
6460
0c4a4063 6461
f83d8a90
DE
6462# We can't pass paths as command line arguments.
6463# Mingw32 tries to be clever and will convert the paths for us.
6464# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6465# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6466# This breaks GDB's relocatable path conversions since paths passed in
6467# config.h would not get so translated, the path prefixes no longer match.
6468
6469 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6470 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6471 ac_define_dir=`eval echo $bindir`
6472 ac_define_dir=`eval echo $ac_define_dir`
6473
6474cat >>confdefs.h <<_ACEOF
6475#define BINDIR "$ac_define_dir"
6476_ACEOF
6477
6478
6479
b14b1491
TT
6480# GDB's datadir relocation
6481
6482
6483
81ecdfbb
RW
6484# Check whether --with-gdb-datadir was given.
6485if test "${with_gdb_datadir+set}" = set; then :
6486 withval=$with_gdb_datadir;
b14b1491 6487 GDB_DATADIR=$withval
20e95c23 6488else
b14b1491 6489 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6490fi
6491
20e95c23 6492
b14b1491
TT
6493 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6494 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6495 ac_define_dir=`eval echo $GDB_DATADIR`
6496 ac_define_dir=`eval echo $ac_define_dir`
6497
6498cat >>confdefs.h <<_ACEOF
6499#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6500_ACEOF
6501
b14b1491
TT
6502
6503
0c4a4063 6504
b14b1491
TT
6505 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6506 if test "x$prefix" = xNONE; then
6507 test_prefix=/usr/local
6508 else
6509 test_prefix=$prefix
6510 fi
6511 else
6512 test_prefix=$exec_prefix
6513 fi
6514 value=0
6515 case ${ac_define_dir} in
6516 "${test_prefix}"|"${test_prefix}/"*|\
6517 '${exec_prefix}'|'${exec_prefix}/'*)
6518 value=1
6519 ;;
6520 esac
6521
6522cat >>confdefs.h <<_ACEOF
6523#define GDB_DATADIR_RELOCATABLE $value
6524_ACEOF
6525
6526
783e057b 6527
20e95c23 6528
0c4a4063 6529
81ecdfbb
RW
6530# Check whether --with-relocated-sources was given.
6531if test "${with_relocated_sources+set}" = set; then :
6532 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6533
6534 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6535 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6536 ac_define_dir=`eval echo $reloc_srcdir`
6537 ac_define_dir=`eval echo $ac_define_dir`
6538
6539cat >>confdefs.h <<_ACEOF
6540#define RELOC_SRCDIR "$ac_define_dir"
6541_ACEOF
6542
6543
6544
81ecdfbb
RW
6545fi
6546
29b0e8a2 6547
7349ff92
JK
6548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6549$as_echo_n "checking for default auto-load directory... " >&6; }
6550
6551# Check whether --with-auto-load-dir was given.
6552if test "${with_auto_load_dir+set}" = set; then :
6553 withval=$with_auto_load_dir;
6554else
1564a261 6555 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6556fi
6557
2861ee4f 6558escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6559
6560 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6561 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6562 ac_define_dir=`eval echo $escape_dir`
6563 ac_define_dir=`eval echo $ac_define_dir`
6564
6565cat >>confdefs.h <<_ACEOF
6566#define AUTO_LOAD_DIR "$ac_define_dir"
6567_ACEOF
6568
6569
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6571$as_echo "$with_auto_load_dir" >&6; }
6572
bccbefd2
JK
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6574$as_echo_n "checking for default auto-load safe-path... " >&6; }
6575
6576# Check whether --with-auto-load-safe-path was given.
6577if test "${with_auto_load_safe_path+set}" = set; then :
6578 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6579 with_auto_load_safe_path="/"
6580 fi
bccbefd2 6581else
7349ff92 6582 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6583fi
6584
2861ee4f 6585escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6586
6587 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6588 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6589 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6590 ac_define_dir=`eval echo $ac_define_dir`
6591
6592cat >>confdefs.h <<_ACEOF
6dea1fbd 6593#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6594_ACEOF
6595
6596
6597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6598$as_echo "$with_auto_load_safe_path" >&6; }
6599
29b0e8a2 6600
20e95c23 6601
5ae98d25 6602subdirs="$subdirs testsuite"
20e95c23
DJ
6603
6604
783e057b 6605# Check whether to support alternative target configurations
81ecdfbb
RW
6606# Check whether --enable-targets was given.
6607if test "${enable_targets+set}" = set; then :
6608 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6609 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6610 ;;
6611 no) enable_targets= ;;
6612 *) enable_targets=$enableval ;;
6613esac
81ecdfbb
RW
6614fi
6615
20e95c23 6616
783e057b 6617# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6618# Check whether --enable-64-bit-bfd was given.
6619if test "${enable_64_bit_bfd+set}" = set; then :
6620 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6621 yes) want64=true ;;
6622 no) want64=false ;;
d0ac1c44 6623 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6624esac
6625else
6626 want64=false
81ecdfbb
RW
6627fi
6628
783e057b
DJ
6629# Provide defaults for some variables set by the per-host and per-target
6630# configuration.
6631gdb_host_obs=posix-hdep.o
20e95c23 6632
783e057b
DJ
6633if test "${target}" = "${host}"; then
6634 gdb_native=yes
6635else
6636 gdb_native=no
6637fi
20e95c23 6638
783e057b 6639. $srcdir/configure.host
20e95c23 6640
783e057b 6641# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6642
783e057b
DJ
6643TARGET_OBS=
6644all_targets=
b292c783 6645HAVE_NATIVE_GCORE_TARGET=
20e95c23 6646
783e057b 6647for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6648do
783e057b
DJ
6649 if test "$targ_alias" = "all"; then
6650 all_targets=true
6651 else
6652 # Canonicalize the secondary target names.
6653 result=`$ac_config_sub $targ_alias 2>/dev/null`
6654 if test -n "$result"; then
6655 targ=$result
6656 else
6657 targ=$targ_alias
6658 fi
20e95c23 6659
783e057b 6660 . ${srcdir}/configure.tgt
20e95c23 6661
bf307134 6662 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6663 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6664fi
6665
783e057b
DJ
6666 # Target-specific object files
6667 for i in ${gdb_target_obs}; do
6668 case " $TARGET_OBS " in
6669 *" ${i} "*) ;;
6670 *)
6671 TARGET_OBS="$TARGET_OBS ${i}"
6672 ;;
6673 esac
6674 done
20e95c23 6675
783e057b
DJ
6676 # Check whether this target needs 64-bit CORE_ADDR
6677 if test x${want64} = xfalse; then
6678 . ${srcdir}/../bfd/config.bfd
6679 fi
b292c783
JK
6680
6681 # Check whether this target is native and supports gcore.
6682 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6683 && $gdb_have_gcore; then
6684 HAVE_NATIVE_GCORE_TARGET=1
6685 fi
783e057b 6686 fi
20e95c23
DJ
6687done
6688
783e057b
DJ
6689if test x${all_targets} = xtrue; then
6690
6691 # We want all 64-bit targets if we either:
6692 # - run on a 64-bit host or
6693 # - already require 64-bit support for some other target or
6694 # - the --enable-64-bit-bfd option was supplied
6695 # Otherwise we only support all 32-bit targets.
6696 #
6697 # NOTE: This test must be in sync with the corresponding
6698 # tests in BFD!
20e95c23 6699
783e057b 6700 if test x${want64} = xfalse; then
81ecdfbb
RW
6701 # The cast to long int works around a bug in the HP C Compiler
6702# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6703# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6704# This bug is HP SR number 8606223364.
6705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6706$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6707if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6708 $as_echo_n "(cached) " >&6
c0993dbe 6709else
81ecdfbb 6710 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6711
81ecdfbb
RW
6712else
6713 if test "$ac_cv_type_long" = yes; then
6714 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6715$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6716as_fn_error 77 "cannot compute sizeof (long)
6717See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6718 else
6719 ac_cv_sizeof_long=0
6720 fi
c0993dbe 6721fi
81ecdfbb 6722
c0993dbe 6723fi
81ecdfbb
RW
6724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6725$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6726
c0993dbe 6727
c0993dbe 6728
c0993dbe
UW
6729cat >>confdefs.h <<_ACEOF
6730#define SIZEOF_LONG $ac_cv_sizeof_long
6731_ACEOF
6732
6733
6734 if test "x${ac_cv_sizeof_long}" = "x8"; then
6735 want64=true
6736 fi
6737 fi
6738 if test x${want64} = xtrue; then
6739 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6740 else
6741 TARGET_OBS='$(ALL_TARGET_OBS)'
6742 fi
6743fi
6744
6745
6746
b292c783 6747
c0993dbe
UW
6748# For other settings, only the main target counts.
6749gdb_sim=
6750gdb_osabi=
c0993dbe
UW
6751targ=$target; . ${srcdir}/configure.tgt
6752
6753# Fetch the default architecture and default target vector from BFD.
6754targ=$target; . $srcdir/../bfd/config.bfd
6755
6756# We only want the first architecture, so strip off the others if
6757# there is more than one.
6758targ_archs=`echo $targ_archs | sed 's/ .*//'`
6759
6760if test "x$targ_archs" != x; then
6761
6762cat >>confdefs.h <<_ACEOF
6763#define DEFAULT_BFD_ARCH $targ_archs
6764_ACEOF
6765
6766fi
6767if test "x$targ_defvec" != x; then
6768
6769cat >>confdefs.h <<_ACEOF
6770#define DEFAULT_BFD_VEC $targ_defvec
6771_ACEOF
6772
6773fi
6774
c0993dbe 6775# Enable MI.
81ecdfbb
RW
6776# Check whether --enable-gdbmi was given.
6777if test "${enable_gdbmi+set}" = set; then :
6778 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6779 yes | no)
6780 ;;
6781 *)
d0ac1c44 6782 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6783 esac
6784else
6785 enable_gdbmi=yes
81ecdfbb
RW
6786fi
6787
c0993dbe 6788if test x"$enable_gdbmi" = xyes; then
0ad6b8ee 6789 if test -d "$srcdir/mi"; then
c0993dbe
UW
6790 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6791 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6792 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6793 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6794 fi
6795fi
6796
6797# Enable TUI.
81ecdfbb
RW
6798# Check whether --enable-tui was given.
6799if test "${enable_tui+set}" = set; then :
6800 enableval=$enable_tui; case $enableval in
3ca64bd3 6801 yes | no | auto)
c0993dbe
UW
6802 ;;
6803 *)
d0ac1c44 6804 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6805 esac
6806else
3ca64bd3 6807 enable_tui=auto
81ecdfbb
RW
6808fi
6809
c0993dbe
UW
6810
6811# Enable gdbtk.
81ecdfbb
RW
6812# Check whether --enable-gdbtk was given.
6813if test "${enable_gdbtk+set}" = set; then :
6814 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6815 yes | no)
6816 ;;
6817 *)
d0ac1c44 6818 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6819 esac
6820else
0ad6b8ee 6821 if test -d "$srcdir/gdbtk"; then
c0993dbe
UW
6822 enable_gdbtk=yes
6823 else
6824 enable_gdbtk=no
6825 fi
81ecdfbb
RW
6826fi
6827
c0993dbe
UW
6828# We unconditionally disable gdbtk tests on selected platforms.
6829case $host_os in
6830 go32* | windows*)
81ecdfbb
RW
6831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6832$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6833 enable_gdbtk=no ;;
6834esac
6835
0d79cdc4
AM
6836# Handle optional debuginfod support
6837
f6720b1c
AM
6838
6839
6840
6841
6842
6843
6844if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6845 if test -n "$ac_tool_prefix"; then
6846 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6847set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6849$as_echo_n "checking for $ac_word... " >&6; }
6850if ${ac_cv_path_PKG_CONFIG+:} false; then :
6851 $as_echo_n "(cached) " >&6
6852else
6853 case $PKG_CONFIG in
6854 [\\/]* | ?:[\\/]*)
6855 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6856 ;;
6857 *)
6858 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6859for as_dir in $PATH
6860do
6861 IFS=$as_save_IFS
6862 test -z "$as_dir" && as_dir=.
6863 for ac_exec_ext in '' $ac_executable_extensions; do
6864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6865 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6866 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6867 break 2
6868 fi
6869done
6870 done
6871IFS=$as_save_IFS
6872
6873 ;;
6874esac
6875fi
6876PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6877if test -n "$PKG_CONFIG"; then
6878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6879$as_echo "$PKG_CONFIG" >&6; }
6880else
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6882$as_echo "no" >&6; }
6883fi
6884
6885
6886fi
6887if test -z "$ac_cv_path_PKG_CONFIG"; then
6888 ac_pt_PKG_CONFIG=$PKG_CONFIG
6889 # Extract the first word of "pkg-config", so it can be a program name with args.
6890set dummy pkg-config; ac_word=$2
6891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6892$as_echo_n "checking for $ac_word... " >&6; }
6893if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6894 $as_echo_n "(cached) " >&6
6895else
6896 case $ac_pt_PKG_CONFIG in
6897 [\\/]* | ?:[\\/]*)
6898 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6899 ;;
6900 *)
6901 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6902for as_dir in $PATH
6903do
6904 IFS=$as_save_IFS
6905 test -z "$as_dir" && as_dir=.
6906 for ac_exec_ext in '' $ac_executable_extensions; do
6907 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6908 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6910 break 2
6911 fi
6912done
6913 done
6914IFS=$as_save_IFS
6915
6916 ;;
6917esac
6918fi
6919ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6920if test -n "$ac_pt_PKG_CONFIG"; then
6921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6922$as_echo "$ac_pt_PKG_CONFIG" >&6; }
6923else
6924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6925$as_echo "no" >&6; }
6926fi
6927
6928 if test "x$ac_pt_PKG_CONFIG" = x; then
6929 PKG_CONFIG=""
6930 else
6931 case $cross_compiling:$ac_tool_warned in
6932yes:)
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6934$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6935ac_tool_warned=yes ;;
6936esac
6937 PKG_CONFIG=$ac_pt_PKG_CONFIG
6938 fi
6939else
6940 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6941fi
6942
6943fi
6944if test -n "$PKG_CONFIG"; then
6945 _pkg_min_version=0.9.0
6946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
6947$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
6948 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6950$as_echo "yes" >&6; }
6951 else
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6953$as_echo "no" >&6; }
6954 PKG_CONFIG=""
6955 fi
6956fi
6957
6958# Handle optional debuginfod support
0d79cdc4
AM
6959
6960# Check whether --with-debuginfod was given.
6961if test "${with_debuginfod+set}" = set; then :
6962 withval=$with_debuginfod;
6963else
6964 with_debuginfod=auto
6965fi
6966
6967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
6968$as_echo_n "checking whether to use debuginfod... " >&6; }
6969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
6970$as_echo "$with_debuginfod" >&6; }
6971
f6720b1c 6972if test "x$with_debuginfod" != xno; then
0d79cdc4 6973
f6720b1c
AM
6974pkg_failed=no
6975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
6976$as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
6977
6978if test -n "$DEBUGINFOD_CFLAGS"; then
6979 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
6980 elif test -n "$PKG_CONFIG"; then
6981 if test -n "$PKG_CONFIG" && \
6982 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
6983 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
6984 ac_status=$?
6985 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6986 test $ac_status = 0; }; then
6987 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
6988 test "x$?" != "x0" && pkg_failed=yes
0d79cdc4 6989else
f6720b1c 6990 pkg_failed=yes
0d79cdc4 6991fi
f6720b1c
AM
6992 else
6993 pkg_failed=untried
0d79cdc4 6994fi
f6720b1c
AM
6995if test -n "$DEBUGINFOD_LIBS"; then
6996 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
6997 elif test -n "$PKG_CONFIG"; then
6998 if test -n "$PKG_CONFIG" && \
6999 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7000 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7001 ac_status=$?
7002 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7003 test $ac_status = 0; }; then
7004 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7005 test "x$?" != "x0" && pkg_failed=yes
7006else
7007 pkg_failed=yes
0d79cdc4 7008fi
f6720b1c
AM
7009 else
7010 pkg_failed=untried
0d79cdc4 7011fi
bec39cab 7012
377170fa
L
7013if test $pkg_failed = no; then
7014 pkg_save_LDFLAGS="$LDFLAGS"
7015 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
7016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d70f978b
L
7017/* end confdefs.h. */
7018
7019int
7020main ()
7021{
377170fa 7022
d70f978b
L
7023 ;
7024 return 0;
7025}
7026_ACEOF
7027if ac_fn_c_try_link "$LINENO"; then :
377170fa 7028
d70f978b
L
7029else
7030 pkg_failed=yes
7031fi
7032rm -f core conftest.err conftest.$ac_objext \
7033 conftest$ac_exeext conftest.$ac_ext
377170fa
L
7034 LDFLAGS=$pkg_save_LDFLAGS
7035fi
d70f978b 7036
0d79cdc4 7037
0d79cdc4 7038
f6720b1c
AM
7039if test $pkg_failed = yes; then
7040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7041$as_echo "no" >&6; }
0d79cdc4 7042
f6720b1c
AM
7043if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7044 _pkg_short_errors_supported=yes
7045else
7046 _pkg_short_errors_supported=no
7047fi
7048 if test $_pkg_short_errors_supported = yes; then
7049 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7050 else
7051 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7052 fi
7053 # Put the nasty error message in config.log where it belongs
7054 echo "$DEBUGINFOD_PKG_ERRORS" >&5
0d79cdc4 7055
f6720b1c
AM
7056 if test "x$with_debuginfod" = xyes; then
7057 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7058 else
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7060$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7061 fi
7062elif test $pkg_failed = untried; then
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7064$as_echo "no" >&6; }
7065 if test "x$with_debuginfod" = xyes; then
7066 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7067 else
7068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7069$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7070 fi
7071else
7072 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7073 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7075$as_echo "yes" >&6; }
7076
7077$as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7078
7079fi
7080else
7081 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7082$as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
0d79cdc4
AM
7083fi
7084
7085
7086# Libunwind support for ia64.
05e7c244
JK
7087
7088# Check whether --with-libunwind-ia64 was given.
7089if test "${with_libunwind_ia64+set}" = set; then :
7090 withval=$with_libunwind_ia64;
bec39cab 7091else
05e7c244
JK
7092 with_libunwind_ia64=auto
7093fi
bec39cab 7094
05e7c244
JK
7095
7096# Backward compatibility option.
7097if test "${with_libunwind+set}" = set; then
7098 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 7099 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
7100 fi
7101 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7102$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7103 with_libunwind_ia64="$with_libunwind"
7104fi
7105
7106case "$with_libunwind_ia64" in
7107 yes | no)
7108 ;;
7109 auto)
7110 for ac_header in libunwind-ia64.h
81ecdfbb 7111do :
b54a8fd7 7112 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 7113if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 7114 cat >>confdefs.h <<_ACEOF
b54a8fd7 7115#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
7116_ACEOF
7117
7118fi
7119
7120done
7121
05e7c244
JK
7122 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7123 ;;
7124 *)
d0ac1c44 7125 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
7126 ;;
7127esac
bec39cab 7128
05e7c244 7129if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 7130 for ac_header in libunwind-ia64.h
81ecdfbb 7131do :
b54a8fd7 7132 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 7133if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 7134 cat >>confdefs.h <<_ACEOF
b54a8fd7 7135#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
7136_ACEOF
7137
7138fi
7139
7140done
7141
05e7c244 7142 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 7143 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
7144 fi
7145 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7146 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7147 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
7148fi
7149
cb01cfba
JB
7150opt_curses=no
7151
81ecdfbb
RW
7152# Check whether --with-curses was given.
7153if test "${with_curses+set}" = set; then :
7154 withval=$with_curses; opt_curses=$withval
7155fi
7156
cb01cfba 7157
76a39ba7 7158prefer_curses=no
cb01cfba 7159if test "$opt_curses" = "yes"; then
76a39ba7 7160 prefer_curses=yes
cb01cfba
JB
7161fi
7162
a9322a30 7163# Profiling support.
81ecdfbb
RW
7164# Check whether --enable-profiling was given.
7165if test "${enable_profiling+set}" = set; then :
7166 enableval=$enable_profiling; case $enableval in
a9322a30
TT
7167 yes | no)
7168 ;;
7169 *)
d0ac1c44 7170 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
7171 esac
7172else
7173 enable_profiling=no
81ecdfbb 7174fi
bec39cab 7175
a9322a30
TT
7176
7177for ac_func in monstartup _mcleanup
81ecdfbb
RW
7178do :
7179 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7180ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 7181if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
7182 cat >>confdefs.h <<_ACEOF
7183#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 7184_ACEOF
a9322a30 7185
81ecdfbb
RW
7186fi
7187done
a9322a30 7188
81ecdfbb
RW
7189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7190$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 7191if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
7192 $as_echo_n "(cached) " >&6
7193else
7194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7195/* end confdefs.h. */
7196#include <stdlib.h>
5593a99a 7197 extern char _etext;
a9322a30
TT
7198int
7199main ()
7200{
7201free (&_etext);
5593a99a 7202
a9322a30
TT
7203 ;
7204 return 0;
7205}
bec39cab 7206_ACEOF
81ecdfbb 7207if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7208 ac_cv_var__etext=yes
bec39cab 7209else
81ecdfbb 7210 ac_cv_var__etext=no
5593a99a 7211
bec39cab 7212fi
81ecdfbb
RW
7213rm -f core conftest.err conftest.$ac_objext \
7214 conftest$ac_exeext conftest.$ac_ext
5593a99a 7215
bec39cab 7216fi
81ecdfbb
RW
7217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7218$as_echo "$ac_cv_var__etext" >&6; }
0ad6b8ee 7219if test "$ac_cv_var__etext" = yes; then
60ca704f 7220
81ecdfbb 7221$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7222
bec39cab 7223fi
81ecdfbb
RW
7224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7225$as_echo_n "checking for etext... " >&6; }
d0ac1c44 7226if ${ac_cv_var_etext+:} false; then :
81ecdfbb 7227 $as_echo_n "(cached) " >&6
bec39cab 7228else
81ecdfbb 7229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7230/* end confdefs.h. */
a9322a30 7231#include <stdlib.h>
5593a99a 7232 extern char etext;
bec39cab
AC
7233int
7234main ()
7235{
a9322a30 7236free (&etext);
5593a99a 7237
bec39cab
AC
7238 ;
7239 return 0;
7240}
7241_ACEOF
81ecdfbb 7242if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7243 ac_cv_var_etext=yes
bec39cab 7244else
81ecdfbb 7245 ac_cv_var_etext=no
5593a99a 7246
bec39cab 7247fi
81ecdfbb
RW
7248rm -f core conftest.err conftest.$ac_objext \
7249 conftest$ac_exeext conftest.$ac_ext
5593a99a 7250
bec39cab 7251fi
81ecdfbb
RW
7252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7253$as_echo "$ac_cv_var_etext" >&6; }
0ad6b8ee 7254if test "$ac_cv_var_etext" = yes; then
a9322a30 7255
81ecdfbb 7256$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7257
7258fi
a9322a30 7259if test "$enable_profiling" = yes ; then
0ad6b8ee 7260 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
d0ac1c44 7261 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7262 fi
7263 PROFILE_CFLAGS=-pg
7264 OLD_CFLAGS="$CFLAGS"
7265 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7266
81ecdfbb
RW
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7268$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7269if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7270 $as_echo_n "(cached) " >&6
bec39cab 7271else
81ecdfbb 7272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7273/* end confdefs.h. */
bec39cab
AC
7274
7275int
7276main ()
7277{
a9322a30 7278int x;
bec39cab
AC
7279 ;
7280 return 0;
7281}
7282_ACEOF
81ecdfbb 7283if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7284 ac_cv_cc_supports_pg=yes
bec39cab 7285else
81ecdfbb 7286 ac_cv_cc_supports_pg=no
5593a99a 7287
bec39cab 7288fi
81ecdfbb 7289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 7290
bec39cab 7291fi
81ecdfbb
RW
7292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7293$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7294
0ad6b8ee 7295 if test "$ac_cv_cc_supports_pg" = no; then
d0ac1c44 7296 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7297 fi
bec39cab 7298
a9322a30 7299 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7300fi
7301
44cee4fd
TT
7302CODESIGN_CERT=
7303# Check whether --enable-codesign was given.
7304if test "${enable_codesign+set}" = set; then :
7305 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7306fi
7307
7308
7309
c16158bc
JM
7310
7311
81ecdfbb
RW
7312# Check whether --with-pkgversion was given.
7313if test "${with_pkgversion+set}" = set; then :
7314 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7315 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7316 no) PKGVERSION= ;;
7317 *) PKGVERSION="($withval) " ;;
7318 esac
7319else
7320 PKGVERSION="(GDB) "
7321
81ecdfbb 7322fi
c16158bc
JM
7323
7324
7325
7326
81ecdfbb
RW
7327
7328# Check whether --with-bugurl was given.
7329if test "${with_bugurl+set}" = set; then :
7330 withval=$with_bugurl; case "$withval" in
d0ac1c44 7331 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7332 no) BUGURL=
7333 ;;
7334 *) BUGURL="$withval"
7335 ;;
7336 esac
7337else
112c22ed 7338 BUGURL="https://www.gnu.org/software/gdb/bugs/"
c16158bc 7339
81ecdfbb
RW
7340fi
7341
c16158bc
JM
7342 case ${BUGURL} in
7343 "")
7344 REPORT_BUGS_TO=
7345 REPORT_BUGS_TEXI=
7346 ;;
7347 *)
7348 REPORT_BUGS_TO="<$BUGURL>"
7349 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7350 ;;
7351 esac;
7352
7353
7354
7355
7356cat >>confdefs.h <<_ACEOF
7357#define PKGVERSION "$PKGVERSION"
7358_ACEOF
7359
7360
7361cat >>confdefs.h <<_ACEOF
7362#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7363_ACEOF
7364
7365
bec39cab
AC
7366# --------------------- #
7367# Checks for programs. #
7368# --------------------- #
7369
7370for ac_prog in gawk mawk nawk awk
7371do
7372 # Extract the first word of "$ac_prog", so it can be a program name with args.
7373set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7375$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7376if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7377 $as_echo_n "(cached) " >&6
bec39cab
AC
7378else
7379 if test -n "$AWK"; then
7380 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7381else
7382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7383for as_dir in $PATH
7384do
7385 IFS=$as_save_IFS
7386 test -z "$as_dir" && as_dir=.
81ecdfbb 7387 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7388 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7389 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7390 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7391 break 2
7392 fi
7393done
81ecdfbb
RW
7394 done
7395IFS=$as_save_IFS
bec39cab
AC
7396
7397fi
7398fi
7399AWK=$ac_cv_prog_AWK
7400if test -n "$AWK"; then
81ecdfbb
RW
7401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7402$as_echo "$AWK" >&6; }
bec39cab 7403else
81ecdfbb
RW
7404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7405$as_echo "no" >&6; }
bec39cab
AC
7406fi
7407
bec39cab 7408
81ecdfbb 7409 test -n "$AWK" && break
bec39cab
AC
7410done
7411
c971b7fa
PA
7412# Find a good install program. We prefer a C program (faster),
7413# so one script is as good as another. But avoid the broken or
7414# incompatible versions:
7415# SysV /etc/install, /usr/sbin/install
7416# SunOS /usr/etc/install
7417# IRIX /sbin/install
7418# AIX /bin/install
7419# AmigaOS /C/install, which installs bootblocks on floppy discs
7420# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7421# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7422# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7423# OS/2's system install, which has a completely different semantic
7424# ./install, which can be erroneously created by make from ./install.sh.
7425# Reject install programs that cannot install multiple files.
7426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7427$as_echo_n "checking for a BSD-compatible install... " >&6; }
7428if test -z "$INSTALL"; then
d0ac1c44 7429if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7430 $as_echo_n "(cached) " >&6
7431else
7432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7433for as_dir in $PATH
7434do
7435 IFS=$as_save_IFS
7436 test -z "$as_dir" && as_dir=.
7437 # Account for people who put trailing slashes in PATH elements.
7438case $as_dir/ in #((
7439 ./ | .// | /[cC]/* | \
7440 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7441 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7442 /usr/ucb/* ) ;;
7443 *)
7444 # OSF1 and SCO ODT 3.0 have their own names for install.
7445 # Don't use installbsd from OSF since it installs stuff as root
7446 # by default.
7447 for ac_prog in ginstall scoinst install; do
7448 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7449 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7450 if test $ac_prog = install &&
7451 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7452 # AIX install. It has an incompatible calling convention.
7453 :
7454 elif test $ac_prog = install &&
7455 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7456 # program-specific install script used by HP pwplus--don't use.
7457 :
7458 else
7459 rm -rf conftest.one conftest.two conftest.dir
7460 echo one > conftest.one
7461 echo two > conftest.two
7462 mkdir conftest.dir
7463 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7464 test -s conftest.one && test -s conftest.two &&
7465 test -s conftest.dir/conftest.one &&
7466 test -s conftest.dir/conftest.two
7467 then
7468 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7469 break 3
7470 fi
7471 fi
7472 fi
7473 done
7474 done
7475 ;;
7476esac
7477
7478 done
7479IFS=$as_save_IFS
7480
7481rm -rf conftest.one conftest.two conftest.dir
7482
7483fi
7484 if test "${ac_cv_path_install+set}" = set; then
7485 INSTALL=$ac_cv_path_install
7486 else
7487 # As a last resort, use the slow shell script. Don't cache a
7488 # value for INSTALL within a source directory, because that will
7489 # break other packages using the cache if that directory is
7490 # removed, or if the value is a relative name.
7491 INSTALL=$ac_install_sh
7492 fi
7493fi
7494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7495$as_echo "$INSTALL" >&6; }
7496
7497# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7498# It thinks the first close brace ends the variable substitution.
7499test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7500
7501test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7502
7503test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7504
81ecdfbb
RW
7505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7506$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7507LN_S=$as_ln_s
7508if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7510$as_echo "yes" >&6; }
bec39cab 7511else
81ecdfbb
RW
7512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7513$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7514fi
7515
7516if test -n "$ac_tool_prefix"; then
7517 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7518set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7520$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7521if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7522 $as_echo_n "(cached) " >&6
bec39cab
AC
7523else
7524 if test -n "$RANLIB"; then
7525 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7526else
7527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7528for as_dir in $PATH
7529do
7530 IFS=$as_save_IFS
7531 test -z "$as_dir" && as_dir=.
81ecdfbb 7532 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7533 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7534 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7535 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7536 break 2
7537 fi
7538done
81ecdfbb
RW
7539 done
7540IFS=$as_save_IFS
bec39cab
AC
7541
7542fi
7543fi
7544RANLIB=$ac_cv_prog_RANLIB
7545if test -n "$RANLIB"; then
81ecdfbb
RW
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7547$as_echo "$RANLIB" >&6; }
bec39cab 7548else
81ecdfbb
RW
7549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7550$as_echo "no" >&6; }
bec39cab
AC
7551fi
7552
81ecdfbb 7553
bec39cab
AC
7554fi
7555if test -z "$ac_cv_prog_RANLIB"; then
7556 ac_ct_RANLIB=$RANLIB
7557 # Extract the first word of "ranlib", so it can be a program name with args.
7558set dummy ranlib; ac_word=$2
81ecdfbb
RW
7559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7560$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7561if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7562 $as_echo_n "(cached) " >&6
bec39cab
AC
7563else
7564 if test -n "$ac_ct_RANLIB"; then
7565 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7566else
7567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7568for as_dir in $PATH
7569do
7570 IFS=$as_save_IFS
7571 test -z "$as_dir" && as_dir=.
81ecdfbb 7572 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7573 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7574 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7575 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7576 break 2
7577 fi
7578done
81ecdfbb
RW
7579 done
7580IFS=$as_save_IFS
bec39cab 7581
bec39cab
AC
7582fi
7583fi
7584ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7585if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7587$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7588else
81ecdfbb
RW
7589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7590$as_echo "no" >&6; }
bec39cab
AC
7591fi
7592
81ecdfbb
RW
7593 if test "x$ac_ct_RANLIB" = x; then
7594 RANLIB=":"
7595 else
7596 case $cross_compiling:$ac_tool_warned in
7597yes:)
7598{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7599$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7600ac_tool_warned=yes ;;
7601esac
7602 RANLIB=$ac_ct_RANLIB
7603 fi
bec39cab
AC
7604else
7605 RANLIB="$ac_cv_prog_RANLIB"
7606fi
7607
7608for ac_prog in 'bison -y' byacc
7609do
7610 # Extract the first word of "$ac_prog", so it can be a program name with args.
7611set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7613$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7614if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7615 $as_echo_n "(cached) " >&6
bec39cab
AC
7616else
7617 if test -n "$YACC"; then
7618 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7619else
7620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7621for as_dir in $PATH
7622do
7623 IFS=$as_save_IFS
7624 test -z "$as_dir" && as_dir=.
81ecdfbb 7625 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7626 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7627 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7629 break 2
7630 fi
7631done
81ecdfbb
RW
7632 done
7633IFS=$as_save_IFS
bec39cab
AC
7634
7635fi
7636fi
7637YACC=$ac_cv_prog_YACC
7638if test -n "$YACC"; then
81ecdfbb
RW
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7640$as_echo "$YACC" >&6; }
bec39cab 7641else
81ecdfbb
RW
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7643$as_echo "no" >&6; }
bec39cab
AC
7644fi
7645
81ecdfbb 7646
bec39cab
AC
7647 test -n "$YACC" && break
7648done
7649test -n "$YACC" || YACC="yacc"
7650
7651
7652if test -n "$ac_tool_prefix"; then
7653 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7654set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7656$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7657if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7658 $as_echo_n "(cached) " >&6
bec39cab
AC
7659else
7660 if test -n "$AR"; then
7661 ac_cv_prog_AR="$AR" # Let the user override the test.
7662else
7663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7664for as_dir in $PATH
7665do
7666 IFS=$as_save_IFS
7667 test -z "$as_dir" && as_dir=.
81ecdfbb 7668 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7670 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7672 break 2
7673 fi
7674done
81ecdfbb
RW
7675 done
7676IFS=$as_save_IFS
bec39cab
AC
7677
7678fi
7679fi
7680AR=$ac_cv_prog_AR
7681if test -n "$AR"; then
81ecdfbb
RW
7682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7683$as_echo "$AR" >&6; }
bec39cab 7684else
81ecdfbb
RW
7685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7686$as_echo "no" >&6; }
bec39cab
AC
7687fi
7688
81ecdfbb 7689
bec39cab
AC
7690fi
7691if test -z "$ac_cv_prog_AR"; then
7692 ac_ct_AR=$AR
7693 # Extract the first word of "ar", so it can be a program name with args.
7694set dummy ar; ac_word=$2
81ecdfbb
RW
7695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7696$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7697if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7698 $as_echo_n "(cached) " >&6
bec39cab
AC
7699else
7700 if test -n "$ac_ct_AR"; then
7701 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7702else
7703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7704for as_dir in $PATH
7705do
7706 IFS=$as_save_IFS
7707 test -z "$as_dir" && as_dir=.
81ecdfbb 7708 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7709 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7710 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7711 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7712 break 2
7713 fi
7714done
81ecdfbb
RW
7715 done
7716IFS=$as_save_IFS
bec39cab
AC
7717
7718fi
7719fi
7720ac_ct_AR=$ac_cv_prog_ac_ct_AR
7721if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7723$as_echo "$ac_ct_AR" >&6; }
bec39cab 7724else
81ecdfbb
RW
7725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7726$as_echo "no" >&6; }
bec39cab
AC
7727fi
7728
81ecdfbb
RW
7729 if test "x$ac_ct_AR" = x; then
7730 AR=""
7731 else
7732 case $cross_compiling:$ac_tool_warned in
7733yes:)
7734{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7735$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7736ac_tool_warned=yes ;;
7737esac
7738 AR=$ac_ct_AR
7739 fi
bec39cab
AC
7740else
7741 AR="$ac_cv_prog_AR"
7742fi
7743
7744if test -n "$ac_tool_prefix"; then
7745 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7746set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7748$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7749if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7750 $as_echo_n "(cached) " >&6
bec39cab
AC
7751else
7752 if test -n "$DLLTOOL"; then
7753 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7754else
7755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7756for as_dir in $PATH
7757do
7758 IFS=$as_save_IFS
7759 test -z "$as_dir" && as_dir=.
81ecdfbb 7760 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7762 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7764 break 2
7765 fi
7766done
81ecdfbb
RW
7767 done
7768IFS=$as_save_IFS
bec39cab
AC
7769
7770fi
7771fi
7772DLLTOOL=$ac_cv_prog_DLLTOOL
7773if test -n "$DLLTOOL"; then
81ecdfbb
RW
7774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7775$as_echo "$DLLTOOL" >&6; }
bec39cab 7776else
81ecdfbb
RW
7777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7778$as_echo "no" >&6; }
bec39cab
AC
7779fi
7780
81ecdfbb 7781
bec39cab
AC
7782fi
7783if test -z "$ac_cv_prog_DLLTOOL"; then
7784 ac_ct_DLLTOOL=$DLLTOOL
7785 # Extract the first word of "dlltool", so it can be a program name with args.
7786set dummy dlltool; ac_word=$2
81ecdfbb
RW
7787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7788$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7789if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7790 $as_echo_n "(cached) " >&6
bec39cab
AC
7791else
7792 if test -n "$ac_ct_DLLTOOL"; then
7793 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7794else
7795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7796for as_dir in $PATH
7797do
7798 IFS=$as_save_IFS
7799 test -z "$as_dir" && as_dir=.
81ecdfbb 7800 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7802 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7804 break 2
7805 fi
7806done
81ecdfbb
RW
7807 done
7808IFS=$as_save_IFS
bec39cab
AC
7809
7810fi
7811fi
7812ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7813if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7815$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7816else
81ecdfbb
RW
7817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7818$as_echo "no" >&6; }
bec39cab
AC
7819fi
7820
81ecdfbb
RW
7821 if test "x$ac_ct_DLLTOOL" = x; then
7822 DLLTOOL=""
7823 else
7824 case $cross_compiling:$ac_tool_warned in
7825yes:)
7826{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7827$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7828ac_tool_warned=yes ;;
7829esac
7830 DLLTOOL=$ac_ct_DLLTOOL
7831 fi
bec39cab
AC
7832else
7833 DLLTOOL="$ac_cv_prog_DLLTOOL"
7834fi
7835
7836if test -n "$ac_tool_prefix"; then
7837 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7838set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7840$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7841if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7842 $as_echo_n "(cached) " >&6
bec39cab
AC
7843else
7844 if test -n "$WINDRES"; then
7845 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7846else
7847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7848for as_dir in $PATH
7849do
7850 IFS=$as_save_IFS
7851 test -z "$as_dir" && as_dir=.
81ecdfbb 7852 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7853 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7854 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7855 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7856 break 2
7857 fi
7858done
81ecdfbb
RW
7859 done
7860IFS=$as_save_IFS
bec39cab
AC
7861
7862fi
7863fi
7864WINDRES=$ac_cv_prog_WINDRES
7865if test -n "$WINDRES"; then
81ecdfbb
RW
7866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7867$as_echo "$WINDRES" >&6; }
bec39cab 7868else
81ecdfbb
RW
7869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7870$as_echo "no" >&6; }
bec39cab
AC
7871fi
7872
81ecdfbb 7873
bec39cab
AC
7874fi
7875if test -z "$ac_cv_prog_WINDRES"; then
7876 ac_ct_WINDRES=$WINDRES
7877 # Extract the first word of "windres", so it can be a program name with args.
7878set dummy windres; ac_word=$2
81ecdfbb
RW
7879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7880$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7881if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7882 $as_echo_n "(cached) " >&6
bec39cab
AC
7883else
7884 if test -n "$ac_ct_WINDRES"; then
7885 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7886else
7887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7888for as_dir in $PATH
7889do
7890 IFS=$as_save_IFS
7891 test -z "$as_dir" && as_dir=.
81ecdfbb 7892 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7893 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7894 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7896 break 2
7897 fi
7898done
81ecdfbb
RW
7899 done
7900IFS=$as_save_IFS
bec39cab
AC
7901
7902fi
7903fi
7904ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7905if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7907$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7908else
81ecdfbb
RW
7909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7910$as_echo "no" >&6; }
c906108c 7911fi
bec39cab 7912
81ecdfbb
RW
7913 if test "x$ac_ct_WINDRES" = x; then
7914 WINDRES=""
7915 else
7916 case $cross_compiling:$ac_tool_warned in
7917yes:)
7918{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7919$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7920ac_tool_warned=yes ;;
7921esac
7922 WINDRES=$ac_ct_WINDRES
7923 fi
c906108c 7924else
bec39cab 7925 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7926fi
7927
bec39cab 7928
036c3acb
TS
7929case $host_os in
7930 gnu*)
7931 # Needed for GNU Hurd hosts.
7932 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7933 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7934set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7936$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7937if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7938 $as_echo_n "(cached) " >&6
c906108c 7939else
bec39cab
AC
7940 if test -n "$MIG"; then
7941 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7942else
7943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7944for as_dir in $PATH
7945do
7946 IFS=$as_save_IFS
7947 test -z "$as_dir" && as_dir=.
81ecdfbb 7948 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7949 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7950 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7952 break 2
7953 fi
7954done
81ecdfbb
RW
7955 done
7956IFS=$as_save_IFS
bec39cab 7957
c906108c 7958fi
bec39cab
AC
7959fi
7960MIG=$ac_cv_prog_MIG
7961if test -n "$MIG"; then
81ecdfbb
RW
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7963$as_echo "$MIG" >&6; }
c906108c 7964else
81ecdfbb
RW
7965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7966$as_echo "no" >&6; }
c906108c
SS
7967fi
7968
81ecdfbb 7969
bec39cab
AC
7970fi
7971if test -z "$ac_cv_prog_MIG"; then
7972 ac_ct_MIG=$MIG
7973 # Extract the first word of "mig", so it can be a program name with args.
7974set dummy mig; ac_word=$2
81ecdfbb
RW
7975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7976$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7977if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7978 $as_echo_n "(cached) " >&6
bec39cab
AC
7979else
7980 if test -n "$ac_ct_MIG"; then
7981 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7982else
7983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7984for as_dir in $PATH
7985do
7986 IFS=$as_save_IFS
7987 test -z "$as_dir" && as_dir=.
81ecdfbb 7988 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7989 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7990 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7992 break 2
7993 fi
7994done
81ecdfbb
RW
7995 done
7996IFS=$as_save_IFS
c906108c 7997
bec39cab
AC
7998fi
7999fi
8000ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8001if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
8002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8003$as_echo "$ac_ct_MIG" >&6; }
bec39cab 8004else
81ecdfbb
RW
8005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8006$as_echo "no" >&6; }
bec39cab 8007fi
c906108c 8008
81ecdfbb
RW
8009 if test "x$ac_ct_MIG" = x; then
8010 MIG=""
8011 else
8012 case $cross_compiling:$ac_tool_warned in
8013yes:)
8014{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8015$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8016ac_tool_warned=yes ;;
8017esac
8018 MIG=$ac_ct_MIG
8019 fi
bec39cab
AC
8020else
8021 MIG="$ac_cv_prog_MIG"
8022fi
c906108c 8023
036c3acb 8024 if test x"$MIG" = x; then
d0ac1c44 8025 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
8026 fi
8027 ;;
8028esac
c906108c 8029
bec39cab
AC
8030# ---------------------- #
8031# Checks for libraries. #
8032# ---------------------- #
c906108c 8033
bec39cab 8034# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
8035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8036$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 8037if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 8038 $as_echo_n "(cached) " >&6
bec39cab
AC
8039else
8040 ac_check_lib_save_LIBS=$LIBS
8041LIBS="-lm $LIBS"
81ecdfbb 8042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8043/* end confdefs.h. */
c906108c 8044
c906108c 8045
bec39cab
AC
8046int
8047main ()
8048{
81ecdfbb 8049return main ();
bec39cab
AC
8050 ;
8051 return 0;
8052}
8053_ACEOF
81ecdfbb 8054if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
8055 ac_cv_lib_m_main=yes
8056else
81ecdfbb 8057 ac_cv_lib_m_main=no
bec39cab 8058fi
81ecdfbb
RW
8059rm -f core conftest.err conftest.$ac_objext \
8060 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
8061LIBS=$ac_check_lib_save_LIBS
8062fi
81ecdfbb
RW
8063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8064$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 8065if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
8066 cat >>confdefs.h <<_ACEOF
8067#define HAVE_LIBM 1
8068_ACEOF
8069
8070 LIBS="-lm $LIBS"
c906108c 8071
c906108c 8072fi
bec39cab
AC
8073
8074
bec39cab 8075# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
8076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8077$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 8078if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 8079 $as_echo_n "(cached) " >&6
bec39cab
AC
8080else
8081 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8083/* end confdefs.h. */
ddc9cd0f 8084
81ecdfbb
RW
8085/* Override any GCC internal prototype to avoid an error.
8086 Use char because int might match the return type of a GCC
8087 builtin and then its argument prototype would still apply. */
bec39cab
AC
8088#ifdef __cplusplus
8089extern "C"
8090#endif
bec39cab
AC
8091char gethostbyname ();
8092int
8093main ()
8094{
81ecdfbb 8095return gethostbyname ();
bec39cab
AC
8096 ;
8097 return 0;
8098}
8099_ACEOF
81ecdfbb
RW
8100for ac_lib in '' nsl; do
8101 if test -z "$ac_lib"; then
8102 ac_res="none required"
8103 else
8104 ac_res=-l$ac_lib
b4e70030 8105 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8106 fi
8107 if ac_fn_c_try_link "$LINENO"; then :
8108 ac_cv_search_gethostbyname=$ac_res
8109fi
8110rm -f core conftest.err conftest.$ac_objext \
8111 conftest$ac_exeext
d0ac1c44 8112 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
8113 break
8114fi
8115done
d0ac1c44 8116if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 8117
bec39cab 8118else
81ecdfbb 8119 ac_cv_search_gethostbyname=no
bec39cab 8120fi
81ecdfbb 8121rm conftest.$ac_ext
bec39cab
AC
8122LIBS=$ac_func_search_save_LIBS
8123fi
81ecdfbb
RW
8124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8125$as_echo "$ac_cv_search_gethostbyname" >&6; }
8126ac_res=$ac_cv_search_gethostbyname
8127if test "$ac_res" != no; then :
8128 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 8129
bec39cab 8130fi
96baa820 8131
c906108c 8132
b4e70030 8133# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
8134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8135$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 8136if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 8137 $as_echo_n "(cached) " >&6
b4e70030
JB
8138else
8139 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8141/* end confdefs.h. */
8142
81ecdfbb
RW
8143/* Override any GCC internal prototype to avoid an error.
8144 Use char because int might match the return type of a GCC
8145 builtin and then its argument prototype would still apply. */
b4e70030
JB
8146#ifdef __cplusplus
8147extern "C"
8148#endif
b4e70030
JB
8149char socketpair ();
8150int
8151main ()
8152{
81ecdfbb 8153return socketpair ();
b4e70030
JB
8154 ;
8155 return 0;
8156}
8157_ACEOF
81ecdfbb
RW
8158for ac_lib in '' socket; do
8159 if test -z "$ac_lib"; then
8160 ac_res="none required"
8161 else
8162 ac_res=-l$ac_lib
b4e70030 8163 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8164 fi
8165 if ac_fn_c_try_link "$LINENO"; then :
8166 ac_cv_search_socketpair=$ac_res
8167fi
8168rm -f core conftest.err conftest.$ac_objext \
8169 conftest$ac_exeext
d0ac1c44 8170 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
8171 break
8172fi
8173done
d0ac1c44 8174if ${ac_cv_search_socketpair+:} false; then :
b4e70030 8175
b4e70030 8176else
81ecdfbb 8177 ac_cv_search_socketpair=no
b4e70030 8178fi
81ecdfbb 8179rm conftest.$ac_ext
b4e70030
JB
8180LIBS=$ac_func_search_save_LIBS
8181fi
81ecdfbb
RW
8182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8183$as_echo "$ac_cv_search_socketpair" >&6; }
8184ac_res=$ac_cv_search_socketpair
8185if test "$ac_res" != no; then :
8186 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
8187
8188fi
8189
8190
233a11ab 8191# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 8192
711a72d3 8193 # Use the system's zlib library.
39f3de7c
L
8194 zlibdir="-L\$(top_builddir)/../zlib"
8195 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 8196
711a72d3
L
8197# Check whether --with-system-zlib was given.
8198if test "${with_system_zlib+set}" = set; then :
afa59b79
L
8199 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8200 zlibdir=
8201 zlibinc=
8202 fi
b040ad30 8203
233a11ab 8204fi
233a11ab 8205
233a11ab 8206
233a11ab 8207
b040ad30 8208
233a11ab 8209
77f120bf 8210
016a3251
DD
8211 if test "X$prefix" = "XNONE"; then
8212 acl_final_prefix="$ac_default_prefix"
8213 else
8214 acl_final_prefix="$prefix"
8215 fi
8216 if test "X$exec_prefix" = "XNONE"; then
8217 acl_final_exec_prefix='${prefix}'
8218 else
8219 acl_final_exec_prefix="$exec_prefix"
8220 fi
8221 acl_save_prefix="$prefix"
8222 prefix="$acl_final_prefix"
8223 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8224 prefix="$acl_save_prefix"
8225
8226
8227# Check whether --with-gnu-ld was given.
8228if test "${with_gnu_ld+set}" = set; then :
8229 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8230else
8231 with_gnu_ld=no
8232fi
8233
8234# Prepare PATH_SEPARATOR.
8235# The user is always right.
8236if test "${PATH_SEPARATOR+set}" != set; then
8237 echo "#! /bin/sh" >conf$$.sh
8238 echo "exit 0" >>conf$$.sh
8239 chmod +x conf$$.sh
8240 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8241 PATH_SEPARATOR=';'
8242 else
8243 PATH_SEPARATOR=:
8244 fi
8245 rm -f conf$$.sh
8246fi
8247ac_prog=ld
8248if test "$GCC" = yes; then
8249 # Check if gcc -print-prog-name=ld gives a path.
8250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8251$as_echo_n "checking for ld used by GCC... " >&6; }
8252 case $host in
8253 *-*-mingw*)
8254 # gcc leaves a trailing carriage return which upsets mingw
8255 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8256 *)
8257 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8258 esac
8259 case $ac_prog in
8260 # Accept absolute paths.
8261 [\\/]* | [A-Za-z]:[\\/]*)
8262 re_direlt='/[^/][^/]*/\.\./'
8263 # Canonicalize the path of ld
8264 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8265 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8266 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8267 done
8268 test -z "$LD" && LD="$ac_prog"
8269 ;;
8270 "")
8271 # If it fails, then pretend we aren't using GCC.
8272 ac_prog=ld
8273 ;;
8274 *)
8275 # If it is relative, then search for the first ld in PATH.
8276 with_gnu_ld=unknown
8277 ;;
8278 esac
8279elif test "$with_gnu_ld" = yes; then
8280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8281$as_echo_n "checking for GNU ld... " >&6; }
8282else
8283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8284$as_echo_n "checking for non-GNU ld... " >&6; }
8285fi
d0ac1c44 8286if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8287 $as_echo_n "(cached) " >&6
8288else
8289 if test -z "$LD"; then
8290 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8291 for ac_dir in $PATH; do
8292 test -z "$ac_dir" && ac_dir=.
8293 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8294 acl_cv_path_LD="$ac_dir/$ac_prog"
8295 # Check to see if the program is GNU ld. I'd rather use --version,
8296 # but apparently some GNU ld's only accept -v.
8297 # Break only if it was the GNU/non-GNU ld that we prefer.
8298 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8299 test "$with_gnu_ld" != no && break
8300 else
8301 test "$with_gnu_ld" != yes && break
8302 fi
8303 fi
8304 done
8305 IFS="$ac_save_ifs"
8306else
8307 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8308fi
8309fi
8310
8311LD="$acl_cv_path_LD"
8312if test -n "$LD"; then
8313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8314$as_echo "$LD" >&6; }
8315else
8316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8317$as_echo "no" >&6; }
8318fi
d0ac1c44 8319test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8321$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8322if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8323 $as_echo_n "(cached) " >&6
8324else
8325 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8326if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8327 acl_cv_prog_gnu_ld=yes
8328else
8329 acl_cv_prog_gnu_ld=no
8330fi
8331fi
8332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8333$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8334with_gnu_ld=$acl_cv_prog_gnu_ld
8335
8336
8337
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8339$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8340if ${acl_cv_rpath+:} false; then :
016a3251
DD
8341 $as_echo_n "(cached) " >&6
8342else
8343
8344 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8345 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8346 . ./conftest.sh
8347 rm -f ./conftest.sh
8348 acl_cv_rpath=done
8349
8350fi
8351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8352$as_echo "$acl_cv_rpath" >&6; }
8353 wl="$acl_cv_wl"
8354 libext="$acl_cv_libext"
8355 shlibext="$acl_cv_shlibext"
8356 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8357 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8358 hardcode_direct="$acl_cv_hardcode_direct"
8359 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8360 # Check whether --enable-rpath was given.
8361if test "${enable_rpath+set}" = set; then :
8362 enableval=$enable_rpath; :
8363else
8364 enable_rpath=yes
8365fi
8366
8367
8368
8369
8370
8371
8372
8373
8374 use_additional=yes
8375
8376 acl_save_prefix="$prefix"
8377 prefix="$acl_final_prefix"
8378 acl_save_exec_prefix="$exec_prefix"
8379 exec_prefix="$acl_final_exec_prefix"
8380
8381 eval additional_includedir=\"$includedir\"
8382 eval additional_libdir=\"$libdir\"
8383
8384 exec_prefix="$acl_save_exec_prefix"
8385 prefix="$acl_save_prefix"
77f120bf 8386
6c7a06a3 8387
81ecdfbb
RW
8388# Check whether --with-libiconv-prefix was given.
8389if test "${with_libiconv_prefix+set}" = set; then :
8390 withval=$with_libiconv_prefix;
016a3251
DD
8391 if test "X$withval" = "Xno"; then
8392 use_additional=no
8393 else
8394 if test "X$withval" = "X"; then
8395
8396 acl_save_prefix="$prefix"
8397 prefix="$acl_final_prefix"
8398 acl_save_exec_prefix="$exec_prefix"
8399 exec_prefix="$acl_final_exec_prefix"
8400
8401 eval additional_includedir=\"$includedir\"
8402 eval additional_libdir=\"$libdir\"
8403
8404 exec_prefix="$acl_save_exec_prefix"
8405 prefix="$acl_save_prefix"
8406
8407 else
8408 additional_includedir="$withval/include"
8409 additional_libdir="$withval/lib"
8410 fi
8411 fi
6c7a06a3 8412
81ecdfbb
RW
8413fi
8414
9f1528a1
AB
8415
8416# Check whether --with-libiconv-type was given.
8417if test "${with_libiconv_type+set}" = set; then :
8418 withval=$with_libiconv_type; with_libiconv_type=$withval
8419else
8420 with_libiconv_type=auto
8421fi
8422
8423 lib_type=`eval echo \$with_libiconv_type`
8424
016a3251
DD
8425 LIBICONV=
8426 LTLIBICONV=
8427 INCICONV=
8428 rpathdirs=
8429 ltrpathdirs=
8430 names_already_handled=
8431 names_next_round='iconv '
8432 while test -n "$names_next_round"; do
8433 names_this_round="$names_next_round"
8434 names_next_round=
8435 for name in $names_this_round; do
8436 already_handled=
8437 for n in $names_already_handled; do
8438 if test "$n" = "$name"; then
8439 already_handled=yes
8440 break
8441 fi
8442 done
8443 if test -z "$already_handled"; then
8444 names_already_handled="$names_already_handled $name"
8445 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8446 eval value=\"\$HAVE_LIB$uppername\"
8447 if test -n "$value"; then
8448 if test "$value" = yes; then
8449 eval value=\"\$LIB$uppername\"
8450 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8451 eval value=\"\$LTLIB$uppername\"
8452 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8453 else
8454 :
8455 fi
8456 else
8457 found_dir=
8458 found_la=
8459 found_so=
8460 found_a=
8461 if test $use_additional = yes; then
9f1528a1 8462 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8463 found_dir="$additional_libdir"
8464 found_so="$additional_libdir/lib$name.$shlibext"
8465 if test -f "$additional_libdir/lib$name.la"; then
8466 found_la="$additional_libdir/lib$name.la"
8467 fi
9f1528a1 8468 elif test x$lib_type != xshared; then
016a3251
DD
8469 if test -f "$additional_libdir/lib$name.$libext"; then
8470 found_dir="$additional_libdir"
8471 found_a="$additional_libdir/lib$name.$libext"
8472 if test -f "$additional_libdir/lib$name.la"; then
8473 found_la="$additional_libdir/lib$name.la"
8474 fi
8475 fi
8476 fi
8477 fi
8478 if test "X$found_dir" = "X"; then
8479 for x in $LDFLAGS $LTLIBICONV; do
8480
8481 acl_save_prefix="$prefix"
8482 prefix="$acl_final_prefix"
8483 acl_save_exec_prefix="$exec_prefix"
8484 exec_prefix="$acl_final_exec_prefix"
8485 eval x=\"$x\"
8486 exec_prefix="$acl_save_exec_prefix"
8487 prefix="$acl_save_prefix"
8488
8489 case "$x" in
8490 -L*)
8491 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 8492 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8493 found_dir="$dir"
8494 found_so="$dir/lib$name.$shlibext"
8495 if test -f "$dir/lib$name.la"; then
8496 found_la="$dir/lib$name.la"
8497 fi
9f1528a1 8498 elif test x$lib_type != xshared; then
016a3251
DD
8499 if test -f "$dir/lib$name.$libext"; then
8500 found_dir="$dir"
8501 found_a="$dir/lib$name.$libext"
8502 if test -f "$dir/lib$name.la"; then
8503 found_la="$dir/lib$name.la"
8504 fi
8505 fi
8506 fi
8507 ;;
8508 esac
8509 if test "X$found_dir" != "X"; then
8510 break
8511 fi
8512 done
8513 fi
8514 if test "X$found_dir" != "X"; then
8515 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8516 if test "X$found_so" != "X"; then
8517 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8518 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8519 else
8520 haveit=
8521 for x in $ltrpathdirs; do
8522 if test "X$x" = "X$found_dir"; then
8523 haveit=yes
8524 break
8525 fi
8526 done
8527 if test -z "$haveit"; then
8528 ltrpathdirs="$ltrpathdirs $found_dir"
8529 fi
8530 if test "$hardcode_direct" = yes; then
8531 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8532 else
8533 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8534 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8535 haveit=
8536 for x in $rpathdirs; do
8537 if test "X$x" = "X$found_dir"; then
8538 haveit=yes
8539 break
8540 fi
8541 done
8542 if test -z "$haveit"; then
8543 rpathdirs="$rpathdirs $found_dir"
8544 fi
8545 else
8546 haveit=
8547 for x in $LDFLAGS $LIBICONV; do
8548
8549 acl_save_prefix="$prefix"
8550 prefix="$acl_final_prefix"
8551 acl_save_exec_prefix="$exec_prefix"
8552 exec_prefix="$acl_final_exec_prefix"
8553 eval x=\"$x\"
8554 exec_prefix="$acl_save_exec_prefix"
8555 prefix="$acl_save_prefix"
8556
8557 if test "X$x" = "X-L$found_dir"; then
8558 haveit=yes
8559 break
8560 fi
8561 done
8562 if test -z "$haveit"; then
8563 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8564 fi
8565 if test "$hardcode_minus_L" != no; then
8566 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8567 else
8568 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8569 fi
8570 fi
8571 fi
8572 fi
8573 else
8574 if test "X$found_a" != "X"; then
8575 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8576 else
8577 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8578 fi
8579 fi
8580 additional_includedir=
8581 case "$found_dir" in
8582 */lib | */lib/)
8583 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8584 additional_includedir="$basedir/include"
8585 ;;
8586 esac
8587 if test "X$additional_includedir" != "X"; then
8588 if test "X$additional_includedir" != "X/usr/include"; then
8589 haveit=
8590 if test "X$additional_includedir" = "X/usr/local/include"; then
8591 if test -n "$GCC"; then
8592 case $host_os in
8593 linux*) haveit=yes;;
8594 esac
8595 fi
8596 fi
8597 if test -z "$haveit"; then
8598 for x in $CPPFLAGS $INCICONV; do
8599
8600 acl_save_prefix="$prefix"
8601 prefix="$acl_final_prefix"
8602 acl_save_exec_prefix="$exec_prefix"
8603 exec_prefix="$acl_final_exec_prefix"
8604 eval x=\"$x\"
8605 exec_prefix="$acl_save_exec_prefix"
8606 prefix="$acl_save_prefix"
8607
8608 if test "X$x" = "X-I$additional_includedir"; then
8609 haveit=yes
8610 break
8611 fi
8612 done
8613 if test -z "$haveit"; then
8614 if test -d "$additional_includedir"; then
8615 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8616 fi
8617 fi
8618 fi
8619 fi
8620 fi
8621 if test -n "$found_la"; then
8622 save_libdir="$libdir"
8623 case "$found_la" in
8624 */* | *\\*) . "$found_la" ;;
8625 *) . "./$found_la" ;;
8626 esac
8627 libdir="$save_libdir"
8628 for dep in $dependency_libs; do
8629 case "$dep" in
8630 -L*)
8631 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8632 if test "X$additional_libdir" != "X/usr/lib"; then
8633 haveit=
8634 if test "X$additional_libdir" = "X/usr/local/lib"; then
8635 if test -n "$GCC"; then
8636 case $host_os in
8637 linux*) haveit=yes;;
8638 esac
8639 fi
8640 fi
8641 if test -z "$haveit"; then
8642 haveit=
8643 for x in $LDFLAGS $LIBICONV; do
8644
8645 acl_save_prefix="$prefix"
8646 prefix="$acl_final_prefix"
8647 acl_save_exec_prefix="$exec_prefix"
8648 exec_prefix="$acl_final_exec_prefix"
8649 eval x=\"$x\"
8650 exec_prefix="$acl_save_exec_prefix"
8651 prefix="$acl_save_prefix"
8652
8653 if test "X$x" = "X-L$additional_libdir"; then
8654 haveit=yes
8655 break
8656 fi
8657 done
8658 if test -z "$haveit"; then
8659 if test -d "$additional_libdir"; then
8660 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8661 fi
8662 fi
8663 haveit=
8664 for x in $LDFLAGS $LTLIBICONV; do
8665
8666 acl_save_prefix="$prefix"
8667 prefix="$acl_final_prefix"
8668 acl_save_exec_prefix="$exec_prefix"
8669 exec_prefix="$acl_final_exec_prefix"
8670 eval x=\"$x\"
8671 exec_prefix="$acl_save_exec_prefix"
8672 prefix="$acl_save_prefix"
8673
8674 if test "X$x" = "X-L$additional_libdir"; then
8675 haveit=yes
8676 break
8677 fi
8678 done
8679 if test -z "$haveit"; then
8680 if test -d "$additional_libdir"; then
8681 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8682 fi
8683 fi
8684 fi
8685 fi
8686 ;;
8687 -R*)
8688 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8689 if test "$enable_rpath" != no; then
8690 haveit=
8691 for x in $rpathdirs; do
8692 if test "X$x" = "X$dir"; then
8693 haveit=yes
8694 break
8695 fi
8696 done
8697 if test -z "$haveit"; then
8698 rpathdirs="$rpathdirs $dir"
8699 fi
8700 haveit=
8701 for x in $ltrpathdirs; do
8702 if test "X$x" = "X$dir"; then
8703 haveit=yes
8704 break
8705 fi
8706 done
8707 if test -z "$haveit"; then
8708 ltrpathdirs="$ltrpathdirs $dir"
8709 fi
8710 fi
8711 ;;
8712 -l*)
8713 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8714 ;;
8715 *.la)
8716 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8717 ;;
8718 *)
8719 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8720 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8721 ;;
8722 esac
8723 done
8724 fi
8725 else
9f1528a1
AB
8726 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8727 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8728 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8729 else
8730 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8731 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8732 fi
016a3251
DD
8733 fi
8734 fi
8735 fi
8736 done
8737 done
8738 if test "X$rpathdirs" != "X"; then
8739 if test -n "$hardcode_libdir_separator"; then
8740 alldirs=
8741 for found_dir in $rpathdirs; do
8742 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8743 done
8744 acl_save_libdir="$libdir"
8745 libdir="$alldirs"
8746 eval flag=\"$hardcode_libdir_flag_spec\"
8747 libdir="$acl_save_libdir"
8748 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8749 else
8750 for found_dir in $rpathdirs; do
8751 acl_save_libdir="$libdir"
8752 libdir="$found_dir"
8753 eval flag=\"$hardcode_libdir_flag_spec\"
8754 libdir="$acl_save_libdir"
8755 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8756 done
8757 fi
8758 fi
8759 if test "X$ltrpathdirs" != "X"; then
8760 for found_dir in $ltrpathdirs; do
8761 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8762 done
8763 fi
8764
8765
8766
8767
8768
6c7a06a3 8769
6c7a06a3 8770
81ecdfbb
RW
8771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8772$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8773if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8774 $as_echo_n "(cached) " >&6
d542061a 8775else
6c7a06a3
TT
8776
8777 am_cv_func_iconv="no, consider installing GNU libiconv"
8778 am_cv_lib_iconv=no
016a3251
DD
8779 am_save_CPPFLAGS="$CPPFLAGS"
8780 CPPFLAGS="$CPPFLAGS $INCICONV"
8781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8782/* end confdefs.h. */
6c7a06a3
TT
8783#include <stdlib.h>
8784#include <iconv.h>
d542061a
UW
8785int
8786main ()
8787{
6c7a06a3 8788iconv_t cd = iconv_open("","");
016a3251
DD
8789 iconv(cd,NULL,NULL,NULL,NULL);
8790 iconv_close(cd);
d542061a
UW
8791 ;
8792 return 0;
8793}
8794_ACEOF
81ecdfbb 8795if ac_fn_c_try_link "$LINENO"; then :
016a3251 8796 am_cv_func_iconv=yes
d542061a 8797fi
81ecdfbb
RW
8798rm -f core conftest.err conftest.$ac_objext \
8799 conftest$ac_exeext conftest.$ac_ext
016a3251 8800 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8801
016a3251
DD
8802 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8803 for _libs in .libs _libs; do
8804 am_save_CPPFLAGS="$CPPFLAGS"
8805 am_save_LIBS="$LIBS"
8806 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8807 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8809/* end confdefs.h. */
6c7a06a3
TT
8810#include <stdlib.h>
8811#include <iconv.h>
d542061a
UW
8812int
8813main ()
8814{
6c7a06a3 8815iconv_t cd = iconv_open("","");
016a3251
DD
8816 iconv(cd,NULL,NULL,NULL,NULL);
8817 iconv_close(cd);
d542061a
UW
8818 ;
8819 return 0;
8820}
8821_ACEOF
81ecdfbb 8822if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8823 INCICONV="-I../libiconv/include"
8824 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8825 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8826 am_cv_lib_iconv=yes
8827 am_cv_func_iconv=yes
d542061a 8828fi
81ecdfbb
RW
8829rm -f core conftest.err conftest.$ac_objext \
8830 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8831 CPPFLAGS="$am_save_CPPFLAGS"
8832 LIBS="$am_save_LIBS"
8833 if test "$am_cv_func_iconv" = "yes"; then
8834 break
8835 fi
8836 done
77f120bf 8837 fi
94ae1714 8838
4edb1e84 8839 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8840 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8841 am_save_LIBS="$LIBS"
5d762de0 8842 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8843 LIBS="$LIBS $LIBICONV"
81ecdfbb 8844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8845/* end confdefs.h. */
6c7a06a3
TT
8846#include <stdlib.h>
8847#include <iconv.h>
bec39cab
AC
8848int
8849main ()
8850{
6c7a06a3
TT
8851iconv_t cd = iconv_open("","");
8852 iconv(cd,NULL,NULL,NULL,NULL);
8853 iconv_close(cd);
bec39cab
AC
8854 ;
8855 return 0;
8856}
8857_ACEOF
81ecdfbb 8858if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8859 am_cv_lib_iconv=yes
6c7a06a3 8860 am_cv_func_iconv=yes
627af7ea 8861fi
81ecdfbb
RW
8862rm -f core conftest.err conftest.$ac_objext \
8863 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8864 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8865 LIBS="$am_save_LIBS"
6c7a06a3
TT
8866 fi
8867
8868fi
81ecdfbb
RW
8869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8870$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8871 if test "$am_cv_func_iconv" = yes; then
8872
8873$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8874
016a3251 8875 fi
fc3b640d 8876 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8877
8878 for element in $INCICONV; do
8879 haveit=
8880 for x in $CPPFLAGS; do
8881
8882 acl_save_prefix="$prefix"
8883 prefix="$acl_final_prefix"
8884 acl_save_exec_prefix="$exec_prefix"
8885 exec_prefix="$acl_final_exec_prefix"
8886 eval x=\"$x\"
8887 exec_prefix="$acl_save_exec_prefix"
8888 prefix="$acl_save_prefix"
8889
8890 if test "X$x" = "X$element"; then
8891 haveit=yes
8892 break
8893 fi
8894 done
8895 if test -z "$haveit"; then
8896 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8897 fi
8898 done
8899
8900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8901$as_echo_n "checking how to link with libiconv... " >&6; }
8902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8903$as_echo "$LIBICONV" >&6; }
94ae1714 8904 else
016a3251
DD
8905 LIBICONV=
8906 LTLIBICONV=
fc3b640d 8907 fi
94ae1714 8908
6c7a06a3 8909
6c7a06a3 8910
016a3251 8911 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8913$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8914 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8915 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8916else
8917
81ecdfbb 8918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8919/* end confdefs.h. */
8920
6c7a06a3
TT
8921#include <stdlib.h>
8922#include <iconv.h>
8923extern
b4e70030 8924#ifdef __cplusplus
6c7a06a3 8925"C"
b4e70030 8926#endif
6c7a06a3
TT
8927#if defined(__STDC__) || defined(__cplusplus)
8928size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8929#else
8930size_t iconv();
8931#endif
8932
b4e70030
JB
8933int
8934main ()
8935{
6c7a06a3 8936
b4e70030
JB
8937 ;
8938 return 0;
8939}
8940_ACEOF
81ecdfbb 8941if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8942 am_cv_proto_iconv_arg1=""
4e8d927d 8943else
81ecdfbb 8944 am_cv_proto_iconv_arg1="const"
b4e70030 8945fi
81ecdfbb 8946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8947 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);"
8948fi
8949
8950 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8952 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8953$as_echo "${ac_t:-
8954 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8955
8956cat >>confdefs.h <<_ACEOF
8957#define ICONV_CONST $am_cv_proto_iconv_arg1
8958_ACEOF
8959
8960 fi
6c7a06a3
TT
8961
8962
478aac75
DE
8963# GDB may fork/exec the iconv program to get the list of supported character
8964# sets. Allow the user to specify where to find it.
8965# There are several factors affecting the choice of option name:
8966# - There is already --with-libiconv-prefix but we can't use it, it specifies
8967# the build-time location of libiconv files.
8968# - The program we need to find is iconv, which comes with glibc. The user
8969# doesn't necessarily have libiconv installed. Therefore naming this
8970# --with-libiconv-foo feels wrong.
8971# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8972# defined to work on directories not files (though it really doesn't know
8973# the difference).
8974# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8975# with --with-libiconv-prefix.
8976# Putting these together is why the option name is --with-iconv-bin.
8977
8978
8979# Check whether --with-iconv-bin was given.
8980if test "${with_iconv_bin+set}" = set; then :
8981 withval=$with_iconv_bin; iconv_bin="${withval}"
8982
8983cat >>confdefs.h <<_ACEOF
8984#define ICONV_BIN "${iconv_bin}"
8985_ACEOF
8986
8987
8988 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8989 if test "x$prefix" = xNONE; then
8990 test_prefix=/usr/local
8991 else
8992 test_prefix=$prefix
8993 fi
8994 else
8995 test_prefix=$exec_prefix
8996 fi
8997 value=0
8998 case ${iconv_bin} in
8999 "${test_prefix}"|"${test_prefix}/"*|\
9000 '${exec_prefix}'|'${exec_prefix}/'*)
9001 value=1
9002 ;;
9003 esac
9004
9005cat >>confdefs.h <<_ACEOF
9006#define ICONV_BIN_RELOCATABLE $value
9007_ACEOF
9008
9009
9010
9011fi
9012
9013
cb01cfba 9014# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9015if test x"$enable_tui" != xno; then
cb01cfba
JB
9016 prefer_curses=yes
9017fi
9018
9019curses_found=no
9020if test x"$prefer_curses" = xyes; then
9021 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9022 # curses library because the latter might not provide all the
9023 # functionality we need. However, this leads to problems on systems
9024 # where the linker searches /usr/local/lib, but the compiler doesn't
9025 # search /usr/local/include, if ncurses is installed in /usr/local. A
9026 # default installation of ncurses on alpha*-dec-osf* will lead to such
9027 # a situation.
81ecdfbb
RW
9028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9029$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 9030if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 9031 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9032else
9033 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9035/* end confdefs.h. */
9036
81ecdfbb
RW
9037/* Override any GCC internal prototype to avoid an error.
9038 Use char because int might match the return type of a GCC
9039 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9040#ifdef __cplusplus
9041extern "C"
9042#endif
6c7a06a3
TT
9043char waddstr ();
9044int
9045main ()
9046{
81ecdfbb 9047return waddstr ();
6c7a06a3
TT
9048 ;
9049 return 0;
9050}
9051_ACEOF
5007d765 9052for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
9053 if test -z "$ac_lib"; then
9054 ac_res="none required"
9055 else
9056 ac_res=-l$ac_lib
9057 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9058 fi
9059 if ac_fn_c_try_link "$LINENO"; then :
9060 ac_cv_search_waddstr=$ac_res
9061fi
9062rm -f core conftest.err conftest.$ac_objext \
9063 conftest$ac_exeext
d0ac1c44 9064 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
9065 break
9066fi
9067done
d0ac1c44 9068if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 9069
6c7a06a3 9070else
81ecdfbb
RW
9071 ac_cv_search_waddstr=no
9072fi
9073rm conftest.$ac_ext
9074LIBS=$ac_func_search_save_LIBS
9075fi
9076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9077$as_echo "$ac_cv_search_waddstr" >&6; }
9078ac_res=$ac_cv_search_waddstr
9079if test "$ac_res" != no; then :
9080 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9081
9082fi
9083
9084
cb01cfba
JB
9085 if test "$ac_cv_search_waddstr" != no; then
9086 curses_found=yes
9087 fi
9088fi
9089
9090# Check whether we should enable the TUI, but only do so if we really
9091# can.
9092if test x"$enable_tui" != xno; then
0ad6b8ee 9093 if test -d "$srcdir/tui"; then
cb01cfba 9094 if test "$curses_found" != no; then
6c7a06a3
TT
9095 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9096 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9097 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9098 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
9099 else
9100 if test x"$enable_tui" = xyes; then
d0ac1c44 9101 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9102 else
81ecdfbb
RW
9103 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9104$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9105 fi
9106 fi
9107 fi
9108fi
9109
9110# Since GDB uses Readline, we need termcap functionality. In many
9111# cases this will be provided by the curses library, but some systems
96fe4562 9112# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
9113
9114case $host_os in
9115 cygwin*)
0ad6b8ee 9116 if test -d "$srcdir/libtermcap"; then
6c7a06a3
TT
9117 LIBS="../libtermcap/libtermcap.a $LIBS"
9118 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9119 fi ;;
9120 go32* | *djgpp*)
9121 ac_cv_search_tgetent="none required"
9122 ;;
6c7a06a3
TT
9123esac
9124
9125# These are the libraries checked by Readline.
81ecdfbb
RW
9126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9127$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 9128if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 9129 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9130else
9131 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9133/* end confdefs.h. */
9134
81ecdfbb
RW
9135/* Override any GCC internal prototype to avoid an error.
9136 Use char because int might match the return type of a GCC
9137 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9138#ifdef __cplusplus
9139extern "C"
9140#endif
6c7a06a3
TT
9141char tgetent ();
9142int
9143main ()
9144{
81ecdfbb 9145return tgetent ();
6c7a06a3
TT
9146 ;
9147 return 0;
9148}
9149_ACEOF
2578ecb1 9150for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9151 if test -z "$ac_lib"; then
9152 ac_res="none required"
9153 else
9154 ac_res=-l$ac_lib
6c7a06a3 9155 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9156 fi
9157 if ac_fn_c_try_link "$LINENO"; then :
9158 ac_cv_search_tgetent=$ac_res
9159fi
9160rm -f core conftest.err conftest.$ac_objext \
9161 conftest$ac_exeext
d0ac1c44 9162 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9163 break
9164fi
9165done
d0ac1c44 9166if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9167
6c7a06a3 9168else
81ecdfbb 9169 ac_cv_search_tgetent=no
6c7a06a3 9170fi
81ecdfbb 9171rm conftest.$ac_ext
6c7a06a3
TT
9172LIBS=$ac_func_search_save_LIBS
9173fi
81ecdfbb
RW
9174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9175$as_echo "$ac_cv_search_tgetent" >&6; }
9176ac_res=$ac_cv_search_tgetent
9177if test "$ac_res" != no; then :
9178 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9179
06825bd1
MK
9180fi
9181
06825bd1 9182
bec39cab 9183if test "$ac_cv_search_tgetent" = no; then
7a85168d 9184 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9185fi
9186
3841debe 9187
81ecdfbb
RW
9188# Check whether --with-system-readline was given.
9189if test "${with_system_readline+set}" = set; then :
9190 withval=$with_system_readline;
9191fi
6a30b0a5 9192
6a30b0a5
AS
9193
9194if test "$with_system_readline" = yes; then
5593a99a 9195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
86c6b807
TT
9196$as_echo_n "checking whether system readline is new enough... " >&6; }
9197if ${gdb_cv_readline_ok+:} false; then :
9198 $as_echo_n "(cached) " >&6
9199else
9200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9201/* end confdefs.h. */
9202#include <stdio.h>
5593a99a 9203 #include <readline/readline.h>
86c6b807
TT
9204int
9205main ()
9206{
9207#if RL_VERSION_MAJOR < 7
5593a99a
SM
9208 # error "readline version 7 required"
9209 #endif
9210
86c6b807
TT
9211 ;
9212 return 0;
9213}
9214_ACEOF
9215if ac_fn_c_try_compile "$LINENO"; then :
9216 gdb_cv_readline_ok=yes
9217else
9218 gdb_cv_readline_ok=no
5593a99a 9219
86c6b807
TT
9220fi
9221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 9222
86c6b807
TT
9223fi
9224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9225$as_echo "$gdb_cv_readline_ok" >&6; }
9226 if test "$gdb_cv_readline_ok" != yes; then
9227 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9228 fi
9229
6a30b0a5
AS
9230 READLINE=-lreadline
9231 READLINE_DEPS=
9232 READLINE_CFLAGS=
39037522 9233 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9234else
9235 READLINE='$(READLINE_DIR)/libreadline.a'
9236 READLINE_DEPS='$(READLINE)'
9237 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9238 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9239fi
9240
9241
9242
9243
9244
f997c383
SD
9245# Generate jit-reader.h
9246
9247# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9248TARGET_PTR=
9249
9250# The cast to long int works around a bug in the HP C Compiler
9251# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9252# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9253# This bug is HP SR number 8606223364.
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9255$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9256if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9257 $as_echo_n "(cached) " >&6
9258else
9259 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9260
9261else
9262 if test "$ac_cv_type_unsigned_long_long" = yes; then
9263 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9264$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9265as_fn_error 77 "cannot compute sizeof (unsigned long long)
9266See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9267 else
9268 ac_cv_sizeof_unsigned_long_long=0
9269 fi
9270fi
9271
9272fi
9273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9274$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9275
9276
9277
9278cat >>confdefs.h <<_ACEOF
9279#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9280_ACEOF
9281
9282
9283# The cast to long int works around a bug in the HP C Compiler
9284# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9285# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9286# This bug is HP SR number 8606223364.
9287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9288$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9289if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9290 $as_echo_n "(cached) " >&6
9291else
9292 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9293
9294else
9295 if test "$ac_cv_type_unsigned_long" = yes; then
9296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9297$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9298as_fn_error 77 "cannot compute sizeof (unsigned long)
9299See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9300 else
9301 ac_cv_sizeof_unsigned_long=0
9302 fi
9303fi
9304
9305fi
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9307$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9308
9309
9310
9311cat >>confdefs.h <<_ACEOF
9312#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9313_ACEOF
9314
9315
9316# The cast to long int works around a bug in the HP C Compiler
9317# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9318# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9319# This bug is HP SR number 8606223364.
9320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9321$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9322if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9323 $as_echo_n "(cached) " >&6
9324else
9325 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9326
9327else
9328 if test "$ac_cv_type_unsigned___int128" = yes; then
9329 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9330$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9331as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9332See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9333 else
9334 ac_cv_sizeof_unsigned___int128=0
9335 fi
9336fi
9337
9338fi
9339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9340$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9341
9342
9343
9344cat >>confdefs.h <<_ACEOF
9345#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9346_ACEOF
9347
9348
9349
9350if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9351 TARGET_PTR="unsigned long"
9352elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9353 TARGET_PTR="unsigned long long"
9354elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9355 TARGET_PTR="unsigned __int128"
9356else
9357 TARGET_PTR="unsigned long"
9358fi
9359
9360
9361ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9362
9363
a2d08b9e
SD
9364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9365$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9366if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9367 $as_echo_n "(cached) " >&6
9368else
9369 ac_func_search_save_LIBS=$LIBS
9370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9371/* end confdefs.h. */
9372
9373/* Override any GCC internal prototype to avoid an error.
9374 Use char because int might match the return type of a GCC
9375 builtin and then its argument prototype would still apply. */
9376#ifdef __cplusplus
9377extern "C"
9378#endif
9379char dlopen ();
9380int
9381main ()
9382{
9383return dlopen ();
9384 ;
9385 return 0;
9386}
9387_ACEOF
9388for ac_lib in '' dl; do
9389 if test -z "$ac_lib"; then
9390 ac_res="none required"
9391 else
9392 ac_res=-l$ac_lib
9393 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9394 fi
9395 if ac_fn_c_try_link "$LINENO"; then :
9396 ac_cv_search_dlopen=$ac_res
9397fi
9398rm -f core conftest.err conftest.$ac_objext \
9399 conftest$ac_exeext
d0ac1c44 9400 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9401 break
9402fi
9403done
d0ac1c44 9404if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9405
9406else
9407 ac_cv_search_dlopen=no
9408fi
9409rm conftest.$ac_ext
9410LIBS=$ac_func_search_save_LIBS
9411fi
9412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9413$as_echo "$ac_cv_search_dlopen" >&6; }
9414ac_res=$ac_cv_search_dlopen
9415if test "$ac_res" != no; then :
9416 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9417
9418fi
9419
9420
39037522 9421
b8e0a31c
SD
9422
9423# Check whether --with-jit-reader-dir was given.
9424if test "${with_jit_reader_dir+set}" = set; then :
9425 withval=$with_jit_reader_dir;
9426 JIT_READER_DIR=$withval
9427else
9428 JIT_READER_DIR=${libdir}/gdb
9429fi
9430
9431
9432 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9433 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9434 ac_define_dir=`eval echo $JIT_READER_DIR`
9435 ac_define_dir=`eval echo $ac_define_dir`
9436
9437cat >>confdefs.h <<_ACEOF
9438#define JIT_READER_DIR "$ac_define_dir"
9439_ACEOF
9440
9441
9442
9443
9444 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9445 if test "x$prefix" = xNONE; then
9446 test_prefix=/usr/local
9447 else
9448 test_prefix=$prefix
9449 fi
9450 else
9451 test_prefix=$exec_prefix
9452 fi
9453 value=0
9454 case ${ac_define_dir} in
9455 "${test_prefix}"|"${test_prefix}/"*|\
9456 '${exec_prefix}'|'${exec_prefix}/'*)
9457 value=1
9458 ;;
9459 esac
9460
9461cat >>confdefs.h <<_ACEOF
9462#define JIT_READER_DIR_RELOCATABLE $value
9463_ACEOF
9464
9465
9466
9467
9468
81ecdfbb
RW
9469# Check whether --with-expat was given.
9470if test "${with_expat+set}" = set; then :
9471 withval=$with_expat;
5c39566f
DJ
9472else
9473 with_expat=auto
81ecdfbb
RW
9474fi
9475
9476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9477$as_echo_n "checking whether to use expat... " >&6; }
9478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9479$as_echo "$with_expat" >&6; }
5c39566f
DJ
9480
9481if test "${with_expat}" = no; then
81ecdfbb
RW
9482 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9483$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9484 HAVE_LIBEXPAT=no
9485else
9486
3841debe
DJ
9487
9488
9489
9490
9491
9492
9493
9494 use_additional=yes
9495
9496 acl_save_prefix="$prefix"
9497 prefix="$acl_final_prefix"
9498 acl_save_exec_prefix="$exec_prefix"
9499 exec_prefix="$acl_final_exec_prefix"
9500
9501 eval additional_includedir=\"$includedir\"
9502 eval additional_libdir=\"$libdir\"
9503
9504 exec_prefix="$acl_save_exec_prefix"
9505 prefix="$acl_save_prefix"
9506
9507
81ecdfbb
RW
9508# Check whether --with-libexpat-prefix was given.
9509if test "${with_libexpat_prefix+set}" = set; then :
9510 withval=$with_libexpat_prefix;
3841debe
DJ
9511 if test "X$withval" = "Xno"; then
9512 use_additional=no
9513 else
9514 if test "X$withval" = "X"; then
9515
9516 acl_save_prefix="$prefix"
9517 prefix="$acl_final_prefix"
9518 acl_save_exec_prefix="$exec_prefix"
9519 exec_prefix="$acl_final_exec_prefix"
9520
9521 eval additional_includedir=\"$includedir\"
9522 eval additional_libdir=\"$libdir\"
9523
9524 exec_prefix="$acl_save_exec_prefix"
9525 prefix="$acl_save_prefix"
9526
9527 else
9528 additional_includedir="$withval/include"
9529 additional_libdir="$withval/lib"
9530 fi
9531 fi
9532
81ecdfbb
RW
9533fi
9534
9f1528a1
AB
9535
9536# Check whether --with-libexpat-type was given.
9537if test "${with_libexpat_type+set}" = set; then :
9538 withval=$with_libexpat_type; with_libexpat_type=$withval
9539else
9540 with_libexpat_type=auto
9541fi
9542
9543 lib_type=`eval echo \$with_libexpat_type`
9544
3841debe
DJ
9545 LIBEXPAT=
9546 LTLIBEXPAT=
9547 INCEXPAT=
9548 rpathdirs=
9549 ltrpathdirs=
9550 names_already_handled=
9551 names_next_round='expat '
9552 while test -n "$names_next_round"; do
9553 names_this_round="$names_next_round"
9554 names_next_round=
9555 for name in $names_this_round; do
9556 already_handled=
9557 for n in $names_already_handled; do
9558 if test "$n" = "$name"; then
9559 already_handled=yes
9560 break
9561 fi
9562 done
9563 if test -z "$already_handled"; then
9564 names_already_handled="$names_already_handled $name"
9565 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9566 eval value=\"\$HAVE_LIB$uppername\"
9567 if test -n "$value"; then
9568 if test "$value" = yes; then
9569 eval value=\"\$LIB$uppername\"
9570 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9571 eval value=\"\$LTLIB$uppername\"
9572 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9573 else
9574 :
9575 fi
9576 else
9577 found_dir=
9578 found_la=
9579 found_so=
9580 found_a=
9581 if test $use_additional = yes; then
9f1528a1 9582 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9583 found_dir="$additional_libdir"
9584 found_so="$additional_libdir/lib$name.$shlibext"
9585 if test -f "$additional_libdir/lib$name.la"; then
9586 found_la="$additional_libdir/lib$name.la"
9587 fi
9f1528a1 9588 elif test x$lib_type != xshared; then
3841debe
DJ
9589 if test -f "$additional_libdir/lib$name.$libext"; then
9590 found_dir="$additional_libdir"
9591 found_a="$additional_libdir/lib$name.$libext"
9592 if test -f "$additional_libdir/lib$name.la"; then
9593 found_la="$additional_libdir/lib$name.la"
9594 fi
9595 fi
9596 fi
9597 fi
9598 if test "X$found_dir" = "X"; then
9599 for x in $LDFLAGS $LTLIBEXPAT; do
9600
9601 acl_save_prefix="$prefix"
9602 prefix="$acl_final_prefix"
9603 acl_save_exec_prefix="$exec_prefix"
9604 exec_prefix="$acl_final_exec_prefix"
9605 eval x=\"$x\"
9606 exec_prefix="$acl_save_exec_prefix"
9607 prefix="$acl_save_prefix"
9608
9609 case "$x" in
9610 -L*)
9611 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 9612 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9613 found_dir="$dir"
9614 found_so="$dir/lib$name.$shlibext"
9615 if test -f "$dir/lib$name.la"; then
9616 found_la="$dir/lib$name.la"
9617 fi
9f1528a1 9618 elif test x$lib_type != xshared; then
3841debe
DJ
9619 if test -f "$dir/lib$name.$libext"; then
9620 found_dir="$dir"
9621 found_a="$dir/lib$name.$libext"
9622 if test -f "$dir/lib$name.la"; then
9623 found_la="$dir/lib$name.la"
9624 fi
9625 fi
9626 fi
9627 ;;
9628 esac
9629 if test "X$found_dir" != "X"; then
9630 break
9631 fi
9632 done
9633 fi
9634 if test "X$found_dir" != "X"; then
9635 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9636 if test "X$found_so" != "X"; then
9637 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9638 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9639 else
9640 haveit=
9641 for x in $ltrpathdirs; do
9642 if test "X$x" = "X$found_dir"; then
9643 haveit=yes
9644 break
9645 fi
9646 done
9647 if test -z "$haveit"; then
9648 ltrpathdirs="$ltrpathdirs $found_dir"
9649 fi
9650 if test "$hardcode_direct" = yes; then
9651 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9652 else
9653 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9654 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9655 haveit=
9656 for x in $rpathdirs; do
9657 if test "X$x" = "X$found_dir"; then
9658 haveit=yes
9659 break
9660 fi
9661 done
9662 if test -z "$haveit"; then
9663 rpathdirs="$rpathdirs $found_dir"
9664 fi
9665 else
9666 haveit=
9667 for x in $LDFLAGS $LIBEXPAT; do
9668
9669 acl_save_prefix="$prefix"
9670 prefix="$acl_final_prefix"
9671 acl_save_exec_prefix="$exec_prefix"
9672 exec_prefix="$acl_final_exec_prefix"
9673 eval x=\"$x\"
9674 exec_prefix="$acl_save_exec_prefix"
9675 prefix="$acl_save_prefix"
9676
9677 if test "X$x" = "X-L$found_dir"; then
9678 haveit=yes
9679 break
9680 fi
9681 done
9682 if test -z "$haveit"; then
9683 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9684 fi
9685 if test "$hardcode_minus_L" != no; then
9686 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9687 else
9688 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9689 fi
9690 fi
9691 fi
9692 fi
9693 else
9694 if test "X$found_a" != "X"; then
9695 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9696 else
9697 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9698 fi
9699 fi
9700 additional_includedir=
9701 case "$found_dir" in
9702 */lib | */lib/)
9703 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9704 additional_includedir="$basedir/include"
9705 ;;
9706 esac
9707 if test "X$additional_includedir" != "X"; then
9708 if test "X$additional_includedir" != "X/usr/include"; then
9709 haveit=
9710 if test "X$additional_includedir" = "X/usr/local/include"; then
9711 if test -n "$GCC"; then
9712 case $host_os in
9713 linux*) haveit=yes;;
9714 esac
9715 fi
9716 fi
9717 if test -z "$haveit"; then
9718 for x in $CPPFLAGS $INCEXPAT; do
9719
9720 acl_save_prefix="$prefix"
9721 prefix="$acl_final_prefix"
9722 acl_save_exec_prefix="$exec_prefix"
9723 exec_prefix="$acl_final_exec_prefix"
9724 eval x=\"$x\"
9725 exec_prefix="$acl_save_exec_prefix"
9726 prefix="$acl_save_prefix"
9727
9728 if test "X$x" = "X-I$additional_includedir"; then
9729 haveit=yes
9730 break
9731 fi
9732 done
9733 if test -z "$haveit"; then
9734 if test -d "$additional_includedir"; then
9735 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9736 fi
9737 fi
9738 fi
9739 fi
9740 fi
9741 if test -n "$found_la"; then
9742 save_libdir="$libdir"
9743 case "$found_la" in
9744 */* | *\\*) . "$found_la" ;;
9745 *) . "./$found_la" ;;
9746 esac
9747 libdir="$save_libdir"
9748 for dep in $dependency_libs; do
9749 case "$dep" in
9750 -L*)
9751 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9752 if test "X$additional_libdir" != "X/usr/lib"; then
9753 haveit=
9754 if test "X$additional_libdir" = "X/usr/local/lib"; then
9755 if test -n "$GCC"; then
9756 case $host_os in
9757 linux*) haveit=yes;;
9758 esac
9759 fi
9760 fi
9761 if test -z "$haveit"; then
9762 haveit=
9763 for x in $LDFLAGS $LIBEXPAT; do
9764
9765 acl_save_prefix="$prefix"
9766 prefix="$acl_final_prefix"
9767 acl_save_exec_prefix="$exec_prefix"
9768 exec_prefix="$acl_final_exec_prefix"
9769 eval x=\"$x\"
9770 exec_prefix="$acl_save_exec_prefix"
9771 prefix="$acl_save_prefix"
9772
9773 if test "X$x" = "X-L$additional_libdir"; then
9774 haveit=yes
9775 break
9776 fi
9777 done
9778 if test -z "$haveit"; then
9779 if test -d "$additional_libdir"; then
9780 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9781 fi
9782 fi
9783 haveit=
9784 for x in $LDFLAGS $LTLIBEXPAT; do
9785
9786 acl_save_prefix="$prefix"
9787 prefix="$acl_final_prefix"
9788 acl_save_exec_prefix="$exec_prefix"
9789 exec_prefix="$acl_final_exec_prefix"
9790 eval x=\"$x\"
9791 exec_prefix="$acl_save_exec_prefix"
9792 prefix="$acl_save_prefix"
9793
9794 if test "X$x" = "X-L$additional_libdir"; then
9795 haveit=yes
9796 break
9797 fi
9798 done
9799 if test -z "$haveit"; then
9800 if test -d "$additional_libdir"; then
9801 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9802 fi
9803 fi
9804 fi
9805 fi
9806 ;;
9807 -R*)
9808 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9809 if test "$enable_rpath" != no; then
9810 haveit=
9811 for x in $rpathdirs; do
9812 if test "X$x" = "X$dir"; then
9813 haveit=yes
9814 break
9815 fi
9816 done
9817 if test -z "$haveit"; then
9818 rpathdirs="$rpathdirs $dir"
9819 fi
9820 haveit=
9821 for x in $ltrpathdirs; do
9822 if test "X$x" = "X$dir"; then
9823 haveit=yes
9824 break
9825 fi
9826 done
9827 if test -z "$haveit"; then
9828 ltrpathdirs="$ltrpathdirs $dir"
9829 fi
9830 fi
9831 ;;
9832 -l*)
9833 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9834 ;;
9835 *.la)
9836 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9837 ;;
9838 *)
9839 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9840 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9841 ;;
81ecdfbb
RW
9842 esac
9843 done
9844 fi
9845 else
9f1528a1
AB
9846 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9847 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9848 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9849 else
9850 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9851 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9852 fi
81ecdfbb
RW
9853 fi
9854 fi
9855 fi
9856 done
9857 done
9858 if test "X$rpathdirs" != "X"; then
9859 if test -n "$hardcode_libdir_separator"; then
9860 alldirs=
9861 for found_dir in $rpathdirs; do
9862 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9863 done
9864 acl_save_libdir="$libdir"
9865 libdir="$alldirs"
9866 eval flag=\"$hardcode_libdir_flag_spec\"
9867 libdir="$acl_save_libdir"
9868 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9869 else
9870 for found_dir in $rpathdirs; do
9871 acl_save_libdir="$libdir"
9872 libdir="$found_dir"
9873 eval flag=\"$hardcode_libdir_flag_spec\"
9874 libdir="$acl_save_libdir"
9875 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9876 done
9877 fi
9878 fi
9879 if test "X$ltrpathdirs" != "X"; then
9880 for found_dir in $ltrpathdirs; do
9881 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9882 done
9883 fi
a9322a30
TT
9884
9885
81ecdfbb 9886 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9887
81ecdfbb
RW
9888 for element in $INCEXPAT; do
9889 haveit=
9890 for x in $CPPFLAGS; do
a9322a30 9891
81ecdfbb
RW
9892 acl_save_prefix="$prefix"
9893 prefix="$acl_final_prefix"
9894 acl_save_exec_prefix="$exec_prefix"
9895 exec_prefix="$acl_final_exec_prefix"
9896 eval x=\"$x\"
9897 exec_prefix="$acl_save_exec_prefix"
9898 prefix="$acl_save_prefix"
a8111142 9899
81ecdfbb
RW
9900 if test "X$x" = "X$element"; then
9901 haveit=yes
9902 break
9903 fi
9904 done
9905 if test -z "$haveit"; then
9906 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9907 fi
9908 done
a9322a30
TT
9909
9910
81ecdfbb
RW
9911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9912$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9913if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9914 $as_echo_n "(cached) " >&6
bec39cab 9915else
bec39cab 9916
81ecdfbb
RW
9917 ac_save_LIBS="$LIBS"
9918 LIBS="$LIBS $LIBEXPAT"
9919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9920/* end confdefs.h. */
81ecdfbb
RW
9921#include "expat.h"
9922int
9923main ()
9924{
9925XML_Parser p = XML_ParserCreate (0);
9926 ;
9927 return 0;
9928}
bec39cab 9929_ACEOF
81ecdfbb
RW
9930if ac_fn_c_try_link "$LINENO"; then :
9931 ac_cv_libexpat=yes
c906108c 9932else
81ecdfbb 9933 ac_cv_libexpat=no
bec39cab 9934fi
81ecdfbb
RW
9935rm -f core conftest.err conftest.$ac_objext \
9936 conftest$ac_exeext conftest.$ac_ext
9937 LIBS="$ac_save_LIBS"
c906108c 9938
95ca63c4 9939fi
81ecdfbb
RW
9940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9941$as_echo "$ac_cv_libexpat" >&6; }
9942 if test "$ac_cv_libexpat" = yes; then
9943 HAVE_LIBEXPAT=yes
bec39cab 9944
81ecdfbb 9945$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9946
81ecdfbb
RW
9947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9948$as_echo_n "checking how to link with libexpat... " >&6; }
9949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9950$as_echo "$LIBEXPAT" >&6; }
9951 else
9952 HAVE_LIBEXPAT=no
9953 CPPFLAGS="$ac_save_CPPFLAGS"
9954 LIBEXPAT=
9955 LTLIBEXPAT=
9956 fi
95ca63c4
CF
9957
9958
9959
7cb9022a
MK
9960
9961
bec39cab 9962
81ecdfbb
RW
9963 if test "$HAVE_LIBEXPAT" != yes; then
9964 if test "$with_expat" = yes; then
d0ac1c44 9965 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9966 else
9967 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9968$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9969 fi
9970 else
9971 save_LIBS=$LIBS
9972 LIBS="$LIBS $LIBEXPAT"
9973 for ac_func in XML_StopParser
9974do :
9975 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9976if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9977 cat >>confdefs.h <<_ACEOF
81ecdfbb 9978#define HAVE_XML_STOPPARSER 1
bec39cab 9979_ACEOF
95ca63c4 9980
bec39cab 9981fi
bec39cab 9982done
95ca63c4 9983
81ecdfbb
RW
9984 LIBS=$save_LIBS
9985 fi
a9322a30
TT
9986fi
9987
2c947d9b
JB
9988# Verify that we have a usable GMP library.
9989
9990
9991
9992
9993
9994
9995
9996
9997 use_additional=yes
9998
9999 acl_save_prefix="$prefix"
10000 prefix="$acl_final_prefix"
10001 acl_save_exec_prefix="$exec_prefix"
10002 exec_prefix="$acl_final_exec_prefix"
10003
10004 eval additional_includedir=\"$includedir\"
10005 eval additional_libdir=\"$libdir\"
10006
10007 exec_prefix="$acl_save_exec_prefix"
10008 prefix="$acl_save_prefix"
10009
10010
10011# Check whether --with-libgmp-prefix was given.
10012if test "${with_libgmp_prefix+set}" = set; then :
10013 withval=$with_libgmp_prefix;
10014 if test "X$withval" = "Xno"; then
10015 use_additional=no
10016 else
10017 if test "X$withval" = "X"; then
10018
10019 acl_save_prefix="$prefix"
10020 prefix="$acl_final_prefix"
10021 acl_save_exec_prefix="$exec_prefix"
10022 exec_prefix="$acl_final_exec_prefix"
10023
10024 eval additional_includedir=\"$includedir\"
10025 eval additional_libdir=\"$libdir\"
10026
10027 exec_prefix="$acl_save_exec_prefix"
10028 prefix="$acl_save_prefix"
10029
10030 else
10031 additional_includedir="$withval/include"
10032 additional_libdir="$withval/lib"
10033 fi
10034 fi
10035
10036fi
10037
10038
10039# Check whether --with-libgmp-type was given.
10040if test "${with_libgmp_type+set}" = set; then :
10041 withval=$with_libgmp_type; with_libgmp_type=$withval
10042else
10043 with_libgmp_type=auto
10044fi
10045
10046 lib_type=`eval echo \$with_libgmp_type`
10047
10048 LIBGMP=
10049 LTLIBGMP=
10050 INCGMP=
10051 rpathdirs=
10052 ltrpathdirs=
10053 names_already_handled=
10054 names_next_round='gmp '
10055 while test -n "$names_next_round"; do
10056 names_this_round="$names_next_round"
10057 names_next_round=
10058 for name in $names_this_round; do
10059 already_handled=
10060 for n in $names_already_handled; do
10061 if test "$n" = "$name"; then
10062 already_handled=yes
10063 break
10064 fi
10065 done
10066 if test -z "$already_handled"; then
10067 names_already_handled="$names_already_handled $name"
10068 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10069 eval value=\"\$HAVE_LIB$uppername\"
10070 if test -n "$value"; then
10071 if test "$value" = yes; then
10072 eval value=\"\$LIB$uppername\"
10073 test -z "$value" || LIBGMP="${LIBGMP}${LIBGMP:+ }$value"
10074 eval value=\"\$LTLIB$uppername\"
10075 test -z "$value" || LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$value"
10076 else
10077 :
10078 fi
10079 else
10080 found_dir=
10081 found_la=
10082 found_so=
10083 found_a=
10084 if test $use_additional = yes; then
10085 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10086 found_dir="$additional_libdir"
10087 found_so="$additional_libdir/lib$name.$shlibext"
10088 if test -f "$additional_libdir/lib$name.la"; then
10089 found_la="$additional_libdir/lib$name.la"
10090 fi
10091 elif test x$lib_type != xshared; then
10092 if test -f "$additional_libdir/lib$name.$libext"; then
10093 found_dir="$additional_libdir"
10094 found_a="$additional_libdir/lib$name.$libext"
10095 if test -f "$additional_libdir/lib$name.la"; then
10096 found_la="$additional_libdir/lib$name.la"
10097 fi
10098 fi
10099 fi
10100 fi
10101 if test "X$found_dir" = "X"; then
10102 for x in $LDFLAGS $LTLIBGMP; do
10103
10104 acl_save_prefix="$prefix"
10105 prefix="$acl_final_prefix"
10106 acl_save_exec_prefix="$exec_prefix"
10107 exec_prefix="$acl_final_exec_prefix"
10108 eval x=\"$x\"
10109 exec_prefix="$acl_save_exec_prefix"
10110 prefix="$acl_save_prefix"
10111
10112 case "$x" in
10113 -L*)
10114 dir=`echo "X$x" | sed -e 's/^X-L//'`
10115 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10116 found_dir="$dir"
10117 found_so="$dir/lib$name.$shlibext"
10118 if test -f "$dir/lib$name.la"; then
10119 found_la="$dir/lib$name.la"
10120 fi
10121 elif test x$lib_type != xshared; then
10122 if test -f "$dir/lib$name.$libext"; then
10123 found_dir="$dir"
10124 found_a="$dir/lib$name.$libext"
10125 if test -f "$dir/lib$name.la"; then
10126 found_la="$dir/lib$name.la"
10127 fi
10128 fi
10129 fi
10130 ;;
10131 esac
10132 if test "X$found_dir" != "X"; then
10133 break
10134 fi
10135 done
10136 fi
10137 if test "X$found_dir" != "X"; then
10138 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$found_dir -l$name"
10139 if test "X$found_so" != "X"; then
10140 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10141 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10142 else
10143 haveit=
10144 for x in $ltrpathdirs; do
10145 if test "X$x" = "X$found_dir"; then
10146 haveit=yes
10147 break
10148 fi
10149 done
10150 if test -z "$haveit"; then
10151 ltrpathdirs="$ltrpathdirs $found_dir"
10152 fi
10153 if test "$hardcode_direct" = yes; then
10154 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10155 else
10156 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10157 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10158 haveit=
10159 for x in $rpathdirs; do
10160 if test "X$x" = "X$found_dir"; then
10161 haveit=yes
10162 break
10163 fi
10164 done
10165 if test -z "$haveit"; then
10166 rpathdirs="$rpathdirs $found_dir"
10167 fi
10168 else
10169 haveit=
10170 for x in $LDFLAGS $LIBGMP; do
10171
10172 acl_save_prefix="$prefix"
10173 prefix="$acl_final_prefix"
10174 acl_save_exec_prefix="$exec_prefix"
10175 exec_prefix="$acl_final_exec_prefix"
10176 eval x=\"$x\"
10177 exec_prefix="$acl_save_exec_prefix"
10178 prefix="$acl_save_prefix"
10179
10180 if test "X$x" = "X-L$found_dir"; then
10181 haveit=yes
10182 break
10183 fi
10184 done
10185 if test -z "$haveit"; then
10186 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir"
10187 fi
10188 if test "$hardcode_minus_L" != no; then
10189 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10190 else
10191 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10192 fi
10193 fi
10194 fi
10195 fi
10196 else
10197 if test "X$found_a" != "X"; then
10198 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_a"
10199 else
10200 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir -l$name"
10201 fi
10202 fi
10203 additional_includedir=
10204 case "$found_dir" in
10205 */lib | */lib/)
10206 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10207 additional_includedir="$basedir/include"
10208 ;;
10209 esac
10210 if test "X$additional_includedir" != "X"; then
10211 if test "X$additional_includedir" != "X/usr/include"; then
10212 haveit=
10213 if test "X$additional_includedir" = "X/usr/local/include"; then
10214 if test -n "$GCC"; then
10215 case $host_os in
10216 linux*) haveit=yes;;
10217 esac
10218 fi
10219 fi
10220 if test -z "$haveit"; then
10221 for x in $CPPFLAGS $INCGMP; do
10222
10223 acl_save_prefix="$prefix"
10224 prefix="$acl_final_prefix"
10225 acl_save_exec_prefix="$exec_prefix"
10226 exec_prefix="$acl_final_exec_prefix"
10227 eval x=\"$x\"
10228 exec_prefix="$acl_save_exec_prefix"
10229 prefix="$acl_save_prefix"
10230
10231 if test "X$x" = "X-I$additional_includedir"; then
10232 haveit=yes
10233 break
10234 fi
10235 done
10236 if test -z "$haveit"; then
10237 if test -d "$additional_includedir"; then
10238 INCGMP="${INCGMP}${INCGMP:+ }-I$additional_includedir"
10239 fi
10240 fi
10241 fi
10242 fi
10243 fi
10244 if test -n "$found_la"; then
10245 save_libdir="$libdir"
10246 case "$found_la" in
10247 */* | *\\*) . "$found_la" ;;
10248 *) . "./$found_la" ;;
10249 esac
10250 libdir="$save_libdir"
10251 for dep in $dependency_libs; do
10252 case "$dep" in
10253 -L*)
10254 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10255 if test "X$additional_libdir" != "X/usr/lib"; then
10256 haveit=
10257 if test "X$additional_libdir" = "X/usr/local/lib"; then
10258 if test -n "$GCC"; then
10259 case $host_os in
10260 linux*) haveit=yes;;
10261 esac
10262 fi
10263 fi
10264 if test -z "$haveit"; then
10265 haveit=
10266 for x in $LDFLAGS $LIBGMP; do
10267
10268 acl_save_prefix="$prefix"
10269 prefix="$acl_final_prefix"
10270 acl_save_exec_prefix="$exec_prefix"
10271 exec_prefix="$acl_final_exec_prefix"
10272 eval x=\"$x\"
10273 exec_prefix="$acl_save_exec_prefix"
10274 prefix="$acl_save_prefix"
10275
10276 if test "X$x" = "X-L$additional_libdir"; then
10277 haveit=yes
10278 break
10279 fi
10280 done
10281 if test -z "$haveit"; then
10282 if test -d "$additional_libdir"; then
10283 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$additional_libdir"
10284 fi
10285 fi
10286 haveit=
10287 for x in $LDFLAGS $LTLIBGMP; do
10288
10289 acl_save_prefix="$prefix"
10290 prefix="$acl_final_prefix"
10291 acl_save_exec_prefix="$exec_prefix"
10292 exec_prefix="$acl_final_exec_prefix"
10293 eval x=\"$x\"
10294 exec_prefix="$acl_save_exec_prefix"
10295 prefix="$acl_save_prefix"
10296
10297 if test "X$x" = "X-L$additional_libdir"; then
10298 haveit=yes
10299 break
10300 fi
10301 done
10302 if test -z "$haveit"; then
10303 if test -d "$additional_libdir"; then
10304 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$additional_libdir"
10305 fi
10306 fi
10307 fi
10308 fi
10309 ;;
10310 -R*)
10311 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10312 if test "$enable_rpath" != no; then
10313 haveit=
10314 for x in $rpathdirs; do
10315 if test "X$x" = "X$dir"; then
10316 haveit=yes
10317 break
10318 fi
10319 done
10320 if test -z "$haveit"; then
10321 rpathdirs="$rpathdirs $dir"
10322 fi
10323 haveit=
10324 for x in $ltrpathdirs; do
10325 if test "X$x" = "X$dir"; then
10326 haveit=yes
10327 break
10328 fi
10329 done
10330 if test -z "$haveit"; then
10331 ltrpathdirs="$ltrpathdirs $dir"
10332 fi
10333 fi
10334 ;;
10335 -l*)
10336 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10337 ;;
10338 *.la)
10339 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10340 ;;
10341 *)
10342 LIBGMP="${LIBGMP}${LIBGMP:+ }$dep"
10343 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$dep"
10344 ;;
10345 esac
10346 done
10347 fi
10348 else
10349 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10350 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10351 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l$name"
10352 else
10353 LIBGMP="${LIBGMP}${LIBGMP:+ }-l:lib$name.$libext"
10354 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l:lib$name.$libext"
10355 fi
10356 fi
10357 fi
10358 fi
10359 done
10360 done
10361 if test "X$rpathdirs" != "X"; then
10362 if test -n "$hardcode_libdir_separator"; then
10363 alldirs=
10364 for found_dir in $rpathdirs; do
10365 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10366 done
10367 acl_save_libdir="$libdir"
10368 libdir="$alldirs"
10369 eval flag=\"$hardcode_libdir_flag_spec\"
10370 libdir="$acl_save_libdir"
10371 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10372 else
10373 for found_dir in $rpathdirs; do
10374 acl_save_libdir="$libdir"
10375 libdir="$found_dir"
10376 eval flag=\"$hardcode_libdir_flag_spec\"
10377 libdir="$acl_save_libdir"
10378 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10379 done
10380 fi
10381 fi
10382 if test "X$ltrpathdirs" != "X"; then
10383 for found_dir in $ltrpathdirs; do
10384 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-R$found_dir"
10385 done
10386 fi
10387
10388
10389 ac_save_CPPFLAGS="$CPPFLAGS"
10390
10391 for element in $INCGMP; do
10392 haveit=
10393 for x in $CPPFLAGS; do
10394
10395 acl_save_prefix="$prefix"
10396 prefix="$acl_final_prefix"
10397 acl_save_exec_prefix="$exec_prefix"
10398 exec_prefix="$acl_final_exec_prefix"
10399 eval x=\"$x\"
10400 exec_prefix="$acl_save_exec_prefix"
10401 prefix="$acl_save_prefix"
10402
10403 if test "X$x" = "X$element"; then
10404 haveit=yes
10405 break
10406 fi
10407 done
10408 if test -z "$haveit"; then
10409 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10410 fi
10411 done
10412
10413
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmp" >&5
10415$as_echo_n "checking for libgmp... " >&6; }
10416if ${ac_cv_libgmp+:} false; then :
10417 $as_echo_n "(cached) " >&6
10418else
10419
10420 ac_save_LIBS="$LIBS"
10421 LIBS="$LIBS $LIBGMP"
10422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10423/* end confdefs.h. */
10424#include <gmp.h>
10425int
10426main ()
10427{
10428mpz_t n;
10429 mpz_init (n);
10430 ;
10431 return 0;
10432}
10433_ACEOF
10434if ac_fn_c_try_link "$LINENO"; then :
10435 ac_cv_libgmp=yes
10436else
10437 ac_cv_libgmp=no
10438fi
10439rm -f core conftest.err conftest.$ac_objext \
10440 conftest$ac_exeext conftest.$ac_ext
10441 LIBS="$ac_save_LIBS"
10442
10443fi
10444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgmp" >&5
10445$as_echo "$ac_cv_libgmp" >&6; }
10446 if test "$ac_cv_libgmp" = yes; then
10447 HAVE_LIBGMP=yes
10448
10449$as_echo "#define HAVE_LIBGMP 1" >>confdefs.h
10450
10451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgmp" >&5
10452$as_echo_n "checking how to link with libgmp... " >&6; }
10453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGMP" >&5
10454$as_echo "$LIBGMP" >&6; }
10455 else
10456 HAVE_LIBGMP=no
10457 CPPFLAGS="$ac_save_CPPFLAGS"
10458 LIBGMP=
10459 LTLIBGMP=
10460 fi
10461
10462
10463
10464
10465
10466
1b4ac058
JB
10467if test "$HAVE_LIBGMP" != yes; then
10468 as_fn_error $? "GMP is missing or unusable" "$LINENO" 5
10469fi
2c947d9b 10470
2400729e
UW
10471
10472# Check whether --with-mpfr was given.
10473if test "${with_mpfr+set}" = set; then :
10474 withval=$with_mpfr;
10475else
10476 with_mpfr=auto
10477fi
10478
10479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
10480$as_echo_n "checking whether to use MPFR... " >&6; }
10481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
10482$as_echo "$with_mpfr" >&6; }
10483
10484if test "${with_mpfr}" = no; then
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10486$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10487 HAVE_LIBMPFR=no
10488else
10489
10490
10491
10492
10493
10494
10495
10496
10497 use_additional=yes
10498
10499 acl_save_prefix="$prefix"
10500 prefix="$acl_final_prefix"
10501 acl_save_exec_prefix="$exec_prefix"
10502 exec_prefix="$acl_final_exec_prefix"
10503
10504 eval additional_includedir=\"$includedir\"
10505 eval additional_libdir=\"$libdir\"
10506
10507 exec_prefix="$acl_save_exec_prefix"
10508 prefix="$acl_save_prefix"
10509
10510
10511# Check whether --with-libmpfr-prefix was given.
10512if test "${with_libmpfr_prefix+set}" = set; then :
10513 withval=$with_libmpfr_prefix;
10514 if test "X$withval" = "Xno"; then
10515 use_additional=no
10516 else
10517 if test "X$withval" = "X"; then
10518
10519 acl_save_prefix="$prefix"
10520 prefix="$acl_final_prefix"
10521 acl_save_exec_prefix="$exec_prefix"
10522 exec_prefix="$acl_final_exec_prefix"
10523
10524 eval additional_includedir=\"$includedir\"
10525 eval additional_libdir=\"$libdir\"
10526
10527 exec_prefix="$acl_save_exec_prefix"
10528 prefix="$acl_save_prefix"
10529
10530 else
10531 additional_includedir="$withval/include"
10532 additional_libdir="$withval/lib"
10533 fi
10534 fi
10535
10536fi
10537
9f1528a1
AB
10538
10539# Check whether --with-libmpfr-type was given.
10540if test "${with_libmpfr_type+set}" = set; then :
10541 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10542else
10543 with_libmpfr_type=auto
10544fi
10545
10546 lib_type=`eval echo \$with_libmpfr_type`
10547
2400729e
UW
10548 LIBMPFR=
10549 LTLIBMPFR=
10550 INCMPFR=
10551 rpathdirs=
10552 ltrpathdirs=
10553 names_already_handled=
da658607 10554 names_next_round='mpfr gmp'
2400729e
UW
10555 while test -n "$names_next_round"; do
10556 names_this_round="$names_next_round"
10557 names_next_round=
10558 for name in $names_this_round; do
10559 already_handled=
10560 for n in $names_already_handled; do
10561 if test "$n" = "$name"; then
10562 already_handled=yes
10563 break
10564 fi
10565 done
10566 if test -z "$already_handled"; then
10567 names_already_handled="$names_already_handled $name"
10568 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10569 eval value=\"\$HAVE_LIB$uppername\"
10570 if test -n "$value"; then
10571 if test "$value" = yes; then
10572 eval value=\"\$LIB$uppername\"
10573 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10574 eval value=\"\$LTLIB$uppername\"
10575 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10576 else
10577 :
10578 fi
10579 else
10580 found_dir=
10581 found_la=
10582 found_so=
10583 found_a=
10584 if test $use_additional = yes; then
9f1528a1 10585 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
10586 found_dir="$additional_libdir"
10587 found_so="$additional_libdir/lib$name.$shlibext"
10588 if test -f "$additional_libdir/lib$name.la"; then
10589 found_la="$additional_libdir/lib$name.la"
10590 fi
9f1528a1 10591 elif test x$lib_type != xshared; then
2400729e
UW
10592 if test -f "$additional_libdir/lib$name.$libext"; then
10593 found_dir="$additional_libdir"
10594 found_a="$additional_libdir/lib$name.$libext"
10595 if test -f "$additional_libdir/lib$name.la"; then
10596 found_la="$additional_libdir/lib$name.la"
10597 fi
10598 fi
10599 fi
10600 fi
10601 if test "X$found_dir" = "X"; then
10602 for x in $LDFLAGS $LTLIBMPFR; do
10603
10604 acl_save_prefix="$prefix"
10605 prefix="$acl_final_prefix"
10606 acl_save_exec_prefix="$exec_prefix"
10607 exec_prefix="$acl_final_exec_prefix"
10608 eval x=\"$x\"
10609 exec_prefix="$acl_save_exec_prefix"
10610 prefix="$acl_save_prefix"
10611
10612 case "$x" in
10613 -L*)
10614 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 10615 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
10616 found_dir="$dir"
10617 found_so="$dir/lib$name.$shlibext"
10618 if test -f "$dir/lib$name.la"; then
10619 found_la="$dir/lib$name.la"
10620 fi
9f1528a1 10621 elif test x$lib_type != xshared; then
2400729e
UW
10622 if test -f "$dir/lib$name.$libext"; then
10623 found_dir="$dir"
10624 found_a="$dir/lib$name.$libext"
10625 if test -f "$dir/lib$name.la"; then
10626 found_la="$dir/lib$name.la"
10627 fi
10628 fi
10629 fi
10630 ;;
10631 esac
10632 if test "X$found_dir" != "X"; then
10633 break
10634 fi
10635 done
10636 fi
10637 if test "X$found_dir" != "X"; then
10638 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10639 if test "X$found_so" != "X"; then
10640 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10641 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10642 else
10643 haveit=
10644 for x in $ltrpathdirs; do
10645 if test "X$x" = "X$found_dir"; then
10646 haveit=yes
10647 break
10648 fi
10649 done
10650 if test -z "$haveit"; then
10651 ltrpathdirs="$ltrpathdirs $found_dir"
10652 fi
10653 if test "$hardcode_direct" = yes; then
10654 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10655 else
10656 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10657 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10658 haveit=
10659 for x in $rpathdirs; do
10660 if test "X$x" = "X$found_dir"; then
10661 haveit=yes
10662 break
10663 fi
10664 done
10665 if test -z "$haveit"; then
10666 rpathdirs="$rpathdirs $found_dir"
10667 fi
10668 else
10669 haveit=
10670 for x in $LDFLAGS $LIBMPFR; do
10671
10672 acl_save_prefix="$prefix"
10673 prefix="$acl_final_prefix"
10674 acl_save_exec_prefix="$exec_prefix"
10675 exec_prefix="$acl_final_exec_prefix"
10676 eval x=\"$x\"
10677 exec_prefix="$acl_save_exec_prefix"
10678 prefix="$acl_save_prefix"
10679
10680 if test "X$x" = "X-L$found_dir"; then
10681 haveit=yes
10682 break
10683 fi
10684 done
10685 if test -z "$haveit"; then
10686 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10687 fi
10688 if test "$hardcode_minus_L" != no; then
10689 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10690 else
10691 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10692 fi
10693 fi
10694 fi
10695 fi
10696 else
10697 if test "X$found_a" != "X"; then
10698 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10699 else
10700 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10701 fi
10702 fi
10703 additional_includedir=
10704 case "$found_dir" in
10705 */lib | */lib/)
10706 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10707 additional_includedir="$basedir/include"
10708 ;;
10709 esac
10710 if test "X$additional_includedir" != "X"; then
10711 if test "X$additional_includedir" != "X/usr/include"; then
10712 haveit=
10713 if test "X$additional_includedir" = "X/usr/local/include"; then
10714 if test -n "$GCC"; then
10715 case $host_os in
10716 linux*) haveit=yes;;
10717 esac
10718 fi
10719 fi
10720 if test -z "$haveit"; then
10721 for x in $CPPFLAGS $INCMPFR; do
10722
10723 acl_save_prefix="$prefix"
10724 prefix="$acl_final_prefix"
10725 acl_save_exec_prefix="$exec_prefix"
10726 exec_prefix="$acl_final_exec_prefix"
10727 eval x=\"$x\"
10728 exec_prefix="$acl_save_exec_prefix"
10729 prefix="$acl_save_prefix"
10730
10731 if test "X$x" = "X-I$additional_includedir"; then
10732 haveit=yes
10733 break
10734 fi
10735 done
10736 if test -z "$haveit"; then
10737 if test -d "$additional_includedir"; then
10738 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10739 fi
10740 fi
10741 fi
10742 fi
10743 fi
10744 if test -n "$found_la"; then
10745 save_libdir="$libdir"
10746 case "$found_la" in
10747 */* | *\\*) . "$found_la" ;;
10748 *) . "./$found_la" ;;
10749 esac
10750 libdir="$save_libdir"
10751 for dep in $dependency_libs; do
10752 case "$dep" in
10753 -L*)
10754 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10755 if test "X$additional_libdir" != "X/usr/lib"; then
10756 haveit=
10757 if test "X$additional_libdir" = "X/usr/local/lib"; then
10758 if test -n "$GCC"; then
10759 case $host_os in
10760 linux*) haveit=yes;;
10761 esac
10762 fi
10763 fi
10764 if test -z "$haveit"; then
10765 haveit=
10766 for x in $LDFLAGS $LIBMPFR; do
10767
10768 acl_save_prefix="$prefix"
10769 prefix="$acl_final_prefix"
10770 acl_save_exec_prefix="$exec_prefix"
10771 exec_prefix="$acl_final_exec_prefix"
10772 eval x=\"$x\"
10773 exec_prefix="$acl_save_exec_prefix"
10774 prefix="$acl_save_prefix"
10775
10776 if test "X$x" = "X-L$additional_libdir"; then
10777 haveit=yes
10778 break
10779 fi
10780 done
10781 if test -z "$haveit"; then
10782 if test -d "$additional_libdir"; then
10783 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10784 fi
10785 fi
10786 haveit=
10787 for x in $LDFLAGS $LTLIBMPFR; do
10788
10789 acl_save_prefix="$prefix"
10790 prefix="$acl_final_prefix"
10791 acl_save_exec_prefix="$exec_prefix"
10792 exec_prefix="$acl_final_exec_prefix"
10793 eval x=\"$x\"
10794 exec_prefix="$acl_save_exec_prefix"
10795 prefix="$acl_save_prefix"
10796
10797 if test "X$x" = "X-L$additional_libdir"; then
10798 haveit=yes
10799 break
10800 fi
10801 done
10802 if test -z "$haveit"; then
10803 if test -d "$additional_libdir"; then
10804 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10805 fi
10806 fi
10807 fi
10808 fi
10809 ;;
10810 -R*)
10811 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10812 if test "$enable_rpath" != no; then
10813 haveit=
10814 for x in $rpathdirs; do
10815 if test "X$x" = "X$dir"; then
10816 haveit=yes
10817 break
10818 fi
10819 done
10820 if test -z "$haveit"; then
10821 rpathdirs="$rpathdirs $dir"
10822 fi
10823 haveit=
10824 for x in $ltrpathdirs; do
10825 if test "X$x" = "X$dir"; then
10826 haveit=yes
10827 break
10828 fi
10829 done
10830 if test -z "$haveit"; then
10831 ltrpathdirs="$ltrpathdirs $dir"
10832 fi
10833 fi
10834 ;;
10835 -l*)
10836 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10837 ;;
10838 *.la)
10839 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10840 ;;
10841 *)
10842 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10843 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10844 ;;
10845 esac
10846 done
10847 fi
10848 else
9f1528a1
AB
10849 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10850 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10851 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10852 else
10853 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10854 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10855 fi
2400729e
UW
10856 fi
10857 fi
10858 fi
10859 done
10860 done
10861 if test "X$rpathdirs" != "X"; then
10862 if test -n "$hardcode_libdir_separator"; then
10863 alldirs=
10864 for found_dir in $rpathdirs; do
10865 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10866 done
10867 acl_save_libdir="$libdir"
10868 libdir="$alldirs"
10869 eval flag=\"$hardcode_libdir_flag_spec\"
10870 libdir="$acl_save_libdir"
10871 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10872 else
10873 for found_dir in $rpathdirs; do
10874 acl_save_libdir="$libdir"
10875 libdir="$found_dir"
10876 eval flag=\"$hardcode_libdir_flag_spec\"
10877 libdir="$acl_save_libdir"
10878 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10879 done
10880 fi
10881 fi
10882 if test "X$ltrpathdirs" != "X"; then
10883 for found_dir in $ltrpathdirs; do
10884 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10885 done
10886 fi
10887
10888
10889 ac_save_CPPFLAGS="$CPPFLAGS"
10890
10891 for element in $INCMPFR; do
10892 haveit=
10893 for x in $CPPFLAGS; do
10894
10895 acl_save_prefix="$prefix"
10896 prefix="$acl_final_prefix"
10897 acl_save_exec_prefix="$exec_prefix"
10898 exec_prefix="$acl_final_exec_prefix"
10899 eval x=\"$x\"
10900 exec_prefix="$acl_save_exec_prefix"
10901 prefix="$acl_save_prefix"
10902
10903 if test "X$x" = "X$element"; then
10904 haveit=yes
10905 break
10906 fi
10907 done
10908 if test -z "$haveit"; then
10909 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10910 fi
10911 done
10912
10913
10914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10915$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10916if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10917 $as_echo_n "(cached) " >&6
10918else
10919
10920 ac_save_LIBS="$LIBS"
10921 LIBS="$LIBS $LIBMPFR"
10922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10923/* end confdefs.h. */
10924#include <mpfr.h>
10925int
10926main ()
10927{
10928mpfr_exp_t exp; mpfr_t x;
10929 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10930 ;
10931 return 0;
10932}
10933_ACEOF
10934if ac_fn_c_try_link "$LINENO"; then :
10935 ac_cv_libmpfr=yes
10936else
10937 ac_cv_libmpfr=no
10938fi
10939rm -f core conftest.err conftest.$ac_objext \
10940 conftest$ac_exeext conftest.$ac_ext
10941 LIBS="$ac_save_LIBS"
10942
10943fi
10944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10945$as_echo "$ac_cv_libmpfr" >&6; }
10946 if test "$ac_cv_libmpfr" = yes; then
10947 HAVE_LIBMPFR=yes
10948
10949$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10950
10951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10952$as_echo_n "checking how to link with libmpfr... " >&6; }
10953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10954$as_echo "$LIBMPFR" >&6; }
10955 else
10956 HAVE_LIBMPFR=no
10957 CPPFLAGS="$ac_save_CPPFLAGS"
10958 LIBMPFR=
10959 LTLIBMPFR=
10960 fi
10961
10962
10963
10964
10965
10966
10967 if test "$HAVE_LIBMPFR" != yes; then
10968 if test "$with_mpfr" = yes; then
d0ac1c44 10969 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10970 else
10971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10972$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10973 fi
10974 fi
10975fi
10976
d344e670
DE
10977# --------------------- #
10978# Check for libpython. #
10979# --------------------- #
10980
a9322a30 10981
a9322a30
TT
10982
10983
ec685c5e 10984
0c4a4063 10985
81ecdfbb
RW
10986# Check whether --with-python was given.
10987if test "${with_python+set}" = set; then :
10988 withval=$with_python;
bec39cab 10989else
81ecdfbb 10990 with_python=auto
bec39cab 10991fi
bec39cab 10992
81ecdfbb
RW
10993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10994$as_echo_n "checking whether to use python... " >&6; }
10995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10996$as_echo "$with_python" >&6; }
9a156167 10997
81ecdfbb
RW
10998if test "${with_python}" = no; then
10999 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
11000$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11001 have_libpython=no
bec39cab 11002else
81ecdfbb 11003 case "${with_python}" in
8c85a4e2 11004 [\\/]* | ?:[\\/]*)
0ad6b8ee 11005 if test -d "${with_python}"; then
ec685c5e 11006 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 11007 python_prog="${with_python}/bin/python"
0c4a4063 11008 python_prefix=
9c4ea6c5
JB
11009 # If python does not exit ${with_python}/bin, then try in
11010 # ${with_python}. On Windows/MinGW, this is where the Python
11011 # executable is.
11012 if test ! -x "${python_prog}"; then
11013 python_prog="${with_python}/python"
11014 python_prefix=
11015 fi
e7a30f46 11016 if test ! -x "${python_prog}"; then
ec685c5e
DE
11017 # Fall back to gdb 7.0/7.1 behaviour.
11018 python_prog=missing
0c4a4063 11019 python_prefix=${with_python}
ec685c5e 11020 fi
e7a30f46 11021 elif test -x "${with_python}"; then
ec685c5e
DE
11022 # While we can't run python compiled for $host (unless host == build),
11023 # the user could write a script that provides the needed information,
11024 # so we support that.
ec685c5e 11025 python_prog=${with_python}
0c4a4063 11026 python_prefix=
ec685c5e 11027 else
d0ac1c44 11028 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 11029 fi
81ecdfbb 11030 ;;
ec685c5e
DE
11031 */*)
11032 # Disallow --with-python=foo/bar.
d0ac1c44 11033 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 11034 ;;
ec685c5e
DE
11035 *)
11036 # The user has either specified auto, yes, or the name of the python
11037 # program assumed to be in $PATH.
11038 python_prefix=
11039 case "${with_python}" in
11040 yes | auto)
0ad6b8ee 11041 if test "${build}" = "${host}"; then
ec685c5e
DE
11042 # Extract the first word of "python", so it can be a program name with args.
11043set dummy python; ac_word=$2
11044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11045$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 11046if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
11047 $as_echo_n "(cached) " >&6
11048else
11049 case $python_prog_path in
11050 [\\/]* | ?:[\\/]*)
11051 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11052 ;;
11053 *)
11054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11055for as_dir in $PATH
11056do
11057 IFS=$as_save_IFS
11058 test -z "$as_dir" && as_dir=.
11059 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 11060 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
11061 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11063 break 2
11064 fi
11065done
11066 done
11067IFS=$as_save_IFS
11068
11069 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11070 ;;
11071esac
11072fi
11073python_prog_path=$ac_cv_path_python_prog_path
11074if test -n "$python_prog_path"; then
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11076$as_echo "$python_prog_path" >&6; }
11077else
11078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11079$as_echo "no" >&6; }
11080fi
11081
11082
11083 if test "${python_prog_path}" = missing; then
11084 python_prog=missing
11085 else
11086 python_prog=${python_prog_path}
11087 fi
11088 else
11089 # Not much we can do except assume the cross-compiler will find the
11090 # right files.
11091 python_prog=missing
11092 fi
11093 ;;
11094 *)
11095 # While we can't run python compiled for $host (unless host == build),
11096 # the user could write a script that provides the needed information,
11097 # so we support that.
11098 python_prog="${with_python}"
11099 # Extract the first word of "${python_prog}", so it can be a program name with args.
11100set dummy ${python_prog}; ac_word=$2
11101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11102$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 11103if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
11104 $as_echo_n "(cached) " >&6
11105else
11106 case $python_prog_path in
11107 [\\/]* | ?:[\\/]*)
11108 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11109 ;;
11110 *)
11111 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11112for as_dir in $PATH
11113do
11114 IFS=$as_save_IFS
11115 test -z "$as_dir" && as_dir=.
11116 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 11117 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
11118 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11120 break 2
11121 fi
11122done
11123 done
11124IFS=$as_save_IFS
11125
11126 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11127 ;;
11128esac
11129fi
11130python_prog_path=$ac_cv_path_python_prog_path
11131if test -n "$python_prog_path"; then
11132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11133$as_echo "$python_prog_path" >&6; }
11134else
11135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11136$as_echo "no" >&6; }
11137fi
11138
11139
11140 if test "${python_prog_path}" = missing; then
5593a99a 11141 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
11142 fi
11143 ;;
11144 esac
81ecdfbb
RW
11145 esac
11146
ec685c5e 11147 if test "${python_prog}" != missing; then
e7a30f46
DE
11148 # We have a python program to use, but it may be too old.
11149 # Don't flag an error for --with-python=auto (the default).
11150 have_python_config=yes
ec685c5e
DE
11151 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
11152 if test $? != 0; then
e7a30f46
DE
11153 have_python_config=failed
11154 if test "${with_python}" != auto; then
5593a99a 11155 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 11156 fi
ec685c5e
DE
11157 fi
11158 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
11159 if test $? != 0; then
e7a30f46
DE
11160 have_python_config=failed
11161 if test "${with_python}" != auto; then
5593a99a 11162 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 11163 fi
ec685c5e 11164 fi
0c4a4063
DE
11165 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
11166 if test $? != 0; then
e7a30f46
DE
11167 have_python_config=failed
11168 if test "${with_python}" != auto; then
5593a99a 11169 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 11170 fi
0c4a4063 11171 fi
ec685c5e 11172 else
ac534cba
JB
11173 # We do not have a python executable we can use to determine where
11174 # to find the Python headers and libs. We cannot guess the include
11175 # path from the python_prefix either, because that include path
11176 # depends on the Python version. So, there is nothing much we can
11177 # do except assume that the compiler will be able to find those files.
11178 python_includes=
11179 python_libs=
0c4a4063 11180 have_python_config=no
ec685c5e 11181 fi
bec39cab 11182
ec685c5e
DE
11183 # If we have python-config, only try the configuration it provides.
11184 # Otherwise fallback on the old way of trying different versions of
11185 # python in turn.
81ecdfbb 11186
ec685c5e
DE
11187 have_libpython=no
11188 if test "${have_python_config}" = yes; then
71737c43 11189
ec685c5e
DE
11190
11191 new_CPPFLAGS=${python_includes}
11192 new_LIBS=${python_libs}
71737c43
CB
11193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11194$as_echo_n "checking for python... " >&6; }
ec685c5e 11195 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11196 save_LIBS=$LIBS
ec685c5e 11197 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 11198 LIBS="$new_LIBS $LIBS"
ec685c5e 11199 found_usable_python=no
81ecdfbb 11200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11201/* end confdefs.h. */
ac534cba 11202#include "Python.h"
81ecdfbb
RW
11203int
11204main ()
11205{
11206Py_Initialize ();
11207 ;
11208 return 0;
11209}
bec39cab 11210_ACEOF
81ecdfbb 11211if ac_fn_c_try_link "$LINENO"; then :
71737c43 11212 have_libpython=yes
ec685c5e 11213 found_usable_python=yes
ac534cba
JB
11214 PYTHON_CPPFLAGS=$new_CPPFLAGS
11215 PYTHON_LIBS=$new_LIBS
9a156167 11216fi
81ecdfbb
RW
11217rm -f core conftest.err conftest.$ac_objext \
11218 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11219 CPPFLAGS=$save_CPPFLAGS
11220 LIBS=$save_LIBS
ec685c5e
DE
11221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11222$as_echo "${found_usable_python}" >&6; }
9a156167 11223
e7a30f46 11224 elif test "${have_python_config}" != failed; then
ec685c5e 11225 if test "${have_libpython}" = no; then
9a156167 11226
420697bb
TT
11227
11228 new_CPPFLAGS=${python_includes}
bf27f0e2 11229 new_LIBS="-lpython2.7 ${python_libs}"
71737c43
CB
11230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11231$as_echo_n "checking for python... " >&6; }
420697bb
TT
11232 save_CPPFLAGS=$CPPFLAGS
11233 save_LIBS=$LIBS
11234 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 11235 LIBS="$new_LIBS $LIBS"
420697bb
TT
11236 found_usable_python=no
11237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11238/* end confdefs.h. */
ac534cba 11239#include "Python.h"
420697bb
TT
11240int
11241main ()
11242{
11243Py_Initialize ();
11244 ;
11245 return 0;
11246}
11247_ACEOF
11248if ac_fn_c_try_link "$LINENO"; then :
71737c43 11249 have_libpython=yes
420697bb 11250 found_usable_python=yes
ac534cba
JB
11251 PYTHON_CPPFLAGS=$new_CPPFLAGS
11252 PYTHON_LIBS=$new_LIBS
420697bb
TT
11253fi
11254rm -f core conftest.err conftest.$ac_objext \
11255 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11256 CPPFLAGS=$save_CPPFLAGS
11257 LIBS=$save_LIBS
420697bb
TT
11258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11259$as_echo "${found_usable_python}" >&6; }
11260
11261 fi
11262 if test "${have_libpython}" = no; then
11263
ec685c5e
DE
11264
11265 new_CPPFLAGS=${python_includes}
bf27f0e2 11266 new_LIBS="-lpython2.6 ${python_libs}"
71737c43
CB
11267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11268$as_echo_n "checking for python... " >&6; }
ec685c5e
DE
11269 save_CPPFLAGS=$CPPFLAGS
11270 save_LIBS=$LIBS
11271 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 11272 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
11273 found_usable_python=no
11274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11275/* end confdefs.h. */
ac534cba 11276#include "Python.h"
ec685c5e
DE
11277int
11278main ()
11279{
11280Py_Initialize ();
11281 ;
11282 return 0;
11283}
11284_ACEOF
11285if ac_fn_c_try_link "$LINENO"; then :
71737c43 11286 have_libpython=yes
ec685c5e 11287 found_usable_python=yes
ac534cba
JB
11288 PYTHON_CPPFLAGS=$new_CPPFLAGS
11289 PYTHON_LIBS=$new_LIBS
ec685c5e 11290fi
81ecdfbb
RW
11291rm -f core conftest.err conftest.$ac_objext \
11292 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11293 CPPFLAGS=$save_CPPFLAGS
11294 LIBS=$save_LIBS
ec685c5e
DE
11295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11296$as_echo "${found_usable_python}" >&6; }
81ecdfbb 11297
ec685c5e
DE
11298 fi
11299 fi
ec685c5e
DE
11300
11301 if test "${have_libpython}" = no; then
81ecdfbb
RW
11302 case "${with_python}" in
11303 yes)
d0ac1c44 11304 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
11305 ;;
11306 auto)
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
11308$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11309 ;;
11310 *)
d0ac1c44 11311 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
11312 ;;
11313 esac
0c4a4063
DE
11314 else
11315 if test -n "${python_prefix}"; then
11316
11317cat >>confdefs.h <<_ACEOF
11318#define WITH_PYTHON_PATH "${python_prefix}"
11319_ACEOF
11320
11321
11322 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11323 if test "x$prefix" = xNONE; then
11324 test_prefix=/usr/local
11325 else
11326 test_prefix=$prefix
11327 fi
11328 else
11329 test_prefix=$exec_prefix
11330 fi
11331 value=0
11332 case ${python_prefix} in
11333 "${test_prefix}"|"${test_prefix}/"*|\
11334 '${exec_prefix}'|'${exec_prefix}/'*)
11335 value=1
11336 ;;
11337 esac
11338
11339cat >>confdefs.h <<_ACEOF
11340#define PYTHON_PATH_RELOCATABLE $value
11341_ACEOF
11342
11343
11344 fi
81ecdfbb 11345 fi
436868fb 11346fi
436868fb 11347
d13c7322
AB
11348
11349# Check whether --with-python-libdir was given.
11350if test "${with_python_libdir+set}" = set; then :
11351 withval=$with_python_libdir;
11352else
11353
11354 # If no python libdir is specified then select one based on
11355 # python's prefix path.
11356 if test -n "${python_prefix}"; then
11357 with_python_libdir=${python_prefix}/lib
11358 fi
11359
11360fi
11361
11362
ec685c5e 11363if test "${have_libpython}" != no; then
436868fb 11364
81ecdfbb 11365$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 11366
81ecdfbb
RW
11367 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11368 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11369 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 11370 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 11371 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 11372
d13c7322
AB
11373 if test -n "${with_python_libdir}"; then
11374
11375cat >>confdefs.h <<_ACEOF
11376#define WITH_PYTHON_LIBDIR "${with_python_libdir}"
11377_ACEOF
11378
11379
11380 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11381 if test "x$prefix" = xNONE; then
11382 test_prefix=/usr/local
11383 else
11384 test_prefix=$prefix
11385 fi
11386 else
11387 test_prefix=$exec_prefix
11388 fi
11389 value=0
11390 case ${with_python_libdir} in
11391 "${test_prefix}"|"${test_prefix}/"*|\
11392 '${exec_prefix}'|'${exec_prefix}/'*)
11393 value=1
11394 ;;
11395 esac
11396
11397cat >>confdefs.h <<_ACEOF
11398#define PYTHON_LIBDIR_RELOCATABLE $value
11399_ACEOF
11400
11401
11402 fi
11403
81ecdfbb
RW
11404 # Flags needed to compile Python code (taken from python-config --cflags).
11405 # We cannot call python-config directly because it will output whatever was
11406 # used when compiling the Python interpreter itself, including flags which
11407 # would make the python-related objects be compiled differently from the
11408 # rest of GDB (e.g., -O2 and -fPIC).
11409 if test "${GCC}" = yes; then
ae292b3a
TT
11410 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
11411 # Python headers recommend -DNDEBUG, but it's unclear if that just
11412 # refers to building Python itself. In release mode, though, it
11413 # doesn't hurt for the Python code in gdb to follow.
11414 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 11415 fi
436868fb 11416
81ecdfbb
RW
11417 if test "x${tentative_python_cflags}" != x; then
11418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11419$as_echo_n "checking compiler flags for python code... " >&6; }
11420 for flag in ${tentative_python_cflags}; do
11421 # Check that the compiler accepts it
11422 saved_CFLAGS="$CFLAGS"
11423 CFLAGS="$CFLAGS $flag"
11424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11425/* end confdefs.h. */
81ecdfbb 11426
a9322a30
TT
11427int
11428main ()
11429{
a9322a30
TT
11430
11431 ;
11432 return 0;
11433}
bec39cab 11434_ACEOF
81ecdfbb
RW
11435if ac_fn_c_try_compile "$LINENO"; then :
11436 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 11437fi
81ecdfbb
RW
11438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11439 CFLAGS="$saved_CFLAGS"
11440 done
11441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11442$as_echo "${PYTHON_CFLAGS}" >&6; }
11443 fi
043b6510 11444
c83393b9
JB
11445 # On x64 Windows, Python's include headers, and pyconfig.h in
11446 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
11447 # version of Windows. Unfortunately, MS_WIN64 is only defined if
11448 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
11449 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
11450 # The issue was reported to the Python community, but still isn't
11451 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
11452
043b6510 11453 case "$gdb_host" in
c83393b9
JB
11454 mingw64)
11455 if test "${GCC}" = yes; then
11456 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
11457 fi
11458 ;;
043b6510 11459 esac
81ecdfbb 11460else
6dddc817
DE
11461 # Even if Python support is not compiled in, we need to have this file
11462 # included so that the "python" command, et.al., still exists.
8fd8d003 11463 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 11464 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 11465fi
9a156167 11466
a4a1c157
PA
11467# Work around Python http://bugs.python.org/issue10112. See also
11468# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
11469# no effect. Note that the only test after this that uses Python is
11470# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
11471# run without -export-dynamic too.
11472PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
11473
11474
ed3ef339
DE
11475
11476
4df42755
DE
11477 if test "${have_libpython}" != no; then
11478 HAVE_PYTHON_TRUE=
11479 HAVE_PYTHON_FALSE='#'
11480else
11481 HAVE_PYTHON_TRUE='#'
11482 HAVE_PYTHON_FALSE=
11483fi
11484
ed3ef339
DE
11485
11486# -------------------- #
11487# Check for libguile. #
11488# -------------------- #
11489
11490
e1402065
DE
11491
11492
11493
11494
11495# Check whether --with-guile was given.
11496if test "${with_guile+set}" = set; then :
11497 withval=$with_guile;
11498else
11499 with_guile=auto
11500fi
11501
11502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11503$as_echo_n "checking whether to use guile... " >&6; }
11504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11505$as_echo "$with_guile" >&6; }
11506
ed3ef339
DE
11507# Extract the first word of "pkg-config", so it can be a program name with args.
11508set dummy pkg-config; ac_word=$2
11509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11510$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 11511if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
11512 $as_echo_n "(cached) " >&6
11513else
11514 case $pkg_config_prog_path in
11515 [\\/]* | ?:[\\/]*)
11516 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11517 ;;
11518 *)
11519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11520for as_dir in $PATH
11521do
11522 IFS=$as_save_IFS
11523 test -z "$as_dir" && as_dir=.
11524 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 11525 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
11526 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11527 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11528 break 2
11529 fi
11530done
11531 done
11532IFS=$as_save_IFS
11533
11534 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11535 ;;
11536esac
11537fi
11538pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11539if test -n "$pkg_config_prog_path"; then
11540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11541$as_echo "$pkg_config_prog_path" >&6; }
11542else
11543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11544$as_echo "no" >&6; }
11545fi
11546
11547
11548
ae5369e7 11549try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
ed3ef339
DE
11550have_libguile=no
11551case "${with_guile}" in
11552no)
11553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11554$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11555 ;;
11556auto)
e1402065
DE
11557 if test "${pkg_config_prog_path}" = "missing"; then
11558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11559$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11560 else
ed3ef339
DE
11561
11562 pkg_config=${pkg_config_prog_path}
11563 guile_version_list=${try_guile_versions}
11564 flag_errors=no
11565
ed3ef339
DE
11566 found_usable_guile=checking
11567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11568$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11569 for guile_version in ${guile_version_list}; do
11570 ${pkg_config} --exists ${guile_version} 2>/dev/null
11571 if test $? != 0; then
11572 continue
11573 fi
11574 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11575 if test $? != 0; then
d0ac1c44 11576 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11577 fi
11578 new_LIBS=`${pkg_config} --libs ${guile_version}`
11579 if test $? != 0; then
d0ac1c44 11580 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11581 fi
11582 found_usable_guile=${guile_version}
11583 break
11584 done
11585 if test "${found_usable_guile}" = "checking"; then
11586 if test "${flag_errors}" = "yes"; then
d0ac1c44 11587 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11588 else
11589 found_usable_guile=no
11590 fi
11591 fi
11592 if test "${found_usable_guile}" != no; then
11593 save_CPPFLAGS=$CPPFLAGS
11594 save_LIBS=$LIBS
11595 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11596 LIBS="$LIBS $new_LIBS"
11597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11598/* end confdefs.h. */
11599#include "libguile.h"
11600int
11601main ()
11602{
11603scm_init_guile ();
11604 ;
11605 return 0;
11606}
11607_ACEOF
11608if ac_fn_c_try_link "$LINENO"; then :
11609 have_libguile=yes
11610 GUILE_CPPFLAGS=$new_CPPFLAGS
11611 GUILE_LIBS=$new_LIBS
11612else
11613 found_usable_guile=no
11614fi
11615rm -f core conftest.err conftest.$ac_objext \
11616 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11617 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11618if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11619
11620$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11621
11622
11623fi
11624
ed3ef339
DE
11625 CPPFLAGS=$save_CPPFLAGS
11626 LIBS=$save_LIBS
11627 if test "${found_usable_guile}" = no; then
11628 if test "${flag_errors}" = yes; then
11629 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11630$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11631as_fn_error $? "linking guile version ${guile_version} test program failed
11632See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11633 fi
11634 fi
11635 fi
11636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11637$as_echo "${found_usable_guile}" >&6; }
11638
e1402065 11639 fi
ed3ef339
DE
11640 ;;
11641yes)
e1402065 11642 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11643 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11644 fi
ed3ef339
DE
11645
11646 pkg_config=${pkg_config_prog_path}
11647 guile_version_list=${try_guile_versions}
11648 flag_errors=yes
11649
ed3ef339
DE
11650 found_usable_guile=checking
11651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11652$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11653 for guile_version in ${guile_version_list}; do
11654 ${pkg_config} --exists ${guile_version} 2>/dev/null
11655 if test $? != 0; then
11656 continue
11657 fi
11658 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11659 if test $? != 0; then
d0ac1c44 11660 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11661 fi
11662 new_LIBS=`${pkg_config} --libs ${guile_version}`
11663 if test $? != 0; then
d0ac1c44 11664 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11665 fi
11666 found_usable_guile=${guile_version}
11667 break
11668 done
11669 if test "${found_usable_guile}" = "checking"; then
11670 if test "${flag_errors}" = "yes"; then
d0ac1c44 11671 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11672 else
11673 found_usable_guile=no
11674 fi
11675 fi
11676 if test "${found_usable_guile}" != no; then
11677 save_CPPFLAGS=$CPPFLAGS
11678 save_LIBS=$LIBS
11679 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11680 LIBS="$LIBS $new_LIBS"
11681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11682/* end confdefs.h. */
11683#include "libguile.h"
11684int
11685main ()
11686{
11687scm_init_guile ();
11688 ;
11689 return 0;
11690}
11691_ACEOF
11692if ac_fn_c_try_link "$LINENO"; then :
11693 have_libguile=yes
11694 GUILE_CPPFLAGS=$new_CPPFLAGS
11695 GUILE_LIBS=$new_LIBS
11696else
11697 found_usable_guile=no
11698fi
11699rm -f core conftest.err conftest.$ac_objext \
11700 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11701 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11702if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11703
11704$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11705
11706
11707fi
11708
ed3ef339
DE
11709 CPPFLAGS=$save_CPPFLAGS
11710 LIBS=$save_LIBS
11711 if test "${found_usable_guile}" = no; then
11712 if test "${flag_errors}" = yes; then
11713 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11714$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11715as_fn_error $? "linking guile version ${guile_version} test program failed
11716See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11717 fi
11718 fi
11719 fi
11720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11721$as_echo "${found_usable_guile}" >&6; }
11722
11723 ;;
11724[\\/]* | ?:[\\/]*)
e1402065 11725 if test -x "${with_guile}"; then
ed3ef339
DE
11726
11727 pkg_config=${with_guile}
11728 guile_version_list=${try_guile_versions}
11729 flag_errors=yes
11730
ed3ef339
DE
11731 found_usable_guile=checking
11732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11733$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11734 for guile_version in ${guile_version_list}; do
11735 ${pkg_config} --exists ${guile_version} 2>/dev/null
11736 if test $? != 0; then
11737 continue
11738 fi
11739 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11740 if test $? != 0; then
d0ac1c44 11741 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11742 fi
11743 new_LIBS=`${pkg_config} --libs ${guile_version}`
11744 if test $? != 0; then
d0ac1c44 11745 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11746 fi
11747 found_usable_guile=${guile_version}
11748 break
11749 done
11750 if test "${found_usable_guile}" = "checking"; then
11751 if test "${flag_errors}" = "yes"; then
d0ac1c44 11752 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11753 else
11754 found_usable_guile=no
11755 fi
11756 fi
11757 if test "${found_usable_guile}" != no; then
11758 save_CPPFLAGS=$CPPFLAGS
11759 save_LIBS=$LIBS
11760 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11761 LIBS="$LIBS $new_LIBS"
11762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11763/* end confdefs.h. */
11764#include "libguile.h"
11765int
11766main ()
11767{
11768scm_init_guile ();
11769 ;
11770 return 0;
11771}
11772_ACEOF
11773if ac_fn_c_try_link "$LINENO"; then :
11774 have_libguile=yes
11775 GUILE_CPPFLAGS=$new_CPPFLAGS
11776 GUILE_LIBS=$new_LIBS
11777else
11778 found_usable_guile=no
11779fi
11780rm -f core conftest.err conftest.$ac_objext \
11781 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11782 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11783if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11784
11785$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11786
11787
11788fi
11789
ed3ef339
DE
11790 CPPFLAGS=$save_CPPFLAGS
11791 LIBS=$save_LIBS
11792 if test "${found_usable_guile}" = no; then
11793 if test "${flag_errors}" = yes; then
11794 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11796as_fn_error $? "linking guile version ${guile_version} test program failed
11797See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11798 fi
11799 fi
11800 fi
11801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11802$as_echo "${found_usable_guile}" >&6; }
11803
e1402065 11804 else
d0ac1c44 11805 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11806 fi
ed3ef339
DE
11807 ;;
11808"" | */*)
11809 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11810 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11811 ;;
11812*)
11813 # A space separate list of guile versions to try, in order.
e1402065 11814 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11815 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11816 fi
ed3ef339
DE
11817
11818 pkg_config=${pkg_config_prog_path}
11819 guile_version_list=${with_guile}
11820 flag_errors=yes
11821
ed3ef339
DE
11822 found_usable_guile=checking
11823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11824$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11825 for guile_version in ${guile_version_list}; do
11826 ${pkg_config} --exists ${guile_version} 2>/dev/null
11827 if test $? != 0; then
11828 continue
11829 fi
11830 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11831 if test $? != 0; then
d0ac1c44 11832 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11833 fi
11834 new_LIBS=`${pkg_config} --libs ${guile_version}`
11835 if test $? != 0; then
d0ac1c44 11836 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11837 fi
11838 found_usable_guile=${guile_version}
11839 break
11840 done
11841 if test "${found_usable_guile}" = "checking"; then
11842 if test "${flag_errors}" = "yes"; then
d0ac1c44 11843 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11844 else
11845 found_usable_guile=no
11846 fi
11847 fi
11848 if test "${found_usable_guile}" != no; then
11849 save_CPPFLAGS=$CPPFLAGS
11850 save_LIBS=$LIBS
11851 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11852 LIBS="$LIBS $new_LIBS"
11853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11854/* end confdefs.h. */
11855#include "libguile.h"
11856int
11857main ()
11858{
11859scm_init_guile ();
11860 ;
11861 return 0;
11862}
11863_ACEOF
11864if ac_fn_c_try_link "$LINENO"; then :
11865 have_libguile=yes
11866 GUILE_CPPFLAGS=$new_CPPFLAGS
11867 GUILE_LIBS=$new_LIBS
11868else
11869 found_usable_guile=no
11870fi
11871rm -f core conftest.err conftest.$ac_objext \
11872 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11873 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11874if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11875
11876$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11877
11878
11879fi
11880
ed3ef339
DE
11881 CPPFLAGS=$save_CPPFLAGS
11882 LIBS=$save_LIBS
11883 if test "${found_usable_guile}" = no; then
11884 if test "${flag_errors}" = yes; then
11885 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11886$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11887as_fn_error $? "linking guile version ${guile_version} test program failed
11888See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11889 fi
11890 fi
11891 fi
11892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11893$as_echo "${found_usable_guile}" >&6; }
11894
11895 ;;
11896esac
11897
e76c5d17 11898if test "${have_libguile}" != no; then
d342a0da
DE
11899 case "${with_guile}" in
11900 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11901
11902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11903$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11904if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11905 $as_echo_n "(cached) " >&6
11906else
d342a0da 11907 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11908
11909 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11910 # the 'guild' and 'bindir' variables. In that case, try to guess
11911 # what the program name is, at the risk of getting it wrong if
11912 # Guile was configured with '--program-suffix' or similar.
11913 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11914 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11915 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11916 fi
11917
11918fi
11919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11920$as_echo "$ac_cv_guild_program_name" >&6; }
11921
11922 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11923 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11924 fi
11925
11926 GUILD="$ac_cv_guild_program_name"
11927
11928
d342a0da
DE
11929 ;;
11930 *)
11931
11932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11933$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11934if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11935 $as_echo_n "(cached) " >&6
11936else
11937 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11938
11939 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11940 # the 'guild' and 'bindir' variables. In that case, try to guess
11941 # what the program name is, at the risk of getting it wrong if
11942 # Guile was configured with '--program-suffix' or similar.
11943 if test "x$ac_cv_guild_program_name" = "x"; then
11944 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11945 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11946 fi
11947
11948fi
11949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11950$as_echo "$ac_cv_guild_program_name" >&6; }
11951
11952 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11953 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11954 fi
11955
11956 GUILD="$ac_cv_guild_program_name"
11957
11958
11959 ;;
11960 esac
e76c5d17
DE
11961
11962
11963 if test "$cross_compiling" = no; then
11964 GUILD_TARGET_FLAG=
11965 else
11966 GUILD_TARGET_FLAG="--target=$host"
11967 fi
11968
11969
11970
11971
11972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11973$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11974if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11975 $as_echo_n "(cached) " >&6
11976else
11977 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11978 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11979 ac_cv_guild_ok=yes
11980 else
11981 ac_cv_guild_ok=no
11982 fi
11983fi
11984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11985$as_echo "$ac_cv_guild_ok" >&6; }
11986
11987 if test "$ac_cv_guild_ok" = no; then
11988 have_libguile=no
11989 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11990$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11991 fi
11992fi
11993
ed3ef339
DE
11994if test "${have_libguile}" != no; then
11995
11996$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11997
11998 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11999 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
12000 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
12001 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
12002 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
12003
12004 save_LIBS="$LIBS"
12005 save_CPPFLAGS="$CPPFLAGS"
12006 LIBS="$GUILE_LIBS"
12007 CPPFLAGS="$GUILE_CPPFLAGS"
12008 for ac_func in scm_new_smob
12009do :
12010 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 12011if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
12012 cat >>confdefs.h <<_ACEOF
12013#define HAVE_SCM_NEW_SMOB 1
12014_ACEOF
12015
12016fi
12017done
12018
12019 LIBS="$save_LIBS"
12020 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
12021else
12022 # Even if Guile support is not compiled in, we need to have these files
12023 # included.
bd810fff 12024 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
12025 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
12026fi
9a156167 12027
ac534cba 12028
4df42755
DE
12029 if test "${have_libguile}" != no; then
12030 HAVE_GUILE_TRUE=
12031 HAVE_GUILE_FALSE='#'
12032else
12033 HAVE_GUILE_TRUE='#'
12034 HAVE_GUILE_FALSE=
12035fi
12036
ac534cba 12037
62f29fda
TT
12038# ---------------------------- #
12039# Check for source highlight. #
12040# ---------------------------- #
12041
12042SRCHIGH_LIBS=
12043SRCHIGH_CFLAGS=
189b8c2e
ST
12044
12045# Check whether --enable-source-highlight was given.
12046if test "${enable_source_highlight+set}" = set; then :
12047 enableval=$enable_source_highlight; case "${enableval}" in
12048 yes) enable_source_highlight=yes ;;
12049 no) enable_source_highlight=no ;;
12050 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
12051esac
12052else
12053 enable_source_highlight=auto
12054fi
12055
12056
12057if test "${enable_source_highlight}" != "no"; then
12058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 12059$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
12060 if test "${pkg_config_prog_path}" = "missing"; then
12061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 12062$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
12063 if test "${enable_source_highlight}" = "yes"; then
12064 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
12065 fi
12066 else
12067 if ${pkg_config_prog_path} --exists source-highlight; then
0455b7d3
BE
12068 case "$LDFLAGS" in
12069 *static-libstdc*)
12070 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
12071 ;;
12072 esac
12073
62f29fda
TT
12074 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
12075 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
12076
12077$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
12078
12079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12080$as_echo "yes" >&6; }
189b8c2e 12081 else
62f29fda
TT
12082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12083$as_echo "no" >&6; }
189b8c2e
ST
12084 if test "${enable_source_highlight}" = "yes"; then
12085 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
12086 fi
12087 fi
12088 fi
62f29fda
TT
12089fi
12090
12091
12092
05ea2a05
TT
12093# ------------------------- #
12094# Checks for header files. #
12095# ------------------------- #
58bfce93 12096
05ea2a05
TT
12097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12098$as_echo_n "checking for ANSI C header files... " >&6; }
12099if ${ac_cv_header_stdc+:} false; then :
12100 $as_echo_n "(cached) " >&6
58bfce93 12101else
5599c404
MM
12102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12103/* end confdefs.h. */
05ea2a05
TT
12104#include <stdlib.h>
12105#include <stdarg.h>
12106#include <string.h>
12107#include <float.h>
5599c404 12108
05ea2a05
TT
12109int
12110main ()
12111{
5599c404 12112
05ea2a05
TT
12113 ;
12114 return 0;
12115}
5599c404 12116_ACEOF
05ea2a05
TT
12117if ac_fn_c_try_compile "$LINENO"; then :
12118 ac_cv_header_stdc=yes
5599c404 12119else
05ea2a05 12120 ac_cv_header_stdc=no
5599c404 12121fi
05ea2a05 12122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58bfce93 12123
05ea2a05
TT
12124if test $ac_cv_header_stdc = yes; then
12125 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12127/* end confdefs.h. */
12128#include <string.h>
58bfce93 12129
05ea2a05
TT
12130_ACEOF
12131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12132 $EGREP "memchr" >/dev/null 2>&1; then :
58bfce93 12133
05ea2a05
TT
12134else
12135 ac_cv_header_stdc=no
12136fi
12137rm -f conftest*
58bfce93 12138
05ea2a05 12139fi
58bfce93 12140
05ea2a05
TT
12141if test $ac_cv_header_stdc = yes; then
12142 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12144/* end confdefs.h. */
12145#include <stdlib.h>
58bfce93 12146
05ea2a05
TT
12147_ACEOF
12148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12149 $EGREP "free" >/dev/null 2>&1; then :
58bfce93 12150
05ea2a05
TT
12151else
12152 ac_cv_header_stdc=no
12153fi
12154rm -f conftest*
58bfce93 12155
05ea2a05 12156fi
58bfce93 12157
05ea2a05
TT
12158if test $ac_cv_header_stdc = yes; then
12159 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12160 if test "$cross_compiling" = yes; then :
12161 :
12162else
12163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12164/* end confdefs.h. */
12165#include <ctype.h>
12166#include <stdlib.h>
12167#if ((' ' & 0x0FF) == 0x020)
12168# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12169# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12170#else
12171# define ISLOWER(c) \
12172 (('a' <= (c) && (c) <= 'i') \
12173 || ('j' <= (c) && (c) <= 'r') \
12174 || ('s' <= (c) && (c) <= 'z'))
12175# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12176#endif
58bfce93 12177
05ea2a05
TT
12178#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12179int
12180main ()
12181{
12182 int i;
12183 for (i = 0; i < 256; i++)
12184 if (XOR (islower (i), ISLOWER (i))
12185 || toupper (i) != TOUPPER (i))
12186 return 2;
12187 return 0;
12188}
12189_ACEOF
12190if ac_fn_c_try_run "$LINENO"; then :
58bfce93 12191
05ea2a05
TT
12192else
12193 ac_cv_header_stdc=no
12194fi
12195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12196 conftest.$ac_objext conftest.beam conftest.$ac_ext
12197fi
58bfce93 12198
05ea2a05
TT
12199fi
12200fi
12201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12202$as_echo "$ac_cv_header_stdc" >&6; }
12203if test $ac_cv_header_stdc = yes; then
58bfce93 12204
05ea2a05 12205$as_echo "#define STDC_HEADERS 1" >>confdefs.h
58bfce93 12206
05ea2a05 12207fi
58bfce93 12208
05ea2a05 12209# elf_hp.h is for HP/UX 64-bit shared library support.
8ae8e197 12210for ac_header in nlist.h machine/reg.h \
05ea2a05
TT
12211 thread_db.h \
12212 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12213 sys/resource.h sys/ptrace.h ptrace.h \
8ae8e197 12214 sys/reg.h sys/debugreg.h \
05ea2a05
TT
12215 termios.h elf_hp.h
12216do :
12217 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12218ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12219if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12220 cat >>confdefs.h <<_ACEOF
12221#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12222_ACEOF
58bfce93
MM
12223
12224fi
12225
05ea2a05 12226done
58bfce93 12227
05ea2a05
TT
12228for ac_header in sys/user.h
12229do :
12230 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12231# include <sys/param.h>
12232#endif
58bfce93 12233
05ea2a05
TT
12234"
12235if test "x$ac_cv_header_sys_user_h" = xyes; then :
12236 cat >>confdefs.h <<_ACEOF
12237#define HAVE_SYS_USER_H 1
12238_ACEOF
58bfce93 12239
05ea2a05 12240fi
58bfce93 12241
05ea2a05 12242done
58bfce93 12243
58bfce93 12244
05ea2a05
TT
12245for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
12246do :
12247 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12248ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12249if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12250 cat >>confdefs.h <<_ACEOF
12251#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12252_ACEOF
58bfce93 12253
05ea2a05 12254fi
58bfce93 12255
05ea2a05 12256done
58bfce93 12257
05ea2a05
TT
12258for ac_header in term.h
12259do :
12260 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12261# include <curses.h>
12262#endif
58bfce93 12263
05ea2a05
TT
12264"
12265if test "x$ac_cv_header_term_h" = xyes; then :
12266 cat >>confdefs.h <<_ACEOF
12267#define HAVE_TERM_H 1
12268_ACEOF
58bfce93 12269
05ea2a05 12270fi
58bfce93 12271
05ea2a05 12272done
58bfce93 12273
58bfce93 12274
95420d30 12275for ac_header in sys/socket.h
05a6b8c2 12276do :
95420d30
TV
12277 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
12278if test "x$ac_cv_header_sys_socket_h" = xyes; then :
05a6b8c2 12279 cat >>confdefs.h <<_ACEOF
95420d30 12280#define HAVE_SYS_SOCKET_H 1
05a6b8c2
EZ
12281_ACEOF
12282
12283fi
12284
12285done
12286
12287for ac_header in ws2tcpip.h
12288do :
12289 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
12290if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
12291 cat >>confdefs.h <<_ACEOF
12292#define HAVE_WS2TCPIP_H 1
12293_ACEOF
12294
12295fi
12296
12297done
12298
12299
05ea2a05
TT
12300# ------------------------- #
12301# Checks for declarations. #
12302# ------------------------- #
58bfce93 12303
58bfce93 12304
05ea2a05
TT
12305 # Check for presence and size of long long.
12306 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12307if test "x$ac_cv_type_long_long" = xyes; then :
58bfce93 12308
05ea2a05
TT
12309cat >>confdefs.h <<_ACEOF
12310#define HAVE_LONG_LONG 1
12311_ACEOF
12312
12313# The cast to long int works around a bug in the HP C Compiler
12314# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12315# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12316# This bug is HP SR number 8606223364.
12317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12318$as_echo_n "checking size of long long... " >&6; }
12319if ${ac_cv_sizeof_long_long+:} false; then :
58bfce93
MM
12320 $as_echo_n "(cached) " >&6
12321else
05ea2a05 12322 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
58bfce93 12323
58bfce93 12324else
05ea2a05
TT
12325 if test "$ac_cv_type_long_long" = yes; then
12326 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12328as_fn_error 77 "cannot compute sizeof (long long)
12329See \`config.log' for more details" "$LINENO" 5; }
12330 else
12331 ac_cv_sizeof_long_long=0
12332 fi
58bfce93 12333fi
58bfce93
MM
12334
12335fi
05ea2a05
TT
12336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12337$as_echo "$ac_cv_sizeof_long_long" >&6; }
58bfce93 12338
58bfce93 12339
58bfce93 12340
05ea2a05
TT
12341cat >>confdefs.h <<_ACEOF
12342#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12343_ACEOF
58bfce93
MM
12344
12345
05ea2a05 12346fi
58bfce93
MM
12347
12348
05ea2a05
TT
12349 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12350ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12351if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
12352 ac_have_decl=1
12353else
12354 ac_have_decl=0
12355fi
58bfce93 12356
05ea2a05
TT
12357cat >>confdefs.h <<_ACEOF
12358#define HAVE_DECL_BASENAME $ac_have_decl
c56ccc05 12359_ACEOF
05ea2a05
TT
12360ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12361if test "x$ac_cv_have_decl_ffs" = xyes; then :
12362 ac_have_decl=1
12363else
12364 ac_have_decl=0
c56ccc05 12365fi
c56ccc05
MM
12366
12367cat >>confdefs.h <<_ACEOF
05ea2a05 12368#define HAVE_DECL_FFS $ac_have_decl
c56ccc05 12369_ACEOF
05ea2a05
TT
12370ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12371if test "x$ac_cv_have_decl_asprintf" = xyes; then :
12372 ac_have_decl=1
12373else
12374 ac_have_decl=0
c56ccc05 12375fi
c56ccc05
MM
12376
12377cat >>confdefs.h <<_ACEOF
05ea2a05 12378#define HAVE_DECL_ASPRINTF $ac_have_decl
c56ccc05 12379_ACEOF
05ea2a05
TT
12380ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12381if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
12382 ac_have_decl=1
12383else
12384 ac_have_decl=0
12385fi
c56ccc05 12386
05ea2a05
TT
12387cat >>confdefs.h <<_ACEOF
12388#define HAVE_DECL_VASPRINTF $ac_have_decl
12389_ACEOF
12390ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12391if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12392 ac_have_decl=1
12393else
12394 ac_have_decl=0
c56ccc05
MM
12395fi
12396
05ea2a05
TT
12397cat >>confdefs.h <<_ACEOF
12398#define HAVE_DECL_SNPRINTF $ac_have_decl
12399_ACEOF
12400ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12401if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12402 ac_have_decl=1
12403else
12404 ac_have_decl=0
58bfce93
MM
12405fi
12406
05ea2a05
TT
12407cat >>confdefs.h <<_ACEOF
12408#define HAVE_DECL_VSNPRINTF $ac_have_decl
12409_ACEOF
c890192f 12410
05ea2a05
TT
12411 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12412if test "x$ac_cv_have_decl_strtol" = xyes; then :
12413 ac_have_decl=1
bec39cab 12414else
05ea2a05
TT
12415 ac_have_decl=0
12416fi
81ecdfbb 12417
05ea2a05
TT
12418cat >>confdefs.h <<_ACEOF
12419#define HAVE_DECL_STRTOL $ac_have_decl
12420_ACEOF
12421ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12422if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12423 ac_have_decl=1
12424else
12425 ac_have_decl=0
12426fi
a9322a30 12427
05ea2a05
TT
12428cat >>confdefs.h <<_ACEOF
12429#define HAVE_DECL_STRTOUL $ac_have_decl
bec39cab 12430_ACEOF
05ea2a05
TT
12431ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12432if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12433 ac_have_decl=1
bec39cab 12434else
05ea2a05 12435 ac_have_decl=0
a9322a30 12436fi
bec39cab 12437
05ea2a05
TT
12438cat >>confdefs.h <<_ACEOF
12439#define HAVE_DECL_STRTOLL $ac_have_decl
12440_ACEOF
12441ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12442if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12443 ac_have_decl=1
12444else
12445 ac_have_decl=0
12446fi
bec39cab 12447
05ea2a05
TT
12448cat >>confdefs.h <<_ACEOF
12449#define HAVE_DECL_STRTOULL $ac_have_decl
81ecdfbb 12450_ACEOF
bec39cab 12451
05ea2a05
TT
12452 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12453if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12454 ac_have_decl=1
bec39cab 12455else
05ea2a05 12456 ac_have_decl=0
81ecdfbb 12457fi
81ecdfbb 12458
05ea2a05
TT
12459cat >>confdefs.h <<_ACEOF
12460#define HAVE_DECL_STRVERSCMP $ac_have_decl
12461_ACEOF
81ecdfbb 12462
81ecdfbb 12463
06825bd1 12464
05ea2a05
TT
12465ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12466if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12467 ac_have_decl=1
81ecdfbb 12468else
05ea2a05 12469 ac_have_decl=0
81ecdfbb 12470fi
bec39cab 12471
05ea2a05
TT
12472cat >>confdefs.h <<_ACEOF
12473#define HAVE_DECL_SNPRINTF $ac_have_decl
12474_ACEOF
81ecdfbb 12475
05ea2a05
TT
12476
12477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12478$as_echo_n "checking for LC_MESSAGES... " >&6; }
12479if ${am_cv_val_LC_MESSAGES+:} false; then :
12480 $as_echo_n "(cached) " >&6
bec39cab 12481else
81ecdfbb 12482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12483/* end confdefs.h. */
05ea2a05 12484#include <locale.h>
a9322a30
TT
12485int
12486main ()
12487{
05ea2a05
TT
12488return LC_MESSAGES
12489 ;
a9322a30
TT
12490 return 0;
12491}
bec39cab 12492_ACEOF
05ea2a05
TT
12493if ac_fn_c_try_link "$LINENO"; then :
12494 am_cv_val_LC_MESSAGES=yes
bec39cab 12495else
05ea2a05 12496 am_cv_val_LC_MESSAGES=no
81ecdfbb 12497fi
05ea2a05
TT
12498rm -f core conftest.err conftest.$ac_objext \
12499 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 12500fi
05ea2a05
TT
12501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12502$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12503 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12504
05ea2a05 12505$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
bec39cab 12506
05ea2a05 12507 fi
5ee754fc 12508
bec39cab 12509
05ea2a05
TT
12510# ------------------ #
12511# Checks for types. #
12512# ------------------ #
12513
12514ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
05a6b8c2
EZ
12515#if HAVE_SYS_SOCKET_H
12516# include <sys/socket.h>
12517#elif HAVE_WS2TCPIP_H
12518# include <ws2tcpip.h>
12519#endif
05ea2a05
TT
12520
12521"
12522if test "x$ac_cv_type_socklen_t" = xyes; then :
12523
12524cat >>confdefs.h <<_ACEOF
12525#define HAVE_SOCKLEN_T 1
bec39cab 12526_ACEOF
c906108c 12527
05ea2a05 12528
bec39cab 12529fi
81ecdfbb 12530
81ecdfbb 12531
05ea2a05
TT
12532# ------------------------------------- #
12533# Checks for compiler characteristics. #
12534# ------------------------------------- #
a9322a30 12535
05ea2a05
TT
12536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12537$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12538if ${ac_cv_c_const+:} false; then :
12539 $as_echo_n "(cached) " >&6
12540else
12541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12542/* end confdefs.h. */
bec39cab 12543
05ea2a05
TT
12544int
12545main ()
12546{
bec39cab 12547
05ea2a05
TT
12548#ifndef __cplusplus
12549 /* Ultrix mips cc rejects this sort of thing. */
12550 typedef int charset[2];
12551 const charset cs = { 0, 0 };
12552 /* SunOS 4.1.1 cc rejects this. */
12553 char const *const *pcpcc;
12554 char **ppc;
12555 /* NEC SVR4.0.2 mips cc rejects this. */
12556 struct point {int x, y;};
12557 static struct point const zero = {0,0};
12558 /* AIX XL C 1.02.0.0 rejects this.
12559 It does not let you subtract one const X* pointer from another in
12560 an arm of an if-expression whose if-part is not a constant
12561 expression */
12562 const char *g = "string";
12563 pcpcc = &g + (g ? g-g : 0);
12564 /* HPUX 7.0 cc rejects these. */
12565 ++pcpcc;
12566 ppc = (char**) pcpcc;
12567 pcpcc = (char const *const *) ppc;
12568 { /* SCO 3.2v4 cc rejects this sort of thing. */
12569 char tx;
12570 char *t = &tx;
12571 char const *s = 0 ? (char *) 0 : (char const *) 0;
5ee754fc 12572
05ea2a05
TT
12573 *t++ = 0;
12574 if (s) return 0;
12575 }
12576 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12577 int x[] = {25, 17};
12578 const int *foo = &x[0];
12579 ++foo;
12580 }
12581 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12582 typedef const int *iptr;
12583 iptr p = 0;
12584 ++p;
12585 }
12586 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12587 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12588 struct s { int j; const int *ap[3]; } bx;
12589 struct s *b = &bx; b->j = 5;
12590 }
12591 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12592 const int foo = 10;
12593 if (!foo) return 0;
12594 }
12595 return !cs[0] && !zero.x;
12596#endif
5ee754fc 12597
05ea2a05
TT
12598 ;
12599 return 0;
12600}
bec39cab 12601_ACEOF
05ea2a05
TT
12602if ac_fn_c_try_compile "$LINENO"; then :
12603 ac_cv_c_const=yes
12604else
12605 ac_cv_c_const=no
12606fi
12607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12608fi
05ea2a05
TT
12609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12610$as_echo "$ac_cv_c_const" >&6; }
12611if test $ac_cv_c_const = no; then
5ee754fc 12612
05ea2a05 12613$as_echo "#define const /**/" >>confdefs.h
bec39cab 12614
05ea2a05
TT
12615fi
12616
12617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12618$as_echo_n "checking for inline... " >&6; }
12619if ${ac_cv_c_inline+:} false; then :
12620 $as_echo_n "(cached) " >&6
12621else
12622 ac_cv_c_inline=no
12623for ac_kw in inline __inline__ __inline; do
12624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12625/* end confdefs.h. */
12626#ifndef __cplusplus
12627typedef int foo_t;
12628static $ac_kw foo_t static_foo () {return 0; }
12629$ac_kw foo_t foo () {return 0; }
81ecdfbb 12630#endif
bec39cab 12631
a8111142 12632_ACEOF
05ea2a05
TT
12633if ac_fn_c_try_compile "$LINENO"; then :
12634 ac_cv_c_inline=$ac_kw
a8111142 12635fi
05ea2a05
TT
12636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12637 test "$ac_cv_c_inline" != no && break
81ecdfbb 12638done
a8111142 12639
05ea2a05
TT
12640fi
12641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12642$as_echo "$ac_cv_c_inline" >&6; }
a8111142 12643
05ea2a05
TT
12644case $ac_cv_c_inline in
12645 inline | yes) ;;
12646 *)
12647 case $ac_cv_c_inline in
12648 no) ac_val=;;
12649 *) ac_val=$ac_cv_c_inline;;
12650 esac
12651 cat >>confdefs.h <<_ACEOF
12652#ifndef __cplusplus
12653#define inline $ac_val
12654#endif
07697489 12655_ACEOF
05ea2a05
TT
12656 ;;
12657esac
07697489 12658
05ea2a05
TT
12659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12660$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12661if ${ac_cv_c_bigendian+:} false; then :
07697489
PA
12662 $as_echo_n "(cached) " >&6
12663else
05ea2a05
TT
12664 ac_cv_c_bigendian=unknown
12665 # See if we're dealing with a universal compiler.
12666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12667/* end confdefs.h. */
12668#ifndef __APPLE_CC__
12669 not a universal capable compiler
12670 #endif
12671 typedef int dummy;
07697489 12672
05ea2a05
TT
12673_ACEOF
12674if ac_fn_c_try_compile "$LINENO"; then :
07697489 12675
05ea2a05
TT
12676 # Check for potential -arch flags. It is not universal unless
12677 # there are at least two -arch flags with different values.
12678 ac_arch=
12679 ac_prev=
12680 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12681 if test -n "$ac_prev"; then
12682 case $ac_word in
12683 i?86 | x86_64 | ppc | ppc64)
12684 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12685 ac_arch=$ac_word
12686 else
12687 ac_cv_c_bigendian=universal
12688 break
12689 fi
12690 ;;
12691 esac
12692 ac_prev=
12693 elif test "x$ac_word" = "x-arch"; then
12694 ac_prev=arch
12695 fi
12696 done
07697489 12697fi
05ea2a05
TT
12698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12699 if test $ac_cv_c_bigendian = unknown; then
12700 # See if sys/param.h defines the BYTE_ORDER macro.
12701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12702/* end confdefs.h. */
12703#include <sys/types.h>
12704 #include <sys/param.h>
07697489 12705
05ea2a05
TT
12706int
12707main ()
12708{
12709#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12710 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12711 && LITTLE_ENDIAN)
12712 bogus endian macros
12713 #endif
07697489 12714
05ea2a05
TT
12715 ;
12716 return 0;
12717}
07697489 12718_ACEOF
05ea2a05
TT
12719if ac_fn_c_try_compile "$LINENO"; then :
12720 # It does; now see whether it defined to BIG_ENDIAN or not.
12721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12722/* end confdefs.h. */
12723#include <sys/types.h>
12724 #include <sys/param.h>
07697489 12725
05ea2a05
TT
12726int
12727main ()
12728{
12729#if BYTE_ORDER != BIG_ENDIAN
12730 not big endian
12731 #endif
07697489 12732
05ea2a05
TT
12733 ;
12734 return 0;
12735}
07697489 12736_ACEOF
05ea2a05
TT
12737if ac_fn_c_try_compile "$LINENO"; then :
12738 ac_cv_c_bigendian=yes
07697489 12739else
05ea2a05 12740 ac_cv_c_bigendian=no
07697489 12741fi
05ea2a05 12742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12743fi
05ea2a05
TT
12744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12745 fi
12746 if test $ac_cv_c_bigendian = unknown; then
12747 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12749/* end confdefs.h. */
12750#include <limits.h>
07697489 12751
05ea2a05
TT
12752int
12753main ()
12754{
12755#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12756 bogus endian macros
12757 #endif
07697489 12758
05ea2a05
TT
12759 ;
12760 return 0;
12761}
07697489 12762_ACEOF
05ea2a05
TT
12763if ac_fn_c_try_compile "$LINENO"; then :
12764 # It does; now see whether it defined to _BIG_ENDIAN or not.
12765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12766/* end confdefs.h. */
12767#include <limits.h>
07697489 12768
05ea2a05
TT
12769int
12770main ()
12771{
12772#ifndef _BIG_ENDIAN
12773 not big endian
12774 #endif
07697489 12775
05ea2a05
TT
12776 ;
12777 return 0;
12778}
07697489 12779_ACEOF
05ea2a05
TT
12780if ac_fn_c_try_compile "$LINENO"; then :
12781 ac_cv_c_bigendian=yes
07697489 12782else
05ea2a05 12783 ac_cv_c_bigendian=no
07697489 12784fi
05ea2a05 12785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12786fi
05ea2a05
TT
12787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12788 fi
12789 if test $ac_cv_c_bigendian = unknown; then
12790 # Compile a test program.
12791 if test "$cross_compiling" = yes; then :
12792 # Try to guess by grepping values from an object file.
12793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12794/* end confdefs.h. */
12795short int ascii_mm[] =
12796 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12797 short int ascii_ii[] =
12798 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12799 int use_ascii (int i) {
12800 return ascii_mm[i] + ascii_ii[i];
12801 }
12802 short int ebcdic_ii[] =
12803 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12804 short int ebcdic_mm[] =
12805 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12806 int use_ebcdic (int i) {
12807 return ebcdic_mm[i] + ebcdic_ii[i];
12808 }
12809 extern int foo;
07697489 12810
05ea2a05
TT
12811int
12812main ()
12813{
12814return use_ascii (foo) == use_ebcdic (foo);
12815 ;
12816 return 0;
12817}
07697489 12818_ACEOF
05ea2a05
TT
12819if ac_fn_c_try_compile "$LINENO"; then :
12820 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12821 ac_cv_c_bigendian=yes
12822 fi
12823 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12824 if test "$ac_cv_c_bigendian" = unknown; then
12825 ac_cv_c_bigendian=no
12826 else
12827 # finding both strings is unlikely to happen, but who knows?
12828 ac_cv_c_bigendian=unknown
12829 fi
12830 fi
07697489 12831fi
05ea2a05
TT
12832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12833else
12834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12835/* end confdefs.h. */
12836$ac_includes_default
12837int
12838main ()
12839{
07697489 12840
05ea2a05
TT
12841 /* Are we little or big endian? From Harbison&Steele. */
12842 union
12843 {
12844 long int l;
12845 char c[sizeof (long int)];
12846 } u;
12847 u.l = 1;
12848 return u.c[sizeof (long int) - 1] == 1;
12849
12850 ;
12851 return 0;
12852}
07697489 12853_ACEOF
05ea2a05
TT
12854if ac_fn_c_try_run "$LINENO"; then :
12855 ac_cv_c_bigendian=no
07697489 12856else
05ea2a05
TT
12857 ac_cv_c_bigendian=yes
12858fi
12859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12860 conftest.$ac_objext conftest.beam conftest.$ac_ext
07697489
PA
12861fi
12862
05ea2a05 12863 fi
07697489 12864fi
05ea2a05
TT
12865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12866$as_echo "$ac_cv_c_bigendian" >&6; }
12867 case $ac_cv_c_bigendian in #(
12868 yes)
12869 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12870;; #(
12871 no)
12872 ;; #(
12873 universal)
07697489 12874
05ea2a05 12875$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
07697489 12876
05ea2a05
TT
12877 ;; #(
12878 *)
12879 as_fn_error $? "unknown endianness
12880 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12881 esac
07697489
PA
12882
12883
05ea2a05
TT
12884# ------------------------------ #
12885# Checks for library functions. #
12886# ------------------------------ #
81ecdfbb 12887
05ea2a05 12888for ac_func in getuid getgid \
8ae8e197 12889 pipe pread pread64 pwrite resize_term \
05ea2a05
TT
12890 getpgid setsid \
12891 sigaction sigsetmask socketpair \
12892 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12893 setrlimit getrlimit posix_madvise waitpid \
12894 use_default_colors
12895do :
12896 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12897ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12898if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12899 cat >>confdefs.h <<_ACEOF
12900#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
a9322a30 12901_ACEOF
5ee754fc 12902
05ea2a05
TT
12903fi
12904done
5ee754fc 12905
05ea2a05
TT
12906
12907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12908$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12909if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 12910 $as_echo_n "(cached) " >&6
bec39cab 12911else
81ecdfbb 12912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12913/* end confdefs.h. */
05ea2a05 12914#include <langinfo.h>
a9322a30
TT
12915int
12916main ()
12917{
05ea2a05 12918char* cs = nl_langinfo(CODESET);
a9322a30
TT
12919 ;
12920 return 0;
12921}
bec39cab 12922_ACEOF
81ecdfbb 12923if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 12924 am_cv_langinfo_codeset=yes
bec39cab 12925else
05ea2a05 12926 am_cv_langinfo_codeset=no
81ecdfbb
RW
12927fi
12928rm -f core conftest.err conftest.$ac_objext \
12929 conftest$ac_exeext conftest.$ac_ext
05ea2a05 12930
81ecdfbb 12931fi
05ea2a05
TT
12932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12933$as_echo "$am_cv_langinfo_codeset" >&6; }
12934 if test $am_cv_langinfo_codeset = yes; then
bec39cab 12935
05ea2a05 12936$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
81ecdfbb
RW
12937
12938 fi
12939
05ea2a05
TT
12940ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12941if test "x$ac_cv_type_size_t" = xyes; then :
81ecdfbb 12942
05ea2a05 12943else
81ecdfbb
RW
12944
12945cat >>confdefs.h <<_ACEOF
05ea2a05 12946#define size_t unsigned int
7eb368b3 12947_ACEOF
7eb368b3 12948
7eb368b3 12949fi
7eb368b3 12950
7eb368b3 12951
a9322a30 12952
7eb368b3 12953
05ea2a05
TT
12954 for ac_header in $ac_header_list
12955do :
12956 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12957ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12958"
12959if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12960 cat >>confdefs.h <<_ACEOF
12961#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12962_ACEOF
7eb368b3 12963
05ea2a05 12964fi
7eb368b3 12965
05ea2a05 12966done
a9322a30 12967
05ea2a05
TT
12968
12969
12970
12971
12972
12973
12974ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12975if test "x$ac_cv_type_pid_t" = xyes; then :
12976
12977else
bec39cab 12978
a9322a30 12979cat >>confdefs.h <<_ACEOF
05ea2a05 12980#define pid_t int
a9322a30
TT
12981_ACEOF
12982
05ea2a05
TT
12983fi
12984
12985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12986$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12987if ${ac_cv_path_SED+:} false; then :
12988 $as_echo_n "(cached) " >&6
12989else
12990 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12991 for ac_i in 1 2 3 4 5 6 7; do
12992 ac_script="$ac_script$as_nl$ac_script"
12993 done
12994 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12995 { ac_script=; unset ac_script;}
12996 if test -z "$SED"; then
12997 ac_path_SED_found=false
12998 # Loop through the user's path and test for each of PROGNAME-LIST
12999 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13000for as_dir in $PATH
13001do
13002 IFS=$as_save_IFS
13003 test -z "$as_dir" && as_dir=.
13004 for ac_prog in sed gsed; do
13005 for ac_exec_ext in '' $ac_executable_extensions; do
13006 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13007 as_fn_executable_p "$ac_path_SED" || continue
13008# Check for GNU ac_path_SED and select it if it is found.
13009 # Check for GNU $ac_path_SED
13010case `"$ac_path_SED" --version 2>&1` in
13011*GNU*)
13012 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13013*)
13014 ac_count=0
13015 $as_echo_n 0123456789 >"conftest.in"
13016 while :
13017 do
13018 cat "conftest.in" "conftest.in" >"conftest.tmp"
13019 mv "conftest.tmp" "conftest.in"
13020 cp "conftest.in" "conftest.nl"
13021 $as_echo '' >> "conftest.nl"
13022 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13023 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13024 as_fn_arith $ac_count + 1 && ac_count=$as_val
13025 if test $ac_count -gt ${ac_path_SED_max-0}; then
13026 # Best one so far, save it but keep looking for a better one
13027 ac_cv_path_SED="$ac_path_SED"
13028 ac_path_SED_max=$ac_count
13029 fi
13030 # 10*(2^10) chars as input seems more than enough
13031 test $ac_count -gt 10 && break
13032 done
13033 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13034esac
a9322a30 13035
05ea2a05
TT
13036 $ac_path_SED_found && break 3
13037 done
13038 done
13039 done
13040IFS=$as_save_IFS
13041 if test -z "$ac_cv_path_SED"; then
13042 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13043 fi
13044else
13045 ac_cv_path_SED=$SED
a9322a30
TT
13046fi
13047
05ea2a05
TT
13048fi
13049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13050$as_echo "$ac_cv_path_SED" >&6; }
13051 SED="$ac_cv_path_SED"
13052 rm -f conftest.sed
a9322a30 13053
a9322a30 13054
db6878ac
SM
13055 # Set the 'development' global.
13056 . $srcdir/../bfd/development.sh
13057
05ea2a05
TT
13058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13059$as_echo_n "checking for ANSI C header files... " >&6; }
13060if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 13061 $as_echo_n "(cached) " >&6
a9322a30 13062else
81ecdfbb 13063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13064/* end confdefs.h. */
05ea2a05
TT
13065#include <stdlib.h>
13066#include <stdarg.h>
13067#include <string.h>
13068#include <float.h>
a9322a30
TT
13069
13070int
13071main ()
13072{
d0ac1c44 13073
a9322a30
TT
13074 ;
13075 return 0;
13076}
bec39cab 13077_ACEOF
81ecdfbb 13078if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 13079 ac_cv_header_stdc=yes
5ee754fc 13080else
05ea2a05 13081 ac_cv_header_stdc=no
5ee754fc 13082fi
81ecdfbb 13083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13084
05ea2a05
TT
13085if test $ac_cv_header_stdc = yes; then
13086 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13088/* end confdefs.h. */
13089#include <string.h>
bec39cab 13090
05ea2a05
TT
13091_ACEOF
13092if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13093 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 13094
bec39cab 13095else
05ea2a05
TT
13096 ac_cv_header_stdc=no
13097fi
13098rm -f conftest*
13099
13100fi
13101
13102if test $ac_cv_header_stdc = yes; then
13103 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 13104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13105/* end confdefs.h. */
05ea2a05 13106#include <stdlib.h>
a9322a30 13107
bec39cab 13108_ACEOF
05ea2a05
TT
13109if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13110 $EGREP "free" >/dev/null 2>&1; then :
bec39cab 13111
05ea2a05
TT
13112else
13113 ac_cv_header_stdc=no
5ee754fc 13114fi
05ea2a05 13115rm -f conftest*
5ee754fc 13116
05ea2a05 13117fi
bec39cab 13118
05ea2a05
TT
13119if test $ac_cv_header_stdc = yes; then
13120 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13121 if test "$cross_compiling" = yes; then :
13122 :
bec39cab 13123else
05ea2a05 13124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 13125/* end confdefs.h. */
05ea2a05
TT
13126#include <ctype.h>
13127#include <stdlib.h>
13128#if ((' ' & 0x0FF) == 0x020)
13129# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13130# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13131#else
13132# define ISLOWER(c) \
13133 (('a' <= (c) && (c) <= 'i') \
13134 || ('j' <= (c) && (c) <= 'r') \
13135 || ('s' <= (c) && (c) <= 'z'))
13136# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13137#endif
a9322a30 13138
05ea2a05 13139#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
13140int
13141main ()
13142{
05ea2a05
TT
13143 int i;
13144 for (i = 0; i < 256; i++)
13145 if (XOR (islower (i), ISLOWER (i))
13146 || toupper (i) != TOUPPER (i))
13147 return 2;
a9322a30
TT
13148 return 0;
13149}
bec39cab 13150_ACEOF
05ea2a05 13151if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13152
5ee754fc 13153else
05ea2a05 13154 ac_cv_header_stdc=no
5ee754fc 13155fi
05ea2a05
TT
13156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13157 conftest.$ac_objext conftest.beam conftest.$ac_ext
81ecdfbb 13158fi
bec39cab 13159
05ea2a05
TT
13160fi
13161fi
13162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13163$as_echo "$ac_cv_header_stdc" >&6; }
13164if test $ac_cv_header_stdc = yes; then
81ecdfbb 13165
05ea2a05
TT
13166$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13167
13168fi
81ecdfbb 13169
05ea2a05
TT
13170 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13171# for constant arguments. Useless!
13172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13173$as_echo_n "checking for working alloca.h... " >&6; }
13174if ${ac_cv_working_alloca_h+:} false; then :
13175 $as_echo_n "(cached) " >&6
13176else
13177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13178/* end confdefs.h. */
13179#include <alloca.h>
7eb368b3
NR
13180int
13181main ()
13182{
05ea2a05
TT
13183char *p = (char *) alloca (2 * sizeof (int));
13184 if (p) return 0;
7eb368b3
NR
13185 ;
13186 return 0;
13187}
13188_ACEOF
05ea2a05
TT
13189if ac_fn_c_try_link "$LINENO"; then :
13190 ac_cv_working_alloca_h=yes
81ecdfbb 13191else
05ea2a05 13192 ac_cv_working_alloca_h=no
a9322a30 13193fi
05ea2a05
TT
13194rm -f core conftest.err conftest.$ac_objext \
13195 conftest$ac_exeext conftest.$ac_ext
a9322a30 13196fi
05ea2a05
TT
13197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13198$as_echo "$ac_cv_working_alloca_h" >&6; }
13199if test $ac_cv_working_alloca_h = yes; then
13200
13201$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7eb368b3 13202
7eb368b3 13203fi
05ea2a05
TT
13204
13205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13206$as_echo_n "checking for alloca... " >&6; }
13207if ${ac_cv_func_alloca_works+:} false; then :
13208 $as_echo_n "(cached) " >&6
bec39cab 13209else
81ecdfbb 13210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13211/* end confdefs.h. */
05ea2a05
TT
13212#ifdef __GNUC__
13213# define alloca __builtin_alloca
13214#else
13215# ifdef _MSC_VER
13216# include <malloc.h>
13217# define alloca _alloca
13218# else
13219# ifdef HAVE_ALLOCA_H
13220# include <alloca.h>
13221# else
13222# ifdef _AIX
13223 #pragma alloca
13224# else
13225# ifndef alloca /* predefined by HP cc +Olibcalls */
13226void *alloca (size_t);
13227# endif
13228# endif
13229# endif
13230# endif
13231#endif
13232
d3ea6809
MM
13233int
13234main ()
13235{
05ea2a05
TT
13236char *p = (char *) alloca (1);
13237 if (p) return 0;
81ecdfbb
RW
13238 ;
13239 return 0;
d3ea6809
MM
13240}
13241_ACEOF
05ea2a05
TT
13242if ac_fn_c_try_link "$LINENO"; then :
13243 ac_cv_func_alloca_works=yes
d3ea6809 13244else
05ea2a05 13245 ac_cv_func_alloca_works=no
a9322a30 13246fi
05ea2a05
TT
13247rm -f core conftest.err conftest.$ac_objext \
13248 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 13249fi
05ea2a05
TT
13250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13251$as_echo "$ac_cv_func_alloca_works" >&6; }
81ecdfbb 13252
05ea2a05 13253if test $ac_cv_func_alloca_works = yes; then
d3ea6809 13254
05ea2a05 13255$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
d3ea6809 13256
05ea2a05
TT
13257else
13258 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13259# that cause trouble. Some versions do not even contain alloca or
13260# contain a buggy version. If you still want to use their alloca,
13261# use ar to extract alloca.o from them instead of compiling alloca.c.
d3ea6809 13262
05ea2a05 13263ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
d0ac1c44 13264
05ea2a05 13265$as_echo "#define C_ALLOCA 1" >>confdefs.h
d0ac1c44
SM
13266
13267
05ea2a05
TT
13268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13269$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13270if ${ac_cv_os_cray+:} false; then :
13271 $as_echo_n "(cached) " >&6
13272else
13273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13274/* end confdefs.h. */
13275#if defined CRAY && ! defined CRAY2
13276webecray
13277#else
13278wenotbecray
13279#endif
13280
13281_ACEOF
13282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13283 $EGREP "webecray" >/dev/null 2>&1; then :
13284 ac_cv_os_cray=yes
13285else
13286 ac_cv_os_cray=no
13287fi
13288rm -f conftest*
13289
13290fi
13291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13292$as_echo "$ac_cv_os_cray" >&6; }
13293if test $ac_cv_os_cray = yes; then
13294 for ac_func in _getb67 GETB67 getb67; do
13295 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13296ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13297if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13298
13299cat >>confdefs.h <<_ACEOF
13300#define CRAY_STACKSEG_END $ac_func
13301_ACEOF
13302
13303 break
13304fi
13305
13306 done
13307fi
13308
13309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13310$as_echo_n "checking stack direction for C alloca... " >&6; }
13311if ${ac_cv_c_stack_direction+:} false; then :
13312 $as_echo_n "(cached) " >&6
13313else
13314 if test "$cross_compiling" = yes; then :
13315 ac_cv_c_stack_direction=0
13316else
13317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13318/* end confdefs.h. */
13319$ac_includes_default
13320int
13321find_stack_direction (int *addr, int depth)
13322{
13323 int dir, dummy = 0;
13324 if (! addr)
13325 addr = &dummy;
13326 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13327 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13328 return dir + dummy;
13329}
13330
13331int
13332main (int argc, char **argv)
13333{
13334 return find_stack_direction (0, argc + !argv + 20) < 0;
13335}
13336_ACEOF
13337if ac_fn_c_try_run "$LINENO"; then :
13338 ac_cv_c_stack_direction=1
13339else
13340 ac_cv_c_stack_direction=-1
13341fi
13342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13343 conftest.$ac_objext conftest.beam conftest.$ac_ext
13344fi
13345
13346fi
13347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13348$as_echo "$ac_cv_c_stack_direction" >&6; }
13349cat >>confdefs.h <<_ACEOF
13350#define STACK_DIRECTION $ac_cv_c_stack_direction
13351_ACEOF
13352
13353
13354fi
13355
13356
13357 WIN32APILIBS=
13358 case ${host} in
13359 *mingw32*)
13360
13361$as_echo "#define USE_WIN32API 1" >>confdefs.h
13362
13363 WIN32APILIBS="-lws2_32"
13364 ;;
13365 esac
13366
13367
13368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13369$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13370if ${am_cv_langinfo_codeset+:} false; then :
13371 $as_echo_n "(cached) " >&6
13372else
13373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13374/* end confdefs.h. */
13375#include <langinfo.h>
13376int
13377main ()
13378{
13379char* cs = nl_langinfo(CODESET);
13380 ;
13381 return 0;
13382}
13383_ACEOF
13384if ac_fn_c_try_link "$LINENO"; then :
13385 am_cv_langinfo_codeset=yes
13386else
13387 am_cv_langinfo_codeset=no
13388fi
13389rm -f core conftest.err conftest.$ac_objext \
13390 conftest$ac_exeext conftest.$ac_ext
13391
13392fi
13393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13394$as_echo "$am_cv_langinfo_codeset" >&6; }
13395 if test $am_cv_langinfo_codeset = yes; then
13396
13397$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13398
13399 fi
13400
13401
c8693053 13402 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 proc_service.h poll.h sys/poll.h sys/select.h
81ecdfbb
RW
13403do :
13404 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
05ea2a05 13405ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13406if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 13407 cat >>confdefs.h <<_ACEOF
81ecdfbb 13408#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 13409_ACEOF
b757528f 13410
b757528f 13411fi
bec39cab 13412
a9322a30 13413done
a3828db0 13414
d0ac1c44
SM
13415
13416
a9322a30 13417for ac_func in getpagesize
81ecdfbb
RW
13418do :
13419 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 13420if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 13421 cat >>confdefs.h <<_ACEOF
81ecdfbb 13422#define HAVE_GETPAGESIZE 1
bec39cab 13423_ACEOF
bcb3dc3d 13424
bcb3dc3d
MK
13425fi
13426done
13427
81ecdfbb
RW
13428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
13429$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 13430if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 13431 $as_echo_n "(cached) " >&6
a9322a30 13432else
81ecdfbb 13433 if test "$cross_compiling" = yes; then :
a9322a30 13434 ac_cv_func_mmap_fixed_mapped=no
bec39cab 13435else
81ecdfbb 13436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13437/* end confdefs.h. */
a9322a30
TT
13438$ac_includes_default
13439/* malloc might have been renamed as rpl_malloc. */
13440#undef malloc
bec39cab 13441
a9322a30
TT
13442/* Thanks to Mike Haertel and Jim Avera for this test.
13443 Here is a matrix of mmap possibilities:
13444 mmap private not fixed
13445 mmap private fixed at somewhere currently unmapped
13446 mmap private fixed at somewhere already mapped
13447 mmap shared not fixed
13448 mmap shared fixed at somewhere currently unmapped
13449 mmap shared fixed at somewhere already mapped
13450 For private mappings, we should verify that changes cannot be read()
13451 back from the file, nor mmap's back from the file at a different
13452 address. (There have been systems where private was not correctly
13453 implemented like the infamous i386 svr4.0, and systems where the
13454 VM page cache was not coherent with the file system buffer cache
13455 like early versions of FreeBSD and possibly contemporary NetBSD.)
13456 For shared mappings, we should conversely verify that changes get
13457 propagated back to all the places they're supposed to be.
bec39cab 13458
a9322a30
TT
13459 Grep wants private fixed already mapped.
13460 The main things grep needs to know about mmap are:
13461 * does it exist and is it safe to write into the mmap'd area
13462 * how to use it (BSD variants) */
8b9cf735 13463
a9322a30
TT
13464#include <fcntl.h>
13465#include <sys/mman.h>
8b9cf735 13466
81ecdfbb 13467#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 13468char *malloc ();
a3828db0
MK
13469#endif
13470
a9322a30 13471/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 13472#ifndef HAVE_GETPAGESIZE
a9322a30
TT
13473# ifdef _SC_PAGESIZE
13474# define getpagesize() sysconf(_SC_PAGESIZE)
13475# else /* no _SC_PAGESIZE */
81ecdfbb 13476# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
13477# include <sys/param.h>
13478# ifdef EXEC_PAGESIZE
13479# define getpagesize() EXEC_PAGESIZE
13480# else /* no EXEC_PAGESIZE */
13481# ifdef NBPG
13482# define getpagesize() NBPG * CLSIZE
13483# ifndef CLSIZE
13484# define CLSIZE 1
13485# endif /* no CLSIZE */
13486# else /* no NBPG */
13487# ifdef NBPC
13488# define getpagesize() NBPC
13489# else /* no NBPC */
13490# ifdef PAGESIZE
13491# define getpagesize() PAGESIZE
13492# endif /* PAGESIZE */
13493# endif /* no NBPC */
13494# endif /* no NBPG */
13495# endif /* no EXEC_PAGESIZE */
13496# else /* no HAVE_SYS_PARAM_H */
13497# define getpagesize() 8192 /* punt totally */
13498# endif /* no HAVE_SYS_PARAM_H */
13499# endif /* no _SC_PAGESIZE */
13500
13501#endif /* no HAVE_GETPAGESIZE */
13502
bec39cab
AC
13503int
13504main ()
13505{
a9322a30 13506 char *data, *data2, *data3;
d0ac1c44 13507 const char *cdata2;
a9322a30 13508 int i, pagesize;
d0ac1c44 13509 int fd, fd2;
a9322a30
TT
13510
13511 pagesize = getpagesize ();
13512
13513 /* First, make a file with some known garbage in it. */
13514 data = (char *) malloc (pagesize);
13515 if (!data)
81ecdfbb 13516 return 1;
a9322a30
TT
13517 for (i = 0; i < pagesize; ++i)
13518 *(data + i) = rand ();
13519 umask (0);
13520 fd = creat ("conftest.mmap", 0600);
13521 if (fd < 0)
d0ac1c44 13522 return 2;
a9322a30 13523 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 13524 return 3;
a9322a30
TT
13525 close (fd);
13526
d0ac1c44
SM
13527 /* Next, check that the tail of a page is zero-filled. File must have
13528 non-zero length, otherwise we risk SIGBUS for entire page. */
13529 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13530 if (fd2 < 0)
13531 return 4;
13532 cdata2 = "";
13533 if (write (fd2, cdata2, 1) != 1)
13534 return 5;
13535 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13536 if (data2 == MAP_FAILED)
13537 return 6;
13538 for (i = 0; i < pagesize; ++i)
13539 if (*(data2 + i))
13540 return 7;
13541 close (fd2);
13542 if (munmap (data2, pagesize))
13543 return 8;
13544
a9322a30
TT
13545 /* Next, try to mmap the file at a fixed address which already has
13546 something else allocated at it. If we can, also make sure that
13547 we see the same garbage. */
13548 fd = open ("conftest.mmap", O_RDWR);
13549 if (fd < 0)
d0ac1c44 13550 return 9;
a9322a30
TT
13551 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13552 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 13553 return 10;
a9322a30
TT
13554 for (i = 0; i < pagesize; ++i)
13555 if (*(data + i) != *(data2 + i))
d0ac1c44 13556 return 11;
a9322a30
TT
13557
13558 /* Finally, make sure that changes to the mapped area do not
13559 percolate back to the file as seen by read(). (This is a bug on
13560 some variants of i386 svr4.0.) */
13561 for (i = 0; i < pagesize; ++i)
13562 *(data2 + i) = *(data2 + i) + 1;
13563 data3 = (char *) malloc (pagesize);
13564 if (!data3)
d0ac1c44 13565 return 12;
a9322a30 13566 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 13567 return 13;
a9322a30
TT
13568 for (i = 0; i < pagesize; ++i)
13569 if (*(data + i) != *(data3 + i))
d0ac1c44 13570 return 14;
a9322a30 13571 close (fd);
81ecdfbb 13572 return 0;
bec39cab
AC
13573}
13574_ACEOF
81ecdfbb 13575if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13576 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13577else
81ecdfbb 13578 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13579fi
81ecdfbb
RW
13580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13581 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13582fi
81ecdfbb 13583
a9322a30 13584fi
81ecdfbb
RW
13585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13586$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13587if test $ac_cv_func_mmap_fixed_mapped = yes; then
13588
81ecdfbb 13589$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13590
086ec9eb 13591fi
d0ac1c44 13592rm -f conftest.mmap conftest.txt
a3828db0 13593
05ea2a05 13594 for ac_header in vfork.h
81ecdfbb
RW
13595do :
13596 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 13597if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13598 cat >>confdefs.h <<_ACEOF
81ecdfbb 13599#define HAVE_VFORK_H 1
bec39cab 13600_ACEOF
c906108c
SS
13601
13602fi
a9322a30 13603
a3828db0 13604done
c906108c 13605
a9322a30 13606for ac_func in fork vfork
81ecdfbb
RW
13607do :
13608 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13609ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13610if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13611 cat >>confdefs.h <<_ACEOF
81ecdfbb 13612#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13613_ACEOF
b83266a0 13614
97bf5e38 13615fi
a3828db0 13616done
b83266a0 13617
a9322a30 13618if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13620$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13621if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13622 $as_echo_n "(cached) " >&6
a9322a30 13623else
81ecdfbb 13624 if test "$cross_compiling" = yes; then :
a9322a30
TT
13625 ac_cv_func_fork_works=cross
13626else
81ecdfbb
RW
13627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13628/* end confdefs.h. */
13629$ac_includes_default
13630int
13631main ()
13632{
13633
13634 /* By Ruediger Kuhlmann. */
13635 return fork () < 0;
13636
13637 ;
13638 return 0;
13639}
a9322a30 13640_ACEOF
81ecdfbb 13641if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13642 ac_cv_func_fork_works=yes
13643else
81ecdfbb 13644 ac_cv_func_fork_works=no
a9322a30 13645fi
81ecdfbb
RW
13646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13647 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13648fi
81ecdfbb 13649
a9322a30 13650fi
81ecdfbb
RW
13651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13652$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13653
13654else
13655 ac_cv_func_fork_works=$ac_cv_func_fork
13656fi
13657if test "x$ac_cv_func_fork_works" = xcross; then
13658 case $host in
13659 *-*-amigaos* | *-*-msdosdjgpp*)
13660 # Override, as these systems have only a dummy fork() stub
13661 ac_cv_func_fork_works=no
13662 ;;
13663 *)
13664 ac_cv_func_fork_works=yes
13665 ;;
13666 esac
81ecdfbb
RW
13667 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13668$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13669fi
13670ac_cv_func_vfork_works=$ac_cv_func_vfork
13671if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13673$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13674if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13675 $as_echo_n "(cached) " >&6
a9322a30 13676else
81ecdfbb 13677 if test "$cross_compiling" = yes; then :
a9322a30
TT
13678 ac_cv_func_vfork_works=cross
13679else
81ecdfbb 13680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13681/* end confdefs.h. */
13682/* Thanks to Paul Eggert for this test. */
81ecdfbb 13683$ac_includes_default
a9322a30 13684#include <sys/wait.h>
81ecdfbb 13685#ifdef HAVE_VFORK_H
a9322a30
TT
13686# include <vfork.h>
13687#endif
13688/* On some sparc systems, changes by the child to local and incoming
13689 argument registers are propagated back to the parent. The compiler
13690 is told about this with #include <vfork.h>, but some compilers
13691 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13692 static variable whose address is put into a register that is
13693 clobbered by the vfork. */
13694static void
13695#ifdef __cplusplus
13696sparc_address_test (int arg)
13697# else
13698sparc_address_test (arg) int arg;
13699#endif
13700{
13701 static pid_t child;
13702 if (!child) {
13703 child = vfork ();
13704 if (child < 0) {
13705 perror ("vfork");
13706 _exit(2);
13707 }
13708 if (!child) {
13709 arg = getpid();
13710 write(-1, "", 0);
13711 _exit (arg);
13712 }
13713 }
13714}
13715
13716int
13717main ()
13718{
13719 pid_t parent = getpid ();
13720 pid_t child;
13721
13722 sparc_address_test (0);
13723
13724 child = vfork ();
13725
13726 if (child == 0) {
13727 /* Here is another test for sparc vfork register problems. This
13728 test uses lots of local variables, at least as many local
13729 variables as main has allocated so far including compiler
13730 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13731 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13732 reuse the register of parent for one of the local variables,
13733 since it will think that parent can't possibly be used any more
13734 in this routine. Assigning to the local variable will thus
13735 munge parent in the parent process. */
13736 pid_t
13737 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13738 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13739 /* Convince the compiler that p..p7 are live; otherwise, it might
13740 use the same hardware register for all 8 local variables. */
13741 if (p != p1 || p != p2 || p != p3 || p != p4
13742 || p != p5 || p != p6 || p != p7)
13743 _exit(1);
13744
13745 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13746 from child file descriptors. If the child closes a descriptor
13747 before it execs or exits, this munges the parent's descriptor
13748 as well. Test for this by closing stdout in the child. */
13749 _exit(close(fileno(stdout)) != 0);
13750 } else {
13751 int status;
13752 struct stat st;
13753
13754 while (wait(&status) != child)
13755 ;
81ecdfbb 13756 return (
a9322a30
TT
13757 /* Was there some problem with vforking? */
13758 child < 0
13759
13760 /* Did the child fail? (This shouldn't happen.) */
13761 || status
13762
13763 /* Did the vfork/compiler bug occur? */
13764 || parent != getpid()
13765
13766 /* Did the file descriptor bug occur? */
13767 || fstat(fileno(stdout), &st) != 0
13768 );
13769 }
13770}
13771_ACEOF
81ecdfbb 13772if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13773 ac_cv_func_vfork_works=yes
13774else
81ecdfbb 13775 ac_cv_func_vfork_works=no
a9322a30 13776fi
81ecdfbb
RW
13777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13778 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13779fi
81ecdfbb 13780
a9322a30 13781fi
81ecdfbb
RW
13782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13783$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13784
13785fi;
13786if test "x$ac_cv_func_fork_works" = xcross; then
13787 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13789$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13790fi
13791
13792if test "x$ac_cv_func_vfork_works" = xyes; then
13793
81ecdfbb 13794$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13795
13796else
13797
81ecdfbb 13798$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13799
13800fi
13801if test "x$ac_cv_func_fork_works" = xyes; then
13802
81ecdfbb 13803$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13804
13805fi
13806
8ae8e197 13807 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
05ea2a05
TT
13808 ptrace64 sbrk setns sigaltstack sigprocmask \
13809 setpgid setpgrp getrusage getauxval
81ecdfbb
RW
13810do :
13811 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13812ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13813if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13814 cat >>confdefs.h <<_ACEOF
81ecdfbb 13815#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13816_ACEOF
13817
13818fi
13819done
13820
13821
05ea2a05
TT
13822 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13823if test "x$ac_cv_have_decl_strstr" = xyes; then :
13824 ac_have_decl=1
d0ac1c44 13825else
05ea2a05
TT
13826 ac_have_decl=0
13827fi
d0ac1c44
SM
13828
13829cat >>confdefs.h <<_ACEOF
05ea2a05
TT
13830#define HAVE_DECL_STRSTR $ac_have_decl
13831_ACEOF
13832
13833
13834 # ----------------------- #
13835 # Checks for structures. #
13836 # ----------------------- #
13837
13838 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13839if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13840
13841cat >>confdefs.h <<_ACEOF
13842#define HAVE_STRUCT_STAT_ST_BLOCKS 1
d0ac1c44
SM
13843_ACEOF
13844
05ea2a05 13845
d0ac1c44 13846fi
05ea2a05
TT
13847ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13848if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
d0ac1c44 13849
05ea2a05
TT
13850cat >>confdefs.h <<_ACEOF
13851#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13852_ACEOF
13853
13854
13855fi
13856
13857
e911c666
JB
13858 # On FreeBSD we need libutil for the kinfo_get* functions. On
13859 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
13860 # Figure out which one to use.
05ea2a05
TT
13861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13862$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13863if ${ac_cv_search_kinfo_getfile+:} false; then :
5e030278
TT
13864 $as_echo_n "(cached) " >&6
13865else
05ea2a05
TT
13866 ac_func_search_save_LIBS=$LIBS
13867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13868/* end confdefs.h. */
3266f10b 13869
05ea2a05
TT
13870/* Override any GCC internal prototype to avoid an error.
13871 Use char because int might match the return type of a GCC
13872 builtin and then its argument prototype would still apply. */
13873#ifdef __cplusplus
13874extern "C"
13875#endif
13876char kinfo_getfile ();
3266f10b
TT
13877int
13878main ()
13879{
05ea2a05 13880return kinfo_getfile ();
3266f10b
TT
13881 ;
13882 return 0;
13883}
13884_ACEOF
05ea2a05
TT
13885for ac_lib in '' util util-freebsd; do
13886 if test -z "$ac_lib"; then
13887 ac_res="none required"
13888 else
13889 ac_res=-l$ac_lib
13890 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13891 fi
13892 if ac_fn_c_try_link "$LINENO"; then :
13893 ac_cv_search_kinfo_getfile=$ac_res
3266f10b 13894fi
05ea2a05
TT
13895rm -f core conftest.err conftest.$ac_objext \
13896 conftest$ac_exeext
13897 if ${ac_cv_search_kinfo_getfile+:} false; then :
13898 break
13899fi
13900done
13901if ${ac_cv_search_kinfo_getfile+:} false; then :
3266f10b
TT
13902
13903else
05ea2a05 13904 ac_cv_search_kinfo_getfile=no
3266f10b 13905fi
05ea2a05
TT
13906rm conftest.$ac_ext
13907LIBS=$ac_func_search_save_LIBS
13908fi
13909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13910$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13911ac_res=$ac_cv_search_kinfo_getfile
13912if test "$ac_res" != no; then :
13913 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13914
e911c666
JB
13915fi
13916
13917
13918 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
13919 for ac_func in kinfo_getfile
13920do :
13921 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
13922if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
13923 cat >>confdefs.h <<_ACEOF
13924#define HAVE_KINFO_GETFILE 1
13925_ACEOF
3266f10b
TT
13926
13927fi
e911c666 13928done
3266f10b 13929
3266f10b 13930
05ea2a05
TT
13931 # Check for std::thread. This does not work on some platforms, like
13932 # mingw and DJGPP.
13933 ac_ext=cpp
13934ac_cpp='$CXXCPP $CPPFLAGS'
13935ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13936ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13937ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3266f10b 13938
3266f10b 13939
3266f10b 13940
3266f10b 13941
3266f10b 13942
05ea2a05
TT
13943ac_ext=c
13944ac_cpp='$CPP $CPPFLAGS'
13945ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13946ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13947ac_compiler_gnu=$ac_cv_c_compiler_gnu
3266f10b 13948
05ea2a05 13949ax_pthread_ok=no
3266f10b 13950
05ea2a05
TT
13951# We used to check for pthread.h first, but this fails if pthread.h
13952# requires special compiler flags (e.g. on Tru64 or Sequent).
13953# It gets checked for in the link test anyway.
3266f10b 13954
05ea2a05
TT
13955# First of all, check if the user has set any of the PTHREAD_LIBS,
13956# etcetera environment variables, and if threads linking works using
13957# them:
13958if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13959 ax_pthread_save_CC="$CC"
13960 ax_pthread_save_CFLAGS="$CFLAGS"
13961 ax_pthread_save_LIBS="$LIBS"
13962 if test "x$PTHREAD_CC" != "x"; then :
13963 CC="$PTHREAD_CC"
3266f10b 13964fi
05ea2a05
TT
13965 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13966 LIBS="$PTHREAD_LIBS $LIBS"
13967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13968$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13970/* end confdefs.h. */
05ea2a05
TT
13971
13972/* Override any GCC internal prototype to avoid an error.
13973 Use char because int might match the return type of a GCC
13974 builtin and then its argument prototype would still apply. */
13975#ifdef __cplusplus
13976extern "C"
13977#endif
13978char pthread_join ();
3266f10b
TT
13979int
13980main ()
13981{
05ea2a05 13982return pthread_join ();
3266f10b
TT
13983 ;
13984 return 0;
13985}
13986_ACEOF
13987if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13988 ax_pthread_ok=yes
3266f10b
TT
13989fi
13990rm -f core conftest.err conftest.$ac_objext \
13991 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13993$as_echo "$ax_pthread_ok" >&6; }
13994 if test "x$ax_pthread_ok" = "xno"; then
13995 PTHREAD_LIBS=""
13996 PTHREAD_CFLAGS=""
13997 fi
13998 CC="$ax_pthread_save_CC"
13999 CFLAGS="$ax_pthread_save_CFLAGS"
14000 LIBS="$ax_pthread_save_LIBS"
3266f10b 14001fi
3266f10b 14002
05ea2a05
TT
14003# We must check for the threads library under a number of different
14004# names; the ordering is very important because some systems
14005# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
14006# libraries is broken (non-POSIX).
3266f10b 14007
05ea2a05
TT
14008# Create a list of thread flags to try. Items starting with a "-" are
14009# C compiler flags, and other items are library names, except for "none"
14010# which indicates that we try without any flags at all, and "pthread-config"
14011# which is a program returning the flags for the Pth emulation library.
3266f10b 14012
05ea2a05 14013ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3266f10b 14014
05ea2a05
TT
14015# The ordering *is* (sometimes) important. Some notes on the
14016# individual items follow:
3266f10b 14017
05ea2a05
TT
14018# pthreads: AIX (must check this before -lpthread)
14019# none: in case threads are in libc; should be tried before -Kthread and
14020# other compiler flags to prevent continual compiler warnings
14021# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
14022# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
14023# (Note: HP C rejects this with "bad form for `-t' option")
14024# -pthreads: Solaris/gcc (Note: HP C also rejects)
14025# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
14026# doesn't hurt to check since this sometimes defines pthreads and
14027# -D_REENTRANT too), HP C (must be checked before -lpthread, which
14028# is present but should not be used directly; and before -mthreads,
14029# because the compiler interprets this as "-mt" + "-hreads")
14030# -mthreads: Mingw32/gcc, Lynx/gcc
14031# pthread: Linux, etcetera
14032# --thread-safe: KAI C++
14033# pthread-config: use pthread-config program (for GNU Pth library)
3266f10b 14034
05ea2a05 14035case $host_os in
3266f10b 14036
05ea2a05 14037 freebsd*)
3266f10b 14038
05ea2a05
TT
14039 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
14040 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3266f10b 14041
05ea2a05
TT
14042 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
14043 ;;
3266f10b 14044
05ea2a05 14045 hpux*)
3266f10b 14046
05ea2a05
TT
14047 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
14048 # multi-threading and also sets -lpthread."
14049
14050 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
14051 ;;
14052
14053 openedition*)
14054
14055 # IBM z/OS requires a feature-test macro to be defined in order to
14056 # enable POSIX threads at all, so give the user a hint if this is
14057 # not set. (We don't define these ourselves, as they can affect
14058 # other portions of the system API in unpredictable ways.)
14059
14060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 14061/* end confdefs.h. */
05ea2a05
TT
14062
14063# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
14064 AX_PTHREAD_ZOS_MISSING
14065# endif
3266f10b
TT
14066
14067_ACEOF
14068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
05ea2a05
TT
14069 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
14070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
14071$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
3266f10b
TT
14072fi
14073rm -f conftest*
14074
05ea2a05 14075 ;;
3266f10b 14076
05ea2a05 14077 solaris*)
3266f10b 14078
05ea2a05
TT
14079 # On Solaris (at least, for some versions), libc contains stubbed
14080 # (non-functional) versions of the pthreads routines, so link-based
14081 # tests will erroneously succeed. (N.B.: The stubs are missing
14082 # pthread_cleanup_push, or rather a function called by this macro,
14083 # so we could check for that, but who knows whether they'll stub
14084 # that too in a future libc.) So we'll check first for the
14085 # standard Solaris way of linking pthreads (-mt -lpthread).
14086
14087 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
14088 ;;
14089esac
14090
14091# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
14092
14093if test "x$GCC" = "xyes"; then :
14094 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
3266f10b
TT
14095fi
14096
05ea2a05
TT
14097# The presence of a feature test macro requesting re-entrant function
14098# definitions is, on some systems, a strong hint that pthreads support is
14099# correctly enabled
14100
14101case $host_os in
14102 darwin* | hpux* | linux* | osf* | solaris*)
14103 ax_pthread_check_macro="_REENTRANT"
14104 ;;
14105
14106 aix*)
14107 ax_pthread_check_macro="_THREAD_SAFE"
14108 ;;
14109
14110 *)
14111 ax_pthread_check_macro="--"
14112 ;;
14113esac
14114if test "x$ax_pthread_check_macro" = "x--"; then :
14115 ax_pthread_check_cond=0
14116else
14117 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
3266f10b
TT
14118fi
14119
05ea2a05
TT
14120# Are we compiling with Clang?
14121
14122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
14123$as_echo_n "checking whether $CC is Clang... " >&6; }
14124if ${ax_cv_PTHREAD_CLANG+:} false; then :
3266f10b
TT
14125 $as_echo_n "(cached) " >&6
14126else
05ea2a05
TT
14127 ax_cv_PTHREAD_CLANG=no
14128 # Note that Autoconf sets GCC=yes for Clang as well as GCC
14129 if test "x$GCC" = "xyes"; then
14130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 14131/* end confdefs.h. */
05ea2a05
TT
14132/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
14133# if defined(__clang__) && defined(__llvm__)
14134 AX_PTHREAD_CC_IS_CLANG
14135# endif
3266f10b 14136
3266f10b 14137_ACEOF
05ea2a05
TT
14138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14139 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
14140 ax_cv_PTHREAD_CLANG=yes
3266f10b 14141fi
05ea2a05
TT
14142rm -f conftest*
14143
14144 fi
3266f10b
TT
14145
14146fi
05ea2a05
TT
14147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
14148$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
14149ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
3266f10b 14150
05ea2a05 14151ax_pthread_clang_warning=no
3266f10b 14152
05ea2a05
TT
14153# Clang needs special handling, because older versions handle the -pthread
14154# option in a rather... idiosyncratic way
3266f10b 14155
05ea2a05 14156if test "x$ax_pthread_clang" = "xyes"; then
3266f10b 14157
05ea2a05 14158 # Clang takes -pthread; it has never supported any other flag
b2ceabe8 14159
05ea2a05
TT
14160 # (Note 1: This will need to be revisited if a system that Clang
14161 # supports has POSIX threads in a separate library. This tends not
14162 # to be the way of modern systems, but it's conceivable.)
b2ceabe8 14163
05ea2a05
TT
14164 # (Note 2: On some systems, notably Darwin, -pthread is not needed
14165 # to get POSIX threads support; the API is always present and
14166 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
14167 # -pthread does define _REENTRANT, and while the Darwin headers
14168 # ignore this macro, third-party headers might not.)
b2ceabe8 14169
05ea2a05
TT
14170 PTHREAD_CFLAGS="-pthread"
14171 PTHREAD_LIBS=
3266f10b 14172
05ea2a05
TT
14173 ax_pthread_ok=yes
14174
14175 # However, older versions of Clang make a point of warning the user
14176 # that, in an invocation where only linking and no compilation is
14177 # taking place, the -pthread option has no effect ("argument unused
14178 # during compilation"). They expect -pthread to be passed in only
14179 # when source code is being compiled.
14180 #
14181 # Problem is, this is at odds with the way Automake and most other
14182 # C build frameworks function, which is that the same flags used in
14183 # compilation (CFLAGS) are also used in linking. Many systems
14184 # supported by AX_PTHREAD require exactly this for POSIX threads
14185 # support, and in fact it is often not straightforward to specify a
14186 # flag that is used only in the compilation phase and not in
14187 # linking. Such a scenario is extremely rare in practice.
14188 #
14189 # Even though use of the -pthread flag in linking would only print
14190 # a warning, this can be a nuisance for well-run software projects
14191 # that build with -Werror. So if the active version of Clang has
14192 # this misfeature, we search for an option to squash it.
14193
14194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
14195$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
14196if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
14197 $as_echo_n "(cached) " >&6
14198else
14199 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
14200 # Create an alternate version of $ac_link that compiles and
14201 # links in two steps (.c -> .o, .o -> exe) instead of one
14202 # (.c -> exe), because the warning occurs only in the second
14203 # step
14204 ax_pthread_save_ac_link="$ac_link"
14205 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
14206 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
14207 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
14208 ax_pthread_save_CFLAGS="$CFLAGS"
14209 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
14210 if test "x$ax_pthread_try" = "xunknown"; then :
14211 break
14212fi
14213 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
14214 ac_link="$ax_pthread_save_ac_link"
14215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14216/* end confdefs.h. */
14217int main(void){return 0;}
3266f10b
TT
14218_ACEOF
14219if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
14220 ac_link="$ax_pthread_2step_ac_link"
14221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14222/* end confdefs.h. */
14223int main(void){return 0;}
14224_ACEOF
14225if ac_fn_c_try_link "$LINENO"; then :
14226 break
3266f10b
TT
14227fi
14228rm -f core conftest.err conftest.$ac_objext \
14229 conftest$ac_exeext conftest.$ac_ext
14230
14231fi
05ea2a05
TT
14232rm -f core conftest.err conftest.$ac_objext \
14233 conftest$ac_exeext conftest.$ac_ext
14234 done
14235 ac_link="$ax_pthread_save_ac_link"
14236 CFLAGS="$ax_pthread_save_CFLAGS"
14237 if test "x$ax_pthread_try" = "x"; then :
14238 ax_pthread_try=no
14239fi
14240 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
3266f10b 14241
05ea2a05
TT
14242fi
14243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
14244$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
3266f10b 14245
05ea2a05
TT
14246 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
14247 no | unknown) ;;
14248 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
14249 esac
3266f10b 14250
05ea2a05 14251fi # $ax_pthread_clang = yes
3266f10b 14252
05ea2a05
TT
14253if test "x$ax_pthread_ok" = "xno"; then
14254for ax_pthread_try_flag in $ax_pthread_flags; do
3266f10b 14255
05ea2a05
TT
14256 case $ax_pthread_try_flag in
14257 none)
14258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
14259$as_echo_n "checking whether pthreads work without any flags... " >&6; }
14260 ;;
3266f10b 14261
05ea2a05
TT
14262 -mt,pthread)
14263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
14264$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
14265 PTHREAD_CFLAGS="-mt"
14266 PTHREAD_LIBS="-lpthread"
14267 ;;
3266f10b 14268
05ea2a05
TT
14269 -*)
14270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
14271$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
14272 PTHREAD_CFLAGS="$ax_pthread_try_flag"
14273 ;;
3266f10b 14274
05ea2a05
TT
14275 pthread-config)
14276 # Extract the first word of "pthread-config", so it can be a program name with args.
14277set dummy pthread-config; ac_word=$2
14278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14279$as_echo_n "checking for $ac_word... " >&6; }
14280if ${ac_cv_prog_ax_pthread_config+:} false; then :
14281 $as_echo_n "(cached) " >&6
14282else
14283 if test -n "$ax_pthread_config"; then
14284 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
14285else
14286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14287for as_dir in $PATH
14288do
14289 IFS=$as_save_IFS
14290 test -z "$as_dir" && as_dir=.
14291 for ac_exec_ext in '' $ac_executable_extensions; do
14292 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14293 ac_cv_prog_ax_pthread_config="yes"
14294 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14295 break 2
14296 fi
3266f10b 14297done
05ea2a05
TT
14298 done
14299IFS=$as_save_IFS
3266f10b 14300
05ea2a05
TT
14301 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
14302fi
14303fi
14304ax_pthread_config=$ac_cv_prog_ax_pthread_config
14305if test -n "$ax_pthread_config"; then
14306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
14307$as_echo "$ax_pthread_config" >&6; }
3266f10b 14308else
05ea2a05
TT
14309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14310$as_echo "no" >&6; }
3266f10b
TT
14311fi
14312
5e030278 14313
05ea2a05
TT
14314 if test "x$ax_pthread_config" = "xno"; then :
14315 continue
14316fi
14317 PTHREAD_CFLAGS="`pthread-config --cflags`"
14318 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
14319 ;;
5e030278 14320
05ea2a05
TT
14321 *)
14322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
14323$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
14324 PTHREAD_LIBS="-l$ax_pthread_try_flag"
14325 ;;
14326 esac
5e030278 14327
5e030278
TT
14328 ax_pthread_save_CFLAGS="$CFLAGS"
14329 ax_pthread_save_LIBS="$LIBS"
5e030278
TT
14330 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14331 LIBS="$PTHREAD_LIBS $LIBS"
05ea2a05
TT
14332
14333 # Check for various functions. We must include pthread.h,
14334 # since some functions may be macros. (On the Sequent, we
14335 # need a special flag -Kthread to make this header compile.)
14336 # We check for pthread_join because it is in -lpthread on IRIX
14337 # while pthread_create is in libc. We check for pthread_attr_init
14338 # due to DEC craziness with -lpthreads. We check for
14339 # pthread_cleanup_push because it is one of the few pthread
14340 # functions on Solaris that doesn't have a non-functional libc stub.
14341 # We try pthread_create on general principles.
14342
5e030278
TT
14343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14344/* end confdefs.h. */
05ea2a05
TT
14345#include <pthread.h>
14346# if $ax_pthread_check_cond
14347# error "$ax_pthread_check_macro must be defined"
14348# endif
14349 static void routine(void *a) { a = 0; }
14350 static void *start_routine(void *a) { return a; }
5e030278
TT
14351int
14352main ()
14353{
05ea2a05
TT
14354pthread_t th; pthread_attr_t attr;
14355 pthread_create(&th, 0, start_routine, 0);
14356 pthread_join(th, 0);
14357 pthread_attr_init(&attr);
14358 pthread_cleanup_push(routine, 0);
14359 pthread_cleanup_pop(0) /* ; */
5e030278
TT
14360 ;
14361 return 0;
14362}
14363_ACEOF
14364if ac_fn_c_try_link "$LINENO"; then :
14365 ax_pthread_ok=yes
14366fi
14367rm -f core conftest.err conftest.$ac_objext \
14368 conftest$ac_exeext conftest.$ac_ext
05ea2a05 14369
5e030278
TT
14370 CFLAGS="$ax_pthread_save_CFLAGS"
14371 LIBS="$ax_pthread_save_LIBS"
05ea2a05
TT
14372
14373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14374$as_echo "$ax_pthread_ok" >&6; }
14375 if test "x$ax_pthread_ok" = "xyes"; then :
14376 break
5e030278
TT
14377fi
14378
05ea2a05
TT
14379 PTHREAD_LIBS=""
14380 PTHREAD_CFLAGS=""
14381done
14382fi
5e030278 14383
05ea2a05
TT
14384# Various other checks:
14385if test "x$ax_pthread_ok" = "xyes"; then
14386 ax_pthread_save_CFLAGS="$CFLAGS"
14387 ax_pthread_save_LIBS="$LIBS"
14388 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14389 LIBS="$PTHREAD_LIBS $LIBS"
5e030278 14390
05ea2a05
TT
14391 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14393$as_echo_n "checking for joinable pthread attribute... " >&6; }
14394if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14395 $as_echo_n "(cached) " >&6
14396else
14397 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14398 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14400/* end confdefs.h. */
14401#include <pthread.h>
14402int
14403main ()
14404{
14405int attr = $ax_pthread_attr; return attr /* ; */
14406 ;
14407 return 0;
14408}
14409_ACEOF
14410if ac_fn_c_try_link "$LINENO"; then :
14411 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14412fi
14413rm -f core conftest.err conftest.$ac_objext \
14414 conftest$ac_exeext conftest.$ac_ext
14415 done
5e030278 14416
05ea2a05
TT
14417fi
14418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14419$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14420 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14421 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14422 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
5e030278 14423
05ea2a05
TT
14424cat >>confdefs.h <<_ACEOF
14425#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14426_ACEOF
5e030278 14427
05ea2a05 14428 ax_pthread_joinable_attr_defined=yes
5e030278 14429
05ea2a05 14430fi
5e030278 14431
05ea2a05
TT
14432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14433$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14434if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14435 $as_echo_n "(cached) " >&6
14436else
14437 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14438 case $host_os in
14439 solaris*)
14440 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14441 ;;
14442 esac
5e030278 14443
05ea2a05
TT
14444fi
14445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14446$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14447 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14448 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14449 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14450 ax_pthread_special_flags_added=yes
14451fi
5e030278 14452
05ea2a05
TT
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14454$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14455if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14456 $as_echo_n "(cached) " >&6
14457else
14458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14459/* end confdefs.h. */
14460#include <pthread.h>
14461int
14462main ()
14463{
14464int i = PTHREAD_PRIO_INHERIT;
14465 ;
14466 return 0;
14467}
14468_ACEOF
14469if ac_fn_c_try_link "$LINENO"; then :
14470 ax_cv_PTHREAD_PRIO_INHERIT=yes
14471else
14472 ax_cv_PTHREAD_PRIO_INHERIT=no
14473fi
14474rm -f core conftest.err conftest.$ac_objext \
14475 conftest$ac_exeext conftest.$ac_ext
5e030278 14476
05ea2a05
TT
14477fi
14478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14479$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14480 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14481 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
5e030278 14482
05ea2a05 14483$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
5e030278 14484
05ea2a05 14485 ax_pthread_prio_inherit_defined=yes
5e030278 14486
05ea2a05 14487fi
5e030278 14488
05ea2a05
TT
14489 CFLAGS="$ax_pthread_save_CFLAGS"
14490 LIBS="$ax_pthread_save_LIBS"
5e030278 14491
05ea2a05
TT
14492 # More AIX lossage: compile with *_r variant
14493 if test "x$GCC" != "xyes"; then
14494 case $host_os in
14495 aix*)
14496 case "x/$CC" in #(
14497 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14498 #handle absolute path differently from PATH based program lookup
14499 case "x$CC" in #(
14500 x/*) :
14501 if as_fn_executable_p ${CC}_r; then :
14502 PTHREAD_CC="${CC}_r"
14503fi ;; #(
14504 *) :
14505 for ac_prog in ${CC}_r
14506do
14507 # Extract the first word of "$ac_prog", so it can be a program name with args.
14508set dummy $ac_prog; ac_word=$2
14509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14510$as_echo_n "checking for $ac_word... " >&6; }
14511if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14512 $as_echo_n "(cached) " >&6
14513else
14514 if test -n "$PTHREAD_CC"; then
14515 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14516else
14517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14518for as_dir in $PATH
14519do
14520 IFS=$as_save_IFS
14521 test -z "$as_dir" && as_dir=.
14522 for ac_exec_ext in '' $ac_executable_extensions; do
14523 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14524 ac_cv_prog_PTHREAD_CC="$ac_prog"
14525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14526 break 2
14527 fi
14528done
14529 done
14530IFS=$as_save_IFS
5e030278 14531
5e030278 14532fi
05ea2a05
TT
14533fi
14534PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14535if test -n "$PTHREAD_CC"; then
14536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14537$as_echo "$PTHREAD_CC" >&6; }
14538else
14539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14540$as_echo "no" >&6; }
14541fi
5e030278 14542
5e030278 14543
05ea2a05
TT
14544 test -n "$PTHREAD_CC" && break
14545done
14546test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14547 ;;
14548esac ;; #(
14549 *) :
14550 ;;
5e030278 14551esac
05ea2a05
TT
14552 ;;
14553 esac
14554 fi
14555fi
5e030278 14556
05ea2a05 14557test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
5e030278 14558
5e030278 14559
5e030278 14560
5e030278 14561
5e030278 14562
05ea2a05
TT
14563# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14564if test "x$ax_pthread_ok" = "xyes"; then
14565 threads=yes
14566 :
5e030278 14567else
05ea2a05
TT
14568 ax_pthread_ok=no
14569 threads=no
5e030278 14570fi
05ea2a05
TT
14571ac_ext=cpp
14572ac_cpp='$CXXCPP $CPPFLAGS'
14573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5e030278 14576
5e030278 14577
05ea2a05
TT
14578 if test "$threads" = "yes"; then
14579 save_LIBS="$LIBS"
14580 LIBS="$PTHREAD_LIBS $LIBS"
14581 save_CXXFLAGS="$CXXFLAGS"
14582 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14584$as_echo_n "checking for std::thread... " >&6; }
14585if ${gdb_cv_cxx_std_thread+:} false; then :
14586 $as_echo_n "(cached) " >&6
14587else
14588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14589/* end confdefs.h. */
05ea2a05
TT
14590#include <thread>
14591 void callback() { }
14592int
14593main ()
14594{
14595std::thread t(callback);
14596 ;
14597 return 0;
14598}
5e030278 14599_ACEOF
05ea2a05
TT
14600if ac_fn_cxx_try_compile "$LINENO"; then :
14601 gdb_cv_cxx_std_thread=yes
14602else
14603 gdb_cv_cxx_std_thread=no
5e030278 14604fi
05ea2a05
TT
14605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14606fi
14607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14608$as_echo "$gdb_cv_cxx_std_thread" >&6; }
5e030278 14609
05ea2a05
TT
14610 # This check must be here, while LIBS includes any necessary
14611 # threading library.
14612 for ac_func in pthread_sigmask pthread_setname_np
14613do :
14614 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14615ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14616if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14617 cat >>confdefs.h <<_ACEOF
14618#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14619_ACEOF
5e030278
TT
14620
14621fi
05ea2a05 14622done
5e030278 14623
5e030278 14624
05ea2a05
TT
14625 LIBS="$save_LIBS"
14626 CXXFLAGS="$save_CXXFLAGS"
14627 fi
14628 if test "$gdb_cv_cxx_std_thread" = "yes"; then
5e030278 14629
05ea2a05 14630$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
5e030278 14631
05ea2a05
TT
14632 fi
14633 ac_ext=c
14634ac_cpp='$CPP $CPPFLAGS'
14635ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14636ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14637ac_compiler_gnu=$ac_cv_c_compiler_gnu
5e030278 14638
5e030278 14639
05ea2a05
TT
14640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14641$as_echo_n "checking for sigsetjmp... " >&6; }
14642if ${gdb_cv_func_sigsetjmp+:} false; then :
14643 $as_echo_n "(cached) " >&6
14644else
14645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14646/* end confdefs.h. */
b9442ec1 14647#include <setjmp.h>
05ea2a05
TT
14648int
14649main ()
14650{
b9442ec1
SM
14651sigjmp_buf env;
14652 while (! sigsetjmp (env, 1))
14653 siglongjmp (env, 1);
14654
05ea2a05
TT
14655 ;
14656 return 0;
14657}
14658_ACEOF
14659if ac_fn_c_try_compile "$LINENO"; then :
14660 gdb_cv_func_sigsetjmp=yes
14661else
14662 gdb_cv_func_sigsetjmp=no
b9442ec1 14663
05ea2a05
TT
14664fi
14665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b9442ec1 14666
05ea2a05
TT
14667fi
14668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14669$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14670 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
5e030278 14671
05ea2a05 14672$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
5e030278 14673
05ea2a05
TT
14674 fi
14675
14676
14677# Check whether --with-intel_pt was given.
14678if test "${with_intel_pt+set}" = set; then :
14679 withval=$with_intel_pt;
5e030278 14680else
05ea2a05 14681 with_intel_pt=auto
5e030278 14682fi
05ea2a05
TT
14683
14684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14685$as_echo_n "checking whether to use intel pt... " >&6; }
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14687$as_echo "$with_intel_pt" >&6; }
14688
14689 if test "${with_intel_pt}" = no; then
14690 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14691$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14692 HAVE_LIBIPT=no
14693 else
14694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14695/* end confdefs.h. */
5e030278 14696
05ea2a05
TT
14697 #include <linux/perf_event.h>
14698 #ifndef PERF_ATTR_SIZE_VER5
14699 # error
14700 #endif
5e030278 14701
05ea2a05
TT
14702_ACEOF
14703if ac_fn_c_try_cpp "$LINENO"; then :
14704 perf_event=yes
14705else
14706 perf_event=no
5e030278 14707fi
05ea2a05
TT
14708rm -f conftest.err conftest.i conftest.$ac_ext
14709 if test "$perf_event" != yes; then
14710 if test "$with_intel_pt" = yes; then
14711 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14712 else
14713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14714$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14715 fi
14716 fi
5e030278 14717
5e030278 14718
5e030278 14719
5e030278 14720
5e030278 14721
5e030278 14722
5e030278 14723
5e030278 14724
5e030278 14725
05ea2a05 14726 use_additional=yes
5e030278 14727
05ea2a05
TT
14728 acl_save_prefix="$prefix"
14729 prefix="$acl_final_prefix"
14730 acl_save_exec_prefix="$exec_prefix"
14731 exec_prefix="$acl_final_exec_prefix"
5e030278 14732
05ea2a05
TT
14733 eval additional_includedir=\"$includedir\"
14734 eval additional_libdir=\"$libdir\"
5e030278 14735
05ea2a05
TT
14736 exec_prefix="$acl_save_exec_prefix"
14737 prefix="$acl_save_prefix"
5e030278 14738
5e030278 14739
05ea2a05
TT
14740# Check whether --with-libipt-prefix was given.
14741if test "${with_libipt_prefix+set}" = set; then :
14742 withval=$with_libipt_prefix;
14743 if test "X$withval" = "Xno"; then
14744 use_additional=no
14745 else
14746 if test "X$withval" = "X"; then
5e030278 14747
05ea2a05
TT
14748 acl_save_prefix="$prefix"
14749 prefix="$acl_final_prefix"
14750 acl_save_exec_prefix="$exec_prefix"
14751 exec_prefix="$acl_final_exec_prefix"
5e030278 14752
05ea2a05
TT
14753 eval additional_includedir=\"$includedir\"
14754 eval additional_libdir=\"$libdir\"
5e030278 14755
05ea2a05
TT
14756 exec_prefix="$acl_save_exec_prefix"
14757 prefix="$acl_save_prefix"
5e030278 14758
05ea2a05
TT
14759 else
14760 additional_includedir="$withval/include"
14761 additional_libdir="$withval/lib"
14762 fi
14763 fi
5e030278
TT
14764
14765fi
5e030278 14766
9f1528a1
AB
14767
14768# Check whether --with-libipt-type was given.
14769if test "${with_libipt_type+set}" = set; then :
14770 withval=$with_libipt_type; with_libipt_type=$withval
14771else
14772 with_libipt_type=auto
14773fi
14774
14775 lib_type=`eval echo \$with_libipt_type`
14776
05ea2a05
TT
14777 LIBIPT=
14778 LTLIBIPT=
14779 INCIPT=
14780 rpathdirs=
14781 ltrpathdirs=
14782 names_already_handled=
14783 names_next_round='ipt '
14784 while test -n "$names_next_round"; do
14785 names_this_round="$names_next_round"
14786 names_next_round=
14787 for name in $names_this_round; do
14788 already_handled=
14789 for n in $names_already_handled; do
14790 if test "$n" = "$name"; then
14791 already_handled=yes
14792 break
14793 fi
14794 done
14795 if test -z "$already_handled"; then
14796 names_already_handled="$names_already_handled $name"
14797 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14798 eval value=\"\$HAVE_LIB$uppername\"
14799 if test -n "$value"; then
14800 if test "$value" = yes; then
14801 eval value=\"\$LIB$uppername\"
14802 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14803 eval value=\"\$LTLIB$uppername\"
14804 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14805 else
14806 :
14807 fi
14808 else
14809 found_dir=
14810 found_la=
14811 found_so=
14812 found_a=
14813 if test $use_additional = yes; then
9f1528a1 14814 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14815 found_dir="$additional_libdir"
14816 found_so="$additional_libdir/lib$name.$shlibext"
14817 if test -f "$additional_libdir/lib$name.la"; then
14818 found_la="$additional_libdir/lib$name.la"
14819 fi
9f1528a1 14820 elif test x$lib_type != xshared; then
05ea2a05
TT
14821 if test -f "$additional_libdir/lib$name.$libext"; then
14822 found_dir="$additional_libdir"
14823 found_a="$additional_libdir/lib$name.$libext"
14824 if test -f "$additional_libdir/lib$name.la"; then
14825 found_la="$additional_libdir/lib$name.la"
14826 fi
14827 fi
14828 fi
14829 fi
14830 if test "X$found_dir" = "X"; then
14831 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14832
05ea2a05
TT
14833 acl_save_prefix="$prefix"
14834 prefix="$acl_final_prefix"
14835 acl_save_exec_prefix="$exec_prefix"
14836 exec_prefix="$acl_final_exec_prefix"
14837 eval x=\"$x\"
14838 exec_prefix="$acl_save_exec_prefix"
14839 prefix="$acl_save_prefix"
5e030278 14840
05ea2a05
TT
14841 case "$x" in
14842 -L*)
14843 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 14844 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14845 found_dir="$dir"
14846 found_so="$dir/lib$name.$shlibext"
14847 if test -f "$dir/lib$name.la"; then
14848 found_la="$dir/lib$name.la"
14849 fi
9f1528a1 14850 elif test x$lib_type != xshared; then
05ea2a05
TT
14851 if test -f "$dir/lib$name.$libext"; then
14852 found_dir="$dir"
14853 found_a="$dir/lib$name.$libext"
14854 if test -f "$dir/lib$name.la"; then
14855 found_la="$dir/lib$name.la"
14856 fi
14857 fi
14858 fi
14859 ;;
14860 esac
14861 if test "X$found_dir" != "X"; then
14862 break
14863 fi
14864 done
14865 fi
14866 if test "X$found_dir" != "X"; then
14867 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14868 if test "X$found_so" != "X"; then
14869 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14870 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14871 else
14872 haveit=
14873 for x in $ltrpathdirs; do
14874 if test "X$x" = "X$found_dir"; then
14875 haveit=yes
14876 break
14877 fi
14878 done
14879 if test -z "$haveit"; then
14880 ltrpathdirs="$ltrpathdirs $found_dir"
14881 fi
14882 if test "$hardcode_direct" = yes; then
14883 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14884 else
14885 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14886 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14887 haveit=
14888 for x in $rpathdirs; do
14889 if test "X$x" = "X$found_dir"; then
14890 haveit=yes
14891 break
14892 fi
14893 done
14894 if test -z "$haveit"; then
14895 rpathdirs="$rpathdirs $found_dir"
14896 fi
14897 else
14898 haveit=
14899 for x in $LDFLAGS $LIBIPT; do
5e030278 14900
05ea2a05
TT
14901 acl_save_prefix="$prefix"
14902 prefix="$acl_final_prefix"
14903 acl_save_exec_prefix="$exec_prefix"
14904 exec_prefix="$acl_final_exec_prefix"
14905 eval x=\"$x\"
14906 exec_prefix="$acl_save_exec_prefix"
14907 prefix="$acl_save_prefix"
5e030278 14908
05ea2a05
TT
14909 if test "X$x" = "X-L$found_dir"; then
14910 haveit=yes
14911 break
14912 fi
14913 done
14914 if test -z "$haveit"; then
14915 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14916 fi
14917 if test "$hardcode_minus_L" != no; then
14918 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14919 else
14920 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14921 fi
14922 fi
14923 fi
14924 fi
14925 else
14926 if test "X$found_a" != "X"; then
14927 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14928 else
14929 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14930 fi
14931 fi
14932 additional_includedir=
14933 case "$found_dir" in
14934 */lib | */lib/)
14935 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14936 additional_includedir="$basedir/include"
14937 ;;
14938 esac
14939 if test "X$additional_includedir" != "X"; then
14940 if test "X$additional_includedir" != "X/usr/include"; then
14941 haveit=
14942 if test "X$additional_includedir" = "X/usr/local/include"; then
14943 if test -n "$GCC"; then
14944 case $host_os in
14945 linux*) haveit=yes;;
14946 esac
14947 fi
14948 fi
14949 if test -z "$haveit"; then
14950 for x in $CPPFLAGS $INCIPT; do
5e030278 14951
05ea2a05
TT
14952 acl_save_prefix="$prefix"
14953 prefix="$acl_final_prefix"
14954 acl_save_exec_prefix="$exec_prefix"
14955 exec_prefix="$acl_final_exec_prefix"
14956 eval x=\"$x\"
14957 exec_prefix="$acl_save_exec_prefix"
14958 prefix="$acl_save_prefix"
5e030278 14959
05ea2a05
TT
14960 if test "X$x" = "X-I$additional_includedir"; then
14961 haveit=yes
14962 break
14963 fi
14964 done
14965 if test -z "$haveit"; then
14966 if test -d "$additional_includedir"; then
14967 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14968 fi
14969 fi
14970 fi
14971 fi
14972 fi
14973 if test -n "$found_la"; then
14974 save_libdir="$libdir"
14975 case "$found_la" in
14976 */* | *\\*) . "$found_la" ;;
14977 *) . "./$found_la" ;;
14978 esac
14979 libdir="$save_libdir"
14980 for dep in $dependency_libs; do
14981 case "$dep" in
14982 -L*)
14983 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14984 if test "X$additional_libdir" != "X/usr/lib"; then
14985 haveit=
14986 if test "X$additional_libdir" = "X/usr/local/lib"; then
14987 if test -n "$GCC"; then
14988 case $host_os in
14989 linux*) haveit=yes;;
14990 esac
14991 fi
14992 fi
14993 if test -z "$haveit"; then
14994 haveit=
14995 for x in $LDFLAGS $LIBIPT; do
5e030278 14996
05ea2a05
TT
14997 acl_save_prefix="$prefix"
14998 prefix="$acl_final_prefix"
14999 acl_save_exec_prefix="$exec_prefix"
15000 exec_prefix="$acl_final_exec_prefix"
15001 eval x=\"$x\"
15002 exec_prefix="$acl_save_exec_prefix"
15003 prefix="$acl_save_prefix"
5e030278 15004
05ea2a05
TT
15005 if test "X$x" = "X-L$additional_libdir"; then
15006 haveit=yes
15007 break
15008 fi
15009 done
15010 if test -z "$haveit"; then
15011 if test -d "$additional_libdir"; then
15012 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
15013 fi
15014 fi
15015 haveit=
15016 for x in $LDFLAGS $LTLIBIPT; do
5e030278 15017
05ea2a05
TT
15018 acl_save_prefix="$prefix"
15019 prefix="$acl_final_prefix"
15020 acl_save_exec_prefix="$exec_prefix"
15021 exec_prefix="$acl_final_exec_prefix"
15022 eval x=\"$x\"
15023 exec_prefix="$acl_save_exec_prefix"
15024 prefix="$acl_save_prefix"
5e030278 15025
05ea2a05
TT
15026 if test "X$x" = "X-L$additional_libdir"; then
15027 haveit=yes
15028 break
15029 fi
15030 done
15031 if test -z "$haveit"; then
15032 if test -d "$additional_libdir"; then
15033 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
15034 fi
15035 fi
15036 fi
15037 fi
15038 ;;
15039 -R*)
15040 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15041 if test "$enable_rpath" != no; then
15042 haveit=
15043 for x in $rpathdirs; do
15044 if test "X$x" = "X$dir"; then
15045 haveit=yes
15046 break
15047 fi
15048 done
15049 if test -z "$haveit"; then
15050 rpathdirs="$rpathdirs $dir"
15051 fi
15052 haveit=
15053 for x in $ltrpathdirs; do
15054 if test "X$x" = "X$dir"; then
15055 haveit=yes
15056 break
15057 fi
15058 done
15059 if test -z "$haveit"; then
15060 ltrpathdirs="$ltrpathdirs $dir"
15061 fi
15062 fi
15063 ;;
15064 -l*)
15065 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15066 ;;
15067 *.la)
15068 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15069 ;;
15070 *)
15071 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
15072 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
15073 ;;
15074 esac
15075 done
15076 fi
15077 else
9f1528a1
AB
15078 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
15079 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
15080 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
15081 else
15082 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
15083 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
15084 fi
05ea2a05 15085 fi
5e030278 15086 fi
05ea2a05
TT
15087 fi
15088 done
15089 done
15090 if test "X$rpathdirs" != "X"; then
15091 if test -n "$hardcode_libdir_separator"; then
15092 alldirs=
15093 for found_dir in $rpathdirs; do
15094 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15095 done
15096 acl_save_libdir="$libdir"
15097 libdir="$alldirs"
15098 eval flag=\"$hardcode_libdir_flag_spec\"
15099 libdir="$acl_save_libdir"
15100 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15101 else
15102 for found_dir in $rpathdirs; do
15103 acl_save_libdir="$libdir"
15104 libdir="$found_dir"
15105 eval flag=\"$hardcode_libdir_flag_spec\"
15106 libdir="$acl_save_libdir"
15107 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15108 done
15109 fi
15110 fi
15111 if test "X$ltrpathdirs" != "X"; then
15112 for found_dir in $ltrpathdirs; do
15113 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
15114 done
15115 fi
5e030278
TT
15116
15117
05ea2a05 15118 ac_save_CPPFLAGS="$CPPFLAGS"
5e030278 15119
05ea2a05
TT
15120 for element in $INCIPT; do
15121 haveit=
15122 for x in $CPPFLAGS; do
5e030278 15123
05ea2a05
TT
15124 acl_save_prefix="$prefix"
15125 prefix="$acl_final_prefix"
15126 acl_save_exec_prefix="$exec_prefix"
15127 exec_prefix="$acl_final_exec_prefix"
15128 eval x=\"$x\"
15129 exec_prefix="$acl_save_exec_prefix"
15130 prefix="$acl_save_prefix"
5e030278 15131
05ea2a05
TT
15132 if test "X$x" = "X$element"; then
15133 haveit=yes
15134 break
15135 fi
15136 done
15137 if test -z "$haveit"; then
15138 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15139 fi
15140 done
5e030278
TT
15141
15142
05ea2a05
TT
15143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
15144$as_echo_n "checking for libipt... " >&6; }
15145if ${ac_cv_libipt+:} false; then :
5e030278
TT
15146 $as_echo_n "(cached) " >&6
15147else
05ea2a05
TT
15148
15149 ac_save_LIBS="$LIBS"
15150 LIBS="$LIBS $LIBIPT"
15151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 15152/* end confdefs.h. */
05ea2a05 15153#include "intel-pt.h"
5e030278
TT
15154int
15155main ()
15156{
05ea2a05 15157pt_insn_alloc_decoder (0);
5e030278
TT
15158 ;
15159 return 0;
15160}
15161_ACEOF
05ea2a05
TT
15162if ac_fn_c_try_link "$LINENO"; then :
15163 ac_cv_libipt=yes
5e030278 15164else
05ea2a05 15165 ac_cv_libipt=no
5e030278 15166fi
05ea2a05
TT
15167rm -f core conftest.err conftest.$ac_objext \
15168 conftest$ac_exeext conftest.$ac_ext
15169 LIBS="$ac_save_LIBS"
15170
5e030278 15171fi
05ea2a05
TT
15172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
15173$as_echo "$ac_cv_libipt" >&6; }
15174 if test "$ac_cv_libipt" = yes; then
15175 HAVE_LIBIPT=yes
21987b9c 15176
05ea2a05
TT
15177$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
15178
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
15180$as_echo_n "checking how to link with libipt... " >&6; }
15181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
15182$as_echo "$LIBIPT" >&6; }
15183 else
15184 HAVE_LIBIPT=no
15185 CPPFLAGS="$ac_save_CPPFLAGS"
15186 LIBIPT=
15187 LTLIBIPT=
15188 fi
15189
15190
15191
15192
15193
15194
15195 if test "$HAVE_LIBIPT" != yes; then
15196 if test "$with_intel_pt" = yes; then
15197 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
15198 else
15199 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
15200$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
15201 fi
15202 else
15203 save_LIBS=$LIBS
15204 LIBS="$LIBS $LIBIPT"
15205 for ac_func in pt_insn_event
21987b9c 15206do :
05ea2a05
TT
15207 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
15208if test "x$ac_cv_func_pt_insn_event" = xyes; then :
21987b9c 15209 cat >>confdefs.h <<_ACEOF
05ea2a05 15210#define HAVE_PT_INSN_EVENT 1
21987b9c
TT
15211_ACEOF
15212
15213fi
15214done
15215
05ea2a05
TT
15216 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
15217"
15218if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
21987b9c 15219
05ea2a05
TT
15220cat >>confdefs.h <<_ACEOF
15221#define HAVE_STRUCT_PT_INSN_ENABLED 1
15222_ACEOF
5e030278 15223
5e030278 15224
05ea2a05
TT
15225fi
15226ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
15227"
15228if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
15229
15230cat >>confdefs.h <<_ACEOF
15231#define HAVE_STRUCT_PT_INSN_RESYNCED 1
15232_ACEOF
5e030278
TT
15233
15234
05ea2a05
TT
15235fi
15236
15237 LIBS=$save_LIBS
15238 fi
15239 fi
15240
c8693053
RO
15241
15242$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
15243
15244 for ac_header in sys/procfs.h
15245do :
15246 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
15247if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
15248 cat >>confdefs.h <<_ACEOF
15249#define HAVE_SYS_PROCFS_H 1
15250_ACEOF
15251
15252fi
15253
15254done
15255
05ea2a05 15256 if test "$ac_cv_header_sys_procfs_h" = yes; then
c8693053
RO
15257
15258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
05ea2a05
TT
15259$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
15260 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
e9bcb658
GB
15261 $as_echo_n "(cached) " >&6
15262else
15263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15264/* end confdefs.h. */
15265
05ea2a05 15266#define _SYSCALL32
05ea2a05 15267#include <sys/procfs.h>
e9bcb658
GB
15268int
15269main ()
15270{
05ea2a05 15271gregset_t avar
e9bcb658
GB
15272 ;
15273 return 0;
15274}
15275_ACEOF
15276if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15277 bfd_cv_have_sys_procfs_type_gregset_t=yes
e9bcb658 15278else
05ea2a05 15279 bfd_cv_have_sys_procfs_type_gregset_t=no
54019719
PA
15280
15281fi
05ea2a05 15282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 15283fi
06825bd1 15284
05ea2a05 15285 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
a3828db0 15286
05ea2a05 15287$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
06825bd1 15288
05ea2a05
TT
15289 fi
15290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
15291$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
15292
c8693053
RO
15293
15294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
15295$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
15296 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 15297 $as_echo_n "(cached) " >&6
bec39cab 15298else
81ecdfbb 15299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15300/* end confdefs.h. */
05ea2a05
TT
15301
15302#define _SYSCALL32
05ea2a05 15303#include <sys/procfs.h>
bec39cab
AC
15304int
15305main ()
15306{
05ea2a05 15307fpregset_t avar
064ef605
DJ
15308 ;
15309 return 0;
15310}
15311_ACEOF
9b30624b 15312if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
15313 bfd_cv_have_sys_procfs_type_fpregset_t=yes
15314else
15315 bfd_cv_have_sys_procfs_type_fpregset_t=no
15316
15317fi
15318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15319fi
15320
15321 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
15322
15323$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
15324
15325 fi
15326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
15327$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
15328
c8693053
RO
15329
15330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
05ea2a05
TT
15331$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
15332 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
15333 $as_echo_n "(cached) " >&6
064ef605 15334else
81ecdfbb 15335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 15336/* end confdefs.h. */
05ea2a05
TT
15337
15338#define _SYSCALL32
05ea2a05 15339#include <sys/procfs.h>
064ef605
DJ
15340int
15341main ()
15342{
05ea2a05 15343prgregset_t avar
bec39cab
AC
15344 ;
15345 return 0;
15346}
15347_ACEOF
9b30624b 15348if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15349 bfd_cv_have_sys_procfs_type_prgregset_t=yes
70f9f479 15350else
05ea2a05
TT
15351 bfd_cv_have_sys_procfs_type_prgregset_t=no
15352
70f9f479 15353fi
81ecdfbb 15354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 15355fi
bec39cab 15356
05ea2a05 15357 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
70f9f479 15358
05ea2a05
TT
15359$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
15360
15361 fi
15362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15363$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
15364
c8693053
RO
15365
15366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
05ea2a05
TT
15367$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
15368 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 15369 $as_echo_n "(cached) " >&6
bec39cab 15370else
81ecdfbb 15371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 15372/* end confdefs.h. */
05ea2a05
TT
15373
15374#define _SYSCALL32
05ea2a05 15375#include <sys/procfs.h>
064ef605
DJ
15376int
15377main ()
15378{
05ea2a05 15379prfpregset_t avar
064ef605
DJ
15380 ;
15381 return 0;
15382}
15383_ACEOF
9b30624b 15384if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15385 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
064ef605 15386else
05ea2a05 15387 bfd_cv_have_sys_procfs_type_prfpregset_t=no
064ef605 15388
5c7f2947 15389fi
81ecdfbb 15390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
05ea2a05
TT
15391fi
15392
15393 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
15394
15395$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
15396
15397 fi
15398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15399$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
15400
c8693053
RO
15401
15402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
05ea2a05
TT
15403$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
15404 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
15405 $as_echo_n "(cached) " >&6
15406else
15407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15408/* end confdefs.h. */
05ea2a05
TT
15409
15410#define _SYSCALL32
05ea2a05 15411#include <sys/procfs.h>
bec39cab
AC
15412int
15413main ()
15414{
05ea2a05 15415prgregset32_t avar
bec39cab
AC
15416 ;
15417 return 0;
15418}
15419_ACEOF
9b30624b 15420if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
15421 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15422else
15423 bfd_cv_have_sys_procfs_type_prgregset32_t=no
a3828db0 15424
064ef605 15425fi
81ecdfbb 15426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 15427fi
96d7229d 15428
05ea2a05 15429 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
78434e59 15430
05ea2a05 15431$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
78434e59 15432
05ea2a05
TT
15433 fi
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15435$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
54019719 15436
c8693053
RO
15437
15438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
05ea2a05
TT
15439$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15440 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 15441 $as_echo_n "(cached) " >&6
bec39cab 15442else
81ecdfbb 15443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15444/* end confdefs.h. */
05ea2a05
TT
15445
15446#define _SYSCALL32
05ea2a05 15447#include <sys/procfs.h>
bec39cab
AC
15448int
15449main ()
15450{
05ea2a05 15451lwpid_t avar
bec39cab
AC
15452 ;
15453 return 0;
15454}
15455_ACEOF
05ea2a05
TT
15456if ac_fn_c_try_compile "$LINENO"; then :
15457 bfd_cv_have_sys_procfs_type_lwpid_t=yes
c906108c 15458else
05ea2a05
TT
15459 bfd_cv_have_sys_procfs_type_lwpid_t=no
15460
c906108c 15461fi
05ea2a05 15462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15463fi
81ecdfbb 15464
05ea2a05 15465 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
a3828db0 15466
05ea2a05 15467$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
97bf5e38 15468
05ea2a05
TT
15469 fi
15470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15471$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
a3828db0 15472
c8693053
RO
15473
15474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
05ea2a05
TT
15475$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15476 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 15477 $as_echo_n "(cached) " >&6
97bf5e38 15478else
81ecdfbb 15479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15480/* end confdefs.h. */
a3828db0 15481
05ea2a05 15482#define _SYSCALL32
05ea2a05 15483#include <sys/procfs.h>
bec39cab
AC
15484int
15485main ()
15486{
05ea2a05 15487psaddr_t avar
bec39cab
AC
15488 ;
15489 return 0;
15490}
15491_ACEOF
81ecdfbb 15492if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15493 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 15494else
05ea2a05
TT
15495 bfd_cv_have_sys_procfs_type_psaddr_t=no
15496
c906108c 15497fi
81ecdfbb 15498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 15499fi
c3f6f71d 15500
05ea2a05 15501 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
c906108c 15502
05ea2a05 15503$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
db1ff28b 15504
05ea2a05
TT
15505 fi
15506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15507$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15508
c8693053
RO
15509
15510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
15511$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15512 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
db1ff28b
JK
15513 $as_echo_n "(cached) " >&6
15514else
15515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15516/* end confdefs.h. */
05ea2a05
TT
15517
15518#define _SYSCALL32
05ea2a05 15519#include <sys/procfs.h>
db1ff28b
JK
15520int
15521main ()
15522{
05ea2a05 15523elf_fpregset_t avar
db1ff28b
JK
15524 ;
15525 return 0;
15526}
15527_ACEOF
15528if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15529 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
db1ff28b 15530else
05ea2a05
TT
15531 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15532
db1ff28b
JK
15533fi
15534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15535fi
db1ff28b 15536
05ea2a05 15537 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
db1ff28b 15538
05ea2a05 15539$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
db1ff28b 15540
05ea2a05
TT
15541 fi
15542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15543$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
db1ff28b 15544
05ea2a05
TT
15545 fi
15546
15547
15548# Check the return and argument types of ptrace.
15549
15550
15551for ac_header in sys/ptrace.h ptrace.h
15552do :
15553 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15554ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15555if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15556 cat >>confdefs.h <<_ACEOF
15557#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15558_ACEOF
db1ff28b
JK
15559
15560fi
15561
05ea2a05
TT
15562done
15563
81ecdfbb 15564
05ea2a05
TT
15565gdb_ptrace_headers='
15566#include <sys/types.h>
15567#if HAVE_SYS_PTRACE_H
15568# include <sys/ptrace.h>
15569#endif
15570#if HAVE_UNISTD_H
15571# include <unistd.h>
15572#endif
15573'
5c45e068 15574
05ea2a05
TT
15575# Check return type. Varargs (used on GNU/Linux) conflict with the
15576# empty argument list, so check for that explicitly.
15577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15578$as_echo_n "checking return type of ptrace... " >&6; }
15579if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 15580 $as_echo_n "(cached) " >&6
bec39cab 15581else
81ecdfbb 15582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15583/* end confdefs.h. */
5164c117 15584 $gdb_ptrace_headers
bec39cab
AC
15585int
15586main ()
15587{
05ea2a05 15588extern long ptrace (enum __ptrace_request, ...);
5164c117 15589
bec39cab
AC
15590 ;
15591 return 0;
15592}
15593_ACEOF
81ecdfbb 15594if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15595 gdb_cv_func_ptrace_ret='long'
bec39cab 15596else
81ecdfbb 15597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15598/* end confdefs.h. */
05ea2a05 15599$gdb_ptrace_headers
bec39cab
AC
15600int
15601main ()
15602{
05ea2a05 15603extern int ptrace ();
5164c117 15604
bec39cab
AC
15605 ;
15606 return 0;
15607}
15608_ACEOF
81ecdfbb 15609if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15610 gdb_cv_func_ptrace_ret='int'
27ca5dad 15611else
05ea2a05 15612 gdb_cv_func_ptrace_ret='long'
b6fb30ed 15613
27ca5dad 15614fi
81ecdfbb 15615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 15616
27ca5dad 15617fi
05ea2a05 15618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 15619
27ca5dad 15620fi
05ea2a05
TT
15621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15622$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
5c45e068 15623
b6fb30ed 15624
5c45e068 15625cat >>confdefs.h <<_ACEOF
05ea2a05 15626#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 15627_ACEOF
3862412b 15628
b6fb30ed 15629
05ea2a05
TT
15630# Check argument types.
15631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15632$as_echo_n "checking types of arguments for ptrace... " >&6; }
15633if ${gdb_cv_func_ptrace_args+:} false; then :
15634 $as_echo_n "(cached) " >&6
15635else
05ea2a05
TT
15636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15637/* end confdefs.h. */
15638$gdb_ptrace_headers
15639int
15640main ()
15641{
15642extern long ptrace (enum __ptrace_request, ...);
5164c117 15643
05ea2a05
TT
15644 ;
15645 return 0;
15646}
bec39cab 15647_ACEOF
05ea2a05
TT
15648if ac_fn_c_try_compile "$LINENO"; then :
15649 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15650else
b6fb30ed
SM
15651 for gdb_arg1 in 'int' 'long'; do
15652 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15653 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15654 for gdb_arg4 in 'int' 'long' 'void *'; do
15655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
05ea2a05
TT
15656/* end confdefs.h. */
15657$gdb_ptrace_headers
15658int
15659main ()
15660{
b6fb30ed 15661extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
5164c117 15662
05ea2a05
TT
15663 ;
15664 return 0;
15665}
15666_ACEOF
15667if ac_fn_c_try_compile "$LINENO"; then :
15668 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
b6fb30ed
SM
15669 break 4;
15670
97bf5e38 15671fi
05ea2a05 15672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed
SM
15673
15674 for gdb_arg5 in 'int *' 'int' 'long'; do
15675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
05ea2a05
TT
15676/* end confdefs.h. */
15677$gdb_ptrace_headers
15678int
15679main ()
15680{
b6fb30ed 15681extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
5164c117 15682
05ea2a05
TT
15683 ;
15684 return 0;
15685}
6fea9e18 15686_ACEOF
05ea2a05 15687if ac_fn_c_try_compile "$LINENO"; then :
b6fb30ed
SM
15688 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15689 break 5;
6fea9e18 15690
05ea2a05
TT
15691fi
15692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed
SM
15693 done
15694 done
15695 done
15696 done
15697 done
15698 # Provide a safe default value.
15699 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
6fea9e18
L
15700
15701fi
05ea2a05 15702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 15703
05ea2a05
TT
15704fi
15705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15706$as_echo "$gdb_cv_func_ptrace_args" >&6; }
b6fb30ed 15707
05ea2a05
TT
15708ac_save_IFS=$IFS; IFS=','
15709set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15710IFS=$ac_save_IFS
15711shift
6fea9e18
L
15712
15713cat >>confdefs.h <<_ACEOF
05ea2a05 15714#define PTRACE_TYPE_ARG1 $1
6fea9e18
L
15715_ACEOF
15716
15717
05ea2a05
TT
15718cat >>confdefs.h <<_ACEOF
15719#define PTRACE_TYPE_ARG3 $3
bec39cab 15720_ACEOF
451928c5 15721
60ca704f 15722
05ea2a05
TT
15723cat >>confdefs.h <<_ACEOF
15724#define PTRACE_TYPE_ARG4 $4
15725_ACEOF
15726
15727if test -n "$5"; then
15728
15729cat >>confdefs.h <<_ACEOF
15730#define PTRACE_TYPE_ARG5 $5
15731_ACEOF
451928c5 15732
97bf5e38 15733fi
451928c5 15734
05ea2a05
TT
15735
15736if test "$cross_compiling" = no; then
15737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15738$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15739if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15740 $as_echo_n "(cached) " >&6
05ea2a05
TT
15741else
15742 if test "$cross_compiling" = yes; then :
15743 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
451928c5 15744else
81ecdfbb 15745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15746/* end confdefs.h. */
05ea2a05 15747$ac_includes_default
bec39cab
AC
15748int
15749main ()
15750{
05ea2a05
TT
15751/* If this system has a BSD-style setpgrp which takes arguments,
15752 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15753 exit successfully. */
15754 return setpgrp (1,1) != -1;
bec39cab
AC
15755 ;
15756 return 0;
15757}
15758_ACEOF
05ea2a05
TT
15759if ac_fn_c_try_run "$LINENO"; then :
15760 ac_cv_func_setpgrp_void=no
451928c5 15761else
05ea2a05 15762 ac_cv_func_setpgrp_void=yes
451928c5 15763fi
05ea2a05
TT
15764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15765 conftest.$ac_objext conftest.beam conftest.$ac_ext
451928c5
AC
15766fi
15767
05ea2a05
TT
15768fi
15769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15770$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15771if test $ac_cv_func_setpgrp_void = yes; then
60ca704f 15772
05ea2a05 15773$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
451928c5 15774
97bf5e38 15775fi
451928c5 15776
05ea2a05
TT
15777else
15778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15779$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15780if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15781 $as_echo_n "(cached) " >&6
3862412b 15782else
81ecdfbb 15783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15784/* end confdefs.h. */
05ea2a05 15785#include <unistd.h>
bec39cab
AC
15786int
15787main ()
15788{
5593a99a
SM
15789if (setpgrp(1,1) == -1)
15790 exit (0);
15791 else
15792 exit (1);
05ea2a05 15793
bec39cab
AC
15794 ;
15795 return 0;
15796}
15797_ACEOF
81ecdfbb 15798if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15799 ac_cv_func_setpgrp_void=no
3862412b 15800else
05ea2a05 15801 ac_cv_func_setpgrp_void=yes
5593a99a 15802
3862412b 15803fi
81ecdfbb 15804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15805
3862412b 15806fi
05ea2a05
TT
15807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15808$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15809if test "$ac_cv_func_setpgrp_void" = yes; then
15810 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
3862412b 15811
05ea2a05 15812fi
97bf5e38 15813fi
3862412b 15814
05ea2a05
TT
15815# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15816ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15817#include <sys/proc.h>
6e9567fe 15818
e6cdd38e 15819"
05ea2a05 15820if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
e6cdd38e
JB
15821
15822cat >>confdefs.h <<_ACEOF
05ea2a05 15823#define HAVE_STRUCT_THREAD_TD_PCB 1
e6cdd38e
JB
15824_ACEOF
15825
15826
15827fi
15828
6e9567fe 15829
05ea2a05
TT
15830# See if <sys/lwp.h> defines `struct lwp`.
15831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15832$as_echo_n "checking for struct lwp... " >&6; }
15833if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 15834 $as_echo_n "(cached) " >&6
596c9d4b 15835else
81ecdfbb 15836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15837/* end confdefs.h. */
05ea2a05 15838#include <sys/param.h>
5593a99a
SM
15839 #define _KMEMUSER
15840 #include <sys/lwp.h>
bec39cab
AC
15841int
15842main ()
15843{
05ea2a05 15844struct lwp l;
5593a99a 15845
bec39cab
AC
15846 ;
15847 return 0;
15848}
15849_ACEOF
81ecdfbb 15850if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15851 gdb_cv_struct_lwp=yes
596c9d4b 15852else
05ea2a05 15853 gdb_cv_struct_lwp=no
5593a99a 15854
596c9d4b 15855fi
81ecdfbb 15856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15857
596c9d4b 15858fi
05ea2a05
TT
15859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15860$as_echo "$gdb_cv_struct_lwp" >&6; }
15861if test "$gdb_cv_struct_lwp" = yes; then
596c9d4b 15862
05ea2a05 15863$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
596c9d4b 15864
05ea2a05 15865fi
451928c5 15866
05ea2a05
TT
15867# See if <machine/reg.h> degines `struct reg'.
15868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15869$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15870if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 15871 $as_echo_n "(cached) " >&6
d84dd0c5 15872else
81ecdfbb 15873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15874/* end confdefs.h. */
05ea2a05 15875#include <sys/types.h>
5593a99a 15876 #include <machine/reg.h>
bec39cab
AC
15877int
15878main ()
15879{
05ea2a05 15880struct reg r;
5593a99a 15881
bec39cab
AC
15882 ;
15883 return 0;
15884}
15885_ACEOF
81ecdfbb 15886if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15887 gdb_cv_struct_reg=yes
d84dd0c5 15888else
05ea2a05 15889 gdb_cv_struct_reg=no
5593a99a 15890
d84dd0c5 15891fi
81ecdfbb 15892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15893
d84dd0c5 15894fi
05ea2a05
TT
15895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15896$as_echo "$gdb_cv_struct_reg" >&6; }
15897if test "$gdb_cv_struct_reg" = yes; then
d84dd0c5 15898
05ea2a05 15899$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
bec39cab 15900
05ea2a05 15901fi
d84dd0c5 15902
05ea2a05
TT
15903# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15904# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15905ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15906#include <machine/reg.h>
15907"
15908if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
d84dd0c5 15909
05ea2a05
TT
15910cat >>confdefs.h <<_ACEOF
15911#define HAVE_STRUCT_REG_R_FS 1
15912_ACEOF
15913
15914
15915fi
15916ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15917#include <machine/reg.h>
15918"
15919if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15920
15921cat >>confdefs.h <<_ACEOF
15922#define HAVE_STRUCT_REG_R_GS 1
15923_ACEOF
15924
15925
15926fi
15927
15928
05ea2a05
TT
15929# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15931$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15932if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 15933 $as_echo_n "(cached) " >&6
d45fe813 15934else
81ecdfbb 15935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15936/* end confdefs.h. */
05ea2a05 15937#include <sys/ptrace.h>
bec39cab
AC
15938int
15939main ()
15940{
05ea2a05 15941PTRACE_GETREGS;
bec39cab
AC
15942 ;
15943 return 0;
15944}
15945_ACEOF
81ecdfbb 15946if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15947 gdb_cv_have_ptrace_getregs=yes
d45fe813 15948else
05ea2a05 15949 gdb_cv_have_ptrace_getregs=no
5593a99a 15950
d45fe813 15951fi
81ecdfbb 15952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15953
d45fe813
KB
15954fi
15955
05ea2a05
TT
15956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15957$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15958if test "$gdb_cv_have_ptrace_getregs" = yes; then
bec39cab 15959
05ea2a05 15960$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
d45fe813 15961
05ea2a05 15962fi
d45fe813 15963
05ea2a05
TT
15964# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15966$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15967if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 15968 $as_echo_n "(cached) " >&6
d45fe813 15969else
81ecdfbb 15970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15971/* end confdefs.h. */
05ea2a05 15972#include <sys/ptrace.h>
bec39cab
AC
15973int
15974main ()
15975{
05ea2a05 15976PTRACE_GETFPXREGS;
bec39cab
AC
15977 ;
15978 return 0;
15979}
15980_ACEOF
81ecdfbb 15981if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15982 gdb_cv_have_ptrace_getfpxregs=yes
d45fe813 15983else
05ea2a05 15984 gdb_cv_have_ptrace_getfpxregs=no
5593a99a 15985
d45fe813 15986fi
81ecdfbb 15987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15988
d45fe813
KB
15989fi
15990
05ea2a05
TT
15991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15992$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15993if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
bec39cab 15994
05ea2a05 15995$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
d45fe813 15996
05ea2a05 15997fi
d45fe813 15998
05ea2a05
TT
15999# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
16000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
16001$as_echo_n "checking for PT_GETDBREGS... " >&6; }
16002if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 16003 $as_echo_n "(cached) " >&6
d45fe813 16004else
81ecdfbb 16005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16006/* end confdefs.h. */
05ea2a05 16007#include <sys/types.h>
5593a99a 16008 #include <sys/ptrace.h>
bec39cab
AC
16009int
16010main ()
16011{
05ea2a05 16012PT_GETDBREGS;
5593a99a 16013
bec39cab
AC
16014 ;
16015 return 0;
16016}
16017_ACEOF
81ecdfbb 16018if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 16019 gdb_cv_have_pt_getdbregs=yes
d45fe813 16020else
05ea2a05 16021 gdb_cv_have_pt_getdbregs=no
5593a99a 16022
d45fe813 16023fi
81ecdfbb 16024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 16025
d45fe813
KB
16026fi
16027
05ea2a05
TT
16028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
16029$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
16030if test "$gdb_cv_have_pt_getdbregs" = yes; then
bec39cab 16031
05ea2a05 16032$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
d45fe813 16033
05ea2a05 16034fi
c906108c 16035
05ea2a05
TT
16036# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
16037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
16038$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
16039if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 16040 $as_echo_n "(cached) " >&6
c906108c 16041else
81ecdfbb 16042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16043/* end confdefs.h. */
05ea2a05 16044#include <sys/types.h>
5593a99a 16045 #include <sys/ptrace.h>
bec39cab
AC
16046int
16047main ()
16048{
05ea2a05 16049PT_GETXMMREGS;
5593a99a 16050
bec39cab
AC
16051 ;
16052 return 0;
16053}
16054_ACEOF
81ecdfbb 16055if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 16056 gdb_cv_have_pt_getxmmregs=yes
c906108c 16057else
05ea2a05 16058 gdb_cv_have_pt_getxmmregs=no
5593a99a 16059
c906108c 16060fi
81ecdfbb 16061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 16062
c906108c
SS
16063fi
16064
05ea2a05
TT
16065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
16066$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
16067if test "$gdb_cv_have_pt_getxmmregs" = yes; then
bec39cab 16068
05ea2a05 16069$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
c906108c 16070
05ea2a05 16071fi
c906108c 16072
05ea2a05
TT
16073# See if <sys/ptrace.h> supports LWP names on FreeBSD
16074# Older FreeBSD versions don't have the pl_tdname member of
16075# `struct ptrace_lwpinfo'.
16076ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
16077"
16078if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
43b7e92b 16079
05ea2a05
TT
16080cat >>confdefs.h <<_ACEOF
16081#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
43b7e92b 16082_ACEOF
43b7e92b 16083
05ea2a05 16084
43b7e92b
GB
16085fi
16086
43b7e92b 16087
05ea2a05
TT
16088# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
16089# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
16090# FreeBSD 10.3.
16091ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
16092"
16093if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
16094
16095cat >>confdefs.h <<_ACEOF
16096#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
16097_ACEOF
43b7e92b 16098
43b7e92b 16099
c906108c 16100fi
c906108c 16101
05ea2a05 16102
bc8bcb4b 16103# Check if the compiler supports the `long long' type.
c906108c 16104
81ecdfbb
RW
16105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
16106$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 16107if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 16108 $as_echo_n "(cached) " >&6
97bf5e38 16109else
81ecdfbb 16110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16111/* end confdefs.h. */
bc8bcb4b 16112extern long long foo;
bec39cab
AC
16113int
16114main ()
16115{
bc8bcb4b 16116switch (foo & 2) { case 0: return 1; }
bec39cab
AC
16117 ;
16118 return 0;
16119}
16120_ACEOF
81ecdfbb 16121if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
16122 gdb_cv_c_long_long=yes
16123else
81ecdfbb 16124 gdb_cv_c_long_long=no
97bf5e38 16125fi
81ecdfbb 16126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 16127fi
81ecdfbb
RW
16128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
16129$as_echo "$gdb_cv_c_long_long" >&6; }
0ad6b8ee 16130if test "$gdb_cv_c_long_long" != yes; then
74a0d9f6 16131 # libdecnumber requires long long.
d0ac1c44 16132 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
16133fi
16134
bc8bcb4b 16135# Check if the compiler and runtime support printing long longs.
97bf5e38 16136
81ecdfbb
RW
16137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
16138$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 16139if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 16140 $as_echo_n "(cached) " >&6
97bf5e38 16141else
81ecdfbb 16142 if test "$cross_compiling" = yes; then :
97bf5e38
MK
16143 gdb_cv_printf_has_long_long=no
16144else
81ecdfbb 16145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16146/* end confdefs.h. */
bc8bcb4b
MK
16147$ac_includes_default
16148int
16149main ()
16150{
16151char buf[32];
97bf5e38
MK
16152 long long l = 0;
16153 l = (l << 16) + 0x0123;
16154 l = (l << 16) + 0x4567;
16155 l = (l << 16) + 0x89ab;
16156 l = (l << 16) + 0xcdef;
16157 sprintf (buf, "0x%016llx", l);
16158 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
16159 ;
16160 return 0;
c906108c 16161}
bec39cab 16162_ACEOF
81ecdfbb 16163if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
16164 gdb_cv_printf_has_long_long=yes
16165else
81ecdfbb 16166 gdb_cv_printf_has_long_long=no
97bf5e38 16167fi
81ecdfbb
RW
16168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16169 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 16170fi
81ecdfbb 16171
97bf5e38 16172fi
81ecdfbb
RW
16173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
16174$as_echo "$gdb_cv_printf_has_long_long" >&6; }
0ad6b8ee 16175if test "$gdb_cv_printf_has_long_long" = yes; then
bc8bcb4b 16176
81ecdfbb 16177$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
16178
16179fi
97bf5e38 16180
1a619819
LM
16181# Check if the compiler and runtime support printing decfloats.
16182
81ecdfbb
RW
16183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
16184$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 16185if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 16186 $as_echo_n "(cached) " >&6
1a619819 16187else
81ecdfbb 16188 if test "$cross_compiling" = yes; then :
1a619819
LM
16189 gdb_cv_printf_has_decfloat=no
16190else
81ecdfbb 16191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
16192/* end confdefs.h. */
16193$ac_includes_default
16194int
16195main ()
16196{
16197char buf[64];
16198 _Decimal32 d32 = 1.2345df;
16199 _Decimal64 d64 = 1.2345dd;
16200 _Decimal128 d128 = 1.2345dl;
16201 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
16202 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
16203 ;
16204 return 0;
16205}
16206_ACEOF
81ecdfbb 16207if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
16208 gdb_cv_printf_has_decfloat=yes
16209else
81ecdfbb 16210 gdb_cv_printf_has_decfloat=no
1a619819 16211fi
81ecdfbb
RW
16212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16213 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 16214fi
81ecdfbb 16215
1a619819 16216fi
81ecdfbb
RW
16217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
16218$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
0ad6b8ee 16219if test "$gdb_cv_printf_has_decfloat" = yes; then
1a619819 16220
81ecdfbb 16221$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
16222
16223fi
16224
bc8bcb4b
MK
16225# Check if the compiler supports the `long double' type. We can't use
16226# AC_C_LONG_DOUBLE because that one does additional checks on the
16227# constants defined in <float.h> that fail on some systems,
16228# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 16229
81ecdfbb
RW
16230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
16231$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 16232if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 16233 $as_echo_n "(cached) " >&6
97bf5e38 16234else
81ecdfbb 16235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16236/* end confdefs.h. */
97bf5e38 16237long double foo;
bec39cab 16238_ACEOF
81ecdfbb 16239if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 16240 gdb_cv_c_long_double=yes
97bf5e38 16241else
81ecdfbb 16242 gdb_cv_c_long_double=no
97bf5e38 16243fi
81ecdfbb 16244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 16245fi
81ecdfbb
RW
16246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
16247$as_echo "$gdb_cv_c_long_double" >&6; }
0ad6b8ee 16248if test "$gdb_cv_c_long_double" = yes; then
c906108c 16249
81ecdfbb 16250$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
16251
16252fi
16253
bc8bcb4b 16254# Check if the compiler and runtime support printing long doubles.
97bf5e38 16255
81ecdfbb
RW
16256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
16257$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 16258if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 16259 $as_echo_n "(cached) " >&6
97bf5e38 16260else
81ecdfbb 16261 if test "$cross_compiling" = yes; then :
97bf5e38
MK
16262 gdb_cv_printf_has_long_double=no
16263else
81ecdfbb 16264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16265/* end confdefs.h. */
bc8bcb4b
MK
16266$ac_includes_default
16267int
16268main ()
16269{
16270char buf[16];
97bf5e38
MK
16271 long double f = 3.141592653;
16272 sprintf (buf, "%Lg", f);
16273 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
16274 ;
16275 return 0;
97bf5e38 16276}
bec39cab 16277_ACEOF
81ecdfbb 16278if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 16279 gdb_cv_printf_has_long_double=yes
c906108c 16280else
81ecdfbb 16281 gdb_cv_printf_has_long_double=no
c906108c 16282fi
81ecdfbb
RW
16283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16284 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 16285fi
81ecdfbb 16286
c906108c 16287fi
81ecdfbb
RW
16288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
16289$as_echo "$gdb_cv_printf_has_long_double" >&6; }
0ad6b8ee 16290if test "$gdb_cv_printf_has_long_double" = yes; then
bc8bcb4b 16291
81ecdfbb 16292$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
16293
16294fi
97bf5e38 16295
bc8bcb4b 16296# Check if the compiler and runtime support scanning long doubles.
97bf5e38 16297
81ecdfbb
RW
16298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
16299$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 16300if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 16301 $as_echo_n "(cached) " >&6
97bf5e38 16302else
81ecdfbb 16303 if test "$cross_compiling" = yes; then :
97bf5e38
MK
16304 gdb_cv_scanf_has_long_double=no
16305else
81ecdfbb 16306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16307/* end confdefs.h. */
bc8bcb4b
MK
16308#include <stdio.h>
16309int
16310main ()
16311{
16312char *buf = "3.141592653";
97bf5e38
MK
16313 long double f = 0;
16314 sscanf (buf, "%Lg", &f);
16315 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
16316 ;
16317 return 0;
97bf5e38 16318}
bec39cab 16319_ACEOF
81ecdfbb 16320if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
16321 gdb_cv_scanf_has_long_double=yes
16322else
81ecdfbb 16323 gdb_cv_scanf_has_long_double=no
97bf5e38 16324fi
81ecdfbb
RW
16325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16326 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 16327fi
81ecdfbb 16328
c906108c 16329fi
81ecdfbb
RW
16330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
16331$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
0ad6b8ee 16332if test "$gdb_cv_scanf_has_long_double" = yes; then
bc8bcb4b 16333
81ecdfbb 16334$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
16335
16336fi
c906108c 16337
438013df
AO
16338case ${host_os} in
16339aix*)
81ecdfbb
RW
16340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
16341$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 16342if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 16343 $as_echo_n "(cached) " >&6
438013df 16344else
5593a99a 16345 SAVE_LDFLAGS=$LDFLAGS
bec39cab 16346
5593a99a
SM
16347 case $GCC in
16348 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
16349 *) gdb_cv_bigtoc=-bbigtoc ;;
16350 esac
438013df 16351
5593a99a
SM
16352 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
16353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16354/* end confdefs.h. */
438013df 16355
bec39cab
AC
16356int
16357main ()
16358{
438013df 16359int i;
bec39cab
AC
16360 ;
16361 return 0;
16362}
16363_ACEOF
81ecdfbb 16364if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16365
81ecdfbb
RW
16366else
16367 gdb_cv_bigtoc=
5593a99a 16368
438013df 16369fi
81ecdfbb
RW
16370rm -f core conftest.err conftest.$ac_objext \
16371 conftest$ac_exeext conftest.$ac_ext
5593a99a 16372 LDFLAGS="${SAVE_LDFLAGS}"
438013df 16373
bec39cab 16374fi
81ecdfbb
RW
16375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
16376$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
16377 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16378 ;;
16379esac
16380
38f6b338 16381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 16382$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
16383dynamic_list=false
16384if test "${gdb_native}" = yes; then
16385 # The dynamically loaded libthread_db needs access to symbols in the gdb
16386 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
16387 # may not be supported there.
16388 old_LDFLAGS="$LDFLAGS"
16389 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16390 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16391 LDFLAGS="$LDFLAGS $RDYNAMIC"
16392 if test "${have_libpython}" = no; then
16393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
16394/* end confdefs.h. */
16395
16396int
16397main ()
16398{
16399
16400 ;
16401 return 0;
16402}
16403_ACEOF
16404if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
16405 dynamic_list=true
16406fi
16407rm -f core conftest.err conftest.$ac_objext \
16408 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
16409 else
16410 # Workaround http://bugs.python.org/issue4434 where static
16411 # libpythonX.Y.a would get its symbols required for
16412 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16413 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
16414
16415 # Note the workaround for Python
16416 # http://bugs.python.org/issue10112 earlier has removed
16417 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16418 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16419 # always pass.
38f6b338
JK
16420 old_CFLAGS="$CFLAGS"
16421 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
16422 old_LIBS="$LIBS"
16423 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
16424 old_CPPFLAGS="$CPPFLAGS"
16425 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 16426 if test "$cross_compiling" = yes; then :
3bebe2f2 16427 true
f6528abd 16428else
3bebe2f2
JK
16429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16430/* end confdefs.h. */
1b4f615e 16431#include "Python.h"
3bebe2f2
JK
16432int
16433main ()
16434{
16435int err;
38f6b338 16436 Py_Initialize ();
3fed4c0b 16437 err = PyRun_SimpleString ("import ctypes\n");
38f6b338
JK
16438 Py_Finalize ();
16439 return err == 0 ? 0 : 1;
3bebe2f2
JK
16440 ;
16441 return 0;
16442}
16443_ACEOF
16444if ac_fn_c_try_run "$LINENO"; then :
16445 dynamic_list=true
16446fi
16447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16448 conftest.$ac_objext conftest.beam conftest.$ac_ext
16449fi
16450
8c1fb155 16451 LIBS="$old_LIBS"
38f6b338 16452 CFLAGS="$old_CFLAGS"
1b4f615e 16453 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
16454 fi
16455 LDFLAGS="$old_LDFLAGS"
16456fi
16457if $dynamic_list; then
16458 found="-Wl,--dynamic-list"
16459 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 16460else
38f6b338
JK
16461 found="-rdynamic"
16462 RDYNAMIC="-rdynamic"
f6528abd 16463fi
f6528abd 16464
38f6b338 16465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 16466$as_echo "$found" >&6; }
0407b3f1 16467
f6528abd 16468
0ad6b8ee 16469if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
c906108c 16470 case ${host_os} in
d92419e5 16471 aix*)
81ecdfbb
RW
16472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16473$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 16474 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 16475 $as_echo_n "(cached) " >&6
bec39cab 16476else
81ecdfbb 16477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16478/* end confdefs.h. */
d92419e5 16479#include <sys/pthdebug.h>
bec39cab
AC
16480int
16481main ()
16482{
d92419e5 16483#ifndef PTHDB_VERSION_3
5593a99a
SM
16484 #error
16485 #endif
16486
bec39cab
AC
16487 ;
16488 return 0;
16489}
16490_ACEOF
81ecdfbb 16491if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
16492 gdb_cv_have_aix_thread_debug=yes
16493else
81ecdfbb 16494 gdb_cv_have_aix_thread_debug=no
5593a99a 16495
d92419e5 16496fi
81ecdfbb 16497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 16498
d92419e5
JB
16499fi
16500
81ecdfbb
RW
16501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16502$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
0ad6b8ee 16503 if test "$gdb_cv_have_aix_thread_debug" = yes; then
d92419e5 16504 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 16505 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 16506 LIBS="$LIBS -lpthdebug"
d645e32e
JB
16507
16508 # Older versions of AIX do not provide the declaration for
16509 # the getthrds function (it appears that it was introduced
16510 # with AIX 6.x).
16511 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16512"
d0ac1c44 16513if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
16514 ac_have_decl=1
16515else
16516 ac_have_decl=0
16517fi
16518
16519cat >>confdefs.h <<_ACEOF
16520#define HAVE_DECL_GETTHRDS $ac_have_decl
16521_ACEOF
16522
d92419e5
JB
16523 fi
16524 ;;
c906108c 16525 esac
bec39cab 16526
c906108c
SS
16527fi
16528
3f47be5c 16529if test "x$ac_cv_header_thread_db_h" = "xyes"; then
5593a99a 16530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
81ecdfbb 16531$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 16532if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 16533 $as_echo_n "(cached) " >&6
bec39cab 16534else
81ecdfbb 16535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16536/* end confdefs.h. */
3f47be5c 16537#include <thread_db.h>
bec39cab
AC
16538int
16539main ()
16540{
3f47be5c 16541int i = TD_NOTALLOC;
5593a99a 16542
bec39cab
AC
16543 ;
16544 return 0;
16545}
16546_ACEOF
81ecdfbb 16547if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
16548 gdb_cv_thread_db_h_has_td_notalloc=yes
16549else
81ecdfbb 16550 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 16551
3f47be5c 16552fi
81ecdfbb 16553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 16554
bec39cab 16555fi
81ecdfbb
RW
16556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16557$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
5593a99a
SM
16558
16559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
81ecdfbb 16560$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 16561if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 16562 $as_echo_n "(cached) " >&6
59f80f10 16563else
81ecdfbb 16564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16565/* end confdefs.h. */
16566#include <thread_db.h>
16567int
16568main ()
16569{
16570int i = TD_VERSION;
5593a99a 16571
59f80f10
DJ
16572 ;
16573 return 0;
16574}
16575_ACEOF
81ecdfbb 16576if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16577 gdb_cv_thread_db_h_has_td_version=yes
16578else
81ecdfbb 16579 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
16580
16581fi
81ecdfbb 16582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16583
16584fi
81ecdfbb
RW
16585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16586$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
5593a99a
SM
16587
16588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
81ecdfbb 16589$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 16590if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 16591 $as_echo_n "(cached) " >&6
59f80f10 16592else
81ecdfbb 16593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16594/* end confdefs.h. */
16595#include <thread_db.h>
16596int
16597main ()
16598{
16599int i = TD_NOTLS;
5593a99a 16600
59f80f10
DJ
16601 ;
16602 return 0;
16603}
16604_ACEOF
81ecdfbb 16605if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16606 gdb_cv_thread_db_h_has_td_notls=yes
16607else
81ecdfbb 16608 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
16609
16610fi
81ecdfbb 16611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16612
16613fi
81ecdfbb
RW
16614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16615$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
16616fi
16617if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 16618
81ecdfbb 16619$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 16620
59f80f10
DJ
16621fi
16622if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16623
81ecdfbb 16624$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
16625
16626fi
16627if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16628
81ecdfbb 16629$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 16630
3f47be5c
EZ
16631fi
16632
e655c1a2
PA
16633case $host_os in
16634 go32* | *djgpp*)
16635 gdbinit=gdb.ini
16636 ;;
16637 *)
16638 gdbinit=.gdbinit
16639 ;;
16640esac
16641
16642cat >>confdefs.h <<_ACEOF
16643#define GDBINIT "$gdbinit"
16644_ACEOF
16645
16646
fb40c209 16647
92e4e97a
AB
16648cat >>confdefs.h <<_ACEOF
16649#define GDBEARLYINIT ".gdbearlyinit"
16650_ACEOF
16651
16652
16653
f83d8a90
DE
16654# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16655# except that the argument to --with-sysroot is optional.
16656# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16657if test "x$with_sysroot" = xyes; then
16658 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16659fi
bec39cab 16660
81ecdfbb
RW
16661# Check whether --with-sysroot was given.
16662if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
16663 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16664else
16665 TARGET_SYSTEM_ROOT=
16666fi
030292b7 16667
030292b7 16668
f83d8a90
DE
16669 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16670 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16671 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16672 ac_define_dir=`eval echo $ac_define_dir`
030292b7 16673
f83d8a90
DE
16674cat >>confdefs.h <<_ACEOF
16675#define TARGET_SYSTEM_ROOT "$ac_define_dir"
16676_ACEOF
bec39cab 16677
030292b7 16678
b14b1491 16679
f83d8a90
DE
16680
16681 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16682 if test "x$prefix" = xNONE; then
16683 test_prefix=/usr/local
16684 else
16685 test_prefix=$prefix
16686 fi
16687 else
16688 test_prefix=$exec_prefix
16689 fi
16690 value=0
16691 case ${ac_define_dir} in
16692 "${test_prefix}"|"${test_prefix}/"*|\
16693 '${exec_prefix}'|'${exec_prefix}/'*)
16694 value=1
16695 ;;
16696 esac
16697
16698cat >>confdefs.h <<_ACEOF
16699#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16700_ACEOF
030292b7
DJ
16701
16702
16703
16e7150e 16704
16e7150e 16705
81ecdfbb
RW
16706# Check whether --with-system-gdbinit was given.
16707if test "${with_system_gdbinit+set}" = set; then :
16708 withval=$with_system_gdbinit;
b14b1491
TT
16709 SYSTEM_GDBINIT=$withval
16710else
16711 SYSTEM_GDBINIT=
81ecdfbb
RW
16712fi
16713
16e7150e
JG
16714
16715 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16716 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 16717 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
16718 ac_define_dir=`eval echo $ac_define_dir`
16719
16720cat >>confdefs.h <<_ACEOF
16721#define SYSTEM_GDBINIT "$ac_define_dir"
16722_ACEOF
16723
16724
16725
0c4a4063 16726
b14b1491
TT
16727 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16728 if test "x$prefix" = xNONE; then
16729 test_prefix=/usr/local
16730 else
16731 test_prefix=$prefix
16732 fi
16733 else
16734 test_prefix=$exec_prefix
16735 fi
16736 value=0
16737 case ${ac_define_dir} in
16738 "${test_prefix}"|"${test_prefix}/"*|\
16739 '${exec_prefix}'|'${exec_prefix}/'*)
16740 value=1
16741 ;;
16742 esac
16e7150e 16743
b14b1491
TT
16744cat >>confdefs.h <<_ACEOF
16745#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
16746_ACEOF
16747
b14b1491 16748
16e7150e 16749
0c4a4063 16750
b835bb52 16751
ed2a2229
CB
16752# Check whether --with-system-gdbinit-dir was given.
16753if test "${with_system_gdbinit_dir+set}" = set; then :
16754 withval=$with_system_gdbinit_dir;
16755 SYSTEM_GDBINIT_DIR=$withval
16756else
16757 SYSTEM_GDBINIT_DIR=
16758fi
16759
16760
16761 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16762 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16763 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16764 ac_define_dir=`eval echo $ac_define_dir`
16765
16766cat >>confdefs.h <<_ACEOF
16767#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16768_ACEOF
16769
16770
16771
16772
16773 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16774 if test "x$prefix" = xNONE; then
16775 test_prefix=/usr/local
16776 else
16777 test_prefix=$prefix
16778 fi
16779 else
16780 test_prefix=$exec_prefix
16781 fi
16782 value=0
16783 case ${ac_define_dir} in
16784 "${test_prefix}"|"${test_prefix}/"*|\
16785 '${exec_prefix}'|'${exec_prefix}/'*)
16786 value=1
16787 ;;
16788 esac
16789
16790cat >>confdefs.h <<_ACEOF
16791#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16792_ACEOF
16793
16794
16795
16796
16797
81ecdfbb
RW
16798# Check whether --enable-werror was given.
16799if test "${enable_werror+set}" = set; then :
16800 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
16801 yes | y) ERROR_ON_WARNING="yes" ;;
16802 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 16803 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 16804 esac
81ecdfbb
RW
16805fi
16806
094a342e 16807
9a084706
PA
16808# Enable -Werror by default when using gcc. Turn it off for releases.
16809if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
16810 ERROR_ON_WARNING=yes
16811fi
16812
16813WERROR_CFLAGS=""
16814if test "${ERROR_ON_WARNING}" = yes ; then
16815 WERROR_CFLAGS="-Werror"
16816fi
16817
cf6de44d 16818# The options we'll try to enable.
aac331e4 16819build_warnings="-Wall -Wpointer-arith \
a0de763e 16820-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 16821-Wno-switch -Wno-char-subscripts \
cf6de44d 16822-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 16823-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 16824-Wno-mismatched-tags \
632e107b 16825-Wno-error=deprecated-register \
85e26832 16826-Wsuggest-override \
1a34f210 16827-Wimplicit-fallthrough=3 \
96643e35 16828-Wduplicated-cond \
33a6bc35
TT
16829-Wshadow=local \
16830-Wdeprecated-copy \
16831-Wdeprecated-copy-dtor \
bb564c58 16832-Wredundant-move \
8ddd8e0e 16833-Wmissing-declarations \
a0761e34 16834-Wmissing-prototypes \
898e7f60
SM
16835-Wstrict-null-sentinel \
16836"
3bc3d82a 16837
3526781e 16838case "${host}" in
4fa7574e
RO
16839 *-*-mingw32*)
16840 # Enable -Wno-format by default when using gcc on mingw since many
16841 # GCC versions complain about %I64.
16842 build_warnings="$build_warnings -Wno-format" ;;
16843 *-*-solaris*)
16844 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16845 # doesn't understand.
16846 build_warnings="$build_warnings -Wno-unknown-pragmas"
16847 # Solaris 11 <unistd.h> marks vfork deprecated.
16848 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
16849 *)
16850 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16851 # but there's a special case for this below.
16852 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
16853esac
16854
81ecdfbb
RW
16855# Check whether --enable-build-warnings was given.
16856if test "${enable_build_warnings+set}" = set; then :
16857 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
16858 yes) ;;
16859 no) build_warnings="-w";;
16860 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16861 build_warnings="${build_warnings} ${t}";;
16862 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16863 build_warnings="${t} ${build_warnings}";;
16864 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16865esac
d4f3574e 16866if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 16867 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 16868fi
81ecdfbb
RW
16869fi
16870# Check whether --enable-gdb-build-warnings was given.
16871if test "${enable_gdb_build_warnings+set}" = set; then :
16872 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
16873 yes) ;;
16874 no) build_warnings="-w";;
16875 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16876 build_warnings="${build_warnings} ${t}";;
16877 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16878 build_warnings="${t} ${build_warnings}";;
16879 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16880esac
16881if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16882 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16883fi
81ecdfbb 16884fi
3bc3d82a
PA
16885
16886# The set of warnings supported by a C++ compiler is not the same as
16887# of the C compiler.
cf6de44d 16888ac_ext=cpp
3bc3d82a
PA
16889ac_cpp='$CXXCPP $CPPFLAGS'
16890ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16891ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16892ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16893
3bc3d82a 16894
81ecdfbb 16895WARN_CFLAGS=""
c906108c
SS
16896if test "x${build_warnings}" != x -a "x$GCC" = xyes
16897then
81ecdfbb
RW
16898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16899$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
16900 # Separate out the -Werror flag as some files just cannot be
16901 # compiled with it enabled.
16902 for w in ${build_warnings}; do
7544db95
PA
16903 # GCC does not complain about -Wno-unknown-warning. Invert
16904 # and test -Wunknown-warning instead.
16905 case $w in
16906 -Wno-*)
16907 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
16908 -Wformat-nonliteral)
16909 # gcc requires -Wformat before -Wformat-nonliteral
16910 # will work, so stick them together.
16911 w="-Wformat $w"
16912 wtest="$w"
16913 ;;
7544db95
PA
16914 *)
16915 wtest=$w ;;
16916 esac
16917
746a987d
AC
16918 case $w in
16919 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
16920 *)
16921 # Check whether GCC accepts it.
4536bbc6 16922 saved_CFLAGS="$CFLAGS"
3e019bdc 16923 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 16924 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 16925 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
16926 if test "x$w" = "x-Wunused-variable"; then
16927 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16928 # fixed in GCC 4.9. This test is derived from the gdb
16929 # source code that triggered this bug in GCC.
16930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16931/* end confdefs.h. */
16932struct scoped_restore_base {};
864ca435
SM
16933 struct scoped_restore_tmpl : public scoped_restore_base {
16934 ~scoped_restore_tmpl() {}
16935 };
a0de763e
TT
16936int
16937main ()
16938{
16939const scoped_restore_base &b = scoped_restore_tmpl();
864ca435 16940
a0de763e
TT
16941 ;
16942 return 0;
16943}
16944_ACEOF
16945if ac_fn_cxx_try_compile "$LINENO"; then :
16946 WARN_CFLAGS="${WARN_CFLAGS} $w"
16947fi
16948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16949 else
16950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16951/* end confdefs.h. */
4536bbc6 16952
bec39cab
AC
16953int
16954main ()
16955{
4536bbc6 16956
bec39cab
AC
16957 ;
16958 return 0;
16959}
16960_ACEOF
3bc3d82a 16961if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 16962 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 16963fi
81ecdfbb 16964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 16965 fi
4536bbc6 16966 CFLAGS="$saved_CFLAGS"
3bc3d82a 16967 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
16968 esac
16969 done
81ecdfbb
RW
16970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16971$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
16972fi
16973
16974
104c1213 16975
cf6de44d 16976ac_ext=c
3bc3d82a
PA
16977ac_cpp='$CPP $CPPFLAGS'
16978ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16979ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16980ac_compiler_gnu=$ac_cv_c_compiler_gnu
16981
3bc3d82a 16982
b835bb52 16983
f35d5ade
TT
16984# Check whether --enable-ubsan was given.
16985if test "${enable_ubsan+set}" = set; then :
16986 enableval=$enable_ubsan;
16987else
eff98030 16988 enable_ubsan=no
f35d5ade
TT
16989fi
16990
16991if test "x$enable_ubsan" = xauto; then
16992 if $development; then
16993 enable_ubsan=yes
16994 fi
16995fi
16996ac_ext=cpp
16997ac_cpp='$CXXCPP $CPPFLAGS'
16998ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16999ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17000ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17001
17002if test "x$enable_ubsan" = xyes; then
17003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
17004$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
17005 saved_CXXFLAGS="$CXXFLAGS"
17006 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17008/* end confdefs.h. */
17009
17010int
17011main ()
17012{
17013
17014 ;
17015 return 0;
17016}
17017_ACEOF
17018if ac_fn_cxx_try_link "$LINENO"; then :
17019 enable_ubsan=yes
17020else
17021 enable_ubsan=no
ad6dba1c 17022
f35d5ade
TT
17023fi
17024rm -f core conftest.err conftest.$ac_objext \
17025 conftest$ac_exeext conftest.$ac_ext
17026 CXXFLAGS="$saved_CXXFLAGS"
17027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
17028$as_echo "$enable_ubsan" >&6; }
17029 if test "x$enable_ubsan" = xyes; then
17030 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17031 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
17032 fi
17033fi
17034ac_ext=c
17035ac_cpp='$CPP $CPPFLAGS'
17036ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17037ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17038ac_compiler_gnu=$ac_cv_c_compiler_gnu
17039
17040
17041
7a292a7a 17042# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
17043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
17044$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 17045if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 17046 $as_echo_n "(cached) " >&6
bec39cab 17047else
81ecdfbb 17048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17049/* end confdefs.h. */
7a292a7a
SS
17050
17051#if defined (__CYGWIN__) || defined (__CYGWIN32__)
17052lose
17053#endif
bec39cab 17054_ACEOF
7a292a7a 17055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 17056 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
17057 gdb_cv_os_cygwin=yes
17058else
7a292a7a
SS
17059 gdb_cv_os_cygwin=no
17060fi
17061rm -f conftest*
17062
17063fi
81ecdfbb
RW
17064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
17065$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 17066
aff38e61 17067
3eb25fda 17068SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 17069case ${host} in
95cbc983
AC
17070 *go32* ) SER_HARDWIRE=ser-go32.o ;;
17071 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 17072 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 17073 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
17074esac
17075
17076
cd0fc7c3
SS
17077# libreadline needs libuser32.a in a cygwin environment
17078WIN32LIBS=
0ad6b8ee 17079if test x"$gdb_cv_os_cygwin" = xyes; then
c5394b80
JM
17080 WIN32LIBS="-luser32"
17081 case "${target}" in
17082 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
17083 ;;
17084 esac
cd0fc7c3 17085fi
c906108c 17086
b4505029 17087# The ser-tcp.c module requires sockets.
b2ceabe8
TT
17088# Note that WIN32APILIBS is set by GDB_AC_COMMON.
17089WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
7a292a7a 17090
31d99776 17091# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
17092
17093 OLD_CFLAGS=$CFLAGS
17094 OLD_LDFLAGS=$LDFLAGS
17095 OLD_LIBS=$LIBS
17096 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17097 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17098 # always want our bfd.
17099 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
17100 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17101 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 17102 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 17103 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 17104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 17105$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 17106if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 17107 $as_echo_n "(cached) " >&6
31d99776 17108else
81ecdfbb 17109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
17110/* end confdefs.h. */
17111#include <stdlib.h>
b4132322 17112 #include <string.h>
294f2697
SM
17113 #include "bfd.h"
17114 #include "elf-bfd.h"
31d99776
DJ
17115int
17116main ()
17117{
def63ff0 17118return bfd_get_elf_phdr_upper_bound (NULL);
294f2697 17119
31d99776
DJ
17120 ;
17121 return 0;
17122}
17123_ACEOF
81ecdfbb 17124if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
17125 gdb_cv_var_elf=yes
17126else
81ecdfbb 17127 gdb_cv_var_elf=no
294f2697 17128
31d99776 17129fi
81ecdfbb
RW
17130rm -f core conftest.err conftest.$ac_objext \
17131 conftest$ac_exeext conftest.$ac_ext
294f2697 17132
31d99776 17133fi
81ecdfbb
RW
17134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
17135$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
17136 CFLAGS=$OLD_CFLAGS
17137 LDFLAGS=$OLD_LDFLAGS
17138 LIBS=$OLD_LIBS
0ad6b8ee 17139if test "$gdb_cv_var_elf" = yes; then
fb8f3fc0
AB
17140 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \
17141 gcore-elf.o elf-none-tdep.o"
31d99776 17142
81ecdfbb 17143$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 17144
075ff26d
JK
17145 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
17146 if test "$plugins" = "yes"; then
a48b32c0
L
17147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17148$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 17149if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
17150 $as_echo_n "(cached) " >&6
17151else
17152 ac_func_search_save_LIBS=$LIBS
17153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17154/* end confdefs.h. */
17155
17156/* Override any GCC internal prototype to avoid an error.
17157 Use char because int might match the return type of a GCC
17158 builtin and then its argument prototype would still apply. */
17159#ifdef __cplusplus
17160extern "C"
17161#endif
17162char dlopen ();
17163int
17164main ()
17165{
17166return dlopen ();
17167 ;
17168 return 0;
17169}
17170_ACEOF
17171for ac_lib in '' dl; do
17172 if test -z "$ac_lib"; then
17173 ac_res="none required"
17174 else
17175 ac_res=-l$ac_lib
17176 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17177 fi
17178 if ac_fn_c_try_link "$LINENO"; then :
17179 ac_cv_search_dlopen=$ac_res
17180fi
17181rm -f core conftest.err conftest.$ac_objext \
17182 conftest$ac_exeext
d0ac1c44 17183 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
17184 break
17185fi
17186done
d0ac1c44 17187if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
17188
17189else
17190 ac_cv_search_dlopen=no
17191fi
17192rm conftest.$ac_ext
17193LIBS=$ac_func_search_save_LIBS
17194fi
17195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17196$as_echo "$ac_cv_search_dlopen" >&6; }
17197ac_res=$ac_cv_search_dlopen
17198if test "$ac_res" != no; then :
17199 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17200
17201fi
17202
075ff26d 17203 fi
31d99776 17204fi
31d99776 17205
4f05add4
TT
17206# Add macho support to GDB, but only if BFD includes it.
17207
17208 OLD_CFLAGS=$CFLAGS
17209 OLD_LDFLAGS=$LDFLAGS
17210 OLD_LIBS=$LIBS
17211 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17212 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17213 # always want our bfd.
17214 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
17215 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17216 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 17217 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 17218 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
17219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
17220$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 17221if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
17222 $as_echo_n "(cached) " >&6
17223else
17224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17225/* end confdefs.h. */
17226#include <stdlib.h>
b4132322 17227 #include <string.h>
294f2697
SM
17228 #include "bfd.h"
17229 #include "mach-o.h"
4f05add4
TT
17230int
17231main ()
17232{
17233return bfd_mach_o_lookup_command (NULL, 0, NULL);
294f2697 17234
4f05add4
TT
17235 ;
17236 return 0;
17237}
17238_ACEOF
17239if ac_fn_c_try_link "$LINENO"; then :
17240 gdb_cv_var_macho=yes
17241else
17242 gdb_cv_var_macho=no
294f2697 17243
4f05add4
TT
17244fi
17245rm -f core conftest.err conftest.$ac_objext \
17246 conftest$ac_exeext conftest.$ac_ext
294f2697 17247
4f05add4
TT
17248fi
17249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
17250$as_echo "$gdb_cv_var_macho" >&6; }
17251 CFLAGS=$OLD_CFLAGS
17252 LDFLAGS=$OLD_LDFLAGS
17253 LIBS=$OLD_LIBS
0ad6b8ee 17254if test "$gdb_cv_var_macho" = yes; then
4f05add4
TT
17255 CONFIG_OBS="$CONFIG_OBS machoread.o"
17256fi
17257
121ce6e5
DJ
17258# Add any host-specific objects to GDB.
17259CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
17260
608e2dbb 17261# If building on ELF, look for lzma support for embedded compressed debug info.
0ad6b8ee 17262if test "$gdb_cv_var_elf" = yes; then
608e2dbb
TT
17263
17264# Check whether --with-lzma was given.
17265if test "${with_lzma+set}" = set; then :
17266 withval=$with_lzma;
17267else
17268 with_lzma=auto
17269fi
17270
17271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
17272$as_echo_n "checking whether to use lzma... " >&6; }
17273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
17274$as_echo "$with_lzma" >&6; }
17275
17276 if test "${with_lzma}" != no; then
17277
17278
17279
17280
17281
17282
17283
17284
17285 use_additional=yes
17286
17287 acl_save_prefix="$prefix"
17288 prefix="$acl_final_prefix"
17289 acl_save_exec_prefix="$exec_prefix"
17290 exec_prefix="$acl_final_exec_prefix"
17291
17292 eval additional_includedir=\"$includedir\"
17293 eval additional_libdir=\"$libdir\"
17294
17295 exec_prefix="$acl_save_exec_prefix"
17296 prefix="$acl_save_prefix"
17297
17298
17299# Check whether --with-liblzma-prefix was given.
17300if test "${with_liblzma_prefix+set}" = set; then :
17301 withval=$with_liblzma_prefix;
17302 if test "X$withval" = "Xno"; then
17303 use_additional=no
17304 else
17305 if test "X$withval" = "X"; then
17306
17307 acl_save_prefix="$prefix"
17308 prefix="$acl_final_prefix"
17309 acl_save_exec_prefix="$exec_prefix"
17310 exec_prefix="$acl_final_exec_prefix"
17311
17312 eval additional_includedir=\"$includedir\"
17313 eval additional_libdir=\"$libdir\"
17314
17315 exec_prefix="$acl_save_exec_prefix"
17316 prefix="$acl_save_prefix"
17317
17318 else
17319 additional_includedir="$withval/include"
17320 additional_libdir="$withval/lib"
17321 fi
17322 fi
17323
17324fi
17325
9f1528a1
AB
17326
17327# Check whether --with-liblzma-type was given.
17328if test "${with_liblzma_type+set}" = set; then :
17329 withval=$with_liblzma_type; with_liblzma_type=$withval
17330else
17331 with_liblzma_type=auto
17332fi
17333
17334 lib_type=`eval echo \$with_liblzma_type`
17335
608e2dbb
TT
17336 LIBLZMA=
17337 LTLIBLZMA=
17338 INCLZMA=
17339 rpathdirs=
17340 ltrpathdirs=
17341 names_already_handled=
17342 names_next_round='lzma '
17343 while test -n "$names_next_round"; do
17344 names_this_round="$names_next_round"
17345 names_next_round=
17346 for name in $names_this_round; do
17347 already_handled=
17348 for n in $names_already_handled; do
17349 if test "$n" = "$name"; then
17350 already_handled=yes
17351 break
17352 fi
17353 done
17354 if test -z "$already_handled"; then
17355 names_already_handled="$names_already_handled $name"
17356 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17357 eval value=\"\$HAVE_LIB$uppername\"
17358 if test -n "$value"; then
17359 if test "$value" = yes; then
17360 eval value=\"\$LIB$uppername\"
17361 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
17362 eval value=\"\$LTLIB$uppername\"
17363 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
17364 else
17365 :
17366 fi
17367 else
17368 found_dir=
17369 found_la=
17370 found_so=
17371 found_a=
17372 if test $use_additional = yes; then
9f1528a1 17373 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
17374 found_dir="$additional_libdir"
17375 found_so="$additional_libdir/lib$name.$shlibext"
17376 if test -f "$additional_libdir/lib$name.la"; then
17377 found_la="$additional_libdir/lib$name.la"
17378 fi
9f1528a1 17379 elif test x$lib_type != xshared; then
608e2dbb
TT
17380 if test -f "$additional_libdir/lib$name.$libext"; then
17381 found_dir="$additional_libdir"
17382 found_a="$additional_libdir/lib$name.$libext"
17383 if test -f "$additional_libdir/lib$name.la"; then
17384 found_la="$additional_libdir/lib$name.la"
17385 fi
17386 fi
17387 fi
17388 fi
17389 if test "X$found_dir" = "X"; then
17390 for x in $LDFLAGS $LTLIBLZMA; do
17391
17392 acl_save_prefix="$prefix"
17393 prefix="$acl_final_prefix"
17394 acl_save_exec_prefix="$exec_prefix"
17395 exec_prefix="$acl_final_exec_prefix"
17396 eval x=\"$x\"
17397 exec_prefix="$acl_save_exec_prefix"
17398 prefix="$acl_save_prefix"
17399
17400 case "$x" in
17401 -L*)
17402 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 17403 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
17404 found_dir="$dir"
17405 found_so="$dir/lib$name.$shlibext"
17406 if test -f "$dir/lib$name.la"; then
17407 found_la="$dir/lib$name.la"
17408 fi
9f1528a1 17409 elif test x$lib_type != xshared; then
608e2dbb
TT
17410 if test -f "$dir/lib$name.$libext"; then
17411 found_dir="$dir"
17412 found_a="$dir/lib$name.$libext"
17413 if test -f "$dir/lib$name.la"; then
17414 found_la="$dir/lib$name.la"
17415 fi
17416 fi
17417 fi
17418 ;;
17419 esac
17420 if test "X$found_dir" != "X"; then
17421 break
17422 fi
17423 done
17424 fi
17425 if test "X$found_dir" != "X"; then
17426 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17427 if test "X$found_so" != "X"; then
17428 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17429 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17430 else
17431 haveit=
17432 for x in $ltrpathdirs; do
17433 if test "X$x" = "X$found_dir"; then
17434 haveit=yes
17435 break
17436 fi
17437 done
17438 if test -z "$haveit"; then
17439 ltrpathdirs="$ltrpathdirs $found_dir"
17440 fi
17441 if test "$hardcode_direct" = yes; then
17442 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17443 else
17444 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17445 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17446 haveit=
17447 for x in $rpathdirs; do
17448 if test "X$x" = "X$found_dir"; then
17449 haveit=yes
17450 break
17451 fi
17452 done
17453 if test -z "$haveit"; then
17454 rpathdirs="$rpathdirs $found_dir"
17455 fi
17456 else
17457 haveit=
17458 for x in $LDFLAGS $LIBLZMA; do
17459
17460 acl_save_prefix="$prefix"
17461 prefix="$acl_final_prefix"
17462 acl_save_exec_prefix="$exec_prefix"
17463 exec_prefix="$acl_final_exec_prefix"
17464 eval x=\"$x\"
17465 exec_prefix="$acl_save_exec_prefix"
17466 prefix="$acl_save_prefix"
17467
17468 if test "X$x" = "X-L$found_dir"; then
17469 haveit=yes
17470 break
17471 fi
17472 done
17473 if test -z "$haveit"; then
17474 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17475 fi
17476 if test "$hardcode_minus_L" != no; then
17477 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17478 else
17479 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17480 fi
17481 fi
17482 fi
17483 fi
17484 else
17485 if test "X$found_a" != "X"; then
17486 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17487 else
17488 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17489 fi
17490 fi
17491 additional_includedir=
17492 case "$found_dir" in
17493 */lib | */lib/)
17494 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17495 additional_includedir="$basedir/include"
17496 ;;
17497 esac
17498 if test "X$additional_includedir" != "X"; then
17499 if test "X$additional_includedir" != "X/usr/include"; then
17500 haveit=
17501 if test "X$additional_includedir" = "X/usr/local/include"; then
17502 if test -n "$GCC"; then
17503 case $host_os in
17504 linux*) haveit=yes;;
17505 esac
17506 fi
17507 fi
17508 if test -z "$haveit"; then
17509 for x in $CPPFLAGS $INCLZMA; do
17510
17511 acl_save_prefix="$prefix"
17512 prefix="$acl_final_prefix"
17513 acl_save_exec_prefix="$exec_prefix"
17514 exec_prefix="$acl_final_exec_prefix"
17515 eval x=\"$x\"
17516 exec_prefix="$acl_save_exec_prefix"
17517 prefix="$acl_save_prefix"
17518
17519 if test "X$x" = "X-I$additional_includedir"; then
17520 haveit=yes
17521 break
17522 fi
17523 done
17524 if test -z "$haveit"; then
17525 if test -d "$additional_includedir"; then
17526 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17527 fi
17528 fi
17529 fi
17530 fi
17531 fi
17532 if test -n "$found_la"; then
17533 save_libdir="$libdir"
17534 case "$found_la" in
17535 */* | *\\*) . "$found_la" ;;
17536 *) . "./$found_la" ;;
17537 esac
17538 libdir="$save_libdir"
17539 for dep in $dependency_libs; do
17540 case "$dep" in
17541 -L*)
17542 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17543 if test "X$additional_libdir" != "X/usr/lib"; then
17544 haveit=
17545 if test "X$additional_libdir" = "X/usr/local/lib"; then
17546 if test -n "$GCC"; then
17547 case $host_os in
17548 linux*) haveit=yes;;
17549 esac
17550 fi
17551 fi
17552 if test -z "$haveit"; then
17553 haveit=
17554 for x in $LDFLAGS $LIBLZMA; do
17555
17556 acl_save_prefix="$prefix"
17557 prefix="$acl_final_prefix"
17558 acl_save_exec_prefix="$exec_prefix"
17559 exec_prefix="$acl_final_exec_prefix"
17560 eval x=\"$x\"
17561 exec_prefix="$acl_save_exec_prefix"
17562 prefix="$acl_save_prefix"
17563
17564 if test "X$x" = "X-L$additional_libdir"; then
17565 haveit=yes
17566 break
17567 fi
17568 done
17569 if test -z "$haveit"; then
17570 if test -d "$additional_libdir"; then
17571 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17572 fi
17573 fi
17574 haveit=
17575 for x in $LDFLAGS $LTLIBLZMA; do
17576
17577 acl_save_prefix="$prefix"
17578 prefix="$acl_final_prefix"
17579 acl_save_exec_prefix="$exec_prefix"
17580 exec_prefix="$acl_final_exec_prefix"
17581 eval x=\"$x\"
17582 exec_prefix="$acl_save_exec_prefix"
17583 prefix="$acl_save_prefix"
17584
17585 if test "X$x" = "X-L$additional_libdir"; then
17586 haveit=yes
17587 break
17588 fi
17589 done
17590 if test -z "$haveit"; then
17591 if test -d "$additional_libdir"; then
17592 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17593 fi
17594 fi
17595 fi
17596 fi
17597 ;;
17598 -R*)
17599 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17600 if test "$enable_rpath" != no; then
17601 haveit=
17602 for x in $rpathdirs; do
17603 if test "X$x" = "X$dir"; then
17604 haveit=yes
17605 break
17606 fi
17607 done
17608 if test -z "$haveit"; then
17609 rpathdirs="$rpathdirs $dir"
17610 fi
17611 haveit=
17612 for x in $ltrpathdirs; do
17613 if test "X$x" = "X$dir"; then
17614 haveit=yes
17615 break
17616 fi
17617 done
17618 if test -z "$haveit"; then
17619 ltrpathdirs="$ltrpathdirs $dir"
17620 fi
17621 fi
17622 ;;
17623 -l*)
17624 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17625 ;;
17626 *.la)
17627 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17628 ;;
17629 *)
17630 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17631 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17632 ;;
17633 esac
17634 done
17635 fi
17636 else
9f1528a1
AB
17637 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17638 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17639 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17640 else
17641 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17642 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17643 fi
608e2dbb
TT
17644 fi
17645 fi
17646 fi
17647 done
17648 done
17649 if test "X$rpathdirs" != "X"; then
17650 if test -n "$hardcode_libdir_separator"; then
17651 alldirs=
17652 for found_dir in $rpathdirs; do
17653 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17654 done
17655 acl_save_libdir="$libdir"
17656 libdir="$alldirs"
17657 eval flag=\"$hardcode_libdir_flag_spec\"
17658 libdir="$acl_save_libdir"
17659 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17660 else
17661 for found_dir in $rpathdirs; do
17662 acl_save_libdir="$libdir"
17663 libdir="$found_dir"
17664 eval flag=\"$hardcode_libdir_flag_spec\"
17665 libdir="$acl_save_libdir"
17666 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17667 done
17668 fi
17669 fi
17670 if test "X$ltrpathdirs" != "X"; then
17671 for found_dir in $ltrpathdirs; do
17672 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17673 done
17674 fi
17675
17676
17677 ac_save_CPPFLAGS="$CPPFLAGS"
17678
17679 for element in $INCLZMA; do
17680 haveit=
17681 for x in $CPPFLAGS; do
17682
17683 acl_save_prefix="$prefix"
17684 prefix="$acl_final_prefix"
17685 acl_save_exec_prefix="$exec_prefix"
17686 exec_prefix="$acl_final_exec_prefix"
17687 eval x=\"$x\"
17688 exec_prefix="$acl_save_exec_prefix"
17689 prefix="$acl_save_prefix"
17690
17691 if test "X$x" = "X$element"; then
17692 haveit=yes
17693 break
17694 fi
17695 done
17696 if test -z "$haveit"; then
17697 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17698 fi
17699 done
17700
17701
17702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17703$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 17704if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
17705 $as_echo_n "(cached) " >&6
17706else
17707
17708 ac_save_LIBS="$LIBS"
17709 LIBS="$LIBS $LIBLZMA"
17710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17711/* end confdefs.h. */
17712#include "lzma.h"
17713int
17714main ()
17715{
17716lzma_index_iter iter;
17717 lzma_index_iter_init (&iter, 0);
17718 lzma_mf_is_supported (LZMA_MF_HC3);
17719 ;
17720 return 0;
17721}
17722_ACEOF
17723if ac_fn_c_try_link "$LINENO"; then :
17724 ac_cv_liblzma=yes
17725else
17726 ac_cv_liblzma=no
17727fi
17728rm -f core conftest.err conftest.$ac_objext \
17729 conftest$ac_exeext conftest.$ac_ext
17730 LIBS="$ac_save_LIBS"
17731
17732fi
17733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17734$as_echo "$ac_cv_liblzma" >&6; }
17735 if test "$ac_cv_liblzma" = yes; then
17736 HAVE_LIBLZMA=yes
17737
17738$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17739
17740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17741$as_echo_n "checking how to link with liblzma... " >&6; }
17742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17743$as_echo "$LIBLZMA" >&6; }
17744 else
17745 HAVE_LIBLZMA=no
17746 CPPFLAGS="$ac_save_CPPFLAGS"
17747 LIBLZMA=
17748 LTLIBLZMA=
17749 fi
17750
17751
17752
17753
17754
17755
17756 if test "$HAVE_LIBLZMA" != yes; then
17757 if test "$with_lzma" = yes; then
d0ac1c44 17758 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
17759 fi
17760 fi
17761 fi
17762fi
17763
3fc11d3e
JM
17764LIBGUI="../libgui/src/libgui.a"
17765GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17766
17767
7a292a7a 17768
3fc11d3e
JM
17769WIN32LDAPP=
17770
17771
17772
d91670b9 17773case "${host}" in
686a5eed 17774*-*-cygwin* | *-*-mingw* )
d91670b9
CV
17775 configdir="win"
17776 ;;
17777*)
17778 configdir="unix"
17779 ;;
17780esac
3fc11d3e
JM
17781
17782GDBTKLIBS=
17783if test "${enable_gdbtk}" = "yes"; then
17784
d1c3b63a
KS
17785 # Gdbtk must have an absolute path to srcdir in order to run
17786 # properly when not installed.
17787 here=`pwd`
17788 cd ${srcdir}
17789 GDBTK_SRC_DIR=`pwd`
17790 cd $here
17791
bec39cab 17792
5062cc19
KS
17793 #
17794 # Ok, lets find the tcl configuration
17795 # First, look for one uninstalled.
17796 # the alternative search directory is invoked by --with-tcl
17797 #
3fc11d3e 17798
5062cc19
KS
17799 if test x"${no_tcl}" = x ; then
17800 # we reset no_tcl in case something fails here
17801 no_tcl=true
bec39cab 17802
81ecdfbb
RW
17803# Check whether --with-tcl was given.
17804if test "${with_tcl+set}" = set; then :
17805 withval=$with_tcl; with_tclconfig=${withval}
17806fi
17807
17808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17809$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 17810 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 17811 $as_echo_n "(cached) " >&6
3fc11d3e 17812else
bec39cab 17813
3fc11d3e 17814
5062cc19
KS
17815 # First check to see if --with-tcl was specified.
17816 case "${host}" in
17817 *-*-cygwin*) platDir="win" ;;
17818 *) platDir="unix" ;;
17819 esac
17820 if test x"${with_tclconfig}" != x ; then
17821 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17822 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17823 else
d0ac1c44 17824 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
17825 fi
17826 fi
17827
17828 # then check for a private Tcl installation
17829 if test x"${ac_cv_c_tclconfig}" = x ; then
17830 for i in \
17831 ../tcl \
17832 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17833 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17834 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17835 ../../tcl \
17836 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17837 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17838 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17839 ../../../tcl \
17840 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17841 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17842 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17843 if test -f "$i/$platDir/tclConfig.sh" ; then
17844 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17845 break
17846 fi
17847 done
17848 fi
17849
17850 # on Darwin, check in Framework installation locations
17851 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17852 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17853 `ls -d /Library/Frameworks 2>/dev/null` \
17854 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17855 `ls -d /System/Library/Frameworks 2>/dev/null` \
17856 ; do
17857 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17858 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17859 break
17860 fi
17861 done
17862 fi
17863
17864 # check in a few common install locations
17865 if test x"${ac_cv_c_tclconfig}" = x ; then
17866 for i in `ls -d ${libdir} 2>/dev/null` \
17867 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17868 `ls -d ${prefix}/lib 2>/dev/null` \
17869 `ls -d /usr/local/lib 2>/dev/null` \
17870 `ls -d /usr/contrib/lib 2>/dev/null` \
17871 `ls -d /usr/lib 2>/dev/null` \
17872 ; do
17873 if test -f "$i/tclConfig.sh" ; then
17874 ac_cv_c_tclconfig=`(cd $i; pwd)`
17875 break
17876 fi
17877 done
17878 fi
3fc11d3e 17879
5062cc19
KS
17880 # check in a few other private locations
17881 if test x"${ac_cv_c_tclconfig}" = x ; then
17882 for i in \
17883 ${srcdir}/../tcl \
17884 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17885 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17886 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17887 if test -f "$i/$platDir/tclConfig.sh" ; then
17888 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17889 break
17890 fi
17891 done
17892 fi
bec39cab 17893
3fc11d3e
JM
17894fi
17895
5062cc19
KS
17896
17897 if test x"${ac_cv_c_tclconfig}" = x ; then
17898 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
17899 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17900$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
17901 else
17902 no_tcl=
17903 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
17904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17905$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
17906 fi
17907 fi
3fc11d3e 17908
bec39cab 17909
85541719
DE
17910 # If $no_tk is nonempty, then we can't do Tk, and there is no
17911 # point to doing Tcl.
bec39cab 17912
5062cc19
KS
17913 #
17914 # Ok, lets find the tk configuration
17915 # First, look for one uninstalled.
17916 # the alternative search directory is invoked by --with-tk
17917 #
3fc11d3e 17918
5062cc19
KS
17919 if test x"${no_tk}" = x ; then
17920 # we reset no_tk in case something fails here
17921 no_tk=true
bec39cab 17922
81ecdfbb
RW
17923# Check whether --with-tk was given.
17924if test "${with_tk+set}" = set; then :
17925 withval=$with_tk; with_tkconfig=${withval}
17926fi
17927
17928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17929$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 17930 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 17931 $as_echo_n "(cached) " >&6
bec39cab 17932else
3fc11d3e
JM
17933
17934
5062cc19
KS
17935 # First check to see if --with-tkconfig was specified.
17936 if test x"${with_tkconfig}" != x ; then
17937 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17938 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17939 else
d0ac1c44 17940 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
17941 fi
17942 fi
3fc11d3e 17943
5062cc19
KS
17944 # then check for a private Tk library
17945 case "${host}" in
17946 *-*-cygwin*) platDir="win" ;;
17947 *) platDir="unix" ;;
17948 esac
17949 if test x"${ac_cv_c_tkconfig}" = x ; then
17950 for i in \
17951 ../tk \
17952 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17953 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17954 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17955 ../../tk \
17956 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17957 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17958 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17959 ../../../tk \
17960 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17961 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17962 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17963 if test -f "$i/$platDir/tkConfig.sh" ; then
17964 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17965 break
17966 fi
17967 done
17968 fi
17969
17970 # on Darwin, check in Framework installation locations
17971 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17972 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17973 `ls -d /Library/Frameworks 2>/dev/null` \
17974 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17975 `ls -d /System/Library/Frameworks 2>/dev/null` \
17976 ; do
17977 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17978 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17979 break
17980 fi
17981 done
17982 fi
17983
17984 # check in a few common install locations
17985 if test x"${ac_cv_c_tkconfig}" = x ; then
17986 for i in `ls -d ${libdir} 2>/dev/null` \
17987 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17988 `ls -d ${prefix}/lib 2>/dev/null` \
17989 `ls -d /usr/local/lib 2>/dev/null` \
17990 `ls -d /usr/contrib/lib 2>/dev/null` \
17991 `ls -d /usr/lib 2>/dev/null` \
17992 ; do
17993 if test -f "$i/tkConfig.sh" ; then
17994 ac_cv_c_tkconfig=`(cd $i; pwd)`
17995 break
17996 fi
17997 done
17998 fi
17999 # check in a few other private locations
18000 if test x"${ac_cv_c_tkconfig}" = x ; then
18001 for i in \
18002 ${srcdir}/../tk \
18003 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18004 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
18005 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
18006 if test -f "$i/$platDir/tkConfig.sh" ; then
18007 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18008 break
18009 fi
18010 done
18011 fi
3fc11d3e 18012
3fc11d3e
JM
18013fi
18014
18015
5062cc19
KS
18016 if test x"${ac_cv_c_tkconfig}" = x ; then
18017 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
18018 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
18019$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
18020 else
18021 no_tk=
18022 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
18023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
18024$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 18025 fi
3fc11d3e 18026 fi
dd2504ab 18027
dd2504ab 18028
85541719
DE
18029 if test -z "${no_tcl}" -a -z "${no_tk}"; then
18030
81ecdfbb
RW
18031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
18032$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
18033
18034 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
18035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18036$as_echo "loading" >&6; }
85541719
DE
18037 . ${TCL_BIN_DIR}/tclConfig.sh
18038 else
81ecdfbb
RW
18039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
18040$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
18041 fi
18042
18043 # eval is required to do the TCL_DBGX substitution
18044 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
18045 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
18046
18047 # If the TCL_BIN_DIR is the build directory (not the install directory),
18048 # then set the common variable name to the value of the build variables.
18049 # For example, the variable TCL_LIB_SPEC will be set to the value
18050 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
18051 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
18052 # installed and uninstalled version of Tcl.
18053 if test -f "${TCL_BIN_DIR}/Makefile" ; then
18054 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
18055 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
18056 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
18057 elif test "`uname -s`" = "Darwin"; then
18058 # If Tcl was built as a framework, attempt to use the libraries
18059 # from the framework at the given location so that linking works
a68ffae9 18060 # against Tcl.framework installed in an arbitrary location.
85541719
DE
18061 case ${TCL_DEFS} in
18062 *TCL_FRAMEWORK*)
18063 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
18064 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
18065 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
18066 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
18067 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
18068 break
18069 fi
18070 done
18071 fi
18072 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
18073 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
18074 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
18075 fi
18076 ;;
18077 esac
18078 fi
18079
18080 # eval is required to do the TCL_DBGX substitution
18081 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
18082 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
18083 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
18084 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100 # Check for in-tree tcl
18101 here=`pwd`
18102 cd ${srcdir}/..
18103 topdir=`pwd`
18104 cd ${here}
18105
18106 intree="no"
18107 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
18108 intree="yes"
18109 fi
18110
18111 # Find Tcl private headers
18112 if test x"${intree}" = xno; then
18113
81ecdfbb
RW
18114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
18115$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
18116 private_dir=""
18117 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
18118 if test -f ${dir}/tclInt.h ; then
18119 private_dir=${dir}
18120 fi
18121
18122 if test x"${private_dir}" = x; then
d0ac1c44 18123 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
18124 else
18125 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
18126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18127$as_echo "${private_dir}" >&6; }
85541719
DE
18128 fi
18129
18130 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
18131 TCL_LIBRARY="${TCL_LIB_SPEC}"
18132 TCL_DEPS=""
18133 else
18134 # If building tcl in the same src tree, private headers
18135 # are not needed, but we need to be sure to use the right
18136 # headers library
18137 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
18138 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
18139 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
18140 fi
18141
18142
18143
18144
18145
81ecdfbb
RW
18146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
18147$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 18148
5062cc19 18149 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
18150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18151$as_echo "loading" >&6; }
5062cc19 18152 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 18153 else
81ecdfbb
RW
18154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
18155$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 18156 fi
bec39cab 18157
5062cc19
KS
18158 # eval is required to do the TK_DBGX substitution
18159 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
18160 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
18161
18162 # If the TK_BIN_DIR is the build directory (not the install directory),
18163 # then set the common variable name to the value of the build variables.
18164 # For example, the variable TK_LIB_SPEC will be set to the value
18165 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
18166 # instead of TK_BUILD_LIB_SPEC since it will work with both an
18167 # installed and uninstalled version of Tcl.
85541719 18168 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
18169 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
18170 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
18171 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
18172 elif test "`uname -s`" = "Darwin"; then
18173 # If Tk was built as a framework, attempt to use the libraries
18174 # from the framework at the given location so that linking works
a68ffae9 18175 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
18176 case ${TK_DEFS} in
18177 *TK_FRAMEWORK*)
85541719 18178 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
18179 for i in "`cd ${TK_BIN_DIR}; pwd`" \
18180 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
18181 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
18182 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
18183 break
18184 fi
18185 done
18186 fi
85541719 18187 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
18188 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
18189 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
18190 fi
18191 ;;
18192 esac
3fc11d3e
JM
18193 fi
18194
5062cc19
KS
18195 # eval is required to do the TK_DBGX substitution
18196 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
18197 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
18198 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
18199 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 18200
3fc11d3e
JM
18201
18202
bec39cab
AC
18203
18204
18205
18206
18207
18208
18209
3fc11d3e 18210
3fc11d3e 18211
bec39cab 18212
bec39cab 18213
85541719
DE
18214 # Check for in-tree Tk
18215 intree="no"
18216 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
18217 intree="yes"
18218 fi
3fc11d3e 18219
85541719
DE
18220 # Find Tk private headers
18221 if test x"${intree}" = xno; then
3fc11d3e 18222
81ecdfbb
RW
18223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
18224$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
18225 private_dir=""
18226 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
18227 if test -f ${dir}/tkInt.h; then
18228 private_dir=${dir}
3fc11d3e 18229 fi
bec39cab 18230
5062cc19 18231 if test x"${private_dir}" = x; then
d0ac1c44 18232 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 18233 else
5062cc19 18234 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
18235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18236$as_echo "${private_dir}" >&6; }
3fc11d3e 18237 fi
3fc11d3e 18238
85541719
DE
18239 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
18240 TK_LIBRARY=${TK_LIB_SPEC}
18241 TK_DEPS=""
18242 else
18243 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
18244 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
18245 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
18246 fi
3fc11d3e
JM
18247
18248
3fc11d3e
JM
18249
18250
3fc11d3e 18251
85541719 18252 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 18253
85541719
DE
18254 # Include some libraries that Tcl and Tk want.
18255 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
18256 # Yes, the ordering seems wrong here. But it isn't.
18257 # TK_LIBS is the list of libraries that need to be linked
18258 # after Tcl/Tk. Note that this isn't put into LIBS. If it
18259 # were in LIBS then any link tests after this point would
18260 # try to include things like `$(LIBGUI)', which wouldn't work.
18261 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 18262
85541719
DE
18263 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
18264 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
18265 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
18266 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
18267 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
18268 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
18269 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 18270
0ad6b8ee 18271 if test x"$gdb_cv_os_cygwin" = xyes; then
85541719
DE
18272 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
18273 WIN32LDAPP="-Wl,--subsystem,console"
18274 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 18275 fi
ffc6a242 18276
81ecdfbb 18277 subdirs="$subdirs gdbtk"
3ace7edb 18278
85541719 18279 fi
3fc11d3e
JM
18280fi
18281
18282
18283
18284
18285
18286
18287
18288
81ecdfbb
RW
18289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
18290$as_echo_n "checking for X... " >&6; }
bec39cab 18291
c906108c 18292
81ecdfbb
RW
18293# Check whether --with-x was given.
18294if test "${with_x+set}" = set; then :
18295 withval=$with_x;
18296fi
c906108c
SS
18297
18298# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
18299if test "x$with_x" = xno; then
18300 # The user explicitly disabled X.
18301 have_x=disabled
18302else
81ecdfbb 18303 case $x_includes,$x_libraries in #(
d0ac1c44
SM
18304 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
18305 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 18306 $as_echo_n "(cached) " >&6
c906108c
SS
18307else
18308 # One or both of the vars are not set, and there is no cached value.
bec39cab 18309ac_x_includes=no ac_x_libraries=no
81ecdfbb 18310rm -f -r conftest.dir
bec39cab
AC
18311if mkdir conftest.dir; then
18312 cd conftest.dir
bec39cab 18313 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
18314incroot:
18315 @echo incroot='${INCROOT}'
18316usrlibdir:
18317 @echo usrlibdir='${USRLIBDIR}'
18318libdir:
18319 @echo libdir='${LIBDIR}'
18320_ACEOF
18321 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 18322 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
18323 for ac_var in incroot usrlibdir libdir; do
18324 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
18325 done
c906108c 18326 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
18327 for ac_extension in a so sl dylib la dll; do
18328 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
18329 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 18330 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
18331 fi
18332 done
18333 # Screen out bogus values from the imake configuration. They are
18334 # bogus both because they are the default anyway, and because
18335 # using them would break gcc on systems where it needs fixed includes.
bec39cab 18336 case $ac_im_incroot in
81ecdfbb 18337 /usr/include) ac_x_includes= ;;
bec39cab 18338 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 18339 esac
bec39cab 18340 case $ac_im_usrlibdir in
81ecdfbb 18341 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 18342 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
18343 esac
18344 fi
18345 cd ..
81ecdfbb 18346 rm -f -r conftest.dir
c906108c
SS
18347fi
18348
bec39cab
AC
18349# Standard set of common directories for X headers.
18350# Check X11 before X11Rn because it is often a symlink to the current release.
18351ac_x_header_dirs='
18352/usr/X11/include
81ecdfbb 18353/usr/X11R7/include
bec39cab
AC
18354/usr/X11R6/include
18355/usr/X11R5/include
18356/usr/X11R4/include
18357
18358/usr/include/X11
81ecdfbb 18359/usr/include/X11R7
bec39cab
AC
18360/usr/include/X11R6
18361/usr/include/X11R5
18362/usr/include/X11R4
18363
18364/usr/local/X11/include
81ecdfbb 18365/usr/local/X11R7/include
bec39cab
AC
18366/usr/local/X11R6/include
18367/usr/local/X11R5/include
18368/usr/local/X11R4/include
18369
18370/usr/local/include/X11
81ecdfbb 18371/usr/local/include/X11R7
bec39cab
AC
18372/usr/local/include/X11R6
18373/usr/local/include/X11R5
18374/usr/local/include/X11R4
18375
18376/usr/X386/include
18377/usr/x386/include
18378/usr/XFree86/include/X11
18379
18380/usr/include
18381/usr/local/include
18382/usr/unsupported/include
18383/usr/athena/include
18384/usr/local/x11r5/include
18385/usr/lpp/Xamples/include
18386
18387/usr/openwin/include
18388/usr/openwin/share/include'
18389
18390if test "$ac_x_includes" = no; then
81ecdfbb 18391 # Guess where to find include files, by looking for Xlib.h.
c906108c 18392 # First, try using that file with no special directory specified.
81ecdfbb 18393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 18394/* end confdefs.h. */
81ecdfbb 18395#include <X11/Xlib.h>
bec39cab 18396_ACEOF
81ecdfbb 18397if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
18398 # We can compile using X headers with no special include directory.
18399ac_x_includes=
18400else
bec39cab 18401 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 18402 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
18403 ac_x_includes=$ac_dir
18404 break
18405 fi
18406done
c906108c 18407fi
d0ac1c44 18408rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 18409fi # $ac_x_includes = no
c906108c 18410
bec39cab 18411if test "$ac_x_libraries" = no; then
c906108c 18412 # Check for the libraries.
c906108c
SS
18413 # See if we find them without any special options.
18414 # Don't add to $LIBS permanently.
bec39cab 18415 ac_save_LIBS=$LIBS
81ecdfbb
RW
18416 LIBS="-lX11 $LIBS"
18417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 18418/* end confdefs.h. */
81ecdfbb 18419#include <X11/Xlib.h>
bec39cab
AC
18420int
18421main ()
18422{
81ecdfbb 18423XrmInitialize ()
bec39cab
AC
18424 ;
18425 return 0;
18426}
18427_ACEOF
81ecdfbb 18428if ac_fn_c_try_link "$LINENO"; then :
bec39cab 18429 LIBS=$ac_save_LIBS
c906108c
SS
18430# We can link X programs with no special library path.
18431ac_x_libraries=
18432else
81ecdfbb
RW
18433 LIBS=$ac_save_LIBS
18434for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 18435do
bec39cab 18436 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
18437 for ac_extension in a so sl dylib la dll; do
18438 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
18439 ac_x_libraries=$ac_dir
18440 break 2
18441 fi
18442 done
18443done
18444fi
81ecdfbb
RW
18445rm -f core conftest.err conftest.$ac_objext \
18446 conftest$ac_exeext conftest.$ac_ext
bec39cab 18447fi # $ac_x_libraries = no
c906108c 18448
81ecdfbb
RW
18449case $ac_x_includes,$ac_x_libraries in #(
18450 no,* | *,no | *\'*)
18451 # Didn't find X, or a directory has "'" in its name.
18452 ac_cv_have_x="have_x=no";; #(
18453 *)
18454 # Record where we found X for the cache.
18455 ac_cv_have_x="have_x=yes\
18456 ac_x_includes='$ac_x_includes'\
18457 ac_x_libraries='$ac_x_libraries'"
18458esac
c906108c 18459fi
81ecdfbb
RW
18460;; #(
18461 *) have_x=yes;;
18462 esac
c906108c
SS
18463 eval "$ac_cv_have_x"
18464fi # $with_x != no
18465
18466if test "$have_x" != yes; then
81ecdfbb
RW
18467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18468$as_echo "$have_x" >&6; }
c906108c
SS
18469 no_x=yes
18470else
18471 # If each of the values was on the command line, it overrides each guess.
18472 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18473 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18474 # Update the cache value to reflect the command line values.
81ecdfbb
RW
18475 ac_cv_have_x="have_x=yes\
18476 ac_x_includes='$x_includes'\
18477 ac_x_libraries='$x_libraries'"
18478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18479$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
18480fi
18481
18482
bec39cab 18483# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 18484# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
18485# This code just checks for a few cases where we'd like to ignore those
18486# definitions, even when they're present in the '.mt' file. These cases
18487# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 18488# not part of the source tree.
7a292a7a 18489#
81ecdfbb
RW
18490# Check whether --enable-sim was given.
18491if test "${enable_sim+set}" = set; then :
18492 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
18493 echo "enableval = ${enableval}";
18494 case "${enableval}" in
18495 yes) ignore_sim=false ;;
18496 no) ignore_sim=true ;;
18497 *) ignore_sim=false ;;
18498 esac
18499else
18500 ignore_sim=false
81ecdfbb
RW
18501fi
18502
7a292a7a
SS
18503
18504if test ! -d "${srcdir}/../sim"; then
18505 ignore_sim=true
18506fi
18507
9b624dbe
UW
18508SIM=
18509SIM_OBS=
18510if test "${ignore_sim}" = "false"; then
18511 if test x"${gdb_sim}" != x ; then
18512 SIM="${gdb_sim}"
18513 SIM_OBS="remote-sim.o"
60ca704f 18514
81ecdfbb 18515$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 18516
976102cd
PA
18517
18518 # Some tdep code should only be compiled in when the ppc sim is
18519 # built. PR sim/13418.
18520 case $target in
18521 powerpc*-*-*)
18522
18523$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18524
18525 ;;
18526 esac
9b624dbe 18527 fi
7a292a7a
SS
18528fi
18529
18530
18531
c906108c
SS
18532
18533
18534
18535
18536
18537
dfcd3bfb 18538
e56ac5c3
AC
18539
18540
b3a90332
AC
18541
18542
c35f4ffc 18543# List of host floatformats.
bec39cab
AC
18544
18545cat >>confdefs.h <<_ACEOF
c35f4ffc 18546#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 18547_ACEOF
c35f4ffc 18548
bec39cab
AC
18549
18550cat >>confdefs.h <<_ACEOF
c35f4ffc 18551#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
18552_ACEOF
18553
c35f4ffc 18554
bec39cab 18555cat >>confdefs.h <<_ACEOF
c35f4ffc 18556#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 18557_ACEOF
c35f4ffc
AC
18558
18559
c906108c
SS
18560# target_subdir is used by the testsuite to find the target libraries.
18561target_subdir=
18562if test "${host}" != "${target}"; then
18563 target_subdir="${target_alias}/"
18564fi
18565
18566
21ea5acd 18567# Import nat definitions.
2b351b19 18568nat_makefile_frag=/dev/null
771b4502 18569if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
18570 . ${srcdir}/configure.nat
18571 nativefile=$NAT_FILE
c906108c 18572fi
c906108c 18573
c906108c
SS
18574
18575
18576
21ea5acd
SDJ
18577
18578
18579
18580
18581
c906108c
SS
18582
18583
b00a8037 18584if test x"${gdb_osabi}" != x ; then
bec39cab
AC
18585
18586cat >>confdefs.h <<_ACEOF
b00a8037 18587#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 18588_ACEOF
b00a8037
DJ
18589
18590fi
18591
393fd4c3
YQ
18592# Check for babeltrace and babeltrace-ctf
18593
18594# Check whether --with-babeltrace was given.
18595if test "${with_babeltrace+set}" = set; then :
18596 withval=$with_babeltrace;
18597else
18598 with_babeltrace=auto
18599fi
18600
18601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18602$as_echo_n "checking whether to use babeltrace... " >&6; }
18603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18604$as_echo "$with_babeltrace" >&6; }
18605
18606if test "x$with_babeltrace" = "xno"; then
18607 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18608$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18609else
18610 # Append -Werror to CFLAGS so that configure can catch the warning
18611 # "assignment from incompatible pointer type", which is related to
18612 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18613 # in GDB, while babeltrace 1.0.3 is broken.
18614 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18615 # safe to save and restore CFLAGS here.
18616 saved_CFLAGS=$CFLAGS
18617 CFLAGS="$CFLAGS -Werror"
18618
18619
18620
18621
18622
18623
18624
18625
18626 use_additional=yes
18627
18628 acl_save_prefix="$prefix"
18629 prefix="$acl_final_prefix"
18630 acl_save_exec_prefix="$exec_prefix"
18631 exec_prefix="$acl_final_exec_prefix"
18632
18633 eval additional_includedir=\"$includedir\"
18634 eval additional_libdir=\"$libdir\"
18635
18636 exec_prefix="$acl_save_exec_prefix"
18637 prefix="$acl_save_prefix"
18638
18639
18640# Check whether --with-libbabeltrace-prefix was given.
18641if test "${with_libbabeltrace_prefix+set}" = set; then :
18642 withval=$with_libbabeltrace_prefix;
18643 if test "X$withval" = "Xno"; then
18644 use_additional=no
18645 else
18646 if test "X$withval" = "X"; then
18647
18648 acl_save_prefix="$prefix"
18649 prefix="$acl_final_prefix"
18650 acl_save_exec_prefix="$exec_prefix"
18651 exec_prefix="$acl_final_exec_prefix"
18652
18653 eval additional_includedir=\"$includedir\"
18654 eval additional_libdir=\"$libdir\"
18655
18656 exec_prefix="$acl_save_exec_prefix"
18657 prefix="$acl_save_prefix"
18658
18659 else
18660 additional_includedir="$withval/include"
18661 additional_libdir="$withval/lib"
18662 fi
18663 fi
18664
18665fi
18666
9f1528a1
AB
18667
18668# Check whether --with-libbabeltrace-type was given.
18669if test "${with_libbabeltrace_type+set}" = set; then :
18670 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18671else
18672 with_libbabeltrace_type=auto
18673fi
18674
18675 lib_type=`eval echo \$with_libbabeltrace_type`
18676
393fd4c3
YQ
18677 LIBBABELTRACE=
18678 LTLIBBABELTRACE=
18679 INCBABELTRACE=
18680 rpathdirs=
18681 ltrpathdirs=
18682 names_already_handled=
18683 names_next_round='babeltrace babeltrace-ctf'
18684 while test -n "$names_next_round"; do
18685 names_this_round="$names_next_round"
18686 names_next_round=
18687 for name in $names_this_round; do
18688 already_handled=
18689 for n in $names_already_handled; do
18690 if test "$n" = "$name"; then
18691 already_handled=yes
18692 break
18693 fi
18694 done
18695 if test -z "$already_handled"; then
18696 names_already_handled="$names_already_handled $name"
18697 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18698 eval value=\"\$HAVE_LIB$uppername\"
18699 if test -n "$value"; then
18700 if test "$value" = yes; then
18701 eval value=\"\$LIB$uppername\"
18702 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18703 eval value=\"\$LTLIB$uppername\"
18704 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18705 else
18706 :
18707 fi
18708 else
18709 found_dir=
18710 found_la=
18711 found_so=
18712 found_a=
18713 if test $use_additional = yes; then
9f1528a1 18714 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18715 found_dir="$additional_libdir"
18716 found_so="$additional_libdir/lib$name.$shlibext"
18717 if test -f "$additional_libdir/lib$name.la"; then
18718 found_la="$additional_libdir/lib$name.la"
18719 fi
9f1528a1 18720 elif test x$lib_type != xshared; then
393fd4c3
YQ
18721 if test -f "$additional_libdir/lib$name.$libext"; then
18722 found_dir="$additional_libdir"
18723 found_a="$additional_libdir/lib$name.$libext"
18724 if test -f "$additional_libdir/lib$name.la"; then
18725 found_la="$additional_libdir/lib$name.la"
18726 fi
18727 fi
18728 fi
18729 fi
18730 if test "X$found_dir" = "X"; then
18731 for x in $LDFLAGS $LTLIBBABELTRACE; do
18732
18733 acl_save_prefix="$prefix"
18734 prefix="$acl_final_prefix"
18735 acl_save_exec_prefix="$exec_prefix"
18736 exec_prefix="$acl_final_exec_prefix"
18737 eval x=\"$x\"
18738 exec_prefix="$acl_save_exec_prefix"
18739 prefix="$acl_save_prefix"
18740
18741 case "$x" in
18742 -L*)
18743 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 18744 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18745 found_dir="$dir"
18746 found_so="$dir/lib$name.$shlibext"
18747 if test -f "$dir/lib$name.la"; then
18748 found_la="$dir/lib$name.la"
18749 fi
9f1528a1 18750 elif test x$lib_type != xshared; then
393fd4c3
YQ
18751 if test -f "$dir/lib$name.$libext"; then
18752 found_dir="$dir"
18753 found_a="$dir/lib$name.$libext"
18754 if test -f "$dir/lib$name.la"; then
18755 found_la="$dir/lib$name.la"
18756 fi
18757 fi
18758 fi
18759 ;;
18760 esac
18761 if test "X$found_dir" != "X"; then
18762 break
18763 fi
18764 done
18765 fi
18766 if test "X$found_dir" != "X"; then
18767 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18768 if test "X$found_so" != "X"; then
18769 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18770 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18771 else
18772 haveit=
18773 for x in $ltrpathdirs; do
18774 if test "X$x" = "X$found_dir"; then
18775 haveit=yes
18776 break
18777 fi
18778 done
18779 if test -z "$haveit"; then
18780 ltrpathdirs="$ltrpathdirs $found_dir"
18781 fi
18782 if test "$hardcode_direct" = yes; then
18783 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18784 else
18785 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18786 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18787 haveit=
18788 for x in $rpathdirs; do
18789 if test "X$x" = "X$found_dir"; then
18790 haveit=yes
18791 break
18792 fi
18793 done
18794 if test -z "$haveit"; then
18795 rpathdirs="$rpathdirs $found_dir"
18796 fi
18797 else
18798 haveit=
18799 for x in $LDFLAGS $LIBBABELTRACE; do
18800
18801 acl_save_prefix="$prefix"
18802 prefix="$acl_final_prefix"
18803 acl_save_exec_prefix="$exec_prefix"
18804 exec_prefix="$acl_final_exec_prefix"
18805 eval x=\"$x\"
18806 exec_prefix="$acl_save_exec_prefix"
18807 prefix="$acl_save_prefix"
18808
18809 if test "X$x" = "X-L$found_dir"; then
18810 haveit=yes
18811 break
18812 fi
18813 done
18814 if test -z "$haveit"; then
18815 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18816 fi
18817 if test "$hardcode_minus_L" != no; then
18818 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18819 else
18820 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18821 fi
18822 fi
18823 fi
18824 fi
18825 else
18826 if test "X$found_a" != "X"; then
18827 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18828 else
18829 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18830 fi
18831 fi
18832 additional_includedir=
18833 case "$found_dir" in
18834 */lib | */lib/)
18835 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18836 additional_includedir="$basedir/include"
18837 ;;
18838 esac
18839 if test "X$additional_includedir" != "X"; then
18840 if test "X$additional_includedir" != "X/usr/include"; then
18841 haveit=
18842 if test "X$additional_includedir" = "X/usr/local/include"; then
18843 if test -n "$GCC"; then
18844 case $host_os in
18845 linux*) haveit=yes;;
18846 esac
18847 fi
18848 fi
18849 if test -z "$haveit"; then
18850 for x in $CPPFLAGS $INCBABELTRACE; do
18851
18852 acl_save_prefix="$prefix"
18853 prefix="$acl_final_prefix"
18854 acl_save_exec_prefix="$exec_prefix"
18855 exec_prefix="$acl_final_exec_prefix"
18856 eval x=\"$x\"
18857 exec_prefix="$acl_save_exec_prefix"
18858 prefix="$acl_save_prefix"
18859
18860 if test "X$x" = "X-I$additional_includedir"; then
18861 haveit=yes
18862 break
18863 fi
18864 done
18865 if test -z "$haveit"; then
18866 if test -d "$additional_includedir"; then
18867 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18868 fi
18869 fi
18870 fi
18871 fi
18872 fi
18873 if test -n "$found_la"; then
18874 save_libdir="$libdir"
18875 case "$found_la" in
18876 */* | *\\*) . "$found_la" ;;
18877 *) . "./$found_la" ;;
18878 esac
18879 libdir="$save_libdir"
18880 for dep in $dependency_libs; do
18881 case "$dep" in
18882 -L*)
18883 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18884 if test "X$additional_libdir" != "X/usr/lib"; then
18885 haveit=
18886 if test "X$additional_libdir" = "X/usr/local/lib"; then
18887 if test -n "$GCC"; then
18888 case $host_os in
18889 linux*) haveit=yes;;
18890 esac
18891 fi
18892 fi
18893 if test -z "$haveit"; then
18894 haveit=
18895 for x in $LDFLAGS $LIBBABELTRACE; do
18896
18897 acl_save_prefix="$prefix"
18898 prefix="$acl_final_prefix"
18899 acl_save_exec_prefix="$exec_prefix"
18900 exec_prefix="$acl_final_exec_prefix"
18901 eval x=\"$x\"
18902 exec_prefix="$acl_save_exec_prefix"
18903 prefix="$acl_save_prefix"
18904
18905 if test "X$x" = "X-L$additional_libdir"; then
18906 haveit=yes
18907 break
18908 fi
18909 done
18910 if test -z "$haveit"; then
18911 if test -d "$additional_libdir"; then
18912 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18913 fi
18914 fi
18915 haveit=
18916 for x in $LDFLAGS $LTLIBBABELTRACE; do
18917
18918 acl_save_prefix="$prefix"
18919 prefix="$acl_final_prefix"
18920 acl_save_exec_prefix="$exec_prefix"
18921 exec_prefix="$acl_final_exec_prefix"
18922 eval x=\"$x\"
18923 exec_prefix="$acl_save_exec_prefix"
18924 prefix="$acl_save_prefix"
18925
18926 if test "X$x" = "X-L$additional_libdir"; then
18927 haveit=yes
18928 break
18929 fi
18930 done
18931 if test -z "$haveit"; then
18932 if test -d "$additional_libdir"; then
18933 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18934 fi
18935 fi
18936 fi
18937 fi
18938 ;;
18939 -R*)
18940 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18941 if test "$enable_rpath" != no; then
18942 haveit=
18943 for x in $rpathdirs; do
18944 if test "X$x" = "X$dir"; then
18945 haveit=yes
18946 break
18947 fi
18948 done
18949 if test -z "$haveit"; then
18950 rpathdirs="$rpathdirs $dir"
18951 fi
18952 haveit=
18953 for x in $ltrpathdirs; do
18954 if test "X$x" = "X$dir"; then
18955 haveit=yes
18956 break
18957 fi
18958 done
18959 if test -z "$haveit"; then
18960 ltrpathdirs="$ltrpathdirs $dir"
18961 fi
18962 fi
18963 ;;
18964 -l*)
18965 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18966 ;;
18967 *.la)
18968 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18969 ;;
18970 *)
18971 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18972 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18973 ;;
18974 esac
18975 done
18976 fi
18977 else
9f1528a1
AB
18978 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18979 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18980 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18981 else
18982 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
18983 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
18984 fi
393fd4c3
YQ
18985 fi
18986 fi
18987 fi
18988 done
18989 done
18990 if test "X$rpathdirs" != "X"; then
18991 if test -n "$hardcode_libdir_separator"; then
18992 alldirs=
18993 for found_dir in $rpathdirs; do
18994 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18995 done
18996 acl_save_libdir="$libdir"
18997 libdir="$alldirs"
18998 eval flag=\"$hardcode_libdir_flag_spec\"
18999 libdir="$acl_save_libdir"
19000 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19001 else
19002 for found_dir in $rpathdirs; do
19003 acl_save_libdir="$libdir"
19004 libdir="$found_dir"
19005 eval flag=\"$hardcode_libdir_flag_spec\"
19006 libdir="$acl_save_libdir"
19007 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19008 done
19009 fi
19010 fi
19011 if test "X$ltrpathdirs" != "X"; then
19012 for found_dir in $ltrpathdirs; do
19013 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
19014 done
19015 fi
19016
19017
19018 ac_save_CPPFLAGS="$CPPFLAGS"
19019
19020 for element in $INCBABELTRACE; do
19021 haveit=
19022 for x in $CPPFLAGS; do
19023
19024 acl_save_prefix="$prefix"
19025 prefix="$acl_final_prefix"
19026 acl_save_exec_prefix="$exec_prefix"
19027 exec_prefix="$acl_final_exec_prefix"
19028 eval x=\"$x\"
19029 exec_prefix="$acl_save_exec_prefix"
19030 prefix="$acl_save_prefix"
19031
19032 if test "X$x" = "X$element"; then
19033 haveit=yes
19034 break
19035 fi
19036 done
19037 if test -z "$haveit"; then
19038 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19039 fi
19040 done
19041
19042
19043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
19044$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 19045if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
19046 $as_echo_n "(cached) " >&6
19047else
19048
19049 ac_save_LIBS="$LIBS"
19050 LIBS="$LIBS $LIBBABELTRACE"
19051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19052/* end confdefs.h. */
19053#include <babeltrace/babeltrace.h>
19054 #include <babeltrace/ctf/events.h>
19055 #include <babeltrace/ctf/iterator.h>
19056int
19057main ()
19058{
19059struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
19060 struct bt_ctf_event *event = NULL;
19061 const struct bt_definition *scope;
19062
13cdc2af 19063 pos->type = BT_SEEK_BEGIN;
65c749e7 19064 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
19065 scope = bt_ctf_get_top_level_scope (event,
19066 BT_STREAM_EVENT_HEADER);
19067 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
19068
19069 ;
19070 return 0;
19071}
19072_ACEOF
19073if ac_fn_c_try_link "$LINENO"; then :
19074 ac_cv_libbabeltrace=yes
19075else
19076 ac_cv_libbabeltrace=no
19077fi
19078rm -f core conftest.err conftest.$ac_objext \
19079 conftest$ac_exeext conftest.$ac_ext
19080 LIBS="$ac_save_LIBS"
19081
19082fi
19083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
19084$as_echo "$ac_cv_libbabeltrace" >&6; }
19085 if test "$ac_cv_libbabeltrace" = yes; then
19086 HAVE_LIBBABELTRACE=yes
19087
19088$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
19089
19090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
19091$as_echo_n "checking how to link with libbabeltrace... " >&6; }
19092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
19093$as_echo "$LIBBABELTRACE" >&6; }
19094 else
19095 HAVE_LIBBABELTRACE=no
19096 CPPFLAGS="$ac_save_CPPFLAGS"
19097 LIBBABELTRACE=
19098 LTLIBBABELTRACE=
19099 fi
19100
19101
19102
19103
19104
19105
19106 CFLAGS=$saved_CFLAGS
19107
19108 if test "$HAVE_LIBBABELTRACE" != yes; then
19109 if test "$with_babeltrace" = yes; then
d0ac1c44 19110 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
19111 else
19112 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
19113$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
19114 fi
19115 fi
19116fi
19117
ccb1ba62
CB
19118# Check for xxhash
19119
19120# Check whether --with-xxhash was given.
19121if test "${with_xxhash+set}" = set; then :
19122 withval=$with_xxhash;
19123else
19124 with_xxhash=auto
19125fi
19126
19127
1776e3e5
NA
19128 # Check whether --enable-libctf was given.
19129if test "${enable_libctf+set}" = set; then :
19130 enableval=$enable_libctf;
19131 case "$enableval" in
19132 yes|no) ;;
19133 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
19134 esac
19135
19136else
19137 enable_libctf=yes
19138fi
19139
19140
19141if test x${enable_static} = xno; then
19142 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
19143 CTF_DEPS="../libctf/.libs/libctf.so"
19144else
19145 LIBCTF="../libctf/.libs/libctf.a"
19146 CTF_DEPS="$LIBCTF"
19147fi
19148if test "${enable_libctf}" = yes; then
19149
19150$as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
19151
19152else
19153 LIBCTF=
19154 CTF_DEPS=
19155fi
19156
19157
19158
19159
19160# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
19161# empty version.
19162
ccb1ba62
CB
19163if test "x$with_xxhash" != "xno"; then
19164
19165
19166
19167
19168
19169
19170
19171
19172 use_additional=yes
19173
19174 acl_save_prefix="$prefix"
19175 prefix="$acl_final_prefix"
19176 acl_save_exec_prefix="$exec_prefix"
19177 exec_prefix="$acl_final_exec_prefix"
19178
19179 eval additional_includedir=\"$includedir\"
19180 eval additional_libdir=\"$libdir\"
19181
19182 exec_prefix="$acl_save_exec_prefix"
19183 prefix="$acl_save_prefix"
19184
19185
19186# Check whether --with-libxxhash-prefix was given.
19187if test "${with_libxxhash_prefix+set}" = set; then :
19188 withval=$with_libxxhash_prefix;
19189 if test "X$withval" = "Xno"; then
19190 use_additional=no
19191 else
19192 if test "X$withval" = "X"; then
19193
19194 acl_save_prefix="$prefix"
19195 prefix="$acl_final_prefix"
19196 acl_save_exec_prefix="$exec_prefix"
19197 exec_prefix="$acl_final_exec_prefix"
19198
19199 eval additional_includedir=\"$includedir\"
19200 eval additional_libdir=\"$libdir\"
19201
19202 exec_prefix="$acl_save_exec_prefix"
19203 prefix="$acl_save_prefix"
19204
19205 else
19206 additional_includedir="$withval/include"
19207 additional_libdir="$withval/lib"
19208 fi
19209 fi
19210
19211fi
19212
9f1528a1
AB
19213
19214# Check whether --with-libxxhash-type was given.
19215if test "${with_libxxhash_type+set}" = set; then :
19216 withval=$with_libxxhash_type; with_libxxhash_type=$withval
19217else
19218 with_libxxhash_type=auto
19219fi
19220
19221 lib_type=`eval echo \$with_libxxhash_type`
19222
ccb1ba62
CB
19223 LIBXXHASH=
19224 LTLIBXXHASH=
19225 INCXXHASH=
19226 rpathdirs=
19227 ltrpathdirs=
19228 names_already_handled=
19229 names_next_round='xxhash '
19230 while test -n "$names_next_round"; do
19231 names_this_round="$names_next_round"
19232 names_next_round=
19233 for name in $names_this_round; do
19234 already_handled=
19235 for n in $names_already_handled; do
19236 if test "$n" = "$name"; then
19237 already_handled=yes
19238 break
19239 fi
19240 done
19241 if test -z "$already_handled"; then
19242 names_already_handled="$names_already_handled $name"
19243 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
19244 eval value=\"\$HAVE_LIB$uppername\"
19245 if test -n "$value"; then
19246 if test "$value" = yes; then
19247 eval value=\"\$LIB$uppername\"
19248 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
19249 eval value=\"\$LTLIB$uppername\"
19250 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
19251 else
19252 :
19253 fi
19254 else
19255 found_dir=
19256 found_la=
19257 found_so=
19258 found_a=
19259 if test $use_additional = yes; then
9f1528a1 19260 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
19261 found_dir="$additional_libdir"
19262 found_so="$additional_libdir/lib$name.$shlibext"
19263 if test -f "$additional_libdir/lib$name.la"; then
19264 found_la="$additional_libdir/lib$name.la"
19265 fi
9f1528a1 19266 elif test x$lib_type != xshared; then
ccb1ba62
CB
19267 if test -f "$additional_libdir/lib$name.$libext"; then
19268 found_dir="$additional_libdir"
19269 found_a="$additional_libdir/lib$name.$libext"
19270 if test -f "$additional_libdir/lib$name.la"; then
19271 found_la="$additional_libdir/lib$name.la"
19272 fi
19273 fi
19274 fi
19275 fi
19276 if test "X$found_dir" = "X"; then
19277 for x in $LDFLAGS $LTLIBXXHASH; do
19278
19279 acl_save_prefix="$prefix"
19280 prefix="$acl_final_prefix"
19281 acl_save_exec_prefix="$exec_prefix"
19282 exec_prefix="$acl_final_exec_prefix"
19283 eval x=\"$x\"
19284 exec_prefix="$acl_save_exec_prefix"
19285 prefix="$acl_save_prefix"
19286
19287 case "$x" in
19288 -L*)
19289 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 19290 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
19291 found_dir="$dir"
19292 found_so="$dir/lib$name.$shlibext"
19293 if test -f "$dir/lib$name.la"; then
19294 found_la="$dir/lib$name.la"
19295 fi
9f1528a1 19296 elif test x$lib_type != xshared; then
ccb1ba62
CB
19297 if test -f "$dir/lib$name.$libext"; then
19298 found_dir="$dir"
19299 found_a="$dir/lib$name.$libext"
19300 if test -f "$dir/lib$name.la"; then
19301 found_la="$dir/lib$name.la"
19302 fi
19303 fi
19304 fi
19305 ;;
19306 esac
19307 if test "X$found_dir" != "X"; then
19308 break
19309 fi
19310 done
19311 fi
19312 if test "X$found_dir" != "X"; then
19313 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
19314 if test "X$found_so" != "X"; then
19315 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
19316 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19317 else
19318 haveit=
19319 for x in $ltrpathdirs; do
19320 if test "X$x" = "X$found_dir"; then
19321 haveit=yes
19322 break
19323 fi
19324 done
19325 if test -z "$haveit"; then
19326 ltrpathdirs="$ltrpathdirs $found_dir"
19327 fi
19328 if test "$hardcode_direct" = yes; then
19329 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19330 else
19331 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
19332 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19333 haveit=
19334 for x in $rpathdirs; do
19335 if test "X$x" = "X$found_dir"; then
19336 haveit=yes
19337 break
19338 fi
19339 done
19340 if test -z "$haveit"; then
19341 rpathdirs="$rpathdirs $found_dir"
19342 fi
19343 else
19344 haveit=
19345 for x in $LDFLAGS $LIBXXHASH; do
19346
19347 acl_save_prefix="$prefix"
19348 prefix="$acl_final_prefix"
19349 acl_save_exec_prefix="$exec_prefix"
19350 exec_prefix="$acl_final_exec_prefix"
19351 eval x=\"$x\"
19352 exec_prefix="$acl_save_exec_prefix"
19353 prefix="$acl_save_prefix"
19354
19355 if test "X$x" = "X-L$found_dir"; then
19356 haveit=yes
19357 break
19358 fi
19359 done
19360 if test -z "$haveit"; then
19361 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
19362 fi
19363 if test "$hardcode_minus_L" != no; then
19364 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19365 else
19366 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19367 fi
19368 fi
19369 fi
19370 fi
19371 else
19372 if test "X$found_a" != "X"; then
19373 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
19374 else
19375 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
19376 fi
19377 fi
19378 additional_includedir=
19379 case "$found_dir" in
19380 */lib | */lib/)
19381 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19382 additional_includedir="$basedir/include"
19383 ;;
19384 esac
19385 if test "X$additional_includedir" != "X"; then
19386 if test "X$additional_includedir" != "X/usr/include"; then
19387 haveit=
19388 if test "X$additional_includedir" = "X/usr/local/include"; then
19389 if test -n "$GCC"; then
19390 case $host_os in
19391 linux*) haveit=yes;;
19392 esac
19393 fi
19394 fi
19395 if test -z "$haveit"; then
19396 for x in $CPPFLAGS $INCXXHASH; do
19397
19398 acl_save_prefix="$prefix"
19399 prefix="$acl_final_prefix"
19400 acl_save_exec_prefix="$exec_prefix"
19401 exec_prefix="$acl_final_exec_prefix"
19402 eval x=\"$x\"
19403 exec_prefix="$acl_save_exec_prefix"
19404 prefix="$acl_save_prefix"
19405
19406 if test "X$x" = "X-I$additional_includedir"; then
19407 haveit=yes
19408 break
19409 fi
19410 done
19411 if test -z "$haveit"; then
19412 if test -d "$additional_includedir"; then
19413 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19414 fi
19415 fi
19416 fi
19417 fi
19418 fi
19419 if test -n "$found_la"; then
19420 save_libdir="$libdir"
19421 case "$found_la" in
19422 */* | *\\*) . "$found_la" ;;
19423 *) . "./$found_la" ;;
19424 esac
19425 libdir="$save_libdir"
19426 for dep in $dependency_libs; do
19427 case "$dep" in
19428 -L*)
19429 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19430 if test "X$additional_libdir" != "X/usr/lib"; then
19431 haveit=
19432 if test "X$additional_libdir" = "X/usr/local/lib"; then
19433 if test -n "$GCC"; then
19434 case $host_os in
19435 linux*) haveit=yes;;
19436 esac
19437 fi
19438 fi
19439 if test -z "$haveit"; then
19440 haveit=
19441 for x in $LDFLAGS $LIBXXHASH; do
19442
19443 acl_save_prefix="$prefix"
19444 prefix="$acl_final_prefix"
19445 acl_save_exec_prefix="$exec_prefix"
19446 exec_prefix="$acl_final_exec_prefix"
19447 eval x=\"$x\"
19448 exec_prefix="$acl_save_exec_prefix"
19449 prefix="$acl_save_prefix"
19450
19451 if test "X$x" = "X-L$additional_libdir"; then
19452 haveit=yes
19453 break
19454 fi
19455 done
19456 if test -z "$haveit"; then
19457 if test -d "$additional_libdir"; then
19458 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19459 fi
19460 fi
19461 haveit=
19462 for x in $LDFLAGS $LTLIBXXHASH; do
19463
19464 acl_save_prefix="$prefix"
19465 prefix="$acl_final_prefix"
19466 acl_save_exec_prefix="$exec_prefix"
19467 exec_prefix="$acl_final_exec_prefix"
19468 eval x=\"$x\"
19469 exec_prefix="$acl_save_exec_prefix"
19470 prefix="$acl_save_prefix"
19471
19472 if test "X$x" = "X-L$additional_libdir"; then
19473 haveit=yes
19474 break
19475 fi
19476 done
19477 if test -z "$haveit"; then
19478 if test -d "$additional_libdir"; then
19479 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19480 fi
19481 fi
19482 fi
19483 fi
19484 ;;
19485 -R*)
19486 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19487 if test "$enable_rpath" != no; then
19488 haveit=
19489 for x in $rpathdirs; do
19490 if test "X$x" = "X$dir"; then
19491 haveit=yes
19492 break
19493 fi
19494 done
19495 if test -z "$haveit"; then
19496 rpathdirs="$rpathdirs $dir"
19497 fi
19498 haveit=
19499 for x in $ltrpathdirs; do
19500 if test "X$x" = "X$dir"; then
19501 haveit=yes
19502 break
19503 fi
19504 done
19505 if test -z "$haveit"; then
19506 ltrpathdirs="$ltrpathdirs $dir"
19507 fi
19508 fi
19509 ;;
19510 -l*)
19511 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19512 ;;
19513 *.la)
19514 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19515 ;;
19516 *)
19517 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19518 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19519 ;;
19520 esac
19521 done
19522 fi
19523 else
9f1528a1
AB
19524 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19525 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19526 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19527 else
19528 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19529 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19530 fi
ccb1ba62
CB
19531 fi
19532 fi
19533 fi
19534 done
19535 done
19536 if test "X$rpathdirs" != "X"; then
19537 if test -n "$hardcode_libdir_separator"; then
19538 alldirs=
19539 for found_dir in $rpathdirs; do
19540 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19541 done
19542 acl_save_libdir="$libdir"
19543 libdir="$alldirs"
19544 eval flag=\"$hardcode_libdir_flag_spec\"
19545 libdir="$acl_save_libdir"
19546 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19547 else
19548 for found_dir in $rpathdirs; do
19549 acl_save_libdir="$libdir"
19550 libdir="$found_dir"
19551 eval flag=\"$hardcode_libdir_flag_spec\"
19552 libdir="$acl_save_libdir"
19553 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19554 done
19555 fi
19556 fi
19557 if test "X$ltrpathdirs" != "X"; then
19558 for found_dir in $ltrpathdirs; do
19559 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19560 done
19561 fi
19562
19563
19564 ac_save_CPPFLAGS="$CPPFLAGS"
19565
19566 for element in $INCXXHASH; do
19567 haveit=
19568 for x in $CPPFLAGS; do
19569
19570 acl_save_prefix="$prefix"
19571 prefix="$acl_final_prefix"
19572 acl_save_exec_prefix="$exec_prefix"
19573 exec_prefix="$acl_final_exec_prefix"
19574 eval x=\"$x\"
19575 exec_prefix="$acl_save_exec_prefix"
19576 prefix="$acl_save_prefix"
19577
19578 if test "X$x" = "X$element"; then
19579 haveit=yes
19580 break
19581 fi
19582 done
19583 if test -z "$haveit"; then
19584 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19585 fi
19586 done
19587
19588
19589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19590$as_echo_n "checking for libxxhash... " >&6; }
19591if ${ac_cv_libxxhash+:} false; then :
19592 $as_echo_n "(cached) " >&6
19593else
19594
19595 ac_save_LIBS="$LIBS"
19596 LIBS="$LIBS $LIBXXHASH"
19597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19598/* end confdefs.h. */
19599#include <xxhash.h>
19600int
19601main ()
19602{
19603XXH32("foo", 3, 0);
19604
19605 ;
19606 return 0;
19607}
19608_ACEOF
19609if ac_fn_c_try_link "$LINENO"; then :
19610 ac_cv_libxxhash=yes
19611else
19612 ac_cv_libxxhash=no
19613fi
19614rm -f core conftest.err conftest.$ac_objext \
19615 conftest$ac_exeext conftest.$ac_ext
19616 LIBS="$ac_save_LIBS"
19617
19618fi
19619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19620$as_echo "$ac_cv_libxxhash" >&6; }
19621 if test "$ac_cv_libxxhash" = yes; then
19622 HAVE_LIBXXHASH=yes
19623
19624$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19625
19626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19627$as_echo_n "checking how to link with libxxhash... " >&6; }
19628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19629$as_echo "$LIBXXHASH" >&6; }
19630 else
19631 HAVE_LIBXXHASH=no
19632 CPPFLAGS="$ac_save_CPPFLAGS"
19633 LIBXXHASH=
19634 LTLIBXXHASH=
19635 fi
19636
19637
19638
19639
19640
19641
19642 if test "$HAVE_LIBXXHASH" != yes; then
19643 if test "$with_xxhash" = yes; then
19644 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19645 fi
19646 fi
19647 if test "x$with_xxhash" = "xauto"; then
19648 with_xxhash="$HAVE_LIBXXHASH"
19649 fi
19650fi
19651
19652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19653$as_echo_n "checking whether to use xxhash... " >&6; }
19654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19655$as_echo "$with_xxhash" >&6; }
19656
a0a461e5 19657NM_H=
c906108c
SS
19658rm -f nm.h
19659if test "${nativefile}" != ""; then
0f475e27
AC
19660 case "${nativefile}" in
19661 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19662 * ) GDB_NM_FILE="${nativefile}"
19663 esac
a0a461e5
TT
19664 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19665
60ca704f
SE
19666
19667cat >>confdefs.h <<_ACEOF
b78960be 19668#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 19669_ACEOF
5a2402b8 19670
a0a461e5 19671 NM_H=nm.h
c906108c 19672fi
5a2402b8
AC
19673
19674
a0a461e5 19675
e3487908
GKB
19676for ac_prog in xsltproc
19677do
19678 # Extract the first word of "$ac_prog", so it can be a program name with args.
19679set dummy $ac_prog; ac_word=$2
19680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19681$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 19682if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
19683 $as_echo_n "(cached) " >&6
19684else
19685 case $XSLTPROC in
19686 [\\/]* | ?:[\\/]*)
19687 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19688 ;;
19689 *)
19690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19691for as_dir in $PATH
19692do
19693 IFS=$as_save_IFS
19694 test -z "$as_dir" && as_dir=.
19695 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 19696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
19697 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19699 break 2
19700 fi
19701done
19702 done
19703IFS=$as_save_IFS
19704
19705 ;;
19706esac
19707fi
19708XSLTPROC=$ac_cv_path_XSLTPROC
19709if test -n "$XSLTPROC"; then
19710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19711$as_echo "$XSLTPROC" >&6; }
19712else
19713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19714$as_echo "no" >&6; }
19715fi
19716
19717
19718 test -n "$XSLTPROC" && break
19719done
19720test -n "$XSLTPROC" || XSLTPROC="missing"
19721
19722if test "x$USE_MAINTAINER_MODE" = xyes; then
19723 if test "${XSLTPROC}" = missing; then
d0ac1c44 19724 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
19725 fi
19726fi
19727
19728
c906108c
SS
19729
19730
c906108c 19731
81ecdfbb 19732$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 19733
bec39cab 19734
8ecfd7bd
SDJ
19735
19736# Check whether we will enable the inclusion of unit tests when
19737# compiling GDB.
19738#
19739# The default value of this option changes depending whether we're on
19740# development mode (in which case it's "true") or not (in which case
db6878ac
SM
19741# it's "false"). The $development variable is set by the GDB_AC_COMMON
19742# macro, which must therefore be used before GDB_AC_SELFTEST.
4d696a5c
SM
19743
19744if test "x$development" != xtrue && test "x$development" != xfalse; then :
19745 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19746fi
19747
8ecfd7bd
SDJ
19748# Check whether --enable-unit-tests was given.
19749if test "${enable_unit_tests+set}" = set; then :
19750 enableval=$enable_unit_tests; case "${enableval}" in
19751 yes) enable_unittests=true ;;
19752 no) enable_unittests=false ;;
19753 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19754esac
19755else
19756 enable_unittests=$development
19757fi
19758
19759
19760if $enable_unittests; then
dcd1f979
TT
19761
19762$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19763
8ecfd7bd 19764
74cd3f9d
SM
19765 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19766 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
8ecfd7bd 19767
dcd1f979
TT
19768fi
19769
b292c783 19770
8ecfd7bd 19771
f6a88844
JM
19772 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19773 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19774 if test "x$GDB_TRANSFORM_NAME" = x; then
19775 GDB_TRANSFORM_NAME=gdb
19776 fi
19777
19778
19779
19780 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19781 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19782 if test "x$GCORE_TRANSFORM_NAME" = x; then
19783 GCORE_TRANSFORM_NAME=gcore
19784 fi
19785
b292c783
JK
19786
19787ac_config_files="$ac_config_files gcore"
19788
141ec9f6 19789ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 19790
89a34d1b 19791
bec39cab
AC
19792cat >confcache <<\_ACEOF
19793# This file is a shell script that caches the results of configure
19794# tests run on this system so they can be shared between configure
19795# scripts and configure runs, see configure's option --config-cache.
19796# It is not useful on other systems. If it contains results you don't
19797# want to keep, you may remove or edit it.
19798#
19799# config.status only pays attention to the cache file if you give it
19800# the --recheck option to rerun configure.
19801#
19802# `ac_cv_env_foo' variables (set or unset) will be overridden when
19803# loading this file, other *unset* `ac_cv_foo' will be assigned the
19804# following values.
19805
19806_ACEOF
19807
19808# The following way of writing the cache mishandles newlines in values,
19809# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 19810# So, we kill variables containing newlines.
bec39cab
AC
19811# Ultrix sh set writes to stderr and can't be redirected directly,
19812# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
19813(
19814 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19815 eval ac_val=\$$ac_var
19816 case $ac_val in #(
19817 *${as_nl}*)
19818 case $ac_var in #(
19819 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19820$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19821 esac
19822 case $ac_var in #(
19823 _ | IFS | as_nl) ;; #(
19824 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19825 *) { eval $ac_var=; unset $ac_var;} ;;
19826 esac ;;
19827 esac
19828 done
19829
bec39cab 19830 (set) 2>&1 |
81ecdfbb
RW
19831 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19832 *${as_nl}ac_space=\ *)
19833 # `set' does not quote correctly, so add quotes: double-quote
19834 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
19835 sed -n \
19836 "s/'/'\\\\''/g;
19837 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 19838 ;; #(
bec39cab
AC
19839 *)
19840 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 19841 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 19842 ;;
81ecdfbb
RW
19843 esac |
19844 sort
19845) |
bec39cab 19846 sed '
81ecdfbb 19847 /^ac_cv_env_/b end
bec39cab 19848 t clear
81ecdfbb 19849 :clear
bec39cab
AC
19850 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19851 t end
81ecdfbb
RW
19852 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19853 :end' >>confcache
19854if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19855 if test -w "$cache_file"; then
d0ac1c44 19856 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
19857 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19858$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
19859 if test ! -f "$cache_file" || test -h "$cache_file"; then
19860 cat confcache >"$cache_file"
19861 else
19862 case $cache_file in #(
19863 */* | ?:*)
19864 mv -f confcache "$cache_file"$$ &&
19865 mv -f "$cache_file"$$ "$cache_file" ;; #(
19866 *)
19867 mv -f confcache "$cache_file" ;;
19868 esac
19869 fi
19870 fi
bec39cab 19871 else
81ecdfbb
RW
19872 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19873$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
19874 fi
19875fi
19876rm -f confcache
19877
19878test "x$prefix" = xNONE && prefix=$ac_default_prefix
19879# Let make expand exec_prefix.
19880test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19881
bec39cab
AC
19882DEFS=-DHAVE_CONFIG_H
19883
19884ac_libobjs=
19885ac_ltlibobjs=
d0ac1c44 19886U=
bec39cab
AC
19887for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19888 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
19889 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19890 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19891 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19892 # will be set to the directory where LIBOBJS objects are built.
19893 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19894 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
19895done
19896LIBOBJS=$ac_libobjs
19897
19898LTLIBOBJS=$ac_ltlibobjs
19899
19900
85981d60 19901if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 19902 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 19903Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 19904fi
4df42755 19905if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 19906 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
19907Usually this means the macro was only invoked conditionally." "$LINENO" 5
19908fi
19909if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 19910 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
19911Usually this means the macro was only invoked conditionally." "$LINENO" 5
19912fi
81ecdfbb
RW
19913
19914
d0ac1c44 19915: "${CONFIG_STATUS=./config.status}"
81ecdfbb 19916ac_write_fail=0
bec39cab
AC
19917ac_clean_files_save=$ac_clean_files
19918ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
19919{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19920$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19921as_write_fail=0
19922cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
19923#! $SHELL
19924# Generated by $as_me.
19925# Run this file to recreate the current configuration.
19926# Compiler output produced by configure, useful for debugging
19927# configure, is in config.log if it exists.
19928
19929debug=false
19930ac_cs_recheck=false
19931ac_cs_silent=false
bec39cab 19932
81ecdfbb
RW
19933SHELL=\${CONFIG_SHELL-$SHELL}
19934export SHELL
19935_ASEOF
19936cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19937## -------------------- ##
19938## M4sh Initialization. ##
19939## -------------------- ##
19940
19941# Be more Bourne compatible
19942DUALCASE=1; export DUALCASE # for MKS sh
19943if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
19944 emulate sh
19945 NULLCMD=:
81ecdfbb 19946 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
19947 # is contrary to our usage. Disable this feature.
19948 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
19949 setopt NO_GLOB_SUBST
19950else
19951 case `(set -o) 2>/dev/null` in #(
19952 *posix*) :
19953 set -o posix ;; #(
19954 *) :
19955 ;;
19956esac
bec39cab 19957fi
bec39cab 19958
81ecdfbb
RW
19959
19960as_nl='
19961'
19962export as_nl
19963# Printing a long string crashes Solaris 7 /usr/bin/printf.
19964as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19965as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19966as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19967# Prefer a ksh shell builtin over an external printf program on Solaris,
19968# but without wasting forks for bash or zsh.
19969if test -z "$BASH_VERSION$ZSH_VERSION" \
19970 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19971 as_echo='print -r --'
19972 as_echo_n='print -rn --'
19973elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19974 as_echo='printf %s\n'
19975 as_echo_n='printf %s'
19976else
19977 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19978 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19979 as_echo_n='/usr/ucb/echo -n'
19980 else
19981 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19982 as_echo_n_body='eval
19983 arg=$1;
19984 case $arg in #(
19985 *"$as_nl"*)
19986 expr "X$arg" : "X\\(.*\\)$as_nl";
19987 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19988 esac;
19989 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19990 '
19991 export as_echo_n_body
19992 as_echo_n='sh -c $as_echo_n_body as_echo'
19993 fi
19994 export as_echo_body
19995 as_echo='sh -c $as_echo_body as_echo'
19996fi
19997
19998# The user is always right.
19999if test "${PATH_SEPARATOR+set}" != set; then
20000 PATH_SEPARATOR=:
20001 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20002 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20003 PATH_SEPARATOR=';'
20004 }
bec39cab
AC
20005fi
20006
20007
81ecdfbb
RW
20008# IFS
20009# We need space, tab and new line, in precisely that order. Quoting is
20010# there to prevent editors from complaining about space-tab.
20011# (If _AS_PATH_WALK were called with IFS unset, it would disable word
20012# splitting by setting IFS to empty value.)
20013IFS=" "" $as_nl"
20014
20015# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 20016as_myself=
81ecdfbb
RW
20017case $0 in #((
20018 *[\\/]* ) as_myself=$0 ;;
20019 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20020for as_dir in $PATH
20021do
20022 IFS=$as_save_IFS
20023 test -z "$as_dir" && as_dir=.
20024 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20025 done
20026IFS=$as_save_IFS
20027
20028 ;;
20029esac
20030# We did not find ourselves, most probably we were run as `sh COMMAND'
20031# in which case we are not to be found in the path.
20032if test "x$as_myself" = x; then
20033 as_myself=$0
20034fi
20035if test ! -f "$as_myself"; then
20036 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20037 exit 1
20038fi
20039
20040# Unset variables that we do not need and which cause bugs (e.g. in
20041# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20042# suppresses any "Segmentation fault" message there. '((' could
20043# trigger a bug in pdksh 5.2.14.
20044for as_var in BASH_ENV ENV MAIL MAILPATH
20045do eval test x\${$as_var+set} = xset \
20046 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20047done
bec39cab
AC
20048PS1='$ '
20049PS2='> '
20050PS4='+ '
20051
20052# NLS nuisances.
81ecdfbb
RW
20053LC_ALL=C
20054export LC_ALL
20055LANGUAGE=C
20056export LANGUAGE
20057
20058# CDPATH.
20059(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20060
20061
d0ac1c44
SM
20062# as_fn_error STATUS ERROR [LINENO LOG_FD]
20063# ----------------------------------------
81ecdfbb
RW
20064# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20065# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 20066# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
20067as_fn_error ()
20068{
d0ac1c44
SM
20069 as_status=$1; test $as_status -eq 0 && as_status=1
20070 if test "$4"; then
20071 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20072 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 20073 fi
d0ac1c44 20074 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
20075 as_fn_exit $as_status
20076} # as_fn_error
20077
20078
20079# as_fn_set_status STATUS
20080# -----------------------
20081# Set $? to STATUS, without forking.
20082as_fn_set_status ()
20083{
20084 return $1
20085} # as_fn_set_status
20086
20087# as_fn_exit STATUS
20088# -----------------
20089# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20090as_fn_exit ()
20091{
20092 set +e
20093 as_fn_set_status $1
20094 exit $1
20095} # as_fn_exit
20096
20097# as_fn_unset VAR
20098# ---------------
20099# Portably unset VAR.
20100as_fn_unset ()
20101{
20102 { eval $1=; unset $1;}
20103}
20104as_unset=as_fn_unset
20105# as_fn_append VAR VALUE
20106# ----------------------
20107# Append the text in VALUE to the end of the definition contained in VAR. Take
20108# advantage of any shell optimizations that allow amortized linear growth over
20109# repeated appends, instead of the typical quadratic growth present in naive
20110# implementations.
20111if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20112 eval 'as_fn_append ()
20113 {
20114 eval $1+=\$2
20115 }'
20116else
20117 as_fn_append ()
20118 {
20119 eval $1=\$$1\$2
20120 }
20121fi # as_fn_append
20122
20123# as_fn_arith ARG...
20124# ------------------
20125# Perform arithmetic evaluation on the ARGs, and store the result in the
20126# global $as_val. Take advantage of shells that can avoid forks. The arguments
20127# must be portable across $(()) and expr.
20128if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20129 eval 'as_fn_arith ()
20130 {
20131 as_val=$(( $* ))
20132 }'
20133else
20134 as_fn_arith ()
20135 {
20136 as_val=`expr "$@" || test $? -eq 1`
20137 }
20138fi # as_fn_arith
bec39cab 20139
81ecdfbb
RW
20140
20141if expr a : '\(a\)' >/dev/null 2>&1 &&
20142 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
20143 as_expr=expr
20144else
20145 as_expr=false
20146fi
20147
81ecdfbb 20148if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
20149 as_basename=basename
20150else
20151 as_basename=false
20152fi
20153
81ecdfbb
RW
20154if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20155 as_dirname=dirname
20156else
20157 as_dirname=false
20158fi
bec39cab 20159
81ecdfbb 20160as_me=`$as_basename -- "$0" ||
bec39cab
AC
20161$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20162 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
20163 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20164$as_echo X/"$0" |
20165 sed '/^.*\/\([^/][^/]*\)\/*$/{
20166 s//\1/
20167 q
20168 }
20169 /^X\/\(\/\/\)$/{
20170 s//\1/
20171 q
20172 }
20173 /^X\/\(\/\).*/{
20174 s//\1/
20175 q
20176 }
20177 s/.*/./; q'`
b4e70030 20178
b4e70030
JB
20179# Avoid depending upon Character Ranges.
20180as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20181as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20182as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20183as_cr_digits='0123456789'
20184as_cr_alnum=$as_cr_Letters$as_cr_digits
20185
81ecdfbb
RW
20186ECHO_C= ECHO_N= ECHO_T=
20187case `echo -n x` in #(((((
20188-n*)
20189 case `echo 'xy\c'` in
20190 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20191 xy) ECHO_C='\c';;
20192 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20193 ECHO_T=' ';;
20194 esac;;
20195*)
20196 ECHO_N='-n';;
bec39cab
AC
20197esac
20198
81ecdfbb
RW
20199rm -f conf$$ conf$$.exe conf$$.file
20200if test -d conf$$.dir; then
20201 rm -f conf$$.dir/conf$$.file
bec39cab 20202else
81ecdfbb
RW
20203 rm -f conf$$.dir
20204 mkdir conf$$.dir 2>/dev/null
bec39cab 20205fi
81ecdfbb
RW
20206if (echo >conf$$.file) 2>/dev/null; then
20207 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 20208 as_ln_s='ln -s'
81ecdfbb
RW
20209 # ... but there are two gotchas:
20210 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20211 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 20212 # In both cases, we have to default to `cp -pR'.
81ecdfbb 20213 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 20214 as_ln_s='cp -pR'
81ecdfbb
RW
20215 elif ln conf$$.file conf$$ 2>/dev/null; then
20216 as_ln_s=ln
20217 else
d0ac1c44 20218 as_ln_s='cp -pR'
b4e70030 20219 fi
bec39cab 20220else
d0ac1c44 20221 as_ln_s='cp -pR'
bec39cab 20222fi
81ecdfbb
RW
20223rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20224rmdir conf$$.dir 2>/dev/null
20225
20226
20227# as_fn_mkdir_p
20228# -------------
20229# Create "$as_dir" as a directory, including parents if necessary.
20230as_fn_mkdir_p ()
20231{
20232
20233 case $as_dir in #(
20234 -*) as_dir=./$as_dir;;
20235 esac
20236 test -d "$as_dir" || eval $as_mkdir_p || {
20237 as_dirs=
20238 while :; do
20239 case $as_dir in #(
20240 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20241 *) as_qdir=$as_dir;;
20242 esac
20243 as_dirs="'$as_qdir' $as_dirs"
20244 as_dir=`$as_dirname -- "$as_dir" ||
20245$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20246 X"$as_dir" : 'X\(//\)[^/]' \| \
20247 X"$as_dir" : 'X\(//\)$' \| \
20248 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20249$as_echo X"$as_dir" |
20250 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20251 s//\1/
20252 q
20253 }
20254 /^X\(\/\/\)[^/].*/{
20255 s//\1/
20256 q
20257 }
20258 /^X\(\/\/\)$/{
20259 s//\1/
20260 q
20261 }
20262 /^X\(\/\).*/{
20263 s//\1/
20264 q
20265 }
20266 s/.*/./; q'`
20267 test -d "$as_dir" && break
20268 done
20269 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 20270 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 20271
bec39cab 20272
81ecdfbb 20273} # as_fn_mkdir_p
bec39cab 20274if mkdir -p . 2>/dev/null; then
81ecdfbb 20275 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
20276else
20277 test -d ./-p && rmdir ./-p
20278 as_mkdir_p=false
20279fi
20280
d0ac1c44
SM
20281
20282# as_fn_executable_p FILE
20283# -----------------------
20284# Test if FILE is an executable regular file.
20285as_fn_executable_p ()
20286{
20287 test -f "$1" && test -x "$1"
20288} # as_fn_executable_p
20289as_test_x='test -x'
20290as_executable_p=as_fn_executable_p
bec39cab
AC
20291
20292# Sed expression to map a string onto a valid CPP name.
20293as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20294
20295# Sed expression to map a string onto a valid variable name.
20296as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20297
20298
bec39cab 20299exec 6>&1
81ecdfbb
RW
20300## ----------------------------------- ##
20301## Main body of $CONFIG_STATUS script. ##
20302## ----------------------------------- ##
20303_ASEOF
20304test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20305
20306cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20307# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 20308# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
20309# values after options handling.
20310ac_log="
bec39cab 20311This file was extended by $as_me, which was
d0ac1c44 20312generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
20313
20314 CONFIG_FILES = $CONFIG_FILES
20315 CONFIG_HEADERS = $CONFIG_HEADERS
20316 CONFIG_LINKS = $CONFIG_LINKS
20317 CONFIG_COMMANDS = $CONFIG_COMMANDS
20318 $ $0 $@
20319
81ecdfbb
RW
20320on `(hostname || uname -n) 2>/dev/null | sed 1q`
20321"
20322
bec39cab
AC
20323_ACEOF
20324
81ecdfbb
RW
20325case $ac_config_files in *"
20326"*) set x $ac_config_files; shift; ac_config_files=$*;;
20327esac
234b45d4 20328
81ecdfbb
RW
20329case $ac_config_headers in *"
20330"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20331esac
b4e70030 20332
b4e70030 20333
81ecdfbb
RW
20334cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20335# Files that config.status was made for.
20336config_files="$ac_config_files"
20337config_headers="$ac_config_headers"
20338config_links="$ac_config_links"
20339config_commands="$ac_config_commands"
234b45d4 20340
81ecdfbb 20341_ACEOF
b4e70030 20342
81ecdfbb 20343cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 20344ac_cs_usage="\
81ecdfbb
RW
20345\`$as_me' instantiates files and other configuration actions
20346from templates according to the current configuration. Unless the files
20347and actions are specified as TAGs, all are instantiated by default.
234b45d4 20348
81ecdfbb 20349Usage: $0 [OPTION]... [TAG]...
234b45d4 20350
bec39cab 20351 -h, --help print this help, then exit
81ecdfbb 20352 -V, --version print version number and configuration settings, then exit
d0ac1c44 20353 --config print configuration, then exit
81ecdfbb
RW
20354 -q, --quiet, --silent
20355 do not print progress messages
bec39cab
AC
20356 -d, --debug don't remove temporary files
20357 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
20358 --file=FILE[:TEMPLATE]
20359 instantiate the configuration file FILE
20360 --header=FILE[:TEMPLATE]
20361 instantiate the configuration header FILE
234b45d4 20362
bec39cab
AC
20363Configuration files:
20364$config_files
234b45d4 20365
bec39cab
AC
20366Configuration headers:
20367$config_headers
234b45d4 20368
bec39cab
AC
20369Configuration links:
20370$config_links
234b45d4 20371
bec39cab
AC
20372Configuration commands:
20373$config_commands
20374
81ecdfbb 20375Report bugs to the package provider."
b4e70030 20376
81ecdfbb
RW
20377_ACEOF
20378cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 20379ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
20380ac_cs_version="\\
20381config.status
d0ac1c44
SM
20382configured by $0, generated by GNU Autoconf 2.69,
20383 with options \\"\$ac_cs_config\\"
bec39cab 20384
d0ac1c44 20385Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
20386This config.status script is free software; the Free Software Foundation
20387gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
20388
20389ac_pwd='$ac_pwd'
20390srcdir='$srcdir'
20391INSTALL='$INSTALL'
81ecdfbb
RW
20392AWK='$AWK'
20393test -n "\$AWK" || AWK=awk
bec39cab
AC
20394_ACEOF
20395
81ecdfbb
RW
20396cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20397# The default lists apply if the user does not specify any file.
bec39cab
AC
20398ac_need_defaults=:
20399while test $# != 0
20400do
20401 case $1 in
d0ac1c44 20402 --*=?*)
81ecdfbb
RW
20403 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20404 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 20405 ac_shift=:
c906108c 20406 ;;
d0ac1c44
SM
20407 --*=)
20408 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20409 ac_optarg=
20410 ac_shift=:
20411 ;;
81ecdfbb 20412 *)
bec39cab
AC
20413 ac_option=$1
20414 ac_optarg=$2
20415 ac_shift=shift
c906108c 20416 ;;
bec39cab 20417 esac
c906108c 20418
bec39cab
AC
20419 case $ac_option in
20420 # Handling of the options.
bec39cab
AC
20421 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20422 ac_cs_recheck=: ;;
81ecdfbb
RW
20423 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20424 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
20425 --config | --confi | --conf | --con | --co | --c )
20426 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 20427 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
20428 debug=: ;;
20429 --file | --fil | --fi | --f )
20430 $ac_shift
81ecdfbb
RW
20431 case $ac_optarg in
20432 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 20433 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
20434 esac
20435 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
20436 ac_need_defaults=false;;
20437 --header | --heade | --head | --hea )
20438 $ac_shift
81ecdfbb
RW
20439 case $ac_optarg in
20440 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20441 esac
20442 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 20443 ac_need_defaults=false;;
81ecdfbb
RW
20444 --he | --h)
20445 # Conflict between --help and --header
d0ac1c44 20446 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
20447Try \`$0 --help' for more information.";;
20448 --help | --hel | -h )
20449 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
20450 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20451 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20452 ac_cs_silent=: ;;
c906108c 20453
bec39cab 20454 # This is an error.
d0ac1c44 20455 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 20456Try \`$0 --help' for more information." ;;
c906108c 20457
81ecdfbb
RW
20458 *) as_fn_append ac_config_targets " $1"
20459 ac_need_defaults=false ;;
c906108c 20460
bec39cab
AC
20461 esac
20462 shift
20463done
c906108c 20464
bec39cab 20465ac_configure_extra_args=
c906108c 20466
bec39cab
AC
20467if $ac_cs_silent; then
20468 exec 6>/dev/null
20469 ac_configure_extra_args="$ac_configure_extra_args --silent"
20470fi
c906108c 20471
bec39cab 20472_ACEOF
81ecdfbb 20473cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 20474if \$ac_cs_recheck; then
d0ac1c44 20475 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
20476 shift
20477 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20478 CONFIG_SHELL='$SHELL'
20479 export CONFIG_SHELL
20480 exec "\$@"
bec39cab
AC
20481fi
20482
20483_ACEOF
81ecdfbb
RW
20484cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20485exec 5>>config.log
20486{
20487 echo
20488 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20489## Running $as_me. ##
20490_ASBOX
20491 $as_echo "$ac_log"
20492} >&5
bec39cab 20493
81ecdfbb
RW
20494_ACEOF
20495cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 20496#
81ecdfbb 20497# INIT-COMMANDS
c906108c 20498#
a417dc56 20499ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 20500GDB_NM_FILE=$GDB_NM_FILE
b4e70030 20501
bec39cab
AC
20502_ACEOF
20503
81ecdfbb 20504cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 20505
81ecdfbb 20506# Handling of arguments.
bec39cab 20507for ac_config_target in $ac_config_targets
c906108c 20508do
81ecdfbb
RW
20509 case $ac_config_target in
20510 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20511 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 20512 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 20513 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 20514 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 20515 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 20516 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 20517 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 20518 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 20519 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 20520
d0ac1c44 20521 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
20522 esac
20523done
20524
81ecdfbb 20525
bec39cab
AC
20526# If the user did not use the arguments to specify the items to instantiate,
20527# then the envvar interface is used. Set only those that are not.
20528# We use the long form for the default assignment because of an extremely
20529# bizarre bug on SunOS 4.1.3.
20530if $ac_need_defaults; then
20531 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20532 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20533 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20534 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20535fi
20536
b4e70030 20537# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 20538# simply because there is no reason against having it here, and in addition,
b4e70030 20539# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
20540# Hook for its removal unless debugging.
20541# Note that there is a small window in which the directory will not be cleaned:
20542# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
20543$debug ||
20544{
d0ac1c44 20545 tmp= ac_tmp=
81ecdfbb 20546 trap 'exit_status=$?
d0ac1c44
SM
20547 : "${ac_tmp:=$tmp}"
20548 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
20549' 0
20550 trap 'as_fn_exit 1' 1 2 13 15
20551}
20552# Create a (secure) tmp directory for tmp files.
20553
20554{
20555 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 20556 test -d "$tmp"
81ecdfbb
RW
20557} ||
20558{
20559 tmp=./conf$$-$RANDOM
20560 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
20561} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20562ac_tmp=$tmp
81ecdfbb
RW
20563
20564# Set up the scripts for CONFIG_FILES section.
20565# No need to generate them if there are no CONFIG_FILES.
20566# This happens for instance with `./config.status config.h'.
20567if test -n "$CONFIG_FILES"; then
20568
20569if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20570 ac_cs_awk_getline=:
20571 ac_cs_awk_pipe_init=
20572 ac_cs_awk_read_file='
20573 while ((getline aline < (F[key])) > 0)
20574 print(aline)
20575 close(F[key])'
20576 ac_cs_awk_pipe_fini=
20577else
20578 ac_cs_awk_getline=false
20579 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20580 ac_cs_awk_read_file='
20581 print "|#_!!_#|"
20582 print "cat " F[key] " &&"
20583 '$ac_cs_awk_pipe_init
20584 # The final `:' finishes the AND list.
20585 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20586fi
20587ac_cr=`echo X | tr X '\015'`
20588# On cygwin, bash can eat \r inside `` if the user requested igncr.
20589# But we know of no other shell where ac_cr would be empty at this
20590# point, so we can use a bashism as a fallback.
20591if test "x$ac_cr" = x; then
20592 eval ac_cr=\$\'\\r\'
20593fi
20594ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20595if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 20596 ac_cs_awk_cr='\\r'
81ecdfbb
RW
20597else
20598 ac_cs_awk_cr=$ac_cr
20599fi
20600
d0ac1c44 20601echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
20602_ACEOF
20603
20604# Create commands to substitute file output variables.
20605{
20606 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 20607 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
20608 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20609 echo "_ACAWK" &&
20610 echo "_ACEOF"
20611} >conf$$files.sh &&
20612. ./conf$$files.sh ||
d0ac1c44 20613 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20614rm -f conf$$files.sh
20615
20616{
20617 echo "cat >conf$$subs.awk <<_ACEOF" &&
20618 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20619 echo "_ACEOF"
20620} >conf$$subs.sh ||
d0ac1c44
SM
20621 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20622ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
20623ac_delim='%!_!# '
20624for ac_last_try in false false false false false :; do
20625 . ./conf$$subs.sh ||
d0ac1c44 20626 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20627
20628 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20629 if test $ac_delim_n = $ac_delim_num; then
20630 break
20631 elif $ac_last_try; then
d0ac1c44 20632 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20633 else
20634 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20635 fi
20636done
20637rm -f conf$$subs.sh
20638
20639cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 20640cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
20641_ACEOF
20642sed -n '
20643h
20644s/^/S["/; s/!.*/"]=/
20645p
20646g
20647s/^[^!]*!//
20648:repl
20649t repl
20650s/'"$ac_delim"'$//
20651t delim
20652:nl
20653h
d0ac1c44 20654s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20655t more1
20656s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20657p
20658n
20659b repl
20660:more1
20661s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20662p
20663g
20664s/.\{148\}//
20665t nl
20666:delim
20667h
d0ac1c44 20668s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20669t more2
20670s/["\\]/\\&/g; s/^/"/; s/$/"/
20671p
20672b
20673:more2
20674s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20675p
20676g
20677s/.\{148\}//
20678t delim
20679' <conf$$subs.awk | sed '
20680/^[^""]/{
20681 N
20682 s/\n//
20683}
20684' >>$CONFIG_STATUS || ac_write_fail=1
20685rm -f conf$$subs.awk
20686cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20687_ACAWK
d0ac1c44 20688cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
20689 for (key in S) S_is_set[key] = 1
20690 FS = "\a"
20691 \$ac_cs_awk_pipe_init
20692}
20693{
20694 line = $ 0
20695 nfields = split(line, field, "@")
20696 substed = 0
20697 len = length(field[1])
20698 for (i = 2; i < nfields; i++) {
20699 key = field[i]
20700 keylen = length(key)
20701 if (S_is_set[key]) {
20702 value = S[key]
20703 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20704 len += length(value) + length(field[++i])
20705 substed = 1
20706 } else
20707 len += 1 + keylen
20708 }
20709 if (nfields == 3 && !substed) {
20710 key = field[2]
20711 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20712 \$ac_cs_awk_read_file
20713 next
20714 }
20715 }
20716 print line
b4e70030 20717}
81ecdfbb
RW
20718\$ac_cs_awk_pipe_fini
20719_ACAWK
20720_ACEOF
20721cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20722if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20723 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20724else
20725 cat
d0ac1c44
SM
20726fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20727 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
20728_ACEOF
20729
d0ac1c44
SM
20730# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20731# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
20732# trailing colons and then remove the whole line if VPATH becomes empty
20733# (actually we leave an empty line to preserve line numbers).
20734if test "x$srcdir" = x.; then
d0ac1c44
SM
20735 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20736h
20737s///
20738s/^/:/
20739s/[ ]*$/:/
20740s/:\$(srcdir):/:/g
20741s/:\${srcdir}:/:/g
20742s/:@srcdir@:/:/g
20743s/^:*//
81ecdfbb 20744s/:*$//
d0ac1c44
SM
20745x
20746s/\(=[ ]*\).*/\1/
20747G
20748s/\n//
81ecdfbb
RW
20749s/^[^=]*=[ ]*$//
20750}'
20751fi
20752
20753cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20754fi # test -n "$CONFIG_FILES"
20755
20756# Set up the scripts for CONFIG_HEADERS section.
20757# No need to generate them if there are no CONFIG_HEADERS.
20758# This happens for instance with `./config.status Makefile'.
20759if test -n "$CONFIG_HEADERS"; then
d0ac1c44 20760cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
20761BEGIN {
20762_ACEOF
20763
20764# Transform confdefs.h into an awk script `defines.awk', embedded as
20765# here-document in config.status, that substitutes the proper values into
20766# config.h.in to produce config.h.
4e8d927d 20767
81ecdfbb
RW
20768# Create a delimiter string that does not exist in confdefs.h, to ease
20769# handling of long lines.
20770ac_delim='%!_!# '
20771for ac_last_try in false false :; do
d0ac1c44
SM
20772 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20773 if test -z "$ac_tt"; then
81ecdfbb
RW
20774 break
20775 elif $ac_last_try; then
d0ac1c44 20776 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
20777 else
20778 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20779 fi
20780done
4e8d927d 20781
81ecdfbb
RW
20782# For the awk script, D is an array of macro values keyed by name,
20783# likewise P contains macro parameters if any. Preserve backslash
20784# newline sequences.
20785
20786ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20787sed -n '
20788s/.\{148\}/&'"$ac_delim"'/g
20789t rset
20790:rset
20791s/^[ ]*#[ ]*define[ ][ ]*/ /
20792t def
20793d
20794:def
20795s/\\$//
20796t bsnl
20797s/["\\]/\\&/g
20798s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20799D["\1"]=" \3"/p
20800s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20801d
20802:bsnl
20803s/["\\]/\\&/g
20804s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20805D["\1"]=" \3\\\\\\n"\\/p
20806t cont
20807s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20808t cont
20809d
20810:cont
20811n
20812s/.\{148\}/&'"$ac_delim"'/g
20813t clear
20814:clear
20815s/\\$//
20816t bsnlc
20817s/["\\]/\\&/g; s/^/"/; s/$/"/p
20818d
20819:bsnlc
20820s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20821b cont
20822' <confdefs.h | sed '
20823s/'"$ac_delim"'/"\\\
20824"/g' >>$CONFIG_STATUS || ac_write_fail=1
20825
20826cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20827 for (key in D) D_is_set[key] = 1
20828 FS = "\a"
20829}
20830/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20831 line = \$ 0
20832 split(line, arg, " ")
20833 if (arg[1] == "#") {
20834 defundef = arg[2]
20835 mac1 = arg[3]
20836 } else {
20837 defundef = substr(arg[1], 2)
20838 mac1 = arg[2]
20839 }
20840 split(mac1, mac2, "(") #)
20841 macro = mac2[1]
20842 prefix = substr(line, 1, index(line, defundef) - 1)
20843 if (D_is_set[macro]) {
20844 # Preserve the white space surrounding the "#".
20845 print prefix "define", macro P[macro] D[macro]
20846 next
20847 } else {
20848 # Replace #undef with comments. This is necessary, for example,
20849 # in the case of _POSIX_SOURCE, which is predefined and required
20850 # on some systems where configure will not decide to define it.
20851 if (defundef == "undef") {
20852 print "/*", prefix defundef, macro, "*/"
20853 next
20854 }
20855 }
b4e70030 20856}
81ecdfbb
RW
20857{ print }
20858_ACAWK
b4e70030 20859_ACEOF
81ecdfbb 20860cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 20861 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 20862fi # test -n "$CONFIG_HEADERS"
4e8d927d 20863
4e8d927d 20864
81ecdfbb
RW
20865eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20866shift
20867for ac_tag
20868do
20869 case $ac_tag in
20870 :[FHLC]) ac_mode=$ac_tag; continue;;
20871 esac
20872 case $ac_mode$ac_tag in
20873 :[FHL]*:*);;
d0ac1c44 20874 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
20875 :[FH]-) ac_tag=-:-;;
20876 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20877 esac
20878 ac_save_IFS=$IFS
20879 IFS=:
20880 set x $ac_tag
20881 IFS=$ac_save_IFS
20882 shift
20883 ac_file=$1
20884 shift
4e8d927d 20885
81ecdfbb
RW
20886 case $ac_mode in
20887 :L) ac_source=$1;;
20888 :[FH])
20889 ac_file_inputs=
20890 for ac_f
20891 do
20892 case $ac_f in
d0ac1c44 20893 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
20894 *) # Look for the file first in the build tree, then in the source tree
20895 # (if the path is not absolute). The absolute path cannot be DOS-style,
20896 # because $ac_f cannot contain `:'.
20897 test -f "$ac_f" ||
20898 case $ac_f in
20899 [\\/$]*) false;;
20900 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20901 esac ||
d0ac1c44 20902 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
20903 esac
20904 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20905 as_fn_append ac_file_inputs " '$ac_f'"
20906 done
20907
20908 # Let's still pretend it is `configure' which instantiates (i.e., don't
20909 # use $as_me), people would be surprised to read:
20910 # /* config.h. Generated by config.status. */
20911 configure_input='Generated from '`
20912 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20913 `' by configure.'
20914 if test x"$ac_file" != x-; then
20915 configure_input="$ac_file. $configure_input"
20916 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20917$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 20918 fi
81ecdfbb
RW
20919 # Neutralize special characters interpreted by sed in replacement strings.
20920 case $configure_input in #(
20921 *\&* | *\|* | *\\* )
20922 ac_sed_conf_input=`$as_echo "$configure_input" |
20923 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20924 *) ac_sed_conf_input=$configure_input;;
20925 esac
4e8d927d 20926
81ecdfbb 20927 case $ac_tag in
d0ac1c44
SM
20928 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20929 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
20930 esac
20931 ;;
c906108c
SS
20932 esac
20933
81ecdfbb 20934 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
20935$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20936 X"$ac_file" : 'X\(//\)[^/]' \| \
20937 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
20938 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20939$as_echo X"$ac_file" |
20940 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20941 s//\1/
20942 q
20943 }
20944 /^X\(\/\/\)[^/].*/{
20945 s//\1/
20946 q
20947 }
20948 /^X\(\/\/\)$/{
20949 s//\1/
20950 q
20951 }
20952 /^X\(\/\).*/{
20953 s//\1/
20954 q
20955 }
20956 s/.*/./; q'`
20957 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20958 ac_builddir=.
20959
81ecdfbb
RW
20960case "$ac_dir" in
20961.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20962*)
20963 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20964 # A ".." for each directory in $ac_dir_suffix.
20965 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20966 case $ac_top_builddir_sub in
20967 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20968 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20969 esac ;;
20970esac
20971ac_abs_top_builddir=$ac_pwd
20972ac_abs_builddir=$ac_pwd$ac_dir_suffix
20973# for backward compatibility:
20974ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20975
20976case $srcdir in
81ecdfbb 20977 .) # We are building in place.
bec39cab 20978 ac_srcdir=.
81ecdfbb
RW
20979 ac_top_srcdir=$ac_top_builddir_sub
20980 ac_abs_top_srcdir=$ac_pwd ;;
20981 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20982 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20983 ac_top_srcdir=$srcdir
20984 ac_abs_top_srcdir=$srcdir ;;
20985 *) # Relative name.
20986 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20987 ac_top_srcdir=$ac_top_build_prefix$srcdir
20988 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20989esac
81ecdfbb 20990ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 20991
c906108c 20992
81ecdfbb
RW
20993 case $ac_mode in
20994 :F)
20995 #
20996 # CONFIG_FILE
20997 #
c906108c 20998
bec39cab
AC
20999 case $INSTALL in
21000 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 21001 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 21002 esac
81ecdfbb 21003_ACEOF
121ce6e5 21004
81ecdfbb
RW
21005cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21006# If the template does not know about datarootdir, expand it.
21007# FIXME: This hack should be removed a few years after 2.60.
21008ac_datarootdir_hack=; ac_datarootdir_seen=
21009ac_sed_dataroot='
21010/datarootdir/ {
21011 p
21012 q
21013}
21014/@datadir@/p
21015/@docdir@/p
21016/@infodir@/p
21017/@localedir@/p
21018/@mandir@/p'
21019case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21020*datarootdir*) ac_datarootdir_seen=yes;;
21021*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21022 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21023$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21024_ACEOF
21025cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21026 ac_datarootdir_hack='
21027 s&@datadir@&$datadir&g
21028 s&@docdir@&$docdir&g
21029 s&@infodir@&$infodir&g
21030 s&@localedir@&$localedir&g
21031 s&@mandir@&$mandir&g
21032 s&\\\${datarootdir}&$datarootdir&g' ;;
21033esac
4e8d927d 21034_ACEOF
81ecdfbb
RW
21035
21036# Neutralize VPATH when `$srcdir' = `.'.
21037# Shell code in configure.ac might set extrasub.
21038# FIXME: do we really want to maintain this feature?
21039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21040ac_sed_extra="$ac_vpsub
bec39cab
AC
21041$extrasub
21042_ACEOF
81ecdfbb 21043cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
21044:t
21045/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
21046s|@configure_input@|$ac_sed_conf_input|;t t
21047s&@top_builddir@&$ac_top_builddir_sub&;t t
21048s&@top_build_prefix@&$ac_top_build_prefix&;t t
21049s&@srcdir@&$ac_srcdir&;t t
21050s&@abs_srcdir@&$ac_abs_srcdir&;t t
21051s&@top_srcdir@&$ac_top_srcdir&;t t
21052s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21053s&@builddir@&$ac_builddir&;t t
21054s&@abs_builddir@&$ac_abs_builddir&;t t
21055s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21056s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
21057$ac_datarootdir_hack
21058"
21059eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
21060if $ac_cs_awk_getline; then
d0ac1c44 21061 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 21062else
d0ac1c44
SM
21063 $AWK -f "$ac_tmp/subs.awk" | $SHELL
21064fi \
21065 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
21066
21067test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
21068 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21069 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21070 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 21071 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 21072which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 21073$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 21074which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 21075
d0ac1c44 21076 rm -f "$ac_tmp/stdin"
bec39cab 21077 case $ac_file in
d0ac1c44
SM
21078 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21079 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 21080 esac \
d0ac1c44 21081 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
21082 ;;
21083 :H)
21084 #
21085 # CONFIG_HEADER
21086 #
bec39cab 21087 if test x"$ac_file" != x-; then
81ecdfbb
RW
21088 {
21089 $as_echo "/* $configure_input */" \
d0ac1c44
SM
21090 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21091 } >"$ac_tmp/config.h" \
21092 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21093 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
21094 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21095$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 21096 else
81ecdfbb 21097 rm -f "$ac_file"
d0ac1c44
SM
21098 mv "$ac_tmp/config.h" "$ac_file" \
21099 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
21100 fi
21101 else
81ecdfbb 21102 $as_echo "/* $configure_input */" \
d0ac1c44
SM
21103 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21104 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 21105 fi
81ecdfbb
RW
21106 ;;
21107 :L)
21108 #
21109 # CONFIG_LINK
21110 #
c906108c 21111
81ecdfbb
RW
21112 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
21113 :
b4e70030 21114 else
81ecdfbb
RW
21115 # Prefer the file from the source tree if names are identical.
21116 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
21117 ac_source=$srcdir/$ac_source
21118 fi
b4e70030 21119
81ecdfbb
RW
21120 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
21121$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 21122
81ecdfbb 21123 if test ! -r "$ac_source"; then
d0ac1c44 21124 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
21125 fi
21126 rm -f "$ac_file"
bec39cab 21127
81ecdfbb 21128 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 21129 case $ac_source in
81ecdfbb
RW
21130 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
21131 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
21132 esac
21133 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
21134 ln "$ac_source" "$ac_file" 2>/dev/null ||
21135 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 21136 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
21137 fi
21138 ;;
21139 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21140$as_echo "$as_me: executing $ac_file commands" >&6;}
21141 ;;
c906108c 21142 esac
b4e70030 21143
bec39cab 21144
81ecdfbb 21145 case $ac_file$ac_mode in
c5adaa19 21146 "config.h":H) echo > stamp-h ;;
81ecdfbb 21147 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 21148 "nm.h":L) echo > stamp-nmh ;;
b292c783 21149 "gcore":F) chmod +x gcore ;;
81ecdfbb 21150
bec39cab 21151 esac
81ecdfbb 21152done # for ac_tag
c906108c 21153
bec39cab 21154
81ecdfbb 21155as_fn_exit 0
bec39cab 21156_ACEOF
bec39cab
AC
21157ac_clean_files=$ac_clean_files_save
21158
81ecdfbb 21159test $ac_write_fail = 0 ||
d0ac1c44 21160 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 21161
bec39cab
AC
21162
21163# configure is writing to config.log, and then calls config.status.
21164# config.status does its own redirection, appending to config.log.
21165# Unfortunately, on DOS this fails, as config.log is still kept open
21166# by configure, so config.status won't be able to write to it; its
21167# output is simply discarded. So we exec the FD to /dev/null,
21168# effectively closing config.log, so it can be properly (re)opened and
21169# appended to by config.status. When coming back to configure, we
21170# need to make the FD available again.
21171if test "$no_create" != yes; then
21172 ac_cs_success=:
21173 ac_config_status_args=
21174 test "$silent" = yes &&
21175 ac_config_status_args="$ac_config_status_args --quiet"
21176 exec 5>/dev/null
21177 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21178 exec 5>>config.log
21179 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21180 # would make configure fail if this is the last instruction.
d0ac1c44 21181 $ac_cs_success || as_fn_exit 1
bec39cab 21182fi
c906108c 21183
bec39cab 21184#
81ecdfbb 21185# CONFIG_SUBDIRS section.
bec39cab 21186#
c906108c
SS
21187if test "$no_recursion" != yes; then
21188
81ecdfbb
RW
21189 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
21190 # so they do not pile up.
c906108c
SS
21191 ac_sub_configure_args=
21192 ac_prev=
fdc59709
PB
21193 eval "set x $ac_configure_args"
21194 shift
21195 for ac_arg
21196 do
c906108c
SS
21197 if test -n "$ac_prev"; then
21198 ac_prev=
21199 continue
21200 fi
bec39cab 21201 case $ac_arg in
c906108c
SS
21202 -cache-file | --cache-file | --cache-fil | --cache-fi \
21203 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
21204 ac_prev=cache_file ;;
21205 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
21206 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
21207 | --c=*)
21208 ;;
21209 --config-cache | -C)
c906108c
SS
21210 ;;
21211 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
21212 ac_prev=srcdir ;;
21213 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
21214 ;;
bec39cab
AC
21215 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
21216 ac_prev=prefix ;;
21217 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
21218 ;;
81ecdfbb
RW
21219 --disable-option-checking)
21220 ;;
fdc59709
PB
21221 *)
21222 case $ac_arg in
81ecdfbb 21223 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 21224 esac
81ecdfbb 21225 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
21226 esac
21227 done
21228
bec39cab
AC
21229 # Always prepend --prefix to ensure using the same prefix
21230 # in subdir configurations.
fdc59709
PB
21231 ac_arg="--prefix=$prefix"
21232 case $ac_arg in
81ecdfbb 21233 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 21234 esac
81ecdfbb
RW
21235 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
21236
21237 # Pass --silent
21238 if test "$silent" = yes; then
21239 ac_sub_configure_args="--silent $ac_sub_configure_args"
21240 fi
21241
21242 # Always prepend --disable-option-checking to silence warnings, since
21243 # different subdirs can have different --enable and --with options.
21244 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 21245
b4e70030 21246 ac_popdir=`pwd`
bec39cab 21247 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
21248
21249 # Do not complain, so a configure script can configure whichever
21250 # parts of a large source tree are present.
fdc59709 21251 test -d "$srcdir/$ac_dir" || continue
c906108c 21252
81ecdfbb
RW
21253 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
21254 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
21255 $as_echo "$ac_msg" >&6
21256 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
21257 ac_builddir=.
21258
81ecdfbb
RW
21259case "$ac_dir" in
21260.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21261*)
21262 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21263 # A ".." for each directory in $ac_dir_suffix.
21264 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21265 case $ac_top_builddir_sub in
21266 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21267 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21268 esac ;;
21269esac
21270ac_abs_top_builddir=$ac_pwd
21271ac_abs_builddir=$ac_pwd$ac_dir_suffix
21272# for backward compatibility:
21273ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
21274
21275case $srcdir in
81ecdfbb 21276 .) # We are building in place.
bec39cab 21277 ac_srcdir=.
81ecdfbb
RW
21278 ac_top_srcdir=$ac_top_builddir_sub
21279 ac_abs_top_srcdir=$ac_pwd ;;
21280 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 21281 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
21282 ac_top_srcdir=$srcdir
21283 ac_abs_top_srcdir=$srcdir ;;
21284 *) # Relative name.
21285 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21286 ac_top_srcdir=$ac_top_build_prefix$srcdir
21287 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 21288esac
81ecdfbb 21289ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 21290
c906108c 21291
fdc59709 21292 cd "$ac_dir"
c906108c
SS
21293
21294 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
21295 if test -f "$ac_srcdir/configure.gnu"; then
21296 ac_sub_configure=$ac_srcdir/configure.gnu
21297 elif test -f "$ac_srcdir/configure"; then
21298 ac_sub_configure=$ac_srcdir/configure
21299 elif test -f "$ac_srcdir/configure.in"; then
21300 # This should be Cygnus configure.
21301 ac_sub_configure=$ac_aux_dir/configure
c906108c 21302 else
81ecdfbb
RW
21303 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
21304$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
21305 ac_sub_configure=
21306 fi
21307
21308 # The recursion is here.
21309 if test -n "$ac_sub_configure"; then
c906108c 21310 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
21311 case $cache_file in
21312 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
21313 *) # Relative name.
21314 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 21315 esac
c906108c 21316
81ecdfbb
RW
21317 { $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
21318$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 21319 # The eval makes quoting arguments work.
fdc59709
PB
21320 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
21321 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 21322 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
21323 fi
21324
fdc59709 21325 cd "$ac_popdir"
c906108c
SS
21326 done
21327fi
81ecdfbb
RW
21328if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21330$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21331fi
c906108c 21332
This page took 3.706415 seconds and 4 git commands to generate.