]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
config/debuginfod.m4: Use PKG_CHECK_MODULES
[thirdparty/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 90as_myself=
81ecdfbb
RW
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
81ecdfbb
RW
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 211do
81ecdfbb
RW
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
81ecdfbb
RW
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 266 else
81ecdfbb
RW
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
bec39cab 271 fi
81ecdfbb
RW
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
bec39cab 301
81ecdfbb
RW
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
81ecdfbb
RW
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
81ecdfbb
RW
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
421 as_expr=expr
422else
423 as_expr=false
424fi
425
81ecdfbb 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
427 as_basename=basename
428else
429 as_basename=false
430fi
431
81ecdfbb
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
bec39cab 437
81ecdfbb 438as_me=`$as_basename -- "$0" ||
bec39cab
AC
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
bec39cab 456
b4e70030
JB
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 463
bec39cab 464
81ecdfbb
RW
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
bec39cab 474 sed '
81ecdfbb
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
bec39cab 479 N
81ecdfbb
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 482 t loop
81ecdfbb 483 s/-\n.*//
bec39cab 484 ' >$as_me.lineno &&
81ecdfbb
RW
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab 487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
bec39cab
AC
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
bec39cab
AC
496 # Exit status is that of the last command.
497 exit
498}
499
81ecdfbb
RW
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
bec39cab
AC
511esac
512
81ecdfbb
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
bec39cab 516else
81ecdfbb
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
bec39cab 519fi
81ecdfbb
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 522 as_ln_s='ln -s'
81ecdfbb
RW
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
81ecdfbb 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
81ecdfbb
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
b4e70030 533 fi
bec39cab 534else
d0ac1c44 535 as_ln_s='cp -pR'
bec39cab 536fi
81ecdfbb
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
bec39cab
AC
539
540if mkdir -p . 2>/dev/null; then
81ecdfbb 541 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
bec39cab
AC
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c906108c 559
bec39cab 560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
bec39cab
AC
565#
566# Initializations.
567#
c906108c 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
b4e70030 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab
AC
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
81ecdfbb 622enable_option_checking=no
d0ac1c44 623ac_header_list=
c971b7fa 624ac_subst_vars='LTLIBOBJS
81ecdfbb 625LIBOBJS
b292c783
JK
626GCORE_TRANSFORM_NAME
627GDB_TRANSFORM_NAME
e3487908 628XSLTPROC
a0a461e5 629NM_H
81ecdfbb 630GDB_NM_FILE
ccb1ba62
CB
631LTLIBXXHASH
632LIBXXHASH
633HAVE_LIBXXHASH
1776e3e5
NA
634CTF_DEPS
635LIBCTF
636ENABLE_LIBCTF
393fd4c3
YQ
637LTLIBBABELTRACE
638LIBBABELTRACE
639HAVE_LIBBABELTRACE
21ea5acd
SDJ
640HAVE_NATIVE_GCORE_HOST
641NAT_GENERATED_FILES
642XM_CLIBS
643MH_CFLAGS
644LOADLIBES
645NAT_CDEPS
646NATDEPFILES
647NAT_FILE
81ecdfbb
RW
648target_subdir
649CONFIG_UNINSTALL
650CONFIG_INSTALL
651CONFIG_CLEAN
652CONFIG_ALL
653CONFIG_SRCS
654CONFIG_DEPS
655CONFIG_OBS
656PROFILE_CFLAGS
657ENABLE_CFLAGS
658SIM_OBS
659SIM
660XMKMF
661GDBTK_SRC_DIR
662GDBTK_CFLAGS
663GDBTKLIBS
664X_LIBS
665X_LDFLAGS
666X_CFLAGS
667TK_XINCLUDES
668TK_DEPS
669TK_LIBRARY
670TK_INCLUDE
671TK_STUB_LIB_SPEC
672TK_STUB_LIB_FLAG
673TK_STUB_LIB_FILE
674TK_LIB_SPEC
675TK_LIB_FLAG
676TK_LIB_FILE
677TK_SRC_DIR
678TK_BIN_DIR
679TK_VERSION
680TCL_DEPS
681TCL_LIBRARY
682TCL_INCLUDE
683TCL_STUB_LIB_SPEC
684TCL_STUB_LIB_FLAG
685TCL_STUB_LIB_FILE
686TCL_LIB_SPEC
687TCL_LIB_FLAG
688TCL_LIB_FILE
689TCL_SRC_DIR
690TCL_BIN_DIR
691TCL_PATCH_LEVEL
692TCL_VERSION
693WIN32LDAPP
b2ceabe8 694WIN32LIBS
81ecdfbb
RW
695GUI_CFLAGS_X
696LIBGUI
608e2dbb
TT
697LTLIBLZMA
698LIBLZMA
699HAVE_LIBLZMA
81ecdfbb
RW
700SER_HARDWIRE
701WERROR_CFLAGS
702WARN_CFLAGS
ed2a2229 703SYSTEM_GDBINIT_DIR
81ecdfbb 704SYSTEM_GDBINIT
81ecdfbb
RW
705TARGET_SYSTEM_ROOT
706CONFIG_LDFLAGS
f6528abd 707RDYNAMIC
05ea2a05
TT
708LTLIBIPT
709LIBIPT
710HAVE_LIBIPT
5e030278
TT
711PTHREAD_CFLAGS
712PTHREAD_LIBS
713PTHREAD_CC
714ax_pthread_config
715SED
81ecdfbb 716ALLOCA
62f29fda
TT
717SRCHIGH_CFLAGS
718SRCHIGH_LIBS
4df42755
DE
719HAVE_GUILE_FALSE
720HAVE_GUILE_TRUE
ed3ef339
DE
721GUILE_LIBS
722GUILE_CPPFLAGS
e76c5d17
DE
723GUILD_TARGET_FLAG
724GUILD
ed3ef339 725pkg_config_prog_path
4df42755
DE
726HAVE_PYTHON_FALSE
727HAVE_PYTHON_TRUE
ac534cba
JB
728PYTHON_LIBS
729PYTHON_CPPFLAGS
81ecdfbb 730PYTHON_CFLAGS
ec685c5e 731python_prog_path
2400729e
UW
732LTLIBMPFR
733LIBMPFR
734HAVE_LIBMPFR
81ecdfbb
RW
735LTLIBEXPAT
736LIBEXPAT
737HAVE_LIBEXPAT
b8e0a31c 738JIT_READER_DIR
f997c383 739TARGET_PTR
39037522 740READLINE_TEXI_INCFLAG
81ecdfbb
RW
741READLINE_CFLAGS
742READLINE_DEPS
743READLINE
016a3251
DD
744LTLIBICONV
745LIBICONV
711a72d3
L
746zlibinc
747zlibdir
81ecdfbb
RW
748MIG
749WINDRES
750DLLTOOL
c971b7fa 751AR
81ecdfbb
RW
752YFLAGS
753YACC
c971b7fa 754RANLIB
81ecdfbb 755LN_S
c971b7fa
PA
756INSTALL_DATA
757INSTALL_SCRIPT
758INSTALL_PROGRAM
759AWK
81ecdfbb
RW
760REPORT_BUGS_TEXI
761REPORT_BUGS_TO
762PKGVERSION
44cee4fd 763CODESIGN_CERT
f6720b1c
AM
764DEBUGINFOD_LIBS
765DEBUGINFOD_CFLAGS
766PKG_CONFIG_LIBDIR
767PKG_CONFIG_PATH
768PKG_CONFIG
b292c783 769HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
770TARGET_OBS
771subdirs
772GDB_DATADIR
773DEBUGDIR
5048e516
JK
774MAKEINFO_EXTRA_FLAGS
775MAKEINFOFLAGS
776MAKEINFO
81ecdfbb 777PACKAGE
81ecdfbb
RW
778CATOBJEXT
779GENCAT
780INSTOBJEXT
781DATADIRNAME
782CATALOGS
783POSUB
784GMSGFMT
785XGETTEXT
786INCINTL
787LIBINTL_DEP
788LIBINTL
789USE_NLS
81ecdfbb
RW
790CCDEPMODE
791DEPDIR
792am__leading_dot
0bcda685
PA
793CXX_DIALECT
794HAVE_CXX11
4869db5e
RM
795INSTALL_STRIP_PROGRAM
796STRIP
797install_sh
81ecdfbb
RW
798target_os
799target_vendor
800target_cpu
801target
802host_os
803host_vendor
804host_cpu
805host
806build_os
807build_vendor
808build_cpu
809build
c971b7fa
PA
810EGREP
811GREP
812CPP
3bc3d82a
PA
813ac_ct_CXX
814CXXFLAGS
815CXX
81ecdfbb
RW
816OBJEXT
817EXEEXT
818ac_ct_CC
819CPPFLAGS
820LDFLAGS
821CFLAGS
822CC
823MAINT
824MAINTAINER_MODE_FALSE
825MAINTAINER_MODE_TRUE
826target_alias
827host_alias
828build_alias
829LIBS
830ECHO_T
831ECHO_N
832ECHO_C
833DEFS
834mandir
835localedir
836libdir
837psdir
838pdfdir
839dvidir
840htmldir
841infodir
842docdir
843oldincludedir
844includedir
845localstatedir
846sharedstatedir
847sysconfdir
848datadir
849datarootdir
850libexecdir
851sbindir
852bindir
853program_transform_name
854prefix
855exec_prefix
856PACKAGE_URL
857PACKAGE_BUGREPORT
858PACKAGE_STRING
859PACKAGE_VERSION
860PACKAGE_TARNAME
861PACKAGE_NAME
862PATH_SEPARATOR
863SHELL'
2b351b19 864ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
865ac_user_opts='
866enable_option_checking
867enable_maintainer_mode
da2f07f1
JK
868enable_plugins
869enable_largefile
81ecdfbb
RW
870with_separate_debug_dir
871with_gdb_datadir
872with_relocated_sources
7349ff92 873with_auto_load_dir
bccbefd2 874with_auto_load_safe_path
81ecdfbb
RW
875enable_targets
876enable_64_bit_bfd
81ecdfbb
RW
877enable_gdbmi
878enable_tui
879enable_gdbtk
0d79cdc4 880with_debuginfod
05e7c244 881with_libunwind_ia64
81ecdfbb
RW
882with_curses
883enable_profiling
44cee4fd 884enable_codesign
81ecdfbb
RW
885with_pkgversion
886with_bugurl
711a72d3 887with_system_zlib
016a3251
DD
888with_gnu_ld
889enable_rpath
81ecdfbb 890with_libiconv_prefix
9f1528a1 891with_libiconv_type
478aac75 892with_iconv_bin
81ecdfbb 893with_system_readline
b8e0a31c 894with_jit_reader_dir
81ecdfbb 895with_expat
81ecdfbb 896with_libexpat_prefix
9f1528a1 897with_libexpat_type
2400729e
UW
898with_mpfr
899with_libmpfr_prefix
9f1528a1 900with_libmpfr_type
81ecdfbb 901with_python
d13c7322 902with_python_libdir
ed3ef339 903with_guile
189b8c2e 904enable_source_highlight
58bfce93
MM
905with_intel_pt
906with_libipt_prefix
9f1528a1 907with_libipt_type
81ecdfbb
RW
908with_included_regex
909with_sysroot
910with_system_gdbinit
ed2a2229 911with_system_gdbinit_dir
81ecdfbb
RW
912enable_werror
913enable_build_warnings
914enable_gdb_build_warnings
f35d5ade 915enable_ubsan
608e2dbb
TT
916with_lzma
917with_liblzma_prefix
9f1528a1 918with_liblzma_type
81ecdfbb
RW
919with_tcl
920with_tk
921with_x
922enable_sim
393fd4c3
YQ
923with_babeltrace
924with_libbabeltrace_prefix
9f1528a1 925with_libbabeltrace_type
ccb1ba62 926with_xxhash
1776e3e5 927enable_libctf
ccb1ba62 928with_libxxhash_prefix
9f1528a1 929with_libxxhash_type
8ecfd7bd 930enable_unit_tests
81ecdfbb
RW
931'
932 ac_precious_vars='build_alias
933host_alias
934target_alias
935CC
936CFLAGS
937LDFLAGS
938LIBS
939CPPFLAGS
3bc3d82a
PA
940CXX
941CXXFLAGS
942CCC
81ecdfbb 943CPP
f06e05e0
JK
944MAKEINFO
945MAKEINFOFLAGS
f6720b1c
AM
946PKG_CONFIG
947PKG_CONFIG_PATH
948PKG_CONFIG_LIBDIR
949DEBUGINFOD_CFLAGS
950DEBUGINFOD_LIBS
81ecdfbb
RW
951YACC
952YFLAGS
953XMKMF'
5ae98d25 954ac_subdirs_all='testsuite
919adfe8 955gdbtk'
c906108c
SS
956
957# Initialize some variables set by options.
bec39cab
AC
958ac_init_help=
959ac_init_version=false
81ecdfbb
RW
960ac_unrecognized_opts=
961ac_unrecognized_sep=
c906108c
SS
962# The variables have the same names as the options, with
963# dashes changed to underlines.
bec39cab 964cache_file=/dev/null
c906108c 965exec_prefix=NONE
c906108c 966no_create=
c906108c
SS
967no_recursion=
968prefix=NONE
969program_prefix=NONE
970program_suffix=NONE
971program_transform_name=s,x,x,
972silent=
973site=
974srcdir=
c906108c
SS
975verbose=
976x_includes=NONE
977x_libraries=NONE
bec39cab
AC
978
979# Installation directory options.
980# These are left unexpanded so users can "make install exec_prefix=/foo"
981# and all the variables that are supposed to be based on exec_prefix
982# by default will actually change.
983# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 984# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
985bindir='${exec_prefix}/bin'
986sbindir='${exec_prefix}/sbin'
987libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
988datarootdir='${prefix}/share'
989datadir='${datarootdir}'
c906108c
SS
990sysconfdir='${prefix}/etc'
991sharedstatedir='${prefix}/com'
992localstatedir='${prefix}/var'
c906108c
SS
993includedir='${prefix}/include'
994oldincludedir='/usr/include'
81ecdfbb
RW
995docdir='${datarootdir}/doc/${PACKAGE}'
996infodir='${datarootdir}/info'
997htmldir='${docdir}'
998dvidir='${docdir}'
999pdfdir='${docdir}'
1000psdir='${docdir}'
1001libdir='${exec_prefix}/lib'
1002localedir='${datarootdir}/locale'
1003mandir='${datarootdir}/man'
c906108c 1004
c906108c 1005ac_prev=
81ecdfbb 1006ac_dashdash=
c906108c
SS
1007for ac_option
1008do
c906108c
SS
1009 # If the previous option needs an argument, assign it.
1010 if test -n "$ac_prev"; then
81ecdfbb 1011 eval $ac_prev=\$ac_option
c906108c
SS
1012 ac_prev=
1013 continue
1014 fi
1015
81ecdfbb 1016 case $ac_option in
d0ac1c44
SM
1017 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1018 *=) ac_optarg= ;;
1019 *) ac_optarg=yes ;;
81ecdfbb 1020 esac
c906108c
SS
1021
1022 # Accept the important Cygnus configure options, so we can diagnose typos.
1023
81ecdfbb
RW
1024 case $ac_dashdash$ac_option in
1025 --)
1026 ac_dashdash=yes ;;
c906108c
SS
1027
1028 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1029 ac_prev=bindir ;;
1030 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1031 bindir=$ac_optarg ;;
c906108c
SS
1032
1033 -build | --build | --buil | --bui | --bu)
bec39cab 1034 ac_prev=build_alias ;;
c906108c 1035 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1036 build_alias=$ac_optarg ;;
c906108c
SS
1037
1038 -cache-file | --cache-file | --cache-fil | --cache-fi \
1039 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1040 ac_prev=cache_file ;;
1041 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1042 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1043 cache_file=$ac_optarg ;;
1044
1045 --config-cache | -C)
1046 cache_file=config.cache ;;
c906108c 1047
81ecdfbb 1048 -datadir | --datadir | --datadi | --datad)
c906108c 1049 ac_prev=datadir ;;
81ecdfbb 1050 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1051 datadir=$ac_optarg ;;
c906108c 1052
81ecdfbb
RW
1053 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1054 | --dataroo | --dataro | --datar)
1055 ac_prev=datarootdir ;;
1056 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1057 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1058 datarootdir=$ac_optarg ;;
1059
c906108c 1060 -disable-* | --disable-*)
81ecdfbb 1061 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1062 # Reject names that are not valid shell variable names.
81ecdfbb 1063 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1064 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1065 ac_useropt_orig=$ac_useropt
1066 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1067 case $ac_user_opts in
1068 *"
1069"enable_$ac_useropt"
1070"*) ;;
1071 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1072 ac_unrecognized_sep=', ';;
1073 esac
1074 eval enable_$ac_useropt=no ;;
1075
1076 -docdir | --docdir | --docdi | --doc | --do)
1077 ac_prev=docdir ;;
1078 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1079 docdir=$ac_optarg ;;
1080
1081 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1082 ac_prev=dvidir ;;
1083 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1084 dvidir=$ac_optarg ;;
c906108c
SS
1085
1086 -enable-* | --enable-*)
81ecdfbb 1087 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1088 # Reject names that are not valid shell variable names.
81ecdfbb 1089 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1090 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1091 ac_useropt_orig=$ac_useropt
1092 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1093 case $ac_user_opts in
1094 *"
1095"enable_$ac_useropt"
1096"*) ;;
1097 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1098 ac_unrecognized_sep=', ';;
b4e70030 1099 esac
81ecdfbb 1100 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1101
1102 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1103 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1104 | --exec | --exe | --ex)
1105 ac_prev=exec_prefix ;;
1106 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1107 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1108 | --exec=* | --exe=* | --ex=*)
bec39cab 1109 exec_prefix=$ac_optarg ;;
c906108c
SS
1110
1111 -gas | --gas | --ga | --g)
1112 # Obsolete; use --with-gas.
1113 with_gas=yes ;;
1114
bec39cab
AC
1115 -help | --help | --hel | --he | -h)
1116 ac_init_help=long ;;
1117 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1118 ac_init_help=recursive ;;
1119 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1120 ac_init_help=short ;;
c906108c
SS
1121
1122 -host | --host | --hos | --ho)
bec39cab 1123 ac_prev=host_alias ;;
c906108c 1124 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1125 host_alias=$ac_optarg ;;
c906108c 1126
81ecdfbb
RW
1127 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1128 ac_prev=htmldir ;;
1129 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1130 | --ht=*)
1131 htmldir=$ac_optarg ;;
1132
c906108c
SS
1133 -includedir | --includedir | --includedi | --included | --include \
1134 | --includ | --inclu | --incl | --inc)
1135 ac_prev=includedir ;;
1136 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1137 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1138 includedir=$ac_optarg ;;
c906108c
SS
1139
1140 -infodir | --infodir | --infodi | --infod | --info | --inf)
1141 ac_prev=infodir ;;
1142 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1143 infodir=$ac_optarg ;;
c906108c
SS
1144
1145 -libdir | --libdir | --libdi | --libd)
1146 ac_prev=libdir ;;
1147 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1148 libdir=$ac_optarg ;;
c906108c
SS
1149
1150 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1151 | --libexe | --libex | --libe)
1152 ac_prev=libexecdir ;;
1153 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1154 | --libexe=* | --libex=* | --libe=*)
bec39cab 1155 libexecdir=$ac_optarg ;;
c906108c 1156
81ecdfbb
RW
1157 -localedir | --localedir | --localedi | --localed | --locale)
1158 ac_prev=localedir ;;
1159 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1160 localedir=$ac_optarg ;;
1161
c906108c 1162 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1163 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1164 ac_prev=localstatedir ;;
1165 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1166 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1167 localstatedir=$ac_optarg ;;
c906108c
SS
1168
1169 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1170 ac_prev=mandir ;;
1171 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1172 mandir=$ac_optarg ;;
c906108c
SS
1173
1174 -nfp | --nfp | --nf)
1175 # Obsolete; use --without-fp.
1176 with_fp=no ;;
1177
1178 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1179 | --no-cr | --no-c | -n)
c906108c
SS
1180 no_create=yes ;;
1181
1182 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1183 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1184 no_recursion=yes ;;
1185
1186 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1187 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1188 | --oldin | --oldi | --old | --ol | --o)
1189 ac_prev=oldincludedir ;;
1190 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1191 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1192 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1193 oldincludedir=$ac_optarg ;;
c906108c
SS
1194
1195 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1196 ac_prev=prefix ;;
1197 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1198 prefix=$ac_optarg ;;
c906108c
SS
1199
1200 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1201 | --program-pre | --program-pr | --program-p)
1202 ac_prev=program_prefix ;;
1203 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1204 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1205 program_prefix=$ac_optarg ;;
c906108c
SS
1206
1207 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1208 | --program-suf | --program-su | --program-s)
1209 ac_prev=program_suffix ;;
1210 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1211 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1212 program_suffix=$ac_optarg ;;
c906108c
SS
1213
1214 -program-transform-name | --program-transform-name \
1215 | --program-transform-nam | --program-transform-na \
1216 | --program-transform-n | --program-transform- \
1217 | --program-transform | --program-transfor \
1218 | --program-transfo | --program-transf \
1219 | --program-trans | --program-tran \
1220 | --progr-tra | --program-tr | --program-t)
1221 ac_prev=program_transform_name ;;
1222 -program-transform-name=* | --program-transform-name=* \
1223 | --program-transform-nam=* | --program-transform-na=* \
1224 | --program-transform-n=* | --program-transform-=* \
1225 | --program-transform=* | --program-transfor=* \
1226 | --program-transfo=* | --program-transf=* \
1227 | --program-trans=* | --program-tran=* \
1228 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1229 program_transform_name=$ac_optarg ;;
c906108c 1230
81ecdfbb
RW
1231 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1232 ac_prev=pdfdir ;;
1233 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1234 pdfdir=$ac_optarg ;;
1235
1236 -psdir | --psdir | --psdi | --psd | --ps)
1237 ac_prev=psdir ;;
1238 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1239 psdir=$ac_optarg ;;
1240
c906108c
SS
1241 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1242 | -silent | --silent | --silen | --sile | --sil)
1243 silent=yes ;;
1244
1245 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1246 ac_prev=sbindir ;;
1247 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1248 | --sbi=* | --sb=*)
bec39cab 1249 sbindir=$ac_optarg ;;
c906108c
SS
1250
1251 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1252 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1253 | --sharedst | --shareds | --shared | --share | --shar \
1254 | --sha | --sh)
1255 ac_prev=sharedstatedir ;;
1256 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1257 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1258 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1259 | --sha=* | --sh=*)
bec39cab 1260 sharedstatedir=$ac_optarg ;;
c906108c
SS
1261
1262 -site | --site | --sit)
1263 ac_prev=site ;;
1264 -site=* | --site=* | --sit=*)
bec39cab 1265 site=$ac_optarg ;;
3ace7edb 1266
c906108c
SS
1267 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1268 ac_prev=srcdir ;;
1269 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1270 srcdir=$ac_optarg ;;
c906108c
SS
1271
1272 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1273 | --syscon | --sysco | --sysc | --sys | --sy)
1274 ac_prev=sysconfdir ;;
1275 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1276 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1277 sysconfdir=$ac_optarg ;;
c906108c
SS
1278
1279 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1280 ac_prev=target_alias ;;
c906108c 1281 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1282 target_alias=$ac_optarg ;;
c906108c
SS
1283
1284 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1285 verbose=yes ;;
1286
bec39cab
AC
1287 -version | --version | --versio | --versi | --vers | -V)
1288 ac_init_version=: ;;
c906108c
SS
1289
1290 -with-* | --with-*)
81ecdfbb 1291 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1292 # Reject names that are not valid shell variable names.
81ecdfbb 1293 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1294 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1295 ac_useropt_orig=$ac_useropt
1296 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1297 case $ac_user_opts in
1298 *"
1299"with_$ac_useropt"
1300"*) ;;
1301 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1302 ac_unrecognized_sep=', ';;
b4e70030 1303 esac
81ecdfbb 1304 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1305
1306 -without-* | --without-*)
81ecdfbb 1307 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1308 # Reject names that are not valid shell variable names.
81ecdfbb 1309 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1310 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1311 ac_useropt_orig=$ac_useropt
1312 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1313 case $ac_user_opts in
1314 *"
1315"with_$ac_useropt"
1316"*) ;;
1317 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1318 ac_unrecognized_sep=', ';;
1319 esac
1320 eval with_$ac_useropt=no ;;
c906108c
SS
1321
1322 --x)
1323 # Obsolete; use --with-x.
1324 with_x=yes ;;
1325
1326 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1327 | --x-incl | --x-inc | --x-in | --x-i)
1328 ac_prev=x_includes ;;
1329 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1330 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1331 x_includes=$ac_optarg ;;
c906108c
SS
1332
1333 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1334 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1335 ac_prev=x_libraries ;;
1336 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1337 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1338 x_libraries=$ac_optarg ;;
c906108c 1339
d0ac1c44
SM
1340 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1341Try \`$0 --help' for more information"
c906108c
SS
1342 ;;
1343
bec39cab
AC
1344 *=*)
1345 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1346 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1347 case $ac_envvar in #(
1348 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1349 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1350 esac
1351 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1352 export $ac_envvar ;;
1353
c906108c 1354 *)
bec39cab 1355 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1356 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1357 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1358 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1359 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1360 ;;
1361
1362 esac
1363done
1364
1365if test -n "$ac_prev"; then
bec39cab 1366 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1367 as_fn_error $? "missing argument to $ac_option"
c906108c 1368fi
c906108c 1369
81ecdfbb
RW
1370if test -n "$ac_unrecognized_opts"; then
1371 case $enable_option_checking in
1372 no) ;;
d0ac1c44 1373 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1374 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1375 esac
81ecdfbb 1376fi
b4e70030 1377
81ecdfbb
RW
1378# Check all directory arguments for consistency.
1379for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1380 datadir sysconfdir sharedstatedir localstatedir includedir \
1381 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1382 libdir localedir mandir
b4e70030 1383do
81ecdfbb
RW
1384 eval ac_val=\$$ac_var
1385 # Remove trailing slashes.
1386 case $ac_val in
1387 */ )
1388 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1389 eval $ac_var=\$ac_val;;
1390 esac
1391 # Be sure to have absolute directory names.
b4e70030 1392 case $ac_val in
81ecdfbb
RW
1393 [\\/$]* | ?:[\\/]* ) continue;;
1394 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1395 esac
d0ac1c44 1396 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1397done
1398
bec39cab
AC
1399# There might be people who depend on the old broken behavior: `$host'
1400# used to hold the argument of --host etc.
1401# FIXME: To remove some day.
1402build=$build_alias
1403host=$host_alias
1404target=$target_alias
1405
1406# FIXME: To remove some day.
1407if test "x$host_alias" != x; then
1408 if test "x$build_alias" = x; then
1409 cross_compiling=maybe
bec39cab
AC
1410 elif test "x$build_alias" != "x$host_alias"; then
1411 cross_compiling=yes
1412 fi
1413fi
c906108c 1414
bec39cab
AC
1415ac_tool_prefix=
1416test -n "$host_alias" && ac_tool_prefix=$host_alias-
1417
1418test "$silent" = yes && exec 6>/dev/null
c906108c 1419
c906108c 1420
81ecdfbb
RW
1421ac_pwd=`pwd` && test -n "$ac_pwd" &&
1422ac_ls_di=`ls -di .` &&
1423ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1424 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1425test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1426 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1427
1428
c906108c
SS
1429# Find the source files, if location was not specified.
1430if test -z "$srcdir"; then
1431 ac_srcdir_defaulted=yes
81ecdfbb
RW
1432 # Try the directory containing this script, then the parent directory.
1433 ac_confdir=`$as_dirname -- "$as_myself" ||
1434$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1435 X"$as_myself" : 'X\(//\)[^/]' \| \
1436 X"$as_myself" : 'X\(//\)$' \| \
1437 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1438$as_echo X"$as_myself" |
1439 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1440 s//\1/
1441 q
1442 }
1443 /^X\(\/\/\)[^/].*/{
1444 s//\1/
1445 q
1446 }
1447 /^X\(\/\/\)$/{
1448 s//\1/
1449 q
1450 }
1451 /^X\(\/\).*/{
1452 s//\1/
1453 q
1454 }
1455 s/.*/./; q'`
c906108c 1456 srcdir=$ac_confdir
81ecdfbb 1457 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1458 srcdir=..
1459 fi
1460else
1461 ac_srcdir_defaulted=no
1462fi
81ecdfbb
RW
1463if test ! -r "$srcdir/$ac_unique_file"; then
1464 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1465 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1466fi
1467ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1468ac_abs_confdir=`(
d0ac1c44 1469 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1470 pwd)`
1471# When building in place, set srcdir=.
1472if test "$ac_abs_confdir" = "$ac_pwd"; then
1473 srcdir=.
1474fi
1475# Remove unnecessary trailing slashes from srcdir.
1476# Double slashes in file names in object file debugging info
1477# mess up M-x gdb in Emacs.
1478case $srcdir in
1479*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1480esac
1481for ac_var in $ac_precious_vars; do
1482 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1483 eval ac_env_${ac_var}_value=\$${ac_var}
1484 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1485 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1486done
c906108c 1487
bec39cab
AC
1488#
1489# Report the --help message.
1490#
1491if test "$ac_init_help" = "long"; then
1492 # Omit some internal or obsolete options to make the list less imposing.
1493 # This message is too long to be a string in the A/UX 3.1 sh.
1494 cat <<_ACEOF
1495\`configure' configures this package to adapt to many kinds of systems.
1496
1497Usage: $0 [OPTION]... [VAR=VALUE]...
1498
1499To assign environment variables (e.g., CC, CFLAGS...), specify them as
1500VAR=VALUE. See below for descriptions of some of the useful variables.
1501
1502Defaults for the options are specified in brackets.
1503
1504Configuration:
1505 -h, --help display this help and exit
1506 --help=short display options specific to this package
1507 --help=recursive display the short help of all the included packages
1508 -V, --version display version information and exit
d0ac1c44 1509 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1510 --cache-file=FILE cache test results in FILE [disabled]
1511 -C, --config-cache alias for \`--cache-file=config.cache'
1512 -n, --no-create do not create output files
1513 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1514
bec39cab
AC
1515Installation directories:
1516 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1517 [$ac_default_prefix]
bec39cab 1518 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1519 [PREFIX]
bec39cab
AC
1520
1521By default, \`make install' will install all the files in
1522\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1523an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1524for instance \`--prefix=\$HOME'.
1525
1526For better control, use the options below.
1527
1528Fine tuning of the installation directories:
81ecdfbb
RW
1529 --bindir=DIR user executables [EPREFIX/bin]
1530 --sbindir=DIR system admin executables [EPREFIX/sbin]
1531 --libexecdir=DIR program executables [EPREFIX/libexec]
1532 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1533 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1534 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1535 --libdir=DIR object code libraries [EPREFIX/lib]
1536 --includedir=DIR C header files [PREFIX/include]
1537 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1538 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1539 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1540 --infodir=DIR info documentation [DATAROOTDIR/info]
1541 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1542 --mandir=DIR man documentation [DATAROOTDIR/man]
1543 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1544 --htmldir=DIR html documentation [DOCDIR]
1545 --dvidir=DIR dvi documentation [DOCDIR]
1546 --pdfdir=DIR pdf documentation [DOCDIR]
1547 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1548_ACEOF
1549
1550 cat <<\_ACEOF
1551
9009e1ae
MR
1552Program names:
1553 --program-prefix=PREFIX prepend PREFIX to installed program names
1554 --program-suffix=SUFFIX append SUFFIX to installed program names
1555 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1556
bec39cab
AC
1557X features:
1558 --x-includes=DIR X include files are in DIR
1559 --x-libraries=DIR X library files are in DIR
1560
1561System types:
1562 --build=BUILD configure for building on BUILD [guessed]
1563 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1564 --target=TARGET configure for building compilers for TARGET [HOST]
1565_ACEOF
1566fi
1567
1568if test -n "$ac_init_help"; then
1569
1570 cat <<\_ACEOF
1571
1572Optional Features:
81ecdfbb 1573 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1574 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1575 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1576 --enable-maintainer-mode
1577 enable make rules and dependencies not useful (and
1578 sometimes confusing) to the casual installer
2974be62 1579 --enable-plugins Enable support for plugins
da2f07f1 1580 --disable-largefile omit support for large files
a1220294
TT
1581 --enable-targets=TARGETS
1582 alternative target configurations
c0993dbe 1583 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1584 --disable-gdbmi disable machine-interface (MI)
1585 --enable-tui enable full-screen terminal user interface (TUI)
1586 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1587 --enable-profiling enable profiling of GDB
44cee4fd 1588 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1589 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1590 --enable-source-highlight
1591 enable source-highlight for source listings
a1220294 1592 --enable-werror treat compile warnings as errors
32c1c914 1593 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1594 --enable-gdb-build-warnings
32c1c914 1595 enable GDB specific build-time compiler warnings if
a1220294 1596 gcc is used
f35d5ade 1597 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1598 --enable-sim link gdb with simulator
1776e3e5 1599 --enable-libctf Handle .ctf type-info sections [default=yes]
8ecfd7bd
SDJ
1600 --enable-unit-tests Enable the inclusion of unit tests when compiling
1601 GDB
bec39cab
AC
1602
1603Optional Packages:
1604 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1605 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1606 --with-separate-debug-dir=PATH
32c1c914 1607 look for global separate debug info in this path
62e4f60c 1608 [LIBDIR/debug]
b14b1491
TT
1609 --with-gdb-datadir=PATH look for global separate data files in this path
1610 [DATADIR/gdb]
29b0e8a2 1611 --with-relocated-sources=PATH
32c1c914 1612 automatically relocate this path for source files
7349ff92 1613 --with-auto-load-dir=PATH
aff139ff 1614 directories from which to load auto-loaded scripts
1564a261 1615 [$debugdir:$datadir/auto-load]
bccbefd2 1616 --with-auto-load-safe-path=PATH
aff139ff 1617 directories safe to hold auto-loaded files
7349ff92 1618 [--with-auto-load-dir]
bccbefd2
JK
1619 --without-auto-load-safe-path
1620 do not restrict auto-loaded files locations
0d79cdc4
AM
1621 --with-debuginfod Enable debuginfo lookups with debuginfod
1622 (auto/yes/no)
05e7c244 1623 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1624 --with-curses use the curses library instead of the termcap
1625 library
c16158bc
JM
1626 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1627 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1628 --with-system-zlib use installed libz
016a3251
DD
1629 --with-gnu-ld assume the C compiler uses GNU ld default=no
1630 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1631 --without-libiconv-prefix don't search for libiconv in includedir and libdir
9f1528a1 1632 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
478aac75 1633 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1634 --with-system-readline use installed readline library
b8e0a31c
SD
1635 --with-jit-reader-dir=PATH
1636 directory to load the JIT readers from
5c39566f 1637 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1638 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1639 --without-libexpat-prefix don't search for libexpat in includedir and libdir
9f1528a1 1640 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
2400729e
UW
1641 --with-mpfr include MPFR support (auto/yes/no)
1642 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1643 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
9f1528a1 1644 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
0c4a4063
DE
1645 --with-python[=PYTHON] include python support
1646 (auto/yes/no/<python-program>)
d13c7322
AB
1647 --with-python-libdir[=DIR]
1648 search for python's libraries in DIR
ed3ef339
DE
1649 --with-guile[=GUILE] include guile support
1650 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1651 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1652 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1653 --without-libipt-prefix don't search for libipt in includedir and libdir
9f1528a1 1654 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
a1220294
TT
1655 --without-included-regex
1656 don't use included regex; this is the default on
1657 systems with version 2 of the GNU C library (use
1658 with caution on other system)
81ecdfbb 1659 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1660 --with-system-gdbinit=PATH
32c1c914 1661 automatically load a system-wide gdbinit file
ed2a2229
CB
1662 --with-system-gdbinit-dir=PATH
1663 automatically load system-wide gdbinit files from
1664 this directory
608e2dbb
TT
1665 --with-lzma support lzma compression (auto/yes/no)
1666 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1667 --without-liblzma-prefix don't search for liblzma in includedir and libdir
9f1528a1 1668 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
5062cc19
KS
1669 --with-tcl directory containing tcl configuration (tclConfig.sh)
1670 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1671 --with-x use the X Window System
393fd4c3
YQ
1672 --with-babeltrace include babeltrace support (auto/yes/no)
1673 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1674 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
9f1528a1 1675 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
ccb1ba62
CB
1676 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1677 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1678 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
9f1528a1 1679 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
bec39cab
AC
1680
1681Some influential environment variables:
1682 CC C compiler command
1683 CFLAGS C compiler flags
1684 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1685 nonstandard directory <lib dir>
81ecdfbb 1686 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1687 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1688 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1689 CXX C++ compiler command
1690 CXXFLAGS C++ compiler flags
bec39cab 1691 CPP C preprocessor
f06e05e0
JK
1692 MAKEINFO Parent configure detects if it is of sufficient version.
1693 MAKEINFOFLAGS
1694 Parameters for MAKEINFO.
f6720b1c
AM
1695 PKG_CONFIG path to pkg-config utility
1696 PKG_CONFIG_PATH
1697 directories to add to pkg-config's search path
1698 PKG_CONFIG_LIBDIR
1699 path overriding pkg-config's built-in search path
1700 DEBUGINFOD_CFLAGS
1701 C compiler flags for DEBUGINFOD, overriding pkg-config
1702 DEBUGINFOD_LIBS
1703 linker flags for DEBUGINFOD, overriding pkg-config
d0ac1c44
SM
1704 YACC The `Yet Another Compiler Compiler' implementation to use.
1705 Defaults to the first program found out of: `bison -y', `byacc',
1706 `yacc'.
81ecdfbb
RW
1707 YFLAGS The list of arguments that will be passed by default to $YACC.
1708 This script will default YFLAGS to the empty string to avoid a
1709 default value of `-d' given by some make applications.
1710 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1711
1712Use these variables to override the choices made by `configure' or to help
1713it to find libraries and programs with nonstandard names/locations.
1714
81ecdfbb 1715Report bugs to the package provider.
bec39cab 1716_ACEOF
81ecdfbb 1717ac_status=$?
bec39cab
AC
1718fi
1719
1720if test "$ac_init_help" = "recursive"; then
1721 # If there are subdirs, report their specific --help.
bec39cab 1722 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1723 test -d "$ac_dir" ||
1724 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1725 continue
bec39cab
AC
1726 ac_builddir=.
1727
81ecdfbb
RW
1728case "$ac_dir" in
1729.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1730*)
1731 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1732 # A ".." for each directory in $ac_dir_suffix.
1733 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1734 case $ac_top_builddir_sub in
1735 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1736 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1737 esac ;;
1738esac
1739ac_abs_top_builddir=$ac_pwd
1740ac_abs_builddir=$ac_pwd$ac_dir_suffix
1741# for backward compatibility:
1742ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1743
1744case $srcdir in
81ecdfbb 1745 .) # We are building in place.
bec39cab 1746 ac_srcdir=.
81ecdfbb
RW
1747 ac_top_srcdir=$ac_top_builddir_sub
1748 ac_abs_top_srcdir=$ac_pwd ;;
1749 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1750 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1751 ac_top_srcdir=$srcdir
1752 ac_abs_top_srcdir=$srcdir ;;
1753 *) # Relative name.
1754 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1755 ac_top_srcdir=$ac_top_build_prefix$srcdir
1756 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1757esac
81ecdfbb 1758ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1759
81ecdfbb
RW
1760 cd "$ac_dir" || { ac_status=$?; continue; }
1761 # Check for guested configure.
1762 if test -f "$ac_srcdir/configure.gnu"; then
1763 echo &&
1764 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1765 elif test -f "$ac_srcdir/configure"; then
1766 echo &&
1767 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1768 else
81ecdfbb
RW
1769 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1770 fi || ac_status=$?
1771 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1772 done
1773fi
1774
81ecdfbb 1775test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1776if $ac_init_version; then
1777 cat <<\_ACEOF
81ecdfbb 1778configure
d0ac1c44 1779generated by GNU Autoconf 2.69
bec39cab 1780
d0ac1c44 1781Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1782This configure script is free software; the Free Software Foundation
1783gives unlimited permission to copy, distribute and modify it.
1784_ACEOF
81ecdfbb 1785 exit
bec39cab 1786fi
bec39cab 1787
81ecdfbb
RW
1788## ------------------------ ##
1789## Autoconf initialization. ##
1790## ------------------------ ##
bec39cab 1791
81ecdfbb
RW
1792# ac_fn_c_try_compile LINENO
1793# --------------------------
1794# Try to compile conftest.$ac_ext, and return whether this succeeded.
1795ac_fn_c_try_compile ()
1796{
1797 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1798 rm -f conftest.$ac_objext
1799 if { { ac_try="$ac_compile"
1800case "(($ac_try" in
1801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1802 *) ac_try_echo=$ac_try;;
1803esac
1804eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1805$as_echo "$ac_try_echo"; } >&5
1806 (eval "$ac_compile") 2>conftest.err
1807 ac_status=$?
1808 if test -s conftest.err; then
1809 grep -v '^ *+' conftest.err >conftest.er1
1810 cat conftest.er1 >&5
1811 mv -f conftest.er1 conftest.err
1812 fi
1813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1814 test $ac_status = 0; } && {
1815 test -z "$ac_c_werror_flag" ||
1816 test ! -s conftest.err
1817 } && test -s conftest.$ac_objext; then :
1818 ac_retval=0
1819else
1820 $as_echo "$as_me: failed program was:" >&5
1821sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1822
81ecdfbb
RW
1823 ac_retval=1
1824fi
d0ac1c44
SM
1825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1826 as_fn_set_status $ac_retval
81ecdfbb
RW
1827
1828} # ac_fn_c_try_compile
1829
3bc3d82a
PA
1830# ac_fn_cxx_try_compile LINENO
1831# ----------------------------
1832# Try to compile conftest.$ac_ext, and return whether this succeeded.
1833ac_fn_cxx_try_compile ()
1834{
1835 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836 rm -f conftest.$ac_objext
1837 if { { ac_try="$ac_compile"
1838case "(($ac_try" in
1839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1840 *) ac_try_echo=$ac_try;;
1841esac
1842eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1843$as_echo "$ac_try_echo"; } >&5
1844 (eval "$ac_compile") 2>conftest.err
1845 ac_status=$?
1846 if test -s conftest.err; then
1847 grep -v '^ *+' conftest.err >conftest.er1
1848 cat conftest.er1 >&5
1849 mv -f conftest.er1 conftest.err
1850 fi
1851 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1852 test $ac_status = 0; } && {
1853 test -z "$ac_cxx_werror_flag" ||
1854 test ! -s conftest.err
1855 } && test -s conftest.$ac_objext; then :
1856 ac_retval=0
1857else
1858 $as_echo "$as_me: failed program was:" >&5
1859sed 's/^/| /' conftest.$ac_ext >&5
1860
1861 ac_retval=1
1862fi
d0ac1c44
SM
1863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1864 as_fn_set_status $ac_retval
3bc3d82a
PA
1865
1866} # ac_fn_cxx_try_compile
1867
81ecdfbb
RW
1868# ac_fn_c_try_cpp LINENO
1869# ----------------------
1870# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1871ac_fn_c_try_cpp ()
bec39cab 1872{
81ecdfbb
RW
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 if { { ac_try="$ac_cpp conftest.$ac_ext"
1875case "(($ac_try" in
1876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1877 *) ac_try_echo=$ac_try;;
1878esac
1879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1880$as_echo "$ac_try_echo"; } >&5
1881 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1882 ac_status=$?
1883 if test -s conftest.err; then
1884 grep -v '^ *+' conftest.err >conftest.er1
1885 cat conftest.er1 >&5
1886 mv -f conftest.er1 conftest.err
1887 fi
1888 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1889 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1890 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1891 test ! -s conftest.err
1892 }; then :
1893 ac_retval=0
1894else
1895 $as_echo "$as_me: failed program was:" >&5
1896sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1897
81ecdfbb
RW
1898 ac_retval=1
1899fi
d0ac1c44
SM
1900 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1901 as_fn_set_status $ac_retval
bec39cab 1902
81ecdfbb 1903} # ac_fn_c_try_cpp
bec39cab 1904
81ecdfbb
RW
1905# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1906# -------------------------------------------------------
1907# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1908# the include files in INCLUDES and setting the cache variable VAR
1909# accordingly.
1910ac_fn_c_check_header_mongrel ()
1911{
1912 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1913 if eval \${$3+:} false; then :
81ecdfbb
RW
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1916if eval \${$3+:} false; then :
81ecdfbb
RW
1917 $as_echo_n "(cached) " >&6
1918fi
1919eval ac_res=\$$3
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1921$as_echo "$ac_res" >&6; }
1922else
1923 # Is the header compilable?
1924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1925$as_echo_n "checking $2 usability... " >&6; }
1926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1927/* end confdefs.h. */
1928$4
1929#include <$2>
1930_ACEOF
1931if ac_fn_c_try_compile "$LINENO"; then :
1932 ac_header_compiler=yes
1933else
1934 ac_header_compiler=no
1935fi
1936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1938$as_echo "$ac_header_compiler" >&6; }
bec39cab 1939
81ecdfbb
RW
1940# Is the header present?
1941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1942$as_echo_n "checking $2 presence... " >&6; }
1943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945#include <$2>
1946_ACEOF
1947if ac_fn_c_try_cpp "$LINENO"; then :
1948 ac_header_preproc=yes
1949else
1950 ac_header_preproc=no
1951fi
d0ac1c44 1952rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1954$as_echo "$ac_header_preproc" >&6; }
bec39cab 1955
81ecdfbb
RW
1956# So? What about this header?
1957case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1958 yes:no: )
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1960$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1961 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1962$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1963 ;;
1964 no:yes:* )
1965 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1966$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1967 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1968$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1970$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1972$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1974$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1975 ;;
1976esac
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1978$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1979if eval \${$3+:} false; then :
81ecdfbb
RW
1980 $as_echo_n "(cached) " >&6
1981else
1982 eval "$3=\$ac_header_compiler"
1983fi
1984eval ac_res=\$$3
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1986$as_echo "$ac_res" >&6; }
1987fi
d0ac1c44 1988 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1989
81ecdfbb 1990} # ac_fn_c_check_header_mongrel
bec39cab 1991
81ecdfbb
RW
1992# ac_fn_c_try_run LINENO
1993# ----------------------
1994# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1995# that executables *can* be run.
1996ac_fn_c_try_run ()
1997{
1998 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1999 if { { ac_try="$ac_link"
2000case "(($ac_try" in
2001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2002 *) ac_try_echo=$ac_try;;
2003esac
2004eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2005$as_echo "$ac_try_echo"; } >&5
2006 (eval "$ac_link") 2>&5
2007 ac_status=$?
2008 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2009 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2010 { { case "(($ac_try" in
2011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2012 *) ac_try_echo=$ac_try;;
2013esac
2014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2015$as_echo "$ac_try_echo"; } >&5
2016 (eval "$ac_try") 2>&5
2017 ac_status=$?
2018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2019 test $ac_status = 0; }; }; then :
2020 ac_retval=0
2021else
2022 $as_echo "$as_me: program exited with status $ac_status" >&5
2023 $as_echo "$as_me: failed program was:" >&5
2024sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2025
81ecdfbb
RW
2026 ac_retval=$ac_status
2027fi
2028 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2029 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2030 as_fn_set_status $ac_retval
bec39cab 2031
81ecdfbb 2032} # ac_fn_c_try_run
bec39cab 2033
81ecdfbb
RW
2034# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2035# -------------------------------------------------------
2036# Tests whether HEADER exists and can be compiled using the include files in
2037# INCLUDES, setting the cache variable VAR accordingly.
2038ac_fn_c_check_header_compile ()
2039{
2040 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2042$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2043if eval \${$3+:} false; then :
81ecdfbb
RW
2044 $as_echo_n "(cached) " >&6
2045else
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$4
2049#include <$2>
bec39cab 2050_ACEOF
81ecdfbb
RW
2051if ac_fn_c_try_compile "$LINENO"; then :
2052 eval "$3=yes"
2053else
2054 eval "$3=no"
2055fi
2056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2057fi
2058eval ac_res=\$$3
2059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2060$as_echo "$ac_res" >&6; }
d0ac1c44 2061 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2062
81ecdfbb 2063} # ac_fn_c_check_header_compile
bec39cab 2064
2974be62
AM
2065# ac_fn_c_try_link LINENO
2066# -----------------------
2067# Try to link conftest.$ac_ext, and return whether this succeeded.
2068ac_fn_c_try_link ()
2069{
2070 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2071 rm -f conftest.$ac_objext conftest$ac_exeext
2072 if { { ac_try="$ac_link"
2073case "(($ac_try" in
2074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2075 *) ac_try_echo=$ac_try;;
2076esac
2077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2078$as_echo "$ac_try_echo"; } >&5
2079 (eval "$ac_link") 2>conftest.err
2080 ac_status=$?
2081 if test -s conftest.err; then
2082 grep -v '^ *+' conftest.err >conftest.er1
2083 cat conftest.er1 >&5
2084 mv -f conftest.er1 conftest.err
2085 fi
2086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2087 test $ac_status = 0; } && {
2088 test -z "$ac_c_werror_flag" ||
2089 test ! -s conftest.err
2090 } && test -s conftest$ac_exeext && {
2091 test "$cross_compiling" = yes ||
d0ac1c44 2092 test -x conftest$ac_exeext
2974be62
AM
2093 }; then :
2094 ac_retval=0
2095else
2096 $as_echo "$as_me: failed program was:" >&5
2097sed 's/^/| /' conftest.$ac_ext >&5
2098
2099 ac_retval=1
2100fi
2101 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2102 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2103 # interfere with the next link command; also delete a directory that is
2104 # left behind by Apple's compiler. We do this before executing the actions.
2105 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2106 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2107 as_fn_set_status $ac_retval
2974be62
AM
2108
2109} # ac_fn_c_try_link
2110
81ecdfbb
RW
2111# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2112# --------------------------------------------
2113# Tries to find the compile-time value of EXPR in a program that includes
2114# INCLUDES, setting VAR accordingly. Returns whether the value could be
2115# computed
2116ac_fn_c_compute_int ()
2117{
2118 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2119 if test "$cross_compiling" = yes; then
2120 # Depending upon the size, compute the lo and hi bounds.
2121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124int
2125main ()
2126{
2127static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2128test_array [0] = 0;
2129return test_array [0];
bec39cab 2130
81ecdfbb
RW
2131 ;
2132 return 0;
2133}
2134_ACEOF
2135if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_lo=0 ac_mid=0
2137 while :; do
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h. */
2140$4
2141int
2142main ()
2143{
2144static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2145test_array [0] = 0;
2146return test_array [0];
bec39cab 2147
81ecdfbb
RW
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_compile "$LINENO"; then :
2153 ac_hi=$ac_mid; break
2154else
2155 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2156 if test $ac_lo -le $ac_mid; then
2157 ac_lo= ac_hi=
2158 break
2159 fi
2160 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2161fi
81ecdfbb
RW
2162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163 done
c906108c 2164else
81ecdfbb
RW
2165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2166/* end confdefs.h. */
2167$4
2168int
2169main ()
2170{
2171static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2172test_array [0] = 0;
2173return test_array [0];
bec39cab 2174
81ecdfbb
RW
2175 ;
2176 return 0;
2177}
2178_ACEOF
2179if ac_fn_c_try_compile "$LINENO"; then :
2180 ac_hi=-1 ac_mid=-1
2181 while :; do
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_lo=$ac_mid; break
2198else
2199 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2200 if test $ac_mid -le $ac_hi; then
2201 ac_lo= ac_hi=
2202 break
2203 fi
2204 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2205fi
2206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2207 done
2208else
2209 ac_lo= ac_hi=
2210fi
2211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2212fi
2213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2214# Binary search between lo and hi bounds.
2215while test "x$ac_lo" != "x$ac_hi"; do
2216 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218/* end confdefs.h. */
2219$4
2220int
2221main ()
2222{
2223static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2224test_array [0] = 0;
2225return test_array [0];
bec39cab 2226
81ecdfbb
RW
2227 ;
2228 return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_compile "$LINENO"; then :
2232 ac_hi=$ac_mid
2233else
2234 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2235fi
2236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2237done
2238case $ac_lo in #((
2239?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2240'') ac_retval=1 ;;
2241esac
2242 else
2243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244/* end confdefs.h. */
2245$4
2246static long int longval () { return $2; }
2247static unsigned long int ulongval () { return $2; }
2248#include <stdio.h>
2249#include <stdlib.h>
2250int
2251main ()
2252{
bec39cab 2253
81ecdfbb
RW
2254 FILE *f = fopen ("conftest.val", "w");
2255 if (! f)
2256 return 1;
2257 if (($2) < 0)
2258 {
2259 long int i = longval ();
2260 if (i != ($2))
2261 return 1;
2262 fprintf (f, "%ld", i);
2263 }
2264 else
2265 {
2266 unsigned long int i = ulongval ();
2267 if (i != ($2))
2268 return 1;
2269 fprintf (f, "%lu", i);
2270 }
2271 /* Do not output a trailing newline, as this causes \r\n confusion
2272 on some platforms. */
2273 return ferror (f) || fclose (f) != 0;
bec39cab 2274
81ecdfbb
RW
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_run "$LINENO"; then :
2280 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2281else
2282 ac_retval=1
2283fi
2284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2285 conftest.$ac_objext conftest.beam conftest.$ac_ext
2286rm -f conftest.val
bec39cab 2287
81ecdfbb 2288 fi
d0ac1c44
SM
2289 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290 as_fn_set_status $ac_retval
bec39cab 2291
81ecdfbb 2292} # ac_fn_c_compute_int
bec39cab 2293
55a8c076
YQ
2294# ac_fn_c_check_func LINENO FUNC VAR
2295# ----------------------------------
2296# Tests whether FUNC exists, setting the cache variable VAR accordingly
2297ac_fn_c_check_func ()
81ecdfbb
RW
2298{
2299 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2301$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2302if eval \${$3+:} false; then :
81ecdfbb
RW
2303 $as_echo_n "(cached) " >&6
2304else
81ecdfbb
RW
2305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306/* end confdefs.h. */
55a8c076
YQ
2307/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2308 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2309#define $2 innocuous_$2
2310
2311/* System header to define __stub macros and hopefully few prototypes,
2312 which can conflict with char $2 (); below.
2313 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2314 <limits.h> exists even on freestanding compilers. */
2315
2316#ifdef __STDC__
2317# include <limits.h>
2318#else
2319# include <assert.h>
2320#endif
2321
2322#undef $2
2323
2324/* Override any GCC internal prototype to avoid an error.
2325 Use char because int might match the return type of a GCC
2326 builtin and then its argument prototype would still apply. */
2327#ifdef __cplusplus
2328extern "C"
2329#endif
2330char $2 ();
2331/* The GNU C library defines this for functions which it implements
2332 to always fail with ENOSYS. Some functions are actually named
2333 something starting with __ and the normal name is an alias. */
2334#if defined __stub_$2 || defined __stub___$2
2335choke me
2336#endif
2337
2338int
2339main ()
2340{
2341return $2 ();
2342 ;
2343 return 0;
2344}
2345_ACEOF
2346if ac_fn_c_try_link "$LINENO"; then :
2347 eval "$3=yes"
2348else
2349 eval "$3=no"
2350fi
2351rm -f core conftest.err conftest.$ac_objext \
2352 conftest$ac_exeext conftest.$ac_ext
2353fi
2354eval ac_res=\$$3
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2356$as_echo "$ac_res" >&6; }
d0ac1c44 2357 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2358
2359} # ac_fn_c_check_func
2360
07697489
PA
2361# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2362# -------------------------------------------
2363# Tests whether TYPE exists after having included INCLUDES, setting cache
2364# variable VAR accordingly.
2365ac_fn_c_check_type ()
2366{
2367 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2369$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2370if eval \${$3+:} false; then :
07697489
PA
2371 $as_echo_n "(cached) " >&6
2372else
2373 eval "$3=no"
2374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2375/* end confdefs.h. */
2376$4
2377int
2378main ()
2379{
2380if (sizeof ($2))
2381 return 0;
2382 ;
2383 return 0;
2384}
2385_ACEOF
2386if ac_fn_c_try_compile "$LINENO"; then :
2387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2388/* end confdefs.h. */
2389$4
2390int
2391main ()
2392{
2393if (sizeof (($2)))
2394 return 0;
2395 ;
2396 return 0;
2397}
2398_ACEOF
2399if ac_fn_c_try_compile "$LINENO"; then :
2400
2401else
2402 eval "$3=yes"
2403fi
2404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405fi
2406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2407fi
2408eval ac_res=\$$3
2409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2410$as_echo "$ac_res" >&6; }
d0ac1c44 2411 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2412
2413} # ac_fn_c_check_type
2414
f6720b1c
AM
2415# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2416# ---------------------------------------------
2417# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2418# accordingly.
2419ac_fn_c_check_decl ()
2420{
2421 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422 as_decl_name=`echo $2|sed 's/ *(.*//'`
2423 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2425$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2426if eval \${$3+:} false; then :
2427 $as_echo_n "(cached) " >&6
2428else
2429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2430/* end confdefs.h. */
2431$4
2432int
2433main ()
2434{
2435#ifndef $as_decl_name
2436#ifdef __cplusplus
2437 (void) $as_decl_use;
2438#else
2439 (void) $as_decl_name;
2440#endif
2441#endif
2442
2443 ;
2444 return 0;
2445}
2446_ACEOF
2447if ac_fn_c_try_compile "$LINENO"; then :
2448 eval "$3=yes"
2449else
2450 eval "$3=no"
2451fi
2452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2453fi
2454eval ac_res=\$$3
2455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2456$as_echo "$ac_res" >&6; }
2457 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2458
2459} # ac_fn_c_check_decl
2460
05ea2a05
TT
2461# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2462# ----------------------------------------------------
2463# Tries to find if the field MEMBER exists in type AGGR, after including
2464# INCLUDES, setting cache variable VAR accordingly.
2465ac_fn_c_check_member ()
2466{
2467 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2469$as_echo_n "checking for $2.$3... " >&6; }
2470if eval \${$4+:} false; then :
2471 $as_echo_n "(cached) " >&6
2472else
2473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2474/* end confdefs.h. */
2475$5
2476int
2477main ()
2478{
2479static $2 ac_aggr;
2480if (ac_aggr.$3)
2481return 0;
2482 ;
2483 return 0;
2484}
2485_ACEOF
2486if ac_fn_c_try_compile "$LINENO"; then :
2487 eval "$4=yes"
2488else
2489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2490/* end confdefs.h. */
2491$5
2492int
2493main ()
2494{
2495static $2 ac_aggr;
2496if (sizeof ac_aggr.$3)
2497return 0;
2498 ;
2499 return 0;
2500}
2501_ACEOF
2502if ac_fn_c_try_compile "$LINENO"; then :
2503 eval "$4=yes"
2504else
2505 eval "$4=no"
2506fi
2507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2508fi
2509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2510fi
2511eval ac_res=\$$4
2512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2513$as_echo "$ac_res" >&6; }
2514 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2515
2516} # ac_fn_c_check_member
2517
f35d5ade
TT
2518# ac_fn_cxx_try_link LINENO
2519# -------------------------
2520# Try to link conftest.$ac_ext, and return whether this succeeded.
2521ac_fn_cxx_try_link ()
2522{
2523 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2524 rm -f conftest.$ac_objext conftest$ac_exeext
2525 if { { ac_try="$ac_link"
2526case "(($ac_try" in
2527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2528 *) ac_try_echo=$ac_try;;
2529esac
2530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2531$as_echo "$ac_try_echo"; } >&5
2532 (eval "$ac_link") 2>conftest.err
2533 ac_status=$?
2534 if test -s conftest.err; then
2535 grep -v '^ *+' conftest.err >conftest.er1
2536 cat conftest.er1 >&5
2537 mv -f conftest.er1 conftest.err
2538 fi
2539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2540 test $ac_status = 0; } && {
2541 test -z "$ac_cxx_werror_flag" ||
2542 test ! -s conftest.err
2543 } && test -s conftest$ac_exeext && {
2544 test "$cross_compiling" = yes ||
2545 test -x conftest$ac_exeext
2546 }; then :
2547 ac_retval=0
2548else
2549 $as_echo "$as_me: failed program was:" >&5
2550sed 's/^/| /' conftest.$ac_ext >&5
2551
2552 ac_retval=1
2553fi
2554 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2555 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2556 # interfere with the next link command; also delete a directory that is
2557 # left behind by Apple's compiler. We do this before executing the actions.
2558 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2559 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2560 as_fn_set_status $ac_retval
2561
2562} # ac_fn_cxx_try_link
21987b9c
TT
2563
2564# ac_fn_cxx_check_func LINENO FUNC VAR
2565# ------------------------------------
2566# Tests whether FUNC exists, setting the cache variable VAR accordingly
2567ac_fn_cxx_check_func ()
2568{
2569 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2571$as_echo_n "checking for $2... " >&6; }
2572if eval \${$3+:} false; then :
2573 $as_echo_n "(cached) " >&6
2574else
2575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2576/* end confdefs.h. */
2577/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2578 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2579#define $2 innocuous_$2
2580
2581/* System header to define __stub macros and hopefully few prototypes,
2582 which can conflict with char $2 (); below.
2583 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2584 <limits.h> exists even on freestanding compilers. */
2585
2586#ifdef __STDC__
2587# include <limits.h>
2588#else
2589# include <assert.h>
2590#endif
2591
2592#undef $2
2593
2594/* Override any GCC internal prototype to avoid an error.
2595 Use char because int might match the return type of a GCC
2596 builtin and then its argument prototype would still apply. */
2597#ifdef __cplusplus
2598extern "C"
2599#endif
2600char $2 ();
2601/* The GNU C library defines this for functions which it implements
2602 to always fail with ENOSYS. Some functions are actually named
2603 something starting with __ and the normal name is an alias. */
2604#if defined __stub_$2 || defined __stub___$2
2605choke me
2606#endif
2607
2608int
2609main ()
2610{
2611return $2 ();
2612 ;
2613 return 0;
2614}
2615_ACEOF
2616if ac_fn_cxx_try_link "$LINENO"; then :
2617 eval "$3=yes"
2618else
2619 eval "$3=no"
2620fi
2621rm -f core conftest.err conftest.$ac_objext \
2622 conftest$ac_exeext conftest.$ac_ext
2623fi
2624eval ac_res=\$$3
2625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2626$as_echo "$ac_res" >&6; }
2627 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2628
2629} # ac_fn_cxx_check_func
81ecdfbb
RW
2630cat >config.log <<_ACEOF
2631This file contains any messages produced by compilers while
2632running configure, to aid debugging if configure makes a mistake.
d5af19ba 2633
81ecdfbb 2634It was created by $as_me, which was
d0ac1c44 2635generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2636
81ecdfbb 2637 $ $0 $@
413ccac7 2638
81ecdfbb
RW
2639_ACEOF
2640exec 5>>config.log
2641{
2642cat <<_ASUNAME
2643## --------- ##
2644## Platform. ##
2645## --------- ##
413ccac7 2646
81ecdfbb
RW
2647hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2648uname -m = `(uname -m) 2>/dev/null || echo unknown`
2649uname -r = `(uname -r) 2>/dev/null || echo unknown`
2650uname -s = `(uname -s) 2>/dev/null || echo unknown`
2651uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2652
81ecdfbb
RW
2653/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2654/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2655
81ecdfbb
RW
2656/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2657/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2658/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2659/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2660/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2661/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2662/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2663
81ecdfbb 2664_ASUNAME
bec39cab 2665
bec39cab
AC
2666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2667for as_dir in $PATH
2668do
2669 IFS=$as_save_IFS
2670 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2671 $as_echo "PATH: $as_dir"
2672 done
2673IFS=$as_save_IFS
bec39cab 2674
81ecdfbb 2675} >&5
bec39cab 2676
81ecdfbb 2677cat >&5 <<_ACEOF
bec39cab 2678
bec39cab 2679
81ecdfbb
RW
2680## ----------- ##
2681## Core tests. ##
2682## ----------- ##
2683
2684_ACEOF
2685
2686
2687# Keep a trace of the command line.
2688# Strip out --no-create and --no-recursion so they do not pile up.
2689# Strip out --silent because we don't want to record it for future runs.
2690# Also quote any args containing shell meta-characters.
2691# Make two passes to allow for proper duplicate-argument suppression.
2692ac_configure_args=
2693ac_configure_args0=
2694ac_configure_args1=
2695ac_must_keep_next=false
2696for ac_pass in 1 2
2697do
2698 for ac_arg
2699 do
2700 case $ac_arg in
2701 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2702 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2703 | -silent | --silent | --silen | --sile | --sil)
2704 continue ;;
2705 *\'*)
2706 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2707 esac
2708 case $ac_pass in
2709 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2710 2)
2711 as_fn_append ac_configure_args1 " '$ac_arg'"
2712 if test $ac_must_keep_next = true; then
2713 ac_must_keep_next=false # Got value, back to normal.
2714 else
2715 case $ac_arg in
2716 *=* | --config-cache | -C | -disable-* | --disable-* \
2717 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2718 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2719 | -with-* | --with-* | -without-* | --without-* | --x)
2720 case "$ac_configure_args0 " in
2721 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2722 esac
2723 ;;
2724 -* ) ac_must_keep_next=true ;;
2725 esac
2726 fi
2727 as_fn_append ac_configure_args " '$ac_arg'"
2728 ;;
2729 esac
2730 done
2731done
2732{ ac_configure_args0=; unset ac_configure_args0;}
2733{ ac_configure_args1=; unset ac_configure_args1;}
2734
2735# When interrupted or exit'd, cleanup temporary files, and complete
2736# config.log. We remove comments because anyway the quotes in there
2737# would cause problems or look ugly.
2738# WARNING: Use '\'' to represent an apostrophe within the trap.
2739# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2740trap 'exit_status=$?
2741 # Save into config.log some information that might help in debugging.
2742 {
2743 echo
2744
d0ac1c44 2745 $as_echo "## ---------------- ##
81ecdfbb 2746## Cache variables. ##
d0ac1c44 2747## ---------------- ##"
81ecdfbb
RW
2748 echo
2749 # The following way of writing the cache mishandles newlines in values,
2750(
2751 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2752 eval ac_val=\$$ac_var
2753 case $ac_val in #(
2754 *${as_nl}*)
2755 case $ac_var in #(
2756 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2757$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2758 esac
2759 case $ac_var in #(
2760 _ | IFS | as_nl) ;; #(
2761 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2762 *) { eval $ac_var=; unset $ac_var;} ;;
2763 esac ;;
2764 esac
2765 done
2766 (set) 2>&1 |
2767 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2768 *${as_nl}ac_space=\ *)
2769 sed -n \
2770 "s/'\''/'\''\\\\'\'''\''/g;
2771 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2772 ;; #(
2773 *)
2774 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2775 ;;
2776 esac |
2777 sort
2778)
2779 echo
2780
d0ac1c44 2781 $as_echo "## ----------------- ##
81ecdfbb 2782## Output variables. ##
d0ac1c44 2783## ----------------- ##"
81ecdfbb
RW
2784 echo
2785 for ac_var in $ac_subst_vars
2786 do
2787 eval ac_val=\$$ac_var
2788 case $ac_val in
2789 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2790 esac
2791 $as_echo "$ac_var='\''$ac_val'\''"
2792 done | sort
2793 echo
2794
2795 if test -n "$ac_subst_files"; then
d0ac1c44 2796 $as_echo "## ------------------- ##
81ecdfbb 2797## File substitutions. ##
d0ac1c44 2798## ------------------- ##"
81ecdfbb
RW
2799 echo
2800 for ac_var in $ac_subst_files
2801 do
2802 eval ac_val=\$$ac_var
2803 case $ac_val in
2804 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2805 esac
2806 $as_echo "$ac_var='\''$ac_val'\''"
2807 done | sort
2808 echo
2809 fi
2810
2811 if test -s confdefs.h; then
d0ac1c44 2812 $as_echo "## ----------- ##
81ecdfbb 2813## confdefs.h. ##
d0ac1c44 2814## ----------- ##"
81ecdfbb
RW
2815 echo
2816 cat confdefs.h
2817 echo
2818 fi
2819 test "$ac_signal" != 0 &&
2820 $as_echo "$as_me: caught signal $ac_signal"
2821 $as_echo "$as_me: exit $exit_status"
2822 } >&5
2823 rm -f core *.core core.conftest.* &&
2824 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2825 exit $exit_status
2826' 0
2827for ac_signal in 1 2 13 15; do
2828 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2829done
2830ac_signal=0
2831
2832# confdefs.h avoids OS command line length limits that DEFS can exceed.
2833rm -f -r conftest* confdefs.h
2834
2835$as_echo "/* confdefs.h */" > confdefs.h
2836
2837# Predefined preprocessor variables.
2838
2839cat >>confdefs.h <<_ACEOF
2840#define PACKAGE_NAME "$PACKAGE_NAME"
2841_ACEOF
2842
2843cat >>confdefs.h <<_ACEOF
2844#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2845_ACEOF
2846
2847cat >>confdefs.h <<_ACEOF
2848#define PACKAGE_VERSION "$PACKAGE_VERSION"
2849_ACEOF
2850
2851cat >>confdefs.h <<_ACEOF
2852#define PACKAGE_STRING "$PACKAGE_STRING"
2853_ACEOF
2854
2855cat >>confdefs.h <<_ACEOF
2856#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2857_ACEOF
2858
2859cat >>confdefs.h <<_ACEOF
2860#define PACKAGE_URL "$PACKAGE_URL"
2861_ACEOF
2862
2863
2864# Let the site file select an alternate cache file if it wants to.
2865# Prefer an explicitly selected file to automatically selected ones.
2866ac_site_file1=NONE
2867ac_site_file2=NONE
2868if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2869 # We do not want a PATH search for config.site.
2870 case $CONFIG_SITE in #((
2871 -*) ac_site_file1=./$CONFIG_SITE;;
2872 */*) ac_site_file1=$CONFIG_SITE;;
2873 *) ac_site_file1=./$CONFIG_SITE;;
2874 esac
81ecdfbb
RW
2875elif test "x$prefix" != xNONE; then
2876 ac_site_file1=$prefix/share/config.site
2877 ac_site_file2=$prefix/etc/config.site
2878else
2879 ac_site_file1=$ac_default_prefix/share/config.site
2880 ac_site_file2=$ac_default_prefix/etc/config.site
2881fi
2882for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2883do
2884 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2885 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2886 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2887$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2888 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2889 . "$ac_site_file" \
2890 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2892as_fn_error $? "failed to load site script $ac_site_file
2893See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2894 fi
2895done
2896
2897if test -r "$cache_file"; then
d0ac1c44
SM
2898 # Some versions of bash will fail to source /dev/null (special files
2899 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2900 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2902$as_echo "$as_me: loading cache $cache_file" >&6;}
2903 case $cache_file in
2904 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2905 *) . "./$cache_file";;
2906 esac
2907 fi
2908else
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2910$as_echo "$as_me: creating cache $cache_file" >&6;}
2911 >$cache_file
bec39cab
AC
2912fi
2913
d0ac1c44
SM
2914as_fn_append ac_header_list " stdlib.h"
2915as_fn_append ac_header_list " unistd.h"
2916as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2917# Check that the precious variables saved in the cache have kept the same
2918# value.
2919ac_cache_corrupted=false
2920for ac_var in $ac_precious_vars; do
2921 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2922 eval ac_new_set=\$ac_env_${ac_var}_set
2923 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2924 eval ac_new_val=\$ac_env_${ac_var}_value
2925 case $ac_old_set,$ac_new_set in
2926 set,)
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2928$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2929 ac_cache_corrupted=: ;;
2930 ,set)
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2932$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2933 ac_cache_corrupted=: ;;
2934 ,);;
2935 *)
2936 if test "x$ac_old_val" != "x$ac_new_val"; then
2937 # differences in whitespace do not lead to failure.
2938 ac_old_val_w=`echo x $ac_old_val`
2939 ac_new_val_w=`echo x $ac_new_val`
2940 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2942$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2943 ac_cache_corrupted=:
2944 else
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2946$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2947 eval $ac_var=\$ac_old_val
2948 fi
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2950$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2951 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2952$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2953 fi;;
2954 esac
2955 # Pass precious variables to config.status.
2956 if test "$ac_new_set" = set; then
2957 case $ac_new_val in
2958 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2959 *) ac_arg=$ac_var=$ac_new_val ;;
2960 esac
2961 case " $ac_configure_args " in
2962 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2963 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2964 esac
2965 fi
2966done
2967if $ac_cache_corrupted; then
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2971$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2972 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2973fi
2974## -------------------- ##
2975## Main body of script. ##
2976## -------------------- ##
2977
2978ac_ext=c
2979ac_cpp='$CPP $CPPFLAGS'
2980ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2981ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2982ac_compiler_gnu=$ac_cv_c_compiler_gnu
2983
2984
2985
2986
2987
2988ac_config_headers="$ac_config_headers config.h:config.in"
2989
2990
2991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2992$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2993 # Check whether --enable-maintainer-mode was given.
2994if test "${enable_maintainer_mode+set}" = set; then :
2995 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2996else
2997 USE_MAINTAINER_MODE=no
2998fi
2999
3000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3001$as_echo "$USE_MAINTAINER_MODE" >&6; }
3002 if test $USE_MAINTAINER_MODE = yes; then
3003 MAINTAINER_MODE_TRUE=
3004 MAINTAINER_MODE_FALSE='#'
3005else
3006 MAINTAINER_MODE_TRUE='#'
3007 MAINTAINER_MODE_FALSE=
3008fi
3009
3010 MAINT=$MAINTAINER_MODE_TRUE
3011
3012
3013
3014ac_ext=c
3015ac_cpp='$CPP $CPPFLAGS'
3016ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3017ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3018ac_compiler_gnu=$ac_cv_c_compiler_gnu
3019if test -n "$ac_tool_prefix"; then
3020 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3021set dummy ${ac_tool_prefix}gcc; ac_word=$2
3022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3023$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3024if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3025 $as_echo_n "(cached) " >&6
c906108c
SS
3026else
3027 if test -n "$CC"; then
3028 ac_cv_prog_CC="$CC" # Let the user override the test.
3029else
bec39cab
AC
3030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3031for as_dir in $PATH
3032do
3033 IFS=$as_save_IFS
3034 test -z "$as_dir" && as_dir=.
81ecdfbb 3035 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3037 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3039 break 2
3040 fi
3041done
81ecdfbb
RW
3042 done
3043IFS=$as_save_IFS
bec39cab 3044
c906108c
SS
3045fi
3046fi
bec39cab 3047CC=$ac_cv_prog_CC
c906108c 3048if test -n "$CC"; then
81ecdfbb
RW
3049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3050$as_echo "$CC" >&6; }
c906108c 3051else
81ecdfbb
RW
3052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3053$as_echo "no" >&6; }
c906108c
SS
3054fi
3055
81ecdfbb 3056
b4e70030
JB
3057fi
3058if test -z "$ac_cv_prog_CC"; then
3059 ac_ct_CC=$CC
81ecdfbb
RW
3060 # Extract the first word of "gcc", so it can be a program name with args.
3061set dummy gcc; ac_word=$2
3062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3063$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3064if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3065 $as_echo_n "(cached) " >&6
b4e70030
JB
3066else
3067 if test -n "$ac_ct_CC"; then
3068 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3069else
3070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3071for as_dir in $PATH
3072do
3073 IFS=$as_save_IFS
3074 test -z "$as_dir" && as_dir=.
81ecdfbb 3075 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3076 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3077 ac_cv_prog_ac_ct_CC="gcc"
3078 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 3079 break 2
4e8d927d 3080 fi
b4e70030 3081done
81ecdfbb
RW
3082 done
3083IFS=$as_save_IFS
b4e70030
JB
3084
3085fi
3086fi
3087ac_ct_CC=$ac_cv_prog_ac_ct_CC
3088if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3090$as_echo "$ac_ct_CC" >&6; }
b4e70030 3091else
81ecdfbb
RW
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3093$as_echo "no" >&6; }
b4e70030
JB
3094fi
3095
81ecdfbb
RW
3096 if test "x$ac_ct_CC" = x; then
3097 CC=""
3098 else
3099 case $cross_compiling:$ac_tool_warned in
3100yes:)
3101{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3102$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3103ac_tool_warned=yes ;;
3104esac
3105 CC=$ac_ct_CC
3106 fi
b4e70030
JB
3107else
3108 CC="$ac_cv_prog_CC"
3109fi
3110
c906108c 3111if test -z "$CC"; then
81ecdfbb
RW
3112 if test -n "$ac_tool_prefix"; then
3113 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3114set dummy ${ac_tool_prefix}cc; ac_word=$2
3115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3116$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3117if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3118 $as_echo_n "(cached) " >&6
c906108c
SS
3119else
3120 if test -n "$CC"; then
3121 ac_cv_prog_CC="$CC" # Let the user override the test.
3122else
bec39cab
AC
3123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3124for as_dir in $PATH
3125do
3126 IFS=$as_save_IFS
3127 test -z "$as_dir" && as_dir=.
81ecdfbb 3128 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3130 ac_cv_prog_CC="${ac_tool_prefix}cc"
3131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3132 break 2
3133 fi
3134done
81ecdfbb
RW
3135 done
3136IFS=$as_save_IFS
3137
3138fi
3139fi
3140CC=$ac_cv_prog_CC
3141if test -n "$CC"; then
3142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3143$as_echo "$CC" >&6; }
3144else
3145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3146$as_echo "no" >&6; }
3147fi
3148
3149
3150 fi
3151fi
3152if test -z "$CC"; then
3153 # Extract the first word of "cc", so it can be a program name with args.
3154set dummy cc; ac_word=$2
3155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3156$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3157if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3158 $as_echo_n "(cached) " >&6
3159else
3160 if test -n "$CC"; then
3161 ac_cv_prog_CC="$CC" # Let the user override the test.
3162else
3163 ac_prog_rejected=no
3164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3165for as_dir in $PATH
3166do
3167 IFS=$as_save_IFS
3168 test -z "$as_dir" && as_dir=.
3169 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3170 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3171 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3172 ac_prog_rejected=yes
3173 continue
3174 fi
3175 ac_cv_prog_CC="cc"
3176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3177 break 2
3178 fi
3179done
3180 done
3181IFS=$as_save_IFS
bec39cab 3182
c906108c
SS
3183if test $ac_prog_rejected = yes; then
3184 # We found a bogon in the path, so make sure we never use it.
3185 set dummy $ac_cv_prog_CC
3186 shift
bec39cab 3187 if test $# != 0; then
c906108c
SS
3188 # We chose a different compiler from the bogus one.
3189 # However, it has the same basename, so the bogon will be chosen
3190 # first if we set CC to just the basename; use the full file name.
3191 shift
bec39cab 3192 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3193 fi
3194fi
3195fi
3196fi
bec39cab 3197CC=$ac_cv_prog_CC
c906108c 3198if test -n "$CC"; then
81ecdfbb
RW
3199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3200$as_echo "$CC" >&6; }
c906108c 3201else
81ecdfbb
RW
3202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3203$as_echo "no" >&6; }
c906108c
SS
3204fi
3205
81ecdfbb 3206
bec39cab
AC
3207fi
3208if test -z "$CC"; then
3209 if test -n "$ac_tool_prefix"; then
81ecdfbb 3210 for ac_prog in cl.exe
bec39cab
AC
3211 do
3212 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3213set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3215$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3216if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3217 $as_echo_n "(cached) " >&6
c906108c
SS
3218else
3219 if test -n "$CC"; then
3220 ac_cv_prog_CC="$CC" # Let the user override the test.
3221else
bec39cab
AC
3222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3223for as_dir in $PATH
3224do
3225 IFS=$as_save_IFS
3226 test -z "$as_dir" && as_dir=.
81ecdfbb 3227 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3229 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3231 break 2
3232 fi
3233done
81ecdfbb
RW
3234 done
3235IFS=$as_save_IFS
bec39cab 3236
c906108c
SS
3237fi
3238fi
bec39cab 3239CC=$ac_cv_prog_CC
c906108c 3240if test -n "$CC"; then
81ecdfbb
RW
3241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3242$as_echo "$CC" >&6; }
c906108c 3243else
81ecdfbb
RW
3244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3245$as_echo "no" >&6; }
c906108c 3246fi
bec39cab 3247
81ecdfbb 3248
bec39cab
AC
3249 test -n "$CC" && break
3250 done
3251fi
3252if test -z "$CC"; then
3253 ac_ct_CC=$CC
81ecdfbb 3254 for ac_prog in cl.exe
bec39cab
AC
3255do
3256 # Extract the first word of "$ac_prog", so it can be a program name with args.
3257set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3259$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3260if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3261 $as_echo_n "(cached) " >&6
bec39cab
AC
3262else
3263 if test -n "$ac_ct_CC"; then
3264 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3265else
3266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3267for as_dir in $PATH
3268do
3269 IFS=$as_save_IFS
3270 test -z "$as_dir" && as_dir=.
81ecdfbb 3271 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3272 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3273 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3275 break 2
c906108c 3276 fi
bec39cab 3277done
81ecdfbb
RW
3278 done
3279IFS=$as_save_IFS
bec39cab
AC
3280
3281fi
3282fi
3283ac_ct_CC=$ac_cv_prog_ac_ct_CC
3284if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3286$as_echo "$ac_ct_CC" >&6; }
bec39cab 3287else
81ecdfbb
RW
3288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3289$as_echo "no" >&6; }
c906108c
SS
3290fi
3291
81ecdfbb 3292
bec39cab
AC
3293 test -n "$ac_ct_CC" && break
3294done
c906108c 3295
81ecdfbb
RW
3296 if test "x$ac_ct_CC" = x; then
3297 CC=""
3298 else
3299 case $cross_compiling:$ac_tool_warned in
3300yes:)
3301{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3302$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3303ac_tool_warned=yes ;;
3304esac
3305 CC=$ac_ct_CC
3306 fi
bec39cab
AC
3307fi
3308
3309fi
3310
3311
81ecdfbb
RW
3312test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3313$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3314as_fn_error $? "no acceptable C compiler found in \$PATH
3315See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3316
3317# Provide some information about the compiler.
81ecdfbb
RW
3318$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3319set X $ac_compile
3320ac_compiler=$2
3321for ac_option in --version -v -V -qversion; do
3322 { { ac_try="$ac_compiler $ac_option >&5"
3323case "(($ac_try" in
3324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3325 *) ac_try_echo=$ac_try;;
3326esac
3327eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3328$as_echo "$ac_try_echo"; } >&5
3329 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3330 ac_status=$?
81ecdfbb
RW
3331 if test -s conftest.err; then
3332 sed '10a\
3333... rest of stderr output deleted ...
3334 10q' conftest.err >conftest.er1
3335 cat conftest.er1 >&5
81ecdfbb 3336 fi
d0ac1c44 3337 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3338 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3339 test $ac_status = 0; }
3340done
bec39cab 3341
81ecdfbb 3342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3343/* end confdefs.h. */
3344
3345int
3346main ()
3347{
3348
3349 ;
3350 return 0;
3351}
3352_ACEOF
3353ac_clean_files_save=$ac_clean_files
d0ac1c44 3354ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3355# Try to create an executable without -o first, disregard a.out.
3356# It will help us diagnose broken compilers, and finding out an intuition
3357# of exeext.
d0ac1c44
SM
3358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3359$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3360ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3361
3362# The possible output files:
3363ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3364
3365ac_rmfiles=
3366for ac_file in $ac_files
3367do
3368 case $ac_file in
3369 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3370 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3371 esac
3372done
3373rm -f $ac_rmfiles
3374
3375if { { ac_try="$ac_link_default"
3376case "(($ac_try" in
3377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3378 *) ac_try_echo=$ac_try;;
3379esac
3380eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3381$as_echo "$ac_try_echo"; } >&5
3382 (eval "$ac_link_default") 2>&5
3383 ac_status=$?
3384 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3385 test $ac_status = 0; }; then :
3386 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3387# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3388# in a Makefile. We should not override ac_cv_exeext if it was cached,
3389# so that the user can short-circuit this test for compilers unknown to
3390# Autoconf.
3391for ac_file in $ac_files ''
bec39cab
AC
3392do
3393 test -f "$ac_file" || continue
3394 case $ac_file in
81ecdfbb 3395 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3396 ;;
3397 [ab].out )
3398 # We found the default executable, but exeext='' is most
3399 # certainly right.
3400 break;;
3401 *.* )
81ecdfbb
RW
3402 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3403 then :; else
3404 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3405 fi
3406 # We set ac_cv_exeext here because the later test for it is not
3407 # safe: cross compilers may not add the suffix if given an `-o'
3408 # argument, so we may need to know it at that point already.
3409 # Even if this section looks crufty: it has the advantage of
3410 # actually working.
b4e70030
JB
3411 break;;
3412 * )
3413 break;;
bec39cab
AC
3414 esac
3415done
81ecdfbb
RW
3416test "$ac_cv_exeext" = no && ac_cv_exeext=
3417
bec39cab 3418else
81ecdfbb
RW
3419 ac_file=''
3420fi
81ecdfbb 3421if test -z "$ac_file"; then :
d0ac1c44
SM
3422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3423$as_echo "no" >&6; }
3424$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3425sed 's/^/| /' conftest.$ac_ext >&5
3426
81ecdfbb
RW
3427{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3428$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3429as_fn_error 77 "C compiler cannot create executables
3430See \`config.log' for more details" "$LINENO" 5; }
3431else
3432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3433$as_echo "yes" >&6; }
bec39cab 3434fi
d0ac1c44
SM
3435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3436$as_echo_n "checking for C compiler default output file name... " >&6; }
3437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3438$as_echo "$ac_file" >&6; }
b4e70030 3439ac_exeext=$ac_cv_exeext
b4e70030 3440
d0ac1c44 3441rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3442ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3444$as_echo_n "checking for suffix of executables... " >&6; }
3445if { { ac_try="$ac_link"
3446case "(($ac_try" in
3447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3448 *) ac_try_echo=$ac_try;;
3449esac
3450eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3451$as_echo "$ac_try_echo"; } >&5
3452 (eval "$ac_link") 2>&5
bec39cab 3453 ac_status=$?
81ecdfbb
RW
3454 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3455 test $ac_status = 0; }; then :
b4e70030
JB
3456 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3457# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3458# work properly (i.e., refer to `conftest.exe'), while it won't with
3459# `rm'.
3460for ac_file in conftest.exe conftest conftest.*; do
3461 test -f "$ac_file" || continue
3462 case $ac_file in
81ecdfbb 3463 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3464 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3465 break;;
3466 * ) break;;
3467 esac
3468done
c906108c 3469else
81ecdfbb
RW
3470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3472as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3473See \`config.log' for more details" "$LINENO" 5; }
c906108c 3474fi
d0ac1c44 3475rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3477$as_echo "$ac_cv_exeext" >&6; }
c906108c 3478
b4e70030 3479rm -f conftest.$ac_ext
bec39cab
AC
3480EXEEXT=$ac_cv_exeext
3481ac_exeext=$EXEEXT
d0ac1c44
SM
3482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3483/* end confdefs.h. */
3484#include <stdio.h>
3485int
3486main ()
3487{
3488FILE *f = fopen ("conftest.out", "w");
3489 return ferror (f) || fclose (f) != 0;
3490
3491 ;
3492 return 0;
3493}
3494_ACEOF
3495ac_clean_files="$ac_clean_files conftest.out"
3496# Check that the compiler produces executables we can run. If not, either
3497# the compiler is broken, or we cross compile.
3498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3499$as_echo_n "checking whether we are cross compiling... " >&6; }
3500if test "$cross_compiling" != yes; then
3501 { { ac_try="$ac_link"
3502case "(($ac_try" in
3503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3504 *) ac_try_echo=$ac_try;;
3505esac
3506eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3507$as_echo "$ac_try_echo"; } >&5
3508 (eval "$ac_link") 2>&5
3509 ac_status=$?
3510 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3511 test $ac_status = 0; }
3512 if { ac_try='./conftest$ac_cv_exeext'
3513 { { case "(($ac_try" in
3514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3515 *) ac_try_echo=$ac_try;;
3516esac
3517eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3518$as_echo "$ac_try_echo"; } >&5
3519 (eval "$ac_try") 2>&5
3520 ac_status=$?
3521 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3522 test $ac_status = 0; }; }; then
3523 cross_compiling=no
3524 else
3525 if test "$cross_compiling" = maybe; then
3526 cross_compiling=yes
3527 else
3528 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3529$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3530as_fn_error $? "cannot run C compiled programs.
3531If you meant to cross compile, use \`--host'.
3532See \`config.log' for more details" "$LINENO" 5; }
3533 fi
3534 fi
3535fi
3536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3537$as_echo "$cross_compiling" >&6; }
3538
3539rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3540ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3542$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3543if ${ac_cv_objext+:} false; then :
81ecdfbb 3544 $as_echo_n "(cached) " >&6
bec39cab 3545else
81ecdfbb 3546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3547/* end confdefs.h. */
3548
3549int
3550main ()
3551{
3552
3553 ;
3554 return 0;
3555}
3556_ACEOF
3557rm -f conftest.o conftest.obj
81ecdfbb
RW
3558if { { ac_try="$ac_compile"
3559case "(($ac_try" in
3560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3561 *) ac_try_echo=$ac_try;;
3562esac
3563eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3564$as_echo "$ac_try_echo"; } >&5
3565 (eval "$ac_compile") 2>&5
3566 ac_status=$?
3567 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3568 test $ac_status = 0; }; then :
3569 for ac_file in conftest.o conftest.obj conftest.*; do
3570 test -f "$ac_file" || continue;
bec39cab 3571 case $ac_file in
81ecdfbb 3572 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3573 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3574 break;;
3575 esac
3576done
c906108c 3577else
81ecdfbb 3578 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3579sed 's/^/| /' conftest.$ac_ext >&5
3580
81ecdfbb
RW
3581{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3582$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3583as_fn_error $? "cannot compute suffix of object files: cannot compile
3584See \`config.log' for more details" "$LINENO" 5; }
c906108c 3585fi
b4e70030 3586rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3587fi
81ecdfbb
RW
3588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3589$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3590OBJEXT=$ac_cv_objext
3591ac_objext=$OBJEXT
81ecdfbb
RW
3592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3593$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3594if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3595 $as_echo_n "(cached) " >&6
c906108c 3596else
81ecdfbb 3597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3598/* end confdefs.h. */
3599
3600int
3601main ()
3602{
3603#ifndef __GNUC__
3604 choke me
3605#endif
3606
3607 ;
3608 return 0;
3609}
3610_ACEOF
81ecdfbb 3611if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3612 ac_compiler_gnu=yes
3613else
81ecdfbb 3614 ac_compiler_gnu=no
bec39cab 3615fi
81ecdfbb 3616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3617ac_cv_c_compiler_gnu=$ac_compiler_gnu
3618
3619fi
81ecdfbb
RW
3620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3621$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3622if test $ac_compiler_gnu = yes; then
3623 GCC=yes
3624else
3625 GCC=
3626fi
bec39cab
AC
3627ac_test_CFLAGS=${CFLAGS+set}
3628ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3630$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3631if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3632 $as_echo_n "(cached) " >&6
bec39cab 3633else
81ecdfbb
RW
3634 ac_save_c_werror_flag=$ac_c_werror_flag
3635 ac_c_werror_flag=yes
3636 ac_cv_prog_cc_g=no
3637 CFLAGS="-g"
3638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3639/* end confdefs.h. */
3640
3641int
3642main ()
3643{
3644
3645 ;
3646 return 0;
3647}
3648_ACEOF
81ecdfbb 3649if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3650 ac_cv_prog_cc_g=yes
3651else
81ecdfbb
RW
3652 CFLAGS=""
3653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3654/* end confdefs.h. */
3655
3656int
3657main ()
3658{
3659
3660 ;
3661 return 0;
3662}
3663_ACEOF
3664if ac_fn_c_try_compile "$LINENO"; then :
3665
3666else
3667 ac_c_werror_flag=$ac_save_c_werror_flag
3668 CFLAGS="-g"
3669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3670/* end confdefs.h. */
3671
3672int
3673main ()
3674{
c906108c 3675
81ecdfbb
RW
3676 ;
3677 return 0;
3678}
3679_ACEOF
3680if ac_fn_c_try_compile "$LINENO"; then :
3681 ac_cv_prog_cc_g=yes
3682fi
3683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3684fi
3685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3686fi
81ecdfbb
RW
3687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3688 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3689fi
81ecdfbb
RW
3690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3691$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3692if test "$ac_test_CFLAGS" = set; then
bec39cab 3693 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3694elif test $ac_cv_prog_cc_g = yes; then
3695 if test "$GCC" = yes; then
3696 CFLAGS="-g -O2"
3697 else
3698 CFLAGS="-g"
3699 fi
3700else
3701 if test "$GCC" = yes; then
3702 CFLAGS="-O2"
3703 else
3704 CFLAGS=
3705 fi
3706fi
81ecdfbb
RW
3707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3708$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3709if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3710 $as_echo_n "(cached) " >&6
bec39cab 3711else
81ecdfbb 3712 ac_cv_prog_cc_c89=no
bec39cab 3713ac_save_CC=$CC
81ecdfbb 3714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3715/* end confdefs.h. */
c906108c
SS
3716#include <stdarg.h>
3717#include <stdio.h>
d0ac1c44 3718struct stat;
c906108c
SS
3719/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3720struct buf { int x; };
3721FILE * (*rcsopen) (struct buf *, struct stat *, int);
3722static char *e (p, i)
3723 char **p;
3724 int i;
3725{
3726 return p[i];
3727}
3728static char *f (char * (*g) (char **, int), char **p, ...)
3729{
3730 char *s;
3731 va_list v;
3732 va_start (v,p);
3733 s = g (p, va_arg (v,int));
3734 va_end (v);
3735 return s;
3736}
bec39cab
AC
3737
3738/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3739 function prototypes and stuff, but not '\xHH' hex character constants.
3740 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3741 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3742 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3743 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3744 that's true only with -std. */
bec39cab
AC
3745int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3746
81ecdfbb
RW
3747/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3748 inside strings and character constants. */
3749#define FOO(x) 'x'
3750int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3751
c906108c
SS
3752int test (int i, double x);
3753struct s1 {int (*f) (int a);};
3754struct s2 {int (*f) (double a);};
3755int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3756int argc;
3757char **argv;
bec39cab
AC
3758int
3759main ()
3760{
c906108c 3761return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3762 ;
3763 return 0;
3764}
3765_ACEOF
81ecdfbb
RW
3766for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3767 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3768do
3769 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3770 if ac_fn_c_try_compile "$LINENO"; then :
3771 ac_cv_prog_cc_c89=$ac_arg
c906108c 3772fi
81ecdfbb
RW
3773rm -f core conftest.err conftest.$ac_objext
3774 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3775done
81ecdfbb 3776rm -f conftest.$ac_ext
bec39cab 3777CC=$ac_save_CC
c906108c
SS
3778
3779fi
81ecdfbb
RW
3780# AC_CACHE_VAL
3781case "x$ac_cv_prog_cc_c89" in
3782 x)
3783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3784$as_echo "none needed" >&6; } ;;
3785 xno)
3786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3787$as_echo "unsupported" >&6; } ;;
bec39cab 3788 *)
81ecdfbb
RW
3789 CC="$CC $ac_cv_prog_cc_c89"
3790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3791$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3792esac
81ecdfbb 3793if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3794
b4e70030
JB
3795fi
3796
bec39cab
AC
3797ac_ext=c
3798ac_cpp='$CPP $CPPFLAGS'
3799ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3800ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3801ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3802
3bc3d82a
PA
3803ac_ext=cpp
3804ac_cpp='$CXXCPP $CPPFLAGS'
3805ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3806ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3807ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3808if test -z "$CXX"; then
3809 if test -n "$CCC"; then
3810 CXX=$CCC
3811 else
3812 if test -n "$ac_tool_prefix"; then
3813 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3814 do
3815 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3816set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3818$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3819if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3820 $as_echo_n "(cached) " >&6
3821else
3822 if test -n "$CXX"; then
3823 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3824else
3825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3826for as_dir in $PATH
3827do
3828 IFS=$as_save_IFS
3829 test -z "$as_dir" && as_dir=.
3830 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3832 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3833 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3834 break 2
3835 fi
3836done
3837 done
3838IFS=$as_save_IFS
3839
3840fi
3841fi
3842CXX=$ac_cv_prog_CXX
3843if test -n "$CXX"; then
3844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3845$as_echo "$CXX" >&6; }
3846else
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3848$as_echo "no" >&6; }
3849fi
3850
3851
3852 test -n "$CXX" && break
3853 done
3854fi
3855if test -z "$CXX"; then
3856 ac_ct_CXX=$CXX
3857 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3858do
3859 # Extract the first word of "$ac_prog", so it can be a program name with args.
3860set dummy $ac_prog; ac_word=$2
3861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3863if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3864 $as_echo_n "(cached) " >&6
3865else
3866 if test -n "$ac_ct_CXX"; then
3867 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3868else
3869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3870for as_dir in $PATH
3871do
3872 IFS=$as_save_IFS
3873 test -z "$as_dir" && as_dir=.
3874 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3875 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3876 ac_cv_prog_ac_ct_CXX="$ac_prog"
3877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3878 break 2
3879 fi
3880done
3881 done
3882IFS=$as_save_IFS
3883
3884fi
3885fi
3886ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3887if test -n "$ac_ct_CXX"; then
3888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3889$as_echo "$ac_ct_CXX" >&6; }
3890else
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3892$as_echo "no" >&6; }
3893fi
3894
3895
3896 test -n "$ac_ct_CXX" && break
3897done
3898
3899 if test "x$ac_ct_CXX" = x; then
3900 CXX="g++"
3901 else
3902 case $cross_compiling:$ac_tool_warned in
3903yes:)
3904{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3905$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3906ac_tool_warned=yes ;;
3907esac
3908 CXX=$ac_ct_CXX
3909 fi
3910fi
3911
3912 fi
3913fi
3914# Provide some information about the compiler.
3915$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3916set X $ac_compile
3917ac_compiler=$2
3918for ac_option in --version -v -V -qversion; do
3919 { { ac_try="$ac_compiler $ac_option >&5"
3920case "(($ac_try" in
3921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3922 *) ac_try_echo=$ac_try;;
3923esac
3924eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3925$as_echo "$ac_try_echo"; } >&5
3926 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3927 ac_status=$?
3928 if test -s conftest.err; then
3929 sed '10a\
3930... rest of stderr output deleted ...
3931 10q' conftest.err >conftest.er1
3932 cat conftest.er1 >&5
3bc3d82a 3933 fi
d0ac1c44 3934 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3935 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3936 test $ac_status = 0; }
3937done
3938
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3940$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3941if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3942 $as_echo_n "(cached) " >&6
3943else
3944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3945/* end confdefs.h. */
3946
3947int
3948main ()
3949{
3950#ifndef __GNUC__
3951 choke me
3952#endif
3953
3954 ;
3955 return 0;
3956}
3957_ACEOF
3958if ac_fn_cxx_try_compile "$LINENO"; then :
3959 ac_compiler_gnu=yes
3960else
3961 ac_compiler_gnu=no
3962fi
3963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3964ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3965
3966fi
3967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3968$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3969if test $ac_compiler_gnu = yes; then
3970 GXX=yes
3971else
3972 GXX=
3973fi
3974ac_test_CXXFLAGS=${CXXFLAGS+set}
3975ac_save_CXXFLAGS=$CXXFLAGS
3976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3977$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3978if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3979 $as_echo_n "(cached) " >&6
3980else
3981 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3982 ac_cxx_werror_flag=yes
3983 ac_cv_prog_cxx_g=no
3984 CXXFLAGS="-g"
3985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3986/* end confdefs.h. */
3987
3988int
3989main ()
3990{
3991
3992 ;
3993 return 0;
3994}
3995_ACEOF
3996if ac_fn_cxx_try_compile "$LINENO"; then :
3997 ac_cv_prog_cxx_g=yes
3998else
3999 CXXFLAGS=""
4000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4001/* end confdefs.h. */
4002
4003int
4004main ()
4005{
4006
4007 ;
4008 return 0;
4009}
4010_ACEOF
4011if ac_fn_cxx_try_compile "$LINENO"; then :
4012
4013else
4014 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4015 CXXFLAGS="-g"
4016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4017/* end confdefs.h. */
4018
4019int
4020main ()
4021{
4022
4023 ;
4024 return 0;
4025}
4026_ACEOF
4027if ac_fn_cxx_try_compile "$LINENO"; then :
4028 ac_cv_prog_cxx_g=yes
4029fi
4030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4031fi
4032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4033fi
4034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4035 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4036fi
4037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4038$as_echo "$ac_cv_prog_cxx_g" >&6; }
4039if test "$ac_test_CXXFLAGS" = set; then
4040 CXXFLAGS=$ac_save_CXXFLAGS
4041elif test $ac_cv_prog_cxx_g = yes; then
4042 if test "$GXX" = yes; then
4043 CXXFLAGS="-g -O2"
4044 else
4045 CXXFLAGS="-g"
4046 fi
4047else
4048 if test "$GXX" = yes; then
4049 CXXFLAGS="-O2"
4050 else
4051 CXXFLAGS=
4052 fi
4053fi
4054ac_ext=c
4055ac_cpp='$CPP $CPPFLAGS'
4056ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4057ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4058ac_compiler_gnu=$ac_cv_c_compiler_gnu
4059
4060
60ca704f 4061
bec39cab
AC
4062ac_ext=c
4063ac_cpp='$CPP $CPPFLAGS'
4064ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4065ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4066ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
4067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4068$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
4069# On Suns, sometimes $CPP names a directory.
4070if test -n "$CPP" && test -d "$CPP"; then
4071 CPP=
8bb2c122 4072fi
bec39cab 4073if test -z "$CPP"; then
d0ac1c44 4074 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 4075 $as_echo_n "(cached) " >&6
bec39cab
AC
4076else
4077 # Double quotes because CPP needs to be expanded
4078 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4079 do
4080 ac_preproc_ok=false
4081for ac_c_preproc_warn_flag in '' yes
4082do
4083 # Use a header file that comes with gcc, so configuring glibc
4084 # with a fresh cross-compiler works.
4085 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4086 # <limits.h> exists even on freestanding compilers.
4087 # On the NeXT, cc -E runs the code through the compiler's parser,
4088 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4090/* end confdefs.h. */
4091#ifdef __STDC__
4092# include <limits.h>
4093#else
4094# include <assert.h>
4095#endif
4096 Syntax error
4097_ACEOF
81ecdfbb 4098if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4099
81ecdfbb 4100else
bec39cab
AC
4101 # Broken: fails on valid input.
4102continue
4103fi
d0ac1c44 4104rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4105
81ecdfbb 4106 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4107 # can be detected and how.
81ecdfbb 4108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4109/* end confdefs.h. */
4110#include <ac_nonexistent.h>
4111_ACEOF
81ecdfbb 4112if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4113 # Broken: success on invalid input.
4114continue
8bb2c122 4115else
bec39cab
AC
4116 # Passes both tests.
4117ac_preproc_ok=:
4118break
8bb2c122 4119fi
d0ac1c44 4120rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4121
bec39cab
AC
4122done
4123# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4124rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4125if $ac_preproc_ok; then :
bec39cab
AC
4126 break
4127fi
8bb2c122 4128
bec39cab
AC
4129 done
4130 ac_cv_prog_CPP=$CPP
ddc9cd0f 4131
c906108c 4132fi
bec39cab
AC
4133 CPP=$ac_cv_prog_CPP
4134else
4135 ac_cv_prog_CPP=$CPP
c906108c 4136fi
81ecdfbb
RW
4137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4138$as_echo "$CPP" >&6; }
bec39cab
AC
4139ac_preproc_ok=false
4140for ac_c_preproc_warn_flag in '' yes
4141do
4142 # Use a header file that comes with gcc, so configuring glibc
4143 # with a fresh cross-compiler works.
4144 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4145 # <limits.h> exists even on freestanding compilers.
4146 # On the NeXT, cc -E runs the code through the compiler's parser,
4147 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4149/* end confdefs.h. */
4150#ifdef __STDC__
4151# include <limits.h>
4152#else
4153# include <assert.h>
4154#endif
4155 Syntax error
4156_ACEOF
81ecdfbb 4157if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4158
81ecdfbb 4159else
bec39cab
AC
4160 # Broken: fails on valid input.
4161continue
4162fi
d0ac1c44 4163rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4164
81ecdfbb 4165 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4166 # can be detected and how.
81ecdfbb 4167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4168/* end confdefs.h. */
4169#include <ac_nonexistent.h>
4170_ACEOF
81ecdfbb 4171if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4172 # Broken: success on invalid input.
4173continue
c906108c 4174else
bec39cab
AC
4175 # Passes both tests.
4176ac_preproc_ok=:
4177break
c906108c 4178fi
d0ac1c44 4179rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4180
bec39cab
AC
4181done
4182# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4183rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4184if $ac_preproc_ok; then :
4185
c906108c 4186else
81ecdfbb
RW
4187 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4189as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4190See \`config.log' for more details" "$LINENO" 5; }
c906108c 4191fi
c906108c 4192
bec39cab
AC
4193ac_ext=c
4194ac_cpp='$CPP $CPPFLAGS'
4195ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4196ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4197ac_compiler_gnu=$ac_cv_c_compiler_gnu
4198
4199
81ecdfbb
RW
4200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4201$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4202if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4203 $as_echo_n "(cached) " >&6
4e8d927d 4204else
81ecdfbb
RW
4205 if test -z "$GREP"; then
4206 ac_path_GREP_found=false
4207 # Loop through the user's path and test for each of PROGNAME-LIST
4208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4209for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4210do
4211 IFS=$as_save_IFS
4212 test -z "$as_dir" && as_dir=.
4213 for ac_prog in grep ggrep; do
4214 for ac_exec_ext in '' $ac_executable_extensions; do
4215 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4216 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4217# Check for GNU ac_path_GREP and select it if it is found.
4218 # Check for GNU $ac_path_GREP
4219case `"$ac_path_GREP" --version 2>&1` in
4220*GNU*)
4221 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4222*)
4223 ac_count=0
4224 $as_echo_n 0123456789 >"conftest.in"
4225 while :
4226 do
4227 cat "conftest.in" "conftest.in" >"conftest.tmp"
4228 mv "conftest.tmp" "conftest.in"
4229 cp "conftest.in" "conftest.nl"
4230 $as_echo 'GREP' >> "conftest.nl"
4231 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4232 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4233 as_fn_arith $ac_count + 1 && ac_count=$as_val
4234 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4235 # Best one so far, save it but keep looking for a better one
4236 ac_cv_path_GREP="$ac_path_GREP"
4237 ac_path_GREP_max=$ac_count
bec39cab 4238 fi
81ecdfbb
RW
4239 # 10*(2^10) chars as input seems more than enough
4240 test $ac_count -gt 10 && break
4241 done
4242 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4243esac
bec39cab 4244
81ecdfbb
RW
4245 $ac_path_GREP_found && break 3
4246 done
4247 done
4248 done
4249IFS=$as_save_IFS
4250 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4251 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4252 fi
c906108c 4253else
81ecdfbb 4254 ac_cv_path_GREP=$GREP
c906108c 4255fi
c906108c 4256
81ecdfbb
RW
4257fi
4258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4259$as_echo "$ac_cv_path_GREP" >&6; }
4260 GREP="$ac_cv_path_GREP"
c906108c 4261
c906108c 4262
81ecdfbb
RW
4263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4264$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4265if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4266 $as_echo_n "(cached) " >&6
783e057b 4267else
81ecdfbb
RW
4268 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4269 then ac_cv_path_EGREP="$GREP -E"
4270 else
4271 if test -z "$EGREP"; then
4272 ac_path_EGREP_found=false
4273 # Loop through the user's path and test for each of PROGNAME-LIST
4274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4275for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4276do
4277 IFS=$as_save_IFS
4278 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4279 for ac_prog in egrep; do
4280 for ac_exec_ext in '' $ac_executable_extensions; do
4281 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4282 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4283# Check for GNU ac_path_EGREP and select it if it is found.
4284 # Check for GNU $ac_path_EGREP
4285case `"$ac_path_EGREP" --version 2>&1` in
4286*GNU*)
4287 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4288*)
4289 ac_count=0
4290 $as_echo_n 0123456789 >"conftest.in"
4291 while :
4292 do
4293 cat "conftest.in" "conftest.in" >"conftest.tmp"
4294 mv "conftest.tmp" "conftest.in"
4295 cp "conftest.in" "conftest.nl"
4296 $as_echo 'EGREP' >> "conftest.nl"
4297 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4298 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4299 as_fn_arith $ac_count + 1 && ac_count=$as_val
4300 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4301 # Best one so far, save it but keep looking for a better one
4302 ac_cv_path_EGREP="$ac_path_EGREP"
4303 ac_path_EGREP_max=$ac_count
4304 fi
4305 # 10*(2^10) chars as input seems more than enough
4306 test $ac_count -gt 10 && break
4307 done
4308 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4309esac
bec39cab 4310
81ecdfbb
RW
4311 $ac_path_EGREP_found && break 3
4312 done
4313 done
4314 done
4315IFS=$as_save_IFS
4316 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4317 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4318 fi
783e057b 4319else
81ecdfbb 4320 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4321fi
4322
81ecdfbb 4323 fi
783e057b 4324fi
81ecdfbb
RW
4325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4326$as_echo "$ac_cv_path_EGREP" >&6; }
4327 EGREP="$ac_cv_path_EGREP"
4328
783e057b 4329
81ecdfbb
RW
4330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4331$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4332if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4333 $as_echo_n "(cached) " >&6
783e057b 4334else
81ecdfbb 4335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4336/* end confdefs.h. */
783e057b 4337#include <stdlib.h>
bec39cab 4338#include <stdarg.h>
783e057b
DJ
4339#include <string.h>
4340#include <float.h>
c906108c 4341
bec39cab
AC
4342int
4343main ()
4344{
c906108c 4345
bec39cab
AC
4346 ;
4347 return 0;
4348}
4349_ACEOF
81ecdfbb 4350if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4351 ac_cv_header_stdc=yes
c906108c 4352else
81ecdfbb 4353 ac_cv_header_stdc=no
c906108c 4354fi
81ecdfbb 4355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4356
783e057b
DJ
4357if test $ac_cv_header_stdc = yes; then
4358 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4360/* end confdefs.h. */
4361#include <string.h>
c906108c 4362
783e057b
DJ
4363_ACEOF
4364if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4365 $EGREP "memchr" >/dev/null 2>&1; then :
4366
c906108c 4367else
783e057b 4368 ac_cv_header_stdc=no
c906108c 4369fi
783e057b 4370rm -f conftest*
c906108c
SS
4371
4372fi
4373
783e057b
DJ
4374if test $ac_cv_header_stdc = yes; then
4375 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4377/* end confdefs.h. */
4378#include <stdlib.h>
bec39cab 4379
783e057b
DJ
4380_ACEOF
4381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4382 $EGREP "free" >/dev/null 2>&1; then :
4383
bec39cab 4384else
783e057b 4385 ac_cv_header_stdc=no
bec39cab 4386fi
783e057b 4387rm -f conftest*
bec39cab
AC
4388
4389fi
bec39cab 4390
783e057b
DJ
4391if test $ac_cv_header_stdc = yes; then
4392 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4393 if test "$cross_compiling" = yes; then :
783e057b 4394 :
bec39cab 4395else
81ecdfbb 4396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4397/* end confdefs.h. */
4398#include <ctype.h>
81ecdfbb 4399#include <stdlib.h>
783e057b
DJ
4400#if ((' ' & 0x0FF) == 0x020)
4401# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4402# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4403#else
4404# define ISLOWER(c) \
4405 (('a' <= (c) && (c) <= 'i') \
4406 || ('j' <= (c) && (c) <= 'r') \
4407 || ('s' <= (c) && (c) <= 'z'))
4408# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4409#endif
4410
4411#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4412int
4413main ()
4414{
4415 int i;
4416 for (i = 0; i < 256; i++)
4417 if (XOR (islower (i), ISLOWER (i))
4418 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4419 return 2;
4420 return 0;
783e057b
DJ
4421}
4422_ACEOF
81ecdfbb 4423if ac_fn_c_try_run "$LINENO"; then :
783e057b 4424
81ecdfbb
RW
4425else
4426 ac_cv_header_stdc=no
783e057b 4427fi
81ecdfbb
RW
4428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4429 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4430fi
81ecdfbb 4431
783e057b
DJ
4432fi
4433fi
81ecdfbb
RW
4434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4435$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4436if test $ac_cv_header_stdc = yes; then
4437
81ecdfbb 4438$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4439
4440fi
4441
4442# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4443for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4444 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4445do :
4446 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4447ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4448"
d0ac1c44 4449if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4450 cat >>confdefs.h <<_ACEOF
81ecdfbb 4451#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4452_ACEOF
4453
4454fi
4455
4456done
4457
4458
4459
81ecdfbb 4460 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4461if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4462 MINIX=yes
4463else
4464 MINIX=
4465fi
4466
4467
4468 if test "$MINIX" = yes; then
4469
81ecdfbb 4470$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4471
4472
81ecdfbb 4473$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4474
4475
81ecdfbb 4476$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4477
4478 fi
4479
4480
81ecdfbb
RW
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4482$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4483if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4484 $as_echo_n "(cached) " >&6
783e057b 4485else
81ecdfbb 4486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4487/* end confdefs.h. */
4488
d0ac1c44
SM
4489# define __EXTENSIONS__ 1
4490 $ac_includes_default
783e057b
DJ
4491int
4492main ()
4493{
4494
4495 ;
4496 return 0;
4497}
4498_ACEOF
81ecdfbb 4499if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4500 ac_cv_safe_to_define___extensions__=yes
4501else
81ecdfbb 4502 ac_cv_safe_to_define___extensions__=no
783e057b 4503fi
81ecdfbb 4504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4505fi
81ecdfbb
RW
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4507$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4508 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4509 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4510
81ecdfbb 4511 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4512
81ecdfbb 4513 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4514
81ecdfbb 4515 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4516
81ecdfbb 4517 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4518
4519
c971b7fa
PA
4520ac_aux_dir=
4521for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4522 if test -f "$ac_dir/install-sh"; then
4523 ac_aux_dir=$ac_dir
4524 ac_install_sh="$ac_aux_dir/install-sh -c"
4525 break
4526 elif test -f "$ac_dir/install.sh"; then
4527 ac_aux_dir=$ac_dir
4528 ac_install_sh="$ac_aux_dir/install.sh -c"
4529 break
4530 elif test -f "$ac_dir/shtool"; then
4531 ac_aux_dir=$ac_dir
4532 ac_install_sh="$ac_aux_dir/shtool install -c"
4533 break
4534 fi
c971b7fa
PA
4535done
4536if test -z "$ac_aux_dir"; then
d0ac1c44 4537 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4538fi
770d76d7 4539
c971b7fa
PA
4540# These three variables are undocumented and unsupported,
4541# and are intended to be withdrawn in a future Autoconf release.
4542# They can cause serious problems if a builder's source tree is in a directory
4543# whose full name contains unusual characters.
4544ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4545ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4546ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4547
770d76d7 4548
c971b7fa
PA
4549# Make sure we can run config.sub.
4550$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4551 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4552
c971b7fa
PA
4553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4554$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4555if ${ac_cv_build+:} false; then :
c971b7fa 4556 $as_echo_n "(cached) " >&6
770d76d7 4557else
c971b7fa
PA
4558 ac_build_alias=$build_alias
4559test "x$ac_build_alias" = x &&
4560 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4561test "x$ac_build_alias" = x &&
d0ac1c44 4562 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4563ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4564 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4565
770d76d7 4566fi
c971b7fa
PA
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4568$as_echo "$ac_cv_build" >&6; }
4569case $ac_cv_build in
4570*-*-*) ;;
d0ac1c44 4571*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4572esac
c971b7fa
PA
4573build=$ac_cv_build
4574ac_save_IFS=$IFS; IFS='-'
4575set x $ac_cv_build
4576shift
4577build_cpu=$1
4578build_vendor=$2
4579shift; shift
4580# Remember, the first character of IFS is used to create $*,
4581# except with old shells:
4582build_os=$*
4583IFS=$ac_save_IFS
4584case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4585
4586
c971b7fa
PA
4587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4588$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4589if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4590 $as_echo_n "(cached) " >&6
4591else
c971b7fa
PA
4592 if test "x$host_alias" = x; then
4593 ac_cv_host=$ac_cv_build
81ecdfbb 4594else
c971b7fa 4595 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4596 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4597fi
81ecdfbb
RW
4598
4599fi
c971b7fa
PA
4600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4601$as_echo "$ac_cv_host" >&6; }
4602case $ac_cv_host in
4603*-*-*) ;;
d0ac1c44 4604*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4605esac
c971b7fa
PA
4606host=$ac_cv_host
4607ac_save_IFS=$IFS; IFS='-'
4608set x $ac_cv_host
4609shift
4610host_cpu=$1
4611host_vendor=$2
4612shift; shift
4613# Remember, the first character of IFS is used to create $*,
4614# except with old shells:
4615host_os=$*
4616IFS=$ac_save_IFS
4617case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4618
4619
4620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4621$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4622if ${ac_cv_target+:} false; then :
3388710e
JM
4623 $as_echo_n "(cached) " >&6
4624else
4625 if test "x$target_alias" = x; then
4626 ac_cv_target=$ac_cv_host
4627else
4628 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4629 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4630fi
4631
4632fi
4633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4634$as_echo "$ac_cv_target" >&6; }
4635case $ac_cv_target in
4636*-*-*) ;;
d0ac1c44 4637*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4638esac
4639target=$ac_cv_target
4640ac_save_IFS=$IFS; IFS='-'
4641set x $ac_cv_target
4642shift
4643target_cpu=$1
4644target_vendor=$2
4645shift; shift
4646# Remember, the first character of IFS is used to create $*,
4647# except with old shells:
4648target_os=$*
4649IFS=$ac_save_IFS
4650case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4651
4652
4653# The aliases save the names the user supplied, while $host etc.
4654# will get canonicalized.
4655test -n "$target_alias" &&
4656 test "$program_prefix$program_suffix$program_transform_name" = \
4657 NONENONEs,x,x, &&
4658 program_prefix=${target_alias}-
4659
4660# The tests for host and target for $enable_largefile require
4661# canonical names.
4662
4663
81ecdfbb 4664
da2f07f1
JK
4665# As the $enable_largefile decision depends on --enable-plugins we must set it
4666# even in directories otherwise not depending on the $plugins option.
4667
4668
2974be62
AM
4669 maybe_plugins=no
4670 for ac_header in dlfcn.h
4671do :
4672 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4673"
d0ac1c44 4674if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4675 cat >>confdefs.h <<_ACEOF
4676#define HAVE_DLFCN_H 1
4677_ACEOF
4678 maybe_plugins=yes
4679fi
4680
4681done
4682
4683 for ac_header in windows.h
4684do :
4685 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4686"
d0ac1c44 4687if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4688 cat >>confdefs.h <<_ACEOF
4689#define HAVE_WINDOWS_H 1
4690_ACEOF
4691 maybe_plugins=yes
4692fi
4693
4694done
4695
4696
4697 # Check whether --enable-plugins was given.
da2f07f1
JK
4698if test "${enable_plugins+set}" = set; then :
4699 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4700 no) plugins=no ;;
4701 *) plugins=yes
4702 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4703 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4704 fi ;;
4705 esac
da2f07f1 4706else
2974be62
AM
4707 plugins=$maybe_plugins
4708
da2f07f1
JK
4709fi
4710
2974be62 4711 if test "$plugins" = "yes"; then
458412c3
TT
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4713$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4714if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4715 $as_echo_n "(cached) " >&6
4716else
4717 ac_func_search_save_LIBS=$LIBS
4718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4719/* end confdefs.h. */
4720
4721/* Override any GCC internal prototype to avoid an error.
4722 Use char because int might match the return type of a GCC
4723 builtin and then its argument prototype would still apply. */
4724#ifdef __cplusplus
4725extern "C"
4726#endif
458412c3 4727char dlsym ();
2974be62
AM
4728int
4729main ()
4730{
458412c3 4731return dlsym ();
2974be62
AM
4732 ;
4733 return 0;
4734}
4735_ACEOF
4736for ac_lib in '' dl; do
4737 if test -z "$ac_lib"; then
4738 ac_res="none required"
4739 else
4740 ac_res=-l$ac_lib
4741 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4742 fi
4743 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4744 ac_cv_search_dlsym=$ac_res
2974be62
AM
4745fi
4746rm -f core conftest.err conftest.$ac_objext \
4747 conftest$ac_exeext
d0ac1c44 4748 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4749 break
4750fi
4751done
d0ac1c44 4752if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4753
4754else
458412c3 4755 ac_cv_search_dlsym=no
2974be62
AM
4756fi
4757rm conftest.$ac_ext
4758LIBS=$ac_func_search_save_LIBS
4759fi
458412c3
TT
4760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4761$as_echo "$ac_cv_search_dlsym" >&6; }
4762ac_res=$ac_cv_search_dlsym
2974be62
AM
4763if test "$ac_res" != no; then :
4764 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4765
4766fi
4767
4768 fi
da2f07f1
JK
4769
4770
4771case "${host}" in
4772 sparc-*-solaris*|i[3-7]86-*-solaris*)
4773 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4774 # are mutually exclusive; and without procfs support, the bfd/ elf module
4775 # cannot provide certain routines such as elfcore_write_prpsinfo
4776 # or elfcore_write_prstatus. So unless the user explicitly requested
4777 # large-file support through the --enable-largefile switch, disable
4778 # large-file support in favor of procfs support.
4779 test "${target}" = "${host}" -a "x$plugins" = xno \
4780 && : ${enable_largefile="no"}
4781 ;;
4782esac
4783
4784# Check whether --enable-largefile was given.
4785if test "${enable_largefile+set}" = set; then :
4786 enableval=$enable_largefile;
4787fi
4788
4789if test "$enable_largefile" != no; then
4790
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4792$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4793if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4794 $as_echo_n "(cached) " >&6
4795else
4796 ac_cv_sys_largefile_CC=no
4797 if test "$GCC" != yes; then
4798 ac_save_CC=$CC
4799 while :; do
4800 # IRIX 6.2 and later do not support large files by default,
4801 # so use the C compiler's -n32 option if that helps.
4802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4803/* end confdefs.h. */
4804#include <sys/types.h>
4805 /* Check that off_t can represent 2**63 - 1 correctly.
4806 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4807 since some C++ compilers masquerading as C compilers
4808 incorrectly reject 9223372036854775807. */
4809#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4810 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4811 && LARGE_OFF_T % 2147483647 == 1)
4812 ? 1 : -1];
4813int
4814main ()
4815{
4816
4817 ;
4818 return 0;
4819}
4820_ACEOF
4821 if ac_fn_c_try_compile "$LINENO"; then :
4822 break
4823fi
4824rm -f core conftest.err conftest.$ac_objext
4825 CC="$CC -n32"
4826 if ac_fn_c_try_compile "$LINENO"; then :
4827 ac_cv_sys_largefile_CC=' -n32'; break
4828fi
4829rm -f core conftest.err conftest.$ac_objext
4830 break
4831 done
4832 CC=$ac_save_CC
4833 rm -f conftest.$ac_ext
4834 fi
4835fi
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4837$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4838 if test "$ac_cv_sys_largefile_CC" != no; then
4839 CC=$CC$ac_cv_sys_largefile_CC
4840 fi
4841
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4843$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4844if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4845 $as_echo_n "(cached) " >&6
4846else
4847 while :; do
4848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4849/* end confdefs.h. */
4850#include <sys/types.h>
4851 /* Check that off_t can represent 2**63 - 1 correctly.
4852 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4853 since some C++ compilers masquerading as C compilers
4854 incorrectly reject 9223372036854775807. */
4855#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4856 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4857 && LARGE_OFF_T % 2147483647 == 1)
4858 ? 1 : -1];
4859int
4860main ()
4861{
4862
4863 ;
4864 return 0;
4865}
4866_ACEOF
4867if ac_fn_c_try_compile "$LINENO"; then :
4868 ac_cv_sys_file_offset_bits=no; break
4869fi
4870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4872/* end confdefs.h. */
4873#define _FILE_OFFSET_BITS 64
4874#include <sys/types.h>
4875 /* Check that off_t can represent 2**63 - 1 correctly.
4876 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4877 since some C++ compilers masquerading as C compilers
4878 incorrectly reject 9223372036854775807. */
4879#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4880 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4881 && LARGE_OFF_T % 2147483647 == 1)
4882 ? 1 : -1];
4883int
4884main ()
4885{
4886
4887 ;
4888 return 0;
4889}
4890_ACEOF
4891if ac_fn_c_try_compile "$LINENO"; then :
4892 ac_cv_sys_file_offset_bits=64; break
4893fi
4894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4895 ac_cv_sys_file_offset_bits=unknown
4896 break
4897done
4898fi
4899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4900$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4901case $ac_cv_sys_file_offset_bits in #(
4902 no | unknown) ;;
4903 *)
4904cat >>confdefs.h <<_ACEOF
4905#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4906_ACEOF
4907;;
4908esac
4909rm -rf conftest*
4910 if test $ac_cv_sys_file_offset_bits = unknown; then
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4912$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4913if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4914 $as_echo_n "(cached) " >&6
4915else
4916 while :; do
4917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4918/* end confdefs.h. */
4919#include <sys/types.h>
4920 /* Check that off_t can represent 2**63 - 1 correctly.
4921 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4922 since some C++ compilers masquerading as C compilers
4923 incorrectly reject 9223372036854775807. */
4924#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4925 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4926 && LARGE_OFF_T % 2147483647 == 1)
4927 ? 1 : -1];
4928int
4929main ()
4930{
4931
4932 ;
4933 return 0;
4934}
4935_ACEOF
4936if ac_fn_c_try_compile "$LINENO"; then :
4937 ac_cv_sys_large_files=no; break
4938fi
4939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4941/* end confdefs.h. */
4942#define _LARGE_FILES 1
4943#include <sys/types.h>
4944 /* Check that off_t can represent 2**63 - 1 correctly.
4945 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4946 since some C++ compilers masquerading as C compilers
4947 incorrectly reject 9223372036854775807. */
4948#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4949 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4950 && LARGE_OFF_T % 2147483647 == 1)
4951 ? 1 : -1];
4952int
4953main ()
4954{
4955
4956 ;
4957 return 0;
4958}
4959_ACEOF
4960if ac_fn_c_try_compile "$LINENO"; then :
4961 ac_cv_sys_large_files=1; break
4962fi
4963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4964 ac_cv_sys_large_files=unknown
4965 break
4966done
4967fi
4968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4969$as_echo "$ac_cv_sys_large_files" >&6; }
4970case $ac_cv_sys_large_files in #(
4971 no | unknown) ;;
4972 *)
4973cat >>confdefs.h <<_ACEOF
4974#define _LARGE_FILES $ac_cv_sys_large_files
4975_ACEOF
4976;;
4977esac
4978rm -rf conftest*
4979 fi
d0ac1c44
SM
4980
4981
da2f07f1
JK
4982fi
4983
4984
4985
81ecdfbb
RW
4986
4987
4988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4989$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4990if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4991 $as_echo_n "(cached) " >&6
4992else
4993 am_cv_prog_cc_stdc=no
4994ac_save_CC="$CC"
4995# Don't try gcc -ansi; that turns off useful extensions and
4996# breaks some systems' header files.
4997# AIX -qlanglvl=ansi
4998# Ultrix and OSF/1 -std1
4999# HP-UX 10.20 and later -Ae
5000# HP-UX older versions -Aa -D_HPUX_SOURCE
5001# SVR4 -Xc -D__EXTENSIONS__
5002for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5003do
783e057b 5004 CC="$ac_save_CC $ac_arg"
81ecdfbb 5005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5006/* end confdefs.h. */
5007#include <stdarg.h>
5008#include <stdio.h>
5009#include <sys/types.h>
5010#include <sys/stat.h>
5011/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5012struct buf { int x; };
5013FILE * (*rcsopen) (struct buf *, struct stat *, int);
5014static char *e (p, i)
5015 char **p;
5016 int i;
5017{
5018 return p[i];
5019}
5020static char *f (char * (*g) (char **, int), char **p, ...)
5021{
5022 char *s;
5023 va_list v;
5024 va_start (v,p);
5025 s = g (p, va_arg (v,int));
5026 va_end (v);
5027 return s;
5028}
5029int test (int i, double x);
5030struct s1 {int (*f) (int a);};
5031struct s2 {int (*f) (double a);};
5032int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5033int argc;
5034char **argv;
5035
5036int
5037main ()
5038{
5039
5040return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5041
5042 ;
5043 return 0;
5044}
5045_ACEOF
81ecdfbb 5046if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5047 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 5048fi
81ecdfbb 5049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5050done
5051CC="$ac_save_CC"
5052
5053fi
5054
5055if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5057$as_echo "none needed" >&6; }
783e057b 5058else
81ecdfbb
RW
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5060$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
5061fi
5062case "x$am_cv_prog_cc_stdc" in
5063 x|xno) ;;
5064 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5065esac
5066
d0ac1c44
SM
5067# Expand $ac_aux_dir to an absolute path.
5068am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 5069
d0ac1c44 5070if test x"${install_sh+set}" != xset; then
4869db5e
RM
5071 case $am_aux_dir in
5072 *\ * | *\ *)
5073 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5074 *)
5075 install_sh="\${SHELL} $am_aux_dir/install-sh"
5076 esac
5077fi
5078
d0ac1c44
SM
5079# Installed binaries are usually stripped using 'strip' when the user
5080# run "make install-strip". However 'strip' might not be the right
4869db5e 5081# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 5082# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
5083if test "$cross_compiling" != no; then
5084 if test -n "$ac_tool_prefix"; then
5085 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5086set dummy ${ac_tool_prefix}strip; ac_word=$2
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5089if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
5090 $as_echo_n "(cached) " >&6
5091else
5092 if test -n "$STRIP"; then
5093 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5094else
5095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096for as_dir in $PATH
5097do
5098 IFS=$as_save_IFS
5099 test -z "$as_dir" && as_dir=.
5100 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5102 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5104 break 2
5105 fi
5106done
5107 done
5108IFS=$as_save_IFS
5109
5110fi
5111fi
5112STRIP=$ac_cv_prog_STRIP
5113if test -n "$STRIP"; then
5114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5115$as_echo "$STRIP" >&6; }
5116else
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
5119fi
5120
5121
5122fi
5123if test -z "$ac_cv_prog_STRIP"; then
5124 ac_ct_STRIP=$STRIP
5125 # Extract the first word of "strip", so it can be a program name with args.
5126set dummy strip; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5129if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5130 $as_echo_n "(cached) " >&6
5131else
5132 if test -n "$ac_ct_STRIP"; then
5133 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5134else
5135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5136for as_dir in $PATH
5137do
5138 IFS=$as_save_IFS
5139 test -z "$as_dir" && as_dir=.
5140 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5141 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5142 ac_cv_prog_ac_ct_STRIP="strip"
5143 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5144 break 2
5145 fi
5146done
5147 done
5148IFS=$as_save_IFS
5149
5150fi
5151fi
5152ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5153if test -n "$ac_ct_STRIP"; then
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5155$as_echo "$ac_ct_STRIP" >&6; }
5156else
5157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158$as_echo "no" >&6; }
5159fi
5160
5161 if test "x$ac_ct_STRIP" = x; then
5162 STRIP=":"
5163 else
5164 case $cross_compiling:$ac_tool_warned in
5165yes:)
5166{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5167$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5168ac_tool_warned=yes ;;
5169esac
5170 STRIP=$ac_ct_STRIP
5171 fi
5172else
5173 STRIP="$ac_cv_prog_STRIP"
5174fi
5175
5176fi
5177INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5178
783e057b
DJ
5179
5180ac_aux_dir=
81ecdfbb 5181for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5182 if test -f "$ac_dir/install-sh"; then
5183 ac_aux_dir=$ac_dir
5184 ac_install_sh="$ac_aux_dir/install-sh -c"
5185 break
5186 elif test -f "$ac_dir/install.sh"; then
5187 ac_aux_dir=$ac_dir
5188 ac_install_sh="$ac_aux_dir/install.sh -c"
5189 break
5190 elif test -f "$ac_dir/shtool"; then
5191 ac_aux_dir=$ac_dir
5192 ac_install_sh="$ac_aux_dir/shtool install -c"
5193 break
5194 fi
783e057b
DJ
5195done
5196if test -z "$ac_aux_dir"; then
d0ac1c44 5197 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5198fi
81ecdfbb
RW
5199
5200# These three variables are undocumented and unsupported,
5201# and are intended to be withdrawn in a future Autoconf release.
5202# They can cause serious problems if a builder's source tree is in a directory
5203# whose full name contains unusual characters.
5204ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5205ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5206ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5207
783e057b 5208
783e057b 5209
9009e1ae
MR
5210test "$program_prefix" != NONE &&
5211 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5212# Use a double $ so make ignores it.
5213test "$program_suffix" != NONE &&
5214 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5215# Double any \ or $.
5216# By default was `s,x,x', remove it if useless.
5217ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5218program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5219
81ecdfbb 5220
0bcda685
PA
5221# We require a C++11 compiler. Check if one is available, and if
5222# necessary, set CXX_DIALECT to some -std=xxx switch.
5223
41260ac2 5224 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5225 ac_ext=cpp
5226ac_cpp='$CXXCPP $CPPFLAGS'
5227ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5228ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5229ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5230 CXX_DIALECT=""
5231 ac_success=no
5232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5233$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5234if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5235 $as_echo_n "(cached) " >&6
5236else
5237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5238/* end confdefs.h. */
5239
5240
5241// If the compiler admits that it is not ready for C++11, why torture it?
5242// Hopefully, this will speed up the test.
5243
5244#ifndef __cplusplus
5245
5246#error "This is not a C++ compiler"
5247
5248#elif __cplusplus < 201103L
5249
5250#error "This is not a C++11 compiler"
5251
5252#else
5253
5254namespace cxx11
5255{
5256
5257 namespace test_static_assert
5258 {
5259
5260 template <typename T>
5261 struct check
5262 {
5263 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5264 };
5265
5266 }
5267
5268 namespace test_final_override
5269 {
5270
5271 struct Base
5272 {
5273 virtual void f() {}
5274 };
5275
5276 struct Derived : public Base
5277 {
5278 virtual void f() override {}
5279 };
5280
5281 }
5282
5283 namespace test_double_right_angle_brackets
5284 {
5285
5286 template < typename T >
5287 struct check {};
5288
5289 typedef check<void> single_type;
5290 typedef check<check<void>> double_type;
5291 typedef check<check<check<void>>> triple_type;
5292 typedef check<check<check<check<void>>>> quadruple_type;
5293
5294 }
5295
5296 namespace test_decltype
5297 {
5298
5299 int
5300 f()
5301 {
5302 int a = 1;
5303 decltype(a) b = 2;
5304 return a + b;
5305 }
5306
5307 }
5308
5309 namespace test_type_deduction
5310 {
5311
5312 template < typename T1, typename T2 >
5313 struct is_same
5314 {
5315 static const bool value = false;
5316 };
5317
5318 template < typename T >
5319 struct is_same<T, T>
5320 {
5321 static const bool value = true;
5322 };
5323
5324 template < typename T1, typename T2 >
5325 auto
5326 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5327 {
5328 return a1 + a2;
5329 }
5330
5331 int
5332 test(const int c, volatile int v)
5333 {
5334 static_assert(is_same<int, decltype(0)>::value == true, "");
5335 static_assert(is_same<int, decltype(c)>::value == false, "");
5336 static_assert(is_same<int, decltype(v)>::value == false, "");
5337 auto ac = c;
5338 auto av = v;
5339 auto sumi = ac + av + 'x';
5340 auto sumf = ac + av + 1.0;
5341 static_assert(is_same<int, decltype(ac)>::value == true, "");
5342 static_assert(is_same<int, decltype(av)>::value == true, "");
5343 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5344 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5345 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5346 return (sumf > 0.0) ? sumi : add(c, v);
5347 }
5348
5349 }
5350
5351 namespace test_noexcept
5352 {
5353
5354 int f() { return 0; }
5355 int g() noexcept { return 0; }
5356
5357 static_assert(noexcept(f()) == false, "");
5358 static_assert(noexcept(g()) == true, "");
5359
5360 }
5361
5362 namespace test_constexpr
5363 {
5364
5365 template < typename CharT >
5366 unsigned long constexpr
5367 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5368 {
5369 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5370 }
5371
5372 template < typename CharT >
5373 unsigned long constexpr
5374 strlen_c(const CharT *const s) noexcept
5375 {
5376 return strlen_c_r(s, 0UL);
5377 }
5378
5379 static_assert(strlen_c("") == 0UL, "");
5380 static_assert(strlen_c("1") == 1UL, "");
5381 static_assert(strlen_c("example") == 7UL, "");
5382 static_assert(strlen_c("another\0example") == 7UL, "");
5383
5384 }
5385
5386 namespace test_rvalue_references
5387 {
5388
5389 template < int N >
5390 struct answer
5391 {
5392 static constexpr int value = N;
5393 };
5394
5395 answer<1> f(int&) { return answer<1>(); }
5396 answer<2> f(const int&) { return answer<2>(); }
5397 answer<3> f(int&&) { return answer<3>(); }
5398
5399 void
5400 test()
5401 {
5402 int i = 0;
5403 const int c = 0;
5404 static_assert(decltype(f(i))::value == 1, "");
5405 static_assert(decltype(f(c))::value == 2, "");
5406 static_assert(decltype(f(0))::value == 3, "");
5407 }
5408
5409 }
5410
5411 namespace test_uniform_initialization
5412 {
5413
5414 struct test
5415 {
5416 static const int zero {};
5417 static const int one {1};
5418 };
5419
5420 static_assert(test::zero == 0, "");
5421 static_assert(test::one == 1, "");
5422
5423 }
5424
5425 namespace test_lambdas
5426 {
5427
5428 void
5429 test1()
5430 {
5431 auto lambda1 = [](){};
5432 auto lambda2 = lambda1;
5433 lambda1();
5434 lambda2();
5435 }
5436
5437 int
5438 test2()
5439 {
5440 auto a = [](int i, int j){ return i + j; }(1, 2);
5441 auto b = []() -> int { return '0'; }();
5442 auto c = [=](){ return a + b; }();
5443 auto d = [&](){ return c; }();
5444 auto e = [a, &b](int x) mutable {
5445 const auto identity = [](int y){ return y; };
5446 for (auto i = 0; i < a; ++i)
5447 a += b--;
5448 return x + identity(a + b);
5449 }(0);
5450 return a + b + c + d + e;
5451 }
5452
5453 int
5454 test3()
5455 {
5456 const auto nullary = [](){ return 0; };
5457 const auto unary = [](int x){ return x; };
5458 using nullary_t = decltype(nullary);
5459 using unary_t = decltype(unary);
5460 const auto higher1st = [](nullary_t f){ return f(); };
5461 const auto higher2nd = [unary](nullary_t f1){
5462 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5463 };
5464 return higher1st(nullary) + higher2nd(nullary)(unary);
5465 }
5466
5467 }
5468
5469 namespace test_variadic_templates
5470 {
5471
5472 template <int...>
5473 struct sum;
5474
5475 template <int N0, int... N1toN>
5476 struct sum<N0, N1toN...>
5477 {
5478 static constexpr auto value = N0 + sum<N1toN...>::value;
5479 };
5480
5481 template <>
5482 struct sum<>
5483 {
5484 static constexpr auto value = 0;
5485 };
5486
5487 static_assert(sum<>::value == 0, "");
5488 static_assert(sum<1>::value == 1, "");
5489 static_assert(sum<23>::value == 23, "");
5490 static_assert(sum<1, 2>::value == 3, "");
5491 static_assert(sum<5, 5, 11>::value == 21, "");
5492 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5493
5494 }
5495
5496 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5497 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5498 // because of this.
5499 namespace test_template_alias_sfinae
5500 {
5501
5502 struct foo {};
5503
5504 template<typename T>
5505 using member = typename T::member_type;
5506
5507 template<typename T>
5508 void func(...) {}
5509
5510 template<typename T>
5511 void func(member<T>*) {}
5512
5513 void test();
5514
5515 void test() { func<foo>(0); }
5516
5517 }
5518
5519} // namespace cxx11
5520
5521#endif // __cplusplus >= 201103L
5522
5523
5524
5525_ACEOF
5526if ac_fn_cxx_try_compile "$LINENO"; then :
5527 ax_cv_cxx_compile_cxx11=yes
5528else
5529 ax_cv_cxx_compile_cxx11=no
5530fi
5531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5532fi
5533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5534$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5535 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5536 ac_success=yes
5537 fi
5538
5539 if test x$ac_success = xno; then
41260ac2
SM
5540 for alternative in ${ax_cxx_compile_alternatives}; do
5541 switch="-std=gnu++${alternative}"
0bcda685
PA
5542 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5544$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5545if eval \${$cachevar+:} false; then :
0bcda685
PA
5546 $as_echo_n "(cached) " >&6
5547else
5548 ac_save_CXX="$CXX"
5549 CXX="$CXX $switch"
5550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5551/* end confdefs.h. */
5552
5553
5554// If the compiler admits that it is not ready for C++11, why torture it?
5555// Hopefully, this will speed up the test.
5556
5557#ifndef __cplusplus
5558
5559#error "This is not a C++ compiler"
5560
5561#elif __cplusplus < 201103L
5562
5563#error "This is not a C++11 compiler"
5564
5565#else
5566
5567namespace cxx11
5568{
5569
5570 namespace test_static_assert
5571 {
5572
5573 template <typename T>
5574 struct check
5575 {
5576 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5577 };
5578
5579 }
5580
5581 namespace test_final_override
5582 {
5583
5584 struct Base
5585 {
5586 virtual void f() {}
5587 };
5588
5589 struct Derived : public Base
5590 {
5591 virtual void f() override {}
5592 };
5593
5594 }
5595
5596 namespace test_double_right_angle_brackets
5597 {
5598
5599 template < typename T >
5600 struct check {};
5601
5602 typedef check<void> single_type;
5603 typedef check<check<void>> double_type;
5604 typedef check<check<check<void>>> triple_type;
5605 typedef check<check<check<check<void>>>> quadruple_type;
5606
5607 }
5608
5609 namespace test_decltype
5610 {
5611
5612 int
5613 f()
5614 {
5615 int a = 1;
5616 decltype(a) b = 2;
5617 return a + b;
5618 }
5619
5620 }
5621
5622 namespace test_type_deduction
5623 {
5624
5625 template < typename T1, typename T2 >
5626 struct is_same
5627 {
5628 static const bool value = false;
5629 };
5630
5631 template < typename T >
5632 struct is_same<T, T>
5633 {
5634 static const bool value = true;
5635 };
5636
5637 template < typename T1, typename T2 >
5638 auto
5639 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5640 {
5641 return a1 + a2;
5642 }
5643
5644 int
5645 test(const int c, volatile int v)
5646 {
5647 static_assert(is_same<int, decltype(0)>::value == true, "");
5648 static_assert(is_same<int, decltype(c)>::value == false, "");
5649 static_assert(is_same<int, decltype(v)>::value == false, "");
5650 auto ac = c;
5651 auto av = v;
5652 auto sumi = ac + av + 'x';
5653 auto sumf = ac + av + 1.0;
5654 static_assert(is_same<int, decltype(ac)>::value == true, "");
5655 static_assert(is_same<int, decltype(av)>::value == true, "");
5656 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5657 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5658 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5659 return (sumf > 0.0) ? sumi : add(c, v);
5660 }
5661
5662 }
5663
5664 namespace test_noexcept
5665 {
5666
5667 int f() { return 0; }
5668 int g() noexcept { return 0; }
5669
5670 static_assert(noexcept(f()) == false, "");
5671 static_assert(noexcept(g()) == true, "");
5672
5673 }
5674
5675 namespace test_constexpr
5676 {
5677
5678 template < typename CharT >
5679 unsigned long constexpr
5680 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5681 {
5682 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5683 }
5684
5685 template < typename CharT >
5686 unsigned long constexpr
5687 strlen_c(const CharT *const s) noexcept
5688 {
5689 return strlen_c_r(s, 0UL);
5690 }
5691
5692 static_assert(strlen_c("") == 0UL, "");
5693 static_assert(strlen_c("1") == 1UL, "");
5694 static_assert(strlen_c("example") == 7UL, "");
5695 static_assert(strlen_c("another\0example") == 7UL, "");
5696
5697 }
5698
5699 namespace test_rvalue_references
5700 {
5701
5702 template < int N >
5703 struct answer
5704 {
5705 static constexpr int value = N;
5706 };
5707
5708 answer<1> f(int&) { return answer<1>(); }
5709 answer<2> f(const int&) { return answer<2>(); }
5710 answer<3> f(int&&) { return answer<3>(); }
5711
5712 void
5713 test()
5714 {
5715 int i = 0;
5716 const int c = 0;
5717 static_assert(decltype(f(i))::value == 1, "");
5718 static_assert(decltype(f(c))::value == 2, "");
5719 static_assert(decltype(f(0))::value == 3, "");
5720 }
5721
5722 }
5723
5724 namespace test_uniform_initialization
5725 {
5726
5727 struct test
5728 {
5729 static const int zero {};
5730 static const int one {1};
5731 };
5732
5733 static_assert(test::zero == 0, "");
5734 static_assert(test::one == 1, "");
5735
5736 }
5737
5738 namespace test_lambdas
5739 {
5740
5741 void
5742 test1()
5743 {
5744 auto lambda1 = [](){};
5745 auto lambda2 = lambda1;
5746 lambda1();
5747 lambda2();
5748 }
5749
5750 int
5751 test2()
5752 {
5753 auto a = [](int i, int j){ return i + j; }(1, 2);
5754 auto b = []() -> int { return '0'; }();
5755 auto c = [=](){ return a + b; }();
5756 auto d = [&](){ return c; }();
5757 auto e = [a, &b](int x) mutable {
5758 const auto identity = [](int y){ return y; };
5759 for (auto i = 0; i < a; ++i)
5760 a += b--;
5761 return x + identity(a + b);
5762 }(0);
5763 return a + b + c + d + e;
5764 }
5765
5766 int
5767 test3()
5768 {
5769 const auto nullary = [](){ return 0; };
5770 const auto unary = [](int x){ return x; };
5771 using nullary_t = decltype(nullary);
5772 using unary_t = decltype(unary);
5773 const auto higher1st = [](nullary_t f){ return f(); };
5774 const auto higher2nd = [unary](nullary_t f1){
5775 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5776 };
5777 return higher1st(nullary) + higher2nd(nullary)(unary);
5778 }
5779
5780 }
5781
5782 namespace test_variadic_templates
5783 {
5784
5785 template <int...>
5786 struct sum;
5787
5788 template <int N0, int... N1toN>
5789 struct sum<N0, N1toN...>
5790 {
5791 static constexpr auto value = N0 + sum<N1toN...>::value;
5792 };
5793
5794 template <>
5795 struct sum<>
5796 {
5797 static constexpr auto value = 0;
5798 };
5799
5800 static_assert(sum<>::value == 0, "");
5801 static_assert(sum<1>::value == 1, "");
5802 static_assert(sum<23>::value == 23, "");
5803 static_assert(sum<1, 2>::value == 3, "");
5804 static_assert(sum<5, 5, 11>::value == 21, "");
5805 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5806
5807 }
5808
5809 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5810 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5811 // because of this.
5812 namespace test_template_alias_sfinae
5813 {
5814
5815 struct foo {};
5816
5817 template<typename T>
5818 using member = typename T::member_type;
5819
5820 template<typename T>
5821 void func(...) {}
5822
5823 template<typename T>
5824 void func(member<T>*) {}
5825
5826 void test();
5827
5828 void test() { func<foo>(0); }
5829
5830 }
5831
5832} // namespace cxx11
5833
5834#endif // __cplusplus >= 201103L
5835
5836
5837
5838_ACEOF
5839if ac_fn_cxx_try_compile "$LINENO"; then :
5840 eval $cachevar=yes
5841else
5842 eval $cachevar=no
5843fi
5844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5845 CXX="$ac_save_CXX"
5846fi
5847eval ac_res=\$$cachevar
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5849$as_echo "$ac_res" >&6; }
5850 if eval test x\$$cachevar = xyes; then
5851 CXX_DIALECT="$switch"
5852 ac_success=yes
5853 break
5854 fi
5855 done
5856 fi
5857
5858 if test x$ac_success = xno; then
41260ac2
SM
5859 for alternative in ${ax_cxx_compile_alternatives}; do
5860 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5861 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5863$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5864if eval \${$cachevar+:} false; then :
0bcda685
PA
5865 $as_echo_n "(cached) " >&6
5866else
5867 ac_save_CXX="$CXX"
41260ac2
SM
5868 CXX="$CXX $switch"
5869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5870/* end confdefs.h. */
5871
5872
5873// If the compiler admits that it is not ready for C++11, why torture it?
5874// Hopefully, this will speed up the test.
5875
5876#ifndef __cplusplus
5877
5878#error "This is not a C++ compiler"
5879
5880#elif __cplusplus < 201103L
5881
5882#error "This is not a C++11 compiler"
5883
5884#else
5885
5886namespace cxx11
5887{
5888
5889 namespace test_static_assert
5890 {
5891
5892 template <typename T>
5893 struct check
5894 {
5895 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5896 };
5897
5898 }
5899
5900 namespace test_final_override
5901 {
5902
5903 struct Base
5904 {
5905 virtual void f() {}
5906 };
5907
5908 struct Derived : public Base
5909 {
5910 virtual void f() override {}
5911 };
5912
5913 }
5914
5915 namespace test_double_right_angle_brackets
5916 {
5917
5918 template < typename T >
5919 struct check {};
5920
5921 typedef check<void> single_type;
5922 typedef check<check<void>> double_type;
5923 typedef check<check<check<void>>> triple_type;
5924 typedef check<check<check<check<void>>>> quadruple_type;
5925
5926 }
5927
5928 namespace test_decltype
5929 {
5930
5931 int
5932 f()
5933 {
5934 int a = 1;
5935 decltype(a) b = 2;
5936 return a + b;
5937 }
5938
5939 }
5940
5941 namespace test_type_deduction
5942 {
5943
5944 template < typename T1, typename T2 >
5945 struct is_same
5946 {
5947 static const bool value = false;
5948 };
5949
5950 template < typename T >
5951 struct is_same<T, T>
5952 {
5953 static const bool value = true;
5954 };
5955
5956 template < typename T1, typename T2 >
5957 auto
5958 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5959 {
5960 return a1 + a2;
5961 }
5962
5963 int
5964 test(const int c, volatile int v)
5965 {
5966 static_assert(is_same<int, decltype(0)>::value == true, "");
5967 static_assert(is_same<int, decltype(c)>::value == false, "");
5968 static_assert(is_same<int, decltype(v)>::value == false, "");
5969 auto ac = c;
5970 auto av = v;
5971 auto sumi = ac + av + 'x';
5972 auto sumf = ac + av + 1.0;
5973 static_assert(is_same<int, decltype(ac)>::value == true, "");
5974 static_assert(is_same<int, decltype(av)>::value == true, "");
5975 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5976 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5977 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5978 return (sumf > 0.0) ? sumi : add(c, v);
5979 }
5980
5981 }
5982
5983 namespace test_noexcept
5984 {
5985
5986 int f() { return 0; }
5987 int g() noexcept { return 0; }
5988
5989 static_assert(noexcept(f()) == false, "");
5990 static_assert(noexcept(g()) == true, "");
5991
5992 }
5993
5994 namespace test_constexpr
5995 {
5996
5997 template < typename CharT >
5998 unsigned long constexpr
5999 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6000 {
6001 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6002 }
6003
6004 template < typename CharT >
6005 unsigned long constexpr
6006 strlen_c(const CharT *const s) noexcept
6007 {
6008 return strlen_c_r(s, 0UL);
6009 }
6010
6011 static_assert(strlen_c("") == 0UL, "");
6012 static_assert(strlen_c("1") == 1UL, "");
6013 static_assert(strlen_c("example") == 7UL, "");
6014 static_assert(strlen_c("another\0example") == 7UL, "");
6015
6016 }
6017
6018 namespace test_rvalue_references
6019 {
6020
6021 template < int N >
6022 struct answer
6023 {
6024 static constexpr int value = N;
6025 };
6026
6027 answer<1> f(int&) { return answer<1>(); }
6028 answer<2> f(const int&) { return answer<2>(); }
6029 answer<3> f(int&&) { return answer<3>(); }
6030
6031 void
6032 test()
6033 {
6034 int i = 0;
6035 const int c = 0;
6036 static_assert(decltype(f(i))::value == 1, "");
6037 static_assert(decltype(f(c))::value == 2, "");
6038 static_assert(decltype(f(0))::value == 3, "");
6039 }
6040
6041 }
6042
6043 namespace test_uniform_initialization
6044 {
6045
6046 struct test
6047 {
6048 static const int zero {};
6049 static const int one {1};
6050 };
6051
6052 static_assert(test::zero == 0, "");
6053 static_assert(test::one == 1, "");
6054
6055 }
6056
6057 namespace test_lambdas
6058 {
6059
6060 void
6061 test1()
6062 {
6063 auto lambda1 = [](){};
6064 auto lambda2 = lambda1;
6065 lambda1();
6066 lambda2();
6067 }
6068
6069 int
6070 test2()
6071 {
6072 auto a = [](int i, int j){ return i + j; }(1, 2);
6073 auto b = []() -> int { return '0'; }();
6074 auto c = [=](){ return a + b; }();
6075 auto d = [&](){ return c; }();
6076 auto e = [a, &b](int x) mutable {
6077 const auto identity = [](int y){ return y; };
6078 for (auto i = 0; i < a; ++i)
6079 a += b--;
6080 return x + identity(a + b);
6081 }(0);
6082 return a + b + c + d + e;
6083 }
6084
6085 int
6086 test3()
6087 {
6088 const auto nullary = [](){ return 0; };
6089 const auto unary = [](int x){ return x; };
6090 using nullary_t = decltype(nullary);
6091 using unary_t = decltype(unary);
6092 const auto higher1st = [](nullary_t f){ return f(); };
6093 const auto higher2nd = [unary](nullary_t f1){
6094 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6095 };
6096 return higher1st(nullary) + higher2nd(nullary)(unary);
6097 }
6098
6099 }
6100
6101 namespace test_variadic_templates
6102 {
6103
6104 template <int...>
6105 struct sum;
6106
6107 template <int N0, int... N1toN>
6108 struct sum<N0, N1toN...>
6109 {
6110 static constexpr auto value = N0 + sum<N1toN...>::value;
6111 };
6112
6113 template <>
6114 struct sum<>
6115 {
6116 static constexpr auto value = 0;
6117 };
6118
6119 static_assert(sum<>::value == 0, "");
6120 static_assert(sum<1>::value == 1, "");
6121 static_assert(sum<23>::value == 23, "");
6122 static_assert(sum<1, 2>::value == 3, "");
6123 static_assert(sum<5, 5, 11>::value == 21, "");
6124 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6125
6126 }
6127
6128 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6129 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6130 // because of this.
6131 namespace test_template_alias_sfinae
6132 {
6133
6134 struct foo {};
6135
6136 template<typename T>
6137 using member = typename T::member_type;
6138
6139 template<typename T>
6140 void func(...) {}
6141
6142 template<typename T>
6143 void func(member<T>*) {}
6144
6145 void test();
6146
6147 void test() { func<foo>(0); }
6148
6149 }
6150
6151} // namespace cxx11
6152
6153#endif // __cplusplus >= 201103L
6154
6155
6156
6157_ACEOF
6158if ac_fn_cxx_try_compile "$LINENO"; then :
6159 eval $cachevar=yes
6160else
6161 eval $cachevar=no
6162fi
6163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6164 CXX="$ac_save_CXX"
0bcda685
PA
6165fi
6166eval ac_res=\$$cachevar
6167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6168$as_echo "$ac_res" >&6; }
41260ac2
SM
6169 if eval test x\$$cachevar = xyes; then
6170 CXX_DIALECT="$switch"
6171 ac_success=yes
6172 break
6173 fi
6174 done
6175 if test x$ac_success = xyes; then
0bcda685
PA
6176 break
6177 fi
6178 done
6179 fi
6180 ac_ext=c
6181ac_cpp='$CPP $CPPFLAGS'
6182ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6183ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6184ac_compiler_gnu=$ac_cv_c_compiler_gnu
6185
6186 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6187 if test x$ac_success = xno; then
d0ac1c44 6188 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6189 fi
6190 fi
6191 if test x$ac_success = xno; then
6192 HAVE_CXX11=0
6193 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6194$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6195 else
6196 HAVE_CXX11=1
6197
6198$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6199
6200 fi
6201
6202
6203
6204
a417dc56
RW
6205# Dependency checking.
6206rm -rf .tst 2>/dev/null
6207mkdir .tst 2>/dev/null
6208if test -d .tst; then
6209 am__leading_dot=.
6210else
6211 am__leading_dot=_
6212fi
6213rmdir .tst 2>/dev/null
6214
6215DEPDIR="${am__leading_dot}deps"
6216
81ecdfbb 6217ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6218
6219
6220depcc="$CC" am_compiler_list=
6221
6222am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6224$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6225if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6226 $as_echo_n "(cached) " >&6
a417dc56
RW
6227else
6228 if test -f "$am_depcomp"; then
6229 # We make a subdir and do the tests there. Otherwise we can end up
6230 # making bogus files that we don't know about and never remove. For
6231 # instance it was reported that on HP-UX the gcc test will end up
6232 # making a dummy file named `D' -- because `-MD' means `put the output
6233 # in D'.
6234 mkdir conftest.dir
6235 # Copy depcomp to subdir because otherwise we won't find it if we're
6236 # using a relative directory.
6237 cp "$am_depcomp" conftest.dir
6238 cd conftest.dir
6239 # We will build objects and dependencies in a subdirectory because
6240 # it helps to detect inapplicable dependency modes. For instance
6241 # both Tru64's cc and ICC support -MD to output dependencies as a
6242 # side effect of compilation, but ICC will put the dependencies in
6243 # the current directory while Tru64 will put them in the object
6244 # directory.
6245 mkdir sub
6246
6247 am_cv_CC_dependencies_compiler_type=none
6248 if test "$am_compiler_list" = ""; then
6249 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6250 fi
6251 for depmode in $am_compiler_list; do
6252 if test $depmode = none; then break; fi
6253
81ecdfbb 6254 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6255 # Setup a source with many dependencies, because some compilers
6256 # like to wrap large dependency lists on column 80 (with \), and
6257 # we should not choose a depcomp mode which is confused by this.
6258 #
6259 # We need to recreate these files for each test, as the compiler may
6260 # overwrite some of them when testing with obscure command lines.
6261 # This happens at least with the AIX C compiler.
6262 : > sub/conftest.c
6263 for i in 1 2 3 4 5 6; do
6264 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6265 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6266 # Solaris 8's {/usr,}/bin/sh.
6267 touch sub/conftst$i.h
6268 done
6269 echo "include sub/conftest.Po" > confmf
6270
6271 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6272 # mode. It turns out that the SunPro C++ compiler does not properly
6273 # handle `-M -o', and we need to detect this.
6274 depcmd="depmode=$depmode \
6275 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6276 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6277 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6278 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6279 if env $depcmd > conftest.err 2>&1 &&
6280 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6281 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6282 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6283 # icc doesn't choke on unknown options, it will just issue warnings
6284 # or remarks (even with -Werror). So we grep stderr for any message
6285 # that says an option was ignored or not supported.
6286 # When given -MP, icc 7.0 and 7.1 complain thusly:
6287 # icc: Command line warning: ignoring option '-M'; no argument required
6288 # The diagnosis changed in icc 8.0:
6289 # icc: Command line remark: option '-MP' not supported
6290 if (grep 'ignoring option' conftest.err ||
6291 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6292 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6293 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6294 break
6295 fi
6296 fi
81ecdfbb 6297 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6298 sed -e 's/^/| /' < conftest.err >&5
6299 done
6300
6301 cd ..
6302 rm -rf conftest.dir
6303else
6304 am_cv_CC_dependencies_compiler_type=none
6305fi
6306
6307fi
81ecdfbb
RW
6308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6309$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6310if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6311then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6312else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6313
6314fi
6315
6316
c971b7fa
PA
6317
6318CONFIG_OBS=
6319CONFIG_DEPS=
6320CONFIG_SRCS=
6321ENABLE_CFLAGS=
6322
6323CONFIG_ALL=
6324CONFIG_CLEAN=
6325CONFIG_INSTALL=
6326CONFIG_UNINSTALL=
6327
6328# If we haven't got the data from the intl directory,
6329# assume NLS is disabled.
6330USE_NLS=no
6331LIBINTL=
6332LIBINTL_DEP=
6333INCINTL=
6334XGETTEXT=
6335GMSGFMT=
6336POSUB=
783e057b
DJ
6337
6338if test -f ../intl/config.intl; then
6339 . ../intl/config.intl
6340fi
81ecdfbb
RW
6341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6342$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6343if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345$as_echo "no" >&6; }
783e057b 6346else
81ecdfbb
RW
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6348$as_echo "yes" >&6; }
783e057b 6349
81ecdfbb 6350$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6351
6352
81ecdfbb
RW
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6354$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6355 # Look for .po and .gmo files in the source directory.
6356 CATALOGS=
6357 XLINGUAS=
6358 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6359 # If there aren't any .gmo files the shell will give us the
6360 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6361 # weeded out.
6362 case "$cat" in *\**)
6363 continue;;
6364 esac
6365 # The quadruple backslash is collapsed to a double backslash
6366 # by the backticks, then collapsed again by the double quotes,
6367 # leaving us with one backslash in the sed expression (right
6368 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6369 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6370 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6371 # The user is allowed to set LINGUAS to a list of languages to
6372 # install catalogs for. If it's empty that means "all of them."
6373 if test "x$LINGUAS" = x; then
6374 CATALOGS="$CATALOGS $cat"
6375 XLINGUAS="$XLINGUAS $lang"
6376 else
6377 case "$LINGUAS" in *$lang*)
6378 CATALOGS="$CATALOGS $cat"
6379 XLINGUAS="$XLINGUAS $lang"
6380 ;;
6381 esac
e28b3332
DJ
6382 fi
6383 done
c971b7fa
PA
6384 LINGUAS="$XLINGUAS"
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6386$as_echo "$LINGUAS" >&6; }
6387
6388
6389 DATADIRNAME=share
6390
6391 INSTOBJEXT=.mo
6392
6393 GENCAT=gencat
6394
6395 CATOBJEXT=.gmo
e28b3332 6396
e28b3332
DJ
6397fi
6398
c971b7fa
PA
6399localedir='${datadir}/locale'
6400
6401
6402if test x"$USE_NLS" = xyes; then
6403 CONFIG_ALL="$CONFIG_ALL all-po"
6404 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6405 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6406 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6407fi
e28b3332 6408
c971b7fa
PA
6409PACKAGE=gdb
6410
6411cat >>confdefs.h <<_ACEOF
6412#define PACKAGE "$PACKAGE"
6413_ACEOF
6414
6415
6416
6417# We never need to detect it in this sub-configure.
6418# But preserve it for config.status --recheck.
6419
6420
6421
6422MAKEINFO_EXTRA_FLAGS=""
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6424$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6425if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6426 $as_echo_n "(cached) " >&6
6427else
6428 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6429 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6430 gdb_cv_have_makeinfo_click=yes
6431 else
6432 gdb_cv_have_makeinfo_click=no
6433 fi
6434fi
6435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6436$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6437if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6438 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6439fi
e28b3332
DJ
6440
6441
bec39cab
AC
6442
6443
81ecdfbb
RW
6444# Check whether --with-separate-debug-dir was given.
6445if test "${with_separate_debug_dir+set}" = set; then :
6446 withval=$with_separate_debug_dir;
b14b1491
TT
6447 DEBUGDIR=$withval
6448else
6449 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6450fi
6451
20e95c23 6452
783e057b
DJ
6453 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6454 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6455 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6456 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6457
783e057b
DJ
6458cat >>confdefs.h <<_ACEOF
6459#define DEBUGDIR "$ac_define_dir"
20e95c23 6460_ACEOF
20e95c23 6461
20e95c23 6462
20e95c23 6463
0c4a4063 6464
b14b1491
TT
6465 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6466 if test "x$prefix" = xNONE; then
6467 test_prefix=/usr/local
6468 else
6469 test_prefix=$prefix
6470 fi
783e057b 6471 else
b14b1491 6472 test_prefix=$exec_prefix
783e057b 6473 fi
b14b1491
TT
6474 value=0
6475 case ${ac_define_dir} in
6476 "${test_prefix}"|"${test_prefix}/"*|\
6477 '${exec_prefix}'|'${exec_prefix}/'*)
6478 value=1
6479 ;;
6480 esac
6481
6482cat >>confdefs.h <<_ACEOF
6483#define DEBUGDIR_RELOCATABLE $value
6484_ACEOF
6485
6486
6487
0c4a4063 6488
f83d8a90
DE
6489# We can't pass paths as command line arguments.
6490# Mingw32 tries to be clever and will convert the paths for us.
6491# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6492# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6493# This breaks GDB's relocatable path conversions since paths passed in
6494# config.h would not get so translated, the path prefixes no longer match.
6495
6496 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6497 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6498 ac_define_dir=`eval echo $bindir`
6499 ac_define_dir=`eval echo $ac_define_dir`
6500
6501cat >>confdefs.h <<_ACEOF
6502#define BINDIR "$ac_define_dir"
6503_ACEOF
6504
6505
6506
b14b1491
TT
6507# GDB's datadir relocation
6508
6509
6510
81ecdfbb
RW
6511# Check whether --with-gdb-datadir was given.
6512if test "${with_gdb_datadir+set}" = set; then :
6513 withval=$with_gdb_datadir;
b14b1491 6514 GDB_DATADIR=$withval
20e95c23 6515else
b14b1491 6516 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6517fi
6518
20e95c23 6519
b14b1491
TT
6520 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6521 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6522 ac_define_dir=`eval echo $GDB_DATADIR`
6523 ac_define_dir=`eval echo $ac_define_dir`
6524
6525cat >>confdefs.h <<_ACEOF
6526#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6527_ACEOF
6528
b14b1491
TT
6529
6530
0c4a4063 6531
b14b1491
TT
6532 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6533 if test "x$prefix" = xNONE; then
6534 test_prefix=/usr/local
6535 else
6536 test_prefix=$prefix
6537 fi
6538 else
6539 test_prefix=$exec_prefix
6540 fi
6541 value=0
6542 case ${ac_define_dir} in
6543 "${test_prefix}"|"${test_prefix}/"*|\
6544 '${exec_prefix}'|'${exec_prefix}/'*)
6545 value=1
6546 ;;
6547 esac
6548
6549cat >>confdefs.h <<_ACEOF
6550#define GDB_DATADIR_RELOCATABLE $value
6551_ACEOF
6552
6553
783e057b 6554
20e95c23 6555
0c4a4063 6556
81ecdfbb
RW
6557# Check whether --with-relocated-sources was given.
6558if test "${with_relocated_sources+set}" = set; then :
6559 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6560
6561 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6562 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6563 ac_define_dir=`eval echo $reloc_srcdir`
6564 ac_define_dir=`eval echo $ac_define_dir`
6565
6566cat >>confdefs.h <<_ACEOF
6567#define RELOC_SRCDIR "$ac_define_dir"
6568_ACEOF
6569
6570
6571
81ecdfbb
RW
6572fi
6573
29b0e8a2 6574
7349ff92
JK
6575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6576$as_echo_n "checking for default auto-load directory... " >&6; }
6577
6578# Check whether --with-auto-load-dir was given.
6579if test "${with_auto_load_dir+set}" = set; then :
6580 withval=$with_auto_load_dir;
6581else
1564a261 6582 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6583fi
6584
2861ee4f 6585escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6586
6587 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6588 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6589 ac_define_dir=`eval echo $escape_dir`
6590 ac_define_dir=`eval echo $ac_define_dir`
6591
6592cat >>confdefs.h <<_ACEOF
6593#define AUTO_LOAD_DIR "$ac_define_dir"
6594_ACEOF
6595
6596
6597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6598$as_echo "$with_auto_load_dir" >&6; }
6599
bccbefd2
JK
6600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6601$as_echo_n "checking for default auto-load safe-path... " >&6; }
6602
6603# Check whether --with-auto-load-safe-path was given.
6604if test "${with_auto_load_safe_path+set}" = set; then :
6605 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6606 with_auto_load_safe_path="/"
6607 fi
bccbefd2 6608else
7349ff92 6609 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6610fi
6611
2861ee4f 6612escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6613
6614 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6615 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6616 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6617 ac_define_dir=`eval echo $ac_define_dir`
6618
6619cat >>confdefs.h <<_ACEOF
6dea1fbd 6620#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6621_ACEOF
6622
6623
6624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6625$as_echo "$with_auto_load_safe_path" >&6; }
6626
29b0e8a2 6627
20e95c23 6628
5ae98d25 6629subdirs="$subdirs testsuite"
20e95c23
DJ
6630
6631
783e057b 6632# Check whether to support alternative target configurations
81ecdfbb
RW
6633# Check whether --enable-targets was given.
6634if test "${enable_targets+set}" = set; then :
6635 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6636 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6637 ;;
6638 no) enable_targets= ;;
6639 *) enable_targets=$enableval ;;
6640esac
81ecdfbb
RW
6641fi
6642
20e95c23 6643
783e057b 6644# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6645# Check whether --enable-64-bit-bfd was given.
6646if test "${enable_64_bit_bfd+set}" = set; then :
6647 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6648 yes) want64=true ;;
6649 no) want64=false ;;
d0ac1c44 6650 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6651esac
6652else
6653 want64=false
81ecdfbb
RW
6654fi
6655
783e057b
DJ
6656# Provide defaults for some variables set by the per-host and per-target
6657# configuration.
6658gdb_host_obs=posix-hdep.o
20e95c23 6659
783e057b
DJ
6660if test "${target}" = "${host}"; then
6661 gdb_native=yes
6662else
6663 gdb_native=no
6664fi
20e95c23 6665
783e057b 6666. $srcdir/configure.host
20e95c23 6667
783e057b 6668# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6669
783e057b
DJ
6670TARGET_OBS=
6671all_targets=
b292c783 6672HAVE_NATIVE_GCORE_TARGET=
20e95c23 6673
783e057b 6674for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6675do
783e057b
DJ
6676 if test "$targ_alias" = "all"; then
6677 all_targets=true
6678 else
6679 # Canonicalize the secondary target names.
6680 result=`$ac_config_sub $targ_alias 2>/dev/null`
6681 if test -n "$result"; then
6682 targ=$result
6683 else
6684 targ=$targ_alias
6685 fi
20e95c23 6686
783e057b 6687 . ${srcdir}/configure.tgt
20e95c23 6688
bf307134 6689 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6690 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6691fi
6692
783e057b
DJ
6693 # Target-specific object files
6694 for i in ${gdb_target_obs}; do
6695 case " $TARGET_OBS " in
6696 *" ${i} "*) ;;
6697 *)
6698 TARGET_OBS="$TARGET_OBS ${i}"
6699 ;;
6700 esac
6701 done
20e95c23 6702
783e057b
DJ
6703 # Check whether this target needs 64-bit CORE_ADDR
6704 if test x${want64} = xfalse; then
6705 . ${srcdir}/../bfd/config.bfd
6706 fi
b292c783
JK
6707
6708 # Check whether this target is native and supports gcore.
6709 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6710 && $gdb_have_gcore; then
6711 HAVE_NATIVE_GCORE_TARGET=1
6712 fi
783e057b 6713 fi
20e95c23
DJ
6714done
6715
783e057b
DJ
6716if test x${all_targets} = xtrue; then
6717
6718 # We want all 64-bit targets if we either:
6719 # - run on a 64-bit host or
6720 # - already require 64-bit support for some other target or
6721 # - the --enable-64-bit-bfd option was supplied
6722 # Otherwise we only support all 32-bit targets.
6723 #
6724 # NOTE: This test must be in sync with the corresponding
6725 # tests in BFD!
20e95c23 6726
783e057b 6727 if test x${want64} = xfalse; then
81ecdfbb
RW
6728 # The cast to long int works around a bug in the HP C Compiler
6729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6731# This bug is HP SR number 8606223364.
6732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6733$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6734if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6735 $as_echo_n "(cached) " >&6
c0993dbe 6736else
81ecdfbb 6737 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6738
81ecdfbb
RW
6739else
6740 if test "$ac_cv_type_long" = yes; then
6741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6743as_fn_error 77 "cannot compute sizeof (long)
6744See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6745 else
6746 ac_cv_sizeof_long=0
6747 fi
c0993dbe 6748fi
81ecdfbb 6749
c0993dbe 6750fi
81ecdfbb
RW
6751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6752$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6753
c0993dbe 6754
c0993dbe 6755
c0993dbe
UW
6756cat >>confdefs.h <<_ACEOF
6757#define SIZEOF_LONG $ac_cv_sizeof_long
6758_ACEOF
6759
6760
6761 if test "x${ac_cv_sizeof_long}" = "x8"; then
6762 want64=true
6763 fi
6764 fi
6765 if test x${want64} = xtrue; then
6766 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6767 else
6768 TARGET_OBS='$(ALL_TARGET_OBS)'
6769 fi
6770fi
6771
6772
6773
b292c783 6774
c0993dbe
UW
6775# For other settings, only the main target counts.
6776gdb_sim=
6777gdb_osabi=
c0993dbe
UW
6778targ=$target; . ${srcdir}/configure.tgt
6779
6780# Fetch the default architecture and default target vector from BFD.
6781targ=$target; . $srcdir/../bfd/config.bfd
6782
6783# We only want the first architecture, so strip off the others if
6784# there is more than one.
6785targ_archs=`echo $targ_archs | sed 's/ .*//'`
6786
6787if test "x$targ_archs" != x; then
6788
6789cat >>confdefs.h <<_ACEOF
6790#define DEFAULT_BFD_ARCH $targ_archs
6791_ACEOF
6792
6793fi
6794if test "x$targ_defvec" != x; then
6795
6796cat >>confdefs.h <<_ACEOF
6797#define DEFAULT_BFD_VEC $targ_defvec
6798_ACEOF
6799
6800fi
6801
c0993dbe 6802# Enable MI.
81ecdfbb
RW
6803# Check whether --enable-gdbmi was given.
6804if test "${enable_gdbmi+set}" = set; then :
6805 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6806 yes | no)
6807 ;;
6808 *)
d0ac1c44 6809 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6810 esac
6811else
6812 enable_gdbmi=yes
81ecdfbb
RW
6813fi
6814
c0993dbe 6815if test x"$enable_gdbmi" = xyes; then
0ad6b8ee 6816 if test -d "$srcdir/mi"; then
c0993dbe
UW
6817 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6818 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6819 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6820 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6821 fi
6822fi
6823
6824# Enable TUI.
81ecdfbb
RW
6825# Check whether --enable-tui was given.
6826if test "${enable_tui+set}" = set; then :
6827 enableval=$enable_tui; case $enableval in
3ca64bd3 6828 yes | no | auto)
c0993dbe
UW
6829 ;;
6830 *)
d0ac1c44 6831 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6832 esac
6833else
3ca64bd3 6834 enable_tui=auto
81ecdfbb
RW
6835fi
6836
c0993dbe
UW
6837
6838# Enable gdbtk.
81ecdfbb
RW
6839# Check whether --enable-gdbtk was given.
6840if test "${enable_gdbtk+set}" = set; then :
6841 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6842 yes | no)
6843 ;;
6844 *)
d0ac1c44 6845 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6846 esac
6847else
0ad6b8ee 6848 if test -d "$srcdir/gdbtk"; then
c0993dbe
UW
6849 enable_gdbtk=yes
6850 else
6851 enable_gdbtk=no
6852 fi
81ecdfbb
RW
6853fi
6854
c0993dbe
UW
6855# We unconditionally disable gdbtk tests on selected platforms.
6856case $host_os in
6857 go32* | windows*)
81ecdfbb
RW
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6859$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6860 enable_gdbtk=no ;;
6861esac
6862
0d79cdc4
AM
6863# Handle optional debuginfod support
6864
f6720b1c
AM
6865
6866
6867
6868
6869
6870
6871if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6872 if test -n "$ac_tool_prefix"; then
6873 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6874set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6876$as_echo_n "checking for $ac_word... " >&6; }
6877if ${ac_cv_path_PKG_CONFIG+:} false; then :
6878 $as_echo_n "(cached) " >&6
6879else
6880 case $PKG_CONFIG in
6881 [\\/]* | ?:[\\/]*)
6882 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6883 ;;
6884 *)
6885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6886for as_dir in $PATH
6887do
6888 IFS=$as_save_IFS
6889 test -z "$as_dir" && as_dir=.
6890 for ac_exec_ext in '' $ac_executable_extensions; do
6891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6892 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6894 break 2
6895 fi
6896done
6897 done
6898IFS=$as_save_IFS
6899
6900 ;;
6901esac
6902fi
6903PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6904if test -n "$PKG_CONFIG"; then
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6906$as_echo "$PKG_CONFIG" >&6; }
6907else
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6909$as_echo "no" >&6; }
6910fi
6911
6912
6913fi
6914if test -z "$ac_cv_path_PKG_CONFIG"; then
6915 ac_pt_PKG_CONFIG=$PKG_CONFIG
6916 # Extract the first word of "pkg-config", so it can be a program name with args.
6917set dummy pkg-config; ac_word=$2
6918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6919$as_echo_n "checking for $ac_word... " >&6; }
6920if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6921 $as_echo_n "(cached) " >&6
6922else
6923 case $ac_pt_PKG_CONFIG in
6924 [\\/]* | ?:[\\/]*)
6925 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6926 ;;
6927 *)
6928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6929for as_dir in $PATH
6930do
6931 IFS=$as_save_IFS
6932 test -z "$as_dir" && as_dir=.
6933 for ac_exec_ext in '' $ac_executable_extensions; do
6934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6935 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6937 break 2
6938 fi
6939done
6940 done
6941IFS=$as_save_IFS
6942
6943 ;;
6944esac
6945fi
6946ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6947if test -n "$ac_pt_PKG_CONFIG"; then
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6949$as_echo "$ac_pt_PKG_CONFIG" >&6; }
6950else
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6952$as_echo "no" >&6; }
6953fi
6954
6955 if test "x$ac_pt_PKG_CONFIG" = x; then
6956 PKG_CONFIG=""
6957 else
6958 case $cross_compiling:$ac_tool_warned in
6959yes:)
6960{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6961$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6962ac_tool_warned=yes ;;
6963esac
6964 PKG_CONFIG=$ac_pt_PKG_CONFIG
6965 fi
6966else
6967 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6968fi
6969
6970fi
6971if test -n "$PKG_CONFIG"; then
6972 _pkg_min_version=0.9.0
6973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
6974$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
6975 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6977$as_echo "yes" >&6; }
6978 else
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6980$as_echo "no" >&6; }
6981 PKG_CONFIG=""
6982 fi
6983fi
6984
6985# Handle optional debuginfod support
0d79cdc4
AM
6986
6987# Check whether --with-debuginfod was given.
6988if test "${with_debuginfod+set}" = set; then :
6989 withval=$with_debuginfod;
6990else
6991 with_debuginfod=auto
6992fi
6993
6994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
6995$as_echo_n "checking whether to use debuginfod... " >&6; }
6996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
6997$as_echo "$with_debuginfod" >&6; }
6998
f6720b1c 6999if test "x$with_debuginfod" != xno; then
0d79cdc4 7000
f6720b1c
AM
7001pkg_failed=no
7002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
7003$as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
7004
7005if test -n "$DEBUGINFOD_CFLAGS"; then
7006 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
7007 elif test -n "$PKG_CONFIG"; then
7008 if test -n "$PKG_CONFIG" && \
7009 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7010 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7011 ac_status=$?
7012 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7013 test $ac_status = 0; }; then
7014 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
7015 test "x$?" != "x0" && pkg_failed=yes
0d79cdc4 7016else
f6720b1c 7017 pkg_failed=yes
0d79cdc4 7018fi
f6720b1c
AM
7019 else
7020 pkg_failed=untried
0d79cdc4 7021fi
f6720b1c
AM
7022if test -n "$DEBUGINFOD_LIBS"; then
7023 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
7024 elif test -n "$PKG_CONFIG"; then
7025 if test -n "$PKG_CONFIG" && \
7026 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7027 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7028 ac_status=$?
7029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7030 test $ac_status = 0; }; then
7031 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7032 test "x$?" != "x0" && pkg_failed=yes
7033else
7034 pkg_failed=yes
0d79cdc4 7035fi
f6720b1c
AM
7036 else
7037 pkg_failed=untried
0d79cdc4 7038fi
bec39cab 7039
0d79cdc4 7040
0d79cdc4 7041
f6720b1c
AM
7042if test $pkg_failed = yes; then
7043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7044$as_echo "no" >&6; }
0d79cdc4 7045
f6720b1c
AM
7046if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7047 _pkg_short_errors_supported=yes
7048else
7049 _pkg_short_errors_supported=no
7050fi
7051 if test $_pkg_short_errors_supported = yes; then
7052 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7053 else
7054 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7055 fi
7056 # Put the nasty error message in config.log where it belongs
7057 echo "$DEBUGINFOD_PKG_ERRORS" >&5
0d79cdc4 7058
f6720b1c
AM
7059 if test "x$with_debuginfod" = xyes; then
7060 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7061 else
7062 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7063$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7064 fi
7065elif test $pkg_failed = untried; then
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7067$as_echo "no" >&6; }
7068 if test "x$with_debuginfod" = xyes; then
7069 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7070 else
7071 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7072$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7073 fi
7074else
7075 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7076 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7078$as_echo "yes" >&6; }
7079
7080$as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7081
7082fi
7083else
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7085$as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
0d79cdc4
AM
7086fi
7087
7088
7089# Libunwind support for ia64.
05e7c244
JK
7090
7091# Check whether --with-libunwind-ia64 was given.
7092if test "${with_libunwind_ia64+set}" = set; then :
7093 withval=$with_libunwind_ia64;
bec39cab 7094else
05e7c244
JK
7095 with_libunwind_ia64=auto
7096fi
bec39cab 7097
05e7c244
JK
7098
7099# Backward compatibility option.
7100if test "${with_libunwind+set}" = set; then
7101 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 7102 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
7103 fi
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7105$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7106 with_libunwind_ia64="$with_libunwind"
7107fi
7108
7109case "$with_libunwind_ia64" in
7110 yes | no)
7111 ;;
7112 auto)
7113 for ac_header in libunwind-ia64.h
81ecdfbb 7114do :
b54a8fd7 7115 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 7116if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 7117 cat >>confdefs.h <<_ACEOF
b54a8fd7 7118#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
7119_ACEOF
7120
7121fi
7122
7123done
7124
05e7c244
JK
7125 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7126 ;;
7127 *)
d0ac1c44 7128 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
7129 ;;
7130esac
bec39cab 7131
05e7c244 7132if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 7133 for ac_header in libunwind-ia64.h
81ecdfbb 7134do :
b54a8fd7 7135 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 7136if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 7137 cat >>confdefs.h <<_ACEOF
b54a8fd7 7138#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
7139_ACEOF
7140
7141fi
7142
7143done
7144
05e7c244 7145 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 7146 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
7147 fi
7148 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7149 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7150 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
7151fi
7152
cb01cfba
JB
7153opt_curses=no
7154
81ecdfbb
RW
7155# Check whether --with-curses was given.
7156if test "${with_curses+set}" = set; then :
7157 withval=$with_curses; opt_curses=$withval
7158fi
7159
cb01cfba 7160
76a39ba7 7161prefer_curses=no
cb01cfba 7162if test "$opt_curses" = "yes"; then
76a39ba7 7163 prefer_curses=yes
cb01cfba
JB
7164fi
7165
a9322a30 7166# Profiling support.
81ecdfbb
RW
7167# Check whether --enable-profiling was given.
7168if test "${enable_profiling+set}" = set; then :
7169 enableval=$enable_profiling; case $enableval in
a9322a30
TT
7170 yes | no)
7171 ;;
7172 *)
d0ac1c44 7173 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
7174 esac
7175else
7176 enable_profiling=no
81ecdfbb 7177fi
bec39cab 7178
a9322a30
TT
7179
7180for ac_func in monstartup _mcleanup
81ecdfbb
RW
7181do :
7182 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7183ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 7184if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
7185 cat >>confdefs.h <<_ACEOF
7186#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 7187_ACEOF
a9322a30 7188
81ecdfbb
RW
7189fi
7190done
a9322a30 7191
81ecdfbb
RW
7192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7193$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 7194if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
7195 $as_echo_n "(cached) " >&6
7196else
7197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7198/* end confdefs.h. */
7199#include <stdlib.h>
7200extern char _etext;
a9322a30
TT
7201
7202int
7203main ()
7204{
7205free (&_etext);
7206 ;
7207 return 0;
7208}
bec39cab 7209_ACEOF
81ecdfbb 7210if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7211 ac_cv_var__etext=yes
bec39cab 7212else
81ecdfbb 7213 ac_cv_var__etext=no
bec39cab 7214fi
81ecdfbb
RW
7215rm -f core conftest.err conftest.$ac_objext \
7216 conftest$ac_exeext conftest.$ac_ext
bec39cab 7217fi
81ecdfbb
RW
7218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7219$as_echo "$ac_cv_var__etext" >&6; }
0ad6b8ee 7220if test "$ac_cv_var__etext" = yes; then
60ca704f 7221
81ecdfbb 7222$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7223
bec39cab 7224fi
81ecdfbb
RW
7225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7226$as_echo_n "checking for etext... " >&6; }
d0ac1c44 7227if ${ac_cv_var_etext+:} false; then :
81ecdfbb 7228 $as_echo_n "(cached) " >&6
bec39cab 7229else
81ecdfbb 7230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7231/* end confdefs.h. */
a9322a30
TT
7232#include <stdlib.h>
7233extern char etext;
bec39cab
AC
7234
7235int
7236main ()
7237{
a9322a30 7238free (&etext);
bec39cab
AC
7239 ;
7240 return 0;
7241}
7242_ACEOF
81ecdfbb 7243if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7244 ac_cv_var_etext=yes
bec39cab 7245else
81ecdfbb 7246 ac_cv_var_etext=no
bec39cab 7247fi
81ecdfbb
RW
7248rm -f core conftest.err conftest.$ac_objext \
7249 conftest$ac_exeext conftest.$ac_ext
bec39cab 7250fi
81ecdfbb
RW
7251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7252$as_echo "$ac_cv_var_etext" >&6; }
0ad6b8ee 7253if test "$ac_cv_var_etext" = yes; then
a9322a30 7254
81ecdfbb 7255$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7256
7257fi
a9322a30 7258if test "$enable_profiling" = yes ; then
0ad6b8ee 7259 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
d0ac1c44 7260 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7261 fi
7262 PROFILE_CFLAGS=-pg
7263 OLD_CFLAGS="$CFLAGS"
7264 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7265
81ecdfbb
RW
7266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7267$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7268if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7269 $as_echo_n "(cached) " >&6
bec39cab 7270else
81ecdfbb 7271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7272/* end confdefs.h. */
bec39cab
AC
7273
7274int
7275main ()
7276{
a9322a30 7277int x;
bec39cab
AC
7278 ;
7279 return 0;
7280}
7281_ACEOF
81ecdfbb 7282if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7283 ac_cv_cc_supports_pg=yes
bec39cab 7284else
81ecdfbb 7285 ac_cv_cc_supports_pg=no
bec39cab 7286fi
81ecdfbb 7287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7288fi
81ecdfbb
RW
7289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7290$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7291
0ad6b8ee 7292 if test "$ac_cv_cc_supports_pg" = no; then
d0ac1c44 7293 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7294 fi
bec39cab 7295
a9322a30 7296 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7297fi
7298
44cee4fd
TT
7299CODESIGN_CERT=
7300# Check whether --enable-codesign was given.
7301if test "${enable_codesign+set}" = set; then :
7302 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7303fi
7304
7305
7306
c16158bc
JM
7307
7308
81ecdfbb
RW
7309# Check whether --with-pkgversion was given.
7310if test "${with_pkgversion+set}" = set; then :
7311 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7312 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7313 no) PKGVERSION= ;;
7314 *) PKGVERSION="($withval) " ;;
7315 esac
7316else
7317 PKGVERSION="(GDB) "
7318
81ecdfbb 7319fi
c16158bc
JM
7320
7321
7322
7323
81ecdfbb
RW
7324
7325# Check whether --with-bugurl was given.
7326if test "${with_bugurl+set}" = set; then :
7327 withval=$with_bugurl; case "$withval" in
d0ac1c44 7328 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7329 no) BUGURL=
7330 ;;
7331 *) BUGURL="$withval"
7332 ;;
7333 esac
7334else
112c22ed 7335 BUGURL="https://www.gnu.org/software/gdb/bugs/"
c16158bc 7336
81ecdfbb
RW
7337fi
7338
c16158bc
JM
7339 case ${BUGURL} in
7340 "")
7341 REPORT_BUGS_TO=
7342 REPORT_BUGS_TEXI=
7343 ;;
7344 *)
7345 REPORT_BUGS_TO="<$BUGURL>"
7346 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7347 ;;
7348 esac;
7349
7350
7351
7352
7353cat >>confdefs.h <<_ACEOF
7354#define PKGVERSION "$PKGVERSION"
7355_ACEOF
7356
7357
7358cat >>confdefs.h <<_ACEOF
7359#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7360_ACEOF
7361
7362
bec39cab
AC
7363# --------------------- #
7364# Checks for programs. #
7365# --------------------- #
7366
7367for ac_prog in gawk mawk nawk awk
7368do
7369 # Extract the first word of "$ac_prog", so it can be a program name with args.
7370set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7372$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7373if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7374 $as_echo_n "(cached) " >&6
bec39cab
AC
7375else
7376 if test -n "$AWK"; then
7377 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7378else
7379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7380for as_dir in $PATH
7381do
7382 IFS=$as_save_IFS
7383 test -z "$as_dir" && as_dir=.
81ecdfbb 7384 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7385 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7386 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7387 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7388 break 2
7389 fi
7390done
81ecdfbb
RW
7391 done
7392IFS=$as_save_IFS
bec39cab
AC
7393
7394fi
7395fi
7396AWK=$ac_cv_prog_AWK
7397if test -n "$AWK"; then
81ecdfbb
RW
7398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7399$as_echo "$AWK" >&6; }
bec39cab 7400else
81ecdfbb
RW
7401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7402$as_echo "no" >&6; }
bec39cab
AC
7403fi
7404
bec39cab 7405
81ecdfbb 7406 test -n "$AWK" && break
bec39cab
AC
7407done
7408
c971b7fa
PA
7409# Find a good install program. We prefer a C program (faster),
7410# so one script is as good as another. But avoid the broken or
7411# incompatible versions:
7412# SysV /etc/install, /usr/sbin/install
7413# SunOS /usr/etc/install
7414# IRIX /sbin/install
7415# AIX /bin/install
7416# AmigaOS /C/install, which installs bootblocks on floppy discs
7417# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7418# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7419# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7420# OS/2's system install, which has a completely different semantic
7421# ./install, which can be erroneously created by make from ./install.sh.
7422# Reject install programs that cannot install multiple files.
7423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7424$as_echo_n "checking for a BSD-compatible install... " >&6; }
7425if test -z "$INSTALL"; then
d0ac1c44 7426if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7427 $as_echo_n "(cached) " >&6
7428else
7429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7430for as_dir in $PATH
7431do
7432 IFS=$as_save_IFS
7433 test -z "$as_dir" && as_dir=.
7434 # Account for people who put trailing slashes in PATH elements.
7435case $as_dir/ in #((
7436 ./ | .// | /[cC]/* | \
7437 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7438 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7439 /usr/ucb/* ) ;;
7440 *)
7441 # OSF1 and SCO ODT 3.0 have their own names for install.
7442 # Don't use installbsd from OSF since it installs stuff as root
7443 # by default.
7444 for ac_prog in ginstall scoinst install; do
7445 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7446 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7447 if test $ac_prog = install &&
7448 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7449 # AIX install. It has an incompatible calling convention.
7450 :
7451 elif test $ac_prog = install &&
7452 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7453 # program-specific install script used by HP pwplus--don't use.
7454 :
7455 else
7456 rm -rf conftest.one conftest.two conftest.dir
7457 echo one > conftest.one
7458 echo two > conftest.two
7459 mkdir conftest.dir
7460 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7461 test -s conftest.one && test -s conftest.two &&
7462 test -s conftest.dir/conftest.one &&
7463 test -s conftest.dir/conftest.two
7464 then
7465 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7466 break 3
7467 fi
7468 fi
7469 fi
7470 done
7471 done
7472 ;;
7473esac
7474
7475 done
7476IFS=$as_save_IFS
7477
7478rm -rf conftest.one conftest.two conftest.dir
7479
7480fi
7481 if test "${ac_cv_path_install+set}" = set; then
7482 INSTALL=$ac_cv_path_install
7483 else
7484 # As a last resort, use the slow shell script. Don't cache a
7485 # value for INSTALL within a source directory, because that will
7486 # break other packages using the cache if that directory is
7487 # removed, or if the value is a relative name.
7488 INSTALL=$ac_install_sh
7489 fi
7490fi
7491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7492$as_echo "$INSTALL" >&6; }
7493
7494# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7495# It thinks the first close brace ends the variable substitution.
7496test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7497
7498test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7499
7500test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7501
81ecdfbb
RW
7502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7503$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7504LN_S=$as_ln_s
7505if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7507$as_echo "yes" >&6; }
bec39cab 7508else
81ecdfbb
RW
7509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7510$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7511fi
7512
7513if test -n "$ac_tool_prefix"; then
7514 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7515set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7517$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7518if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7519 $as_echo_n "(cached) " >&6
bec39cab
AC
7520else
7521 if test -n "$RANLIB"; then
7522 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7523else
7524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7525for as_dir in $PATH
7526do
7527 IFS=$as_save_IFS
7528 test -z "$as_dir" && as_dir=.
81ecdfbb 7529 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7530 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7531 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7533 break 2
7534 fi
7535done
81ecdfbb
RW
7536 done
7537IFS=$as_save_IFS
bec39cab
AC
7538
7539fi
7540fi
7541RANLIB=$ac_cv_prog_RANLIB
7542if test -n "$RANLIB"; then
81ecdfbb
RW
7543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7544$as_echo "$RANLIB" >&6; }
bec39cab 7545else
81ecdfbb
RW
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7547$as_echo "no" >&6; }
bec39cab
AC
7548fi
7549
81ecdfbb 7550
bec39cab
AC
7551fi
7552if test -z "$ac_cv_prog_RANLIB"; then
7553 ac_ct_RANLIB=$RANLIB
7554 # Extract the first word of "ranlib", so it can be a program name with args.
7555set dummy ranlib; ac_word=$2
81ecdfbb
RW
7556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7557$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7558if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7559 $as_echo_n "(cached) " >&6
bec39cab
AC
7560else
7561 if test -n "$ac_ct_RANLIB"; then
7562 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7563else
7564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7565for as_dir in $PATH
7566do
7567 IFS=$as_save_IFS
7568 test -z "$as_dir" && as_dir=.
81ecdfbb 7569 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7570 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7571 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7572 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7573 break 2
7574 fi
7575done
81ecdfbb
RW
7576 done
7577IFS=$as_save_IFS
bec39cab 7578
bec39cab
AC
7579fi
7580fi
7581ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7582if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7584$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7585else
81ecdfbb
RW
7586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7587$as_echo "no" >&6; }
bec39cab
AC
7588fi
7589
81ecdfbb
RW
7590 if test "x$ac_ct_RANLIB" = x; then
7591 RANLIB=":"
7592 else
7593 case $cross_compiling:$ac_tool_warned in
7594yes:)
7595{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7596$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7597ac_tool_warned=yes ;;
7598esac
7599 RANLIB=$ac_ct_RANLIB
7600 fi
bec39cab
AC
7601else
7602 RANLIB="$ac_cv_prog_RANLIB"
7603fi
7604
7605for ac_prog in 'bison -y' byacc
7606do
7607 # Extract the first word of "$ac_prog", so it can be a program name with args.
7608set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7610$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7611if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7612 $as_echo_n "(cached) " >&6
bec39cab
AC
7613else
7614 if test -n "$YACC"; then
7615 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7616else
7617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7618for as_dir in $PATH
7619do
7620 IFS=$as_save_IFS
7621 test -z "$as_dir" && as_dir=.
81ecdfbb 7622 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7623 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7624 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7625 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7626 break 2
7627 fi
7628done
81ecdfbb
RW
7629 done
7630IFS=$as_save_IFS
bec39cab
AC
7631
7632fi
7633fi
7634YACC=$ac_cv_prog_YACC
7635if test -n "$YACC"; then
81ecdfbb
RW
7636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7637$as_echo "$YACC" >&6; }
bec39cab 7638else
81ecdfbb
RW
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7640$as_echo "no" >&6; }
bec39cab
AC
7641fi
7642
81ecdfbb 7643
bec39cab
AC
7644 test -n "$YACC" && break
7645done
7646test -n "$YACC" || YACC="yacc"
7647
7648
7649if test -n "$ac_tool_prefix"; then
7650 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7651set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7653$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7654if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7655 $as_echo_n "(cached) " >&6
bec39cab
AC
7656else
7657 if test -n "$AR"; then
7658 ac_cv_prog_AR="$AR" # Let the user override the test.
7659else
7660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7661for as_dir in $PATH
7662do
7663 IFS=$as_save_IFS
7664 test -z "$as_dir" && as_dir=.
81ecdfbb 7665 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7667 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7669 break 2
7670 fi
7671done
81ecdfbb
RW
7672 done
7673IFS=$as_save_IFS
bec39cab
AC
7674
7675fi
7676fi
7677AR=$ac_cv_prog_AR
7678if test -n "$AR"; then
81ecdfbb
RW
7679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7680$as_echo "$AR" >&6; }
bec39cab 7681else
81ecdfbb
RW
7682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7683$as_echo "no" >&6; }
bec39cab
AC
7684fi
7685
81ecdfbb 7686
bec39cab
AC
7687fi
7688if test -z "$ac_cv_prog_AR"; then
7689 ac_ct_AR=$AR
7690 # Extract the first word of "ar", so it can be a program name with args.
7691set dummy ar; ac_word=$2
81ecdfbb
RW
7692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7693$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7694if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7695 $as_echo_n "(cached) " >&6
bec39cab
AC
7696else
7697 if test -n "$ac_ct_AR"; then
7698 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7699else
7700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7701for as_dir in $PATH
7702do
7703 IFS=$as_save_IFS
7704 test -z "$as_dir" && as_dir=.
81ecdfbb 7705 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7707 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7709 break 2
7710 fi
7711done
81ecdfbb
RW
7712 done
7713IFS=$as_save_IFS
bec39cab
AC
7714
7715fi
7716fi
7717ac_ct_AR=$ac_cv_prog_ac_ct_AR
7718if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7720$as_echo "$ac_ct_AR" >&6; }
bec39cab 7721else
81ecdfbb
RW
7722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7723$as_echo "no" >&6; }
bec39cab
AC
7724fi
7725
81ecdfbb
RW
7726 if test "x$ac_ct_AR" = x; then
7727 AR=""
7728 else
7729 case $cross_compiling:$ac_tool_warned in
7730yes:)
7731{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7732$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7733ac_tool_warned=yes ;;
7734esac
7735 AR=$ac_ct_AR
7736 fi
bec39cab
AC
7737else
7738 AR="$ac_cv_prog_AR"
7739fi
7740
7741if test -n "$ac_tool_prefix"; then
7742 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7743set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7745$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7746if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7747 $as_echo_n "(cached) " >&6
bec39cab
AC
7748else
7749 if test -n "$DLLTOOL"; then
7750 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7751else
7752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7753for as_dir in $PATH
7754do
7755 IFS=$as_save_IFS
7756 test -z "$as_dir" && as_dir=.
81ecdfbb 7757 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7758 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7759 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7761 break 2
7762 fi
7763done
81ecdfbb
RW
7764 done
7765IFS=$as_save_IFS
bec39cab
AC
7766
7767fi
7768fi
7769DLLTOOL=$ac_cv_prog_DLLTOOL
7770if test -n "$DLLTOOL"; then
81ecdfbb
RW
7771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7772$as_echo "$DLLTOOL" >&6; }
bec39cab 7773else
81ecdfbb
RW
7774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7775$as_echo "no" >&6; }
bec39cab
AC
7776fi
7777
81ecdfbb 7778
bec39cab
AC
7779fi
7780if test -z "$ac_cv_prog_DLLTOOL"; then
7781 ac_ct_DLLTOOL=$DLLTOOL
7782 # Extract the first word of "dlltool", so it can be a program name with args.
7783set dummy dlltool; ac_word=$2
81ecdfbb
RW
7784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7785$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7786if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7787 $as_echo_n "(cached) " >&6
bec39cab
AC
7788else
7789 if test -n "$ac_ct_DLLTOOL"; then
7790 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7791else
7792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7793for as_dir in $PATH
7794do
7795 IFS=$as_save_IFS
7796 test -z "$as_dir" && as_dir=.
81ecdfbb 7797 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7799 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7801 break 2
7802 fi
7803done
81ecdfbb
RW
7804 done
7805IFS=$as_save_IFS
bec39cab
AC
7806
7807fi
7808fi
7809ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7810if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7812$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7813else
81ecdfbb
RW
7814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7815$as_echo "no" >&6; }
bec39cab
AC
7816fi
7817
81ecdfbb
RW
7818 if test "x$ac_ct_DLLTOOL" = x; then
7819 DLLTOOL=""
7820 else
7821 case $cross_compiling:$ac_tool_warned in
7822yes:)
7823{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7824$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7825ac_tool_warned=yes ;;
7826esac
7827 DLLTOOL=$ac_ct_DLLTOOL
7828 fi
bec39cab
AC
7829else
7830 DLLTOOL="$ac_cv_prog_DLLTOOL"
7831fi
7832
7833if test -n "$ac_tool_prefix"; then
7834 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7835set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7837$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7838if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7839 $as_echo_n "(cached) " >&6
bec39cab
AC
7840else
7841 if test -n "$WINDRES"; then
7842 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7843else
7844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7845for as_dir in $PATH
7846do
7847 IFS=$as_save_IFS
7848 test -z "$as_dir" && as_dir=.
81ecdfbb 7849 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7851 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7853 break 2
7854 fi
7855done
81ecdfbb
RW
7856 done
7857IFS=$as_save_IFS
bec39cab
AC
7858
7859fi
7860fi
7861WINDRES=$ac_cv_prog_WINDRES
7862if test -n "$WINDRES"; then
81ecdfbb
RW
7863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7864$as_echo "$WINDRES" >&6; }
bec39cab 7865else
81ecdfbb
RW
7866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7867$as_echo "no" >&6; }
bec39cab
AC
7868fi
7869
81ecdfbb 7870
bec39cab
AC
7871fi
7872if test -z "$ac_cv_prog_WINDRES"; then
7873 ac_ct_WINDRES=$WINDRES
7874 # Extract the first word of "windres", so it can be a program name with args.
7875set dummy windres; ac_word=$2
81ecdfbb
RW
7876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7877$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7878if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7879 $as_echo_n "(cached) " >&6
bec39cab
AC
7880else
7881 if test -n "$ac_ct_WINDRES"; then
7882 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7883else
7884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7885for as_dir in $PATH
7886do
7887 IFS=$as_save_IFS
7888 test -z "$as_dir" && as_dir=.
81ecdfbb 7889 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7890 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7891 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7893 break 2
7894 fi
7895done
81ecdfbb
RW
7896 done
7897IFS=$as_save_IFS
bec39cab
AC
7898
7899fi
7900fi
7901ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7902if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7904$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7905else
81ecdfbb
RW
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7907$as_echo "no" >&6; }
c906108c 7908fi
bec39cab 7909
81ecdfbb
RW
7910 if test "x$ac_ct_WINDRES" = x; then
7911 WINDRES=""
7912 else
7913 case $cross_compiling:$ac_tool_warned in
7914yes:)
7915{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7916$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7917ac_tool_warned=yes ;;
7918esac
7919 WINDRES=$ac_ct_WINDRES
7920 fi
c906108c 7921else
bec39cab 7922 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7923fi
7924
bec39cab 7925
036c3acb
TS
7926case $host_os in
7927 gnu*)
7928 # Needed for GNU Hurd hosts.
7929 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7930 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7931set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7933$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7934if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7935 $as_echo_n "(cached) " >&6
c906108c 7936else
bec39cab
AC
7937 if test -n "$MIG"; then
7938 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7939else
7940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7941for as_dir in $PATH
7942do
7943 IFS=$as_save_IFS
7944 test -z "$as_dir" && as_dir=.
81ecdfbb 7945 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7946 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7947 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7949 break 2
7950 fi
7951done
81ecdfbb
RW
7952 done
7953IFS=$as_save_IFS
bec39cab 7954
c906108c 7955fi
bec39cab
AC
7956fi
7957MIG=$ac_cv_prog_MIG
7958if test -n "$MIG"; then
81ecdfbb
RW
7959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7960$as_echo "$MIG" >&6; }
c906108c 7961else
81ecdfbb
RW
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7963$as_echo "no" >&6; }
c906108c
SS
7964fi
7965
81ecdfbb 7966
bec39cab
AC
7967fi
7968if test -z "$ac_cv_prog_MIG"; then
7969 ac_ct_MIG=$MIG
7970 # Extract the first word of "mig", so it can be a program name with args.
7971set dummy mig; ac_word=$2
81ecdfbb
RW
7972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7973$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7974if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7975 $as_echo_n "(cached) " >&6
bec39cab
AC
7976else
7977 if test -n "$ac_ct_MIG"; then
7978 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7979else
7980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7981for as_dir in $PATH
7982do
7983 IFS=$as_save_IFS
7984 test -z "$as_dir" && as_dir=.
81ecdfbb 7985 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7986 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7987 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7988 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7989 break 2
7990 fi
7991done
81ecdfbb
RW
7992 done
7993IFS=$as_save_IFS
c906108c 7994
bec39cab
AC
7995fi
7996fi
7997ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7998if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8000$as_echo "$ac_ct_MIG" >&6; }
bec39cab 8001else
81ecdfbb
RW
8002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8003$as_echo "no" >&6; }
bec39cab 8004fi
c906108c 8005
81ecdfbb
RW
8006 if test "x$ac_ct_MIG" = x; then
8007 MIG=""
8008 else
8009 case $cross_compiling:$ac_tool_warned in
8010yes:)
8011{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8012$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8013ac_tool_warned=yes ;;
8014esac
8015 MIG=$ac_ct_MIG
8016 fi
bec39cab
AC
8017else
8018 MIG="$ac_cv_prog_MIG"
8019fi
c906108c 8020
036c3acb 8021 if test x"$MIG" = x; then
d0ac1c44 8022 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
8023 fi
8024 ;;
8025esac
c906108c 8026
bec39cab
AC
8027# ---------------------- #
8028# Checks for libraries. #
8029# ---------------------- #
c906108c 8030
bec39cab 8031# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
8032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8033$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 8034if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 8035 $as_echo_n "(cached) " >&6
bec39cab
AC
8036else
8037 ac_check_lib_save_LIBS=$LIBS
8038LIBS="-lm $LIBS"
81ecdfbb 8039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8040/* end confdefs.h. */
c906108c 8041
c906108c 8042
bec39cab
AC
8043int
8044main ()
8045{
81ecdfbb 8046return main ();
bec39cab
AC
8047 ;
8048 return 0;
8049}
8050_ACEOF
81ecdfbb 8051if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
8052 ac_cv_lib_m_main=yes
8053else
81ecdfbb 8054 ac_cv_lib_m_main=no
bec39cab 8055fi
81ecdfbb
RW
8056rm -f core conftest.err conftest.$ac_objext \
8057 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
8058LIBS=$ac_check_lib_save_LIBS
8059fi
81ecdfbb
RW
8060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8061$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 8062if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
8063 cat >>confdefs.h <<_ACEOF
8064#define HAVE_LIBM 1
8065_ACEOF
8066
8067 LIBS="-lm $LIBS"
c906108c 8068
c906108c 8069fi
bec39cab
AC
8070
8071
bec39cab 8072# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
8073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8074$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 8075if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 8076 $as_echo_n "(cached) " >&6
bec39cab
AC
8077else
8078 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8080/* end confdefs.h. */
ddc9cd0f 8081
81ecdfbb
RW
8082/* Override any GCC internal prototype to avoid an error.
8083 Use char because int might match the return type of a GCC
8084 builtin and then its argument prototype would still apply. */
bec39cab
AC
8085#ifdef __cplusplus
8086extern "C"
8087#endif
bec39cab
AC
8088char gethostbyname ();
8089int
8090main ()
8091{
81ecdfbb 8092return gethostbyname ();
bec39cab
AC
8093 ;
8094 return 0;
8095}
8096_ACEOF
81ecdfbb
RW
8097for ac_lib in '' nsl; do
8098 if test -z "$ac_lib"; then
8099 ac_res="none required"
8100 else
8101 ac_res=-l$ac_lib
b4e70030 8102 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8103 fi
8104 if ac_fn_c_try_link "$LINENO"; then :
8105 ac_cv_search_gethostbyname=$ac_res
8106fi
8107rm -f core conftest.err conftest.$ac_objext \
8108 conftest$ac_exeext
d0ac1c44 8109 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
8110 break
8111fi
8112done
d0ac1c44 8113if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 8114
bec39cab 8115else
81ecdfbb 8116 ac_cv_search_gethostbyname=no
bec39cab 8117fi
81ecdfbb 8118rm conftest.$ac_ext
bec39cab
AC
8119LIBS=$ac_func_search_save_LIBS
8120fi
81ecdfbb
RW
8121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8122$as_echo "$ac_cv_search_gethostbyname" >&6; }
8123ac_res=$ac_cv_search_gethostbyname
8124if test "$ac_res" != no; then :
8125 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 8126
bec39cab 8127fi
96baa820 8128
c906108c 8129
b4e70030 8130# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
8131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8132$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 8133if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 8134 $as_echo_n "(cached) " >&6
b4e70030
JB
8135else
8136 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8138/* end confdefs.h. */
8139
81ecdfbb
RW
8140/* Override any GCC internal prototype to avoid an error.
8141 Use char because int might match the return type of a GCC
8142 builtin and then its argument prototype would still apply. */
b4e70030
JB
8143#ifdef __cplusplus
8144extern "C"
8145#endif
b4e70030
JB
8146char socketpair ();
8147int
8148main ()
8149{
81ecdfbb 8150return socketpair ();
b4e70030
JB
8151 ;
8152 return 0;
8153}
8154_ACEOF
81ecdfbb
RW
8155for ac_lib in '' socket; do
8156 if test -z "$ac_lib"; then
8157 ac_res="none required"
8158 else
8159 ac_res=-l$ac_lib
b4e70030 8160 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8161 fi
8162 if ac_fn_c_try_link "$LINENO"; then :
8163 ac_cv_search_socketpair=$ac_res
8164fi
8165rm -f core conftest.err conftest.$ac_objext \
8166 conftest$ac_exeext
d0ac1c44 8167 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
8168 break
8169fi
8170done
d0ac1c44 8171if ${ac_cv_search_socketpair+:} false; then :
b4e70030 8172
b4e70030 8173else
81ecdfbb 8174 ac_cv_search_socketpair=no
b4e70030 8175fi
81ecdfbb 8176rm conftest.$ac_ext
b4e70030
JB
8177LIBS=$ac_func_search_save_LIBS
8178fi
81ecdfbb
RW
8179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8180$as_echo "$ac_cv_search_socketpair" >&6; }
8181ac_res=$ac_cv_search_socketpair
8182if test "$ac_res" != no; then :
8183 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
8184
8185fi
8186
8187
233a11ab 8188# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 8189
711a72d3 8190 # Use the system's zlib library.
39f3de7c
L
8191 zlibdir="-L\$(top_builddir)/../zlib"
8192 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 8193
711a72d3
L
8194# Check whether --with-system-zlib was given.
8195if test "${with_system_zlib+set}" = set; then :
afa59b79
L
8196 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8197 zlibdir=
8198 zlibinc=
8199 fi
b040ad30 8200
233a11ab 8201fi
233a11ab 8202
233a11ab 8203
233a11ab 8204
b040ad30 8205
233a11ab 8206
25268153 8207# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 8208# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
8209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
8210$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 8211if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8212 $as_echo_n "(cached) " >&6
8213else
8214 ac_func_search_save_LIBS=$LIBS
8215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8216/* end confdefs.h. */
8217
8218/* Override any GCC internal prototype to avoid an error.
8219 Use char because int might match the return type of a GCC
8220 builtin and then its argument prototype would still apply. */
8221#ifdef __cplusplus
8222extern "C"
8223#endif
8224char kinfo_getvmmap ();
8225int
8226main ()
8227{
8228return kinfo_getvmmap ();
8229 ;
8230 return 0;
8231}
8232_ACEOF
37773e78 8233for ac_lib in '' util util-freebsd; do
25268153
JB
8234 if test -z "$ac_lib"; then
8235 ac_res="none required"
8236 else
8237 ac_res=-l$ac_lib
8238 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8239 fi
8240 if ac_fn_c_try_link "$LINENO"; then :
8241 ac_cv_search_kinfo_getvmmap=$ac_res
8242fi
8243rm -f core conftest.err conftest.$ac_objext \
8244 conftest$ac_exeext
d0ac1c44 8245 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8246 break
8247fi
8248done
d0ac1c44 8249if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8250
8251else
8252 ac_cv_search_kinfo_getvmmap=no
8253fi
8254rm conftest.$ac_ext
8255LIBS=$ac_func_search_save_LIBS
8256fi
8257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8258$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8259ac_res=$ac_cv_search_kinfo_getvmmap
8260if test "$ac_res" != no; then :
8261 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8262
8263$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8264
8265fi
8266
8267
77f120bf 8268
016a3251
DD
8269 if test "X$prefix" = "XNONE"; then
8270 acl_final_prefix="$ac_default_prefix"
8271 else
8272 acl_final_prefix="$prefix"
8273 fi
8274 if test "X$exec_prefix" = "XNONE"; then
8275 acl_final_exec_prefix='${prefix}'
8276 else
8277 acl_final_exec_prefix="$exec_prefix"
8278 fi
8279 acl_save_prefix="$prefix"
8280 prefix="$acl_final_prefix"
8281 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8282 prefix="$acl_save_prefix"
8283
8284
8285# Check whether --with-gnu-ld was given.
8286if test "${with_gnu_ld+set}" = set; then :
8287 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8288else
8289 with_gnu_ld=no
8290fi
8291
8292# Prepare PATH_SEPARATOR.
8293# The user is always right.
8294if test "${PATH_SEPARATOR+set}" != set; then
8295 echo "#! /bin/sh" >conf$$.sh
8296 echo "exit 0" >>conf$$.sh
8297 chmod +x conf$$.sh
8298 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8299 PATH_SEPARATOR=';'
8300 else
8301 PATH_SEPARATOR=:
8302 fi
8303 rm -f conf$$.sh
8304fi
8305ac_prog=ld
8306if test "$GCC" = yes; then
8307 # Check if gcc -print-prog-name=ld gives a path.
8308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8309$as_echo_n "checking for ld used by GCC... " >&6; }
8310 case $host in
8311 *-*-mingw*)
8312 # gcc leaves a trailing carriage return which upsets mingw
8313 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8314 *)
8315 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8316 esac
8317 case $ac_prog in
8318 # Accept absolute paths.
8319 [\\/]* | [A-Za-z]:[\\/]*)
8320 re_direlt='/[^/][^/]*/\.\./'
8321 # Canonicalize the path of ld
8322 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8323 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8324 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8325 done
8326 test -z "$LD" && LD="$ac_prog"
8327 ;;
8328 "")
8329 # If it fails, then pretend we aren't using GCC.
8330 ac_prog=ld
8331 ;;
8332 *)
8333 # If it is relative, then search for the first ld in PATH.
8334 with_gnu_ld=unknown
8335 ;;
8336 esac
8337elif test "$with_gnu_ld" = yes; then
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8339$as_echo_n "checking for GNU ld... " >&6; }
8340else
8341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8342$as_echo_n "checking for non-GNU ld... " >&6; }
8343fi
d0ac1c44 8344if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8345 $as_echo_n "(cached) " >&6
8346else
8347 if test -z "$LD"; then
8348 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8349 for ac_dir in $PATH; do
8350 test -z "$ac_dir" && ac_dir=.
8351 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8352 acl_cv_path_LD="$ac_dir/$ac_prog"
8353 # Check to see if the program is GNU ld. I'd rather use --version,
8354 # but apparently some GNU ld's only accept -v.
8355 # Break only if it was the GNU/non-GNU ld that we prefer.
8356 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8357 test "$with_gnu_ld" != no && break
8358 else
8359 test "$with_gnu_ld" != yes && break
8360 fi
8361 fi
8362 done
8363 IFS="$ac_save_ifs"
8364else
8365 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8366fi
8367fi
8368
8369LD="$acl_cv_path_LD"
8370if test -n "$LD"; then
8371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8372$as_echo "$LD" >&6; }
8373else
8374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8375$as_echo "no" >&6; }
8376fi
d0ac1c44 8377test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8379$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8380if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8381 $as_echo_n "(cached) " >&6
8382else
8383 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8384if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8385 acl_cv_prog_gnu_ld=yes
8386else
8387 acl_cv_prog_gnu_ld=no
8388fi
8389fi
8390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8391$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8392with_gnu_ld=$acl_cv_prog_gnu_ld
8393
8394
8395
8396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8397$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8398if ${acl_cv_rpath+:} false; then :
016a3251
DD
8399 $as_echo_n "(cached) " >&6
8400else
8401
8402 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8403 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8404 . ./conftest.sh
8405 rm -f ./conftest.sh
8406 acl_cv_rpath=done
8407
8408fi
8409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8410$as_echo "$acl_cv_rpath" >&6; }
8411 wl="$acl_cv_wl"
8412 libext="$acl_cv_libext"
8413 shlibext="$acl_cv_shlibext"
8414 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8415 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8416 hardcode_direct="$acl_cv_hardcode_direct"
8417 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8418 # Check whether --enable-rpath was given.
8419if test "${enable_rpath+set}" = set; then :
8420 enableval=$enable_rpath; :
8421else
8422 enable_rpath=yes
8423fi
8424
8425
8426
8427
8428
8429
8430
8431
8432 use_additional=yes
8433
8434 acl_save_prefix="$prefix"
8435 prefix="$acl_final_prefix"
8436 acl_save_exec_prefix="$exec_prefix"
8437 exec_prefix="$acl_final_exec_prefix"
8438
8439 eval additional_includedir=\"$includedir\"
8440 eval additional_libdir=\"$libdir\"
8441
8442 exec_prefix="$acl_save_exec_prefix"
8443 prefix="$acl_save_prefix"
77f120bf 8444
6c7a06a3 8445
81ecdfbb
RW
8446# Check whether --with-libiconv-prefix was given.
8447if test "${with_libiconv_prefix+set}" = set; then :
8448 withval=$with_libiconv_prefix;
016a3251
DD
8449 if test "X$withval" = "Xno"; then
8450 use_additional=no
8451 else
8452 if test "X$withval" = "X"; then
8453
8454 acl_save_prefix="$prefix"
8455 prefix="$acl_final_prefix"
8456 acl_save_exec_prefix="$exec_prefix"
8457 exec_prefix="$acl_final_exec_prefix"
8458
8459 eval additional_includedir=\"$includedir\"
8460 eval additional_libdir=\"$libdir\"
8461
8462 exec_prefix="$acl_save_exec_prefix"
8463 prefix="$acl_save_prefix"
8464
8465 else
8466 additional_includedir="$withval/include"
8467 additional_libdir="$withval/lib"
8468 fi
8469 fi
6c7a06a3 8470
81ecdfbb
RW
8471fi
8472
9f1528a1
AB
8473
8474# Check whether --with-libiconv-type was given.
8475if test "${with_libiconv_type+set}" = set; then :
8476 withval=$with_libiconv_type; with_libiconv_type=$withval
8477else
8478 with_libiconv_type=auto
8479fi
8480
8481 lib_type=`eval echo \$with_libiconv_type`
8482
016a3251
DD
8483 LIBICONV=
8484 LTLIBICONV=
8485 INCICONV=
8486 rpathdirs=
8487 ltrpathdirs=
8488 names_already_handled=
8489 names_next_round='iconv '
8490 while test -n "$names_next_round"; do
8491 names_this_round="$names_next_round"
8492 names_next_round=
8493 for name in $names_this_round; do
8494 already_handled=
8495 for n in $names_already_handled; do
8496 if test "$n" = "$name"; then
8497 already_handled=yes
8498 break
8499 fi
8500 done
8501 if test -z "$already_handled"; then
8502 names_already_handled="$names_already_handled $name"
8503 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8504 eval value=\"\$HAVE_LIB$uppername\"
8505 if test -n "$value"; then
8506 if test "$value" = yes; then
8507 eval value=\"\$LIB$uppername\"
8508 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8509 eval value=\"\$LTLIB$uppername\"
8510 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8511 else
8512 :
8513 fi
8514 else
8515 found_dir=
8516 found_la=
8517 found_so=
8518 found_a=
8519 if test $use_additional = yes; then
9f1528a1 8520 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8521 found_dir="$additional_libdir"
8522 found_so="$additional_libdir/lib$name.$shlibext"
8523 if test -f "$additional_libdir/lib$name.la"; then
8524 found_la="$additional_libdir/lib$name.la"
8525 fi
9f1528a1 8526 elif test x$lib_type != xshared; then
016a3251
DD
8527 if test -f "$additional_libdir/lib$name.$libext"; then
8528 found_dir="$additional_libdir"
8529 found_a="$additional_libdir/lib$name.$libext"
8530 if test -f "$additional_libdir/lib$name.la"; then
8531 found_la="$additional_libdir/lib$name.la"
8532 fi
8533 fi
8534 fi
8535 fi
8536 if test "X$found_dir" = "X"; then
8537 for x in $LDFLAGS $LTLIBICONV; do
8538
8539 acl_save_prefix="$prefix"
8540 prefix="$acl_final_prefix"
8541 acl_save_exec_prefix="$exec_prefix"
8542 exec_prefix="$acl_final_exec_prefix"
8543 eval x=\"$x\"
8544 exec_prefix="$acl_save_exec_prefix"
8545 prefix="$acl_save_prefix"
8546
8547 case "$x" in
8548 -L*)
8549 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 8550 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8551 found_dir="$dir"
8552 found_so="$dir/lib$name.$shlibext"
8553 if test -f "$dir/lib$name.la"; then
8554 found_la="$dir/lib$name.la"
8555 fi
9f1528a1 8556 elif test x$lib_type != xshared; then
016a3251
DD
8557 if test -f "$dir/lib$name.$libext"; then
8558 found_dir="$dir"
8559 found_a="$dir/lib$name.$libext"
8560 if test -f "$dir/lib$name.la"; then
8561 found_la="$dir/lib$name.la"
8562 fi
8563 fi
8564 fi
8565 ;;
8566 esac
8567 if test "X$found_dir" != "X"; then
8568 break
8569 fi
8570 done
8571 fi
8572 if test "X$found_dir" != "X"; then
8573 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8574 if test "X$found_so" != "X"; then
8575 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8576 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8577 else
8578 haveit=
8579 for x in $ltrpathdirs; do
8580 if test "X$x" = "X$found_dir"; then
8581 haveit=yes
8582 break
8583 fi
8584 done
8585 if test -z "$haveit"; then
8586 ltrpathdirs="$ltrpathdirs $found_dir"
8587 fi
8588 if test "$hardcode_direct" = yes; then
8589 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8590 else
8591 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8592 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8593 haveit=
8594 for x in $rpathdirs; do
8595 if test "X$x" = "X$found_dir"; then
8596 haveit=yes
8597 break
8598 fi
8599 done
8600 if test -z "$haveit"; then
8601 rpathdirs="$rpathdirs $found_dir"
8602 fi
8603 else
8604 haveit=
8605 for x in $LDFLAGS $LIBICONV; do
8606
8607 acl_save_prefix="$prefix"
8608 prefix="$acl_final_prefix"
8609 acl_save_exec_prefix="$exec_prefix"
8610 exec_prefix="$acl_final_exec_prefix"
8611 eval x=\"$x\"
8612 exec_prefix="$acl_save_exec_prefix"
8613 prefix="$acl_save_prefix"
8614
8615 if test "X$x" = "X-L$found_dir"; then
8616 haveit=yes
8617 break
8618 fi
8619 done
8620 if test -z "$haveit"; then
8621 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8622 fi
8623 if test "$hardcode_minus_L" != no; then
8624 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8625 else
8626 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8627 fi
8628 fi
8629 fi
8630 fi
8631 else
8632 if test "X$found_a" != "X"; then
8633 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8634 else
8635 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8636 fi
8637 fi
8638 additional_includedir=
8639 case "$found_dir" in
8640 */lib | */lib/)
8641 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8642 additional_includedir="$basedir/include"
8643 ;;
8644 esac
8645 if test "X$additional_includedir" != "X"; then
8646 if test "X$additional_includedir" != "X/usr/include"; then
8647 haveit=
8648 if test "X$additional_includedir" = "X/usr/local/include"; then
8649 if test -n "$GCC"; then
8650 case $host_os in
8651 linux*) haveit=yes;;
8652 esac
8653 fi
8654 fi
8655 if test -z "$haveit"; then
8656 for x in $CPPFLAGS $INCICONV; do
8657
8658 acl_save_prefix="$prefix"
8659 prefix="$acl_final_prefix"
8660 acl_save_exec_prefix="$exec_prefix"
8661 exec_prefix="$acl_final_exec_prefix"
8662 eval x=\"$x\"
8663 exec_prefix="$acl_save_exec_prefix"
8664 prefix="$acl_save_prefix"
8665
8666 if test "X$x" = "X-I$additional_includedir"; then
8667 haveit=yes
8668 break
8669 fi
8670 done
8671 if test -z "$haveit"; then
8672 if test -d "$additional_includedir"; then
8673 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8674 fi
8675 fi
8676 fi
8677 fi
8678 fi
8679 if test -n "$found_la"; then
8680 save_libdir="$libdir"
8681 case "$found_la" in
8682 */* | *\\*) . "$found_la" ;;
8683 *) . "./$found_la" ;;
8684 esac
8685 libdir="$save_libdir"
8686 for dep in $dependency_libs; do
8687 case "$dep" in
8688 -L*)
8689 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8690 if test "X$additional_libdir" != "X/usr/lib"; then
8691 haveit=
8692 if test "X$additional_libdir" = "X/usr/local/lib"; then
8693 if test -n "$GCC"; then
8694 case $host_os in
8695 linux*) haveit=yes;;
8696 esac
8697 fi
8698 fi
8699 if test -z "$haveit"; then
8700 haveit=
8701 for x in $LDFLAGS $LIBICONV; do
8702
8703 acl_save_prefix="$prefix"
8704 prefix="$acl_final_prefix"
8705 acl_save_exec_prefix="$exec_prefix"
8706 exec_prefix="$acl_final_exec_prefix"
8707 eval x=\"$x\"
8708 exec_prefix="$acl_save_exec_prefix"
8709 prefix="$acl_save_prefix"
8710
8711 if test "X$x" = "X-L$additional_libdir"; then
8712 haveit=yes
8713 break
8714 fi
8715 done
8716 if test -z "$haveit"; then
8717 if test -d "$additional_libdir"; then
8718 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8719 fi
8720 fi
8721 haveit=
8722 for x in $LDFLAGS $LTLIBICONV; do
8723
8724 acl_save_prefix="$prefix"
8725 prefix="$acl_final_prefix"
8726 acl_save_exec_prefix="$exec_prefix"
8727 exec_prefix="$acl_final_exec_prefix"
8728 eval x=\"$x\"
8729 exec_prefix="$acl_save_exec_prefix"
8730 prefix="$acl_save_prefix"
8731
8732 if test "X$x" = "X-L$additional_libdir"; then
8733 haveit=yes
8734 break
8735 fi
8736 done
8737 if test -z "$haveit"; then
8738 if test -d "$additional_libdir"; then
8739 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8740 fi
8741 fi
8742 fi
8743 fi
8744 ;;
8745 -R*)
8746 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8747 if test "$enable_rpath" != no; then
8748 haveit=
8749 for x in $rpathdirs; do
8750 if test "X$x" = "X$dir"; then
8751 haveit=yes
8752 break
8753 fi
8754 done
8755 if test -z "$haveit"; then
8756 rpathdirs="$rpathdirs $dir"
8757 fi
8758 haveit=
8759 for x in $ltrpathdirs; do
8760 if test "X$x" = "X$dir"; then
8761 haveit=yes
8762 break
8763 fi
8764 done
8765 if test -z "$haveit"; then
8766 ltrpathdirs="$ltrpathdirs $dir"
8767 fi
8768 fi
8769 ;;
8770 -l*)
8771 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8772 ;;
8773 *.la)
8774 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8775 ;;
8776 *)
8777 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8778 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8779 ;;
8780 esac
8781 done
8782 fi
8783 else
9f1528a1
AB
8784 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8785 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8786 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8787 else
8788 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8789 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8790 fi
016a3251
DD
8791 fi
8792 fi
8793 fi
8794 done
8795 done
8796 if test "X$rpathdirs" != "X"; then
8797 if test -n "$hardcode_libdir_separator"; then
8798 alldirs=
8799 for found_dir in $rpathdirs; do
8800 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8801 done
8802 acl_save_libdir="$libdir"
8803 libdir="$alldirs"
8804 eval flag=\"$hardcode_libdir_flag_spec\"
8805 libdir="$acl_save_libdir"
8806 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8807 else
8808 for found_dir in $rpathdirs; do
8809 acl_save_libdir="$libdir"
8810 libdir="$found_dir"
8811 eval flag=\"$hardcode_libdir_flag_spec\"
8812 libdir="$acl_save_libdir"
8813 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8814 done
8815 fi
8816 fi
8817 if test "X$ltrpathdirs" != "X"; then
8818 for found_dir in $ltrpathdirs; do
8819 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8820 done
8821 fi
8822
8823
8824
8825
8826
6c7a06a3 8827
6c7a06a3 8828
81ecdfbb
RW
8829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8830$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8831if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8832 $as_echo_n "(cached) " >&6
d542061a 8833else
6c7a06a3
TT
8834
8835 am_cv_func_iconv="no, consider installing GNU libiconv"
8836 am_cv_lib_iconv=no
016a3251
DD
8837 am_save_CPPFLAGS="$CPPFLAGS"
8838 CPPFLAGS="$CPPFLAGS $INCICONV"
8839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8840/* end confdefs.h. */
6c7a06a3
TT
8841#include <stdlib.h>
8842#include <iconv.h>
d542061a
UW
8843int
8844main ()
8845{
6c7a06a3 8846iconv_t cd = iconv_open("","");
016a3251
DD
8847 iconv(cd,NULL,NULL,NULL,NULL);
8848 iconv_close(cd);
d542061a
UW
8849 ;
8850 return 0;
8851}
8852_ACEOF
81ecdfbb 8853if ac_fn_c_try_link "$LINENO"; then :
016a3251 8854 am_cv_func_iconv=yes
d542061a 8855fi
81ecdfbb
RW
8856rm -f core conftest.err conftest.$ac_objext \
8857 conftest$ac_exeext conftest.$ac_ext
016a3251 8858 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8859
016a3251
DD
8860 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8861 for _libs in .libs _libs; do
8862 am_save_CPPFLAGS="$CPPFLAGS"
8863 am_save_LIBS="$LIBS"
8864 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8865 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8867/* end confdefs.h. */
6c7a06a3
TT
8868#include <stdlib.h>
8869#include <iconv.h>
d542061a
UW
8870int
8871main ()
8872{
6c7a06a3 8873iconv_t cd = iconv_open("","");
016a3251
DD
8874 iconv(cd,NULL,NULL,NULL,NULL);
8875 iconv_close(cd);
d542061a
UW
8876 ;
8877 return 0;
8878}
8879_ACEOF
81ecdfbb 8880if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8881 INCICONV="-I../libiconv/include"
8882 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8883 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8884 am_cv_lib_iconv=yes
8885 am_cv_func_iconv=yes
d542061a 8886fi
81ecdfbb
RW
8887rm -f core conftest.err conftest.$ac_objext \
8888 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8889 CPPFLAGS="$am_save_CPPFLAGS"
8890 LIBS="$am_save_LIBS"
8891 if test "$am_cv_func_iconv" = "yes"; then
8892 break
8893 fi
8894 done
77f120bf 8895 fi
94ae1714 8896
4edb1e84 8897 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8898 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8899 am_save_LIBS="$LIBS"
5d762de0 8900 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8901 LIBS="$LIBS $LIBICONV"
81ecdfbb 8902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8903/* end confdefs.h. */
6c7a06a3
TT
8904#include <stdlib.h>
8905#include <iconv.h>
bec39cab
AC
8906int
8907main ()
8908{
6c7a06a3
TT
8909iconv_t cd = iconv_open("","");
8910 iconv(cd,NULL,NULL,NULL,NULL);
8911 iconv_close(cd);
bec39cab
AC
8912 ;
8913 return 0;
8914}
8915_ACEOF
81ecdfbb 8916if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8917 am_cv_lib_iconv=yes
6c7a06a3 8918 am_cv_func_iconv=yes
627af7ea 8919fi
81ecdfbb
RW
8920rm -f core conftest.err conftest.$ac_objext \
8921 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8922 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8923 LIBS="$am_save_LIBS"
6c7a06a3
TT
8924 fi
8925
8926fi
81ecdfbb
RW
8927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8928$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8929 if test "$am_cv_func_iconv" = yes; then
8930
8931$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8932
016a3251 8933 fi
fc3b640d 8934 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8935
8936 for element in $INCICONV; do
8937 haveit=
8938 for x in $CPPFLAGS; do
8939
8940 acl_save_prefix="$prefix"
8941 prefix="$acl_final_prefix"
8942 acl_save_exec_prefix="$exec_prefix"
8943 exec_prefix="$acl_final_exec_prefix"
8944 eval x=\"$x\"
8945 exec_prefix="$acl_save_exec_prefix"
8946 prefix="$acl_save_prefix"
8947
8948 if test "X$x" = "X$element"; then
8949 haveit=yes
8950 break
8951 fi
8952 done
8953 if test -z "$haveit"; then
8954 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8955 fi
8956 done
8957
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8959$as_echo_n "checking how to link with libiconv... " >&6; }
8960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8961$as_echo "$LIBICONV" >&6; }
94ae1714 8962 else
016a3251
DD
8963 LIBICONV=
8964 LTLIBICONV=
fc3b640d 8965 fi
94ae1714 8966
6c7a06a3 8967
6c7a06a3 8968
016a3251 8969 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8971$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8972 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8973 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8974else
8975
81ecdfbb 8976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8977/* end confdefs.h. */
8978
6c7a06a3
TT
8979#include <stdlib.h>
8980#include <iconv.h>
8981extern
b4e70030 8982#ifdef __cplusplus
6c7a06a3 8983"C"
b4e70030 8984#endif
6c7a06a3
TT
8985#if defined(__STDC__) || defined(__cplusplus)
8986size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8987#else
8988size_t iconv();
8989#endif
8990
b4e70030
JB
8991int
8992main ()
8993{
6c7a06a3 8994
b4e70030
JB
8995 ;
8996 return 0;
8997}
8998_ACEOF
81ecdfbb 8999if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 9000 am_cv_proto_iconv_arg1=""
4e8d927d 9001else
81ecdfbb 9002 am_cv_proto_iconv_arg1="const"
b4e70030 9003fi
81ecdfbb 9004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
9005 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);"
9006fi
9007
9008 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 9009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 9010 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
9011$as_echo "${ac_t:-
9012 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
9013
9014cat >>confdefs.h <<_ACEOF
9015#define ICONV_CONST $am_cv_proto_iconv_arg1
9016_ACEOF
9017
9018 fi
6c7a06a3
TT
9019
9020
478aac75
DE
9021# GDB may fork/exec the iconv program to get the list of supported character
9022# sets. Allow the user to specify where to find it.
9023# There are several factors affecting the choice of option name:
9024# - There is already --with-libiconv-prefix but we can't use it, it specifies
9025# the build-time location of libiconv files.
9026# - The program we need to find is iconv, which comes with glibc. The user
9027# doesn't necessarily have libiconv installed. Therefore naming this
9028# --with-libiconv-foo feels wrong.
9029# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9030# defined to work on directories not files (though it really doesn't know
9031# the difference).
9032# - Calling this --with-iconv-prefix is perceived to cause too much confusion
9033# with --with-libiconv-prefix.
9034# Putting these together is why the option name is --with-iconv-bin.
9035
9036
9037# Check whether --with-iconv-bin was given.
9038if test "${with_iconv_bin+set}" = set; then :
9039 withval=$with_iconv_bin; iconv_bin="${withval}"
9040
9041cat >>confdefs.h <<_ACEOF
9042#define ICONV_BIN "${iconv_bin}"
9043_ACEOF
9044
9045
9046 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9047 if test "x$prefix" = xNONE; then
9048 test_prefix=/usr/local
9049 else
9050 test_prefix=$prefix
9051 fi
9052 else
9053 test_prefix=$exec_prefix
9054 fi
9055 value=0
9056 case ${iconv_bin} in
9057 "${test_prefix}"|"${test_prefix}/"*|\
9058 '${exec_prefix}'|'${exec_prefix}/'*)
9059 value=1
9060 ;;
9061 esac
9062
9063cat >>confdefs.h <<_ACEOF
9064#define ICONV_BIN_RELOCATABLE $value
9065_ACEOF
9066
9067
9068
9069fi
9070
9071
cb01cfba 9072# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9073if test x"$enable_tui" != xno; then
cb01cfba
JB
9074 prefer_curses=yes
9075fi
9076
9077curses_found=no
9078if test x"$prefer_curses" = xyes; then
9079 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9080 # curses library because the latter might not provide all the
9081 # functionality we need. However, this leads to problems on systems
9082 # where the linker searches /usr/local/lib, but the compiler doesn't
9083 # search /usr/local/include, if ncurses is installed in /usr/local. A
9084 # default installation of ncurses on alpha*-dec-osf* will lead to such
9085 # a situation.
81ecdfbb
RW
9086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9087$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 9088if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 9089 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9090else
9091 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9093/* end confdefs.h. */
9094
81ecdfbb
RW
9095/* Override any GCC internal prototype to avoid an error.
9096 Use char because int might match the return type of a GCC
9097 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9098#ifdef __cplusplus
9099extern "C"
9100#endif
6c7a06a3
TT
9101char waddstr ();
9102int
9103main ()
9104{
81ecdfbb 9105return waddstr ();
6c7a06a3
TT
9106 ;
9107 return 0;
9108}
9109_ACEOF
5007d765 9110for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
9111 if test -z "$ac_lib"; then
9112 ac_res="none required"
9113 else
9114 ac_res=-l$ac_lib
9115 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9116 fi
9117 if ac_fn_c_try_link "$LINENO"; then :
9118 ac_cv_search_waddstr=$ac_res
9119fi
9120rm -f core conftest.err conftest.$ac_objext \
9121 conftest$ac_exeext
d0ac1c44 9122 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
9123 break
9124fi
9125done
d0ac1c44 9126if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 9127
6c7a06a3 9128else
81ecdfbb
RW
9129 ac_cv_search_waddstr=no
9130fi
9131rm conftest.$ac_ext
9132LIBS=$ac_func_search_save_LIBS
9133fi
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9135$as_echo "$ac_cv_search_waddstr" >&6; }
9136ac_res=$ac_cv_search_waddstr
9137if test "$ac_res" != no; then :
9138 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9139
9140fi
9141
9142
cb01cfba
JB
9143 if test "$ac_cv_search_waddstr" != no; then
9144 curses_found=yes
9145 fi
9146fi
9147
9148# Check whether we should enable the TUI, but only do so if we really
9149# can.
9150if test x"$enable_tui" != xno; then
0ad6b8ee 9151 if test -d "$srcdir/tui"; then
cb01cfba 9152 if test "$curses_found" != no; then
6c7a06a3
TT
9153 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9154 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9155 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9156 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
9157 else
9158 if test x"$enable_tui" = xyes; then
d0ac1c44 9159 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9160 else
81ecdfbb
RW
9161 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9162$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9163 fi
9164 fi
9165 fi
9166fi
9167
9168# Since GDB uses Readline, we need termcap functionality. In many
9169# cases this will be provided by the curses library, but some systems
96fe4562 9170# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
9171
9172case $host_os in
9173 cygwin*)
0ad6b8ee 9174 if test -d "$srcdir/libtermcap"; then
6c7a06a3
TT
9175 LIBS="../libtermcap/libtermcap.a $LIBS"
9176 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9177 fi ;;
9178 go32* | *djgpp*)
9179 ac_cv_search_tgetent="none required"
9180 ;;
6c7a06a3
TT
9181esac
9182
9183# These are the libraries checked by Readline.
81ecdfbb
RW
9184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9185$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 9186if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 9187 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9188else
9189 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9191/* end confdefs.h. */
9192
81ecdfbb
RW
9193/* Override any GCC internal prototype to avoid an error.
9194 Use char because int might match the return type of a GCC
9195 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9196#ifdef __cplusplus
9197extern "C"
9198#endif
6c7a06a3
TT
9199char tgetent ();
9200int
9201main ()
9202{
81ecdfbb 9203return tgetent ();
6c7a06a3
TT
9204 ;
9205 return 0;
9206}
9207_ACEOF
2578ecb1 9208for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9209 if test -z "$ac_lib"; then
9210 ac_res="none required"
9211 else
9212 ac_res=-l$ac_lib
6c7a06a3 9213 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9214 fi
9215 if ac_fn_c_try_link "$LINENO"; then :
9216 ac_cv_search_tgetent=$ac_res
9217fi
9218rm -f core conftest.err conftest.$ac_objext \
9219 conftest$ac_exeext
d0ac1c44 9220 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9221 break
9222fi
9223done
d0ac1c44 9224if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9225
6c7a06a3 9226else
81ecdfbb 9227 ac_cv_search_tgetent=no
6c7a06a3 9228fi
81ecdfbb 9229rm conftest.$ac_ext
6c7a06a3
TT
9230LIBS=$ac_func_search_save_LIBS
9231fi
81ecdfbb
RW
9232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9233$as_echo "$ac_cv_search_tgetent" >&6; }
9234ac_res=$ac_cv_search_tgetent
9235if test "$ac_res" != no; then :
9236 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9237
06825bd1
MK
9238fi
9239
06825bd1 9240
bec39cab 9241if test "$ac_cv_search_tgetent" = no; then
7a85168d 9242 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9243fi
9244
3841debe 9245
81ecdfbb
RW
9246# Check whether --with-system-readline was given.
9247if test "${with_system_readline+set}" = set; then :
9248 withval=$with_system_readline;
9249fi
6a30b0a5 9250
6a30b0a5
AS
9251
9252if test "$with_system_readline" = yes; then
86c6b807
TT
9253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9254$as_echo_n "checking whether system readline is new enough... " >&6; }
9255if ${gdb_cv_readline_ok+:} false; then :
9256 $as_echo_n "(cached) " >&6
9257else
9258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9259/* end confdefs.h. */
9260#include <stdio.h>
9261#include <readline/readline.h>
9262int
9263main ()
9264{
9265#if RL_VERSION_MAJOR < 7
9266# error "readline version 7 required"
9267#endif
9268 ;
9269 return 0;
9270}
9271_ACEOF
9272if ac_fn_c_try_compile "$LINENO"; then :
9273 gdb_cv_readline_ok=yes
9274else
9275 gdb_cv_readline_ok=no
9276fi
9277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9278fi
9279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9280$as_echo "$gdb_cv_readline_ok" >&6; }
9281 if test "$gdb_cv_readline_ok" != yes; then
9282 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9283 fi
9284
6a30b0a5
AS
9285 READLINE=-lreadline
9286 READLINE_DEPS=
9287 READLINE_CFLAGS=
39037522 9288 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9289else
9290 READLINE='$(READLINE_DIR)/libreadline.a'
9291 READLINE_DEPS='$(READLINE)'
9292 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9293 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9294fi
9295
9296
9297
9298
9299
f997c383
SD
9300# Generate jit-reader.h
9301
9302# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9303TARGET_PTR=
9304
9305# The cast to long int works around a bug in the HP C Compiler
9306# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9307# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9308# This bug is HP SR number 8606223364.
9309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9310$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9311if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9312 $as_echo_n "(cached) " >&6
9313else
9314 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9315
9316else
9317 if test "$ac_cv_type_unsigned_long_long" = yes; then
9318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9320as_fn_error 77 "cannot compute sizeof (unsigned long long)
9321See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9322 else
9323 ac_cv_sizeof_unsigned_long_long=0
9324 fi
9325fi
9326
9327fi
9328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9329$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9330
9331
9332
9333cat >>confdefs.h <<_ACEOF
9334#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9335_ACEOF
9336
9337
9338# The cast to long int works around a bug in the HP C Compiler
9339# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9340# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9341# This bug is HP SR number 8606223364.
9342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9343$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9344if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9345 $as_echo_n "(cached) " >&6
9346else
9347 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9348
9349else
9350 if test "$ac_cv_type_unsigned_long" = yes; then
9351 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9352$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9353as_fn_error 77 "cannot compute sizeof (unsigned long)
9354See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9355 else
9356 ac_cv_sizeof_unsigned_long=0
9357 fi
9358fi
9359
9360fi
9361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9362$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9363
9364
9365
9366cat >>confdefs.h <<_ACEOF
9367#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9368_ACEOF
9369
9370
9371# The cast to long int works around a bug in the HP C Compiler
9372# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9373# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9374# This bug is HP SR number 8606223364.
9375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9376$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9377if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9378 $as_echo_n "(cached) " >&6
9379else
9380 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9381
9382else
9383 if test "$ac_cv_type_unsigned___int128" = yes; then
9384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9385$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9386as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9387See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9388 else
9389 ac_cv_sizeof_unsigned___int128=0
9390 fi
9391fi
9392
9393fi
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9395$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9396
9397
9398
9399cat >>confdefs.h <<_ACEOF
9400#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9401_ACEOF
9402
9403
9404
9405if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9406 TARGET_PTR="unsigned long"
9407elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9408 TARGET_PTR="unsigned long long"
9409elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9410 TARGET_PTR="unsigned __int128"
9411else
9412 TARGET_PTR="unsigned long"
9413fi
9414
9415
9416ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9417
9418
a2d08b9e
SD
9419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9420$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9421if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9422 $as_echo_n "(cached) " >&6
9423else
9424 ac_func_search_save_LIBS=$LIBS
9425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9426/* end confdefs.h. */
9427
9428/* Override any GCC internal prototype to avoid an error.
9429 Use char because int might match the return type of a GCC
9430 builtin and then its argument prototype would still apply. */
9431#ifdef __cplusplus
9432extern "C"
9433#endif
9434char dlopen ();
9435int
9436main ()
9437{
9438return dlopen ();
9439 ;
9440 return 0;
9441}
9442_ACEOF
9443for ac_lib in '' dl; do
9444 if test -z "$ac_lib"; then
9445 ac_res="none required"
9446 else
9447 ac_res=-l$ac_lib
9448 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9449 fi
9450 if ac_fn_c_try_link "$LINENO"; then :
9451 ac_cv_search_dlopen=$ac_res
9452fi
9453rm -f core conftest.err conftest.$ac_objext \
9454 conftest$ac_exeext
d0ac1c44 9455 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9456 break
9457fi
9458done
d0ac1c44 9459if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9460
9461else
9462 ac_cv_search_dlopen=no
9463fi
9464rm conftest.$ac_ext
9465LIBS=$ac_func_search_save_LIBS
9466fi
9467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9468$as_echo "$ac_cv_search_dlopen" >&6; }
9469ac_res=$ac_cv_search_dlopen
9470if test "$ac_res" != no; then :
9471 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9472
9473fi
9474
9475
39037522 9476
b8e0a31c
SD
9477
9478# Check whether --with-jit-reader-dir was given.
9479if test "${with_jit_reader_dir+set}" = set; then :
9480 withval=$with_jit_reader_dir;
9481 JIT_READER_DIR=$withval
9482else
9483 JIT_READER_DIR=${libdir}/gdb
9484fi
9485
9486
9487 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9488 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9489 ac_define_dir=`eval echo $JIT_READER_DIR`
9490 ac_define_dir=`eval echo $ac_define_dir`
9491
9492cat >>confdefs.h <<_ACEOF
9493#define JIT_READER_DIR "$ac_define_dir"
9494_ACEOF
9495
9496
9497
9498
9499 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9500 if test "x$prefix" = xNONE; then
9501 test_prefix=/usr/local
9502 else
9503 test_prefix=$prefix
9504 fi
9505 else
9506 test_prefix=$exec_prefix
9507 fi
9508 value=0
9509 case ${ac_define_dir} in
9510 "${test_prefix}"|"${test_prefix}/"*|\
9511 '${exec_prefix}'|'${exec_prefix}/'*)
9512 value=1
9513 ;;
9514 esac
9515
9516cat >>confdefs.h <<_ACEOF
9517#define JIT_READER_DIR_RELOCATABLE $value
9518_ACEOF
9519
9520
9521
9522
9523
81ecdfbb
RW
9524# Check whether --with-expat was given.
9525if test "${with_expat+set}" = set; then :
9526 withval=$with_expat;
5c39566f
DJ
9527else
9528 with_expat=auto
81ecdfbb
RW
9529fi
9530
9531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9532$as_echo_n "checking whether to use expat... " >&6; }
9533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9534$as_echo "$with_expat" >&6; }
5c39566f
DJ
9535
9536if test "${with_expat}" = no; then
81ecdfbb
RW
9537 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9538$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9539 HAVE_LIBEXPAT=no
9540else
9541
3841debe
DJ
9542
9543
9544
9545
9546
9547
9548
9549 use_additional=yes
9550
9551 acl_save_prefix="$prefix"
9552 prefix="$acl_final_prefix"
9553 acl_save_exec_prefix="$exec_prefix"
9554 exec_prefix="$acl_final_exec_prefix"
9555
9556 eval additional_includedir=\"$includedir\"
9557 eval additional_libdir=\"$libdir\"
9558
9559 exec_prefix="$acl_save_exec_prefix"
9560 prefix="$acl_save_prefix"
9561
9562
81ecdfbb
RW
9563# Check whether --with-libexpat-prefix was given.
9564if test "${with_libexpat_prefix+set}" = set; then :
9565 withval=$with_libexpat_prefix;
3841debe
DJ
9566 if test "X$withval" = "Xno"; then
9567 use_additional=no
9568 else
9569 if test "X$withval" = "X"; then
9570
9571 acl_save_prefix="$prefix"
9572 prefix="$acl_final_prefix"
9573 acl_save_exec_prefix="$exec_prefix"
9574 exec_prefix="$acl_final_exec_prefix"
9575
9576 eval additional_includedir=\"$includedir\"
9577 eval additional_libdir=\"$libdir\"
9578
9579 exec_prefix="$acl_save_exec_prefix"
9580 prefix="$acl_save_prefix"
9581
9582 else
9583 additional_includedir="$withval/include"
9584 additional_libdir="$withval/lib"
9585 fi
9586 fi
9587
81ecdfbb
RW
9588fi
9589
9f1528a1
AB
9590
9591# Check whether --with-libexpat-type was given.
9592if test "${with_libexpat_type+set}" = set; then :
9593 withval=$with_libexpat_type; with_libexpat_type=$withval
9594else
9595 with_libexpat_type=auto
9596fi
9597
9598 lib_type=`eval echo \$with_libexpat_type`
9599
3841debe
DJ
9600 LIBEXPAT=
9601 LTLIBEXPAT=
9602 INCEXPAT=
9603 rpathdirs=
9604 ltrpathdirs=
9605 names_already_handled=
9606 names_next_round='expat '
9607 while test -n "$names_next_round"; do
9608 names_this_round="$names_next_round"
9609 names_next_round=
9610 for name in $names_this_round; do
9611 already_handled=
9612 for n in $names_already_handled; do
9613 if test "$n" = "$name"; then
9614 already_handled=yes
9615 break
9616 fi
9617 done
9618 if test -z "$already_handled"; then
9619 names_already_handled="$names_already_handled $name"
9620 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9621 eval value=\"\$HAVE_LIB$uppername\"
9622 if test -n "$value"; then
9623 if test "$value" = yes; then
9624 eval value=\"\$LIB$uppername\"
9625 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9626 eval value=\"\$LTLIB$uppername\"
9627 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9628 else
9629 :
9630 fi
9631 else
9632 found_dir=
9633 found_la=
9634 found_so=
9635 found_a=
9636 if test $use_additional = yes; then
9f1528a1 9637 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9638 found_dir="$additional_libdir"
9639 found_so="$additional_libdir/lib$name.$shlibext"
9640 if test -f "$additional_libdir/lib$name.la"; then
9641 found_la="$additional_libdir/lib$name.la"
9642 fi
9f1528a1 9643 elif test x$lib_type != xshared; then
3841debe
DJ
9644 if test -f "$additional_libdir/lib$name.$libext"; then
9645 found_dir="$additional_libdir"
9646 found_a="$additional_libdir/lib$name.$libext"
9647 if test -f "$additional_libdir/lib$name.la"; then
9648 found_la="$additional_libdir/lib$name.la"
9649 fi
9650 fi
9651 fi
9652 fi
9653 if test "X$found_dir" = "X"; then
9654 for x in $LDFLAGS $LTLIBEXPAT; do
9655
9656 acl_save_prefix="$prefix"
9657 prefix="$acl_final_prefix"
9658 acl_save_exec_prefix="$exec_prefix"
9659 exec_prefix="$acl_final_exec_prefix"
9660 eval x=\"$x\"
9661 exec_prefix="$acl_save_exec_prefix"
9662 prefix="$acl_save_prefix"
9663
9664 case "$x" in
9665 -L*)
9666 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 9667 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9668 found_dir="$dir"
9669 found_so="$dir/lib$name.$shlibext"
9670 if test -f "$dir/lib$name.la"; then
9671 found_la="$dir/lib$name.la"
9672 fi
9f1528a1 9673 elif test x$lib_type != xshared; then
3841debe
DJ
9674 if test -f "$dir/lib$name.$libext"; then
9675 found_dir="$dir"
9676 found_a="$dir/lib$name.$libext"
9677 if test -f "$dir/lib$name.la"; then
9678 found_la="$dir/lib$name.la"
9679 fi
9680 fi
9681 fi
9682 ;;
9683 esac
9684 if test "X$found_dir" != "X"; then
9685 break
9686 fi
9687 done
9688 fi
9689 if test "X$found_dir" != "X"; then
9690 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9691 if test "X$found_so" != "X"; then
9692 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9693 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9694 else
9695 haveit=
9696 for x in $ltrpathdirs; do
9697 if test "X$x" = "X$found_dir"; then
9698 haveit=yes
9699 break
9700 fi
9701 done
9702 if test -z "$haveit"; then
9703 ltrpathdirs="$ltrpathdirs $found_dir"
9704 fi
9705 if test "$hardcode_direct" = yes; then
9706 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9707 else
9708 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9709 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9710 haveit=
9711 for x in $rpathdirs; do
9712 if test "X$x" = "X$found_dir"; then
9713 haveit=yes
9714 break
9715 fi
9716 done
9717 if test -z "$haveit"; then
9718 rpathdirs="$rpathdirs $found_dir"
9719 fi
9720 else
9721 haveit=
9722 for x in $LDFLAGS $LIBEXPAT; do
9723
9724 acl_save_prefix="$prefix"
9725 prefix="$acl_final_prefix"
9726 acl_save_exec_prefix="$exec_prefix"
9727 exec_prefix="$acl_final_exec_prefix"
9728 eval x=\"$x\"
9729 exec_prefix="$acl_save_exec_prefix"
9730 prefix="$acl_save_prefix"
9731
9732 if test "X$x" = "X-L$found_dir"; then
9733 haveit=yes
9734 break
9735 fi
9736 done
9737 if test -z "$haveit"; then
9738 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9739 fi
9740 if test "$hardcode_minus_L" != no; then
9741 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9742 else
9743 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9744 fi
9745 fi
9746 fi
9747 fi
9748 else
9749 if test "X$found_a" != "X"; then
9750 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9751 else
9752 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9753 fi
9754 fi
9755 additional_includedir=
9756 case "$found_dir" in
9757 */lib | */lib/)
9758 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9759 additional_includedir="$basedir/include"
9760 ;;
9761 esac
9762 if test "X$additional_includedir" != "X"; then
9763 if test "X$additional_includedir" != "X/usr/include"; then
9764 haveit=
9765 if test "X$additional_includedir" = "X/usr/local/include"; then
9766 if test -n "$GCC"; then
9767 case $host_os in
9768 linux*) haveit=yes;;
9769 esac
9770 fi
9771 fi
9772 if test -z "$haveit"; then
9773 for x in $CPPFLAGS $INCEXPAT; do
9774
9775 acl_save_prefix="$prefix"
9776 prefix="$acl_final_prefix"
9777 acl_save_exec_prefix="$exec_prefix"
9778 exec_prefix="$acl_final_exec_prefix"
9779 eval x=\"$x\"
9780 exec_prefix="$acl_save_exec_prefix"
9781 prefix="$acl_save_prefix"
9782
9783 if test "X$x" = "X-I$additional_includedir"; then
9784 haveit=yes
9785 break
9786 fi
9787 done
9788 if test -z "$haveit"; then
9789 if test -d "$additional_includedir"; then
9790 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9791 fi
9792 fi
9793 fi
9794 fi
9795 fi
9796 if test -n "$found_la"; then
9797 save_libdir="$libdir"
9798 case "$found_la" in
9799 */* | *\\*) . "$found_la" ;;
9800 *) . "./$found_la" ;;
9801 esac
9802 libdir="$save_libdir"
9803 for dep in $dependency_libs; do
9804 case "$dep" in
9805 -L*)
9806 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9807 if test "X$additional_libdir" != "X/usr/lib"; then
9808 haveit=
9809 if test "X$additional_libdir" = "X/usr/local/lib"; then
9810 if test -n "$GCC"; then
9811 case $host_os in
9812 linux*) haveit=yes;;
9813 esac
9814 fi
9815 fi
9816 if test -z "$haveit"; then
9817 haveit=
9818 for x in $LDFLAGS $LIBEXPAT; do
9819
9820 acl_save_prefix="$prefix"
9821 prefix="$acl_final_prefix"
9822 acl_save_exec_prefix="$exec_prefix"
9823 exec_prefix="$acl_final_exec_prefix"
9824 eval x=\"$x\"
9825 exec_prefix="$acl_save_exec_prefix"
9826 prefix="$acl_save_prefix"
9827
9828 if test "X$x" = "X-L$additional_libdir"; then
9829 haveit=yes
9830 break
9831 fi
9832 done
9833 if test -z "$haveit"; then
9834 if test -d "$additional_libdir"; then
9835 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9836 fi
9837 fi
9838 haveit=
9839 for x in $LDFLAGS $LTLIBEXPAT; do
9840
9841 acl_save_prefix="$prefix"
9842 prefix="$acl_final_prefix"
9843 acl_save_exec_prefix="$exec_prefix"
9844 exec_prefix="$acl_final_exec_prefix"
9845 eval x=\"$x\"
9846 exec_prefix="$acl_save_exec_prefix"
9847 prefix="$acl_save_prefix"
9848
9849 if test "X$x" = "X-L$additional_libdir"; then
9850 haveit=yes
9851 break
9852 fi
9853 done
9854 if test -z "$haveit"; then
9855 if test -d "$additional_libdir"; then
9856 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9857 fi
9858 fi
9859 fi
9860 fi
9861 ;;
9862 -R*)
9863 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9864 if test "$enable_rpath" != no; then
9865 haveit=
9866 for x in $rpathdirs; do
9867 if test "X$x" = "X$dir"; then
9868 haveit=yes
9869 break
9870 fi
9871 done
9872 if test -z "$haveit"; then
9873 rpathdirs="$rpathdirs $dir"
9874 fi
9875 haveit=
9876 for x in $ltrpathdirs; do
9877 if test "X$x" = "X$dir"; then
9878 haveit=yes
9879 break
9880 fi
9881 done
9882 if test -z "$haveit"; then
9883 ltrpathdirs="$ltrpathdirs $dir"
9884 fi
9885 fi
9886 ;;
9887 -l*)
9888 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9889 ;;
9890 *.la)
9891 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9892 ;;
9893 *)
9894 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9895 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9896 ;;
81ecdfbb
RW
9897 esac
9898 done
9899 fi
9900 else
9f1528a1
AB
9901 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9902 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9903 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9904 else
9905 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9906 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9907 fi
81ecdfbb
RW
9908 fi
9909 fi
9910 fi
9911 done
9912 done
9913 if test "X$rpathdirs" != "X"; then
9914 if test -n "$hardcode_libdir_separator"; then
9915 alldirs=
9916 for found_dir in $rpathdirs; do
9917 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9918 done
9919 acl_save_libdir="$libdir"
9920 libdir="$alldirs"
9921 eval flag=\"$hardcode_libdir_flag_spec\"
9922 libdir="$acl_save_libdir"
9923 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9924 else
9925 for found_dir in $rpathdirs; do
9926 acl_save_libdir="$libdir"
9927 libdir="$found_dir"
9928 eval flag=\"$hardcode_libdir_flag_spec\"
9929 libdir="$acl_save_libdir"
9930 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9931 done
9932 fi
9933 fi
9934 if test "X$ltrpathdirs" != "X"; then
9935 for found_dir in $ltrpathdirs; do
9936 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9937 done
9938 fi
a9322a30
TT
9939
9940
81ecdfbb 9941 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9942
81ecdfbb
RW
9943 for element in $INCEXPAT; do
9944 haveit=
9945 for x in $CPPFLAGS; do
a9322a30 9946
81ecdfbb
RW
9947 acl_save_prefix="$prefix"
9948 prefix="$acl_final_prefix"
9949 acl_save_exec_prefix="$exec_prefix"
9950 exec_prefix="$acl_final_exec_prefix"
9951 eval x=\"$x\"
9952 exec_prefix="$acl_save_exec_prefix"
9953 prefix="$acl_save_prefix"
a8111142 9954
81ecdfbb
RW
9955 if test "X$x" = "X$element"; then
9956 haveit=yes
9957 break
9958 fi
9959 done
9960 if test -z "$haveit"; then
9961 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9962 fi
9963 done
a9322a30
TT
9964
9965
81ecdfbb
RW
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9967$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9968if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9969 $as_echo_n "(cached) " >&6
bec39cab 9970else
bec39cab 9971
81ecdfbb
RW
9972 ac_save_LIBS="$LIBS"
9973 LIBS="$LIBS $LIBEXPAT"
9974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9975/* end confdefs.h. */
81ecdfbb
RW
9976#include "expat.h"
9977int
9978main ()
9979{
9980XML_Parser p = XML_ParserCreate (0);
9981 ;
9982 return 0;
9983}
bec39cab 9984_ACEOF
81ecdfbb
RW
9985if ac_fn_c_try_link "$LINENO"; then :
9986 ac_cv_libexpat=yes
c906108c 9987else
81ecdfbb 9988 ac_cv_libexpat=no
bec39cab 9989fi
81ecdfbb
RW
9990rm -f core conftest.err conftest.$ac_objext \
9991 conftest$ac_exeext conftest.$ac_ext
9992 LIBS="$ac_save_LIBS"
c906108c 9993
95ca63c4 9994fi
81ecdfbb
RW
9995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9996$as_echo "$ac_cv_libexpat" >&6; }
9997 if test "$ac_cv_libexpat" = yes; then
9998 HAVE_LIBEXPAT=yes
bec39cab 9999
81ecdfbb 10000$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 10001
81ecdfbb
RW
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10003$as_echo_n "checking how to link with libexpat... " >&6; }
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10005$as_echo "$LIBEXPAT" >&6; }
10006 else
10007 HAVE_LIBEXPAT=no
10008 CPPFLAGS="$ac_save_CPPFLAGS"
10009 LIBEXPAT=
10010 LTLIBEXPAT=
10011 fi
95ca63c4
CF
10012
10013
10014
7cb9022a
MK
10015
10016
bec39cab 10017
81ecdfbb
RW
10018 if test "$HAVE_LIBEXPAT" != yes; then
10019 if test "$with_expat" = yes; then
d0ac1c44 10020 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10021 else
10022 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10023$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10024 fi
10025 else
10026 save_LIBS=$LIBS
10027 LIBS="$LIBS $LIBEXPAT"
10028 for ac_func in XML_StopParser
10029do :
10030 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 10031if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 10032 cat >>confdefs.h <<_ACEOF
81ecdfbb 10033#define HAVE_XML_STOPPARSER 1
bec39cab 10034_ACEOF
95ca63c4 10035
bec39cab 10036fi
bec39cab 10037done
95ca63c4 10038
81ecdfbb
RW
10039 LIBS=$save_LIBS
10040 fi
a9322a30
TT
10041fi
10042
2400729e
UW
10043
10044# Check whether --with-mpfr was given.
10045if test "${with_mpfr+set}" = set; then :
10046 withval=$with_mpfr;
10047else
10048 with_mpfr=auto
10049fi
10050
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
10052$as_echo_n "checking whether to use MPFR... " >&6; }
10053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
10054$as_echo "$with_mpfr" >&6; }
10055
10056if test "${with_mpfr}" = no; then
10057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10058$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10059 HAVE_LIBMPFR=no
10060else
10061
10062
10063
10064
10065
10066
10067
10068
10069 use_additional=yes
10070
10071 acl_save_prefix="$prefix"
10072 prefix="$acl_final_prefix"
10073 acl_save_exec_prefix="$exec_prefix"
10074 exec_prefix="$acl_final_exec_prefix"
10075
10076 eval additional_includedir=\"$includedir\"
10077 eval additional_libdir=\"$libdir\"
10078
10079 exec_prefix="$acl_save_exec_prefix"
10080 prefix="$acl_save_prefix"
10081
10082
10083# Check whether --with-libmpfr-prefix was given.
10084if test "${with_libmpfr_prefix+set}" = set; then :
10085 withval=$with_libmpfr_prefix;
10086 if test "X$withval" = "Xno"; then
10087 use_additional=no
10088 else
10089 if test "X$withval" = "X"; then
10090
10091 acl_save_prefix="$prefix"
10092 prefix="$acl_final_prefix"
10093 acl_save_exec_prefix="$exec_prefix"
10094 exec_prefix="$acl_final_exec_prefix"
10095
10096 eval additional_includedir=\"$includedir\"
10097 eval additional_libdir=\"$libdir\"
10098
10099 exec_prefix="$acl_save_exec_prefix"
10100 prefix="$acl_save_prefix"
10101
10102 else
10103 additional_includedir="$withval/include"
10104 additional_libdir="$withval/lib"
10105 fi
10106 fi
10107
10108fi
10109
9f1528a1
AB
10110
10111# Check whether --with-libmpfr-type was given.
10112if test "${with_libmpfr_type+set}" = set; then :
10113 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10114else
10115 with_libmpfr_type=auto
10116fi
10117
10118 lib_type=`eval echo \$with_libmpfr_type`
10119
2400729e
UW
10120 LIBMPFR=
10121 LTLIBMPFR=
10122 INCMPFR=
10123 rpathdirs=
10124 ltrpathdirs=
10125 names_already_handled=
da658607 10126 names_next_round='mpfr gmp'
2400729e
UW
10127 while test -n "$names_next_round"; do
10128 names_this_round="$names_next_round"
10129 names_next_round=
10130 for name in $names_this_round; do
10131 already_handled=
10132 for n in $names_already_handled; do
10133 if test "$n" = "$name"; then
10134 already_handled=yes
10135 break
10136 fi
10137 done
10138 if test -z "$already_handled"; then
10139 names_already_handled="$names_already_handled $name"
10140 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10141 eval value=\"\$HAVE_LIB$uppername\"
10142 if test -n "$value"; then
10143 if test "$value" = yes; then
10144 eval value=\"\$LIB$uppername\"
10145 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10146 eval value=\"\$LTLIB$uppername\"
10147 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10148 else
10149 :
10150 fi
10151 else
10152 found_dir=
10153 found_la=
10154 found_so=
10155 found_a=
10156 if test $use_additional = yes; then
9f1528a1 10157 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
10158 found_dir="$additional_libdir"
10159 found_so="$additional_libdir/lib$name.$shlibext"
10160 if test -f "$additional_libdir/lib$name.la"; then
10161 found_la="$additional_libdir/lib$name.la"
10162 fi
9f1528a1 10163 elif test x$lib_type != xshared; then
2400729e
UW
10164 if test -f "$additional_libdir/lib$name.$libext"; then
10165 found_dir="$additional_libdir"
10166 found_a="$additional_libdir/lib$name.$libext"
10167 if test -f "$additional_libdir/lib$name.la"; then
10168 found_la="$additional_libdir/lib$name.la"
10169 fi
10170 fi
10171 fi
10172 fi
10173 if test "X$found_dir" = "X"; then
10174 for x in $LDFLAGS $LTLIBMPFR; do
10175
10176 acl_save_prefix="$prefix"
10177 prefix="$acl_final_prefix"
10178 acl_save_exec_prefix="$exec_prefix"
10179 exec_prefix="$acl_final_exec_prefix"
10180 eval x=\"$x\"
10181 exec_prefix="$acl_save_exec_prefix"
10182 prefix="$acl_save_prefix"
10183
10184 case "$x" in
10185 -L*)
10186 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 10187 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
10188 found_dir="$dir"
10189 found_so="$dir/lib$name.$shlibext"
10190 if test -f "$dir/lib$name.la"; then
10191 found_la="$dir/lib$name.la"
10192 fi
9f1528a1 10193 elif test x$lib_type != xshared; then
2400729e
UW
10194 if test -f "$dir/lib$name.$libext"; then
10195 found_dir="$dir"
10196 found_a="$dir/lib$name.$libext"
10197 if test -f "$dir/lib$name.la"; then
10198 found_la="$dir/lib$name.la"
10199 fi
10200 fi
10201 fi
10202 ;;
10203 esac
10204 if test "X$found_dir" != "X"; then
10205 break
10206 fi
10207 done
10208 fi
10209 if test "X$found_dir" != "X"; then
10210 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10211 if test "X$found_so" != "X"; then
10212 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10213 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10214 else
10215 haveit=
10216 for x in $ltrpathdirs; do
10217 if test "X$x" = "X$found_dir"; then
10218 haveit=yes
10219 break
10220 fi
10221 done
10222 if test -z "$haveit"; then
10223 ltrpathdirs="$ltrpathdirs $found_dir"
10224 fi
10225 if test "$hardcode_direct" = yes; then
10226 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10227 else
10228 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10229 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10230 haveit=
10231 for x in $rpathdirs; do
10232 if test "X$x" = "X$found_dir"; then
10233 haveit=yes
10234 break
10235 fi
10236 done
10237 if test -z "$haveit"; then
10238 rpathdirs="$rpathdirs $found_dir"
10239 fi
10240 else
10241 haveit=
10242 for x in $LDFLAGS $LIBMPFR; do
10243
10244 acl_save_prefix="$prefix"
10245 prefix="$acl_final_prefix"
10246 acl_save_exec_prefix="$exec_prefix"
10247 exec_prefix="$acl_final_exec_prefix"
10248 eval x=\"$x\"
10249 exec_prefix="$acl_save_exec_prefix"
10250 prefix="$acl_save_prefix"
10251
10252 if test "X$x" = "X-L$found_dir"; then
10253 haveit=yes
10254 break
10255 fi
10256 done
10257 if test -z "$haveit"; then
10258 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10259 fi
10260 if test "$hardcode_minus_L" != no; then
10261 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10262 else
10263 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10264 fi
10265 fi
10266 fi
10267 fi
10268 else
10269 if test "X$found_a" != "X"; then
10270 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10271 else
10272 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10273 fi
10274 fi
10275 additional_includedir=
10276 case "$found_dir" in
10277 */lib | */lib/)
10278 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10279 additional_includedir="$basedir/include"
10280 ;;
10281 esac
10282 if test "X$additional_includedir" != "X"; then
10283 if test "X$additional_includedir" != "X/usr/include"; then
10284 haveit=
10285 if test "X$additional_includedir" = "X/usr/local/include"; then
10286 if test -n "$GCC"; then
10287 case $host_os in
10288 linux*) haveit=yes;;
10289 esac
10290 fi
10291 fi
10292 if test -z "$haveit"; then
10293 for x in $CPPFLAGS $INCMPFR; do
10294
10295 acl_save_prefix="$prefix"
10296 prefix="$acl_final_prefix"
10297 acl_save_exec_prefix="$exec_prefix"
10298 exec_prefix="$acl_final_exec_prefix"
10299 eval x=\"$x\"
10300 exec_prefix="$acl_save_exec_prefix"
10301 prefix="$acl_save_prefix"
10302
10303 if test "X$x" = "X-I$additional_includedir"; then
10304 haveit=yes
10305 break
10306 fi
10307 done
10308 if test -z "$haveit"; then
10309 if test -d "$additional_includedir"; then
10310 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10311 fi
10312 fi
10313 fi
10314 fi
10315 fi
10316 if test -n "$found_la"; then
10317 save_libdir="$libdir"
10318 case "$found_la" in
10319 */* | *\\*) . "$found_la" ;;
10320 *) . "./$found_la" ;;
10321 esac
10322 libdir="$save_libdir"
10323 for dep in $dependency_libs; do
10324 case "$dep" in
10325 -L*)
10326 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10327 if test "X$additional_libdir" != "X/usr/lib"; then
10328 haveit=
10329 if test "X$additional_libdir" = "X/usr/local/lib"; then
10330 if test -n "$GCC"; then
10331 case $host_os in
10332 linux*) haveit=yes;;
10333 esac
10334 fi
10335 fi
10336 if test -z "$haveit"; then
10337 haveit=
10338 for x in $LDFLAGS $LIBMPFR; do
10339
10340 acl_save_prefix="$prefix"
10341 prefix="$acl_final_prefix"
10342 acl_save_exec_prefix="$exec_prefix"
10343 exec_prefix="$acl_final_exec_prefix"
10344 eval x=\"$x\"
10345 exec_prefix="$acl_save_exec_prefix"
10346 prefix="$acl_save_prefix"
10347
10348 if test "X$x" = "X-L$additional_libdir"; then
10349 haveit=yes
10350 break
10351 fi
10352 done
10353 if test -z "$haveit"; then
10354 if test -d "$additional_libdir"; then
10355 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10356 fi
10357 fi
10358 haveit=
10359 for x in $LDFLAGS $LTLIBMPFR; do
10360
10361 acl_save_prefix="$prefix"
10362 prefix="$acl_final_prefix"
10363 acl_save_exec_prefix="$exec_prefix"
10364 exec_prefix="$acl_final_exec_prefix"
10365 eval x=\"$x\"
10366 exec_prefix="$acl_save_exec_prefix"
10367 prefix="$acl_save_prefix"
10368
10369 if test "X$x" = "X-L$additional_libdir"; then
10370 haveit=yes
10371 break
10372 fi
10373 done
10374 if test -z "$haveit"; then
10375 if test -d "$additional_libdir"; then
10376 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10377 fi
10378 fi
10379 fi
10380 fi
10381 ;;
10382 -R*)
10383 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10384 if test "$enable_rpath" != no; then
10385 haveit=
10386 for x in $rpathdirs; do
10387 if test "X$x" = "X$dir"; then
10388 haveit=yes
10389 break
10390 fi
10391 done
10392 if test -z "$haveit"; then
10393 rpathdirs="$rpathdirs $dir"
10394 fi
10395 haveit=
10396 for x in $ltrpathdirs; do
10397 if test "X$x" = "X$dir"; then
10398 haveit=yes
10399 break
10400 fi
10401 done
10402 if test -z "$haveit"; then
10403 ltrpathdirs="$ltrpathdirs $dir"
10404 fi
10405 fi
10406 ;;
10407 -l*)
10408 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10409 ;;
10410 *.la)
10411 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10412 ;;
10413 *)
10414 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10415 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10416 ;;
10417 esac
10418 done
10419 fi
10420 else
9f1528a1
AB
10421 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10422 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10423 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10424 else
10425 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10426 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10427 fi
2400729e
UW
10428 fi
10429 fi
10430 fi
10431 done
10432 done
10433 if test "X$rpathdirs" != "X"; then
10434 if test -n "$hardcode_libdir_separator"; then
10435 alldirs=
10436 for found_dir in $rpathdirs; do
10437 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10438 done
10439 acl_save_libdir="$libdir"
10440 libdir="$alldirs"
10441 eval flag=\"$hardcode_libdir_flag_spec\"
10442 libdir="$acl_save_libdir"
10443 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10444 else
10445 for found_dir in $rpathdirs; do
10446 acl_save_libdir="$libdir"
10447 libdir="$found_dir"
10448 eval flag=\"$hardcode_libdir_flag_spec\"
10449 libdir="$acl_save_libdir"
10450 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10451 done
10452 fi
10453 fi
10454 if test "X$ltrpathdirs" != "X"; then
10455 for found_dir in $ltrpathdirs; do
10456 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10457 done
10458 fi
10459
10460
10461 ac_save_CPPFLAGS="$CPPFLAGS"
10462
10463 for element in $INCMPFR; do
10464 haveit=
10465 for x in $CPPFLAGS; do
10466
10467 acl_save_prefix="$prefix"
10468 prefix="$acl_final_prefix"
10469 acl_save_exec_prefix="$exec_prefix"
10470 exec_prefix="$acl_final_exec_prefix"
10471 eval x=\"$x\"
10472 exec_prefix="$acl_save_exec_prefix"
10473 prefix="$acl_save_prefix"
10474
10475 if test "X$x" = "X$element"; then
10476 haveit=yes
10477 break
10478 fi
10479 done
10480 if test -z "$haveit"; then
10481 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10482 fi
10483 done
10484
10485
10486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10487$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10488if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10489 $as_echo_n "(cached) " >&6
10490else
10491
10492 ac_save_LIBS="$LIBS"
10493 LIBS="$LIBS $LIBMPFR"
10494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10495/* end confdefs.h. */
10496#include <mpfr.h>
10497int
10498main ()
10499{
10500mpfr_exp_t exp; mpfr_t x;
10501 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10502 ;
10503 return 0;
10504}
10505_ACEOF
10506if ac_fn_c_try_link "$LINENO"; then :
10507 ac_cv_libmpfr=yes
10508else
10509 ac_cv_libmpfr=no
10510fi
10511rm -f core conftest.err conftest.$ac_objext \
10512 conftest$ac_exeext conftest.$ac_ext
10513 LIBS="$ac_save_LIBS"
10514
10515fi
10516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10517$as_echo "$ac_cv_libmpfr" >&6; }
10518 if test "$ac_cv_libmpfr" = yes; then
10519 HAVE_LIBMPFR=yes
10520
10521$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10522
10523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10524$as_echo_n "checking how to link with libmpfr... " >&6; }
10525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10526$as_echo "$LIBMPFR" >&6; }
10527 else
10528 HAVE_LIBMPFR=no
10529 CPPFLAGS="$ac_save_CPPFLAGS"
10530 LIBMPFR=
10531 LTLIBMPFR=
10532 fi
10533
10534
10535
10536
10537
10538
10539 if test "$HAVE_LIBMPFR" != yes; then
10540 if test "$with_mpfr" = yes; then
d0ac1c44 10541 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10542 else
10543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10544$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10545 fi
10546 fi
10547fi
10548
d344e670
DE
10549# --------------------- #
10550# Check for libpython. #
10551# --------------------- #
10552
a9322a30 10553
a9322a30
TT
10554
10555
ec685c5e 10556
0c4a4063 10557
81ecdfbb
RW
10558# Check whether --with-python was given.
10559if test "${with_python+set}" = set; then :
10560 withval=$with_python;
bec39cab 10561else
81ecdfbb 10562 with_python=auto
bec39cab 10563fi
bec39cab 10564
81ecdfbb
RW
10565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10566$as_echo_n "checking whether to use python... " >&6; }
10567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10568$as_echo "$with_python" >&6; }
9a156167 10569
81ecdfbb
RW
10570if test "${with_python}" = no; then
10571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10572$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10573 have_libpython=no
bec39cab 10574else
81ecdfbb 10575 case "${with_python}" in
8c85a4e2 10576 [\\/]* | ?:[\\/]*)
0ad6b8ee 10577 if test -d "${with_python}"; then
ec685c5e 10578 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10579 python_prog="${with_python}/bin/python"
0c4a4063 10580 python_prefix=
9c4ea6c5
JB
10581 # If python does not exit ${with_python}/bin, then try in
10582 # ${with_python}. On Windows/MinGW, this is where the Python
10583 # executable is.
10584 if test ! -x "${python_prog}"; then
10585 python_prog="${with_python}/python"
10586 python_prefix=
10587 fi
e7a30f46 10588 if test ! -x "${python_prog}"; then
ec685c5e
DE
10589 # Fall back to gdb 7.0/7.1 behaviour.
10590 python_prog=missing
0c4a4063 10591 python_prefix=${with_python}
ec685c5e 10592 fi
e7a30f46 10593 elif test -x "${with_python}"; then
ec685c5e
DE
10594 # While we can't run python compiled for $host (unless host == build),
10595 # the user could write a script that provides the needed information,
10596 # so we support that.
ec685c5e 10597 python_prog=${with_python}
0c4a4063 10598 python_prefix=
ec685c5e 10599 else
d0ac1c44 10600 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10601 fi
81ecdfbb 10602 ;;
ec685c5e
DE
10603 */*)
10604 # Disallow --with-python=foo/bar.
d0ac1c44 10605 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10606 ;;
ec685c5e
DE
10607 *)
10608 # The user has either specified auto, yes, or the name of the python
10609 # program assumed to be in $PATH.
10610 python_prefix=
10611 case "${with_python}" in
10612 yes | auto)
0ad6b8ee 10613 if test "${build}" = "${host}"; then
ec685c5e
DE
10614 # Extract the first word of "python", so it can be a program name with args.
10615set dummy python; ac_word=$2
10616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10617$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10618if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10619 $as_echo_n "(cached) " >&6
10620else
10621 case $python_prog_path in
10622 [\\/]* | ?:[\\/]*)
10623 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10624 ;;
10625 *)
10626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10627for as_dir in $PATH
10628do
10629 IFS=$as_save_IFS
10630 test -z "$as_dir" && as_dir=.
10631 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10633 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10635 break 2
10636 fi
10637done
10638 done
10639IFS=$as_save_IFS
10640
10641 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10642 ;;
10643esac
10644fi
10645python_prog_path=$ac_cv_path_python_prog_path
10646if test -n "$python_prog_path"; then
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10648$as_echo "$python_prog_path" >&6; }
10649else
10650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10651$as_echo "no" >&6; }
10652fi
10653
10654
10655 if test "${python_prog_path}" = missing; then
10656 python_prog=missing
10657 else
10658 python_prog=${python_prog_path}
10659 fi
10660 else
10661 # Not much we can do except assume the cross-compiler will find the
10662 # right files.
10663 python_prog=missing
10664 fi
10665 ;;
10666 *)
10667 # While we can't run python compiled for $host (unless host == build),
10668 # the user could write a script that provides the needed information,
10669 # so we support that.
10670 python_prog="${with_python}"
10671 # Extract the first word of "${python_prog}", so it can be a program name with args.
10672set dummy ${python_prog}; ac_word=$2
10673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10674$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10675if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10676 $as_echo_n "(cached) " >&6
10677else
10678 case $python_prog_path in
10679 [\\/]* | ?:[\\/]*)
10680 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10681 ;;
10682 *)
10683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10684for as_dir in $PATH
10685do
10686 IFS=$as_save_IFS
10687 test -z "$as_dir" && as_dir=.
10688 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10690 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10692 break 2
10693 fi
10694done
10695 done
10696IFS=$as_save_IFS
10697
10698 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10699 ;;
10700esac
10701fi
10702python_prog_path=$ac_cv_path_python_prog_path
10703if test -n "$python_prog_path"; then
10704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10705$as_echo "$python_prog_path" >&6; }
10706else
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10708$as_echo "no" >&6; }
10709fi
10710
10711
10712 if test "${python_prog_path}" = missing; then
d0ac1c44 10713 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10714 fi
10715 ;;
10716 esac
81ecdfbb
RW
10717 esac
10718
ec685c5e 10719 if test "${python_prog}" != missing; then
e7a30f46
DE
10720 # We have a python program to use, but it may be too old.
10721 # Don't flag an error for --with-python=auto (the default).
10722 have_python_config=yes
ec685c5e
DE
10723 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10724 if test $? != 0; then
e7a30f46
DE
10725 have_python_config=failed
10726 if test "${with_python}" != auto; then
d0ac1c44 10727 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10728 fi
ec685c5e
DE
10729 fi
10730 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10731 if test $? != 0; then
e7a30f46
DE
10732 have_python_config=failed
10733 if test "${with_python}" != auto; then
d0ac1c44 10734 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10735 fi
ec685c5e 10736 fi
0c4a4063
DE
10737 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10738 if test $? != 0; then
e7a30f46
DE
10739 have_python_config=failed
10740 if test "${with_python}" != auto; then
d0ac1c44 10741 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10742 fi
0c4a4063 10743 fi
ec685c5e 10744 else
ac534cba
JB
10745 # We do not have a python executable we can use to determine where
10746 # to find the Python headers and libs. We cannot guess the include
10747 # path from the python_prefix either, because that include path
10748 # depends on the Python version. So, there is nothing much we can
10749 # do except assume that the compiler will be able to find those files.
10750 python_includes=
10751 python_libs=
0c4a4063 10752 have_python_config=no
ec685c5e 10753 fi
bec39cab 10754
ec685c5e
DE
10755 # If we have python-config, only try the configuration it provides.
10756 # Otherwise fallback on the old way of trying different versions of
10757 # python in turn.
81ecdfbb 10758
ec685c5e
DE
10759 have_libpython=no
10760 if test "${have_python_config}" = yes; then
71737c43 10761
ec685c5e
DE
10762
10763 new_CPPFLAGS=${python_includes}
10764 new_LIBS=${python_libs}
71737c43
CB
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10766$as_echo_n "checking for python... " >&6; }
ec685c5e 10767 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10768 save_LIBS=$LIBS
ec685c5e 10769 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10770 LIBS="$new_LIBS $LIBS"
ec685c5e 10771 found_usable_python=no
81ecdfbb 10772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10773/* end confdefs.h. */
ac534cba 10774#include "Python.h"
81ecdfbb
RW
10775int
10776main ()
10777{
10778Py_Initialize ();
10779 ;
10780 return 0;
10781}
bec39cab 10782_ACEOF
81ecdfbb 10783if ac_fn_c_try_link "$LINENO"; then :
71737c43 10784 have_libpython=yes
ec685c5e 10785 found_usable_python=yes
ac534cba
JB
10786 PYTHON_CPPFLAGS=$new_CPPFLAGS
10787 PYTHON_LIBS=$new_LIBS
9a156167 10788fi
81ecdfbb
RW
10789rm -f core conftest.err conftest.$ac_objext \
10790 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10791 CPPFLAGS=$save_CPPFLAGS
10792 LIBS=$save_LIBS
ec685c5e
DE
10793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10794$as_echo "${found_usable_python}" >&6; }
9a156167 10795
e7a30f46 10796 elif test "${have_python_config}" != failed; then
ec685c5e 10797 if test "${have_libpython}" = no; then
9a156167 10798
420697bb
TT
10799
10800 new_CPPFLAGS=${python_includes}
bf27f0e2 10801 new_LIBS="-lpython2.7 ${python_libs}"
71737c43
CB
10802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10803$as_echo_n "checking for python... " >&6; }
420697bb
TT
10804 save_CPPFLAGS=$CPPFLAGS
10805 save_LIBS=$LIBS
10806 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10807 LIBS="$new_LIBS $LIBS"
420697bb
TT
10808 found_usable_python=no
10809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10810/* end confdefs.h. */
ac534cba 10811#include "Python.h"
420697bb
TT
10812int
10813main ()
10814{
10815Py_Initialize ();
10816 ;
10817 return 0;
10818}
10819_ACEOF
10820if ac_fn_c_try_link "$LINENO"; then :
71737c43 10821 have_libpython=yes
420697bb 10822 found_usable_python=yes
ac534cba
JB
10823 PYTHON_CPPFLAGS=$new_CPPFLAGS
10824 PYTHON_LIBS=$new_LIBS
420697bb
TT
10825fi
10826rm -f core conftest.err conftest.$ac_objext \
10827 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10828 CPPFLAGS=$save_CPPFLAGS
10829 LIBS=$save_LIBS
420697bb
TT
10830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10831$as_echo "${found_usable_python}" >&6; }
10832
10833 fi
10834 if test "${have_libpython}" = no; then
10835
ec685c5e
DE
10836
10837 new_CPPFLAGS=${python_includes}
bf27f0e2 10838 new_LIBS="-lpython2.6 ${python_libs}"
71737c43
CB
10839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10840$as_echo_n "checking for python... " >&6; }
ec685c5e
DE
10841 save_CPPFLAGS=$CPPFLAGS
10842 save_LIBS=$LIBS
10843 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10844 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10845 found_usable_python=no
10846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10847/* end confdefs.h. */
ac534cba 10848#include "Python.h"
ec685c5e
DE
10849int
10850main ()
10851{
10852Py_Initialize ();
10853 ;
10854 return 0;
10855}
10856_ACEOF
10857if ac_fn_c_try_link "$LINENO"; then :
71737c43 10858 have_libpython=yes
ec685c5e 10859 found_usable_python=yes
ac534cba
JB
10860 PYTHON_CPPFLAGS=$new_CPPFLAGS
10861 PYTHON_LIBS=$new_LIBS
ec685c5e 10862fi
81ecdfbb
RW
10863rm -f core conftest.err conftest.$ac_objext \
10864 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10865 CPPFLAGS=$save_CPPFLAGS
10866 LIBS=$save_LIBS
ec685c5e
DE
10867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10868$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10869
ec685c5e
DE
10870 fi
10871 fi
ec685c5e
DE
10872
10873 if test "${have_libpython}" = no; then
81ecdfbb
RW
10874 case "${with_python}" in
10875 yes)
d0ac1c44 10876 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10877 ;;
10878 auto)
10879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10880$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10881 ;;
10882 *)
d0ac1c44 10883 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10884 ;;
10885 esac
0c4a4063
DE
10886 else
10887 if test -n "${python_prefix}"; then
10888
10889cat >>confdefs.h <<_ACEOF
10890#define WITH_PYTHON_PATH "${python_prefix}"
10891_ACEOF
10892
10893
10894 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10895 if test "x$prefix" = xNONE; then
10896 test_prefix=/usr/local
10897 else
10898 test_prefix=$prefix
10899 fi
10900 else
10901 test_prefix=$exec_prefix
10902 fi
10903 value=0
10904 case ${python_prefix} in
10905 "${test_prefix}"|"${test_prefix}/"*|\
10906 '${exec_prefix}'|'${exec_prefix}/'*)
10907 value=1
10908 ;;
10909 esac
10910
10911cat >>confdefs.h <<_ACEOF
10912#define PYTHON_PATH_RELOCATABLE $value
10913_ACEOF
10914
10915
10916 fi
81ecdfbb 10917 fi
436868fb 10918fi
436868fb 10919
d13c7322
AB
10920
10921# Check whether --with-python-libdir was given.
10922if test "${with_python_libdir+set}" = set; then :
10923 withval=$with_python_libdir;
10924else
10925
10926 # If no python libdir is specified then select one based on
10927 # python's prefix path.
10928 if test -n "${python_prefix}"; then
10929 with_python_libdir=${python_prefix}/lib
10930 fi
10931
10932fi
10933
10934
ec685c5e 10935if test "${have_libpython}" != no; then
436868fb 10936
81ecdfbb 10937$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10938
81ecdfbb
RW
10939 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10940 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10941 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10942 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10943 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10944
d13c7322
AB
10945 if test -n "${with_python_libdir}"; then
10946
10947cat >>confdefs.h <<_ACEOF
10948#define WITH_PYTHON_LIBDIR "${with_python_libdir}"
10949_ACEOF
10950
10951
10952 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10953 if test "x$prefix" = xNONE; then
10954 test_prefix=/usr/local
10955 else
10956 test_prefix=$prefix
10957 fi
10958 else
10959 test_prefix=$exec_prefix
10960 fi
10961 value=0
10962 case ${with_python_libdir} in
10963 "${test_prefix}"|"${test_prefix}/"*|\
10964 '${exec_prefix}'|'${exec_prefix}/'*)
10965 value=1
10966 ;;
10967 esac
10968
10969cat >>confdefs.h <<_ACEOF
10970#define PYTHON_LIBDIR_RELOCATABLE $value
10971_ACEOF
10972
10973
10974 fi
10975
81ecdfbb
RW
10976 # Flags needed to compile Python code (taken from python-config --cflags).
10977 # We cannot call python-config directly because it will output whatever was
10978 # used when compiling the Python interpreter itself, including flags which
10979 # would make the python-related objects be compiled differently from the
10980 # rest of GDB (e.g., -O2 and -fPIC).
10981 if test "${GCC}" = yes; then
ae292b3a
TT
10982 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10983 # Python headers recommend -DNDEBUG, but it's unclear if that just
10984 # refers to building Python itself. In release mode, though, it
10985 # doesn't hurt for the Python code in gdb to follow.
10986 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10987 fi
436868fb 10988
81ecdfbb
RW
10989 if test "x${tentative_python_cflags}" != x; then
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10991$as_echo_n "checking compiler flags for python code... " >&6; }
10992 for flag in ${tentative_python_cflags}; do
10993 # Check that the compiler accepts it
10994 saved_CFLAGS="$CFLAGS"
10995 CFLAGS="$CFLAGS $flag"
10996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10997/* end confdefs.h. */
81ecdfbb 10998
a9322a30
TT
10999int
11000main ()
11001{
a9322a30
TT
11002
11003 ;
11004 return 0;
11005}
bec39cab 11006_ACEOF
81ecdfbb
RW
11007if ac_fn_c_try_compile "$LINENO"; then :
11008 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 11009fi
81ecdfbb
RW
11010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11011 CFLAGS="$saved_CFLAGS"
11012 done
11013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11014$as_echo "${PYTHON_CFLAGS}" >&6; }
11015 fi
043b6510 11016
c83393b9
JB
11017 # On x64 Windows, Python's include headers, and pyconfig.h in
11018 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
11019 # version of Windows. Unfortunately, MS_WIN64 is only defined if
11020 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
11021 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
11022 # The issue was reported to the Python community, but still isn't
11023 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
11024
043b6510 11025 case "$gdb_host" in
c83393b9
JB
11026 mingw64)
11027 if test "${GCC}" = yes; then
11028 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
11029 fi
11030 ;;
043b6510 11031 esac
81ecdfbb 11032else
6dddc817
DE
11033 # Even if Python support is not compiled in, we need to have this file
11034 # included so that the "python" command, et.al., still exists.
8fd8d003 11035 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 11036 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 11037fi
9a156167 11038
a4a1c157
PA
11039# Work around Python http://bugs.python.org/issue10112. See also
11040# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
11041# no effect. Note that the only test after this that uses Python is
11042# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
11043# run without -export-dynamic too.
11044PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
11045
11046
ed3ef339
DE
11047
11048
4df42755
DE
11049 if test "${have_libpython}" != no; then
11050 HAVE_PYTHON_TRUE=
11051 HAVE_PYTHON_FALSE='#'
11052else
11053 HAVE_PYTHON_TRUE='#'
11054 HAVE_PYTHON_FALSE=
11055fi
11056
ed3ef339
DE
11057
11058# -------------------- #
11059# Check for libguile. #
11060# -------------------- #
11061
11062
e1402065
DE
11063
11064
11065
11066
11067# Check whether --with-guile was given.
11068if test "${with_guile+set}" = set; then :
11069 withval=$with_guile;
11070else
11071 with_guile=auto
11072fi
11073
11074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11075$as_echo_n "checking whether to use guile... " >&6; }
11076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11077$as_echo "$with_guile" >&6; }
11078
ed3ef339
DE
11079# Extract the first word of "pkg-config", so it can be a program name with args.
11080set dummy pkg-config; ac_word=$2
11081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11082$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 11083if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
11084 $as_echo_n "(cached) " >&6
11085else
11086 case $pkg_config_prog_path in
11087 [\\/]* | ?:[\\/]*)
11088 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11089 ;;
11090 *)
11091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11092for as_dir in $PATH
11093do
11094 IFS=$as_save_IFS
11095 test -z "$as_dir" && as_dir=.
11096 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 11097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
11098 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11100 break 2
11101 fi
11102done
11103 done
11104IFS=$as_save_IFS
11105
11106 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11107 ;;
11108esac
11109fi
11110pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11111if test -n "$pkg_config_prog_path"; then
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11113$as_echo "$pkg_config_prog_path" >&6; }
11114else
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11116$as_echo "no" >&6; }
11117fi
11118
11119
11120
ae5369e7 11121try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
ed3ef339
DE
11122have_libguile=no
11123case "${with_guile}" in
11124no)
11125 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11126$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11127 ;;
11128auto)
e1402065
DE
11129 if test "${pkg_config_prog_path}" = "missing"; then
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11131$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11132 else
ed3ef339
DE
11133
11134 pkg_config=${pkg_config_prog_path}
11135 guile_version_list=${try_guile_versions}
11136 flag_errors=no
11137
ed3ef339
DE
11138 found_usable_guile=checking
11139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11140$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11141 for guile_version in ${guile_version_list}; do
11142 ${pkg_config} --exists ${guile_version} 2>/dev/null
11143 if test $? != 0; then
11144 continue
11145 fi
11146 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11147 if test $? != 0; then
d0ac1c44 11148 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11149 fi
11150 new_LIBS=`${pkg_config} --libs ${guile_version}`
11151 if test $? != 0; then
d0ac1c44 11152 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11153 fi
11154 found_usable_guile=${guile_version}
11155 break
11156 done
11157 if test "${found_usable_guile}" = "checking"; then
11158 if test "${flag_errors}" = "yes"; then
d0ac1c44 11159 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11160 else
11161 found_usable_guile=no
11162 fi
11163 fi
11164 if test "${found_usable_guile}" != no; then
11165 save_CPPFLAGS=$CPPFLAGS
11166 save_LIBS=$LIBS
11167 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11168 LIBS="$LIBS $new_LIBS"
11169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11170/* end confdefs.h. */
11171#include "libguile.h"
11172int
11173main ()
11174{
11175scm_init_guile ();
11176 ;
11177 return 0;
11178}
11179_ACEOF
11180if ac_fn_c_try_link "$LINENO"; then :
11181 have_libguile=yes
11182 GUILE_CPPFLAGS=$new_CPPFLAGS
11183 GUILE_LIBS=$new_LIBS
11184else
11185 found_usable_guile=no
11186fi
11187rm -f core conftest.err conftest.$ac_objext \
11188 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11189 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11190if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11191
11192$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11193
11194
11195fi
11196
ed3ef339
DE
11197 CPPFLAGS=$save_CPPFLAGS
11198 LIBS=$save_LIBS
11199 if test "${found_usable_guile}" = no; then
11200 if test "${flag_errors}" = yes; then
11201 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11202$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11203as_fn_error $? "linking guile version ${guile_version} test program failed
11204See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11205 fi
11206 fi
11207 fi
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11209$as_echo "${found_usable_guile}" >&6; }
11210
e1402065 11211 fi
ed3ef339
DE
11212 ;;
11213yes)
e1402065 11214 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11215 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11216 fi
ed3ef339
DE
11217
11218 pkg_config=${pkg_config_prog_path}
11219 guile_version_list=${try_guile_versions}
11220 flag_errors=yes
11221
ed3ef339
DE
11222 found_usable_guile=checking
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11224$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11225 for guile_version in ${guile_version_list}; do
11226 ${pkg_config} --exists ${guile_version} 2>/dev/null
11227 if test $? != 0; then
11228 continue
11229 fi
11230 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11231 if test $? != 0; then
d0ac1c44 11232 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11233 fi
11234 new_LIBS=`${pkg_config} --libs ${guile_version}`
11235 if test $? != 0; then
d0ac1c44 11236 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11237 fi
11238 found_usable_guile=${guile_version}
11239 break
11240 done
11241 if test "${found_usable_guile}" = "checking"; then
11242 if test "${flag_errors}" = "yes"; then
d0ac1c44 11243 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11244 else
11245 found_usable_guile=no
11246 fi
11247 fi
11248 if test "${found_usable_guile}" != no; then
11249 save_CPPFLAGS=$CPPFLAGS
11250 save_LIBS=$LIBS
11251 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11252 LIBS="$LIBS $new_LIBS"
11253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11254/* end confdefs.h. */
11255#include "libguile.h"
11256int
11257main ()
11258{
11259scm_init_guile ();
11260 ;
11261 return 0;
11262}
11263_ACEOF
11264if ac_fn_c_try_link "$LINENO"; then :
11265 have_libguile=yes
11266 GUILE_CPPFLAGS=$new_CPPFLAGS
11267 GUILE_LIBS=$new_LIBS
11268else
11269 found_usable_guile=no
11270fi
11271rm -f core conftest.err conftest.$ac_objext \
11272 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11273 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11274if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11275
11276$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11277
11278
11279fi
11280
ed3ef339
DE
11281 CPPFLAGS=$save_CPPFLAGS
11282 LIBS=$save_LIBS
11283 if test "${found_usable_guile}" = no; then
11284 if test "${flag_errors}" = yes; then
11285 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11286$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11287as_fn_error $? "linking guile version ${guile_version} test program failed
11288See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11289 fi
11290 fi
11291 fi
11292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11293$as_echo "${found_usable_guile}" >&6; }
11294
11295 ;;
11296[\\/]* | ?:[\\/]*)
e1402065 11297 if test -x "${with_guile}"; then
ed3ef339
DE
11298
11299 pkg_config=${with_guile}
11300 guile_version_list=${try_guile_versions}
11301 flag_errors=yes
11302
ed3ef339
DE
11303 found_usable_guile=checking
11304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11305$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11306 for guile_version in ${guile_version_list}; do
11307 ${pkg_config} --exists ${guile_version} 2>/dev/null
11308 if test $? != 0; then
11309 continue
11310 fi
11311 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11312 if test $? != 0; then
d0ac1c44 11313 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11314 fi
11315 new_LIBS=`${pkg_config} --libs ${guile_version}`
11316 if test $? != 0; then
d0ac1c44 11317 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11318 fi
11319 found_usable_guile=${guile_version}
11320 break
11321 done
11322 if test "${found_usable_guile}" = "checking"; then
11323 if test "${flag_errors}" = "yes"; then
d0ac1c44 11324 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11325 else
11326 found_usable_guile=no
11327 fi
11328 fi
11329 if test "${found_usable_guile}" != no; then
11330 save_CPPFLAGS=$CPPFLAGS
11331 save_LIBS=$LIBS
11332 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11333 LIBS="$LIBS $new_LIBS"
11334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11335/* end confdefs.h. */
11336#include "libguile.h"
11337int
11338main ()
11339{
11340scm_init_guile ();
11341 ;
11342 return 0;
11343}
11344_ACEOF
11345if ac_fn_c_try_link "$LINENO"; then :
11346 have_libguile=yes
11347 GUILE_CPPFLAGS=$new_CPPFLAGS
11348 GUILE_LIBS=$new_LIBS
11349else
11350 found_usable_guile=no
11351fi
11352rm -f core conftest.err conftest.$ac_objext \
11353 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11354 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11355if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11356
11357$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11358
11359
11360fi
11361
ed3ef339
DE
11362 CPPFLAGS=$save_CPPFLAGS
11363 LIBS=$save_LIBS
11364 if test "${found_usable_guile}" = no; then
11365 if test "${flag_errors}" = yes; then
11366 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11367$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11368as_fn_error $? "linking guile version ${guile_version} test program failed
11369See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11370 fi
11371 fi
11372 fi
11373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11374$as_echo "${found_usable_guile}" >&6; }
11375
e1402065 11376 else
d0ac1c44 11377 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11378 fi
ed3ef339
DE
11379 ;;
11380"" | */*)
11381 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11382 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11383 ;;
11384*)
11385 # A space separate list of guile versions to try, in order.
e1402065 11386 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11387 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11388 fi
ed3ef339
DE
11389
11390 pkg_config=${pkg_config_prog_path}
11391 guile_version_list=${with_guile}
11392 flag_errors=yes
11393
ed3ef339
DE
11394 found_usable_guile=checking
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11396$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11397 for guile_version in ${guile_version_list}; do
11398 ${pkg_config} --exists ${guile_version} 2>/dev/null
11399 if test $? != 0; then
11400 continue
11401 fi
11402 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11403 if test $? != 0; then
d0ac1c44 11404 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11405 fi
11406 new_LIBS=`${pkg_config} --libs ${guile_version}`
11407 if test $? != 0; then
d0ac1c44 11408 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11409 fi
11410 found_usable_guile=${guile_version}
11411 break
11412 done
11413 if test "${found_usable_guile}" = "checking"; then
11414 if test "${flag_errors}" = "yes"; then
d0ac1c44 11415 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11416 else
11417 found_usable_guile=no
11418 fi
11419 fi
11420 if test "${found_usable_guile}" != no; then
11421 save_CPPFLAGS=$CPPFLAGS
11422 save_LIBS=$LIBS
11423 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11424 LIBS="$LIBS $new_LIBS"
11425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11426/* end confdefs.h. */
11427#include "libguile.h"
11428int
11429main ()
11430{
11431scm_init_guile ();
11432 ;
11433 return 0;
11434}
11435_ACEOF
11436if ac_fn_c_try_link "$LINENO"; then :
11437 have_libguile=yes
11438 GUILE_CPPFLAGS=$new_CPPFLAGS
11439 GUILE_LIBS=$new_LIBS
11440else
11441 found_usable_guile=no
11442fi
11443rm -f core conftest.err conftest.$ac_objext \
11444 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11445 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11446if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11447
11448$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11449
11450
11451fi
11452
ed3ef339
DE
11453 CPPFLAGS=$save_CPPFLAGS
11454 LIBS=$save_LIBS
11455 if test "${found_usable_guile}" = no; then
11456 if test "${flag_errors}" = yes; then
11457 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11458$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11459as_fn_error $? "linking guile version ${guile_version} test program failed
11460See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11461 fi
11462 fi
11463 fi
11464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11465$as_echo "${found_usable_guile}" >&6; }
11466
11467 ;;
11468esac
11469
e76c5d17 11470if test "${have_libguile}" != no; then
d342a0da
DE
11471 case "${with_guile}" in
11472 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11473
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11475$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11476if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11477 $as_echo_n "(cached) " >&6
11478else
d342a0da 11479 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11480
11481 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11482 # the 'guild' and 'bindir' variables. In that case, try to guess
11483 # what the program name is, at the risk of getting it wrong if
11484 # Guile was configured with '--program-suffix' or similar.
11485 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11486 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11487 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11488 fi
11489
11490fi
11491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11492$as_echo "$ac_cv_guild_program_name" >&6; }
11493
11494 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11495 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11496 fi
11497
11498 GUILD="$ac_cv_guild_program_name"
11499
11500
d342a0da
DE
11501 ;;
11502 *)
11503
11504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11505$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11506if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11507 $as_echo_n "(cached) " >&6
11508else
11509 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11510
11511 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11512 # the 'guild' and 'bindir' variables. In that case, try to guess
11513 # what the program name is, at the risk of getting it wrong if
11514 # Guile was configured with '--program-suffix' or similar.
11515 if test "x$ac_cv_guild_program_name" = "x"; then
11516 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11517 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11518 fi
11519
11520fi
11521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11522$as_echo "$ac_cv_guild_program_name" >&6; }
11523
11524 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11525 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11526 fi
11527
11528 GUILD="$ac_cv_guild_program_name"
11529
11530
11531 ;;
11532 esac
e76c5d17
DE
11533
11534
11535 if test "$cross_compiling" = no; then
11536 GUILD_TARGET_FLAG=
11537 else
11538 GUILD_TARGET_FLAG="--target=$host"
11539 fi
11540
11541
11542
11543
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11545$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11546if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11547 $as_echo_n "(cached) " >&6
11548else
11549 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11550 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11551 ac_cv_guild_ok=yes
11552 else
11553 ac_cv_guild_ok=no
11554 fi
11555fi
11556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11557$as_echo "$ac_cv_guild_ok" >&6; }
11558
11559 if test "$ac_cv_guild_ok" = no; then
11560 have_libguile=no
11561 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11562$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11563 fi
11564fi
11565
ed3ef339
DE
11566if test "${have_libguile}" != no; then
11567
11568$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11569
11570 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11571 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11572 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11573 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11574 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11575
11576 save_LIBS="$LIBS"
11577 save_CPPFLAGS="$CPPFLAGS"
11578 LIBS="$GUILE_LIBS"
11579 CPPFLAGS="$GUILE_CPPFLAGS"
11580 for ac_func in scm_new_smob
11581do :
11582 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11583if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11584 cat >>confdefs.h <<_ACEOF
11585#define HAVE_SCM_NEW_SMOB 1
11586_ACEOF
11587
11588fi
11589done
11590
11591 LIBS="$save_LIBS"
11592 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11593else
11594 # Even if Guile support is not compiled in, we need to have these files
11595 # included.
bd810fff 11596 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11597 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11598fi
9a156167 11599
ac534cba 11600
4df42755
DE
11601 if test "${have_libguile}" != no; then
11602 HAVE_GUILE_TRUE=
11603 HAVE_GUILE_FALSE='#'
11604else
11605 HAVE_GUILE_TRUE='#'
11606 HAVE_GUILE_FALSE=
11607fi
11608
ac534cba 11609
62f29fda
TT
11610# ---------------------------- #
11611# Check for source highlight. #
11612# ---------------------------- #
11613
11614SRCHIGH_LIBS=
11615SRCHIGH_CFLAGS=
189b8c2e
ST
11616
11617# Check whether --enable-source-highlight was given.
11618if test "${enable_source_highlight+set}" = set; then :
11619 enableval=$enable_source_highlight; case "${enableval}" in
11620 yes) enable_source_highlight=yes ;;
11621 no) enable_source_highlight=no ;;
11622 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11623esac
11624else
11625 enable_source_highlight=auto
11626fi
11627
11628
11629if test "${enable_source_highlight}" != "no"; then
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11631$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11632 if test "${pkg_config_prog_path}" = "missing"; then
11633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11634$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11635 if test "${enable_source_highlight}" = "yes"; then
11636 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11637 fi
11638 else
d806ea2d
TT
11639 case "$LDFLAGS" in
11640 *static-libstdc*)
11641 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11642 ;;
11643 esac
11644
189b8c2e 11645 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11646 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11647 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11648
11649$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11650
11651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11652$as_echo "yes" >&6; }
189b8c2e 11653 else
62f29fda
TT
11654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11655$as_echo "no" >&6; }
189b8c2e
ST
11656 if test "${enable_source_highlight}" = "yes"; then
11657 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11658 fi
11659 fi
11660 fi
62f29fda
TT
11661fi
11662
11663
11664
05ea2a05
TT
11665# ------------------------- #
11666# Checks for header files. #
11667# ------------------------- #
58bfce93 11668
05ea2a05
TT
11669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11670$as_echo_n "checking for ANSI C header files... " >&6; }
11671if ${ac_cv_header_stdc+:} false; then :
11672 $as_echo_n "(cached) " >&6
58bfce93 11673else
5599c404
MM
11674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11675/* end confdefs.h. */
05ea2a05
TT
11676#include <stdlib.h>
11677#include <stdarg.h>
11678#include <string.h>
11679#include <float.h>
5599c404 11680
05ea2a05
TT
11681int
11682main ()
11683{
5599c404 11684
05ea2a05
TT
11685 ;
11686 return 0;
11687}
5599c404 11688_ACEOF
05ea2a05
TT
11689if ac_fn_c_try_compile "$LINENO"; then :
11690 ac_cv_header_stdc=yes
5599c404 11691else
05ea2a05 11692 ac_cv_header_stdc=no
5599c404 11693fi
05ea2a05 11694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58bfce93 11695
05ea2a05
TT
11696if test $ac_cv_header_stdc = yes; then
11697 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11699/* end confdefs.h. */
11700#include <string.h>
58bfce93 11701
05ea2a05
TT
11702_ACEOF
11703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11704 $EGREP "memchr" >/dev/null 2>&1; then :
58bfce93 11705
05ea2a05
TT
11706else
11707 ac_cv_header_stdc=no
11708fi
11709rm -f conftest*
58bfce93 11710
05ea2a05 11711fi
58bfce93 11712
05ea2a05
TT
11713if test $ac_cv_header_stdc = yes; then
11714 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11716/* end confdefs.h. */
11717#include <stdlib.h>
58bfce93 11718
05ea2a05
TT
11719_ACEOF
11720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11721 $EGREP "free" >/dev/null 2>&1; then :
58bfce93 11722
05ea2a05
TT
11723else
11724 ac_cv_header_stdc=no
11725fi
11726rm -f conftest*
58bfce93 11727
05ea2a05 11728fi
58bfce93 11729
05ea2a05
TT
11730if test $ac_cv_header_stdc = yes; then
11731 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11732 if test "$cross_compiling" = yes; then :
11733 :
11734else
11735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11736/* end confdefs.h. */
11737#include <ctype.h>
11738#include <stdlib.h>
11739#if ((' ' & 0x0FF) == 0x020)
11740# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11741# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11742#else
11743# define ISLOWER(c) \
11744 (('a' <= (c) && (c) <= 'i') \
11745 || ('j' <= (c) && (c) <= 'r') \
11746 || ('s' <= (c) && (c) <= 'z'))
11747# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11748#endif
58bfce93 11749
05ea2a05
TT
11750#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11751int
11752main ()
11753{
11754 int i;
11755 for (i = 0; i < 256; i++)
11756 if (XOR (islower (i), ISLOWER (i))
11757 || toupper (i) != TOUPPER (i))
11758 return 2;
11759 return 0;
11760}
11761_ACEOF
11762if ac_fn_c_try_run "$LINENO"; then :
58bfce93 11763
05ea2a05
TT
11764else
11765 ac_cv_header_stdc=no
11766fi
11767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11768 conftest.$ac_objext conftest.beam conftest.$ac_ext
11769fi
58bfce93 11770
05ea2a05
TT
11771fi
11772fi
11773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11774$as_echo "$ac_cv_header_stdc" >&6; }
11775if test $ac_cv_header_stdc = yes; then
58bfce93 11776
05ea2a05 11777$as_echo "#define STDC_HEADERS 1" >>confdefs.h
58bfce93 11778
05ea2a05 11779fi
58bfce93 11780
05ea2a05 11781# elf_hp.h is for HP/UX 64-bit shared library support.
8ae8e197 11782for ac_header in nlist.h machine/reg.h \
05ea2a05
TT
11783 thread_db.h \
11784 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11785 sys/resource.h sys/ptrace.h ptrace.h \
8ae8e197 11786 sys/reg.h sys/debugreg.h \
05ea2a05
TT
11787 termios.h elf_hp.h
11788do :
11789 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11790ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11791if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11792 cat >>confdefs.h <<_ACEOF
11793#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11794_ACEOF
58bfce93
MM
11795
11796fi
11797
05ea2a05 11798done
58bfce93 11799
05ea2a05
TT
11800for ac_header in sys/user.h
11801do :
11802 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11803# include <sys/param.h>
11804#endif
58bfce93 11805
05ea2a05
TT
11806"
11807if test "x$ac_cv_header_sys_user_h" = xyes; then :
11808 cat >>confdefs.h <<_ACEOF
11809#define HAVE_SYS_USER_H 1
11810_ACEOF
58bfce93 11811
05ea2a05 11812fi
58bfce93 11813
05ea2a05 11814done
58bfce93 11815
58bfce93 11816
05ea2a05
TT
11817for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11818do :
11819 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11820ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11821if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11822 cat >>confdefs.h <<_ACEOF
11823#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11824_ACEOF
58bfce93 11825
05ea2a05 11826fi
58bfce93 11827
05ea2a05 11828done
58bfce93 11829
05ea2a05
TT
11830for ac_header in term.h
11831do :
11832 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11833# include <curses.h>
11834#endif
58bfce93 11835
05ea2a05
TT
11836"
11837if test "x$ac_cv_header_term_h" = xyes; then :
11838 cat >>confdefs.h <<_ACEOF
11839#define HAVE_TERM_H 1
11840_ACEOF
58bfce93 11841
05ea2a05 11842fi
58bfce93 11843
05ea2a05 11844done
58bfce93 11845
58bfce93 11846
05ea2a05
TT
11847# ------------------------- #
11848# Checks for declarations. #
11849# ------------------------- #
58bfce93 11850
58bfce93 11851
05ea2a05
TT
11852 # Check for presence and size of long long.
11853 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11854if test "x$ac_cv_type_long_long" = xyes; then :
58bfce93 11855
05ea2a05
TT
11856cat >>confdefs.h <<_ACEOF
11857#define HAVE_LONG_LONG 1
11858_ACEOF
11859
11860# The cast to long int works around a bug in the HP C Compiler
11861# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11862# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11863# This bug is HP SR number 8606223364.
11864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11865$as_echo_n "checking size of long long... " >&6; }
11866if ${ac_cv_sizeof_long_long+:} false; then :
58bfce93
MM
11867 $as_echo_n "(cached) " >&6
11868else
05ea2a05 11869 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
58bfce93 11870
58bfce93 11871else
05ea2a05
TT
11872 if test "$ac_cv_type_long_long" = yes; then
11873 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11875as_fn_error 77 "cannot compute sizeof (long long)
11876See \`config.log' for more details" "$LINENO" 5; }
11877 else
11878 ac_cv_sizeof_long_long=0
11879 fi
58bfce93 11880fi
58bfce93
MM
11881
11882fi
05ea2a05
TT
11883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11884$as_echo "$ac_cv_sizeof_long_long" >&6; }
58bfce93 11885
58bfce93 11886
58bfce93 11887
05ea2a05
TT
11888cat >>confdefs.h <<_ACEOF
11889#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11890_ACEOF
58bfce93
MM
11891
11892
05ea2a05 11893fi
58bfce93
MM
11894
11895
05ea2a05
TT
11896 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11897ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11898if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11899 ac_have_decl=1
11900else
11901 ac_have_decl=0
11902fi
58bfce93 11903
05ea2a05
TT
11904cat >>confdefs.h <<_ACEOF
11905#define HAVE_DECL_BASENAME $ac_have_decl
c56ccc05 11906_ACEOF
05ea2a05
TT
11907ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11908if test "x$ac_cv_have_decl_ffs" = xyes; then :
11909 ac_have_decl=1
11910else
11911 ac_have_decl=0
c56ccc05 11912fi
c56ccc05
MM
11913
11914cat >>confdefs.h <<_ACEOF
05ea2a05 11915#define HAVE_DECL_FFS $ac_have_decl
c56ccc05 11916_ACEOF
05ea2a05
TT
11917ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11918if test "x$ac_cv_have_decl_asprintf" = xyes; then :
11919 ac_have_decl=1
11920else
11921 ac_have_decl=0
c56ccc05 11922fi
c56ccc05
MM
11923
11924cat >>confdefs.h <<_ACEOF
05ea2a05 11925#define HAVE_DECL_ASPRINTF $ac_have_decl
c56ccc05 11926_ACEOF
05ea2a05
TT
11927ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11928if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11929 ac_have_decl=1
11930else
11931 ac_have_decl=0
11932fi
c56ccc05 11933
05ea2a05
TT
11934cat >>confdefs.h <<_ACEOF
11935#define HAVE_DECL_VASPRINTF $ac_have_decl
11936_ACEOF
11937ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11938if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11939 ac_have_decl=1
11940else
11941 ac_have_decl=0
c56ccc05
MM
11942fi
11943
05ea2a05
TT
11944cat >>confdefs.h <<_ACEOF
11945#define HAVE_DECL_SNPRINTF $ac_have_decl
11946_ACEOF
11947ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11948if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11949 ac_have_decl=1
11950else
11951 ac_have_decl=0
58bfce93
MM
11952fi
11953
05ea2a05
TT
11954cat >>confdefs.h <<_ACEOF
11955#define HAVE_DECL_VSNPRINTF $ac_have_decl
11956_ACEOF
c890192f 11957
05ea2a05
TT
11958 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11959if test "x$ac_cv_have_decl_strtol" = xyes; then :
11960 ac_have_decl=1
bec39cab 11961else
05ea2a05
TT
11962 ac_have_decl=0
11963fi
81ecdfbb 11964
05ea2a05
TT
11965cat >>confdefs.h <<_ACEOF
11966#define HAVE_DECL_STRTOL $ac_have_decl
11967_ACEOF
11968ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11969if test "x$ac_cv_have_decl_strtoul" = xyes; then :
11970 ac_have_decl=1
11971else
11972 ac_have_decl=0
11973fi
a9322a30 11974
05ea2a05
TT
11975cat >>confdefs.h <<_ACEOF
11976#define HAVE_DECL_STRTOUL $ac_have_decl
bec39cab 11977_ACEOF
05ea2a05
TT
11978ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11979if test "x$ac_cv_have_decl_strtoll" = xyes; then :
11980 ac_have_decl=1
bec39cab 11981else
05ea2a05 11982 ac_have_decl=0
a9322a30 11983fi
bec39cab 11984
05ea2a05
TT
11985cat >>confdefs.h <<_ACEOF
11986#define HAVE_DECL_STRTOLL $ac_have_decl
11987_ACEOF
11988ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11989if test "x$ac_cv_have_decl_strtoull" = xyes; then :
11990 ac_have_decl=1
11991else
11992 ac_have_decl=0
11993fi
bec39cab 11994
05ea2a05
TT
11995cat >>confdefs.h <<_ACEOF
11996#define HAVE_DECL_STRTOULL $ac_have_decl
81ecdfbb 11997_ACEOF
bec39cab 11998
05ea2a05
TT
11999 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12000if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12001 ac_have_decl=1
bec39cab 12002else
05ea2a05 12003 ac_have_decl=0
81ecdfbb 12004fi
81ecdfbb 12005
05ea2a05
TT
12006cat >>confdefs.h <<_ACEOF
12007#define HAVE_DECL_STRVERSCMP $ac_have_decl
12008_ACEOF
81ecdfbb 12009
81ecdfbb 12010
06825bd1 12011
05ea2a05
TT
12012ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12013if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12014 ac_have_decl=1
81ecdfbb 12015else
05ea2a05 12016 ac_have_decl=0
81ecdfbb 12017fi
bec39cab 12018
05ea2a05
TT
12019cat >>confdefs.h <<_ACEOF
12020#define HAVE_DECL_SNPRINTF $ac_have_decl
12021_ACEOF
81ecdfbb 12022
05ea2a05
TT
12023
12024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12025$as_echo_n "checking for LC_MESSAGES... " >&6; }
12026if ${am_cv_val_LC_MESSAGES+:} false; then :
12027 $as_echo_n "(cached) " >&6
bec39cab 12028else
81ecdfbb 12029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12030/* end confdefs.h. */
05ea2a05 12031#include <locale.h>
a9322a30
TT
12032int
12033main ()
12034{
05ea2a05
TT
12035return LC_MESSAGES
12036 ;
a9322a30
TT
12037 return 0;
12038}
bec39cab 12039_ACEOF
05ea2a05
TT
12040if ac_fn_c_try_link "$LINENO"; then :
12041 am_cv_val_LC_MESSAGES=yes
bec39cab 12042else
05ea2a05 12043 am_cv_val_LC_MESSAGES=no
81ecdfbb 12044fi
05ea2a05
TT
12045rm -f core conftest.err conftest.$ac_objext \
12046 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 12047fi
05ea2a05
TT
12048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12049$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12050 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12051
05ea2a05 12052$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
bec39cab 12053
05ea2a05 12054 fi
5ee754fc 12055
bec39cab 12056
05ea2a05
TT
12057# ------------------ #
12058# Checks for types. #
12059# ------------------ #
12060
12061ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12062#include <sys/socket.h>
12063
12064"
12065if test "x$ac_cv_type_socklen_t" = xyes; then :
12066
12067cat >>confdefs.h <<_ACEOF
12068#define HAVE_SOCKLEN_T 1
bec39cab 12069_ACEOF
c906108c 12070
05ea2a05 12071
bec39cab 12072fi
81ecdfbb 12073
81ecdfbb 12074
05ea2a05
TT
12075# ------------------------------------- #
12076# Checks for compiler characteristics. #
12077# ------------------------------------- #
a9322a30 12078
05ea2a05
TT
12079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12080$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12081if ${ac_cv_c_const+:} false; then :
12082 $as_echo_n "(cached) " >&6
12083else
12084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12085/* end confdefs.h. */
bec39cab 12086
05ea2a05
TT
12087int
12088main ()
12089{
bec39cab 12090
05ea2a05
TT
12091#ifndef __cplusplus
12092 /* Ultrix mips cc rejects this sort of thing. */
12093 typedef int charset[2];
12094 const charset cs = { 0, 0 };
12095 /* SunOS 4.1.1 cc rejects this. */
12096 char const *const *pcpcc;
12097 char **ppc;
12098 /* NEC SVR4.0.2 mips cc rejects this. */
12099 struct point {int x, y;};
12100 static struct point const zero = {0,0};
12101 /* AIX XL C 1.02.0.0 rejects this.
12102 It does not let you subtract one const X* pointer from another in
12103 an arm of an if-expression whose if-part is not a constant
12104 expression */
12105 const char *g = "string";
12106 pcpcc = &g + (g ? g-g : 0);
12107 /* HPUX 7.0 cc rejects these. */
12108 ++pcpcc;
12109 ppc = (char**) pcpcc;
12110 pcpcc = (char const *const *) ppc;
12111 { /* SCO 3.2v4 cc rejects this sort of thing. */
12112 char tx;
12113 char *t = &tx;
12114 char const *s = 0 ? (char *) 0 : (char const *) 0;
5ee754fc 12115
05ea2a05
TT
12116 *t++ = 0;
12117 if (s) return 0;
12118 }
12119 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12120 int x[] = {25, 17};
12121 const int *foo = &x[0];
12122 ++foo;
12123 }
12124 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12125 typedef const int *iptr;
12126 iptr p = 0;
12127 ++p;
12128 }
12129 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12130 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12131 struct s { int j; const int *ap[3]; } bx;
12132 struct s *b = &bx; b->j = 5;
12133 }
12134 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12135 const int foo = 10;
12136 if (!foo) return 0;
12137 }
12138 return !cs[0] && !zero.x;
12139#endif
5ee754fc 12140
05ea2a05
TT
12141 ;
12142 return 0;
12143}
bec39cab 12144_ACEOF
05ea2a05
TT
12145if ac_fn_c_try_compile "$LINENO"; then :
12146 ac_cv_c_const=yes
12147else
12148 ac_cv_c_const=no
12149fi
12150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12151fi
05ea2a05
TT
12152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12153$as_echo "$ac_cv_c_const" >&6; }
12154if test $ac_cv_c_const = no; then
5ee754fc 12155
05ea2a05 12156$as_echo "#define const /**/" >>confdefs.h
bec39cab 12157
05ea2a05
TT
12158fi
12159
12160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12161$as_echo_n "checking for inline... " >&6; }
12162if ${ac_cv_c_inline+:} false; then :
12163 $as_echo_n "(cached) " >&6
12164else
12165 ac_cv_c_inline=no
12166for ac_kw in inline __inline__ __inline; do
12167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12168/* end confdefs.h. */
12169#ifndef __cplusplus
12170typedef int foo_t;
12171static $ac_kw foo_t static_foo () {return 0; }
12172$ac_kw foo_t foo () {return 0; }
81ecdfbb 12173#endif
bec39cab 12174
a8111142 12175_ACEOF
05ea2a05
TT
12176if ac_fn_c_try_compile "$LINENO"; then :
12177 ac_cv_c_inline=$ac_kw
a8111142 12178fi
05ea2a05
TT
12179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12180 test "$ac_cv_c_inline" != no && break
81ecdfbb 12181done
a8111142 12182
05ea2a05
TT
12183fi
12184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12185$as_echo "$ac_cv_c_inline" >&6; }
a8111142 12186
05ea2a05
TT
12187case $ac_cv_c_inline in
12188 inline | yes) ;;
12189 *)
12190 case $ac_cv_c_inline in
12191 no) ac_val=;;
12192 *) ac_val=$ac_cv_c_inline;;
12193 esac
12194 cat >>confdefs.h <<_ACEOF
12195#ifndef __cplusplus
12196#define inline $ac_val
12197#endif
07697489 12198_ACEOF
05ea2a05
TT
12199 ;;
12200esac
07697489 12201
05ea2a05
TT
12202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12203$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12204if ${ac_cv_c_bigendian+:} false; then :
07697489
PA
12205 $as_echo_n "(cached) " >&6
12206else
05ea2a05
TT
12207 ac_cv_c_bigendian=unknown
12208 # See if we're dealing with a universal compiler.
12209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12210/* end confdefs.h. */
12211#ifndef __APPLE_CC__
12212 not a universal capable compiler
12213 #endif
12214 typedef int dummy;
07697489 12215
05ea2a05
TT
12216_ACEOF
12217if ac_fn_c_try_compile "$LINENO"; then :
07697489 12218
05ea2a05
TT
12219 # Check for potential -arch flags. It is not universal unless
12220 # there are at least two -arch flags with different values.
12221 ac_arch=
12222 ac_prev=
12223 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12224 if test -n "$ac_prev"; then
12225 case $ac_word in
12226 i?86 | x86_64 | ppc | ppc64)
12227 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12228 ac_arch=$ac_word
12229 else
12230 ac_cv_c_bigendian=universal
12231 break
12232 fi
12233 ;;
12234 esac
12235 ac_prev=
12236 elif test "x$ac_word" = "x-arch"; then
12237 ac_prev=arch
12238 fi
12239 done
07697489 12240fi
05ea2a05
TT
12241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12242 if test $ac_cv_c_bigendian = unknown; then
12243 # See if sys/param.h defines the BYTE_ORDER macro.
12244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12245/* end confdefs.h. */
12246#include <sys/types.h>
12247 #include <sys/param.h>
07697489 12248
05ea2a05
TT
12249int
12250main ()
12251{
12252#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12253 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12254 && LITTLE_ENDIAN)
12255 bogus endian macros
12256 #endif
07697489 12257
05ea2a05
TT
12258 ;
12259 return 0;
12260}
07697489 12261_ACEOF
05ea2a05
TT
12262if ac_fn_c_try_compile "$LINENO"; then :
12263 # It does; now see whether it defined to BIG_ENDIAN or not.
12264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12265/* end confdefs.h. */
12266#include <sys/types.h>
12267 #include <sys/param.h>
07697489 12268
05ea2a05
TT
12269int
12270main ()
12271{
12272#if BYTE_ORDER != BIG_ENDIAN
12273 not big endian
12274 #endif
07697489 12275
05ea2a05
TT
12276 ;
12277 return 0;
12278}
07697489 12279_ACEOF
05ea2a05
TT
12280if ac_fn_c_try_compile "$LINENO"; then :
12281 ac_cv_c_bigendian=yes
07697489 12282else
05ea2a05 12283 ac_cv_c_bigendian=no
07697489 12284fi
05ea2a05 12285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12286fi
05ea2a05
TT
12287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12288 fi
12289 if test $ac_cv_c_bigendian = unknown; then
12290 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12292/* end confdefs.h. */
12293#include <limits.h>
07697489 12294
05ea2a05
TT
12295int
12296main ()
12297{
12298#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12299 bogus endian macros
12300 #endif
07697489 12301
05ea2a05
TT
12302 ;
12303 return 0;
12304}
07697489 12305_ACEOF
05ea2a05
TT
12306if ac_fn_c_try_compile "$LINENO"; then :
12307 # It does; now see whether it defined to _BIG_ENDIAN or not.
12308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12309/* end confdefs.h. */
12310#include <limits.h>
07697489 12311
05ea2a05
TT
12312int
12313main ()
12314{
12315#ifndef _BIG_ENDIAN
12316 not big endian
12317 #endif
07697489 12318
05ea2a05
TT
12319 ;
12320 return 0;
12321}
07697489 12322_ACEOF
05ea2a05
TT
12323if ac_fn_c_try_compile "$LINENO"; then :
12324 ac_cv_c_bigendian=yes
07697489 12325else
05ea2a05 12326 ac_cv_c_bigendian=no
07697489 12327fi
05ea2a05 12328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12329fi
05ea2a05
TT
12330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12331 fi
12332 if test $ac_cv_c_bigendian = unknown; then
12333 # Compile a test program.
12334 if test "$cross_compiling" = yes; then :
12335 # Try to guess by grepping values from an object file.
12336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12337/* end confdefs.h. */
12338short int ascii_mm[] =
12339 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12340 short int ascii_ii[] =
12341 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12342 int use_ascii (int i) {
12343 return ascii_mm[i] + ascii_ii[i];
12344 }
12345 short int ebcdic_ii[] =
12346 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12347 short int ebcdic_mm[] =
12348 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12349 int use_ebcdic (int i) {
12350 return ebcdic_mm[i] + ebcdic_ii[i];
12351 }
12352 extern int foo;
07697489 12353
05ea2a05
TT
12354int
12355main ()
12356{
12357return use_ascii (foo) == use_ebcdic (foo);
12358 ;
12359 return 0;
12360}
07697489 12361_ACEOF
05ea2a05
TT
12362if ac_fn_c_try_compile "$LINENO"; then :
12363 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12364 ac_cv_c_bigendian=yes
12365 fi
12366 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12367 if test "$ac_cv_c_bigendian" = unknown; then
12368 ac_cv_c_bigendian=no
12369 else
12370 # finding both strings is unlikely to happen, but who knows?
12371 ac_cv_c_bigendian=unknown
12372 fi
12373 fi
07697489 12374fi
05ea2a05
TT
12375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12376else
12377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12378/* end confdefs.h. */
12379$ac_includes_default
12380int
12381main ()
12382{
07697489 12383
05ea2a05
TT
12384 /* Are we little or big endian? From Harbison&Steele. */
12385 union
12386 {
12387 long int l;
12388 char c[sizeof (long int)];
12389 } u;
12390 u.l = 1;
12391 return u.c[sizeof (long int) - 1] == 1;
12392
12393 ;
12394 return 0;
12395}
07697489 12396_ACEOF
05ea2a05
TT
12397if ac_fn_c_try_run "$LINENO"; then :
12398 ac_cv_c_bigendian=no
07697489 12399else
05ea2a05
TT
12400 ac_cv_c_bigendian=yes
12401fi
12402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12403 conftest.$ac_objext conftest.beam conftest.$ac_ext
07697489
PA
12404fi
12405
05ea2a05 12406 fi
07697489 12407fi
05ea2a05
TT
12408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12409$as_echo "$ac_cv_c_bigendian" >&6; }
12410 case $ac_cv_c_bigendian in #(
12411 yes)
12412 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12413;; #(
12414 no)
12415 ;; #(
12416 universal)
07697489 12417
05ea2a05 12418$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
07697489 12419
05ea2a05
TT
12420 ;; #(
12421 *)
12422 as_fn_error $? "unknown endianness
12423 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12424 esac
07697489
PA
12425
12426
05ea2a05
TT
12427# ------------------------------ #
12428# Checks for library functions. #
12429# ------------------------------ #
81ecdfbb 12430
05ea2a05 12431for ac_func in getuid getgid \
8ae8e197 12432 pipe pread pread64 pwrite resize_term \
05ea2a05
TT
12433 getpgid setsid \
12434 sigaction sigsetmask socketpair \
12435 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12436 setrlimit getrlimit posix_madvise waitpid \
12437 use_default_colors
12438do :
12439 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12440ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12441if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12442 cat >>confdefs.h <<_ACEOF
12443#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
a9322a30 12444_ACEOF
5ee754fc 12445
05ea2a05
TT
12446fi
12447done
5ee754fc 12448
05ea2a05
TT
12449
12450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12451$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12452if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 12453 $as_echo_n "(cached) " >&6
bec39cab 12454else
81ecdfbb 12455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12456/* end confdefs.h. */
05ea2a05 12457#include <langinfo.h>
a9322a30
TT
12458int
12459main ()
12460{
05ea2a05 12461char* cs = nl_langinfo(CODESET);
a9322a30
TT
12462 ;
12463 return 0;
12464}
bec39cab 12465_ACEOF
81ecdfbb 12466if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 12467 am_cv_langinfo_codeset=yes
bec39cab 12468else
05ea2a05 12469 am_cv_langinfo_codeset=no
81ecdfbb
RW
12470fi
12471rm -f core conftest.err conftest.$ac_objext \
12472 conftest$ac_exeext conftest.$ac_ext
05ea2a05 12473
81ecdfbb 12474fi
05ea2a05
TT
12475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12476$as_echo "$am_cv_langinfo_codeset" >&6; }
12477 if test $am_cv_langinfo_codeset = yes; then
bec39cab 12478
05ea2a05 12479$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
81ecdfbb
RW
12480
12481 fi
12482
05ea2a05
TT
12483ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12484if test "x$ac_cv_type_size_t" = xyes; then :
81ecdfbb 12485
05ea2a05 12486else
81ecdfbb
RW
12487
12488cat >>confdefs.h <<_ACEOF
05ea2a05 12489#define size_t unsigned int
7eb368b3 12490_ACEOF
7eb368b3 12491
7eb368b3 12492fi
7eb368b3 12493
7eb368b3 12494
a9322a30 12495
7eb368b3 12496
05ea2a05
TT
12497 for ac_header in $ac_header_list
12498do :
12499 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12500ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12501"
12502if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12503 cat >>confdefs.h <<_ACEOF
12504#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12505_ACEOF
7eb368b3 12506
05ea2a05 12507fi
7eb368b3 12508
05ea2a05 12509done
a9322a30 12510
05ea2a05
TT
12511
12512
12513
12514
12515
12516
12517ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12518if test "x$ac_cv_type_pid_t" = xyes; then :
12519
12520else
bec39cab 12521
a9322a30 12522cat >>confdefs.h <<_ACEOF
05ea2a05 12523#define pid_t int
a9322a30
TT
12524_ACEOF
12525
05ea2a05
TT
12526fi
12527
12528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12529$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12530if ${ac_cv_path_SED+:} false; then :
12531 $as_echo_n "(cached) " >&6
12532else
12533 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12534 for ac_i in 1 2 3 4 5 6 7; do
12535 ac_script="$ac_script$as_nl$ac_script"
12536 done
12537 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12538 { ac_script=; unset ac_script;}
12539 if test -z "$SED"; then
12540 ac_path_SED_found=false
12541 # Loop through the user's path and test for each of PROGNAME-LIST
12542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12543for as_dir in $PATH
12544do
12545 IFS=$as_save_IFS
12546 test -z "$as_dir" && as_dir=.
12547 for ac_prog in sed gsed; do
12548 for ac_exec_ext in '' $ac_executable_extensions; do
12549 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12550 as_fn_executable_p "$ac_path_SED" || continue
12551# Check for GNU ac_path_SED and select it if it is found.
12552 # Check for GNU $ac_path_SED
12553case `"$ac_path_SED" --version 2>&1` in
12554*GNU*)
12555 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12556*)
12557 ac_count=0
12558 $as_echo_n 0123456789 >"conftest.in"
12559 while :
12560 do
12561 cat "conftest.in" "conftest.in" >"conftest.tmp"
12562 mv "conftest.tmp" "conftest.in"
12563 cp "conftest.in" "conftest.nl"
12564 $as_echo '' >> "conftest.nl"
12565 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12566 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12567 as_fn_arith $ac_count + 1 && ac_count=$as_val
12568 if test $ac_count -gt ${ac_path_SED_max-0}; then
12569 # Best one so far, save it but keep looking for a better one
12570 ac_cv_path_SED="$ac_path_SED"
12571 ac_path_SED_max=$ac_count
12572 fi
12573 # 10*(2^10) chars as input seems more than enough
12574 test $ac_count -gt 10 && break
12575 done
12576 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12577esac
a9322a30 12578
05ea2a05
TT
12579 $ac_path_SED_found && break 3
12580 done
12581 done
12582 done
12583IFS=$as_save_IFS
12584 if test -z "$ac_cv_path_SED"; then
12585 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12586 fi
12587else
12588 ac_cv_path_SED=$SED
a9322a30
TT
12589fi
12590
05ea2a05
TT
12591fi
12592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12593$as_echo "$ac_cv_path_SED" >&6; }
12594 SED="$ac_cv_path_SED"
12595 rm -f conftest.sed
a9322a30 12596
a9322a30 12597
db6878ac
SM
12598 # Set the 'development' global.
12599 . $srcdir/../bfd/development.sh
12600
05ea2a05
TT
12601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12602$as_echo_n "checking for ANSI C header files... " >&6; }
12603if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12604 $as_echo_n "(cached) " >&6
a9322a30 12605else
81ecdfbb 12606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12607/* end confdefs.h. */
05ea2a05
TT
12608#include <stdlib.h>
12609#include <stdarg.h>
12610#include <string.h>
12611#include <float.h>
a9322a30
TT
12612
12613int
12614main ()
12615{
d0ac1c44 12616
a9322a30
TT
12617 ;
12618 return 0;
12619}
bec39cab 12620_ACEOF
81ecdfbb 12621if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 12622 ac_cv_header_stdc=yes
5ee754fc 12623else
05ea2a05 12624 ac_cv_header_stdc=no
5ee754fc 12625fi
81ecdfbb 12626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12627
05ea2a05
TT
12628if test $ac_cv_header_stdc = yes; then
12629 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12631/* end confdefs.h. */
12632#include <string.h>
bec39cab 12633
05ea2a05
TT
12634_ACEOF
12635if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12636 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12637
bec39cab 12638else
05ea2a05
TT
12639 ac_cv_header_stdc=no
12640fi
12641rm -f conftest*
12642
12643fi
12644
12645if test $ac_cv_header_stdc = yes; then
12646 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 12647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12648/* end confdefs.h. */
05ea2a05 12649#include <stdlib.h>
a9322a30 12650
bec39cab 12651_ACEOF
05ea2a05
TT
12652if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12653 $EGREP "free" >/dev/null 2>&1; then :
bec39cab 12654
05ea2a05
TT
12655else
12656 ac_cv_header_stdc=no
5ee754fc 12657fi
05ea2a05 12658rm -f conftest*
5ee754fc 12659
05ea2a05 12660fi
bec39cab 12661
05ea2a05
TT
12662if test $ac_cv_header_stdc = yes; then
12663 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12664 if test "$cross_compiling" = yes; then :
12665 :
bec39cab 12666else
05ea2a05 12667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 12668/* end confdefs.h. */
05ea2a05
TT
12669#include <ctype.h>
12670#include <stdlib.h>
12671#if ((' ' & 0x0FF) == 0x020)
12672# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12673# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12674#else
12675# define ISLOWER(c) \
12676 (('a' <= (c) && (c) <= 'i') \
12677 || ('j' <= (c) && (c) <= 'r') \
12678 || ('s' <= (c) && (c) <= 'z'))
12679# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12680#endif
a9322a30 12681
05ea2a05 12682#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12683int
12684main ()
12685{
05ea2a05
TT
12686 int i;
12687 for (i = 0; i < 256; i++)
12688 if (XOR (islower (i), ISLOWER (i))
12689 || toupper (i) != TOUPPER (i))
12690 return 2;
a9322a30
TT
12691 return 0;
12692}
bec39cab 12693_ACEOF
05ea2a05 12694if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12695
5ee754fc 12696else
05ea2a05 12697 ac_cv_header_stdc=no
5ee754fc 12698fi
05ea2a05
TT
12699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12700 conftest.$ac_objext conftest.beam conftest.$ac_ext
81ecdfbb 12701fi
bec39cab 12702
05ea2a05
TT
12703fi
12704fi
12705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12706$as_echo "$ac_cv_header_stdc" >&6; }
12707if test $ac_cv_header_stdc = yes; then
81ecdfbb 12708
05ea2a05
TT
12709$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12710
12711fi
81ecdfbb 12712
05ea2a05
TT
12713 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12714# for constant arguments. Useless!
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12716$as_echo_n "checking for working alloca.h... " >&6; }
12717if ${ac_cv_working_alloca_h+:} false; then :
12718 $as_echo_n "(cached) " >&6
12719else
12720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12721/* end confdefs.h. */
12722#include <alloca.h>
7eb368b3
NR
12723int
12724main ()
12725{
05ea2a05
TT
12726char *p = (char *) alloca (2 * sizeof (int));
12727 if (p) return 0;
7eb368b3
NR
12728 ;
12729 return 0;
12730}
12731_ACEOF
05ea2a05
TT
12732if ac_fn_c_try_link "$LINENO"; then :
12733 ac_cv_working_alloca_h=yes
81ecdfbb 12734else
05ea2a05 12735 ac_cv_working_alloca_h=no
a9322a30 12736fi
05ea2a05
TT
12737rm -f core conftest.err conftest.$ac_objext \
12738 conftest$ac_exeext conftest.$ac_ext
a9322a30 12739fi
05ea2a05
TT
12740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12741$as_echo "$ac_cv_working_alloca_h" >&6; }
12742if test $ac_cv_working_alloca_h = yes; then
12743
12744$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7eb368b3 12745
7eb368b3 12746fi
05ea2a05
TT
12747
12748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12749$as_echo_n "checking for alloca... " >&6; }
12750if ${ac_cv_func_alloca_works+:} false; then :
12751 $as_echo_n "(cached) " >&6
bec39cab 12752else
81ecdfbb 12753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12754/* end confdefs.h. */
05ea2a05
TT
12755#ifdef __GNUC__
12756# define alloca __builtin_alloca
12757#else
12758# ifdef _MSC_VER
12759# include <malloc.h>
12760# define alloca _alloca
12761# else
12762# ifdef HAVE_ALLOCA_H
12763# include <alloca.h>
12764# else
12765# ifdef _AIX
12766 #pragma alloca
12767# else
12768# ifndef alloca /* predefined by HP cc +Olibcalls */
12769void *alloca (size_t);
12770# endif
12771# endif
12772# endif
12773# endif
12774#endif
12775
d3ea6809
MM
12776int
12777main ()
12778{
05ea2a05
TT
12779char *p = (char *) alloca (1);
12780 if (p) return 0;
81ecdfbb
RW
12781 ;
12782 return 0;
d3ea6809
MM
12783}
12784_ACEOF
05ea2a05
TT
12785if ac_fn_c_try_link "$LINENO"; then :
12786 ac_cv_func_alloca_works=yes
d3ea6809 12787else
05ea2a05 12788 ac_cv_func_alloca_works=no
a9322a30 12789fi
05ea2a05
TT
12790rm -f core conftest.err conftest.$ac_objext \
12791 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 12792fi
05ea2a05
TT
12793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12794$as_echo "$ac_cv_func_alloca_works" >&6; }
81ecdfbb 12795
05ea2a05 12796if test $ac_cv_func_alloca_works = yes; then
d3ea6809 12797
05ea2a05 12798$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
d3ea6809 12799
05ea2a05
TT
12800else
12801 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12802# that cause trouble. Some versions do not even contain alloca or
12803# contain a buggy version. If you still want to use their alloca,
12804# use ar to extract alloca.o from them instead of compiling alloca.c.
d3ea6809 12805
05ea2a05 12806ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
d0ac1c44 12807
05ea2a05 12808$as_echo "#define C_ALLOCA 1" >>confdefs.h
d0ac1c44
SM
12809
12810
05ea2a05
TT
12811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12812$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12813if ${ac_cv_os_cray+:} false; then :
12814 $as_echo_n "(cached) " >&6
12815else
12816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12817/* end confdefs.h. */
12818#if defined CRAY && ! defined CRAY2
12819webecray
12820#else
12821wenotbecray
12822#endif
12823
12824_ACEOF
12825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12826 $EGREP "webecray" >/dev/null 2>&1; then :
12827 ac_cv_os_cray=yes
12828else
12829 ac_cv_os_cray=no
12830fi
12831rm -f conftest*
12832
12833fi
12834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12835$as_echo "$ac_cv_os_cray" >&6; }
12836if test $ac_cv_os_cray = yes; then
12837 for ac_func in _getb67 GETB67 getb67; do
12838 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12839ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12840if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12841
12842cat >>confdefs.h <<_ACEOF
12843#define CRAY_STACKSEG_END $ac_func
12844_ACEOF
12845
12846 break
12847fi
12848
12849 done
12850fi
12851
12852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12853$as_echo_n "checking stack direction for C alloca... " >&6; }
12854if ${ac_cv_c_stack_direction+:} false; then :
12855 $as_echo_n "(cached) " >&6
12856else
12857 if test "$cross_compiling" = yes; then :
12858 ac_cv_c_stack_direction=0
12859else
12860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12861/* end confdefs.h. */
12862$ac_includes_default
12863int
12864find_stack_direction (int *addr, int depth)
12865{
12866 int dir, dummy = 0;
12867 if (! addr)
12868 addr = &dummy;
12869 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12870 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12871 return dir + dummy;
12872}
12873
12874int
12875main (int argc, char **argv)
12876{
12877 return find_stack_direction (0, argc + !argv + 20) < 0;
12878}
12879_ACEOF
12880if ac_fn_c_try_run "$LINENO"; then :
12881 ac_cv_c_stack_direction=1
12882else
12883 ac_cv_c_stack_direction=-1
12884fi
12885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12886 conftest.$ac_objext conftest.beam conftest.$ac_ext
12887fi
12888
12889fi
12890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12891$as_echo "$ac_cv_c_stack_direction" >&6; }
12892cat >>confdefs.h <<_ACEOF
12893#define STACK_DIRECTION $ac_cv_c_stack_direction
12894_ACEOF
12895
12896
12897fi
12898
12899
12900 WIN32APILIBS=
12901 case ${host} in
12902 *mingw32*)
12903
12904$as_echo "#define USE_WIN32API 1" >>confdefs.h
12905
12906 WIN32APILIBS="-lws2_32"
12907 ;;
12908 esac
12909
12910
12911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12912$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12913if ${am_cv_langinfo_codeset+:} false; then :
12914 $as_echo_n "(cached) " >&6
12915else
12916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12917/* end confdefs.h. */
12918#include <langinfo.h>
12919int
12920main ()
12921{
12922char* cs = nl_langinfo(CODESET);
12923 ;
12924 return 0;
12925}
12926_ACEOF
12927if ac_fn_c_try_link "$LINENO"; then :
12928 am_cv_langinfo_codeset=yes
12929else
12930 am_cv_langinfo_codeset=no
12931fi
12932rm -f core conftest.err conftest.$ac_objext \
12933 conftest$ac_exeext conftest.$ac_ext
12934
12935fi
12936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12937$as_echo "$am_cv_langinfo_codeset" >&6; }
12938 if test $am_cv_langinfo_codeset = yes; then
12939
12940$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12941
12942 fi
12943
12944
8ae8e197 12945 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h sys/procfs.h proc_service.h poll.h sys/poll.h sys/select.h
81ecdfbb
RW
12946do :
12947 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
05ea2a05 12948ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12949if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12950 cat >>confdefs.h <<_ACEOF
81ecdfbb 12951#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12952_ACEOF
b757528f 12953
b757528f 12954fi
bec39cab 12955
a9322a30 12956done
a3828db0 12957
d0ac1c44
SM
12958
12959
a9322a30 12960for ac_func in getpagesize
81ecdfbb
RW
12961do :
12962 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12963if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12964 cat >>confdefs.h <<_ACEOF
81ecdfbb 12965#define HAVE_GETPAGESIZE 1
bec39cab 12966_ACEOF
bcb3dc3d 12967
bcb3dc3d
MK
12968fi
12969done
12970
81ecdfbb
RW
12971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12972$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12973if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12974 $as_echo_n "(cached) " >&6
a9322a30 12975else
81ecdfbb 12976 if test "$cross_compiling" = yes; then :
a9322a30 12977 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12978else
81ecdfbb 12979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12980/* end confdefs.h. */
a9322a30
TT
12981$ac_includes_default
12982/* malloc might have been renamed as rpl_malloc. */
12983#undef malloc
bec39cab 12984
a9322a30
TT
12985/* Thanks to Mike Haertel and Jim Avera for this test.
12986 Here is a matrix of mmap possibilities:
12987 mmap private not fixed
12988 mmap private fixed at somewhere currently unmapped
12989 mmap private fixed at somewhere already mapped
12990 mmap shared not fixed
12991 mmap shared fixed at somewhere currently unmapped
12992 mmap shared fixed at somewhere already mapped
12993 For private mappings, we should verify that changes cannot be read()
12994 back from the file, nor mmap's back from the file at a different
12995 address. (There have been systems where private was not correctly
12996 implemented like the infamous i386 svr4.0, and systems where the
12997 VM page cache was not coherent with the file system buffer cache
12998 like early versions of FreeBSD and possibly contemporary NetBSD.)
12999 For shared mappings, we should conversely verify that changes get
13000 propagated back to all the places they're supposed to be.
bec39cab 13001
a9322a30
TT
13002 Grep wants private fixed already mapped.
13003 The main things grep needs to know about mmap are:
13004 * does it exist and is it safe to write into the mmap'd area
13005 * how to use it (BSD variants) */
8b9cf735 13006
a9322a30
TT
13007#include <fcntl.h>
13008#include <sys/mman.h>
8b9cf735 13009
81ecdfbb 13010#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 13011char *malloc ();
a3828db0
MK
13012#endif
13013
a9322a30 13014/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 13015#ifndef HAVE_GETPAGESIZE
a9322a30
TT
13016# ifdef _SC_PAGESIZE
13017# define getpagesize() sysconf(_SC_PAGESIZE)
13018# else /* no _SC_PAGESIZE */
81ecdfbb 13019# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
13020# include <sys/param.h>
13021# ifdef EXEC_PAGESIZE
13022# define getpagesize() EXEC_PAGESIZE
13023# else /* no EXEC_PAGESIZE */
13024# ifdef NBPG
13025# define getpagesize() NBPG * CLSIZE
13026# ifndef CLSIZE
13027# define CLSIZE 1
13028# endif /* no CLSIZE */
13029# else /* no NBPG */
13030# ifdef NBPC
13031# define getpagesize() NBPC
13032# else /* no NBPC */
13033# ifdef PAGESIZE
13034# define getpagesize() PAGESIZE
13035# endif /* PAGESIZE */
13036# endif /* no NBPC */
13037# endif /* no NBPG */
13038# endif /* no EXEC_PAGESIZE */
13039# else /* no HAVE_SYS_PARAM_H */
13040# define getpagesize() 8192 /* punt totally */
13041# endif /* no HAVE_SYS_PARAM_H */
13042# endif /* no _SC_PAGESIZE */
13043
13044#endif /* no HAVE_GETPAGESIZE */
13045
bec39cab
AC
13046int
13047main ()
13048{
a9322a30 13049 char *data, *data2, *data3;
d0ac1c44 13050 const char *cdata2;
a9322a30 13051 int i, pagesize;
d0ac1c44 13052 int fd, fd2;
a9322a30
TT
13053
13054 pagesize = getpagesize ();
13055
13056 /* First, make a file with some known garbage in it. */
13057 data = (char *) malloc (pagesize);
13058 if (!data)
81ecdfbb 13059 return 1;
a9322a30
TT
13060 for (i = 0; i < pagesize; ++i)
13061 *(data + i) = rand ();
13062 umask (0);
13063 fd = creat ("conftest.mmap", 0600);
13064 if (fd < 0)
d0ac1c44 13065 return 2;
a9322a30 13066 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 13067 return 3;
a9322a30
TT
13068 close (fd);
13069
d0ac1c44
SM
13070 /* Next, check that the tail of a page is zero-filled. File must have
13071 non-zero length, otherwise we risk SIGBUS for entire page. */
13072 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13073 if (fd2 < 0)
13074 return 4;
13075 cdata2 = "";
13076 if (write (fd2, cdata2, 1) != 1)
13077 return 5;
13078 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13079 if (data2 == MAP_FAILED)
13080 return 6;
13081 for (i = 0; i < pagesize; ++i)
13082 if (*(data2 + i))
13083 return 7;
13084 close (fd2);
13085 if (munmap (data2, pagesize))
13086 return 8;
13087
a9322a30
TT
13088 /* Next, try to mmap the file at a fixed address which already has
13089 something else allocated at it. If we can, also make sure that
13090 we see the same garbage. */
13091 fd = open ("conftest.mmap", O_RDWR);
13092 if (fd < 0)
d0ac1c44 13093 return 9;
a9322a30
TT
13094 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13095 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 13096 return 10;
a9322a30
TT
13097 for (i = 0; i < pagesize; ++i)
13098 if (*(data + i) != *(data2 + i))
d0ac1c44 13099 return 11;
a9322a30
TT
13100
13101 /* Finally, make sure that changes to the mapped area do not
13102 percolate back to the file as seen by read(). (This is a bug on
13103 some variants of i386 svr4.0.) */
13104 for (i = 0; i < pagesize; ++i)
13105 *(data2 + i) = *(data2 + i) + 1;
13106 data3 = (char *) malloc (pagesize);
13107 if (!data3)
d0ac1c44 13108 return 12;
a9322a30 13109 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 13110 return 13;
a9322a30
TT
13111 for (i = 0; i < pagesize; ++i)
13112 if (*(data + i) != *(data3 + i))
d0ac1c44 13113 return 14;
a9322a30 13114 close (fd);
81ecdfbb 13115 return 0;
bec39cab
AC
13116}
13117_ACEOF
81ecdfbb 13118if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13119 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13120else
81ecdfbb 13121 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13122fi
81ecdfbb
RW
13123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13124 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13125fi
81ecdfbb 13126
a9322a30 13127fi
81ecdfbb
RW
13128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13129$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13130if test $ac_cv_func_mmap_fixed_mapped = yes; then
13131
81ecdfbb 13132$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13133
086ec9eb 13134fi
d0ac1c44 13135rm -f conftest.mmap conftest.txt
a3828db0 13136
05ea2a05 13137 for ac_header in vfork.h
81ecdfbb
RW
13138do :
13139 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 13140if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13141 cat >>confdefs.h <<_ACEOF
81ecdfbb 13142#define HAVE_VFORK_H 1
bec39cab 13143_ACEOF
c906108c
SS
13144
13145fi
a9322a30 13146
a3828db0 13147done
c906108c 13148
a9322a30 13149for ac_func in fork vfork
81ecdfbb
RW
13150do :
13151 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13152ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13153if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13154 cat >>confdefs.h <<_ACEOF
81ecdfbb 13155#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13156_ACEOF
b83266a0 13157
97bf5e38 13158fi
a3828db0 13159done
b83266a0 13160
a9322a30 13161if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13163$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13164if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13165 $as_echo_n "(cached) " >&6
a9322a30 13166else
81ecdfbb 13167 if test "$cross_compiling" = yes; then :
a9322a30
TT
13168 ac_cv_func_fork_works=cross
13169else
81ecdfbb
RW
13170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13171/* end confdefs.h. */
13172$ac_includes_default
13173int
13174main ()
13175{
13176
13177 /* By Ruediger Kuhlmann. */
13178 return fork () < 0;
13179
13180 ;
13181 return 0;
13182}
a9322a30 13183_ACEOF
81ecdfbb 13184if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13185 ac_cv_func_fork_works=yes
13186else
81ecdfbb 13187 ac_cv_func_fork_works=no
a9322a30 13188fi
81ecdfbb
RW
13189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13190 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13191fi
81ecdfbb 13192
a9322a30 13193fi
81ecdfbb
RW
13194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13195$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13196
13197else
13198 ac_cv_func_fork_works=$ac_cv_func_fork
13199fi
13200if test "x$ac_cv_func_fork_works" = xcross; then
13201 case $host in
13202 *-*-amigaos* | *-*-msdosdjgpp*)
13203 # Override, as these systems have only a dummy fork() stub
13204 ac_cv_func_fork_works=no
13205 ;;
13206 *)
13207 ac_cv_func_fork_works=yes
13208 ;;
13209 esac
81ecdfbb
RW
13210 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13211$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13212fi
13213ac_cv_func_vfork_works=$ac_cv_func_vfork
13214if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13216$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13217if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13218 $as_echo_n "(cached) " >&6
a9322a30 13219else
81ecdfbb 13220 if test "$cross_compiling" = yes; then :
a9322a30
TT
13221 ac_cv_func_vfork_works=cross
13222else
81ecdfbb 13223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13224/* end confdefs.h. */
13225/* Thanks to Paul Eggert for this test. */
81ecdfbb 13226$ac_includes_default
a9322a30 13227#include <sys/wait.h>
81ecdfbb 13228#ifdef HAVE_VFORK_H
a9322a30
TT
13229# include <vfork.h>
13230#endif
13231/* On some sparc systems, changes by the child to local and incoming
13232 argument registers are propagated back to the parent. The compiler
13233 is told about this with #include <vfork.h>, but some compilers
13234 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13235 static variable whose address is put into a register that is
13236 clobbered by the vfork. */
13237static void
13238#ifdef __cplusplus
13239sparc_address_test (int arg)
13240# else
13241sparc_address_test (arg) int arg;
13242#endif
13243{
13244 static pid_t child;
13245 if (!child) {
13246 child = vfork ();
13247 if (child < 0) {
13248 perror ("vfork");
13249 _exit(2);
13250 }
13251 if (!child) {
13252 arg = getpid();
13253 write(-1, "", 0);
13254 _exit (arg);
13255 }
13256 }
13257}
13258
13259int
13260main ()
13261{
13262 pid_t parent = getpid ();
13263 pid_t child;
13264
13265 sparc_address_test (0);
13266
13267 child = vfork ();
13268
13269 if (child == 0) {
13270 /* Here is another test for sparc vfork register problems. This
13271 test uses lots of local variables, at least as many local
13272 variables as main has allocated so far including compiler
13273 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13274 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13275 reuse the register of parent for one of the local variables,
13276 since it will think that parent can't possibly be used any more
13277 in this routine. Assigning to the local variable will thus
13278 munge parent in the parent process. */
13279 pid_t
13280 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13281 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13282 /* Convince the compiler that p..p7 are live; otherwise, it might
13283 use the same hardware register for all 8 local variables. */
13284 if (p != p1 || p != p2 || p != p3 || p != p4
13285 || p != p5 || p != p6 || p != p7)
13286 _exit(1);
13287
13288 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13289 from child file descriptors. If the child closes a descriptor
13290 before it execs or exits, this munges the parent's descriptor
13291 as well. Test for this by closing stdout in the child. */
13292 _exit(close(fileno(stdout)) != 0);
13293 } else {
13294 int status;
13295 struct stat st;
13296
13297 while (wait(&status) != child)
13298 ;
81ecdfbb 13299 return (
a9322a30
TT
13300 /* Was there some problem with vforking? */
13301 child < 0
13302
13303 /* Did the child fail? (This shouldn't happen.) */
13304 || status
13305
13306 /* Did the vfork/compiler bug occur? */
13307 || parent != getpid()
13308
13309 /* Did the file descriptor bug occur? */
13310 || fstat(fileno(stdout), &st) != 0
13311 );
13312 }
13313}
13314_ACEOF
81ecdfbb 13315if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13316 ac_cv_func_vfork_works=yes
13317else
81ecdfbb 13318 ac_cv_func_vfork_works=no
a9322a30 13319fi
81ecdfbb
RW
13320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13321 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13322fi
81ecdfbb 13323
a9322a30 13324fi
81ecdfbb
RW
13325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13326$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13327
13328fi;
13329if test "x$ac_cv_func_fork_works" = xcross; then
13330 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13331 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13332$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13333fi
13334
13335if test "x$ac_cv_func_vfork_works" = xyes; then
13336
81ecdfbb 13337$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13338
13339else
13340
81ecdfbb 13341$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13342
13343fi
13344if test "x$ac_cv_func_fork_works" = xyes; then
13345
81ecdfbb 13346$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13347
13348fi
13349
8ae8e197 13350 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
05ea2a05
TT
13351 ptrace64 sbrk setns sigaltstack sigprocmask \
13352 setpgid setpgrp getrusage getauxval
81ecdfbb
RW
13353do :
13354 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13355ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13356if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13357 cat >>confdefs.h <<_ACEOF
81ecdfbb 13358#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13359_ACEOF
13360
13361fi
13362done
13363
13364
05ea2a05
TT
13365 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13366"
13367if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13368 ac_have_decl=1
6c7a06a3 13369else
05ea2a05
TT
13370 ac_have_decl=0
13371fi
13372
13373cat >>confdefs.h <<_ACEOF
13374#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13375_ACEOF
13376
13377
13378 if test "$cross_compiling" = yes; then :
81ecdfbb 13379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3 13380/* end confdefs.h. */
05ea2a05 13381#include <sys/personality.h>
6c7a06a3
TT
13382int
13383main ()
13384{
05ea2a05
TT
13385
13386 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13387 # define ADDR_NO_RANDOMIZE 0x0040000
13388 # endif
13389 /* Test the flag could be set and stays set. */
13390 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13391 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13392 return 1
bec39cab
AC
13393 ;
13394 return 0;
13395}
13396_ACEOF
81ecdfbb 13397if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13398 have_personality=true
a4db0f07 13399else
05ea2a05 13400 have_personality=false
a4db0f07 13401fi
81ecdfbb
RW
13402rm -f core conftest.err conftest.$ac_objext \
13403 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13404else
13405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13406/* end confdefs.h. */
13407#include <sys/personality.h>
13408int
13409main ()
13410{
6c7a06a3 13411
05ea2a05
TT
13412 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13413 # define ADDR_NO_RANDOMIZE 0x0040000
13414 # endif
13415 /* Test the flag could be set and stays set. */
13416 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13417 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13418 return 1
13419 ;
13420 return 0;
13421}
13422_ACEOF
13423if ac_fn_c_try_run "$LINENO"; then :
13424 have_personality=true
13425else
13426 have_personality=false
13427fi
13428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13429 conftest.$ac_objext conftest.beam conftest.$ac_ext
a4db0f07 13430fi
6c7a06a3 13431
05ea2a05
TT
13432 if $have_personality
13433 then
a4db0f07 13434
05ea2a05 13435$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
c906108c 13436
05ea2a05 13437 fi
d0ac1c44 13438
05ea2a05
TT
13439 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13440if test "x$ac_cv_have_decl_strstr" = xyes; then :
13441 ac_have_decl=1
d0ac1c44 13442else
05ea2a05
TT
13443 ac_have_decl=0
13444fi
d0ac1c44
SM
13445
13446cat >>confdefs.h <<_ACEOF
05ea2a05
TT
13447#define HAVE_DECL_STRSTR $ac_have_decl
13448_ACEOF
13449
13450
13451 # ----------------------- #
13452 # Checks for structures. #
13453 # ----------------------- #
13454
13455 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13456if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13457
13458cat >>confdefs.h <<_ACEOF
13459#define HAVE_STRUCT_STAT_ST_BLOCKS 1
d0ac1c44
SM
13460_ACEOF
13461
05ea2a05 13462
d0ac1c44 13463fi
05ea2a05
TT
13464ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13465if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
d0ac1c44 13466
05ea2a05
TT
13467cat >>confdefs.h <<_ACEOF
13468#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13469_ACEOF
13470
13471
13472fi
13473
13474
13475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13476$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13477if ${ac_cv_search_kinfo_getfile+:} false; then :
5e030278
TT
13478 $as_echo_n "(cached) " >&6
13479else
05ea2a05
TT
13480 ac_func_search_save_LIBS=$LIBS
13481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13482/* end confdefs.h. */
3266f10b 13483
05ea2a05
TT
13484/* Override any GCC internal prototype to avoid an error.
13485 Use char because int might match the return type of a GCC
13486 builtin and then its argument prototype would still apply. */
13487#ifdef __cplusplus
13488extern "C"
13489#endif
13490char kinfo_getfile ();
3266f10b
TT
13491int
13492main ()
13493{
05ea2a05 13494return kinfo_getfile ();
3266f10b
TT
13495 ;
13496 return 0;
13497}
13498_ACEOF
05ea2a05
TT
13499for ac_lib in '' util util-freebsd; do
13500 if test -z "$ac_lib"; then
13501 ac_res="none required"
13502 else
13503 ac_res=-l$ac_lib
13504 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13505 fi
13506 if ac_fn_c_try_link "$LINENO"; then :
13507 ac_cv_search_kinfo_getfile=$ac_res
3266f10b 13508fi
05ea2a05
TT
13509rm -f core conftest.err conftest.$ac_objext \
13510 conftest$ac_exeext
13511 if ${ac_cv_search_kinfo_getfile+:} false; then :
13512 break
13513fi
13514done
13515if ${ac_cv_search_kinfo_getfile+:} false; then :
3266f10b
TT
13516
13517else
05ea2a05 13518 ac_cv_search_kinfo_getfile=no
3266f10b 13519fi
05ea2a05
TT
13520rm conftest.$ac_ext
13521LIBS=$ac_func_search_save_LIBS
13522fi
13523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13524$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13525ac_res=$ac_cv_search_kinfo_getfile
13526if test "$ac_res" != no; then :
13527 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13528
13529$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
3266f10b
TT
13530
13531fi
13532
3266f10b 13533
05ea2a05
TT
13534 # Check for std::thread. This does not work on some platforms, like
13535 # mingw and DJGPP.
13536 ac_ext=cpp
13537ac_cpp='$CXXCPP $CPPFLAGS'
13538ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13539ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13540ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3266f10b 13541
3266f10b 13542
3266f10b 13543
3266f10b 13544
3266f10b 13545
05ea2a05
TT
13546ac_ext=c
13547ac_cpp='$CPP $CPPFLAGS'
13548ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13549ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13550ac_compiler_gnu=$ac_cv_c_compiler_gnu
3266f10b 13551
05ea2a05 13552ax_pthread_ok=no
3266f10b 13553
05ea2a05
TT
13554# We used to check for pthread.h first, but this fails if pthread.h
13555# requires special compiler flags (e.g. on Tru64 or Sequent).
13556# It gets checked for in the link test anyway.
3266f10b 13557
05ea2a05
TT
13558# First of all, check if the user has set any of the PTHREAD_LIBS,
13559# etcetera environment variables, and if threads linking works using
13560# them:
13561if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13562 ax_pthread_save_CC="$CC"
13563 ax_pthread_save_CFLAGS="$CFLAGS"
13564 ax_pthread_save_LIBS="$LIBS"
13565 if test "x$PTHREAD_CC" != "x"; then :
13566 CC="$PTHREAD_CC"
3266f10b 13567fi
05ea2a05
TT
13568 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13569 LIBS="$PTHREAD_LIBS $LIBS"
13570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13571$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13573/* end confdefs.h. */
05ea2a05
TT
13574
13575/* Override any GCC internal prototype to avoid an error.
13576 Use char because int might match the return type of a GCC
13577 builtin and then its argument prototype would still apply. */
13578#ifdef __cplusplus
13579extern "C"
13580#endif
13581char pthread_join ();
3266f10b
TT
13582int
13583main ()
13584{
05ea2a05 13585return pthread_join ();
3266f10b
TT
13586 ;
13587 return 0;
13588}
13589_ACEOF
13590if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13591 ax_pthread_ok=yes
3266f10b
TT
13592fi
13593rm -f core conftest.err conftest.$ac_objext \
13594 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13596$as_echo "$ax_pthread_ok" >&6; }
13597 if test "x$ax_pthread_ok" = "xno"; then
13598 PTHREAD_LIBS=""
13599 PTHREAD_CFLAGS=""
13600 fi
13601 CC="$ax_pthread_save_CC"
13602 CFLAGS="$ax_pthread_save_CFLAGS"
13603 LIBS="$ax_pthread_save_LIBS"
3266f10b 13604fi
3266f10b 13605
05ea2a05
TT
13606# We must check for the threads library under a number of different
13607# names; the ordering is very important because some systems
13608# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13609# libraries is broken (non-POSIX).
3266f10b 13610
05ea2a05
TT
13611# Create a list of thread flags to try. Items starting with a "-" are
13612# C compiler flags, and other items are library names, except for "none"
13613# which indicates that we try without any flags at all, and "pthread-config"
13614# which is a program returning the flags for the Pth emulation library.
3266f10b 13615
05ea2a05 13616ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3266f10b 13617
05ea2a05
TT
13618# The ordering *is* (sometimes) important. Some notes on the
13619# individual items follow:
3266f10b 13620
05ea2a05
TT
13621# pthreads: AIX (must check this before -lpthread)
13622# none: in case threads are in libc; should be tried before -Kthread and
13623# other compiler flags to prevent continual compiler warnings
13624# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13625# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13626# (Note: HP C rejects this with "bad form for `-t' option")
13627# -pthreads: Solaris/gcc (Note: HP C also rejects)
13628# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13629# doesn't hurt to check since this sometimes defines pthreads and
13630# -D_REENTRANT too), HP C (must be checked before -lpthread, which
13631# is present but should not be used directly; and before -mthreads,
13632# because the compiler interprets this as "-mt" + "-hreads")
13633# -mthreads: Mingw32/gcc, Lynx/gcc
13634# pthread: Linux, etcetera
13635# --thread-safe: KAI C++
13636# pthread-config: use pthread-config program (for GNU Pth library)
3266f10b 13637
05ea2a05 13638case $host_os in
3266f10b 13639
05ea2a05 13640 freebsd*)
3266f10b 13641
05ea2a05
TT
13642 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13643 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3266f10b 13644
05ea2a05
TT
13645 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13646 ;;
3266f10b 13647
05ea2a05 13648 hpux*)
3266f10b 13649
05ea2a05
TT
13650 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13651 # multi-threading and also sets -lpthread."
13652
13653 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13654 ;;
13655
13656 openedition*)
13657
13658 # IBM z/OS requires a feature-test macro to be defined in order to
13659 # enable POSIX threads at all, so give the user a hint if this is
13660 # not set. (We don't define these ourselves, as they can affect
13661 # other portions of the system API in unpredictable ways.)
13662
13663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13664/* end confdefs.h. */
05ea2a05
TT
13665
13666# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13667 AX_PTHREAD_ZOS_MISSING
13668# endif
3266f10b
TT
13669
13670_ACEOF
13671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
05ea2a05
TT
13672 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13674$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
3266f10b
TT
13675fi
13676rm -f conftest*
13677
05ea2a05 13678 ;;
3266f10b 13679
05ea2a05 13680 solaris*)
3266f10b 13681
05ea2a05
TT
13682 # On Solaris (at least, for some versions), libc contains stubbed
13683 # (non-functional) versions of the pthreads routines, so link-based
13684 # tests will erroneously succeed. (N.B.: The stubs are missing
13685 # pthread_cleanup_push, or rather a function called by this macro,
13686 # so we could check for that, but who knows whether they'll stub
13687 # that too in a future libc.) So we'll check first for the
13688 # standard Solaris way of linking pthreads (-mt -lpthread).
13689
13690 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13691 ;;
13692esac
13693
13694# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13695
13696if test "x$GCC" = "xyes"; then :
13697 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
3266f10b
TT
13698fi
13699
05ea2a05
TT
13700# The presence of a feature test macro requesting re-entrant function
13701# definitions is, on some systems, a strong hint that pthreads support is
13702# correctly enabled
13703
13704case $host_os in
13705 darwin* | hpux* | linux* | osf* | solaris*)
13706 ax_pthread_check_macro="_REENTRANT"
13707 ;;
13708
13709 aix*)
13710 ax_pthread_check_macro="_THREAD_SAFE"
13711 ;;
13712
13713 *)
13714 ax_pthread_check_macro="--"
13715 ;;
13716esac
13717if test "x$ax_pthread_check_macro" = "x--"; then :
13718 ax_pthread_check_cond=0
13719else
13720 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
3266f10b
TT
13721fi
13722
05ea2a05
TT
13723# Are we compiling with Clang?
13724
13725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13726$as_echo_n "checking whether $CC is Clang... " >&6; }
13727if ${ax_cv_PTHREAD_CLANG+:} false; then :
3266f10b
TT
13728 $as_echo_n "(cached) " >&6
13729else
05ea2a05
TT
13730 ax_cv_PTHREAD_CLANG=no
13731 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13732 if test "x$GCC" = "xyes"; then
13733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13734/* end confdefs.h. */
05ea2a05
TT
13735/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13736# if defined(__clang__) && defined(__llvm__)
13737 AX_PTHREAD_CC_IS_CLANG
13738# endif
3266f10b 13739
3266f10b 13740_ACEOF
05ea2a05
TT
13741if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13742 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13743 ax_cv_PTHREAD_CLANG=yes
3266f10b 13744fi
05ea2a05
TT
13745rm -f conftest*
13746
13747 fi
3266f10b
TT
13748
13749fi
05ea2a05
TT
13750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13751$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13752ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
3266f10b 13753
05ea2a05 13754ax_pthread_clang_warning=no
3266f10b 13755
05ea2a05
TT
13756# Clang needs special handling, because older versions handle the -pthread
13757# option in a rather... idiosyncratic way
3266f10b 13758
05ea2a05 13759if test "x$ax_pthread_clang" = "xyes"; then
3266f10b 13760
05ea2a05 13761 # Clang takes -pthread; it has never supported any other flag
b2ceabe8 13762
05ea2a05
TT
13763 # (Note 1: This will need to be revisited if a system that Clang
13764 # supports has POSIX threads in a separate library. This tends not
13765 # to be the way of modern systems, but it's conceivable.)
b2ceabe8 13766
05ea2a05
TT
13767 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13768 # to get POSIX threads support; the API is always present and
13769 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13770 # -pthread does define _REENTRANT, and while the Darwin headers
13771 # ignore this macro, third-party headers might not.)
b2ceabe8 13772
05ea2a05
TT
13773 PTHREAD_CFLAGS="-pthread"
13774 PTHREAD_LIBS=
3266f10b 13775
05ea2a05
TT
13776 ax_pthread_ok=yes
13777
13778 # However, older versions of Clang make a point of warning the user
13779 # that, in an invocation where only linking and no compilation is
13780 # taking place, the -pthread option has no effect ("argument unused
13781 # during compilation"). They expect -pthread to be passed in only
13782 # when source code is being compiled.
13783 #
13784 # Problem is, this is at odds with the way Automake and most other
13785 # C build frameworks function, which is that the same flags used in
13786 # compilation (CFLAGS) are also used in linking. Many systems
13787 # supported by AX_PTHREAD require exactly this for POSIX threads
13788 # support, and in fact it is often not straightforward to specify a
13789 # flag that is used only in the compilation phase and not in
13790 # linking. Such a scenario is extremely rare in practice.
13791 #
13792 # Even though use of the -pthread flag in linking would only print
13793 # a warning, this can be a nuisance for well-run software projects
13794 # that build with -Werror. So if the active version of Clang has
13795 # this misfeature, we search for an option to squash it.
13796
13797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13798$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13799if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13800 $as_echo_n "(cached) " >&6
13801else
13802 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13803 # Create an alternate version of $ac_link that compiles and
13804 # links in two steps (.c -> .o, .o -> exe) instead of one
13805 # (.c -> exe), because the warning occurs only in the second
13806 # step
13807 ax_pthread_save_ac_link="$ac_link"
13808 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13809 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13810 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13811 ax_pthread_save_CFLAGS="$CFLAGS"
13812 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13813 if test "x$ax_pthread_try" = "xunknown"; then :
13814 break
13815fi
13816 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13817 ac_link="$ax_pthread_save_ac_link"
13818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13819/* end confdefs.h. */
13820int main(void){return 0;}
3266f10b
TT
13821_ACEOF
13822if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
13823 ac_link="$ax_pthread_2step_ac_link"
13824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13825/* end confdefs.h. */
13826int main(void){return 0;}
13827_ACEOF
13828if ac_fn_c_try_link "$LINENO"; then :
13829 break
3266f10b
TT
13830fi
13831rm -f core conftest.err conftest.$ac_objext \
13832 conftest$ac_exeext conftest.$ac_ext
13833
13834fi
05ea2a05
TT
13835rm -f core conftest.err conftest.$ac_objext \
13836 conftest$ac_exeext conftest.$ac_ext
13837 done
13838 ac_link="$ax_pthread_save_ac_link"
13839 CFLAGS="$ax_pthread_save_CFLAGS"
13840 if test "x$ax_pthread_try" = "x"; then :
13841 ax_pthread_try=no
13842fi
13843 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
3266f10b 13844
05ea2a05
TT
13845fi
13846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13847$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
3266f10b 13848
05ea2a05
TT
13849 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13850 no | unknown) ;;
13851 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13852 esac
3266f10b 13853
05ea2a05 13854fi # $ax_pthread_clang = yes
3266f10b 13855
05ea2a05
TT
13856if test "x$ax_pthread_ok" = "xno"; then
13857for ax_pthread_try_flag in $ax_pthread_flags; do
3266f10b 13858
05ea2a05
TT
13859 case $ax_pthread_try_flag in
13860 none)
13861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13862$as_echo_n "checking whether pthreads work without any flags... " >&6; }
13863 ;;
3266f10b 13864
05ea2a05
TT
13865 -mt,pthread)
13866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13867$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13868 PTHREAD_CFLAGS="-mt"
13869 PTHREAD_LIBS="-lpthread"
13870 ;;
3266f10b 13871
05ea2a05
TT
13872 -*)
13873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13874$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13875 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13876 ;;
3266f10b 13877
05ea2a05
TT
13878 pthread-config)
13879 # Extract the first word of "pthread-config", so it can be a program name with args.
13880set dummy pthread-config; ac_word=$2
13881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13882$as_echo_n "checking for $ac_word... " >&6; }
13883if ${ac_cv_prog_ax_pthread_config+:} false; then :
13884 $as_echo_n "(cached) " >&6
13885else
13886 if test -n "$ax_pthread_config"; then
13887 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13888else
13889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13890for as_dir in $PATH
13891do
13892 IFS=$as_save_IFS
13893 test -z "$as_dir" && as_dir=.
13894 for ac_exec_ext in '' $ac_executable_extensions; do
13895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13896 ac_cv_prog_ax_pthread_config="yes"
13897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13898 break 2
13899 fi
3266f10b 13900done
05ea2a05
TT
13901 done
13902IFS=$as_save_IFS
3266f10b 13903
05ea2a05
TT
13904 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13905fi
13906fi
13907ax_pthread_config=$ac_cv_prog_ax_pthread_config
13908if test -n "$ax_pthread_config"; then
13909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13910$as_echo "$ax_pthread_config" >&6; }
3266f10b 13911else
05ea2a05
TT
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13913$as_echo "no" >&6; }
3266f10b
TT
13914fi
13915
5e030278 13916
05ea2a05
TT
13917 if test "x$ax_pthread_config" = "xno"; then :
13918 continue
13919fi
13920 PTHREAD_CFLAGS="`pthread-config --cflags`"
13921 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13922 ;;
5e030278 13923
05ea2a05
TT
13924 *)
13925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13926$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13927 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13928 ;;
13929 esac
5e030278 13930
5e030278
TT
13931 ax_pthread_save_CFLAGS="$CFLAGS"
13932 ax_pthread_save_LIBS="$LIBS"
5e030278
TT
13933 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13934 LIBS="$PTHREAD_LIBS $LIBS"
05ea2a05
TT
13935
13936 # Check for various functions. We must include pthread.h,
13937 # since some functions may be macros. (On the Sequent, we
13938 # need a special flag -Kthread to make this header compile.)
13939 # We check for pthread_join because it is in -lpthread on IRIX
13940 # while pthread_create is in libc. We check for pthread_attr_init
13941 # due to DEC craziness with -lpthreads. We check for
13942 # pthread_cleanup_push because it is one of the few pthread
13943 # functions on Solaris that doesn't have a non-functional libc stub.
13944 # We try pthread_create on general principles.
13945
5e030278
TT
13946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13947/* end confdefs.h. */
05ea2a05
TT
13948#include <pthread.h>
13949# if $ax_pthread_check_cond
13950# error "$ax_pthread_check_macro must be defined"
13951# endif
13952 static void routine(void *a) { a = 0; }
13953 static void *start_routine(void *a) { return a; }
5e030278
TT
13954int
13955main ()
13956{
05ea2a05
TT
13957pthread_t th; pthread_attr_t attr;
13958 pthread_create(&th, 0, start_routine, 0);
13959 pthread_join(th, 0);
13960 pthread_attr_init(&attr);
13961 pthread_cleanup_push(routine, 0);
13962 pthread_cleanup_pop(0) /* ; */
5e030278
TT
13963 ;
13964 return 0;
13965}
13966_ACEOF
13967if ac_fn_c_try_link "$LINENO"; then :
13968 ax_pthread_ok=yes
13969fi
13970rm -f core conftest.err conftest.$ac_objext \
13971 conftest$ac_exeext conftest.$ac_ext
05ea2a05 13972
5e030278
TT
13973 CFLAGS="$ax_pthread_save_CFLAGS"
13974 LIBS="$ax_pthread_save_LIBS"
05ea2a05
TT
13975
13976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13977$as_echo "$ax_pthread_ok" >&6; }
13978 if test "x$ax_pthread_ok" = "xyes"; then :
13979 break
5e030278
TT
13980fi
13981
05ea2a05
TT
13982 PTHREAD_LIBS=""
13983 PTHREAD_CFLAGS=""
13984done
13985fi
5e030278 13986
05ea2a05
TT
13987# Various other checks:
13988if test "x$ax_pthread_ok" = "xyes"; then
13989 ax_pthread_save_CFLAGS="$CFLAGS"
13990 ax_pthread_save_LIBS="$LIBS"
13991 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13992 LIBS="$PTHREAD_LIBS $LIBS"
5e030278 13993
05ea2a05
TT
13994 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
13995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
13996$as_echo_n "checking for joinable pthread attribute... " >&6; }
13997if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
13998 $as_echo_n "(cached) " >&6
13999else
14000 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14001 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14003/* end confdefs.h. */
14004#include <pthread.h>
14005int
14006main ()
14007{
14008int attr = $ax_pthread_attr; return attr /* ; */
14009 ;
14010 return 0;
14011}
14012_ACEOF
14013if ac_fn_c_try_link "$LINENO"; then :
14014 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14015fi
14016rm -f core conftest.err conftest.$ac_objext \
14017 conftest$ac_exeext conftest.$ac_ext
14018 done
5e030278 14019
05ea2a05
TT
14020fi
14021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14022$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14023 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14024 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14025 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
5e030278 14026
05ea2a05
TT
14027cat >>confdefs.h <<_ACEOF
14028#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14029_ACEOF
5e030278 14030
05ea2a05 14031 ax_pthread_joinable_attr_defined=yes
5e030278 14032
05ea2a05 14033fi
5e030278 14034
05ea2a05
TT
14035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14036$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14037if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14038 $as_echo_n "(cached) " >&6
14039else
14040 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14041 case $host_os in
14042 solaris*)
14043 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14044 ;;
14045 esac
5e030278 14046
05ea2a05
TT
14047fi
14048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14049$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14050 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14051 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14052 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14053 ax_pthread_special_flags_added=yes
14054fi
5e030278 14055
05ea2a05
TT
14056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14057$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14058if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14059 $as_echo_n "(cached) " >&6
14060else
14061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14062/* end confdefs.h. */
14063#include <pthread.h>
14064int
14065main ()
14066{
14067int i = PTHREAD_PRIO_INHERIT;
14068 ;
14069 return 0;
14070}
14071_ACEOF
14072if ac_fn_c_try_link "$LINENO"; then :
14073 ax_cv_PTHREAD_PRIO_INHERIT=yes
14074else
14075 ax_cv_PTHREAD_PRIO_INHERIT=no
14076fi
14077rm -f core conftest.err conftest.$ac_objext \
14078 conftest$ac_exeext conftest.$ac_ext
5e030278 14079
05ea2a05
TT
14080fi
14081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14082$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14083 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14084 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
5e030278 14085
05ea2a05 14086$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
5e030278 14087
05ea2a05 14088 ax_pthread_prio_inherit_defined=yes
5e030278 14089
05ea2a05 14090fi
5e030278 14091
05ea2a05
TT
14092 CFLAGS="$ax_pthread_save_CFLAGS"
14093 LIBS="$ax_pthread_save_LIBS"
5e030278 14094
05ea2a05
TT
14095 # More AIX lossage: compile with *_r variant
14096 if test "x$GCC" != "xyes"; then
14097 case $host_os in
14098 aix*)
14099 case "x/$CC" in #(
14100 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14101 #handle absolute path differently from PATH based program lookup
14102 case "x$CC" in #(
14103 x/*) :
14104 if as_fn_executable_p ${CC}_r; then :
14105 PTHREAD_CC="${CC}_r"
14106fi ;; #(
14107 *) :
14108 for ac_prog in ${CC}_r
14109do
14110 # Extract the first word of "$ac_prog", so it can be a program name with args.
14111set dummy $ac_prog; ac_word=$2
14112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14113$as_echo_n "checking for $ac_word... " >&6; }
14114if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14115 $as_echo_n "(cached) " >&6
14116else
14117 if test -n "$PTHREAD_CC"; then
14118 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14119else
14120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14121for as_dir in $PATH
14122do
14123 IFS=$as_save_IFS
14124 test -z "$as_dir" && as_dir=.
14125 for ac_exec_ext in '' $ac_executable_extensions; do
14126 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14127 ac_cv_prog_PTHREAD_CC="$ac_prog"
14128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14129 break 2
14130 fi
14131done
14132 done
14133IFS=$as_save_IFS
5e030278 14134
5e030278 14135fi
05ea2a05
TT
14136fi
14137PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14138if test -n "$PTHREAD_CC"; then
14139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14140$as_echo "$PTHREAD_CC" >&6; }
14141else
14142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14143$as_echo "no" >&6; }
14144fi
5e030278 14145
5e030278 14146
05ea2a05
TT
14147 test -n "$PTHREAD_CC" && break
14148done
14149test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14150 ;;
14151esac ;; #(
14152 *) :
14153 ;;
5e030278 14154esac
05ea2a05
TT
14155 ;;
14156 esac
14157 fi
14158fi
5e030278 14159
05ea2a05 14160test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
5e030278 14161
5e030278 14162
5e030278 14163
5e030278 14164
5e030278 14165
05ea2a05
TT
14166# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14167if test "x$ax_pthread_ok" = "xyes"; then
14168 threads=yes
14169 :
5e030278 14170else
05ea2a05
TT
14171 ax_pthread_ok=no
14172 threads=no
5e030278 14173fi
05ea2a05
TT
14174ac_ext=cpp
14175ac_cpp='$CXXCPP $CPPFLAGS'
14176ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14177ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14178ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5e030278 14179
5e030278 14180
05ea2a05
TT
14181 if test "$threads" = "yes"; then
14182 save_LIBS="$LIBS"
14183 LIBS="$PTHREAD_LIBS $LIBS"
14184 save_CXXFLAGS="$CXXFLAGS"
14185 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14187$as_echo_n "checking for std::thread... " >&6; }
14188if ${gdb_cv_cxx_std_thread+:} false; then :
14189 $as_echo_n "(cached) " >&6
14190else
14191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14192/* end confdefs.h. */
05ea2a05
TT
14193#include <thread>
14194 void callback() { }
14195int
14196main ()
14197{
14198std::thread t(callback);
14199 ;
14200 return 0;
14201}
5e030278 14202_ACEOF
05ea2a05
TT
14203if ac_fn_cxx_try_compile "$LINENO"; then :
14204 gdb_cv_cxx_std_thread=yes
14205else
14206 gdb_cv_cxx_std_thread=no
5e030278 14207fi
05ea2a05
TT
14208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14209fi
14210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14211$as_echo "$gdb_cv_cxx_std_thread" >&6; }
5e030278 14212
05ea2a05
TT
14213 # This check must be here, while LIBS includes any necessary
14214 # threading library.
14215 for ac_func in pthread_sigmask pthread_setname_np
14216do :
14217 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14218ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14219if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14220 cat >>confdefs.h <<_ACEOF
14221#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14222_ACEOF
5e030278
TT
14223
14224fi
05ea2a05 14225done
5e030278 14226
5e030278 14227
05ea2a05
TT
14228 LIBS="$save_LIBS"
14229 CXXFLAGS="$save_CXXFLAGS"
14230 fi
14231 if test "$gdb_cv_cxx_std_thread" = "yes"; then
5e030278 14232
05ea2a05 14233$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
5e030278 14234
05ea2a05
TT
14235 fi
14236 ac_ext=c
14237ac_cpp='$CPP $CPPFLAGS'
14238ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14239ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14240ac_compiler_gnu=$ac_cv_c_compiler_gnu
5e030278 14241
5e030278 14242
05ea2a05
TT
14243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14244$as_echo_n "checking for sigsetjmp... " >&6; }
14245if ${gdb_cv_func_sigsetjmp+:} false; then :
14246 $as_echo_n "(cached) " >&6
14247else
14248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14249/* end confdefs.h. */
5e030278 14250
05ea2a05 14251 #include <setjmp.h>
5e030278 14252
05ea2a05
TT
14253int
14254main ()
14255{
14256sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
14257 ;
14258 return 0;
14259}
14260_ACEOF
14261if ac_fn_c_try_compile "$LINENO"; then :
14262 gdb_cv_func_sigsetjmp=yes
14263else
14264 gdb_cv_func_sigsetjmp=no
14265fi
14266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14267fi
14268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14269$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14270 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
5e030278 14271
05ea2a05 14272$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
5e030278 14273
05ea2a05
TT
14274 fi
14275
14276
14277# Check whether --with-intel_pt was given.
14278if test "${with_intel_pt+set}" = set; then :
14279 withval=$with_intel_pt;
5e030278 14280else
05ea2a05 14281 with_intel_pt=auto
5e030278 14282fi
05ea2a05
TT
14283
14284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14285$as_echo_n "checking whether to use intel pt... " >&6; }
14286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14287$as_echo "$with_intel_pt" >&6; }
14288
14289 if test "${with_intel_pt}" = no; then
14290 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14291$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14292 HAVE_LIBIPT=no
14293 else
14294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14295/* end confdefs.h. */
5e030278 14296
05ea2a05
TT
14297 #include <linux/perf_event.h>
14298 #ifndef PERF_ATTR_SIZE_VER5
14299 # error
14300 #endif
5e030278 14301
05ea2a05
TT
14302_ACEOF
14303if ac_fn_c_try_cpp "$LINENO"; then :
14304 perf_event=yes
14305else
14306 perf_event=no
5e030278 14307fi
05ea2a05
TT
14308rm -f conftest.err conftest.i conftest.$ac_ext
14309 if test "$perf_event" != yes; then
14310 if test "$with_intel_pt" = yes; then
14311 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14312 else
14313 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14314$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14315 fi
14316 fi
5e030278 14317
5e030278 14318
5e030278 14319
5e030278 14320
5e030278 14321
5e030278 14322
5e030278 14323
5e030278 14324
5e030278 14325
05ea2a05 14326 use_additional=yes
5e030278 14327
05ea2a05
TT
14328 acl_save_prefix="$prefix"
14329 prefix="$acl_final_prefix"
14330 acl_save_exec_prefix="$exec_prefix"
14331 exec_prefix="$acl_final_exec_prefix"
5e030278 14332
05ea2a05
TT
14333 eval additional_includedir=\"$includedir\"
14334 eval additional_libdir=\"$libdir\"
5e030278 14335
05ea2a05
TT
14336 exec_prefix="$acl_save_exec_prefix"
14337 prefix="$acl_save_prefix"
5e030278 14338
5e030278 14339
05ea2a05
TT
14340# Check whether --with-libipt-prefix was given.
14341if test "${with_libipt_prefix+set}" = set; then :
14342 withval=$with_libipt_prefix;
14343 if test "X$withval" = "Xno"; then
14344 use_additional=no
14345 else
14346 if test "X$withval" = "X"; then
5e030278 14347
05ea2a05
TT
14348 acl_save_prefix="$prefix"
14349 prefix="$acl_final_prefix"
14350 acl_save_exec_prefix="$exec_prefix"
14351 exec_prefix="$acl_final_exec_prefix"
5e030278 14352
05ea2a05
TT
14353 eval additional_includedir=\"$includedir\"
14354 eval additional_libdir=\"$libdir\"
5e030278 14355
05ea2a05
TT
14356 exec_prefix="$acl_save_exec_prefix"
14357 prefix="$acl_save_prefix"
5e030278 14358
05ea2a05
TT
14359 else
14360 additional_includedir="$withval/include"
14361 additional_libdir="$withval/lib"
14362 fi
14363 fi
5e030278
TT
14364
14365fi
5e030278 14366
9f1528a1
AB
14367
14368# Check whether --with-libipt-type was given.
14369if test "${with_libipt_type+set}" = set; then :
14370 withval=$with_libipt_type; with_libipt_type=$withval
14371else
14372 with_libipt_type=auto
14373fi
14374
14375 lib_type=`eval echo \$with_libipt_type`
14376
05ea2a05
TT
14377 LIBIPT=
14378 LTLIBIPT=
14379 INCIPT=
14380 rpathdirs=
14381 ltrpathdirs=
14382 names_already_handled=
14383 names_next_round='ipt '
14384 while test -n "$names_next_round"; do
14385 names_this_round="$names_next_round"
14386 names_next_round=
14387 for name in $names_this_round; do
14388 already_handled=
14389 for n in $names_already_handled; do
14390 if test "$n" = "$name"; then
14391 already_handled=yes
14392 break
14393 fi
14394 done
14395 if test -z "$already_handled"; then
14396 names_already_handled="$names_already_handled $name"
14397 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14398 eval value=\"\$HAVE_LIB$uppername\"
14399 if test -n "$value"; then
14400 if test "$value" = yes; then
14401 eval value=\"\$LIB$uppername\"
14402 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14403 eval value=\"\$LTLIB$uppername\"
14404 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14405 else
14406 :
14407 fi
14408 else
14409 found_dir=
14410 found_la=
14411 found_so=
14412 found_a=
14413 if test $use_additional = yes; then
9f1528a1 14414 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14415 found_dir="$additional_libdir"
14416 found_so="$additional_libdir/lib$name.$shlibext"
14417 if test -f "$additional_libdir/lib$name.la"; then
14418 found_la="$additional_libdir/lib$name.la"
14419 fi
9f1528a1 14420 elif test x$lib_type != xshared; then
05ea2a05
TT
14421 if test -f "$additional_libdir/lib$name.$libext"; then
14422 found_dir="$additional_libdir"
14423 found_a="$additional_libdir/lib$name.$libext"
14424 if test -f "$additional_libdir/lib$name.la"; then
14425 found_la="$additional_libdir/lib$name.la"
14426 fi
14427 fi
14428 fi
14429 fi
14430 if test "X$found_dir" = "X"; then
14431 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14432
05ea2a05
TT
14433 acl_save_prefix="$prefix"
14434 prefix="$acl_final_prefix"
14435 acl_save_exec_prefix="$exec_prefix"
14436 exec_prefix="$acl_final_exec_prefix"
14437 eval x=\"$x\"
14438 exec_prefix="$acl_save_exec_prefix"
14439 prefix="$acl_save_prefix"
5e030278 14440
05ea2a05
TT
14441 case "$x" in
14442 -L*)
14443 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 14444 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14445 found_dir="$dir"
14446 found_so="$dir/lib$name.$shlibext"
14447 if test -f "$dir/lib$name.la"; then
14448 found_la="$dir/lib$name.la"
14449 fi
9f1528a1 14450 elif test x$lib_type != xshared; then
05ea2a05
TT
14451 if test -f "$dir/lib$name.$libext"; then
14452 found_dir="$dir"
14453 found_a="$dir/lib$name.$libext"
14454 if test -f "$dir/lib$name.la"; then
14455 found_la="$dir/lib$name.la"
14456 fi
14457 fi
14458 fi
14459 ;;
14460 esac
14461 if test "X$found_dir" != "X"; then
14462 break
14463 fi
14464 done
14465 fi
14466 if test "X$found_dir" != "X"; then
14467 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14468 if test "X$found_so" != "X"; then
14469 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14470 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14471 else
14472 haveit=
14473 for x in $ltrpathdirs; do
14474 if test "X$x" = "X$found_dir"; then
14475 haveit=yes
14476 break
14477 fi
14478 done
14479 if test -z "$haveit"; then
14480 ltrpathdirs="$ltrpathdirs $found_dir"
14481 fi
14482 if test "$hardcode_direct" = yes; then
14483 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14484 else
14485 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14486 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14487 haveit=
14488 for x in $rpathdirs; do
14489 if test "X$x" = "X$found_dir"; then
14490 haveit=yes
14491 break
14492 fi
14493 done
14494 if test -z "$haveit"; then
14495 rpathdirs="$rpathdirs $found_dir"
14496 fi
14497 else
14498 haveit=
14499 for x in $LDFLAGS $LIBIPT; do
5e030278 14500
05ea2a05
TT
14501 acl_save_prefix="$prefix"
14502 prefix="$acl_final_prefix"
14503 acl_save_exec_prefix="$exec_prefix"
14504 exec_prefix="$acl_final_exec_prefix"
14505 eval x=\"$x\"
14506 exec_prefix="$acl_save_exec_prefix"
14507 prefix="$acl_save_prefix"
5e030278 14508
05ea2a05
TT
14509 if test "X$x" = "X-L$found_dir"; then
14510 haveit=yes
14511 break
14512 fi
14513 done
14514 if test -z "$haveit"; then
14515 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14516 fi
14517 if test "$hardcode_minus_L" != no; then
14518 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14519 else
14520 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14521 fi
14522 fi
14523 fi
14524 fi
14525 else
14526 if test "X$found_a" != "X"; then
14527 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14528 else
14529 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14530 fi
14531 fi
14532 additional_includedir=
14533 case "$found_dir" in
14534 */lib | */lib/)
14535 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14536 additional_includedir="$basedir/include"
14537 ;;
14538 esac
14539 if test "X$additional_includedir" != "X"; then
14540 if test "X$additional_includedir" != "X/usr/include"; then
14541 haveit=
14542 if test "X$additional_includedir" = "X/usr/local/include"; then
14543 if test -n "$GCC"; then
14544 case $host_os in
14545 linux*) haveit=yes;;
14546 esac
14547 fi
14548 fi
14549 if test -z "$haveit"; then
14550 for x in $CPPFLAGS $INCIPT; do
5e030278 14551
05ea2a05
TT
14552 acl_save_prefix="$prefix"
14553 prefix="$acl_final_prefix"
14554 acl_save_exec_prefix="$exec_prefix"
14555 exec_prefix="$acl_final_exec_prefix"
14556 eval x=\"$x\"
14557 exec_prefix="$acl_save_exec_prefix"
14558 prefix="$acl_save_prefix"
5e030278 14559
05ea2a05
TT
14560 if test "X$x" = "X-I$additional_includedir"; then
14561 haveit=yes
14562 break
14563 fi
14564 done
14565 if test -z "$haveit"; then
14566 if test -d "$additional_includedir"; then
14567 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14568 fi
14569 fi
14570 fi
14571 fi
14572 fi
14573 if test -n "$found_la"; then
14574 save_libdir="$libdir"
14575 case "$found_la" in
14576 */* | *\\*) . "$found_la" ;;
14577 *) . "./$found_la" ;;
14578 esac
14579 libdir="$save_libdir"
14580 for dep in $dependency_libs; do
14581 case "$dep" in
14582 -L*)
14583 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14584 if test "X$additional_libdir" != "X/usr/lib"; then
14585 haveit=
14586 if test "X$additional_libdir" = "X/usr/local/lib"; then
14587 if test -n "$GCC"; then
14588 case $host_os in
14589 linux*) haveit=yes;;
14590 esac
14591 fi
14592 fi
14593 if test -z "$haveit"; then
14594 haveit=
14595 for x in $LDFLAGS $LIBIPT; do
5e030278 14596
05ea2a05
TT
14597 acl_save_prefix="$prefix"
14598 prefix="$acl_final_prefix"
14599 acl_save_exec_prefix="$exec_prefix"
14600 exec_prefix="$acl_final_exec_prefix"
14601 eval x=\"$x\"
14602 exec_prefix="$acl_save_exec_prefix"
14603 prefix="$acl_save_prefix"
5e030278 14604
05ea2a05
TT
14605 if test "X$x" = "X-L$additional_libdir"; then
14606 haveit=yes
14607 break
14608 fi
14609 done
14610 if test -z "$haveit"; then
14611 if test -d "$additional_libdir"; then
14612 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14613 fi
14614 fi
14615 haveit=
14616 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14617
05ea2a05
TT
14618 acl_save_prefix="$prefix"
14619 prefix="$acl_final_prefix"
14620 acl_save_exec_prefix="$exec_prefix"
14621 exec_prefix="$acl_final_exec_prefix"
14622 eval x=\"$x\"
14623 exec_prefix="$acl_save_exec_prefix"
14624 prefix="$acl_save_prefix"
5e030278 14625
05ea2a05
TT
14626 if test "X$x" = "X-L$additional_libdir"; then
14627 haveit=yes
14628 break
14629 fi
14630 done
14631 if test -z "$haveit"; then
14632 if test -d "$additional_libdir"; then
14633 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14634 fi
14635 fi
14636 fi
14637 fi
14638 ;;
14639 -R*)
14640 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14641 if test "$enable_rpath" != no; then
14642 haveit=
14643 for x in $rpathdirs; do
14644 if test "X$x" = "X$dir"; then
14645 haveit=yes
14646 break
14647 fi
14648 done
14649 if test -z "$haveit"; then
14650 rpathdirs="$rpathdirs $dir"
14651 fi
14652 haveit=
14653 for x in $ltrpathdirs; do
14654 if test "X$x" = "X$dir"; then
14655 haveit=yes
14656 break
14657 fi
14658 done
14659 if test -z "$haveit"; then
14660 ltrpathdirs="$ltrpathdirs $dir"
14661 fi
14662 fi
14663 ;;
14664 -l*)
14665 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14666 ;;
14667 *.la)
14668 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14669 ;;
14670 *)
14671 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14672 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14673 ;;
14674 esac
14675 done
14676 fi
14677 else
9f1528a1
AB
14678 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
14679 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14680 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14681 else
14682 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
14683 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
14684 fi
05ea2a05 14685 fi
5e030278 14686 fi
05ea2a05
TT
14687 fi
14688 done
14689 done
14690 if test "X$rpathdirs" != "X"; then
14691 if test -n "$hardcode_libdir_separator"; then
14692 alldirs=
14693 for found_dir in $rpathdirs; do
14694 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14695 done
14696 acl_save_libdir="$libdir"
14697 libdir="$alldirs"
14698 eval flag=\"$hardcode_libdir_flag_spec\"
14699 libdir="$acl_save_libdir"
14700 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14701 else
14702 for found_dir in $rpathdirs; do
14703 acl_save_libdir="$libdir"
14704 libdir="$found_dir"
14705 eval flag=\"$hardcode_libdir_flag_spec\"
14706 libdir="$acl_save_libdir"
14707 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14708 done
14709 fi
14710 fi
14711 if test "X$ltrpathdirs" != "X"; then
14712 for found_dir in $ltrpathdirs; do
14713 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14714 done
14715 fi
5e030278
TT
14716
14717
05ea2a05 14718 ac_save_CPPFLAGS="$CPPFLAGS"
5e030278 14719
05ea2a05
TT
14720 for element in $INCIPT; do
14721 haveit=
14722 for x in $CPPFLAGS; do
5e030278 14723
05ea2a05
TT
14724 acl_save_prefix="$prefix"
14725 prefix="$acl_final_prefix"
14726 acl_save_exec_prefix="$exec_prefix"
14727 exec_prefix="$acl_final_exec_prefix"
14728 eval x=\"$x\"
14729 exec_prefix="$acl_save_exec_prefix"
14730 prefix="$acl_save_prefix"
5e030278 14731
05ea2a05
TT
14732 if test "X$x" = "X$element"; then
14733 haveit=yes
14734 break
14735 fi
14736 done
14737 if test -z "$haveit"; then
14738 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14739 fi
14740 done
5e030278
TT
14741
14742
05ea2a05
TT
14743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14744$as_echo_n "checking for libipt... " >&6; }
14745if ${ac_cv_libipt+:} false; then :
5e030278
TT
14746 $as_echo_n "(cached) " >&6
14747else
05ea2a05
TT
14748
14749 ac_save_LIBS="$LIBS"
14750 LIBS="$LIBS $LIBIPT"
14751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14752/* end confdefs.h. */
05ea2a05 14753#include "intel-pt.h"
5e030278
TT
14754int
14755main ()
14756{
05ea2a05 14757pt_insn_alloc_decoder (0);
5e030278
TT
14758 ;
14759 return 0;
14760}
14761_ACEOF
05ea2a05
TT
14762if ac_fn_c_try_link "$LINENO"; then :
14763 ac_cv_libipt=yes
5e030278 14764else
05ea2a05 14765 ac_cv_libipt=no
5e030278 14766fi
05ea2a05
TT
14767rm -f core conftest.err conftest.$ac_objext \
14768 conftest$ac_exeext conftest.$ac_ext
14769 LIBS="$ac_save_LIBS"
14770
5e030278 14771fi
05ea2a05
TT
14772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14773$as_echo "$ac_cv_libipt" >&6; }
14774 if test "$ac_cv_libipt" = yes; then
14775 HAVE_LIBIPT=yes
21987b9c 14776
05ea2a05
TT
14777$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14778
14779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14780$as_echo_n "checking how to link with libipt... " >&6; }
14781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14782$as_echo "$LIBIPT" >&6; }
14783 else
14784 HAVE_LIBIPT=no
14785 CPPFLAGS="$ac_save_CPPFLAGS"
14786 LIBIPT=
14787 LTLIBIPT=
14788 fi
14789
14790
14791
14792
14793
14794
14795 if test "$HAVE_LIBIPT" != yes; then
14796 if test "$with_intel_pt" = yes; then
14797 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14798 else
14799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14800$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14801 fi
14802 else
14803 save_LIBS=$LIBS
14804 LIBS="$LIBS $LIBIPT"
14805 for ac_func in pt_insn_event
21987b9c 14806do :
05ea2a05
TT
14807 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14808if test "x$ac_cv_func_pt_insn_event" = xyes; then :
21987b9c 14809 cat >>confdefs.h <<_ACEOF
05ea2a05 14810#define HAVE_PT_INSN_EVENT 1
21987b9c
TT
14811_ACEOF
14812
14813fi
14814done
14815
05ea2a05
TT
14816 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14817"
14818if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
21987b9c 14819
05ea2a05
TT
14820cat >>confdefs.h <<_ACEOF
14821#define HAVE_STRUCT_PT_INSN_ENABLED 1
14822_ACEOF
5e030278 14823
5e030278 14824
05ea2a05
TT
14825fi
14826ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14827"
14828if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14829
14830cat >>confdefs.h <<_ACEOF
14831#define HAVE_STRUCT_PT_INSN_RESYNCED 1
14832_ACEOF
5e030278
TT
14833
14834
05ea2a05
TT
14835fi
14836
14837 LIBS=$save_LIBS
14838 fi
14839 fi
14840
14841 if test "$ac_cv_header_sys_procfs_h" = yes; then
14842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14843$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14844 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
e9bcb658
GB
14845 $as_echo_n "(cached) " >&6
14846else
14847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14848/* end confdefs.h. */
14849
05ea2a05
TT
14850#define _SYSCALL32
14851/* Needed for new procfs interface on sparc-solaris. */
14852#define _STRUCTURED_PROC 1
14853#include <sys/procfs.h>
e9bcb658
GB
14854int
14855main ()
14856{
05ea2a05 14857gregset_t avar
e9bcb658
GB
14858 ;
14859 return 0;
14860}
14861_ACEOF
14862if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14863 bfd_cv_have_sys_procfs_type_gregset_t=yes
e9bcb658 14864else
05ea2a05 14865 bfd_cv_have_sys_procfs_type_gregset_t=no
54019719
PA
14866
14867fi
05ea2a05 14868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 14869fi
06825bd1 14870
05ea2a05 14871 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
a3828db0 14872
05ea2a05 14873$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
06825bd1 14874
05ea2a05
TT
14875 fi
14876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14877$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14878
14879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14880$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14881 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14882 $as_echo_n "(cached) " >&6
bec39cab 14883else
81ecdfbb 14884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14885/* end confdefs.h. */
05ea2a05
TT
14886
14887#define _SYSCALL32
14888/* Needed for new procfs interface on sparc-solaris. */
14889#define _STRUCTURED_PROC 1
14890#include <sys/procfs.h>
bec39cab
AC
14891int
14892main ()
14893{
05ea2a05 14894fpregset_t avar
064ef605
DJ
14895 ;
14896 return 0;
14897}
14898_ACEOF
9b30624b 14899if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
14900 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14901else
14902 bfd_cv_have_sys_procfs_type_fpregset_t=no
14903
14904fi
14905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14906fi
14907
14908 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14909
14910$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14911
14912 fi
14913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14914$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14915
14916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14917$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14918 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14919 $as_echo_n "(cached) " >&6
064ef605 14920else
81ecdfbb 14921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 14922/* end confdefs.h. */
05ea2a05
TT
14923
14924#define _SYSCALL32
14925/* Needed for new procfs interface on sparc-solaris. */
14926#define _STRUCTURED_PROC 1
14927#include <sys/procfs.h>
064ef605
DJ
14928int
14929main ()
14930{
05ea2a05 14931prgregset_t avar
bec39cab
AC
14932 ;
14933 return 0;
14934}
14935_ACEOF
9b30624b 14936if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14937 bfd_cv_have_sys_procfs_type_prgregset_t=yes
70f9f479 14938else
05ea2a05
TT
14939 bfd_cv_have_sys_procfs_type_prgregset_t=no
14940
70f9f479 14941fi
81ecdfbb 14942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 14943fi
bec39cab 14944
05ea2a05 14945 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
70f9f479 14946
05ea2a05
TT
14947$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14948
14949 fi
14950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14951$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14952
14953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14954$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14955 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14956 $as_echo_n "(cached) " >&6
bec39cab 14957else
81ecdfbb 14958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 14959/* end confdefs.h. */
05ea2a05
TT
14960
14961#define _SYSCALL32
14962/* Needed for new procfs interface on sparc-solaris. */
14963#define _STRUCTURED_PROC 1
14964#include <sys/procfs.h>
064ef605
DJ
14965int
14966main ()
14967{
05ea2a05 14968prfpregset_t avar
064ef605
DJ
14969 ;
14970 return 0;
14971}
14972_ACEOF
9b30624b 14973if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14974 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
064ef605 14975else
05ea2a05 14976 bfd_cv_have_sys_procfs_type_prfpregset_t=no
064ef605 14977
5c7f2947 14978fi
81ecdfbb 14979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
05ea2a05
TT
14980fi
14981
14982 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14983
14984$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14985
14986 fi
14987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14988$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14989
14990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14991$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14992 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14993 $as_echo_n "(cached) " >&6
14994else
14995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14996/* end confdefs.h. */
05ea2a05
TT
14997
14998#define _SYSCALL32
14999/* Needed for new procfs interface on sparc-solaris. */
15000#define _STRUCTURED_PROC 1
15001#include <sys/procfs.h>
bec39cab
AC
15002int
15003main ()
15004{
05ea2a05 15005prgregset32_t avar
bec39cab
AC
15006 ;
15007 return 0;
15008}
15009_ACEOF
9b30624b 15010if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
15011 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15012else
15013 bfd_cv_have_sys_procfs_type_prgregset32_t=no
a3828db0 15014
064ef605 15015fi
81ecdfbb 15016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 15017fi
96d7229d 15018
05ea2a05 15019 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
78434e59 15020
05ea2a05 15021$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
78434e59 15022
05ea2a05
TT
15023 fi
15024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15025$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
54019719 15026
05ea2a05
TT
15027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
15028$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15029 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 15030 $as_echo_n "(cached) " >&6
bec39cab 15031else
81ecdfbb 15032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15033/* end confdefs.h. */
05ea2a05
TT
15034
15035#define _SYSCALL32
15036/* Needed for new procfs interface on sparc-solaris. */
15037#define _STRUCTURED_PROC 1
15038#include <sys/procfs.h>
bec39cab
AC
15039int
15040main ()
15041{
05ea2a05 15042lwpid_t avar
bec39cab
AC
15043 ;
15044 return 0;
15045}
15046_ACEOF
05ea2a05
TT
15047if ac_fn_c_try_compile "$LINENO"; then :
15048 bfd_cv_have_sys_procfs_type_lwpid_t=yes
c906108c 15049else
05ea2a05
TT
15050 bfd_cv_have_sys_procfs_type_lwpid_t=no
15051
c906108c 15052fi
05ea2a05 15053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15054fi
81ecdfbb 15055
05ea2a05 15056 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
a3828db0 15057
05ea2a05 15058$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
97bf5e38 15059
05ea2a05
TT
15060 fi
15061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15062$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
a3828db0 15063
05ea2a05
TT
15064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
15065$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15066 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 15067 $as_echo_n "(cached) " >&6
97bf5e38 15068else
81ecdfbb 15069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15070/* end confdefs.h. */
a3828db0 15071
05ea2a05
TT
15072#define _SYSCALL32
15073/* Needed for new procfs interface on sparc-solaris. */
15074#define _STRUCTURED_PROC 1
15075#include <sys/procfs.h>
bec39cab
AC
15076int
15077main ()
15078{
05ea2a05 15079psaddr_t avar
bec39cab
AC
15080 ;
15081 return 0;
15082}
15083_ACEOF
81ecdfbb 15084if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15085 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 15086else
05ea2a05
TT
15087 bfd_cv_have_sys_procfs_type_psaddr_t=no
15088
c906108c 15089fi
81ecdfbb 15090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 15091fi
c3f6f71d 15092
05ea2a05 15093 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
c906108c 15094
05ea2a05 15095$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
db1ff28b 15096
05ea2a05
TT
15097 fi
15098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15099$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15100
15101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
15102$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15103 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
db1ff28b
JK
15104 $as_echo_n "(cached) " >&6
15105else
15106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15107/* end confdefs.h. */
05ea2a05
TT
15108
15109#define _SYSCALL32
15110/* Needed for new procfs interface on sparc-solaris. */
15111#define _STRUCTURED_PROC 1
15112#include <sys/procfs.h>
db1ff28b
JK
15113int
15114main ()
15115{
05ea2a05 15116elf_fpregset_t avar
db1ff28b
JK
15117 ;
15118 return 0;
15119}
15120_ACEOF
15121if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15122 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
db1ff28b 15123else
05ea2a05
TT
15124 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15125
db1ff28b
JK
15126fi
15127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15128fi
db1ff28b 15129
05ea2a05 15130 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
db1ff28b 15131
05ea2a05 15132$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
db1ff28b 15133
05ea2a05
TT
15134 fi
15135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15136$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
db1ff28b 15137
05ea2a05
TT
15138 fi
15139
15140
15141# Check the return and argument types of ptrace.
15142
15143
15144for ac_header in sys/ptrace.h ptrace.h
15145do :
15146 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15147ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15148if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15149 cat >>confdefs.h <<_ACEOF
15150#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15151_ACEOF
db1ff28b
JK
15152
15153fi
15154
05ea2a05
TT
15155done
15156
81ecdfbb 15157
05ea2a05
TT
15158gdb_ptrace_headers='
15159#include <sys/types.h>
15160#if HAVE_SYS_PTRACE_H
15161# include <sys/ptrace.h>
15162#endif
15163#if HAVE_UNISTD_H
15164# include <unistd.h>
15165#endif
15166'
5c45e068 15167
05ea2a05
TT
15168# Check return type. Varargs (used on GNU/Linux) conflict with the
15169# empty argument list, so check for that explicitly.
15170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15171$as_echo_n "checking return type of ptrace... " >&6; }
15172if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 15173 $as_echo_n "(cached) " >&6
bec39cab 15174else
81ecdfbb 15175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15176/* end confdefs.h. */
05ea2a05 15177$gdb_ptrace_headers
bec39cab
AC
15178int
15179main ()
15180{
05ea2a05 15181extern long ptrace (enum __ptrace_request, ...);
bec39cab
AC
15182 ;
15183 return 0;
15184}
15185_ACEOF
81ecdfbb 15186if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15187 gdb_cv_func_ptrace_ret='long'
bec39cab 15188else
81ecdfbb 15189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15190/* end confdefs.h. */
05ea2a05 15191$gdb_ptrace_headers
bec39cab
AC
15192int
15193main ()
15194{
05ea2a05 15195extern int ptrace ();
bec39cab
AC
15196 ;
15197 return 0;
15198}
15199_ACEOF
81ecdfbb 15200if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15201 gdb_cv_func_ptrace_ret='int'
27ca5dad 15202else
05ea2a05 15203 gdb_cv_func_ptrace_ret='long'
27ca5dad 15204fi
81ecdfbb 15205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 15206fi
05ea2a05 15207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 15208fi
05ea2a05
TT
15209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15210$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
5c45e068
MK
15211
15212cat >>confdefs.h <<_ACEOF
05ea2a05 15213#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 15214_ACEOF
3862412b 15215
05ea2a05
TT
15216# Check argument types.
15217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15218$as_echo_n "checking types of arguments for ptrace... " >&6; }
15219if ${gdb_cv_func_ptrace_args+:} false; then :
15220 $as_echo_n "(cached) " >&6
15221else
5c45e068 15222
05ea2a05
TT
15223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15224/* end confdefs.h. */
15225$gdb_ptrace_headers
15226int
15227main ()
15228{
15229extern long ptrace (enum __ptrace_request, ...);
15230 ;
15231 return 0;
15232}
bec39cab 15233_ACEOF
05ea2a05
TT
15234if ac_fn_c_try_compile "$LINENO"; then :
15235 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15236else
15237
15238for gdb_arg1 in 'int' 'long'; do
15239 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15240 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15241 for gdb_arg4 in 'int' 'long' 'void *'; do
15242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15243/* end confdefs.h. */
15244$gdb_ptrace_headers
15245int
15246main ()
15247{
3862412b 15248
05ea2a05
TT
15249extern $gdb_cv_func_ptrace_ret
15250 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
5c45e068 15251
05ea2a05
TT
15252 ;
15253 return 0;
15254}
15255_ACEOF
15256if ac_fn_c_try_compile "$LINENO"; then :
15257 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15258 break 4;
97bf5e38 15259fi
05ea2a05
TT
15260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15261 for gdb_arg5 in 'int *' 'int' 'long'; do
15262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15263/* end confdefs.h. */
15264$gdb_ptrace_headers
15265int
15266main ()
15267{
3862412b 15268
05ea2a05
TT
15269extern $gdb_cv_func_ptrace_ret
15270 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
5c45e068 15271
05ea2a05
TT
15272 ;
15273 return 0;
15274}
6fea9e18 15275_ACEOF
05ea2a05 15276if ac_fn_c_try_compile "$LINENO"; then :
6fea9e18 15277
05ea2a05
TT
15278gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15279 break 5;
15280fi
15281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15282 done
15283 done
15284 done
15285 done
15286done
15287# Provide a safe default value.
15288: ${gdb_cv_func_ptrace_args='int,int,long,long'}
6fea9e18
L
15289
15290fi
05ea2a05
TT
15291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15292fi
15293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15294$as_echo "$gdb_cv_func_ptrace_args" >&6; }
15295ac_save_IFS=$IFS; IFS=','
15296set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15297IFS=$ac_save_IFS
15298shift
6fea9e18
L
15299
15300cat >>confdefs.h <<_ACEOF
05ea2a05 15301#define PTRACE_TYPE_ARG1 $1
6fea9e18
L
15302_ACEOF
15303
15304
05ea2a05
TT
15305cat >>confdefs.h <<_ACEOF
15306#define PTRACE_TYPE_ARG3 $3
bec39cab 15307_ACEOF
451928c5 15308
60ca704f 15309
05ea2a05
TT
15310cat >>confdefs.h <<_ACEOF
15311#define PTRACE_TYPE_ARG4 $4
15312_ACEOF
15313
15314if test -n "$5"; then
15315
15316cat >>confdefs.h <<_ACEOF
15317#define PTRACE_TYPE_ARG5 $5
15318_ACEOF
451928c5 15319
97bf5e38 15320fi
451928c5 15321
05ea2a05
TT
15322
15323if test "$cross_compiling" = no; then
15324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15325$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15326if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15327 $as_echo_n "(cached) " >&6
05ea2a05
TT
15328else
15329 if test "$cross_compiling" = yes; then :
15330 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
451928c5 15331else
81ecdfbb 15332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15333/* end confdefs.h. */
05ea2a05 15334$ac_includes_default
bec39cab
AC
15335int
15336main ()
15337{
05ea2a05
TT
15338/* If this system has a BSD-style setpgrp which takes arguments,
15339 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15340 exit successfully. */
15341 return setpgrp (1,1) != -1;
bec39cab
AC
15342 ;
15343 return 0;
15344}
15345_ACEOF
05ea2a05
TT
15346if ac_fn_c_try_run "$LINENO"; then :
15347 ac_cv_func_setpgrp_void=no
451928c5 15348else
05ea2a05 15349 ac_cv_func_setpgrp_void=yes
451928c5 15350fi
05ea2a05
TT
15351rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15352 conftest.$ac_objext conftest.beam conftest.$ac_ext
451928c5
AC
15353fi
15354
05ea2a05
TT
15355fi
15356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15357$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15358if test $ac_cv_func_setpgrp_void = yes; then
60ca704f 15359
05ea2a05 15360$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
451928c5 15361
97bf5e38 15362fi
451928c5 15363
05ea2a05
TT
15364else
15365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15366$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15367if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15368 $as_echo_n "(cached) " >&6
3862412b 15369else
81ecdfbb 15370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15371/* end confdefs.h. */
05ea2a05
TT
15372
15373#include <unistd.h>
15374
bec39cab
AC
15375int
15376main ()
15377{
05ea2a05
TT
15378
15379 if (setpgrp(1,1) == -1)
15380 exit (0);
15381 else
15382 exit (1);
15383
bec39cab
AC
15384 ;
15385 return 0;
15386}
15387_ACEOF
81ecdfbb 15388if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15389 ac_cv_func_setpgrp_void=no
3862412b 15390else
05ea2a05 15391 ac_cv_func_setpgrp_void=yes
3862412b 15392fi
81ecdfbb 15393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 15394fi
05ea2a05
TT
15395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15396$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15397if test "$ac_cv_func_setpgrp_void" = yes; then
15398 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
3862412b 15399
05ea2a05 15400fi
97bf5e38 15401fi
3862412b 15402
05ea2a05
TT
15403# Assume we'll default to using the included libiberty regex.
15404gdb_use_included_regex=yes
15405
15406# However, if the system regex is GNU regex, then default to *not*
15407# using the included regex.
15408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15409$as_echo_n "checking for GNU regex... " >&6; }
15410if ${gdb_cv_have_gnu_regex+:} false; then :
81ecdfbb 15411 $as_echo_n "(cached) " >&6
3862412b 15412else
81ecdfbb 15413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15414/* end confdefs.h. */
05ea2a05 15415#include <gnu-versions.h>
bec39cab
AC
15416int
15417main ()
15418{
05ea2a05
TT
15419#define REGEX_INTERFACE_VERSION 1
15420#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15421# error "Version mismatch"
15422#endif
bec39cab
AC
15423 ;
15424 return 0;
15425}
15426_ACEOF
81ecdfbb 15427if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15428 gdb_cv_have_gnu_regex=yes
3862412b 15429else
05ea2a05 15430 gdb_cv_have_gnu_regex=no
3862412b 15431fi
81ecdfbb 15432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 15433fi
05ea2a05
TT
15434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15435$as_echo "$gdb_cv_have_gnu_regex" >&6; }
15436if test "$gdb_cv_have_gnu_regex" = yes; then
15437 gdb_use_included_regex=no
15438fi
3862412b 15439
3862412b 15440
05ea2a05
TT
15441# Check whether --with-included-regex was given.
15442if test "${with_included_regex+set}" = set; then :
15443 withval=$with_included_regex; gdb_with_regex=$withval
15444else
15445 gdb_with_regex=$gdb_use_included_regex
97bf5e38 15446fi
3862412b 15447
05ea2a05 15448if test "$gdb_with_regex" = yes; then
6e9567fe 15449
05ea2a05 15450$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
6e9567fe
JB
15451
15452fi
15453
05ea2a05
TT
15454# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15455ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15456#include <sys/proc.h>
6e9567fe 15457
e6cdd38e 15458"
05ea2a05 15459if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
e6cdd38e
JB
15460
15461cat >>confdefs.h <<_ACEOF
05ea2a05 15462#define HAVE_STRUCT_THREAD_TD_PCB 1
e6cdd38e
JB
15463_ACEOF
15464
15465
15466fi
15467
6e9567fe 15468
05ea2a05
TT
15469# See if <sys/lwp.h> defines `struct lwp`.
15470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15471$as_echo_n "checking for struct lwp... " >&6; }
15472if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 15473 $as_echo_n "(cached) " >&6
596c9d4b 15474else
81ecdfbb 15475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15476/* end confdefs.h. */
05ea2a05
TT
15477#include <sys/param.h>
15478#define _KMEMUSER
15479#include <sys/lwp.h>
bec39cab
AC
15480int
15481main ()
15482{
05ea2a05 15483struct lwp l;
bec39cab
AC
15484 ;
15485 return 0;
15486}
15487_ACEOF
81ecdfbb 15488if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15489 gdb_cv_struct_lwp=yes
596c9d4b 15490else
05ea2a05 15491 gdb_cv_struct_lwp=no
596c9d4b 15492fi
81ecdfbb 15493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b 15494fi
05ea2a05
TT
15495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15496$as_echo "$gdb_cv_struct_lwp" >&6; }
15497if test "$gdb_cv_struct_lwp" = yes; then
596c9d4b 15498
05ea2a05 15499$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
596c9d4b 15500
05ea2a05 15501fi
451928c5 15502
05ea2a05
TT
15503# See if <machine/reg.h> degines `struct reg'.
15504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15505$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15506if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 15507 $as_echo_n "(cached) " >&6
d84dd0c5 15508else
81ecdfbb 15509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15510/* end confdefs.h. */
05ea2a05
TT
15511#include <sys/types.h>
15512#include <machine/reg.h>
bec39cab
AC
15513int
15514main ()
15515{
05ea2a05 15516struct reg r;
bec39cab
AC
15517 ;
15518 return 0;
15519}
15520_ACEOF
81ecdfbb 15521if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15522 gdb_cv_struct_reg=yes
d84dd0c5 15523else
05ea2a05 15524 gdb_cv_struct_reg=no
d84dd0c5 15525fi
81ecdfbb 15526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5 15527fi
05ea2a05
TT
15528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15529$as_echo "$gdb_cv_struct_reg" >&6; }
15530if test "$gdb_cv_struct_reg" = yes; then
d84dd0c5 15531
05ea2a05 15532$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
bec39cab 15533
05ea2a05 15534fi
d84dd0c5 15535
05ea2a05
TT
15536# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15537# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15538ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15539#include <machine/reg.h>
15540"
15541if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
d84dd0c5 15542
05ea2a05
TT
15543cat >>confdefs.h <<_ACEOF
15544#define HAVE_STRUCT_REG_R_FS 1
15545_ACEOF
15546
15547
15548fi
15549ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15550#include <machine/reg.h>
15551"
15552if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15553
15554cat >>confdefs.h <<_ACEOF
15555#define HAVE_STRUCT_REG_R_GS 1
15556_ACEOF
15557
15558
15559fi
15560
15561
05ea2a05
TT
15562# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15564$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15565if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 15566 $as_echo_n "(cached) " >&6
d45fe813 15567else
81ecdfbb 15568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15569/* end confdefs.h. */
05ea2a05 15570#include <sys/ptrace.h>
bec39cab
AC
15571int
15572main ()
15573{
05ea2a05 15574PTRACE_GETREGS;
bec39cab
AC
15575 ;
15576 return 0;
15577}
15578_ACEOF
81ecdfbb 15579if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15580 gdb_cv_have_ptrace_getregs=yes
d45fe813 15581else
05ea2a05 15582 gdb_cv_have_ptrace_getregs=no
d45fe813 15583fi
81ecdfbb 15584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15585fi
15586
05ea2a05
TT
15587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15588$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15589if test "$gdb_cv_have_ptrace_getregs" = yes; then
bec39cab 15590
05ea2a05 15591$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
d45fe813 15592
05ea2a05 15593fi
d45fe813 15594
05ea2a05
TT
15595# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15597$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15598if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 15599 $as_echo_n "(cached) " >&6
d45fe813 15600else
81ecdfbb 15601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15602/* end confdefs.h. */
05ea2a05 15603#include <sys/ptrace.h>
bec39cab
AC
15604int
15605main ()
15606{
05ea2a05 15607PTRACE_GETFPXREGS;
bec39cab
AC
15608 ;
15609 return 0;
15610}
15611_ACEOF
81ecdfbb 15612if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15613 gdb_cv_have_ptrace_getfpxregs=yes
d45fe813 15614else
05ea2a05 15615 gdb_cv_have_ptrace_getfpxregs=no
d45fe813 15616fi
81ecdfbb 15617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15618fi
15619
05ea2a05
TT
15620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15621$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15622if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
bec39cab 15623
05ea2a05 15624$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
d45fe813 15625
05ea2a05 15626fi
d45fe813 15627
05ea2a05
TT
15628# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15630$as_echo_n "checking for PT_GETDBREGS... " >&6; }
15631if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 15632 $as_echo_n "(cached) " >&6
d45fe813 15633else
81ecdfbb 15634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15635/* end confdefs.h. */
05ea2a05
TT
15636#include <sys/types.h>
15637#include <sys/ptrace.h>
bec39cab
AC
15638int
15639main ()
15640{
05ea2a05 15641PT_GETDBREGS;
bec39cab
AC
15642 ;
15643 return 0;
15644}
15645_ACEOF
81ecdfbb 15646if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15647 gdb_cv_have_pt_getdbregs=yes
d45fe813 15648else
05ea2a05 15649 gdb_cv_have_pt_getdbregs=no
d45fe813 15650fi
81ecdfbb 15651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15652fi
15653
05ea2a05
TT
15654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15655$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15656if test "$gdb_cv_have_pt_getdbregs" = yes; then
bec39cab 15657
05ea2a05 15658$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
d45fe813 15659
05ea2a05 15660fi
c906108c 15661
05ea2a05
TT
15662# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15664$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15665if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 15666 $as_echo_n "(cached) " >&6
c906108c 15667else
81ecdfbb 15668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15669/* end confdefs.h. */
05ea2a05
TT
15670#include <sys/types.h>
15671#include <sys/ptrace.h>
bec39cab
AC
15672int
15673main ()
15674{
05ea2a05 15675PT_GETXMMREGS;
bec39cab
AC
15676 ;
15677 return 0;
15678}
15679_ACEOF
81ecdfbb 15680if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15681 gdb_cv_have_pt_getxmmregs=yes
c906108c 15682else
05ea2a05 15683 gdb_cv_have_pt_getxmmregs=no
c906108c 15684fi
81ecdfbb 15685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15686fi
15687
05ea2a05
TT
15688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15689$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15690if test "$gdb_cv_have_pt_getxmmregs" = yes; then
bec39cab 15691
05ea2a05 15692$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
c906108c 15693
05ea2a05 15694fi
c906108c 15695
05ea2a05
TT
15696# See if <sys/ptrace.h> supports LWP names on FreeBSD
15697# Older FreeBSD versions don't have the pl_tdname member of
15698# `struct ptrace_lwpinfo'.
15699ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15700"
15701if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
43b7e92b 15702
05ea2a05
TT
15703cat >>confdefs.h <<_ACEOF
15704#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
43b7e92b 15705_ACEOF
43b7e92b 15706
05ea2a05 15707
43b7e92b
GB
15708fi
15709
43b7e92b 15710
05ea2a05
TT
15711# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15712# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15713# FreeBSD 10.3.
15714ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
15715"
15716if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15717
15718cat >>confdefs.h <<_ACEOF
15719#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15720_ACEOF
43b7e92b 15721
43b7e92b 15722
c906108c 15723fi
c906108c 15724
05ea2a05 15725
bc8bcb4b 15726# Check if the compiler supports the `long long' type.
c906108c 15727
81ecdfbb
RW
15728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15729$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 15730if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 15731 $as_echo_n "(cached) " >&6
97bf5e38 15732else
81ecdfbb 15733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15734/* end confdefs.h. */
bc8bcb4b 15735extern long long foo;
bec39cab
AC
15736int
15737main ()
15738{
bc8bcb4b 15739switch (foo & 2) { case 0: return 1; }
bec39cab
AC
15740 ;
15741 return 0;
15742}
15743_ACEOF
81ecdfbb 15744if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15745 gdb_cv_c_long_long=yes
15746else
81ecdfbb 15747 gdb_cv_c_long_long=no
97bf5e38 15748fi
81ecdfbb 15749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15750fi
81ecdfbb
RW
15751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15752$as_echo "$gdb_cv_c_long_long" >&6; }
0ad6b8ee 15753if test "$gdb_cv_c_long_long" != yes; then
74a0d9f6 15754 # libdecnumber requires long long.
d0ac1c44 15755 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
15756fi
15757
bc8bcb4b 15758# Check if the compiler and runtime support printing long longs.
97bf5e38 15759
81ecdfbb
RW
15760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15761$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 15762if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 15763 $as_echo_n "(cached) " >&6
97bf5e38 15764else
81ecdfbb 15765 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15766 gdb_cv_printf_has_long_long=no
15767else
81ecdfbb 15768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15769/* end confdefs.h. */
bc8bcb4b
MK
15770$ac_includes_default
15771int
15772main ()
15773{
15774char buf[32];
97bf5e38
MK
15775 long long l = 0;
15776 l = (l << 16) + 0x0123;
15777 l = (l << 16) + 0x4567;
15778 l = (l << 16) + 0x89ab;
15779 l = (l << 16) + 0xcdef;
15780 sprintf (buf, "0x%016llx", l);
15781 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
15782 ;
15783 return 0;
c906108c 15784}
bec39cab 15785_ACEOF
81ecdfbb 15786if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15787 gdb_cv_printf_has_long_long=yes
15788else
81ecdfbb 15789 gdb_cv_printf_has_long_long=no
97bf5e38 15790fi
81ecdfbb
RW
15791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15792 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15793fi
81ecdfbb 15794
97bf5e38 15795fi
81ecdfbb
RW
15796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15797$as_echo "$gdb_cv_printf_has_long_long" >&6; }
0ad6b8ee 15798if test "$gdb_cv_printf_has_long_long" = yes; then
bc8bcb4b 15799
81ecdfbb 15800$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
15801
15802fi
97bf5e38 15803
1a619819
LM
15804# Check if the compiler and runtime support printing decfloats.
15805
81ecdfbb
RW
15806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15807$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 15808if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 15809 $as_echo_n "(cached) " >&6
1a619819 15810else
81ecdfbb 15811 if test "$cross_compiling" = yes; then :
1a619819
LM
15812 gdb_cv_printf_has_decfloat=no
15813else
81ecdfbb 15814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
15815/* end confdefs.h. */
15816$ac_includes_default
15817int
15818main ()
15819{
15820char buf[64];
15821 _Decimal32 d32 = 1.2345df;
15822 _Decimal64 d64 = 1.2345dd;
15823 _Decimal128 d128 = 1.2345dl;
15824 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15825 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15826 ;
15827 return 0;
15828}
15829_ACEOF
81ecdfbb 15830if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
15831 gdb_cv_printf_has_decfloat=yes
15832else
81ecdfbb 15833 gdb_cv_printf_has_decfloat=no
1a619819 15834fi
81ecdfbb
RW
15835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15836 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 15837fi
81ecdfbb 15838
1a619819 15839fi
81ecdfbb
RW
15840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15841$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
0ad6b8ee 15842if test "$gdb_cv_printf_has_decfloat" = yes; then
1a619819 15843
81ecdfbb 15844$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
15845
15846fi
15847
bc8bcb4b
MK
15848# Check if the compiler supports the `long double' type. We can't use
15849# AC_C_LONG_DOUBLE because that one does additional checks on the
15850# constants defined in <float.h> that fail on some systems,
15851# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 15852
81ecdfbb
RW
15853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15854$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 15855if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 15856 $as_echo_n "(cached) " >&6
97bf5e38 15857else
81ecdfbb 15858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15859/* end confdefs.h. */
97bf5e38 15860long double foo;
bec39cab 15861_ACEOF
81ecdfbb 15862if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 15863 gdb_cv_c_long_double=yes
97bf5e38 15864else
81ecdfbb 15865 gdb_cv_c_long_double=no
97bf5e38 15866fi
81ecdfbb 15867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15868fi
81ecdfbb
RW
15869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15870$as_echo "$gdb_cv_c_long_double" >&6; }
0ad6b8ee 15871if test "$gdb_cv_c_long_double" = yes; then
c906108c 15872
81ecdfbb 15873$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15874
15875fi
15876
bc8bcb4b 15877# Check if the compiler and runtime support printing long doubles.
97bf5e38 15878
81ecdfbb
RW
15879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15880$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 15881if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 15882 $as_echo_n "(cached) " >&6
97bf5e38 15883else
81ecdfbb 15884 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15885 gdb_cv_printf_has_long_double=no
15886else
81ecdfbb 15887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15888/* end confdefs.h. */
bc8bcb4b
MK
15889$ac_includes_default
15890int
15891main ()
15892{
15893char buf[16];
97bf5e38
MK
15894 long double f = 3.141592653;
15895 sprintf (buf, "%Lg", f);
15896 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
15897 ;
15898 return 0;
97bf5e38 15899}
bec39cab 15900_ACEOF
81ecdfbb 15901if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 15902 gdb_cv_printf_has_long_double=yes
c906108c 15903else
81ecdfbb 15904 gdb_cv_printf_has_long_double=no
c906108c 15905fi
81ecdfbb
RW
15906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15907 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 15908fi
81ecdfbb 15909
c906108c 15910fi
81ecdfbb
RW
15911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15912$as_echo "$gdb_cv_printf_has_long_double" >&6; }
0ad6b8ee 15913if test "$gdb_cv_printf_has_long_double" = yes; then
bc8bcb4b 15914
81ecdfbb 15915$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15916
15917fi
97bf5e38 15918
bc8bcb4b 15919# Check if the compiler and runtime support scanning long doubles.
97bf5e38 15920
81ecdfbb
RW
15921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15922$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 15923if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 15924 $as_echo_n "(cached) " >&6
97bf5e38 15925else
81ecdfbb 15926 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15927 gdb_cv_scanf_has_long_double=no
15928else
81ecdfbb 15929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15930/* end confdefs.h. */
bc8bcb4b
MK
15931#include <stdio.h>
15932int
15933main ()
15934{
15935char *buf = "3.141592653";
97bf5e38
MK
15936 long double f = 0;
15937 sscanf (buf, "%Lg", &f);
15938 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
15939 ;
15940 return 0;
97bf5e38 15941}
bec39cab 15942_ACEOF
81ecdfbb 15943if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15944 gdb_cv_scanf_has_long_double=yes
15945else
81ecdfbb 15946 gdb_cv_scanf_has_long_double=no
97bf5e38 15947fi
81ecdfbb
RW
15948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15949 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15950fi
81ecdfbb 15951
c906108c 15952fi
81ecdfbb
RW
15953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15954$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
0ad6b8ee 15955if test "$gdb_cv_scanf_has_long_double" = yes; then
bc8bcb4b 15956
81ecdfbb 15957$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15958
15959fi
c906108c 15960
438013df
AO
15961case ${host_os} in
15962aix*)
81ecdfbb
RW
15963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15964$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 15965if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 15966 $as_echo_n "(cached) " >&6
438013df 15967else
bec39cab 15968
438013df
AO
15969 SAVE_LDFLAGS=$LDFLAGS
15970
15971 case $GCC in
15972 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15973 *) gdb_cv_bigtoc=-bbigtoc ;;
15974 esac
15975
15976 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 15977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15978/* end confdefs.h. */
438013df 15979
bec39cab
AC
15980int
15981main ()
15982{
438013df 15983int i;
bec39cab
AC
15984 ;
15985 return 0;
15986}
15987_ACEOF
81ecdfbb 15988if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15989
81ecdfbb
RW
15990else
15991 gdb_cv_bigtoc=
438013df 15992fi
81ecdfbb
RW
15993rm -f core conftest.err conftest.$ac_objext \
15994 conftest$ac_exeext conftest.$ac_ext
ec76baa5 15995 LDFLAGS="${SAVE_LDFLAGS}"
438013df 15996
bec39cab 15997fi
81ecdfbb
RW
15998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15999$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
16000 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16001 ;;
16002esac
16003
38f6b338 16004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 16005$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
16006dynamic_list=false
16007if test "${gdb_native}" = yes; then
16008 # The dynamically loaded libthread_db needs access to symbols in the gdb
16009 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
16010 # may not be supported there.
16011 old_LDFLAGS="$LDFLAGS"
16012 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16013 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16014 LDFLAGS="$LDFLAGS $RDYNAMIC"
16015 if test "${have_libpython}" = no; then
16016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
16017/* end confdefs.h. */
16018
16019int
16020main ()
16021{
16022
16023 ;
16024 return 0;
16025}
16026_ACEOF
16027if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
16028 dynamic_list=true
16029fi
16030rm -f core conftest.err conftest.$ac_objext \
16031 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
16032 else
16033 # Workaround http://bugs.python.org/issue4434 where static
16034 # libpythonX.Y.a would get its symbols required for
16035 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16036 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
16037
16038 # Note the workaround for Python
16039 # http://bugs.python.org/issue10112 earlier has removed
16040 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16041 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16042 # always pass.
38f6b338
JK
16043 old_CFLAGS="$CFLAGS"
16044 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
16045 old_LIBS="$LIBS"
16046 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
16047 old_CPPFLAGS="$CPPFLAGS"
16048 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 16049 if test "$cross_compiling" = yes; then :
3bebe2f2 16050 true
f6528abd 16051else
3bebe2f2
JK
16052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16053/* end confdefs.h. */
1b4f615e 16054#include "Python.h"
3bebe2f2
JK
16055int
16056main ()
16057{
16058int err;
38f6b338
JK
16059 Py_Initialize ();
16060 err = PyRun_SimpleString ("import itertools\n");
16061 Py_Finalize ();
16062 return err == 0 ? 0 : 1;
3bebe2f2
JK
16063 ;
16064 return 0;
16065}
16066_ACEOF
16067if ac_fn_c_try_run "$LINENO"; then :
16068 dynamic_list=true
16069fi
16070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16071 conftest.$ac_objext conftest.beam conftest.$ac_ext
16072fi
16073
8c1fb155 16074 LIBS="$old_LIBS"
38f6b338 16075 CFLAGS="$old_CFLAGS"
1b4f615e 16076 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
16077 fi
16078 LDFLAGS="$old_LDFLAGS"
16079fi
16080if $dynamic_list; then
16081 found="-Wl,--dynamic-list"
16082 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 16083else
38f6b338
JK
16084 found="-rdynamic"
16085 RDYNAMIC="-rdynamic"
f6528abd 16086fi
f6528abd 16087
38f6b338 16088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 16089$as_echo "$found" >&6; }
0407b3f1 16090
f6528abd 16091
0ad6b8ee 16092if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
c906108c 16093 case ${host_os} in
d92419e5 16094 aix*)
81ecdfbb
RW
16095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16096$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 16097 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 16098 $as_echo_n "(cached) " >&6
bec39cab 16099else
81ecdfbb 16100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16101/* end confdefs.h. */
d92419e5 16102#include <sys/pthdebug.h>
bec39cab
AC
16103int
16104main ()
16105{
d92419e5
JB
16106#ifndef PTHDB_VERSION_3
16107 #error
16108 #endif
bec39cab
AC
16109 ;
16110 return 0;
16111}
16112_ACEOF
81ecdfbb 16113if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
16114 gdb_cv_have_aix_thread_debug=yes
16115else
81ecdfbb 16116 gdb_cv_have_aix_thread_debug=no
d92419e5 16117fi
81ecdfbb 16118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
16119fi
16120
81ecdfbb
RW
16121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16122$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
0ad6b8ee 16123 if test "$gdb_cv_have_aix_thread_debug" = yes; then
d92419e5 16124 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 16125 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 16126 LIBS="$LIBS -lpthdebug"
d645e32e
JB
16127
16128 # Older versions of AIX do not provide the declaration for
16129 # the getthrds function (it appears that it was introduced
16130 # with AIX 6.x).
16131 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16132"
d0ac1c44 16133if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
16134 ac_have_decl=1
16135else
16136 ac_have_decl=0
16137fi
16138
16139cat >>confdefs.h <<_ACEOF
16140#define HAVE_DECL_GETTHRDS $ac_have_decl
16141_ACEOF
16142
d92419e5
JB
16143 fi
16144 ;;
c906108c 16145 esac
bec39cab 16146
c906108c
SS
16147fi
16148
3f47be5c 16149if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
16150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
16151$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 16152if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 16153 $as_echo_n "(cached) " >&6
bec39cab 16154else
81ecdfbb 16155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16156/* end confdefs.h. */
3f47be5c 16157#include <thread_db.h>
bec39cab
AC
16158int
16159main ()
16160{
3f47be5c 16161int i = TD_NOTALLOC;
bec39cab
AC
16162 ;
16163 return 0;
16164}
16165_ACEOF
81ecdfbb 16166if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
16167 gdb_cv_thread_db_h_has_td_notalloc=yes
16168else
81ecdfbb 16169 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 16170
3f47be5c 16171fi
81ecdfbb 16172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 16173
bec39cab 16174fi
81ecdfbb
RW
16175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16176$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16178$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 16179if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 16180 $as_echo_n "(cached) " >&6
59f80f10 16181else
81ecdfbb 16182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16183/* end confdefs.h. */
16184#include <thread_db.h>
16185int
16186main ()
16187{
16188int i = TD_VERSION;
16189 ;
16190 return 0;
16191}
16192_ACEOF
81ecdfbb 16193if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16194 gdb_cv_thread_db_h_has_td_version=yes
16195else
81ecdfbb 16196 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
16197
16198fi
81ecdfbb 16199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16200
16201fi
81ecdfbb
RW
16202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16203$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16205$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 16206if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 16207 $as_echo_n "(cached) " >&6
59f80f10 16208else
81ecdfbb 16209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16210/* end confdefs.h. */
16211#include <thread_db.h>
16212int
16213main ()
16214{
16215int i = TD_NOTLS;
16216 ;
16217 return 0;
16218}
16219_ACEOF
81ecdfbb 16220if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16221 gdb_cv_thread_db_h_has_td_notls=yes
16222else
81ecdfbb 16223 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
16224
16225fi
81ecdfbb 16226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16227
16228fi
81ecdfbb
RW
16229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16230$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
16231fi
16232if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 16233
81ecdfbb 16234$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 16235
59f80f10
DJ
16236fi
16237if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16238
81ecdfbb 16239$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
16240
16241fi
16242if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16243
81ecdfbb 16244$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 16245
3f47be5c
EZ
16246fi
16247
e655c1a2
PA
16248case $host_os in
16249 go32* | *djgpp*)
16250 gdbinit=gdb.ini
16251 ;;
16252 *)
16253 gdbinit=.gdbinit
16254 ;;
16255esac
16256
16257cat >>confdefs.h <<_ACEOF
16258#define GDBINIT "$gdbinit"
16259_ACEOF
16260
16261
fb40c209 16262
f83d8a90
DE
16263# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16264# except that the argument to --with-sysroot is optional.
16265# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16266if test "x$with_sysroot" = xyes; then
16267 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16268fi
bec39cab 16269
81ecdfbb
RW
16270# Check whether --with-sysroot was given.
16271if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
16272 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16273else
16274 TARGET_SYSTEM_ROOT=
16275fi
030292b7 16276
030292b7 16277
f83d8a90
DE
16278 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16279 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16280 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16281 ac_define_dir=`eval echo $ac_define_dir`
030292b7 16282
f83d8a90
DE
16283cat >>confdefs.h <<_ACEOF
16284#define TARGET_SYSTEM_ROOT "$ac_define_dir"
16285_ACEOF
bec39cab 16286
030292b7 16287
b14b1491 16288
f83d8a90
DE
16289
16290 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16291 if test "x$prefix" = xNONE; then
16292 test_prefix=/usr/local
16293 else
16294 test_prefix=$prefix
16295 fi
16296 else
16297 test_prefix=$exec_prefix
16298 fi
16299 value=0
16300 case ${ac_define_dir} in
16301 "${test_prefix}"|"${test_prefix}/"*|\
16302 '${exec_prefix}'|'${exec_prefix}/'*)
16303 value=1
16304 ;;
16305 esac
16306
16307cat >>confdefs.h <<_ACEOF
16308#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16309_ACEOF
030292b7
DJ
16310
16311
16312
16e7150e 16313
16e7150e 16314
81ecdfbb
RW
16315# Check whether --with-system-gdbinit was given.
16316if test "${with_system_gdbinit+set}" = set; then :
16317 withval=$with_system_gdbinit;
b14b1491
TT
16318 SYSTEM_GDBINIT=$withval
16319else
16320 SYSTEM_GDBINIT=
81ecdfbb
RW
16321fi
16322
16e7150e
JG
16323
16324 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16325 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 16326 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
16327 ac_define_dir=`eval echo $ac_define_dir`
16328
16329cat >>confdefs.h <<_ACEOF
16330#define SYSTEM_GDBINIT "$ac_define_dir"
16331_ACEOF
16332
16333
16334
0c4a4063 16335
b14b1491
TT
16336 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16337 if test "x$prefix" = xNONE; then
16338 test_prefix=/usr/local
16339 else
16340 test_prefix=$prefix
16341 fi
16342 else
16343 test_prefix=$exec_prefix
16344 fi
16345 value=0
16346 case ${ac_define_dir} in
16347 "${test_prefix}"|"${test_prefix}/"*|\
16348 '${exec_prefix}'|'${exec_prefix}/'*)
16349 value=1
16350 ;;
16351 esac
16e7150e 16352
b14b1491
TT
16353cat >>confdefs.h <<_ACEOF
16354#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
16355_ACEOF
16356
b14b1491 16357
16e7150e 16358
0c4a4063 16359
b835bb52 16360
ed2a2229
CB
16361# Check whether --with-system-gdbinit-dir was given.
16362if test "${with_system_gdbinit_dir+set}" = set; then :
16363 withval=$with_system_gdbinit_dir;
16364 SYSTEM_GDBINIT_DIR=$withval
16365else
16366 SYSTEM_GDBINIT_DIR=
16367fi
16368
16369
16370 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16371 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16372 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16373 ac_define_dir=`eval echo $ac_define_dir`
16374
16375cat >>confdefs.h <<_ACEOF
16376#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16377_ACEOF
16378
16379
16380
16381
16382 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16383 if test "x$prefix" = xNONE; then
16384 test_prefix=/usr/local
16385 else
16386 test_prefix=$prefix
16387 fi
16388 else
16389 test_prefix=$exec_prefix
16390 fi
16391 value=0
16392 case ${ac_define_dir} in
16393 "${test_prefix}"|"${test_prefix}/"*|\
16394 '${exec_prefix}'|'${exec_prefix}/'*)
16395 value=1
16396 ;;
16397 esac
16398
16399cat >>confdefs.h <<_ACEOF
16400#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16401_ACEOF
16402
16403
16404
16405
16406
81ecdfbb
RW
16407# Check whether --enable-werror was given.
16408if test "${enable_werror+set}" = set; then :
16409 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
16410 yes | y) ERROR_ON_WARNING="yes" ;;
16411 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 16412 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 16413 esac
81ecdfbb
RW
16414fi
16415
094a342e 16416
9a084706
PA
16417# Enable -Werror by default when using gcc. Turn it off for releases.
16418if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
16419 ERROR_ON_WARNING=yes
16420fi
16421
16422WERROR_CFLAGS=""
16423if test "${ERROR_ON_WARNING}" = yes ; then
16424 WERROR_CFLAGS="-Werror"
16425fi
16426
cf6de44d 16427# The options we'll try to enable.
aac331e4 16428build_warnings="-Wall -Wpointer-arith \
a0de763e 16429-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 16430-Wno-switch -Wno-char-subscripts \
cf6de44d 16431-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 16432-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 16433-Wno-mismatched-tags \
632e107b 16434-Wno-error=deprecated-register \
85e26832 16435-Wsuggest-override \
1a34f210 16436-Wimplicit-fallthrough=3 \
96643e35 16437-Wduplicated-cond \
33a6bc35
TT
16438-Wshadow=local \
16439-Wdeprecated-copy \
16440-Wdeprecated-copy-dtor \
bb564c58 16441-Wredundant-move \
8ddd8e0e 16442-Wmissing-declarations \
a0761e34 16443-Wmissing-prototypes \
898e7f60
SM
16444-Wstrict-null-sentinel \
16445"
3bc3d82a 16446
3526781e 16447case "${host}" in
4fa7574e
RO
16448 *-*-mingw32*)
16449 # Enable -Wno-format by default when using gcc on mingw since many
16450 # GCC versions complain about %I64.
16451 build_warnings="$build_warnings -Wno-format" ;;
16452 *-*-solaris*)
16453 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16454 # doesn't understand.
16455 build_warnings="$build_warnings -Wno-unknown-pragmas"
16456 # Solaris 11 <unistd.h> marks vfork deprecated.
16457 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
16458 *)
16459 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16460 # but there's a special case for this below.
16461 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
16462esac
16463
81ecdfbb
RW
16464# Check whether --enable-build-warnings was given.
16465if test "${enable_build_warnings+set}" = set; then :
16466 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
16467 yes) ;;
16468 no) build_warnings="-w";;
16469 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16470 build_warnings="${build_warnings} ${t}";;
16471 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16472 build_warnings="${t} ${build_warnings}";;
16473 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16474esac
d4f3574e 16475if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 16476 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 16477fi
81ecdfbb
RW
16478fi
16479# Check whether --enable-gdb-build-warnings was given.
16480if test "${enable_gdb_build_warnings+set}" = set; then :
16481 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
16482 yes) ;;
16483 no) build_warnings="-w";;
16484 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16485 build_warnings="${build_warnings} ${t}";;
16486 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16487 build_warnings="${t} ${build_warnings}";;
16488 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16489esac
16490if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16491 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16492fi
81ecdfbb 16493fi
3bc3d82a
PA
16494
16495# The set of warnings supported by a C++ compiler is not the same as
16496# of the C compiler.
cf6de44d 16497ac_ext=cpp
3bc3d82a
PA
16498ac_cpp='$CXXCPP $CPPFLAGS'
16499ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16500ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16501ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16502
3bc3d82a 16503
81ecdfbb 16504WARN_CFLAGS=""
c906108c
SS
16505if test "x${build_warnings}" != x -a "x$GCC" = xyes
16506then
81ecdfbb
RW
16507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16508$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
16509 # Separate out the -Werror flag as some files just cannot be
16510 # compiled with it enabled.
16511 for w in ${build_warnings}; do
7544db95
PA
16512 # GCC does not complain about -Wno-unknown-warning. Invert
16513 # and test -Wunknown-warning instead.
16514 case $w in
16515 -Wno-*)
16516 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
16517 -Wformat-nonliteral)
16518 # gcc requires -Wformat before -Wformat-nonliteral
16519 # will work, so stick them together.
16520 w="-Wformat $w"
16521 wtest="$w"
16522 ;;
7544db95
PA
16523 *)
16524 wtest=$w ;;
16525 esac
16526
746a987d
AC
16527 case $w in
16528 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
16529 *)
16530 # Check whether GCC accepts it.
4536bbc6 16531 saved_CFLAGS="$CFLAGS"
3e019bdc 16532 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 16533 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 16534 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
16535 if test "x$w" = "x-Wunused-variable"; then
16536 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16537 # fixed in GCC 4.9. This test is derived from the gdb
16538 # source code that triggered this bug in GCC.
16539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16540/* end confdefs.h. */
16541struct scoped_restore_base {};
16542 struct scoped_restore_tmpl : public scoped_restore_base {
16543 ~scoped_restore_tmpl() {}
16544 };
16545int
16546main ()
16547{
16548const scoped_restore_base &b = scoped_restore_tmpl();
16549 ;
16550 return 0;
16551}
16552_ACEOF
16553if ac_fn_cxx_try_compile "$LINENO"; then :
16554 WARN_CFLAGS="${WARN_CFLAGS} $w"
16555fi
16556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16557 else
16558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16559/* end confdefs.h. */
4536bbc6 16560
bec39cab
AC
16561int
16562main ()
16563{
4536bbc6 16564
bec39cab
AC
16565 ;
16566 return 0;
16567}
16568_ACEOF
3bc3d82a 16569if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 16570 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 16571fi
81ecdfbb 16572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 16573 fi
4536bbc6 16574 CFLAGS="$saved_CFLAGS"
3bc3d82a 16575 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
16576 esac
16577 done
81ecdfbb
RW
16578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16579$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
16580fi
16581
16582
104c1213 16583
cf6de44d 16584ac_ext=c
3bc3d82a
PA
16585ac_cpp='$CPP $CPPFLAGS'
16586ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16587ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16588ac_compiler_gnu=$ac_cv_c_compiler_gnu
16589
3bc3d82a 16590
b835bb52 16591
f35d5ade
TT
16592# Check whether --enable-ubsan was given.
16593if test "${enable_ubsan+set}" = set; then :
16594 enableval=$enable_ubsan;
16595else
eff98030 16596 enable_ubsan=no
f35d5ade
TT
16597fi
16598
16599if test "x$enable_ubsan" = xauto; then
16600 if $development; then
16601 enable_ubsan=yes
16602 fi
16603fi
16604ac_ext=cpp
16605ac_cpp='$CXXCPP $CPPFLAGS'
16606ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16607ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16608ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16609
16610if test "x$enable_ubsan" = xyes; then
16611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16612$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16613 saved_CXXFLAGS="$CXXFLAGS"
16614 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16616/* end confdefs.h. */
16617
16618int
16619main ()
16620{
16621
16622 ;
16623 return 0;
16624}
16625_ACEOF
16626if ac_fn_cxx_try_link "$LINENO"; then :
16627 enable_ubsan=yes
16628else
16629 enable_ubsan=no
16630fi
16631rm -f core conftest.err conftest.$ac_objext \
16632 conftest$ac_exeext conftest.$ac_ext
16633 CXXFLAGS="$saved_CXXFLAGS"
16634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16635$as_echo "$enable_ubsan" >&6; }
16636 if test "x$enable_ubsan" = xyes; then
16637 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16638 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16639 fi
16640fi
16641ac_ext=c
16642ac_cpp='$CPP $CPPFLAGS'
16643ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16644ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16645ac_compiler_gnu=$ac_cv_c_compiler_gnu
16646
16647
16648
7a292a7a 16649# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
16650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16651$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 16652if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 16653 $as_echo_n "(cached) " >&6
bec39cab 16654else
81ecdfbb 16655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16656/* end confdefs.h. */
7a292a7a
SS
16657
16658#if defined (__CYGWIN__) || defined (__CYGWIN32__)
16659lose
16660#endif
bec39cab 16661_ACEOF
7a292a7a 16662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 16663 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
16664 gdb_cv_os_cygwin=yes
16665else
7a292a7a
SS
16666 gdb_cv_os_cygwin=no
16667fi
16668rm -f conftest*
16669
16670fi
81ecdfbb
RW
16671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16672$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 16673
aff38e61 16674
3eb25fda 16675SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 16676case ${host} in
95cbc983
AC
16677 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16678 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 16679 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 16680 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
16681esac
16682
16683
cd0fc7c3
SS
16684# libreadline needs libuser32.a in a cygwin environment
16685WIN32LIBS=
0ad6b8ee 16686if test x"$gdb_cv_os_cygwin" = xyes; then
c5394b80
JM
16687 WIN32LIBS="-luser32"
16688 case "${target}" in
16689 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16690 ;;
16691 esac
cd0fc7c3 16692fi
c906108c 16693
b4505029 16694# The ser-tcp.c module requires sockets.
b2ceabe8
TT
16695# Note that WIN32APILIBS is set by GDB_AC_COMMON.
16696WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
7a292a7a 16697
31d99776 16698# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
16699
16700 OLD_CFLAGS=$CFLAGS
16701 OLD_LDFLAGS=$LDFLAGS
16702 OLD_LIBS=$LIBS
16703 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16704 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16705 # always want our bfd.
16706 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16707 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16708 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 16709 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16710 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 16711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 16712$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 16713if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 16714 $as_echo_n "(cached) " >&6
31d99776 16715else
81ecdfbb 16716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
16717/* end confdefs.h. */
16718#include <stdlib.h>
def63ff0
TT
16719 #include "bfd.h"
16720 #include "elf-bfd.h"
31d99776
DJ
16721
16722int
16723main ()
16724{
def63ff0 16725return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
16726 ;
16727 return 0;
16728}
16729_ACEOF
81ecdfbb 16730if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
16731 gdb_cv_var_elf=yes
16732else
81ecdfbb 16733 gdb_cv_var_elf=no
31d99776 16734fi
81ecdfbb
RW
16735rm -f core conftest.err conftest.$ac_objext \
16736 conftest$ac_exeext conftest.$ac_ext
31d99776 16737fi
81ecdfbb
RW
16738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16739$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
16740 CFLAGS=$OLD_CFLAGS
16741 LDFLAGS=$OLD_LDFLAGS
16742 LIBS=$OLD_LIBS
0ad6b8ee 16743if test "$gdb_cv_var_elf" = yes; then
d4777acb 16744 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 16745
81ecdfbb 16746$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 16747
075ff26d
JK
16748 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16749 if test "$plugins" = "yes"; then
a48b32c0
L
16750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16751$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 16752if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16753 $as_echo_n "(cached) " >&6
16754else
16755 ac_func_search_save_LIBS=$LIBS
16756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16757/* end confdefs.h. */
16758
16759/* Override any GCC internal prototype to avoid an error.
16760 Use char because int might match the return type of a GCC
16761 builtin and then its argument prototype would still apply. */
16762#ifdef __cplusplus
16763extern "C"
16764#endif
16765char dlopen ();
16766int
16767main ()
16768{
16769return dlopen ();
16770 ;
16771 return 0;
16772}
16773_ACEOF
16774for ac_lib in '' dl; do
16775 if test -z "$ac_lib"; then
16776 ac_res="none required"
16777 else
16778 ac_res=-l$ac_lib
16779 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16780 fi
16781 if ac_fn_c_try_link "$LINENO"; then :
16782 ac_cv_search_dlopen=$ac_res
16783fi
16784rm -f core conftest.err conftest.$ac_objext \
16785 conftest$ac_exeext
d0ac1c44 16786 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16787 break
16788fi
16789done
d0ac1c44 16790if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16791
16792else
16793 ac_cv_search_dlopen=no
16794fi
16795rm conftest.$ac_ext
16796LIBS=$ac_func_search_save_LIBS
16797fi
16798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16799$as_echo "$ac_cv_search_dlopen" >&6; }
16800ac_res=$ac_cv_search_dlopen
16801if test "$ac_res" != no; then :
16802 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16803
16804fi
16805
075ff26d 16806 fi
31d99776 16807fi
31d99776 16808
4f05add4
TT
16809# Add macho support to GDB, but only if BFD includes it.
16810
16811 OLD_CFLAGS=$CFLAGS
16812 OLD_LDFLAGS=$LDFLAGS
16813 OLD_LIBS=$LIBS
16814 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16815 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16816 # always want our bfd.
16817 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16818 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16819 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 16820 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16821 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
16822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16823$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 16824if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
16825 $as_echo_n "(cached) " >&6
16826else
16827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16828/* end confdefs.h. */
16829#include <stdlib.h>
16830 #include "bfd.h"
16831 #include "mach-o.h"
16832
16833int
16834main ()
16835{
16836return bfd_mach_o_lookup_command (NULL, 0, NULL);
16837 ;
16838 return 0;
16839}
16840_ACEOF
16841if ac_fn_c_try_link "$LINENO"; then :
16842 gdb_cv_var_macho=yes
16843else
16844 gdb_cv_var_macho=no
16845fi
16846rm -f core conftest.err conftest.$ac_objext \
16847 conftest$ac_exeext conftest.$ac_ext
16848fi
16849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16850$as_echo "$gdb_cv_var_macho" >&6; }
16851 CFLAGS=$OLD_CFLAGS
16852 LDFLAGS=$OLD_LDFLAGS
16853 LIBS=$OLD_LIBS
0ad6b8ee 16854if test "$gdb_cv_var_macho" = yes; then
4f05add4
TT
16855 CONFIG_OBS="$CONFIG_OBS machoread.o"
16856fi
16857
121ce6e5
DJ
16858# Add any host-specific objects to GDB.
16859CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16860
608e2dbb 16861# If building on ELF, look for lzma support for embedded compressed debug info.
0ad6b8ee 16862if test "$gdb_cv_var_elf" = yes; then
608e2dbb
TT
16863
16864# Check whether --with-lzma was given.
16865if test "${with_lzma+set}" = set; then :
16866 withval=$with_lzma;
16867else
16868 with_lzma=auto
16869fi
16870
16871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16872$as_echo_n "checking whether to use lzma... " >&6; }
16873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16874$as_echo "$with_lzma" >&6; }
16875
16876 if test "${with_lzma}" != no; then
16877
16878
16879
16880
16881
16882
16883
16884
16885 use_additional=yes
16886
16887 acl_save_prefix="$prefix"
16888 prefix="$acl_final_prefix"
16889 acl_save_exec_prefix="$exec_prefix"
16890 exec_prefix="$acl_final_exec_prefix"
16891
16892 eval additional_includedir=\"$includedir\"
16893 eval additional_libdir=\"$libdir\"
16894
16895 exec_prefix="$acl_save_exec_prefix"
16896 prefix="$acl_save_prefix"
16897
16898
16899# Check whether --with-liblzma-prefix was given.
16900if test "${with_liblzma_prefix+set}" = set; then :
16901 withval=$with_liblzma_prefix;
16902 if test "X$withval" = "Xno"; then
16903 use_additional=no
16904 else
16905 if test "X$withval" = "X"; then
16906
16907 acl_save_prefix="$prefix"
16908 prefix="$acl_final_prefix"
16909 acl_save_exec_prefix="$exec_prefix"
16910 exec_prefix="$acl_final_exec_prefix"
16911
16912 eval additional_includedir=\"$includedir\"
16913 eval additional_libdir=\"$libdir\"
16914
16915 exec_prefix="$acl_save_exec_prefix"
16916 prefix="$acl_save_prefix"
16917
16918 else
16919 additional_includedir="$withval/include"
16920 additional_libdir="$withval/lib"
16921 fi
16922 fi
16923
16924fi
16925
9f1528a1
AB
16926
16927# Check whether --with-liblzma-type was given.
16928if test "${with_liblzma_type+set}" = set; then :
16929 withval=$with_liblzma_type; with_liblzma_type=$withval
16930else
16931 with_liblzma_type=auto
16932fi
16933
16934 lib_type=`eval echo \$with_liblzma_type`
16935
608e2dbb
TT
16936 LIBLZMA=
16937 LTLIBLZMA=
16938 INCLZMA=
16939 rpathdirs=
16940 ltrpathdirs=
16941 names_already_handled=
16942 names_next_round='lzma '
16943 while test -n "$names_next_round"; do
16944 names_this_round="$names_next_round"
16945 names_next_round=
16946 for name in $names_this_round; do
16947 already_handled=
16948 for n in $names_already_handled; do
16949 if test "$n" = "$name"; then
16950 already_handled=yes
16951 break
16952 fi
16953 done
16954 if test -z "$already_handled"; then
16955 names_already_handled="$names_already_handled $name"
16956 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16957 eval value=\"\$HAVE_LIB$uppername\"
16958 if test -n "$value"; then
16959 if test "$value" = yes; then
16960 eval value=\"\$LIB$uppername\"
16961 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16962 eval value=\"\$LTLIB$uppername\"
16963 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16964 else
16965 :
16966 fi
16967 else
16968 found_dir=
16969 found_la=
16970 found_so=
16971 found_a=
16972 if test $use_additional = yes; then
9f1528a1 16973 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
16974 found_dir="$additional_libdir"
16975 found_so="$additional_libdir/lib$name.$shlibext"
16976 if test -f "$additional_libdir/lib$name.la"; then
16977 found_la="$additional_libdir/lib$name.la"
16978 fi
9f1528a1 16979 elif test x$lib_type != xshared; then
608e2dbb
TT
16980 if test -f "$additional_libdir/lib$name.$libext"; then
16981 found_dir="$additional_libdir"
16982 found_a="$additional_libdir/lib$name.$libext"
16983 if test -f "$additional_libdir/lib$name.la"; then
16984 found_la="$additional_libdir/lib$name.la"
16985 fi
16986 fi
16987 fi
16988 fi
16989 if test "X$found_dir" = "X"; then
16990 for x in $LDFLAGS $LTLIBLZMA; do
16991
16992 acl_save_prefix="$prefix"
16993 prefix="$acl_final_prefix"
16994 acl_save_exec_prefix="$exec_prefix"
16995 exec_prefix="$acl_final_exec_prefix"
16996 eval x=\"$x\"
16997 exec_prefix="$acl_save_exec_prefix"
16998 prefix="$acl_save_prefix"
16999
17000 case "$x" in
17001 -L*)
17002 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 17003 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
17004 found_dir="$dir"
17005 found_so="$dir/lib$name.$shlibext"
17006 if test -f "$dir/lib$name.la"; then
17007 found_la="$dir/lib$name.la"
17008 fi
9f1528a1 17009 elif test x$lib_type != xshared; then
608e2dbb
TT
17010 if test -f "$dir/lib$name.$libext"; then
17011 found_dir="$dir"
17012 found_a="$dir/lib$name.$libext"
17013 if test -f "$dir/lib$name.la"; then
17014 found_la="$dir/lib$name.la"
17015 fi
17016 fi
17017 fi
17018 ;;
17019 esac
17020 if test "X$found_dir" != "X"; then
17021 break
17022 fi
17023 done
17024 fi
17025 if test "X$found_dir" != "X"; then
17026 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17027 if test "X$found_so" != "X"; then
17028 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17029 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17030 else
17031 haveit=
17032 for x in $ltrpathdirs; do
17033 if test "X$x" = "X$found_dir"; then
17034 haveit=yes
17035 break
17036 fi
17037 done
17038 if test -z "$haveit"; then
17039 ltrpathdirs="$ltrpathdirs $found_dir"
17040 fi
17041 if test "$hardcode_direct" = yes; then
17042 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17043 else
17044 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17045 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17046 haveit=
17047 for x in $rpathdirs; do
17048 if test "X$x" = "X$found_dir"; then
17049 haveit=yes
17050 break
17051 fi
17052 done
17053 if test -z "$haveit"; then
17054 rpathdirs="$rpathdirs $found_dir"
17055 fi
17056 else
17057 haveit=
17058 for x in $LDFLAGS $LIBLZMA; do
17059
17060 acl_save_prefix="$prefix"
17061 prefix="$acl_final_prefix"
17062 acl_save_exec_prefix="$exec_prefix"
17063 exec_prefix="$acl_final_exec_prefix"
17064 eval x=\"$x\"
17065 exec_prefix="$acl_save_exec_prefix"
17066 prefix="$acl_save_prefix"
17067
17068 if test "X$x" = "X-L$found_dir"; then
17069 haveit=yes
17070 break
17071 fi
17072 done
17073 if test -z "$haveit"; then
17074 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17075 fi
17076 if test "$hardcode_minus_L" != no; then
17077 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17078 else
17079 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17080 fi
17081 fi
17082 fi
17083 fi
17084 else
17085 if test "X$found_a" != "X"; then
17086 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17087 else
17088 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17089 fi
17090 fi
17091 additional_includedir=
17092 case "$found_dir" in
17093 */lib | */lib/)
17094 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17095 additional_includedir="$basedir/include"
17096 ;;
17097 esac
17098 if test "X$additional_includedir" != "X"; then
17099 if test "X$additional_includedir" != "X/usr/include"; then
17100 haveit=
17101 if test "X$additional_includedir" = "X/usr/local/include"; then
17102 if test -n "$GCC"; then
17103 case $host_os in
17104 linux*) haveit=yes;;
17105 esac
17106 fi
17107 fi
17108 if test -z "$haveit"; then
17109 for x in $CPPFLAGS $INCLZMA; do
17110
17111 acl_save_prefix="$prefix"
17112 prefix="$acl_final_prefix"
17113 acl_save_exec_prefix="$exec_prefix"
17114 exec_prefix="$acl_final_exec_prefix"
17115 eval x=\"$x\"
17116 exec_prefix="$acl_save_exec_prefix"
17117 prefix="$acl_save_prefix"
17118
17119 if test "X$x" = "X-I$additional_includedir"; then
17120 haveit=yes
17121 break
17122 fi
17123 done
17124 if test -z "$haveit"; then
17125 if test -d "$additional_includedir"; then
17126 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17127 fi
17128 fi
17129 fi
17130 fi
17131 fi
17132 if test -n "$found_la"; then
17133 save_libdir="$libdir"
17134 case "$found_la" in
17135 */* | *\\*) . "$found_la" ;;
17136 *) . "./$found_la" ;;
17137 esac
17138 libdir="$save_libdir"
17139 for dep in $dependency_libs; do
17140 case "$dep" in
17141 -L*)
17142 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17143 if test "X$additional_libdir" != "X/usr/lib"; then
17144 haveit=
17145 if test "X$additional_libdir" = "X/usr/local/lib"; then
17146 if test -n "$GCC"; then
17147 case $host_os in
17148 linux*) haveit=yes;;
17149 esac
17150 fi
17151 fi
17152 if test -z "$haveit"; then
17153 haveit=
17154 for x in $LDFLAGS $LIBLZMA; do
17155
17156 acl_save_prefix="$prefix"
17157 prefix="$acl_final_prefix"
17158 acl_save_exec_prefix="$exec_prefix"
17159 exec_prefix="$acl_final_exec_prefix"
17160 eval x=\"$x\"
17161 exec_prefix="$acl_save_exec_prefix"
17162 prefix="$acl_save_prefix"
17163
17164 if test "X$x" = "X-L$additional_libdir"; then
17165 haveit=yes
17166 break
17167 fi
17168 done
17169 if test -z "$haveit"; then
17170 if test -d "$additional_libdir"; then
17171 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17172 fi
17173 fi
17174 haveit=
17175 for x in $LDFLAGS $LTLIBLZMA; do
17176
17177 acl_save_prefix="$prefix"
17178 prefix="$acl_final_prefix"
17179 acl_save_exec_prefix="$exec_prefix"
17180 exec_prefix="$acl_final_exec_prefix"
17181 eval x=\"$x\"
17182 exec_prefix="$acl_save_exec_prefix"
17183 prefix="$acl_save_prefix"
17184
17185 if test "X$x" = "X-L$additional_libdir"; then
17186 haveit=yes
17187 break
17188 fi
17189 done
17190 if test -z "$haveit"; then
17191 if test -d "$additional_libdir"; then
17192 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17193 fi
17194 fi
17195 fi
17196 fi
17197 ;;
17198 -R*)
17199 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17200 if test "$enable_rpath" != no; then
17201 haveit=
17202 for x in $rpathdirs; do
17203 if test "X$x" = "X$dir"; then
17204 haveit=yes
17205 break
17206 fi
17207 done
17208 if test -z "$haveit"; then
17209 rpathdirs="$rpathdirs $dir"
17210 fi
17211 haveit=
17212 for x in $ltrpathdirs; do
17213 if test "X$x" = "X$dir"; then
17214 haveit=yes
17215 break
17216 fi
17217 done
17218 if test -z "$haveit"; then
17219 ltrpathdirs="$ltrpathdirs $dir"
17220 fi
17221 fi
17222 ;;
17223 -l*)
17224 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17225 ;;
17226 *.la)
17227 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17228 ;;
17229 *)
17230 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17231 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17232 ;;
17233 esac
17234 done
17235 fi
17236 else
9f1528a1
AB
17237 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17238 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17239 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17240 else
17241 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17242 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17243 fi
608e2dbb
TT
17244 fi
17245 fi
17246 fi
17247 done
17248 done
17249 if test "X$rpathdirs" != "X"; then
17250 if test -n "$hardcode_libdir_separator"; then
17251 alldirs=
17252 for found_dir in $rpathdirs; do
17253 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17254 done
17255 acl_save_libdir="$libdir"
17256 libdir="$alldirs"
17257 eval flag=\"$hardcode_libdir_flag_spec\"
17258 libdir="$acl_save_libdir"
17259 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17260 else
17261 for found_dir in $rpathdirs; do
17262 acl_save_libdir="$libdir"
17263 libdir="$found_dir"
17264 eval flag=\"$hardcode_libdir_flag_spec\"
17265 libdir="$acl_save_libdir"
17266 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17267 done
17268 fi
17269 fi
17270 if test "X$ltrpathdirs" != "X"; then
17271 for found_dir in $ltrpathdirs; do
17272 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17273 done
17274 fi
17275
17276
17277 ac_save_CPPFLAGS="$CPPFLAGS"
17278
17279 for element in $INCLZMA; do
17280 haveit=
17281 for x in $CPPFLAGS; do
17282
17283 acl_save_prefix="$prefix"
17284 prefix="$acl_final_prefix"
17285 acl_save_exec_prefix="$exec_prefix"
17286 exec_prefix="$acl_final_exec_prefix"
17287 eval x=\"$x\"
17288 exec_prefix="$acl_save_exec_prefix"
17289 prefix="$acl_save_prefix"
17290
17291 if test "X$x" = "X$element"; then
17292 haveit=yes
17293 break
17294 fi
17295 done
17296 if test -z "$haveit"; then
17297 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17298 fi
17299 done
17300
17301
17302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17303$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 17304if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
17305 $as_echo_n "(cached) " >&6
17306else
17307
17308 ac_save_LIBS="$LIBS"
17309 LIBS="$LIBS $LIBLZMA"
17310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17311/* end confdefs.h. */
17312#include "lzma.h"
17313int
17314main ()
17315{
17316lzma_index_iter iter;
17317 lzma_index_iter_init (&iter, 0);
17318 lzma_mf_is_supported (LZMA_MF_HC3);
17319 ;
17320 return 0;
17321}
17322_ACEOF
17323if ac_fn_c_try_link "$LINENO"; then :
17324 ac_cv_liblzma=yes
17325else
17326 ac_cv_liblzma=no
17327fi
17328rm -f core conftest.err conftest.$ac_objext \
17329 conftest$ac_exeext conftest.$ac_ext
17330 LIBS="$ac_save_LIBS"
17331
17332fi
17333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17334$as_echo "$ac_cv_liblzma" >&6; }
17335 if test "$ac_cv_liblzma" = yes; then
17336 HAVE_LIBLZMA=yes
17337
17338$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17339
17340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17341$as_echo_n "checking how to link with liblzma... " >&6; }
17342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17343$as_echo "$LIBLZMA" >&6; }
17344 else
17345 HAVE_LIBLZMA=no
17346 CPPFLAGS="$ac_save_CPPFLAGS"
17347 LIBLZMA=
17348 LTLIBLZMA=
17349 fi
17350
17351
17352
17353
17354
17355
17356 if test "$HAVE_LIBLZMA" != yes; then
17357 if test "$with_lzma" = yes; then
d0ac1c44 17358 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
17359 fi
17360 fi
17361 fi
17362fi
17363
3fc11d3e
JM
17364LIBGUI="../libgui/src/libgui.a"
17365GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17366
17367
7a292a7a 17368
3fc11d3e
JM
17369WIN32LDAPP=
17370
17371
17372
d91670b9 17373case "${host}" in
686a5eed 17374*-*-cygwin* | *-*-mingw* )
d91670b9
CV
17375 configdir="win"
17376 ;;
17377*)
17378 configdir="unix"
17379 ;;
17380esac
3fc11d3e
JM
17381
17382GDBTKLIBS=
17383if test "${enable_gdbtk}" = "yes"; then
17384
d1c3b63a
KS
17385 # Gdbtk must have an absolute path to srcdir in order to run
17386 # properly when not installed.
17387 here=`pwd`
17388 cd ${srcdir}
17389 GDBTK_SRC_DIR=`pwd`
17390 cd $here
17391
bec39cab 17392
5062cc19
KS
17393 #
17394 # Ok, lets find the tcl configuration
17395 # First, look for one uninstalled.
17396 # the alternative search directory is invoked by --with-tcl
17397 #
3fc11d3e 17398
5062cc19
KS
17399 if test x"${no_tcl}" = x ; then
17400 # we reset no_tcl in case something fails here
17401 no_tcl=true
bec39cab 17402
81ecdfbb
RW
17403# Check whether --with-tcl was given.
17404if test "${with_tcl+set}" = set; then :
17405 withval=$with_tcl; with_tclconfig=${withval}
17406fi
17407
17408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17409$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 17410 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 17411 $as_echo_n "(cached) " >&6
3fc11d3e 17412else
bec39cab 17413
3fc11d3e 17414
5062cc19
KS
17415 # First check to see if --with-tcl was specified.
17416 case "${host}" in
17417 *-*-cygwin*) platDir="win" ;;
17418 *) platDir="unix" ;;
17419 esac
17420 if test x"${with_tclconfig}" != x ; then
17421 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17422 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17423 else
d0ac1c44 17424 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
17425 fi
17426 fi
17427
17428 # then check for a private Tcl installation
17429 if test x"${ac_cv_c_tclconfig}" = x ; then
17430 for i in \
17431 ../tcl \
17432 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17433 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17434 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17435 ../../tcl \
17436 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17437 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17438 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17439 ../../../tcl \
17440 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17441 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17442 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17443 if test -f "$i/$platDir/tclConfig.sh" ; then
17444 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17445 break
17446 fi
17447 done
17448 fi
17449
17450 # on Darwin, check in Framework installation locations
17451 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17452 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17453 `ls -d /Library/Frameworks 2>/dev/null` \
17454 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17455 `ls -d /System/Library/Frameworks 2>/dev/null` \
17456 ; do
17457 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17458 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17459 break
17460 fi
17461 done
17462 fi
17463
17464 # check in a few common install locations
17465 if test x"${ac_cv_c_tclconfig}" = x ; then
17466 for i in `ls -d ${libdir} 2>/dev/null` \
17467 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17468 `ls -d ${prefix}/lib 2>/dev/null` \
17469 `ls -d /usr/local/lib 2>/dev/null` \
17470 `ls -d /usr/contrib/lib 2>/dev/null` \
17471 `ls -d /usr/lib 2>/dev/null` \
17472 ; do
17473 if test -f "$i/tclConfig.sh" ; then
17474 ac_cv_c_tclconfig=`(cd $i; pwd)`
17475 break
17476 fi
17477 done
17478 fi
3fc11d3e 17479
5062cc19
KS
17480 # check in a few other private locations
17481 if test x"${ac_cv_c_tclconfig}" = x ; then
17482 for i in \
17483 ${srcdir}/../tcl \
17484 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17485 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17486 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17487 if test -f "$i/$platDir/tclConfig.sh" ; then
17488 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17489 break
17490 fi
17491 done
17492 fi
bec39cab 17493
3fc11d3e
JM
17494fi
17495
5062cc19
KS
17496
17497 if test x"${ac_cv_c_tclconfig}" = x ; then
17498 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
17499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17500$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
17501 else
17502 no_tcl=
17503 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
17504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17505$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
17506 fi
17507 fi
3fc11d3e 17508
bec39cab 17509
85541719
DE
17510 # If $no_tk is nonempty, then we can't do Tk, and there is no
17511 # point to doing Tcl.
bec39cab 17512
5062cc19
KS
17513 #
17514 # Ok, lets find the tk configuration
17515 # First, look for one uninstalled.
17516 # the alternative search directory is invoked by --with-tk
17517 #
3fc11d3e 17518
5062cc19
KS
17519 if test x"${no_tk}" = x ; then
17520 # we reset no_tk in case something fails here
17521 no_tk=true
bec39cab 17522
81ecdfbb
RW
17523# Check whether --with-tk was given.
17524if test "${with_tk+set}" = set; then :
17525 withval=$with_tk; with_tkconfig=${withval}
17526fi
17527
17528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17529$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 17530 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 17531 $as_echo_n "(cached) " >&6
bec39cab 17532else
3fc11d3e
JM
17533
17534
5062cc19
KS
17535 # First check to see if --with-tkconfig was specified.
17536 if test x"${with_tkconfig}" != x ; then
17537 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17538 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17539 else
d0ac1c44 17540 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
17541 fi
17542 fi
3fc11d3e 17543
5062cc19
KS
17544 # then check for a private Tk library
17545 case "${host}" in
17546 *-*-cygwin*) platDir="win" ;;
17547 *) platDir="unix" ;;
17548 esac
17549 if test x"${ac_cv_c_tkconfig}" = x ; then
17550 for i in \
17551 ../tk \
17552 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17553 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17554 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17555 ../../tk \
17556 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17557 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17558 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17559 ../../../tk \
17560 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17561 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17562 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17563 if test -f "$i/$platDir/tkConfig.sh" ; then
17564 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17565 break
17566 fi
17567 done
17568 fi
17569
17570 # on Darwin, check in Framework installation locations
17571 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17572 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17573 `ls -d /Library/Frameworks 2>/dev/null` \
17574 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17575 `ls -d /System/Library/Frameworks 2>/dev/null` \
17576 ; do
17577 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17578 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17579 break
17580 fi
17581 done
17582 fi
17583
17584 # check in a few common install locations
17585 if test x"${ac_cv_c_tkconfig}" = x ; then
17586 for i in `ls -d ${libdir} 2>/dev/null` \
17587 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17588 `ls -d ${prefix}/lib 2>/dev/null` \
17589 `ls -d /usr/local/lib 2>/dev/null` \
17590 `ls -d /usr/contrib/lib 2>/dev/null` \
17591 `ls -d /usr/lib 2>/dev/null` \
17592 ; do
17593 if test -f "$i/tkConfig.sh" ; then
17594 ac_cv_c_tkconfig=`(cd $i; pwd)`
17595 break
17596 fi
17597 done
17598 fi
17599 # check in a few other private locations
17600 if test x"${ac_cv_c_tkconfig}" = x ; then
17601 for i in \
17602 ${srcdir}/../tk \
17603 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17604 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17605 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17606 if test -f "$i/$platDir/tkConfig.sh" ; then
17607 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17608 break
17609 fi
17610 done
17611 fi
3fc11d3e 17612
3fc11d3e
JM
17613fi
17614
17615
5062cc19
KS
17616 if test x"${ac_cv_c_tkconfig}" = x ; then
17617 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
17618 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17619$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
17620 else
17621 no_tk=
17622 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
17623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17624$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 17625 fi
3fc11d3e 17626 fi
dd2504ab 17627
dd2504ab 17628
85541719
DE
17629 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17630
81ecdfbb
RW
17631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17632$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
17633
17634 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
17635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17636$as_echo "loading" >&6; }
85541719
DE
17637 . ${TCL_BIN_DIR}/tclConfig.sh
17638 else
81ecdfbb
RW
17639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17640$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
17641 fi
17642
17643 # eval is required to do the TCL_DBGX substitution
17644 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17645 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17646
17647 # If the TCL_BIN_DIR is the build directory (not the install directory),
17648 # then set the common variable name to the value of the build variables.
17649 # For example, the variable TCL_LIB_SPEC will be set to the value
17650 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17651 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17652 # installed and uninstalled version of Tcl.
17653 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17654 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17655 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17656 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17657 elif test "`uname -s`" = "Darwin"; then
17658 # If Tcl was built as a framework, attempt to use the libraries
17659 # from the framework at the given location so that linking works
a68ffae9 17660 # against Tcl.framework installed in an arbitrary location.
85541719
DE
17661 case ${TCL_DEFS} in
17662 *TCL_FRAMEWORK*)
17663 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17664 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17665 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17666 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17667 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17668 break
17669 fi
17670 done
17671 fi
17672 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17673 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17674 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17675 fi
17676 ;;
17677 esac
17678 fi
17679
17680 # eval is required to do the TCL_DBGX substitution
17681 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17682 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17683 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17684 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700 # Check for in-tree tcl
17701 here=`pwd`
17702 cd ${srcdir}/..
17703 topdir=`pwd`
17704 cd ${here}
17705
17706 intree="no"
17707 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17708 intree="yes"
17709 fi
17710
17711 # Find Tcl private headers
17712 if test x"${intree}" = xno; then
17713
81ecdfbb
RW
17714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17715$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
17716 private_dir=""
17717 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17718 if test -f ${dir}/tclInt.h ; then
17719 private_dir=${dir}
17720 fi
17721
17722 if test x"${private_dir}" = x; then
d0ac1c44 17723 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
17724 else
17725 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17727$as_echo "${private_dir}" >&6; }
85541719
DE
17728 fi
17729
17730 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17731 TCL_LIBRARY="${TCL_LIB_SPEC}"
17732 TCL_DEPS=""
17733 else
17734 # If building tcl in the same src tree, private headers
17735 # are not needed, but we need to be sure to use the right
17736 # headers library
17737 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17738 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17739 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17740 fi
17741
17742
17743
17744
17745
81ecdfbb
RW
17746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17747$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 17748
5062cc19 17749 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
17750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17751$as_echo "loading" >&6; }
5062cc19 17752 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 17753 else
81ecdfbb
RW
17754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17755$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 17756 fi
bec39cab 17757
5062cc19
KS
17758 # eval is required to do the TK_DBGX substitution
17759 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17760 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17761
17762 # If the TK_BIN_DIR is the build directory (not the install directory),
17763 # then set the common variable name to the value of the build variables.
17764 # For example, the variable TK_LIB_SPEC will be set to the value
17765 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17766 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17767 # installed and uninstalled version of Tcl.
85541719 17768 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
17769 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17770 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17771 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17772 elif test "`uname -s`" = "Darwin"; then
17773 # If Tk was built as a framework, attempt to use the libraries
17774 # from the framework at the given location so that linking works
a68ffae9 17775 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
17776 case ${TK_DEFS} in
17777 *TK_FRAMEWORK*)
85541719 17778 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
17779 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17780 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17781 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17782 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17783 break
17784 fi
17785 done
17786 fi
85541719 17787 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
17788 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17789 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17790 fi
17791 ;;
17792 esac
3fc11d3e
JM
17793 fi
17794
5062cc19
KS
17795 # eval is required to do the TK_DBGX substitution
17796 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17797 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17798 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17799 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 17800
3fc11d3e
JM
17801
17802
bec39cab
AC
17803
17804
17805
17806
17807
17808
17809
3fc11d3e 17810
3fc11d3e 17811
bec39cab 17812
bec39cab 17813
85541719
DE
17814 # Check for in-tree Tk
17815 intree="no"
17816 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17817 intree="yes"
17818 fi
3fc11d3e 17819
85541719
DE
17820 # Find Tk private headers
17821 if test x"${intree}" = xno; then
3fc11d3e 17822
81ecdfbb
RW
17823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17824$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
17825 private_dir=""
17826 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17827 if test -f ${dir}/tkInt.h; then
17828 private_dir=${dir}
3fc11d3e 17829 fi
bec39cab 17830
5062cc19 17831 if test x"${private_dir}" = x; then
d0ac1c44 17832 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 17833 else
5062cc19 17834 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17836$as_echo "${private_dir}" >&6; }
3fc11d3e 17837 fi
3fc11d3e 17838
85541719
DE
17839 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17840 TK_LIBRARY=${TK_LIB_SPEC}
17841 TK_DEPS=""
17842 else
17843 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17844 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17845 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17846 fi
3fc11d3e
JM
17847
17848
3fc11d3e
JM
17849
17850
3fc11d3e 17851
85541719 17852 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 17853
85541719
DE
17854 # Include some libraries that Tcl and Tk want.
17855 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17856 # Yes, the ordering seems wrong here. But it isn't.
17857 # TK_LIBS is the list of libraries that need to be linked
17858 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17859 # were in LIBS then any link tests after this point would
17860 # try to include things like `$(LIBGUI)', which wouldn't work.
17861 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 17862
85541719
DE
17863 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17864 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17865 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17866 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17867 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17868 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17869 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 17870
0ad6b8ee 17871 if test x"$gdb_cv_os_cygwin" = xyes; then
85541719
DE
17872 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17873 WIN32LDAPP="-Wl,--subsystem,console"
17874 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 17875 fi
ffc6a242 17876
81ecdfbb 17877 subdirs="$subdirs gdbtk"
3ace7edb 17878
85541719 17879 fi
3fc11d3e
JM
17880fi
17881
17882
17883
17884
17885
17886
17887
17888
81ecdfbb
RW
17889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17890$as_echo_n "checking for X... " >&6; }
bec39cab 17891
c906108c 17892
81ecdfbb
RW
17893# Check whether --with-x was given.
17894if test "${with_x+set}" = set; then :
17895 withval=$with_x;
17896fi
c906108c
SS
17897
17898# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17899if test "x$with_x" = xno; then
17900 # The user explicitly disabled X.
17901 have_x=disabled
17902else
81ecdfbb 17903 case $x_includes,$x_libraries in #(
d0ac1c44
SM
17904 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17905 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 17906 $as_echo_n "(cached) " >&6
c906108c
SS
17907else
17908 # One or both of the vars are not set, and there is no cached value.
bec39cab 17909ac_x_includes=no ac_x_libraries=no
81ecdfbb 17910rm -f -r conftest.dir
bec39cab
AC
17911if mkdir conftest.dir; then
17912 cd conftest.dir
bec39cab 17913 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
17914incroot:
17915 @echo incroot='${INCROOT}'
17916usrlibdir:
17917 @echo usrlibdir='${USRLIBDIR}'
17918libdir:
17919 @echo libdir='${LIBDIR}'
17920_ACEOF
17921 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 17922 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
17923 for ac_var in incroot usrlibdir libdir; do
17924 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17925 done
c906108c 17926 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
17927 for ac_extension in a so sl dylib la dll; do
17928 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17929 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 17930 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
17931 fi
17932 done
17933 # Screen out bogus values from the imake configuration. They are
17934 # bogus both because they are the default anyway, and because
17935 # using them would break gcc on systems where it needs fixed includes.
bec39cab 17936 case $ac_im_incroot in
81ecdfbb 17937 /usr/include) ac_x_includes= ;;
bec39cab 17938 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 17939 esac
bec39cab 17940 case $ac_im_usrlibdir in
81ecdfbb 17941 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 17942 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
17943 esac
17944 fi
17945 cd ..
81ecdfbb 17946 rm -f -r conftest.dir
c906108c
SS
17947fi
17948
bec39cab
AC
17949# Standard set of common directories for X headers.
17950# Check X11 before X11Rn because it is often a symlink to the current release.
17951ac_x_header_dirs='
17952/usr/X11/include
81ecdfbb 17953/usr/X11R7/include
bec39cab
AC
17954/usr/X11R6/include
17955/usr/X11R5/include
17956/usr/X11R4/include
17957
17958/usr/include/X11
81ecdfbb 17959/usr/include/X11R7
bec39cab
AC
17960/usr/include/X11R6
17961/usr/include/X11R5
17962/usr/include/X11R4
17963
17964/usr/local/X11/include
81ecdfbb 17965/usr/local/X11R7/include
bec39cab
AC
17966/usr/local/X11R6/include
17967/usr/local/X11R5/include
17968/usr/local/X11R4/include
17969
17970/usr/local/include/X11
81ecdfbb 17971/usr/local/include/X11R7
bec39cab
AC
17972/usr/local/include/X11R6
17973/usr/local/include/X11R5
17974/usr/local/include/X11R4
17975
17976/usr/X386/include
17977/usr/x386/include
17978/usr/XFree86/include/X11
17979
17980/usr/include
17981/usr/local/include
17982/usr/unsupported/include
17983/usr/athena/include
17984/usr/local/x11r5/include
17985/usr/lpp/Xamples/include
17986
17987/usr/openwin/include
17988/usr/openwin/share/include'
17989
17990if test "$ac_x_includes" = no; then
81ecdfbb 17991 # Guess where to find include files, by looking for Xlib.h.
c906108c 17992 # First, try using that file with no special directory specified.
81ecdfbb 17993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17994/* end confdefs.h. */
81ecdfbb 17995#include <X11/Xlib.h>
bec39cab 17996_ACEOF
81ecdfbb 17997if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
17998 # We can compile using X headers with no special include directory.
17999ac_x_includes=
18000else
bec39cab 18001 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 18002 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
18003 ac_x_includes=$ac_dir
18004 break
18005 fi
18006done
c906108c 18007fi
d0ac1c44 18008rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 18009fi # $ac_x_includes = no
c906108c 18010
bec39cab 18011if test "$ac_x_libraries" = no; then
c906108c 18012 # Check for the libraries.
c906108c
SS
18013 # See if we find them without any special options.
18014 # Don't add to $LIBS permanently.
bec39cab 18015 ac_save_LIBS=$LIBS
81ecdfbb
RW
18016 LIBS="-lX11 $LIBS"
18017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 18018/* end confdefs.h. */
81ecdfbb 18019#include <X11/Xlib.h>
bec39cab
AC
18020int
18021main ()
18022{
81ecdfbb 18023XrmInitialize ()
bec39cab
AC
18024 ;
18025 return 0;
18026}
18027_ACEOF
81ecdfbb 18028if ac_fn_c_try_link "$LINENO"; then :
bec39cab 18029 LIBS=$ac_save_LIBS
c906108c
SS
18030# We can link X programs with no special library path.
18031ac_x_libraries=
18032else
81ecdfbb
RW
18033 LIBS=$ac_save_LIBS
18034for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 18035do
bec39cab 18036 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
18037 for ac_extension in a so sl dylib la dll; do
18038 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
18039 ac_x_libraries=$ac_dir
18040 break 2
18041 fi
18042 done
18043done
18044fi
81ecdfbb
RW
18045rm -f core conftest.err conftest.$ac_objext \
18046 conftest$ac_exeext conftest.$ac_ext
bec39cab 18047fi # $ac_x_libraries = no
c906108c 18048
81ecdfbb
RW
18049case $ac_x_includes,$ac_x_libraries in #(
18050 no,* | *,no | *\'*)
18051 # Didn't find X, or a directory has "'" in its name.
18052 ac_cv_have_x="have_x=no";; #(
18053 *)
18054 # Record where we found X for the cache.
18055 ac_cv_have_x="have_x=yes\
18056 ac_x_includes='$ac_x_includes'\
18057 ac_x_libraries='$ac_x_libraries'"
18058esac
c906108c 18059fi
81ecdfbb
RW
18060;; #(
18061 *) have_x=yes;;
18062 esac
c906108c
SS
18063 eval "$ac_cv_have_x"
18064fi # $with_x != no
18065
18066if test "$have_x" != yes; then
81ecdfbb
RW
18067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18068$as_echo "$have_x" >&6; }
c906108c
SS
18069 no_x=yes
18070else
18071 # If each of the values was on the command line, it overrides each guess.
18072 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18073 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18074 # Update the cache value to reflect the command line values.
81ecdfbb
RW
18075 ac_cv_have_x="have_x=yes\
18076 ac_x_includes='$x_includes'\
18077 ac_x_libraries='$x_libraries'"
18078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18079$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
18080fi
18081
18082
bec39cab 18083# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 18084# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
18085# This code just checks for a few cases where we'd like to ignore those
18086# definitions, even when they're present in the '.mt' file. These cases
18087# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 18088# not part of the source tree.
7a292a7a 18089#
81ecdfbb
RW
18090# Check whether --enable-sim was given.
18091if test "${enable_sim+set}" = set; then :
18092 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
18093 echo "enableval = ${enableval}";
18094 case "${enableval}" in
18095 yes) ignore_sim=false ;;
18096 no) ignore_sim=true ;;
18097 *) ignore_sim=false ;;
18098 esac
18099else
18100 ignore_sim=false
81ecdfbb
RW
18101fi
18102
7a292a7a
SS
18103
18104if test ! -d "${srcdir}/../sim"; then
18105 ignore_sim=true
18106fi
18107
9b624dbe
UW
18108SIM=
18109SIM_OBS=
18110if test "${ignore_sim}" = "false"; then
18111 if test x"${gdb_sim}" != x ; then
18112 SIM="${gdb_sim}"
18113 SIM_OBS="remote-sim.o"
60ca704f 18114
81ecdfbb 18115$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 18116
976102cd
PA
18117
18118 # Some tdep code should only be compiled in when the ppc sim is
18119 # built. PR sim/13418.
18120 case $target in
18121 powerpc*-*-*)
18122
18123$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18124
18125 ;;
18126 esac
9b624dbe 18127 fi
7a292a7a
SS
18128fi
18129
18130
18131
c906108c
SS
18132
18133
18134
18135
18136
18137
dfcd3bfb 18138
e56ac5c3
AC
18139
18140
b3a90332
AC
18141
18142
c35f4ffc 18143# List of host floatformats.
bec39cab
AC
18144
18145cat >>confdefs.h <<_ACEOF
c35f4ffc 18146#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 18147_ACEOF
c35f4ffc 18148
bec39cab
AC
18149
18150cat >>confdefs.h <<_ACEOF
c35f4ffc 18151#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
18152_ACEOF
18153
c35f4ffc 18154
bec39cab 18155cat >>confdefs.h <<_ACEOF
c35f4ffc 18156#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 18157_ACEOF
c35f4ffc
AC
18158
18159
c906108c
SS
18160# target_subdir is used by the testsuite to find the target libraries.
18161target_subdir=
18162if test "${host}" != "${target}"; then
18163 target_subdir="${target_alias}/"
18164fi
18165
18166
21ea5acd 18167# Import nat definitions.
2b351b19 18168nat_makefile_frag=/dev/null
771b4502 18169if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
18170 . ${srcdir}/configure.nat
18171 nativefile=$NAT_FILE
c906108c 18172fi
c906108c 18173
c906108c
SS
18174
18175
18176
21ea5acd
SDJ
18177
18178
18179
18180
18181
c906108c
SS
18182
18183
b00a8037 18184if test x"${gdb_osabi}" != x ; then
bec39cab
AC
18185
18186cat >>confdefs.h <<_ACEOF
b00a8037 18187#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 18188_ACEOF
b00a8037
DJ
18189
18190fi
18191
393fd4c3
YQ
18192# Check for babeltrace and babeltrace-ctf
18193
18194# Check whether --with-babeltrace was given.
18195if test "${with_babeltrace+set}" = set; then :
18196 withval=$with_babeltrace;
18197else
18198 with_babeltrace=auto
18199fi
18200
18201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18202$as_echo_n "checking whether to use babeltrace... " >&6; }
18203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18204$as_echo "$with_babeltrace" >&6; }
18205
18206if test "x$with_babeltrace" = "xno"; then
18207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18208$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18209else
18210 # Append -Werror to CFLAGS so that configure can catch the warning
18211 # "assignment from incompatible pointer type", which is related to
18212 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18213 # in GDB, while babeltrace 1.0.3 is broken.
18214 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18215 # safe to save and restore CFLAGS here.
18216 saved_CFLAGS=$CFLAGS
18217 CFLAGS="$CFLAGS -Werror"
18218
18219
18220
18221
18222
18223
18224
18225
18226 use_additional=yes
18227
18228 acl_save_prefix="$prefix"
18229 prefix="$acl_final_prefix"
18230 acl_save_exec_prefix="$exec_prefix"
18231 exec_prefix="$acl_final_exec_prefix"
18232
18233 eval additional_includedir=\"$includedir\"
18234 eval additional_libdir=\"$libdir\"
18235
18236 exec_prefix="$acl_save_exec_prefix"
18237 prefix="$acl_save_prefix"
18238
18239
18240# Check whether --with-libbabeltrace-prefix was given.
18241if test "${with_libbabeltrace_prefix+set}" = set; then :
18242 withval=$with_libbabeltrace_prefix;
18243 if test "X$withval" = "Xno"; then
18244 use_additional=no
18245 else
18246 if test "X$withval" = "X"; then
18247
18248 acl_save_prefix="$prefix"
18249 prefix="$acl_final_prefix"
18250 acl_save_exec_prefix="$exec_prefix"
18251 exec_prefix="$acl_final_exec_prefix"
18252
18253 eval additional_includedir=\"$includedir\"
18254 eval additional_libdir=\"$libdir\"
18255
18256 exec_prefix="$acl_save_exec_prefix"
18257 prefix="$acl_save_prefix"
18258
18259 else
18260 additional_includedir="$withval/include"
18261 additional_libdir="$withval/lib"
18262 fi
18263 fi
18264
18265fi
18266
9f1528a1
AB
18267
18268# Check whether --with-libbabeltrace-type was given.
18269if test "${with_libbabeltrace_type+set}" = set; then :
18270 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18271else
18272 with_libbabeltrace_type=auto
18273fi
18274
18275 lib_type=`eval echo \$with_libbabeltrace_type`
18276
393fd4c3
YQ
18277 LIBBABELTRACE=
18278 LTLIBBABELTRACE=
18279 INCBABELTRACE=
18280 rpathdirs=
18281 ltrpathdirs=
18282 names_already_handled=
18283 names_next_round='babeltrace babeltrace-ctf'
18284 while test -n "$names_next_round"; do
18285 names_this_round="$names_next_round"
18286 names_next_round=
18287 for name in $names_this_round; do
18288 already_handled=
18289 for n in $names_already_handled; do
18290 if test "$n" = "$name"; then
18291 already_handled=yes
18292 break
18293 fi
18294 done
18295 if test -z "$already_handled"; then
18296 names_already_handled="$names_already_handled $name"
18297 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18298 eval value=\"\$HAVE_LIB$uppername\"
18299 if test -n "$value"; then
18300 if test "$value" = yes; then
18301 eval value=\"\$LIB$uppername\"
18302 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18303 eval value=\"\$LTLIB$uppername\"
18304 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18305 else
18306 :
18307 fi
18308 else
18309 found_dir=
18310 found_la=
18311 found_so=
18312 found_a=
18313 if test $use_additional = yes; then
9f1528a1 18314 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18315 found_dir="$additional_libdir"
18316 found_so="$additional_libdir/lib$name.$shlibext"
18317 if test -f "$additional_libdir/lib$name.la"; then
18318 found_la="$additional_libdir/lib$name.la"
18319 fi
9f1528a1 18320 elif test x$lib_type != xshared; then
393fd4c3
YQ
18321 if test -f "$additional_libdir/lib$name.$libext"; then
18322 found_dir="$additional_libdir"
18323 found_a="$additional_libdir/lib$name.$libext"
18324 if test -f "$additional_libdir/lib$name.la"; then
18325 found_la="$additional_libdir/lib$name.la"
18326 fi
18327 fi
18328 fi
18329 fi
18330 if test "X$found_dir" = "X"; then
18331 for x in $LDFLAGS $LTLIBBABELTRACE; do
18332
18333 acl_save_prefix="$prefix"
18334 prefix="$acl_final_prefix"
18335 acl_save_exec_prefix="$exec_prefix"
18336 exec_prefix="$acl_final_exec_prefix"
18337 eval x=\"$x\"
18338 exec_prefix="$acl_save_exec_prefix"
18339 prefix="$acl_save_prefix"
18340
18341 case "$x" in
18342 -L*)
18343 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 18344 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18345 found_dir="$dir"
18346 found_so="$dir/lib$name.$shlibext"
18347 if test -f "$dir/lib$name.la"; then
18348 found_la="$dir/lib$name.la"
18349 fi
9f1528a1 18350 elif test x$lib_type != xshared; then
393fd4c3
YQ
18351 if test -f "$dir/lib$name.$libext"; then
18352 found_dir="$dir"
18353 found_a="$dir/lib$name.$libext"
18354 if test -f "$dir/lib$name.la"; then
18355 found_la="$dir/lib$name.la"
18356 fi
18357 fi
18358 fi
18359 ;;
18360 esac
18361 if test "X$found_dir" != "X"; then
18362 break
18363 fi
18364 done
18365 fi
18366 if test "X$found_dir" != "X"; then
18367 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18368 if test "X$found_so" != "X"; then
18369 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18370 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18371 else
18372 haveit=
18373 for x in $ltrpathdirs; do
18374 if test "X$x" = "X$found_dir"; then
18375 haveit=yes
18376 break
18377 fi
18378 done
18379 if test -z "$haveit"; then
18380 ltrpathdirs="$ltrpathdirs $found_dir"
18381 fi
18382 if test "$hardcode_direct" = yes; then
18383 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18384 else
18385 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18386 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18387 haveit=
18388 for x in $rpathdirs; do
18389 if test "X$x" = "X$found_dir"; then
18390 haveit=yes
18391 break
18392 fi
18393 done
18394 if test -z "$haveit"; then
18395 rpathdirs="$rpathdirs $found_dir"
18396 fi
18397 else
18398 haveit=
18399 for x in $LDFLAGS $LIBBABELTRACE; do
18400
18401 acl_save_prefix="$prefix"
18402 prefix="$acl_final_prefix"
18403 acl_save_exec_prefix="$exec_prefix"
18404 exec_prefix="$acl_final_exec_prefix"
18405 eval x=\"$x\"
18406 exec_prefix="$acl_save_exec_prefix"
18407 prefix="$acl_save_prefix"
18408
18409 if test "X$x" = "X-L$found_dir"; then
18410 haveit=yes
18411 break
18412 fi
18413 done
18414 if test -z "$haveit"; then
18415 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18416 fi
18417 if test "$hardcode_minus_L" != no; then
18418 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18419 else
18420 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18421 fi
18422 fi
18423 fi
18424 fi
18425 else
18426 if test "X$found_a" != "X"; then
18427 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18428 else
18429 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18430 fi
18431 fi
18432 additional_includedir=
18433 case "$found_dir" in
18434 */lib | */lib/)
18435 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18436 additional_includedir="$basedir/include"
18437 ;;
18438 esac
18439 if test "X$additional_includedir" != "X"; then
18440 if test "X$additional_includedir" != "X/usr/include"; then
18441 haveit=
18442 if test "X$additional_includedir" = "X/usr/local/include"; then
18443 if test -n "$GCC"; then
18444 case $host_os in
18445 linux*) haveit=yes;;
18446 esac
18447 fi
18448 fi
18449 if test -z "$haveit"; then
18450 for x in $CPPFLAGS $INCBABELTRACE; do
18451
18452 acl_save_prefix="$prefix"
18453 prefix="$acl_final_prefix"
18454 acl_save_exec_prefix="$exec_prefix"
18455 exec_prefix="$acl_final_exec_prefix"
18456 eval x=\"$x\"
18457 exec_prefix="$acl_save_exec_prefix"
18458 prefix="$acl_save_prefix"
18459
18460 if test "X$x" = "X-I$additional_includedir"; then
18461 haveit=yes
18462 break
18463 fi
18464 done
18465 if test -z "$haveit"; then
18466 if test -d "$additional_includedir"; then
18467 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18468 fi
18469 fi
18470 fi
18471 fi
18472 fi
18473 if test -n "$found_la"; then
18474 save_libdir="$libdir"
18475 case "$found_la" in
18476 */* | *\\*) . "$found_la" ;;
18477 *) . "./$found_la" ;;
18478 esac
18479 libdir="$save_libdir"
18480 for dep in $dependency_libs; do
18481 case "$dep" in
18482 -L*)
18483 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18484 if test "X$additional_libdir" != "X/usr/lib"; then
18485 haveit=
18486 if test "X$additional_libdir" = "X/usr/local/lib"; then
18487 if test -n "$GCC"; then
18488 case $host_os in
18489 linux*) haveit=yes;;
18490 esac
18491 fi
18492 fi
18493 if test -z "$haveit"; then
18494 haveit=
18495 for x in $LDFLAGS $LIBBABELTRACE; do
18496
18497 acl_save_prefix="$prefix"
18498 prefix="$acl_final_prefix"
18499 acl_save_exec_prefix="$exec_prefix"
18500 exec_prefix="$acl_final_exec_prefix"
18501 eval x=\"$x\"
18502 exec_prefix="$acl_save_exec_prefix"
18503 prefix="$acl_save_prefix"
18504
18505 if test "X$x" = "X-L$additional_libdir"; then
18506 haveit=yes
18507 break
18508 fi
18509 done
18510 if test -z "$haveit"; then
18511 if test -d "$additional_libdir"; then
18512 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18513 fi
18514 fi
18515 haveit=
18516 for x in $LDFLAGS $LTLIBBABELTRACE; do
18517
18518 acl_save_prefix="$prefix"
18519 prefix="$acl_final_prefix"
18520 acl_save_exec_prefix="$exec_prefix"
18521 exec_prefix="$acl_final_exec_prefix"
18522 eval x=\"$x\"
18523 exec_prefix="$acl_save_exec_prefix"
18524 prefix="$acl_save_prefix"
18525
18526 if test "X$x" = "X-L$additional_libdir"; then
18527 haveit=yes
18528 break
18529 fi
18530 done
18531 if test -z "$haveit"; then
18532 if test -d "$additional_libdir"; then
18533 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18534 fi
18535 fi
18536 fi
18537 fi
18538 ;;
18539 -R*)
18540 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18541 if test "$enable_rpath" != no; then
18542 haveit=
18543 for x in $rpathdirs; do
18544 if test "X$x" = "X$dir"; then
18545 haveit=yes
18546 break
18547 fi
18548 done
18549 if test -z "$haveit"; then
18550 rpathdirs="$rpathdirs $dir"
18551 fi
18552 haveit=
18553 for x in $ltrpathdirs; do
18554 if test "X$x" = "X$dir"; then
18555 haveit=yes
18556 break
18557 fi
18558 done
18559 if test -z "$haveit"; then
18560 ltrpathdirs="$ltrpathdirs $dir"
18561 fi
18562 fi
18563 ;;
18564 -l*)
18565 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18566 ;;
18567 *.la)
18568 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18569 ;;
18570 *)
18571 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18572 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18573 ;;
18574 esac
18575 done
18576 fi
18577 else
9f1528a1
AB
18578 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18579 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18580 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18581 else
18582 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
18583 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
18584 fi
393fd4c3
YQ
18585 fi
18586 fi
18587 fi
18588 done
18589 done
18590 if test "X$rpathdirs" != "X"; then
18591 if test -n "$hardcode_libdir_separator"; then
18592 alldirs=
18593 for found_dir in $rpathdirs; do
18594 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18595 done
18596 acl_save_libdir="$libdir"
18597 libdir="$alldirs"
18598 eval flag=\"$hardcode_libdir_flag_spec\"
18599 libdir="$acl_save_libdir"
18600 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18601 else
18602 for found_dir in $rpathdirs; do
18603 acl_save_libdir="$libdir"
18604 libdir="$found_dir"
18605 eval flag=\"$hardcode_libdir_flag_spec\"
18606 libdir="$acl_save_libdir"
18607 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18608 done
18609 fi
18610 fi
18611 if test "X$ltrpathdirs" != "X"; then
18612 for found_dir in $ltrpathdirs; do
18613 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18614 done
18615 fi
18616
18617
18618 ac_save_CPPFLAGS="$CPPFLAGS"
18619
18620 for element in $INCBABELTRACE; do
18621 haveit=
18622 for x in $CPPFLAGS; do
18623
18624 acl_save_prefix="$prefix"
18625 prefix="$acl_final_prefix"
18626 acl_save_exec_prefix="$exec_prefix"
18627 exec_prefix="$acl_final_exec_prefix"
18628 eval x=\"$x\"
18629 exec_prefix="$acl_save_exec_prefix"
18630 prefix="$acl_save_prefix"
18631
18632 if test "X$x" = "X$element"; then
18633 haveit=yes
18634 break
18635 fi
18636 done
18637 if test -z "$haveit"; then
18638 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18639 fi
18640 done
18641
18642
18643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18644$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 18645if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
18646 $as_echo_n "(cached) " >&6
18647else
18648
18649 ac_save_LIBS="$LIBS"
18650 LIBS="$LIBS $LIBBABELTRACE"
18651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18652/* end confdefs.h. */
18653#include <babeltrace/babeltrace.h>
18654 #include <babeltrace/ctf/events.h>
18655 #include <babeltrace/ctf/iterator.h>
18656int
18657main ()
18658{
18659struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18660 struct bt_ctf_event *event = NULL;
18661 const struct bt_definition *scope;
18662
13cdc2af 18663 pos->type = BT_SEEK_BEGIN;
65c749e7 18664 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
18665 scope = bt_ctf_get_top_level_scope (event,
18666 BT_STREAM_EVENT_HEADER);
18667 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18668
18669 ;
18670 return 0;
18671}
18672_ACEOF
18673if ac_fn_c_try_link "$LINENO"; then :
18674 ac_cv_libbabeltrace=yes
18675else
18676 ac_cv_libbabeltrace=no
18677fi
18678rm -f core conftest.err conftest.$ac_objext \
18679 conftest$ac_exeext conftest.$ac_ext
18680 LIBS="$ac_save_LIBS"
18681
18682fi
18683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18684$as_echo "$ac_cv_libbabeltrace" >&6; }
18685 if test "$ac_cv_libbabeltrace" = yes; then
18686 HAVE_LIBBABELTRACE=yes
18687
18688$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18689
18690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18691$as_echo_n "checking how to link with libbabeltrace... " >&6; }
18692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18693$as_echo "$LIBBABELTRACE" >&6; }
18694 else
18695 HAVE_LIBBABELTRACE=no
18696 CPPFLAGS="$ac_save_CPPFLAGS"
18697 LIBBABELTRACE=
18698 LTLIBBABELTRACE=
18699 fi
18700
18701
18702
18703
18704
18705
18706 CFLAGS=$saved_CFLAGS
18707
18708 if test "$HAVE_LIBBABELTRACE" != yes; then
18709 if test "$with_babeltrace" = yes; then
d0ac1c44 18710 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
18711 else
18712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18713$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18714 fi
18715 fi
18716fi
18717
ccb1ba62
CB
18718# Check for xxhash
18719
18720# Check whether --with-xxhash was given.
18721if test "${with_xxhash+set}" = set; then :
18722 withval=$with_xxhash;
18723else
18724 with_xxhash=auto
18725fi
18726
18727
1776e3e5
NA
18728 # Check whether --enable-libctf was given.
18729if test "${enable_libctf+set}" = set; then :
18730 enableval=$enable_libctf;
18731 case "$enableval" in
18732 yes|no) ;;
18733 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
18734 esac
18735
18736else
18737 enable_libctf=yes
18738fi
18739
18740
18741if test x${enable_static} = xno; then
18742 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
18743 CTF_DEPS="../libctf/.libs/libctf.so"
18744else
18745 LIBCTF="../libctf/.libs/libctf.a"
18746 CTF_DEPS="$LIBCTF"
18747fi
18748if test "${enable_libctf}" = yes; then
18749
18750$as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
18751
18752else
18753 LIBCTF=
18754 CTF_DEPS=
18755fi
18756
18757
18758
18759
18760# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
18761# empty version.
18762
ccb1ba62
CB
18763if test "x$with_xxhash" != "xno"; then
18764
18765
18766
18767
18768
18769
18770
18771
18772 use_additional=yes
18773
18774 acl_save_prefix="$prefix"
18775 prefix="$acl_final_prefix"
18776 acl_save_exec_prefix="$exec_prefix"
18777 exec_prefix="$acl_final_exec_prefix"
18778
18779 eval additional_includedir=\"$includedir\"
18780 eval additional_libdir=\"$libdir\"
18781
18782 exec_prefix="$acl_save_exec_prefix"
18783 prefix="$acl_save_prefix"
18784
18785
18786# Check whether --with-libxxhash-prefix was given.
18787if test "${with_libxxhash_prefix+set}" = set; then :
18788 withval=$with_libxxhash_prefix;
18789 if test "X$withval" = "Xno"; then
18790 use_additional=no
18791 else
18792 if test "X$withval" = "X"; then
18793
18794 acl_save_prefix="$prefix"
18795 prefix="$acl_final_prefix"
18796 acl_save_exec_prefix="$exec_prefix"
18797 exec_prefix="$acl_final_exec_prefix"
18798
18799 eval additional_includedir=\"$includedir\"
18800 eval additional_libdir=\"$libdir\"
18801
18802 exec_prefix="$acl_save_exec_prefix"
18803 prefix="$acl_save_prefix"
18804
18805 else
18806 additional_includedir="$withval/include"
18807 additional_libdir="$withval/lib"
18808 fi
18809 fi
18810
18811fi
18812
9f1528a1
AB
18813
18814# Check whether --with-libxxhash-type was given.
18815if test "${with_libxxhash_type+set}" = set; then :
18816 withval=$with_libxxhash_type; with_libxxhash_type=$withval
18817else
18818 with_libxxhash_type=auto
18819fi
18820
18821 lib_type=`eval echo \$with_libxxhash_type`
18822
ccb1ba62
CB
18823 LIBXXHASH=
18824 LTLIBXXHASH=
18825 INCXXHASH=
18826 rpathdirs=
18827 ltrpathdirs=
18828 names_already_handled=
18829 names_next_round='xxhash '
18830 while test -n "$names_next_round"; do
18831 names_this_round="$names_next_round"
18832 names_next_round=
18833 for name in $names_this_round; do
18834 already_handled=
18835 for n in $names_already_handled; do
18836 if test "$n" = "$name"; then
18837 already_handled=yes
18838 break
18839 fi
18840 done
18841 if test -z "$already_handled"; then
18842 names_already_handled="$names_already_handled $name"
18843 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18844 eval value=\"\$HAVE_LIB$uppername\"
18845 if test -n "$value"; then
18846 if test "$value" = yes; then
18847 eval value=\"\$LIB$uppername\"
18848 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18849 eval value=\"\$LTLIB$uppername\"
18850 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18851 else
18852 :
18853 fi
18854 else
18855 found_dir=
18856 found_la=
18857 found_so=
18858 found_a=
18859 if test $use_additional = yes; then
9f1528a1 18860 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
18861 found_dir="$additional_libdir"
18862 found_so="$additional_libdir/lib$name.$shlibext"
18863 if test -f "$additional_libdir/lib$name.la"; then
18864 found_la="$additional_libdir/lib$name.la"
18865 fi
9f1528a1 18866 elif test x$lib_type != xshared; then
ccb1ba62
CB
18867 if test -f "$additional_libdir/lib$name.$libext"; then
18868 found_dir="$additional_libdir"
18869 found_a="$additional_libdir/lib$name.$libext"
18870 if test -f "$additional_libdir/lib$name.la"; then
18871 found_la="$additional_libdir/lib$name.la"
18872 fi
18873 fi
18874 fi
18875 fi
18876 if test "X$found_dir" = "X"; then
18877 for x in $LDFLAGS $LTLIBXXHASH; do
18878
18879 acl_save_prefix="$prefix"
18880 prefix="$acl_final_prefix"
18881 acl_save_exec_prefix="$exec_prefix"
18882 exec_prefix="$acl_final_exec_prefix"
18883 eval x=\"$x\"
18884 exec_prefix="$acl_save_exec_prefix"
18885 prefix="$acl_save_prefix"
18886
18887 case "$x" in
18888 -L*)
18889 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 18890 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
18891 found_dir="$dir"
18892 found_so="$dir/lib$name.$shlibext"
18893 if test -f "$dir/lib$name.la"; then
18894 found_la="$dir/lib$name.la"
18895 fi
9f1528a1 18896 elif test x$lib_type != xshared; then
ccb1ba62
CB
18897 if test -f "$dir/lib$name.$libext"; then
18898 found_dir="$dir"
18899 found_a="$dir/lib$name.$libext"
18900 if test -f "$dir/lib$name.la"; then
18901 found_la="$dir/lib$name.la"
18902 fi
18903 fi
18904 fi
18905 ;;
18906 esac
18907 if test "X$found_dir" != "X"; then
18908 break
18909 fi
18910 done
18911 fi
18912 if test "X$found_dir" != "X"; then
18913 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18914 if test "X$found_so" != "X"; then
18915 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18916 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18917 else
18918 haveit=
18919 for x in $ltrpathdirs; do
18920 if test "X$x" = "X$found_dir"; then
18921 haveit=yes
18922 break
18923 fi
18924 done
18925 if test -z "$haveit"; then
18926 ltrpathdirs="$ltrpathdirs $found_dir"
18927 fi
18928 if test "$hardcode_direct" = yes; then
18929 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18930 else
18931 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18932 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18933 haveit=
18934 for x in $rpathdirs; do
18935 if test "X$x" = "X$found_dir"; then
18936 haveit=yes
18937 break
18938 fi
18939 done
18940 if test -z "$haveit"; then
18941 rpathdirs="$rpathdirs $found_dir"
18942 fi
18943 else
18944 haveit=
18945 for x in $LDFLAGS $LIBXXHASH; do
18946
18947 acl_save_prefix="$prefix"
18948 prefix="$acl_final_prefix"
18949 acl_save_exec_prefix="$exec_prefix"
18950 exec_prefix="$acl_final_exec_prefix"
18951 eval x=\"$x\"
18952 exec_prefix="$acl_save_exec_prefix"
18953 prefix="$acl_save_prefix"
18954
18955 if test "X$x" = "X-L$found_dir"; then
18956 haveit=yes
18957 break
18958 fi
18959 done
18960 if test -z "$haveit"; then
18961 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18962 fi
18963 if test "$hardcode_minus_L" != no; then
18964 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18965 else
18966 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18967 fi
18968 fi
18969 fi
18970 fi
18971 else
18972 if test "X$found_a" != "X"; then
18973 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
18974 else
18975 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
18976 fi
18977 fi
18978 additional_includedir=
18979 case "$found_dir" in
18980 */lib | */lib/)
18981 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18982 additional_includedir="$basedir/include"
18983 ;;
18984 esac
18985 if test "X$additional_includedir" != "X"; then
18986 if test "X$additional_includedir" != "X/usr/include"; then
18987 haveit=
18988 if test "X$additional_includedir" = "X/usr/local/include"; then
18989 if test -n "$GCC"; then
18990 case $host_os in
18991 linux*) haveit=yes;;
18992 esac
18993 fi
18994 fi
18995 if test -z "$haveit"; then
18996 for x in $CPPFLAGS $INCXXHASH; do
18997
18998 acl_save_prefix="$prefix"
18999 prefix="$acl_final_prefix"
19000 acl_save_exec_prefix="$exec_prefix"
19001 exec_prefix="$acl_final_exec_prefix"
19002 eval x=\"$x\"
19003 exec_prefix="$acl_save_exec_prefix"
19004 prefix="$acl_save_prefix"
19005
19006 if test "X$x" = "X-I$additional_includedir"; then
19007 haveit=yes
19008 break
19009 fi
19010 done
19011 if test -z "$haveit"; then
19012 if test -d "$additional_includedir"; then
19013 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19014 fi
19015 fi
19016 fi
19017 fi
19018 fi
19019 if test -n "$found_la"; then
19020 save_libdir="$libdir"
19021 case "$found_la" in
19022 */* | *\\*) . "$found_la" ;;
19023 *) . "./$found_la" ;;
19024 esac
19025 libdir="$save_libdir"
19026 for dep in $dependency_libs; do
19027 case "$dep" in
19028 -L*)
19029 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19030 if test "X$additional_libdir" != "X/usr/lib"; then
19031 haveit=
19032 if test "X$additional_libdir" = "X/usr/local/lib"; then
19033 if test -n "$GCC"; then
19034 case $host_os in
19035 linux*) haveit=yes;;
19036 esac
19037 fi
19038 fi
19039 if test -z "$haveit"; then
19040 haveit=
19041 for x in $LDFLAGS $LIBXXHASH; do
19042
19043 acl_save_prefix="$prefix"
19044 prefix="$acl_final_prefix"
19045 acl_save_exec_prefix="$exec_prefix"
19046 exec_prefix="$acl_final_exec_prefix"
19047 eval x=\"$x\"
19048 exec_prefix="$acl_save_exec_prefix"
19049 prefix="$acl_save_prefix"
19050
19051 if test "X$x" = "X-L$additional_libdir"; then
19052 haveit=yes
19053 break
19054 fi
19055 done
19056 if test -z "$haveit"; then
19057 if test -d "$additional_libdir"; then
19058 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19059 fi
19060 fi
19061 haveit=
19062 for x in $LDFLAGS $LTLIBXXHASH; do
19063
19064 acl_save_prefix="$prefix"
19065 prefix="$acl_final_prefix"
19066 acl_save_exec_prefix="$exec_prefix"
19067 exec_prefix="$acl_final_exec_prefix"
19068 eval x=\"$x\"
19069 exec_prefix="$acl_save_exec_prefix"
19070 prefix="$acl_save_prefix"
19071
19072 if test "X$x" = "X-L$additional_libdir"; then
19073 haveit=yes
19074 break
19075 fi
19076 done
19077 if test -z "$haveit"; then
19078 if test -d "$additional_libdir"; then
19079 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19080 fi
19081 fi
19082 fi
19083 fi
19084 ;;
19085 -R*)
19086 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19087 if test "$enable_rpath" != no; then
19088 haveit=
19089 for x in $rpathdirs; do
19090 if test "X$x" = "X$dir"; then
19091 haveit=yes
19092 break
19093 fi
19094 done
19095 if test -z "$haveit"; then
19096 rpathdirs="$rpathdirs $dir"
19097 fi
19098 haveit=
19099 for x in $ltrpathdirs; do
19100 if test "X$x" = "X$dir"; then
19101 haveit=yes
19102 break
19103 fi
19104 done
19105 if test -z "$haveit"; then
19106 ltrpathdirs="$ltrpathdirs $dir"
19107 fi
19108 fi
19109 ;;
19110 -l*)
19111 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19112 ;;
19113 *.la)
19114 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19115 ;;
19116 *)
19117 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19118 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19119 ;;
19120 esac
19121 done
19122 fi
19123 else
9f1528a1
AB
19124 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19125 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19126 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19127 else
19128 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19129 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19130 fi
ccb1ba62
CB
19131 fi
19132 fi
19133 fi
19134 done
19135 done
19136 if test "X$rpathdirs" != "X"; then
19137 if test -n "$hardcode_libdir_separator"; then
19138 alldirs=
19139 for found_dir in $rpathdirs; do
19140 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19141 done
19142 acl_save_libdir="$libdir"
19143 libdir="$alldirs"
19144 eval flag=\"$hardcode_libdir_flag_spec\"
19145 libdir="$acl_save_libdir"
19146 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19147 else
19148 for found_dir in $rpathdirs; do
19149 acl_save_libdir="$libdir"
19150 libdir="$found_dir"
19151 eval flag=\"$hardcode_libdir_flag_spec\"
19152 libdir="$acl_save_libdir"
19153 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19154 done
19155 fi
19156 fi
19157 if test "X$ltrpathdirs" != "X"; then
19158 for found_dir in $ltrpathdirs; do
19159 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19160 done
19161 fi
19162
19163
19164 ac_save_CPPFLAGS="$CPPFLAGS"
19165
19166 for element in $INCXXHASH; do
19167 haveit=
19168 for x in $CPPFLAGS; do
19169
19170 acl_save_prefix="$prefix"
19171 prefix="$acl_final_prefix"
19172 acl_save_exec_prefix="$exec_prefix"
19173 exec_prefix="$acl_final_exec_prefix"
19174 eval x=\"$x\"
19175 exec_prefix="$acl_save_exec_prefix"
19176 prefix="$acl_save_prefix"
19177
19178 if test "X$x" = "X$element"; then
19179 haveit=yes
19180 break
19181 fi
19182 done
19183 if test -z "$haveit"; then
19184 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19185 fi
19186 done
19187
19188
19189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19190$as_echo_n "checking for libxxhash... " >&6; }
19191if ${ac_cv_libxxhash+:} false; then :
19192 $as_echo_n "(cached) " >&6
19193else
19194
19195 ac_save_LIBS="$LIBS"
19196 LIBS="$LIBS $LIBXXHASH"
19197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19198/* end confdefs.h. */
19199#include <xxhash.h>
19200int
19201main ()
19202{
19203XXH32("foo", 3, 0);
19204
19205 ;
19206 return 0;
19207}
19208_ACEOF
19209if ac_fn_c_try_link "$LINENO"; then :
19210 ac_cv_libxxhash=yes
19211else
19212 ac_cv_libxxhash=no
19213fi
19214rm -f core conftest.err conftest.$ac_objext \
19215 conftest$ac_exeext conftest.$ac_ext
19216 LIBS="$ac_save_LIBS"
19217
19218fi
19219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19220$as_echo "$ac_cv_libxxhash" >&6; }
19221 if test "$ac_cv_libxxhash" = yes; then
19222 HAVE_LIBXXHASH=yes
19223
19224$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19225
19226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19227$as_echo_n "checking how to link with libxxhash... " >&6; }
19228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19229$as_echo "$LIBXXHASH" >&6; }
19230 else
19231 HAVE_LIBXXHASH=no
19232 CPPFLAGS="$ac_save_CPPFLAGS"
19233 LIBXXHASH=
19234 LTLIBXXHASH=
19235 fi
19236
19237
19238
19239
19240
19241
19242 if test "$HAVE_LIBXXHASH" != yes; then
19243 if test "$with_xxhash" = yes; then
19244 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19245 fi
19246 fi
19247 if test "x$with_xxhash" = "xauto"; then
19248 with_xxhash="$HAVE_LIBXXHASH"
19249 fi
19250fi
19251
19252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19253$as_echo_n "checking whether to use xxhash... " >&6; }
19254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19255$as_echo "$with_xxhash" >&6; }
19256
a0a461e5 19257NM_H=
c906108c
SS
19258rm -f nm.h
19259if test "${nativefile}" != ""; then
0f475e27
AC
19260 case "${nativefile}" in
19261 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19262 * ) GDB_NM_FILE="${nativefile}"
19263 esac
a0a461e5
TT
19264 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19265
60ca704f
SE
19266
19267cat >>confdefs.h <<_ACEOF
b78960be 19268#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 19269_ACEOF
5a2402b8 19270
a0a461e5 19271 NM_H=nm.h
c906108c 19272fi
5a2402b8
AC
19273
19274
a0a461e5 19275
e3487908
GKB
19276for ac_prog in xsltproc
19277do
19278 # Extract the first word of "$ac_prog", so it can be a program name with args.
19279set dummy $ac_prog; ac_word=$2
19280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19281$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 19282if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
19283 $as_echo_n "(cached) " >&6
19284else
19285 case $XSLTPROC in
19286 [\\/]* | ?:[\\/]*)
19287 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19288 ;;
19289 *)
19290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19291for as_dir in $PATH
19292do
19293 IFS=$as_save_IFS
19294 test -z "$as_dir" && as_dir=.
19295 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 19296 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
19297 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19299 break 2
19300 fi
19301done
19302 done
19303IFS=$as_save_IFS
19304
19305 ;;
19306esac
19307fi
19308XSLTPROC=$ac_cv_path_XSLTPROC
19309if test -n "$XSLTPROC"; then
19310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19311$as_echo "$XSLTPROC" >&6; }
19312else
19313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19314$as_echo "no" >&6; }
19315fi
19316
19317
19318 test -n "$XSLTPROC" && break
19319done
19320test -n "$XSLTPROC" || XSLTPROC="missing"
19321
19322if test "x$USE_MAINTAINER_MODE" = xyes; then
19323 if test "${XSLTPROC}" = missing; then
d0ac1c44 19324 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
19325 fi
19326fi
19327
19328
c906108c
SS
19329
19330
c906108c 19331
81ecdfbb 19332$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 19333
bec39cab 19334
8ecfd7bd
SDJ
19335
19336# Check whether we will enable the inclusion of unit tests when
19337# compiling GDB.
19338#
19339# The default value of this option changes depending whether we're on
19340# development mode (in which case it's "true") or not (in which case
db6878ac
SM
19341# it's "false"). The $development variable is set by the GDB_AC_COMMON
19342# macro, which must therefore be used before GDB_AC_SELFTEST.
4d696a5c
SM
19343
19344if test "x$development" != xtrue && test "x$development" != xfalse; then :
19345 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19346fi
19347
8ecfd7bd
SDJ
19348# Check whether --enable-unit-tests was given.
19349if test "${enable_unit_tests+set}" = set; then :
19350 enableval=$enable_unit_tests; case "${enableval}" in
19351 yes) enable_unittests=true ;;
19352 no) enable_unittests=false ;;
19353 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19354esac
19355else
19356 enable_unittests=$development
19357fi
19358
19359
19360if $enable_unittests; then
dcd1f979
TT
19361
19362$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19363
8ecfd7bd 19364
74cd3f9d
SM
19365 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19366 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
8ecfd7bd 19367
dcd1f979
TT
19368fi
19369
b292c783 19370
8ecfd7bd 19371
f6a88844
JM
19372 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19373 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19374 if test "x$GDB_TRANSFORM_NAME" = x; then
19375 GDB_TRANSFORM_NAME=gdb
19376 fi
19377
19378
19379
19380 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19381 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19382 if test "x$GCORE_TRANSFORM_NAME" = x; then
19383 GCORE_TRANSFORM_NAME=gcore
19384 fi
19385
b292c783
JK
19386
19387ac_config_files="$ac_config_files gcore"
19388
141ec9f6 19389ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 19390
89a34d1b 19391
bec39cab
AC
19392cat >confcache <<\_ACEOF
19393# This file is a shell script that caches the results of configure
19394# tests run on this system so they can be shared between configure
19395# scripts and configure runs, see configure's option --config-cache.
19396# It is not useful on other systems. If it contains results you don't
19397# want to keep, you may remove or edit it.
19398#
19399# config.status only pays attention to the cache file if you give it
19400# the --recheck option to rerun configure.
19401#
19402# `ac_cv_env_foo' variables (set or unset) will be overridden when
19403# loading this file, other *unset* `ac_cv_foo' will be assigned the
19404# following values.
19405
19406_ACEOF
19407
19408# The following way of writing the cache mishandles newlines in values,
19409# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 19410# So, we kill variables containing newlines.
bec39cab
AC
19411# Ultrix sh set writes to stderr and can't be redirected directly,
19412# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
19413(
19414 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19415 eval ac_val=\$$ac_var
19416 case $ac_val in #(
19417 *${as_nl}*)
19418 case $ac_var in #(
19419 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19420$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19421 esac
19422 case $ac_var in #(
19423 _ | IFS | as_nl) ;; #(
19424 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19425 *) { eval $ac_var=; unset $ac_var;} ;;
19426 esac ;;
19427 esac
19428 done
19429
bec39cab 19430 (set) 2>&1 |
81ecdfbb
RW
19431 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19432 *${as_nl}ac_space=\ *)
19433 # `set' does not quote correctly, so add quotes: double-quote
19434 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
19435 sed -n \
19436 "s/'/'\\\\''/g;
19437 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 19438 ;; #(
bec39cab
AC
19439 *)
19440 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 19441 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 19442 ;;
81ecdfbb
RW
19443 esac |
19444 sort
19445) |
bec39cab 19446 sed '
81ecdfbb 19447 /^ac_cv_env_/b end
bec39cab 19448 t clear
81ecdfbb 19449 :clear
bec39cab
AC
19450 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19451 t end
81ecdfbb
RW
19452 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19453 :end' >>confcache
19454if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19455 if test -w "$cache_file"; then
d0ac1c44 19456 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
19457 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19458$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
19459 if test ! -f "$cache_file" || test -h "$cache_file"; then
19460 cat confcache >"$cache_file"
19461 else
19462 case $cache_file in #(
19463 */* | ?:*)
19464 mv -f confcache "$cache_file"$$ &&
19465 mv -f "$cache_file"$$ "$cache_file" ;; #(
19466 *)
19467 mv -f confcache "$cache_file" ;;
19468 esac
19469 fi
19470 fi
bec39cab 19471 else
81ecdfbb
RW
19472 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19473$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
19474 fi
19475fi
19476rm -f confcache
19477
19478test "x$prefix" = xNONE && prefix=$ac_default_prefix
19479# Let make expand exec_prefix.
19480test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19481
bec39cab
AC
19482DEFS=-DHAVE_CONFIG_H
19483
19484ac_libobjs=
19485ac_ltlibobjs=
d0ac1c44 19486U=
bec39cab
AC
19487for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19488 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
19489 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19490 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19491 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19492 # will be set to the directory where LIBOBJS objects are built.
19493 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19494 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
19495done
19496LIBOBJS=$ac_libobjs
19497
19498LTLIBOBJS=$ac_ltlibobjs
19499
19500
85981d60 19501if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 19502 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 19503Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 19504fi
4df42755 19505if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 19506 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
19507Usually this means the macro was only invoked conditionally." "$LINENO" 5
19508fi
19509if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 19510 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
19511Usually this means the macro was only invoked conditionally." "$LINENO" 5
19512fi
81ecdfbb
RW
19513
19514
d0ac1c44 19515: "${CONFIG_STATUS=./config.status}"
81ecdfbb 19516ac_write_fail=0
bec39cab
AC
19517ac_clean_files_save=$ac_clean_files
19518ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
19519{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19520$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19521as_write_fail=0
19522cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
19523#! $SHELL
19524# Generated by $as_me.
19525# Run this file to recreate the current configuration.
19526# Compiler output produced by configure, useful for debugging
19527# configure, is in config.log if it exists.
19528
19529debug=false
19530ac_cs_recheck=false
19531ac_cs_silent=false
bec39cab 19532
81ecdfbb
RW
19533SHELL=\${CONFIG_SHELL-$SHELL}
19534export SHELL
19535_ASEOF
19536cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19537## -------------------- ##
19538## M4sh Initialization. ##
19539## -------------------- ##
19540
19541# Be more Bourne compatible
19542DUALCASE=1; export DUALCASE # for MKS sh
19543if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
19544 emulate sh
19545 NULLCMD=:
81ecdfbb 19546 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
19547 # is contrary to our usage. Disable this feature.
19548 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
19549 setopt NO_GLOB_SUBST
19550else
19551 case `(set -o) 2>/dev/null` in #(
19552 *posix*) :
19553 set -o posix ;; #(
19554 *) :
19555 ;;
19556esac
bec39cab 19557fi
bec39cab 19558
81ecdfbb
RW
19559
19560as_nl='
19561'
19562export as_nl
19563# Printing a long string crashes Solaris 7 /usr/bin/printf.
19564as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19565as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19566as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19567# Prefer a ksh shell builtin over an external printf program on Solaris,
19568# but without wasting forks for bash or zsh.
19569if test -z "$BASH_VERSION$ZSH_VERSION" \
19570 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19571 as_echo='print -r --'
19572 as_echo_n='print -rn --'
19573elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19574 as_echo='printf %s\n'
19575 as_echo_n='printf %s'
19576else
19577 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19578 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19579 as_echo_n='/usr/ucb/echo -n'
19580 else
19581 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19582 as_echo_n_body='eval
19583 arg=$1;
19584 case $arg in #(
19585 *"$as_nl"*)
19586 expr "X$arg" : "X\\(.*\\)$as_nl";
19587 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19588 esac;
19589 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19590 '
19591 export as_echo_n_body
19592 as_echo_n='sh -c $as_echo_n_body as_echo'
19593 fi
19594 export as_echo_body
19595 as_echo='sh -c $as_echo_body as_echo'
19596fi
19597
19598# The user is always right.
19599if test "${PATH_SEPARATOR+set}" != set; then
19600 PATH_SEPARATOR=:
19601 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19602 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19603 PATH_SEPARATOR=';'
19604 }
bec39cab
AC
19605fi
19606
19607
81ecdfbb
RW
19608# IFS
19609# We need space, tab and new line, in precisely that order. Quoting is
19610# there to prevent editors from complaining about space-tab.
19611# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19612# splitting by setting IFS to empty value.)
19613IFS=" "" $as_nl"
19614
19615# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 19616as_myself=
81ecdfbb
RW
19617case $0 in #((
19618 *[\\/]* ) as_myself=$0 ;;
19619 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19620for as_dir in $PATH
19621do
19622 IFS=$as_save_IFS
19623 test -z "$as_dir" && as_dir=.
19624 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19625 done
19626IFS=$as_save_IFS
19627
19628 ;;
19629esac
19630# We did not find ourselves, most probably we were run as `sh COMMAND'
19631# in which case we are not to be found in the path.
19632if test "x$as_myself" = x; then
19633 as_myself=$0
19634fi
19635if test ! -f "$as_myself"; then
19636 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19637 exit 1
19638fi
19639
19640# Unset variables that we do not need and which cause bugs (e.g. in
19641# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19642# suppresses any "Segmentation fault" message there. '((' could
19643# trigger a bug in pdksh 5.2.14.
19644for as_var in BASH_ENV ENV MAIL MAILPATH
19645do eval test x\${$as_var+set} = xset \
19646 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19647done
bec39cab
AC
19648PS1='$ '
19649PS2='> '
19650PS4='+ '
19651
19652# NLS nuisances.
81ecdfbb
RW
19653LC_ALL=C
19654export LC_ALL
19655LANGUAGE=C
19656export LANGUAGE
19657
19658# CDPATH.
19659(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19660
19661
d0ac1c44
SM
19662# as_fn_error STATUS ERROR [LINENO LOG_FD]
19663# ----------------------------------------
81ecdfbb
RW
19664# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19665# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 19666# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
19667as_fn_error ()
19668{
d0ac1c44
SM
19669 as_status=$1; test $as_status -eq 0 && as_status=1
19670 if test "$4"; then
19671 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19672 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 19673 fi
d0ac1c44 19674 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
19675 as_fn_exit $as_status
19676} # as_fn_error
19677
19678
19679# as_fn_set_status STATUS
19680# -----------------------
19681# Set $? to STATUS, without forking.
19682as_fn_set_status ()
19683{
19684 return $1
19685} # as_fn_set_status
19686
19687# as_fn_exit STATUS
19688# -----------------
19689# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19690as_fn_exit ()
19691{
19692 set +e
19693 as_fn_set_status $1
19694 exit $1
19695} # as_fn_exit
19696
19697# as_fn_unset VAR
19698# ---------------
19699# Portably unset VAR.
19700as_fn_unset ()
19701{
19702 { eval $1=; unset $1;}
19703}
19704as_unset=as_fn_unset
19705# as_fn_append VAR VALUE
19706# ----------------------
19707# Append the text in VALUE to the end of the definition contained in VAR. Take
19708# advantage of any shell optimizations that allow amortized linear growth over
19709# repeated appends, instead of the typical quadratic growth present in naive
19710# implementations.
19711if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19712 eval 'as_fn_append ()
19713 {
19714 eval $1+=\$2
19715 }'
19716else
19717 as_fn_append ()
19718 {
19719 eval $1=\$$1\$2
19720 }
19721fi # as_fn_append
19722
19723# as_fn_arith ARG...
19724# ------------------
19725# Perform arithmetic evaluation on the ARGs, and store the result in the
19726# global $as_val. Take advantage of shells that can avoid forks. The arguments
19727# must be portable across $(()) and expr.
19728if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19729 eval 'as_fn_arith ()
19730 {
19731 as_val=$(( $* ))
19732 }'
19733else
19734 as_fn_arith ()
19735 {
19736 as_val=`expr "$@" || test $? -eq 1`
19737 }
19738fi # as_fn_arith
bec39cab 19739
81ecdfbb
RW
19740
19741if expr a : '\(a\)' >/dev/null 2>&1 &&
19742 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
19743 as_expr=expr
19744else
19745 as_expr=false
19746fi
19747
81ecdfbb 19748if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
19749 as_basename=basename
19750else
19751 as_basename=false
19752fi
19753
81ecdfbb
RW
19754if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19755 as_dirname=dirname
19756else
19757 as_dirname=false
19758fi
bec39cab 19759
81ecdfbb 19760as_me=`$as_basename -- "$0" ||
bec39cab
AC
19761$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19762 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
19763 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19764$as_echo X/"$0" |
19765 sed '/^.*\/\([^/][^/]*\)\/*$/{
19766 s//\1/
19767 q
19768 }
19769 /^X\/\(\/\/\)$/{
19770 s//\1/
19771 q
19772 }
19773 /^X\/\(\/\).*/{
19774 s//\1/
19775 q
19776 }
19777 s/.*/./; q'`
b4e70030 19778
b4e70030
JB
19779# Avoid depending upon Character Ranges.
19780as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19781as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19782as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19783as_cr_digits='0123456789'
19784as_cr_alnum=$as_cr_Letters$as_cr_digits
19785
81ecdfbb
RW
19786ECHO_C= ECHO_N= ECHO_T=
19787case `echo -n x` in #(((((
19788-n*)
19789 case `echo 'xy\c'` in
19790 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19791 xy) ECHO_C='\c';;
19792 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19793 ECHO_T=' ';;
19794 esac;;
19795*)
19796 ECHO_N='-n';;
bec39cab
AC
19797esac
19798
81ecdfbb
RW
19799rm -f conf$$ conf$$.exe conf$$.file
19800if test -d conf$$.dir; then
19801 rm -f conf$$.dir/conf$$.file
bec39cab 19802else
81ecdfbb
RW
19803 rm -f conf$$.dir
19804 mkdir conf$$.dir 2>/dev/null
bec39cab 19805fi
81ecdfbb
RW
19806if (echo >conf$$.file) 2>/dev/null; then
19807 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 19808 as_ln_s='ln -s'
81ecdfbb
RW
19809 # ... but there are two gotchas:
19810 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19811 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 19812 # In both cases, we have to default to `cp -pR'.
81ecdfbb 19813 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 19814 as_ln_s='cp -pR'
81ecdfbb
RW
19815 elif ln conf$$.file conf$$ 2>/dev/null; then
19816 as_ln_s=ln
19817 else
d0ac1c44 19818 as_ln_s='cp -pR'
b4e70030 19819 fi
bec39cab 19820else
d0ac1c44 19821 as_ln_s='cp -pR'
bec39cab 19822fi
81ecdfbb
RW
19823rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19824rmdir conf$$.dir 2>/dev/null
19825
19826
19827# as_fn_mkdir_p
19828# -------------
19829# Create "$as_dir" as a directory, including parents if necessary.
19830as_fn_mkdir_p ()
19831{
19832
19833 case $as_dir in #(
19834 -*) as_dir=./$as_dir;;
19835 esac
19836 test -d "$as_dir" || eval $as_mkdir_p || {
19837 as_dirs=
19838 while :; do
19839 case $as_dir in #(
19840 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19841 *) as_qdir=$as_dir;;
19842 esac
19843 as_dirs="'$as_qdir' $as_dirs"
19844 as_dir=`$as_dirname -- "$as_dir" ||
19845$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19846 X"$as_dir" : 'X\(//\)[^/]' \| \
19847 X"$as_dir" : 'X\(//\)$' \| \
19848 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19849$as_echo X"$as_dir" |
19850 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19851 s//\1/
19852 q
19853 }
19854 /^X\(\/\/\)[^/].*/{
19855 s//\1/
19856 q
19857 }
19858 /^X\(\/\/\)$/{
19859 s//\1/
19860 q
19861 }
19862 /^X\(\/\).*/{
19863 s//\1/
19864 q
19865 }
19866 s/.*/./; q'`
19867 test -d "$as_dir" && break
19868 done
19869 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 19870 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 19871
bec39cab 19872
81ecdfbb 19873} # as_fn_mkdir_p
bec39cab 19874if mkdir -p . 2>/dev/null; then
81ecdfbb 19875 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
19876else
19877 test -d ./-p && rmdir ./-p
19878 as_mkdir_p=false
19879fi
19880
d0ac1c44
SM
19881
19882# as_fn_executable_p FILE
19883# -----------------------
19884# Test if FILE is an executable regular file.
19885as_fn_executable_p ()
19886{
19887 test -f "$1" && test -x "$1"
19888} # as_fn_executable_p
19889as_test_x='test -x'
19890as_executable_p=as_fn_executable_p
bec39cab
AC
19891
19892# Sed expression to map a string onto a valid CPP name.
19893as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19894
19895# Sed expression to map a string onto a valid variable name.
19896as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19897
19898
bec39cab 19899exec 6>&1
81ecdfbb
RW
19900## ----------------------------------- ##
19901## Main body of $CONFIG_STATUS script. ##
19902## ----------------------------------- ##
19903_ASEOF
19904test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19905
19906cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19907# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 19908# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
19909# values after options handling.
19910ac_log="
bec39cab 19911This file was extended by $as_me, which was
d0ac1c44 19912generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
19913
19914 CONFIG_FILES = $CONFIG_FILES
19915 CONFIG_HEADERS = $CONFIG_HEADERS
19916 CONFIG_LINKS = $CONFIG_LINKS
19917 CONFIG_COMMANDS = $CONFIG_COMMANDS
19918 $ $0 $@
19919
81ecdfbb
RW
19920on `(hostname || uname -n) 2>/dev/null | sed 1q`
19921"
19922
bec39cab
AC
19923_ACEOF
19924
81ecdfbb
RW
19925case $ac_config_files in *"
19926"*) set x $ac_config_files; shift; ac_config_files=$*;;
19927esac
234b45d4 19928
81ecdfbb
RW
19929case $ac_config_headers in *"
19930"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19931esac
b4e70030 19932
b4e70030 19933
81ecdfbb
RW
19934cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19935# Files that config.status was made for.
19936config_files="$ac_config_files"
19937config_headers="$ac_config_headers"
19938config_links="$ac_config_links"
19939config_commands="$ac_config_commands"
234b45d4 19940
81ecdfbb 19941_ACEOF
b4e70030 19942
81ecdfbb 19943cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 19944ac_cs_usage="\
81ecdfbb
RW
19945\`$as_me' instantiates files and other configuration actions
19946from templates according to the current configuration. Unless the files
19947and actions are specified as TAGs, all are instantiated by default.
234b45d4 19948
81ecdfbb 19949Usage: $0 [OPTION]... [TAG]...
234b45d4 19950
bec39cab 19951 -h, --help print this help, then exit
81ecdfbb 19952 -V, --version print version number and configuration settings, then exit
d0ac1c44 19953 --config print configuration, then exit
81ecdfbb
RW
19954 -q, --quiet, --silent
19955 do not print progress messages
bec39cab
AC
19956 -d, --debug don't remove temporary files
19957 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
19958 --file=FILE[:TEMPLATE]
19959 instantiate the configuration file FILE
19960 --header=FILE[:TEMPLATE]
19961 instantiate the configuration header FILE
234b45d4 19962
bec39cab
AC
19963Configuration files:
19964$config_files
234b45d4 19965
bec39cab
AC
19966Configuration headers:
19967$config_headers
234b45d4 19968
bec39cab
AC
19969Configuration links:
19970$config_links
234b45d4 19971
bec39cab
AC
19972Configuration commands:
19973$config_commands
19974
81ecdfbb 19975Report bugs to the package provider."
b4e70030 19976
81ecdfbb
RW
19977_ACEOF
19978cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 19979ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
19980ac_cs_version="\\
19981config.status
d0ac1c44
SM
19982configured by $0, generated by GNU Autoconf 2.69,
19983 with options \\"\$ac_cs_config\\"
bec39cab 19984
d0ac1c44 19985Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
19986This config.status script is free software; the Free Software Foundation
19987gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
19988
19989ac_pwd='$ac_pwd'
19990srcdir='$srcdir'
19991INSTALL='$INSTALL'
81ecdfbb
RW
19992AWK='$AWK'
19993test -n "\$AWK" || AWK=awk
bec39cab
AC
19994_ACEOF
19995
81ecdfbb
RW
19996cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19997# The default lists apply if the user does not specify any file.
bec39cab
AC
19998ac_need_defaults=:
19999while test $# != 0
20000do
20001 case $1 in
d0ac1c44 20002 --*=?*)
81ecdfbb
RW
20003 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20004 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 20005 ac_shift=:
c906108c 20006 ;;
d0ac1c44
SM
20007 --*=)
20008 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20009 ac_optarg=
20010 ac_shift=:
20011 ;;
81ecdfbb 20012 *)
bec39cab
AC
20013 ac_option=$1
20014 ac_optarg=$2
20015 ac_shift=shift
c906108c 20016 ;;
bec39cab 20017 esac
c906108c 20018
bec39cab
AC
20019 case $ac_option in
20020 # Handling of the options.
bec39cab
AC
20021 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20022 ac_cs_recheck=: ;;
81ecdfbb
RW
20023 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20024 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
20025 --config | --confi | --conf | --con | --co | --c )
20026 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 20027 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
20028 debug=: ;;
20029 --file | --fil | --fi | --f )
20030 $ac_shift
81ecdfbb
RW
20031 case $ac_optarg in
20032 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 20033 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
20034 esac
20035 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
20036 ac_need_defaults=false;;
20037 --header | --heade | --head | --hea )
20038 $ac_shift
81ecdfbb
RW
20039 case $ac_optarg in
20040 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20041 esac
20042 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 20043 ac_need_defaults=false;;
81ecdfbb
RW
20044 --he | --h)
20045 # Conflict between --help and --header
d0ac1c44 20046 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
20047Try \`$0 --help' for more information.";;
20048 --help | --hel | -h )
20049 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
20050 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20051 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20052 ac_cs_silent=: ;;
c906108c 20053
bec39cab 20054 # This is an error.
d0ac1c44 20055 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 20056Try \`$0 --help' for more information." ;;
c906108c 20057
81ecdfbb
RW
20058 *) as_fn_append ac_config_targets " $1"
20059 ac_need_defaults=false ;;
c906108c 20060
bec39cab
AC
20061 esac
20062 shift
20063done
c906108c 20064
bec39cab 20065ac_configure_extra_args=
c906108c 20066
bec39cab
AC
20067if $ac_cs_silent; then
20068 exec 6>/dev/null
20069 ac_configure_extra_args="$ac_configure_extra_args --silent"
20070fi
c906108c 20071
bec39cab 20072_ACEOF
81ecdfbb 20073cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 20074if \$ac_cs_recheck; then
d0ac1c44 20075 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
20076 shift
20077 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20078 CONFIG_SHELL='$SHELL'
20079 export CONFIG_SHELL
20080 exec "\$@"
bec39cab
AC
20081fi
20082
20083_ACEOF
81ecdfbb
RW
20084cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20085exec 5>>config.log
20086{
20087 echo
20088 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20089## Running $as_me. ##
20090_ASBOX
20091 $as_echo "$ac_log"
20092} >&5
bec39cab 20093
81ecdfbb
RW
20094_ACEOF
20095cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 20096#
81ecdfbb 20097# INIT-COMMANDS
c906108c 20098#
a417dc56 20099ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 20100GDB_NM_FILE=$GDB_NM_FILE
b4e70030 20101
bec39cab
AC
20102_ACEOF
20103
81ecdfbb 20104cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 20105
81ecdfbb 20106# Handling of arguments.
bec39cab 20107for ac_config_target in $ac_config_targets
c906108c 20108do
81ecdfbb
RW
20109 case $ac_config_target in
20110 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20111 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 20112 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 20113 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 20114 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 20115 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 20116 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 20117 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 20118 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 20119 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 20120
d0ac1c44 20121 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
20122 esac
20123done
20124
81ecdfbb 20125
bec39cab
AC
20126# If the user did not use the arguments to specify the items to instantiate,
20127# then the envvar interface is used. Set only those that are not.
20128# We use the long form for the default assignment because of an extremely
20129# bizarre bug on SunOS 4.1.3.
20130if $ac_need_defaults; then
20131 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20132 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20133 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20134 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20135fi
20136
b4e70030 20137# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 20138# simply because there is no reason against having it here, and in addition,
b4e70030 20139# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
20140# Hook for its removal unless debugging.
20141# Note that there is a small window in which the directory will not be cleaned:
20142# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
20143$debug ||
20144{
d0ac1c44 20145 tmp= ac_tmp=
81ecdfbb 20146 trap 'exit_status=$?
d0ac1c44
SM
20147 : "${ac_tmp:=$tmp}"
20148 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
20149' 0
20150 trap 'as_fn_exit 1' 1 2 13 15
20151}
20152# Create a (secure) tmp directory for tmp files.
20153
20154{
20155 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 20156 test -d "$tmp"
81ecdfbb
RW
20157} ||
20158{
20159 tmp=./conf$$-$RANDOM
20160 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
20161} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20162ac_tmp=$tmp
81ecdfbb
RW
20163
20164# Set up the scripts for CONFIG_FILES section.
20165# No need to generate them if there are no CONFIG_FILES.
20166# This happens for instance with `./config.status config.h'.
20167if test -n "$CONFIG_FILES"; then
20168
20169if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20170 ac_cs_awk_getline=:
20171 ac_cs_awk_pipe_init=
20172 ac_cs_awk_read_file='
20173 while ((getline aline < (F[key])) > 0)
20174 print(aline)
20175 close(F[key])'
20176 ac_cs_awk_pipe_fini=
20177else
20178 ac_cs_awk_getline=false
20179 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20180 ac_cs_awk_read_file='
20181 print "|#_!!_#|"
20182 print "cat " F[key] " &&"
20183 '$ac_cs_awk_pipe_init
20184 # The final `:' finishes the AND list.
20185 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20186fi
20187ac_cr=`echo X | tr X '\015'`
20188# On cygwin, bash can eat \r inside `` if the user requested igncr.
20189# But we know of no other shell where ac_cr would be empty at this
20190# point, so we can use a bashism as a fallback.
20191if test "x$ac_cr" = x; then
20192 eval ac_cr=\$\'\\r\'
20193fi
20194ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20195if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 20196 ac_cs_awk_cr='\\r'
81ecdfbb
RW
20197else
20198 ac_cs_awk_cr=$ac_cr
20199fi
20200
d0ac1c44 20201echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
20202_ACEOF
20203
20204# Create commands to substitute file output variables.
20205{
20206 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 20207 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
20208 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20209 echo "_ACAWK" &&
20210 echo "_ACEOF"
20211} >conf$$files.sh &&
20212. ./conf$$files.sh ||
d0ac1c44 20213 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20214rm -f conf$$files.sh
20215
20216{
20217 echo "cat >conf$$subs.awk <<_ACEOF" &&
20218 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20219 echo "_ACEOF"
20220} >conf$$subs.sh ||
d0ac1c44
SM
20221 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20222ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
20223ac_delim='%!_!# '
20224for ac_last_try in false false false false false :; do
20225 . ./conf$$subs.sh ||
d0ac1c44 20226 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20227
20228 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20229 if test $ac_delim_n = $ac_delim_num; then
20230 break
20231 elif $ac_last_try; then
d0ac1c44 20232 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20233 else
20234 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20235 fi
20236done
20237rm -f conf$$subs.sh
20238
20239cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 20240cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
20241_ACEOF
20242sed -n '
20243h
20244s/^/S["/; s/!.*/"]=/
20245p
20246g
20247s/^[^!]*!//
20248:repl
20249t repl
20250s/'"$ac_delim"'$//
20251t delim
20252:nl
20253h
d0ac1c44 20254s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20255t more1
20256s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20257p
20258n
20259b repl
20260:more1
20261s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20262p
20263g
20264s/.\{148\}//
20265t nl
20266:delim
20267h
d0ac1c44 20268s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20269t more2
20270s/["\\]/\\&/g; s/^/"/; s/$/"/
20271p
20272b
20273:more2
20274s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20275p
20276g
20277s/.\{148\}//
20278t delim
20279' <conf$$subs.awk | sed '
20280/^[^""]/{
20281 N
20282 s/\n//
20283}
20284' >>$CONFIG_STATUS || ac_write_fail=1
20285rm -f conf$$subs.awk
20286cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20287_ACAWK
d0ac1c44 20288cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
20289 for (key in S) S_is_set[key] = 1
20290 FS = "\a"
20291 \$ac_cs_awk_pipe_init
20292}
20293{
20294 line = $ 0
20295 nfields = split(line, field, "@")
20296 substed = 0
20297 len = length(field[1])
20298 for (i = 2; i < nfields; i++) {
20299 key = field[i]
20300 keylen = length(key)
20301 if (S_is_set[key]) {
20302 value = S[key]
20303 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20304 len += length(value) + length(field[++i])
20305 substed = 1
20306 } else
20307 len += 1 + keylen
20308 }
20309 if (nfields == 3 && !substed) {
20310 key = field[2]
20311 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20312 \$ac_cs_awk_read_file
20313 next
20314 }
20315 }
20316 print line
b4e70030 20317}
81ecdfbb
RW
20318\$ac_cs_awk_pipe_fini
20319_ACAWK
20320_ACEOF
20321cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20322if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20323 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20324else
20325 cat
d0ac1c44
SM
20326fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20327 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
20328_ACEOF
20329
d0ac1c44
SM
20330# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20331# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
20332# trailing colons and then remove the whole line if VPATH becomes empty
20333# (actually we leave an empty line to preserve line numbers).
20334if test "x$srcdir" = x.; then
d0ac1c44
SM
20335 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20336h
20337s///
20338s/^/:/
20339s/[ ]*$/:/
20340s/:\$(srcdir):/:/g
20341s/:\${srcdir}:/:/g
20342s/:@srcdir@:/:/g
20343s/^:*//
81ecdfbb 20344s/:*$//
d0ac1c44
SM
20345x
20346s/\(=[ ]*\).*/\1/
20347G
20348s/\n//
81ecdfbb
RW
20349s/^[^=]*=[ ]*$//
20350}'
20351fi
20352
20353cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20354fi # test -n "$CONFIG_FILES"
20355
20356# Set up the scripts for CONFIG_HEADERS section.
20357# No need to generate them if there are no CONFIG_HEADERS.
20358# This happens for instance with `./config.status Makefile'.
20359if test -n "$CONFIG_HEADERS"; then
d0ac1c44 20360cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
20361BEGIN {
20362_ACEOF
20363
20364# Transform confdefs.h into an awk script `defines.awk', embedded as
20365# here-document in config.status, that substitutes the proper values into
20366# config.h.in to produce config.h.
4e8d927d 20367
81ecdfbb
RW
20368# Create a delimiter string that does not exist in confdefs.h, to ease
20369# handling of long lines.
20370ac_delim='%!_!# '
20371for ac_last_try in false false :; do
d0ac1c44
SM
20372 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20373 if test -z "$ac_tt"; then
81ecdfbb
RW
20374 break
20375 elif $ac_last_try; then
d0ac1c44 20376 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
20377 else
20378 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20379 fi
20380done
4e8d927d 20381
81ecdfbb
RW
20382# For the awk script, D is an array of macro values keyed by name,
20383# likewise P contains macro parameters if any. Preserve backslash
20384# newline sequences.
20385
20386ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20387sed -n '
20388s/.\{148\}/&'"$ac_delim"'/g
20389t rset
20390:rset
20391s/^[ ]*#[ ]*define[ ][ ]*/ /
20392t def
20393d
20394:def
20395s/\\$//
20396t bsnl
20397s/["\\]/\\&/g
20398s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20399D["\1"]=" \3"/p
20400s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20401d
20402:bsnl
20403s/["\\]/\\&/g
20404s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20405D["\1"]=" \3\\\\\\n"\\/p
20406t cont
20407s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20408t cont
20409d
20410:cont
20411n
20412s/.\{148\}/&'"$ac_delim"'/g
20413t clear
20414:clear
20415s/\\$//
20416t bsnlc
20417s/["\\]/\\&/g; s/^/"/; s/$/"/p
20418d
20419:bsnlc
20420s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20421b cont
20422' <confdefs.h | sed '
20423s/'"$ac_delim"'/"\\\
20424"/g' >>$CONFIG_STATUS || ac_write_fail=1
20425
20426cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20427 for (key in D) D_is_set[key] = 1
20428 FS = "\a"
20429}
20430/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20431 line = \$ 0
20432 split(line, arg, " ")
20433 if (arg[1] == "#") {
20434 defundef = arg[2]
20435 mac1 = arg[3]
20436 } else {
20437 defundef = substr(arg[1], 2)
20438 mac1 = arg[2]
20439 }
20440 split(mac1, mac2, "(") #)
20441 macro = mac2[1]
20442 prefix = substr(line, 1, index(line, defundef) - 1)
20443 if (D_is_set[macro]) {
20444 # Preserve the white space surrounding the "#".
20445 print prefix "define", macro P[macro] D[macro]
20446 next
20447 } else {
20448 # Replace #undef with comments. This is necessary, for example,
20449 # in the case of _POSIX_SOURCE, which is predefined and required
20450 # on some systems where configure will not decide to define it.
20451 if (defundef == "undef") {
20452 print "/*", prefix defundef, macro, "*/"
20453 next
20454 }
20455 }
b4e70030 20456}
81ecdfbb
RW
20457{ print }
20458_ACAWK
b4e70030 20459_ACEOF
81ecdfbb 20460cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 20461 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 20462fi # test -n "$CONFIG_HEADERS"
4e8d927d 20463
4e8d927d 20464
81ecdfbb
RW
20465eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20466shift
20467for ac_tag
20468do
20469 case $ac_tag in
20470 :[FHLC]) ac_mode=$ac_tag; continue;;
20471 esac
20472 case $ac_mode$ac_tag in
20473 :[FHL]*:*);;
d0ac1c44 20474 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
20475 :[FH]-) ac_tag=-:-;;
20476 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20477 esac
20478 ac_save_IFS=$IFS
20479 IFS=:
20480 set x $ac_tag
20481 IFS=$ac_save_IFS
20482 shift
20483 ac_file=$1
20484 shift
4e8d927d 20485
81ecdfbb
RW
20486 case $ac_mode in
20487 :L) ac_source=$1;;
20488 :[FH])
20489 ac_file_inputs=
20490 for ac_f
20491 do
20492 case $ac_f in
d0ac1c44 20493 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
20494 *) # Look for the file first in the build tree, then in the source tree
20495 # (if the path is not absolute). The absolute path cannot be DOS-style,
20496 # because $ac_f cannot contain `:'.
20497 test -f "$ac_f" ||
20498 case $ac_f in
20499 [\\/$]*) false;;
20500 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20501 esac ||
d0ac1c44 20502 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
20503 esac
20504 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20505 as_fn_append ac_file_inputs " '$ac_f'"
20506 done
20507
20508 # Let's still pretend it is `configure' which instantiates (i.e., don't
20509 # use $as_me), people would be surprised to read:
20510 # /* config.h. Generated by config.status. */
20511 configure_input='Generated from '`
20512 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20513 `' by configure.'
20514 if test x"$ac_file" != x-; then
20515 configure_input="$ac_file. $configure_input"
20516 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20517$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 20518 fi
81ecdfbb
RW
20519 # Neutralize special characters interpreted by sed in replacement strings.
20520 case $configure_input in #(
20521 *\&* | *\|* | *\\* )
20522 ac_sed_conf_input=`$as_echo "$configure_input" |
20523 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20524 *) ac_sed_conf_input=$configure_input;;
20525 esac
4e8d927d 20526
81ecdfbb 20527 case $ac_tag in
d0ac1c44
SM
20528 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20529 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
20530 esac
20531 ;;
c906108c
SS
20532 esac
20533
81ecdfbb 20534 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
20535$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20536 X"$ac_file" : 'X\(//\)[^/]' \| \
20537 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
20538 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20539$as_echo X"$ac_file" |
20540 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20541 s//\1/
20542 q
20543 }
20544 /^X\(\/\/\)[^/].*/{
20545 s//\1/
20546 q
20547 }
20548 /^X\(\/\/\)$/{
20549 s//\1/
20550 q
20551 }
20552 /^X\(\/\).*/{
20553 s//\1/
20554 q
20555 }
20556 s/.*/./; q'`
20557 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20558 ac_builddir=.
20559
81ecdfbb
RW
20560case "$ac_dir" in
20561.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20562*)
20563 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20564 # A ".." for each directory in $ac_dir_suffix.
20565 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20566 case $ac_top_builddir_sub in
20567 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20568 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20569 esac ;;
20570esac
20571ac_abs_top_builddir=$ac_pwd
20572ac_abs_builddir=$ac_pwd$ac_dir_suffix
20573# for backward compatibility:
20574ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20575
20576case $srcdir in
81ecdfbb 20577 .) # We are building in place.
bec39cab 20578 ac_srcdir=.
81ecdfbb
RW
20579 ac_top_srcdir=$ac_top_builddir_sub
20580 ac_abs_top_srcdir=$ac_pwd ;;
20581 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20582 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20583 ac_top_srcdir=$srcdir
20584 ac_abs_top_srcdir=$srcdir ;;
20585 *) # Relative name.
20586 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20587 ac_top_srcdir=$ac_top_build_prefix$srcdir
20588 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20589esac
81ecdfbb 20590ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 20591
c906108c 20592
81ecdfbb
RW
20593 case $ac_mode in
20594 :F)
20595 #
20596 # CONFIG_FILE
20597 #
c906108c 20598
bec39cab
AC
20599 case $INSTALL in
20600 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 20601 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 20602 esac
81ecdfbb 20603_ACEOF
121ce6e5 20604
81ecdfbb
RW
20605cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20606# If the template does not know about datarootdir, expand it.
20607# FIXME: This hack should be removed a few years after 2.60.
20608ac_datarootdir_hack=; ac_datarootdir_seen=
20609ac_sed_dataroot='
20610/datarootdir/ {
20611 p
20612 q
20613}
20614/@datadir@/p
20615/@docdir@/p
20616/@infodir@/p
20617/@localedir@/p
20618/@mandir@/p'
20619case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20620*datarootdir*) ac_datarootdir_seen=yes;;
20621*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20622 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20623$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20624_ACEOF
20625cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20626 ac_datarootdir_hack='
20627 s&@datadir@&$datadir&g
20628 s&@docdir@&$docdir&g
20629 s&@infodir@&$infodir&g
20630 s&@localedir@&$localedir&g
20631 s&@mandir@&$mandir&g
20632 s&\\\${datarootdir}&$datarootdir&g' ;;
20633esac
4e8d927d 20634_ACEOF
81ecdfbb
RW
20635
20636# Neutralize VPATH when `$srcdir' = `.'.
20637# Shell code in configure.ac might set extrasub.
20638# FIXME: do we really want to maintain this feature?
20639cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20640ac_sed_extra="$ac_vpsub
bec39cab
AC
20641$extrasub
20642_ACEOF
81ecdfbb 20643cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
20644:t
20645/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
20646s|@configure_input@|$ac_sed_conf_input|;t t
20647s&@top_builddir@&$ac_top_builddir_sub&;t t
20648s&@top_build_prefix@&$ac_top_build_prefix&;t t
20649s&@srcdir@&$ac_srcdir&;t t
20650s&@abs_srcdir@&$ac_abs_srcdir&;t t
20651s&@top_srcdir@&$ac_top_srcdir&;t t
20652s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20653s&@builddir@&$ac_builddir&;t t
20654s&@abs_builddir@&$ac_abs_builddir&;t t
20655s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20656s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
20657$ac_datarootdir_hack
20658"
20659eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20660if $ac_cs_awk_getline; then
d0ac1c44 20661 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 20662else
d0ac1c44
SM
20663 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20664fi \
20665 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20666
20667test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
20668 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20669 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20670 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 20671 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20672which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 20673$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20674which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 20675
d0ac1c44 20676 rm -f "$ac_tmp/stdin"
bec39cab 20677 case $ac_file in
d0ac1c44
SM
20678 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20679 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 20680 esac \
d0ac1c44 20681 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20682 ;;
20683 :H)
20684 #
20685 # CONFIG_HEADER
20686 #
bec39cab 20687 if test x"$ac_file" != x-; then
81ecdfbb
RW
20688 {
20689 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20690 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20691 } >"$ac_tmp/config.h" \
20692 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20693 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
20694 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20695$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 20696 else
81ecdfbb 20697 rm -f "$ac_file"
d0ac1c44
SM
20698 mv "$ac_tmp/config.h" "$ac_file" \
20699 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
20700 fi
20701 else
81ecdfbb 20702 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20703 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20704 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 20705 fi
81ecdfbb
RW
20706 ;;
20707 :L)
20708 #
20709 # CONFIG_LINK
20710 #
c906108c 20711
81ecdfbb
RW
20712 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20713 :
b4e70030 20714 else
81ecdfbb
RW
20715 # Prefer the file from the source tree if names are identical.
20716 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20717 ac_source=$srcdir/$ac_source
20718 fi
b4e70030 20719
81ecdfbb
RW
20720 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20721$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 20722
81ecdfbb 20723 if test ! -r "$ac_source"; then
d0ac1c44 20724 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
20725 fi
20726 rm -f "$ac_file"
bec39cab 20727
81ecdfbb 20728 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 20729 case $ac_source in
81ecdfbb
RW
20730 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20731 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20732 esac
20733 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20734 ln "$ac_source" "$ac_file" 2>/dev/null ||
20735 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 20736 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
20737 fi
20738 ;;
20739 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20740$as_echo "$as_me: executing $ac_file commands" >&6;}
20741 ;;
c906108c 20742 esac
b4e70030 20743
bec39cab 20744
81ecdfbb 20745 case $ac_file$ac_mode in
c5adaa19 20746 "config.h":H) echo > stamp-h ;;
81ecdfbb 20747 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 20748 "nm.h":L) echo > stamp-nmh ;;
b292c783 20749 "gcore":F) chmod +x gcore ;;
81ecdfbb 20750
bec39cab 20751 esac
81ecdfbb 20752done # for ac_tag
c906108c 20753
bec39cab 20754
81ecdfbb 20755as_fn_exit 0
bec39cab 20756_ACEOF
bec39cab
AC
20757ac_clean_files=$ac_clean_files_save
20758
81ecdfbb 20759test $ac_write_fail = 0 ||
d0ac1c44 20760 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 20761
bec39cab
AC
20762
20763# configure is writing to config.log, and then calls config.status.
20764# config.status does its own redirection, appending to config.log.
20765# Unfortunately, on DOS this fails, as config.log is still kept open
20766# by configure, so config.status won't be able to write to it; its
20767# output is simply discarded. So we exec the FD to /dev/null,
20768# effectively closing config.log, so it can be properly (re)opened and
20769# appended to by config.status. When coming back to configure, we
20770# need to make the FD available again.
20771if test "$no_create" != yes; then
20772 ac_cs_success=:
20773 ac_config_status_args=
20774 test "$silent" = yes &&
20775 ac_config_status_args="$ac_config_status_args --quiet"
20776 exec 5>/dev/null
20777 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20778 exec 5>>config.log
20779 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20780 # would make configure fail if this is the last instruction.
d0ac1c44 20781 $ac_cs_success || as_fn_exit 1
bec39cab 20782fi
c906108c 20783
bec39cab 20784#
81ecdfbb 20785# CONFIG_SUBDIRS section.
bec39cab 20786#
c906108c
SS
20787if test "$no_recursion" != yes; then
20788
81ecdfbb
RW
20789 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20790 # so they do not pile up.
c906108c
SS
20791 ac_sub_configure_args=
20792 ac_prev=
fdc59709
PB
20793 eval "set x $ac_configure_args"
20794 shift
20795 for ac_arg
20796 do
c906108c
SS
20797 if test -n "$ac_prev"; then
20798 ac_prev=
20799 continue
20800 fi
bec39cab 20801 case $ac_arg in
c906108c
SS
20802 -cache-file | --cache-file | --cache-fil | --cache-fi \
20803 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20804 ac_prev=cache_file ;;
20805 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
20806 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20807 | --c=*)
20808 ;;
20809 --config-cache | -C)
c906108c
SS
20810 ;;
20811 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20812 ac_prev=srcdir ;;
20813 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20814 ;;
bec39cab
AC
20815 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20816 ac_prev=prefix ;;
20817 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20818 ;;
81ecdfbb
RW
20819 --disable-option-checking)
20820 ;;
fdc59709
PB
20821 *)
20822 case $ac_arg in
81ecdfbb 20823 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20824 esac
81ecdfbb 20825 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
20826 esac
20827 done
20828
bec39cab
AC
20829 # Always prepend --prefix to ensure using the same prefix
20830 # in subdir configurations.
fdc59709
PB
20831 ac_arg="--prefix=$prefix"
20832 case $ac_arg in
81ecdfbb 20833 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20834 esac
81ecdfbb
RW
20835 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20836
20837 # Pass --silent
20838 if test "$silent" = yes; then
20839 ac_sub_configure_args="--silent $ac_sub_configure_args"
20840 fi
20841
20842 # Always prepend --disable-option-checking to silence warnings, since
20843 # different subdirs can have different --enable and --with options.
20844 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 20845
b4e70030 20846 ac_popdir=`pwd`
bec39cab 20847 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
20848
20849 # Do not complain, so a configure script can configure whichever
20850 # parts of a large source tree are present.
fdc59709 20851 test -d "$srcdir/$ac_dir" || continue
c906108c 20852
81ecdfbb
RW
20853 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20854 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20855 $as_echo "$ac_msg" >&6
20856 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20857 ac_builddir=.
20858
81ecdfbb
RW
20859case "$ac_dir" in
20860.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20861*)
20862 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20863 # A ".." for each directory in $ac_dir_suffix.
20864 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20865 case $ac_top_builddir_sub in
20866 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20867 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20868 esac ;;
20869esac
20870ac_abs_top_builddir=$ac_pwd
20871ac_abs_builddir=$ac_pwd$ac_dir_suffix
20872# for backward compatibility:
20873ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20874
20875case $srcdir in
81ecdfbb 20876 .) # We are building in place.
bec39cab 20877 ac_srcdir=.
81ecdfbb
RW
20878 ac_top_srcdir=$ac_top_builddir_sub
20879 ac_abs_top_srcdir=$ac_pwd ;;
20880 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20881 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20882 ac_top_srcdir=$srcdir
20883 ac_abs_top_srcdir=$srcdir ;;
20884 *) # Relative name.
20885 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20886 ac_top_srcdir=$ac_top_build_prefix$srcdir
20887 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20888esac
81ecdfbb 20889ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 20890
c906108c 20891
fdc59709 20892 cd "$ac_dir"
c906108c
SS
20893
20894 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
20895 if test -f "$ac_srcdir/configure.gnu"; then
20896 ac_sub_configure=$ac_srcdir/configure.gnu
20897 elif test -f "$ac_srcdir/configure"; then
20898 ac_sub_configure=$ac_srcdir/configure
20899 elif test -f "$ac_srcdir/configure.in"; then
20900 # This should be Cygnus configure.
20901 ac_sub_configure=$ac_aux_dir/configure
c906108c 20902 else
81ecdfbb
RW
20903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20904$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
20905 ac_sub_configure=
20906 fi
20907
20908 # The recursion is here.
20909 if test -n "$ac_sub_configure"; then
c906108c 20910 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
20911 case $cache_file in
20912 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
20913 *) # Relative name.
20914 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 20915 esac
c906108c 20916
81ecdfbb
RW
20917 { $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
20918$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 20919 # The eval makes quoting arguments work.
fdc59709
PB
20920 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20921 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 20922 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
20923 fi
20924
fdc59709 20925 cd "$ac_popdir"
c906108c
SS
20926 done
20927fi
81ecdfbb
RW
20928if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20930$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20931fi
c906108c 20932