Use malloc/free in the dbgapi callbacks
[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.
4e5106e6 7# Copyright (C) 2019-2020 Advanced Micro Devices, Inc. All rights reserved.
81ecdfbb 8#
c906108c
SS
9#
10# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
12## -------------------- ##
13## M4sh Initialization. ##
14## -------------------- ##
bec39cab 15
81ecdfbb
RW
16# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
18if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
19 emulate sh
20 NULLCMD=:
81ecdfbb 21 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
24 setopt NO_GLOB_SUBST
25else
26 case `(set -o) 2>/dev/null` in #(
27 *posix*) :
28 set -o posix ;; #(
29 *) :
30 ;;
31esac
bec39cab 32fi
bec39cab 33
81ecdfbb
RW
34
35as_nl='
36'
37export as_nl
38# Printing a long string crashes Solaris 7 /usr/bin/printf.
39as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
42# Prefer a ksh shell builtin over an external printf program on Solaris,
43# but without wasting forks for bash or zsh.
44if test -z "$BASH_VERSION$ZSH_VERSION" \
45 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
46 as_echo='print -r --'
47 as_echo_n='print -rn --'
48elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='printf %s\n'
50 as_echo_n='printf %s'
51else
52 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
54 as_echo_n='/usr/ucb/echo -n'
55 else
56 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
57 as_echo_n_body='eval
58 arg=$1;
59 case $arg in #(
60 *"$as_nl"*)
61 expr "X$arg" : "X\\(.*\\)$as_nl";
62 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
63 esac;
64 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65 '
66 export as_echo_n_body
67 as_echo_n='sh -c $as_echo_n_body as_echo'
68 fi
69 export as_echo_body
70 as_echo='sh -c $as_echo_body as_echo'
71fi
72
73# The user is always right.
74if test "${PATH_SEPARATOR+set}" != set; then
75 PATH_SEPARATOR=:
76 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
77 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
78 PATH_SEPARATOR=';'
79 }
bec39cab
AC
80fi
81
82
81ecdfbb
RW
83# IFS
84# We need space, tab and new line, in precisely that order. Quoting is
85# there to prevent editors from complaining about space-tab.
86# (If _AS_PATH_WALK were called with IFS unset, it would disable word
87# splitting by setting IFS to empty value.)
88IFS=" "" $as_nl"
89
90# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 91as_myself=
81ecdfbb
RW
92case $0 in #((
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95for as_dir in $PATH
96do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
101IFS=$as_save_IFS
102
103 ;;
104esac
105# We did not find ourselves, most probably we were run as `sh COMMAND'
106# in which case we are not to be found in the path.
107if test "x$as_myself" = x; then
108 as_myself=$0
109fi
110if test ! -f "$as_myself"; then
111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112 exit 1
113fi
114
115# Unset variables that we do not need and which cause bugs (e.g. in
116# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117# suppresses any "Segmentation fault" message there. '((' could
118# trigger a bug in pdksh 5.2.14.
119for as_var in BASH_ENV ENV MAIL MAILPATH
120do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122done
bec39cab
AC
123PS1='$ '
124PS2='> '
125PS4='+ '
126
127# NLS nuisances.
81ecdfbb
RW
128LC_ALL=C
129export LC_ALL
130LANGUAGE=C
131export LANGUAGE
132
133# CDPATH.
134(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
d0ac1c44
SM
136# Use a proper internal environment variable to ensure we don't fall
137 # into an infinite loop, continuously re-executing ourselves.
138 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
139 _as_can_reexec=no; export _as_can_reexec;
140 # We cannot yet assume a decent shell, so we have to provide a
141# neutralization value for shells without unset; and this also
142# works around shells that cannot unset nonexistent variables.
143# Preserve -v and -x to the replacement shell.
144BASH_ENV=/dev/null
145ENV=/dev/null
146(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
147case $- in # ((((
148 *v*x* | *x*v* ) as_opts=-vx ;;
149 *v* ) as_opts=-v ;;
150 *x* ) as_opts=-x ;;
151 * ) as_opts= ;;
152esac
153exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
154# Admittedly, this is quite paranoid, since all the known shells bail
155# out after a failed `exec'.
156$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
157as_fn_exit 255
158 fi
159 # We don't want this to propagate to other subprocesses.
160 { _as_can_reexec=; unset _as_can_reexec;}
81ecdfbb
RW
161if test "x$CONFIG_SHELL" = x; then
162 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
163 emulate sh
164 NULLCMD=:
165 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
166 # is contrary to our usage. Disable this feature.
167 alias -g '\${1+\"\$@\"}'='\"\$@\"'
168 setopt NO_GLOB_SUBST
169else
170 case \`(set -o) 2>/dev/null\` in #(
171 *posix*) :
172 set -o posix ;; #(
173 *) :
174 ;;
175esac
176fi
177"
178 as_required="as_fn_return () { (exit \$1); }
179as_fn_success () { as_fn_return 0; }
180as_fn_failure () { as_fn_return 1; }
181as_fn_ret_success () { return 0; }
182as_fn_ret_failure () { return 1; }
183
184exitcode=0
185as_fn_success || { exitcode=1; echo as_fn_success failed.; }
186as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
187as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
188as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
189if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
190
191else
192 exitcode=1; echo positional parameters were not saved.
193fi
d0ac1c44
SM
194test x\$exitcode = x0 || exit 1
195test -x / || exit 1"
81ecdfbb
RW
196 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
197 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
198 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
199 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
200test \$(( 1 + 1 )) = 2 || exit 1"
201 if (eval "$as_required") 2>/dev/null; then :
202 as_have_required=yes
203else
204 as_have_required=no
205fi
206 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
207
208else
209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
210as_found=false
211for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 212do
81ecdfbb
RW
213 IFS=$as_save_IFS
214 test -z "$as_dir" && as_dir=.
215 as_found=:
216 case $as_dir in #(
217 /*)
218 for as_base in sh bash ksh sh5; do
219 # Try only shells that exist, to save several forks.
220 as_shell=$as_dir/$as_base
221 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
222 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
223 CONFIG_SHELL=$as_shell as_have_required=yes
224 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 break 2
226fi
227fi
228 done;;
229 esac
230 as_found=false
231done
232$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
233 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
234 CONFIG_SHELL=$SHELL as_have_required=yes
235fi; }
236IFS=$as_save_IFS
237
238
239 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
240 export CONFIG_SHELL
241 # We cannot yet assume a decent shell, so we have to provide a
242# neutralization value for shells without unset; and this also
243# works around shells that cannot unset nonexistent variables.
244# Preserve -v and -x to the replacement shell.
245BASH_ENV=/dev/null
246ENV=/dev/null
247(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
248case $- in # ((((
249 *v*x* | *x*v* ) as_opts=-vx ;;
250 *v* ) as_opts=-v ;;
251 *x* ) as_opts=-x ;;
252 * ) as_opts= ;;
253esac
254exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
255# Admittedly, this is quite paranoid, since all the known shells bail
256# out after a failed `exec'.
257$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
258exit 255
81ecdfbb
RW
259fi
260
261 if test x$as_have_required = xno; then :
262 $as_echo "$0: This script requires a shell more modern than all"
263 $as_echo "$0: the shells that I found on your system."
264 if test x${ZSH_VERSION+set} = xset ; then
265 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
266 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 267 else
81ecdfbb
RW
268 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
269$0: including any error possibly output before this
270$0: message. Then install a modern shell, or manually run
271$0: the script under such a shell if you do have one."
bec39cab 272 fi
81ecdfbb
RW
273 exit 1
274fi
275fi
276fi
277SHELL=${CONFIG_SHELL-/bin/sh}
278export SHELL
279# Unset more variables known to interfere with behavior of common tools.
280CLICOLOR_FORCE= GREP_OPTIONS=
281unset CLICOLOR_FORCE GREP_OPTIONS
282
283## --------------------- ##
284## M4sh Shell Functions. ##
285## --------------------- ##
286# as_fn_unset VAR
287# ---------------
288# Portably unset VAR.
289as_fn_unset ()
290{
291 { eval $1=; unset $1;}
292}
293as_unset=as_fn_unset
294
295# as_fn_set_status STATUS
296# -----------------------
297# Set $? to STATUS, without forking.
298as_fn_set_status ()
299{
300 return $1
301} # as_fn_set_status
bec39cab 302
81ecdfbb
RW
303# as_fn_exit STATUS
304# -----------------
305# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
306as_fn_exit ()
307{
308 set +e
309 as_fn_set_status $1
310 exit $1
311} # as_fn_exit
312
313# as_fn_mkdir_p
314# -------------
315# Create "$as_dir" as a directory, including parents if necessary.
316as_fn_mkdir_p ()
317{
318
319 case $as_dir in #(
320 -*) as_dir=./$as_dir;;
321 esac
322 test -d "$as_dir" || eval $as_mkdir_p || {
323 as_dirs=
324 while :; do
325 case $as_dir in #(
326 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
327 *) as_qdir=$as_dir;;
328 esac
329 as_dirs="'$as_qdir' $as_dirs"
330 as_dir=`$as_dirname -- "$as_dir" ||
331$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
332 X"$as_dir" : 'X\(//\)[^/]' \| \
333 X"$as_dir" : 'X\(//\)$' \| \
334 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
335$as_echo X"$as_dir" |
336 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
337 s//\1/
338 q
339 }
340 /^X\(\/\/\)[^/].*/{
341 s//\1/
342 q
343 }
344 /^X\(\/\/\)$/{
345 s//\1/
346 q
347 }
348 /^X\(\/\).*/{
349 s//\1/
350 q
351 }
352 s/.*/./; q'`
353 test -d "$as_dir" && break
354 done
355 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 356 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
357
358
359} # as_fn_mkdir_p
d0ac1c44
SM
360
361# as_fn_executable_p FILE
362# -----------------------
363# Test if FILE is an executable regular file.
364as_fn_executable_p ()
365{
366 test -f "$1" && test -x "$1"
367} # as_fn_executable_p
81ecdfbb
RW
368# as_fn_append VAR VALUE
369# ----------------------
370# Append the text in VALUE to the end of the definition contained in VAR. Take
371# advantage of any shell optimizations that allow amortized linear growth over
372# repeated appends, instead of the typical quadratic growth present in naive
373# implementations.
374if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
375 eval 'as_fn_append ()
376 {
377 eval $1+=\$2
378 }'
379else
380 as_fn_append ()
381 {
382 eval $1=\$$1\$2
383 }
384fi # as_fn_append
385
386# as_fn_arith ARG...
387# ------------------
388# Perform arithmetic evaluation on the ARGs, and store the result in the
389# global $as_val. Take advantage of shells that can avoid forks. The arguments
390# must be portable across $(()) and expr.
391if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
392 eval 'as_fn_arith ()
393 {
394 as_val=$(( $* ))
395 }'
396else
397 as_fn_arith ()
398 {
399 as_val=`expr "$@" || test $? -eq 1`
400 }
401fi # as_fn_arith
402
403
d0ac1c44
SM
404# as_fn_error STATUS ERROR [LINENO LOG_FD]
405# ----------------------------------------
81ecdfbb
RW
406# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
407# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 408# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
409as_fn_error ()
410{
d0ac1c44
SM
411 as_status=$1; test $as_status -eq 0 && as_status=1
412 if test "$4"; then
413 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
414 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 415 fi
d0ac1c44 416 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
417 as_fn_exit $as_status
418} # as_fn_error
419
420if expr a : '\(a\)' >/dev/null 2>&1 &&
421 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
422 as_expr=expr
423else
424 as_expr=false
425fi
426
81ecdfbb 427if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
428 as_basename=basename
429else
430 as_basename=false
431fi
432
81ecdfbb
RW
433if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
434 as_dirname=dirname
435else
436 as_dirname=false
437fi
bec39cab 438
81ecdfbb 439as_me=`$as_basename -- "$0" ||
bec39cab
AC
440$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
441 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
442 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
443$as_echo X/"$0" |
444 sed '/^.*\/\([^/][^/]*\)\/*$/{
445 s//\1/
446 q
447 }
448 /^X\/\(\/\/\)$/{
449 s//\1/
450 q
451 }
452 /^X\/\(\/\).*/{
453 s//\1/
454 q
455 }
456 s/.*/./; q'`
bec39cab 457
b4e70030
JB
458# Avoid depending upon Character Ranges.
459as_cr_letters='abcdefghijklmnopqrstuvwxyz'
460as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
461as_cr_Letters=$as_cr_letters$as_cr_LETTERS
462as_cr_digits='0123456789'
463as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 464
bec39cab 465
81ecdfbb
RW
466 as_lineno_1=$LINENO as_lineno_1a=$LINENO
467 as_lineno_2=$LINENO as_lineno_2a=$LINENO
468 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
469 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
470 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
471 sed -n '
472 p
473 /[$]LINENO/=
474 ' <$as_myself |
bec39cab 475 sed '
81ecdfbb
RW
476 s/[$]LINENO.*/&-/
477 t lineno
478 b
479 :lineno
bec39cab 480 N
81ecdfbb
RW
481 :loop
482 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 483 t loop
81ecdfbb 484 s/-\n.*//
bec39cab 485 ' >$as_me.lineno &&
81ecdfbb
RW
486 chmod +x "$as_me.lineno" ||
487 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab 488
d0ac1c44
SM
489 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
490 # already done that, so ensure we don't try to do so again and fall
491 # in an infinite loop. This has already happened in practice.
492 _as_can_reexec=no; export _as_can_reexec
bec39cab
AC
493 # Don't try to exec as it changes $[0], causing all sort of problems
494 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
495 # original and so on. Autoconf is especially sensitive to this).
496 . "./$as_me.lineno"
bec39cab
AC
497 # Exit status is that of the last command.
498 exit
499}
500
81ecdfbb
RW
501ECHO_C= ECHO_N= ECHO_T=
502case `echo -n x` in #(((((
503-n*)
504 case `echo 'xy\c'` in
505 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
506 xy) ECHO_C='\c';;
507 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
508 ECHO_T=' ';;
509 esac;;
510*)
511 ECHO_N='-n';;
bec39cab
AC
512esac
513
81ecdfbb
RW
514rm -f conf$$ conf$$.exe conf$$.file
515if test -d conf$$.dir; then
516 rm -f conf$$.dir/conf$$.file
bec39cab 517else
81ecdfbb
RW
518 rm -f conf$$.dir
519 mkdir conf$$.dir 2>/dev/null
bec39cab 520fi
81ecdfbb
RW
521if (echo >conf$$.file) 2>/dev/null; then
522 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 523 as_ln_s='ln -s'
81ecdfbb
RW
524 # ... but there are two gotchas:
525 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
526 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 527 # In both cases, we have to default to `cp -pR'.
81ecdfbb 528 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 529 as_ln_s='cp -pR'
81ecdfbb
RW
530 elif ln conf$$.file conf$$ 2>/dev/null; then
531 as_ln_s=ln
532 else
d0ac1c44 533 as_ln_s='cp -pR'
b4e70030 534 fi
bec39cab 535else
d0ac1c44 536 as_ln_s='cp -pR'
bec39cab 537fi
81ecdfbb
RW
538rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
539rmdir conf$$.dir 2>/dev/null
bec39cab
AC
540
541if mkdir -p . 2>/dev/null; then
81ecdfbb 542 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
543else
544 test -d ./-p && rmdir ./-p
545 as_mkdir_p=false
546fi
547
d0ac1c44
SM
548as_test_x='test -x'
549as_executable_p=as_fn_executable_p
bec39cab
AC
550
551# Sed expression to map a string onto a valid CPP name.
552as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
553
554# Sed expression to map a string onto a valid variable name.
555as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
556
557
d0ac1c44
SM
558test -n "$DJDIR" || exec 7<&0 </dev/null
559exec 6>&1
c906108c 560
bec39cab 561# Name of the host.
d0ac1c44 562# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
563# so uname gets run too.
564ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
565
bec39cab
AC
566#
567# Initializations.
568#
c906108c 569ac_default_prefix=/usr/local
81ecdfbb 570ac_clean_files=
bec39cab 571ac_config_libobj_dir=.
81ecdfbb 572LIBOBJS=
bec39cab
AC
573cross_compiling=no
574subdirs=
575MFLAGS=
576MAKEFLAGS=
b4e70030 577
bec39cab
AC
578# Identity of this package.
579PACKAGE_NAME=
580PACKAGE_TARNAME=
581PACKAGE_VERSION=
582PACKAGE_STRING=
583PACKAGE_BUGREPORT=
81ecdfbb 584PACKAGE_URL=
bec39cab
AC
585
586ac_unique_file="main.c"
587# Factoring default headers for most tests.
588ac_includes_default="\
589#include <stdio.h>
81ecdfbb 590#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
591# include <sys/types.h>
592#endif
81ecdfbb 593#ifdef HAVE_SYS_STAT_H
bec39cab
AC
594# include <sys/stat.h>
595#endif
81ecdfbb 596#ifdef STDC_HEADERS
bec39cab
AC
597# include <stdlib.h>
598# include <stddef.h>
599#else
81ecdfbb 600# ifdef HAVE_STDLIB_H
bec39cab
AC
601# include <stdlib.h>
602# endif
603#endif
81ecdfbb
RW
604#ifdef HAVE_STRING_H
605# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
606# include <memory.h>
607# endif
608# include <string.h>
609#endif
81ecdfbb 610#ifdef HAVE_STRINGS_H
bec39cab
AC
611# include <strings.h>
612#endif
81ecdfbb 613#ifdef HAVE_INTTYPES_H
bec39cab 614# include <inttypes.h>
bec39cab 615#endif
81ecdfbb
RW
616#ifdef HAVE_STDINT_H
617# include <stdint.h>
618#endif
619#ifdef HAVE_UNISTD_H
bec39cab
AC
620# include <unistd.h>
621#endif"
622
81ecdfbb 623enable_option_checking=no
d0ac1c44 624ac_header_list=
c971b7fa 625ac_subst_vars='LTLIBOBJS
81ecdfbb 626LIBOBJS
b292c783
JK
627GCORE_TRANSFORM_NAME
628GDB_TRANSFORM_NAME
e3487908 629XSLTPROC
a0a461e5 630NM_H
81ecdfbb 631GDB_NM_FILE
ccb1ba62
CB
632LTLIBXXHASH
633LIBXXHASH
634HAVE_LIBXXHASH
393fd4c3
YQ
635LTLIBBABELTRACE
636LIBBABELTRACE
637HAVE_LIBBABELTRACE
21ea5acd
SDJ
638HAVE_NATIVE_GCORE_HOST
639NAT_GENERATED_FILES
640XM_CLIBS
641MH_CFLAGS
642LOADLIBES
643NAT_CDEPS
644NATDEPFILES
645NAT_FILE
81ecdfbb
RW
646target_subdir
647CONFIG_UNINSTALL
648CONFIG_INSTALL
649CONFIG_CLEAN
650CONFIG_ALL
651CONFIG_SRCS
652CONFIG_DEPS
653CONFIG_OBS
654PROFILE_CFLAGS
655ENABLE_CFLAGS
656SIM_OBS
657SIM
658XMKMF
659GDBTK_SRC_DIR
660GDBTK_CFLAGS
661GDBTKLIBS
662X_LIBS
663X_LDFLAGS
664X_CFLAGS
665TK_XINCLUDES
666TK_DEPS
667TK_LIBRARY
668TK_INCLUDE
669TK_STUB_LIB_SPEC
670TK_STUB_LIB_FLAG
671TK_STUB_LIB_FILE
672TK_LIB_SPEC
673TK_LIB_FLAG
674TK_LIB_FILE
675TK_SRC_DIR
676TK_BIN_DIR
677TK_VERSION
678TCL_DEPS
679TCL_LIBRARY
680TCL_INCLUDE
681TCL_STUB_LIB_SPEC
682TCL_STUB_LIB_FLAG
683TCL_STUB_LIB_FILE
684TCL_LIB_SPEC
685TCL_LIB_FLAG
686TCL_LIB_FILE
687TCL_SRC_DIR
688TCL_BIN_DIR
689TCL_PATCH_LEVEL
690TCL_VERSION
691WIN32LDAPP
692GUI_CFLAGS_X
693LIBGUI
608e2dbb
TT
694LTLIBLZMA
695LIBLZMA
696HAVE_LIBLZMA
81ecdfbb
RW
697WIN32LIBS
698SER_HARDWIRE
699WERROR_CFLAGS
700WARN_CFLAGS
ed2a2229 701SYSTEM_GDBINIT_DIR
81ecdfbb 702SYSTEM_GDBINIT
81ecdfbb
RW
703TARGET_SYSTEM_ROOT
704CONFIG_LDFLAGS
f6528abd 705RDYNAMIC
5e030278
TT
706PTHREAD_CFLAGS
707PTHREAD_LIBS
708PTHREAD_CC
709ax_pthread_config
710SED
81ecdfbb 711ALLOCA
58bfce93
MM
712LTLIBIPT
713LIBIPT
714HAVE_LIBIPT
62f29fda
TT
715SRCHIGH_CFLAGS
716SRCHIGH_LIBS
4df42755
DE
717HAVE_GUILE_FALSE
718HAVE_GUILE_TRUE
ed3ef339
DE
719GUILE_LIBS
720GUILE_CPPFLAGS
e76c5d17
DE
721GUILD_TARGET_FLAG
722GUILD
ed3ef339 723pkg_config_prog_path
4df42755
DE
724HAVE_PYTHON_FALSE
725HAVE_PYTHON_TRUE
ac534cba
JB
726PYTHON_LIBS
727PYTHON_CPPFLAGS
81ecdfbb 728PYTHON_CFLAGS
ec685c5e 729python_prog_path
2400729e
UW
730LTLIBMPFR
731LIBMPFR
732HAVE_LIBMPFR
81ecdfbb
RW
733LTLIBEXPAT
734LIBEXPAT
735HAVE_LIBEXPAT
b8e0a31c 736JIT_READER_DIR
f997c383 737TARGET_PTR
39037522 738READLINE_TEXI_INCFLAG
81ecdfbb
RW
739READLINE_CFLAGS
740READLINE_DEPS
741READLINE
016a3251
DD
742LTLIBICONV
743LIBICONV
711a72d3
L
744zlibinc
745zlibdir
81ecdfbb
RW
746MIG
747WINDRES
748DLLTOOL
c971b7fa 749AR
81ecdfbb
RW
750YFLAGS
751YACC
c971b7fa 752RANLIB
81ecdfbb 753LN_S
c971b7fa
PA
754INSTALL_DATA
755INSTALL_SCRIPT
756INSTALL_PROGRAM
757AWK
81ecdfbb
RW
758REPORT_BUGS_TEXI
759REPORT_BUGS_TO
760PKGVERSION
44cee4fd 761CODESIGN_CERT
b292c783 762HAVE_NATIVE_GCORE_TARGET
81ecdfbb 763TARGET_OBS
5922befa 764ROCM_DBGAPI_LIBS
81ecdfbb
RW
765subdirs
766GDB_DATADIR
767DEBUGDIR
5048e516
JK
768MAKEINFO_EXTRA_FLAGS
769MAKEINFOFLAGS
770MAKEINFO
81ecdfbb 771PACKAGE
81ecdfbb
RW
772CATOBJEXT
773GENCAT
774INSTOBJEXT
775DATADIRNAME
776CATALOGS
777POSUB
778GMSGFMT
779XGETTEXT
780INCINTL
781LIBINTL_DEP
782LIBINTL
783USE_NLS
81ecdfbb
RW
784CCDEPMODE
785DEPDIR
786am__leading_dot
0bcda685
PA
787CXX_DIALECT
788HAVE_CXX11
4869db5e
RM
789INSTALL_STRIP_PROGRAM
790STRIP
791install_sh
81ecdfbb
RW
792target_os
793target_vendor
794target_cpu
795target
796host_os
797host_vendor
798host_cpu
799host
800build_os
801build_vendor
802build_cpu
803build
c971b7fa
PA
804EGREP
805GREP
806CPP
3bc3d82a
PA
807ac_ct_CXX
808CXXFLAGS
809CXX
81ecdfbb
RW
810OBJEXT
811EXEEXT
812ac_ct_CC
813CPPFLAGS
814LDFLAGS
815CFLAGS
816CC
817MAINT
818MAINTAINER_MODE_FALSE
819MAINTAINER_MODE_TRUE
820target_alias
821host_alias
822build_alias
823LIBS
824ECHO_T
825ECHO_N
826ECHO_C
827DEFS
828mandir
829localedir
830libdir
831psdir
832pdfdir
833dvidir
834htmldir
835infodir
836docdir
837oldincludedir
838includedir
839localstatedir
840sharedstatedir
841sysconfdir
842datadir
843datarootdir
844libexecdir
845sbindir
846bindir
847program_transform_name
848prefix
849exec_prefix
850PACKAGE_URL
851PACKAGE_BUGREPORT
852PACKAGE_STRING
853PACKAGE_VERSION
854PACKAGE_TARNAME
855PACKAGE_NAME
856PATH_SEPARATOR
857SHELL'
2b351b19 858ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
859ac_user_opts='
860enable_option_checking
861enable_maintainer_mode
da2f07f1
JK
862enable_plugins
863enable_largefile
81ecdfbb
RW
864with_separate_debug_dir
865with_gdb_datadir
866with_relocated_sources
7349ff92 867with_auto_load_dir
bccbefd2 868with_auto_load_safe_path
81ecdfbb
RW
869enable_targets
870enable_64_bit_bfd
5922befa 871with_rocm_dbgapi
81ecdfbb
RW
872enable_gdbmi
873enable_tui
874enable_gdbtk
05e7c244 875with_libunwind_ia64
81ecdfbb
RW
876with_curses
877enable_profiling
44cee4fd 878enable_codesign
81ecdfbb
RW
879with_pkgversion
880with_bugurl
711a72d3 881with_system_zlib
016a3251
DD
882with_gnu_ld
883enable_rpath
81ecdfbb 884with_libiconv_prefix
478aac75 885with_iconv_bin
81ecdfbb 886with_system_readline
b8e0a31c 887with_jit_reader_dir
81ecdfbb 888with_expat
81ecdfbb 889with_libexpat_prefix
2400729e
UW
890with_mpfr
891with_libmpfr_prefix
81ecdfbb 892with_python
ed3ef339 893with_guile
189b8c2e 894enable_source_highlight
58bfce93
MM
895with_intel_pt
896with_libipt_prefix
81ecdfbb
RW
897with_included_regex
898with_sysroot
899with_system_gdbinit
ed2a2229 900with_system_gdbinit_dir
81ecdfbb
RW
901enable_werror
902enable_build_warnings
903enable_gdb_build_warnings
f35d5ade 904enable_ubsan
608e2dbb
TT
905with_lzma
906with_liblzma_prefix
81ecdfbb
RW
907with_tcl
908with_tk
909with_x
910enable_sim
496c0e1b 911enable_gdbserver
393fd4c3
YQ
912with_babeltrace
913with_libbabeltrace_prefix
ccb1ba62
CB
914with_xxhash
915with_libxxhash_prefix
8ecfd7bd 916enable_unit_tests
81ecdfbb
RW
917'
918 ac_precious_vars='build_alias
919host_alias
920target_alias
921CC
922CFLAGS
923LDFLAGS
924LIBS
925CPPFLAGS
3bc3d82a
PA
926CXX
927CXXFLAGS
928CCC
81ecdfbb 929CPP
f06e05e0
JK
930MAKEINFO
931MAKEINFOFLAGS
81ecdfbb
RW
932YACC
933YFLAGS
934XMKMF'
5ae98d25 935ac_subdirs_all='testsuite
81ecdfbb 936gdbtk
81ecdfbb 937gdbserver'
c906108c
SS
938
939# Initialize some variables set by options.
bec39cab
AC
940ac_init_help=
941ac_init_version=false
81ecdfbb
RW
942ac_unrecognized_opts=
943ac_unrecognized_sep=
c906108c
SS
944# The variables have the same names as the options, with
945# dashes changed to underlines.
bec39cab 946cache_file=/dev/null
c906108c 947exec_prefix=NONE
c906108c 948no_create=
c906108c
SS
949no_recursion=
950prefix=NONE
951program_prefix=NONE
952program_suffix=NONE
953program_transform_name=s,x,x,
954silent=
955site=
956srcdir=
c906108c
SS
957verbose=
958x_includes=NONE
959x_libraries=NONE
bec39cab
AC
960
961# Installation directory options.
962# These are left unexpanded so users can "make install exec_prefix=/foo"
963# and all the variables that are supposed to be based on exec_prefix
964# by default will actually change.
965# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 966# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
967bindir='${exec_prefix}/bin'
968sbindir='${exec_prefix}/sbin'
969libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
970datarootdir='${prefix}/share'
971datadir='${datarootdir}'
c906108c
SS
972sysconfdir='${prefix}/etc'
973sharedstatedir='${prefix}/com'
974localstatedir='${prefix}/var'
c906108c
SS
975includedir='${prefix}/include'
976oldincludedir='/usr/include'
81ecdfbb
RW
977docdir='${datarootdir}/doc/${PACKAGE}'
978infodir='${datarootdir}/info'
979htmldir='${docdir}'
980dvidir='${docdir}'
981pdfdir='${docdir}'
982psdir='${docdir}'
983libdir='${exec_prefix}/lib'
984localedir='${datarootdir}/locale'
985mandir='${datarootdir}/man'
c906108c 986
c906108c 987ac_prev=
81ecdfbb 988ac_dashdash=
c906108c
SS
989for ac_option
990do
c906108c
SS
991 # If the previous option needs an argument, assign it.
992 if test -n "$ac_prev"; then
81ecdfbb 993 eval $ac_prev=\$ac_option
c906108c
SS
994 ac_prev=
995 continue
996 fi
997
81ecdfbb 998 case $ac_option in
d0ac1c44
SM
999 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1000 *=) ac_optarg= ;;
1001 *) ac_optarg=yes ;;
81ecdfbb 1002 esac
c906108c
SS
1003
1004 # Accept the important Cygnus configure options, so we can diagnose typos.
1005
81ecdfbb
RW
1006 case $ac_dashdash$ac_option in
1007 --)
1008 ac_dashdash=yes ;;
c906108c
SS
1009
1010 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1011 ac_prev=bindir ;;
1012 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1013 bindir=$ac_optarg ;;
c906108c
SS
1014
1015 -build | --build | --buil | --bui | --bu)
bec39cab 1016 ac_prev=build_alias ;;
c906108c 1017 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1018 build_alias=$ac_optarg ;;
c906108c
SS
1019
1020 -cache-file | --cache-file | --cache-fil | --cache-fi \
1021 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1022 ac_prev=cache_file ;;
1023 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1024 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1025 cache_file=$ac_optarg ;;
1026
1027 --config-cache | -C)
1028 cache_file=config.cache ;;
c906108c 1029
81ecdfbb 1030 -datadir | --datadir | --datadi | --datad)
c906108c 1031 ac_prev=datadir ;;
81ecdfbb 1032 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1033 datadir=$ac_optarg ;;
c906108c 1034
81ecdfbb
RW
1035 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1036 | --dataroo | --dataro | --datar)
1037 ac_prev=datarootdir ;;
1038 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1039 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1040 datarootdir=$ac_optarg ;;
1041
c906108c 1042 -disable-* | --disable-*)
81ecdfbb 1043 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1044 # Reject names that are not valid shell variable names.
81ecdfbb 1045 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1046 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1047 ac_useropt_orig=$ac_useropt
1048 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1049 case $ac_user_opts in
1050 *"
1051"enable_$ac_useropt"
1052"*) ;;
1053 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1054 ac_unrecognized_sep=', ';;
1055 esac
1056 eval enable_$ac_useropt=no ;;
1057
1058 -docdir | --docdir | --docdi | --doc | --do)
1059 ac_prev=docdir ;;
1060 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1061 docdir=$ac_optarg ;;
1062
1063 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1064 ac_prev=dvidir ;;
1065 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1066 dvidir=$ac_optarg ;;
c906108c
SS
1067
1068 -enable-* | --enable-*)
81ecdfbb 1069 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1070 # Reject names that are not valid shell variable names.
81ecdfbb 1071 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1072 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1073 ac_useropt_orig=$ac_useropt
1074 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1075 case $ac_user_opts in
1076 *"
1077"enable_$ac_useropt"
1078"*) ;;
1079 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1080 ac_unrecognized_sep=', ';;
b4e70030 1081 esac
81ecdfbb 1082 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1083
1084 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1085 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1086 | --exec | --exe | --ex)
1087 ac_prev=exec_prefix ;;
1088 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1089 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1090 | --exec=* | --exe=* | --ex=*)
bec39cab 1091 exec_prefix=$ac_optarg ;;
c906108c
SS
1092
1093 -gas | --gas | --ga | --g)
1094 # Obsolete; use --with-gas.
1095 with_gas=yes ;;
1096
bec39cab
AC
1097 -help | --help | --hel | --he | -h)
1098 ac_init_help=long ;;
1099 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1100 ac_init_help=recursive ;;
1101 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1102 ac_init_help=short ;;
c906108c
SS
1103
1104 -host | --host | --hos | --ho)
bec39cab 1105 ac_prev=host_alias ;;
c906108c 1106 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1107 host_alias=$ac_optarg ;;
c906108c 1108
81ecdfbb
RW
1109 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1110 ac_prev=htmldir ;;
1111 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1112 | --ht=*)
1113 htmldir=$ac_optarg ;;
1114
c906108c
SS
1115 -includedir | --includedir | --includedi | --included | --include \
1116 | --includ | --inclu | --incl | --inc)
1117 ac_prev=includedir ;;
1118 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1119 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1120 includedir=$ac_optarg ;;
c906108c
SS
1121
1122 -infodir | --infodir | --infodi | --infod | --info | --inf)
1123 ac_prev=infodir ;;
1124 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1125 infodir=$ac_optarg ;;
c906108c
SS
1126
1127 -libdir | --libdir | --libdi | --libd)
1128 ac_prev=libdir ;;
1129 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1130 libdir=$ac_optarg ;;
c906108c
SS
1131
1132 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1133 | --libexe | --libex | --libe)
1134 ac_prev=libexecdir ;;
1135 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1136 | --libexe=* | --libex=* | --libe=*)
bec39cab 1137 libexecdir=$ac_optarg ;;
c906108c 1138
81ecdfbb
RW
1139 -localedir | --localedir | --localedi | --localed | --locale)
1140 ac_prev=localedir ;;
1141 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1142 localedir=$ac_optarg ;;
1143
c906108c 1144 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1145 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1146 ac_prev=localstatedir ;;
1147 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1148 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1149 localstatedir=$ac_optarg ;;
c906108c
SS
1150
1151 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1152 ac_prev=mandir ;;
1153 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1154 mandir=$ac_optarg ;;
c906108c
SS
1155
1156 -nfp | --nfp | --nf)
1157 # Obsolete; use --without-fp.
1158 with_fp=no ;;
1159
1160 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1161 | --no-cr | --no-c | -n)
c906108c
SS
1162 no_create=yes ;;
1163
1164 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1165 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1166 no_recursion=yes ;;
1167
1168 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1169 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1170 | --oldin | --oldi | --old | --ol | --o)
1171 ac_prev=oldincludedir ;;
1172 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1173 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1174 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1175 oldincludedir=$ac_optarg ;;
c906108c
SS
1176
1177 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1178 ac_prev=prefix ;;
1179 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1180 prefix=$ac_optarg ;;
c906108c
SS
1181
1182 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1183 | --program-pre | --program-pr | --program-p)
1184 ac_prev=program_prefix ;;
1185 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1186 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1187 program_prefix=$ac_optarg ;;
c906108c
SS
1188
1189 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1190 | --program-suf | --program-su | --program-s)
1191 ac_prev=program_suffix ;;
1192 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1193 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1194 program_suffix=$ac_optarg ;;
c906108c
SS
1195
1196 -program-transform-name | --program-transform-name \
1197 | --program-transform-nam | --program-transform-na \
1198 | --program-transform-n | --program-transform- \
1199 | --program-transform | --program-transfor \
1200 | --program-transfo | --program-transf \
1201 | --program-trans | --program-tran \
1202 | --progr-tra | --program-tr | --program-t)
1203 ac_prev=program_transform_name ;;
1204 -program-transform-name=* | --program-transform-name=* \
1205 | --program-transform-nam=* | --program-transform-na=* \
1206 | --program-transform-n=* | --program-transform-=* \
1207 | --program-transform=* | --program-transfor=* \
1208 | --program-transfo=* | --program-transf=* \
1209 | --program-trans=* | --program-tran=* \
1210 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1211 program_transform_name=$ac_optarg ;;
c906108c 1212
81ecdfbb
RW
1213 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1214 ac_prev=pdfdir ;;
1215 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1216 pdfdir=$ac_optarg ;;
1217
1218 -psdir | --psdir | --psdi | --psd | --ps)
1219 ac_prev=psdir ;;
1220 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1221 psdir=$ac_optarg ;;
1222
c906108c
SS
1223 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1224 | -silent | --silent | --silen | --sile | --sil)
1225 silent=yes ;;
1226
1227 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1228 ac_prev=sbindir ;;
1229 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1230 | --sbi=* | --sb=*)
bec39cab 1231 sbindir=$ac_optarg ;;
c906108c
SS
1232
1233 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1234 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1235 | --sharedst | --shareds | --shared | --share | --shar \
1236 | --sha | --sh)
1237 ac_prev=sharedstatedir ;;
1238 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1239 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1240 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1241 | --sha=* | --sh=*)
bec39cab 1242 sharedstatedir=$ac_optarg ;;
c906108c
SS
1243
1244 -site | --site | --sit)
1245 ac_prev=site ;;
1246 -site=* | --site=* | --sit=*)
bec39cab 1247 site=$ac_optarg ;;
3ace7edb 1248
c906108c
SS
1249 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1250 ac_prev=srcdir ;;
1251 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1252 srcdir=$ac_optarg ;;
c906108c
SS
1253
1254 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1255 | --syscon | --sysco | --sysc | --sys | --sy)
1256 ac_prev=sysconfdir ;;
1257 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1258 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1259 sysconfdir=$ac_optarg ;;
c906108c
SS
1260
1261 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1262 ac_prev=target_alias ;;
c906108c 1263 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1264 target_alias=$ac_optarg ;;
c906108c
SS
1265
1266 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1267 verbose=yes ;;
1268
bec39cab
AC
1269 -version | --version | --versio | --versi | --vers | -V)
1270 ac_init_version=: ;;
c906108c
SS
1271
1272 -with-* | --with-*)
81ecdfbb 1273 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1274 # Reject names that are not valid shell variable names.
81ecdfbb 1275 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1276 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1277 ac_useropt_orig=$ac_useropt
1278 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1279 case $ac_user_opts in
1280 *"
1281"with_$ac_useropt"
1282"*) ;;
1283 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1284 ac_unrecognized_sep=', ';;
b4e70030 1285 esac
81ecdfbb 1286 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1287
1288 -without-* | --without-*)
81ecdfbb 1289 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1290 # Reject names that are not valid shell variable names.
81ecdfbb 1291 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1292 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1293 ac_useropt_orig=$ac_useropt
1294 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1295 case $ac_user_opts in
1296 *"
1297"with_$ac_useropt"
1298"*) ;;
1299 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1300 ac_unrecognized_sep=', ';;
1301 esac
1302 eval with_$ac_useropt=no ;;
c906108c
SS
1303
1304 --x)
1305 # Obsolete; use --with-x.
1306 with_x=yes ;;
1307
1308 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1309 | --x-incl | --x-inc | --x-in | --x-i)
1310 ac_prev=x_includes ;;
1311 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1312 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1313 x_includes=$ac_optarg ;;
c906108c
SS
1314
1315 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1316 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1317 ac_prev=x_libraries ;;
1318 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1319 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1320 x_libraries=$ac_optarg ;;
c906108c 1321
d0ac1c44
SM
1322 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1323Try \`$0 --help' for more information"
c906108c
SS
1324 ;;
1325
bec39cab
AC
1326 *=*)
1327 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1328 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1329 case $ac_envvar in #(
1330 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1331 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1332 esac
1333 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1334 export $ac_envvar ;;
1335
c906108c 1336 *)
bec39cab 1337 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1338 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1339 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1340 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1341 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1342 ;;
1343
1344 esac
1345done
1346
1347if test -n "$ac_prev"; then
bec39cab 1348 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1349 as_fn_error $? "missing argument to $ac_option"
c906108c 1350fi
c906108c 1351
81ecdfbb
RW
1352if test -n "$ac_unrecognized_opts"; then
1353 case $enable_option_checking in
1354 no) ;;
d0ac1c44 1355 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1356 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1357 esac
81ecdfbb 1358fi
b4e70030 1359
81ecdfbb
RW
1360# Check all directory arguments for consistency.
1361for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1362 datadir sysconfdir sharedstatedir localstatedir includedir \
1363 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1364 libdir localedir mandir
b4e70030 1365do
81ecdfbb
RW
1366 eval ac_val=\$$ac_var
1367 # Remove trailing slashes.
1368 case $ac_val in
1369 */ )
1370 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1371 eval $ac_var=\$ac_val;;
1372 esac
1373 # Be sure to have absolute directory names.
b4e70030 1374 case $ac_val in
81ecdfbb
RW
1375 [\\/$]* | ?:[\\/]* ) continue;;
1376 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1377 esac
d0ac1c44 1378 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1379done
1380
bec39cab
AC
1381# There might be people who depend on the old broken behavior: `$host'
1382# used to hold the argument of --host etc.
1383# FIXME: To remove some day.
1384build=$build_alias
1385host=$host_alias
1386target=$target_alias
1387
1388# FIXME: To remove some day.
1389if test "x$host_alias" != x; then
1390 if test "x$build_alias" = x; then
1391 cross_compiling=maybe
bec39cab
AC
1392 elif test "x$build_alias" != "x$host_alias"; then
1393 cross_compiling=yes
1394 fi
1395fi
c906108c 1396
bec39cab
AC
1397ac_tool_prefix=
1398test -n "$host_alias" && ac_tool_prefix=$host_alias-
1399
1400test "$silent" = yes && exec 6>/dev/null
c906108c 1401
c906108c 1402
81ecdfbb
RW
1403ac_pwd=`pwd` && test -n "$ac_pwd" &&
1404ac_ls_di=`ls -di .` &&
1405ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1406 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1407test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1408 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1409
1410
c906108c
SS
1411# Find the source files, if location was not specified.
1412if test -z "$srcdir"; then
1413 ac_srcdir_defaulted=yes
81ecdfbb
RW
1414 # Try the directory containing this script, then the parent directory.
1415 ac_confdir=`$as_dirname -- "$as_myself" ||
1416$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1417 X"$as_myself" : 'X\(//\)[^/]' \| \
1418 X"$as_myself" : 'X\(//\)$' \| \
1419 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1420$as_echo X"$as_myself" |
1421 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1422 s//\1/
1423 q
1424 }
1425 /^X\(\/\/\)[^/].*/{
1426 s//\1/
1427 q
1428 }
1429 /^X\(\/\/\)$/{
1430 s//\1/
1431 q
1432 }
1433 /^X\(\/\).*/{
1434 s//\1/
1435 q
1436 }
1437 s/.*/./; q'`
c906108c 1438 srcdir=$ac_confdir
81ecdfbb 1439 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1440 srcdir=..
1441 fi
1442else
1443 ac_srcdir_defaulted=no
1444fi
81ecdfbb
RW
1445if test ! -r "$srcdir/$ac_unique_file"; then
1446 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1447 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1448fi
1449ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1450ac_abs_confdir=`(
d0ac1c44 1451 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1452 pwd)`
1453# When building in place, set srcdir=.
1454if test "$ac_abs_confdir" = "$ac_pwd"; then
1455 srcdir=.
1456fi
1457# Remove unnecessary trailing slashes from srcdir.
1458# Double slashes in file names in object file debugging info
1459# mess up M-x gdb in Emacs.
1460case $srcdir in
1461*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1462esac
1463for ac_var in $ac_precious_vars; do
1464 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1465 eval ac_env_${ac_var}_value=\$${ac_var}
1466 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1467 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1468done
c906108c 1469
bec39cab
AC
1470#
1471# Report the --help message.
1472#
1473if test "$ac_init_help" = "long"; then
1474 # Omit some internal or obsolete options to make the list less imposing.
1475 # This message is too long to be a string in the A/UX 3.1 sh.
1476 cat <<_ACEOF
1477\`configure' configures this package to adapt to many kinds of systems.
1478
1479Usage: $0 [OPTION]... [VAR=VALUE]...
1480
1481To assign environment variables (e.g., CC, CFLAGS...), specify them as
1482VAR=VALUE. See below for descriptions of some of the useful variables.
1483
1484Defaults for the options are specified in brackets.
1485
1486Configuration:
1487 -h, --help display this help and exit
1488 --help=short display options specific to this package
1489 --help=recursive display the short help of all the included packages
1490 -V, --version display version information and exit
d0ac1c44 1491 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1492 --cache-file=FILE cache test results in FILE [disabled]
1493 -C, --config-cache alias for \`--cache-file=config.cache'
1494 -n, --no-create do not create output files
1495 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1496
bec39cab
AC
1497Installation directories:
1498 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1499 [$ac_default_prefix]
bec39cab 1500 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1501 [PREFIX]
bec39cab
AC
1502
1503By default, \`make install' will install all the files in
1504\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1505an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1506for instance \`--prefix=\$HOME'.
1507
1508For better control, use the options below.
1509
1510Fine tuning of the installation directories:
81ecdfbb
RW
1511 --bindir=DIR user executables [EPREFIX/bin]
1512 --sbindir=DIR system admin executables [EPREFIX/sbin]
1513 --libexecdir=DIR program executables [EPREFIX/libexec]
1514 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1515 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1516 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1517 --libdir=DIR object code libraries [EPREFIX/lib]
1518 --includedir=DIR C header files [PREFIX/include]
1519 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1520 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1521 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1522 --infodir=DIR info documentation [DATAROOTDIR/info]
1523 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1524 --mandir=DIR man documentation [DATAROOTDIR/man]
1525 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1526 --htmldir=DIR html documentation [DOCDIR]
1527 --dvidir=DIR dvi documentation [DOCDIR]
1528 --pdfdir=DIR pdf documentation [DOCDIR]
1529 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1530_ACEOF
1531
1532 cat <<\_ACEOF
1533
9009e1ae
MR
1534Program names:
1535 --program-prefix=PREFIX prepend PREFIX to installed program names
1536 --program-suffix=SUFFIX append SUFFIX to installed program names
1537 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1538
bec39cab
AC
1539X features:
1540 --x-includes=DIR X include files are in DIR
1541 --x-libraries=DIR X library files are in DIR
1542
1543System types:
1544 --build=BUILD configure for building on BUILD [guessed]
1545 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1546 --target=TARGET configure for building compilers for TARGET [HOST]
1547_ACEOF
1548fi
1549
1550if test -n "$ac_init_help"; then
1551
1552 cat <<\_ACEOF
1553
1554Optional Features:
81ecdfbb 1555 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1556 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1557 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1558 --enable-maintainer-mode
1559 enable make rules and dependencies not useful (and
1560 sometimes confusing) to the casual installer
2974be62 1561 --enable-plugins Enable support for plugins
da2f07f1 1562 --disable-largefile omit support for large files
a1220294
TT
1563 --enable-targets=TARGETS
1564 alternative target configurations
c0993dbe 1565 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1566 --disable-gdbmi disable machine-interface (MI)
1567 --enable-tui enable full-screen terminal user interface (TUI)
1568 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1569 --enable-profiling enable profiling of GDB
44cee4fd 1570 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1571 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1572 --enable-source-highlight
1573 enable source-highlight for source listings
a1220294 1574 --enable-werror treat compile warnings as errors
32c1c914 1575 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1576 --enable-gdb-build-warnings
32c1c914 1577 enable GDB specific build-time compiler warnings if
a1220294 1578 gcc is used
f35d5ade 1579 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1580 --enable-sim link gdb with simulator
496c0e1b
JB
1581 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1582 is auto)
8ecfd7bd
SDJ
1583 --enable-unit-tests Enable the inclusion of unit tests when compiling
1584 GDB
bec39cab
AC
1585
1586Optional Packages:
1587 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1588 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1589 --with-separate-debug-dir=PATH
32c1c914 1590 look for global separate debug info in this path
62e4f60c 1591 [LIBDIR/debug]
b14b1491
TT
1592 --with-gdb-datadir=PATH look for global separate data files in this path
1593 [DATADIR/gdb]
29b0e8a2 1594 --with-relocated-sources=PATH
32c1c914 1595 automatically relocate this path for source files
7349ff92 1596 --with-auto-load-dir=PATH
aff139ff 1597 directories from which to load auto-loaded scripts
1564a261 1598 [$debugdir:$datadir/auto-load]
bccbefd2 1599 --with-auto-load-safe-path=PATH
aff139ff 1600 directories safe to hold auto-loaded files
7349ff92 1601 [--with-auto-load-dir]
bccbefd2
JK
1602 --without-auto-load-safe-path
1603 do not restrict auto-loaded files locations
5922befa
LM
1604 --with-rocm-dbgapi=PATH specify prefix directory for installed ROCm-dbgapi
1605 package
05e7c244 1606 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1607 --with-curses use the curses library instead of the termcap
1608 library
c16158bc
JM
1609 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1610 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1611 --with-system-zlib use installed libz
016a3251
DD
1612 --with-gnu-ld assume the C compiler uses GNU ld default=no
1613 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1614 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1615 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1616 --with-system-readline use installed readline library
b8e0a31c
SD
1617 --with-jit-reader-dir=PATH
1618 directory to load the JIT readers from
5c39566f 1619 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1620 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1621 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1622 --with-mpfr include MPFR support (auto/yes/no)
1623 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1624 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1625 --with-python[=PYTHON] include python support
1626 (auto/yes/no/<python-program>)
ed3ef339
DE
1627 --with-guile[=GUILE] include guile support
1628 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1629 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1630 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1631 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1632 --without-included-regex
1633 don't use included regex; this is the default on
1634 systems with version 2 of the GNU C library (use
1635 with caution on other system)
81ecdfbb 1636 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1637 --with-system-gdbinit=PATH
32c1c914 1638 automatically load a system-wide gdbinit file
ed2a2229
CB
1639 --with-system-gdbinit-dir=PATH
1640 automatically load system-wide gdbinit files from
1641 this directory
608e2dbb
TT
1642 --with-lzma support lzma compression (auto/yes/no)
1643 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1644 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1645 --with-tcl directory containing tcl configuration (tclConfig.sh)
1646 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1647 --with-x use the X Window System
393fd4c3
YQ
1648 --with-babeltrace include babeltrace support (auto/yes/no)
1649 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1650 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
ccb1ba62
CB
1651 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1652 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1653 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
bec39cab
AC
1654
1655Some influential environment variables:
1656 CC C compiler command
1657 CFLAGS C compiler flags
1658 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1659 nonstandard directory <lib dir>
81ecdfbb 1660 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1661 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1662 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1663 CXX C++ compiler command
1664 CXXFLAGS C++ compiler flags
bec39cab 1665 CPP C preprocessor
f06e05e0
JK
1666 MAKEINFO Parent configure detects if it is of sufficient version.
1667 MAKEINFOFLAGS
1668 Parameters for MAKEINFO.
d0ac1c44
SM
1669 YACC The `Yet Another Compiler Compiler' implementation to use.
1670 Defaults to the first program found out of: `bison -y', `byacc',
1671 `yacc'.
81ecdfbb
RW
1672 YFLAGS The list of arguments that will be passed by default to $YACC.
1673 This script will default YFLAGS to the empty string to avoid a
1674 default value of `-d' given by some make applications.
1675 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1676
1677Use these variables to override the choices made by `configure' or to help
1678it to find libraries and programs with nonstandard names/locations.
1679
81ecdfbb 1680Report bugs to the package provider.
bec39cab 1681_ACEOF
81ecdfbb 1682ac_status=$?
bec39cab
AC
1683fi
1684
1685if test "$ac_init_help" = "recursive"; then
1686 # If there are subdirs, report their specific --help.
bec39cab 1687 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1688 test -d "$ac_dir" ||
1689 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1690 continue
bec39cab
AC
1691 ac_builddir=.
1692
81ecdfbb
RW
1693case "$ac_dir" in
1694.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1695*)
1696 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1697 # A ".." for each directory in $ac_dir_suffix.
1698 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1699 case $ac_top_builddir_sub in
1700 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1701 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1702 esac ;;
1703esac
1704ac_abs_top_builddir=$ac_pwd
1705ac_abs_builddir=$ac_pwd$ac_dir_suffix
1706# for backward compatibility:
1707ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1708
1709case $srcdir in
81ecdfbb 1710 .) # We are building in place.
bec39cab 1711 ac_srcdir=.
81ecdfbb
RW
1712 ac_top_srcdir=$ac_top_builddir_sub
1713 ac_abs_top_srcdir=$ac_pwd ;;
1714 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1715 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1716 ac_top_srcdir=$srcdir
1717 ac_abs_top_srcdir=$srcdir ;;
1718 *) # Relative name.
1719 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1720 ac_top_srcdir=$ac_top_build_prefix$srcdir
1721 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1722esac
81ecdfbb 1723ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1724
81ecdfbb
RW
1725 cd "$ac_dir" || { ac_status=$?; continue; }
1726 # Check for guested configure.
1727 if test -f "$ac_srcdir/configure.gnu"; then
1728 echo &&
1729 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1730 elif test -f "$ac_srcdir/configure"; then
1731 echo &&
1732 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1733 else
81ecdfbb
RW
1734 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1735 fi || ac_status=$?
1736 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1737 done
1738fi
1739
81ecdfbb 1740test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1741if $ac_init_version; then
1742 cat <<\_ACEOF
81ecdfbb 1743configure
d0ac1c44 1744generated by GNU Autoconf 2.69
bec39cab 1745
d0ac1c44 1746Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1747This configure script is free software; the Free Software Foundation
1748gives unlimited permission to copy, distribute and modify it.
1749_ACEOF
81ecdfbb 1750 exit
bec39cab 1751fi
bec39cab 1752
81ecdfbb
RW
1753## ------------------------ ##
1754## Autoconf initialization. ##
1755## ------------------------ ##
bec39cab 1756
81ecdfbb
RW
1757# ac_fn_c_try_compile LINENO
1758# --------------------------
1759# Try to compile conftest.$ac_ext, and return whether this succeeded.
1760ac_fn_c_try_compile ()
1761{
1762 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1763 rm -f conftest.$ac_objext
1764 if { { ac_try="$ac_compile"
1765case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1770$as_echo "$ac_try_echo"; } >&5
1771 (eval "$ac_compile") 2>conftest.err
1772 ac_status=$?
1773 if test -s conftest.err; then
1774 grep -v '^ *+' conftest.err >conftest.er1
1775 cat conftest.er1 >&5
1776 mv -f conftest.er1 conftest.err
1777 fi
1778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1779 test $ac_status = 0; } && {
1780 test -z "$ac_c_werror_flag" ||
1781 test ! -s conftest.err
1782 } && test -s conftest.$ac_objext; then :
1783 ac_retval=0
1784else
1785 $as_echo "$as_me: failed program was:" >&5
1786sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1787
81ecdfbb
RW
1788 ac_retval=1
1789fi
d0ac1c44
SM
1790 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1791 as_fn_set_status $ac_retval
81ecdfbb
RW
1792
1793} # ac_fn_c_try_compile
1794
3bc3d82a
PA
1795# ac_fn_cxx_try_compile LINENO
1796# ----------------------------
1797# Try to compile conftest.$ac_ext, and return whether this succeeded.
1798ac_fn_cxx_try_compile ()
1799{
1800 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1801 rm -f conftest.$ac_objext
1802 if { { ac_try="$ac_compile"
1803case "(($ac_try" in
1804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1805 *) ac_try_echo=$ac_try;;
1806esac
1807eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1808$as_echo "$ac_try_echo"; } >&5
1809 (eval "$ac_compile") 2>conftest.err
1810 ac_status=$?
1811 if test -s conftest.err; then
1812 grep -v '^ *+' conftest.err >conftest.er1
1813 cat conftest.er1 >&5
1814 mv -f conftest.er1 conftest.err
1815 fi
1816 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1817 test $ac_status = 0; } && {
1818 test -z "$ac_cxx_werror_flag" ||
1819 test ! -s conftest.err
1820 } && test -s conftest.$ac_objext; then :
1821 ac_retval=0
1822else
1823 $as_echo "$as_me: failed program was:" >&5
1824sed 's/^/| /' conftest.$ac_ext >&5
1825
1826 ac_retval=1
1827fi
d0ac1c44
SM
1828 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1829 as_fn_set_status $ac_retval
3bc3d82a
PA
1830
1831} # ac_fn_cxx_try_compile
1832
81ecdfbb
RW
1833# ac_fn_c_try_cpp LINENO
1834# ----------------------
1835# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1836ac_fn_c_try_cpp ()
bec39cab 1837{
81ecdfbb
RW
1838 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1839 if { { ac_try="$ac_cpp conftest.$ac_ext"
1840case "(($ac_try" in
1841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1842 *) ac_try_echo=$ac_try;;
1843esac
1844eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1845$as_echo "$ac_try_echo"; } >&5
1846 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1847 ac_status=$?
1848 if test -s conftest.err; then
1849 grep -v '^ *+' conftest.err >conftest.er1
1850 cat conftest.er1 >&5
1851 mv -f conftest.er1 conftest.err
1852 fi
1853 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1854 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1855 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1856 test ! -s conftest.err
1857 }; then :
1858 ac_retval=0
1859else
1860 $as_echo "$as_me: failed program was:" >&5
1861sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1862
81ecdfbb
RW
1863 ac_retval=1
1864fi
d0ac1c44
SM
1865 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1866 as_fn_set_status $ac_retval
bec39cab 1867
81ecdfbb 1868} # ac_fn_c_try_cpp
bec39cab 1869
81ecdfbb
RW
1870# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1871# -------------------------------------------------------
1872# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1873# the include files in INCLUDES and setting the cache variable VAR
1874# accordingly.
1875ac_fn_c_check_header_mongrel ()
1876{
1877 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1878 if eval \${$3+:} false; then :
81ecdfbb
RW
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1880$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1881if eval \${$3+:} false; then :
81ecdfbb
RW
1882 $as_echo_n "(cached) " >&6
1883fi
1884eval ac_res=\$$3
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1886$as_echo "$ac_res" >&6; }
1887else
1888 # Is the header compilable?
1889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1890$as_echo_n "checking $2 usability... " >&6; }
1891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$4
1894#include <$2>
1895_ACEOF
1896if ac_fn_c_try_compile "$LINENO"; then :
1897 ac_header_compiler=yes
1898else
1899 ac_header_compiler=no
1900fi
1901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1903$as_echo "$ac_header_compiler" >&6; }
bec39cab 1904
81ecdfbb
RW
1905# Is the header present?
1906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1907$as_echo_n "checking $2 presence... " >&6; }
1908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1909/* end confdefs.h. */
1910#include <$2>
1911_ACEOF
1912if ac_fn_c_try_cpp "$LINENO"; then :
1913 ac_header_preproc=yes
1914else
1915 ac_header_preproc=no
1916fi
d0ac1c44 1917rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1919$as_echo "$ac_header_preproc" >&6; }
bec39cab 1920
81ecdfbb
RW
1921# So? What about this header?
1922case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1923 yes:no: )
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1925$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1927$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1928 ;;
1929 no:yes:* )
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1931$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1933$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1935$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1937$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1939$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1940 ;;
1941esac
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1943$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1944if eval \${$3+:} false; then :
81ecdfbb
RW
1945 $as_echo_n "(cached) " >&6
1946else
1947 eval "$3=\$ac_header_compiler"
1948fi
1949eval ac_res=\$$3
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1951$as_echo "$ac_res" >&6; }
1952fi
d0ac1c44 1953 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1954
81ecdfbb 1955} # ac_fn_c_check_header_mongrel
bec39cab 1956
81ecdfbb
RW
1957# ac_fn_c_try_run LINENO
1958# ----------------------
1959# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1960# that executables *can* be run.
1961ac_fn_c_try_run ()
1962{
1963 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1964 if { { ac_try="$ac_link"
1965case "(($ac_try" in
1966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967 *) ac_try_echo=$ac_try;;
1968esac
1969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970$as_echo "$ac_try_echo"; } >&5
1971 (eval "$ac_link") 2>&5
1972 ac_status=$?
1973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1974 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1975 { { case "(($ac_try" in
1976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1977 *) ac_try_echo=$ac_try;;
1978esac
1979eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1980$as_echo "$ac_try_echo"; } >&5
1981 (eval "$ac_try") 2>&5
1982 ac_status=$?
1983 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1984 test $ac_status = 0; }; }; then :
1985 ac_retval=0
1986else
1987 $as_echo "$as_me: program exited with status $ac_status" >&5
1988 $as_echo "$as_me: failed program was:" >&5
1989sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1990
81ecdfbb
RW
1991 ac_retval=$ac_status
1992fi
1993 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1994 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1995 as_fn_set_status $ac_retval
bec39cab 1996
81ecdfbb 1997} # ac_fn_c_try_run
bec39cab 1998
81ecdfbb
RW
1999# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2000# -------------------------------------------------------
2001# Tests whether HEADER exists and can be compiled using the include files in
2002# INCLUDES, setting the cache variable VAR accordingly.
2003ac_fn_c_check_header_compile ()
2004{
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2007$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2008if eval \${$3+:} false; then :
81ecdfbb
RW
2009 $as_echo_n "(cached) " >&6
2010else
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014#include <$2>
bec39cab 2015_ACEOF
81ecdfbb
RW
2016if ac_fn_c_try_compile "$LINENO"; then :
2017 eval "$3=yes"
2018else
2019 eval "$3=no"
2020fi
2021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2022fi
2023eval ac_res=\$$3
2024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2025$as_echo "$ac_res" >&6; }
d0ac1c44 2026 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2027
81ecdfbb 2028} # ac_fn_c_check_header_compile
bec39cab 2029
2974be62
AM
2030# ac_fn_c_try_link LINENO
2031# -----------------------
2032# Try to link conftest.$ac_ext, and return whether this succeeded.
2033ac_fn_c_try_link ()
2034{
2035 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2036 rm -f conftest.$ac_objext conftest$ac_exeext
2037 if { { ac_try="$ac_link"
2038case "(($ac_try" in
2039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2040 *) ac_try_echo=$ac_try;;
2041esac
2042eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2043$as_echo "$ac_try_echo"; } >&5
2044 (eval "$ac_link") 2>conftest.err
2045 ac_status=$?
2046 if test -s conftest.err; then
2047 grep -v '^ *+' conftest.err >conftest.er1
2048 cat conftest.er1 >&5
2049 mv -f conftest.er1 conftest.err
2050 fi
2051 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2052 test $ac_status = 0; } && {
2053 test -z "$ac_c_werror_flag" ||
2054 test ! -s conftest.err
2055 } && test -s conftest$ac_exeext && {
2056 test "$cross_compiling" = yes ||
d0ac1c44 2057 test -x conftest$ac_exeext
2974be62
AM
2058 }; then :
2059 ac_retval=0
2060else
2061 $as_echo "$as_me: failed program was:" >&5
2062sed 's/^/| /' conftest.$ac_ext >&5
2063
2064 ac_retval=1
2065fi
2066 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2067 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2068 # interfere with the next link command; also delete a directory that is
2069 # left behind by Apple's compiler. We do this before executing the actions.
2070 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2071 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2072 as_fn_set_status $ac_retval
2974be62
AM
2073
2074} # ac_fn_c_try_link
2075
81ecdfbb
RW
2076# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2077# --------------------------------------------
2078# Tries to find the compile-time value of EXPR in a program that includes
2079# INCLUDES, setting VAR accordingly. Returns whether the value could be
2080# computed
2081ac_fn_c_compute_int ()
2082{
2083 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2084 if test "$cross_compiling" = yes; then
2085 # Depending upon the size, compute the lo and hi bounds.
2086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2087/* end confdefs.h. */
2088$4
2089int
2090main ()
2091{
2092static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2093test_array [0] = 0;
2094return test_array [0];
bec39cab 2095
81ecdfbb
RW
2096 ;
2097 return 0;
2098}
2099_ACEOF
2100if ac_fn_c_try_compile "$LINENO"; then :
2101 ac_lo=0 ac_mid=0
2102 while :; do
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2110test_array [0] = 0;
2111return test_array [0];
bec39cab 2112
81ecdfbb
RW
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=$ac_mid; break
2119else
2120 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2121 if test $ac_lo -le $ac_mid; then
2122 ac_lo= ac_hi=
2123 break
2124 fi
2125 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2126fi
81ecdfbb
RW
2127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2128 done
c906108c 2129else
81ecdfbb
RW
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133int
2134main ()
2135{
2136static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2137test_array [0] = 0;
2138return test_array [0];
bec39cab 2139
81ecdfbb
RW
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_compile "$LINENO"; then :
2145 ac_hi=-1 ac_mid=-1
2146 while :; do
2147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148/* end confdefs.h. */
2149$4
2150int
2151main ()
2152{
2153static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2154test_array [0] = 0;
2155return test_array [0];
bec39cab 2156
81ecdfbb
RW
2157 ;
2158 return 0;
2159}
2160_ACEOF
2161if ac_fn_c_try_compile "$LINENO"; then :
2162 ac_lo=$ac_mid; break
2163else
2164 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2165 if test $ac_mid -le $ac_hi; then
2166 ac_lo= ac_hi=
2167 break
2168 fi
2169 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2170fi
2171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2172 done
2173else
2174 ac_lo= ac_hi=
2175fi
2176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2177fi
2178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2179# Binary search between lo and hi bounds.
2180while test "x$ac_lo" != "x$ac_hi"; do
2181 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184$4
2185int
2186main ()
2187{
2188static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2189test_array [0] = 0;
2190return test_array [0];
bec39cab 2191
81ecdfbb
RW
2192 ;
2193 return 0;
2194}
2195_ACEOF
2196if ac_fn_c_try_compile "$LINENO"; then :
2197 ac_hi=$ac_mid
2198else
2199 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2200fi
2201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2202done
2203case $ac_lo in #((
2204?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2205'') ac_retval=1 ;;
2206esac
2207 else
2208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2209/* end confdefs.h. */
2210$4
2211static long int longval () { return $2; }
2212static unsigned long int ulongval () { return $2; }
2213#include <stdio.h>
2214#include <stdlib.h>
2215int
2216main ()
2217{
bec39cab 2218
81ecdfbb
RW
2219 FILE *f = fopen ("conftest.val", "w");
2220 if (! f)
2221 return 1;
2222 if (($2) < 0)
2223 {
2224 long int i = longval ();
2225 if (i != ($2))
2226 return 1;
2227 fprintf (f, "%ld", i);
2228 }
2229 else
2230 {
2231 unsigned long int i = ulongval ();
2232 if (i != ($2))
2233 return 1;
2234 fprintf (f, "%lu", i);
2235 }
2236 /* Do not output a trailing newline, as this causes \r\n confusion
2237 on some platforms. */
2238 return ferror (f) || fclose (f) != 0;
bec39cab 2239
81ecdfbb
RW
2240 ;
2241 return 0;
2242}
2243_ACEOF
2244if ac_fn_c_try_run "$LINENO"; then :
2245 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2246else
2247 ac_retval=1
2248fi
2249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2250 conftest.$ac_objext conftest.beam conftest.$ac_ext
2251rm -f conftest.val
bec39cab 2252
81ecdfbb 2253 fi
d0ac1c44
SM
2254 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2255 as_fn_set_status $ac_retval
bec39cab 2256
81ecdfbb 2257} # ac_fn_c_compute_int
bec39cab 2258
55a8c076
YQ
2259# ac_fn_c_check_func LINENO FUNC VAR
2260# ----------------------------------
2261# Tests whether FUNC exists, setting the cache variable VAR accordingly
2262ac_fn_c_check_func ()
81ecdfbb
RW
2263{
2264 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2266$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2267if eval \${$3+:} false; then :
81ecdfbb
RW
2268 $as_echo_n "(cached) " >&6
2269else
81ecdfbb
RW
2270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271/* end confdefs.h. */
55a8c076
YQ
2272/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2273 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2274#define $2 innocuous_$2
2275
2276/* System header to define __stub macros and hopefully few prototypes,
2277 which can conflict with char $2 (); below.
2278 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2279 <limits.h> exists even on freestanding compilers. */
2280
2281#ifdef __STDC__
2282# include <limits.h>
2283#else
2284# include <assert.h>
2285#endif
2286
2287#undef $2
2288
2289/* Override any GCC internal prototype to avoid an error.
2290 Use char because int might match the return type of a GCC
2291 builtin and then its argument prototype would still apply. */
2292#ifdef __cplusplus
2293extern "C"
2294#endif
2295char $2 ();
2296/* The GNU C library defines this for functions which it implements
2297 to always fail with ENOSYS. Some functions are actually named
2298 something starting with __ and the normal name is an alias. */
2299#if defined __stub_$2 || defined __stub___$2
2300choke me
2301#endif
2302
2303int
2304main ()
2305{
2306return $2 ();
2307 ;
2308 return 0;
2309}
2310_ACEOF
2311if ac_fn_c_try_link "$LINENO"; then :
2312 eval "$3=yes"
2313else
2314 eval "$3=no"
2315fi
2316rm -f core conftest.err conftest.$ac_objext \
2317 conftest$ac_exeext conftest.$ac_ext
2318fi
2319eval ac_res=\$$3
2320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2321$as_echo "$ac_res" >&6; }
d0ac1c44 2322 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2323
2324} # ac_fn_c_check_func
2325
c56ccc05
MM
2326# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2327# ----------------------------------------------------
2328# Tries to find if the field MEMBER exists in type AGGR, after including
2329# INCLUDES, setting cache variable VAR accordingly.
2330ac_fn_c_check_member ()
2331{
2332 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2334$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2335if eval \${$4+:} false; then :
c56ccc05
MM
2336 $as_echo_n "(cached) " >&6
2337else
2338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2339/* end confdefs.h. */
2340$5
2341int
2342main ()
2343{
2344static $2 ac_aggr;
2345if (ac_aggr.$3)
2346return 0;
2347 ;
2348 return 0;
2349}
2350_ACEOF
2351if ac_fn_c_try_compile "$LINENO"; then :
2352 eval "$4=yes"
2353else
2354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355/* end confdefs.h. */
2356$5
2357int
2358main ()
2359{
2360static $2 ac_aggr;
2361if (sizeof ac_aggr.$3)
2362return 0;
2363 ;
2364 return 0;
2365}
2366_ACEOF
2367if ac_fn_c_try_compile "$LINENO"; then :
2368 eval "$4=yes"
2369else
2370 eval "$4=no"
2371fi
2372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2373fi
2374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2375fi
2376eval ac_res=\$$4
2377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2378$as_echo "$ac_res" >&6; }
d0ac1c44 2379 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2380
2381} # ac_fn_c_check_member
2382
07697489
PA
2383# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2384# -------------------------------------------
2385# Tests whether TYPE exists after having included INCLUDES, setting cache
2386# variable VAR accordingly.
2387ac_fn_c_check_type ()
2388{
2389 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2391$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2392if eval \${$3+:} false; then :
07697489
PA
2393 $as_echo_n "(cached) " >&6
2394else
2395 eval "$3=no"
2396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2397/* end confdefs.h. */
2398$4
2399int
2400main ()
2401{
2402if (sizeof ($2))
2403 return 0;
2404 ;
2405 return 0;
2406}
2407_ACEOF
2408if ac_fn_c_try_compile "$LINENO"; then :
2409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2410/* end confdefs.h. */
2411$4
2412int
2413main ()
2414{
2415if (sizeof (($2)))
2416 return 0;
2417 ;
2418 return 0;
2419}
2420_ACEOF
2421if ac_fn_c_try_compile "$LINENO"; then :
2422
2423else
2424 eval "$3=yes"
2425fi
2426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2427fi
2428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2429fi
2430eval ac_res=\$$3
2431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2432$as_echo "$ac_res" >&6; }
d0ac1c44 2433 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2434
2435} # ac_fn_c_check_type
2436
d0ac1c44
SM
2437# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2438# ---------------------------------------------
2439# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2440# accordingly.
770d76d7
PA
2441ac_fn_c_check_decl ()
2442{
2443 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2444 as_decl_name=`echo $2|sed 's/ *(.*//'`
2445 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2447$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2448if eval \${$3+:} false; then :
770d76d7
PA
2449 $as_echo_n "(cached) " >&6
2450else
2451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2452/* end confdefs.h. */
2453$4
2454int
2455main ()
2456{
2457#ifndef $as_decl_name
2458#ifdef __cplusplus
2459 (void) $as_decl_use;
2460#else
2461 (void) $as_decl_name;
2462#endif
2463#endif
2464
2465 ;
2466 return 0;
2467}
2468_ACEOF
2469if ac_fn_c_try_compile "$LINENO"; then :
2470 eval "$3=yes"
2471else
2472 eval "$3=no"
2473fi
2474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2475fi
2476eval ac_res=\$$3
2477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2478$as_echo "$ac_res" >&6; }
d0ac1c44 2479 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2480
2481} # ac_fn_c_check_decl
f35d5ade
TT
2482
2483# ac_fn_cxx_try_link LINENO
2484# -------------------------
2485# Try to link conftest.$ac_ext, and return whether this succeeded.
2486ac_fn_cxx_try_link ()
2487{
2488 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2489 rm -f conftest.$ac_objext conftest$ac_exeext
2490 if { { ac_try="$ac_link"
2491case "(($ac_try" in
2492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2493 *) ac_try_echo=$ac_try;;
2494esac
2495eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2496$as_echo "$ac_try_echo"; } >&5
2497 (eval "$ac_link") 2>conftest.err
2498 ac_status=$?
2499 if test -s conftest.err; then
2500 grep -v '^ *+' conftest.err >conftest.er1
2501 cat conftest.er1 >&5
2502 mv -f conftest.er1 conftest.err
2503 fi
2504 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2505 test $ac_status = 0; } && {
2506 test -z "$ac_cxx_werror_flag" ||
2507 test ! -s conftest.err
2508 } && test -s conftest$ac_exeext && {
2509 test "$cross_compiling" = yes ||
2510 test -x conftest$ac_exeext
2511 }; then :
2512 ac_retval=0
2513else
2514 $as_echo "$as_me: failed program was:" >&5
2515sed 's/^/| /' conftest.$ac_ext >&5
2516
2517 ac_retval=1
2518fi
2519 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2520 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2521 # interfere with the next link command; also delete a directory that is
2522 # left behind by Apple's compiler. We do this before executing the actions.
2523 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2524 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2525 as_fn_set_status $ac_retval
2526
2527} # ac_fn_cxx_try_link
21987b9c
TT
2528
2529# ac_fn_cxx_check_func LINENO FUNC VAR
2530# ------------------------------------
2531# Tests whether FUNC exists, setting the cache variable VAR accordingly
2532ac_fn_cxx_check_func ()
2533{
2534 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2536$as_echo_n "checking for $2... " >&6; }
2537if eval \${$3+:} false; then :
2538 $as_echo_n "(cached) " >&6
2539else
2540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2541/* end confdefs.h. */
2542/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2543 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2544#define $2 innocuous_$2
2545
2546/* System header to define __stub macros and hopefully few prototypes,
2547 which can conflict with char $2 (); below.
2548 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2549 <limits.h> exists even on freestanding compilers. */
2550
2551#ifdef __STDC__
2552# include <limits.h>
2553#else
2554# include <assert.h>
2555#endif
2556
2557#undef $2
2558
2559/* Override any GCC internal prototype to avoid an error.
2560 Use char because int might match the return type of a GCC
2561 builtin and then its argument prototype would still apply. */
2562#ifdef __cplusplus
2563extern "C"
2564#endif
2565char $2 ();
2566/* The GNU C library defines this for functions which it implements
2567 to always fail with ENOSYS. Some functions are actually named
2568 something starting with __ and the normal name is an alias. */
2569#if defined __stub_$2 || defined __stub___$2
2570choke me
2571#endif
2572
2573int
2574main ()
2575{
2576return $2 ();
2577 ;
2578 return 0;
2579}
2580_ACEOF
2581if ac_fn_cxx_try_link "$LINENO"; then :
2582 eval "$3=yes"
2583else
2584 eval "$3=no"
2585fi
2586rm -f core conftest.err conftest.$ac_objext \
2587 conftest$ac_exeext conftest.$ac_ext
2588fi
2589eval ac_res=\$$3
2590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2591$as_echo "$ac_res" >&6; }
2592 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2593
2594} # ac_fn_cxx_check_func
81ecdfbb
RW
2595cat >config.log <<_ACEOF
2596This file contains any messages produced by compilers while
2597running configure, to aid debugging if configure makes a mistake.
d5af19ba 2598
81ecdfbb 2599It was created by $as_me, which was
d0ac1c44 2600generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2601
81ecdfbb 2602 $ $0 $@
413ccac7 2603
81ecdfbb
RW
2604_ACEOF
2605exec 5>>config.log
2606{
2607cat <<_ASUNAME
2608## --------- ##
2609## Platform. ##
2610## --------- ##
413ccac7 2611
81ecdfbb
RW
2612hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2613uname -m = `(uname -m) 2>/dev/null || echo unknown`
2614uname -r = `(uname -r) 2>/dev/null || echo unknown`
2615uname -s = `(uname -s) 2>/dev/null || echo unknown`
2616uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2617
81ecdfbb
RW
2618/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2619/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2620
81ecdfbb
RW
2621/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2622/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2623/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2624/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2625/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2626/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2627/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2628
81ecdfbb 2629_ASUNAME
bec39cab 2630
bec39cab
AC
2631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2632for as_dir in $PATH
2633do
2634 IFS=$as_save_IFS
2635 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2636 $as_echo "PATH: $as_dir"
2637 done
2638IFS=$as_save_IFS
bec39cab 2639
81ecdfbb 2640} >&5
bec39cab 2641
81ecdfbb 2642cat >&5 <<_ACEOF
bec39cab 2643
bec39cab 2644
81ecdfbb
RW
2645## ----------- ##
2646## Core tests. ##
2647## ----------- ##
2648
2649_ACEOF
2650
2651
2652# Keep a trace of the command line.
2653# Strip out --no-create and --no-recursion so they do not pile up.
2654# Strip out --silent because we don't want to record it for future runs.
2655# Also quote any args containing shell meta-characters.
2656# Make two passes to allow for proper duplicate-argument suppression.
2657ac_configure_args=
2658ac_configure_args0=
2659ac_configure_args1=
2660ac_must_keep_next=false
2661for ac_pass in 1 2
2662do
2663 for ac_arg
2664 do
2665 case $ac_arg in
2666 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2667 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2668 | -silent | --silent | --silen | --sile | --sil)
2669 continue ;;
2670 *\'*)
2671 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2672 esac
2673 case $ac_pass in
2674 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2675 2)
2676 as_fn_append ac_configure_args1 " '$ac_arg'"
2677 if test $ac_must_keep_next = true; then
2678 ac_must_keep_next=false # Got value, back to normal.
2679 else
2680 case $ac_arg in
2681 *=* | --config-cache | -C | -disable-* | --disable-* \
2682 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2683 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2684 | -with-* | --with-* | -without-* | --without-* | --x)
2685 case "$ac_configure_args0 " in
2686 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2687 esac
2688 ;;
2689 -* ) ac_must_keep_next=true ;;
2690 esac
2691 fi
2692 as_fn_append ac_configure_args " '$ac_arg'"
2693 ;;
2694 esac
2695 done
2696done
2697{ ac_configure_args0=; unset ac_configure_args0;}
2698{ ac_configure_args1=; unset ac_configure_args1;}
2699
2700# When interrupted or exit'd, cleanup temporary files, and complete
2701# config.log. We remove comments because anyway the quotes in there
2702# would cause problems or look ugly.
2703# WARNING: Use '\'' to represent an apostrophe within the trap.
2704# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2705trap 'exit_status=$?
2706 # Save into config.log some information that might help in debugging.
2707 {
2708 echo
2709
d0ac1c44 2710 $as_echo "## ---------------- ##
81ecdfbb 2711## Cache variables. ##
d0ac1c44 2712## ---------------- ##"
81ecdfbb
RW
2713 echo
2714 # The following way of writing the cache mishandles newlines in values,
2715(
2716 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2717 eval ac_val=\$$ac_var
2718 case $ac_val in #(
2719 *${as_nl}*)
2720 case $ac_var in #(
2721 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2722$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2723 esac
2724 case $ac_var in #(
2725 _ | IFS | as_nl) ;; #(
2726 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2727 *) { eval $ac_var=; unset $ac_var;} ;;
2728 esac ;;
2729 esac
2730 done
2731 (set) 2>&1 |
2732 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2733 *${as_nl}ac_space=\ *)
2734 sed -n \
2735 "s/'\''/'\''\\\\'\'''\''/g;
2736 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2737 ;; #(
2738 *)
2739 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2740 ;;
2741 esac |
2742 sort
2743)
2744 echo
2745
d0ac1c44 2746 $as_echo "## ----------------- ##
81ecdfbb 2747## Output variables. ##
d0ac1c44 2748## ----------------- ##"
81ecdfbb
RW
2749 echo
2750 for ac_var in $ac_subst_vars
2751 do
2752 eval ac_val=\$$ac_var
2753 case $ac_val in
2754 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2755 esac
2756 $as_echo "$ac_var='\''$ac_val'\''"
2757 done | sort
2758 echo
2759
2760 if test -n "$ac_subst_files"; then
d0ac1c44 2761 $as_echo "## ------------------- ##
81ecdfbb 2762## File substitutions. ##
d0ac1c44 2763## ------------------- ##"
81ecdfbb
RW
2764 echo
2765 for ac_var in $ac_subst_files
2766 do
2767 eval ac_val=\$$ac_var
2768 case $ac_val in
2769 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2770 esac
2771 $as_echo "$ac_var='\''$ac_val'\''"
2772 done | sort
2773 echo
2774 fi
2775
2776 if test -s confdefs.h; then
d0ac1c44 2777 $as_echo "## ----------- ##
81ecdfbb 2778## confdefs.h. ##
d0ac1c44 2779## ----------- ##"
81ecdfbb
RW
2780 echo
2781 cat confdefs.h
2782 echo
2783 fi
2784 test "$ac_signal" != 0 &&
2785 $as_echo "$as_me: caught signal $ac_signal"
2786 $as_echo "$as_me: exit $exit_status"
2787 } >&5
2788 rm -f core *.core core.conftest.* &&
2789 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2790 exit $exit_status
2791' 0
2792for ac_signal in 1 2 13 15; do
2793 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2794done
2795ac_signal=0
2796
2797# confdefs.h avoids OS command line length limits that DEFS can exceed.
2798rm -f -r conftest* confdefs.h
2799
2800$as_echo "/* confdefs.h */" > confdefs.h
2801
2802# Predefined preprocessor variables.
2803
2804cat >>confdefs.h <<_ACEOF
2805#define PACKAGE_NAME "$PACKAGE_NAME"
2806_ACEOF
2807
2808cat >>confdefs.h <<_ACEOF
2809#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2810_ACEOF
2811
2812cat >>confdefs.h <<_ACEOF
2813#define PACKAGE_VERSION "$PACKAGE_VERSION"
2814_ACEOF
2815
2816cat >>confdefs.h <<_ACEOF
2817#define PACKAGE_STRING "$PACKAGE_STRING"
2818_ACEOF
2819
2820cat >>confdefs.h <<_ACEOF
2821#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2822_ACEOF
2823
2824cat >>confdefs.h <<_ACEOF
2825#define PACKAGE_URL "$PACKAGE_URL"
2826_ACEOF
2827
2828
2829# Let the site file select an alternate cache file if it wants to.
2830# Prefer an explicitly selected file to automatically selected ones.
2831ac_site_file1=NONE
2832ac_site_file2=NONE
2833if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2834 # We do not want a PATH search for config.site.
2835 case $CONFIG_SITE in #((
2836 -*) ac_site_file1=./$CONFIG_SITE;;
2837 */*) ac_site_file1=$CONFIG_SITE;;
2838 *) ac_site_file1=./$CONFIG_SITE;;
2839 esac
81ecdfbb
RW
2840elif test "x$prefix" != xNONE; then
2841 ac_site_file1=$prefix/share/config.site
2842 ac_site_file2=$prefix/etc/config.site
2843else
2844 ac_site_file1=$ac_default_prefix/share/config.site
2845 ac_site_file2=$ac_default_prefix/etc/config.site
2846fi
2847for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2848do
2849 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2850 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2851 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2852$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2853 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2854 . "$ac_site_file" \
2855 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2856$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2857as_fn_error $? "failed to load site script $ac_site_file
2858See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2859 fi
2860done
2861
2862if test -r "$cache_file"; then
d0ac1c44
SM
2863 # Some versions of bash will fail to source /dev/null (special files
2864 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2865 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2867$as_echo "$as_me: loading cache $cache_file" >&6;}
2868 case $cache_file in
2869 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2870 *) . "./$cache_file";;
2871 esac
2872 fi
2873else
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2875$as_echo "$as_me: creating cache $cache_file" >&6;}
2876 >$cache_file
bec39cab
AC
2877fi
2878
d0ac1c44
SM
2879as_fn_append ac_header_list " stdlib.h"
2880as_fn_append ac_header_list " unistd.h"
2881as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2882# Check that the precious variables saved in the cache have kept the same
2883# value.
2884ac_cache_corrupted=false
2885for ac_var in $ac_precious_vars; do
2886 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2887 eval ac_new_set=\$ac_env_${ac_var}_set
2888 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2889 eval ac_new_val=\$ac_env_${ac_var}_value
2890 case $ac_old_set,$ac_new_set in
2891 set,)
2892 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2893$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2894 ac_cache_corrupted=: ;;
2895 ,set)
2896 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2897$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2898 ac_cache_corrupted=: ;;
2899 ,);;
2900 *)
2901 if test "x$ac_old_val" != "x$ac_new_val"; then
2902 # differences in whitespace do not lead to failure.
2903 ac_old_val_w=`echo x $ac_old_val`
2904 ac_new_val_w=`echo x $ac_new_val`
2905 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2907$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2908 ac_cache_corrupted=:
2909 else
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2911$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2912 eval $ac_var=\$ac_old_val
2913 fi
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2915$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2917$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2918 fi;;
2919 esac
2920 # Pass precious variables to config.status.
2921 if test "$ac_new_set" = set; then
2922 case $ac_new_val in
2923 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2924 *) ac_arg=$ac_var=$ac_new_val ;;
2925 esac
2926 case " $ac_configure_args " in
2927 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2928 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2929 esac
2930 fi
2931done
2932if $ac_cache_corrupted; then
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2936$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2937 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2938fi
2939## -------------------- ##
2940## Main body of script. ##
2941## -------------------- ##
2942
2943ac_ext=c
2944ac_cpp='$CPP $CPPFLAGS'
2945ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2946ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2947ac_compiler_gnu=$ac_cv_c_compiler_gnu
2948
2949
2950
2951
2952
2953ac_config_headers="$ac_config_headers config.h:config.in"
2954
2955
2956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2957$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2958 # Check whether --enable-maintainer-mode was given.
2959if test "${enable_maintainer_mode+set}" = set; then :
2960 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2961else
2962 USE_MAINTAINER_MODE=no
2963fi
2964
2965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2966$as_echo "$USE_MAINTAINER_MODE" >&6; }
2967 if test $USE_MAINTAINER_MODE = yes; then
2968 MAINTAINER_MODE_TRUE=
2969 MAINTAINER_MODE_FALSE='#'
2970else
2971 MAINTAINER_MODE_TRUE='#'
2972 MAINTAINER_MODE_FALSE=
2973fi
2974
2975 MAINT=$MAINTAINER_MODE_TRUE
2976
2977
2978
17ef446e 2979# Set the 'development' global.
270c9937 2980. $srcdir/../bfd/development.sh
f5f1cdb6 2981
81ecdfbb
RW
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
2987if test -n "$ac_tool_prefix"; then
2988 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2989set dummy ${ac_tool_prefix}gcc; ac_word=$2
2990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2991$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2992if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2993 $as_echo_n "(cached) " >&6
c906108c
SS
2994else
2995 if test -n "$CC"; then
2996 ac_cv_prog_CC="$CC" # Let the user override the test.
2997else
bec39cab
AC
2998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2999for as_dir in $PATH
3000do
3001 IFS=$as_save_IFS
3002 test -z "$as_dir" && as_dir=.
81ecdfbb 3003 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3005 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3007 break 2
3008 fi
3009done
81ecdfbb
RW
3010 done
3011IFS=$as_save_IFS
bec39cab 3012
c906108c
SS
3013fi
3014fi
bec39cab 3015CC=$ac_cv_prog_CC
c906108c 3016if test -n "$CC"; then
81ecdfbb
RW
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3018$as_echo "$CC" >&6; }
c906108c 3019else
81ecdfbb
RW
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3021$as_echo "no" >&6; }
c906108c
SS
3022fi
3023
81ecdfbb 3024
b4e70030
JB
3025fi
3026if test -z "$ac_cv_prog_CC"; then
3027 ac_ct_CC=$CC
81ecdfbb
RW
3028 # Extract the first word of "gcc", so it can be a program name with args.
3029set dummy gcc; ac_word=$2
3030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3031$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3032if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3033 $as_echo_n "(cached) " >&6
b4e70030
JB
3034else
3035 if test -n "$ac_ct_CC"; then
3036 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3037else
3038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3039for as_dir in $PATH
3040do
3041 IFS=$as_save_IFS
3042 test -z "$as_dir" && as_dir=.
81ecdfbb 3043 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3045 ac_cv_prog_ac_ct_CC="gcc"
3046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 3047 break 2
4e8d927d 3048 fi
b4e70030 3049done
81ecdfbb
RW
3050 done
3051IFS=$as_save_IFS
b4e70030
JB
3052
3053fi
3054fi
3055ac_ct_CC=$ac_cv_prog_ac_ct_CC
3056if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3058$as_echo "$ac_ct_CC" >&6; }
b4e70030 3059else
81ecdfbb
RW
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3061$as_echo "no" >&6; }
b4e70030
JB
3062fi
3063
81ecdfbb
RW
3064 if test "x$ac_ct_CC" = x; then
3065 CC=""
3066 else
3067 case $cross_compiling:$ac_tool_warned in
3068yes:)
3069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3071ac_tool_warned=yes ;;
3072esac
3073 CC=$ac_ct_CC
3074 fi
b4e70030
JB
3075else
3076 CC="$ac_cv_prog_CC"
3077fi
3078
c906108c 3079if test -z "$CC"; then
81ecdfbb
RW
3080 if test -n "$ac_tool_prefix"; then
3081 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3082set dummy ${ac_tool_prefix}cc; ac_word=$2
3083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3084$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3085if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3086 $as_echo_n "(cached) " >&6
c906108c
SS
3087else
3088 if test -n "$CC"; then
3089 ac_cv_prog_CC="$CC" # Let the user override the test.
3090else
bec39cab
AC
3091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3092for as_dir in $PATH
3093do
3094 IFS=$as_save_IFS
3095 test -z "$as_dir" && as_dir=.
81ecdfbb 3096 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3098 ac_cv_prog_CC="${ac_tool_prefix}cc"
3099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3100 break 2
3101 fi
3102done
81ecdfbb
RW
3103 done
3104IFS=$as_save_IFS
3105
3106fi
3107fi
3108CC=$ac_cv_prog_CC
3109if test -n "$CC"; then
3110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3111$as_echo "$CC" >&6; }
3112else
3113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3114$as_echo "no" >&6; }
3115fi
3116
3117
3118 fi
3119fi
3120if test -z "$CC"; then
3121 # Extract the first word of "cc", so it can be a program name with args.
3122set dummy cc; ac_word=$2
3123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3124$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3125if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3126 $as_echo_n "(cached) " >&6
3127else
3128 if test -n "$CC"; then
3129 ac_cv_prog_CC="$CC" # Let the user override the test.
3130else
3131 ac_prog_rejected=no
3132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3133for as_dir in $PATH
3134do
3135 IFS=$as_save_IFS
3136 test -z "$as_dir" && as_dir=.
3137 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3138 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3139 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3140 ac_prog_rejected=yes
3141 continue
3142 fi
3143 ac_cv_prog_CC="cc"
3144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3145 break 2
3146 fi
3147done
3148 done
3149IFS=$as_save_IFS
bec39cab 3150
c906108c
SS
3151if test $ac_prog_rejected = yes; then
3152 # We found a bogon in the path, so make sure we never use it.
3153 set dummy $ac_cv_prog_CC
3154 shift
bec39cab 3155 if test $# != 0; then
c906108c
SS
3156 # We chose a different compiler from the bogus one.
3157 # However, it has the same basename, so the bogon will be chosen
3158 # first if we set CC to just the basename; use the full file name.
3159 shift
bec39cab 3160 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3161 fi
3162fi
3163fi
3164fi
bec39cab 3165CC=$ac_cv_prog_CC
c906108c 3166if test -n "$CC"; then
81ecdfbb
RW
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3168$as_echo "$CC" >&6; }
c906108c 3169else
81ecdfbb
RW
3170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3171$as_echo "no" >&6; }
c906108c
SS
3172fi
3173
81ecdfbb 3174
bec39cab
AC
3175fi
3176if test -z "$CC"; then
3177 if test -n "$ac_tool_prefix"; then
81ecdfbb 3178 for ac_prog in cl.exe
bec39cab
AC
3179 do
3180 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3181set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3183$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3184if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3185 $as_echo_n "(cached) " >&6
c906108c
SS
3186else
3187 if test -n "$CC"; then
3188 ac_cv_prog_CC="$CC" # Let the user override the test.
3189else
bec39cab
AC
3190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3191for as_dir in $PATH
3192do
3193 IFS=$as_save_IFS
3194 test -z "$as_dir" && as_dir=.
81ecdfbb 3195 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3196 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3197 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3198 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3199 break 2
3200 fi
3201done
81ecdfbb
RW
3202 done
3203IFS=$as_save_IFS
bec39cab 3204
c906108c
SS
3205fi
3206fi
bec39cab 3207CC=$ac_cv_prog_CC
c906108c 3208if test -n "$CC"; then
81ecdfbb
RW
3209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3210$as_echo "$CC" >&6; }
c906108c 3211else
81ecdfbb
RW
3212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3213$as_echo "no" >&6; }
c906108c 3214fi
bec39cab 3215
81ecdfbb 3216
bec39cab
AC
3217 test -n "$CC" && break
3218 done
3219fi
3220if test -z "$CC"; then
3221 ac_ct_CC=$CC
81ecdfbb 3222 for ac_prog in cl.exe
bec39cab
AC
3223do
3224 # Extract the first word of "$ac_prog", so it can be a program name with args.
3225set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3227$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3228if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3229 $as_echo_n "(cached) " >&6
bec39cab
AC
3230else
3231 if test -n "$ac_ct_CC"; then
3232 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3233else
3234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3235for as_dir in $PATH
3236do
3237 IFS=$as_save_IFS
3238 test -z "$as_dir" && as_dir=.
81ecdfbb 3239 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3240 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3241 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3242 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3243 break 2
c906108c 3244 fi
bec39cab 3245done
81ecdfbb
RW
3246 done
3247IFS=$as_save_IFS
bec39cab
AC
3248
3249fi
3250fi
3251ac_ct_CC=$ac_cv_prog_ac_ct_CC
3252if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3254$as_echo "$ac_ct_CC" >&6; }
bec39cab 3255else
81ecdfbb
RW
3256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3257$as_echo "no" >&6; }
c906108c
SS
3258fi
3259
81ecdfbb 3260
bec39cab
AC
3261 test -n "$ac_ct_CC" && break
3262done
c906108c 3263
81ecdfbb
RW
3264 if test "x$ac_ct_CC" = x; then
3265 CC=""
3266 else
3267 case $cross_compiling:$ac_tool_warned in
3268yes:)
3269{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3270$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3271ac_tool_warned=yes ;;
3272esac
3273 CC=$ac_ct_CC
3274 fi
bec39cab
AC
3275fi
3276
3277fi
3278
3279
81ecdfbb
RW
3280test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3281$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3282as_fn_error $? "no acceptable C compiler found in \$PATH
3283See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3284
3285# Provide some information about the compiler.
81ecdfbb
RW
3286$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3287set X $ac_compile
3288ac_compiler=$2
3289for ac_option in --version -v -V -qversion; do
3290 { { ac_try="$ac_compiler $ac_option >&5"
3291case "(($ac_try" in
3292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3293 *) ac_try_echo=$ac_try;;
3294esac
3295eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3296$as_echo "$ac_try_echo"; } >&5
3297 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3298 ac_status=$?
81ecdfbb
RW
3299 if test -s conftest.err; then
3300 sed '10a\
3301... rest of stderr output deleted ...
3302 10q' conftest.err >conftest.er1
3303 cat conftest.er1 >&5
81ecdfbb 3304 fi
d0ac1c44 3305 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3306 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3307 test $ac_status = 0; }
3308done
bec39cab 3309
81ecdfbb 3310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3311/* end confdefs.h. */
3312
3313int
3314main ()
3315{
3316
3317 ;
3318 return 0;
3319}
3320_ACEOF
3321ac_clean_files_save=$ac_clean_files
d0ac1c44 3322ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3323# Try to create an executable without -o first, disregard a.out.
3324# It will help us diagnose broken compilers, and finding out an intuition
3325# of exeext.
d0ac1c44
SM
3326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3327$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3328ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3329
3330# The possible output files:
3331ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3332
3333ac_rmfiles=
3334for ac_file in $ac_files
3335do
3336 case $ac_file in
3337 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3338 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3339 esac
3340done
3341rm -f $ac_rmfiles
3342
3343if { { ac_try="$ac_link_default"
3344case "(($ac_try" in
3345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3346 *) ac_try_echo=$ac_try;;
3347esac
3348eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3349$as_echo "$ac_try_echo"; } >&5
3350 (eval "$ac_link_default") 2>&5
3351 ac_status=$?
3352 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3353 test $ac_status = 0; }; then :
3354 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3355# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3356# in a Makefile. We should not override ac_cv_exeext if it was cached,
3357# so that the user can short-circuit this test for compilers unknown to
3358# Autoconf.
3359for ac_file in $ac_files ''
bec39cab
AC
3360do
3361 test -f "$ac_file" || continue
3362 case $ac_file in
81ecdfbb 3363 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3364 ;;
3365 [ab].out )
3366 # We found the default executable, but exeext='' is most
3367 # certainly right.
3368 break;;
3369 *.* )
81ecdfbb
RW
3370 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3371 then :; else
3372 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3373 fi
3374 # We set ac_cv_exeext here because the later test for it is not
3375 # safe: cross compilers may not add the suffix if given an `-o'
3376 # argument, so we may need to know it at that point already.
3377 # Even if this section looks crufty: it has the advantage of
3378 # actually working.
b4e70030
JB
3379 break;;
3380 * )
3381 break;;
bec39cab
AC
3382 esac
3383done
81ecdfbb
RW
3384test "$ac_cv_exeext" = no && ac_cv_exeext=
3385
bec39cab 3386else
81ecdfbb
RW
3387 ac_file=''
3388fi
81ecdfbb 3389if test -z "$ac_file"; then :
d0ac1c44
SM
3390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3391$as_echo "no" >&6; }
3392$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3393sed 's/^/| /' conftest.$ac_ext >&5
3394
81ecdfbb
RW
3395{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3396$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3397as_fn_error 77 "C compiler cannot create executables
3398See \`config.log' for more details" "$LINENO" 5; }
3399else
3400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3401$as_echo "yes" >&6; }
bec39cab 3402fi
d0ac1c44
SM
3403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3404$as_echo_n "checking for C compiler default output file name... " >&6; }
3405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3406$as_echo "$ac_file" >&6; }
b4e70030 3407ac_exeext=$ac_cv_exeext
b4e70030 3408
d0ac1c44 3409rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3410ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3412$as_echo_n "checking for suffix of executables... " >&6; }
3413if { { ac_try="$ac_link"
3414case "(($ac_try" in
3415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3416 *) ac_try_echo=$ac_try;;
3417esac
3418eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3419$as_echo "$ac_try_echo"; } >&5
3420 (eval "$ac_link") 2>&5
bec39cab 3421 ac_status=$?
81ecdfbb
RW
3422 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3423 test $ac_status = 0; }; then :
b4e70030
JB
3424 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3425# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3426# work properly (i.e., refer to `conftest.exe'), while it won't with
3427# `rm'.
3428for ac_file in conftest.exe conftest conftest.*; do
3429 test -f "$ac_file" || continue
3430 case $ac_file in
81ecdfbb 3431 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3432 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3433 break;;
3434 * ) break;;
3435 esac
3436done
c906108c 3437else
81ecdfbb
RW
3438 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3439$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3440as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3441See \`config.log' for more details" "$LINENO" 5; }
c906108c 3442fi
d0ac1c44 3443rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3445$as_echo "$ac_cv_exeext" >&6; }
c906108c 3446
b4e70030 3447rm -f conftest.$ac_ext
bec39cab
AC
3448EXEEXT=$ac_cv_exeext
3449ac_exeext=$EXEEXT
d0ac1c44
SM
3450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3451/* end confdefs.h. */
3452#include <stdio.h>
3453int
3454main ()
3455{
3456FILE *f = fopen ("conftest.out", "w");
3457 return ferror (f) || fclose (f) != 0;
3458
3459 ;
3460 return 0;
3461}
3462_ACEOF
3463ac_clean_files="$ac_clean_files conftest.out"
3464# Check that the compiler produces executables we can run. If not, either
3465# the compiler is broken, or we cross compile.
3466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3467$as_echo_n "checking whether we are cross compiling... " >&6; }
3468if test "$cross_compiling" != yes; then
3469 { { ac_try="$ac_link"
3470case "(($ac_try" in
3471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3472 *) ac_try_echo=$ac_try;;
3473esac
3474eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3475$as_echo "$ac_try_echo"; } >&5
3476 (eval "$ac_link") 2>&5
3477 ac_status=$?
3478 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3479 test $ac_status = 0; }
3480 if { ac_try='./conftest$ac_cv_exeext'
3481 { { case "(($ac_try" in
3482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3483 *) ac_try_echo=$ac_try;;
3484esac
3485eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3486$as_echo "$ac_try_echo"; } >&5
3487 (eval "$ac_try") 2>&5
3488 ac_status=$?
3489 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3490 test $ac_status = 0; }; }; then
3491 cross_compiling=no
3492 else
3493 if test "$cross_compiling" = maybe; then
3494 cross_compiling=yes
3495 else
3496 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3498as_fn_error $? "cannot run C compiled programs.
3499If you meant to cross compile, use \`--host'.
3500See \`config.log' for more details" "$LINENO" 5; }
3501 fi
3502 fi
3503fi
3504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3505$as_echo "$cross_compiling" >&6; }
3506
3507rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3508ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3510$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3511if ${ac_cv_objext+:} false; then :
81ecdfbb 3512 $as_echo_n "(cached) " >&6
bec39cab 3513else
81ecdfbb 3514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3515/* end confdefs.h. */
3516
3517int
3518main ()
3519{
3520
3521 ;
3522 return 0;
3523}
3524_ACEOF
3525rm -f conftest.o conftest.obj
81ecdfbb
RW
3526if { { ac_try="$ac_compile"
3527case "(($ac_try" in
3528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3529 *) ac_try_echo=$ac_try;;
3530esac
3531eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3532$as_echo "$ac_try_echo"; } >&5
3533 (eval "$ac_compile") 2>&5
3534 ac_status=$?
3535 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3536 test $ac_status = 0; }; then :
3537 for ac_file in conftest.o conftest.obj conftest.*; do
3538 test -f "$ac_file" || continue;
bec39cab 3539 case $ac_file in
81ecdfbb 3540 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3541 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3542 break;;
3543 esac
3544done
c906108c 3545else
81ecdfbb 3546 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3547sed 's/^/| /' conftest.$ac_ext >&5
3548
81ecdfbb
RW
3549{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3551as_fn_error $? "cannot compute suffix of object files: cannot compile
3552See \`config.log' for more details" "$LINENO" 5; }
c906108c 3553fi
b4e70030 3554rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3555fi
81ecdfbb
RW
3556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3557$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3558OBJEXT=$ac_cv_objext
3559ac_objext=$OBJEXT
81ecdfbb
RW
3560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3561$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3562if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3563 $as_echo_n "(cached) " >&6
c906108c 3564else
81ecdfbb 3565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3566/* end confdefs.h. */
3567
3568int
3569main ()
3570{
3571#ifndef __GNUC__
3572 choke me
3573#endif
3574
3575 ;
3576 return 0;
3577}
3578_ACEOF
81ecdfbb 3579if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3580 ac_compiler_gnu=yes
3581else
81ecdfbb 3582 ac_compiler_gnu=no
bec39cab 3583fi
81ecdfbb 3584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3585ac_cv_c_compiler_gnu=$ac_compiler_gnu
3586
3587fi
81ecdfbb
RW
3588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3589$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3590if test $ac_compiler_gnu = yes; then
3591 GCC=yes
3592else
3593 GCC=
3594fi
bec39cab
AC
3595ac_test_CFLAGS=${CFLAGS+set}
3596ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3598$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3599if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3600 $as_echo_n "(cached) " >&6
bec39cab 3601else
81ecdfbb
RW
3602 ac_save_c_werror_flag=$ac_c_werror_flag
3603 ac_c_werror_flag=yes
3604 ac_cv_prog_cc_g=no
3605 CFLAGS="-g"
3606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3607/* end confdefs.h. */
3608
3609int
3610main ()
3611{
3612
3613 ;
3614 return 0;
3615}
3616_ACEOF
81ecdfbb 3617if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3618 ac_cv_prog_cc_g=yes
3619else
81ecdfbb
RW
3620 CFLAGS=""
3621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3622/* end confdefs.h. */
3623
3624int
3625main ()
3626{
3627
3628 ;
3629 return 0;
3630}
3631_ACEOF
3632if ac_fn_c_try_compile "$LINENO"; then :
3633
3634else
3635 ac_c_werror_flag=$ac_save_c_werror_flag
3636 CFLAGS="-g"
3637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3638/* end confdefs.h. */
3639
3640int
3641main ()
3642{
c906108c 3643
81ecdfbb
RW
3644 ;
3645 return 0;
3646}
3647_ACEOF
3648if ac_fn_c_try_compile "$LINENO"; then :
3649 ac_cv_prog_cc_g=yes
3650fi
3651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3652fi
3653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3654fi
81ecdfbb
RW
3655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3656 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3657fi
81ecdfbb
RW
3658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3659$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3660if test "$ac_test_CFLAGS" = set; then
bec39cab 3661 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3662elif test $ac_cv_prog_cc_g = yes; then
3663 if test "$GCC" = yes; then
3664 CFLAGS="-g -O2"
3665 else
3666 CFLAGS="-g"
3667 fi
3668else
3669 if test "$GCC" = yes; then
3670 CFLAGS="-O2"
3671 else
3672 CFLAGS=
3673 fi
3674fi
81ecdfbb
RW
3675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3676$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3677if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3678 $as_echo_n "(cached) " >&6
bec39cab 3679else
81ecdfbb 3680 ac_cv_prog_cc_c89=no
bec39cab 3681ac_save_CC=$CC
81ecdfbb 3682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3683/* end confdefs.h. */
c906108c
SS
3684#include <stdarg.h>
3685#include <stdio.h>
d0ac1c44 3686struct stat;
c906108c
SS
3687/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3688struct buf { int x; };
3689FILE * (*rcsopen) (struct buf *, struct stat *, int);
3690static char *e (p, i)
3691 char **p;
3692 int i;
3693{
3694 return p[i];
3695}
3696static char *f (char * (*g) (char **, int), char **p, ...)
3697{
3698 char *s;
3699 va_list v;
3700 va_start (v,p);
3701 s = g (p, va_arg (v,int));
3702 va_end (v);
3703 return s;
3704}
bec39cab
AC
3705
3706/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3707 function prototypes and stuff, but not '\xHH' hex character constants.
3708 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3709 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3710 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3711 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3712 that's true only with -std. */
bec39cab
AC
3713int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3714
81ecdfbb
RW
3715/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3716 inside strings and character constants. */
3717#define FOO(x) 'x'
3718int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3719
c906108c
SS
3720int test (int i, double x);
3721struct s1 {int (*f) (int a);};
3722struct s2 {int (*f) (double a);};
3723int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3724int argc;
3725char **argv;
bec39cab
AC
3726int
3727main ()
3728{
c906108c 3729return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3730 ;
3731 return 0;
3732}
3733_ACEOF
81ecdfbb
RW
3734for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3735 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3736do
3737 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3738 if ac_fn_c_try_compile "$LINENO"; then :
3739 ac_cv_prog_cc_c89=$ac_arg
c906108c 3740fi
81ecdfbb
RW
3741rm -f core conftest.err conftest.$ac_objext
3742 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3743done
81ecdfbb 3744rm -f conftest.$ac_ext
bec39cab 3745CC=$ac_save_CC
c906108c
SS
3746
3747fi
81ecdfbb
RW
3748# AC_CACHE_VAL
3749case "x$ac_cv_prog_cc_c89" in
3750 x)
3751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3752$as_echo "none needed" >&6; } ;;
3753 xno)
3754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3755$as_echo "unsupported" >&6; } ;;
bec39cab 3756 *)
81ecdfbb
RW
3757 CC="$CC $ac_cv_prog_cc_c89"
3758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3759$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3760esac
81ecdfbb 3761if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3762
b4e70030
JB
3763fi
3764
bec39cab
AC
3765ac_ext=c
3766ac_cpp='$CPP $CPPFLAGS'
3767ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3768ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3769ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3770
3bc3d82a
PA
3771ac_ext=cpp
3772ac_cpp='$CXXCPP $CPPFLAGS'
3773ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3774ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3775ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3776if test -z "$CXX"; then
3777 if test -n "$CCC"; then
3778 CXX=$CCC
3779 else
3780 if test -n "$ac_tool_prefix"; then
3781 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3782 do
3783 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3784set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3786$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3787if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3788 $as_echo_n "(cached) " >&6
3789else
3790 if test -n "$CXX"; then
3791 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3792else
3793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3794for as_dir in $PATH
3795do
3796 IFS=$as_save_IFS
3797 test -z "$as_dir" && as_dir=.
3798 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3799 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3800 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3801 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3802 break 2
3803 fi
3804done
3805 done
3806IFS=$as_save_IFS
3807
3808fi
3809fi
3810CXX=$ac_cv_prog_CXX
3811if test -n "$CXX"; then
3812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3813$as_echo "$CXX" >&6; }
3814else
3815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3816$as_echo "no" >&6; }
3817fi
3818
3819
3820 test -n "$CXX" && break
3821 done
3822fi
3823if test -z "$CXX"; then
3824 ac_ct_CXX=$CXX
3825 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3826do
3827 # Extract the first word of "$ac_prog", so it can be a program name with args.
3828set dummy $ac_prog; ac_word=$2
3829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3830$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3831if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3832 $as_echo_n "(cached) " >&6
3833else
3834 if test -n "$ac_ct_CXX"; then
3835 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3836else
3837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3838for as_dir in $PATH
3839do
3840 IFS=$as_save_IFS
3841 test -z "$as_dir" && as_dir=.
3842 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3843 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3844 ac_cv_prog_ac_ct_CXX="$ac_prog"
3845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3846 break 2
3847 fi
3848done
3849 done
3850IFS=$as_save_IFS
3851
3852fi
3853fi
3854ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3855if test -n "$ac_ct_CXX"; then
3856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3857$as_echo "$ac_ct_CXX" >&6; }
3858else
3859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3860$as_echo "no" >&6; }
3861fi
3862
3863
3864 test -n "$ac_ct_CXX" && break
3865done
3866
3867 if test "x$ac_ct_CXX" = x; then
3868 CXX="g++"
3869 else
3870 case $cross_compiling:$ac_tool_warned in
3871yes:)
3872{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3873$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3874ac_tool_warned=yes ;;
3875esac
3876 CXX=$ac_ct_CXX
3877 fi
3878fi
3879
3880 fi
3881fi
3882# Provide some information about the compiler.
3883$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3884set X $ac_compile
3885ac_compiler=$2
3886for ac_option in --version -v -V -qversion; do
3887 { { ac_try="$ac_compiler $ac_option >&5"
3888case "(($ac_try" in
3889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3890 *) ac_try_echo=$ac_try;;
3891esac
3892eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3893$as_echo "$ac_try_echo"; } >&5
3894 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3895 ac_status=$?
3896 if test -s conftest.err; then
3897 sed '10a\
3898... rest of stderr output deleted ...
3899 10q' conftest.err >conftest.er1
3900 cat conftest.er1 >&5
3bc3d82a 3901 fi
d0ac1c44 3902 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3903 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3904 test $ac_status = 0; }
3905done
3906
3907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3908$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3909if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3910 $as_echo_n "(cached) " >&6
3911else
3912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3913/* end confdefs.h. */
3914
3915int
3916main ()
3917{
3918#ifndef __GNUC__
3919 choke me
3920#endif
3921
3922 ;
3923 return 0;
3924}
3925_ACEOF
3926if ac_fn_cxx_try_compile "$LINENO"; then :
3927 ac_compiler_gnu=yes
3928else
3929 ac_compiler_gnu=no
3930fi
3931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3932ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3933
3934fi
3935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3936$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3937if test $ac_compiler_gnu = yes; then
3938 GXX=yes
3939else
3940 GXX=
3941fi
3942ac_test_CXXFLAGS=${CXXFLAGS+set}
3943ac_save_CXXFLAGS=$CXXFLAGS
3944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3945$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3946if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3947 $as_echo_n "(cached) " >&6
3948else
3949 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3950 ac_cxx_werror_flag=yes
3951 ac_cv_prog_cxx_g=no
3952 CXXFLAGS="-g"
3953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3954/* end confdefs.h. */
3955
3956int
3957main ()
3958{
3959
3960 ;
3961 return 0;
3962}
3963_ACEOF
3964if ac_fn_cxx_try_compile "$LINENO"; then :
3965 ac_cv_prog_cxx_g=yes
3966else
3967 CXXFLAGS=""
3968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3969/* end confdefs.h. */
3970
3971int
3972main ()
3973{
3974
3975 ;
3976 return 0;
3977}
3978_ACEOF
3979if ac_fn_cxx_try_compile "$LINENO"; then :
3980
3981else
3982 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3983 CXXFLAGS="-g"
3984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3985/* end confdefs.h. */
3986
3987int
3988main ()
3989{
3990
3991 ;
3992 return 0;
3993}
3994_ACEOF
3995if ac_fn_cxx_try_compile "$LINENO"; then :
3996 ac_cv_prog_cxx_g=yes
3997fi
3998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3999fi
4000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4001fi
4002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4003 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4004fi
4005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4006$as_echo "$ac_cv_prog_cxx_g" >&6; }
4007if test "$ac_test_CXXFLAGS" = set; then
4008 CXXFLAGS=$ac_save_CXXFLAGS
4009elif test $ac_cv_prog_cxx_g = yes; then
4010 if test "$GXX" = yes; then
4011 CXXFLAGS="-g -O2"
4012 else
4013 CXXFLAGS="-g"
4014 fi
4015else
4016 if test "$GXX" = yes; then
4017 CXXFLAGS="-O2"
4018 else
4019 CXXFLAGS=
4020 fi
4021fi
4022ac_ext=c
4023ac_cpp='$CPP $CPPFLAGS'
4024ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4025ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4026ac_compiler_gnu=$ac_cv_c_compiler_gnu
4027
4028
60ca704f 4029
bec39cab
AC
4030ac_ext=c
4031ac_cpp='$CPP $CPPFLAGS'
4032ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4033ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4034ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
4035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4036$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
4037# On Suns, sometimes $CPP names a directory.
4038if test -n "$CPP" && test -d "$CPP"; then
4039 CPP=
8bb2c122 4040fi
bec39cab 4041if test -z "$CPP"; then
d0ac1c44 4042 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 4043 $as_echo_n "(cached) " >&6
bec39cab
AC
4044else
4045 # Double quotes because CPP needs to be expanded
4046 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4047 do
4048 ac_preproc_ok=false
4049for ac_c_preproc_warn_flag in '' yes
4050do
4051 # Use a header file that comes with gcc, so configuring glibc
4052 # with a fresh cross-compiler works.
4053 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4054 # <limits.h> exists even on freestanding compilers.
4055 # On the NeXT, cc -E runs the code through the compiler's parser,
4056 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4058/* end confdefs.h. */
4059#ifdef __STDC__
4060# include <limits.h>
4061#else
4062# include <assert.h>
4063#endif
4064 Syntax error
4065_ACEOF
81ecdfbb 4066if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4067
81ecdfbb 4068else
bec39cab
AC
4069 # Broken: fails on valid input.
4070continue
4071fi
d0ac1c44 4072rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4073
81ecdfbb 4074 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4075 # can be detected and how.
81ecdfbb 4076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4077/* end confdefs.h. */
4078#include <ac_nonexistent.h>
4079_ACEOF
81ecdfbb 4080if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4081 # Broken: success on invalid input.
4082continue
8bb2c122 4083else
bec39cab
AC
4084 # Passes both tests.
4085ac_preproc_ok=:
4086break
8bb2c122 4087fi
d0ac1c44 4088rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4089
bec39cab
AC
4090done
4091# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4092rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4093if $ac_preproc_ok; then :
bec39cab
AC
4094 break
4095fi
8bb2c122 4096
bec39cab
AC
4097 done
4098 ac_cv_prog_CPP=$CPP
ddc9cd0f 4099
c906108c 4100fi
bec39cab
AC
4101 CPP=$ac_cv_prog_CPP
4102else
4103 ac_cv_prog_CPP=$CPP
c906108c 4104fi
81ecdfbb
RW
4105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4106$as_echo "$CPP" >&6; }
bec39cab
AC
4107ac_preproc_ok=false
4108for ac_c_preproc_warn_flag in '' yes
4109do
4110 # Use a header file that comes with gcc, so configuring glibc
4111 # with a fresh cross-compiler works.
4112 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4113 # <limits.h> exists even on freestanding compilers.
4114 # On the NeXT, cc -E runs the code through the compiler's parser,
4115 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4117/* end confdefs.h. */
4118#ifdef __STDC__
4119# include <limits.h>
4120#else
4121# include <assert.h>
4122#endif
4123 Syntax error
4124_ACEOF
81ecdfbb 4125if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4126
81ecdfbb 4127else
bec39cab
AC
4128 # Broken: fails on valid input.
4129continue
4130fi
d0ac1c44 4131rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4132
81ecdfbb 4133 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4134 # can be detected and how.
81ecdfbb 4135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4136/* end confdefs.h. */
4137#include <ac_nonexistent.h>
4138_ACEOF
81ecdfbb 4139if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4140 # Broken: success on invalid input.
4141continue
c906108c 4142else
bec39cab
AC
4143 # Passes both tests.
4144ac_preproc_ok=:
4145break
c906108c 4146fi
d0ac1c44 4147rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4148
bec39cab
AC
4149done
4150# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4151rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4152if $ac_preproc_ok; then :
4153
c906108c 4154else
81ecdfbb
RW
4155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4156$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4157as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4158See \`config.log' for more details" "$LINENO" 5; }
c906108c 4159fi
c906108c 4160
bec39cab
AC
4161ac_ext=c
4162ac_cpp='$CPP $CPPFLAGS'
4163ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4164ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4165ac_compiler_gnu=$ac_cv_c_compiler_gnu
4166
4167
81ecdfbb
RW
4168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4169$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4170if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4171 $as_echo_n "(cached) " >&6
4e8d927d 4172else
81ecdfbb
RW
4173 if test -z "$GREP"; then
4174 ac_path_GREP_found=false
4175 # Loop through the user's path and test for each of PROGNAME-LIST
4176 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4177for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4178do
4179 IFS=$as_save_IFS
4180 test -z "$as_dir" && as_dir=.
4181 for ac_prog in grep ggrep; do
4182 for ac_exec_ext in '' $ac_executable_extensions; do
4183 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4184 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4185# Check for GNU ac_path_GREP and select it if it is found.
4186 # Check for GNU $ac_path_GREP
4187case `"$ac_path_GREP" --version 2>&1` in
4188*GNU*)
4189 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4190*)
4191 ac_count=0
4192 $as_echo_n 0123456789 >"conftest.in"
4193 while :
4194 do
4195 cat "conftest.in" "conftest.in" >"conftest.tmp"
4196 mv "conftest.tmp" "conftest.in"
4197 cp "conftest.in" "conftest.nl"
4198 $as_echo 'GREP' >> "conftest.nl"
4199 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4200 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4201 as_fn_arith $ac_count + 1 && ac_count=$as_val
4202 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4203 # Best one so far, save it but keep looking for a better one
4204 ac_cv_path_GREP="$ac_path_GREP"
4205 ac_path_GREP_max=$ac_count
bec39cab 4206 fi
81ecdfbb
RW
4207 # 10*(2^10) chars as input seems more than enough
4208 test $ac_count -gt 10 && break
4209 done
4210 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4211esac
bec39cab 4212
81ecdfbb
RW
4213 $ac_path_GREP_found && break 3
4214 done
4215 done
4216 done
4217IFS=$as_save_IFS
4218 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4219 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4220 fi
c906108c 4221else
81ecdfbb 4222 ac_cv_path_GREP=$GREP
c906108c 4223fi
c906108c 4224
81ecdfbb
RW
4225fi
4226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4227$as_echo "$ac_cv_path_GREP" >&6; }
4228 GREP="$ac_cv_path_GREP"
c906108c 4229
c906108c 4230
81ecdfbb
RW
4231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4232$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4233if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4234 $as_echo_n "(cached) " >&6
783e057b 4235else
81ecdfbb
RW
4236 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4237 then ac_cv_path_EGREP="$GREP -E"
4238 else
4239 if test -z "$EGREP"; then
4240 ac_path_EGREP_found=false
4241 # Loop through the user's path and test for each of PROGNAME-LIST
4242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4243for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4244do
4245 IFS=$as_save_IFS
4246 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4247 for ac_prog in egrep; do
4248 for ac_exec_ext in '' $ac_executable_extensions; do
4249 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4250 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4251# Check for GNU ac_path_EGREP and select it if it is found.
4252 # Check for GNU $ac_path_EGREP
4253case `"$ac_path_EGREP" --version 2>&1` in
4254*GNU*)
4255 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4256*)
4257 ac_count=0
4258 $as_echo_n 0123456789 >"conftest.in"
4259 while :
4260 do
4261 cat "conftest.in" "conftest.in" >"conftest.tmp"
4262 mv "conftest.tmp" "conftest.in"
4263 cp "conftest.in" "conftest.nl"
4264 $as_echo 'EGREP' >> "conftest.nl"
4265 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4266 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4267 as_fn_arith $ac_count + 1 && ac_count=$as_val
4268 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4269 # Best one so far, save it but keep looking for a better one
4270 ac_cv_path_EGREP="$ac_path_EGREP"
4271 ac_path_EGREP_max=$ac_count
4272 fi
4273 # 10*(2^10) chars as input seems more than enough
4274 test $ac_count -gt 10 && break
4275 done
4276 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4277esac
bec39cab 4278
81ecdfbb
RW
4279 $ac_path_EGREP_found && break 3
4280 done
4281 done
4282 done
4283IFS=$as_save_IFS
4284 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4285 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4286 fi
783e057b 4287else
81ecdfbb 4288 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4289fi
4290
81ecdfbb 4291 fi
783e057b 4292fi
81ecdfbb
RW
4293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4294$as_echo "$ac_cv_path_EGREP" >&6; }
4295 EGREP="$ac_cv_path_EGREP"
4296
783e057b 4297
81ecdfbb
RW
4298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4299$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4300if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4301 $as_echo_n "(cached) " >&6
783e057b 4302else
81ecdfbb 4303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4304/* end confdefs.h. */
783e057b 4305#include <stdlib.h>
bec39cab 4306#include <stdarg.h>
783e057b
DJ
4307#include <string.h>
4308#include <float.h>
c906108c 4309
bec39cab
AC
4310int
4311main ()
4312{
c906108c 4313
bec39cab
AC
4314 ;
4315 return 0;
4316}
4317_ACEOF
81ecdfbb 4318if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4319 ac_cv_header_stdc=yes
c906108c 4320else
81ecdfbb 4321 ac_cv_header_stdc=no
c906108c 4322fi
81ecdfbb 4323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4324
783e057b
DJ
4325if test $ac_cv_header_stdc = yes; then
4326 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4328/* end confdefs.h. */
4329#include <string.h>
c906108c 4330
783e057b
DJ
4331_ACEOF
4332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4333 $EGREP "memchr" >/dev/null 2>&1; then :
4334
c906108c 4335else
783e057b 4336 ac_cv_header_stdc=no
c906108c 4337fi
783e057b 4338rm -f conftest*
c906108c
SS
4339
4340fi
4341
783e057b
DJ
4342if test $ac_cv_header_stdc = yes; then
4343 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4345/* end confdefs.h. */
4346#include <stdlib.h>
bec39cab 4347
783e057b
DJ
4348_ACEOF
4349if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4350 $EGREP "free" >/dev/null 2>&1; then :
4351
bec39cab 4352else
783e057b 4353 ac_cv_header_stdc=no
bec39cab 4354fi
783e057b 4355rm -f conftest*
bec39cab
AC
4356
4357fi
bec39cab 4358
783e057b
DJ
4359if test $ac_cv_header_stdc = yes; then
4360 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4361 if test "$cross_compiling" = yes; then :
783e057b 4362 :
bec39cab 4363else
81ecdfbb 4364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4365/* end confdefs.h. */
4366#include <ctype.h>
81ecdfbb 4367#include <stdlib.h>
783e057b
DJ
4368#if ((' ' & 0x0FF) == 0x020)
4369# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4370# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4371#else
4372# define ISLOWER(c) \
4373 (('a' <= (c) && (c) <= 'i') \
4374 || ('j' <= (c) && (c) <= 'r') \
4375 || ('s' <= (c) && (c) <= 'z'))
4376# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4377#endif
4378
4379#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4380int
4381main ()
4382{
4383 int i;
4384 for (i = 0; i < 256; i++)
4385 if (XOR (islower (i), ISLOWER (i))
4386 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4387 return 2;
4388 return 0;
783e057b
DJ
4389}
4390_ACEOF
81ecdfbb 4391if ac_fn_c_try_run "$LINENO"; then :
783e057b 4392
81ecdfbb
RW
4393else
4394 ac_cv_header_stdc=no
783e057b 4395fi
81ecdfbb
RW
4396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4397 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4398fi
81ecdfbb 4399
783e057b
DJ
4400fi
4401fi
81ecdfbb
RW
4402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4403$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4404if test $ac_cv_header_stdc = yes; then
4405
81ecdfbb 4406$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4407
4408fi
4409
4410# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4411for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4412 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4413do :
4414 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4415ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4416"
d0ac1c44 4417if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4418 cat >>confdefs.h <<_ACEOF
81ecdfbb 4419#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4420_ACEOF
4421
4422fi
4423
4424done
4425
4426
4427
81ecdfbb 4428 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4429if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4430 MINIX=yes
4431else
4432 MINIX=
4433fi
4434
4435
4436 if test "$MINIX" = yes; then
4437
81ecdfbb 4438$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4439
4440
81ecdfbb 4441$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4442
4443
81ecdfbb 4444$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4445
4446 fi
4447
4448
81ecdfbb
RW
4449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4450$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4451if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4452 $as_echo_n "(cached) " >&6
783e057b 4453else
81ecdfbb 4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4455/* end confdefs.h. */
4456
d0ac1c44
SM
4457# define __EXTENSIONS__ 1
4458 $ac_includes_default
783e057b
DJ
4459int
4460main ()
4461{
4462
4463 ;
4464 return 0;
4465}
4466_ACEOF
81ecdfbb 4467if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4468 ac_cv_safe_to_define___extensions__=yes
4469else
81ecdfbb 4470 ac_cv_safe_to_define___extensions__=no
783e057b 4471fi
81ecdfbb 4472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4473fi
81ecdfbb
RW
4474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4475$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4476 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4477 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4478
81ecdfbb 4479 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4480
81ecdfbb 4481 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4482
81ecdfbb 4483 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4484
81ecdfbb 4485 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4486
4487
c971b7fa
PA
4488ac_aux_dir=
4489for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4490 if test -f "$ac_dir/install-sh"; then
4491 ac_aux_dir=$ac_dir
4492 ac_install_sh="$ac_aux_dir/install-sh -c"
4493 break
4494 elif test -f "$ac_dir/install.sh"; then
4495 ac_aux_dir=$ac_dir
4496 ac_install_sh="$ac_aux_dir/install.sh -c"
4497 break
4498 elif test -f "$ac_dir/shtool"; then
4499 ac_aux_dir=$ac_dir
4500 ac_install_sh="$ac_aux_dir/shtool install -c"
4501 break
4502 fi
c971b7fa
PA
4503done
4504if test -z "$ac_aux_dir"; then
d0ac1c44 4505 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4506fi
770d76d7 4507
c971b7fa
PA
4508# These three variables are undocumented and unsupported,
4509# and are intended to be withdrawn in a future Autoconf release.
4510# They can cause serious problems if a builder's source tree is in a directory
4511# whose full name contains unusual characters.
4512ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4513ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4514ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4515
770d76d7 4516
c971b7fa
PA
4517# Make sure we can run config.sub.
4518$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4519 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4520
c971b7fa
PA
4521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4522$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4523if ${ac_cv_build+:} false; then :
c971b7fa 4524 $as_echo_n "(cached) " >&6
770d76d7 4525else
c971b7fa
PA
4526 ac_build_alias=$build_alias
4527test "x$ac_build_alias" = x &&
4528 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4529test "x$ac_build_alias" = x &&
d0ac1c44 4530 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4531ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4532 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4533
770d76d7 4534fi
c971b7fa
PA
4535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4536$as_echo "$ac_cv_build" >&6; }
4537case $ac_cv_build in
4538*-*-*) ;;
d0ac1c44 4539*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4540esac
c971b7fa
PA
4541build=$ac_cv_build
4542ac_save_IFS=$IFS; IFS='-'
4543set x $ac_cv_build
4544shift
4545build_cpu=$1
4546build_vendor=$2
4547shift; shift
4548# Remember, the first character of IFS is used to create $*,
4549# except with old shells:
4550build_os=$*
4551IFS=$ac_save_IFS
4552case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4553
4554
c971b7fa
PA
4555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4556$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4557if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4558 $as_echo_n "(cached) " >&6
4559else
c971b7fa
PA
4560 if test "x$host_alias" = x; then
4561 ac_cv_host=$ac_cv_build
81ecdfbb 4562else
c971b7fa 4563 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4564 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4565fi
81ecdfbb
RW
4566
4567fi
c971b7fa
PA
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4569$as_echo "$ac_cv_host" >&6; }
4570case $ac_cv_host in
4571*-*-*) ;;
d0ac1c44 4572*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4573esac
c971b7fa
PA
4574host=$ac_cv_host
4575ac_save_IFS=$IFS; IFS='-'
4576set x $ac_cv_host
4577shift
4578host_cpu=$1
4579host_vendor=$2
4580shift; shift
4581# Remember, the first character of IFS is used to create $*,
4582# except with old shells:
4583host_os=$*
4584IFS=$ac_save_IFS
4585case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4586
4587
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4589$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4590if ${ac_cv_target+:} false; then :
3388710e
JM
4591 $as_echo_n "(cached) " >&6
4592else
4593 if test "x$target_alias" = x; then
4594 ac_cv_target=$ac_cv_host
4595else
4596 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4597 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4598fi
4599
4600fi
4601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4602$as_echo "$ac_cv_target" >&6; }
4603case $ac_cv_target in
4604*-*-*) ;;
d0ac1c44 4605*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4606esac
4607target=$ac_cv_target
4608ac_save_IFS=$IFS; IFS='-'
4609set x $ac_cv_target
4610shift
4611target_cpu=$1
4612target_vendor=$2
4613shift; shift
4614# Remember, the first character of IFS is used to create $*,
4615# except with old shells:
4616target_os=$*
4617IFS=$ac_save_IFS
4618case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4619
4620
4621# The aliases save the names the user supplied, while $host etc.
4622# will get canonicalized.
4623test -n "$target_alias" &&
4624 test "$program_prefix$program_suffix$program_transform_name" = \
4625 NONENONEs,x,x, &&
4626 program_prefix=${target_alias}-
4627
4628# The tests for host and target for $enable_largefile require
4629# canonical names.
4630
4631
81ecdfbb 4632
da2f07f1
JK
4633# As the $enable_largefile decision depends on --enable-plugins we must set it
4634# even in directories otherwise not depending on the $plugins option.
4635
4636
2974be62
AM
4637 maybe_plugins=no
4638 for ac_header in dlfcn.h
4639do :
4640 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4641"
d0ac1c44 4642if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4643 cat >>confdefs.h <<_ACEOF
4644#define HAVE_DLFCN_H 1
4645_ACEOF
4646 maybe_plugins=yes
4647fi
4648
4649done
4650
4651 for ac_header in windows.h
4652do :
4653 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4654"
d0ac1c44 4655if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4656 cat >>confdefs.h <<_ACEOF
4657#define HAVE_WINDOWS_H 1
4658_ACEOF
4659 maybe_plugins=yes
4660fi
4661
4662done
4663
4664
4665 # Check whether --enable-plugins was given.
da2f07f1
JK
4666if test "${enable_plugins+set}" = set; then :
4667 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4668 no) plugins=no ;;
4669 *) plugins=yes
4670 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4671 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4672 fi ;;
4673 esac
da2f07f1 4674else
2974be62
AM
4675 plugins=$maybe_plugins
4676
da2f07f1
JK
4677fi
4678
2974be62 4679 if test "$plugins" = "yes"; then
458412c3
TT
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4681$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4682if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4683 $as_echo_n "(cached) " >&6
4684else
4685 ac_func_search_save_LIBS=$LIBS
4686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4687/* end confdefs.h. */
4688
4689/* Override any GCC internal prototype to avoid an error.
4690 Use char because int might match the return type of a GCC
4691 builtin and then its argument prototype would still apply. */
4692#ifdef __cplusplus
4693extern "C"
4694#endif
458412c3 4695char dlsym ();
2974be62
AM
4696int
4697main ()
4698{
458412c3 4699return dlsym ();
2974be62
AM
4700 ;
4701 return 0;
4702}
4703_ACEOF
4704for ac_lib in '' dl; do
4705 if test -z "$ac_lib"; then
4706 ac_res="none required"
4707 else
4708 ac_res=-l$ac_lib
4709 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4710 fi
4711 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4712 ac_cv_search_dlsym=$ac_res
2974be62
AM
4713fi
4714rm -f core conftest.err conftest.$ac_objext \
4715 conftest$ac_exeext
d0ac1c44 4716 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4717 break
4718fi
4719done
d0ac1c44 4720if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4721
4722else
458412c3 4723 ac_cv_search_dlsym=no
2974be62
AM
4724fi
4725rm conftest.$ac_ext
4726LIBS=$ac_func_search_save_LIBS
4727fi
458412c3
TT
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4729$as_echo "$ac_cv_search_dlsym" >&6; }
4730ac_res=$ac_cv_search_dlsym
2974be62
AM
4731if test "$ac_res" != no; then :
4732 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4733
4734fi
4735
4736 fi
da2f07f1
JK
4737
4738
4739case "${host}" in
4740 sparc-*-solaris*|i[3-7]86-*-solaris*)
4741 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4742 # are mutually exclusive; and without procfs support, the bfd/ elf module
4743 # cannot provide certain routines such as elfcore_write_prpsinfo
4744 # or elfcore_write_prstatus. So unless the user explicitly requested
4745 # large-file support through the --enable-largefile switch, disable
4746 # large-file support in favor of procfs support.
4747 test "${target}" = "${host}" -a "x$plugins" = xno \
4748 && : ${enable_largefile="no"}
4749 ;;
4750esac
4751
4752# Check whether --enable-largefile was given.
4753if test "${enable_largefile+set}" = set; then :
4754 enableval=$enable_largefile;
4755fi
4756
4757if test "$enable_largefile" != no; then
4758
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4760$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4761if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4762 $as_echo_n "(cached) " >&6
4763else
4764 ac_cv_sys_largefile_CC=no
4765 if test "$GCC" != yes; then
4766 ac_save_CC=$CC
4767 while :; do
4768 # IRIX 6.2 and later do not support large files by default,
4769 # so use the C compiler's -n32 option if that helps.
4770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4771/* end confdefs.h. */
4772#include <sys/types.h>
4773 /* Check that off_t can represent 2**63 - 1 correctly.
4774 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4775 since some C++ compilers masquerading as C compilers
4776 incorrectly reject 9223372036854775807. */
4777#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4778 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4779 && LARGE_OFF_T % 2147483647 == 1)
4780 ? 1 : -1];
4781int
4782main ()
4783{
4784
4785 ;
4786 return 0;
4787}
4788_ACEOF
4789 if ac_fn_c_try_compile "$LINENO"; then :
4790 break
4791fi
4792rm -f core conftest.err conftest.$ac_objext
4793 CC="$CC -n32"
4794 if ac_fn_c_try_compile "$LINENO"; then :
4795 ac_cv_sys_largefile_CC=' -n32'; break
4796fi
4797rm -f core conftest.err conftest.$ac_objext
4798 break
4799 done
4800 CC=$ac_save_CC
4801 rm -f conftest.$ac_ext
4802 fi
4803fi
4804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4805$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4806 if test "$ac_cv_sys_largefile_CC" != no; then
4807 CC=$CC$ac_cv_sys_largefile_CC
4808 fi
4809
4810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4811$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4812if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4813 $as_echo_n "(cached) " >&6
4814else
4815 while :; do
4816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4817/* end confdefs.h. */
4818#include <sys/types.h>
4819 /* Check that off_t can represent 2**63 - 1 correctly.
4820 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4821 since some C++ compilers masquerading as C compilers
4822 incorrectly reject 9223372036854775807. */
4823#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4824 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4825 && LARGE_OFF_T % 2147483647 == 1)
4826 ? 1 : -1];
4827int
4828main ()
4829{
4830
4831 ;
4832 return 0;
4833}
4834_ACEOF
4835if ac_fn_c_try_compile "$LINENO"; then :
4836 ac_cv_sys_file_offset_bits=no; break
4837fi
4838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4840/* end confdefs.h. */
4841#define _FILE_OFFSET_BITS 64
4842#include <sys/types.h>
4843 /* Check that off_t can represent 2**63 - 1 correctly.
4844 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4845 since some C++ compilers masquerading as C compilers
4846 incorrectly reject 9223372036854775807. */
4847#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4848 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4849 && LARGE_OFF_T % 2147483647 == 1)
4850 ? 1 : -1];
4851int
4852main ()
4853{
4854
4855 ;
4856 return 0;
4857}
4858_ACEOF
4859if ac_fn_c_try_compile "$LINENO"; then :
4860 ac_cv_sys_file_offset_bits=64; break
4861fi
4862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4863 ac_cv_sys_file_offset_bits=unknown
4864 break
4865done
4866fi
4867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4868$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4869case $ac_cv_sys_file_offset_bits in #(
4870 no | unknown) ;;
4871 *)
4872cat >>confdefs.h <<_ACEOF
4873#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4874_ACEOF
4875;;
4876esac
4877rm -rf conftest*
4878 if test $ac_cv_sys_file_offset_bits = unknown; then
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4880$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4881if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4882 $as_echo_n "(cached) " >&6
4883else
4884 while :; do
4885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4886/* end confdefs.h. */
4887#include <sys/types.h>
4888 /* Check that off_t can represent 2**63 - 1 correctly.
4889 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4890 since some C++ compilers masquerading as C compilers
4891 incorrectly reject 9223372036854775807. */
4892#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4893 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4894 && LARGE_OFF_T % 2147483647 == 1)
4895 ? 1 : -1];
4896int
4897main ()
4898{
4899
4900 ;
4901 return 0;
4902}
4903_ACEOF
4904if ac_fn_c_try_compile "$LINENO"; then :
4905 ac_cv_sys_large_files=no; break
4906fi
4907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4909/* end confdefs.h. */
4910#define _LARGE_FILES 1
4911#include <sys/types.h>
4912 /* Check that off_t can represent 2**63 - 1 correctly.
4913 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4914 since some C++ compilers masquerading as C compilers
4915 incorrectly reject 9223372036854775807. */
4916#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4917 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4918 && LARGE_OFF_T % 2147483647 == 1)
4919 ? 1 : -1];
4920int
4921main ()
4922{
4923
4924 ;
4925 return 0;
4926}
4927_ACEOF
4928if ac_fn_c_try_compile "$LINENO"; then :
4929 ac_cv_sys_large_files=1; break
4930fi
4931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4932 ac_cv_sys_large_files=unknown
4933 break
4934done
4935fi
4936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4937$as_echo "$ac_cv_sys_large_files" >&6; }
4938case $ac_cv_sys_large_files in #(
4939 no | unknown) ;;
4940 *)
4941cat >>confdefs.h <<_ACEOF
4942#define _LARGE_FILES $ac_cv_sys_large_files
4943_ACEOF
4944;;
4945esac
4946rm -rf conftest*
4947 fi
d0ac1c44
SM
4948
4949
da2f07f1
JK
4950fi
4951
4952
4953
81ecdfbb
RW
4954
4955
4956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4957$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4958if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4959 $as_echo_n "(cached) " >&6
4960else
4961 am_cv_prog_cc_stdc=no
4962ac_save_CC="$CC"
4963# Don't try gcc -ansi; that turns off useful extensions and
4964# breaks some systems' header files.
4965# AIX -qlanglvl=ansi
4966# Ultrix and OSF/1 -std1
4967# HP-UX 10.20 and later -Ae
4968# HP-UX older versions -Aa -D_HPUX_SOURCE
4969# SVR4 -Xc -D__EXTENSIONS__
4970for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4971do
783e057b 4972 CC="$ac_save_CC $ac_arg"
81ecdfbb 4973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4974/* end confdefs.h. */
4975#include <stdarg.h>
4976#include <stdio.h>
4977#include <sys/types.h>
4978#include <sys/stat.h>
4979/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4980struct buf { int x; };
4981FILE * (*rcsopen) (struct buf *, struct stat *, int);
4982static char *e (p, i)
4983 char **p;
4984 int i;
4985{
4986 return p[i];
4987}
4988static char *f (char * (*g) (char **, int), char **p, ...)
4989{
4990 char *s;
4991 va_list v;
4992 va_start (v,p);
4993 s = g (p, va_arg (v,int));
4994 va_end (v);
4995 return s;
4996}
4997int test (int i, double x);
4998struct s1 {int (*f) (int a);};
4999struct s2 {int (*f) (double a);};
5000int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5001int argc;
5002char **argv;
5003
5004int
5005main ()
5006{
5007
5008return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5009
5010 ;
5011 return 0;
5012}
5013_ACEOF
81ecdfbb 5014if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5015 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 5016fi
81ecdfbb 5017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5018done
5019CC="$ac_save_CC"
5020
5021fi
5022
5023if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
5024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5025$as_echo "none needed" >&6; }
783e057b 5026else
81ecdfbb
RW
5027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5028$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
5029fi
5030case "x$am_cv_prog_cc_stdc" in
5031 x|xno) ;;
5032 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5033esac
5034
d0ac1c44
SM
5035# Expand $ac_aux_dir to an absolute path.
5036am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 5037
d0ac1c44 5038if test x"${install_sh+set}" != xset; then
4869db5e
RM
5039 case $am_aux_dir in
5040 *\ * | *\ *)
5041 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5042 *)
5043 install_sh="\${SHELL} $am_aux_dir/install-sh"
5044 esac
5045fi
5046
d0ac1c44
SM
5047# Installed binaries are usually stripped using 'strip' when the user
5048# run "make install-strip". However 'strip' might not be the right
4869db5e 5049# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 5050# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
5051if test "$cross_compiling" != no; then
5052 if test -n "$ac_tool_prefix"; then
5053 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5054set dummy ${ac_tool_prefix}strip; ac_word=$2
5055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5056$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5057if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
5058 $as_echo_n "(cached) " >&6
5059else
5060 if test -n "$STRIP"; then
5061 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5062else
5063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064for as_dir in $PATH
5065do
5066 IFS=$as_save_IFS
5067 test -z "$as_dir" && as_dir=.
5068 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5069 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5070 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5072 break 2
5073 fi
5074done
5075 done
5076IFS=$as_save_IFS
5077
5078fi
5079fi
5080STRIP=$ac_cv_prog_STRIP
5081if test -n "$STRIP"; then
5082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5083$as_echo "$STRIP" >&6; }
5084else
5085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5086$as_echo "no" >&6; }
5087fi
5088
5089
5090fi
5091if test -z "$ac_cv_prog_STRIP"; then
5092 ac_ct_STRIP=$STRIP
5093 # Extract the first word of "strip", so it can be a program name with args.
5094set dummy strip; ac_word=$2
5095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5096$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5097if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5098 $as_echo_n "(cached) " >&6
5099else
5100 if test -n "$ac_ct_STRIP"; then
5101 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5102else
5103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5104for as_dir in $PATH
5105do
5106 IFS=$as_save_IFS
5107 test -z "$as_dir" && as_dir=.
5108 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5109 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5110 ac_cv_prog_ac_ct_STRIP="strip"
5111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5112 break 2
5113 fi
5114done
5115 done
5116IFS=$as_save_IFS
5117
5118fi
5119fi
5120ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5121if test -n "$ac_ct_STRIP"; then
5122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5123$as_echo "$ac_ct_STRIP" >&6; }
5124else
5125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5126$as_echo "no" >&6; }
5127fi
5128
5129 if test "x$ac_ct_STRIP" = x; then
5130 STRIP=":"
5131 else
5132 case $cross_compiling:$ac_tool_warned in
5133yes:)
5134{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5135$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5136ac_tool_warned=yes ;;
5137esac
5138 STRIP=$ac_ct_STRIP
5139 fi
5140else
5141 STRIP="$ac_cv_prog_STRIP"
5142fi
5143
5144fi
5145INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5146
783e057b
DJ
5147
5148ac_aux_dir=
81ecdfbb 5149for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5150 if 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/install.sh"; then
5155 ac_aux_dir=$ac_dir
5156 ac_install_sh="$ac_aux_dir/install.sh -c"
5157 break
5158 elif test -f "$ac_dir/shtool"; then
5159 ac_aux_dir=$ac_dir
5160 ac_install_sh="$ac_aux_dir/shtool install -c"
5161 break
5162 fi
783e057b
DJ
5163done
5164if test -z "$ac_aux_dir"; then
d0ac1c44 5165 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5166fi
81ecdfbb
RW
5167
5168# These three variables are undocumented and unsupported,
5169# and are intended to be withdrawn in a future Autoconf release.
5170# They can cause serious problems if a builder's source tree is in a directory
5171# whose full name contains unusual characters.
5172ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5173ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5174ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5175
783e057b 5176
783e057b 5177
9009e1ae
MR
5178test "$program_prefix" != NONE &&
5179 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5180# Use a double $ so make ignores it.
5181test "$program_suffix" != NONE &&
5182 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5183# Double any \ or $.
5184# By default was `s,x,x', remove it if useless.
5185ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5186program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5187
81ecdfbb 5188
0bcda685
PA
5189# We require a C++11 compiler. Check if one is available, and if
5190# necessary, set CXX_DIALECT to some -std=xxx switch.
5191
41260ac2 5192 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5193 ac_ext=cpp
5194ac_cpp='$CXXCPP $CPPFLAGS'
5195ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5196ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5197ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5198 CXX_DIALECT=""
5199 ac_success=no
5200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5201$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5202if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5203 $as_echo_n "(cached) " >&6
5204else
5205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5206/* end confdefs.h. */
5207
5208
5209// If the compiler admits that it is not ready for C++11, why torture it?
5210// Hopefully, this will speed up the test.
5211
5212#ifndef __cplusplus
5213
5214#error "This is not a C++ compiler"
5215
5216#elif __cplusplus < 201103L
5217
5218#error "This is not a C++11 compiler"
5219
5220#else
5221
5222namespace cxx11
5223{
5224
5225 namespace test_static_assert
5226 {
5227
5228 template <typename T>
5229 struct check
5230 {
5231 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5232 };
5233
5234 }
5235
5236 namespace test_final_override
5237 {
5238
5239 struct Base
5240 {
5241 virtual void f() {}
5242 };
5243
5244 struct Derived : public Base
5245 {
5246 virtual void f() override {}
5247 };
5248
5249 }
5250
5251 namespace test_double_right_angle_brackets
5252 {
5253
5254 template < typename T >
5255 struct check {};
5256
5257 typedef check<void> single_type;
5258 typedef check<check<void>> double_type;
5259 typedef check<check<check<void>>> triple_type;
5260 typedef check<check<check<check<void>>>> quadruple_type;
5261
5262 }
5263
5264 namespace test_decltype
5265 {
5266
5267 int
5268 f()
5269 {
5270 int a = 1;
5271 decltype(a) b = 2;
5272 return a + b;
5273 }
5274
5275 }
5276
5277 namespace test_type_deduction
5278 {
5279
5280 template < typename T1, typename T2 >
5281 struct is_same
5282 {
5283 static const bool value = false;
5284 };
5285
5286 template < typename T >
5287 struct is_same<T, T>
5288 {
5289 static const bool value = true;
5290 };
5291
5292 template < typename T1, typename T2 >
5293 auto
5294 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5295 {
5296 return a1 + a2;
5297 }
5298
5299 int
5300 test(const int c, volatile int v)
5301 {
5302 static_assert(is_same<int, decltype(0)>::value == true, "");
5303 static_assert(is_same<int, decltype(c)>::value == false, "");
5304 static_assert(is_same<int, decltype(v)>::value == false, "");
5305 auto ac = c;
5306 auto av = v;
5307 auto sumi = ac + av + 'x';
5308 auto sumf = ac + av + 1.0;
5309 static_assert(is_same<int, decltype(ac)>::value == true, "");
5310 static_assert(is_same<int, decltype(av)>::value == true, "");
5311 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5312 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5313 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5314 return (sumf > 0.0) ? sumi : add(c, v);
5315 }
5316
5317 }
5318
5319 namespace test_noexcept
5320 {
5321
5322 int f() { return 0; }
5323 int g() noexcept { return 0; }
5324
5325 static_assert(noexcept(f()) == false, "");
5326 static_assert(noexcept(g()) == true, "");
5327
5328 }
5329
5330 namespace test_constexpr
5331 {
5332
5333 template < typename CharT >
5334 unsigned long constexpr
5335 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5336 {
5337 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5338 }
5339
5340 template < typename CharT >
5341 unsigned long constexpr
5342 strlen_c(const CharT *const s) noexcept
5343 {
5344 return strlen_c_r(s, 0UL);
5345 }
5346
5347 static_assert(strlen_c("") == 0UL, "");
5348 static_assert(strlen_c("1") == 1UL, "");
5349 static_assert(strlen_c("example") == 7UL, "");
5350 static_assert(strlen_c("another\0example") == 7UL, "");
5351
5352 }
5353
5354 namespace test_rvalue_references
5355 {
5356
5357 template < int N >
5358 struct answer
5359 {
5360 static constexpr int value = N;
5361 };
5362
5363 answer<1> f(int&) { return answer<1>(); }
5364 answer<2> f(const int&) { return answer<2>(); }
5365 answer<3> f(int&&) { return answer<3>(); }
5366
5367 void
5368 test()
5369 {
5370 int i = 0;
5371 const int c = 0;
5372 static_assert(decltype(f(i))::value == 1, "");
5373 static_assert(decltype(f(c))::value == 2, "");
5374 static_assert(decltype(f(0))::value == 3, "");
5375 }
5376
5377 }
5378
5379 namespace test_uniform_initialization
5380 {
5381
5382 struct test
5383 {
5384 static const int zero {};
5385 static const int one {1};
5386 };
5387
5388 static_assert(test::zero == 0, "");
5389 static_assert(test::one == 1, "");
5390
5391 }
5392
5393 namespace test_lambdas
5394 {
5395
5396 void
5397 test1()
5398 {
5399 auto lambda1 = [](){};
5400 auto lambda2 = lambda1;
5401 lambda1();
5402 lambda2();
5403 }
5404
5405 int
5406 test2()
5407 {
5408 auto a = [](int i, int j){ return i + j; }(1, 2);
5409 auto b = []() -> int { return '0'; }();
5410 auto c = [=](){ return a + b; }();
5411 auto d = [&](){ return c; }();
5412 auto e = [a, &b](int x) mutable {
5413 const auto identity = [](int y){ return y; };
5414 for (auto i = 0; i < a; ++i)
5415 a += b--;
5416 return x + identity(a + b);
5417 }(0);
5418 return a + b + c + d + e;
5419 }
5420
5421 int
5422 test3()
5423 {
5424 const auto nullary = [](){ return 0; };
5425 const auto unary = [](int x){ return x; };
5426 using nullary_t = decltype(nullary);
5427 using unary_t = decltype(unary);
5428 const auto higher1st = [](nullary_t f){ return f(); };
5429 const auto higher2nd = [unary](nullary_t f1){
5430 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5431 };
5432 return higher1st(nullary) + higher2nd(nullary)(unary);
5433 }
5434
5435 }
5436
5437 namespace test_variadic_templates
5438 {
5439
5440 template <int...>
5441 struct sum;
5442
5443 template <int N0, int... N1toN>
5444 struct sum<N0, N1toN...>
5445 {
5446 static constexpr auto value = N0 + sum<N1toN...>::value;
5447 };
5448
5449 template <>
5450 struct sum<>
5451 {
5452 static constexpr auto value = 0;
5453 };
5454
5455 static_assert(sum<>::value == 0, "");
5456 static_assert(sum<1>::value == 1, "");
5457 static_assert(sum<23>::value == 23, "");
5458 static_assert(sum<1, 2>::value == 3, "");
5459 static_assert(sum<5, 5, 11>::value == 21, "");
5460 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5461
5462 }
5463
5464 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5465 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5466 // because of this.
5467 namespace test_template_alias_sfinae
5468 {
5469
5470 struct foo {};
5471
5472 template<typename T>
5473 using member = typename T::member_type;
5474
5475 template<typename T>
5476 void func(...) {}
5477
5478 template<typename T>
5479 void func(member<T>*) {}
5480
5481 void test();
5482
5483 void test() { func<foo>(0); }
5484
5485 }
5486
5487} // namespace cxx11
5488
5489#endif // __cplusplus >= 201103L
5490
5491
5492
5493_ACEOF
5494if ac_fn_cxx_try_compile "$LINENO"; then :
5495 ax_cv_cxx_compile_cxx11=yes
5496else
5497 ax_cv_cxx_compile_cxx11=no
5498fi
5499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5500fi
5501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5502$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5503 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5504 ac_success=yes
5505 fi
5506
5507 if test x$ac_success = xno; then
41260ac2
SM
5508 for alternative in ${ax_cxx_compile_alternatives}; do
5509 switch="-std=gnu++${alternative}"
0bcda685
PA
5510 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5512$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5513if eval \${$cachevar+:} false; then :
0bcda685
PA
5514 $as_echo_n "(cached) " >&6
5515else
5516 ac_save_CXX="$CXX"
5517 CXX="$CXX $switch"
5518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5519/* end confdefs.h. */
5520
5521
5522// If the compiler admits that it is not ready for C++11, why torture it?
5523// Hopefully, this will speed up the test.
5524
5525#ifndef __cplusplus
5526
5527#error "This is not a C++ compiler"
5528
5529#elif __cplusplus < 201103L
5530
5531#error "This is not a C++11 compiler"
5532
5533#else
5534
5535namespace cxx11
5536{
5537
5538 namespace test_static_assert
5539 {
5540
5541 template <typename T>
5542 struct check
5543 {
5544 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5545 };
5546
5547 }
5548
5549 namespace test_final_override
5550 {
5551
5552 struct Base
5553 {
5554 virtual void f() {}
5555 };
5556
5557 struct Derived : public Base
5558 {
5559 virtual void f() override {}
5560 };
5561
5562 }
5563
5564 namespace test_double_right_angle_brackets
5565 {
5566
5567 template < typename T >
5568 struct check {};
5569
5570 typedef check<void> single_type;
5571 typedef check<check<void>> double_type;
5572 typedef check<check<check<void>>> triple_type;
5573 typedef check<check<check<check<void>>>> quadruple_type;
5574
5575 }
5576
5577 namespace test_decltype
5578 {
5579
5580 int
5581 f()
5582 {
5583 int a = 1;
5584 decltype(a) b = 2;
5585 return a + b;
5586 }
5587
5588 }
5589
5590 namespace test_type_deduction
5591 {
5592
5593 template < typename T1, typename T2 >
5594 struct is_same
5595 {
5596 static const bool value = false;
5597 };
5598
5599 template < typename T >
5600 struct is_same<T, T>
5601 {
5602 static const bool value = true;
5603 };
5604
5605 template < typename T1, typename T2 >
5606 auto
5607 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5608 {
5609 return a1 + a2;
5610 }
5611
5612 int
5613 test(const int c, volatile int v)
5614 {
5615 static_assert(is_same<int, decltype(0)>::value == true, "");
5616 static_assert(is_same<int, decltype(c)>::value == false, "");
5617 static_assert(is_same<int, decltype(v)>::value == false, "");
5618 auto ac = c;
5619 auto av = v;
5620 auto sumi = ac + av + 'x';
5621 auto sumf = ac + av + 1.0;
5622 static_assert(is_same<int, decltype(ac)>::value == true, "");
5623 static_assert(is_same<int, decltype(av)>::value == true, "");
5624 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5625 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5626 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5627 return (sumf > 0.0) ? sumi : add(c, v);
5628 }
5629
5630 }
5631
5632 namespace test_noexcept
5633 {
5634
5635 int f() { return 0; }
5636 int g() noexcept { return 0; }
5637
5638 static_assert(noexcept(f()) == false, "");
5639 static_assert(noexcept(g()) == true, "");
5640
5641 }
5642
5643 namespace test_constexpr
5644 {
5645
5646 template < typename CharT >
5647 unsigned long constexpr
5648 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5649 {
5650 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5651 }
5652
5653 template < typename CharT >
5654 unsigned long constexpr
5655 strlen_c(const CharT *const s) noexcept
5656 {
5657 return strlen_c_r(s, 0UL);
5658 }
5659
5660 static_assert(strlen_c("") == 0UL, "");
5661 static_assert(strlen_c("1") == 1UL, "");
5662 static_assert(strlen_c("example") == 7UL, "");
5663 static_assert(strlen_c("another\0example") == 7UL, "");
5664
5665 }
5666
5667 namespace test_rvalue_references
5668 {
5669
5670 template < int N >
5671 struct answer
5672 {
5673 static constexpr int value = N;
5674 };
5675
5676 answer<1> f(int&) { return answer<1>(); }
5677 answer<2> f(const int&) { return answer<2>(); }
5678 answer<3> f(int&&) { return answer<3>(); }
5679
5680 void
5681 test()
5682 {
5683 int i = 0;
5684 const int c = 0;
5685 static_assert(decltype(f(i))::value == 1, "");
5686 static_assert(decltype(f(c))::value == 2, "");
5687 static_assert(decltype(f(0))::value == 3, "");
5688 }
5689
5690 }
5691
5692 namespace test_uniform_initialization
5693 {
5694
5695 struct test
5696 {
5697 static const int zero {};
5698 static const int one {1};
5699 };
5700
5701 static_assert(test::zero == 0, "");
5702 static_assert(test::one == 1, "");
5703
5704 }
5705
5706 namespace test_lambdas
5707 {
5708
5709 void
5710 test1()
5711 {
5712 auto lambda1 = [](){};
5713 auto lambda2 = lambda1;
5714 lambda1();
5715 lambda2();
5716 }
5717
5718 int
5719 test2()
5720 {
5721 auto a = [](int i, int j){ return i + j; }(1, 2);
5722 auto b = []() -> int { return '0'; }();
5723 auto c = [=](){ return a + b; }();
5724 auto d = [&](){ return c; }();
5725 auto e = [a, &b](int x) mutable {
5726 const auto identity = [](int y){ return y; };
5727 for (auto i = 0; i < a; ++i)
5728 a += b--;
5729 return x + identity(a + b);
5730 }(0);
5731 return a + b + c + d + e;
5732 }
5733
5734 int
5735 test3()
5736 {
5737 const auto nullary = [](){ return 0; };
5738 const auto unary = [](int x){ return x; };
5739 using nullary_t = decltype(nullary);
5740 using unary_t = decltype(unary);
5741 const auto higher1st = [](nullary_t f){ return f(); };
5742 const auto higher2nd = [unary](nullary_t f1){
5743 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5744 };
5745 return higher1st(nullary) + higher2nd(nullary)(unary);
5746 }
5747
5748 }
5749
5750 namespace test_variadic_templates
5751 {
5752
5753 template <int...>
5754 struct sum;
5755
5756 template <int N0, int... N1toN>
5757 struct sum<N0, N1toN...>
5758 {
5759 static constexpr auto value = N0 + sum<N1toN...>::value;
5760 };
5761
5762 template <>
5763 struct sum<>
5764 {
5765 static constexpr auto value = 0;
5766 };
5767
5768 static_assert(sum<>::value == 0, "");
5769 static_assert(sum<1>::value == 1, "");
5770 static_assert(sum<23>::value == 23, "");
5771 static_assert(sum<1, 2>::value == 3, "");
5772 static_assert(sum<5, 5, 11>::value == 21, "");
5773 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5774
5775 }
5776
5777 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5778 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5779 // because of this.
5780 namespace test_template_alias_sfinae
5781 {
5782
5783 struct foo {};
5784
5785 template<typename T>
5786 using member = typename T::member_type;
5787
5788 template<typename T>
5789 void func(...) {}
5790
5791 template<typename T>
5792 void func(member<T>*) {}
5793
5794 void test();
5795
5796 void test() { func<foo>(0); }
5797
5798 }
5799
5800} // namespace cxx11
5801
5802#endif // __cplusplus >= 201103L
5803
5804
5805
5806_ACEOF
5807if ac_fn_cxx_try_compile "$LINENO"; then :
5808 eval $cachevar=yes
5809else
5810 eval $cachevar=no
5811fi
5812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5813 CXX="$ac_save_CXX"
5814fi
5815eval ac_res=\$$cachevar
5816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5817$as_echo "$ac_res" >&6; }
5818 if eval test x\$$cachevar = xyes; then
5819 CXX_DIALECT="$switch"
5820 ac_success=yes
5821 break
5822 fi
5823 done
5824 fi
5825
5826 if test x$ac_success = xno; then
41260ac2
SM
5827 for alternative in ${ax_cxx_compile_alternatives}; do
5828 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5829 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5831$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5832if eval \${$cachevar+:} false; then :
0bcda685
PA
5833 $as_echo_n "(cached) " >&6
5834else
5835 ac_save_CXX="$CXX"
41260ac2
SM
5836 CXX="$CXX $switch"
5837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5838/* end confdefs.h. */
5839
5840
5841// If the compiler admits that it is not ready for C++11, why torture it?
5842// Hopefully, this will speed up the test.
5843
5844#ifndef __cplusplus
5845
5846#error "This is not a C++ compiler"
5847
5848#elif __cplusplus < 201103L
5849
5850#error "This is not a C++11 compiler"
5851
5852#else
5853
5854namespace cxx11
5855{
5856
5857 namespace test_static_assert
5858 {
5859
5860 template <typename T>
5861 struct check
5862 {
5863 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5864 };
5865
5866 }
5867
5868 namespace test_final_override
5869 {
5870
5871 struct Base
5872 {
5873 virtual void f() {}
5874 };
5875
5876 struct Derived : public Base
5877 {
5878 virtual void f() override {}
5879 };
5880
5881 }
5882
5883 namespace test_double_right_angle_brackets
5884 {
5885
5886 template < typename T >
5887 struct check {};
5888
5889 typedef check<void> single_type;
5890 typedef check<check<void>> double_type;
5891 typedef check<check<check<void>>> triple_type;
5892 typedef check<check<check<check<void>>>> quadruple_type;
5893
5894 }
5895
5896 namespace test_decltype
5897 {
5898
5899 int
5900 f()
5901 {
5902 int a = 1;
5903 decltype(a) b = 2;
5904 return a + b;
5905 }
5906
5907 }
5908
5909 namespace test_type_deduction
5910 {
5911
5912 template < typename T1, typename T2 >
5913 struct is_same
5914 {
5915 static const bool value = false;
5916 };
5917
5918 template < typename T >
5919 struct is_same<T, T>
5920 {
5921 static const bool value = true;
5922 };
5923
5924 template < typename T1, typename T2 >
5925 auto
5926 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5927 {
5928 return a1 + a2;
5929 }
5930
5931 int
5932 test(const int c, volatile int v)
5933 {
5934 static_assert(is_same<int, decltype(0)>::value == true, "");
5935 static_assert(is_same<int, decltype(c)>::value == false, "");
5936 static_assert(is_same<int, decltype(v)>::value == false, "");
5937 auto ac = c;
5938 auto av = v;
5939 auto sumi = ac + av + 'x';
5940 auto sumf = ac + av + 1.0;
5941 static_assert(is_same<int, decltype(ac)>::value == true, "");
5942 static_assert(is_same<int, decltype(av)>::value == true, "");
5943 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5944 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5945 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5946 return (sumf > 0.0) ? sumi : add(c, v);
5947 }
5948
5949 }
5950
5951 namespace test_noexcept
5952 {
5953
5954 int f() { return 0; }
5955 int g() noexcept { return 0; }
5956
5957 static_assert(noexcept(f()) == false, "");
5958 static_assert(noexcept(g()) == true, "");
5959
5960 }
5961
5962 namespace test_constexpr
5963 {
5964
5965 template < typename CharT >
5966 unsigned long constexpr
5967 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5968 {
5969 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5970 }
5971
5972 template < typename CharT >
5973 unsigned long constexpr
5974 strlen_c(const CharT *const s) noexcept
5975 {
5976 return strlen_c_r(s, 0UL);
5977 }
5978
5979 static_assert(strlen_c("") == 0UL, "");
5980 static_assert(strlen_c("1") == 1UL, "");
5981 static_assert(strlen_c("example") == 7UL, "");
5982 static_assert(strlen_c("another\0example") == 7UL, "");
5983
5984 }
5985
5986 namespace test_rvalue_references
5987 {
5988
5989 template < int N >
5990 struct answer
5991 {
5992 static constexpr int value = N;
5993 };
5994
5995 answer<1> f(int&) { return answer<1>(); }
5996 answer<2> f(const int&) { return answer<2>(); }
5997 answer<3> f(int&&) { return answer<3>(); }
5998
5999 void
6000 test()
6001 {
6002 int i = 0;
6003 const int c = 0;
6004 static_assert(decltype(f(i))::value == 1, "");
6005 static_assert(decltype(f(c))::value == 2, "");
6006 static_assert(decltype(f(0))::value == 3, "");
6007 }
6008
6009 }
6010
6011 namespace test_uniform_initialization
6012 {
6013
6014 struct test
6015 {
6016 static const int zero {};
6017 static const int one {1};
6018 };
6019
6020 static_assert(test::zero == 0, "");
6021 static_assert(test::one == 1, "");
6022
6023 }
6024
6025 namespace test_lambdas
6026 {
6027
6028 void
6029 test1()
6030 {
6031 auto lambda1 = [](){};
6032 auto lambda2 = lambda1;
6033 lambda1();
6034 lambda2();
6035 }
6036
6037 int
6038 test2()
6039 {
6040 auto a = [](int i, int j){ return i + j; }(1, 2);
6041 auto b = []() -> int { return '0'; }();
6042 auto c = [=](){ return a + b; }();
6043 auto d = [&](){ return c; }();
6044 auto e = [a, &b](int x) mutable {
6045 const auto identity = [](int y){ return y; };
6046 for (auto i = 0; i < a; ++i)
6047 a += b--;
6048 return x + identity(a + b);
6049 }(0);
6050 return a + b + c + d + e;
6051 }
6052
6053 int
6054 test3()
6055 {
6056 const auto nullary = [](){ return 0; };
6057 const auto unary = [](int x){ return x; };
6058 using nullary_t = decltype(nullary);
6059 using unary_t = decltype(unary);
6060 const auto higher1st = [](nullary_t f){ return f(); };
6061 const auto higher2nd = [unary](nullary_t f1){
6062 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6063 };
6064 return higher1st(nullary) + higher2nd(nullary)(unary);
6065 }
6066
6067 }
6068
6069 namespace test_variadic_templates
6070 {
6071
6072 template <int...>
6073 struct sum;
6074
6075 template <int N0, int... N1toN>
6076 struct sum<N0, N1toN...>
6077 {
6078 static constexpr auto value = N0 + sum<N1toN...>::value;
6079 };
6080
6081 template <>
6082 struct sum<>
6083 {
6084 static constexpr auto value = 0;
6085 };
6086
6087 static_assert(sum<>::value == 0, "");
6088 static_assert(sum<1>::value == 1, "");
6089 static_assert(sum<23>::value == 23, "");
6090 static_assert(sum<1, 2>::value == 3, "");
6091 static_assert(sum<5, 5, 11>::value == 21, "");
6092 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6093
6094 }
6095
6096 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6097 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6098 // because of this.
6099 namespace test_template_alias_sfinae
6100 {
6101
6102 struct foo {};
6103
6104 template<typename T>
6105 using member = typename T::member_type;
6106
6107 template<typename T>
6108 void func(...) {}
6109
6110 template<typename T>
6111 void func(member<T>*) {}
6112
6113 void test();
6114
6115 void test() { func<foo>(0); }
6116
6117 }
6118
6119} // namespace cxx11
6120
6121#endif // __cplusplus >= 201103L
6122
6123
6124
6125_ACEOF
6126if ac_fn_cxx_try_compile "$LINENO"; then :
6127 eval $cachevar=yes
6128else
6129 eval $cachevar=no
6130fi
6131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6132 CXX="$ac_save_CXX"
0bcda685
PA
6133fi
6134eval ac_res=\$$cachevar
6135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6136$as_echo "$ac_res" >&6; }
41260ac2
SM
6137 if eval test x\$$cachevar = xyes; then
6138 CXX_DIALECT="$switch"
6139 ac_success=yes
6140 break
6141 fi
6142 done
6143 if test x$ac_success = xyes; then
0bcda685
PA
6144 break
6145 fi
6146 done
6147 fi
6148 ac_ext=c
6149ac_cpp='$CPP $CPPFLAGS'
6150ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6151ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6152ac_compiler_gnu=$ac_cv_c_compiler_gnu
6153
6154 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6155 if test x$ac_success = xno; then
d0ac1c44 6156 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6157 fi
6158 fi
6159 if test x$ac_success = xno; then
6160 HAVE_CXX11=0
6161 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6162$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6163 else
6164 HAVE_CXX11=1
6165
6166$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6167
6168 fi
6169
6170
6171
6172
a417dc56
RW
6173# Dependency checking.
6174rm -rf .tst 2>/dev/null
6175mkdir .tst 2>/dev/null
6176if test -d .tst; then
6177 am__leading_dot=.
6178else
6179 am__leading_dot=_
6180fi
6181rmdir .tst 2>/dev/null
6182
6183DEPDIR="${am__leading_dot}deps"
6184
81ecdfbb 6185ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6186
6187
6188depcc="$CC" am_compiler_list=
6189
6190am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6192$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6193if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6194 $as_echo_n "(cached) " >&6
a417dc56
RW
6195else
6196 if test -f "$am_depcomp"; then
6197 # We make a subdir and do the tests there. Otherwise we can end up
6198 # making bogus files that we don't know about and never remove. For
6199 # instance it was reported that on HP-UX the gcc test will end up
6200 # making a dummy file named `D' -- because `-MD' means `put the output
6201 # in D'.
6202 mkdir conftest.dir
6203 # Copy depcomp to subdir because otherwise we won't find it if we're
6204 # using a relative directory.
6205 cp "$am_depcomp" conftest.dir
6206 cd conftest.dir
6207 # We will build objects and dependencies in a subdirectory because
6208 # it helps to detect inapplicable dependency modes. For instance
6209 # both Tru64's cc and ICC support -MD to output dependencies as a
6210 # side effect of compilation, but ICC will put the dependencies in
6211 # the current directory while Tru64 will put them in the object
6212 # directory.
6213 mkdir sub
6214
6215 am_cv_CC_dependencies_compiler_type=none
6216 if test "$am_compiler_list" = ""; then
6217 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6218 fi
6219 for depmode in $am_compiler_list; do
6220 if test $depmode = none; then break; fi
6221
81ecdfbb 6222 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6223 # Setup a source with many dependencies, because some compilers
6224 # like to wrap large dependency lists on column 80 (with \), and
6225 # we should not choose a depcomp mode which is confused by this.
6226 #
6227 # We need to recreate these files for each test, as the compiler may
6228 # overwrite some of them when testing with obscure command lines.
6229 # This happens at least with the AIX C compiler.
6230 : > sub/conftest.c
6231 for i in 1 2 3 4 5 6; do
6232 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6233 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6234 # Solaris 8's {/usr,}/bin/sh.
6235 touch sub/conftst$i.h
6236 done
6237 echo "include sub/conftest.Po" > confmf
6238
6239 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6240 # mode. It turns out that the SunPro C++ compiler does not properly
6241 # handle `-M -o', and we need to detect this.
6242 depcmd="depmode=$depmode \
6243 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6244 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6245 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6246 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6247 if env $depcmd > conftest.err 2>&1 &&
6248 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6249 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6250 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6251 # icc doesn't choke on unknown options, it will just issue warnings
6252 # or remarks (even with -Werror). So we grep stderr for any message
6253 # that says an option was ignored or not supported.
6254 # When given -MP, icc 7.0 and 7.1 complain thusly:
6255 # icc: Command line warning: ignoring option '-M'; no argument required
6256 # The diagnosis changed in icc 8.0:
6257 # icc: Command line remark: option '-MP' not supported
6258 if (grep 'ignoring option' conftest.err ||
6259 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6260 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6261 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6262 break
6263 fi
6264 fi
81ecdfbb 6265 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6266 sed -e 's/^/| /' < conftest.err >&5
6267 done
6268
6269 cd ..
6270 rm -rf conftest.dir
6271else
6272 am_cv_CC_dependencies_compiler_type=none
6273fi
6274
6275fi
81ecdfbb
RW
6276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6277$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6278if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6279then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6280else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6281
6282fi
6283
6284
c971b7fa
PA
6285
6286CONFIG_OBS=
6287CONFIG_DEPS=
6288CONFIG_SRCS=
6289ENABLE_CFLAGS=
6290
6291CONFIG_ALL=
6292CONFIG_CLEAN=
6293CONFIG_INSTALL=
6294CONFIG_UNINSTALL=
6295
6296# If we haven't got the data from the intl directory,
6297# assume NLS is disabled.
6298USE_NLS=no
6299LIBINTL=
6300LIBINTL_DEP=
6301INCINTL=
6302XGETTEXT=
6303GMSGFMT=
6304POSUB=
783e057b
DJ
6305
6306if test -f ../intl/config.intl; then
6307 . ../intl/config.intl
6308fi
81ecdfbb
RW
6309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6310$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6311if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6313$as_echo "no" >&6; }
783e057b 6314else
81ecdfbb
RW
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6316$as_echo "yes" >&6; }
783e057b 6317
81ecdfbb 6318$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6319
6320
81ecdfbb
RW
6321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6322$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6323 # Look for .po and .gmo files in the source directory.
6324 CATALOGS=
6325 XLINGUAS=
6326 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6327 # If there aren't any .gmo files the shell will give us the
6328 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6329 # weeded out.
6330 case "$cat" in *\**)
6331 continue;;
6332 esac
6333 # The quadruple backslash is collapsed to a double backslash
6334 # by the backticks, then collapsed again by the double quotes,
6335 # leaving us with one backslash in the sed expression (right
6336 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6337 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6338 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6339 # The user is allowed to set LINGUAS to a list of languages to
6340 # install catalogs for. If it's empty that means "all of them."
6341 if test "x$LINGUAS" = x; then
6342 CATALOGS="$CATALOGS $cat"
6343 XLINGUAS="$XLINGUAS $lang"
6344 else
6345 case "$LINGUAS" in *$lang*)
6346 CATALOGS="$CATALOGS $cat"
6347 XLINGUAS="$XLINGUAS $lang"
6348 ;;
6349 esac
e28b3332
DJ
6350 fi
6351 done
c971b7fa
PA
6352 LINGUAS="$XLINGUAS"
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6354$as_echo "$LINGUAS" >&6; }
6355
6356
6357 DATADIRNAME=share
6358
6359 INSTOBJEXT=.mo
6360
6361 GENCAT=gencat
6362
6363 CATOBJEXT=.gmo
e28b3332 6364
e28b3332
DJ
6365fi
6366
c971b7fa
PA
6367localedir='${datadir}/locale'
6368
6369
6370if test x"$USE_NLS" = xyes; then
6371 CONFIG_ALL="$CONFIG_ALL all-po"
6372 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6373 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6374 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6375fi
e28b3332 6376
c971b7fa
PA
6377PACKAGE=gdb
6378
6379cat >>confdefs.h <<_ACEOF
6380#define PACKAGE "$PACKAGE"
6381_ACEOF
6382
6383
6384
6385# We never need to detect it in this sub-configure.
6386# But preserve it for config.status --recheck.
6387
6388
6389
6390MAKEINFO_EXTRA_FLAGS=""
6391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6392$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6393if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6394 $as_echo_n "(cached) " >&6
6395else
6396 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6397 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6398 gdb_cv_have_makeinfo_click=yes
6399 else
6400 gdb_cv_have_makeinfo_click=no
6401 fi
6402fi
6403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6404$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6405if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6406 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6407fi
e28b3332
DJ
6408
6409
bec39cab
AC
6410
6411
81ecdfbb
RW
6412# Check whether --with-separate-debug-dir was given.
6413if test "${with_separate_debug_dir+set}" = set; then :
6414 withval=$with_separate_debug_dir;
b14b1491
TT
6415 DEBUGDIR=$withval
6416else
6417 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6418fi
6419
20e95c23 6420
783e057b
DJ
6421 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6422 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6423 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6424 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6425
783e057b
DJ
6426cat >>confdefs.h <<_ACEOF
6427#define DEBUGDIR "$ac_define_dir"
20e95c23 6428_ACEOF
20e95c23 6429
20e95c23 6430
20e95c23 6431
0c4a4063 6432
b14b1491
TT
6433 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6434 if test "x$prefix" = xNONE; then
6435 test_prefix=/usr/local
6436 else
6437 test_prefix=$prefix
6438 fi
783e057b 6439 else
b14b1491 6440 test_prefix=$exec_prefix
783e057b 6441 fi
b14b1491
TT
6442 value=0
6443 case ${ac_define_dir} in
6444 "${test_prefix}"|"${test_prefix}/"*|\
6445 '${exec_prefix}'|'${exec_prefix}/'*)
6446 value=1
6447 ;;
6448 esac
6449
6450cat >>confdefs.h <<_ACEOF
6451#define DEBUGDIR_RELOCATABLE $value
6452_ACEOF
6453
6454
6455
0c4a4063 6456
f83d8a90
DE
6457# We can't pass paths as command line arguments.
6458# Mingw32 tries to be clever and will convert the paths for us.
6459# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6460# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6461# This breaks GDB's relocatable path conversions since paths passed in
6462# config.h would not get so translated, the path prefixes no longer match.
6463
6464 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6465 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6466 ac_define_dir=`eval echo $bindir`
6467 ac_define_dir=`eval echo $ac_define_dir`
6468
6469cat >>confdefs.h <<_ACEOF
6470#define BINDIR "$ac_define_dir"
6471_ACEOF
6472
6473
6474
b14b1491
TT
6475# GDB's datadir relocation
6476
6477
6478
81ecdfbb
RW
6479# Check whether --with-gdb-datadir was given.
6480if test "${with_gdb_datadir+set}" = set; then :
6481 withval=$with_gdb_datadir;
b14b1491 6482 GDB_DATADIR=$withval
20e95c23 6483else
b14b1491 6484 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6485fi
6486
20e95c23 6487
b14b1491
TT
6488 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6489 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6490 ac_define_dir=`eval echo $GDB_DATADIR`
6491 ac_define_dir=`eval echo $ac_define_dir`
6492
6493cat >>confdefs.h <<_ACEOF
6494#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6495_ACEOF
6496
b14b1491
TT
6497
6498
0c4a4063 6499
b14b1491
TT
6500 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6501 if test "x$prefix" = xNONE; then
6502 test_prefix=/usr/local
6503 else
6504 test_prefix=$prefix
6505 fi
6506 else
6507 test_prefix=$exec_prefix
6508 fi
6509 value=0
6510 case ${ac_define_dir} in
6511 "${test_prefix}"|"${test_prefix}/"*|\
6512 '${exec_prefix}'|'${exec_prefix}/'*)
6513 value=1
6514 ;;
6515 esac
6516
6517cat >>confdefs.h <<_ACEOF
6518#define GDB_DATADIR_RELOCATABLE $value
6519_ACEOF
6520
6521
783e057b 6522
20e95c23 6523
0c4a4063 6524
81ecdfbb
RW
6525# Check whether --with-relocated-sources was given.
6526if test "${with_relocated_sources+set}" = set; then :
6527 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6528
6529 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6530 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6531 ac_define_dir=`eval echo $reloc_srcdir`
6532 ac_define_dir=`eval echo $ac_define_dir`
6533
6534cat >>confdefs.h <<_ACEOF
6535#define RELOC_SRCDIR "$ac_define_dir"
6536_ACEOF
6537
6538
6539
81ecdfbb
RW
6540fi
6541
29b0e8a2 6542
7349ff92
JK
6543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6544$as_echo_n "checking for default auto-load directory... " >&6; }
6545
6546# Check whether --with-auto-load-dir was given.
6547if test "${with_auto_load_dir+set}" = set; then :
6548 withval=$with_auto_load_dir;
6549else
1564a261 6550 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6551fi
6552
2861ee4f 6553escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6554
6555 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6556 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6557 ac_define_dir=`eval echo $escape_dir`
6558 ac_define_dir=`eval echo $ac_define_dir`
6559
6560cat >>confdefs.h <<_ACEOF
6561#define AUTO_LOAD_DIR "$ac_define_dir"
6562_ACEOF
6563
6564
6565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6566$as_echo "$with_auto_load_dir" >&6; }
6567
bccbefd2
JK
6568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6569$as_echo_n "checking for default auto-load safe-path... " >&6; }
6570
6571# Check whether --with-auto-load-safe-path was given.
6572if test "${with_auto_load_safe_path+set}" = set; then :
6573 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6574 with_auto_load_safe_path="/"
6575 fi
bccbefd2 6576else
7349ff92 6577 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6578fi
6579
2861ee4f 6580escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6581
6582 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6583 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6584 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6585 ac_define_dir=`eval echo $ac_define_dir`
6586
6587cat >>confdefs.h <<_ACEOF
6dea1fbd 6588#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6589_ACEOF
6590
6591
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6593$as_echo "$with_auto_load_safe_path" >&6; }
6594
29b0e8a2 6595
20e95c23 6596
5ae98d25 6597subdirs="$subdirs testsuite"
20e95c23
DJ
6598
6599
783e057b 6600# Check whether to support alternative target configurations
81ecdfbb
RW
6601# Check whether --enable-targets was given.
6602if test "${enable_targets+set}" = set; then :
6603 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6604 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6605 ;;
6606 no) enable_targets= ;;
6607 *) enable_targets=$enableval ;;
6608esac
81ecdfbb
RW
6609fi
6610
20e95c23 6611
783e057b 6612# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6613# Check whether --enable-64-bit-bfd was given.
6614if test "${enable_64_bit_bfd+set}" = set; then :
6615 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6616 yes) want64=true ;;
6617 no) want64=false ;;
d0ac1c44 6618 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6619esac
6620else
6621 want64=false
81ecdfbb
RW
6622fi
6623
783e057b
DJ
6624# Provide defaults for some variables set by the per-host and per-target
6625# configuration.
6626gdb_host_obs=posix-hdep.o
20e95c23 6627
783e057b
DJ
6628if test "${target}" = "${host}"; then
6629 gdb_native=yes
6630else
6631 gdb_native=no
6632fi
20e95c23 6633
783e057b 6634. $srcdir/configure.host
20e95c23 6635
783e057b 6636# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6637
783e057b
DJ
6638TARGET_OBS=
6639all_targets=
b292c783 6640HAVE_NATIVE_GCORE_TARGET=
20e95c23 6641
783e057b 6642for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6643do
783e057b
DJ
6644 if test "$targ_alias" = "all"; then
6645 all_targets=true
6646 else
6647 # Canonicalize the secondary target names.
6648 result=`$ac_config_sub $targ_alias 2>/dev/null`
6649 if test -n "$result"; then
6650 targ=$result
6651 else
6652 targ=$targ_alias
6653 fi
20e95c23 6654
783e057b 6655 . ${srcdir}/configure.tgt
20e95c23 6656
bf307134 6657 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6658 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6659fi
6660
783e057b
DJ
6661 # Target-specific object files
6662 for i in ${gdb_target_obs}; do
6663 case " $TARGET_OBS " in
6664 *" ${i} "*) ;;
6665 *)
6666 TARGET_OBS="$TARGET_OBS ${i}"
6667 ;;
6668 esac
6669 done
20e95c23 6670
783e057b
DJ
6671 # Check whether this target needs 64-bit CORE_ADDR
6672 if test x${want64} = xfalse; then
6673 . ${srcdir}/../bfd/config.bfd
6674 fi
b292c783
JK
6675
6676 # Check whether this target is native and supports gcore.
6677 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6678 && $gdb_have_gcore; then
6679 HAVE_NATIVE_GCORE_TARGET=1
6680 fi
783e057b 6681 fi
20e95c23
DJ
6682done
6683
783e057b
DJ
6684if test x${all_targets} = xtrue; then
6685
6686 # We want all 64-bit targets if we either:
6687 # - run on a 64-bit host or
6688 # - already require 64-bit support for some other target or
6689 # - the --enable-64-bit-bfd option was supplied
6690 # Otherwise we only support all 32-bit targets.
6691 #
6692 # NOTE: This test must be in sync with the corresponding
6693 # tests in BFD!
20e95c23 6694
783e057b 6695 if test x${want64} = xfalse; then
81ecdfbb
RW
6696 # The cast to long int works around a bug in the HP C Compiler
6697# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6698# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6699# This bug is HP SR number 8606223364.
6700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6701$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6702if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6703 $as_echo_n "(cached) " >&6
c0993dbe 6704else
81ecdfbb 6705 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6706
81ecdfbb
RW
6707else
6708 if test "$ac_cv_type_long" = yes; then
6709 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6711as_fn_error 77 "cannot compute sizeof (long)
6712See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6713 else
6714 ac_cv_sizeof_long=0
6715 fi
c0993dbe 6716fi
81ecdfbb 6717
c0993dbe 6718fi
81ecdfbb
RW
6719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6720$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6721
c0993dbe 6722
c0993dbe 6723
c0993dbe
UW
6724cat >>confdefs.h <<_ACEOF
6725#define SIZEOF_LONG $ac_cv_sizeof_long
6726_ACEOF
6727
6728
6729 if test "x${ac_cv_sizeof_long}" = "x8"; then
6730 want64=true
6731 fi
6732 fi
6733 if test x${want64} = xtrue; then
6734 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6735 else
6736 TARGET_OBS='$(ALL_TARGET_OBS)'
6737 fi
6738fi
6739
5922befa
LM
6740# ROCm dbgapi support.
6741
6742
6743# Check whether --with-rocm-dbgapi was given.
6744if test "${with_rocm_dbgapi+set}" = set; then :
6745 withval=$with_rocm_dbgapi;
6746else
6747 with_rocm_dbgapi=/opt/rocm
6748fi
6749
6750
6751save_CPPFLAGS=${CPPFLAGS}
6752CPPFLAGS="${CPPFLAGS} -I$with_rocm_dbgapi/include"
6753for ac_header in amd-dbgapi.h
6754do :
6755 ac_fn_c_check_header_mongrel "$LINENO" "amd-dbgapi.h" "ac_cv_header_amd_dbgapi_h" "$ac_includes_default"
6756if test "x$ac_cv_header_amd_dbgapi_h" = xyes; then :
6757 cat >>confdefs.h <<_ACEOF
6758#define HAVE_AMD_DBGAPI_H 1
6759_ACEOF
6760
6761fi
6762
6763done
6764
6765CPPFLAGS=${save_CPPFLAGS}
6766
6767save_LIBS=${LIBS}
6768save_LDFLAGS=${LDFLAGS}
6769LDFLAGS="${LDFLAGS} -L$with_rocm_dbgapi/lib"
6770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for amd_dbgapi_initialize in -lrocm-dbgapi" >&5
6771$as_echo_n "checking for amd_dbgapi_initialize in -lrocm-dbgapi... " >&6; }
6772if ${ac_cv_lib_rocm_dbgapi_amd_dbgapi_initialize+:} false; then :
6773 $as_echo_n "(cached) " >&6
6774else
6775 ac_check_lib_save_LIBS=$LIBS
6776LIBS="-lrocm-dbgapi $LIBS"
6777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6778/* end confdefs.h. */
6779
6780/* Override any GCC internal prototype to avoid an error.
6781 Use char because int might match the return type of a GCC
6782 builtin and then its argument prototype would still apply. */
6783#ifdef __cplusplus
6784extern "C"
6785#endif
6786char amd_dbgapi_initialize ();
6787int
6788main ()
6789{
6790return amd_dbgapi_initialize ();
6791 ;
6792 return 0;
6793}
6794_ACEOF
6795if ac_fn_c_try_link "$LINENO"; then :
6796 ac_cv_lib_rocm_dbgapi_amd_dbgapi_initialize=yes
6797else
6798 ac_cv_lib_rocm_dbgapi_amd_dbgapi_initialize=no
6799fi
6800rm -f core conftest.err conftest.$ac_objext \
6801 conftest$ac_exeext conftest.$ac_ext
6802LIBS=$ac_check_lib_save_LIBS
6803fi
6804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rocm_dbgapi_amd_dbgapi_initialize" >&5
6805$as_echo "$ac_cv_lib_rocm_dbgapi_amd_dbgapi_initialize" >&6; }
6806if test "x$ac_cv_lib_rocm_dbgapi_amd_dbgapi_initialize" = xyes; then :
6807 cat >>confdefs.h <<_ACEOF
6808#define HAVE_LIBROCM_DBGAPI 1
6809_ACEOF
6810
6811 LIBS="-lrocm-dbgapi $LIBS"
6812
6813fi
6814
6815LDFLAGS=${save_LDFLAGS}
6816LIBS=${save_LIBS}
6817
6818if test x"$ac_cv_header_amd_dbgapi_h" = xyes \
6819 -a x"$ac_cv_lib_rocm_dbgapi_amd_dbgapi_initialize" = xyes; then
6820
6821 if test x"$require_rocm_dbgapi" = xyes -o x"$all_targets" = xtrue; then
6822 TARGET_OBS="$TARGET_OBS amdgcn-rocm-tdep.o rocm-tdep.o solib-rocm.o"
6823 fi
6824
6825 CPPFLAGS="${CPPFLAGS} -I$with_rocm_dbgapi/include"
6826 ROCM_DBGAPI_LIBS="-L$with_rocm_dbgapi/lib -lrocm-dbgapi"
6827
6828else
6829 if test x"$require_rocm_dbgapi" = xyes; then
6830 as_fn_error $? "amdgcn*-*-* requires rocm-dbgapi to be installed, or use \
6831--with-rocm-dbgapi=PATH" "$LINENO" 5
6832 fi
6833fi
6834
c0993dbe
UW
6835
6836
b292c783 6837
c0993dbe
UW
6838# For other settings, only the main target counts.
6839gdb_sim=
6840gdb_osabi=
6841build_gdbserver=
6842targ=$target; . ${srcdir}/configure.tgt
6843
6844# Fetch the default architecture and default target vector from BFD.
6845targ=$target; . $srcdir/../bfd/config.bfd
6846
6847# We only want the first architecture, so strip off the others if
6848# there is more than one.
6849targ_archs=`echo $targ_archs | sed 's/ .*//'`
6850
6851if test "x$targ_archs" != x; then
6852
6853cat >>confdefs.h <<_ACEOF
6854#define DEFAULT_BFD_ARCH $targ_archs
6855_ACEOF
6856
6857fi
6858if test "x$targ_defvec" != x; then
6859
6860cat >>confdefs.h <<_ACEOF
6861#define DEFAULT_BFD_VEC $targ_defvec
6862_ACEOF
6863
6864fi
6865
c0993dbe 6866# Enable MI.
81ecdfbb
RW
6867# Check whether --enable-gdbmi was given.
6868if test "${enable_gdbmi+set}" = set; then :
6869 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6870 yes | no)
6871 ;;
6872 *)
d0ac1c44 6873 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6874 esac
6875else
6876 enable_gdbmi=yes
81ecdfbb
RW
6877fi
6878
c0993dbe 6879if test x"$enable_gdbmi" = xyes; then
0ad6b8ee 6880 if test -d "$srcdir/mi"; then
c0993dbe
UW
6881 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6882 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6883 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6884 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6885 fi
6886fi
6887
6888# Enable TUI.
81ecdfbb
RW
6889# Check whether --enable-tui was given.
6890if test "${enable_tui+set}" = set; then :
6891 enableval=$enable_tui; case $enableval in
3ca64bd3 6892 yes | no | auto)
c0993dbe
UW
6893 ;;
6894 *)
d0ac1c44 6895 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6896 esac
6897else
3ca64bd3 6898 enable_tui=auto
81ecdfbb
RW
6899fi
6900
c0993dbe
UW
6901
6902# Enable gdbtk.
81ecdfbb
RW
6903# Check whether --enable-gdbtk was given.
6904if test "${enable_gdbtk+set}" = set; then :
6905 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6906 yes | no)
6907 ;;
6908 *)
d0ac1c44 6909 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6910 esac
6911else
0ad6b8ee 6912 if test -d "$srcdir/gdbtk"; then
c0993dbe
UW
6913 enable_gdbtk=yes
6914 else
6915 enable_gdbtk=no
6916 fi
81ecdfbb
RW
6917fi
6918
c0993dbe
UW
6919# We unconditionally disable gdbtk tests on selected platforms.
6920case $host_os in
6921 go32* | windows*)
81ecdfbb
RW
6922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6923$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6924 enable_gdbtk=no ;;
6925esac
6926
05e7c244 6927# Libunwind support for ia64.
bec39cab 6928
05e7c244
JK
6929
6930# Check whether --with-libunwind-ia64 was given.
6931if test "${with_libunwind_ia64+set}" = set; then :
6932 withval=$with_libunwind_ia64;
bec39cab 6933else
05e7c244
JK
6934 with_libunwind_ia64=auto
6935fi
bec39cab 6936
05e7c244
JK
6937
6938# Backward compatibility option.
6939if test "${with_libunwind+set}" = set; then
6940 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6941 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6942 fi
6943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6944$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6945 with_libunwind_ia64="$with_libunwind"
6946fi
6947
6948case "$with_libunwind_ia64" in
6949 yes | no)
6950 ;;
6951 auto)
6952 for ac_header in libunwind-ia64.h
81ecdfbb 6953do :
b54a8fd7 6954 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6955if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6956 cat >>confdefs.h <<_ACEOF
b54a8fd7 6957#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6958_ACEOF
6959
6960fi
6961
6962done
6963
05e7c244
JK
6964 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6965 ;;
6966 *)
d0ac1c44 6967 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6968 ;;
6969esac
bec39cab 6970
05e7c244 6971if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6972 for ac_header in libunwind-ia64.h
81ecdfbb 6973do :
b54a8fd7 6974 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6975if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6976 cat >>confdefs.h <<_ACEOF
b54a8fd7 6977#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6978_ACEOF
6979
6980fi
6981
6982done
6983
05e7c244 6984 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6985 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6986 fi
6987 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6988 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6989 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6990fi
6991
cb01cfba
JB
6992opt_curses=no
6993
81ecdfbb
RW
6994# Check whether --with-curses was given.
6995if test "${with_curses+set}" = set; then :
6996 withval=$with_curses; opt_curses=$withval
6997fi
6998
cb01cfba 6999
76a39ba7 7000prefer_curses=no
cb01cfba 7001if test "$opt_curses" = "yes"; then
76a39ba7 7002 prefer_curses=yes
cb01cfba
JB
7003fi
7004
a9322a30 7005# Profiling support.
81ecdfbb
RW
7006# Check whether --enable-profiling was given.
7007if test "${enable_profiling+set}" = set; then :
7008 enableval=$enable_profiling; case $enableval in
a9322a30
TT
7009 yes | no)
7010 ;;
7011 *)
d0ac1c44 7012 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
7013 esac
7014else
7015 enable_profiling=no
81ecdfbb 7016fi
bec39cab 7017
a9322a30
TT
7018
7019for ac_func in monstartup _mcleanup
81ecdfbb
RW
7020do :
7021 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7022ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 7023if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
7024 cat >>confdefs.h <<_ACEOF
7025#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 7026_ACEOF
a9322a30 7027
81ecdfbb
RW
7028fi
7029done
a9322a30 7030
81ecdfbb
RW
7031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7032$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 7033if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
7034 $as_echo_n "(cached) " >&6
7035else
7036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7037/* end confdefs.h. */
7038#include <stdlib.h>
7039extern char _etext;
a9322a30
TT
7040
7041int
7042main ()
7043{
7044free (&_etext);
7045 ;
7046 return 0;
7047}
bec39cab 7048_ACEOF
81ecdfbb 7049if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7050 ac_cv_var__etext=yes
bec39cab 7051else
81ecdfbb 7052 ac_cv_var__etext=no
bec39cab 7053fi
81ecdfbb
RW
7054rm -f core conftest.err conftest.$ac_objext \
7055 conftest$ac_exeext conftest.$ac_ext
bec39cab 7056fi
81ecdfbb
RW
7057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7058$as_echo "$ac_cv_var__etext" >&6; }
0ad6b8ee 7059if test "$ac_cv_var__etext" = yes; then
60ca704f 7060
81ecdfbb 7061$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7062
bec39cab 7063fi
81ecdfbb
RW
7064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7065$as_echo_n "checking for etext... " >&6; }
d0ac1c44 7066if ${ac_cv_var_etext+:} false; then :
81ecdfbb 7067 $as_echo_n "(cached) " >&6
bec39cab 7068else
81ecdfbb 7069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7070/* end confdefs.h. */
a9322a30
TT
7071#include <stdlib.h>
7072extern char etext;
bec39cab
AC
7073
7074int
7075main ()
7076{
a9322a30 7077free (&etext);
bec39cab
AC
7078 ;
7079 return 0;
7080}
7081_ACEOF
81ecdfbb 7082if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7083 ac_cv_var_etext=yes
bec39cab 7084else
81ecdfbb 7085 ac_cv_var_etext=no
bec39cab 7086fi
81ecdfbb
RW
7087rm -f core conftest.err conftest.$ac_objext \
7088 conftest$ac_exeext conftest.$ac_ext
bec39cab 7089fi
81ecdfbb
RW
7090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7091$as_echo "$ac_cv_var_etext" >&6; }
0ad6b8ee 7092if test "$ac_cv_var_etext" = yes; then
a9322a30 7093
81ecdfbb 7094$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7095
7096fi
a9322a30 7097if test "$enable_profiling" = yes ; then
0ad6b8ee 7098 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
d0ac1c44 7099 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7100 fi
7101 PROFILE_CFLAGS=-pg
7102 OLD_CFLAGS="$CFLAGS"
7103 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7104
81ecdfbb
RW
7105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7106$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7107if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7108 $as_echo_n "(cached) " >&6
bec39cab 7109else
81ecdfbb 7110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7111/* end confdefs.h. */
bec39cab
AC
7112
7113int
7114main ()
7115{
a9322a30 7116int x;
bec39cab
AC
7117 ;
7118 return 0;
7119}
7120_ACEOF
81ecdfbb 7121if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7122 ac_cv_cc_supports_pg=yes
bec39cab 7123else
81ecdfbb 7124 ac_cv_cc_supports_pg=no
bec39cab 7125fi
81ecdfbb 7126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7127fi
81ecdfbb
RW
7128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7129$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7130
0ad6b8ee 7131 if test "$ac_cv_cc_supports_pg" = no; then
d0ac1c44 7132 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7133 fi
bec39cab 7134
a9322a30 7135 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7136fi
7137
44cee4fd
TT
7138CODESIGN_CERT=
7139# Check whether --enable-codesign was given.
7140if test "${enable_codesign+set}" = set; then :
7141 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7142fi
7143
7144
7145
c16158bc
JM
7146
7147
81ecdfbb
RW
7148# Check whether --with-pkgversion was given.
7149if test "${with_pkgversion+set}" = set; then :
7150 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7151 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7152 no) PKGVERSION= ;;
7153 *) PKGVERSION="($withval) " ;;
7154 esac
7155else
7156 PKGVERSION="(GDB) "
7157
81ecdfbb 7158fi
c16158bc
JM
7159
7160
7161
7162
81ecdfbb
RW
7163
7164# Check whether --with-bugurl was given.
7165if test "${with_bugurl+set}" = set; then :
7166 withval=$with_bugurl; case "$withval" in
d0ac1c44 7167 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7168 no) BUGURL=
7169 ;;
7170 *) BUGURL="$withval"
7171 ;;
7172 esac
7173else
7174 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7175
81ecdfbb
RW
7176fi
7177
c16158bc
JM
7178 case ${BUGURL} in
7179 "")
7180 REPORT_BUGS_TO=
7181 REPORT_BUGS_TEXI=
7182 ;;
7183 *)
7184 REPORT_BUGS_TO="<$BUGURL>"
7185 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7186 ;;
7187 esac;
7188
7189
7190
7191
7192cat >>confdefs.h <<_ACEOF
7193#define PKGVERSION "$PKGVERSION"
7194_ACEOF
7195
7196
7197cat >>confdefs.h <<_ACEOF
7198#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7199_ACEOF
7200
7201
bec39cab
AC
7202# --------------------- #
7203# Checks for programs. #
7204# --------------------- #
7205
7206for ac_prog in gawk mawk nawk awk
7207do
7208 # Extract the first word of "$ac_prog", so it can be a program name with args.
7209set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7211$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7212if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7213 $as_echo_n "(cached) " >&6
bec39cab
AC
7214else
7215 if test -n "$AWK"; then
7216 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7217else
7218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7219for as_dir in $PATH
7220do
7221 IFS=$as_save_IFS
7222 test -z "$as_dir" && as_dir=.
81ecdfbb 7223 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7224 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7225 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7226 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7227 break 2
7228 fi
7229done
81ecdfbb
RW
7230 done
7231IFS=$as_save_IFS
bec39cab
AC
7232
7233fi
7234fi
7235AWK=$ac_cv_prog_AWK
7236if test -n "$AWK"; then
81ecdfbb
RW
7237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7238$as_echo "$AWK" >&6; }
bec39cab 7239else
81ecdfbb
RW
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7241$as_echo "no" >&6; }
bec39cab
AC
7242fi
7243
bec39cab 7244
81ecdfbb 7245 test -n "$AWK" && break
bec39cab
AC
7246done
7247
c971b7fa
PA
7248# Find a good install program. We prefer a C program (faster),
7249# so one script is as good as another. But avoid the broken or
7250# incompatible versions:
7251# SysV /etc/install, /usr/sbin/install
7252# SunOS /usr/etc/install
7253# IRIX /sbin/install
7254# AIX /bin/install
7255# AmigaOS /C/install, which installs bootblocks on floppy discs
7256# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7257# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7258# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7259# OS/2's system install, which has a completely different semantic
7260# ./install, which can be erroneously created by make from ./install.sh.
7261# Reject install programs that cannot install multiple files.
7262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7263$as_echo_n "checking for a BSD-compatible install... " >&6; }
7264if test -z "$INSTALL"; then
d0ac1c44 7265if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7266 $as_echo_n "(cached) " >&6
7267else
7268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7269for as_dir in $PATH
7270do
7271 IFS=$as_save_IFS
7272 test -z "$as_dir" && as_dir=.
7273 # Account for people who put trailing slashes in PATH elements.
7274case $as_dir/ in #((
7275 ./ | .// | /[cC]/* | \
7276 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7277 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7278 /usr/ucb/* ) ;;
7279 *)
7280 # OSF1 and SCO ODT 3.0 have their own names for install.
7281 # Don't use installbsd from OSF since it installs stuff as root
7282 # by default.
7283 for ac_prog in ginstall scoinst install; do
7284 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7285 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7286 if test $ac_prog = install &&
7287 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7288 # AIX install. It has an incompatible calling convention.
7289 :
7290 elif test $ac_prog = install &&
7291 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7292 # program-specific install script used by HP pwplus--don't use.
7293 :
7294 else
7295 rm -rf conftest.one conftest.two conftest.dir
7296 echo one > conftest.one
7297 echo two > conftest.two
7298 mkdir conftest.dir
7299 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7300 test -s conftest.one && test -s conftest.two &&
7301 test -s conftest.dir/conftest.one &&
7302 test -s conftest.dir/conftest.two
7303 then
7304 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7305 break 3
7306 fi
7307 fi
7308 fi
7309 done
7310 done
7311 ;;
7312esac
7313
7314 done
7315IFS=$as_save_IFS
7316
7317rm -rf conftest.one conftest.two conftest.dir
7318
7319fi
7320 if test "${ac_cv_path_install+set}" = set; then
7321 INSTALL=$ac_cv_path_install
7322 else
7323 # As a last resort, use the slow shell script. Don't cache a
7324 # value for INSTALL within a source directory, because that will
7325 # break other packages using the cache if that directory is
7326 # removed, or if the value is a relative name.
7327 INSTALL=$ac_install_sh
7328 fi
7329fi
7330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7331$as_echo "$INSTALL" >&6; }
7332
7333# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7334# It thinks the first close brace ends the variable substitution.
7335test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7336
7337test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7338
7339test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7340
81ecdfbb
RW
7341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7342$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7343LN_S=$as_ln_s
7344if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7346$as_echo "yes" >&6; }
bec39cab 7347else
81ecdfbb
RW
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7349$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7350fi
7351
7352if test -n "$ac_tool_prefix"; then
7353 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7354set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7356$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7357if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7358 $as_echo_n "(cached) " >&6
bec39cab
AC
7359else
7360 if test -n "$RANLIB"; then
7361 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7362else
7363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7364for as_dir in $PATH
7365do
7366 IFS=$as_save_IFS
7367 test -z "$as_dir" && as_dir=.
81ecdfbb 7368 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7369 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7370 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7371 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7372 break 2
7373 fi
7374done
81ecdfbb
RW
7375 done
7376IFS=$as_save_IFS
bec39cab
AC
7377
7378fi
7379fi
7380RANLIB=$ac_cv_prog_RANLIB
7381if test -n "$RANLIB"; then
81ecdfbb
RW
7382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7383$as_echo "$RANLIB" >&6; }
bec39cab 7384else
81ecdfbb
RW
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7386$as_echo "no" >&6; }
bec39cab
AC
7387fi
7388
81ecdfbb 7389
bec39cab
AC
7390fi
7391if test -z "$ac_cv_prog_RANLIB"; then
7392 ac_ct_RANLIB=$RANLIB
7393 # Extract the first word of "ranlib", so it can be a program name with args.
7394set dummy ranlib; ac_word=$2
81ecdfbb
RW
7395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7396$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7397if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7398 $as_echo_n "(cached) " >&6
bec39cab
AC
7399else
7400 if test -n "$ac_ct_RANLIB"; then
7401 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7402else
7403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7404for as_dir in $PATH
7405do
7406 IFS=$as_save_IFS
7407 test -z "$as_dir" && as_dir=.
81ecdfbb 7408 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7409 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7410 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7411 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7412 break 2
7413 fi
7414done
81ecdfbb
RW
7415 done
7416IFS=$as_save_IFS
bec39cab 7417
bec39cab
AC
7418fi
7419fi
7420ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7421if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7423$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7424else
81ecdfbb
RW
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7426$as_echo "no" >&6; }
bec39cab
AC
7427fi
7428
81ecdfbb
RW
7429 if test "x$ac_ct_RANLIB" = x; then
7430 RANLIB=":"
7431 else
7432 case $cross_compiling:$ac_tool_warned in
7433yes:)
7434{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7435$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7436ac_tool_warned=yes ;;
7437esac
7438 RANLIB=$ac_ct_RANLIB
7439 fi
bec39cab
AC
7440else
7441 RANLIB="$ac_cv_prog_RANLIB"
7442fi
7443
7444for ac_prog in 'bison -y' byacc
7445do
7446 # Extract the first word of "$ac_prog", so it can be a program name with args.
7447set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7449$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7450if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7451 $as_echo_n "(cached) " >&6
bec39cab
AC
7452else
7453 if test -n "$YACC"; then
7454 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7455else
7456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7457for as_dir in $PATH
7458do
7459 IFS=$as_save_IFS
7460 test -z "$as_dir" && as_dir=.
81ecdfbb 7461 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7462 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7463 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7464 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7465 break 2
7466 fi
7467done
81ecdfbb
RW
7468 done
7469IFS=$as_save_IFS
bec39cab
AC
7470
7471fi
7472fi
7473YACC=$ac_cv_prog_YACC
7474if test -n "$YACC"; then
81ecdfbb
RW
7475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7476$as_echo "$YACC" >&6; }
bec39cab 7477else
81ecdfbb
RW
7478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7479$as_echo "no" >&6; }
bec39cab
AC
7480fi
7481
81ecdfbb 7482
bec39cab
AC
7483 test -n "$YACC" && break
7484done
7485test -n "$YACC" || YACC="yacc"
7486
7487
7488if test -n "$ac_tool_prefix"; then
7489 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7490set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7492$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7493if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7494 $as_echo_n "(cached) " >&6
bec39cab
AC
7495else
7496 if test -n "$AR"; then
7497 ac_cv_prog_AR="$AR" # Let the user override the test.
7498else
7499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7500for as_dir in $PATH
7501do
7502 IFS=$as_save_IFS
7503 test -z "$as_dir" && as_dir=.
81ecdfbb 7504 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7505 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7506 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7507 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7508 break 2
7509 fi
7510done
81ecdfbb
RW
7511 done
7512IFS=$as_save_IFS
bec39cab
AC
7513
7514fi
7515fi
7516AR=$ac_cv_prog_AR
7517if test -n "$AR"; then
81ecdfbb
RW
7518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7519$as_echo "$AR" >&6; }
bec39cab 7520else
81ecdfbb
RW
7521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7522$as_echo "no" >&6; }
bec39cab
AC
7523fi
7524
81ecdfbb 7525
bec39cab
AC
7526fi
7527if test -z "$ac_cv_prog_AR"; then
7528 ac_ct_AR=$AR
7529 # Extract the first word of "ar", so it can be a program name with args.
7530set dummy ar; ac_word=$2
81ecdfbb
RW
7531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7532$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7533if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7534 $as_echo_n "(cached) " >&6
bec39cab
AC
7535else
7536 if test -n "$ac_ct_AR"; then
7537 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7538else
7539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7540for as_dir in $PATH
7541do
7542 IFS=$as_save_IFS
7543 test -z "$as_dir" && as_dir=.
81ecdfbb 7544 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7545 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7546 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7548 break 2
7549 fi
7550done
81ecdfbb
RW
7551 done
7552IFS=$as_save_IFS
bec39cab
AC
7553
7554fi
7555fi
7556ac_ct_AR=$ac_cv_prog_ac_ct_AR
7557if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7559$as_echo "$ac_ct_AR" >&6; }
bec39cab 7560else
81ecdfbb
RW
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7562$as_echo "no" >&6; }
bec39cab
AC
7563fi
7564
81ecdfbb
RW
7565 if test "x$ac_ct_AR" = x; then
7566 AR=""
7567 else
7568 case $cross_compiling:$ac_tool_warned in
7569yes:)
7570{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7571$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7572ac_tool_warned=yes ;;
7573esac
7574 AR=$ac_ct_AR
7575 fi
bec39cab
AC
7576else
7577 AR="$ac_cv_prog_AR"
7578fi
7579
7580if test -n "$ac_tool_prefix"; then
7581 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7582set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7584$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7585if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7586 $as_echo_n "(cached) " >&6
bec39cab
AC
7587else
7588 if test -n "$DLLTOOL"; then
7589 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7590else
7591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7592for as_dir in $PATH
7593do
7594 IFS=$as_save_IFS
7595 test -z "$as_dir" && as_dir=.
81ecdfbb 7596 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7597 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7598 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7599 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7600 break 2
7601 fi
7602done
81ecdfbb
RW
7603 done
7604IFS=$as_save_IFS
bec39cab
AC
7605
7606fi
7607fi
7608DLLTOOL=$ac_cv_prog_DLLTOOL
7609if test -n "$DLLTOOL"; then
81ecdfbb
RW
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7611$as_echo "$DLLTOOL" >&6; }
bec39cab 7612else
81ecdfbb
RW
7613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7614$as_echo "no" >&6; }
bec39cab
AC
7615fi
7616
81ecdfbb 7617
bec39cab
AC
7618fi
7619if test -z "$ac_cv_prog_DLLTOOL"; then
7620 ac_ct_DLLTOOL=$DLLTOOL
7621 # Extract the first word of "dlltool", so it can be a program name with args.
7622set dummy dlltool; ac_word=$2
81ecdfbb
RW
7623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7624$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7625if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7626 $as_echo_n "(cached) " >&6
bec39cab
AC
7627else
7628 if test -n "$ac_ct_DLLTOOL"; then
7629 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7630else
7631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7632for as_dir in $PATH
7633do
7634 IFS=$as_save_IFS
7635 test -z "$as_dir" && as_dir=.
81ecdfbb 7636 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7637 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7638 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7639 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7640 break 2
7641 fi
7642done
81ecdfbb
RW
7643 done
7644IFS=$as_save_IFS
bec39cab
AC
7645
7646fi
7647fi
7648ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7649if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7651$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7652else
81ecdfbb
RW
7653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7654$as_echo "no" >&6; }
bec39cab
AC
7655fi
7656
81ecdfbb
RW
7657 if test "x$ac_ct_DLLTOOL" = x; then
7658 DLLTOOL=""
7659 else
7660 case $cross_compiling:$ac_tool_warned in
7661yes:)
7662{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7663$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7664ac_tool_warned=yes ;;
7665esac
7666 DLLTOOL=$ac_ct_DLLTOOL
7667 fi
bec39cab
AC
7668else
7669 DLLTOOL="$ac_cv_prog_DLLTOOL"
7670fi
7671
7672if test -n "$ac_tool_prefix"; then
7673 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7674set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7676$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7677if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7678 $as_echo_n "(cached) " >&6
bec39cab
AC
7679else
7680 if test -n "$WINDRES"; then
7681 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7682else
7683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7684for as_dir in $PATH
7685do
7686 IFS=$as_save_IFS
7687 test -z "$as_dir" && as_dir=.
81ecdfbb 7688 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7690 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7692 break 2
7693 fi
7694done
81ecdfbb
RW
7695 done
7696IFS=$as_save_IFS
bec39cab
AC
7697
7698fi
7699fi
7700WINDRES=$ac_cv_prog_WINDRES
7701if test -n "$WINDRES"; then
81ecdfbb
RW
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7703$as_echo "$WINDRES" >&6; }
bec39cab 7704else
81ecdfbb
RW
7705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706$as_echo "no" >&6; }
bec39cab
AC
7707fi
7708
81ecdfbb 7709
bec39cab
AC
7710fi
7711if test -z "$ac_cv_prog_WINDRES"; then
7712 ac_ct_WINDRES=$WINDRES
7713 # Extract the first word of "windres", so it can be a program name with args.
7714set dummy windres; ac_word=$2
81ecdfbb
RW
7715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7716$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7717if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7718 $as_echo_n "(cached) " >&6
bec39cab
AC
7719else
7720 if test -n "$ac_ct_WINDRES"; then
7721 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7722else
7723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7724for as_dir in $PATH
7725do
7726 IFS=$as_save_IFS
7727 test -z "$as_dir" && as_dir=.
81ecdfbb 7728 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7730 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7732 break 2
7733 fi
7734done
81ecdfbb
RW
7735 done
7736IFS=$as_save_IFS
bec39cab
AC
7737
7738fi
7739fi
7740ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7741if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7743$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7744else
81ecdfbb
RW
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7746$as_echo "no" >&6; }
c906108c 7747fi
bec39cab 7748
81ecdfbb
RW
7749 if test "x$ac_ct_WINDRES" = x; then
7750 WINDRES=""
7751 else
7752 case $cross_compiling:$ac_tool_warned in
7753yes:)
7754{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7755$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7756ac_tool_warned=yes ;;
7757esac
7758 WINDRES=$ac_ct_WINDRES
7759 fi
c906108c 7760else
bec39cab 7761 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7762fi
7763
bec39cab 7764
036c3acb
TS
7765case $host_os in
7766 gnu*)
7767 # Needed for GNU Hurd hosts.
7768 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7769 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7770set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7772$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7773if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7774 $as_echo_n "(cached) " >&6
c906108c 7775else
bec39cab
AC
7776 if test -n "$MIG"; then
7777 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7778else
7779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7780for as_dir in $PATH
7781do
7782 IFS=$as_save_IFS
7783 test -z "$as_dir" && as_dir=.
81ecdfbb 7784 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7786 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7788 break 2
7789 fi
7790done
81ecdfbb
RW
7791 done
7792IFS=$as_save_IFS
bec39cab 7793
c906108c 7794fi
bec39cab
AC
7795fi
7796MIG=$ac_cv_prog_MIG
7797if test -n "$MIG"; then
81ecdfbb
RW
7798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7799$as_echo "$MIG" >&6; }
c906108c 7800else
81ecdfbb
RW
7801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7802$as_echo "no" >&6; }
c906108c
SS
7803fi
7804
81ecdfbb 7805
bec39cab
AC
7806fi
7807if test -z "$ac_cv_prog_MIG"; then
7808 ac_ct_MIG=$MIG
7809 # Extract the first word of "mig", so it can be a program name with args.
7810set dummy mig; ac_word=$2
81ecdfbb
RW
7811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7812$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7813if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7814 $as_echo_n "(cached) " >&6
bec39cab
AC
7815else
7816 if test -n "$ac_ct_MIG"; then
7817 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7818else
7819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7820for as_dir in $PATH
7821do
7822 IFS=$as_save_IFS
7823 test -z "$as_dir" && as_dir=.
81ecdfbb 7824 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7826 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7828 break 2
7829 fi
7830done
81ecdfbb
RW
7831 done
7832IFS=$as_save_IFS
c906108c 7833
bec39cab
AC
7834fi
7835fi
7836ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7837if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7839$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7840else
81ecdfbb
RW
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7842$as_echo "no" >&6; }
bec39cab 7843fi
c906108c 7844
81ecdfbb
RW
7845 if test "x$ac_ct_MIG" = x; then
7846 MIG=""
7847 else
7848 case $cross_compiling:$ac_tool_warned in
7849yes:)
7850{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7851$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7852ac_tool_warned=yes ;;
7853esac
7854 MIG=$ac_ct_MIG
7855 fi
bec39cab
AC
7856else
7857 MIG="$ac_cv_prog_MIG"
7858fi
c906108c 7859
036c3acb 7860 if test x"$MIG" = x; then
d0ac1c44 7861 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7862 fi
7863 ;;
7864esac
c906108c 7865
bec39cab
AC
7866# ---------------------- #
7867# Checks for libraries. #
7868# ---------------------- #
c906108c 7869
bec39cab 7870# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7872$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7873if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7874 $as_echo_n "(cached) " >&6
bec39cab
AC
7875else
7876 ac_check_lib_save_LIBS=$LIBS
7877LIBS="-lm $LIBS"
81ecdfbb 7878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7879/* end confdefs.h. */
c906108c 7880
c906108c 7881
bec39cab
AC
7882int
7883main ()
7884{
81ecdfbb 7885return main ();
bec39cab
AC
7886 ;
7887 return 0;
7888}
7889_ACEOF
81ecdfbb 7890if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7891 ac_cv_lib_m_main=yes
7892else
81ecdfbb 7893 ac_cv_lib_m_main=no
bec39cab 7894fi
81ecdfbb
RW
7895rm -f core conftest.err conftest.$ac_objext \
7896 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7897LIBS=$ac_check_lib_save_LIBS
7898fi
81ecdfbb
RW
7899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7900$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7901if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7902 cat >>confdefs.h <<_ACEOF
7903#define HAVE_LIBM 1
7904_ACEOF
7905
7906 LIBS="-lm $LIBS"
c906108c 7907
c906108c 7908fi
bec39cab
AC
7909
7910
bec39cab 7911# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7913$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7914if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7915 $as_echo_n "(cached) " >&6
bec39cab
AC
7916else
7917 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7919/* end confdefs.h. */
ddc9cd0f 7920
81ecdfbb
RW
7921/* Override any GCC internal prototype to avoid an error.
7922 Use char because int might match the return type of a GCC
7923 builtin and then its argument prototype would still apply. */
bec39cab
AC
7924#ifdef __cplusplus
7925extern "C"
7926#endif
bec39cab
AC
7927char gethostbyname ();
7928int
7929main ()
7930{
81ecdfbb 7931return gethostbyname ();
bec39cab
AC
7932 ;
7933 return 0;
7934}
7935_ACEOF
81ecdfbb
RW
7936for ac_lib in '' nsl; do
7937 if test -z "$ac_lib"; then
7938 ac_res="none required"
7939 else
7940 ac_res=-l$ac_lib
b4e70030 7941 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7942 fi
7943 if ac_fn_c_try_link "$LINENO"; then :
7944 ac_cv_search_gethostbyname=$ac_res
7945fi
7946rm -f core conftest.err conftest.$ac_objext \
7947 conftest$ac_exeext
d0ac1c44 7948 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7949 break
7950fi
7951done
d0ac1c44 7952if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7953
bec39cab 7954else
81ecdfbb 7955 ac_cv_search_gethostbyname=no
bec39cab 7956fi
81ecdfbb 7957rm conftest.$ac_ext
bec39cab
AC
7958LIBS=$ac_func_search_save_LIBS
7959fi
81ecdfbb
RW
7960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7961$as_echo "$ac_cv_search_gethostbyname" >&6; }
7962ac_res=$ac_cv_search_gethostbyname
7963if test "$ac_res" != no; then :
7964 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7965
bec39cab 7966fi
96baa820 7967
c906108c 7968
b4e70030 7969# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7971$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7972if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7973 $as_echo_n "(cached) " >&6
b4e70030
JB
7974else
7975 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7977/* end confdefs.h. */
7978
81ecdfbb
RW
7979/* Override any GCC internal prototype to avoid an error.
7980 Use char because int might match the return type of a GCC
7981 builtin and then its argument prototype would still apply. */
b4e70030
JB
7982#ifdef __cplusplus
7983extern "C"
7984#endif
b4e70030
JB
7985char socketpair ();
7986int
7987main ()
7988{
81ecdfbb 7989return socketpair ();
b4e70030
JB
7990 ;
7991 return 0;
7992}
7993_ACEOF
81ecdfbb
RW
7994for ac_lib in '' socket; do
7995 if test -z "$ac_lib"; then
7996 ac_res="none required"
7997 else
7998 ac_res=-l$ac_lib
b4e70030 7999 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8000 fi
8001 if ac_fn_c_try_link "$LINENO"; then :
8002 ac_cv_search_socketpair=$ac_res
8003fi
8004rm -f core conftest.err conftest.$ac_objext \
8005 conftest$ac_exeext
d0ac1c44 8006 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
8007 break
8008fi
8009done
d0ac1c44 8010if ${ac_cv_search_socketpair+:} false; then :
b4e70030 8011
b4e70030 8012else
81ecdfbb 8013 ac_cv_search_socketpair=no
b4e70030 8014fi
81ecdfbb 8015rm conftest.$ac_ext
b4e70030
JB
8016LIBS=$ac_func_search_save_LIBS
8017fi
81ecdfbb
RW
8018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8019$as_echo "$ac_cv_search_socketpair" >&6; }
8020ac_res=$ac_cv_search_socketpair
8021if test "$ac_res" != no; then :
8022 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
8023
8024fi
8025
8026
233a11ab 8027# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 8028
711a72d3 8029 # Use the system's zlib library.
39f3de7c
L
8030 zlibdir="-L\$(top_builddir)/../zlib"
8031 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 8032
711a72d3
L
8033# Check whether --with-system-zlib was given.
8034if test "${with_system_zlib+set}" = set; then :
afa59b79
L
8035 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8036 zlibdir=
8037 zlibinc=
8038 fi
b040ad30 8039
233a11ab 8040fi
233a11ab 8041
233a11ab 8042
233a11ab 8043
b040ad30 8044
233a11ab 8045
25268153 8046# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 8047# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
8048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
8049$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 8050if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8051 $as_echo_n "(cached) " >&6
8052else
8053 ac_func_search_save_LIBS=$LIBS
8054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8055/* end confdefs.h. */
8056
8057/* Override any GCC internal prototype to avoid an error.
8058 Use char because int might match the return type of a GCC
8059 builtin and then its argument prototype would still apply. */
8060#ifdef __cplusplus
8061extern "C"
8062#endif
8063char kinfo_getvmmap ();
8064int
8065main ()
8066{
8067return kinfo_getvmmap ();
8068 ;
8069 return 0;
8070}
8071_ACEOF
37773e78 8072for ac_lib in '' util util-freebsd; do
25268153
JB
8073 if test -z "$ac_lib"; then
8074 ac_res="none required"
8075 else
8076 ac_res=-l$ac_lib
8077 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8078 fi
8079 if ac_fn_c_try_link "$LINENO"; then :
8080 ac_cv_search_kinfo_getvmmap=$ac_res
8081fi
8082rm -f core conftest.err conftest.$ac_objext \
8083 conftest$ac_exeext
d0ac1c44 8084 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8085 break
8086fi
8087done
d0ac1c44 8088if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8089
8090else
8091 ac_cv_search_kinfo_getvmmap=no
8092fi
8093rm conftest.$ac_ext
8094LIBS=$ac_func_search_save_LIBS
8095fi
8096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8097$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8098ac_res=$ac_cv_search_kinfo_getvmmap
8099if test "$ac_res" != no; then :
8100 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8101
8102$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8103
8104fi
8105
8106
92fce24d
JB
8107# fbsd-nat.c can also use kinfo_getfile.
8108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8109$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
d0ac1c44 8110if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8111 $as_echo_n "(cached) " >&6
8112else
8113 ac_func_search_save_LIBS=$LIBS
8114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8115/* end confdefs.h. */
8116
8117/* Override any GCC internal prototype to avoid an error.
8118 Use char because int might match the return type of a GCC
8119 builtin and then its argument prototype would still apply. */
8120#ifdef __cplusplus
8121extern "C"
8122#endif
8123char kinfo_getfile ();
8124int
8125main ()
8126{
8127return kinfo_getfile ();
8128 ;
8129 return 0;
8130}
8131_ACEOF
8132for ac_lib in '' util util-freebsd; do
8133 if test -z "$ac_lib"; then
8134 ac_res="none required"
8135 else
8136 ac_res=-l$ac_lib
8137 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8138 fi
8139 if ac_fn_c_try_link "$LINENO"; then :
8140 ac_cv_search_kinfo_getfile=$ac_res
8141fi
8142rm -f core conftest.err conftest.$ac_objext \
8143 conftest$ac_exeext
d0ac1c44 8144 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8145 break
8146fi
8147done
d0ac1c44 8148if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8149
8150else
8151 ac_cv_search_kinfo_getfile=no
8152fi
8153rm conftest.$ac_ext
8154LIBS=$ac_func_search_save_LIBS
8155fi
8156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8157$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8158ac_res=$ac_cv_search_kinfo_getfile
8159if test "$ac_res" != no; then :
8160 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8161
8162$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
8163
8164fi
8165
8166
77f120bf 8167
016a3251
DD
8168 if test "X$prefix" = "XNONE"; then
8169 acl_final_prefix="$ac_default_prefix"
8170 else
8171 acl_final_prefix="$prefix"
8172 fi
8173 if test "X$exec_prefix" = "XNONE"; then
8174 acl_final_exec_prefix='${prefix}'
8175 else
8176 acl_final_exec_prefix="$exec_prefix"
8177 fi
8178 acl_save_prefix="$prefix"
8179 prefix="$acl_final_prefix"
8180 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8181 prefix="$acl_save_prefix"
8182
8183
8184# Check whether --with-gnu-ld was given.
8185if test "${with_gnu_ld+set}" = set; then :
8186 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8187else
8188 with_gnu_ld=no
8189fi
8190
8191# Prepare PATH_SEPARATOR.
8192# The user is always right.
8193if test "${PATH_SEPARATOR+set}" != set; then
8194 echo "#! /bin/sh" >conf$$.sh
8195 echo "exit 0" >>conf$$.sh
8196 chmod +x conf$$.sh
8197 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8198 PATH_SEPARATOR=';'
8199 else
8200 PATH_SEPARATOR=:
8201 fi
8202 rm -f conf$$.sh
8203fi
8204ac_prog=ld
8205if test "$GCC" = yes; then
8206 # Check if gcc -print-prog-name=ld gives a path.
8207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8208$as_echo_n "checking for ld used by GCC... " >&6; }
8209 case $host in
8210 *-*-mingw*)
8211 # gcc leaves a trailing carriage return which upsets mingw
8212 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8213 *)
8214 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8215 esac
8216 case $ac_prog in
8217 # Accept absolute paths.
8218 [\\/]* | [A-Za-z]:[\\/]*)
8219 re_direlt='/[^/][^/]*/\.\./'
8220 # Canonicalize the path of ld
8221 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8222 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8223 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8224 done
8225 test -z "$LD" && LD="$ac_prog"
8226 ;;
8227 "")
8228 # If it fails, then pretend we aren't using GCC.
8229 ac_prog=ld
8230 ;;
8231 *)
8232 # If it is relative, then search for the first ld in PATH.
8233 with_gnu_ld=unknown
8234 ;;
8235 esac
8236elif test "$with_gnu_ld" = yes; then
8237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8238$as_echo_n "checking for GNU ld... " >&6; }
8239else
8240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8241$as_echo_n "checking for non-GNU ld... " >&6; }
8242fi
d0ac1c44 8243if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8244 $as_echo_n "(cached) " >&6
8245else
8246 if test -z "$LD"; then
8247 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8248 for ac_dir in $PATH; do
8249 test -z "$ac_dir" && ac_dir=.
8250 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8251 acl_cv_path_LD="$ac_dir/$ac_prog"
8252 # Check to see if the program is GNU ld. I'd rather use --version,
8253 # but apparently some GNU ld's only accept -v.
8254 # Break only if it was the GNU/non-GNU ld that we prefer.
8255 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8256 test "$with_gnu_ld" != no && break
8257 else
8258 test "$with_gnu_ld" != yes && break
8259 fi
8260 fi
8261 done
8262 IFS="$ac_save_ifs"
8263else
8264 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8265fi
8266fi
8267
8268LD="$acl_cv_path_LD"
8269if test -n "$LD"; then
8270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8271$as_echo "$LD" >&6; }
8272else
8273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8274$as_echo "no" >&6; }
8275fi
d0ac1c44 8276test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8278$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8279if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8280 $as_echo_n "(cached) " >&6
8281else
8282 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8283if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8284 acl_cv_prog_gnu_ld=yes
8285else
8286 acl_cv_prog_gnu_ld=no
8287fi
8288fi
8289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8290$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8291with_gnu_ld=$acl_cv_prog_gnu_ld
8292
8293
8294
8295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8296$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8297if ${acl_cv_rpath+:} false; then :
016a3251
DD
8298 $as_echo_n "(cached) " >&6
8299else
8300
8301 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8302 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8303 . ./conftest.sh
8304 rm -f ./conftest.sh
8305 acl_cv_rpath=done
8306
8307fi
8308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8309$as_echo "$acl_cv_rpath" >&6; }
8310 wl="$acl_cv_wl"
8311 libext="$acl_cv_libext"
8312 shlibext="$acl_cv_shlibext"
8313 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8314 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8315 hardcode_direct="$acl_cv_hardcode_direct"
8316 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8317 # Check whether --enable-rpath was given.
8318if test "${enable_rpath+set}" = set; then :
8319 enableval=$enable_rpath; :
8320else
8321 enable_rpath=yes
8322fi
8323
8324
8325
8326
8327
8328
8329
8330
8331 use_additional=yes
8332
8333 acl_save_prefix="$prefix"
8334 prefix="$acl_final_prefix"
8335 acl_save_exec_prefix="$exec_prefix"
8336 exec_prefix="$acl_final_exec_prefix"
8337
8338 eval additional_includedir=\"$includedir\"
8339 eval additional_libdir=\"$libdir\"
8340
8341 exec_prefix="$acl_save_exec_prefix"
8342 prefix="$acl_save_prefix"
77f120bf 8343
6c7a06a3 8344
81ecdfbb
RW
8345# Check whether --with-libiconv-prefix was given.
8346if test "${with_libiconv_prefix+set}" = set; then :
8347 withval=$with_libiconv_prefix;
016a3251
DD
8348 if test "X$withval" = "Xno"; then
8349 use_additional=no
8350 else
8351 if test "X$withval" = "X"; then
8352
8353 acl_save_prefix="$prefix"
8354 prefix="$acl_final_prefix"
8355 acl_save_exec_prefix="$exec_prefix"
8356 exec_prefix="$acl_final_exec_prefix"
8357
8358 eval additional_includedir=\"$includedir\"
8359 eval additional_libdir=\"$libdir\"
8360
8361 exec_prefix="$acl_save_exec_prefix"
8362 prefix="$acl_save_prefix"
8363
8364 else
8365 additional_includedir="$withval/include"
8366 additional_libdir="$withval/lib"
8367 fi
8368 fi
6c7a06a3 8369
81ecdfbb
RW
8370fi
8371
016a3251
DD
8372 LIBICONV=
8373 LTLIBICONV=
8374 INCICONV=
8375 rpathdirs=
8376 ltrpathdirs=
8377 names_already_handled=
8378 names_next_round='iconv '
8379 while test -n "$names_next_round"; do
8380 names_this_round="$names_next_round"
8381 names_next_round=
8382 for name in $names_this_round; do
8383 already_handled=
8384 for n in $names_already_handled; do
8385 if test "$n" = "$name"; then
8386 already_handled=yes
8387 break
8388 fi
8389 done
8390 if test -z "$already_handled"; then
8391 names_already_handled="$names_already_handled $name"
8392 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8393 eval value=\"\$HAVE_LIB$uppername\"
8394 if test -n "$value"; then
8395 if test "$value" = yes; then
8396 eval value=\"\$LIB$uppername\"
8397 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8398 eval value=\"\$LTLIB$uppername\"
8399 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8400 else
8401 :
8402 fi
8403 else
8404 found_dir=
8405 found_la=
8406 found_so=
8407 found_a=
8408 if test $use_additional = yes; then
8409 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8410 found_dir="$additional_libdir"
8411 found_so="$additional_libdir/lib$name.$shlibext"
8412 if test -f "$additional_libdir/lib$name.la"; then
8413 found_la="$additional_libdir/lib$name.la"
8414 fi
8415 else
8416 if test -f "$additional_libdir/lib$name.$libext"; then
8417 found_dir="$additional_libdir"
8418 found_a="$additional_libdir/lib$name.$libext"
8419 if test -f "$additional_libdir/lib$name.la"; then
8420 found_la="$additional_libdir/lib$name.la"
8421 fi
8422 fi
8423 fi
8424 fi
8425 if test "X$found_dir" = "X"; then
8426 for x in $LDFLAGS $LTLIBICONV; do
8427
8428 acl_save_prefix="$prefix"
8429 prefix="$acl_final_prefix"
8430 acl_save_exec_prefix="$exec_prefix"
8431 exec_prefix="$acl_final_exec_prefix"
8432 eval x=\"$x\"
8433 exec_prefix="$acl_save_exec_prefix"
8434 prefix="$acl_save_prefix"
8435
8436 case "$x" in
8437 -L*)
8438 dir=`echo "X$x" | sed -e 's/^X-L//'`
8439 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8440 found_dir="$dir"
8441 found_so="$dir/lib$name.$shlibext"
8442 if test -f "$dir/lib$name.la"; then
8443 found_la="$dir/lib$name.la"
8444 fi
8445 else
8446 if test -f "$dir/lib$name.$libext"; then
8447 found_dir="$dir"
8448 found_a="$dir/lib$name.$libext"
8449 if test -f "$dir/lib$name.la"; then
8450 found_la="$dir/lib$name.la"
8451 fi
8452 fi
8453 fi
8454 ;;
8455 esac
8456 if test "X$found_dir" != "X"; then
8457 break
8458 fi
8459 done
8460 fi
8461 if test "X$found_dir" != "X"; then
8462 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8463 if test "X$found_so" != "X"; then
8464 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8465 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8466 else
8467 haveit=
8468 for x in $ltrpathdirs; do
8469 if test "X$x" = "X$found_dir"; then
8470 haveit=yes
8471 break
8472 fi
8473 done
8474 if test -z "$haveit"; then
8475 ltrpathdirs="$ltrpathdirs $found_dir"
8476 fi
8477 if test "$hardcode_direct" = yes; then
8478 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8479 else
8480 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8481 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8482 haveit=
8483 for x in $rpathdirs; do
8484 if test "X$x" = "X$found_dir"; then
8485 haveit=yes
8486 break
8487 fi
8488 done
8489 if test -z "$haveit"; then
8490 rpathdirs="$rpathdirs $found_dir"
8491 fi
8492 else
8493 haveit=
8494 for x in $LDFLAGS $LIBICONV; do
8495
8496 acl_save_prefix="$prefix"
8497 prefix="$acl_final_prefix"
8498 acl_save_exec_prefix="$exec_prefix"
8499 exec_prefix="$acl_final_exec_prefix"
8500 eval x=\"$x\"
8501 exec_prefix="$acl_save_exec_prefix"
8502 prefix="$acl_save_prefix"
8503
8504 if test "X$x" = "X-L$found_dir"; then
8505 haveit=yes
8506 break
8507 fi
8508 done
8509 if test -z "$haveit"; then
8510 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8511 fi
8512 if test "$hardcode_minus_L" != no; then
8513 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8514 else
8515 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8516 fi
8517 fi
8518 fi
8519 fi
8520 else
8521 if test "X$found_a" != "X"; then
8522 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8523 else
8524 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8525 fi
8526 fi
8527 additional_includedir=
8528 case "$found_dir" in
8529 */lib | */lib/)
8530 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8531 additional_includedir="$basedir/include"
8532 ;;
8533 esac
8534 if test "X$additional_includedir" != "X"; then
8535 if test "X$additional_includedir" != "X/usr/include"; then
8536 haveit=
8537 if test "X$additional_includedir" = "X/usr/local/include"; then
8538 if test -n "$GCC"; then
8539 case $host_os in
8540 linux*) haveit=yes;;
8541 esac
8542 fi
8543 fi
8544 if test -z "$haveit"; then
8545 for x in $CPPFLAGS $INCICONV; do
8546
8547 acl_save_prefix="$prefix"
8548 prefix="$acl_final_prefix"
8549 acl_save_exec_prefix="$exec_prefix"
8550 exec_prefix="$acl_final_exec_prefix"
8551 eval x=\"$x\"
8552 exec_prefix="$acl_save_exec_prefix"
8553 prefix="$acl_save_prefix"
8554
8555 if test "X$x" = "X-I$additional_includedir"; then
8556 haveit=yes
8557 break
8558 fi
8559 done
8560 if test -z "$haveit"; then
8561 if test -d "$additional_includedir"; then
8562 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8563 fi
8564 fi
8565 fi
8566 fi
8567 fi
8568 if test -n "$found_la"; then
8569 save_libdir="$libdir"
8570 case "$found_la" in
8571 */* | *\\*) . "$found_la" ;;
8572 *) . "./$found_la" ;;
8573 esac
8574 libdir="$save_libdir"
8575 for dep in $dependency_libs; do
8576 case "$dep" in
8577 -L*)
8578 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8579 if test "X$additional_libdir" != "X/usr/lib"; then
8580 haveit=
8581 if test "X$additional_libdir" = "X/usr/local/lib"; then
8582 if test -n "$GCC"; then
8583 case $host_os in
8584 linux*) haveit=yes;;
8585 esac
8586 fi
8587 fi
8588 if test -z "$haveit"; then
8589 haveit=
8590 for x in $LDFLAGS $LIBICONV; do
8591
8592 acl_save_prefix="$prefix"
8593 prefix="$acl_final_prefix"
8594 acl_save_exec_prefix="$exec_prefix"
8595 exec_prefix="$acl_final_exec_prefix"
8596 eval x=\"$x\"
8597 exec_prefix="$acl_save_exec_prefix"
8598 prefix="$acl_save_prefix"
8599
8600 if test "X$x" = "X-L$additional_libdir"; then
8601 haveit=yes
8602 break
8603 fi
8604 done
8605 if test -z "$haveit"; then
8606 if test -d "$additional_libdir"; then
8607 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8608 fi
8609 fi
8610 haveit=
8611 for x in $LDFLAGS $LTLIBICONV; do
8612
8613 acl_save_prefix="$prefix"
8614 prefix="$acl_final_prefix"
8615 acl_save_exec_prefix="$exec_prefix"
8616 exec_prefix="$acl_final_exec_prefix"
8617 eval x=\"$x\"
8618 exec_prefix="$acl_save_exec_prefix"
8619 prefix="$acl_save_prefix"
8620
8621 if test "X$x" = "X-L$additional_libdir"; then
8622 haveit=yes
8623 break
8624 fi
8625 done
8626 if test -z "$haveit"; then
8627 if test -d "$additional_libdir"; then
8628 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8629 fi
8630 fi
8631 fi
8632 fi
8633 ;;
8634 -R*)
8635 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8636 if test "$enable_rpath" != no; then
8637 haveit=
8638 for x in $rpathdirs; do
8639 if test "X$x" = "X$dir"; then
8640 haveit=yes
8641 break
8642 fi
8643 done
8644 if test -z "$haveit"; then
8645 rpathdirs="$rpathdirs $dir"
8646 fi
8647 haveit=
8648 for x in $ltrpathdirs; do
8649 if test "X$x" = "X$dir"; then
8650 haveit=yes
8651 break
8652 fi
8653 done
8654 if test -z "$haveit"; then
8655 ltrpathdirs="$ltrpathdirs $dir"
8656 fi
8657 fi
8658 ;;
8659 -l*)
8660 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8661 ;;
8662 *.la)
8663 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8664 ;;
8665 *)
8666 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8667 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8668 ;;
8669 esac
8670 done
8671 fi
8672 else
8673 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8674 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8675 fi
8676 fi
8677 fi
8678 done
8679 done
8680 if test "X$rpathdirs" != "X"; then
8681 if test -n "$hardcode_libdir_separator"; then
8682 alldirs=
8683 for found_dir in $rpathdirs; do
8684 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8685 done
8686 acl_save_libdir="$libdir"
8687 libdir="$alldirs"
8688 eval flag=\"$hardcode_libdir_flag_spec\"
8689 libdir="$acl_save_libdir"
8690 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8691 else
8692 for found_dir in $rpathdirs; do
8693 acl_save_libdir="$libdir"
8694 libdir="$found_dir"
8695 eval flag=\"$hardcode_libdir_flag_spec\"
8696 libdir="$acl_save_libdir"
8697 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8698 done
8699 fi
8700 fi
8701 if test "X$ltrpathdirs" != "X"; then
8702 for found_dir in $ltrpathdirs; do
8703 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8704 done
8705 fi
8706
8707
8708
8709
8710
6c7a06a3 8711
6c7a06a3 8712
81ecdfbb
RW
8713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8714$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8715if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8716 $as_echo_n "(cached) " >&6
d542061a 8717else
6c7a06a3
TT
8718
8719 am_cv_func_iconv="no, consider installing GNU libiconv"
8720 am_cv_lib_iconv=no
016a3251
DD
8721 am_save_CPPFLAGS="$CPPFLAGS"
8722 CPPFLAGS="$CPPFLAGS $INCICONV"
8723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8724/* end confdefs.h. */
6c7a06a3
TT
8725#include <stdlib.h>
8726#include <iconv.h>
d542061a
UW
8727int
8728main ()
8729{
6c7a06a3 8730iconv_t cd = iconv_open("","");
016a3251
DD
8731 iconv(cd,NULL,NULL,NULL,NULL);
8732 iconv_close(cd);
d542061a
UW
8733 ;
8734 return 0;
8735}
8736_ACEOF
81ecdfbb 8737if ac_fn_c_try_link "$LINENO"; then :
016a3251 8738 am_cv_func_iconv=yes
d542061a 8739fi
81ecdfbb
RW
8740rm -f core conftest.err conftest.$ac_objext \
8741 conftest$ac_exeext conftest.$ac_ext
016a3251 8742 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8743
016a3251
DD
8744 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8745 for _libs in .libs _libs; do
8746 am_save_CPPFLAGS="$CPPFLAGS"
8747 am_save_LIBS="$LIBS"
8748 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8749 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8751/* end confdefs.h. */
6c7a06a3
TT
8752#include <stdlib.h>
8753#include <iconv.h>
d542061a
UW
8754int
8755main ()
8756{
6c7a06a3 8757iconv_t cd = iconv_open("","");
016a3251
DD
8758 iconv(cd,NULL,NULL,NULL,NULL);
8759 iconv_close(cd);
d542061a
UW
8760 ;
8761 return 0;
8762}
8763_ACEOF
81ecdfbb 8764if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8765 INCICONV="-I../libiconv/include"
8766 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8767 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8768 am_cv_lib_iconv=yes
8769 am_cv_func_iconv=yes
d542061a 8770fi
81ecdfbb
RW
8771rm -f core conftest.err conftest.$ac_objext \
8772 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8773 CPPFLAGS="$am_save_CPPFLAGS"
8774 LIBS="$am_save_LIBS"
8775 if test "$am_cv_func_iconv" = "yes"; then
8776 break
8777 fi
8778 done
77f120bf 8779 fi
94ae1714 8780
4edb1e84 8781 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8782 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8783 am_save_LIBS="$LIBS"
5d762de0 8784 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8785 LIBS="$LIBS $LIBICONV"
81ecdfbb 8786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8787/* end confdefs.h. */
6c7a06a3
TT
8788#include <stdlib.h>
8789#include <iconv.h>
bec39cab
AC
8790int
8791main ()
8792{
6c7a06a3
TT
8793iconv_t cd = iconv_open("","");
8794 iconv(cd,NULL,NULL,NULL,NULL);
8795 iconv_close(cd);
bec39cab
AC
8796 ;
8797 return 0;
8798}
8799_ACEOF
81ecdfbb 8800if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8801 am_cv_lib_iconv=yes
6c7a06a3 8802 am_cv_func_iconv=yes
627af7ea 8803fi
81ecdfbb
RW
8804rm -f core conftest.err conftest.$ac_objext \
8805 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8806 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8807 LIBS="$am_save_LIBS"
6c7a06a3
TT
8808 fi
8809
8810fi
81ecdfbb
RW
8811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8812$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8813 if test "$am_cv_func_iconv" = yes; then
8814
8815$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8816
016a3251 8817 fi
fc3b640d 8818 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8819
8820 for element in $INCICONV; do
8821 haveit=
8822 for x in $CPPFLAGS; do
8823
8824 acl_save_prefix="$prefix"
8825 prefix="$acl_final_prefix"
8826 acl_save_exec_prefix="$exec_prefix"
8827 exec_prefix="$acl_final_exec_prefix"
8828 eval x=\"$x\"
8829 exec_prefix="$acl_save_exec_prefix"
8830 prefix="$acl_save_prefix"
8831
8832 if test "X$x" = "X$element"; then
8833 haveit=yes
8834 break
8835 fi
8836 done
8837 if test -z "$haveit"; then
8838 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8839 fi
8840 done
8841
8842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8843$as_echo_n "checking how to link with libiconv... " >&6; }
8844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8845$as_echo "$LIBICONV" >&6; }
94ae1714 8846 else
016a3251
DD
8847 LIBICONV=
8848 LTLIBICONV=
fc3b640d 8849 fi
94ae1714 8850
6c7a06a3 8851
6c7a06a3 8852
016a3251 8853 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8855$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8856 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8857 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8858else
8859
81ecdfbb 8860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8861/* end confdefs.h. */
8862
6c7a06a3
TT
8863#include <stdlib.h>
8864#include <iconv.h>
8865extern
b4e70030 8866#ifdef __cplusplus
6c7a06a3 8867"C"
b4e70030 8868#endif
6c7a06a3
TT
8869#if defined(__STDC__) || defined(__cplusplus)
8870size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8871#else
8872size_t iconv();
8873#endif
8874
b4e70030
JB
8875int
8876main ()
8877{
6c7a06a3 8878
b4e70030
JB
8879 ;
8880 return 0;
8881}
8882_ACEOF
81ecdfbb 8883if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8884 am_cv_proto_iconv_arg1=""
4e8d927d 8885else
81ecdfbb 8886 am_cv_proto_iconv_arg1="const"
b4e70030 8887fi
81ecdfbb 8888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8889 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);"
8890fi
8891
8892 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8894 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8895$as_echo "${ac_t:-
8896 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8897
8898cat >>confdefs.h <<_ACEOF
8899#define ICONV_CONST $am_cv_proto_iconv_arg1
8900_ACEOF
8901
8902 fi
6c7a06a3
TT
8903
8904
478aac75
DE
8905# GDB may fork/exec the iconv program to get the list of supported character
8906# sets. Allow the user to specify where to find it.
8907# There are several factors affecting the choice of option name:
8908# - There is already --with-libiconv-prefix but we can't use it, it specifies
8909# the build-time location of libiconv files.
8910# - The program we need to find is iconv, which comes with glibc. The user
8911# doesn't necessarily have libiconv installed. Therefore naming this
8912# --with-libiconv-foo feels wrong.
8913# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8914# defined to work on directories not files (though it really doesn't know
8915# the difference).
8916# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8917# with --with-libiconv-prefix.
8918# Putting these together is why the option name is --with-iconv-bin.
8919
8920
8921# Check whether --with-iconv-bin was given.
8922if test "${with_iconv_bin+set}" = set; then :
8923 withval=$with_iconv_bin; iconv_bin="${withval}"
8924
8925cat >>confdefs.h <<_ACEOF
8926#define ICONV_BIN "${iconv_bin}"
8927_ACEOF
8928
8929
8930 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8931 if test "x$prefix" = xNONE; then
8932 test_prefix=/usr/local
8933 else
8934 test_prefix=$prefix
8935 fi
8936 else
8937 test_prefix=$exec_prefix
8938 fi
8939 value=0
8940 case ${iconv_bin} in
8941 "${test_prefix}"|"${test_prefix}/"*|\
8942 '${exec_prefix}'|'${exec_prefix}/'*)
8943 value=1
8944 ;;
8945 esac
8946
8947cat >>confdefs.h <<_ACEOF
8948#define ICONV_BIN_RELOCATABLE $value
8949_ACEOF
8950
8951
8952
8953fi
8954
8955
cb01cfba 8956# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8957if test x"$enable_tui" != xno; then
cb01cfba
JB
8958 prefer_curses=yes
8959fi
8960
8961curses_found=no
8962if test x"$prefer_curses" = xyes; then
8963 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8964 # curses library because the latter might not provide all the
8965 # functionality we need. However, this leads to problems on systems
8966 # where the linker searches /usr/local/lib, but the compiler doesn't
8967 # search /usr/local/include, if ncurses is installed in /usr/local. A
8968 # default installation of ncurses on alpha*-dec-osf* will lead to such
8969 # a situation.
81ecdfbb
RW
8970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8971$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8972if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8973 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8974else
8975 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8977/* end confdefs.h. */
8978
81ecdfbb
RW
8979/* Override any GCC internal prototype to avoid an error.
8980 Use char because int might match the return type of a GCC
8981 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8982#ifdef __cplusplus
8983extern "C"
8984#endif
6c7a06a3
TT
8985char waddstr ();
8986int
8987main ()
8988{
81ecdfbb 8989return waddstr ();
6c7a06a3
TT
8990 ;
8991 return 0;
8992}
8993_ACEOF
5007d765 8994for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8995 if test -z "$ac_lib"; then
8996 ac_res="none required"
8997 else
8998 ac_res=-l$ac_lib
8999 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9000 fi
9001 if ac_fn_c_try_link "$LINENO"; then :
9002 ac_cv_search_waddstr=$ac_res
9003fi
9004rm -f core conftest.err conftest.$ac_objext \
9005 conftest$ac_exeext
d0ac1c44 9006 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
9007 break
9008fi
9009done
d0ac1c44 9010if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 9011
6c7a06a3 9012else
81ecdfbb
RW
9013 ac_cv_search_waddstr=no
9014fi
9015rm conftest.$ac_ext
9016LIBS=$ac_func_search_save_LIBS
9017fi
9018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9019$as_echo "$ac_cv_search_waddstr" >&6; }
9020ac_res=$ac_cv_search_waddstr
9021if test "$ac_res" != no; then :
9022 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9023
9024fi
9025
9026
cb01cfba
JB
9027 if test "$ac_cv_search_waddstr" != no; then
9028 curses_found=yes
9029 fi
9030fi
9031
9032# Check whether we should enable the TUI, but only do so if we really
9033# can.
9034if test x"$enable_tui" != xno; then
0ad6b8ee 9035 if test -d "$srcdir/tui"; then
cb01cfba 9036 if test "$curses_found" != no; then
6c7a06a3
TT
9037 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9038 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9039 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9040 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
9041 else
9042 if test x"$enable_tui" = xyes; then
d0ac1c44 9043 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9044 else
81ecdfbb
RW
9045 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9046$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9047 fi
9048 fi
9049 fi
9050fi
9051
9052# Since GDB uses Readline, we need termcap functionality. In many
9053# cases this will be provided by the curses library, but some systems
96fe4562 9054# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
9055
9056case $host_os in
9057 cygwin*)
0ad6b8ee 9058 if test -d "$srcdir/libtermcap"; then
6c7a06a3
TT
9059 LIBS="../libtermcap/libtermcap.a $LIBS"
9060 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9061 fi ;;
9062 go32* | *djgpp*)
9063 ac_cv_search_tgetent="none required"
9064 ;;
6c7a06a3
TT
9065esac
9066
9067# These are the libraries checked by Readline.
81ecdfbb
RW
9068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9069$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 9070if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 9071 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9072else
9073 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9075/* end confdefs.h. */
9076
81ecdfbb
RW
9077/* Override any GCC internal prototype to avoid an error.
9078 Use char because int might match the return type of a GCC
9079 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9080#ifdef __cplusplus
9081extern "C"
9082#endif
6c7a06a3
TT
9083char tgetent ();
9084int
9085main ()
9086{
81ecdfbb 9087return tgetent ();
6c7a06a3
TT
9088 ;
9089 return 0;
9090}
9091_ACEOF
2578ecb1 9092for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9093 if test -z "$ac_lib"; then
9094 ac_res="none required"
9095 else
9096 ac_res=-l$ac_lib
6c7a06a3 9097 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9098 fi
9099 if ac_fn_c_try_link "$LINENO"; then :
9100 ac_cv_search_tgetent=$ac_res
9101fi
9102rm -f core conftest.err conftest.$ac_objext \
9103 conftest$ac_exeext
d0ac1c44 9104 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9105 break
9106fi
9107done
d0ac1c44 9108if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9109
6c7a06a3 9110else
81ecdfbb 9111 ac_cv_search_tgetent=no
6c7a06a3 9112fi
81ecdfbb 9113rm conftest.$ac_ext
6c7a06a3
TT
9114LIBS=$ac_func_search_save_LIBS
9115fi
81ecdfbb
RW
9116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9117$as_echo "$ac_cv_search_tgetent" >&6; }
9118ac_res=$ac_cv_search_tgetent
9119if test "$ac_res" != no; then :
9120 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9121
06825bd1
MK
9122fi
9123
06825bd1 9124
bec39cab 9125if test "$ac_cv_search_tgetent" = no; then
7a85168d 9126 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9127fi
9128
3841debe 9129
81ecdfbb
RW
9130# Check whether --with-system-readline was given.
9131if test "${with_system_readline+set}" = set; then :
9132 withval=$with_system_readline;
9133fi
6a30b0a5 9134
6a30b0a5
AS
9135
9136if test "$with_system_readline" = yes; then
86c6b807
TT
9137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9138$as_echo_n "checking whether system readline is new enough... " >&6; }
9139if ${gdb_cv_readline_ok+:} false; then :
9140 $as_echo_n "(cached) " >&6
9141else
9142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9143/* end confdefs.h. */
9144#include <stdio.h>
9145#include <readline/readline.h>
9146int
9147main ()
9148{
9149#if RL_VERSION_MAJOR < 7
9150# error "readline version 7 required"
9151#endif
9152 ;
9153 return 0;
9154}
9155_ACEOF
9156if ac_fn_c_try_compile "$LINENO"; then :
9157 gdb_cv_readline_ok=yes
9158else
9159 gdb_cv_readline_ok=no
9160fi
9161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9162fi
9163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9164$as_echo "$gdb_cv_readline_ok" >&6; }
9165 if test "$gdb_cv_readline_ok" != yes; then
9166 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9167 fi
9168
6a30b0a5
AS
9169 READLINE=-lreadline
9170 READLINE_DEPS=
9171 READLINE_CFLAGS=
39037522 9172 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9173else
9174 READLINE='$(READLINE_DIR)/libreadline.a'
9175 READLINE_DEPS='$(READLINE)'
9176 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9177 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9178fi
9179
9180
9181
9182
9183
f997c383
SD
9184# Generate jit-reader.h
9185
9186# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9187TARGET_PTR=
9188
9189# The cast to long int works around a bug in the HP C Compiler
9190# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9191# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9192# This bug is HP SR number 8606223364.
9193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9194$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9195if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9196 $as_echo_n "(cached) " >&6
9197else
9198 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9199
9200else
9201 if test "$ac_cv_type_unsigned_long_long" = yes; then
9202 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9203$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9204as_fn_error 77 "cannot compute sizeof (unsigned long long)
9205See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9206 else
9207 ac_cv_sizeof_unsigned_long_long=0
9208 fi
9209fi
9210
9211fi
9212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9213$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9214
9215
9216
9217cat >>confdefs.h <<_ACEOF
9218#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9219_ACEOF
9220
9221
9222# The cast to long int works around a bug in the HP C Compiler
9223# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9224# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9225# This bug is HP SR number 8606223364.
9226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9227$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9228if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9229 $as_echo_n "(cached) " >&6
9230else
9231 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9232
9233else
9234 if test "$ac_cv_type_unsigned_long" = yes; then
9235 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9236$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9237as_fn_error 77 "cannot compute sizeof (unsigned long)
9238See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9239 else
9240 ac_cv_sizeof_unsigned_long=0
9241 fi
9242fi
9243
9244fi
9245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9246$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9247
9248
9249
9250cat >>confdefs.h <<_ACEOF
9251#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9252_ACEOF
9253
9254
9255# The cast to long int works around a bug in the HP C Compiler
9256# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9257# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9258# This bug is HP SR number 8606223364.
9259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9260$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9261if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9262 $as_echo_n "(cached) " >&6
9263else
9264 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9265
9266else
9267 if test "$ac_cv_type_unsigned___int128" = yes; then
9268 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9269$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9270as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9271See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9272 else
9273 ac_cv_sizeof_unsigned___int128=0
9274 fi
9275fi
9276
9277fi
9278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9279$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9280
9281
9282
9283cat >>confdefs.h <<_ACEOF
9284#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9285_ACEOF
9286
9287
9288
9289if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9290 TARGET_PTR="unsigned long"
9291elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9292 TARGET_PTR="unsigned long long"
9293elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9294 TARGET_PTR="unsigned __int128"
9295else
9296 TARGET_PTR="unsigned long"
9297fi
9298
9299
9300ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9301
9302
a2d08b9e
SD
9303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9304$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9305if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9306 $as_echo_n "(cached) " >&6
9307else
9308 ac_func_search_save_LIBS=$LIBS
9309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9310/* end confdefs.h. */
9311
9312/* Override any GCC internal prototype to avoid an error.
9313 Use char because int might match the return type of a GCC
9314 builtin and then its argument prototype would still apply. */
9315#ifdef __cplusplus
9316extern "C"
9317#endif
9318char dlopen ();
9319int
9320main ()
9321{
9322return dlopen ();
9323 ;
9324 return 0;
9325}
9326_ACEOF
9327for ac_lib in '' dl; do
9328 if test -z "$ac_lib"; then
9329 ac_res="none required"
9330 else
9331 ac_res=-l$ac_lib
9332 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9333 fi
9334 if ac_fn_c_try_link "$LINENO"; then :
9335 ac_cv_search_dlopen=$ac_res
9336fi
9337rm -f core conftest.err conftest.$ac_objext \
9338 conftest$ac_exeext
d0ac1c44 9339 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9340 break
9341fi
9342done
d0ac1c44 9343if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9344
9345else
9346 ac_cv_search_dlopen=no
9347fi
9348rm conftest.$ac_ext
9349LIBS=$ac_func_search_save_LIBS
9350fi
9351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9352$as_echo "$ac_cv_search_dlopen" >&6; }
9353ac_res=$ac_cv_search_dlopen
9354if test "$ac_res" != no; then :
9355 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9356
9357fi
9358
9359
39037522 9360
b8e0a31c
SD
9361
9362# Check whether --with-jit-reader-dir was given.
9363if test "${with_jit_reader_dir+set}" = set; then :
9364 withval=$with_jit_reader_dir;
9365 JIT_READER_DIR=$withval
9366else
9367 JIT_READER_DIR=${libdir}/gdb
9368fi
9369
9370
9371 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9372 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9373 ac_define_dir=`eval echo $JIT_READER_DIR`
9374 ac_define_dir=`eval echo $ac_define_dir`
9375
9376cat >>confdefs.h <<_ACEOF
9377#define JIT_READER_DIR "$ac_define_dir"
9378_ACEOF
9379
9380
9381
9382
9383 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9384 if test "x$prefix" = xNONE; then
9385 test_prefix=/usr/local
9386 else
9387 test_prefix=$prefix
9388 fi
9389 else
9390 test_prefix=$exec_prefix
9391 fi
9392 value=0
9393 case ${ac_define_dir} in
9394 "${test_prefix}"|"${test_prefix}/"*|\
9395 '${exec_prefix}'|'${exec_prefix}/'*)
9396 value=1
9397 ;;
9398 esac
9399
9400cat >>confdefs.h <<_ACEOF
9401#define JIT_READER_DIR_RELOCATABLE $value
9402_ACEOF
9403
9404
9405
9406
9407
81ecdfbb
RW
9408# Check whether --with-expat was given.
9409if test "${with_expat+set}" = set; then :
9410 withval=$with_expat;
5c39566f
DJ
9411else
9412 with_expat=auto
81ecdfbb
RW
9413fi
9414
9415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9416$as_echo_n "checking whether to use expat... " >&6; }
9417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9418$as_echo "$with_expat" >&6; }
5c39566f
DJ
9419
9420if test "${with_expat}" = no; then
81ecdfbb
RW
9421 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9422$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9423 HAVE_LIBEXPAT=no
9424else
9425
3841debe
DJ
9426
9427
9428
9429
9430
9431
9432
9433 use_additional=yes
9434
9435 acl_save_prefix="$prefix"
9436 prefix="$acl_final_prefix"
9437 acl_save_exec_prefix="$exec_prefix"
9438 exec_prefix="$acl_final_exec_prefix"
9439
9440 eval additional_includedir=\"$includedir\"
9441 eval additional_libdir=\"$libdir\"
9442
9443 exec_prefix="$acl_save_exec_prefix"
9444 prefix="$acl_save_prefix"
9445
9446
81ecdfbb
RW
9447# Check whether --with-libexpat-prefix was given.
9448if test "${with_libexpat_prefix+set}" = set; then :
9449 withval=$with_libexpat_prefix;
3841debe
DJ
9450 if test "X$withval" = "Xno"; then
9451 use_additional=no
9452 else
9453 if test "X$withval" = "X"; then
9454
9455 acl_save_prefix="$prefix"
9456 prefix="$acl_final_prefix"
9457 acl_save_exec_prefix="$exec_prefix"
9458 exec_prefix="$acl_final_exec_prefix"
9459
9460 eval additional_includedir=\"$includedir\"
9461 eval additional_libdir=\"$libdir\"
9462
9463 exec_prefix="$acl_save_exec_prefix"
9464 prefix="$acl_save_prefix"
9465
9466 else
9467 additional_includedir="$withval/include"
9468 additional_libdir="$withval/lib"
9469 fi
9470 fi
9471
81ecdfbb
RW
9472fi
9473
3841debe
DJ
9474 LIBEXPAT=
9475 LTLIBEXPAT=
9476 INCEXPAT=
9477 rpathdirs=
9478 ltrpathdirs=
9479 names_already_handled=
9480 names_next_round='expat '
9481 while test -n "$names_next_round"; do
9482 names_this_round="$names_next_round"
9483 names_next_round=
9484 for name in $names_this_round; do
9485 already_handled=
9486 for n in $names_already_handled; do
9487 if test "$n" = "$name"; then
9488 already_handled=yes
9489 break
9490 fi
9491 done
9492 if test -z "$already_handled"; then
9493 names_already_handled="$names_already_handled $name"
9494 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9495 eval value=\"\$HAVE_LIB$uppername\"
9496 if test -n "$value"; then
9497 if test "$value" = yes; then
9498 eval value=\"\$LIB$uppername\"
9499 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9500 eval value=\"\$LTLIB$uppername\"
9501 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9502 else
9503 :
9504 fi
9505 else
9506 found_dir=
9507 found_la=
9508 found_so=
9509 found_a=
9510 if test $use_additional = yes; then
9511 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9512 found_dir="$additional_libdir"
9513 found_so="$additional_libdir/lib$name.$shlibext"
9514 if test -f "$additional_libdir/lib$name.la"; then
9515 found_la="$additional_libdir/lib$name.la"
9516 fi
9517 else
9518 if test -f "$additional_libdir/lib$name.$libext"; then
9519 found_dir="$additional_libdir"
9520 found_a="$additional_libdir/lib$name.$libext"
9521 if test -f "$additional_libdir/lib$name.la"; then
9522 found_la="$additional_libdir/lib$name.la"
9523 fi
9524 fi
9525 fi
9526 fi
9527 if test "X$found_dir" = "X"; then
9528 for x in $LDFLAGS $LTLIBEXPAT; do
9529
9530 acl_save_prefix="$prefix"
9531 prefix="$acl_final_prefix"
9532 acl_save_exec_prefix="$exec_prefix"
9533 exec_prefix="$acl_final_exec_prefix"
9534 eval x=\"$x\"
9535 exec_prefix="$acl_save_exec_prefix"
9536 prefix="$acl_save_prefix"
9537
9538 case "$x" in
9539 -L*)
9540 dir=`echo "X$x" | sed -e 's/^X-L//'`
9541 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9542 found_dir="$dir"
9543 found_so="$dir/lib$name.$shlibext"
9544 if test -f "$dir/lib$name.la"; then
9545 found_la="$dir/lib$name.la"
9546 fi
9547 else
9548 if test -f "$dir/lib$name.$libext"; then
9549 found_dir="$dir"
9550 found_a="$dir/lib$name.$libext"
9551 if test -f "$dir/lib$name.la"; then
9552 found_la="$dir/lib$name.la"
9553 fi
9554 fi
9555 fi
9556 ;;
9557 esac
9558 if test "X$found_dir" != "X"; then
9559 break
9560 fi
9561 done
9562 fi
9563 if test "X$found_dir" != "X"; then
9564 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9565 if test "X$found_so" != "X"; then
9566 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9567 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9568 else
9569 haveit=
9570 for x in $ltrpathdirs; do
9571 if test "X$x" = "X$found_dir"; then
9572 haveit=yes
9573 break
9574 fi
9575 done
9576 if test -z "$haveit"; then
9577 ltrpathdirs="$ltrpathdirs $found_dir"
9578 fi
9579 if test "$hardcode_direct" = yes; then
9580 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9581 else
9582 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9583 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9584 haveit=
9585 for x in $rpathdirs; do
9586 if test "X$x" = "X$found_dir"; then
9587 haveit=yes
9588 break
9589 fi
9590 done
9591 if test -z "$haveit"; then
9592 rpathdirs="$rpathdirs $found_dir"
9593 fi
9594 else
9595 haveit=
9596 for x in $LDFLAGS $LIBEXPAT; do
9597
9598 acl_save_prefix="$prefix"
9599 prefix="$acl_final_prefix"
9600 acl_save_exec_prefix="$exec_prefix"
9601 exec_prefix="$acl_final_exec_prefix"
9602 eval x=\"$x\"
9603 exec_prefix="$acl_save_exec_prefix"
9604 prefix="$acl_save_prefix"
9605
9606 if test "X$x" = "X-L$found_dir"; then
9607 haveit=yes
9608 break
9609 fi
9610 done
9611 if test -z "$haveit"; then
9612 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9613 fi
9614 if test "$hardcode_minus_L" != no; then
9615 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9616 else
9617 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9618 fi
9619 fi
9620 fi
9621 fi
9622 else
9623 if test "X$found_a" != "X"; then
9624 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9625 else
9626 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9627 fi
9628 fi
9629 additional_includedir=
9630 case "$found_dir" in
9631 */lib | */lib/)
9632 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9633 additional_includedir="$basedir/include"
9634 ;;
9635 esac
9636 if test "X$additional_includedir" != "X"; then
9637 if test "X$additional_includedir" != "X/usr/include"; then
9638 haveit=
9639 if test "X$additional_includedir" = "X/usr/local/include"; then
9640 if test -n "$GCC"; then
9641 case $host_os in
9642 linux*) haveit=yes;;
9643 esac
9644 fi
9645 fi
9646 if test -z "$haveit"; then
9647 for x in $CPPFLAGS $INCEXPAT; do
9648
9649 acl_save_prefix="$prefix"
9650 prefix="$acl_final_prefix"
9651 acl_save_exec_prefix="$exec_prefix"
9652 exec_prefix="$acl_final_exec_prefix"
9653 eval x=\"$x\"
9654 exec_prefix="$acl_save_exec_prefix"
9655 prefix="$acl_save_prefix"
9656
9657 if test "X$x" = "X-I$additional_includedir"; then
9658 haveit=yes
9659 break
9660 fi
9661 done
9662 if test -z "$haveit"; then
9663 if test -d "$additional_includedir"; then
9664 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9665 fi
9666 fi
9667 fi
9668 fi
9669 fi
9670 if test -n "$found_la"; then
9671 save_libdir="$libdir"
9672 case "$found_la" in
9673 */* | *\\*) . "$found_la" ;;
9674 *) . "./$found_la" ;;
9675 esac
9676 libdir="$save_libdir"
9677 for dep in $dependency_libs; do
9678 case "$dep" in
9679 -L*)
9680 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9681 if test "X$additional_libdir" != "X/usr/lib"; then
9682 haveit=
9683 if test "X$additional_libdir" = "X/usr/local/lib"; then
9684 if test -n "$GCC"; then
9685 case $host_os in
9686 linux*) haveit=yes;;
9687 esac
9688 fi
9689 fi
9690 if test -z "$haveit"; then
9691 haveit=
9692 for x in $LDFLAGS $LIBEXPAT; do
9693
9694 acl_save_prefix="$prefix"
9695 prefix="$acl_final_prefix"
9696 acl_save_exec_prefix="$exec_prefix"
9697 exec_prefix="$acl_final_exec_prefix"
9698 eval x=\"$x\"
9699 exec_prefix="$acl_save_exec_prefix"
9700 prefix="$acl_save_prefix"
9701
9702 if test "X$x" = "X-L$additional_libdir"; then
9703 haveit=yes
9704 break
9705 fi
9706 done
9707 if test -z "$haveit"; then
9708 if test -d "$additional_libdir"; then
9709 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9710 fi
9711 fi
9712 haveit=
9713 for x in $LDFLAGS $LTLIBEXPAT; do
9714
9715 acl_save_prefix="$prefix"
9716 prefix="$acl_final_prefix"
9717 acl_save_exec_prefix="$exec_prefix"
9718 exec_prefix="$acl_final_exec_prefix"
9719 eval x=\"$x\"
9720 exec_prefix="$acl_save_exec_prefix"
9721 prefix="$acl_save_prefix"
9722
9723 if test "X$x" = "X-L$additional_libdir"; then
9724 haveit=yes
9725 break
9726 fi
9727 done
9728 if test -z "$haveit"; then
9729 if test -d "$additional_libdir"; then
9730 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9731 fi
9732 fi
9733 fi
9734 fi
9735 ;;
9736 -R*)
9737 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9738 if test "$enable_rpath" != no; then
9739 haveit=
9740 for x in $rpathdirs; do
9741 if test "X$x" = "X$dir"; then
9742 haveit=yes
9743 break
9744 fi
9745 done
9746 if test -z "$haveit"; then
9747 rpathdirs="$rpathdirs $dir"
9748 fi
9749 haveit=
9750 for x in $ltrpathdirs; do
9751 if test "X$x" = "X$dir"; then
9752 haveit=yes
9753 break
9754 fi
9755 done
9756 if test -z "$haveit"; then
9757 ltrpathdirs="$ltrpathdirs $dir"
9758 fi
9759 fi
9760 ;;
9761 -l*)
9762 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9763 ;;
9764 *.la)
9765 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9766 ;;
9767 *)
9768 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9769 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9770 ;;
81ecdfbb
RW
9771 esac
9772 done
9773 fi
9774 else
9775 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9776 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9777 fi
9778 fi
9779 fi
9780 done
9781 done
9782 if test "X$rpathdirs" != "X"; then
9783 if test -n "$hardcode_libdir_separator"; then
9784 alldirs=
9785 for found_dir in $rpathdirs; do
9786 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9787 done
9788 acl_save_libdir="$libdir"
9789 libdir="$alldirs"
9790 eval flag=\"$hardcode_libdir_flag_spec\"
9791 libdir="$acl_save_libdir"
9792 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9793 else
9794 for found_dir in $rpathdirs; do
9795 acl_save_libdir="$libdir"
9796 libdir="$found_dir"
9797 eval flag=\"$hardcode_libdir_flag_spec\"
9798 libdir="$acl_save_libdir"
9799 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9800 done
9801 fi
9802 fi
9803 if test "X$ltrpathdirs" != "X"; then
9804 for found_dir in $ltrpathdirs; do
9805 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9806 done
9807 fi
a9322a30
TT
9808
9809
81ecdfbb 9810 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9811
81ecdfbb
RW
9812 for element in $INCEXPAT; do
9813 haveit=
9814 for x in $CPPFLAGS; do
a9322a30 9815
81ecdfbb
RW
9816 acl_save_prefix="$prefix"
9817 prefix="$acl_final_prefix"
9818 acl_save_exec_prefix="$exec_prefix"
9819 exec_prefix="$acl_final_exec_prefix"
9820 eval x=\"$x\"
9821 exec_prefix="$acl_save_exec_prefix"
9822 prefix="$acl_save_prefix"
a8111142 9823
81ecdfbb
RW
9824 if test "X$x" = "X$element"; then
9825 haveit=yes
9826 break
9827 fi
9828 done
9829 if test -z "$haveit"; then
9830 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9831 fi
9832 done
a9322a30
TT
9833
9834
81ecdfbb
RW
9835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9836$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9837if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9838 $as_echo_n "(cached) " >&6
bec39cab 9839else
bec39cab 9840
81ecdfbb
RW
9841 ac_save_LIBS="$LIBS"
9842 LIBS="$LIBS $LIBEXPAT"
9843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9844/* end confdefs.h. */
81ecdfbb
RW
9845#include "expat.h"
9846int
9847main ()
9848{
9849XML_Parser p = XML_ParserCreate (0);
9850 ;
9851 return 0;
9852}
bec39cab 9853_ACEOF
81ecdfbb
RW
9854if ac_fn_c_try_link "$LINENO"; then :
9855 ac_cv_libexpat=yes
c906108c 9856else
81ecdfbb 9857 ac_cv_libexpat=no
bec39cab 9858fi
81ecdfbb
RW
9859rm -f core conftest.err conftest.$ac_objext \
9860 conftest$ac_exeext conftest.$ac_ext
9861 LIBS="$ac_save_LIBS"
c906108c 9862
95ca63c4 9863fi
81ecdfbb
RW
9864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9865$as_echo "$ac_cv_libexpat" >&6; }
9866 if test "$ac_cv_libexpat" = yes; then
9867 HAVE_LIBEXPAT=yes
bec39cab 9868
81ecdfbb 9869$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9870
81ecdfbb
RW
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9872$as_echo_n "checking how to link with libexpat... " >&6; }
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9874$as_echo "$LIBEXPAT" >&6; }
9875 else
9876 HAVE_LIBEXPAT=no
9877 CPPFLAGS="$ac_save_CPPFLAGS"
9878 LIBEXPAT=
9879 LTLIBEXPAT=
9880 fi
95ca63c4
CF
9881
9882
9883
7cb9022a
MK
9884
9885
bec39cab 9886
81ecdfbb
RW
9887 if test "$HAVE_LIBEXPAT" != yes; then
9888 if test "$with_expat" = yes; then
d0ac1c44 9889 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9890 else
9891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9892$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9893 fi
9894 else
9895 save_LIBS=$LIBS
9896 LIBS="$LIBS $LIBEXPAT"
9897 for ac_func in XML_StopParser
9898do :
9899 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9900if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9901 cat >>confdefs.h <<_ACEOF
81ecdfbb 9902#define HAVE_XML_STOPPARSER 1
bec39cab 9903_ACEOF
95ca63c4 9904
bec39cab 9905fi
bec39cab 9906done
95ca63c4 9907
81ecdfbb
RW
9908 LIBS=$save_LIBS
9909 fi
a9322a30
TT
9910fi
9911
2400729e
UW
9912
9913# Check whether --with-mpfr was given.
9914if test "${with_mpfr+set}" = set; then :
9915 withval=$with_mpfr;
9916else
9917 with_mpfr=auto
9918fi
9919
9920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9921$as_echo_n "checking whether to use MPFR... " >&6; }
9922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9923$as_echo "$with_mpfr" >&6; }
9924
9925if test "${with_mpfr}" = no; then
9926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9927$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9928 HAVE_LIBMPFR=no
9929else
9930
9931
9932
9933
9934
9935
9936
9937
9938 use_additional=yes
9939
9940 acl_save_prefix="$prefix"
9941 prefix="$acl_final_prefix"
9942 acl_save_exec_prefix="$exec_prefix"
9943 exec_prefix="$acl_final_exec_prefix"
9944
9945 eval additional_includedir=\"$includedir\"
9946 eval additional_libdir=\"$libdir\"
9947
9948 exec_prefix="$acl_save_exec_prefix"
9949 prefix="$acl_save_prefix"
9950
9951
9952# Check whether --with-libmpfr-prefix was given.
9953if test "${with_libmpfr_prefix+set}" = set; then :
9954 withval=$with_libmpfr_prefix;
9955 if test "X$withval" = "Xno"; then
9956 use_additional=no
9957 else
9958 if test "X$withval" = "X"; then
9959
9960 acl_save_prefix="$prefix"
9961 prefix="$acl_final_prefix"
9962 acl_save_exec_prefix="$exec_prefix"
9963 exec_prefix="$acl_final_exec_prefix"
9964
9965 eval additional_includedir=\"$includedir\"
9966 eval additional_libdir=\"$libdir\"
9967
9968 exec_prefix="$acl_save_exec_prefix"
9969 prefix="$acl_save_prefix"
9970
9971 else
9972 additional_includedir="$withval/include"
9973 additional_libdir="$withval/lib"
9974 fi
9975 fi
9976
9977fi
9978
9979 LIBMPFR=
9980 LTLIBMPFR=
9981 INCMPFR=
9982 rpathdirs=
9983 ltrpathdirs=
9984 names_already_handled=
da658607 9985 names_next_round='mpfr gmp'
2400729e
UW
9986 while test -n "$names_next_round"; do
9987 names_this_round="$names_next_round"
9988 names_next_round=
9989 for name in $names_this_round; do
9990 already_handled=
9991 for n in $names_already_handled; do
9992 if test "$n" = "$name"; then
9993 already_handled=yes
9994 break
9995 fi
9996 done
9997 if test -z "$already_handled"; then
9998 names_already_handled="$names_already_handled $name"
9999 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10000 eval value=\"\$HAVE_LIB$uppername\"
10001 if test -n "$value"; then
10002 if test "$value" = yes; then
10003 eval value=\"\$LIB$uppername\"
10004 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10005 eval value=\"\$LTLIB$uppername\"
10006 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10007 else
10008 :
10009 fi
10010 else
10011 found_dir=
10012 found_la=
10013 found_so=
10014 found_a=
10015 if test $use_additional = yes; then
10016 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10017 found_dir="$additional_libdir"
10018 found_so="$additional_libdir/lib$name.$shlibext"
10019 if test -f "$additional_libdir/lib$name.la"; then
10020 found_la="$additional_libdir/lib$name.la"
10021 fi
10022 else
10023 if test -f "$additional_libdir/lib$name.$libext"; then
10024 found_dir="$additional_libdir"
10025 found_a="$additional_libdir/lib$name.$libext"
10026 if test -f "$additional_libdir/lib$name.la"; then
10027 found_la="$additional_libdir/lib$name.la"
10028 fi
10029 fi
10030 fi
10031 fi
10032 if test "X$found_dir" = "X"; then
10033 for x in $LDFLAGS $LTLIBMPFR; do
10034
10035 acl_save_prefix="$prefix"
10036 prefix="$acl_final_prefix"
10037 acl_save_exec_prefix="$exec_prefix"
10038 exec_prefix="$acl_final_exec_prefix"
10039 eval x=\"$x\"
10040 exec_prefix="$acl_save_exec_prefix"
10041 prefix="$acl_save_prefix"
10042
10043 case "$x" in
10044 -L*)
10045 dir=`echo "X$x" | sed -e 's/^X-L//'`
10046 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10047 found_dir="$dir"
10048 found_so="$dir/lib$name.$shlibext"
10049 if test -f "$dir/lib$name.la"; then
10050 found_la="$dir/lib$name.la"
10051 fi
10052 else
10053 if test -f "$dir/lib$name.$libext"; then
10054 found_dir="$dir"
10055 found_a="$dir/lib$name.$libext"
10056 if test -f "$dir/lib$name.la"; then
10057 found_la="$dir/lib$name.la"
10058 fi
10059 fi
10060 fi
10061 ;;
10062 esac
10063 if test "X$found_dir" != "X"; then
10064 break
10065 fi
10066 done
10067 fi
10068 if test "X$found_dir" != "X"; then
10069 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10070 if test "X$found_so" != "X"; then
10071 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10072 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10073 else
10074 haveit=
10075 for x in $ltrpathdirs; do
10076 if test "X$x" = "X$found_dir"; then
10077 haveit=yes
10078 break
10079 fi
10080 done
10081 if test -z "$haveit"; then
10082 ltrpathdirs="$ltrpathdirs $found_dir"
10083 fi
10084 if test "$hardcode_direct" = yes; then
10085 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10086 else
10087 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10088 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10089 haveit=
10090 for x in $rpathdirs; do
10091 if test "X$x" = "X$found_dir"; then
10092 haveit=yes
10093 break
10094 fi
10095 done
10096 if test -z "$haveit"; then
10097 rpathdirs="$rpathdirs $found_dir"
10098 fi
10099 else
10100 haveit=
10101 for x in $LDFLAGS $LIBMPFR; do
10102
10103 acl_save_prefix="$prefix"
10104 prefix="$acl_final_prefix"
10105 acl_save_exec_prefix="$exec_prefix"
10106 exec_prefix="$acl_final_exec_prefix"
10107 eval x=\"$x\"
10108 exec_prefix="$acl_save_exec_prefix"
10109 prefix="$acl_save_prefix"
10110
10111 if test "X$x" = "X-L$found_dir"; then
10112 haveit=yes
10113 break
10114 fi
10115 done
10116 if test -z "$haveit"; then
10117 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10118 fi
10119 if test "$hardcode_minus_L" != no; then
10120 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10121 else
10122 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10123 fi
10124 fi
10125 fi
10126 fi
10127 else
10128 if test "X$found_a" != "X"; then
10129 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10130 else
10131 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10132 fi
10133 fi
10134 additional_includedir=
10135 case "$found_dir" in
10136 */lib | */lib/)
10137 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10138 additional_includedir="$basedir/include"
10139 ;;
10140 esac
10141 if test "X$additional_includedir" != "X"; then
10142 if test "X$additional_includedir" != "X/usr/include"; then
10143 haveit=
10144 if test "X$additional_includedir" = "X/usr/local/include"; then
10145 if test -n "$GCC"; then
10146 case $host_os in
10147 linux*) haveit=yes;;
10148 esac
10149 fi
10150 fi
10151 if test -z "$haveit"; then
10152 for x in $CPPFLAGS $INCMPFR; do
10153
10154 acl_save_prefix="$prefix"
10155 prefix="$acl_final_prefix"
10156 acl_save_exec_prefix="$exec_prefix"
10157 exec_prefix="$acl_final_exec_prefix"
10158 eval x=\"$x\"
10159 exec_prefix="$acl_save_exec_prefix"
10160 prefix="$acl_save_prefix"
10161
10162 if test "X$x" = "X-I$additional_includedir"; then
10163 haveit=yes
10164 break
10165 fi
10166 done
10167 if test -z "$haveit"; then
10168 if test -d "$additional_includedir"; then
10169 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10170 fi
10171 fi
10172 fi
10173 fi
10174 fi
10175 if test -n "$found_la"; then
10176 save_libdir="$libdir"
10177 case "$found_la" in
10178 */* | *\\*) . "$found_la" ;;
10179 *) . "./$found_la" ;;
10180 esac
10181 libdir="$save_libdir"
10182 for dep in $dependency_libs; do
10183 case "$dep" in
10184 -L*)
10185 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10186 if test "X$additional_libdir" != "X/usr/lib"; then
10187 haveit=
10188 if test "X$additional_libdir" = "X/usr/local/lib"; then
10189 if test -n "$GCC"; then
10190 case $host_os in
10191 linux*) haveit=yes;;
10192 esac
10193 fi
10194 fi
10195 if test -z "$haveit"; then
10196 haveit=
10197 for x in $LDFLAGS $LIBMPFR; do
10198
10199 acl_save_prefix="$prefix"
10200 prefix="$acl_final_prefix"
10201 acl_save_exec_prefix="$exec_prefix"
10202 exec_prefix="$acl_final_exec_prefix"
10203 eval x=\"$x\"
10204 exec_prefix="$acl_save_exec_prefix"
10205 prefix="$acl_save_prefix"
10206
10207 if test "X$x" = "X-L$additional_libdir"; then
10208 haveit=yes
10209 break
10210 fi
10211 done
10212 if test -z "$haveit"; then
10213 if test -d "$additional_libdir"; then
10214 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10215 fi
10216 fi
10217 haveit=
10218 for x in $LDFLAGS $LTLIBMPFR; do
10219
10220 acl_save_prefix="$prefix"
10221 prefix="$acl_final_prefix"
10222 acl_save_exec_prefix="$exec_prefix"
10223 exec_prefix="$acl_final_exec_prefix"
10224 eval x=\"$x\"
10225 exec_prefix="$acl_save_exec_prefix"
10226 prefix="$acl_save_prefix"
10227
10228 if test "X$x" = "X-L$additional_libdir"; then
10229 haveit=yes
10230 break
10231 fi
10232 done
10233 if test -z "$haveit"; then
10234 if test -d "$additional_libdir"; then
10235 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10236 fi
10237 fi
10238 fi
10239 fi
10240 ;;
10241 -R*)
10242 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10243 if test "$enable_rpath" != no; then
10244 haveit=
10245 for x in $rpathdirs; do
10246 if test "X$x" = "X$dir"; then
10247 haveit=yes
10248 break
10249 fi
10250 done
10251 if test -z "$haveit"; then
10252 rpathdirs="$rpathdirs $dir"
10253 fi
10254 haveit=
10255 for x in $ltrpathdirs; do
10256 if test "X$x" = "X$dir"; then
10257 haveit=yes
10258 break
10259 fi
10260 done
10261 if test -z "$haveit"; then
10262 ltrpathdirs="$ltrpathdirs $dir"
10263 fi
10264 fi
10265 ;;
10266 -l*)
10267 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10268 ;;
10269 *.la)
10270 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10271 ;;
10272 *)
10273 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10274 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10275 ;;
10276 esac
10277 done
10278 fi
10279 else
10280 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10281 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10282 fi
10283 fi
10284 fi
10285 done
10286 done
10287 if test "X$rpathdirs" != "X"; then
10288 if test -n "$hardcode_libdir_separator"; then
10289 alldirs=
10290 for found_dir in $rpathdirs; do
10291 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10292 done
10293 acl_save_libdir="$libdir"
10294 libdir="$alldirs"
10295 eval flag=\"$hardcode_libdir_flag_spec\"
10296 libdir="$acl_save_libdir"
10297 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10298 else
10299 for found_dir in $rpathdirs; do
10300 acl_save_libdir="$libdir"
10301 libdir="$found_dir"
10302 eval flag=\"$hardcode_libdir_flag_spec\"
10303 libdir="$acl_save_libdir"
10304 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10305 done
10306 fi
10307 fi
10308 if test "X$ltrpathdirs" != "X"; then
10309 for found_dir in $ltrpathdirs; do
10310 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10311 done
10312 fi
10313
10314
10315 ac_save_CPPFLAGS="$CPPFLAGS"
10316
10317 for element in $INCMPFR; do
10318 haveit=
10319 for x in $CPPFLAGS; do
10320
10321 acl_save_prefix="$prefix"
10322 prefix="$acl_final_prefix"
10323 acl_save_exec_prefix="$exec_prefix"
10324 exec_prefix="$acl_final_exec_prefix"
10325 eval x=\"$x\"
10326 exec_prefix="$acl_save_exec_prefix"
10327 prefix="$acl_save_prefix"
10328
10329 if test "X$x" = "X$element"; then
10330 haveit=yes
10331 break
10332 fi
10333 done
10334 if test -z "$haveit"; then
10335 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10336 fi
10337 done
10338
10339
10340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10341$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10342if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10343 $as_echo_n "(cached) " >&6
10344else
10345
10346 ac_save_LIBS="$LIBS"
10347 LIBS="$LIBS $LIBMPFR"
10348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10349/* end confdefs.h. */
10350#include <mpfr.h>
10351int
10352main ()
10353{
10354mpfr_exp_t exp; mpfr_t x;
10355 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10356 ;
10357 return 0;
10358}
10359_ACEOF
10360if ac_fn_c_try_link "$LINENO"; then :
10361 ac_cv_libmpfr=yes
10362else
10363 ac_cv_libmpfr=no
10364fi
10365rm -f core conftest.err conftest.$ac_objext \
10366 conftest$ac_exeext conftest.$ac_ext
10367 LIBS="$ac_save_LIBS"
10368
10369fi
10370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10371$as_echo "$ac_cv_libmpfr" >&6; }
10372 if test "$ac_cv_libmpfr" = yes; then
10373 HAVE_LIBMPFR=yes
10374
10375$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10376
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10378$as_echo_n "checking how to link with libmpfr... " >&6; }
10379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10380$as_echo "$LIBMPFR" >&6; }
10381 else
10382 HAVE_LIBMPFR=no
10383 CPPFLAGS="$ac_save_CPPFLAGS"
10384 LIBMPFR=
10385 LTLIBMPFR=
10386 fi
10387
10388
10389
10390
10391
10392
10393 if test "$HAVE_LIBMPFR" != yes; then
10394 if test "$with_mpfr" = yes; then
d0ac1c44 10395 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10396 else
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10398$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10399 fi
10400 fi
10401fi
10402
d344e670
DE
10403# --------------------- #
10404# Check for libpython. #
10405# --------------------- #
10406
a9322a30 10407
a9322a30
TT
10408
10409
ec685c5e 10410
0c4a4063 10411
81ecdfbb
RW
10412# Check whether --with-python was given.
10413if test "${with_python+set}" = set; then :
10414 withval=$with_python;
bec39cab 10415else
81ecdfbb 10416 with_python=auto
bec39cab 10417fi
bec39cab 10418
81ecdfbb
RW
10419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10420$as_echo_n "checking whether to use python... " >&6; }
10421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10422$as_echo "$with_python" >&6; }
9a156167 10423
81ecdfbb
RW
10424if test "${with_python}" = no; then
10425 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10426$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10427 have_libpython=no
bec39cab 10428else
81ecdfbb 10429 case "${with_python}" in
8c85a4e2 10430 [\\/]* | ?:[\\/]*)
0ad6b8ee 10431 if test -d "${with_python}"; then
ec685c5e 10432 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10433 python_prog="${with_python}/bin/python"
0c4a4063 10434 python_prefix=
9c4ea6c5
JB
10435 # If python does not exit ${with_python}/bin, then try in
10436 # ${with_python}. On Windows/MinGW, this is where the Python
10437 # executable is.
10438 if test ! -x "${python_prog}"; then
10439 python_prog="${with_python}/python"
10440 python_prefix=
10441 fi
e7a30f46 10442 if test ! -x "${python_prog}"; then
ec685c5e
DE
10443 # Fall back to gdb 7.0/7.1 behaviour.
10444 python_prog=missing
0c4a4063 10445 python_prefix=${with_python}
ec685c5e 10446 fi
e7a30f46 10447 elif test -x "${with_python}"; then
ec685c5e
DE
10448 # While we can't run python compiled for $host (unless host == build),
10449 # the user could write a script that provides the needed information,
10450 # so we support that.
ec685c5e 10451 python_prog=${with_python}
0c4a4063 10452 python_prefix=
ec685c5e 10453 else
d0ac1c44 10454 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10455 fi
81ecdfbb 10456 ;;
ec685c5e
DE
10457 */*)
10458 # Disallow --with-python=foo/bar.
d0ac1c44 10459 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10460 ;;
ec685c5e
DE
10461 *)
10462 # The user has either specified auto, yes, or the name of the python
10463 # program assumed to be in $PATH.
10464 python_prefix=
10465 case "${with_python}" in
10466 yes | auto)
0ad6b8ee 10467 if test "${build}" = "${host}"; then
ec685c5e
DE
10468 # Extract the first word of "python", so it can be a program name with args.
10469set dummy python; ac_word=$2
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10471$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10472if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10473 $as_echo_n "(cached) " >&6
10474else
10475 case $python_prog_path in
10476 [\\/]* | ?:[\\/]*)
10477 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10478 ;;
10479 *)
10480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10481for as_dir in $PATH
10482do
10483 IFS=$as_save_IFS
10484 test -z "$as_dir" && as_dir=.
10485 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10486 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10487 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10489 break 2
10490 fi
10491done
10492 done
10493IFS=$as_save_IFS
10494
10495 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10496 ;;
10497esac
10498fi
10499python_prog_path=$ac_cv_path_python_prog_path
10500if test -n "$python_prog_path"; then
10501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10502$as_echo "$python_prog_path" >&6; }
10503else
10504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
10506fi
10507
10508
10509 if test "${python_prog_path}" = missing; then
10510 python_prog=missing
10511 else
10512 python_prog=${python_prog_path}
10513 fi
10514 else
10515 # Not much we can do except assume the cross-compiler will find the
10516 # right files.
10517 python_prog=missing
10518 fi
10519 ;;
10520 *)
10521 # While we can't run python compiled for $host (unless host == build),
10522 # the user could write a script that provides the needed information,
10523 # so we support that.
10524 python_prog="${with_python}"
10525 # Extract the first word of "${python_prog}", so it can be a program name with args.
10526set dummy ${python_prog}; ac_word=$2
10527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10528$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10529if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10530 $as_echo_n "(cached) " >&6
10531else
10532 case $python_prog_path in
10533 [\\/]* | ?:[\\/]*)
10534 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10535 ;;
10536 *)
10537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10538for as_dir in $PATH
10539do
10540 IFS=$as_save_IFS
10541 test -z "$as_dir" && as_dir=.
10542 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10543 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10544 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10546 break 2
10547 fi
10548done
10549 done
10550IFS=$as_save_IFS
10551
10552 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10553 ;;
10554esac
10555fi
10556python_prog_path=$ac_cv_path_python_prog_path
10557if test -n "$python_prog_path"; then
10558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10559$as_echo "$python_prog_path" >&6; }
10560else
10561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
10563fi
10564
10565
10566 if test "${python_prog_path}" = missing; then
d0ac1c44 10567 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10568 fi
10569 ;;
10570 esac
81ecdfbb
RW
10571 esac
10572
ec685c5e 10573 if test "${python_prog}" != missing; then
e7a30f46
DE
10574 # We have a python program to use, but it may be too old.
10575 # Don't flag an error for --with-python=auto (the default).
10576 have_python_config=yes
ec685c5e
DE
10577 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10578 if test $? != 0; then
e7a30f46
DE
10579 have_python_config=failed
10580 if test "${with_python}" != auto; then
d0ac1c44 10581 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10582 fi
ec685c5e
DE
10583 fi
10584 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10585 if test $? != 0; then
e7a30f46
DE
10586 have_python_config=failed
10587 if test "${with_python}" != auto; then
d0ac1c44 10588 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10589 fi
ec685c5e 10590 fi
0c4a4063
DE
10591 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10592 if test $? != 0; then
e7a30f46
DE
10593 have_python_config=failed
10594 if test "${with_python}" != auto; then
d0ac1c44 10595 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10596 fi
0c4a4063 10597 fi
ec685c5e 10598 else
ac534cba
JB
10599 # We do not have a python executable we can use to determine where
10600 # to find the Python headers and libs. We cannot guess the include
10601 # path from the python_prefix either, because that include path
10602 # depends on the Python version. So, there is nothing much we can
10603 # do except assume that the compiler will be able to find those files.
10604 python_includes=
10605 python_libs=
0c4a4063 10606 have_python_config=no
ec685c5e 10607 fi
bec39cab 10608
ec685c5e
DE
10609 # If we have python-config, only try the configuration it provides.
10610 # Otherwise fallback on the old way of trying different versions of
10611 # python in turn.
81ecdfbb 10612
ec685c5e
DE
10613 have_libpython=no
10614 if test "${have_python_config}" = yes; then
71737c43 10615
ec685c5e
DE
10616
10617 new_CPPFLAGS=${python_includes}
10618 new_LIBS=${python_libs}
71737c43
CB
10619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10620$as_echo_n "checking for python... " >&6; }
ec685c5e 10621 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10622 save_LIBS=$LIBS
ec685c5e 10623 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10624 LIBS="$new_LIBS $LIBS"
ec685c5e 10625 found_usable_python=no
81ecdfbb 10626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10627/* end confdefs.h. */
ac534cba 10628#include "Python.h"
81ecdfbb
RW
10629int
10630main ()
10631{
10632Py_Initialize ();
10633 ;
10634 return 0;
10635}
bec39cab 10636_ACEOF
81ecdfbb 10637if ac_fn_c_try_link "$LINENO"; then :
71737c43 10638 have_libpython=yes
ec685c5e 10639 found_usable_python=yes
ac534cba
JB
10640 PYTHON_CPPFLAGS=$new_CPPFLAGS
10641 PYTHON_LIBS=$new_LIBS
9a156167 10642fi
81ecdfbb
RW
10643rm -f core conftest.err conftest.$ac_objext \
10644 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10645 CPPFLAGS=$save_CPPFLAGS
10646 LIBS=$save_LIBS
ec685c5e
DE
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10648$as_echo "${found_usable_python}" >&6; }
9a156167 10649
e7a30f46 10650 elif test "${have_python_config}" != failed; then
ec685c5e 10651 if test "${have_libpython}" = no; then
9a156167 10652
420697bb
TT
10653
10654 new_CPPFLAGS=${python_includes}
bf27f0e2 10655 new_LIBS="-lpython2.7 ${python_libs}"
71737c43
CB
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10657$as_echo_n "checking for python... " >&6; }
420697bb
TT
10658 save_CPPFLAGS=$CPPFLAGS
10659 save_LIBS=$LIBS
10660 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10661 LIBS="$new_LIBS $LIBS"
420697bb
TT
10662 found_usable_python=no
10663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10664/* end confdefs.h. */
ac534cba 10665#include "Python.h"
420697bb
TT
10666int
10667main ()
10668{
10669Py_Initialize ();
10670 ;
10671 return 0;
10672}
10673_ACEOF
10674if ac_fn_c_try_link "$LINENO"; then :
71737c43 10675 have_libpython=yes
420697bb 10676 found_usable_python=yes
ac534cba
JB
10677 PYTHON_CPPFLAGS=$new_CPPFLAGS
10678 PYTHON_LIBS=$new_LIBS
420697bb
TT
10679fi
10680rm -f core conftest.err conftest.$ac_objext \
10681 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10682 CPPFLAGS=$save_CPPFLAGS
10683 LIBS=$save_LIBS
420697bb
TT
10684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10685$as_echo "${found_usable_python}" >&6; }
10686
10687 fi
10688 if test "${have_libpython}" = no; then
10689
ec685c5e
DE
10690
10691 new_CPPFLAGS=${python_includes}
bf27f0e2 10692 new_LIBS="-lpython2.6 ${python_libs}"
71737c43
CB
10693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10694$as_echo_n "checking for python... " >&6; }
ec685c5e
DE
10695 save_CPPFLAGS=$CPPFLAGS
10696 save_LIBS=$LIBS
10697 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10698 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10699 found_usable_python=no
10700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10701/* end confdefs.h. */
ac534cba 10702#include "Python.h"
ec685c5e
DE
10703int
10704main ()
10705{
10706Py_Initialize ();
10707 ;
10708 return 0;
10709}
10710_ACEOF
10711if ac_fn_c_try_link "$LINENO"; then :
71737c43 10712 have_libpython=yes
ec685c5e 10713 found_usable_python=yes
ac534cba
JB
10714 PYTHON_CPPFLAGS=$new_CPPFLAGS
10715 PYTHON_LIBS=$new_LIBS
ec685c5e 10716fi
81ecdfbb
RW
10717rm -f core conftest.err conftest.$ac_objext \
10718 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10719 CPPFLAGS=$save_CPPFLAGS
10720 LIBS=$save_LIBS
ec685c5e
DE
10721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10722$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10723
ec685c5e
DE
10724 fi
10725 fi
ec685c5e
DE
10726
10727 if test "${have_libpython}" = no; then
81ecdfbb
RW
10728 case "${with_python}" in
10729 yes)
d0ac1c44 10730 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10731 ;;
10732 auto)
10733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10734$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10735 ;;
10736 *)
d0ac1c44 10737 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10738 ;;
10739 esac
0c4a4063
DE
10740 else
10741 if test -n "${python_prefix}"; then
10742
10743cat >>confdefs.h <<_ACEOF
10744#define WITH_PYTHON_PATH "${python_prefix}"
10745_ACEOF
10746
10747
10748 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10749 if test "x$prefix" = xNONE; then
10750 test_prefix=/usr/local
10751 else
10752 test_prefix=$prefix
10753 fi
10754 else
10755 test_prefix=$exec_prefix
10756 fi
10757 value=0
10758 case ${python_prefix} in
10759 "${test_prefix}"|"${test_prefix}/"*|\
10760 '${exec_prefix}'|'${exec_prefix}/'*)
10761 value=1
10762 ;;
10763 esac
10764
10765cat >>confdefs.h <<_ACEOF
10766#define PYTHON_PATH_RELOCATABLE $value
10767_ACEOF
10768
10769
10770 fi
81ecdfbb 10771 fi
436868fb 10772fi
436868fb 10773
ec685c5e 10774if test "${have_libpython}" != no; then
436868fb 10775
81ecdfbb 10776$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10777
81ecdfbb
RW
10778 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10779 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10780 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10781 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10782 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10783
81ecdfbb
RW
10784 # Flags needed to compile Python code (taken from python-config --cflags).
10785 # We cannot call python-config directly because it will output whatever was
10786 # used when compiling the Python interpreter itself, including flags which
10787 # would make the python-related objects be compiled differently from the
10788 # rest of GDB (e.g., -O2 and -fPIC).
10789 if test "${GCC}" = yes; then
ae292b3a
TT
10790 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10791 # Python headers recommend -DNDEBUG, but it's unclear if that just
10792 # refers to building Python itself. In release mode, though, it
10793 # doesn't hurt for the Python code in gdb to follow.
10794 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10795 fi
436868fb 10796
81ecdfbb
RW
10797 if test "x${tentative_python_cflags}" != x; then
10798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10799$as_echo_n "checking compiler flags for python code... " >&6; }
10800 for flag in ${tentative_python_cflags}; do
10801 # Check that the compiler accepts it
10802 saved_CFLAGS="$CFLAGS"
10803 CFLAGS="$CFLAGS $flag"
10804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10805/* end confdefs.h. */
81ecdfbb 10806
a9322a30
TT
10807int
10808main ()
10809{
a9322a30
TT
10810
10811 ;
10812 return 0;
10813}
bec39cab 10814_ACEOF
81ecdfbb
RW
10815if ac_fn_c_try_compile "$LINENO"; then :
10816 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10817fi
81ecdfbb
RW
10818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10819 CFLAGS="$saved_CFLAGS"
10820 done
10821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10822$as_echo "${PYTHON_CFLAGS}" >&6; }
10823 fi
043b6510 10824
c83393b9
JB
10825 # On x64 Windows, Python's include headers, and pyconfig.h in
10826 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10827 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10828 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10829 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10830 # The issue was reported to the Python community, but still isn't
10831 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10832
043b6510 10833 case "$gdb_host" in
c83393b9
JB
10834 mingw64)
10835 if test "${GCC}" = yes; then
10836 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10837 fi
10838 ;;
043b6510 10839 esac
81ecdfbb 10840else
6dddc817
DE
10841 # Even if Python support is not compiled in, we need to have this file
10842 # included so that the "python" command, et.al., still exists.
8fd8d003 10843 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10844 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10845fi
9a156167 10846
a4a1c157
PA
10847# Work around Python http://bugs.python.org/issue10112. See also
10848# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10849# no effect. Note that the only test after this that uses Python is
10850# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10851# run without -export-dynamic too.
10852PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10853
10854
ed3ef339
DE
10855
10856
4df42755
DE
10857 if test "${have_libpython}" != no; then
10858 HAVE_PYTHON_TRUE=
10859 HAVE_PYTHON_FALSE='#'
10860else
10861 HAVE_PYTHON_TRUE='#'
10862 HAVE_PYTHON_FALSE=
10863fi
10864
ed3ef339
DE
10865
10866# -------------------- #
10867# Check for libguile. #
10868# -------------------- #
10869
10870
e1402065
DE
10871
10872
10873
10874
10875# Check whether --with-guile was given.
10876if test "${with_guile+set}" = set; then :
10877 withval=$with_guile;
10878else
10879 with_guile=auto
10880fi
10881
10882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10883$as_echo_n "checking whether to use guile... " >&6; }
10884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10885$as_echo "$with_guile" >&6; }
10886
ed3ef339
DE
10887# Extract the first word of "pkg-config", so it can be a program name with args.
10888set dummy pkg-config; ac_word=$2
10889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10890$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10891if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10892 $as_echo_n "(cached) " >&6
10893else
10894 case $pkg_config_prog_path in
10895 [\\/]* | ?:[\\/]*)
10896 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10897 ;;
10898 *)
10899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10900for as_dir in $PATH
10901do
10902 IFS=$as_save_IFS
10903 test -z "$as_dir" && as_dir=.
10904 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10905 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10906 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10908 break 2
10909 fi
10910done
10911 done
10912IFS=$as_save_IFS
10913
10914 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10915 ;;
10916esac
10917fi
10918pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10919if test -n "$pkg_config_prog_path"; then
10920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10921$as_echo "$pkg_config_prog_path" >&6; }
10922else
10923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10924$as_echo "no" >&6; }
10925fi
10926
10927
10928
6e66f753 10929try_guile_versions="guile-2.0"
ed3ef339
DE
10930have_libguile=no
10931case "${with_guile}" in
10932no)
10933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10934$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10935 ;;
10936auto)
e1402065
DE
10937 if test "${pkg_config_prog_path}" = "missing"; then
10938 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10939$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10940 else
ed3ef339
DE
10941
10942 pkg_config=${pkg_config_prog_path}
10943 guile_version_list=${try_guile_versions}
10944 flag_errors=no
10945
ed3ef339
DE
10946 found_usable_guile=checking
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10948$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10949 for guile_version in ${guile_version_list}; do
10950 ${pkg_config} --exists ${guile_version} 2>/dev/null
10951 if test $? != 0; then
10952 continue
10953 fi
10954 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10955 if test $? != 0; then
d0ac1c44 10956 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10957 fi
10958 new_LIBS=`${pkg_config} --libs ${guile_version}`
10959 if test $? != 0; then
d0ac1c44 10960 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10961 fi
10962 found_usable_guile=${guile_version}
10963 break
10964 done
10965 if test "${found_usable_guile}" = "checking"; then
10966 if test "${flag_errors}" = "yes"; then
d0ac1c44 10967 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10968 else
10969 found_usable_guile=no
10970 fi
10971 fi
10972 if test "${found_usable_guile}" != no; then
10973 save_CPPFLAGS=$CPPFLAGS
10974 save_LIBS=$LIBS
10975 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10976 LIBS="$LIBS $new_LIBS"
10977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10978/* end confdefs.h. */
10979#include "libguile.h"
10980int
10981main ()
10982{
10983scm_init_guile ();
10984 ;
10985 return 0;
10986}
10987_ACEOF
10988if ac_fn_c_try_link "$LINENO"; then :
10989 have_libguile=yes
10990 GUILE_CPPFLAGS=$new_CPPFLAGS
10991 GUILE_LIBS=$new_LIBS
10992else
10993 found_usable_guile=no
10994fi
10995rm -f core conftest.err conftest.$ac_objext \
10996 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10997 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10998if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10999
11000$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11001
11002
11003fi
11004
ed3ef339
DE
11005 CPPFLAGS=$save_CPPFLAGS
11006 LIBS=$save_LIBS
11007 if test "${found_usable_guile}" = no; then
11008 if test "${flag_errors}" = yes; then
11009 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11011as_fn_error $? "linking guile version ${guile_version} test program failed
11012See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11013 fi
11014 fi
11015 fi
11016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11017$as_echo "${found_usable_guile}" >&6; }
11018
e1402065 11019 fi
ed3ef339
DE
11020 ;;
11021yes)
e1402065 11022 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11023 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11024 fi
ed3ef339
DE
11025
11026 pkg_config=${pkg_config_prog_path}
11027 guile_version_list=${try_guile_versions}
11028 flag_errors=yes
11029
ed3ef339
DE
11030 found_usable_guile=checking
11031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11032$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11033 for guile_version in ${guile_version_list}; do
11034 ${pkg_config} --exists ${guile_version} 2>/dev/null
11035 if test $? != 0; then
11036 continue
11037 fi
11038 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11039 if test $? != 0; then
d0ac1c44 11040 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11041 fi
11042 new_LIBS=`${pkg_config} --libs ${guile_version}`
11043 if test $? != 0; then
d0ac1c44 11044 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11045 fi
11046 found_usable_guile=${guile_version}
11047 break
11048 done
11049 if test "${found_usable_guile}" = "checking"; then
11050 if test "${flag_errors}" = "yes"; then
d0ac1c44 11051 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11052 else
11053 found_usable_guile=no
11054 fi
11055 fi
11056 if test "${found_usable_guile}" != no; then
11057 save_CPPFLAGS=$CPPFLAGS
11058 save_LIBS=$LIBS
11059 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11060 LIBS="$LIBS $new_LIBS"
11061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11062/* end confdefs.h. */
11063#include "libguile.h"
11064int
11065main ()
11066{
11067scm_init_guile ();
11068 ;
11069 return 0;
11070}
11071_ACEOF
11072if ac_fn_c_try_link "$LINENO"; then :
11073 have_libguile=yes
11074 GUILE_CPPFLAGS=$new_CPPFLAGS
11075 GUILE_LIBS=$new_LIBS
11076else
11077 found_usable_guile=no
11078fi
11079rm -f core conftest.err conftest.$ac_objext \
11080 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11081 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11082if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11083
11084$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11085
11086
11087fi
11088
ed3ef339
DE
11089 CPPFLAGS=$save_CPPFLAGS
11090 LIBS=$save_LIBS
11091 if test "${found_usable_guile}" = no; then
11092 if test "${flag_errors}" = yes; then
11093 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11094$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11095as_fn_error $? "linking guile version ${guile_version} test program failed
11096See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11097 fi
11098 fi
11099 fi
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11101$as_echo "${found_usable_guile}" >&6; }
11102
11103 ;;
11104[\\/]* | ?:[\\/]*)
e1402065 11105 if test -x "${with_guile}"; then
ed3ef339
DE
11106
11107 pkg_config=${with_guile}
11108 guile_version_list=${try_guile_versions}
11109 flag_errors=yes
11110
ed3ef339
DE
11111 found_usable_guile=checking
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11113$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11114 for guile_version in ${guile_version_list}; do
11115 ${pkg_config} --exists ${guile_version} 2>/dev/null
11116 if test $? != 0; then
11117 continue
11118 fi
11119 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11120 if test $? != 0; then
d0ac1c44 11121 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11122 fi
11123 new_LIBS=`${pkg_config} --libs ${guile_version}`
11124 if test $? != 0; then
d0ac1c44 11125 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11126 fi
11127 found_usable_guile=${guile_version}
11128 break
11129 done
11130 if test "${found_usable_guile}" = "checking"; then
11131 if test "${flag_errors}" = "yes"; then
d0ac1c44 11132 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11133 else
11134 found_usable_guile=no
11135 fi
11136 fi
11137 if test "${found_usable_guile}" != no; then
11138 save_CPPFLAGS=$CPPFLAGS
11139 save_LIBS=$LIBS
11140 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11141 LIBS="$LIBS $new_LIBS"
11142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11143/* end confdefs.h. */
11144#include "libguile.h"
11145int
11146main ()
11147{
11148scm_init_guile ();
11149 ;
11150 return 0;
11151}
11152_ACEOF
11153if ac_fn_c_try_link "$LINENO"; then :
11154 have_libguile=yes
11155 GUILE_CPPFLAGS=$new_CPPFLAGS
11156 GUILE_LIBS=$new_LIBS
11157else
11158 found_usable_guile=no
11159fi
11160rm -f core conftest.err conftest.$ac_objext \
11161 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11162 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11163if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11164
11165$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11166
11167
11168fi
11169
ed3ef339
DE
11170 CPPFLAGS=$save_CPPFLAGS
11171 LIBS=$save_LIBS
11172 if test "${found_usable_guile}" = no; then
11173 if test "${flag_errors}" = yes; then
11174 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11175$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11176as_fn_error $? "linking guile version ${guile_version} test program failed
11177See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11178 fi
11179 fi
11180 fi
11181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11182$as_echo "${found_usable_guile}" >&6; }
11183
e1402065 11184 else
d0ac1c44 11185 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11186 fi
ed3ef339
DE
11187 ;;
11188"" | */*)
11189 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11190 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11191 ;;
11192*)
11193 # A space separate list of guile versions to try, in order.
e1402065 11194 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11195 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11196 fi
ed3ef339
DE
11197
11198 pkg_config=${pkg_config_prog_path}
11199 guile_version_list=${with_guile}
11200 flag_errors=yes
11201
ed3ef339
DE
11202 found_usable_guile=checking
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11204$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11205 for guile_version in ${guile_version_list}; do
11206 ${pkg_config} --exists ${guile_version} 2>/dev/null
11207 if test $? != 0; then
11208 continue
11209 fi
11210 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11211 if test $? != 0; then
d0ac1c44 11212 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11213 fi
11214 new_LIBS=`${pkg_config} --libs ${guile_version}`
11215 if test $? != 0; then
d0ac1c44 11216 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11217 fi
11218 found_usable_guile=${guile_version}
11219 break
11220 done
11221 if test "${found_usable_guile}" = "checking"; then
11222 if test "${flag_errors}" = "yes"; then
d0ac1c44 11223 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11224 else
11225 found_usable_guile=no
11226 fi
11227 fi
11228 if test "${found_usable_guile}" != no; then
11229 save_CPPFLAGS=$CPPFLAGS
11230 save_LIBS=$LIBS
11231 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11232 LIBS="$LIBS $new_LIBS"
11233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11234/* end confdefs.h. */
11235#include "libguile.h"
11236int
11237main ()
11238{
11239scm_init_guile ();
11240 ;
11241 return 0;
11242}
11243_ACEOF
11244if ac_fn_c_try_link "$LINENO"; then :
11245 have_libguile=yes
11246 GUILE_CPPFLAGS=$new_CPPFLAGS
11247 GUILE_LIBS=$new_LIBS
11248else
11249 found_usable_guile=no
11250fi
11251rm -f core conftest.err conftest.$ac_objext \
11252 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11253 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11254if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11255
11256$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11257
11258
11259fi
11260
ed3ef339
DE
11261 CPPFLAGS=$save_CPPFLAGS
11262 LIBS=$save_LIBS
11263 if test "${found_usable_guile}" = no; then
11264 if test "${flag_errors}" = yes; then
11265 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11267as_fn_error $? "linking guile version ${guile_version} test program failed
11268See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11269 fi
11270 fi
11271 fi
11272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11273$as_echo "${found_usable_guile}" >&6; }
11274
11275 ;;
11276esac
11277
e76c5d17 11278if test "${have_libguile}" != no; then
d342a0da
DE
11279 case "${with_guile}" in
11280 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11281
11282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11283$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11284if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11285 $as_echo_n "(cached) " >&6
11286else
d342a0da 11287 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11288
11289 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11290 # the 'guild' and 'bindir' variables. In that case, try to guess
11291 # what the program name is, at the risk of getting it wrong if
11292 # Guile was configured with '--program-suffix' or similar.
11293 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11294 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11295 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11296 fi
11297
11298fi
11299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11300$as_echo "$ac_cv_guild_program_name" >&6; }
11301
11302 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11303 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11304 fi
11305
11306 GUILD="$ac_cv_guild_program_name"
11307
11308
d342a0da
DE
11309 ;;
11310 *)
11311
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11313$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11314if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11315 $as_echo_n "(cached) " >&6
11316else
11317 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11318
11319 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11320 # the 'guild' and 'bindir' variables. In that case, try to guess
11321 # what the program name is, at the risk of getting it wrong if
11322 # Guile was configured with '--program-suffix' or similar.
11323 if test "x$ac_cv_guild_program_name" = "x"; then
11324 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11325 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11326 fi
11327
11328fi
11329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11330$as_echo "$ac_cv_guild_program_name" >&6; }
11331
11332 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11333 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11334 fi
11335
11336 GUILD="$ac_cv_guild_program_name"
11337
11338
11339 ;;
11340 esac
e76c5d17
DE
11341
11342
11343 if test "$cross_compiling" = no; then
11344 GUILD_TARGET_FLAG=
11345 else
11346 GUILD_TARGET_FLAG="--target=$host"
11347 fi
11348
11349
11350
11351
11352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11353$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11354if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11355 $as_echo_n "(cached) " >&6
11356else
11357 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11358 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11359 ac_cv_guild_ok=yes
11360 else
11361 ac_cv_guild_ok=no
11362 fi
11363fi
11364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11365$as_echo "$ac_cv_guild_ok" >&6; }
11366
11367 if test "$ac_cv_guild_ok" = no; then
11368 have_libguile=no
11369 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11370$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11371 fi
11372fi
11373
ed3ef339
DE
11374if test "${have_libguile}" != no; then
11375
11376$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11377
11378 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11379 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11380 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11381 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11382 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11383
11384 save_LIBS="$LIBS"
11385 save_CPPFLAGS="$CPPFLAGS"
11386 LIBS="$GUILE_LIBS"
11387 CPPFLAGS="$GUILE_CPPFLAGS"
11388 for ac_func in scm_new_smob
11389do :
11390 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11391if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11392 cat >>confdefs.h <<_ACEOF
11393#define HAVE_SCM_NEW_SMOB 1
11394_ACEOF
11395
11396fi
11397done
11398
11399 LIBS="$save_LIBS"
11400 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11401else
11402 # Even if Guile support is not compiled in, we need to have these files
11403 # included.
bd810fff 11404 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11405 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11406fi
9a156167 11407
ac534cba 11408
4df42755
DE
11409 if test "${have_libguile}" != no; then
11410 HAVE_GUILE_TRUE=
11411 HAVE_GUILE_FALSE='#'
11412else
11413 HAVE_GUILE_TRUE='#'
11414 HAVE_GUILE_FALSE=
11415fi
11416
ac534cba 11417
62f29fda
TT
11418# ---------------------------- #
11419# Check for source highlight. #
11420# ---------------------------- #
11421
11422SRCHIGH_LIBS=
11423SRCHIGH_CFLAGS=
189b8c2e
ST
11424
11425# Check whether --enable-source-highlight was given.
11426if test "${enable_source_highlight+set}" = set; then :
11427 enableval=$enable_source_highlight; case "${enableval}" in
11428 yes) enable_source_highlight=yes ;;
11429 no) enable_source_highlight=no ;;
11430 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11431esac
11432else
11433 enable_source_highlight=auto
11434fi
11435
11436
11437if test "${enable_source_highlight}" != "no"; then
11438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11439$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11440 if test "${pkg_config_prog_path}" = "missing"; then
11441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11442$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11443 if test "${enable_source_highlight}" = "yes"; then
11444 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11445 fi
11446 else
d806ea2d
TT
11447 case "$LDFLAGS" in
11448 *static-libstdc*)
11449 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11450 ;;
11451 esac
11452
189b8c2e 11453 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11454 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11455 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11456
11457$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11458
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11460$as_echo "yes" >&6; }
189b8c2e 11461 else
62f29fda
TT
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11463$as_echo "no" >&6; }
189b8c2e
ST
11464 if test "${enable_source_highlight}" = "yes"; then
11465 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11466 fi
11467 fi
11468 fi
62f29fda
TT
11469fi
11470
11471
11472
58bfce93
MM
11473
11474# Check whether --with-intel_pt was given.
11475if test "${with_intel_pt+set}" = set; then :
11476 withval=$with_intel_pt;
11477else
11478 with_intel_pt=auto
11479fi
11480
11481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11482$as_echo_n "checking whether to use intel pt... " >&6; }
11483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11484$as_echo "$with_intel_pt" >&6; }
11485
11486if test "${with_intel_pt}" = no; then
bc504a31
PA
11487 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11488$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11489 HAVE_LIBIPT=no
11490else
5599c404
MM
11491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11492/* end confdefs.h. */
11493
11494#include <linux/perf_event.h>
11495#ifndef PERF_ATTR_SIZE_VER5
11496# error
11497#endif
11498
11499_ACEOF
11500if ac_fn_c_try_cpp "$LINENO"; then :
11501 perf_event=yes
11502else
11503 perf_event=no
11504fi
d0ac1c44 11505rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11506 if test "$perf_event" != yes; then
11507 if test "$with_intel_pt" = yes; then
d0ac1c44 11508 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11509 else
11510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11511$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11512 fi
11513 fi
11514
58bfce93
MM
11515
11516
11517
11518
11519
11520
11521
11522
11523 use_additional=yes
11524
11525 acl_save_prefix="$prefix"
11526 prefix="$acl_final_prefix"
11527 acl_save_exec_prefix="$exec_prefix"
11528 exec_prefix="$acl_final_exec_prefix"
11529
11530 eval additional_includedir=\"$includedir\"
11531 eval additional_libdir=\"$libdir\"
11532
11533 exec_prefix="$acl_save_exec_prefix"
11534 prefix="$acl_save_prefix"
11535
11536
11537# Check whether --with-libipt-prefix was given.
11538if test "${with_libipt_prefix+set}" = set; then :
11539 withval=$with_libipt_prefix;
11540 if test "X$withval" = "Xno"; then
11541 use_additional=no
11542 else
11543 if test "X$withval" = "X"; then
11544
11545 acl_save_prefix="$prefix"
11546 prefix="$acl_final_prefix"
11547 acl_save_exec_prefix="$exec_prefix"
11548 exec_prefix="$acl_final_exec_prefix"
11549
11550 eval additional_includedir=\"$includedir\"
11551 eval additional_libdir=\"$libdir\"
11552
11553 exec_prefix="$acl_save_exec_prefix"
11554 prefix="$acl_save_prefix"
11555
11556 else
11557 additional_includedir="$withval/include"
11558 additional_libdir="$withval/lib"
11559 fi
11560 fi
11561
11562fi
11563
11564 LIBIPT=
11565 LTLIBIPT=
11566 INCIPT=
11567 rpathdirs=
11568 ltrpathdirs=
11569 names_already_handled=
11570 names_next_round='ipt '
11571 while test -n "$names_next_round"; do
11572 names_this_round="$names_next_round"
11573 names_next_round=
11574 for name in $names_this_round; do
11575 already_handled=
11576 for n in $names_already_handled; do
11577 if test "$n" = "$name"; then
11578 already_handled=yes
11579 break
11580 fi
11581 done
11582 if test -z "$already_handled"; then
11583 names_already_handled="$names_already_handled $name"
11584 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11585 eval value=\"\$HAVE_LIB$uppername\"
11586 if test -n "$value"; then
11587 if test "$value" = yes; then
11588 eval value=\"\$LIB$uppername\"
11589 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11590 eval value=\"\$LTLIB$uppername\"
11591 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11592 else
11593 :
11594 fi
11595 else
11596 found_dir=
11597 found_la=
11598 found_so=
11599 found_a=
11600 if test $use_additional = yes; then
11601 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11602 found_dir="$additional_libdir"
11603 found_so="$additional_libdir/lib$name.$shlibext"
11604 if test -f "$additional_libdir/lib$name.la"; then
11605 found_la="$additional_libdir/lib$name.la"
11606 fi
11607 else
11608 if test -f "$additional_libdir/lib$name.$libext"; then
11609 found_dir="$additional_libdir"
11610 found_a="$additional_libdir/lib$name.$libext"
11611 if test -f "$additional_libdir/lib$name.la"; then
11612 found_la="$additional_libdir/lib$name.la"
11613 fi
11614 fi
11615 fi
11616 fi
11617 if test "X$found_dir" = "X"; then
11618 for x in $LDFLAGS $LTLIBIPT; do
11619
11620 acl_save_prefix="$prefix"
11621 prefix="$acl_final_prefix"
11622 acl_save_exec_prefix="$exec_prefix"
11623 exec_prefix="$acl_final_exec_prefix"
11624 eval x=\"$x\"
11625 exec_prefix="$acl_save_exec_prefix"
11626 prefix="$acl_save_prefix"
11627
11628 case "$x" in
11629 -L*)
11630 dir=`echo "X$x" | sed -e 's/^X-L//'`
11631 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11632 found_dir="$dir"
11633 found_so="$dir/lib$name.$shlibext"
11634 if test -f "$dir/lib$name.la"; then
11635 found_la="$dir/lib$name.la"
11636 fi
11637 else
11638 if test -f "$dir/lib$name.$libext"; then
11639 found_dir="$dir"
11640 found_a="$dir/lib$name.$libext"
11641 if test -f "$dir/lib$name.la"; then
11642 found_la="$dir/lib$name.la"
11643 fi
11644 fi
11645 fi
11646 ;;
11647 esac
11648 if test "X$found_dir" != "X"; then
11649 break
11650 fi
11651 done
11652 fi
11653 if test "X$found_dir" != "X"; then
11654 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11655 if test "X$found_so" != "X"; then
11656 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11657 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11658 else
11659 haveit=
11660 for x in $ltrpathdirs; do
11661 if test "X$x" = "X$found_dir"; then
11662 haveit=yes
11663 break
11664 fi
11665 done
11666 if test -z "$haveit"; then
11667 ltrpathdirs="$ltrpathdirs $found_dir"
11668 fi
11669 if test "$hardcode_direct" = yes; then
11670 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11671 else
11672 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11673 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11674 haveit=
11675 for x in $rpathdirs; do
11676 if test "X$x" = "X$found_dir"; then
11677 haveit=yes
11678 break
11679 fi
11680 done
11681 if test -z "$haveit"; then
11682 rpathdirs="$rpathdirs $found_dir"
11683 fi
11684 else
11685 haveit=
11686 for x in $LDFLAGS $LIBIPT; do
11687
11688 acl_save_prefix="$prefix"
11689 prefix="$acl_final_prefix"
11690 acl_save_exec_prefix="$exec_prefix"
11691 exec_prefix="$acl_final_exec_prefix"
11692 eval x=\"$x\"
11693 exec_prefix="$acl_save_exec_prefix"
11694 prefix="$acl_save_prefix"
11695
11696 if test "X$x" = "X-L$found_dir"; then
11697 haveit=yes
11698 break
11699 fi
11700 done
11701 if test -z "$haveit"; then
11702 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11703 fi
11704 if test "$hardcode_minus_L" != no; then
11705 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11706 else
11707 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11708 fi
11709 fi
11710 fi
11711 fi
11712 else
11713 if test "X$found_a" != "X"; then
11714 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11715 else
11716 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11717 fi
11718 fi
11719 additional_includedir=
11720 case "$found_dir" in
11721 */lib | */lib/)
11722 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11723 additional_includedir="$basedir/include"
11724 ;;
11725 esac
11726 if test "X$additional_includedir" != "X"; then
11727 if test "X$additional_includedir" != "X/usr/include"; then
11728 haveit=
11729 if test "X$additional_includedir" = "X/usr/local/include"; then
11730 if test -n "$GCC"; then
11731 case $host_os in
11732 linux*) haveit=yes;;
11733 esac
11734 fi
11735 fi
11736 if test -z "$haveit"; then
11737 for x in $CPPFLAGS $INCIPT; do
11738
11739 acl_save_prefix="$prefix"
11740 prefix="$acl_final_prefix"
11741 acl_save_exec_prefix="$exec_prefix"
11742 exec_prefix="$acl_final_exec_prefix"
11743 eval x=\"$x\"
11744 exec_prefix="$acl_save_exec_prefix"
11745 prefix="$acl_save_prefix"
11746
11747 if test "X$x" = "X-I$additional_includedir"; then
11748 haveit=yes
11749 break
11750 fi
11751 done
11752 if test -z "$haveit"; then
11753 if test -d "$additional_includedir"; then
11754 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11755 fi
11756 fi
11757 fi
11758 fi
11759 fi
11760 if test -n "$found_la"; then
11761 save_libdir="$libdir"
11762 case "$found_la" in
11763 */* | *\\*) . "$found_la" ;;
11764 *) . "./$found_la" ;;
11765 esac
11766 libdir="$save_libdir"
11767 for dep in $dependency_libs; do
11768 case "$dep" in
11769 -L*)
11770 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11771 if test "X$additional_libdir" != "X/usr/lib"; then
11772 haveit=
11773 if test "X$additional_libdir" = "X/usr/local/lib"; then
11774 if test -n "$GCC"; then
11775 case $host_os in
11776 linux*) haveit=yes;;
11777 esac
11778 fi
11779 fi
11780 if test -z "$haveit"; then
11781 haveit=
11782 for x in $LDFLAGS $LIBIPT; do
11783
11784 acl_save_prefix="$prefix"
11785 prefix="$acl_final_prefix"
11786 acl_save_exec_prefix="$exec_prefix"
11787 exec_prefix="$acl_final_exec_prefix"
11788 eval x=\"$x\"
11789 exec_prefix="$acl_save_exec_prefix"
11790 prefix="$acl_save_prefix"
11791
11792 if test "X$x" = "X-L$additional_libdir"; then
11793 haveit=yes
11794 break
11795 fi
11796 done
11797 if test -z "$haveit"; then
11798 if test -d "$additional_libdir"; then
11799 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11800 fi
11801 fi
11802 haveit=
11803 for x in $LDFLAGS $LTLIBIPT; do
11804
11805 acl_save_prefix="$prefix"
11806 prefix="$acl_final_prefix"
11807 acl_save_exec_prefix="$exec_prefix"
11808 exec_prefix="$acl_final_exec_prefix"
11809 eval x=\"$x\"
11810 exec_prefix="$acl_save_exec_prefix"
11811 prefix="$acl_save_prefix"
11812
11813 if test "X$x" = "X-L$additional_libdir"; then
11814 haveit=yes
11815 break
11816 fi
11817 done
11818 if test -z "$haveit"; then
11819 if test -d "$additional_libdir"; then
11820 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11821 fi
11822 fi
11823 fi
11824 fi
11825 ;;
11826 -R*)
11827 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11828 if test "$enable_rpath" != no; then
11829 haveit=
11830 for x in $rpathdirs; do
11831 if test "X$x" = "X$dir"; then
11832 haveit=yes
11833 break
11834 fi
11835 done
11836 if test -z "$haveit"; then
11837 rpathdirs="$rpathdirs $dir"
11838 fi
11839 haveit=
11840 for x in $ltrpathdirs; do
11841 if test "X$x" = "X$dir"; then
11842 haveit=yes
11843 break
11844 fi
11845 done
11846 if test -z "$haveit"; then
11847 ltrpathdirs="$ltrpathdirs $dir"
11848 fi
11849 fi
11850 ;;
11851 -l*)
11852 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11853 ;;
11854 *.la)
11855 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11856 ;;
11857 *)
11858 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11859 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11860 ;;
11861 esac
11862 done
11863 fi
11864 else
11865 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11866 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11867 fi
11868 fi
11869 fi
11870 done
11871 done
11872 if test "X$rpathdirs" != "X"; then
11873 if test -n "$hardcode_libdir_separator"; then
11874 alldirs=
11875 for found_dir in $rpathdirs; do
11876 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11877 done
11878 acl_save_libdir="$libdir"
11879 libdir="$alldirs"
11880 eval flag=\"$hardcode_libdir_flag_spec\"
11881 libdir="$acl_save_libdir"
11882 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11883 else
11884 for found_dir in $rpathdirs; do
11885 acl_save_libdir="$libdir"
11886 libdir="$found_dir"
11887 eval flag=\"$hardcode_libdir_flag_spec\"
11888 libdir="$acl_save_libdir"
11889 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11890 done
11891 fi
11892 fi
11893 if test "X$ltrpathdirs" != "X"; then
11894 for found_dir in $ltrpathdirs; do
11895 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11896 done
11897 fi
11898
11899
11900 ac_save_CPPFLAGS="$CPPFLAGS"
11901
11902 for element in $INCIPT; do
11903 haveit=
11904 for x in $CPPFLAGS; do
11905
11906 acl_save_prefix="$prefix"
11907 prefix="$acl_final_prefix"
11908 acl_save_exec_prefix="$exec_prefix"
11909 exec_prefix="$acl_final_exec_prefix"
11910 eval x=\"$x\"
11911 exec_prefix="$acl_save_exec_prefix"
11912 prefix="$acl_save_prefix"
11913
11914 if test "X$x" = "X$element"; then
11915 haveit=yes
11916 break
11917 fi
11918 done
11919 if test -z "$haveit"; then
11920 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11921 fi
11922 done
11923
11924
11925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11926$as_echo_n "checking for libipt... " >&6; }
d0ac1c44 11927if ${ac_cv_libipt+:} false; then :
58bfce93
MM
11928 $as_echo_n "(cached) " >&6
11929else
11930
11931 ac_save_LIBS="$LIBS"
11932 LIBS="$LIBS $LIBIPT"
11933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11934/* end confdefs.h. */
11935#include "intel-pt.h"
11936int
11937main ()
11938{
11939pt_insn_alloc_decoder (0);
11940 ;
11941 return 0;
11942}
11943_ACEOF
11944if ac_fn_c_try_link "$LINENO"; then :
11945 ac_cv_libipt=yes
11946else
11947 ac_cv_libipt=no
11948fi
11949rm -f core conftest.err conftest.$ac_objext \
11950 conftest$ac_exeext conftest.$ac_ext
11951 LIBS="$ac_save_LIBS"
11952
11953fi
11954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11955$as_echo "$ac_cv_libipt" >&6; }
11956 if test "$ac_cv_libipt" = yes; then
11957 HAVE_LIBIPT=yes
11958
11959$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11960
11961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11962$as_echo_n "checking how to link with libipt... " >&6; }
11963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11964$as_echo "$LIBIPT" >&6; }
11965 else
11966 HAVE_LIBIPT=no
11967 CPPFLAGS="$ac_save_CPPFLAGS"
11968 LIBIPT=
11969 LTLIBIPT=
11970 fi
11971
11972
11973
11974
11975
11976
11977 if test "$HAVE_LIBIPT" != yes; then
11978 if test "$with_intel_pt" = yes; then
d0ac1c44 11979 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
11980 else
11981 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11982$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11983 fi
c56ccc05
MM
11984 else
11985 save_LIBS=$LIBS
11986 LIBS="$LIBS $LIBIPT"
11987 for ac_func in pt_insn_event
11988do :
11989 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
d0ac1c44 11990if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
11991 cat >>confdefs.h <<_ACEOF
11992#define HAVE_PT_INSN_EVENT 1
11993_ACEOF
11994
11995fi
11996done
11997
11998 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
11999"
d0ac1c44 12000if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
12001
12002cat >>confdefs.h <<_ACEOF
12003#define HAVE_STRUCT_PT_INSN_ENABLED 1
12004_ACEOF
12005
12006
12007fi
12008ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
12009"
d0ac1c44 12010if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
12011
12012cat >>confdefs.h <<_ACEOF
12013#define HAVE_STRUCT_PT_INSN_RESYNCED 1
12014_ACEOF
12015
12016
12017fi
12018
12019 LIBS=$save_LIBS
58bfce93
MM
12020 fi
12021fi
12022
81ecdfbb
RW
12023# ------------------------- #
12024# Checks for header files. #
12025# ------------------------- #
c890192f 12026
81ecdfbb
RW
12027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12028$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 12029if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12030 $as_echo_n "(cached) " >&6
bec39cab 12031else
81ecdfbb 12032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12033/* end confdefs.h. */
81ecdfbb
RW
12034#include <stdlib.h>
12035#include <stdarg.h>
12036#include <string.h>
12037#include <float.h>
12038
a9322a30
TT
12039int
12040main ()
12041{
a9322a30
TT
12042
12043 ;
12044 return 0;
12045}
bec39cab 12046_ACEOF
81ecdfbb
RW
12047if ac_fn_c_try_compile "$LINENO"; then :
12048 ac_cv_header_stdc=yes
bec39cab 12049else
81ecdfbb 12050 ac_cv_header_stdc=no
a9322a30 12051fi
81ecdfbb 12052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12053
81ecdfbb
RW
12054if test $ac_cv_header_stdc = yes; then
12055 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12057/* end confdefs.h. */
12058#include <string.h>
bec39cab 12059
81ecdfbb
RW
12060_ACEOF
12061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12062 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12063
bec39cab 12064else
81ecdfbb
RW
12065 ac_cv_header_stdc=no
12066fi
12067rm -f conftest*
12068
12069fi
12070
12071if test $ac_cv_header_stdc = yes; then
12072 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12074/* end confdefs.h. */
12075#include <stdlib.h>
12076
bec39cab 12077_ACEOF
81ecdfbb
RW
12078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12079 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 12080
81ecdfbb
RW
12081else
12082 ac_cv_header_stdc=no
12083fi
12084rm -f conftest*
bec39cab 12085
bec39cab 12086fi
81ecdfbb
RW
12087
12088if test $ac_cv_header_stdc = yes; then
12089 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12090 if test "$cross_compiling" = yes; then :
12091 :
bec39cab 12092else
81ecdfbb 12093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12094/* end confdefs.h. */
81ecdfbb
RW
12095#include <ctype.h>
12096#include <stdlib.h>
12097#if ((' ' & 0x0FF) == 0x020)
12098# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12099# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12100#else
12101# define ISLOWER(c) \
12102 (('a' <= (c) && (c) <= 'i') \
12103 || ('j' <= (c) && (c) <= 'r') \
12104 || ('s' <= (c) && (c) <= 'z'))
12105# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12106#endif
12107
12108#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12109int
12110main ()
12111{
81ecdfbb
RW
12112 int i;
12113 for (i = 0; i < 256; i++)
12114 if (XOR (islower (i), ISLOWER (i))
12115 || toupper (i) != TOUPPER (i))
12116 return 2;
a9322a30
TT
12117 return 0;
12118}
bec39cab 12119_ACEOF
81ecdfbb
RW
12120if ac_fn_c_try_run "$LINENO"; then :
12121
bec39cab 12122else
81ecdfbb
RW
12123 ac_cv_header_stdc=no
12124fi
12125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12126 conftest.$ac_objext conftest.beam conftest.$ac_ext
12127fi
bec39cab 12128
bec39cab 12129fi
a9322a30 12130fi
81ecdfbb
RW
12131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12132$as_echo "$ac_cv_header_stdc" >&6; }
12133if test $ac_cv_header_stdc = yes; then
bec39cab 12134
81ecdfbb 12135$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12136
81ecdfbb 12137fi
bec39cab 12138
81ecdfbb 12139# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12140for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
43b7e92b 12141 thread_db.h linux/elf.h \
81ecdfbb
RW
12142 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12143 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 12144 sys/reg.h sys/debugreg.h sys/select.h \
2d41fa11 12145 termios.h elf_hp.h
81ecdfbb
RW
12146do :
12147 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12148ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12149if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12150 cat >>confdefs.h <<_ACEOF
81ecdfbb 12151#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12152_ACEOF
c906108c 12153
bec39cab 12154fi
81ecdfbb
RW
12155
12156done
12157
81ecdfbb
RW
12158for ac_header in sys/user.h
12159do :
12160 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12161# include <sys/param.h>
a9322a30
TT
12162#endif
12163
81ecdfbb 12164"
d0ac1c44 12165if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
12166 cat >>confdefs.h <<_ACEOF
12167#define HAVE_SYS_USER_H 1
bec39cab 12168_ACEOF
bec39cab 12169
a9322a30 12170fi
bec39cab 12171
81ecdfbb 12172done
5ee754fc 12173
5ee754fc 12174
5007d765 12175for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12176do :
12177 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12178ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12179if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12180 cat >>confdefs.h <<_ACEOF
81ecdfbb 12181#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12182_ACEOF
5ee754fc
MK
12183
12184fi
12185
81ecdfbb 12186done
bec39cab 12187
81ecdfbb
RW
12188for ac_header in term.h
12189do :
12190 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12191# include <curses.h>
12192#endif
bec39cab 12193
81ecdfbb 12194"
d0ac1c44 12195if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12196 cat >>confdefs.h <<_ACEOF
12197#define HAVE_TERM_H 1
a8111142 12198_ACEOF
a8111142 12199
a8111142 12200fi
a8111142 12201
81ecdfbb 12202done
a8111142
TT
12203
12204
81ecdfbb
RW
12205# ------------------------- #
12206# Checks for declarations. #
12207# ------------------------- #
a9322a30 12208
07697489
PA
12209
12210 # Check for presence and size of long long.
12211 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 12212if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12213
12214cat >>confdefs.h <<_ACEOF
12215#define HAVE_LONG_LONG 1
12216_ACEOF
12217
12218# The cast to long int works around a bug in the HP C Compiler
12219# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12220# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12221# This bug is HP SR number 8606223364.
12222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12223$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 12224if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12225 $as_echo_n "(cached) " >&6
12226else
12227 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12228
12229else
12230 if test "$ac_cv_type_long_long" = yes; then
12231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12232$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
12233as_fn_error 77 "cannot compute sizeof (long long)
12234See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12235 else
12236 ac_cv_sizeof_long_long=0
12237 fi
12238fi
12239
12240fi
12241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12242$as_echo "$ac_cv_sizeof_long_long" >&6; }
12243
12244
12245
12246cat >>confdefs.h <<_ACEOF
12247#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12248_ACEOF
12249
12250
12251fi
12252
12253
d0ac1c44
SM
12254 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12255ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12256if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12257 ac_have_decl=1
12258else
12259 ac_have_decl=0
12260fi
12261
12262cat >>confdefs.h <<_ACEOF
12263#define HAVE_DECL_BASENAME $ac_have_decl
12264_ACEOF
12265ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 12266if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12267 ac_have_decl=1
12268else
12269 ac_have_decl=0
12270fi
12271
12272cat >>confdefs.h <<_ACEOF
12273#define HAVE_DECL_FFS $ac_have_decl
12274_ACEOF
12275ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 12276if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12277 ac_have_decl=1
12278else
12279 ac_have_decl=0
12280fi
12281
12282cat >>confdefs.h <<_ACEOF
12283#define HAVE_DECL_ASPRINTF $ac_have_decl
12284_ACEOF
12285ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 12286if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12287 ac_have_decl=1
12288else
12289 ac_have_decl=0
12290fi
12291
12292cat >>confdefs.h <<_ACEOF
12293#define HAVE_DECL_VASPRINTF $ac_have_decl
12294_ACEOF
12295ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12296if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12297 ac_have_decl=1
12298else
12299 ac_have_decl=0
12300fi
12301
12302cat >>confdefs.h <<_ACEOF
12303#define HAVE_DECL_SNPRINTF $ac_have_decl
12304_ACEOF
12305ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 12306if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12307 ac_have_decl=1
12308else
12309 ac_have_decl=0
12310fi
12311
12312cat >>confdefs.h <<_ACEOF
12313#define HAVE_DECL_VSNPRINTF $ac_have_decl
12314_ACEOF
12315
12316 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 12317if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
12318 ac_have_decl=1
12319else
12320 ac_have_decl=0
12321fi
12322
12323cat >>confdefs.h <<_ACEOF
12324#define HAVE_DECL_STRTOL $ac_have_decl
12325_ACEOF
12326ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 12327if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
12328 ac_have_decl=1
12329else
12330 ac_have_decl=0
12331fi
12332
12333cat >>confdefs.h <<_ACEOF
12334#define HAVE_DECL_STRTOUL $ac_have_decl
12335_ACEOF
12336ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 12337if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
12338 ac_have_decl=1
12339else
12340 ac_have_decl=0
12341fi
12342
12343cat >>confdefs.h <<_ACEOF
12344#define HAVE_DECL_STRTOLL $ac_have_decl
12345_ACEOF
12346ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 12347if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12348 ac_have_decl=1
12349else
12350 ac_have_decl=0
12351fi
12352
12353cat >>confdefs.h <<_ACEOF
12354#define HAVE_DECL_STRTOULL $ac_have_decl
12355_ACEOF
12356
12357 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 12358if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
12359 ac_have_decl=1
12360else
12361 ac_have_decl=0
12362fi
12363
12364cat >>confdefs.h <<_ACEOF
12365#define HAVE_DECL_STRVERSCMP $ac_have_decl
12366_ACEOF
12367
12368
12369
81ecdfbb 12370ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12371if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12372 ac_have_decl=1
12373else
12374 ac_have_decl=0
5ee754fc 12375fi
81ecdfbb
RW
12376
12377cat >>confdefs.h <<_ACEOF
12378#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12379_ACEOF
5ee754fc 12380
5ee754fc 12381
81ecdfbb
RW
12382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12383$as_echo_n "checking for LC_MESSAGES... " >&6; }
d0ac1c44 12384if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12385 $as_echo_n "(cached) " >&6
bec39cab 12386else
81ecdfbb 12387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12388/* end confdefs.h. */
81ecdfbb 12389#include <locale.h>
a9322a30
TT
12390int
12391main ()
12392{
81ecdfbb 12393return LC_MESSAGES
a9322a30
TT
12394 ;
12395 return 0;
12396}
bec39cab 12397_ACEOF
81ecdfbb
RW
12398if ac_fn_c_try_link "$LINENO"; then :
12399 am_cv_val_LC_MESSAGES=yes
bec39cab 12400else
81ecdfbb
RW
12401 am_cv_val_LC_MESSAGES=no
12402fi
12403rm -f core conftest.err conftest.$ac_objext \
12404 conftest$ac_exeext conftest.$ac_ext
12405fi
12406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12407$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12408 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12409
81ecdfbb
RW
12410$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12411
12412 fi
12413
12414
12415# ----------------------- #
12416# Checks for structures. #
12417# ----------------------- #
12418
12419ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 12420if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12421
12422cat >>confdefs.h <<_ACEOF
12423#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12424_ACEOF
7eb368b3 12425
81ecdfbb 12426
7eb368b3 12427fi
81ecdfbb 12428ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 12429if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12430
a9322a30
TT
12431cat >>confdefs.h <<_ACEOF
12432#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12433_ACEOF
12434
a9322a30 12435
7eb368b3
NR
12436fi
12437
7eb368b3 12438
a9322a30
TT
12439# ------------------ #
12440# Checks for types. #
12441# ------------------ #
7eb368b3 12442
81ecdfbb 12443ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12444#include <sys/socket.h>
12445
81ecdfbb 12446"
d0ac1c44 12447if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12448
a9322a30
TT
12449cat >>confdefs.h <<_ACEOF
12450#define HAVE_SOCKLEN_T 1
12451_ACEOF
12452
12453
12454fi
12455
12456
12457# ------------------------------------- #
12458# Checks for compiler characteristics. #
12459# ------------------------------------- #
12460
81ecdfbb
RW
12461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12462$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
d0ac1c44 12463if ${ac_cv_c_const+:} false; then :
81ecdfbb 12464 $as_echo_n "(cached) " >&6
a9322a30 12465else
81ecdfbb 12466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12467/* end confdefs.h. */
a9322a30
TT
12468
12469int
12470main ()
12471{
d0ac1c44 12472
a9322a30 12473#ifndef __cplusplus
d0ac1c44 12474 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12475 typedef int charset[2];
d0ac1c44 12476 const charset cs = { 0, 0 };
a9322a30 12477 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12478 char const *const *pcpcc;
12479 char **ppc;
a9322a30
TT
12480 /* NEC SVR4.0.2 mips cc rejects this. */
12481 struct point {int x, y;};
12482 static struct point const zero = {0,0};
12483 /* AIX XL C 1.02.0.0 rejects this.
12484 It does not let you subtract one const X* pointer from another in
12485 an arm of an if-expression whose if-part is not a constant
12486 expression */
12487 const char *g = "string";
81ecdfbb 12488 pcpcc = &g + (g ? g-g : 0);
a9322a30 12489 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12490 ++pcpcc;
12491 ppc = (char**) pcpcc;
12492 pcpcc = (char const *const *) ppc;
d0ac1c44
SM
12493 { /* SCO 3.2v4 cc rejects this sort of thing. */
12494 char tx;
12495 char *t = &tx;
a9322a30
TT
12496 char const *s = 0 ? (char *) 0 : (char const *) 0;
12497
12498 *t++ = 0;
81ecdfbb 12499 if (s) return 0;
a9322a30
TT
12500 }
12501 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12502 int x[] = {25, 17};
12503 const int *foo = &x[0];
12504 ++foo;
12505 }
12506 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12507 typedef const int *iptr;
12508 iptr p = 0;
12509 ++p;
12510 }
d0ac1c44 12511 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12512 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
d0ac1c44
SM
12513 struct s { int j; const int *ap[3]; } bx;
12514 struct s *b = &bx; b->j = 5;
a9322a30
TT
12515 }
12516 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12517 const int foo = 10;
81ecdfbb 12518 if (!foo) return 0;
a9322a30 12519 }
81ecdfbb 12520 return !cs[0] && !zero.x;
a9322a30
TT
12521#endif
12522
12523 ;
12524 return 0;
12525}
bec39cab 12526_ACEOF
81ecdfbb 12527if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12528 ac_cv_c_const=yes
5ee754fc 12529else
81ecdfbb 12530 ac_cv_c_const=no
5ee754fc 12531fi
81ecdfbb 12532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12533fi
81ecdfbb
RW
12534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12535$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12536if test $ac_cv_c_const = no; then
bec39cab 12537
81ecdfbb 12538$as_echo "#define const /**/" >>confdefs.h
bec39cab 12539
5ee754fc 12540fi
bec39cab 12541
81ecdfbb
RW
12542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12543$as_echo_n "checking for inline... " >&6; }
d0ac1c44 12544if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12545 $as_echo_n "(cached) " >&6
bec39cab 12546else
a9322a30
TT
12547 ac_cv_c_inline=no
12548for ac_kw in inline __inline__ __inline; do
81ecdfbb 12549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12550/* end confdefs.h. */
a9322a30
TT
12551#ifndef __cplusplus
12552typedef int foo_t;
12553static $ac_kw foo_t static_foo () {return 0; }
12554$ac_kw foo_t foo () {return 0; }
12555#endif
12556
bec39cab 12557_ACEOF
81ecdfbb
RW
12558if ac_fn_c_try_compile "$LINENO"; then :
12559 ac_cv_c_inline=$ac_kw
bec39cab 12560fi
81ecdfbb
RW
12561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12562 test "$ac_cv_c_inline" != no && break
a9322a30 12563done
bec39cab 12564
5ee754fc 12565fi
81ecdfbb
RW
12566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12567$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12568
a9322a30
TT
12569case $ac_cv_c_inline in
12570 inline | yes) ;;
12571 *)
12572 case $ac_cv_c_inline in
12573 no) ac_val=;;
12574 *) ac_val=$ac_cv_c_inline;;
12575 esac
12576 cat >>confdefs.h <<_ACEOF
12577#ifndef __cplusplus
12578#define inline $ac_val
12579#endif
12580_ACEOF
bec39cab
AC
12581 ;;
12582esac
bec39cab 12583
81ecdfbb
RW
12584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12585$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12586if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12587 $as_echo_n "(cached) " >&6
bec39cab 12588else
81ecdfbb
RW
12589 ac_cv_c_bigendian=unknown
12590 # See if we're dealing with a universal compiler.
12591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12592/* end confdefs.h. */
12593#ifndef __APPLE_CC__
12594 not a universal capable compiler
12595 #endif
12596 typedef int dummy;
12597
12598_ACEOF
12599if ac_fn_c_try_compile "$LINENO"; then :
12600
12601 # Check for potential -arch flags. It is not universal unless
12602 # there are at least two -arch flags with different values.
12603 ac_arch=
12604 ac_prev=
12605 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12606 if test -n "$ac_prev"; then
12607 case $ac_word in
12608 i?86 | x86_64 | ppc | ppc64)
12609 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12610 ac_arch=$ac_word
12611 else
12612 ac_cv_c_bigendian=universal
12613 break
12614 fi
12615 ;;
12616 esac
12617 ac_prev=
12618 elif test "x$ac_word" = "x-arch"; then
12619 ac_prev=arch
12620 fi
12621 done
12622fi
12623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12624 if test $ac_cv_c_bigendian = unknown; then
12625 # See if sys/param.h defines the BYTE_ORDER macro.
12626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12627/* end confdefs.h. */
a9322a30 12628#include <sys/types.h>
81ecdfbb 12629 #include <sys/param.h>
a9322a30
TT
12630
12631int
12632main ()
12633{
81ecdfbb
RW
12634#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12635 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12636 && LITTLE_ENDIAN)
12637 bogus endian macros
12638 #endif
a9322a30
TT
12639
12640 ;
12641 return 0;
12642}
bec39cab 12643_ACEOF
81ecdfbb 12644if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12645 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12647/* end confdefs.h. */
a9322a30 12648#include <sys/types.h>
81ecdfbb 12649 #include <sys/param.h>
a9322a30
TT
12650
12651int
12652main ()
12653{
12654#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12655 not big endian
12656 #endif
a9322a30
TT
12657
12658 ;
12659 return 0;
12660}
bec39cab 12661_ACEOF
81ecdfbb 12662if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12663 ac_cv_c_bigendian=yes
5ee754fc 12664else
81ecdfbb 12665 ac_cv_c_bigendian=no
5ee754fc 12666fi
81ecdfbb
RW
12667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12668fi
12669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12670 fi
12671 if test $ac_cv_c_bigendian = unknown; then
12672 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12674/* end confdefs.h. */
12675#include <limits.h>
bec39cab 12676
81ecdfbb
RW
12677int
12678main ()
12679{
12680#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12681 bogus endian macros
12682 #endif
12683
12684 ;
12685 return 0;
12686}
7eb368b3 12687_ACEOF
81ecdfbb
RW
12688if ac_fn_c_try_compile "$LINENO"; then :
12689 # It does; now see whether it defined to _BIG_ENDIAN or not.
12690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12691/* end confdefs.h. */
81ecdfbb
RW
12692#include <limits.h>
12693
7eb368b3
NR
12694int
12695main ()
12696{
81ecdfbb
RW
12697#ifndef _BIG_ENDIAN
12698 not big endian
12699 #endif
12700
7eb368b3
NR
12701 ;
12702 return 0;
12703}
12704_ACEOF
81ecdfbb 12705if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12706 ac_cv_c_bigendian=yes
81ecdfbb
RW
12707else
12708 ac_cv_c_bigendian=no
a9322a30 12709fi
81ecdfbb 12710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12711fi
81ecdfbb
RW
12712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12713 fi
12714 if test $ac_cv_c_bigendian = unknown; then
12715 # Compile a test program.
12716 if test "$cross_compiling" = yes; then :
12717 # Try to guess by grepping values from an object file.
12718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12719/* end confdefs.h. */
12720short int ascii_mm[] =
12721 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12722 short int ascii_ii[] =
12723 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12724 int use_ascii (int i) {
12725 return ascii_mm[i] + ascii_ii[i];
12726 }
12727 short int ebcdic_ii[] =
12728 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12729 short int ebcdic_mm[] =
12730 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12731 int use_ebcdic (int i) {
12732 return ebcdic_mm[i] + ebcdic_ii[i];
12733 }
12734 extern int foo;
7eb368b3 12735
81ecdfbb
RW
12736int
12737main ()
12738{
12739return use_ascii (foo) == use_ebcdic (foo);
12740 ;
12741 return 0;
12742}
12743_ACEOF
12744if ac_fn_c_try_compile "$LINENO"; then :
12745 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12746 ac_cv_c_bigendian=yes
12747 fi
12748 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12749 if test "$ac_cv_c_bigendian" = unknown; then
12750 ac_cv_c_bigendian=no
12751 else
12752 # finding both strings is unlikely to happen, but who knows?
12753 ac_cv_c_bigendian=unknown
12754 fi
12755 fi
7eb368b3 12756fi
81ecdfbb 12757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12758else
81ecdfbb 12759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12760/* end confdefs.h. */
81ecdfbb 12761$ac_includes_default
d3ea6809
MM
12762int
12763main ()
12764{
81ecdfbb
RW
12765
12766 /* Are we little or big endian? From Harbison&Steele. */
12767 union
12768 {
12769 long int l;
12770 char c[sizeof (long int)];
12771 } u;
12772 u.l = 1;
12773 return u.c[sizeof (long int) - 1] == 1;
12774
12775 ;
12776 return 0;
d3ea6809
MM
12777}
12778_ACEOF
81ecdfbb 12779if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12780 ac_cv_c_bigendian=no
d3ea6809 12781else
81ecdfbb 12782 ac_cv_c_bigendian=yes
d3ea6809 12783fi
81ecdfbb
RW
12784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12785 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12786fi
a9322a30 12787
81ecdfbb
RW
12788 fi
12789fi
12790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12791$as_echo "$ac_cv_c_bigendian" >&6; }
12792 case $ac_cv_c_bigendian in #(
12793 yes)
12794 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12795;; #(
12796 no)
12797 ;; #(
12798 universal)
12799
12800$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12801
12802 ;; #(
12803 *)
d0ac1c44 12804 as_fn_error $? "unknown endianness
81ecdfbb
RW
12805 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12806 esac
d3ea6809
MM
12807
12808
a9322a30
TT
12809# ------------------------------ #
12810# Checks for library functions. #
12811# ------------------------------ #
d3ea6809 12812
d0ac1c44
SM
12813
12814
12815
12816 for ac_header in $ac_header_list
81ecdfbb
RW
12817do :
12818 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
d0ac1c44
SM
12819ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12820"
12821if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12822 cat >>confdefs.h <<_ACEOF
81ecdfbb 12823#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12824_ACEOF
b757528f 12825
b757528f 12826fi
bec39cab 12827
a9322a30 12828done
a3828db0 12829
d0ac1c44
SM
12830
12831
12832
12833
12834
12835
12836
a9322a30 12837for ac_func in getpagesize
81ecdfbb
RW
12838do :
12839 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12840if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12841 cat >>confdefs.h <<_ACEOF
81ecdfbb 12842#define HAVE_GETPAGESIZE 1
bec39cab 12843_ACEOF
bcb3dc3d 12844
bcb3dc3d
MK
12845fi
12846done
12847
81ecdfbb
RW
12848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12849$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12850if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12851 $as_echo_n "(cached) " >&6
a9322a30 12852else
81ecdfbb 12853 if test "$cross_compiling" = yes; then :
a9322a30 12854 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12855else
81ecdfbb 12856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12857/* end confdefs.h. */
a9322a30
TT
12858$ac_includes_default
12859/* malloc might have been renamed as rpl_malloc. */
12860#undef malloc
bec39cab 12861
a9322a30
TT
12862/* Thanks to Mike Haertel and Jim Avera for this test.
12863 Here is a matrix of mmap possibilities:
12864 mmap private not fixed
12865 mmap private fixed at somewhere currently unmapped
12866 mmap private fixed at somewhere already mapped
12867 mmap shared not fixed
12868 mmap shared fixed at somewhere currently unmapped
12869 mmap shared fixed at somewhere already mapped
12870 For private mappings, we should verify that changes cannot be read()
12871 back from the file, nor mmap's back from the file at a different
12872 address. (There have been systems where private was not correctly
12873 implemented like the infamous i386 svr4.0, and systems where the
12874 VM page cache was not coherent with the file system buffer cache
12875 like early versions of FreeBSD and possibly contemporary NetBSD.)
12876 For shared mappings, we should conversely verify that changes get
12877 propagated back to all the places they're supposed to be.
bec39cab 12878
a9322a30
TT
12879 Grep wants private fixed already mapped.
12880 The main things grep needs to know about mmap are:
12881 * does it exist and is it safe to write into the mmap'd area
12882 * how to use it (BSD variants) */
8b9cf735 12883
a9322a30
TT
12884#include <fcntl.h>
12885#include <sys/mman.h>
8b9cf735 12886
81ecdfbb 12887#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12888char *malloc ();
a3828db0
MK
12889#endif
12890
a9322a30 12891/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12892#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12893# ifdef _SC_PAGESIZE
12894# define getpagesize() sysconf(_SC_PAGESIZE)
12895# else /* no _SC_PAGESIZE */
81ecdfbb 12896# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12897# include <sys/param.h>
12898# ifdef EXEC_PAGESIZE
12899# define getpagesize() EXEC_PAGESIZE
12900# else /* no EXEC_PAGESIZE */
12901# ifdef NBPG
12902# define getpagesize() NBPG * CLSIZE
12903# ifndef CLSIZE
12904# define CLSIZE 1
12905# endif /* no CLSIZE */
12906# else /* no NBPG */
12907# ifdef NBPC
12908# define getpagesize() NBPC
12909# else /* no NBPC */
12910# ifdef PAGESIZE
12911# define getpagesize() PAGESIZE
12912# endif /* PAGESIZE */
12913# endif /* no NBPC */
12914# endif /* no NBPG */
12915# endif /* no EXEC_PAGESIZE */
12916# else /* no HAVE_SYS_PARAM_H */
12917# define getpagesize() 8192 /* punt totally */
12918# endif /* no HAVE_SYS_PARAM_H */
12919# endif /* no _SC_PAGESIZE */
12920
12921#endif /* no HAVE_GETPAGESIZE */
12922
bec39cab
AC
12923int
12924main ()
12925{
a9322a30 12926 char *data, *data2, *data3;
d0ac1c44 12927 const char *cdata2;
a9322a30 12928 int i, pagesize;
d0ac1c44 12929 int fd, fd2;
a9322a30
TT
12930
12931 pagesize = getpagesize ();
12932
12933 /* First, make a file with some known garbage in it. */
12934 data = (char *) malloc (pagesize);
12935 if (!data)
81ecdfbb 12936 return 1;
a9322a30
TT
12937 for (i = 0; i < pagesize; ++i)
12938 *(data + i) = rand ();
12939 umask (0);
12940 fd = creat ("conftest.mmap", 0600);
12941 if (fd < 0)
d0ac1c44 12942 return 2;
a9322a30 12943 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 12944 return 3;
a9322a30
TT
12945 close (fd);
12946
d0ac1c44
SM
12947 /* Next, check that the tail of a page is zero-filled. File must have
12948 non-zero length, otherwise we risk SIGBUS for entire page. */
12949 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12950 if (fd2 < 0)
12951 return 4;
12952 cdata2 = "";
12953 if (write (fd2, cdata2, 1) != 1)
12954 return 5;
12955 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12956 if (data2 == MAP_FAILED)
12957 return 6;
12958 for (i = 0; i < pagesize; ++i)
12959 if (*(data2 + i))
12960 return 7;
12961 close (fd2);
12962 if (munmap (data2, pagesize))
12963 return 8;
12964
a9322a30
TT
12965 /* Next, try to mmap the file at a fixed address which already has
12966 something else allocated at it. If we can, also make sure that
12967 we see the same garbage. */
12968 fd = open ("conftest.mmap", O_RDWR);
12969 if (fd < 0)
d0ac1c44 12970 return 9;
a9322a30
TT
12971 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12972 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 12973 return 10;
a9322a30
TT
12974 for (i = 0; i < pagesize; ++i)
12975 if (*(data + i) != *(data2 + i))
d0ac1c44 12976 return 11;
a9322a30
TT
12977
12978 /* Finally, make sure that changes to the mapped area do not
12979 percolate back to the file as seen by read(). (This is a bug on
12980 some variants of i386 svr4.0.) */
12981 for (i = 0; i < pagesize; ++i)
12982 *(data2 + i) = *(data2 + i) + 1;
12983 data3 = (char *) malloc (pagesize);
12984 if (!data3)
d0ac1c44 12985 return 12;
a9322a30 12986 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 12987 return 13;
a9322a30
TT
12988 for (i = 0; i < pagesize; ++i)
12989 if (*(data + i) != *(data3 + i))
d0ac1c44 12990 return 14;
a9322a30 12991 close (fd);
81ecdfbb 12992 return 0;
bec39cab
AC
12993}
12994_ACEOF
81ecdfbb 12995if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12996 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12997else
81ecdfbb 12998 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12999fi
81ecdfbb
RW
13000rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13001 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13002fi
81ecdfbb 13003
a9322a30 13004fi
81ecdfbb
RW
13005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13006$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13007if test $ac_cv_func_mmap_fixed_mapped = yes; then
13008
81ecdfbb 13009$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13010
086ec9eb 13011fi
d0ac1c44 13012rm -f conftest.mmap conftest.txt
a3828db0 13013
81ecdfbb 13014ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 13015if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 13016
a9322a30
TT
13017else
13018
13019cat >>confdefs.h <<_ACEOF
13020#define pid_t int
bec39cab 13021_ACEOF
086ec9eb
MK
13022
13023fi
13024
81ecdfbb
RW
13025for ac_header in vfork.h
13026do :
13027 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 13028if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13029 cat >>confdefs.h <<_ACEOF
81ecdfbb 13030#define HAVE_VFORK_H 1
bec39cab 13031_ACEOF
c906108c
SS
13032
13033fi
a9322a30 13034
a3828db0 13035done
c906108c 13036
a9322a30 13037for ac_func in fork vfork
81ecdfbb
RW
13038do :
13039 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13040ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13041if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13042 cat >>confdefs.h <<_ACEOF
81ecdfbb 13043#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13044_ACEOF
b83266a0 13045
97bf5e38 13046fi
a3828db0 13047done
b83266a0 13048
a9322a30 13049if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13051$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13052if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13053 $as_echo_n "(cached) " >&6
a9322a30 13054else
81ecdfbb 13055 if test "$cross_compiling" = yes; then :
a9322a30
TT
13056 ac_cv_func_fork_works=cross
13057else
81ecdfbb
RW
13058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13059/* end confdefs.h. */
13060$ac_includes_default
13061int
13062main ()
13063{
13064
13065 /* By Ruediger Kuhlmann. */
13066 return fork () < 0;
13067
13068 ;
13069 return 0;
13070}
a9322a30 13071_ACEOF
81ecdfbb 13072if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13073 ac_cv_func_fork_works=yes
13074else
81ecdfbb 13075 ac_cv_func_fork_works=no
a9322a30 13076fi
81ecdfbb
RW
13077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13078 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13079fi
81ecdfbb 13080
a9322a30 13081fi
81ecdfbb
RW
13082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13083$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13084
13085else
13086 ac_cv_func_fork_works=$ac_cv_func_fork
13087fi
13088if test "x$ac_cv_func_fork_works" = xcross; then
13089 case $host in
13090 *-*-amigaos* | *-*-msdosdjgpp*)
13091 # Override, as these systems have only a dummy fork() stub
13092 ac_cv_func_fork_works=no
13093 ;;
13094 *)
13095 ac_cv_func_fork_works=yes
13096 ;;
13097 esac
81ecdfbb
RW
13098 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13099$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13100fi
13101ac_cv_func_vfork_works=$ac_cv_func_vfork
13102if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13104$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13105if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13106 $as_echo_n "(cached) " >&6
a9322a30 13107else
81ecdfbb 13108 if test "$cross_compiling" = yes; then :
a9322a30
TT
13109 ac_cv_func_vfork_works=cross
13110else
81ecdfbb 13111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13112/* end confdefs.h. */
13113/* Thanks to Paul Eggert for this test. */
81ecdfbb 13114$ac_includes_default
a9322a30 13115#include <sys/wait.h>
81ecdfbb 13116#ifdef HAVE_VFORK_H
a9322a30
TT
13117# include <vfork.h>
13118#endif
13119/* On some sparc systems, changes by the child to local and incoming
13120 argument registers are propagated back to the parent. The compiler
13121 is told about this with #include <vfork.h>, but some compilers
13122 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13123 static variable whose address is put into a register that is
13124 clobbered by the vfork. */
13125static void
13126#ifdef __cplusplus
13127sparc_address_test (int arg)
13128# else
13129sparc_address_test (arg) int arg;
13130#endif
13131{
13132 static pid_t child;
13133 if (!child) {
13134 child = vfork ();
13135 if (child < 0) {
13136 perror ("vfork");
13137 _exit(2);
13138 }
13139 if (!child) {
13140 arg = getpid();
13141 write(-1, "", 0);
13142 _exit (arg);
13143 }
13144 }
13145}
13146
13147int
13148main ()
13149{
13150 pid_t parent = getpid ();
13151 pid_t child;
13152
13153 sparc_address_test (0);
13154
13155 child = vfork ();
13156
13157 if (child == 0) {
13158 /* Here is another test for sparc vfork register problems. This
13159 test uses lots of local variables, at least as many local
13160 variables as main has allocated so far including compiler
13161 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13162 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13163 reuse the register of parent for one of the local variables,
13164 since it will think that parent can't possibly be used any more
13165 in this routine. Assigning to the local variable will thus
13166 munge parent in the parent process. */
13167 pid_t
13168 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13169 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13170 /* Convince the compiler that p..p7 are live; otherwise, it might
13171 use the same hardware register for all 8 local variables. */
13172 if (p != p1 || p != p2 || p != p3 || p != p4
13173 || p != p5 || p != p6 || p != p7)
13174 _exit(1);
13175
13176 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13177 from child file descriptors. If the child closes a descriptor
13178 before it execs or exits, this munges the parent's descriptor
13179 as well. Test for this by closing stdout in the child. */
13180 _exit(close(fileno(stdout)) != 0);
13181 } else {
13182 int status;
13183 struct stat st;
13184
13185 while (wait(&status) != child)
13186 ;
81ecdfbb 13187 return (
a9322a30
TT
13188 /* Was there some problem with vforking? */
13189 child < 0
13190
13191 /* Did the child fail? (This shouldn't happen.) */
13192 || status
13193
13194 /* Did the vfork/compiler bug occur? */
13195 || parent != getpid()
13196
13197 /* Did the file descriptor bug occur? */
13198 || fstat(fileno(stdout), &st) != 0
13199 );
13200 }
13201}
13202_ACEOF
81ecdfbb 13203if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13204 ac_cv_func_vfork_works=yes
13205else
81ecdfbb 13206 ac_cv_func_vfork_works=no
a9322a30 13207fi
81ecdfbb
RW
13208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13209 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13210fi
81ecdfbb 13211
a9322a30 13212fi
81ecdfbb
RW
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13214$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13215
13216fi;
13217if test "x$ac_cv_func_fork_works" = xcross; then
13218 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13219 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13220$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13221fi
13222
13223if test "x$ac_cv_func_vfork_works" = xyes; then
13224
81ecdfbb 13225$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13226
13227else
13228
81ecdfbb 13229$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13230
13231fi
13232if test "x$ac_cv_func_fork_works" = xyes; then
13233
81ecdfbb 13234$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13235
13236fi
13237
cdf43629 13238for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13239 pipe poll pread pread64 pwrite resize_term \
e671cd59 13240 sbrk getpgid setpgid setpgrp setsid \
c12d372d 13241 sigaction sigsetmask socketpair \
110ed339 13242 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13243 setrlimit getrlimit posix_madvise waitpid \
e48f6033 13244 ptrace64 sigaltstack setns use_default_colors
81ecdfbb
RW
13245do :
13246 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13247ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13248if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13249 cat >>confdefs.h <<_ACEOF
81ecdfbb 13250#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13251_ACEOF
13252
13253fi
13254done
13255
13256
81ecdfbb
RW
13257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13258$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13259if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13260 $as_echo_n "(cached) " >&6
6c7a06a3 13261else
81ecdfbb 13262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13263/* end confdefs.h. */
13264#include <langinfo.h>
13265int
13266main ()
13267{
13268char* cs = nl_langinfo(CODESET);
bec39cab
AC
13269 ;
13270 return 0;
13271}
13272_ACEOF
81ecdfbb 13273if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13274 am_cv_langinfo_codeset=yes
a4db0f07 13275else
81ecdfbb 13276 am_cv_langinfo_codeset=no
a4db0f07 13277fi
81ecdfbb
RW
13278rm -f core conftest.err conftest.$ac_objext \
13279 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13280
a4db0f07 13281fi
81ecdfbb
RW
13282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13283$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13284 if test $am_cv_langinfo_codeset = yes; then
13285
81ecdfbb 13286$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13287
6c7a06a3 13288 fi
c906108c 13289
d0ac1c44
SM
13290ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13291if test "x$ac_cv_type_size_t" = xyes; then :
13292
13293else
13294
13295cat >>confdefs.h <<_ACEOF
13296#define size_t unsigned int
13297_ACEOF
13298
13299fi
13300
5e030278
TT
13301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13302$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13303if ${ac_cv_path_SED+:} false; then :
13304 $as_echo_n "(cached) " >&6
13305else
13306 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13307 for ac_i in 1 2 3 4 5 6 7; do
13308 ac_script="$ac_script$as_nl$ac_script"
13309 done
13310 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13311 { ac_script=; unset ac_script;}
13312 if test -z "$SED"; then
13313 ac_path_SED_found=false
13314 # Loop through the user's path and test for each of PROGNAME-LIST
13315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13316for as_dir in $PATH
13317do
13318 IFS=$as_save_IFS
13319 test -z "$as_dir" && as_dir=.
13320 for ac_prog in sed gsed; do
13321 for ac_exec_ext in '' $ac_executable_extensions; do
13322 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13323 as_fn_executable_p "$ac_path_SED" || continue
13324# Check for GNU ac_path_SED and select it if it is found.
13325 # Check for GNU $ac_path_SED
13326case `"$ac_path_SED" --version 2>&1` in
13327*GNU*)
13328 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13329*)
13330 ac_count=0
13331 $as_echo_n 0123456789 >"conftest.in"
13332 while :
13333 do
13334 cat "conftest.in" "conftest.in" >"conftest.tmp"
13335 mv "conftest.tmp" "conftest.in"
13336 cp "conftest.in" "conftest.nl"
13337 $as_echo '' >> "conftest.nl"
13338 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13339 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13340 as_fn_arith $ac_count + 1 && ac_count=$as_val
13341 if test $ac_count -gt ${ac_path_SED_max-0}; then
13342 # Best one so far, save it but keep looking for a better one
13343 ac_cv_path_SED="$ac_path_SED"
13344 ac_path_SED_max=$ac_count
13345 fi
13346 # 10*(2^10) chars as input seems more than enough
13347 test $ac_count -gt 10 && break
13348 done
13349 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13350esac
13351
13352 $ac_path_SED_found && break 3
13353 done
13354 done
13355 done
13356IFS=$as_save_IFS
13357 if test -z "$ac_cv_path_SED"; then
13358 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13359 fi
13360else
13361 ac_cv_path_SED=$SED
13362fi
13363
13364fi
13365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13366$as_echo "$ac_cv_path_SED" >&6; }
13367 SED="$ac_cv_path_SED"
13368 rm -f conftest.sed
13369
06825bd1 13370
3266f10b
TT
13371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13372$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 13373if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13374 $as_echo_n "(cached) " >&6
13375else
13376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13377/* end confdefs.h. */
13378#include <stdlib.h>
13379#include <stdarg.h>
13380#include <string.h>
13381#include <float.h>
13382
13383int
13384main ()
13385{
13386
13387 ;
13388 return 0;
13389}
13390_ACEOF
13391if ac_fn_c_try_compile "$LINENO"; then :
13392 ac_cv_header_stdc=yes
13393else
13394 ac_cv_header_stdc=no
13395fi
13396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13397
13398if test $ac_cv_header_stdc = yes; then
13399 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13401/* end confdefs.h. */
13402#include <string.h>
13403
13404_ACEOF
13405if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13406 $EGREP "memchr" >/dev/null 2>&1; then :
13407
13408else
13409 ac_cv_header_stdc=no
13410fi
13411rm -f conftest*
13412
13413fi
13414
13415if test $ac_cv_header_stdc = yes; then
13416 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13418/* end confdefs.h. */
13419#include <stdlib.h>
13420
13421_ACEOF
13422if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13423 $EGREP "free" >/dev/null 2>&1; then :
13424
13425else
13426 ac_cv_header_stdc=no
13427fi
13428rm -f conftest*
13429
13430fi
13431
13432if test $ac_cv_header_stdc = yes; then
13433 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13434 if test "$cross_compiling" = yes; then :
13435 :
13436else
13437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13438/* end confdefs.h. */
13439#include <ctype.h>
13440#include <stdlib.h>
13441#if ((' ' & 0x0FF) == 0x020)
13442# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13443# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13444#else
13445# define ISLOWER(c) \
13446 (('a' <= (c) && (c) <= 'i') \
13447 || ('j' <= (c) && (c) <= 'r') \
13448 || ('s' <= (c) && (c) <= 'z'))
13449# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13450#endif
13451
13452#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13453int
13454main ()
13455{
13456 int i;
13457 for (i = 0; i < 256; i++)
13458 if (XOR (islower (i), ISLOWER (i))
13459 || toupper (i) != TOUPPER (i))
13460 return 2;
13461 return 0;
13462}
13463_ACEOF
13464if ac_fn_c_try_run "$LINENO"; then :
13465
13466else
13467 ac_cv_header_stdc=no
13468fi
13469rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13470 conftest.$ac_objext conftest.beam conftest.$ac_ext
13471fi
13472
13473fi
13474fi
13475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13476$as_echo "$ac_cv_header_stdc" >&6; }
13477if test $ac_cv_header_stdc = yes; then
13478
13479$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13480
3266f10b
TT
13481fi
13482
13483 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13484# for constant arguments. Useless!
13485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13486$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 13487if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13488 $as_echo_n "(cached) " >&6
13489else
13490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13491/* end confdefs.h. */
13492#include <alloca.h>
13493int
13494main ()
13495{
13496char *p = (char *) alloca (2 * sizeof (int));
13497 if (p) return 0;
13498 ;
13499 return 0;
13500}
13501_ACEOF
13502if ac_fn_c_try_link "$LINENO"; then :
13503 ac_cv_working_alloca_h=yes
13504else
13505 ac_cv_working_alloca_h=no
13506fi
13507rm -f core conftest.err conftest.$ac_objext \
13508 conftest$ac_exeext conftest.$ac_ext
13509fi
13510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13511$as_echo "$ac_cv_working_alloca_h" >&6; }
13512if test $ac_cv_working_alloca_h = yes; then
13513
13514$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13515
13516fi
13517
13518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13519$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 13520if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13521 $as_echo_n "(cached) " >&6
13522else
13523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13524/* end confdefs.h. */
13525#ifdef __GNUC__
13526# define alloca __builtin_alloca
13527#else
13528# ifdef _MSC_VER
13529# include <malloc.h>
13530# define alloca _alloca
13531# else
13532# ifdef HAVE_ALLOCA_H
13533# include <alloca.h>
13534# else
13535# ifdef _AIX
13536 #pragma alloca
13537# else
13538# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 13539void *alloca (size_t);
3266f10b
TT
13540# endif
13541# endif
13542# endif
13543# endif
13544#endif
13545
13546int
13547main ()
13548{
13549char *p = (char *) alloca (1);
13550 if (p) return 0;
13551 ;
13552 return 0;
13553}
13554_ACEOF
13555if ac_fn_c_try_link "$LINENO"; then :
13556 ac_cv_func_alloca_works=yes
13557else
13558 ac_cv_func_alloca_works=no
13559fi
13560rm -f core conftest.err conftest.$ac_objext \
13561 conftest$ac_exeext conftest.$ac_ext
13562fi
13563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13564$as_echo "$ac_cv_func_alloca_works" >&6; }
13565
13566if test $ac_cv_func_alloca_works = yes; then
13567
13568$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13569
13570else
13571 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13572# that cause trouble. Some versions do not even contain alloca or
13573# contain a buggy version. If you still want to use their alloca,
13574# use ar to extract alloca.o from them instead of compiling alloca.c.
13575
13576ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13577
13578$as_echo "#define C_ALLOCA 1" >>confdefs.h
13579
13580
13581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13582$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 13583if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13584 $as_echo_n "(cached) " >&6
13585else
13586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13587/* end confdefs.h. */
13588#if defined CRAY && ! defined CRAY2
13589webecray
13590#else
13591wenotbecray
13592#endif
13593
13594_ACEOF
13595if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13596 $EGREP "webecray" >/dev/null 2>&1; then :
13597 ac_cv_os_cray=yes
13598else
13599 ac_cv_os_cray=no
13600fi
13601rm -f conftest*
13602
13603fi
13604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13605$as_echo "$ac_cv_os_cray" >&6; }
13606if test $ac_cv_os_cray = yes; then
13607 for ac_func in _getb67 GETB67 getb67; do
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 :
3266f10b
TT
13611
13612cat >>confdefs.h <<_ACEOF
13613#define CRAY_STACKSEG_END $ac_func
13614_ACEOF
13615
13616 break
13617fi
13618
13619 done
13620fi
13621
13622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13623$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 13624if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13625 $as_echo_n "(cached) " >&6
13626else
13627 if test "$cross_compiling" = yes; then :
13628 ac_cv_c_stack_direction=0
13629else
13630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13631/* end confdefs.h. */
13632$ac_includes_default
13633int
d0ac1c44 13634find_stack_direction (int *addr, int depth)
3266f10b 13635{
d0ac1c44
SM
13636 int dir, dummy = 0;
13637 if (! addr)
13638 addr = &dummy;
13639 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13640 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13641 return dir + dummy;
3266f10b
TT
13642}
13643
13644int
d0ac1c44 13645main (int argc, char **argv)
3266f10b 13646{
d0ac1c44 13647 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13648}
13649_ACEOF
13650if ac_fn_c_try_run "$LINENO"; then :
13651 ac_cv_c_stack_direction=1
13652else
13653 ac_cv_c_stack_direction=-1
13654fi
13655rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13656 conftest.$ac_objext conftest.beam conftest.$ac_ext
13657fi
13658
13659fi
13660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13661$as_echo "$ac_cv_c_stack_direction" >&6; }
13662cat >>confdefs.h <<_ACEOF
13663#define STACK_DIRECTION $ac_cv_c_stack_direction
13664_ACEOF
13665
13666
13667fi
13668
13669
13670
13671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13672$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13673if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13674 $as_echo_n "(cached) " >&6
13675else
13676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13677/* end confdefs.h. */
13678#include <langinfo.h>
13679int
13680main ()
13681{
13682char* cs = nl_langinfo(CODESET);
13683 ;
13684 return 0;
13685}
13686_ACEOF
13687if ac_fn_c_try_link "$LINENO"; then :
13688 am_cv_langinfo_codeset=yes
13689else
13690 am_cv_langinfo_codeset=no
13691fi
13692rm -f core conftest.err conftest.$ac_objext \
13693 conftest$ac_exeext conftest.$ac_ext
13694
13695fi
13696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13697$as_echo "$am_cv_langinfo_codeset" >&6; }
13698 if test $am_cv_langinfo_codeset = yes; then
13699
13700$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13701
13702 fi
13703
13704
2d41fa11 13705 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
3266f10b
TT
13706do :
13707 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13708ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13709if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13710 cat >>confdefs.h <<_ACEOF
13711#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13712_ACEOF
13713
13714fi
13715
13716done
13717
13718
c12d372d 13719 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
5abebf3c 13720 sigprocmask
3266f10b
TT
13721do :
13722 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13723ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13724if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13725 cat >>confdefs.h <<_ACEOF
13726#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13727_ACEOF
13728
13729fi
13730done
13731
13732
ab7d13f0 13733 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 13734if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13735 ac_have_decl=1
13736else
13737 ac_have_decl=0
13738fi
13739
13740cat >>confdefs.h <<_ACEOF
13741#define HAVE_DECL_STRSTR $ac_have_decl
13742_ACEOF
13743
13744
5e030278
TT
13745 # Check for std::thread. This does not work on some platforms, like
13746 # mingw and DJGPP.
13747 ac_ext=cpp
13748ac_cpp='$CXXCPP $CPPFLAGS'
13749ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13750ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13751ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13752
13753
13754
13755
13756
13757ac_ext=c
13758ac_cpp='$CPP $CPPFLAGS'
13759ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13760ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13761ac_compiler_gnu=$ac_cv_c_compiler_gnu
13762
13763ax_pthread_ok=no
13764
13765# We used to check for pthread.h first, but this fails if pthread.h
13766# requires special compiler flags (e.g. on Tru64 or Sequent).
13767# It gets checked for in the link test anyway.
13768
13769# First of all, check if the user has set any of the PTHREAD_LIBS,
13770# etcetera environment variables, and if threads linking works using
13771# them:
13772if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13773 ax_pthread_save_CC="$CC"
13774 ax_pthread_save_CFLAGS="$CFLAGS"
13775 ax_pthread_save_LIBS="$LIBS"
13776 if test "x$PTHREAD_CC" != "x"; then :
13777 CC="$PTHREAD_CC"
13778fi
13779 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13780 LIBS="$PTHREAD_LIBS $LIBS"
13781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13782$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13784/* end confdefs.h. */
13785
13786/* Override any GCC internal prototype to avoid an error.
13787 Use char because int might match the return type of a GCC
13788 builtin and then its argument prototype would still apply. */
13789#ifdef __cplusplus
13790extern "C"
13791#endif
13792char pthread_join ();
13793int
13794main ()
13795{
13796return pthread_join ();
13797 ;
13798 return 0;
13799}
13800_ACEOF
13801if ac_fn_c_try_link "$LINENO"; then :
13802 ax_pthread_ok=yes
13803fi
13804rm -f core conftest.err conftest.$ac_objext \
13805 conftest$ac_exeext conftest.$ac_ext
13806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13807$as_echo "$ax_pthread_ok" >&6; }
13808 if test "x$ax_pthread_ok" = "xno"; then
13809 PTHREAD_LIBS=""
13810 PTHREAD_CFLAGS=""
13811 fi
13812 CC="$ax_pthread_save_CC"
13813 CFLAGS="$ax_pthread_save_CFLAGS"
13814 LIBS="$ax_pthread_save_LIBS"
13815fi
13816
13817# We must check for the threads library under a number of different
13818# names; the ordering is very important because some systems
13819# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13820# libraries is broken (non-POSIX).
13821
13822# Create a list of thread flags to try. Items starting with a "-" are
13823# C compiler flags, and other items are library names, except for "none"
13824# which indicates that we try without any flags at all, and "pthread-config"
13825# which is a program returning the flags for the Pth emulation library.
13826
13827ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
13828
13829# The ordering *is* (sometimes) important. Some notes on the
13830# individual items follow:
13831
13832# pthreads: AIX (must check this before -lpthread)
13833# none: in case threads are in libc; should be tried before -Kthread and
13834# other compiler flags to prevent continual compiler warnings
13835# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13836# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13837# (Note: HP C rejects this with "bad form for `-t' option")
13838# -pthreads: Solaris/gcc (Note: HP C also rejects)
13839# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13840# doesn't hurt to check since this sometimes defines pthreads and
13841# -D_REENTRANT too), HP C (must be checked before -lpthread, which
13842# is present but should not be used directly; and before -mthreads,
13843# because the compiler interprets this as "-mt" + "-hreads")
13844# -mthreads: Mingw32/gcc, Lynx/gcc
13845# pthread: Linux, etcetera
13846# --thread-safe: KAI C++
13847# pthread-config: use pthread-config program (for GNU Pth library)
13848
13849case $host_os in
13850
13851 freebsd*)
13852
13853 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13854 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
13855
13856 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13857 ;;
13858
13859 hpux*)
13860
13861 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13862 # multi-threading and also sets -lpthread."
13863
13864 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13865 ;;
13866
13867 openedition*)
13868
13869 # IBM z/OS requires a feature-test macro to be defined in order to
13870 # enable POSIX threads at all, so give the user a hint if this is
13871 # not set. (We don't define these ourselves, as they can affect
13872 # other portions of the system API in unpredictable ways.)
13873
13874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13875/* end confdefs.h. */
13876
13877# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13878 AX_PTHREAD_ZOS_MISSING
13879# endif
13880
13881_ACEOF
13882if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13883 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13884 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13885$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
13886fi
13887rm -f conftest*
13888
13889 ;;
13890
13891 solaris*)
13892
13893 # On Solaris (at least, for some versions), libc contains stubbed
13894 # (non-functional) versions of the pthreads routines, so link-based
13895 # tests will erroneously succeed. (N.B.: The stubs are missing
13896 # pthread_cleanup_push, or rather a function called by this macro,
13897 # so we could check for that, but who knows whether they'll stub
13898 # that too in a future libc.) So we'll check first for the
13899 # standard Solaris way of linking pthreads (-mt -lpthread).
13900
13901 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13902 ;;
13903esac
13904
13905# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13906
13907if test "x$GCC" = "xyes"; then :
13908 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
13909fi
13910
13911# The presence of a feature test macro requesting re-entrant function
13912# definitions is, on some systems, a strong hint that pthreads support is
13913# correctly enabled
13914
13915case $host_os in
13916 darwin* | hpux* | linux* | osf* | solaris*)
13917 ax_pthread_check_macro="_REENTRANT"
13918 ;;
13919
13920 aix*)
13921 ax_pthread_check_macro="_THREAD_SAFE"
13922 ;;
13923
13924 *)
13925 ax_pthread_check_macro="--"
13926 ;;
13927esac
13928if test "x$ax_pthread_check_macro" = "x--"; then :
13929 ax_pthread_check_cond=0
13930else
13931 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
13932fi
13933
13934# Are we compiling with Clang?
13935
13936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13937$as_echo_n "checking whether $CC is Clang... " >&6; }
13938if ${ax_cv_PTHREAD_CLANG+:} false; then :
13939 $as_echo_n "(cached) " >&6
13940else
13941 ax_cv_PTHREAD_CLANG=no
13942 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13943 if test "x$GCC" = "xyes"; then
13944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13945/* end confdefs.h. */
13946/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13947# if defined(__clang__) && defined(__llvm__)
13948 AX_PTHREAD_CC_IS_CLANG
13949# endif
13950
13951_ACEOF
13952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13953 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13954 ax_cv_PTHREAD_CLANG=yes
13955fi
13956rm -f conftest*
13957
13958 fi
13959
13960fi
13961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13962$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13963ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
13964
13965ax_pthread_clang_warning=no
13966
13967# Clang needs special handling, because older versions handle the -pthread
13968# option in a rather... idiosyncratic way
13969
13970if test "x$ax_pthread_clang" = "xyes"; then
13971
13972 # Clang takes -pthread; it has never supported any other flag
13973
13974 # (Note 1: This will need to be revisited if a system that Clang
13975 # supports has POSIX threads in a separate library. This tends not
13976 # to be the way of modern systems, but it's conceivable.)
13977
13978 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13979 # to get POSIX threads support; the API is always present and
13980 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13981 # -pthread does define _REENTRANT, and while the Darwin headers
13982 # ignore this macro, third-party headers might not.)
13983
13984 PTHREAD_CFLAGS="-pthread"
13985 PTHREAD_LIBS=
13986
13987 ax_pthread_ok=yes
13988
13989 # However, older versions of Clang make a point of warning the user
13990 # that, in an invocation where only linking and no compilation is
13991 # taking place, the -pthread option has no effect ("argument unused
13992 # during compilation"). They expect -pthread to be passed in only
13993 # when source code is being compiled.
13994 #
13995 # Problem is, this is at odds with the way Automake and most other
13996 # C build frameworks function, which is that the same flags used in
13997 # compilation (CFLAGS) are also used in linking. Many systems
13998 # supported by AX_PTHREAD require exactly this for POSIX threads
13999 # support, and in fact it is often not straightforward to specify a
14000 # flag that is used only in the compilation phase and not in
14001 # linking. Such a scenario is extremely rare in practice.
14002 #
14003 # Even though use of the -pthread flag in linking would only print
14004 # a warning, this can be a nuisance for well-run software projects
14005 # that build with -Werror. So if the active version of Clang has
14006 # this misfeature, we search for an option to squash it.
14007
14008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
14009$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
14010if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
14011 $as_echo_n "(cached) " >&6
14012else
14013 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
14014 # Create an alternate version of $ac_link that compiles and
14015 # links in two steps (.c -> .o, .o -> exe) instead of one
14016 # (.c -> exe), because the warning occurs only in the second
14017 # step
14018 ax_pthread_save_ac_link="$ac_link"
14019 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
14020 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
14021 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
14022 ax_pthread_save_CFLAGS="$CFLAGS"
14023 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
14024 if test "x$ax_pthread_try" = "xunknown"; then :
14025 break
14026fi
14027 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
14028 ac_link="$ax_pthread_save_ac_link"
14029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14030/* end confdefs.h. */
14031int main(void){return 0;}
14032_ACEOF
14033if ac_fn_c_try_link "$LINENO"; then :
14034 ac_link="$ax_pthread_2step_ac_link"
14035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14036/* end confdefs.h. */
14037int main(void){return 0;}
14038_ACEOF
14039if ac_fn_c_try_link "$LINENO"; then :
14040 break
14041fi
14042rm -f core conftest.err conftest.$ac_objext \
14043 conftest$ac_exeext conftest.$ac_ext
14044
14045fi
14046rm -f core conftest.err conftest.$ac_objext \
14047 conftest$ac_exeext conftest.$ac_ext
14048 done
14049 ac_link="$ax_pthread_save_ac_link"
14050 CFLAGS="$ax_pthread_save_CFLAGS"
14051 if test "x$ax_pthread_try" = "x"; then :
14052 ax_pthread_try=no
14053fi
14054 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
14055
14056fi
14057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
14058$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
14059
14060 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
14061 no | unknown) ;;
14062 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
14063 esac
14064
14065fi # $ax_pthread_clang = yes
14066
14067if test "x$ax_pthread_ok" = "xno"; then
14068for ax_pthread_try_flag in $ax_pthread_flags; do
14069
14070 case $ax_pthread_try_flag in
14071 none)
14072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
14073$as_echo_n "checking whether pthreads work without any flags... " >&6; }
14074 ;;
14075
14076 -mt,pthread)
14077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
14078$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
14079 PTHREAD_CFLAGS="-mt"
14080 PTHREAD_LIBS="-lpthread"
14081 ;;
14082
14083 -*)
14084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
14085$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
14086 PTHREAD_CFLAGS="$ax_pthread_try_flag"
14087 ;;
14088
14089 pthread-config)
14090 # Extract the first word of "pthread-config", so it can be a program name with args.
14091set dummy pthread-config; ac_word=$2
14092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14093$as_echo_n "checking for $ac_word... " >&6; }
14094if ${ac_cv_prog_ax_pthread_config+:} false; then :
14095 $as_echo_n "(cached) " >&6
14096else
14097 if test -n "$ax_pthread_config"; then
14098 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
14099else
14100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14101for as_dir in $PATH
14102do
14103 IFS=$as_save_IFS
14104 test -z "$as_dir" && as_dir=.
14105 for ac_exec_ext in '' $ac_executable_extensions; do
14106 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14107 ac_cv_prog_ax_pthread_config="yes"
14108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14109 break 2
14110 fi
14111done
14112 done
14113IFS=$as_save_IFS
14114
14115 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
14116fi
14117fi
14118ax_pthread_config=$ac_cv_prog_ax_pthread_config
14119if test -n "$ax_pthread_config"; then
14120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
14121$as_echo "$ax_pthread_config" >&6; }
14122else
14123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14124$as_echo "no" >&6; }
14125fi
14126
14127
14128 if test "x$ax_pthread_config" = "xno"; then :
14129 continue
14130fi
14131 PTHREAD_CFLAGS="`pthread-config --cflags`"
14132 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
14133 ;;
14134
14135 *)
14136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
14137$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
14138 PTHREAD_LIBS="-l$ax_pthread_try_flag"
14139 ;;
14140 esac
14141
14142 ax_pthread_save_CFLAGS="$CFLAGS"
14143 ax_pthread_save_LIBS="$LIBS"
14144 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14145 LIBS="$PTHREAD_LIBS $LIBS"
14146
14147 # Check for various functions. We must include pthread.h,
14148 # since some functions may be macros. (On the Sequent, we
14149 # need a special flag -Kthread to make this header compile.)
14150 # We check for pthread_join because it is in -lpthread on IRIX
14151 # while pthread_create is in libc. We check for pthread_attr_init
14152 # due to DEC craziness with -lpthreads. We check for
14153 # pthread_cleanup_push because it is one of the few pthread
14154 # functions on Solaris that doesn't have a non-functional libc stub.
14155 # We try pthread_create on general principles.
14156
14157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14158/* end confdefs.h. */
14159#include <pthread.h>
14160# if $ax_pthread_check_cond
14161# error "$ax_pthread_check_macro must be defined"
14162# endif
14163 static void routine(void *a) { a = 0; }
14164 static void *start_routine(void *a) { return a; }
14165int
14166main ()
14167{
14168pthread_t th; pthread_attr_t attr;
14169 pthread_create(&th, 0, start_routine, 0);
14170 pthread_join(th, 0);
14171 pthread_attr_init(&attr);
14172 pthread_cleanup_push(routine, 0);
14173 pthread_cleanup_pop(0) /* ; */
14174 ;
14175 return 0;
14176}
14177_ACEOF
14178if ac_fn_c_try_link "$LINENO"; then :
14179 ax_pthread_ok=yes
14180fi
14181rm -f core conftest.err conftest.$ac_objext \
14182 conftest$ac_exeext conftest.$ac_ext
14183
14184 CFLAGS="$ax_pthread_save_CFLAGS"
14185 LIBS="$ax_pthread_save_LIBS"
14186
14187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14188$as_echo "$ax_pthread_ok" >&6; }
14189 if test "x$ax_pthread_ok" = "xyes"; then :
14190 break
14191fi
14192
14193 PTHREAD_LIBS=""
14194 PTHREAD_CFLAGS=""
14195done
14196fi
14197
14198# Various other checks:
14199if test "x$ax_pthread_ok" = "xyes"; then
14200 ax_pthread_save_CFLAGS="$CFLAGS"
14201 ax_pthread_save_LIBS="$LIBS"
14202 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14203 LIBS="$PTHREAD_LIBS $LIBS"
14204
14205 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14207$as_echo_n "checking for joinable pthread attribute... " >&6; }
14208if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14209 $as_echo_n "(cached) " >&6
14210else
14211 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14212 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14214/* end confdefs.h. */
14215#include <pthread.h>
14216int
14217main ()
14218{
14219int attr = $ax_pthread_attr; return attr /* ; */
14220 ;
14221 return 0;
14222}
14223_ACEOF
14224if ac_fn_c_try_link "$LINENO"; then :
14225 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14226fi
14227rm -f core conftest.err conftest.$ac_objext \
14228 conftest$ac_exeext conftest.$ac_ext
14229 done
14230
14231fi
14232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14233$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14234 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14235 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14236 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
14237
14238cat >>confdefs.h <<_ACEOF
14239#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14240_ACEOF
14241
14242 ax_pthread_joinable_attr_defined=yes
14243
14244fi
14245
14246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14247$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14248if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14249 $as_echo_n "(cached) " >&6
14250else
14251 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14252 case $host_os in
14253 solaris*)
14254 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14255 ;;
14256 esac
14257
14258fi
14259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14260$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14261 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14262 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14263 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14264 ax_pthread_special_flags_added=yes
14265fi
14266
14267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14268$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14269if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14270 $as_echo_n "(cached) " >&6
14271else
14272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14273/* end confdefs.h. */
14274#include <pthread.h>
14275int
14276main ()
14277{
14278int i = PTHREAD_PRIO_INHERIT;
14279 ;
14280 return 0;
14281}
14282_ACEOF
14283if ac_fn_c_try_link "$LINENO"; then :
14284 ax_cv_PTHREAD_PRIO_INHERIT=yes
14285else
14286 ax_cv_PTHREAD_PRIO_INHERIT=no
14287fi
14288rm -f core conftest.err conftest.$ac_objext \
14289 conftest$ac_exeext conftest.$ac_ext
14290
14291fi
14292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14293$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14294 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14295 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
14296
14297$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
14298
14299 ax_pthread_prio_inherit_defined=yes
14300
14301fi
14302
14303 CFLAGS="$ax_pthread_save_CFLAGS"
14304 LIBS="$ax_pthread_save_LIBS"
14305
14306 # More AIX lossage: compile with *_r variant
14307 if test "x$GCC" != "xyes"; then
14308 case $host_os in
14309 aix*)
14310 case "x/$CC" in #(
14311 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14312 #handle absolute path differently from PATH based program lookup
14313 case "x$CC" in #(
14314 x/*) :
14315 if as_fn_executable_p ${CC}_r; then :
14316 PTHREAD_CC="${CC}_r"
14317fi ;; #(
14318 *) :
14319 for ac_prog in ${CC}_r
14320do
14321 # Extract the first word of "$ac_prog", so it can be a program name with args.
14322set dummy $ac_prog; ac_word=$2
14323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14324$as_echo_n "checking for $ac_word... " >&6; }
14325if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14326 $as_echo_n "(cached) " >&6
14327else
14328 if test -n "$PTHREAD_CC"; then
14329 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14330else
14331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14332for as_dir in $PATH
14333do
14334 IFS=$as_save_IFS
14335 test -z "$as_dir" && as_dir=.
14336 for ac_exec_ext in '' $ac_executable_extensions; do
14337 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14338 ac_cv_prog_PTHREAD_CC="$ac_prog"
14339 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14340 break 2
14341 fi
14342done
14343 done
14344IFS=$as_save_IFS
14345
14346fi
14347fi
14348PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14349if test -n "$PTHREAD_CC"; then
14350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14351$as_echo "$PTHREAD_CC" >&6; }
14352else
14353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14354$as_echo "no" >&6; }
14355fi
14356
14357
14358 test -n "$PTHREAD_CC" && break
14359done
14360test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14361 ;;
14362esac ;; #(
14363 *) :
14364 ;;
14365esac
14366 ;;
14367 esac
14368 fi
14369fi
14370
14371test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14372
14373
14374
14375
14376
14377# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14378if test "x$ax_pthread_ok" = "xyes"; then
14379 threads=yes
14380 :
14381else
14382 ax_pthread_ok=no
14383 threads=no
14384fi
14385ac_ext=cpp
14386ac_cpp='$CXXCPP $CPPFLAGS'
14387ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14388ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14389ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14390
14391
14392 if test "$threads" = "yes"; then
14393 save_LIBS="$LIBS"
14394 LIBS="$PTHREAD_LIBS $LIBS"
14395 save_CXXFLAGS="$CXXFLAGS"
14396 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14398$as_echo_n "checking for std::thread... " >&6; }
14399if ${gdb_cv_cxx_std_thread+:} false; then :
14400 $as_echo_n "(cached) " >&6
14401else
14402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14403/* end confdefs.h. */
14404#include <thread>
14405 void callback() { }
14406int
14407main ()
14408{
14409std::thread t(callback);
14410 ;
14411 return 0;
14412}
14413_ACEOF
14414if ac_fn_cxx_try_compile "$LINENO"; then :
14415 gdb_cv_cxx_std_thread=yes
14416else
14417 gdb_cv_cxx_std_thread=no
14418fi
14419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14420fi
14421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14422$as_echo "$gdb_cv_cxx_std_thread" >&6; }
21987b9c
TT
14423
14424 # This check must be here, while LIBS includes any necessary
14425 # threading library.
4da8c3a8 14426 for ac_func in pthread_sigmask pthread_setname_np
21987b9c 14427do :
4da8c3a8
TT
14428 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14429ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14430if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
21987b9c 14431 cat >>confdefs.h <<_ACEOF
4da8c3a8 14432#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21987b9c
TT
14433_ACEOF
14434
14435fi
14436done
14437
14438
5e030278
TT
14439 LIBS="$save_LIBS"
14440 CXXFLAGS="$save_CXXFLAGS"
14441 fi
0ad6b8ee 14442 if test "$gdb_cv_cxx_std_thread" = "yes"; then
5e030278
TT
14443
14444$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
14445
14446 fi
14447 ac_ext=c
14448ac_cpp='$CPP $CPPFLAGS'
14449ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14450ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14451ac_compiler_gnu=$ac_cv_c_compiler_gnu
14452
14453
e9bcb658
GB
14454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14455$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 14456if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
14457 $as_echo_n "(cached) " >&6
14458else
14459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14460/* end confdefs.h. */
14461
14462#include <setjmp.h>
14463
14464int
14465main ()
14466{
14467sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
14468 ;
14469 return 0;
14470}
14471_ACEOF
14472if ac_fn_c_try_compile "$LINENO"; then :
14473 gdb_cv_func_sigsetjmp=yes
14474else
14475 gdb_cv_func_sigsetjmp=no
14476fi
14477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14478fi
14479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14480$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
0ad6b8ee 14481if test "$gdb_cv_func_sigsetjmp" = "yes"; then
e9bcb658
GB
14482
14483$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
14484
14485fi
14486
3266f10b 14487
54019719
PA
14488# Check the return and argument types of ptrace.
14489
14490
54019719
PA
14491for ac_header in sys/ptrace.h ptrace.h
14492do :
14493 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14494ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 14495if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
14496 cat >>confdefs.h <<_ACEOF
14497#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14498_ACEOF
14499
14500fi
14501
14502done
14503
14504
a3828db0 14505gdb_ptrace_headers='
4ff70b84 14506#include <sys/types.h>
a3828db0
MK
14507#if HAVE_SYS_PTRACE_H
14508# include <sys/ptrace.h>
14509#endif
14510#if HAVE_UNISTD_H
14511# include <unistd.h>
14512#endif
14513'
14514# There is no point in checking if we don't have a prototype.
9b30624b 14515ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 14516"
d0ac1c44 14517if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 14518 ac_have_decl=1
06825bd1 14519else
81ecdfbb 14520 ac_have_decl=0
06825bd1 14521fi
06825bd1 14522
a3828db0 14523cat >>confdefs.h <<_ACEOF
81ecdfbb 14524#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 14525_ACEOF
81ecdfbb 14526if test $ac_have_decl = 1; then :
bec39cab 14527
a3828db0 14528else
a3828db0
MK
14529
14530 : ${gdb_cv_func_ptrace_ret='int'}
14531 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
14532
06825bd1
MK
14533fi
14534
064ef605
DJ
14535# Check return type. Varargs (used on GNU/Linux) conflict with the
14536# empty argument list, so check for that explicitly.
81ecdfbb
RW
14537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
14538$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 14539if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 14540 $as_echo_n "(cached) " >&6
bec39cab 14541else
81ecdfbb 14542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14543/* end confdefs.h. */
a3828db0 14544$gdb_ptrace_headers
bec39cab
AC
14545int
14546main ()
14547{
064ef605
DJ
14548extern long ptrace (enum __ptrace_request, ...);
14549 ;
14550 return 0;
14551}
14552_ACEOF
9b30624b 14553if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
14554 gdb_cv_func_ptrace_ret='long'
14555else
81ecdfbb 14556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
14557/* end confdefs.h. */
14558$gdb_ptrace_headers
14559int
14560main ()
14561{
a3828db0 14562extern int ptrace ();
bec39cab
AC
14563 ;
14564 return 0;
14565}
14566_ACEOF
9b30624b 14567if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14568 gdb_cv_func_ptrace_ret='int'
70f9f479 14569else
81ecdfbb 14570 gdb_cv_func_ptrace_ret='long'
70f9f479 14571fi
81ecdfbb 14572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 14573fi
81ecdfbb 14574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 14575fi
81ecdfbb
RW
14576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
14577$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 14578
a3828db0
MK
14579cat >>confdefs.h <<_ACEOF
14580#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 14581_ACEOF
70f9f479 14582
a3828db0 14583# Check argument types.
81ecdfbb
RW
14584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
14585$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 14586if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 14587 $as_echo_n "(cached) " >&6
bec39cab 14588else
a3828db0 14589
81ecdfbb 14590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
14591/* end confdefs.h. */
14592$gdb_ptrace_headers
14593int
14594main ()
14595{
14596extern long ptrace (enum __ptrace_request, ...);
14597 ;
14598 return 0;
14599}
14600_ACEOF
9b30624b 14601if ac_fn_c_try_compile "$LINENO"; then :
54019719 14602 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 14603else
064ef605 14604
a3828db0
MK
14605for gdb_arg1 in 'int' 'long'; do
14606 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 14607 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 14608 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 14609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14610/* end confdefs.h. */
a3828db0 14611$gdb_ptrace_headers
bec39cab
AC
14612int
14613main ()
14614{
a3828db0
MK
14615
14616extern $gdb_cv_func_ptrace_ret
14617 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
14618
bec39cab
AC
14619 ;
14620 return 0;
14621}
14622_ACEOF
9b30624b 14623if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
14624 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
14625 break 4;
5c7f2947 14626fi
81ecdfbb 14627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 14628 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 14629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14630/* end confdefs.h. */
a3828db0 14631$gdb_ptrace_headers
bec39cab
AC
14632int
14633main ()
14634{
a3828db0
MK
14635
14636extern $gdb_cv_func_ptrace_ret
14637 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
14638
bec39cab
AC
14639 ;
14640 return 0;
14641}
14642_ACEOF
9b30624b 14643if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
14644
14645gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
14646 break 5;
78434e59 14647fi
81ecdfbb 14648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
14649 done
14650 done
14651 done
14652 done
14653done
14654# Provide a safe default value.
14655: ${gdb_cv_func_ptrace_args='int,int,long,long'}
14656
064ef605 14657fi
81ecdfbb 14658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 14659fi
81ecdfbb
RW
14660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
14661$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
14662ac_save_IFS=$IFS; IFS=','
14663set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
14664IFS=$ac_save_IFS
14665shift
bec39cab 14666
54019719
PA
14667cat >>confdefs.h <<_ACEOF
14668#define PTRACE_TYPE_ARG1 $1
14669_ACEOF
14670
14671
a3828db0
MK
14672cat >>confdefs.h <<_ACEOF
14673#define PTRACE_TYPE_ARG3 $3
14674_ACEOF
14675
96d7229d
LM
14676
14677cat >>confdefs.h <<_ACEOF
14678#define PTRACE_TYPE_ARG4 $4
14679_ACEOF
14680
a3828db0
MK
14681if test -n "$5"; then
14682
14683cat >>confdefs.h <<_ACEOF
14684#define PTRACE_TYPE_ARG5 $5
bec39cab 14685_ACEOF
78434e59
MK
14686
14687fi
14688
54019719 14689
a3828db0 14690if test "$cross_compiling" = no; then
81ecdfbb
RW
14691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14692$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 14693if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14694 $as_echo_n "(cached) " >&6
a3828db0 14695else
81ecdfbb 14696 if test "$cross_compiling" = yes; then :
d0ac1c44 14697 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 14698else
81ecdfbb 14699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14700/* end confdefs.h. */
81ecdfbb 14701$ac_includes_default
bec39cab
AC
14702int
14703main ()
14704{
a3828db0
MK
14705/* If this system has a BSD-style setpgrp which takes arguments,
14706 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14707 exit successfully. */
81ecdfbb 14708 return setpgrp (1,1) != -1;
bec39cab
AC
14709 ;
14710 return 0;
14711}
14712_ACEOF
81ecdfbb 14713if ac_fn_c_try_run "$LINENO"; then :
a3828db0 14714 ac_cv_func_setpgrp_void=no
c906108c 14715else
81ecdfbb 14716 ac_cv_func_setpgrp_void=yes
c906108c 14717fi
81ecdfbb
RW
14718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14719 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14720fi
81ecdfbb 14721
a3828db0 14722fi
81ecdfbb
RW
14723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14724$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
14725if test $ac_cv_func_setpgrp_void = yes; then
14726
81ecdfbb 14727$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
14728
14729fi
a3828db0
MK
14730
14731else
81ecdfbb
RW
14732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14733$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 14734if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14735 $as_echo_n "(cached) " >&6
97bf5e38 14736else
81ecdfbb 14737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14738/* end confdefs.h. */
a3828db0
MK
14739
14740#include <unistd.h>
14741
bec39cab
AC
14742int
14743main ()
14744{
a3828db0
MK
14745
14746 if (setpgrp(1,1) == -1)
14747 exit (0);
14748 else
14749 exit (1);
14750
bec39cab
AC
14751 ;
14752 return 0;
14753}
14754_ACEOF
81ecdfbb 14755if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14756 ac_cv_func_setpgrp_void=no
c906108c 14757else
81ecdfbb 14758 ac_cv_func_setpgrp_void=yes
c906108c 14759fi
81ecdfbb 14760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14761fi
81ecdfbb
RW
14762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14763$as_echo "$ac_cv_func_setpgrp_void" >&6; }
0ad6b8ee 14764if test "$ac_cv_func_setpgrp_void" = yes; then
81ecdfbb 14765 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 14766
a3828db0 14767fi
c906108c
SS
14768fi
14769
db1ff28b
JK
14770# Assume we'll default to using the included libiberty regex.
14771gdb_use_included_regex=yes
14772
14773# However, if the system regex is GNU regex, then default to *not*
14774# using the included regex.
14775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14776$as_echo_n "checking for GNU regex... " >&6; }
d0ac1c44 14777if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
14778 $as_echo_n "(cached) " >&6
14779else
14780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14781/* end confdefs.h. */
14782#include <gnu-versions.h>
14783int
14784main ()
14785{
14786#define REGEX_INTERFACE_VERSION 1
14787#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14788# error "Version mismatch"
14789#endif
14790 ;
14791 return 0;
14792}
14793_ACEOF
14794if ac_fn_c_try_compile "$LINENO"; then :
14795 gdb_cv_have_gnu_regex=yes
14796else
14797 gdb_cv_have_gnu_regex=no
14798fi
14799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14800fi
14801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14802$as_echo "$gdb_cv_have_gnu_regex" >&6; }
0ad6b8ee 14803if test "$gdb_cv_have_gnu_regex" = yes; then
db1ff28b
JK
14804 gdb_use_included_regex=no
14805fi
14806
14807
14808# Check whether --with-included-regex was given.
14809if test "${with_included_regex+set}" = set; then :
14810 withval=$with_included_regex; gdb_with_regex=$withval
14811else
14812 gdb_with_regex=$gdb_use_included_regex
14813fi
14814
14815if test "$gdb_with_regex" = yes; then
14816
14817$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14818
14819fi
14820
81ecdfbb
RW
14821# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14822ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14823#include <sys/proc.h>
14824
14825"
d0ac1c44 14826if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 14827
5c45e068 14828cat >>confdefs.h <<_ACEOF
a3828db0 14829#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 14830_ACEOF
c906108c 14831
5c45e068 14832
97bf5e38 14833fi
c906108c 14834
5c45e068 14835
a3828db0 14836# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
14837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14838$as_echo_n "checking for struct lwp... " >&6; }
d0ac1c44 14839if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 14840 $as_echo_n "(cached) " >&6
bec39cab 14841else
81ecdfbb 14842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14843/* end confdefs.h. */
a3828db0 14844#include <sys/param.h>
c49fbc6c 14845#define _KMEMUSER
a3828db0 14846#include <sys/lwp.h>
bec39cab
AC
14847int
14848main ()
14849{
a3828db0 14850struct lwp l;
bec39cab
AC
14851 ;
14852 return 0;
14853}
14854_ACEOF
81ecdfbb 14855if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14856 gdb_cv_struct_lwp=yes
c906108c 14857else
81ecdfbb 14858 gdb_cv_struct_lwp=no
c906108c 14859fi
81ecdfbb 14860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14861fi
81ecdfbb
RW
14862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14863$as_echo "$gdb_cv_struct_lwp" >&6; }
0ad6b8ee 14864if test "$gdb_cv_struct_lwp" = yes; then
c906108c 14865
81ecdfbb 14866$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 14867
97bf5e38 14868fi
c906108c 14869
a3828db0 14870# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
14871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14872$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
d0ac1c44 14873if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 14874 $as_echo_n "(cached) " >&6
bec39cab 14875else
81ecdfbb 14876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14877/* end confdefs.h. */
a3828db0
MK
14878#include <sys/types.h>
14879#include <machine/reg.h>
bec39cab
AC
14880int
14881main ()
14882{
a3828db0 14883struct reg r;
bec39cab
AC
14884 ;
14885 return 0;
14886}
14887_ACEOF
81ecdfbb 14888if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14889 gdb_cv_struct_reg=yes
27ca5dad 14890else
81ecdfbb 14891 gdb_cv_struct_reg=no
27ca5dad 14892fi
81ecdfbb 14893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14894fi
81ecdfbb
RW
14895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14896$as_echo "$gdb_cv_struct_reg" >&6; }
0ad6b8ee 14897if test "$gdb_cv_struct_reg" = yes; then
bec39cab 14898
81ecdfbb 14899$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14900
14901fi
97bf5e38 14902
a3828db0
MK
14903# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14904# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14905ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14906#include <machine/reg.h>
81ecdfbb 14907"
d0ac1c44 14908if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
14909
14910cat >>confdefs.h <<_ACEOF
a3828db0 14911#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14912_ACEOF
3862412b 14913
5c45e068 14914
97bf5e38 14915fi
a6e69c1f
JB
14916ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14917#include <machine/reg.h>
81ecdfbb 14918"
d0ac1c44 14919if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
14920
14921cat >>confdefs.h <<_ACEOF
a3828db0 14922#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14923_ACEOF
3862412b 14924
5c45e068 14925
97bf5e38 14926fi
3862412b 14927
5c45e068 14928
6fea9e18
L
14929# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14930# Older amd64 Linux's don't have the fs_base and gs_base members of
14931# `struct user_regs_struct'.
f517c180
EA
14932ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14933#include <sys/user.h>
6fea9e18 14934"
d0ac1c44 14935if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
14936
14937cat >>confdefs.h <<_ACEOF
14938#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14939_ACEOF
14940
14941
14942fi
f517c180
EA
14943ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14944#include <sys/user.h>
6fea9e18 14945"
d0ac1c44 14946if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14947
14948cat >>confdefs.h <<_ACEOF
14949#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14950_ACEOF
14951
14952
14953fi
14954
14955
a3828db0 14956# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14958$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14959if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14960 $as_echo_n "(cached) " >&6
451928c5 14961else
81ecdfbb 14962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14963/* end confdefs.h. */
a3828db0 14964#include <sys/ptrace.h>
bec39cab
AC
14965int
14966main ()
14967{
a3828db0 14968PTRACE_GETREGS;
bec39cab
AC
14969 ;
14970 return 0;
14971}
14972_ACEOF
81ecdfbb 14973if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14974 gdb_cv_have_ptrace_getregs=yes
451928c5 14975else
81ecdfbb 14976 gdb_cv_have_ptrace_getregs=no
451928c5 14977fi
81ecdfbb 14978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14979fi
14980
81ecdfbb
RW
14981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14982$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
0ad6b8ee 14983if test "$gdb_cv_have_ptrace_getregs" = yes; then
60ca704f 14984
81ecdfbb 14985$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14986
97bf5e38 14987fi
451928c5 14988
a3828db0 14989# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14991$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14992if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14993 $as_echo_n "(cached) " >&6
451928c5 14994else
81ecdfbb 14995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14996/* end confdefs.h. */
a3828db0 14997#include <sys/ptrace.h>
bec39cab
AC
14998int
14999main ()
15000{
a3828db0 15001PTRACE_GETFPXREGS;
bec39cab
AC
15002 ;
15003 return 0;
15004}
15005_ACEOF
81ecdfbb 15006if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 15007 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 15008else
81ecdfbb 15009 gdb_cv_have_ptrace_getfpxregs=no
451928c5 15010fi
81ecdfbb 15011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
15012fi
15013
81ecdfbb
RW
15014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15015$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
0ad6b8ee 15016if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
60ca704f 15017
81ecdfbb 15018$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 15019
97bf5e38 15020fi
451928c5 15021
a3828db0 15022# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
15023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15024$as_echo_n "checking for PT_GETDBREGS... " >&6; }
d0ac1c44 15025if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 15026 $as_echo_n "(cached) " >&6
3862412b 15027else
81ecdfbb 15028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15029/* end confdefs.h. */
a3828db0
MK
15030#include <sys/types.h>
15031#include <sys/ptrace.h>
bec39cab
AC
15032int
15033main ()
15034{
a3828db0 15035PT_GETDBREGS;
bec39cab
AC
15036 ;
15037 return 0;
15038}
15039_ACEOF
81ecdfbb 15040if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 15041 gdb_cv_have_pt_getdbregs=yes
3862412b 15042else
81ecdfbb 15043 gdb_cv_have_pt_getdbregs=no
3862412b 15044fi
81ecdfbb 15045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
15046fi
15047
81ecdfbb
RW
15048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15049$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
0ad6b8ee 15050if test "$gdb_cv_have_pt_getdbregs" = yes; then
60ca704f 15051
81ecdfbb 15052$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 15053
97bf5e38 15054fi
3862412b 15055
a3828db0 15056# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
15057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15058$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
d0ac1c44 15059if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 15060 $as_echo_n "(cached) " >&6
3862412b 15061else
81ecdfbb 15062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15063/* end confdefs.h. */
a3828db0
MK
15064#include <sys/types.h>
15065#include <sys/ptrace.h>
bec39cab
AC
15066int
15067main ()
15068{
a3828db0 15069PT_GETXMMREGS;
bec39cab
AC
15070 ;
15071 return 0;
15072}
15073_ACEOF
81ecdfbb 15074if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 15075 gdb_cv_have_pt_getxmmregs=yes
3862412b 15076else
81ecdfbb 15077 gdb_cv_have_pt_getxmmregs=no
3862412b 15078fi
81ecdfbb 15079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
15080fi
15081
81ecdfbb
RW
15082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15083$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
0ad6b8ee 15084if test "$gdb_cv_have_pt_getxmmregs" = yes; then
60ca704f 15085
81ecdfbb 15086$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 15087
97bf5e38 15088fi
3862412b 15089
6e9567fe
JB
15090# See if <sys/ptrace.h> supports LWP names on FreeBSD
15091# Older FreeBSD versions don't have the pl_tdname member of
15092# `struct ptrace_lwpinfo'.
15093ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15094"
d0ac1c44 15095if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
15096
15097cat >>confdefs.h <<_ACEOF
15098#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
15099_ACEOF
15100
15101
15102fi
15103
15104
e6cdd38e
JB
15105# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15106# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15107# FreeBSD 10.3.
15108ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
15109"
d0ac1c44 15110if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
15111
15112cat >>confdefs.h <<_ACEOF
15113#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15114_ACEOF
15115
15116
15117fi
15118
6e9567fe 15119
97bf5e38 15120if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
15121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
15122$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
d0ac1c44 15123 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 15124 $as_echo_n "(cached) " >&6
596c9d4b 15125else
81ecdfbb 15126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15127/* end confdefs.h. */
596c9d4b
KB
15128
15129#define _SYSCALL32
d30c5336
JK
15130/* Needed for new procfs interface on sparc-solaris. */
15131#define _STRUCTURED_PROC 1
596c9d4b 15132#include <sys/procfs.h>
bec39cab
AC
15133int
15134main ()
15135{
97bf5e38 15136gregset_t avar
bec39cab
AC
15137 ;
15138 return 0;
15139}
15140_ACEOF
81ecdfbb 15141if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15142 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 15143else
81ecdfbb 15144 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 15145
596c9d4b 15146fi
81ecdfbb 15147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
15148fi
15149
97bf5e38 15150 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 15151
81ecdfbb 15152$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
15153
15154 fi
81ecdfbb
RW
15155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
15156$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 15157
81ecdfbb
RW
15158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
15159$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 15160 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 15161 $as_echo_n "(cached) " >&6
d84dd0c5 15162else
81ecdfbb 15163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15164/* end confdefs.h. */
97bf5e38
MK
15165
15166#define _SYSCALL32
d30c5336
JK
15167/* Needed for new procfs interface on sparc-solaris. */
15168#define _STRUCTURED_PROC 1
d84dd0c5 15169#include <sys/procfs.h>
bec39cab
AC
15170int
15171main ()
15172{
97bf5e38 15173fpregset_t avar
bec39cab
AC
15174 ;
15175 return 0;
15176}
15177_ACEOF
81ecdfbb 15178if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15179 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 15180else
81ecdfbb 15181 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 15182
d84dd0c5 15183fi
81ecdfbb 15184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
15185fi
15186
97bf5e38 15187 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 15188
81ecdfbb 15189$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 15190
97bf5e38 15191 fi
81ecdfbb
RW
15192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
15193$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 15194
81ecdfbb
RW
15195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
15196$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 15197 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 15198 $as_echo_n "(cached) " >&6
c906108c 15199else
81ecdfbb 15200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15201/* end confdefs.h. */
c906108c 15202
97bf5e38 15203#define _SYSCALL32
d30c5336
JK
15204/* Needed for new procfs interface on sparc-solaris. */
15205#define _STRUCTURED_PROC 1
97bf5e38 15206#include <sys/procfs.h>
bec39cab
AC
15207int
15208main ()
15209{
97bf5e38 15210prgregset_t avar
bec39cab
AC
15211 ;
15212 return 0;
15213}
15214_ACEOF
81ecdfbb 15215if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15216 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 15217else
81ecdfbb 15218 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 15219
c906108c 15220fi
81ecdfbb 15221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15222fi
15223
97bf5e38 15224 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 15225
81ecdfbb 15226$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 15227
97bf5e38 15228 fi
81ecdfbb
RW
15229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15230$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 15231
81ecdfbb
RW
15232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
15233$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 15234 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 15235 $as_echo_n "(cached) " >&6
d45fe813 15236else
81ecdfbb 15237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15238/* end confdefs.h. */
97bf5e38
MK
15239
15240#define _SYSCALL32
d30c5336
JK
15241/* Needed for new procfs interface on sparc-solaris. */
15242#define _STRUCTURED_PROC 1
97bf5e38 15243#include <sys/procfs.h>
bec39cab
AC
15244int
15245main ()
15246{
97bf5e38 15247prfpregset_t avar
bec39cab
AC
15248 ;
15249 return 0;
15250}
15251_ACEOF
81ecdfbb 15252if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15253 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 15254else
81ecdfbb 15255 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 15256
d45fe813 15257fi
81ecdfbb 15258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15259fi
15260
97bf5e38 15261 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 15262
81ecdfbb 15263$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 15264
97bf5e38 15265 fi
81ecdfbb
RW
15266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15267$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 15268
81ecdfbb
RW
15269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
15270$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
d0ac1c44 15271 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 15272 $as_echo_n "(cached) " >&6
d45fe813 15273else
81ecdfbb 15274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15275/* end confdefs.h. */
97bf5e38
MK
15276
15277#define _SYSCALL32
d30c5336
JK
15278/* Needed for new procfs interface on sparc-solaris. */
15279#define _STRUCTURED_PROC 1
97bf5e38 15280#include <sys/procfs.h>
bec39cab
AC
15281int
15282main ()
15283{
97bf5e38 15284prgregset32_t avar
bec39cab
AC
15285 ;
15286 return 0;
15287}
15288_ACEOF
81ecdfbb 15289if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15290 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 15291else
81ecdfbb 15292 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 15293
d45fe813 15294fi
81ecdfbb 15295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15296fi
15297
97bf5e38 15298 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 15299
81ecdfbb 15300$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 15301
97bf5e38 15302 fi
81ecdfbb
RW
15303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15304$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 15305
81ecdfbb
RW
15306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
15307$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 15308 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 15309 $as_echo_n "(cached) " >&6
d45fe813 15310else
81ecdfbb 15311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15312/* end confdefs.h. */
97bf5e38 15313
d45fe813 15314#define _SYSCALL32
d30c5336
JK
15315/* Needed for new procfs interface on sparc-solaris. */
15316#define _STRUCTURED_PROC 1
97bf5e38 15317#include <sys/procfs.h>
bec39cab
AC
15318int
15319main ()
15320{
97bf5e38 15321lwpid_t avar
bec39cab
AC
15322 ;
15323 return 0;
15324}
15325_ACEOF
81ecdfbb 15326if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15327 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 15328else
81ecdfbb 15329 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 15330
d45fe813 15331fi
81ecdfbb 15332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15333fi
15334
97bf5e38 15335 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 15336
81ecdfbb 15337$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 15338
97bf5e38 15339 fi
81ecdfbb
RW
15340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15341$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 15342
81ecdfbb
RW
15343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
15344$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 15345 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 15346 $as_echo_n "(cached) " >&6
c906108c 15347else
81ecdfbb 15348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15349/* end confdefs.h. */
c906108c 15350
97bf5e38 15351#define _SYSCALL32
d30c5336
JK
15352/* Needed for new procfs interface on sparc-solaris. */
15353#define _STRUCTURED_PROC 1
97bf5e38 15354#include <sys/procfs.h>
bec39cab
AC
15355int
15356main ()
15357{
97bf5e38 15358psaddr_t avar
bec39cab
AC
15359 ;
15360 return 0;
15361}
15362_ACEOF
81ecdfbb 15363if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15364 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 15365else
81ecdfbb 15366 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 15367
c906108c 15368fi
81ecdfbb 15369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15370fi
15371
97bf5e38 15372 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 15373
81ecdfbb 15374$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 15375
97bf5e38 15376 fi
81ecdfbb
RW
15377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15378$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 15379
43b7e92b
GB
15380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
15381$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15382 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
15383 $as_echo_n "(cached) " >&6
15384else
15385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15386/* end confdefs.h. */
15387
15388#define _SYSCALL32
15389/* Needed for new procfs interface on sparc-solaris. */
15390#define _STRUCTURED_PROC 1
15391#include <sys/procfs.h>
15392int
15393main ()
15394{
15395elf_fpregset_t avar
15396 ;
15397 return 0;
15398}
15399_ACEOF
15400if ac_fn_c_try_compile "$LINENO"; then :
15401 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
15402else
15403 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15404
15405fi
15406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15407fi
15408
15409 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
15410
15411$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
15412
15413 fi
15414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15415$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
15416
c906108c 15417fi
c906108c 15418
bc8bcb4b 15419# Check if the compiler supports the `long long' type.
c906108c 15420
81ecdfbb
RW
15421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15422$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 15423if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 15424 $as_echo_n "(cached) " >&6
97bf5e38 15425else
81ecdfbb 15426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15427/* end confdefs.h. */
bc8bcb4b 15428extern long long foo;
bec39cab
AC
15429int
15430main ()
15431{
bc8bcb4b 15432switch (foo & 2) { case 0: return 1; }
bec39cab
AC
15433 ;
15434 return 0;
15435}
15436_ACEOF
81ecdfbb 15437if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15438 gdb_cv_c_long_long=yes
15439else
81ecdfbb 15440 gdb_cv_c_long_long=no
97bf5e38 15441fi
81ecdfbb 15442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15443fi
81ecdfbb
RW
15444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15445$as_echo "$gdb_cv_c_long_long" >&6; }
0ad6b8ee 15446if test "$gdb_cv_c_long_long" != yes; then
74a0d9f6 15447 # libdecnumber requires long long.
d0ac1c44 15448 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
15449fi
15450
bc8bcb4b 15451# Check if the compiler and runtime support printing long longs.
97bf5e38 15452
81ecdfbb
RW
15453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15454$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 15455if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 15456 $as_echo_n "(cached) " >&6
97bf5e38 15457else
81ecdfbb 15458 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15459 gdb_cv_printf_has_long_long=no
15460else
81ecdfbb 15461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15462/* end confdefs.h. */
bc8bcb4b
MK
15463$ac_includes_default
15464int
15465main ()
15466{
15467char buf[32];
97bf5e38
MK
15468 long long l = 0;
15469 l = (l << 16) + 0x0123;
15470 l = (l << 16) + 0x4567;
15471 l = (l << 16) + 0x89ab;
15472 l = (l << 16) + 0xcdef;
15473 sprintf (buf, "0x%016llx", l);
15474 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
15475 ;
15476 return 0;
c906108c 15477}
bec39cab 15478_ACEOF
81ecdfbb 15479if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15480 gdb_cv_printf_has_long_long=yes
15481else
81ecdfbb 15482 gdb_cv_printf_has_long_long=no
97bf5e38 15483fi
81ecdfbb
RW
15484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15485 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15486fi
81ecdfbb 15487
97bf5e38 15488fi
81ecdfbb
RW
15489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15490$as_echo "$gdb_cv_printf_has_long_long" >&6; }
0ad6b8ee 15491if test "$gdb_cv_printf_has_long_long" = yes; then
bc8bcb4b 15492
81ecdfbb 15493$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
15494
15495fi
97bf5e38 15496
1a619819
LM
15497# Check if the compiler and runtime support printing decfloats.
15498
81ecdfbb
RW
15499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15500$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 15501if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 15502 $as_echo_n "(cached) " >&6
1a619819 15503else
81ecdfbb 15504 if test "$cross_compiling" = yes; then :
1a619819
LM
15505 gdb_cv_printf_has_decfloat=no
15506else
81ecdfbb 15507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
15508/* end confdefs.h. */
15509$ac_includes_default
15510int
15511main ()
15512{
15513char buf[64];
15514 _Decimal32 d32 = 1.2345df;
15515 _Decimal64 d64 = 1.2345dd;
15516 _Decimal128 d128 = 1.2345dl;
15517 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15518 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15519 ;
15520 return 0;
15521}
15522_ACEOF
81ecdfbb 15523if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
15524 gdb_cv_printf_has_decfloat=yes
15525else
81ecdfbb 15526 gdb_cv_printf_has_decfloat=no
1a619819 15527fi
81ecdfbb
RW
15528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15529 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 15530fi
81ecdfbb 15531
1a619819 15532fi
81ecdfbb
RW
15533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15534$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
0ad6b8ee 15535if test "$gdb_cv_printf_has_decfloat" = yes; then
1a619819 15536
81ecdfbb 15537$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
15538
15539fi
15540
bc8bcb4b
MK
15541# Check if the compiler supports the `long double' type. We can't use
15542# AC_C_LONG_DOUBLE because that one does additional checks on the
15543# constants defined in <float.h> that fail on some systems,
15544# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 15545
81ecdfbb
RW
15546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15547$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 15548if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 15549 $as_echo_n "(cached) " >&6
97bf5e38 15550else
81ecdfbb 15551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15552/* end confdefs.h. */
97bf5e38 15553long double foo;
bec39cab 15554_ACEOF
81ecdfbb 15555if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 15556 gdb_cv_c_long_double=yes
97bf5e38 15557else
81ecdfbb 15558 gdb_cv_c_long_double=no
97bf5e38 15559fi
81ecdfbb 15560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15561fi
81ecdfbb
RW
15562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15563$as_echo "$gdb_cv_c_long_double" >&6; }
0ad6b8ee 15564if test "$gdb_cv_c_long_double" = yes; then
c906108c 15565
81ecdfbb 15566$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15567
15568fi
15569
bc8bcb4b 15570# Check if the compiler and runtime support printing long doubles.
97bf5e38 15571
81ecdfbb
RW
15572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15573$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 15574if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 15575 $as_echo_n "(cached) " >&6
97bf5e38 15576else
81ecdfbb 15577 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15578 gdb_cv_printf_has_long_double=no
15579else
81ecdfbb 15580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15581/* end confdefs.h. */
bc8bcb4b
MK
15582$ac_includes_default
15583int
15584main ()
15585{
15586char buf[16];
97bf5e38
MK
15587 long double f = 3.141592653;
15588 sprintf (buf, "%Lg", f);
15589 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
15590 ;
15591 return 0;
97bf5e38 15592}
bec39cab 15593_ACEOF
81ecdfbb 15594if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 15595 gdb_cv_printf_has_long_double=yes
c906108c 15596else
81ecdfbb 15597 gdb_cv_printf_has_long_double=no
c906108c 15598fi
81ecdfbb
RW
15599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15600 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 15601fi
81ecdfbb 15602
c906108c 15603fi
81ecdfbb
RW
15604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15605$as_echo "$gdb_cv_printf_has_long_double" >&6; }
0ad6b8ee 15606if test "$gdb_cv_printf_has_long_double" = yes; then
bc8bcb4b 15607
81ecdfbb 15608$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15609
15610fi
97bf5e38 15611
bc8bcb4b 15612# Check if the compiler and runtime support scanning long doubles.
97bf5e38 15613
81ecdfbb
RW
15614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15615$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 15616if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 15617 $as_echo_n "(cached) " >&6
97bf5e38 15618else
81ecdfbb 15619 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15620 gdb_cv_scanf_has_long_double=no
15621else
81ecdfbb 15622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15623/* end confdefs.h. */
bc8bcb4b
MK
15624#include <stdio.h>
15625int
15626main ()
15627{
15628char *buf = "3.141592653";
97bf5e38
MK
15629 long double f = 0;
15630 sscanf (buf, "%Lg", &f);
15631 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
15632 ;
15633 return 0;
97bf5e38 15634}
bec39cab 15635_ACEOF
81ecdfbb 15636if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15637 gdb_cv_scanf_has_long_double=yes
15638else
81ecdfbb 15639 gdb_cv_scanf_has_long_double=no
97bf5e38 15640fi
81ecdfbb
RW
15641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15642 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15643fi
81ecdfbb 15644
c906108c 15645fi
81ecdfbb
RW
15646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15647$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
0ad6b8ee 15648if test "$gdb_cv_scanf_has_long_double" = yes; then
bc8bcb4b 15649
81ecdfbb 15650$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15651
15652fi
c906108c 15653
438013df
AO
15654case ${host_os} in
15655aix*)
81ecdfbb
RW
15656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15657$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 15658if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 15659 $as_echo_n "(cached) " >&6
438013df 15660else
bec39cab 15661
438013df
AO
15662 SAVE_LDFLAGS=$LDFLAGS
15663
15664 case $GCC in
15665 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15666 *) gdb_cv_bigtoc=-bbigtoc ;;
15667 esac
15668
15669 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 15670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15671/* end confdefs.h. */
438013df 15672
bec39cab
AC
15673int
15674main ()
15675{
438013df 15676int i;
bec39cab
AC
15677 ;
15678 return 0;
15679}
15680_ACEOF
81ecdfbb 15681if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15682
81ecdfbb
RW
15683else
15684 gdb_cv_bigtoc=
438013df 15685fi
81ecdfbb
RW
15686rm -f core conftest.err conftest.$ac_objext \
15687 conftest$ac_exeext conftest.$ac_ext
ec76baa5 15688 LDFLAGS="${SAVE_LDFLAGS}"
438013df 15689
bec39cab 15690fi
81ecdfbb
RW
15691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15692$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
15693 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15694 ;;
15695esac
15696
38f6b338 15697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 15698$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
15699dynamic_list=false
15700if test "${gdb_native}" = yes; then
15701 # The dynamically loaded libthread_db needs access to symbols in the gdb
15702 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15703 # may not be supported there.
15704 old_LDFLAGS="$LDFLAGS"
15705 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15706 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15707 LDFLAGS="$LDFLAGS $RDYNAMIC"
15708 if test "${have_libpython}" = no; then
15709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
15710/* end confdefs.h. */
15711
15712int
15713main ()
15714{
15715
15716 ;
15717 return 0;
15718}
15719_ACEOF
15720if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
15721 dynamic_list=true
15722fi
15723rm -f core conftest.err conftest.$ac_objext \
15724 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
15725 else
15726 # Workaround http://bugs.python.org/issue4434 where static
15727 # libpythonX.Y.a would get its symbols required for
15728 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15729 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
15730
15731 # Note the workaround for Python
15732 # http://bugs.python.org/issue10112 earlier has removed
15733 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15734 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15735 # always pass.
38f6b338
JK
15736 old_CFLAGS="$CFLAGS"
15737 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
15738 old_LIBS="$LIBS"
15739 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
15740 old_CPPFLAGS="$CPPFLAGS"
15741 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 15742 if test "$cross_compiling" = yes; then :
3bebe2f2 15743 true
f6528abd 15744else
3bebe2f2
JK
15745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15746/* end confdefs.h. */
1b4f615e 15747#include "Python.h"
3bebe2f2
JK
15748int
15749main ()
15750{
15751int err;
38f6b338
JK
15752 Py_Initialize ();
15753 err = PyRun_SimpleString ("import itertools\n");
15754 Py_Finalize ();
15755 return err == 0 ? 0 : 1;
3bebe2f2
JK
15756 ;
15757 return 0;
15758}
15759_ACEOF
15760if ac_fn_c_try_run "$LINENO"; then :
15761 dynamic_list=true
15762fi
15763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15764 conftest.$ac_objext conftest.beam conftest.$ac_ext
15765fi
15766
8c1fb155 15767 LIBS="$old_LIBS"
38f6b338 15768 CFLAGS="$old_CFLAGS"
1b4f615e 15769 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
15770 fi
15771 LDFLAGS="$old_LDFLAGS"
15772fi
15773if $dynamic_list; then
15774 found="-Wl,--dynamic-list"
15775 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15776else
38f6b338
JK
15777 found="-rdynamic"
15778 RDYNAMIC="-rdynamic"
f6528abd 15779fi
f6528abd 15780
38f6b338 15781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15782$as_echo "$found" >&6; }
0407b3f1 15783
f6528abd 15784
0ad6b8ee 15785if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
c906108c 15786 case ${host_os} in
d92419e5 15787 aix*)
81ecdfbb
RW
15788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15789$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 15790 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 15791 $as_echo_n "(cached) " >&6
bec39cab 15792else
81ecdfbb 15793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15794/* end confdefs.h. */
d92419e5 15795#include <sys/pthdebug.h>
bec39cab
AC
15796int
15797main ()
15798{
d92419e5
JB
15799#ifndef PTHDB_VERSION_3
15800 #error
15801 #endif
bec39cab
AC
15802 ;
15803 return 0;
15804}
15805_ACEOF
81ecdfbb 15806if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15807 gdb_cv_have_aix_thread_debug=yes
15808else
81ecdfbb 15809 gdb_cv_have_aix_thread_debug=no
d92419e5 15810fi
81ecdfbb 15811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15812fi
15813
81ecdfbb
RW
15814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15815$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
0ad6b8ee 15816 if test "$gdb_cv_have_aix_thread_debug" = yes; then
d92419e5 15817 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15818 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15819 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15820
15821 # Older versions of AIX do not provide the declaration for
15822 # the getthrds function (it appears that it was introduced
15823 # with AIX 6.x).
15824 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15825"
d0ac1c44 15826if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
15827 ac_have_decl=1
15828else
15829 ac_have_decl=0
15830fi
15831
15832cat >>confdefs.h <<_ACEOF
15833#define HAVE_DECL_GETTHRDS $ac_have_decl
15834_ACEOF
15835
d92419e5
JB
15836 fi
15837 ;;
c906108c 15838 esac
bec39cab 15839
c906108c
SS
15840fi
15841
3f47be5c 15842if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15844$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 15845if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 15846 $as_echo_n "(cached) " >&6
bec39cab 15847else
81ecdfbb 15848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15849/* end confdefs.h. */
3f47be5c 15850#include <thread_db.h>
bec39cab
AC
15851int
15852main ()
15853{
3f47be5c 15854int i = TD_NOTALLOC;
bec39cab
AC
15855 ;
15856 return 0;
15857}
15858_ACEOF
81ecdfbb 15859if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15860 gdb_cv_thread_db_h_has_td_notalloc=yes
15861else
81ecdfbb 15862 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15863
3f47be5c 15864fi
81ecdfbb 15865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15866
bec39cab 15867fi
81ecdfbb
RW
15868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15869$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15871$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 15872if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 15873 $as_echo_n "(cached) " >&6
59f80f10 15874else
81ecdfbb 15875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15876/* end confdefs.h. */
15877#include <thread_db.h>
15878int
15879main ()
15880{
15881int i = TD_VERSION;
15882 ;
15883 return 0;
15884}
15885_ACEOF
81ecdfbb 15886if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15887 gdb_cv_thread_db_h_has_td_version=yes
15888else
81ecdfbb 15889 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15890
15891fi
81ecdfbb 15892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15893
15894fi
81ecdfbb
RW
15895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15896$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15898$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 15899if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15900 $as_echo_n "(cached) " >&6
59f80f10 15901else
81ecdfbb 15902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15903/* end confdefs.h. */
15904#include <thread_db.h>
15905int
15906main ()
15907{
15908int i = TD_NOTLS;
15909 ;
15910 return 0;
15911}
15912_ACEOF
81ecdfbb 15913if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15914 gdb_cv_thread_db_h_has_td_notls=yes
15915else
81ecdfbb 15916 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15917
15918fi
81ecdfbb 15919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15920
15921fi
81ecdfbb
RW
15922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15923$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15924fi
15925if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15926
81ecdfbb 15927$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15928
59f80f10
DJ
15929fi
15930if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15931
81ecdfbb 15932$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15933
15934fi
15935if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15936
81ecdfbb 15937$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15938
3f47be5c
EZ
15939fi
15940
81ecdfbb
RW
15941ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15942"
d0ac1c44 15943if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15944 ac_have_decl=1
10568435 15945else
81ecdfbb 15946 ac_have_decl=0
10568435 15947fi
10568435
JK
15948
15949cat >>confdefs.h <<_ACEOF
81ecdfbb 15950#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15951_ACEOF
15952
15953
81ecdfbb
RW
15954if test "$cross_compiling" = yes; then :
15955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15956/* end confdefs.h. */
15957#include <sys/personality.h>
15958int
15959main ()
15960{
15961
15962# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15963# define ADDR_NO_RANDOMIZE 0x0040000
15964# endif
15965 /* Test the flag could be set and stays set. */
15966 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15967 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15968 return 1
15969 ;
15970 return 0;
15971}
15972_ACEOF
81ecdfbb 15973if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15974 have_personality=true
15975else
81ecdfbb 15976 have_personality=false
10568435 15977fi
81ecdfbb
RW
15978rm -f core conftest.err conftest.$ac_objext \
15979 conftest$ac_exeext conftest.$ac_ext
10568435 15980else
81ecdfbb 15981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15982/* end confdefs.h. */
15983#include <sys/personality.h>
15984int
15985main ()
15986{
15987
15988# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15989# define ADDR_NO_RANDOMIZE 0x0040000
15990# endif
15991 /* Test the flag could be set and stays set. */
15992 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15993 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15994 return 1
15995 ;
15996 return 0;
15997}
15998_ACEOF
81ecdfbb 15999if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
16000 have_personality=true
16001else
81ecdfbb 16002 have_personality=false
10568435 16003fi
81ecdfbb
RW
16004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16005 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 16006fi
81ecdfbb 16007
10568435
JK
16008if $have_personality
16009then
16010
81ecdfbb 16011$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
16012
16013fi
16014
e655c1a2
PA
16015case $host_os in
16016 go32* | *djgpp*)
16017 gdbinit=gdb.ini
16018 ;;
16019 *)
16020 gdbinit=.gdbinit
16021 ;;
16022esac
16023
16024cat >>confdefs.h <<_ACEOF
16025#define GDBINIT "$gdbinit"
16026_ACEOF
16027
16028
fb40c209 16029
f83d8a90
DE
16030# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16031# except that the argument to --with-sysroot is optional.
16032# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16033if test "x$with_sysroot" = xyes; then
16034 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16035fi
bec39cab 16036
81ecdfbb
RW
16037# Check whether --with-sysroot was given.
16038if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
16039 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16040else
16041 TARGET_SYSTEM_ROOT=
16042fi
030292b7 16043
030292b7 16044
f83d8a90
DE
16045 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16046 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16047 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16048 ac_define_dir=`eval echo $ac_define_dir`
030292b7 16049
f83d8a90
DE
16050cat >>confdefs.h <<_ACEOF
16051#define TARGET_SYSTEM_ROOT "$ac_define_dir"
16052_ACEOF
bec39cab 16053
030292b7 16054
b14b1491 16055
f83d8a90
DE
16056
16057 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16058 if test "x$prefix" = xNONE; then
16059 test_prefix=/usr/local
16060 else
16061 test_prefix=$prefix
16062 fi
16063 else
16064 test_prefix=$exec_prefix
16065 fi
16066 value=0
16067 case ${ac_define_dir} in
16068 "${test_prefix}"|"${test_prefix}/"*|\
16069 '${exec_prefix}'|'${exec_prefix}/'*)
16070 value=1
16071 ;;
16072 esac
16073
16074cat >>confdefs.h <<_ACEOF
16075#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16076_ACEOF
030292b7
DJ
16077
16078
16079
16e7150e 16080
16e7150e 16081
81ecdfbb
RW
16082# Check whether --with-system-gdbinit was given.
16083if test "${with_system_gdbinit+set}" = set; then :
16084 withval=$with_system_gdbinit;
b14b1491
TT
16085 SYSTEM_GDBINIT=$withval
16086else
16087 SYSTEM_GDBINIT=
81ecdfbb
RW
16088fi
16089
16e7150e
JG
16090
16091 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16092 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 16093 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
16094 ac_define_dir=`eval echo $ac_define_dir`
16095
16096cat >>confdefs.h <<_ACEOF
16097#define SYSTEM_GDBINIT "$ac_define_dir"
16098_ACEOF
16099
16100
16101
0c4a4063 16102
b14b1491
TT
16103 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16104 if test "x$prefix" = xNONE; then
16105 test_prefix=/usr/local
16106 else
16107 test_prefix=$prefix
16108 fi
16109 else
16110 test_prefix=$exec_prefix
16111 fi
16112 value=0
16113 case ${ac_define_dir} in
16114 "${test_prefix}"|"${test_prefix}/"*|\
16115 '${exec_prefix}'|'${exec_prefix}/'*)
16116 value=1
16117 ;;
16118 esac
16e7150e 16119
b14b1491
TT
16120cat >>confdefs.h <<_ACEOF
16121#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
16122_ACEOF
16123
b14b1491 16124
16e7150e 16125
0c4a4063 16126
b835bb52 16127
ed2a2229
CB
16128# Check whether --with-system-gdbinit-dir was given.
16129if test "${with_system_gdbinit_dir+set}" = set; then :
16130 withval=$with_system_gdbinit_dir;
16131 SYSTEM_GDBINIT_DIR=$withval
16132else
16133 SYSTEM_GDBINIT_DIR=
16134fi
16135
16136
16137 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16138 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16139 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16140 ac_define_dir=`eval echo $ac_define_dir`
16141
16142cat >>confdefs.h <<_ACEOF
16143#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16144_ACEOF
16145
16146
16147
16148
16149 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16150 if test "x$prefix" = xNONE; then
16151 test_prefix=/usr/local
16152 else
16153 test_prefix=$prefix
16154 fi
16155 else
16156 test_prefix=$exec_prefix
16157 fi
16158 value=0
16159 case ${ac_define_dir} in
16160 "${test_prefix}"|"${test_prefix}/"*|\
16161 '${exec_prefix}'|'${exec_prefix}/'*)
16162 value=1
16163 ;;
16164 esac
16165
16166cat >>confdefs.h <<_ACEOF
16167#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16168_ACEOF
16169
16170
16171
16172
16173
81ecdfbb
RW
16174# Check whether --enable-werror was given.
16175if test "${enable_werror+set}" = set; then :
16176 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
16177 yes | y) ERROR_ON_WARNING="yes" ;;
16178 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 16179 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 16180 esac
81ecdfbb
RW
16181fi
16182
094a342e 16183
9a084706
PA
16184# Enable -Werror by default when using gcc. Turn it off for releases.
16185if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
16186 ERROR_ON_WARNING=yes
16187fi
16188
16189WERROR_CFLAGS=""
16190if test "${ERROR_ON_WARNING}" = yes ; then
16191 WERROR_CFLAGS="-Werror"
16192fi
16193
cf6de44d 16194# The options we'll try to enable.
aac331e4 16195build_warnings="-Wall -Wpointer-arith \
a0de763e 16196-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 16197-Wno-switch -Wno-char-subscripts \
cf6de44d 16198-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 16199-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 16200-Wno-mismatched-tags \
632e107b 16201-Wno-error=deprecated-register \
85e26832 16202-Wsuggest-override \
1a34f210 16203-Wimplicit-fallthrough=3 \
96643e35 16204-Wduplicated-cond \
33a6bc35
TT
16205-Wshadow=local \
16206-Wdeprecated-copy \
16207-Wdeprecated-copy-dtor \
16208-Wredundant-move"
3bc3d82a 16209
3526781e 16210case "${host}" in
4fa7574e
RO
16211 *-*-mingw32*)
16212 # Enable -Wno-format by default when using gcc on mingw since many
16213 # GCC versions complain about %I64.
16214 build_warnings="$build_warnings -Wno-format" ;;
16215 *-*-solaris*)
16216 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16217 # doesn't understand.
16218 build_warnings="$build_warnings -Wno-unknown-pragmas"
16219 # Solaris 11 <unistd.h> marks vfork deprecated.
16220 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
16221 *)
16222 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16223 # but there's a special case for this below.
16224 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
16225esac
16226
81ecdfbb
RW
16227# Check whether --enable-build-warnings was given.
16228if test "${enable_build_warnings+set}" = set; then :
16229 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
16230 yes) ;;
16231 no) build_warnings="-w";;
16232 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16233 build_warnings="${build_warnings} ${t}";;
16234 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16235 build_warnings="${t} ${build_warnings}";;
16236 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16237esac
d4f3574e 16238if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 16239 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 16240fi
81ecdfbb
RW
16241fi
16242# Check whether --enable-gdb-build-warnings was given.
16243if test "${enable_gdb_build_warnings+set}" = set; then :
16244 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
16245 yes) ;;
16246 no) build_warnings="-w";;
16247 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16248 build_warnings="${build_warnings} ${t}";;
16249 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16250 build_warnings="${t} ${build_warnings}";;
16251 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16252esac
16253if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16254 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16255fi
81ecdfbb 16256fi
3bc3d82a
PA
16257
16258# The set of warnings supported by a C++ compiler is not the same as
16259# of the C compiler.
cf6de44d 16260ac_ext=cpp
3bc3d82a
PA
16261ac_cpp='$CXXCPP $CPPFLAGS'
16262ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16263ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16264ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16265
3bc3d82a 16266
81ecdfbb 16267WARN_CFLAGS=""
c906108c
SS
16268if test "x${build_warnings}" != x -a "x$GCC" = xyes
16269then
81ecdfbb
RW
16270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16271$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
16272 # Separate out the -Werror flag as some files just cannot be
16273 # compiled with it enabled.
16274 for w in ${build_warnings}; do
7544db95
PA
16275 # GCC does not complain about -Wno-unknown-warning. Invert
16276 # and test -Wunknown-warning instead.
16277 case $w in
16278 -Wno-*)
16279 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
16280 -Wformat-nonliteral)
16281 # gcc requires -Wformat before -Wformat-nonliteral
16282 # will work, so stick them together.
16283 w="-Wformat $w"
16284 wtest="$w"
16285 ;;
7544db95
PA
16286 *)
16287 wtest=$w ;;
16288 esac
16289
746a987d
AC
16290 case $w in
16291 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
16292 *)
16293 # Check whether GCC accepts it.
4536bbc6 16294 saved_CFLAGS="$CFLAGS"
3e019bdc 16295 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 16296 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 16297 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
16298 if test "x$w" = "x-Wunused-variable"; then
16299 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16300 # fixed in GCC 4.9. This test is derived from the gdb
16301 # source code that triggered this bug in GCC.
16302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16303/* end confdefs.h. */
16304struct scoped_restore_base {};
16305 struct scoped_restore_tmpl : public scoped_restore_base {
16306 ~scoped_restore_tmpl() {}
16307 };
16308int
16309main ()
16310{
16311const scoped_restore_base &b = scoped_restore_tmpl();
16312 ;
16313 return 0;
16314}
16315_ACEOF
16316if ac_fn_cxx_try_compile "$LINENO"; then :
16317 WARN_CFLAGS="${WARN_CFLAGS} $w"
16318fi
16319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16320 else
16321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16322/* end confdefs.h. */
4536bbc6 16323
bec39cab
AC
16324int
16325main ()
16326{
4536bbc6 16327
bec39cab
AC
16328 ;
16329 return 0;
16330}
16331_ACEOF
3bc3d82a 16332if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 16333 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 16334fi
81ecdfbb 16335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 16336 fi
4536bbc6 16337 CFLAGS="$saved_CFLAGS"
3bc3d82a 16338 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
16339 esac
16340 done
81ecdfbb
RW
16341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16342$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
16343fi
16344
16345
104c1213 16346
cf6de44d 16347ac_ext=c
3bc3d82a
PA
16348ac_cpp='$CPP $CPPFLAGS'
16349ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16350ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16351ac_compiler_gnu=$ac_cv_c_compiler_gnu
16352
3bc3d82a 16353
b835bb52 16354
f35d5ade
TT
16355# Check whether --enable-ubsan was given.
16356if test "${enable_ubsan+set}" = set; then :
16357 enableval=$enable_ubsan;
16358else
eff98030 16359 enable_ubsan=no
f35d5ade
TT
16360fi
16361
16362if test "x$enable_ubsan" = xauto; then
16363 if $development; then
16364 enable_ubsan=yes
16365 fi
16366fi
16367ac_ext=cpp
16368ac_cpp='$CXXCPP $CPPFLAGS'
16369ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16370ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16371ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16372
16373if test "x$enable_ubsan" = xyes; then
16374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16375$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16376 saved_CXXFLAGS="$CXXFLAGS"
16377 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16379/* end confdefs.h. */
16380
16381int
16382main ()
16383{
16384
16385 ;
16386 return 0;
16387}
16388_ACEOF
16389if ac_fn_cxx_try_link "$LINENO"; then :
16390 enable_ubsan=yes
16391else
16392 enable_ubsan=no
16393fi
16394rm -f core conftest.err conftest.$ac_objext \
16395 conftest$ac_exeext conftest.$ac_ext
16396 CXXFLAGS="$saved_CXXFLAGS"
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16398$as_echo "$enable_ubsan" >&6; }
16399 if test "x$enable_ubsan" = xyes; then
16400 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16401 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16402 fi
16403fi
16404ac_ext=c
16405ac_cpp='$CPP $CPPFLAGS'
16406ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16407ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16408ac_compiler_gnu=$ac_cv_c_compiler_gnu
16409
16410
16411
7a292a7a 16412# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
16413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16414$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 16415if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 16416 $as_echo_n "(cached) " >&6
bec39cab 16417else
81ecdfbb 16418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16419/* end confdefs.h. */
7a292a7a
SS
16420
16421#if defined (__CYGWIN__) || defined (__CYGWIN32__)
16422lose
16423#endif
bec39cab 16424_ACEOF
7a292a7a 16425if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 16426 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
16427 gdb_cv_os_cygwin=yes
16428else
7a292a7a
SS
16429 gdb_cv_os_cygwin=no
16430fi
16431rm -f conftest*
16432
16433fi
81ecdfbb
RW
16434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16435$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 16436
aff38e61 16437
3eb25fda 16438SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 16439case ${host} in
95cbc983
AC
16440 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16441 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 16442 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 16443 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
16444esac
16445
16446
cd0fc7c3
SS
16447# libreadline needs libuser32.a in a cygwin environment
16448WIN32LIBS=
0ad6b8ee 16449if test x"$gdb_cv_os_cygwin" = xyes; then
c5394b80
JM
16450 WIN32LIBS="-luser32"
16451 case "${target}" in
16452 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16453 ;;
16454 esac
cd0fc7c3 16455fi
c906108c 16456
b4505029
MM
16457# The ser-tcp.c module requires sockets.
16458case ${host} in
16459 *mingw32*)
16460
81ecdfbb 16461$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
16462
16463 WIN32LIBS="$WIN32LIBS -lws2_32"
16464 ;;
16465esac
16466
7a292a7a 16467
31d99776 16468# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
16469
16470 OLD_CFLAGS=$CFLAGS
16471 OLD_LDFLAGS=$LDFLAGS
16472 OLD_LIBS=$LIBS
16473 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16474 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16475 # always want our bfd.
16476 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16477 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16478 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 16479 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16480 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 16481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 16482$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 16483if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 16484 $as_echo_n "(cached) " >&6
31d99776 16485else
81ecdfbb 16486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
16487/* end confdefs.h. */
16488#include <stdlib.h>
def63ff0
TT
16489 #include "bfd.h"
16490 #include "elf-bfd.h"
31d99776
DJ
16491
16492int
16493main ()
16494{
def63ff0 16495return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
16496 ;
16497 return 0;
16498}
16499_ACEOF
81ecdfbb 16500if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
16501 gdb_cv_var_elf=yes
16502else
81ecdfbb 16503 gdb_cv_var_elf=no
31d99776 16504fi
81ecdfbb
RW
16505rm -f core conftest.err conftest.$ac_objext \
16506 conftest$ac_exeext conftest.$ac_ext
31d99776 16507fi
81ecdfbb
RW
16508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16509$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
16510 CFLAGS=$OLD_CFLAGS
16511 LDFLAGS=$OLD_LDFLAGS
16512 LIBS=$OLD_LIBS
0ad6b8ee 16513if test "$gdb_cv_var_elf" = yes; then
d4777acb 16514 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 16515
81ecdfbb 16516$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 16517
075ff26d
JK
16518 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16519 if test "$plugins" = "yes"; then
a48b32c0
L
16520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16521$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 16522if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16523 $as_echo_n "(cached) " >&6
16524else
16525 ac_func_search_save_LIBS=$LIBS
16526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16527/* end confdefs.h. */
16528
16529/* Override any GCC internal prototype to avoid an error.
16530 Use char because int might match the return type of a GCC
16531 builtin and then its argument prototype would still apply. */
16532#ifdef __cplusplus
16533extern "C"
16534#endif
16535char dlopen ();
16536int
16537main ()
16538{
16539return dlopen ();
16540 ;
16541 return 0;
16542}
16543_ACEOF
16544for ac_lib in '' dl; do
16545 if test -z "$ac_lib"; then
16546 ac_res="none required"
16547 else
16548 ac_res=-l$ac_lib
16549 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16550 fi
16551 if ac_fn_c_try_link "$LINENO"; then :
16552 ac_cv_search_dlopen=$ac_res
16553fi
16554rm -f core conftest.err conftest.$ac_objext \
16555 conftest$ac_exeext
d0ac1c44 16556 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16557 break
16558fi
16559done
d0ac1c44 16560if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16561
16562else
16563 ac_cv_search_dlopen=no
16564fi
16565rm conftest.$ac_ext
16566LIBS=$ac_func_search_save_LIBS
16567fi
16568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16569$as_echo "$ac_cv_search_dlopen" >&6; }
16570ac_res=$ac_cv_search_dlopen
16571if test "$ac_res" != no; then :
16572 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16573
16574fi
16575
075ff26d 16576 fi
31d99776 16577fi
31d99776 16578
4f05add4
TT
16579# Add macho support to GDB, but only if BFD includes it.
16580
16581 OLD_CFLAGS=$CFLAGS
16582 OLD_LDFLAGS=$LDFLAGS
16583 OLD_LIBS=$LIBS
16584 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16585 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16586 # always want our bfd.
16587 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16588 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16589 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 16590 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16591 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
16592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16593$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 16594if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
16595 $as_echo_n "(cached) " >&6
16596else
16597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16598/* end confdefs.h. */
16599#include <stdlib.h>
16600 #include "bfd.h"
16601 #include "mach-o.h"
16602
16603int
16604main ()
16605{
16606return bfd_mach_o_lookup_command (NULL, 0, NULL);
16607 ;
16608 return 0;
16609}
16610_ACEOF
16611if ac_fn_c_try_link "$LINENO"; then :
16612 gdb_cv_var_macho=yes
16613else
16614 gdb_cv_var_macho=no
16615fi
16616rm -f core conftest.err conftest.$ac_objext \
16617 conftest$ac_exeext conftest.$ac_ext
16618fi
16619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16620$as_echo "$gdb_cv_var_macho" >&6; }
16621 CFLAGS=$OLD_CFLAGS
16622 LDFLAGS=$OLD_LDFLAGS
16623 LIBS=$OLD_LIBS
0ad6b8ee 16624if test "$gdb_cv_var_macho" = yes; then
4f05add4
TT
16625 CONFIG_OBS="$CONFIG_OBS machoread.o"
16626fi
16627
121ce6e5
DJ
16628# Add any host-specific objects to GDB.
16629CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16630
608e2dbb 16631# If building on ELF, look for lzma support for embedded compressed debug info.
0ad6b8ee 16632if test "$gdb_cv_var_elf" = yes; then
608e2dbb
TT
16633
16634# Check whether --with-lzma was given.
16635if test "${with_lzma+set}" = set; then :
16636 withval=$with_lzma;
16637else
16638 with_lzma=auto
16639fi
16640
16641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16642$as_echo_n "checking whether to use lzma... " >&6; }
16643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16644$as_echo "$with_lzma" >&6; }
16645
16646 if test "${with_lzma}" != no; then
16647
16648
16649
16650
16651
16652
16653
16654
16655 use_additional=yes
16656
16657 acl_save_prefix="$prefix"
16658 prefix="$acl_final_prefix"
16659 acl_save_exec_prefix="$exec_prefix"
16660 exec_prefix="$acl_final_exec_prefix"
16661
16662 eval additional_includedir=\"$includedir\"
16663 eval additional_libdir=\"$libdir\"
16664
16665 exec_prefix="$acl_save_exec_prefix"
16666 prefix="$acl_save_prefix"
16667
16668
16669# Check whether --with-liblzma-prefix was given.
16670if test "${with_liblzma_prefix+set}" = set; then :
16671 withval=$with_liblzma_prefix;
16672 if test "X$withval" = "Xno"; then
16673 use_additional=no
16674 else
16675 if test "X$withval" = "X"; then
16676
16677 acl_save_prefix="$prefix"
16678 prefix="$acl_final_prefix"
16679 acl_save_exec_prefix="$exec_prefix"
16680 exec_prefix="$acl_final_exec_prefix"
16681
16682 eval additional_includedir=\"$includedir\"
16683 eval additional_libdir=\"$libdir\"
16684
16685 exec_prefix="$acl_save_exec_prefix"
16686 prefix="$acl_save_prefix"
16687
16688 else
16689 additional_includedir="$withval/include"
16690 additional_libdir="$withval/lib"
16691 fi
16692 fi
16693
16694fi
16695
16696 LIBLZMA=
16697 LTLIBLZMA=
16698 INCLZMA=
16699 rpathdirs=
16700 ltrpathdirs=
16701 names_already_handled=
16702 names_next_round='lzma '
16703 while test -n "$names_next_round"; do
16704 names_this_round="$names_next_round"
16705 names_next_round=
16706 for name in $names_this_round; do
16707 already_handled=
16708 for n in $names_already_handled; do
16709 if test "$n" = "$name"; then
16710 already_handled=yes
16711 break
16712 fi
16713 done
16714 if test -z "$already_handled"; then
16715 names_already_handled="$names_already_handled $name"
16716 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16717 eval value=\"\$HAVE_LIB$uppername\"
16718 if test -n "$value"; then
16719 if test "$value" = yes; then
16720 eval value=\"\$LIB$uppername\"
16721 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16722 eval value=\"\$LTLIB$uppername\"
16723 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16724 else
16725 :
16726 fi
16727 else
16728 found_dir=
16729 found_la=
16730 found_so=
16731 found_a=
16732 if test $use_additional = yes; then
16733 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16734 found_dir="$additional_libdir"
16735 found_so="$additional_libdir/lib$name.$shlibext"
16736 if test -f "$additional_libdir/lib$name.la"; then
16737 found_la="$additional_libdir/lib$name.la"
16738 fi
16739 else
16740 if test -f "$additional_libdir/lib$name.$libext"; then
16741 found_dir="$additional_libdir"
16742 found_a="$additional_libdir/lib$name.$libext"
16743 if test -f "$additional_libdir/lib$name.la"; then
16744 found_la="$additional_libdir/lib$name.la"
16745 fi
16746 fi
16747 fi
16748 fi
16749 if test "X$found_dir" = "X"; then
16750 for x in $LDFLAGS $LTLIBLZMA; do
16751
16752 acl_save_prefix="$prefix"
16753 prefix="$acl_final_prefix"
16754 acl_save_exec_prefix="$exec_prefix"
16755 exec_prefix="$acl_final_exec_prefix"
16756 eval x=\"$x\"
16757 exec_prefix="$acl_save_exec_prefix"
16758 prefix="$acl_save_prefix"
16759
16760 case "$x" in
16761 -L*)
16762 dir=`echo "X$x" | sed -e 's/^X-L//'`
16763 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16764 found_dir="$dir"
16765 found_so="$dir/lib$name.$shlibext"
16766 if test -f "$dir/lib$name.la"; then
16767 found_la="$dir/lib$name.la"
16768 fi
16769 else
16770 if test -f "$dir/lib$name.$libext"; then
16771 found_dir="$dir"
16772 found_a="$dir/lib$name.$libext"
16773 if test -f "$dir/lib$name.la"; then
16774 found_la="$dir/lib$name.la"
16775 fi
16776 fi
16777 fi
16778 ;;
16779 esac
16780 if test "X$found_dir" != "X"; then
16781 break
16782 fi
16783 done
16784 fi
16785 if test "X$found_dir" != "X"; then
16786 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16787 if test "X$found_so" != "X"; then
16788 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16789 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16790 else
16791 haveit=
16792 for x in $ltrpathdirs; do
16793 if test "X$x" = "X$found_dir"; then
16794 haveit=yes
16795 break
16796 fi
16797 done
16798 if test -z "$haveit"; then
16799 ltrpathdirs="$ltrpathdirs $found_dir"
16800 fi
16801 if test "$hardcode_direct" = yes; then
16802 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16803 else
16804 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16805 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16806 haveit=
16807 for x in $rpathdirs; do
16808 if test "X$x" = "X$found_dir"; then
16809 haveit=yes
16810 break
16811 fi
16812 done
16813 if test -z "$haveit"; then
16814 rpathdirs="$rpathdirs $found_dir"
16815 fi
16816 else
16817 haveit=
16818 for x in $LDFLAGS $LIBLZMA; do
16819
16820 acl_save_prefix="$prefix"
16821 prefix="$acl_final_prefix"
16822 acl_save_exec_prefix="$exec_prefix"
16823 exec_prefix="$acl_final_exec_prefix"
16824 eval x=\"$x\"
16825 exec_prefix="$acl_save_exec_prefix"
16826 prefix="$acl_save_prefix"
16827
16828 if test "X$x" = "X-L$found_dir"; then
16829 haveit=yes
16830 break
16831 fi
16832 done
16833 if test -z "$haveit"; then
16834 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16835 fi
16836 if test "$hardcode_minus_L" != no; then
16837 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16838 else
16839 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16840 fi
16841 fi
16842 fi
16843 fi
16844 else
16845 if test "X$found_a" != "X"; then
16846 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16847 else
16848 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16849 fi
16850 fi
16851 additional_includedir=
16852 case "$found_dir" in
16853 */lib | */lib/)
16854 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16855 additional_includedir="$basedir/include"
16856 ;;
16857 esac
16858 if test "X$additional_includedir" != "X"; then
16859 if test "X$additional_includedir" != "X/usr/include"; then
16860 haveit=
16861 if test "X$additional_includedir" = "X/usr/local/include"; then
16862 if test -n "$GCC"; then
16863 case $host_os in
16864 linux*) haveit=yes;;
16865 esac
16866 fi
16867 fi
16868 if test -z "$haveit"; then
16869 for x in $CPPFLAGS $INCLZMA; do
16870
16871 acl_save_prefix="$prefix"
16872 prefix="$acl_final_prefix"
16873 acl_save_exec_prefix="$exec_prefix"
16874 exec_prefix="$acl_final_exec_prefix"
16875 eval x=\"$x\"
16876 exec_prefix="$acl_save_exec_prefix"
16877 prefix="$acl_save_prefix"
16878
16879 if test "X$x" = "X-I$additional_includedir"; then
16880 haveit=yes
16881 break
16882 fi
16883 done
16884 if test -z "$haveit"; then
16885 if test -d "$additional_includedir"; then
16886 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16887 fi
16888 fi
16889 fi
16890 fi
16891 fi
16892 if test -n "$found_la"; then
16893 save_libdir="$libdir"
16894 case "$found_la" in
16895 */* | *\\*) . "$found_la" ;;
16896 *) . "./$found_la" ;;
16897 esac
16898 libdir="$save_libdir"
16899 for dep in $dependency_libs; do
16900 case "$dep" in
16901 -L*)
16902 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16903 if test "X$additional_libdir" != "X/usr/lib"; then
16904 haveit=
16905 if test "X$additional_libdir" = "X/usr/local/lib"; then
16906 if test -n "$GCC"; then
16907 case $host_os in
16908 linux*) haveit=yes;;
16909 esac
16910 fi
16911 fi
16912 if test -z "$haveit"; then
16913 haveit=
16914 for x in $LDFLAGS $LIBLZMA; do
16915
16916 acl_save_prefix="$prefix"
16917 prefix="$acl_final_prefix"
16918 acl_save_exec_prefix="$exec_prefix"
16919 exec_prefix="$acl_final_exec_prefix"
16920 eval x=\"$x\"
16921 exec_prefix="$acl_save_exec_prefix"
16922 prefix="$acl_save_prefix"
16923
16924 if test "X$x" = "X-L$additional_libdir"; then
16925 haveit=yes
16926 break
16927 fi
16928 done
16929 if test -z "$haveit"; then
16930 if test -d "$additional_libdir"; then
16931 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16932 fi
16933 fi
16934 haveit=
16935 for x in $LDFLAGS $LTLIBLZMA; do
16936
16937 acl_save_prefix="$prefix"
16938 prefix="$acl_final_prefix"
16939 acl_save_exec_prefix="$exec_prefix"
16940 exec_prefix="$acl_final_exec_prefix"
16941 eval x=\"$x\"
16942 exec_prefix="$acl_save_exec_prefix"
16943 prefix="$acl_save_prefix"
16944
16945 if test "X$x" = "X-L$additional_libdir"; then
16946 haveit=yes
16947 break
16948 fi
16949 done
16950 if test -z "$haveit"; then
16951 if test -d "$additional_libdir"; then
16952 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16953 fi
16954 fi
16955 fi
16956 fi
16957 ;;
16958 -R*)
16959 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16960 if test "$enable_rpath" != no; then
16961 haveit=
16962 for x in $rpathdirs; do
16963 if test "X$x" = "X$dir"; then
16964 haveit=yes
16965 break
16966 fi
16967 done
16968 if test -z "$haveit"; then
16969 rpathdirs="$rpathdirs $dir"
16970 fi
16971 haveit=
16972 for x in $ltrpathdirs; do
16973 if test "X$x" = "X$dir"; then
16974 haveit=yes
16975 break
16976 fi
16977 done
16978 if test -z "$haveit"; then
16979 ltrpathdirs="$ltrpathdirs $dir"
16980 fi
16981 fi
16982 ;;
16983 -l*)
16984 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16985 ;;
16986 *.la)
16987 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16988 ;;
16989 *)
16990 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16991 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16992 ;;
16993 esac
16994 done
16995 fi
16996 else
16997 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16998 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16999 fi
17000 fi
17001 fi
17002 done
17003 done
17004 if test "X$rpathdirs" != "X"; then
17005 if test -n "$hardcode_libdir_separator"; then
17006 alldirs=
17007 for found_dir in $rpathdirs; do
17008 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17009 done
17010 acl_save_libdir="$libdir"
17011 libdir="$alldirs"
17012 eval flag=\"$hardcode_libdir_flag_spec\"
17013 libdir="$acl_save_libdir"
17014 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17015 else
17016 for found_dir in $rpathdirs; do
17017 acl_save_libdir="$libdir"
17018 libdir="$found_dir"
17019 eval flag=\"$hardcode_libdir_flag_spec\"
17020 libdir="$acl_save_libdir"
17021 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17022 done
17023 fi
17024 fi
17025 if test "X$ltrpathdirs" != "X"; then
17026 for found_dir in $ltrpathdirs; do
17027 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17028 done
17029 fi
17030
17031
17032 ac_save_CPPFLAGS="$CPPFLAGS"
17033
17034 for element in $INCLZMA; do
17035 haveit=
17036 for x in $CPPFLAGS; do
17037
17038 acl_save_prefix="$prefix"
17039 prefix="$acl_final_prefix"
17040 acl_save_exec_prefix="$exec_prefix"
17041 exec_prefix="$acl_final_exec_prefix"
17042 eval x=\"$x\"
17043 exec_prefix="$acl_save_exec_prefix"
17044 prefix="$acl_save_prefix"
17045
17046 if test "X$x" = "X$element"; then
17047 haveit=yes
17048 break
17049 fi
17050 done
17051 if test -z "$haveit"; then
17052 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17053 fi
17054 done
17055
17056
17057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17058$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 17059if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
17060 $as_echo_n "(cached) " >&6
17061else
17062
17063 ac_save_LIBS="$LIBS"
17064 LIBS="$LIBS $LIBLZMA"
17065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17066/* end confdefs.h. */
17067#include "lzma.h"
17068int
17069main ()
17070{
17071lzma_index_iter iter;
17072 lzma_index_iter_init (&iter, 0);
17073 lzma_mf_is_supported (LZMA_MF_HC3);
17074 ;
17075 return 0;
17076}
17077_ACEOF
17078if ac_fn_c_try_link "$LINENO"; then :
17079 ac_cv_liblzma=yes
17080else
17081 ac_cv_liblzma=no
17082fi
17083rm -f core conftest.err conftest.$ac_objext \
17084 conftest$ac_exeext conftest.$ac_ext
17085 LIBS="$ac_save_LIBS"
17086
17087fi
17088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17089$as_echo "$ac_cv_liblzma" >&6; }
17090 if test "$ac_cv_liblzma" = yes; then
17091 HAVE_LIBLZMA=yes
17092
17093$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17094
17095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17096$as_echo_n "checking how to link with liblzma... " >&6; }
17097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17098$as_echo "$LIBLZMA" >&6; }
17099 else
17100 HAVE_LIBLZMA=no
17101 CPPFLAGS="$ac_save_CPPFLAGS"
17102 LIBLZMA=
17103 LTLIBLZMA=
17104 fi
17105
17106
17107
17108
17109
17110
17111 if test "$HAVE_LIBLZMA" != yes; then
17112 if test "$with_lzma" = yes; then
d0ac1c44 17113 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
17114 fi
17115 fi
17116 fi
17117fi
17118
3fc11d3e
JM
17119LIBGUI="../libgui/src/libgui.a"
17120GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17121
17122
7a292a7a 17123
3fc11d3e
JM
17124WIN32LDAPP=
17125
17126
17127
d91670b9 17128case "${host}" in
686a5eed 17129*-*-cygwin* | *-*-mingw* )
d91670b9
CV
17130 configdir="win"
17131 ;;
17132*)
17133 configdir="unix"
17134 ;;
17135esac
3fc11d3e
JM
17136
17137GDBTKLIBS=
17138if test "${enable_gdbtk}" = "yes"; then
17139
d1c3b63a
KS
17140 # Gdbtk must have an absolute path to srcdir in order to run
17141 # properly when not installed.
17142 here=`pwd`
17143 cd ${srcdir}
17144 GDBTK_SRC_DIR=`pwd`
17145 cd $here
17146
bec39cab 17147
5062cc19
KS
17148 #
17149 # Ok, lets find the tcl configuration
17150 # First, look for one uninstalled.
17151 # the alternative search directory is invoked by --with-tcl
17152 #
3fc11d3e 17153
5062cc19
KS
17154 if test x"${no_tcl}" = x ; then
17155 # we reset no_tcl in case something fails here
17156 no_tcl=true
bec39cab 17157
81ecdfbb
RW
17158# Check whether --with-tcl was given.
17159if test "${with_tcl+set}" = set; then :
17160 withval=$with_tcl; with_tclconfig=${withval}
17161fi
17162
17163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17164$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 17165 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 17166 $as_echo_n "(cached) " >&6
3fc11d3e 17167else
bec39cab 17168
3fc11d3e 17169
5062cc19
KS
17170 # First check to see if --with-tcl was specified.
17171 case "${host}" in
17172 *-*-cygwin*) platDir="win" ;;
17173 *) platDir="unix" ;;
17174 esac
17175 if test x"${with_tclconfig}" != x ; then
17176 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17177 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17178 else
d0ac1c44 17179 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
17180 fi
17181 fi
17182
17183 # then check for a private Tcl installation
17184 if test x"${ac_cv_c_tclconfig}" = x ; then
17185 for i in \
17186 ../tcl \
17187 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17188 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17189 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17190 ../../tcl \
17191 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17192 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17193 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17194 ../../../tcl \
17195 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17196 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17197 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17198 if test -f "$i/$platDir/tclConfig.sh" ; then
17199 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17200 break
17201 fi
17202 done
17203 fi
17204
17205 # on Darwin, check in Framework installation locations
17206 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17207 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17208 `ls -d /Library/Frameworks 2>/dev/null` \
17209 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17210 `ls -d /System/Library/Frameworks 2>/dev/null` \
17211 ; do
17212 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17213 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17214 break
17215 fi
17216 done
17217 fi
17218
17219 # check in a few common install locations
17220 if test x"${ac_cv_c_tclconfig}" = x ; then
17221 for i in `ls -d ${libdir} 2>/dev/null` \
17222 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17223 `ls -d ${prefix}/lib 2>/dev/null` \
17224 `ls -d /usr/local/lib 2>/dev/null` \
17225 `ls -d /usr/contrib/lib 2>/dev/null` \
17226 `ls -d /usr/lib 2>/dev/null` \
17227 ; do
17228 if test -f "$i/tclConfig.sh" ; then
17229 ac_cv_c_tclconfig=`(cd $i; pwd)`
17230 break
17231 fi
17232 done
17233 fi
3fc11d3e 17234
5062cc19
KS
17235 # check in a few other private locations
17236 if test x"${ac_cv_c_tclconfig}" = x ; then
17237 for i in \
17238 ${srcdir}/../tcl \
17239 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17240 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17241 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17242 if test -f "$i/$platDir/tclConfig.sh" ; then
17243 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17244 break
17245 fi
17246 done
17247 fi
bec39cab 17248
3fc11d3e
JM
17249fi
17250
5062cc19
KS
17251
17252 if test x"${ac_cv_c_tclconfig}" = x ; then
17253 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
17254 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17255$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
17256 else
17257 no_tcl=
17258 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
17259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17260$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
17261 fi
17262 fi
3fc11d3e 17263
bec39cab 17264
85541719
DE
17265 # If $no_tk is nonempty, then we can't do Tk, and there is no
17266 # point to doing Tcl.
bec39cab 17267
5062cc19
KS
17268 #
17269 # Ok, lets find the tk configuration
17270 # First, look for one uninstalled.
17271 # the alternative search directory is invoked by --with-tk
17272 #
3fc11d3e 17273
5062cc19
KS
17274 if test x"${no_tk}" = x ; then
17275 # we reset no_tk in case something fails here
17276 no_tk=true
bec39cab 17277
81ecdfbb
RW
17278# Check whether --with-tk was given.
17279if test "${with_tk+set}" = set; then :
17280 withval=$with_tk; with_tkconfig=${withval}
17281fi
17282
17283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17284$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 17285 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 17286 $as_echo_n "(cached) " >&6
bec39cab 17287else
3fc11d3e
JM
17288
17289
5062cc19
KS
17290 # First check to see if --with-tkconfig was specified.
17291 if test x"${with_tkconfig}" != x ; then
17292 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17293 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17294 else
d0ac1c44 17295 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
17296 fi
17297 fi
3fc11d3e 17298
5062cc19
KS
17299 # then check for a private Tk library
17300 case "${host}" in
17301 *-*-cygwin*) platDir="win" ;;
17302 *) platDir="unix" ;;
17303 esac
17304 if test x"${ac_cv_c_tkconfig}" = x ; then
17305 for i in \
17306 ../tk \
17307 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17308 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17309 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17310 ../../tk \
17311 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17312 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17313 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17314 ../../../tk \
17315 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17316 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17317 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17318 if test -f "$i/$platDir/tkConfig.sh" ; then
17319 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17320 break
17321 fi
17322 done
17323 fi
17324
17325 # on Darwin, check in Framework installation locations
17326 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17327 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17328 `ls -d /Library/Frameworks 2>/dev/null` \
17329 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17330 `ls -d /System/Library/Frameworks 2>/dev/null` \
17331 ; do
17332 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17333 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17334 break
17335 fi
17336 done
17337 fi
17338
17339 # check in a few common install locations
17340 if test x"${ac_cv_c_tkconfig}" = x ; then
17341 for i in `ls -d ${libdir} 2>/dev/null` \
17342 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17343 `ls -d ${prefix}/lib 2>/dev/null` \
17344 `ls -d /usr/local/lib 2>/dev/null` \
17345 `ls -d /usr/contrib/lib 2>/dev/null` \
17346 `ls -d /usr/lib 2>/dev/null` \
17347 ; do
17348 if test -f "$i/tkConfig.sh" ; then
17349 ac_cv_c_tkconfig=`(cd $i; pwd)`
17350 break
17351 fi
17352 done
17353 fi
17354 # check in a few other private locations
17355 if test x"${ac_cv_c_tkconfig}" = x ; then
17356 for i in \
17357 ${srcdir}/../tk \
17358 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17359 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17360 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17361 if test -f "$i/$platDir/tkConfig.sh" ; then
17362 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17363 break
17364 fi
17365 done
17366 fi
3fc11d3e 17367
3fc11d3e
JM
17368fi
17369
17370
5062cc19
KS
17371 if test x"${ac_cv_c_tkconfig}" = x ; then
17372 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
17373 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17374$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
17375 else
17376 no_tk=
17377 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
17378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17379$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 17380 fi
3fc11d3e 17381 fi
dd2504ab 17382
dd2504ab 17383
85541719
DE
17384 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17385
81ecdfbb
RW
17386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17387$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
17388
17389 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
17390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17391$as_echo "loading" >&6; }
85541719
DE
17392 . ${TCL_BIN_DIR}/tclConfig.sh
17393 else
81ecdfbb
RW
17394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17395$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
17396 fi
17397
17398 # eval is required to do the TCL_DBGX substitution
17399 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17400 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17401
17402 # If the TCL_BIN_DIR is the build directory (not the install directory),
17403 # then set the common variable name to the value of the build variables.
17404 # For example, the variable TCL_LIB_SPEC will be set to the value
17405 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17406 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17407 # installed and uninstalled version of Tcl.
17408 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17409 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17410 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17411 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17412 elif test "`uname -s`" = "Darwin"; then
17413 # If Tcl was built as a framework, attempt to use the libraries
17414 # from the framework at the given location so that linking works
a68ffae9 17415 # against Tcl.framework installed in an arbitrary location.
85541719
DE
17416 case ${TCL_DEFS} in
17417 *TCL_FRAMEWORK*)
17418 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17419 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17420 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17421 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17422 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17423 break
17424 fi
17425 done
17426 fi
17427 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17428 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17429 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17430 fi
17431 ;;
17432 esac
17433 fi
17434
17435 # eval is required to do the TCL_DBGX substitution
17436 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17437 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17438 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17439 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455 # Check for in-tree tcl
17456 here=`pwd`
17457 cd ${srcdir}/..
17458 topdir=`pwd`
17459 cd ${here}
17460
17461 intree="no"
17462 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17463 intree="yes"
17464 fi
17465
17466 # Find Tcl private headers
17467 if test x"${intree}" = xno; then
17468
81ecdfbb
RW
17469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17470$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
17471 private_dir=""
17472 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17473 if test -f ${dir}/tclInt.h ; then
17474 private_dir=${dir}
17475 fi
17476
17477 if test x"${private_dir}" = x; then
d0ac1c44 17478 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
17479 else
17480 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17482$as_echo "${private_dir}" >&6; }
85541719
DE
17483 fi
17484
17485 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17486 TCL_LIBRARY="${TCL_LIB_SPEC}"
17487 TCL_DEPS=""
17488 else
17489 # If building tcl in the same src tree, private headers
17490 # are not needed, but we need to be sure to use the right
17491 # headers library
17492 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17493 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17494 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17495 fi
17496
17497
17498
17499
17500
81ecdfbb
RW
17501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17502$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 17503
5062cc19 17504 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
17505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17506$as_echo "loading" >&6; }
5062cc19 17507 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 17508 else
81ecdfbb
RW
17509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17510$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 17511 fi
bec39cab 17512
5062cc19
KS
17513 # eval is required to do the TK_DBGX substitution
17514 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17515 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17516
17517 # If the TK_BIN_DIR is the build directory (not the install directory),
17518 # then set the common variable name to the value of the build variables.
17519 # For example, the variable TK_LIB_SPEC will be set to the value
17520 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17521 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17522 # installed and uninstalled version of Tcl.
85541719 17523 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
17524 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17525 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17526 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17527 elif test "`uname -s`" = "Darwin"; then
17528 # If Tk was built as a framework, attempt to use the libraries
17529 # from the framework at the given location so that linking works
a68ffae9 17530 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
17531 case ${TK_DEFS} in
17532 *TK_FRAMEWORK*)
85541719 17533 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
17534 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17535 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17536 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17537 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17538 break
17539 fi
17540 done
17541 fi
85541719 17542 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
17543 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17544 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17545 fi
17546 ;;
17547 esac
3fc11d3e
JM
17548 fi
17549
5062cc19
KS
17550 # eval is required to do the TK_DBGX substitution
17551 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17552 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17553 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17554 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 17555
3fc11d3e
JM
17556
17557
bec39cab
AC
17558
17559
17560
17561
17562
17563
17564
3fc11d3e 17565
3fc11d3e 17566
bec39cab 17567
bec39cab 17568
85541719
DE
17569 # Check for in-tree Tk
17570 intree="no"
17571 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17572 intree="yes"
17573 fi
3fc11d3e 17574
85541719
DE
17575 # Find Tk private headers
17576 if test x"${intree}" = xno; then
3fc11d3e 17577
81ecdfbb
RW
17578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17579$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
17580 private_dir=""
17581 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17582 if test -f ${dir}/tkInt.h; then
17583 private_dir=${dir}
3fc11d3e 17584 fi
bec39cab 17585
5062cc19 17586 if test x"${private_dir}" = x; then
d0ac1c44 17587 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 17588 else
5062cc19 17589 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17591$as_echo "${private_dir}" >&6; }
3fc11d3e 17592 fi
3fc11d3e 17593
85541719
DE
17594 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17595 TK_LIBRARY=${TK_LIB_SPEC}
17596 TK_DEPS=""
17597 else
17598 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17599 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17600 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17601 fi
3fc11d3e
JM
17602
17603
3fc11d3e
JM
17604
17605
3fc11d3e 17606
85541719 17607 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 17608
85541719
DE
17609 # Include some libraries that Tcl and Tk want.
17610 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17611 # Yes, the ordering seems wrong here. But it isn't.
17612 # TK_LIBS is the list of libraries that need to be linked
17613 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17614 # were in LIBS then any link tests after this point would
17615 # try to include things like `$(LIBGUI)', which wouldn't work.
17616 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 17617
85541719
DE
17618 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17619 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17620 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17621 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17622 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17623 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17624 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 17625
0ad6b8ee 17626 if test x"$gdb_cv_os_cygwin" = xyes; then
85541719
DE
17627 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17628 WIN32LDAPP="-Wl,--subsystem,console"
17629 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 17630 fi
ffc6a242 17631
81ecdfbb 17632 subdirs="$subdirs gdbtk"
3ace7edb 17633
85541719 17634 fi
3fc11d3e
JM
17635fi
17636
17637
17638
17639
17640
17641
17642
17643
81ecdfbb
RW
17644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17645$as_echo_n "checking for X... " >&6; }
bec39cab 17646
c906108c 17647
81ecdfbb
RW
17648# Check whether --with-x was given.
17649if test "${with_x+set}" = set; then :
17650 withval=$with_x;
17651fi
c906108c
SS
17652
17653# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17654if test "x$with_x" = xno; then
17655 # The user explicitly disabled X.
17656 have_x=disabled
17657else
81ecdfbb 17658 case $x_includes,$x_libraries in #(
d0ac1c44
SM
17659 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17660 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 17661 $as_echo_n "(cached) " >&6
c906108c
SS
17662else
17663 # One or both of the vars are not set, and there is no cached value.
bec39cab 17664ac_x_includes=no ac_x_libraries=no
81ecdfbb 17665rm -f -r conftest.dir
bec39cab
AC
17666if mkdir conftest.dir; then
17667 cd conftest.dir
bec39cab 17668 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
17669incroot:
17670 @echo incroot='${INCROOT}'
17671usrlibdir:
17672 @echo usrlibdir='${USRLIBDIR}'
17673libdir:
17674 @echo libdir='${LIBDIR}'
17675_ACEOF
17676 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 17677 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
17678 for ac_var in incroot usrlibdir libdir; do
17679 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17680 done
c906108c 17681 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
17682 for ac_extension in a so sl dylib la dll; do
17683 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17684 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 17685 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
17686 fi
17687 done
17688 # Screen out bogus values from the imake configuration. They are
17689 # bogus both because they are the default anyway, and because
17690 # using them would break gcc on systems where it needs fixed includes.
bec39cab 17691 case $ac_im_incroot in
81ecdfbb 17692 /usr/include) ac_x_includes= ;;
bec39cab 17693 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 17694 esac
bec39cab 17695 case $ac_im_usrlibdir in
81ecdfbb 17696 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 17697 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
17698 esac
17699 fi
17700 cd ..
81ecdfbb 17701 rm -f -r conftest.dir
c906108c
SS
17702fi
17703
bec39cab
AC
17704# Standard set of common directories for X headers.
17705# Check X11 before X11Rn because it is often a symlink to the current release.
17706ac_x_header_dirs='
17707/usr/X11/include
81ecdfbb 17708/usr/X11R7/include
bec39cab
AC
17709/usr/X11R6/include
17710/usr/X11R5/include
17711/usr/X11R4/include
17712
17713/usr/include/X11
81ecdfbb 17714/usr/include/X11R7
bec39cab
AC
17715/usr/include/X11R6
17716/usr/include/X11R5
17717/usr/include/X11R4
17718
17719/usr/local/X11/include
81ecdfbb 17720/usr/local/X11R7/include
bec39cab
AC
17721/usr/local/X11R6/include
17722/usr/local/X11R5/include
17723/usr/local/X11R4/include
17724
17725/usr/local/include/X11
81ecdfbb 17726/usr/local/include/X11R7
bec39cab
AC
17727/usr/local/include/X11R6
17728/usr/local/include/X11R5
17729/usr/local/include/X11R4
17730
17731/usr/X386/include
17732/usr/x386/include
17733/usr/XFree86/include/X11
17734
17735/usr/include
17736/usr/local/include
17737/usr/unsupported/include
17738/usr/athena/include
17739/usr/local/x11r5/include
17740/usr/lpp/Xamples/include
17741
17742/usr/openwin/include
17743/usr/openwin/share/include'
17744
17745if test "$ac_x_includes" = no; then
81ecdfbb 17746 # Guess where to find include files, by looking for Xlib.h.
c906108c 17747 # First, try using that file with no special directory specified.
81ecdfbb 17748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17749/* end confdefs.h. */
81ecdfbb 17750#include <X11/Xlib.h>
bec39cab 17751_ACEOF
81ecdfbb 17752if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
17753 # We can compile using X headers with no special include directory.
17754ac_x_includes=
17755else
bec39cab 17756 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 17757 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
17758 ac_x_includes=$ac_dir
17759 break
17760 fi
17761done
c906108c 17762fi
d0ac1c44 17763rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 17764fi # $ac_x_includes = no
c906108c 17765
bec39cab 17766if test "$ac_x_libraries" = no; then
c906108c 17767 # Check for the libraries.
c906108c
SS
17768 # See if we find them without any special options.
17769 # Don't add to $LIBS permanently.
bec39cab 17770 ac_save_LIBS=$LIBS
81ecdfbb
RW
17771 LIBS="-lX11 $LIBS"
17772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17773/* end confdefs.h. */
81ecdfbb 17774#include <X11/Xlib.h>
bec39cab
AC
17775int
17776main ()
17777{
81ecdfbb 17778XrmInitialize ()
bec39cab
AC
17779 ;
17780 return 0;
17781}
17782_ACEOF
81ecdfbb 17783if ac_fn_c_try_link "$LINENO"; then :
bec39cab 17784 LIBS=$ac_save_LIBS
c906108c
SS
17785# We can link X programs with no special library path.
17786ac_x_libraries=
17787else
81ecdfbb
RW
17788 LIBS=$ac_save_LIBS
17789for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 17790do
bec39cab 17791 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
17792 for ac_extension in a so sl dylib la dll; do
17793 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
17794 ac_x_libraries=$ac_dir
17795 break 2
17796 fi
17797 done
17798done
17799fi
81ecdfbb
RW
17800rm -f core conftest.err conftest.$ac_objext \
17801 conftest$ac_exeext conftest.$ac_ext
bec39cab 17802fi # $ac_x_libraries = no
c906108c 17803
81ecdfbb
RW
17804case $ac_x_includes,$ac_x_libraries in #(
17805 no,* | *,no | *\'*)
17806 # Didn't find X, or a directory has "'" in its name.
17807 ac_cv_have_x="have_x=no";; #(
17808 *)
17809 # Record where we found X for the cache.
17810 ac_cv_have_x="have_x=yes\
17811 ac_x_includes='$ac_x_includes'\
17812 ac_x_libraries='$ac_x_libraries'"
17813esac
c906108c 17814fi
81ecdfbb
RW
17815;; #(
17816 *) have_x=yes;;
17817 esac
c906108c
SS
17818 eval "$ac_cv_have_x"
17819fi # $with_x != no
17820
17821if test "$have_x" != yes; then
81ecdfbb
RW
17822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17823$as_echo "$have_x" >&6; }
c906108c
SS
17824 no_x=yes
17825else
17826 # If each of the values was on the command line, it overrides each guess.
17827 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17828 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17829 # Update the cache value to reflect the command line values.
81ecdfbb
RW
17830 ac_cv_have_x="have_x=yes\
17831 ac_x_includes='$x_includes'\
17832 ac_x_libraries='$x_libraries'"
17833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17834$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
17835fi
17836
17837
bec39cab 17838# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 17839# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
17840# This code just checks for a few cases where we'd like to ignore those
17841# definitions, even when they're present in the '.mt' file. These cases
17842# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 17843# not part of the source tree.
7a292a7a 17844#
81ecdfbb
RW
17845# Check whether --enable-sim was given.
17846if test "${enable_sim+set}" = set; then :
17847 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
17848 echo "enableval = ${enableval}";
17849 case "${enableval}" in
17850 yes) ignore_sim=false ;;
17851 no) ignore_sim=true ;;
17852 *) ignore_sim=false ;;
17853 esac
17854else
17855 ignore_sim=false
81ecdfbb
RW
17856fi
17857
7a292a7a
SS
17858
17859if test ! -d "${srcdir}/../sim"; then
17860 ignore_sim=true
17861fi
17862
9b624dbe
UW
17863SIM=
17864SIM_OBS=
17865if test "${ignore_sim}" = "false"; then
17866 if test x"${gdb_sim}" != x ; then
17867 SIM="${gdb_sim}"
17868 SIM_OBS="remote-sim.o"
60ca704f 17869
81ecdfbb 17870$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17871
976102cd
PA
17872
17873 # Some tdep code should only be compiled in when the ppc sim is
17874 # built. PR sim/13418.
17875 case $target in
17876 powerpc*-*-*)
17877
17878$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17879
17880 ;;
17881 esac
9b624dbe 17882 fi
7a292a7a
SS
17883fi
17884
17885
17886
c906108c
SS
17887
17888
17889
17890
17891
17892
dfcd3bfb 17893
e56ac5c3
AC
17894
17895
b3a90332
AC
17896
17897
c35f4ffc 17898# List of host floatformats.
bec39cab
AC
17899
17900cat >>confdefs.h <<_ACEOF
c35f4ffc 17901#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17902_ACEOF
c35f4ffc 17903
bec39cab
AC
17904
17905cat >>confdefs.h <<_ACEOF
c35f4ffc 17906#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17907_ACEOF
17908
c35f4ffc 17909
bec39cab 17910cat >>confdefs.h <<_ACEOF
c35f4ffc 17911#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17912_ACEOF
c35f4ffc
AC
17913
17914
c906108c
SS
17915# target_subdir is used by the testsuite to find the target libraries.
17916target_subdir=
17917if test "${host}" != "${target}"; then
17918 target_subdir="${target_alias}/"
17919fi
17920
17921
21ea5acd 17922# Import nat definitions.
2b351b19 17923nat_makefile_frag=/dev/null
771b4502 17924if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17925 . ${srcdir}/configure.nat
17926 nativefile=$NAT_FILE
c906108c 17927fi
c906108c 17928
c906108c
SS
17929
17930
17931
21ea5acd
SDJ
17932
17933
17934
17935
17936
c906108c
SS
17937
17938
b00a8037 17939if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17940
17941cat >>confdefs.h <<_ACEOF
b00a8037 17942#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17943_ACEOF
b00a8037
DJ
17944
17945fi
17946
496c0e1b
JB
17947# Check whether --enable-gdbserver was given.
17948if test "${enable_gdbserver+set}" = set; then :
17949 enableval=$enable_gdbserver; case "${enableval}" in
17950 yes| no|auto) ;;
d0ac1c44 17951 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17952esac
17953else
17954 enable_gdbserver=auto
17955fi
17956
17957
17958# We only build gdbserver automatically in a native configuration, and
17959# only if the user did not explicitly disable its build.
17960if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17962$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17963 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17965$as_echo "yes" >&6; }
17966 subdirs="$subdirs gdbserver"
3ace7edb 17967
496c0e1b 17968 gdbserver_build_enabled=yes
8dcde887 17969 else
81ecdfbb
RW
17970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17971$as_echo "no" >&6; }
8dcde887
MK
17972 fi
17973fi
17974
496c0e1b
JB
17975# If the user explicitly request the gdbserver to be built, verify that
17976# we were in fact able to enable it.
17977if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17978 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17979fi
17980
393fd4c3
YQ
17981# Check for babeltrace and babeltrace-ctf
17982
17983# Check whether --with-babeltrace was given.
17984if test "${with_babeltrace+set}" = set; then :
17985 withval=$with_babeltrace;
17986else
17987 with_babeltrace=auto
17988fi
17989
17990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17991$as_echo_n "checking whether to use babeltrace... " >&6; }
17992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17993$as_echo "$with_babeltrace" >&6; }
17994
17995if test "x$with_babeltrace" = "xno"; then
17996 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17997$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17998else
17999 # Append -Werror to CFLAGS so that configure can catch the warning
18000 # "assignment from incompatible pointer type", which is related to
18001 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18002 # in GDB, while babeltrace 1.0.3 is broken.
18003 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18004 # safe to save and restore CFLAGS here.
18005 saved_CFLAGS=$CFLAGS
18006 CFLAGS="$CFLAGS -Werror"
18007
18008
18009
18010
18011
18012
18013
18014
18015 use_additional=yes
18016
18017 acl_save_prefix="$prefix"
18018 prefix="$acl_final_prefix"
18019 acl_save_exec_prefix="$exec_prefix"
18020 exec_prefix="$acl_final_exec_prefix"
18021
18022 eval additional_includedir=\"$includedir\"
18023 eval additional_libdir=\"$libdir\"
18024
18025 exec_prefix="$acl_save_exec_prefix"
18026 prefix="$acl_save_prefix"
18027
18028
18029# Check whether --with-libbabeltrace-prefix was given.
18030if test "${with_libbabeltrace_prefix+set}" = set; then :
18031 withval=$with_libbabeltrace_prefix;
18032 if test "X$withval" = "Xno"; then
18033 use_additional=no
18034 else
18035 if test "X$withval" = "X"; then
18036
18037 acl_save_prefix="$prefix"
18038 prefix="$acl_final_prefix"
18039 acl_save_exec_prefix="$exec_prefix"
18040 exec_prefix="$acl_final_exec_prefix"
18041
18042 eval additional_includedir=\"$includedir\"
18043 eval additional_libdir=\"$libdir\"
18044
18045 exec_prefix="$acl_save_exec_prefix"
18046 prefix="$acl_save_prefix"
18047
18048 else
18049 additional_includedir="$withval/include"
18050 additional_libdir="$withval/lib"
18051 fi
18052 fi
18053
18054fi
18055
18056 LIBBABELTRACE=
18057 LTLIBBABELTRACE=
18058 INCBABELTRACE=
18059 rpathdirs=
18060 ltrpathdirs=
18061 names_already_handled=
18062 names_next_round='babeltrace babeltrace-ctf'
18063 while test -n "$names_next_round"; do
18064 names_this_round="$names_next_round"
18065 names_next_round=
18066 for name in $names_this_round; do
18067 already_handled=
18068 for n in $names_already_handled; do
18069 if test "$n" = "$name"; then
18070 already_handled=yes
18071 break
18072 fi
18073 done
18074 if test -z "$already_handled"; then
18075 names_already_handled="$names_already_handled $name"
18076 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18077 eval value=\"\$HAVE_LIB$uppername\"
18078 if test -n "$value"; then
18079 if test "$value" = yes; then
18080 eval value=\"\$LIB$uppername\"
18081 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18082 eval value=\"\$LTLIB$uppername\"
18083 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18084 else
18085 :
18086 fi
18087 else
18088 found_dir=
18089 found_la=
18090 found_so=
18091 found_a=
18092 if test $use_additional = yes; then
18093 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
18094 found_dir="$additional_libdir"
18095 found_so="$additional_libdir/lib$name.$shlibext"
18096 if test -f "$additional_libdir/lib$name.la"; then
18097 found_la="$additional_libdir/lib$name.la"
18098 fi
18099 else
18100 if test -f "$additional_libdir/lib$name.$libext"; then
18101 found_dir="$additional_libdir"
18102 found_a="$additional_libdir/lib$name.$libext"
18103 if test -f "$additional_libdir/lib$name.la"; then
18104 found_la="$additional_libdir/lib$name.la"
18105 fi
18106 fi
18107 fi
18108 fi
18109 if test "X$found_dir" = "X"; then
18110 for x in $LDFLAGS $LTLIBBABELTRACE; do
18111
18112 acl_save_prefix="$prefix"
18113 prefix="$acl_final_prefix"
18114 acl_save_exec_prefix="$exec_prefix"
18115 exec_prefix="$acl_final_exec_prefix"
18116 eval x=\"$x\"
18117 exec_prefix="$acl_save_exec_prefix"
18118 prefix="$acl_save_prefix"
18119
18120 case "$x" in
18121 -L*)
18122 dir=`echo "X$x" | sed -e 's/^X-L//'`
18123 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
18124 found_dir="$dir"
18125 found_so="$dir/lib$name.$shlibext"
18126 if test -f "$dir/lib$name.la"; then
18127 found_la="$dir/lib$name.la"
18128 fi
18129 else
18130 if test -f "$dir/lib$name.$libext"; then
18131 found_dir="$dir"
18132 found_a="$dir/lib$name.$libext"
18133 if test -f "$dir/lib$name.la"; then
18134 found_la="$dir/lib$name.la"
18135 fi
18136 fi
18137 fi
18138 ;;
18139 esac
18140 if test "X$found_dir" != "X"; then
18141 break
18142 fi
18143 done
18144 fi
18145 if test "X$found_dir" != "X"; then
18146 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18147 if test "X$found_so" != "X"; then
18148 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18149 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18150 else
18151 haveit=
18152 for x in $ltrpathdirs; do
18153 if test "X$x" = "X$found_dir"; then
18154 haveit=yes
18155 break
18156 fi
18157 done
18158 if test -z "$haveit"; then
18159 ltrpathdirs="$ltrpathdirs $found_dir"
18160 fi
18161 if test "$hardcode_direct" = yes; then
18162 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18163 else
18164 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18165 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18166 haveit=
18167 for x in $rpathdirs; do
18168 if test "X$x" = "X$found_dir"; then
18169 haveit=yes
18170 break
18171 fi
18172 done
18173 if test -z "$haveit"; then
18174 rpathdirs="$rpathdirs $found_dir"
18175 fi
18176 else
18177 haveit=
18178 for x in $LDFLAGS $LIBBABELTRACE; do
18179
18180 acl_save_prefix="$prefix"
18181 prefix="$acl_final_prefix"
18182 acl_save_exec_prefix="$exec_prefix"
18183 exec_prefix="$acl_final_exec_prefix"
18184 eval x=\"$x\"
18185 exec_prefix="$acl_save_exec_prefix"
18186 prefix="$acl_save_prefix"
18187
18188 if test "X$x" = "X-L$found_dir"; then
18189 haveit=yes
18190 break
18191 fi
18192 done
18193 if test -z "$haveit"; then
18194 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18195 fi
18196 if test "$hardcode_minus_L" != no; then
18197 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18198 else
18199 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18200 fi
18201 fi
18202 fi
18203 fi
18204 else
18205 if test "X$found_a" != "X"; then
18206 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18207 else
18208 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18209 fi
18210 fi
18211 additional_includedir=
18212 case "$found_dir" in
18213 */lib | */lib/)
18214 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18215 additional_includedir="$basedir/include"
18216 ;;
18217 esac
18218 if test "X$additional_includedir" != "X"; then
18219 if test "X$additional_includedir" != "X/usr/include"; then
18220 haveit=
18221 if test "X$additional_includedir" = "X/usr/local/include"; then
18222 if test -n "$GCC"; then
18223 case $host_os in
18224 linux*) haveit=yes;;
18225 esac
18226 fi
18227 fi
18228 if test -z "$haveit"; then
18229 for x in $CPPFLAGS $INCBABELTRACE; do
18230
18231 acl_save_prefix="$prefix"
18232 prefix="$acl_final_prefix"
18233 acl_save_exec_prefix="$exec_prefix"
18234 exec_prefix="$acl_final_exec_prefix"
18235 eval x=\"$x\"
18236 exec_prefix="$acl_save_exec_prefix"
18237 prefix="$acl_save_prefix"
18238
18239 if test "X$x" = "X-I$additional_includedir"; then
18240 haveit=yes
18241 break
18242 fi
18243 done
18244 if test -z "$haveit"; then
18245 if test -d "$additional_includedir"; then
18246 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18247 fi
18248 fi
18249 fi
18250 fi
18251 fi
18252 if test -n "$found_la"; then
18253 save_libdir="$libdir"
18254 case "$found_la" in
18255 */* | *\\*) . "$found_la" ;;
18256 *) . "./$found_la" ;;
18257 esac
18258 libdir="$save_libdir"
18259 for dep in $dependency_libs; do
18260 case "$dep" in
18261 -L*)
18262 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18263 if test "X$additional_libdir" != "X/usr/lib"; then
18264 haveit=
18265 if test "X$additional_libdir" = "X/usr/local/lib"; then
18266 if test -n "$GCC"; then
18267 case $host_os in
18268 linux*) haveit=yes;;
18269 esac
18270 fi
18271 fi
18272 if test -z "$haveit"; then
18273 haveit=
18274 for x in $LDFLAGS $LIBBABELTRACE; do
18275
18276 acl_save_prefix="$prefix"
18277 prefix="$acl_final_prefix"
18278 acl_save_exec_prefix="$exec_prefix"
18279 exec_prefix="$acl_final_exec_prefix"
18280 eval x=\"$x\"
18281 exec_prefix="$acl_save_exec_prefix"
18282 prefix="$acl_save_prefix"
18283
18284 if test "X$x" = "X-L$additional_libdir"; then
18285 haveit=yes
18286 break
18287 fi
18288 done
18289 if test -z "$haveit"; then
18290 if test -d "$additional_libdir"; then
18291 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18292 fi
18293 fi
18294 haveit=
18295 for x in $LDFLAGS $LTLIBBABELTRACE; do
18296
18297 acl_save_prefix="$prefix"
18298 prefix="$acl_final_prefix"
18299 acl_save_exec_prefix="$exec_prefix"
18300 exec_prefix="$acl_final_exec_prefix"
18301 eval x=\"$x\"
18302 exec_prefix="$acl_save_exec_prefix"
18303 prefix="$acl_save_prefix"
18304
18305 if test "X$x" = "X-L$additional_libdir"; then
18306 haveit=yes
18307 break
18308 fi
18309 done
18310 if test -z "$haveit"; then
18311 if test -d "$additional_libdir"; then
18312 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18313 fi
18314 fi
18315 fi
18316 fi
18317 ;;
18318 -R*)
18319 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18320 if test "$enable_rpath" != no; then
18321 haveit=
18322 for x in $rpathdirs; do
18323 if test "X$x" = "X$dir"; then
18324 haveit=yes
18325 break
18326 fi
18327 done
18328 if test -z "$haveit"; then
18329 rpathdirs="$rpathdirs $dir"
18330 fi
18331 haveit=
18332 for x in $ltrpathdirs; do
18333 if test "X$x" = "X$dir"; then
18334 haveit=yes
18335 break
18336 fi
18337 done
18338 if test -z "$haveit"; then
18339 ltrpathdirs="$ltrpathdirs $dir"
18340 fi
18341 fi
18342 ;;
18343 -l*)
18344 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18345 ;;
18346 *.la)
18347 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18348 ;;
18349 *)
18350 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18351 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18352 ;;
18353 esac
18354 done
18355 fi
18356 else
18357 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18358 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18359 fi
18360 fi
18361 fi
18362 done
18363 done
18364 if test "X$rpathdirs" != "X"; then
18365 if test -n "$hardcode_libdir_separator"; then
18366 alldirs=
18367 for found_dir in $rpathdirs; do
18368 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18369 done
18370 acl_save_libdir="$libdir"
18371 libdir="$alldirs"
18372 eval flag=\"$hardcode_libdir_flag_spec\"
18373 libdir="$acl_save_libdir"
18374 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18375 else
18376 for found_dir in $rpathdirs; do
18377 acl_save_libdir="$libdir"
18378 libdir="$found_dir"
18379 eval flag=\"$hardcode_libdir_flag_spec\"
18380 libdir="$acl_save_libdir"
18381 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18382 done
18383 fi
18384 fi
18385 if test "X$ltrpathdirs" != "X"; then
18386 for found_dir in $ltrpathdirs; do
18387 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18388 done
18389 fi
18390
18391
18392 ac_save_CPPFLAGS="$CPPFLAGS"
18393
18394 for element in $INCBABELTRACE; do
18395 haveit=
18396 for x in $CPPFLAGS; do
18397
18398 acl_save_prefix="$prefix"
18399 prefix="$acl_final_prefix"
18400 acl_save_exec_prefix="$exec_prefix"
18401 exec_prefix="$acl_final_exec_prefix"
18402 eval x=\"$x\"
18403 exec_prefix="$acl_save_exec_prefix"
18404 prefix="$acl_save_prefix"
18405
18406 if test "X$x" = "X$element"; then
18407 haveit=yes
18408 break
18409 fi
18410 done
18411 if test -z "$haveit"; then
18412 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18413 fi
18414 done
18415
18416
18417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18418$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 18419if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
18420 $as_echo_n "(cached) " >&6
18421else
18422
18423 ac_save_LIBS="$LIBS"
18424 LIBS="$LIBS $LIBBABELTRACE"
18425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18426/* end confdefs.h. */
18427#include <babeltrace/babeltrace.h>
18428 #include <babeltrace/ctf/events.h>
18429 #include <babeltrace/ctf/iterator.h>
18430int
18431main ()
18432{
18433struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18434 struct bt_ctf_event *event = NULL;
18435 const struct bt_definition *scope;
18436
13cdc2af 18437 pos->type = BT_SEEK_BEGIN;
65c749e7 18438 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
18439 scope = bt_ctf_get_top_level_scope (event,
18440 BT_STREAM_EVENT_HEADER);
18441 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18442
18443 ;
18444 return 0;
18445}
18446_ACEOF
18447if ac_fn_c_try_link "$LINENO"; then :
18448 ac_cv_libbabeltrace=yes
18449else
18450 ac_cv_libbabeltrace=no
18451fi
18452rm -f core conftest.err conftest.$ac_objext \
18453 conftest$ac_exeext conftest.$ac_ext
18454 LIBS="$ac_save_LIBS"
18455
18456fi
18457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18458$as_echo "$ac_cv_libbabeltrace" >&6; }
18459 if test "$ac_cv_libbabeltrace" = yes; then
18460 HAVE_LIBBABELTRACE=yes
18461
18462$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18463
18464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18465$as_echo_n "checking how to link with libbabeltrace... " >&6; }
18466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18467$as_echo "$LIBBABELTRACE" >&6; }
18468 else
18469 HAVE_LIBBABELTRACE=no
18470 CPPFLAGS="$ac_save_CPPFLAGS"
18471 LIBBABELTRACE=
18472 LTLIBBABELTRACE=
18473 fi
18474
18475
18476
18477
18478
18479
18480 CFLAGS=$saved_CFLAGS
18481
18482 if test "$HAVE_LIBBABELTRACE" != yes; then
18483 if test "$with_babeltrace" = yes; then
d0ac1c44 18484 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
18485 else
18486 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18487$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18488 fi
18489 fi
18490fi
18491
ccb1ba62
CB
18492# Check for xxhash
18493
18494# Check whether --with-xxhash was given.
18495if test "${with_xxhash+set}" = set; then :
18496 withval=$with_xxhash;
18497else
18498 with_xxhash=auto
18499fi
18500
18501
18502if test "x$with_xxhash" != "xno"; then
18503
18504
18505
18506
18507
18508
18509
18510
18511 use_additional=yes
18512
18513 acl_save_prefix="$prefix"
18514 prefix="$acl_final_prefix"
18515 acl_save_exec_prefix="$exec_prefix"
18516 exec_prefix="$acl_final_exec_prefix"
18517
18518 eval additional_includedir=\"$includedir\"
18519 eval additional_libdir=\"$libdir\"
18520
18521 exec_prefix="$acl_save_exec_prefix"
18522 prefix="$acl_save_prefix"
18523
18524
18525# Check whether --with-libxxhash-prefix was given.
18526if test "${with_libxxhash_prefix+set}" = set; then :
18527 withval=$with_libxxhash_prefix;
18528 if test "X$withval" = "Xno"; then
18529 use_additional=no
18530 else
18531 if test "X$withval" = "X"; then
18532
18533 acl_save_prefix="$prefix"
18534 prefix="$acl_final_prefix"
18535 acl_save_exec_prefix="$exec_prefix"
18536 exec_prefix="$acl_final_exec_prefix"
18537
18538 eval additional_includedir=\"$includedir\"
18539 eval additional_libdir=\"$libdir\"
18540
18541 exec_prefix="$acl_save_exec_prefix"
18542 prefix="$acl_save_prefix"
18543
18544 else
18545 additional_includedir="$withval/include"
18546 additional_libdir="$withval/lib"
18547 fi
18548 fi
18549
18550fi
18551
18552 LIBXXHASH=
18553 LTLIBXXHASH=
18554 INCXXHASH=
18555 rpathdirs=
18556 ltrpathdirs=
18557 names_already_handled=
18558 names_next_round='xxhash '
18559 while test -n "$names_next_round"; do
18560 names_this_round="$names_next_round"
18561 names_next_round=
18562 for name in $names_this_round; do
18563 already_handled=
18564 for n in $names_already_handled; do
18565 if test "$n" = "$name"; then
18566 already_handled=yes
18567 break
18568 fi
18569 done
18570 if test -z "$already_handled"; then
18571 names_already_handled="$names_already_handled $name"
18572 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18573 eval value=\"\$HAVE_LIB$uppername\"
18574 if test -n "$value"; then
18575 if test "$value" = yes; then
18576 eval value=\"\$LIB$uppername\"
18577 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18578 eval value=\"\$LTLIB$uppername\"
18579 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18580 else
18581 :
18582 fi
18583 else
18584 found_dir=
18585 found_la=
18586 found_so=
18587 found_a=
18588 if test $use_additional = yes; then
18589 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
18590 found_dir="$additional_libdir"
18591 found_so="$additional_libdir/lib$name.$shlibext"
18592 if test -f "$additional_libdir/lib$name.la"; then
18593 found_la="$additional_libdir/lib$name.la"
18594 fi
18595 else
18596 if test -f "$additional_libdir/lib$name.$libext"; then
18597 found_dir="$additional_libdir"
18598 found_a="$additional_libdir/lib$name.$libext"
18599 if test -f "$additional_libdir/lib$name.la"; then
18600 found_la="$additional_libdir/lib$name.la"
18601 fi
18602 fi
18603 fi
18604 fi
18605 if test "X$found_dir" = "X"; then
18606 for x in $LDFLAGS $LTLIBXXHASH; do
18607
18608 acl_save_prefix="$prefix"
18609 prefix="$acl_final_prefix"
18610 acl_save_exec_prefix="$exec_prefix"
18611 exec_prefix="$acl_final_exec_prefix"
18612 eval x=\"$x\"
18613 exec_prefix="$acl_save_exec_prefix"
18614 prefix="$acl_save_prefix"
18615
18616 case "$x" in
18617 -L*)
18618 dir=`echo "X$x" | sed -e 's/^X-L//'`
18619 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
18620 found_dir="$dir"
18621 found_so="$dir/lib$name.$shlibext"
18622 if test -f "$dir/lib$name.la"; then
18623 found_la="$dir/lib$name.la"
18624 fi
18625 else
18626 if test -f "$dir/lib$name.$libext"; then
18627 found_dir="$dir"
18628 found_a="$dir/lib$name.$libext"
18629 if test -f "$dir/lib$name.la"; then
18630 found_la="$dir/lib$name.la"
18631 fi
18632 fi
18633 fi
18634 ;;
18635 esac
18636 if test "X$found_dir" != "X"; then
18637 break
18638 fi
18639 done
18640 fi
18641 if test "X$found_dir" != "X"; then
18642 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18643 if test "X$found_so" != "X"; then
18644 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18645 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18646 else
18647 haveit=
18648 for x in $ltrpathdirs; do
18649 if test "X$x" = "X$found_dir"; then
18650 haveit=yes
18651 break
18652 fi
18653 done
18654 if test -z "$haveit"; then
18655 ltrpathdirs="$ltrpathdirs $found_dir"
18656 fi
18657 if test "$hardcode_direct" = yes; then
18658 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18659 else
18660 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18661 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18662 haveit=
18663 for x in $rpathdirs; do
18664 if test "X$x" = "X$found_dir"; then
18665 haveit=yes
18666 break
18667 fi
18668 done
18669 if test -z "$haveit"; then
18670 rpathdirs="$rpathdirs $found_dir"
18671 fi
18672 else
18673 haveit=
18674 for x in $LDFLAGS $LIBXXHASH; do
18675
18676 acl_save_prefix="$prefix"
18677 prefix="$acl_final_prefix"
18678 acl_save_exec_prefix="$exec_prefix"
18679 exec_prefix="$acl_final_exec_prefix"
18680 eval x=\"$x\"
18681 exec_prefix="$acl_save_exec_prefix"
18682 prefix="$acl_save_prefix"
18683
18684 if test "X$x" = "X-L$found_dir"; then
18685 haveit=yes
18686 break
18687 fi
18688 done
18689 if test -z "$haveit"; then
18690 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18691 fi
18692 if test "$hardcode_minus_L" != no; then
18693 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18694 else
18695 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18696 fi
18697 fi
18698 fi
18699 fi
18700 else
18701 if test "X$found_a" != "X"; then
18702 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
18703 else
18704 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
18705 fi
18706 fi
18707 additional_includedir=
18708 case "$found_dir" in
18709 */lib | */lib/)
18710 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18711 additional_includedir="$basedir/include"
18712 ;;
18713 esac
18714 if test "X$additional_includedir" != "X"; then
18715 if test "X$additional_includedir" != "X/usr/include"; then
18716 haveit=
18717 if test "X$additional_includedir" = "X/usr/local/include"; then
18718 if test -n "$GCC"; then
18719 case $host_os in
18720 linux*) haveit=yes;;
18721 esac
18722 fi
18723 fi
18724 if test -z "$haveit"; then
18725 for x in $CPPFLAGS $INCXXHASH; do
18726
18727 acl_save_prefix="$prefix"
18728 prefix="$acl_final_prefix"
18729 acl_save_exec_prefix="$exec_prefix"
18730 exec_prefix="$acl_final_exec_prefix"
18731 eval x=\"$x\"
18732 exec_prefix="$acl_save_exec_prefix"
18733 prefix="$acl_save_prefix"
18734
18735 if test "X$x" = "X-I$additional_includedir"; then
18736 haveit=yes
18737 break
18738 fi
18739 done
18740 if test -z "$haveit"; then
18741 if test -d "$additional_includedir"; then
18742 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
18743 fi
18744 fi
18745 fi
18746 fi
18747 fi
18748 if test -n "$found_la"; then
18749 save_libdir="$libdir"
18750 case "$found_la" in
18751 */* | *\\*) . "$found_la" ;;
18752 *) . "./$found_la" ;;
18753 esac
18754 libdir="$save_libdir"
18755 for dep in $dependency_libs; do
18756 case "$dep" in
18757 -L*)
18758 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18759 if test "X$additional_libdir" != "X/usr/lib"; then
18760 haveit=
18761 if test "X$additional_libdir" = "X/usr/local/lib"; then
18762 if test -n "$GCC"; then
18763 case $host_os in
18764 linux*) haveit=yes;;
18765 esac
18766 fi
18767 fi
18768 if test -z "$haveit"; then
18769 haveit=
18770 for x in $LDFLAGS $LIBXXHASH; do
18771
18772 acl_save_prefix="$prefix"
18773 prefix="$acl_final_prefix"
18774 acl_save_exec_prefix="$exec_prefix"
18775 exec_prefix="$acl_final_exec_prefix"
18776 eval x=\"$x\"
18777 exec_prefix="$acl_save_exec_prefix"
18778 prefix="$acl_save_prefix"
18779
18780 if test "X$x" = "X-L$additional_libdir"; then
18781 haveit=yes
18782 break
18783 fi
18784 done
18785 if test -z "$haveit"; then
18786 if test -d "$additional_libdir"; then
18787 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
18788 fi
18789 fi
18790 haveit=
18791 for x in $LDFLAGS $LTLIBXXHASH; do
18792
18793 acl_save_prefix="$prefix"
18794 prefix="$acl_final_prefix"
18795 acl_save_exec_prefix="$exec_prefix"
18796 exec_prefix="$acl_final_exec_prefix"
18797 eval x=\"$x\"
18798 exec_prefix="$acl_save_exec_prefix"
18799 prefix="$acl_save_prefix"
18800
18801 if test "X$x" = "X-L$additional_libdir"; then
18802 haveit=yes
18803 break
18804 fi
18805 done
18806 if test -z "$haveit"; then
18807 if test -d "$additional_libdir"; then
18808 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
18809 fi
18810 fi
18811 fi
18812 fi
18813 ;;
18814 -R*)
18815 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18816 if test "$enable_rpath" != no; then
18817 haveit=
18818 for x in $rpathdirs; do
18819 if test "X$x" = "X$dir"; then
18820 haveit=yes
18821 break
18822 fi
18823 done
18824 if test -z "$haveit"; then
18825 rpathdirs="$rpathdirs $dir"
18826 fi
18827 haveit=
18828 for x in $ltrpathdirs; do
18829 if test "X$x" = "X$dir"; then
18830 haveit=yes
18831 break
18832 fi
18833 done
18834 if test -z "$haveit"; then
18835 ltrpathdirs="$ltrpathdirs $dir"
18836 fi
18837 fi
18838 ;;
18839 -l*)
18840 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18841 ;;
18842 *.la)
18843 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18844 ;;
18845 *)
18846 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
18847 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
18848 ;;
18849 esac
18850 done
18851 fi
18852 else
18853 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18854 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
18855 fi
18856 fi
18857 fi
18858 done
18859 done
18860 if test "X$rpathdirs" != "X"; then
18861 if test -n "$hardcode_libdir_separator"; then
18862 alldirs=
18863 for found_dir in $rpathdirs; do
18864 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18865 done
18866 acl_save_libdir="$libdir"
18867 libdir="$alldirs"
18868 eval flag=\"$hardcode_libdir_flag_spec\"
18869 libdir="$acl_save_libdir"
18870 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18871 else
18872 for found_dir in $rpathdirs; do
18873 acl_save_libdir="$libdir"
18874 libdir="$found_dir"
18875 eval flag=\"$hardcode_libdir_flag_spec\"
18876 libdir="$acl_save_libdir"
18877 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18878 done
18879 fi
18880 fi
18881 if test "X$ltrpathdirs" != "X"; then
18882 for found_dir in $ltrpathdirs; do
18883 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
18884 done
18885 fi
18886
18887
18888 ac_save_CPPFLAGS="$CPPFLAGS"
18889
18890 for element in $INCXXHASH; do
18891 haveit=
18892 for x in $CPPFLAGS; do
18893
18894 acl_save_prefix="$prefix"
18895 prefix="$acl_final_prefix"
18896 acl_save_exec_prefix="$exec_prefix"
18897 exec_prefix="$acl_final_exec_prefix"
18898 eval x=\"$x\"
18899 exec_prefix="$acl_save_exec_prefix"
18900 prefix="$acl_save_prefix"
18901
18902 if test "X$x" = "X$element"; then
18903 haveit=yes
18904 break
18905 fi
18906 done
18907 if test -z "$haveit"; then
18908 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18909 fi
18910 done
18911
18912
18913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
18914$as_echo_n "checking for libxxhash... " >&6; }
18915if ${ac_cv_libxxhash+:} false; then :
18916 $as_echo_n "(cached) " >&6
18917else
18918
18919 ac_save_LIBS="$LIBS"
18920 LIBS="$LIBS $LIBXXHASH"
18921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18922/* end confdefs.h. */
18923#include <xxhash.h>
18924int
18925main ()
18926{
18927XXH32("foo", 3, 0);
18928
18929 ;
18930 return 0;
18931}
18932_ACEOF
18933if ac_fn_c_try_link "$LINENO"; then :
18934 ac_cv_libxxhash=yes
18935else
18936 ac_cv_libxxhash=no
18937fi
18938rm -f core conftest.err conftest.$ac_objext \
18939 conftest$ac_exeext conftest.$ac_ext
18940 LIBS="$ac_save_LIBS"
18941
18942fi
18943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
18944$as_echo "$ac_cv_libxxhash" >&6; }
18945 if test "$ac_cv_libxxhash" = yes; then
18946 HAVE_LIBXXHASH=yes
18947
18948$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
18949
18950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
18951$as_echo_n "checking how to link with libxxhash... " >&6; }
18952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
18953$as_echo "$LIBXXHASH" >&6; }
18954 else
18955 HAVE_LIBXXHASH=no
18956 CPPFLAGS="$ac_save_CPPFLAGS"
18957 LIBXXHASH=
18958 LTLIBXXHASH=
18959 fi
18960
18961
18962
18963
18964
18965
18966 if test "$HAVE_LIBXXHASH" != yes; then
18967 if test "$with_xxhash" = yes; then
18968 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
18969 fi
18970 fi
18971 if test "x$with_xxhash" = "xauto"; then
18972 with_xxhash="$HAVE_LIBXXHASH"
18973 fi
18974fi
18975
18976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
18977$as_echo_n "checking whether to use xxhash... " >&6; }
18978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
18979$as_echo "$with_xxhash" >&6; }
18980
a0a461e5 18981NM_H=
c906108c
SS
18982rm -f nm.h
18983if test "${nativefile}" != ""; then
0f475e27
AC
18984 case "${nativefile}" in
18985 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
18986 * ) GDB_NM_FILE="${nativefile}"
18987 esac
a0a461e5
TT
18988 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
18989
60ca704f
SE
18990
18991cat >>confdefs.h <<_ACEOF
b78960be 18992#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 18993_ACEOF
5a2402b8 18994
a0a461e5 18995 NM_H=nm.h
c906108c 18996fi
5a2402b8
AC
18997
18998
a0a461e5 18999
e3487908
GKB
19000for ac_prog in xsltproc
19001do
19002 # Extract the first word of "$ac_prog", so it can be a program name with args.
19003set dummy $ac_prog; ac_word=$2
19004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19005$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 19006if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
19007 $as_echo_n "(cached) " >&6
19008else
19009 case $XSLTPROC in
19010 [\\/]* | ?:[\\/]*)
19011 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19012 ;;
19013 *)
19014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19015for as_dir in $PATH
19016do
19017 IFS=$as_save_IFS
19018 test -z "$as_dir" && as_dir=.
19019 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 19020 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
19021 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19023 break 2
19024 fi
19025done
19026 done
19027IFS=$as_save_IFS
19028
19029 ;;
19030esac
19031fi
19032XSLTPROC=$ac_cv_path_XSLTPROC
19033if test -n "$XSLTPROC"; then
19034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19035$as_echo "$XSLTPROC" >&6; }
19036else
19037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19038$as_echo "no" >&6; }
19039fi
19040
19041
19042 test -n "$XSLTPROC" && break
19043done
19044test -n "$XSLTPROC" || XSLTPROC="missing"
19045
19046if test "x$USE_MAINTAINER_MODE" = xyes; then
19047 if test "${XSLTPROC}" = missing; then
d0ac1c44 19048 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
19049 fi
19050fi
19051
19052
c906108c
SS
19053
19054
c906108c 19055
81ecdfbb 19056$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 19057
bec39cab 19058
8ecfd7bd
SDJ
19059
19060# Check whether we will enable the inclusion of unit tests when
19061# compiling GDB.
19062#
19063# The default value of this option changes depending whether we're on
19064# development mode (in which case it's "true") or not (in which case
19065# it's "false").
19066# Check whether --enable-unit-tests was given.
19067if test "${enable_unit_tests+set}" = set; then :
19068 enableval=$enable_unit_tests; case "${enableval}" in
19069 yes) enable_unittests=true ;;
19070 no) enable_unittests=false ;;
19071 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19072esac
19073else
19074 enable_unittests=$development
19075fi
19076
19077
19078if $enable_unittests; then
dcd1f979
TT
19079
19080$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19081
8ecfd7bd 19082
268a13a5
TT
19083 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) gdbsupport/selftest.o selftest-arch.o"
19084 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) gdbsupport/selftest.c selftest-arch.c"
8ecfd7bd 19085
dcd1f979
TT
19086fi
19087
b292c783 19088
8ecfd7bd 19089
f6a88844
JM
19090 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19091 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19092 if test "x$GDB_TRANSFORM_NAME" = x; then
19093 GDB_TRANSFORM_NAME=gdb
19094 fi
19095
19096
19097
19098 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19099 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19100 if test "x$GCORE_TRANSFORM_NAME" = x; then
19101 GCORE_TRANSFORM_NAME=gcore
19102 fi
19103
b292c783
JK
19104
19105ac_config_files="$ac_config_files gcore"
19106
141ec9f6 19107ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 19108
89a34d1b 19109
bec39cab
AC
19110cat >confcache <<\_ACEOF
19111# This file is a shell script that caches the results of configure
19112# tests run on this system so they can be shared between configure
19113# scripts and configure runs, see configure's option --config-cache.
19114# It is not useful on other systems. If it contains results you don't
19115# want to keep, you may remove or edit it.
19116#
19117# config.status only pays attention to the cache file if you give it
19118# the --recheck option to rerun configure.
19119#
19120# `ac_cv_env_foo' variables (set or unset) will be overridden when
19121# loading this file, other *unset* `ac_cv_foo' will be assigned the
19122# following values.
19123
19124_ACEOF
19125
19126# The following way of writing the cache mishandles newlines in values,
19127# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 19128# So, we kill variables containing newlines.
bec39cab
AC
19129# Ultrix sh set writes to stderr and can't be redirected directly,
19130# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
19131(
19132 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19133 eval ac_val=\$$ac_var
19134 case $ac_val in #(
19135 *${as_nl}*)
19136 case $ac_var in #(
19137 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19138$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19139 esac
19140 case $ac_var in #(
19141 _ | IFS | as_nl) ;; #(
19142 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19143 *) { eval $ac_var=; unset $ac_var;} ;;
19144 esac ;;
19145 esac
19146 done
19147
bec39cab 19148 (set) 2>&1 |
81ecdfbb
RW
19149 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19150 *${as_nl}ac_space=\ *)
19151 # `set' does not quote correctly, so add quotes: double-quote
19152 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
19153 sed -n \
19154 "s/'/'\\\\''/g;
19155 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 19156 ;; #(
bec39cab
AC
19157 *)
19158 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 19159 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 19160 ;;
81ecdfbb
RW
19161 esac |
19162 sort
19163) |
bec39cab 19164 sed '
81ecdfbb 19165 /^ac_cv_env_/b end
bec39cab 19166 t clear
81ecdfbb 19167 :clear
bec39cab
AC
19168 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19169 t end
81ecdfbb
RW
19170 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19171 :end' >>confcache
19172if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19173 if test -w "$cache_file"; then
d0ac1c44 19174 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
19175 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19176$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
19177 if test ! -f "$cache_file" || test -h "$cache_file"; then
19178 cat confcache >"$cache_file"
19179 else
19180 case $cache_file in #(
19181 */* | ?:*)
19182 mv -f confcache "$cache_file"$$ &&
19183 mv -f "$cache_file"$$ "$cache_file" ;; #(
19184 *)
19185 mv -f confcache "$cache_file" ;;
19186 esac
19187 fi
19188 fi
bec39cab 19189 else
81ecdfbb
RW
19190 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19191$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
19192 fi
19193fi
19194rm -f confcache
19195
19196test "x$prefix" = xNONE && prefix=$ac_default_prefix
19197# Let make expand exec_prefix.
19198test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19199
bec39cab
AC
19200DEFS=-DHAVE_CONFIG_H
19201
19202ac_libobjs=
19203ac_ltlibobjs=
d0ac1c44 19204U=
bec39cab
AC
19205for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19206 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
19207 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19208 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19209 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19210 # will be set to the directory where LIBOBJS objects are built.
19211 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19212 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
19213done
19214LIBOBJS=$ac_libobjs
19215
19216LTLIBOBJS=$ac_ltlibobjs
19217
19218
85981d60 19219if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 19220 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 19221Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 19222fi
4df42755 19223if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 19224 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
19225Usually this means the macro was only invoked conditionally." "$LINENO" 5
19226fi
19227if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 19228 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
19229Usually this means the macro was only invoked conditionally." "$LINENO" 5
19230fi
81ecdfbb
RW
19231
19232
d0ac1c44 19233: "${CONFIG_STATUS=./config.status}"
81ecdfbb 19234ac_write_fail=0
bec39cab
AC
19235ac_clean_files_save=$ac_clean_files
19236ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
19237{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19238$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19239as_write_fail=0
19240cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
19241#! $SHELL
19242# Generated by $as_me.
19243# Run this file to recreate the current configuration.
19244# Compiler output produced by configure, useful for debugging
19245# configure, is in config.log if it exists.
19246
19247debug=false
19248ac_cs_recheck=false
19249ac_cs_silent=false
bec39cab 19250
81ecdfbb
RW
19251SHELL=\${CONFIG_SHELL-$SHELL}
19252export SHELL
19253_ASEOF
19254cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19255## -------------------- ##
19256## M4sh Initialization. ##
19257## -------------------- ##
19258
19259# Be more Bourne compatible
19260DUALCASE=1; export DUALCASE # for MKS sh
19261if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
19262 emulate sh
19263 NULLCMD=:
81ecdfbb 19264 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
19265 # is contrary to our usage. Disable this feature.
19266 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
19267 setopt NO_GLOB_SUBST
19268else
19269 case `(set -o) 2>/dev/null` in #(
19270 *posix*) :
19271 set -o posix ;; #(
19272 *) :
19273 ;;
19274esac
bec39cab 19275fi
bec39cab 19276
81ecdfbb
RW
19277
19278as_nl='
19279'
19280export as_nl
19281# Printing a long string crashes Solaris 7 /usr/bin/printf.
19282as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19283as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19284as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19285# Prefer a ksh shell builtin over an external printf program on Solaris,
19286# but without wasting forks for bash or zsh.
19287if test -z "$BASH_VERSION$ZSH_VERSION" \
19288 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19289 as_echo='print -r --'
19290 as_echo_n='print -rn --'
19291elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19292 as_echo='printf %s\n'
19293 as_echo_n='printf %s'
19294else
19295 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19296 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19297 as_echo_n='/usr/ucb/echo -n'
19298 else
19299 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19300 as_echo_n_body='eval
19301 arg=$1;
19302 case $arg in #(
19303 *"$as_nl"*)
19304 expr "X$arg" : "X\\(.*\\)$as_nl";
19305 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19306 esac;
19307 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19308 '
19309 export as_echo_n_body
19310 as_echo_n='sh -c $as_echo_n_body as_echo'
19311 fi
19312 export as_echo_body
19313 as_echo='sh -c $as_echo_body as_echo'
19314fi
19315
19316# The user is always right.
19317if test "${PATH_SEPARATOR+set}" != set; then
19318 PATH_SEPARATOR=:
19319 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19320 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19321 PATH_SEPARATOR=';'
19322 }
bec39cab
AC
19323fi
19324
19325
81ecdfbb
RW
19326# IFS
19327# We need space, tab and new line, in precisely that order. Quoting is
19328# there to prevent editors from complaining about space-tab.
19329# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19330# splitting by setting IFS to empty value.)
19331IFS=" "" $as_nl"
19332
19333# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 19334as_myself=
81ecdfbb
RW
19335case $0 in #((
19336 *[\\/]* ) as_myself=$0 ;;
19337 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19338for as_dir in $PATH
19339do
19340 IFS=$as_save_IFS
19341 test -z "$as_dir" && as_dir=.
19342 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19343 done
19344IFS=$as_save_IFS
19345
19346 ;;
19347esac
19348# We did not find ourselves, most probably we were run as `sh COMMAND'
19349# in which case we are not to be found in the path.
19350if test "x$as_myself" = x; then
19351 as_myself=$0
19352fi
19353if test ! -f "$as_myself"; then
19354 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19355 exit 1
19356fi
19357
19358# Unset variables that we do not need and which cause bugs (e.g. in
19359# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19360# suppresses any "Segmentation fault" message there. '((' could
19361# trigger a bug in pdksh 5.2.14.
19362for as_var in BASH_ENV ENV MAIL MAILPATH
19363do eval test x\${$as_var+set} = xset \
19364 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19365done
bec39cab
AC
19366PS1='$ '
19367PS2='> '
19368PS4='+ '
19369
19370# NLS nuisances.
81ecdfbb
RW
19371LC_ALL=C
19372export LC_ALL
19373LANGUAGE=C
19374export LANGUAGE
19375
19376# CDPATH.
19377(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19378
19379
d0ac1c44
SM
19380# as_fn_error STATUS ERROR [LINENO LOG_FD]
19381# ----------------------------------------
81ecdfbb
RW
19382# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19383# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 19384# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
19385as_fn_error ()
19386{
d0ac1c44
SM
19387 as_status=$1; test $as_status -eq 0 && as_status=1
19388 if test "$4"; then
19389 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19390 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 19391 fi
d0ac1c44 19392 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
19393 as_fn_exit $as_status
19394} # as_fn_error
19395
19396
19397# as_fn_set_status STATUS
19398# -----------------------
19399# Set $? to STATUS, without forking.
19400as_fn_set_status ()
19401{
19402 return $1
19403} # as_fn_set_status
19404
19405# as_fn_exit STATUS
19406# -----------------
19407# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19408as_fn_exit ()
19409{
19410 set +e
19411 as_fn_set_status $1
19412 exit $1
19413} # as_fn_exit
19414
19415# as_fn_unset VAR
19416# ---------------
19417# Portably unset VAR.
19418as_fn_unset ()
19419{
19420 { eval $1=; unset $1;}
19421}
19422as_unset=as_fn_unset
19423# as_fn_append VAR VALUE
19424# ----------------------
19425# Append the text in VALUE to the end of the definition contained in VAR. Take
19426# advantage of any shell optimizations that allow amortized linear growth over
19427# repeated appends, instead of the typical quadratic growth present in naive
19428# implementations.
19429if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19430 eval 'as_fn_append ()
19431 {
19432 eval $1+=\$2
19433 }'
19434else
19435 as_fn_append ()
19436 {
19437 eval $1=\$$1\$2
19438 }
19439fi # as_fn_append
19440
19441# as_fn_arith ARG...
19442# ------------------
19443# Perform arithmetic evaluation on the ARGs, and store the result in the
19444# global $as_val. Take advantage of shells that can avoid forks. The arguments
19445# must be portable across $(()) and expr.
19446if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19447 eval 'as_fn_arith ()
19448 {
19449 as_val=$(( $* ))
19450 }'
19451else
19452 as_fn_arith ()
19453 {
19454 as_val=`expr "$@" || test $? -eq 1`
19455 }
19456fi # as_fn_arith
bec39cab 19457
81ecdfbb
RW
19458
19459if expr a : '\(a\)' >/dev/null 2>&1 &&
19460 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
19461 as_expr=expr
19462else
19463 as_expr=false
19464fi
19465
81ecdfbb 19466if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
19467 as_basename=basename
19468else
19469 as_basename=false
19470fi
19471
81ecdfbb
RW
19472if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19473 as_dirname=dirname
19474else
19475 as_dirname=false
19476fi
bec39cab 19477
81ecdfbb 19478as_me=`$as_basename -- "$0" ||
bec39cab
AC
19479$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19480 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
19481 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19482$as_echo X/"$0" |
19483 sed '/^.*\/\([^/][^/]*\)\/*$/{
19484 s//\1/
19485 q
19486 }
19487 /^X\/\(\/\/\)$/{
19488 s//\1/
19489 q
19490 }
19491 /^X\/\(\/\).*/{
19492 s//\1/
19493 q
19494 }
19495 s/.*/./; q'`
b4e70030 19496
b4e70030
JB
19497# Avoid depending upon Character Ranges.
19498as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19499as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19500as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19501as_cr_digits='0123456789'
19502as_cr_alnum=$as_cr_Letters$as_cr_digits
19503
81ecdfbb
RW
19504ECHO_C= ECHO_N= ECHO_T=
19505case `echo -n x` in #(((((
19506-n*)
19507 case `echo 'xy\c'` in
19508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19509 xy) ECHO_C='\c';;
19510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19511 ECHO_T=' ';;
19512 esac;;
19513*)
19514 ECHO_N='-n';;
bec39cab
AC
19515esac
19516
81ecdfbb
RW
19517rm -f conf$$ conf$$.exe conf$$.file
19518if test -d conf$$.dir; then
19519 rm -f conf$$.dir/conf$$.file
bec39cab 19520else
81ecdfbb
RW
19521 rm -f conf$$.dir
19522 mkdir conf$$.dir 2>/dev/null
bec39cab 19523fi
81ecdfbb
RW
19524if (echo >conf$$.file) 2>/dev/null; then
19525 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 19526 as_ln_s='ln -s'
81ecdfbb
RW
19527 # ... but there are two gotchas:
19528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 19530 # In both cases, we have to default to `cp -pR'.
81ecdfbb 19531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 19532 as_ln_s='cp -pR'
81ecdfbb
RW
19533 elif ln conf$$.file conf$$ 2>/dev/null; then
19534 as_ln_s=ln
19535 else
d0ac1c44 19536 as_ln_s='cp -pR'
b4e70030 19537 fi
bec39cab 19538else
d0ac1c44 19539 as_ln_s='cp -pR'
bec39cab 19540fi
81ecdfbb
RW
19541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19542rmdir conf$$.dir 2>/dev/null
19543
19544
19545# as_fn_mkdir_p
19546# -------------
19547# Create "$as_dir" as a directory, including parents if necessary.
19548as_fn_mkdir_p ()
19549{
19550
19551 case $as_dir in #(
19552 -*) as_dir=./$as_dir;;
19553 esac
19554 test -d "$as_dir" || eval $as_mkdir_p || {
19555 as_dirs=
19556 while :; do
19557 case $as_dir in #(
19558 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19559 *) as_qdir=$as_dir;;
19560 esac
19561 as_dirs="'$as_qdir' $as_dirs"
19562 as_dir=`$as_dirname -- "$as_dir" ||
19563$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19564 X"$as_dir" : 'X\(//\)[^/]' \| \
19565 X"$as_dir" : 'X\(//\)$' \| \
19566 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19567$as_echo X"$as_dir" |
19568 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19569 s//\1/
19570 q
19571 }
19572 /^X\(\/\/\)[^/].*/{
19573 s//\1/
19574 q
19575 }
19576 /^X\(\/\/\)$/{
19577 s//\1/
19578 q
19579 }
19580 /^X\(\/\).*/{
19581 s//\1/
19582 q
19583 }
19584 s/.*/./; q'`
19585 test -d "$as_dir" && break
19586 done
19587 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 19588 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 19589
bec39cab 19590
81ecdfbb 19591} # as_fn_mkdir_p
bec39cab 19592if mkdir -p . 2>/dev/null; then
81ecdfbb 19593 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
19594else
19595 test -d ./-p && rmdir ./-p
19596 as_mkdir_p=false
19597fi
19598
d0ac1c44
SM
19599
19600# as_fn_executable_p FILE
19601# -----------------------
19602# Test if FILE is an executable regular file.
19603as_fn_executable_p ()
19604{
19605 test -f "$1" && test -x "$1"
19606} # as_fn_executable_p
19607as_test_x='test -x'
19608as_executable_p=as_fn_executable_p
bec39cab
AC
19609
19610# Sed expression to map a string onto a valid CPP name.
19611as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19612
19613# Sed expression to map a string onto a valid variable name.
19614as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19615
19616
bec39cab 19617exec 6>&1
81ecdfbb
RW
19618## ----------------------------------- ##
19619## Main body of $CONFIG_STATUS script. ##
19620## ----------------------------------- ##
19621_ASEOF
19622test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19623
19624cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19625# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 19626# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
19627# values after options handling.
19628ac_log="
bec39cab 19629This file was extended by $as_me, which was
d0ac1c44 19630generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
19631
19632 CONFIG_FILES = $CONFIG_FILES
19633 CONFIG_HEADERS = $CONFIG_HEADERS
19634 CONFIG_LINKS = $CONFIG_LINKS
19635 CONFIG_COMMANDS = $CONFIG_COMMANDS
19636 $ $0 $@
19637
81ecdfbb
RW
19638on `(hostname || uname -n) 2>/dev/null | sed 1q`
19639"
19640
bec39cab
AC
19641_ACEOF
19642
81ecdfbb
RW
19643case $ac_config_files in *"
19644"*) set x $ac_config_files; shift; ac_config_files=$*;;
19645esac
234b45d4 19646
81ecdfbb
RW
19647case $ac_config_headers in *"
19648"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19649esac
b4e70030 19650
b4e70030 19651
81ecdfbb
RW
19652cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19653# Files that config.status was made for.
19654config_files="$ac_config_files"
19655config_headers="$ac_config_headers"
19656config_links="$ac_config_links"
19657config_commands="$ac_config_commands"
234b45d4 19658
81ecdfbb 19659_ACEOF
b4e70030 19660
81ecdfbb 19661cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 19662ac_cs_usage="\
81ecdfbb
RW
19663\`$as_me' instantiates files and other configuration actions
19664from templates according to the current configuration. Unless the files
19665and actions are specified as TAGs, all are instantiated by default.
234b45d4 19666
81ecdfbb 19667Usage: $0 [OPTION]... [TAG]...
234b45d4 19668
bec39cab 19669 -h, --help print this help, then exit
81ecdfbb 19670 -V, --version print version number and configuration settings, then exit
d0ac1c44 19671 --config print configuration, then exit
81ecdfbb
RW
19672 -q, --quiet, --silent
19673 do not print progress messages
bec39cab
AC
19674 -d, --debug don't remove temporary files
19675 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
19676 --file=FILE[:TEMPLATE]
19677 instantiate the configuration file FILE
19678 --header=FILE[:TEMPLATE]
19679 instantiate the configuration header FILE
234b45d4 19680
bec39cab
AC
19681Configuration files:
19682$config_files
234b45d4 19683
bec39cab
AC
19684Configuration headers:
19685$config_headers
234b45d4 19686
bec39cab
AC
19687Configuration links:
19688$config_links
234b45d4 19689
bec39cab
AC
19690Configuration commands:
19691$config_commands
19692
81ecdfbb 19693Report bugs to the package provider."
b4e70030 19694
81ecdfbb
RW
19695_ACEOF
19696cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 19697ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
19698ac_cs_version="\\
19699config.status
d0ac1c44
SM
19700configured by $0, generated by GNU Autoconf 2.69,
19701 with options \\"\$ac_cs_config\\"
bec39cab 19702
d0ac1c44 19703Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
19704This config.status script is free software; the Free Software Foundation
19705gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
19706
19707ac_pwd='$ac_pwd'
19708srcdir='$srcdir'
19709INSTALL='$INSTALL'
81ecdfbb
RW
19710AWK='$AWK'
19711test -n "\$AWK" || AWK=awk
bec39cab
AC
19712_ACEOF
19713
81ecdfbb
RW
19714cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19715# The default lists apply if the user does not specify any file.
bec39cab
AC
19716ac_need_defaults=:
19717while test $# != 0
19718do
19719 case $1 in
d0ac1c44 19720 --*=?*)
81ecdfbb
RW
19721 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19722 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 19723 ac_shift=:
c906108c 19724 ;;
d0ac1c44
SM
19725 --*=)
19726 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19727 ac_optarg=
19728 ac_shift=:
19729 ;;
81ecdfbb 19730 *)
bec39cab
AC
19731 ac_option=$1
19732 ac_optarg=$2
19733 ac_shift=shift
c906108c 19734 ;;
bec39cab 19735 esac
c906108c 19736
bec39cab
AC
19737 case $ac_option in
19738 # Handling of the options.
bec39cab
AC
19739 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19740 ac_cs_recheck=: ;;
81ecdfbb
RW
19741 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19742 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
19743 --config | --confi | --conf | --con | --co | --c )
19744 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 19745 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
19746 debug=: ;;
19747 --file | --fil | --fi | --f )
19748 $ac_shift
81ecdfbb
RW
19749 case $ac_optarg in
19750 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 19751 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
19752 esac
19753 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
19754 ac_need_defaults=false;;
19755 --header | --heade | --head | --hea )
19756 $ac_shift
81ecdfbb
RW
19757 case $ac_optarg in
19758 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19759 esac
19760 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 19761 ac_need_defaults=false;;
81ecdfbb
RW
19762 --he | --h)
19763 # Conflict between --help and --header
d0ac1c44 19764 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
19765Try \`$0 --help' for more information.";;
19766 --help | --hel | -h )
19767 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
19768 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19769 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19770 ac_cs_silent=: ;;
c906108c 19771
bec39cab 19772 # This is an error.
d0ac1c44 19773 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 19774Try \`$0 --help' for more information." ;;
c906108c 19775
81ecdfbb
RW
19776 *) as_fn_append ac_config_targets " $1"
19777 ac_need_defaults=false ;;
c906108c 19778
bec39cab
AC
19779 esac
19780 shift
19781done
c906108c 19782
bec39cab 19783ac_configure_extra_args=
c906108c 19784
bec39cab
AC
19785if $ac_cs_silent; then
19786 exec 6>/dev/null
19787 ac_configure_extra_args="$ac_configure_extra_args --silent"
19788fi
c906108c 19789
bec39cab 19790_ACEOF
81ecdfbb 19791cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 19792if \$ac_cs_recheck; then
d0ac1c44 19793 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
19794 shift
19795 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19796 CONFIG_SHELL='$SHELL'
19797 export CONFIG_SHELL
19798 exec "\$@"
bec39cab
AC
19799fi
19800
19801_ACEOF
81ecdfbb
RW
19802cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19803exec 5>>config.log
19804{
19805 echo
19806 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19807## Running $as_me. ##
19808_ASBOX
19809 $as_echo "$ac_log"
19810} >&5
bec39cab 19811
81ecdfbb
RW
19812_ACEOF
19813cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 19814#
81ecdfbb 19815# INIT-COMMANDS
c906108c 19816#
a417dc56 19817ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 19818GDB_NM_FILE=$GDB_NM_FILE
b4e70030 19819
bec39cab
AC
19820_ACEOF
19821
81ecdfbb 19822cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 19823
81ecdfbb 19824# Handling of arguments.
bec39cab 19825for ac_config_target in $ac_config_targets
c906108c 19826do
81ecdfbb
RW
19827 case $ac_config_target in
19828 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
19829 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 19830 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 19831 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 19832 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 19833 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 19834 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 19835 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 19836 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 19837 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 19838
d0ac1c44 19839 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
19840 esac
19841done
19842
81ecdfbb 19843
bec39cab
AC
19844# If the user did not use the arguments to specify the items to instantiate,
19845# then the envvar interface is used. Set only those that are not.
19846# We use the long form for the default assignment because of an extremely
19847# bizarre bug on SunOS 4.1.3.
19848if $ac_need_defaults; then
19849 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19850 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19851 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19852 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19853fi
19854
b4e70030 19855# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 19856# simply because there is no reason against having it here, and in addition,
b4e70030 19857# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
19858# Hook for its removal unless debugging.
19859# Note that there is a small window in which the directory will not be cleaned:
19860# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
19861$debug ||
19862{
d0ac1c44 19863 tmp= ac_tmp=
81ecdfbb 19864 trap 'exit_status=$?
d0ac1c44
SM
19865 : "${ac_tmp:=$tmp}"
19866 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
19867' 0
19868 trap 'as_fn_exit 1' 1 2 13 15
19869}
19870# Create a (secure) tmp directory for tmp files.
19871
19872{
19873 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 19874 test -d "$tmp"
81ecdfbb
RW
19875} ||
19876{
19877 tmp=./conf$$-$RANDOM
19878 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
19879} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19880ac_tmp=$tmp
81ecdfbb
RW
19881
19882# Set up the scripts for CONFIG_FILES section.
19883# No need to generate them if there are no CONFIG_FILES.
19884# This happens for instance with `./config.status config.h'.
19885if test -n "$CONFIG_FILES"; then
19886
19887if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
19888 ac_cs_awk_getline=:
19889 ac_cs_awk_pipe_init=
19890 ac_cs_awk_read_file='
19891 while ((getline aline < (F[key])) > 0)
19892 print(aline)
19893 close(F[key])'
19894 ac_cs_awk_pipe_fini=
19895else
19896 ac_cs_awk_getline=false
19897 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
19898 ac_cs_awk_read_file='
19899 print "|#_!!_#|"
19900 print "cat " F[key] " &&"
19901 '$ac_cs_awk_pipe_init
19902 # The final `:' finishes the AND list.
19903 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
19904fi
19905ac_cr=`echo X | tr X '\015'`
19906# On cygwin, bash can eat \r inside `` if the user requested igncr.
19907# But we know of no other shell where ac_cr would be empty at this
19908# point, so we can use a bashism as a fallback.
19909if test "x$ac_cr" = x; then
19910 eval ac_cr=\$\'\\r\'
19911fi
19912ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19913if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 19914 ac_cs_awk_cr='\\r'
81ecdfbb
RW
19915else
19916 ac_cs_awk_cr=$ac_cr
19917fi
19918
d0ac1c44 19919echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
19920_ACEOF
19921
19922# Create commands to substitute file output variables.
19923{
19924 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 19925 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
19926 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
19927 echo "_ACAWK" &&
19928 echo "_ACEOF"
19929} >conf$$files.sh &&
19930. ./conf$$files.sh ||
d0ac1c44 19931 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19932rm -f conf$$files.sh
19933
19934{
19935 echo "cat >conf$$subs.awk <<_ACEOF" &&
19936 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19937 echo "_ACEOF"
19938} >conf$$subs.sh ||
d0ac1c44
SM
19939 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19940ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
19941ac_delim='%!_!# '
19942for ac_last_try in false false false false false :; do
19943 . ./conf$$subs.sh ||
d0ac1c44 19944 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19945
19946 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19947 if test $ac_delim_n = $ac_delim_num; then
19948 break
19949 elif $ac_last_try; then
d0ac1c44 19950 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19951 else
19952 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19953 fi
19954done
19955rm -f conf$$subs.sh
19956
19957cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 19958cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
19959_ACEOF
19960sed -n '
19961h
19962s/^/S["/; s/!.*/"]=/
19963p
19964g
19965s/^[^!]*!//
19966:repl
19967t repl
19968s/'"$ac_delim"'$//
19969t delim
19970:nl
19971h
d0ac1c44 19972s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
19973t more1
19974s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19975p
19976n
19977b repl
19978:more1
19979s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19980p
19981g
19982s/.\{148\}//
19983t nl
19984:delim
19985h
d0ac1c44 19986s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
19987t more2
19988s/["\\]/\\&/g; s/^/"/; s/$/"/
19989p
19990b
19991:more2
19992s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19993p
19994g
19995s/.\{148\}//
19996t delim
19997' <conf$$subs.awk | sed '
19998/^[^""]/{
19999 N
20000 s/\n//
20001}
20002' >>$CONFIG_STATUS || ac_write_fail=1
20003rm -f conf$$subs.awk
20004cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20005_ACAWK
d0ac1c44 20006cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
20007 for (key in S) S_is_set[key] = 1
20008 FS = "\a"
20009 \$ac_cs_awk_pipe_init
20010}
20011{
20012 line = $ 0
20013 nfields = split(line, field, "@")
20014 substed = 0
20015 len = length(field[1])
20016 for (i = 2; i < nfields; i++) {
20017 key = field[i]
20018 keylen = length(key)
20019 if (S_is_set[key]) {
20020 value = S[key]
20021 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20022 len += length(value) + length(field[++i])
20023 substed = 1
20024 } else
20025 len += 1 + keylen
20026 }
20027 if (nfields == 3 && !substed) {
20028 key = field[2]
20029 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20030 \$ac_cs_awk_read_file
20031 next
20032 }
20033 }
20034 print line
b4e70030 20035}
81ecdfbb
RW
20036\$ac_cs_awk_pipe_fini
20037_ACAWK
20038_ACEOF
20039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20040if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20041 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20042else
20043 cat
d0ac1c44
SM
20044fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20045 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
20046_ACEOF
20047
d0ac1c44
SM
20048# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20049# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
20050# trailing colons and then remove the whole line if VPATH becomes empty
20051# (actually we leave an empty line to preserve line numbers).
20052if test "x$srcdir" = x.; then
d0ac1c44
SM
20053 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20054h
20055s///
20056s/^/:/
20057s/[ ]*$/:/
20058s/:\$(srcdir):/:/g
20059s/:\${srcdir}:/:/g
20060s/:@srcdir@:/:/g
20061s/^:*//
81ecdfbb 20062s/:*$//
d0ac1c44
SM
20063x
20064s/\(=[ ]*\).*/\1/
20065G
20066s/\n//
81ecdfbb
RW
20067s/^[^=]*=[ ]*$//
20068}'
20069fi
20070
20071cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20072fi # test -n "$CONFIG_FILES"
20073
20074# Set up the scripts for CONFIG_HEADERS section.
20075# No need to generate them if there are no CONFIG_HEADERS.
20076# This happens for instance with `./config.status Makefile'.
20077if test -n "$CONFIG_HEADERS"; then
d0ac1c44 20078cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
20079BEGIN {
20080_ACEOF
20081
20082# Transform confdefs.h into an awk script `defines.awk', embedded as
20083# here-document in config.status, that substitutes the proper values into
20084# config.h.in to produce config.h.
4e8d927d 20085
81ecdfbb
RW
20086# Create a delimiter string that does not exist in confdefs.h, to ease
20087# handling of long lines.
20088ac_delim='%!_!# '
20089for ac_last_try in false false :; do
d0ac1c44
SM
20090 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20091 if test -z "$ac_tt"; then
81ecdfbb
RW
20092 break
20093 elif $ac_last_try; then
d0ac1c44 20094 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
20095 else
20096 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20097 fi
20098done
4e8d927d 20099
81ecdfbb
RW
20100# For the awk script, D is an array of macro values keyed by name,
20101# likewise P contains macro parameters if any. Preserve backslash
20102# newline sequences.
20103
20104ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20105sed -n '
20106s/.\{148\}/&'"$ac_delim"'/g
20107t rset
20108:rset
20109s/^[ ]*#[ ]*define[ ][ ]*/ /
20110t def
20111d
20112:def
20113s/\\$//
20114t bsnl
20115s/["\\]/\\&/g
20116s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20117D["\1"]=" \3"/p
20118s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20119d
20120:bsnl
20121s/["\\]/\\&/g
20122s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20123D["\1"]=" \3\\\\\\n"\\/p
20124t cont
20125s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20126t cont
20127d
20128:cont
20129n
20130s/.\{148\}/&'"$ac_delim"'/g
20131t clear
20132:clear
20133s/\\$//
20134t bsnlc
20135s/["\\]/\\&/g; s/^/"/; s/$/"/p
20136d
20137:bsnlc
20138s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20139b cont
20140' <confdefs.h | sed '
20141s/'"$ac_delim"'/"\\\
20142"/g' >>$CONFIG_STATUS || ac_write_fail=1
20143
20144cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20145 for (key in D) D_is_set[key] = 1
20146 FS = "\a"
20147}
20148/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20149 line = \$ 0
20150 split(line, arg, " ")
20151 if (arg[1] == "#") {
20152 defundef = arg[2]
20153 mac1 = arg[3]
20154 } else {
20155 defundef = substr(arg[1], 2)
20156 mac1 = arg[2]
20157 }
20158 split(mac1, mac2, "(") #)
20159 macro = mac2[1]
20160 prefix = substr(line, 1, index(line, defundef) - 1)
20161 if (D_is_set[macro]) {
20162 # Preserve the white space surrounding the "#".
20163 print prefix "define", macro P[macro] D[macro]
20164 next
20165 } else {
20166 # Replace #undef with comments. This is necessary, for example,
20167 # in the case of _POSIX_SOURCE, which is predefined and required
20168 # on some systems where configure will not decide to define it.
20169 if (defundef == "undef") {
20170 print "/*", prefix defundef, macro, "*/"
20171 next
20172 }
20173 }
b4e70030 20174}
81ecdfbb
RW
20175{ print }
20176_ACAWK
b4e70030 20177_ACEOF
81ecdfbb 20178cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 20179 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 20180fi # test -n "$CONFIG_HEADERS"
4e8d927d 20181
4e8d927d 20182
81ecdfbb
RW
20183eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20184shift
20185for ac_tag
20186do
20187 case $ac_tag in
20188 :[FHLC]) ac_mode=$ac_tag; continue;;
20189 esac
20190 case $ac_mode$ac_tag in
20191 :[FHL]*:*);;
d0ac1c44 20192 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
20193 :[FH]-) ac_tag=-:-;;
20194 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20195 esac
20196 ac_save_IFS=$IFS
20197 IFS=:
20198 set x $ac_tag
20199 IFS=$ac_save_IFS
20200 shift
20201 ac_file=$1
20202 shift
4e8d927d 20203
81ecdfbb
RW
20204 case $ac_mode in
20205 :L) ac_source=$1;;
20206 :[FH])
20207 ac_file_inputs=
20208 for ac_f
20209 do
20210 case $ac_f in
d0ac1c44 20211 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
20212 *) # Look for the file first in the build tree, then in the source tree
20213 # (if the path is not absolute). The absolute path cannot be DOS-style,
20214 # because $ac_f cannot contain `:'.
20215 test -f "$ac_f" ||
20216 case $ac_f in
20217 [\\/$]*) false;;
20218 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20219 esac ||
d0ac1c44 20220 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
20221 esac
20222 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20223 as_fn_append ac_file_inputs " '$ac_f'"
20224 done
20225
20226 # Let's still pretend it is `configure' which instantiates (i.e., don't
20227 # use $as_me), people would be surprised to read:
20228 # /* config.h. Generated by config.status. */
20229 configure_input='Generated from '`
20230 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20231 `' by configure.'
20232 if test x"$ac_file" != x-; then
20233 configure_input="$ac_file. $configure_input"
20234 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20235$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 20236 fi
81ecdfbb
RW
20237 # Neutralize special characters interpreted by sed in replacement strings.
20238 case $configure_input in #(
20239 *\&* | *\|* | *\\* )
20240 ac_sed_conf_input=`$as_echo "$configure_input" |
20241 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20242 *) ac_sed_conf_input=$configure_input;;
20243 esac
4e8d927d 20244
81ecdfbb 20245 case $ac_tag in
d0ac1c44
SM
20246 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20247 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
20248 esac
20249 ;;
c906108c
SS
20250 esac
20251
81ecdfbb 20252 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
20253$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20254 X"$ac_file" : 'X\(//\)[^/]' \| \
20255 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
20256 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20257$as_echo X"$ac_file" |
20258 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20259 s//\1/
20260 q
20261 }
20262 /^X\(\/\/\)[^/].*/{
20263 s//\1/
20264 q
20265 }
20266 /^X\(\/\/\)$/{
20267 s//\1/
20268 q
20269 }
20270 /^X\(\/\).*/{
20271 s//\1/
20272 q
20273 }
20274 s/.*/./; q'`
20275 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20276 ac_builddir=.
20277
81ecdfbb
RW
20278case "$ac_dir" in
20279.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20280*)
20281 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20282 # A ".." for each directory in $ac_dir_suffix.
20283 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20284 case $ac_top_builddir_sub in
20285 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20286 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20287 esac ;;
20288esac
20289ac_abs_top_builddir=$ac_pwd
20290ac_abs_builddir=$ac_pwd$ac_dir_suffix
20291# for backward compatibility:
20292ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20293
20294case $srcdir in
81ecdfbb 20295 .) # We are building in place.
bec39cab 20296 ac_srcdir=.
81ecdfbb
RW
20297 ac_top_srcdir=$ac_top_builddir_sub
20298 ac_abs_top_srcdir=$ac_pwd ;;
20299 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20300 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20301 ac_top_srcdir=$srcdir
20302 ac_abs_top_srcdir=$srcdir ;;
20303 *) # Relative name.
20304 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20305 ac_top_srcdir=$ac_top_build_prefix$srcdir
20306 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20307esac
81ecdfbb 20308ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 20309
c906108c 20310
81ecdfbb
RW
20311 case $ac_mode in
20312 :F)
20313 #
20314 # CONFIG_FILE
20315 #
c906108c 20316
bec39cab
AC
20317 case $INSTALL in
20318 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 20319 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 20320 esac
81ecdfbb 20321_ACEOF
121ce6e5 20322
81ecdfbb
RW
20323cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20324# If the template does not know about datarootdir, expand it.
20325# FIXME: This hack should be removed a few years after 2.60.
20326ac_datarootdir_hack=; ac_datarootdir_seen=
20327ac_sed_dataroot='
20328/datarootdir/ {
20329 p
20330 q
20331}
20332/@datadir@/p
20333/@docdir@/p
20334/@infodir@/p
20335/@localedir@/p
20336/@mandir@/p'
20337case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20338*datarootdir*) ac_datarootdir_seen=yes;;
20339*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20340 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20341$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20342_ACEOF
20343cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20344 ac_datarootdir_hack='
20345 s&@datadir@&$datadir&g
20346 s&@docdir@&$docdir&g
20347 s&@infodir@&$infodir&g
20348 s&@localedir@&$localedir&g
20349 s&@mandir@&$mandir&g
20350 s&\\\${datarootdir}&$datarootdir&g' ;;
20351esac
4e8d927d 20352_ACEOF
81ecdfbb
RW
20353
20354# Neutralize VPATH when `$srcdir' = `.'.
20355# Shell code in configure.ac might set extrasub.
20356# FIXME: do we really want to maintain this feature?
20357cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20358ac_sed_extra="$ac_vpsub
bec39cab
AC
20359$extrasub
20360_ACEOF
81ecdfbb 20361cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
20362:t
20363/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
20364s|@configure_input@|$ac_sed_conf_input|;t t
20365s&@top_builddir@&$ac_top_builddir_sub&;t t
20366s&@top_build_prefix@&$ac_top_build_prefix&;t t
20367s&@srcdir@&$ac_srcdir&;t t
20368s&@abs_srcdir@&$ac_abs_srcdir&;t t
20369s&@top_srcdir@&$ac_top_srcdir&;t t
20370s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20371s&@builddir@&$ac_builddir&;t t
20372s&@abs_builddir@&$ac_abs_builddir&;t t
20373s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20374s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
20375$ac_datarootdir_hack
20376"
20377eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20378if $ac_cs_awk_getline; then
d0ac1c44 20379 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 20380else
d0ac1c44
SM
20381 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20382fi \
20383 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20384
20385test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
20386 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20387 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20388 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 20389 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20390which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 20391$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20392which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 20393
d0ac1c44 20394 rm -f "$ac_tmp/stdin"
bec39cab 20395 case $ac_file in
d0ac1c44
SM
20396 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20397 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 20398 esac \
d0ac1c44 20399 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20400 ;;
20401 :H)
20402 #
20403 # CONFIG_HEADER
20404 #
bec39cab 20405 if test x"$ac_file" != x-; then
81ecdfbb
RW
20406 {
20407 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20408 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20409 } >"$ac_tmp/config.h" \
20410 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20411 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
20412 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20413$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 20414 else
81ecdfbb 20415 rm -f "$ac_file"
d0ac1c44
SM
20416 mv "$ac_tmp/config.h" "$ac_file" \
20417 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
20418 fi
20419 else
81ecdfbb 20420 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20421 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20422 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 20423 fi
81ecdfbb
RW
20424 ;;
20425 :L)
20426 #
20427 # CONFIG_LINK
20428 #
c906108c 20429
81ecdfbb
RW
20430 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20431 :
b4e70030 20432 else
81ecdfbb
RW
20433 # Prefer the file from the source tree if names are identical.
20434 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20435 ac_source=$srcdir/$ac_source
20436 fi
b4e70030 20437
81ecdfbb
RW
20438 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20439$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 20440
81ecdfbb 20441 if test ! -r "$ac_source"; then
d0ac1c44 20442 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
20443 fi
20444 rm -f "$ac_file"
bec39cab 20445
81ecdfbb 20446 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 20447 case $ac_source in
81ecdfbb
RW
20448 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20449 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20450 esac
20451 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20452 ln "$ac_source" "$ac_file" 2>/dev/null ||
20453 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 20454 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
20455 fi
20456 ;;
20457 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20458$as_echo "$as_me: executing $ac_file commands" >&6;}
20459 ;;
c906108c 20460 esac
b4e70030 20461
bec39cab 20462
81ecdfbb 20463 case $ac_file$ac_mode in
c5adaa19 20464 "config.h":H) echo > stamp-h ;;
81ecdfbb 20465 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 20466 "nm.h":L) echo > stamp-nmh ;;
b292c783 20467 "gcore":F) chmod +x gcore ;;
81ecdfbb 20468
bec39cab 20469 esac
81ecdfbb 20470done # for ac_tag
c906108c 20471
bec39cab 20472
81ecdfbb 20473as_fn_exit 0
bec39cab 20474_ACEOF
bec39cab
AC
20475ac_clean_files=$ac_clean_files_save
20476
81ecdfbb 20477test $ac_write_fail = 0 ||
d0ac1c44 20478 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 20479
bec39cab
AC
20480
20481# configure is writing to config.log, and then calls config.status.
20482# config.status does its own redirection, appending to config.log.
20483# Unfortunately, on DOS this fails, as config.log is still kept open
20484# by configure, so config.status won't be able to write to it; its
20485# output is simply discarded. So we exec the FD to /dev/null,
20486# effectively closing config.log, so it can be properly (re)opened and
20487# appended to by config.status. When coming back to configure, we
20488# need to make the FD available again.
20489if test "$no_create" != yes; then
20490 ac_cs_success=:
20491 ac_config_status_args=
20492 test "$silent" = yes &&
20493 ac_config_status_args="$ac_config_status_args --quiet"
20494 exec 5>/dev/null
20495 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20496 exec 5>>config.log
20497 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20498 # would make configure fail if this is the last instruction.
d0ac1c44 20499 $ac_cs_success || as_fn_exit 1
bec39cab 20500fi
c906108c 20501
bec39cab 20502#
81ecdfbb 20503# CONFIG_SUBDIRS section.
bec39cab 20504#
c906108c
SS
20505if test "$no_recursion" != yes; then
20506
81ecdfbb
RW
20507 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20508 # so they do not pile up.
c906108c
SS
20509 ac_sub_configure_args=
20510 ac_prev=
fdc59709
PB
20511 eval "set x $ac_configure_args"
20512 shift
20513 for ac_arg
20514 do
c906108c
SS
20515 if test -n "$ac_prev"; then
20516 ac_prev=
20517 continue
20518 fi
bec39cab 20519 case $ac_arg in
c906108c
SS
20520 -cache-file | --cache-file | --cache-fil | --cache-fi \
20521 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20522 ac_prev=cache_file ;;
20523 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
20524 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20525 | --c=*)
20526 ;;
20527 --config-cache | -C)
c906108c
SS
20528 ;;
20529 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20530 ac_prev=srcdir ;;
20531 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20532 ;;
bec39cab
AC
20533 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20534 ac_prev=prefix ;;
20535 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20536 ;;
81ecdfbb
RW
20537 --disable-option-checking)
20538 ;;
fdc59709
PB
20539 *)
20540 case $ac_arg in
81ecdfbb 20541 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20542 esac
81ecdfbb 20543 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
20544 esac
20545 done
20546
bec39cab
AC
20547 # Always prepend --prefix to ensure using the same prefix
20548 # in subdir configurations.
fdc59709
PB
20549 ac_arg="--prefix=$prefix"
20550 case $ac_arg in
81ecdfbb 20551 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20552 esac
81ecdfbb
RW
20553 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20554
20555 # Pass --silent
20556 if test "$silent" = yes; then
20557 ac_sub_configure_args="--silent $ac_sub_configure_args"
20558 fi
20559
20560 # Always prepend --disable-option-checking to silence warnings, since
20561 # different subdirs can have different --enable and --with options.
20562 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 20563
b4e70030 20564 ac_popdir=`pwd`
bec39cab 20565 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
20566
20567 # Do not complain, so a configure script can configure whichever
20568 # parts of a large source tree are present.
fdc59709 20569 test -d "$srcdir/$ac_dir" || continue
c906108c 20570
81ecdfbb
RW
20571 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20572 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20573 $as_echo "$ac_msg" >&6
20574 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20575 ac_builddir=.
20576
81ecdfbb
RW
20577case "$ac_dir" in
20578.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20579*)
20580 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20581 # A ".." for each directory in $ac_dir_suffix.
20582 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20583 case $ac_top_builddir_sub in
20584 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20585 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20586 esac ;;
20587esac
20588ac_abs_top_builddir=$ac_pwd
20589ac_abs_builddir=$ac_pwd$ac_dir_suffix
20590# for backward compatibility:
20591ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20592
20593case $srcdir in
81ecdfbb 20594 .) # We are building in place.
bec39cab 20595 ac_srcdir=.
81ecdfbb
RW
20596 ac_top_srcdir=$ac_top_builddir_sub
20597 ac_abs_top_srcdir=$ac_pwd ;;
20598 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20599 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20600 ac_top_srcdir=$srcdir
20601 ac_abs_top_srcdir=$srcdir ;;
20602 *) # Relative name.
20603 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20604 ac_top_srcdir=$ac_top_build_prefix$srcdir
20605 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20606esac
81ecdfbb 20607ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 20608
c906108c 20609
fdc59709 20610 cd "$ac_dir"
c906108c
SS
20611
20612 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
20613 if test -f "$ac_srcdir/configure.gnu"; then
20614 ac_sub_configure=$ac_srcdir/configure.gnu
20615 elif test -f "$ac_srcdir/configure"; then
20616 ac_sub_configure=$ac_srcdir/configure
20617 elif test -f "$ac_srcdir/configure.in"; then
20618 # This should be Cygnus configure.
20619 ac_sub_configure=$ac_aux_dir/configure
c906108c 20620 else
81ecdfbb
RW
20621 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20622$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
20623 ac_sub_configure=
20624 fi
20625
20626 # The recursion is here.
20627 if test -n "$ac_sub_configure"; then
c906108c 20628 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
20629 case $cache_file in
20630 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
20631 *) # Relative name.
20632 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 20633 esac
c906108c 20634
81ecdfbb
RW
20635 { $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
20636$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 20637 # The eval makes quoting arguments work.
fdc59709
PB
20638 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20639 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 20640 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
20641 fi
20642
fdc59709 20643 cd "$ac_popdir"
c906108c
SS
20644 done
20645fi
81ecdfbb
RW
20646if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20648$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20649fi
c906108c 20650
This page took 4.412206 seconds and 4 git commands to generate.