gdb.base/watchpoint.{c,exp}
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 90as_myself=
81ecdfbb
RW
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
81ecdfbb
RW
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 211do
81ecdfbb
RW
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
81ecdfbb
RW
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 266 else
81ecdfbb
RW
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
bec39cab 271 fi
81ecdfbb
RW
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
bec39cab 301
81ecdfbb
RW
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
81ecdfbb
RW
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
81ecdfbb
RW
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
421 as_expr=expr
422else
423 as_expr=false
424fi
425
81ecdfbb 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
427 as_basename=basename
428else
429 as_basename=false
430fi
431
81ecdfbb
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
bec39cab 437
81ecdfbb 438as_me=`$as_basename -- "$0" ||
bec39cab
AC
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
bec39cab 456
b4e70030
JB
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 463
bec39cab 464
81ecdfbb
RW
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
bec39cab 474 sed '
81ecdfbb
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
bec39cab 479 N
81ecdfbb
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 482 t loop
81ecdfbb 483 s/-\n.*//
bec39cab 484 ' >$as_me.lineno &&
81ecdfbb
RW
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab 487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
bec39cab
AC
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
bec39cab
AC
496 # Exit status is that of the last command.
497 exit
498}
499
81ecdfbb
RW
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
bec39cab
AC
511esac
512
81ecdfbb
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
bec39cab 516else
81ecdfbb
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
bec39cab 519fi
81ecdfbb
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 522 as_ln_s='ln -s'
81ecdfbb
RW
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
81ecdfbb 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
81ecdfbb
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
b4e70030 533 fi
bec39cab 534else
d0ac1c44 535 as_ln_s='cp -pR'
bec39cab 536fi
81ecdfbb
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
bec39cab
AC
539
540if mkdir -p . 2>/dev/null; then
81ecdfbb 541 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
bec39cab
AC
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c906108c 559
bec39cab 560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
bec39cab
AC
565#
566# Initializations.
567#
c906108c 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
b4e70030 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab
AC
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
81ecdfbb 622enable_option_checking=no
d0ac1c44 623ac_header_list=
c971b7fa 624ac_subst_vars='LTLIBOBJS
81ecdfbb 625LIBOBJS
b292c783
JK
626GCORE_TRANSFORM_NAME
627GDB_TRANSFORM_NAME
e3487908 628XSLTPROC
a0a461e5 629NM_H
81ecdfbb 630GDB_NM_FILE
ccb1ba62
CB
631LTLIBXXHASH
632LIBXXHASH
633HAVE_LIBXXHASH
1776e3e5
NA
634CTF_DEPS
635LIBCTF
636ENABLE_LIBCTF
393fd4c3
YQ
637LTLIBBABELTRACE
638LIBBABELTRACE
639HAVE_LIBBABELTRACE
21ea5acd
SDJ
640HAVE_NATIVE_GCORE_HOST
641NAT_GENERATED_FILES
642XM_CLIBS
643MH_CFLAGS
644LOADLIBES
645NAT_CDEPS
646NATDEPFILES
647NAT_FILE
81ecdfbb
RW
648target_subdir
649CONFIG_UNINSTALL
650CONFIG_INSTALL
651CONFIG_CLEAN
652CONFIG_ALL
653CONFIG_SRCS
654CONFIG_DEPS
655CONFIG_OBS
656PROFILE_CFLAGS
657ENABLE_CFLAGS
658SIM_OBS
659SIM
660XMKMF
661GDBTK_SRC_DIR
662GDBTK_CFLAGS
663GDBTKLIBS
664X_LIBS
665X_LDFLAGS
666X_CFLAGS
667TK_XINCLUDES
668TK_DEPS
669TK_LIBRARY
670TK_INCLUDE
671TK_STUB_LIB_SPEC
672TK_STUB_LIB_FLAG
673TK_STUB_LIB_FILE
674TK_LIB_SPEC
675TK_LIB_FLAG
676TK_LIB_FILE
677TK_SRC_DIR
678TK_BIN_DIR
679TK_VERSION
680TCL_DEPS
681TCL_LIBRARY
682TCL_INCLUDE
683TCL_STUB_LIB_SPEC
684TCL_STUB_LIB_FLAG
685TCL_STUB_LIB_FILE
686TCL_LIB_SPEC
687TCL_LIB_FLAG
688TCL_LIB_FILE
689TCL_SRC_DIR
690TCL_BIN_DIR
691TCL_PATCH_LEVEL
692TCL_VERSION
693WIN32LDAPP
b2ceabe8 694WIN32LIBS
81ecdfbb
RW
695GUI_CFLAGS_X
696LIBGUI
608e2dbb
TT
697LTLIBLZMA
698LIBLZMA
699HAVE_LIBLZMA
81ecdfbb
RW
700SER_HARDWIRE
701WERROR_CFLAGS
702WARN_CFLAGS
ed2a2229 703SYSTEM_GDBINIT_DIR
81ecdfbb 704SYSTEM_GDBINIT
81ecdfbb
RW
705TARGET_SYSTEM_ROOT
706CONFIG_LDFLAGS
f6528abd 707RDYNAMIC
05ea2a05
TT
708LTLIBIPT
709LIBIPT
710HAVE_LIBIPT
5e030278
TT
711PTHREAD_CFLAGS
712PTHREAD_LIBS
713PTHREAD_CC
714ax_pthread_config
715SED
81ecdfbb 716ALLOCA
62f29fda
TT
717SRCHIGH_CFLAGS
718SRCHIGH_LIBS
4df42755
DE
719HAVE_GUILE_FALSE
720HAVE_GUILE_TRUE
ed3ef339
DE
721GUILE_LIBS
722GUILE_CPPFLAGS
e76c5d17
DE
723GUILD_TARGET_FLAG
724GUILD
ed3ef339 725pkg_config_prog_path
4df42755
DE
726HAVE_PYTHON_FALSE
727HAVE_PYTHON_TRUE
ac534cba
JB
728PYTHON_LIBS
729PYTHON_CPPFLAGS
81ecdfbb 730PYTHON_CFLAGS
ec685c5e 731python_prog_path
2400729e
UW
732LTLIBMPFR
733LIBMPFR
734HAVE_LIBMPFR
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
c8693053 798LARGEFILE_CPPFLAGS
81ecdfbb
RW
799target_os
800target_vendor
801target_cpu
802target
803host_os
804host_vendor
805host_cpu
806host
807build_os
808build_vendor
809build_cpu
810build
c971b7fa
PA
811EGREP
812GREP
813CPP
3bc3d82a
PA
814ac_ct_CXX
815CXXFLAGS
816CXX
81ecdfbb
RW
817OBJEXT
818EXEEXT
819ac_ct_CC
820CPPFLAGS
821LDFLAGS
822CFLAGS
823CC
824MAINT
825MAINTAINER_MODE_FALSE
826MAINTAINER_MODE_TRUE
827target_alias
828host_alias
829build_alias
830LIBS
831ECHO_T
832ECHO_N
833ECHO_C
834DEFS
835mandir
836localedir
837libdir
838psdir
839pdfdir
840dvidir
841htmldir
842infodir
843docdir
844oldincludedir
845includedir
846localstatedir
847sharedstatedir
848sysconfdir
849datadir
850datarootdir
851libexecdir
852sbindir
853bindir
854program_transform_name
855prefix
856exec_prefix
857PACKAGE_URL
858PACKAGE_BUGREPORT
859PACKAGE_STRING
860PACKAGE_VERSION
861PACKAGE_TARNAME
862PACKAGE_NAME
863PATH_SEPARATOR
864SHELL'
2b351b19 865ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
866ac_user_opts='
867enable_option_checking
868enable_maintainer_mode
da2f07f1
JK
869enable_plugins
870enable_largefile
81ecdfbb
RW
871with_separate_debug_dir
872with_gdb_datadir
873with_relocated_sources
7349ff92 874with_auto_load_dir
bccbefd2 875with_auto_load_safe_path
81ecdfbb
RW
876enable_targets
877enable_64_bit_bfd
81ecdfbb
RW
878enable_gdbmi
879enable_tui
880enable_gdbtk
0d79cdc4 881with_debuginfod
05e7c244 882with_libunwind_ia64
81ecdfbb
RW
883with_curses
884enable_profiling
44cee4fd 885enable_codesign
81ecdfbb
RW
886with_pkgversion
887with_bugurl
711a72d3 888with_system_zlib
016a3251
DD
889with_gnu_ld
890enable_rpath
81ecdfbb 891with_libiconv_prefix
9f1528a1 892with_libiconv_type
478aac75 893with_iconv_bin
81ecdfbb 894with_system_readline
b8e0a31c 895with_jit_reader_dir
81ecdfbb 896with_expat
81ecdfbb 897with_libexpat_prefix
9f1528a1 898with_libexpat_type
2400729e
UW
899with_mpfr
900with_libmpfr_prefix
9f1528a1 901with_libmpfr_type
81ecdfbb 902with_python
d13c7322 903with_python_libdir
ed3ef339 904with_guile
189b8c2e 905enable_source_highlight
58bfce93
MM
906with_intel_pt
907with_libipt_prefix
9f1528a1 908with_libipt_type
81ecdfbb
RW
909with_included_regex
910with_sysroot
911with_system_gdbinit
ed2a2229 912with_system_gdbinit_dir
81ecdfbb
RW
913enable_werror
914enable_build_warnings
915enable_gdb_build_warnings
f35d5ade 916enable_ubsan
608e2dbb
TT
917with_lzma
918with_liblzma_prefix
9f1528a1 919with_liblzma_type
81ecdfbb
RW
920with_tcl
921with_tk
922with_x
923enable_sim
393fd4c3
YQ
924with_babeltrace
925with_libbabeltrace_prefix
9f1528a1 926with_libbabeltrace_type
ccb1ba62 927with_xxhash
1776e3e5 928enable_libctf
ccb1ba62 929with_libxxhash_prefix
9f1528a1 930with_libxxhash_type
8ecfd7bd 931enable_unit_tests
81ecdfbb
RW
932'
933 ac_precious_vars='build_alias
934host_alias
935target_alias
936CC
937CFLAGS
938LDFLAGS
939LIBS
940CPPFLAGS
3bc3d82a
PA
941CXX
942CXXFLAGS
943CCC
81ecdfbb 944CPP
f06e05e0
JK
945MAKEINFO
946MAKEINFOFLAGS
f6720b1c
AM
947PKG_CONFIG
948PKG_CONFIG_PATH
949PKG_CONFIG_LIBDIR
950DEBUGINFOD_CFLAGS
951DEBUGINFOD_LIBS
81ecdfbb
RW
952YACC
953YFLAGS
954XMKMF'
5ae98d25 955ac_subdirs_all='testsuite
919adfe8 956gdbtk'
c906108c
SS
957
958# Initialize some variables set by options.
bec39cab
AC
959ac_init_help=
960ac_init_version=false
81ecdfbb
RW
961ac_unrecognized_opts=
962ac_unrecognized_sep=
c906108c
SS
963# The variables have the same names as the options, with
964# dashes changed to underlines.
bec39cab 965cache_file=/dev/null
c906108c 966exec_prefix=NONE
c906108c 967no_create=
c906108c
SS
968no_recursion=
969prefix=NONE
970program_prefix=NONE
971program_suffix=NONE
972program_transform_name=s,x,x,
973silent=
974site=
975srcdir=
c906108c
SS
976verbose=
977x_includes=NONE
978x_libraries=NONE
bec39cab
AC
979
980# Installation directory options.
981# These are left unexpanded so users can "make install exec_prefix=/foo"
982# and all the variables that are supposed to be based on exec_prefix
983# by default will actually change.
984# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 985# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
986bindir='${exec_prefix}/bin'
987sbindir='${exec_prefix}/sbin'
988libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
989datarootdir='${prefix}/share'
990datadir='${datarootdir}'
c906108c
SS
991sysconfdir='${prefix}/etc'
992sharedstatedir='${prefix}/com'
993localstatedir='${prefix}/var'
c906108c
SS
994includedir='${prefix}/include'
995oldincludedir='/usr/include'
81ecdfbb
RW
996docdir='${datarootdir}/doc/${PACKAGE}'
997infodir='${datarootdir}/info'
998htmldir='${docdir}'
999dvidir='${docdir}'
1000pdfdir='${docdir}'
1001psdir='${docdir}'
1002libdir='${exec_prefix}/lib'
1003localedir='${datarootdir}/locale'
1004mandir='${datarootdir}/man'
c906108c 1005
c906108c 1006ac_prev=
81ecdfbb 1007ac_dashdash=
c906108c
SS
1008for ac_option
1009do
c906108c
SS
1010 # If the previous option needs an argument, assign it.
1011 if test -n "$ac_prev"; then
81ecdfbb 1012 eval $ac_prev=\$ac_option
c906108c
SS
1013 ac_prev=
1014 continue
1015 fi
1016
81ecdfbb 1017 case $ac_option in
d0ac1c44
SM
1018 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1019 *=) ac_optarg= ;;
1020 *) ac_optarg=yes ;;
81ecdfbb 1021 esac
c906108c
SS
1022
1023 # Accept the important Cygnus configure options, so we can diagnose typos.
1024
81ecdfbb
RW
1025 case $ac_dashdash$ac_option in
1026 --)
1027 ac_dashdash=yes ;;
c906108c
SS
1028
1029 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1030 ac_prev=bindir ;;
1031 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1032 bindir=$ac_optarg ;;
c906108c
SS
1033
1034 -build | --build | --buil | --bui | --bu)
bec39cab 1035 ac_prev=build_alias ;;
c906108c 1036 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1037 build_alias=$ac_optarg ;;
c906108c
SS
1038
1039 -cache-file | --cache-file | --cache-fil | --cache-fi \
1040 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1041 ac_prev=cache_file ;;
1042 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1043 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1044 cache_file=$ac_optarg ;;
1045
1046 --config-cache | -C)
1047 cache_file=config.cache ;;
c906108c 1048
81ecdfbb 1049 -datadir | --datadir | --datadi | --datad)
c906108c 1050 ac_prev=datadir ;;
81ecdfbb 1051 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1052 datadir=$ac_optarg ;;
c906108c 1053
81ecdfbb
RW
1054 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1055 | --dataroo | --dataro | --datar)
1056 ac_prev=datarootdir ;;
1057 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1058 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1059 datarootdir=$ac_optarg ;;
1060
c906108c 1061 -disable-* | --disable-*)
81ecdfbb 1062 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1063 # Reject names that are not valid shell variable names.
81ecdfbb 1064 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1065 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1066 ac_useropt_orig=$ac_useropt
1067 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1068 case $ac_user_opts in
1069 *"
1070"enable_$ac_useropt"
1071"*) ;;
1072 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1073 ac_unrecognized_sep=', ';;
1074 esac
1075 eval enable_$ac_useropt=no ;;
1076
1077 -docdir | --docdir | --docdi | --doc | --do)
1078 ac_prev=docdir ;;
1079 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1080 docdir=$ac_optarg ;;
1081
1082 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1083 ac_prev=dvidir ;;
1084 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1085 dvidir=$ac_optarg ;;
c906108c
SS
1086
1087 -enable-* | --enable-*)
81ecdfbb 1088 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1089 # Reject names that are not valid shell variable names.
81ecdfbb 1090 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1091 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1092 ac_useropt_orig=$ac_useropt
1093 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1094 case $ac_user_opts in
1095 *"
1096"enable_$ac_useropt"
1097"*) ;;
1098 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1099 ac_unrecognized_sep=', ';;
b4e70030 1100 esac
81ecdfbb 1101 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1102
1103 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1104 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1105 | --exec | --exe | --ex)
1106 ac_prev=exec_prefix ;;
1107 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1108 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1109 | --exec=* | --exe=* | --ex=*)
bec39cab 1110 exec_prefix=$ac_optarg ;;
c906108c
SS
1111
1112 -gas | --gas | --ga | --g)
1113 # Obsolete; use --with-gas.
1114 with_gas=yes ;;
1115
bec39cab
AC
1116 -help | --help | --hel | --he | -h)
1117 ac_init_help=long ;;
1118 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1119 ac_init_help=recursive ;;
1120 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1121 ac_init_help=short ;;
c906108c
SS
1122
1123 -host | --host | --hos | --ho)
bec39cab 1124 ac_prev=host_alias ;;
c906108c 1125 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1126 host_alias=$ac_optarg ;;
c906108c 1127
81ecdfbb
RW
1128 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1129 ac_prev=htmldir ;;
1130 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1131 | --ht=*)
1132 htmldir=$ac_optarg ;;
1133
c906108c
SS
1134 -includedir | --includedir | --includedi | --included | --include \
1135 | --includ | --inclu | --incl | --inc)
1136 ac_prev=includedir ;;
1137 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1138 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1139 includedir=$ac_optarg ;;
c906108c
SS
1140
1141 -infodir | --infodir | --infodi | --infod | --info | --inf)
1142 ac_prev=infodir ;;
1143 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1144 infodir=$ac_optarg ;;
c906108c
SS
1145
1146 -libdir | --libdir | --libdi | --libd)
1147 ac_prev=libdir ;;
1148 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1149 libdir=$ac_optarg ;;
c906108c
SS
1150
1151 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1152 | --libexe | --libex | --libe)
1153 ac_prev=libexecdir ;;
1154 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1155 | --libexe=* | --libex=* | --libe=*)
bec39cab 1156 libexecdir=$ac_optarg ;;
c906108c 1157
81ecdfbb
RW
1158 -localedir | --localedir | --localedi | --localed | --locale)
1159 ac_prev=localedir ;;
1160 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1161 localedir=$ac_optarg ;;
1162
c906108c 1163 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1164 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1165 ac_prev=localstatedir ;;
1166 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1167 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1168 localstatedir=$ac_optarg ;;
c906108c
SS
1169
1170 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1171 ac_prev=mandir ;;
1172 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1173 mandir=$ac_optarg ;;
c906108c
SS
1174
1175 -nfp | --nfp | --nf)
1176 # Obsolete; use --without-fp.
1177 with_fp=no ;;
1178
1179 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1180 | --no-cr | --no-c | -n)
c906108c
SS
1181 no_create=yes ;;
1182
1183 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1184 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1185 no_recursion=yes ;;
1186
1187 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1188 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1189 | --oldin | --oldi | --old | --ol | --o)
1190 ac_prev=oldincludedir ;;
1191 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1192 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1193 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1194 oldincludedir=$ac_optarg ;;
c906108c
SS
1195
1196 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1197 ac_prev=prefix ;;
1198 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1199 prefix=$ac_optarg ;;
c906108c
SS
1200
1201 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1202 | --program-pre | --program-pr | --program-p)
1203 ac_prev=program_prefix ;;
1204 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1205 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1206 program_prefix=$ac_optarg ;;
c906108c
SS
1207
1208 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1209 | --program-suf | --program-su | --program-s)
1210 ac_prev=program_suffix ;;
1211 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1212 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1213 program_suffix=$ac_optarg ;;
c906108c
SS
1214
1215 -program-transform-name | --program-transform-name \
1216 | --program-transform-nam | --program-transform-na \
1217 | --program-transform-n | --program-transform- \
1218 | --program-transform | --program-transfor \
1219 | --program-transfo | --program-transf \
1220 | --program-trans | --program-tran \
1221 | --progr-tra | --program-tr | --program-t)
1222 ac_prev=program_transform_name ;;
1223 -program-transform-name=* | --program-transform-name=* \
1224 | --program-transform-nam=* | --program-transform-na=* \
1225 | --program-transform-n=* | --program-transform-=* \
1226 | --program-transform=* | --program-transfor=* \
1227 | --program-transfo=* | --program-transf=* \
1228 | --program-trans=* | --program-tran=* \
1229 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1230 program_transform_name=$ac_optarg ;;
c906108c 1231
81ecdfbb
RW
1232 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1233 ac_prev=pdfdir ;;
1234 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1235 pdfdir=$ac_optarg ;;
1236
1237 -psdir | --psdir | --psdi | --psd | --ps)
1238 ac_prev=psdir ;;
1239 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1240 psdir=$ac_optarg ;;
1241
c906108c
SS
1242 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1243 | -silent | --silent | --silen | --sile | --sil)
1244 silent=yes ;;
1245
1246 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1247 ac_prev=sbindir ;;
1248 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1249 | --sbi=* | --sb=*)
bec39cab 1250 sbindir=$ac_optarg ;;
c906108c
SS
1251
1252 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1253 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1254 | --sharedst | --shareds | --shared | --share | --shar \
1255 | --sha | --sh)
1256 ac_prev=sharedstatedir ;;
1257 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1258 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1259 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1260 | --sha=* | --sh=*)
bec39cab 1261 sharedstatedir=$ac_optarg ;;
c906108c
SS
1262
1263 -site | --site | --sit)
1264 ac_prev=site ;;
1265 -site=* | --site=* | --sit=*)
bec39cab 1266 site=$ac_optarg ;;
3ace7edb 1267
c906108c
SS
1268 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1269 ac_prev=srcdir ;;
1270 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1271 srcdir=$ac_optarg ;;
c906108c
SS
1272
1273 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1274 | --syscon | --sysco | --sysc | --sys | --sy)
1275 ac_prev=sysconfdir ;;
1276 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1277 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1278 sysconfdir=$ac_optarg ;;
c906108c
SS
1279
1280 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1281 ac_prev=target_alias ;;
c906108c 1282 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1283 target_alias=$ac_optarg ;;
c906108c
SS
1284
1285 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1286 verbose=yes ;;
1287
bec39cab
AC
1288 -version | --version | --versio | --versi | --vers | -V)
1289 ac_init_version=: ;;
c906108c
SS
1290
1291 -with-* | --with-*)
81ecdfbb 1292 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1293 # Reject names that are not valid shell variable names.
81ecdfbb 1294 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1295 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1296 ac_useropt_orig=$ac_useropt
1297 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1298 case $ac_user_opts in
1299 *"
1300"with_$ac_useropt"
1301"*) ;;
1302 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1303 ac_unrecognized_sep=', ';;
b4e70030 1304 esac
81ecdfbb 1305 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1306
1307 -without-* | --without-*)
81ecdfbb 1308 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1309 # Reject names that are not valid shell variable names.
81ecdfbb 1310 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1311 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1312 ac_useropt_orig=$ac_useropt
1313 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1314 case $ac_user_opts in
1315 *"
1316"with_$ac_useropt"
1317"*) ;;
1318 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1319 ac_unrecognized_sep=', ';;
1320 esac
1321 eval with_$ac_useropt=no ;;
c906108c
SS
1322
1323 --x)
1324 # Obsolete; use --with-x.
1325 with_x=yes ;;
1326
1327 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1328 | --x-incl | --x-inc | --x-in | --x-i)
1329 ac_prev=x_includes ;;
1330 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1331 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1332 x_includes=$ac_optarg ;;
c906108c
SS
1333
1334 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1335 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1336 ac_prev=x_libraries ;;
1337 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1338 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1339 x_libraries=$ac_optarg ;;
c906108c 1340
d0ac1c44
SM
1341 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1342Try \`$0 --help' for more information"
c906108c
SS
1343 ;;
1344
bec39cab
AC
1345 *=*)
1346 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1347 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1348 case $ac_envvar in #(
1349 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1350 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1351 esac
1352 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1353 export $ac_envvar ;;
1354
c906108c 1355 *)
bec39cab 1356 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1357 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1358 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1359 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1360 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1361 ;;
1362
1363 esac
1364done
1365
1366if test -n "$ac_prev"; then
bec39cab 1367 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1368 as_fn_error $? "missing argument to $ac_option"
c906108c 1369fi
c906108c 1370
81ecdfbb
RW
1371if test -n "$ac_unrecognized_opts"; then
1372 case $enable_option_checking in
1373 no) ;;
d0ac1c44 1374 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1375 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1376 esac
81ecdfbb 1377fi
b4e70030 1378
81ecdfbb
RW
1379# Check all directory arguments for consistency.
1380for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1381 datadir sysconfdir sharedstatedir localstatedir includedir \
1382 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1383 libdir localedir mandir
b4e70030 1384do
81ecdfbb
RW
1385 eval ac_val=\$$ac_var
1386 # Remove trailing slashes.
1387 case $ac_val in
1388 */ )
1389 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1390 eval $ac_var=\$ac_val;;
1391 esac
1392 # Be sure to have absolute directory names.
b4e70030 1393 case $ac_val in
81ecdfbb
RW
1394 [\\/$]* | ?:[\\/]* ) continue;;
1395 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1396 esac
d0ac1c44 1397 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1398done
1399
bec39cab
AC
1400# There might be people who depend on the old broken behavior: `$host'
1401# used to hold the argument of --host etc.
1402# FIXME: To remove some day.
1403build=$build_alias
1404host=$host_alias
1405target=$target_alias
1406
1407# FIXME: To remove some day.
1408if test "x$host_alias" != x; then
1409 if test "x$build_alias" = x; then
1410 cross_compiling=maybe
bec39cab
AC
1411 elif test "x$build_alias" != "x$host_alias"; then
1412 cross_compiling=yes
1413 fi
1414fi
c906108c 1415
bec39cab
AC
1416ac_tool_prefix=
1417test -n "$host_alias" && ac_tool_prefix=$host_alias-
1418
1419test "$silent" = yes && exec 6>/dev/null
c906108c 1420
c906108c 1421
81ecdfbb
RW
1422ac_pwd=`pwd` && test -n "$ac_pwd" &&
1423ac_ls_di=`ls -di .` &&
1424ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1425 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1426test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1427 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1428
1429
c906108c
SS
1430# Find the source files, if location was not specified.
1431if test -z "$srcdir"; then
1432 ac_srcdir_defaulted=yes
81ecdfbb
RW
1433 # Try the directory containing this script, then the parent directory.
1434 ac_confdir=`$as_dirname -- "$as_myself" ||
1435$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1436 X"$as_myself" : 'X\(//\)[^/]' \| \
1437 X"$as_myself" : 'X\(//\)$' \| \
1438 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1439$as_echo X"$as_myself" |
1440 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1441 s//\1/
1442 q
1443 }
1444 /^X\(\/\/\)[^/].*/{
1445 s//\1/
1446 q
1447 }
1448 /^X\(\/\/\)$/{
1449 s//\1/
1450 q
1451 }
1452 /^X\(\/\).*/{
1453 s//\1/
1454 q
1455 }
1456 s/.*/./; q'`
c906108c 1457 srcdir=$ac_confdir
81ecdfbb 1458 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1459 srcdir=..
1460 fi
1461else
1462 ac_srcdir_defaulted=no
1463fi
81ecdfbb
RW
1464if test ! -r "$srcdir/$ac_unique_file"; then
1465 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1466 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1467fi
1468ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1469ac_abs_confdir=`(
d0ac1c44 1470 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1471 pwd)`
1472# When building in place, set srcdir=.
1473if test "$ac_abs_confdir" = "$ac_pwd"; then
1474 srcdir=.
1475fi
1476# Remove unnecessary trailing slashes from srcdir.
1477# Double slashes in file names in object file debugging info
1478# mess up M-x gdb in Emacs.
1479case $srcdir in
1480*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1481esac
1482for ac_var in $ac_precious_vars; do
1483 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1484 eval ac_env_${ac_var}_value=\$${ac_var}
1485 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1486 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1487done
c906108c 1488
bec39cab
AC
1489#
1490# Report the --help message.
1491#
1492if test "$ac_init_help" = "long"; then
1493 # Omit some internal or obsolete options to make the list less imposing.
1494 # This message is too long to be a string in the A/UX 3.1 sh.
1495 cat <<_ACEOF
1496\`configure' configures this package to adapt to many kinds of systems.
1497
1498Usage: $0 [OPTION]... [VAR=VALUE]...
1499
1500To assign environment variables (e.g., CC, CFLAGS...), specify them as
1501VAR=VALUE. See below for descriptions of some of the useful variables.
1502
1503Defaults for the options are specified in brackets.
1504
1505Configuration:
1506 -h, --help display this help and exit
1507 --help=short display options specific to this package
1508 --help=recursive display the short help of all the included packages
1509 -V, --version display version information and exit
d0ac1c44 1510 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1511 --cache-file=FILE cache test results in FILE [disabled]
1512 -C, --config-cache alias for \`--cache-file=config.cache'
1513 -n, --no-create do not create output files
1514 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1515
bec39cab
AC
1516Installation directories:
1517 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1518 [$ac_default_prefix]
bec39cab 1519 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1520 [PREFIX]
bec39cab
AC
1521
1522By default, \`make install' will install all the files in
1523\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1524an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1525for instance \`--prefix=\$HOME'.
1526
1527For better control, use the options below.
1528
1529Fine tuning of the installation directories:
81ecdfbb
RW
1530 --bindir=DIR user executables [EPREFIX/bin]
1531 --sbindir=DIR system admin executables [EPREFIX/sbin]
1532 --libexecdir=DIR program executables [EPREFIX/libexec]
1533 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1534 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1535 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1536 --libdir=DIR object code libraries [EPREFIX/lib]
1537 --includedir=DIR C header files [PREFIX/include]
1538 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1539 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1540 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1541 --infodir=DIR info documentation [DATAROOTDIR/info]
1542 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1543 --mandir=DIR man documentation [DATAROOTDIR/man]
1544 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1545 --htmldir=DIR html documentation [DOCDIR]
1546 --dvidir=DIR dvi documentation [DOCDIR]
1547 --pdfdir=DIR pdf documentation [DOCDIR]
1548 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1549_ACEOF
1550
1551 cat <<\_ACEOF
1552
9009e1ae
MR
1553Program names:
1554 --program-prefix=PREFIX prepend PREFIX to installed program names
1555 --program-suffix=SUFFIX append SUFFIX to installed program names
1556 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1557
bec39cab
AC
1558X features:
1559 --x-includes=DIR X include files are in DIR
1560 --x-libraries=DIR X library files are in DIR
1561
1562System types:
1563 --build=BUILD configure for building on BUILD [guessed]
1564 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1565 --target=TARGET configure for building compilers for TARGET [HOST]
1566_ACEOF
1567fi
1568
1569if test -n "$ac_init_help"; then
1570
1571 cat <<\_ACEOF
1572
1573Optional Features:
81ecdfbb 1574 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1575 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1576 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1577 --enable-maintainer-mode
1578 enable make rules and dependencies not useful (and
1579 sometimes confusing) to the casual installer
2974be62 1580 --enable-plugins Enable support for plugins
da2f07f1 1581 --disable-largefile omit support for large files
a1220294
TT
1582 --enable-targets=TARGETS
1583 alternative target configurations
c0993dbe 1584 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1585 --disable-gdbmi disable machine-interface (MI)
1586 --enable-tui enable full-screen terminal user interface (TUI)
1587 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1588 --enable-profiling enable profiling of GDB
44cee4fd 1589 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1590 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1591 --enable-source-highlight
1592 enable source-highlight for source listings
a1220294 1593 --enable-werror treat compile warnings as errors
32c1c914 1594 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1595 --enable-gdb-build-warnings
32c1c914 1596 enable GDB specific build-time compiler warnings if
a1220294 1597 gcc is used
f35d5ade 1598 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1599 --enable-sim link gdb with simulator
1776e3e5 1600 --enable-libctf Handle .ctf type-info sections [default=yes]
8ecfd7bd
SDJ
1601 --enable-unit-tests Enable the inclusion of unit tests when compiling
1602 GDB
bec39cab
AC
1603
1604Optional Packages:
1605 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1606 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1607 --with-separate-debug-dir=PATH
32c1c914 1608 look for global separate debug info in this path
62e4f60c 1609 [LIBDIR/debug]
b14b1491
TT
1610 --with-gdb-datadir=PATH look for global separate data files in this path
1611 [DATADIR/gdb]
29b0e8a2 1612 --with-relocated-sources=PATH
32c1c914 1613 automatically relocate this path for source files
7349ff92 1614 --with-auto-load-dir=PATH
aff139ff 1615 directories from which to load auto-loaded scripts
1564a261 1616 [$debugdir:$datadir/auto-load]
bccbefd2 1617 --with-auto-load-safe-path=PATH
aff139ff 1618 directories safe to hold auto-loaded files
7349ff92 1619 [--with-auto-load-dir]
bccbefd2
JK
1620 --without-auto-load-safe-path
1621 do not restrict auto-loaded files locations
0d79cdc4
AM
1622 --with-debuginfod Enable debuginfo lookups with debuginfod
1623 (auto/yes/no)
05e7c244 1624 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1625 --with-curses use the curses library instead of the termcap
1626 library
c16158bc
JM
1627 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1628 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1629 --with-system-zlib use installed libz
016a3251
DD
1630 --with-gnu-ld assume the C compiler uses GNU ld default=no
1631 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1632 --without-libiconv-prefix don't search for libiconv in includedir and libdir
9f1528a1 1633 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
478aac75 1634 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1635 --with-system-readline use installed readline library
b8e0a31c
SD
1636 --with-jit-reader-dir=PATH
1637 directory to load the JIT readers from
5c39566f 1638 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1639 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1640 --without-libexpat-prefix don't search for libexpat in includedir and libdir
9f1528a1 1641 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
2400729e
UW
1642 --with-mpfr include MPFR support (auto/yes/no)
1643 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1644 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
9f1528a1 1645 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
0c4a4063
DE
1646 --with-python[=PYTHON] include python support
1647 (auto/yes/no/<python-program>)
d13c7322
AB
1648 --with-python-libdir[=DIR]
1649 search for python's libraries in DIR
ed3ef339
DE
1650 --with-guile[=GUILE] include guile support
1651 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1652 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1653 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1654 --without-libipt-prefix don't search for libipt in includedir and libdir
9f1528a1 1655 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
a1220294
TT
1656 --without-included-regex
1657 don't use included regex; this is the default on
1658 systems with version 2 of the GNU C library (use
1659 with caution on other system)
81ecdfbb 1660 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1661 --with-system-gdbinit=PATH
32c1c914 1662 automatically load a system-wide gdbinit file
ed2a2229
CB
1663 --with-system-gdbinit-dir=PATH
1664 automatically load system-wide gdbinit files from
1665 this directory
608e2dbb
TT
1666 --with-lzma support lzma compression (auto/yes/no)
1667 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1668 --without-liblzma-prefix don't search for liblzma in includedir and libdir
9f1528a1 1669 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
5062cc19
KS
1670 --with-tcl directory containing tcl configuration (tclConfig.sh)
1671 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1672 --with-x use the X Window System
393fd4c3
YQ
1673 --with-babeltrace include babeltrace support (auto/yes/no)
1674 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1675 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
9f1528a1 1676 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
ccb1ba62
CB
1677 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1678 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1679 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
9f1528a1 1680 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
bec39cab
AC
1681
1682Some influential environment variables:
1683 CC C compiler command
1684 CFLAGS C compiler flags
1685 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1686 nonstandard directory <lib dir>
81ecdfbb 1687 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1688 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1689 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1690 CXX C++ compiler command
1691 CXXFLAGS C++ compiler flags
bec39cab 1692 CPP C preprocessor
f06e05e0
JK
1693 MAKEINFO Parent configure detects if it is of sufficient version.
1694 MAKEINFOFLAGS
1695 Parameters for MAKEINFO.
f6720b1c
AM
1696 PKG_CONFIG path to pkg-config utility
1697 PKG_CONFIG_PATH
1698 directories to add to pkg-config's search path
1699 PKG_CONFIG_LIBDIR
1700 path overriding pkg-config's built-in search path
1701 DEBUGINFOD_CFLAGS
1702 C compiler flags for DEBUGINFOD, overriding pkg-config
1703 DEBUGINFOD_LIBS
1704 linker flags for DEBUGINFOD, overriding pkg-config
d0ac1c44
SM
1705 YACC The `Yet Another Compiler Compiler' implementation to use.
1706 Defaults to the first program found out of: `bison -y', `byacc',
1707 `yacc'.
81ecdfbb
RW
1708 YFLAGS The list of arguments that will be passed by default to $YACC.
1709 This script will default YFLAGS to the empty string to avoid a
1710 default value of `-d' given by some make applications.
1711 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1712
1713Use these variables to override the choices made by `configure' or to help
1714it to find libraries and programs with nonstandard names/locations.
1715
81ecdfbb 1716Report bugs to the package provider.
bec39cab 1717_ACEOF
81ecdfbb 1718ac_status=$?
bec39cab
AC
1719fi
1720
1721if test "$ac_init_help" = "recursive"; then
1722 # If there are subdirs, report their specific --help.
bec39cab 1723 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1724 test -d "$ac_dir" ||
1725 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1726 continue
bec39cab
AC
1727 ac_builddir=.
1728
81ecdfbb
RW
1729case "$ac_dir" in
1730.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1731*)
1732 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1733 # A ".." for each directory in $ac_dir_suffix.
1734 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1735 case $ac_top_builddir_sub in
1736 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1737 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1738 esac ;;
1739esac
1740ac_abs_top_builddir=$ac_pwd
1741ac_abs_builddir=$ac_pwd$ac_dir_suffix
1742# for backward compatibility:
1743ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1744
1745case $srcdir in
81ecdfbb 1746 .) # We are building in place.
bec39cab 1747 ac_srcdir=.
81ecdfbb
RW
1748 ac_top_srcdir=$ac_top_builddir_sub
1749 ac_abs_top_srcdir=$ac_pwd ;;
1750 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1751 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1752 ac_top_srcdir=$srcdir
1753 ac_abs_top_srcdir=$srcdir ;;
1754 *) # Relative name.
1755 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1756 ac_top_srcdir=$ac_top_build_prefix$srcdir
1757 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1758esac
81ecdfbb 1759ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1760
81ecdfbb
RW
1761 cd "$ac_dir" || { ac_status=$?; continue; }
1762 # Check for guested configure.
1763 if test -f "$ac_srcdir/configure.gnu"; then
1764 echo &&
1765 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1766 elif test -f "$ac_srcdir/configure"; then
1767 echo &&
1768 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1769 else
81ecdfbb
RW
1770 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1771 fi || ac_status=$?
1772 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1773 done
1774fi
1775
81ecdfbb 1776test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1777if $ac_init_version; then
1778 cat <<\_ACEOF
81ecdfbb 1779configure
d0ac1c44 1780generated by GNU Autoconf 2.69
bec39cab 1781
d0ac1c44 1782Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1783This configure script is free software; the Free Software Foundation
1784gives unlimited permission to copy, distribute and modify it.
1785_ACEOF
81ecdfbb 1786 exit
bec39cab 1787fi
bec39cab 1788
81ecdfbb
RW
1789## ------------------------ ##
1790## Autoconf initialization. ##
1791## ------------------------ ##
bec39cab 1792
81ecdfbb
RW
1793# ac_fn_c_try_compile LINENO
1794# --------------------------
1795# Try to compile conftest.$ac_ext, and return whether this succeeded.
1796ac_fn_c_try_compile ()
1797{
1798 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1799 rm -f conftest.$ac_objext
1800 if { { ac_try="$ac_compile"
1801case "(($ac_try" in
1802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1803 *) ac_try_echo=$ac_try;;
1804esac
1805eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1806$as_echo "$ac_try_echo"; } >&5
1807 (eval "$ac_compile") 2>conftest.err
1808 ac_status=$?
1809 if test -s conftest.err; then
1810 grep -v '^ *+' conftest.err >conftest.er1
1811 cat conftest.er1 >&5
1812 mv -f conftest.er1 conftest.err
1813 fi
1814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1815 test $ac_status = 0; } && {
1816 test -z "$ac_c_werror_flag" ||
1817 test ! -s conftest.err
1818 } && test -s conftest.$ac_objext; then :
1819 ac_retval=0
1820else
1821 $as_echo "$as_me: failed program was:" >&5
1822sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1823
81ecdfbb
RW
1824 ac_retval=1
1825fi
d0ac1c44
SM
1826 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1827 as_fn_set_status $ac_retval
81ecdfbb
RW
1828
1829} # ac_fn_c_try_compile
1830
3bc3d82a
PA
1831# ac_fn_cxx_try_compile LINENO
1832# ----------------------------
1833# Try to compile conftest.$ac_ext, and return whether this succeeded.
1834ac_fn_cxx_try_compile ()
1835{
1836 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1837 rm -f conftest.$ac_objext
1838 if { { ac_try="$ac_compile"
1839case "(($ac_try" in
1840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1841 *) ac_try_echo=$ac_try;;
1842esac
1843eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1844$as_echo "$ac_try_echo"; } >&5
1845 (eval "$ac_compile") 2>conftest.err
1846 ac_status=$?
1847 if test -s conftest.err; then
1848 grep -v '^ *+' conftest.err >conftest.er1
1849 cat conftest.er1 >&5
1850 mv -f conftest.er1 conftest.err
1851 fi
1852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1853 test $ac_status = 0; } && {
1854 test -z "$ac_cxx_werror_flag" ||
1855 test ! -s conftest.err
1856 } && test -s conftest.$ac_objext; then :
1857 ac_retval=0
1858else
1859 $as_echo "$as_me: failed program was:" >&5
1860sed 's/^/| /' conftest.$ac_ext >&5
1861
1862 ac_retval=1
1863fi
d0ac1c44
SM
1864 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1865 as_fn_set_status $ac_retval
3bc3d82a
PA
1866
1867} # ac_fn_cxx_try_compile
1868
81ecdfbb
RW
1869# ac_fn_c_try_cpp LINENO
1870# ----------------------
1871# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1872ac_fn_c_try_cpp ()
bec39cab 1873{
81ecdfbb
RW
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 if { { ac_try="$ac_cpp conftest.$ac_ext"
1876case "(($ac_try" in
1877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1878 *) ac_try_echo=$ac_try;;
1879esac
1880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1881$as_echo "$ac_try_echo"; } >&5
1882 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1883 ac_status=$?
1884 if test -s conftest.err; then
1885 grep -v '^ *+' conftest.err >conftest.er1
1886 cat conftest.er1 >&5
1887 mv -f conftest.er1 conftest.err
1888 fi
1889 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1890 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1891 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1892 test ! -s conftest.err
1893 }; then :
1894 ac_retval=0
1895else
1896 $as_echo "$as_me: failed program was:" >&5
1897sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1898
81ecdfbb
RW
1899 ac_retval=1
1900fi
d0ac1c44
SM
1901 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1902 as_fn_set_status $ac_retval
bec39cab 1903
81ecdfbb 1904} # ac_fn_c_try_cpp
bec39cab 1905
81ecdfbb
RW
1906# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1907# -------------------------------------------------------
1908# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1909# the include files in INCLUDES and setting the cache variable VAR
1910# accordingly.
1911ac_fn_c_check_header_mongrel ()
1912{
1913 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1914 if eval \${$3+:} false; then :
81ecdfbb
RW
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1916$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1917if eval \${$3+:} false; then :
81ecdfbb
RW
1918 $as_echo_n "(cached) " >&6
1919fi
1920eval ac_res=\$$3
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1922$as_echo "$ac_res" >&6; }
1923else
1924 # Is the header compilable?
1925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1926$as_echo_n "checking $2 usability... " >&6; }
1927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1928/* end confdefs.h. */
1929$4
1930#include <$2>
1931_ACEOF
1932if ac_fn_c_try_compile "$LINENO"; then :
1933 ac_header_compiler=yes
1934else
1935 ac_header_compiler=no
1936fi
1937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1939$as_echo "$ac_header_compiler" >&6; }
bec39cab 1940
81ecdfbb
RW
1941# Is the header present?
1942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1943$as_echo_n "checking $2 presence... " >&6; }
1944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946#include <$2>
1947_ACEOF
1948if ac_fn_c_try_cpp "$LINENO"; then :
1949 ac_header_preproc=yes
1950else
1951 ac_header_preproc=no
1952fi
d0ac1c44 1953rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1955$as_echo "$ac_header_preproc" >&6; }
bec39cab 1956
81ecdfbb
RW
1957# So? What about this header?
1958case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1959 yes:no: )
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1961$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1963$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1964 ;;
1965 no:yes:* )
1966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1967$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1969$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1971$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1973$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1975$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1976 ;;
1977esac
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1979$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1980if eval \${$3+:} false; then :
81ecdfbb
RW
1981 $as_echo_n "(cached) " >&6
1982else
1983 eval "$3=\$ac_header_compiler"
1984fi
1985eval ac_res=\$$3
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1987$as_echo "$ac_res" >&6; }
1988fi
d0ac1c44 1989 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1990
81ecdfbb 1991} # ac_fn_c_check_header_mongrel
bec39cab 1992
81ecdfbb
RW
1993# ac_fn_c_try_run LINENO
1994# ----------------------
1995# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1996# that executables *can* be run.
1997ac_fn_c_try_run ()
1998{
1999 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2000 if { { ac_try="$ac_link"
2001case "(($ac_try" in
2002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2003 *) ac_try_echo=$ac_try;;
2004esac
2005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2006$as_echo "$ac_try_echo"; } >&5
2007 (eval "$ac_link") 2>&5
2008 ac_status=$?
2009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2011 { { case "(($ac_try" in
2012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2013 *) ac_try_echo=$ac_try;;
2014esac
2015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2016$as_echo "$ac_try_echo"; } >&5
2017 (eval "$ac_try") 2>&5
2018 ac_status=$?
2019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2020 test $ac_status = 0; }; }; then :
2021 ac_retval=0
2022else
2023 $as_echo "$as_me: program exited with status $ac_status" >&5
2024 $as_echo "$as_me: failed program was:" >&5
2025sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2026
81ecdfbb
RW
2027 ac_retval=$ac_status
2028fi
2029 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2030 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2031 as_fn_set_status $ac_retval
bec39cab 2032
81ecdfbb 2033} # ac_fn_c_try_run
bec39cab 2034
81ecdfbb
RW
2035# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2036# -------------------------------------------------------
2037# Tests whether HEADER exists and can be compiled using the include files in
2038# INCLUDES, setting the cache variable VAR accordingly.
2039ac_fn_c_check_header_compile ()
2040{
2041 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2043$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2044if eval \${$3+:} false; then :
81ecdfbb
RW
2045 $as_echo_n "(cached) " >&6
2046else
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050#include <$2>
bec39cab 2051_ACEOF
81ecdfbb
RW
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 eval "$3=yes"
2054else
2055 eval "$3=no"
2056fi
2057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2058fi
2059eval ac_res=\$$3
2060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2061$as_echo "$ac_res" >&6; }
d0ac1c44 2062 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2063
81ecdfbb 2064} # ac_fn_c_check_header_compile
bec39cab 2065
2974be62
AM
2066# ac_fn_c_try_link LINENO
2067# -----------------------
2068# Try to link conftest.$ac_ext, and return whether this succeeded.
2069ac_fn_c_try_link ()
2070{
2071 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2072 rm -f conftest.$ac_objext conftest$ac_exeext
2073 if { { ac_try="$ac_link"
2074case "(($ac_try" in
2075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2076 *) ac_try_echo=$ac_try;;
2077esac
2078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2079$as_echo "$ac_try_echo"; } >&5
2080 (eval "$ac_link") 2>conftest.err
2081 ac_status=$?
2082 if test -s conftest.err; then
2083 grep -v '^ *+' conftest.err >conftest.er1
2084 cat conftest.er1 >&5
2085 mv -f conftest.er1 conftest.err
2086 fi
2087 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2088 test $ac_status = 0; } && {
2089 test -z "$ac_c_werror_flag" ||
2090 test ! -s conftest.err
2091 } && test -s conftest$ac_exeext && {
2092 test "$cross_compiling" = yes ||
d0ac1c44 2093 test -x conftest$ac_exeext
2974be62
AM
2094 }; then :
2095 ac_retval=0
2096else
2097 $as_echo "$as_me: failed program was:" >&5
2098sed 's/^/| /' conftest.$ac_ext >&5
2099
2100 ac_retval=1
2101fi
2102 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2103 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2104 # interfere with the next link command; also delete a directory that is
2105 # left behind by Apple's compiler. We do this before executing the actions.
2106 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2107 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2108 as_fn_set_status $ac_retval
2974be62
AM
2109
2110} # ac_fn_c_try_link
2111
81ecdfbb
RW
2112# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2113# --------------------------------------------
2114# Tries to find the compile-time value of EXPR in a program that includes
2115# INCLUDES, setting VAR accordingly. Returns whether the value could be
2116# computed
2117ac_fn_c_compute_int ()
2118{
2119 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2120 if test "$cross_compiling" = yes; then
2121 # Depending upon the size, compute the lo and hi bounds.
2122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h. */
2124$4
2125int
2126main ()
2127{
2128static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2129test_array [0] = 0;
2130return test_array [0];
bec39cab 2131
81ecdfbb
RW
2132 ;
2133 return 0;
2134}
2135_ACEOF
2136if ac_fn_c_try_compile "$LINENO"; then :
2137 ac_lo=0 ac_mid=0
2138 while :; do
2139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140/* end confdefs.h. */
2141$4
2142int
2143main ()
2144{
2145static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2146test_array [0] = 0;
2147return test_array [0];
bec39cab 2148
81ecdfbb
RW
2149 ;
2150 return 0;
2151}
2152_ACEOF
2153if ac_fn_c_try_compile "$LINENO"; then :
2154 ac_hi=$ac_mid; break
2155else
2156 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2157 if test $ac_lo -le $ac_mid; then
2158 ac_lo= ac_hi=
2159 break
2160 fi
2161 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2162fi
81ecdfbb
RW
2163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2164 done
c906108c 2165else
81ecdfbb
RW
2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h. */
2168$4
2169int
2170main ()
2171{
2172static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2173test_array [0] = 0;
2174return test_array [0];
bec39cab 2175
81ecdfbb
RW
2176 ;
2177 return 0;
2178}
2179_ACEOF
2180if ac_fn_c_try_compile "$LINENO"; then :
2181 ac_hi=-1 ac_mid=-1
2182 while :; do
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185$4
2186int
2187main ()
2188{
2189static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2190test_array [0] = 0;
2191return test_array [0];
bec39cab 2192
81ecdfbb
RW
2193 ;
2194 return 0;
2195}
2196_ACEOF
2197if ac_fn_c_try_compile "$LINENO"; then :
2198 ac_lo=$ac_mid; break
2199else
2200 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2201 if test $ac_mid -le $ac_hi; then
2202 ac_lo= ac_hi=
2203 break
2204 fi
2205 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208 done
2209else
2210 ac_lo= ac_hi=
2211fi
2212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2213fi
2214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2215# Binary search between lo and hi bounds.
2216while test "x$ac_lo" != "x$ac_hi"; do
2217 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219/* end confdefs.h. */
2220$4
2221int
2222main ()
2223{
2224static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2225test_array [0] = 0;
2226return test_array [0];
bec39cab 2227
81ecdfbb
RW
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_compile "$LINENO"; then :
2233 ac_hi=$ac_mid
2234else
2235 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2236fi
2237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2238done
2239case $ac_lo in #((
2240?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2241'') ac_retval=1 ;;
2242esac
2243 else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246$4
2247static long int longval () { return $2; }
2248static unsigned long int ulongval () { return $2; }
2249#include <stdio.h>
2250#include <stdlib.h>
2251int
2252main ()
2253{
bec39cab 2254
81ecdfbb
RW
2255 FILE *f = fopen ("conftest.val", "w");
2256 if (! f)
2257 return 1;
2258 if (($2) < 0)
2259 {
2260 long int i = longval ();
2261 if (i != ($2))
2262 return 1;
2263 fprintf (f, "%ld", i);
2264 }
2265 else
2266 {
2267 unsigned long int i = ulongval ();
2268 if (i != ($2))
2269 return 1;
2270 fprintf (f, "%lu", i);
2271 }
2272 /* Do not output a trailing newline, as this causes \r\n confusion
2273 on some platforms. */
2274 return ferror (f) || fclose (f) != 0;
bec39cab 2275
81ecdfbb
RW
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_run "$LINENO"; then :
2281 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2282else
2283 ac_retval=1
2284fi
2285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2286 conftest.$ac_objext conftest.beam conftest.$ac_ext
2287rm -f conftest.val
bec39cab 2288
81ecdfbb 2289 fi
d0ac1c44
SM
2290 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291 as_fn_set_status $ac_retval
bec39cab 2292
81ecdfbb 2293} # ac_fn_c_compute_int
bec39cab 2294
55a8c076
YQ
2295# ac_fn_c_check_func LINENO FUNC VAR
2296# ----------------------------------
2297# Tests whether FUNC exists, setting the cache variable VAR accordingly
2298ac_fn_c_check_func ()
81ecdfbb
RW
2299{
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2302$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2303if eval \${$3+:} false; then :
81ecdfbb
RW
2304 $as_echo_n "(cached) " >&6
2305else
81ecdfbb
RW
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
55a8c076
YQ
2308/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2309 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2310#define $2 innocuous_$2
2311
2312/* System header to define __stub macros and hopefully few prototypes,
2313 which can conflict with char $2 (); below.
2314 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2315 <limits.h> exists even on freestanding compilers. */
2316
2317#ifdef __STDC__
2318# include <limits.h>
2319#else
2320# include <assert.h>
2321#endif
2322
2323#undef $2
2324
2325/* Override any GCC internal prototype to avoid an error.
2326 Use char because int might match the return type of a GCC
2327 builtin and then its argument prototype would still apply. */
2328#ifdef __cplusplus
2329extern "C"
2330#endif
2331char $2 ();
2332/* The GNU C library defines this for functions which it implements
2333 to always fail with ENOSYS. Some functions are actually named
2334 something starting with __ and the normal name is an alias. */
2335#if defined __stub_$2 || defined __stub___$2
2336choke me
2337#endif
2338
2339int
2340main ()
2341{
2342return $2 ();
2343 ;
2344 return 0;
2345}
2346_ACEOF
2347if ac_fn_c_try_link "$LINENO"; then :
2348 eval "$3=yes"
2349else
2350 eval "$3=no"
2351fi
2352rm -f core conftest.err conftest.$ac_objext \
2353 conftest$ac_exeext conftest.$ac_ext
2354fi
2355eval ac_res=\$$3
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2357$as_echo "$ac_res" >&6; }
d0ac1c44 2358 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2359
2360} # ac_fn_c_check_func
2361
07697489
PA
2362# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2363# -------------------------------------------
2364# Tests whether TYPE exists after having included INCLUDES, setting cache
2365# variable VAR accordingly.
2366ac_fn_c_check_type ()
2367{
2368 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2370$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2371if eval \${$3+:} false; then :
07697489
PA
2372 $as_echo_n "(cached) " >&6
2373else
2374 eval "$3=no"
2375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376/* end confdefs.h. */
2377$4
2378int
2379main ()
2380{
2381if (sizeof ($2))
2382 return 0;
2383 ;
2384 return 0;
2385}
2386_ACEOF
2387if ac_fn_c_try_compile "$LINENO"; then :
2388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2389/* end confdefs.h. */
2390$4
2391int
2392main ()
2393{
2394if (sizeof (($2)))
2395 return 0;
2396 ;
2397 return 0;
2398}
2399_ACEOF
2400if ac_fn_c_try_compile "$LINENO"; then :
2401
2402else
2403 eval "$3=yes"
2404fi
2405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2406fi
2407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2408fi
2409eval ac_res=\$$3
2410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2411$as_echo "$ac_res" >&6; }
d0ac1c44 2412 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2413
2414} # ac_fn_c_check_type
2415
f6720b1c
AM
2416# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2417# ---------------------------------------------
2418# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2419# accordingly.
2420ac_fn_c_check_decl ()
2421{
2422 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2423 as_decl_name=`echo $2|sed 's/ *(.*//'`
2424 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2426$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2427if eval \${$3+:} false; then :
2428 $as_echo_n "(cached) " >&6
2429else
2430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2431/* end confdefs.h. */
2432$4
2433int
2434main ()
2435{
2436#ifndef $as_decl_name
2437#ifdef __cplusplus
2438 (void) $as_decl_use;
2439#else
2440 (void) $as_decl_name;
2441#endif
2442#endif
2443
2444 ;
2445 return 0;
2446}
2447_ACEOF
2448if ac_fn_c_try_compile "$LINENO"; then :
2449 eval "$3=yes"
2450else
2451 eval "$3=no"
2452fi
2453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454fi
2455eval ac_res=\$$3
2456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2457$as_echo "$ac_res" >&6; }
2458 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2459
2460} # ac_fn_c_check_decl
2461
05ea2a05
TT
2462# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2463# ----------------------------------------------------
2464# Tries to find if the field MEMBER exists in type AGGR, after including
2465# INCLUDES, setting cache variable VAR accordingly.
2466ac_fn_c_check_member ()
2467{
2468 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2470$as_echo_n "checking for $2.$3... " >&6; }
2471if eval \${$4+:} false; then :
2472 $as_echo_n "(cached) " >&6
2473else
2474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2475/* end confdefs.h. */
2476$5
2477int
2478main ()
2479{
2480static $2 ac_aggr;
2481if (ac_aggr.$3)
2482return 0;
2483 ;
2484 return 0;
2485}
2486_ACEOF
2487if ac_fn_c_try_compile "$LINENO"; then :
2488 eval "$4=yes"
2489else
2490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2491/* end confdefs.h. */
2492$5
2493int
2494main ()
2495{
2496static $2 ac_aggr;
2497if (sizeof ac_aggr.$3)
2498return 0;
2499 ;
2500 return 0;
2501}
2502_ACEOF
2503if ac_fn_c_try_compile "$LINENO"; then :
2504 eval "$4=yes"
2505else
2506 eval "$4=no"
2507fi
2508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2509fi
2510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2511fi
2512eval ac_res=\$$4
2513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2514$as_echo "$ac_res" >&6; }
2515 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2516
2517} # ac_fn_c_check_member
2518
f35d5ade
TT
2519# ac_fn_cxx_try_link LINENO
2520# -------------------------
2521# Try to link conftest.$ac_ext, and return whether this succeeded.
2522ac_fn_cxx_try_link ()
2523{
2524 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525 rm -f conftest.$ac_objext conftest$ac_exeext
2526 if { { ac_try="$ac_link"
2527case "(($ac_try" in
2528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2529 *) ac_try_echo=$ac_try;;
2530esac
2531eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2532$as_echo "$ac_try_echo"; } >&5
2533 (eval "$ac_link") 2>conftest.err
2534 ac_status=$?
2535 if test -s conftest.err; then
2536 grep -v '^ *+' conftest.err >conftest.er1
2537 cat conftest.er1 >&5
2538 mv -f conftest.er1 conftest.err
2539 fi
2540 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2541 test $ac_status = 0; } && {
2542 test -z "$ac_cxx_werror_flag" ||
2543 test ! -s conftest.err
2544 } && test -s conftest$ac_exeext && {
2545 test "$cross_compiling" = yes ||
2546 test -x conftest$ac_exeext
2547 }; then :
2548 ac_retval=0
2549else
2550 $as_echo "$as_me: failed program was:" >&5
2551sed 's/^/| /' conftest.$ac_ext >&5
2552
2553 ac_retval=1
2554fi
2555 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2556 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2557 # interfere with the next link command; also delete a directory that is
2558 # left behind by Apple's compiler. We do this before executing the actions.
2559 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2560 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2561 as_fn_set_status $ac_retval
2562
2563} # ac_fn_cxx_try_link
21987b9c
TT
2564
2565# ac_fn_cxx_check_func LINENO FUNC VAR
2566# ------------------------------------
2567# Tests whether FUNC exists, setting the cache variable VAR accordingly
2568ac_fn_cxx_check_func ()
2569{
2570 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2572$as_echo_n "checking for $2... " >&6; }
2573if eval \${$3+:} false; then :
2574 $as_echo_n "(cached) " >&6
2575else
2576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2577/* end confdefs.h. */
2578/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2579 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2580#define $2 innocuous_$2
2581
2582/* System header to define __stub macros and hopefully few prototypes,
2583 which can conflict with char $2 (); below.
2584 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2585 <limits.h> exists even on freestanding compilers. */
2586
2587#ifdef __STDC__
2588# include <limits.h>
2589#else
2590# include <assert.h>
2591#endif
2592
2593#undef $2
2594
2595/* Override any GCC internal prototype to avoid an error.
2596 Use char because int might match the return type of a GCC
2597 builtin and then its argument prototype would still apply. */
2598#ifdef __cplusplus
2599extern "C"
2600#endif
2601char $2 ();
2602/* The GNU C library defines this for functions which it implements
2603 to always fail with ENOSYS. Some functions are actually named
2604 something starting with __ and the normal name is an alias. */
2605#if defined __stub_$2 || defined __stub___$2
2606choke me
2607#endif
2608
2609int
2610main ()
2611{
2612return $2 ();
2613 ;
2614 return 0;
2615}
2616_ACEOF
2617if ac_fn_cxx_try_link "$LINENO"; then :
2618 eval "$3=yes"
2619else
2620 eval "$3=no"
2621fi
2622rm -f core conftest.err conftest.$ac_objext \
2623 conftest$ac_exeext conftest.$ac_ext
2624fi
2625eval ac_res=\$$3
2626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2627$as_echo "$ac_res" >&6; }
2628 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2629
2630} # ac_fn_cxx_check_func
81ecdfbb
RW
2631cat >config.log <<_ACEOF
2632This file contains any messages produced by compilers while
2633running configure, to aid debugging if configure makes a mistake.
d5af19ba 2634
81ecdfbb 2635It was created by $as_me, which was
d0ac1c44 2636generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2637
81ecdfbb 2638 $ $0 $@
413ccac7 2639
81ecdfbb
RW
2640_ACEOF
2641exec 5>>config.log
2642{
2643cat <<_ASUNAME
2644## --------- ##
2645## Platform. ##
2646## --------- ##
413ccac7 2647
81ecdfbb
RW
2648hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2649uname -m = `(uname -m) 2>/dev/null || echo unknown`
2650uname -r = `(uname -r) 2>/dev/null || echo unknown`
2651uname -s = `(uname -s) 2>/dev/null || echo unknown`
2652uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2653
81ecdfbb
RW
2654/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2655/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2656
81ecdfbb
RW
2657/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2658/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2659/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2660/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2661/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2662/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2663/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2664
81ecdfbb 2665_ASUNAME
bec39cab 2666
bec39cab
AC
2667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2668for as_dir in $PATH
2669do
2670 IFS=$as_save_IFS
2671 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2672 $as_echo "PATH: $as_dir"
2673 done
2674IFS=$as_save_IFS
bec39cab 2675
81ecdfbb 2676} >&5
bec39cab 2677
81ecdfbb 2678cat >&5 <<_ACEOF
bec39cab 2679
bec39cab 2680
81ecdfbb
RW
2681## ----------- ##
2682## Core tests. ##
2683## ----------- ##
2684
2685_ACEOF
2686
2687
2688# Keep a trace of the command line.
2689# Strip out --no-create and --no-recursion so they do not pile up.
2690# Strip out --silent because we don't want to record it for future runs.
2691# Also quote any args containing shell meta-characters.
2692# Make two passes to allow for proper duplicate-argument suppression.
2693ac_configure_args=
2694ac_configure_args0=
2695ac_configure_args1=
2696ac_must_keep_next=false
2697for ac_pass in 1 2
2698do
2699 for ac_arg
2700 do
2701 case $ac_arg in
2702 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2703 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2704 | -silent | --silent | --silen | --sile | --sil)
2705 continue ;;
2706 *\'*)
2707 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2708 esac
2709 case $ac_pass in
2710 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2711 2)
2712 as_fn_append ac_configure_args1 " '$ac_arg'"
2713 if test $ac_must_keep_next = true; then
2714 ac_must_keep_next=false # Got value, back to normal.
2715 else
2716 case $ac_arg in
2717 *=* | --config-cache | -C | -disable-* | --disable-* \
2718 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2719 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2720 | -with-* | --with-* | -without-* | --without-* | --x)
2721 case "$ac_configure_args0 " in
2722 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2723 esac
2724 ;;
2725 -* ) ac_must_keep_next=true ;;
2726 esac
2727 fi
2728 as_fn_append ac_configure_args " '$ac_arg'"
2729 ;;
2730 esac
2731 done
2732done
2733{ ac_configure_args0=; unset ac_configure_args0;}
2734{ ac_configure_args1=; unset ac_configure_args1;}
2735
2736# When interrupted or exit'd, cleanup temporary files, and complete
2737# config.log. We remove comments because anyway the quotes in there
2738# would cause problems or look ugly.
2739# WARNING: Use '\'' to represent an apostrophe within the trap.
2740# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2741trap 'exit_status=$?
2742 # Save into config.log some information that might help in debugging.
2743 {
2744 echo
2745
d0ac1c44 2746 $as_echo "## ---------------- ##
81ecdfbb 2747## Cache variables. ##
d0ac1c44 2748## ---------------- ##"
81ecdfbb
RW
2749 echo
2750 # The following way of writing the cache mishandles newlines in values,
2751(
2752 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2753 eval ac_val=\$$ac_var
2754 case $ac_val in #(
2755 *${as_nl}*)
2756 case $ac_var in #(
2757 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2758$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2759 esac
2760 case $ac_var in #(
2761 _ | IFS | as_nl) ;; #(
2762 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2763 *) { eval $ac_var=; unset $ac_var;} ;;
2764 esac ;;
2765 esac
2766 done
2767 (set) 2>&1 |
2768 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2769 *${as_nl}ac_space=\ *)
2770 sed -n \
2771 "s/'\''/'\''\\\\'\'''\''/g;
2772 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2773 ;; #(
2774 *)
2775 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2776 ;;
2777 esac |
2778 sort
2779)
2780 echo
2781
d0ac1c44 2782 $as_echo "## ----------------- ##
81ecdfbb 2783## Output variables. ##
d0ac1c44 2784## ----------------- ##"
81ecdfbb
RW
2785 echo
2786 for ac_var in $ac_subst_vars
2787 do
2788 eval ac_val=\$$ac_var
2789 case $ac_val in
2790 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2791 esac
2792 $as_echo "$ac_var='\''$ac_val'\''"
2793 done | sort
2794 echo
2795
2796 if test -n "$ac_subst_files"; then
d0ac1c44 2797 $as_echo "## ------------------- ##
81ecdfbb 2798## File substitutions. ##
d0ac1c44 2799## ------------------- ##"
81ecdfbb
RW
2800 echo
2801 for ac_var in $ac_subst_files
2802 do
2803 eval ac_val=\$$ac_var
2804 case $ac_val in
2805 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2806 esac
2807 $as_echo "$ac_var='\''$ac_val'\''"
2808 done | sort
2809 echo
2810 fi
2811
2812 if test -s confdefs.h; then
d0ac1c44 2813 $as_echo "## ----------- ##
81ecdfbb 2814## confdefs.h. ##
d0ac1c44 2815## ----------- ##"
81ecdfbb
RW
2816 echo
2817 cat confdefs.h
2818 echo
2819 fi
2820 test "$ac_signal" != 0 &&
2821 $as_echo "$as_me: caught signal $ac_signal"
2822 $as_echo "$as_me: exit $exit_status"
2823 } >&5
2824 rm -f core *.core core.conftest.* &&
2825 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2826 exit $exit_status
2827' 0
2828for ac_signal in 1 2 13 15; do
2829 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2830done
2831ac_signal=0
2832
2833# confdefs.h avoids OS command line length limits that DEFS can exceed.
2834rm -f -r conftest* confdefs.h
2835
2836$as_echo "/* confdefs.h */" > confdefs.h
2837
2838# Predefined preprocessor variables.
2839
2840cat >>confdefs.h <<_ACEOF
2841#define PACKAGE_NAME "$PACKAGE_NAME"
2842_ACEOF
2843
2844cat >>confdefs.h <<_ACEOF
2845#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2846_ACEOF
2847
2848cat >>confdefs.h <<_ACEOF
2849#define PACKAGE_VERSION "$PACKAGE_VERSION"
2850_ACEOF
2851
2852cat >>confdefs.h <<_ACEOF
2853#define PACKAGE_STRING "$PACKAGE_STRING"
2854_ACEOF
2855
2856cat >>confdefs.h <<_ACEOF
2857#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2858_ACEOF
2859
2860cat >>confdefs.h <<_ACEOF
2861#define PACKAGE_URL "$PACKAGE_URL"
2862_ACEOF
2863
2864
2865# Let the site file select an alternate cache file if it wants to.
2866# Prefer an explicitly selected file to automatically selected ones.
2867ac_site_file1=NONE
2868ac_site_file2=NONE
2869if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2870 # We do not want a PATH search for config.site.
2871 case $CONFIG_SITE in #((
2872 -*) ac_site_file1=./$CONFIG_SITE;;
2873 */*) ac_site_file1=$CONFIG_SITE;;
2874 *) ac_site_file1=./$CONFIG_SITE;;
2875 esac
81ecdfbb
RW
2876elif test "x$prefix" != xNONE; then
2877 ac_site_file1=$prefix/share/config.site
2878 ac_site_file2=$prefix/etc/config.site
2879else
2880 ac_site_file1=$ac_default_prefix/share/config.site
2881 ac_site_file2=$ac_default_prefix/etc/config.site
2882fi
2883for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2884do
2885 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2886 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2888$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2889 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2890 . "$ac_site_file" \
2891 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2893as_fn_error $? "failed to load site script $ac_site_file
2894See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2895 fi
2896done
2897
2898if test -r "$cache_file"; then
d0ac1c44
SM
2899 # Some versions of bash will fail to source /dev/null (special files
2900 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2901 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2903$as_echo "$as_me: loading cache $cache_file" >&6;}
2904 case $cache_file in
2905 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2906 *) . "./$cache_file";;
2907 esac
2908 fi
2909else
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2911$as_echo "$as_me: creating cache $cache_file" >&6;}
2912 >$cache_file
bec39cab
AC
2913fi
2914
d0ac1c44
SM
2915as_fn_append ac_header_list " stdlib.h"
2916as_fn_append ac_header_list " unistd.h"
2917as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2918# Check that the precious variables saved in the cache have kept the same
2919# value.
2920ac_cache_corrupted=false
2921for ac_var in $ac_precious_vars; do
2922 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2923 eval ac_new_set=\$ac_env_${ac_var}_set
2924 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2925 eval ac_new_val=\$ac_env_${ac_var}_value
2926 case $ac_old_set,$ac_new_set in
2927 set,)
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2929$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2930 ac_cache_corrupted=: ;;
2931 ,set)
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2933$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2934 ac_cache_corrupted=: ;;
2935 ,);;
2936 *)
2937 if test "x$ac_old_val" != "x$ac_new_val"; then
2938 # differences in whitespace do not lead to failure.
2939 ac_old_val_w=`echo x $ac_old_val`
2940 ac_new_val_w=`echo x $ac_new_val`
2941 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2943$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2944 ac_cache_corrupted=:
2945 else
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2947$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2948 eval $ac_var=\$ac_old_val
2949 fi
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2951$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2953$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2954 fi;;
2955 esac
2956 # Pass precious variables to config.status.
2957 if test "$ac_new_set" = set; then
2958 case $ac_new_val in
2959 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2960 *) ac_arg=$ac_var=$ac_new_val ;;
2961 esac
2962 case " $ac_configure_args " in
2963 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2964 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2965 esac
2966 fi
2967done
2968if $ac_cache_corrupted; then
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2972$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2973 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2974fi
2975## -------------------- ##
2976## Main body of script. ##
2977## -------------------- ##
2978
2979ac_ext=c
2980ac_cpp='$CPP $CPPFLAGS'
2981ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2982ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2983ac_compiler_gnu=$ac_cv_c_compiler_gnu
2984
2985
2986
2987
2988
2989ac_config_headers="$ac_config_headers config.h:config.in"
2990
2991
2992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2993$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2994 # Check whether --enable-maintainer-mode was given.
2995if test "${enable_maintainer_mode+set}" = set; then :
2996 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2997else
2998 USE_MAINTAINER_MODE=no
2999fi
3000
3001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3002$as_echo "$USE_MAINTAINER_MODE" >&6; }
3003 if test $USE_MAINTAINER_MODE = yes; then
3004 MAINTAINER_MODE_TRUE=
3005 MAINTAINER_MODE_FALSE='#'
3006else
3007 MAINTAINER_MODE_TRUE='#'
3008 MAINTAINER_MODE_FALSE=
3009fi
3010
3011 MAINT=$MAINTAINER_MODE_TRUE
3012
3013
3014
3015ac_ext=c
3016ac_cpp='$CPP $CPPFLAGS'
3017ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3018ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3019ac_compiler_gnu=$ac_cv_c_compiler_gnu
3020if test -n "$ac_tool_prefix"; then
3021 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3022set dummy ${ac_tool_prefix}gcc; ac_word=$2
3023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3024$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3025if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3026 $as_echo_n "(cached) " >&6
c906108c
SS
3027else
3028 if test -n "$CC"; then
3029 ac_cv_prog_CC="$CC" # Let the user override the test.
3030else
bec39cab
AC
3031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3032for as_dir in $PATH
3033do
3034 IFS=$as_save_IFS
3035 test -z "$as_dir" && as_dir=.
81ecdfbb 3036 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3038 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3040 break 2
3041 fi
3042done
81ecdfbb
RW
3043 done
3044IFS=$as_save_IFS
bec39cab 3045
c906108c
SS
3046fi
3047fi
bec39cab 3048CC=$ac_cv_prog_CC
c906108c 3049if test -n "$CC"; then
81ecdfbb
RW
3050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3051$as_echo "$CC" >&6; }
c906108c 3052else
81ecdfbb
RW
3053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3054$as_echo "no" >&6; }
c906108c
SS
3055fi
3056
81ecdfbb 3057
b4e70030
JB
3058fi
3059if test -z "$ac_cv_prog_CC"; then
3060 ac_ct_CC=$CC
81ecdfbb
RW
3061 # Extract the first word of "gcc", so it can be a program name with args.
3062set dummy gcc; ac_word=$2
3063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3064$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3065if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3066 $as_echo_n "(cached) " >&6
b4e70030
JB
3067else
3068 if test -n "$ac_ct_CC"; then
3069 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3070else
3071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3072for as_dir in $PATH
3073do
3074 IFS=$as_save_IFS
3075 test -z "$as_dir" && as_dir=.
81ecdfbb 3076 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3077 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3078 ac_cv_prog_ac_ct_CC="gcc"
3079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 3080 break 2
4e8d927d 3081 fi
b4e70030 3082done
81ecdfbb
RW
3083 done
3084IFS=$as_save_IFS
b4e70030
JB
3085
3086fi
3087fi
3088ac_ct_CC=$ac_cv_prog_ac_ct_CC
3089if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3091$as_echo "$ac_ct_CC" >&6; }
b4e70030 3092else
81ecdfbb
RW
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3094$as_echo "no" >&6; }
b4e70030
JB
3095fi
3096
81ecdfbb
RW
3097 if test "x$ac_ct_CC" = x; then
3098 CC=""
3099 else
3100 case $cross_compiling:$ac_tool_warned in
3101yes:)
3102{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3103$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3104ac_tool_warned=yes ;;
3105esac
3106 CC=$ac_ct_CC
3107 fi
b4e70030
JB
3108else
3109 CC="$ac_cv_prog_CC"
3110fi
3111
c906108c 3112if test -z "$CC"; then
81ecdfbb
RW
3113 if test -n "$ac_tool_prefix"; then
3114 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3115set dummy ${ac_tool_prefix}cc; ac_word=$2
3116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3117$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3118if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3119 $as_echo_n "(cached) " >&6
c906108c
SS
3120else
3121 if test -n "$CC"; then
3122 ac_cv_prog_CC="$CC" # Let the user override the test.
3123else
bec39cab
AC
3124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3125for as_dir in $PATH
3126do
3127 IFS=$as_save_IFS
3128 test -z "$as_dir" && as_dir=.
81ecdfbb 3129 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3131 ac_cv_prog_CC="${ac_tool_prefix}cc"
3132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3133 break 2
3134 fi
3135done
81ecdfbb
RW
3136 done
3137IFS=$as_save_IFS
3138
3139fi
3140fi
3141CC=$ac_cv_prog_CC
3142if test -n "$CC"; then
3143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3144$as_echo "$CC" >&6; }
3145else
3146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3147$as_echo "no" >&6; }
3148fi
3149
3150
3151 fi
3152fi
3153if test -z "$CC"; then
3154 # Extract the first word of "cc", so it can be a program name with args.
3155set dummy cc; ac_word=$2
3156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3157$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3158if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3159 $as_echo_n "(cached) " >&6
3160else
3161 if test -n "$CC"; then
3162 ac_cv_prog_CC="$CC" # Let the user override the test.
3163else
3164 ac_prog_rejected=no
3165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3166for as_dir in $PATH
3167do
3168 IFS=$as_save_IFS
3169 test -z "$as_dir" && as_dir=.
3170 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3171 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3172 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3173 ac_prog_rejected=yes
3174 continue
3175 fi
3176 ac_cv_prog_CC="cc"
3177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3178 break 2
3179 fi
3180done
3181 done
3182IFS=$as_save_IFS
bec39cab 3183
c906108c
SS
3184if test $ac_prog_rejected = yes; then
3185 # We found a bogon in the path, so make sure we never use it.
3186 set dummy $ac_cv_prog_CC
3187 shift
bec39cab 3188 if test $# != 0; then
c906108c
SS
3189 # We chose a different compiler from the bogus one.
3190 # However, it has the same basename, so the bogon will be chosen
3191 # first if we set CC to just the basename; use the full file name.
3192 shift
bec39cab 3193 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3194 fi
3195fi
3196fi
3197fi
bec39cab 3198CC=$ac_cv_prog_CC
c906108c 3199if test -n "$CC"; then
81ecdfbb
RW
3200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3201$as_echo "$CC" >&6; }
c906108c 3202else
81ecdfbb
RW
3203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3204$as_echo "no" >&6; }
c906108c
SS
3205fi
3206
81ecdfbb 3207
bec39cab
AC
3208fi
3209if test -z "$CC"; then
3210 if test -n "$ac_tool_prefix"; then
81ecdfbb 3211 for ac_prog in cl.exe
bec39cab
AC
3212 do
3213 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3214set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3216$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3217if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3218 $as_echo_n "(cached) " >&6
c906108c
SS
3219else
3220 if test -n "$CC"; then
3221 ac_cv_prog_CC="$CC" # Let the user override the test.
3222else
bec39cab
AC
3223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3224for as_dir in $PATH
3225do
3226 IFS=$as_save_IFS
3227 test -z "$as_dir" && as_dir=.
81ecdfbb 3228 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3229 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3230 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3231 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3232 break 2
3233 fi
3234done
81ecdfbb
RW
3235 done
3236IFS=$as_save_IFS
bec39cab 3237
c906108c
SS
3238fi
3239fi
bec39cab 3240CC=$ac_cv_prog_CC
c906108c 3241if test -n "$CC"; then
81ecdfbb
RW
3242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3243$as_echo "$CC" >&6; }
c906108c 3244else
81ecdfbb
RW
3245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3246$as_echo "no" >&6; }
c906108c 3247fi
bec39cab 3248
81ecdfbb 3249
bec39cab
AC
3250 test -n "$CC" && break
3251 done
3252fi
3253if test -z "$CC"; then
3254 ac_ct_CC=$CC
81ecdfbb 3255 for ac_prog in cl.exe
bec39cab
AC
3256do
3257 # Extract the first word of "$ac_prog", so it can be a program name with args.
3258set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3260$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3261if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3262 $as_echo_n "(cached) " >&6
bec39cab
AC
3263else
3264 if test -n "$ac_ct_CC"; then
3265 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3266else
3267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268for as_dir in $PATH
3269do
3270 IFS=$as_save_IFS
3271 test -z "$as_dir" && as_dir=.
81ecdfbb 3272 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3273 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3274 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3275 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3276 break 2
c906108c 3277 fi
bec39cab 3278done
81ecdfbb
RW
3279 done
3280IFS=$as_save_IFS
bec39cab
AC
3281
3282fi
3283fi
3284ac_ct_CC=$ac_cv_prog_ac_ct_CC
3285if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3287$as_echo "$ac_ct_CC" >&6; }
bec39cab 3288else
81ecdfbb
RW
3289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3290$as_echo "no" >&6; }
c906108c
SS
3291fi
3292
81ecdfbb 3293
bec39cab
AC
3294 test -n "$ac_ct_CC" && break
3295done
c906108c 3296
81ecdfbb
RW
3297 if test "x$ac_ct_CC" = x; then
3298 CC=""
3299 else
3300 case $cross_compiling:$ac_tool_warned in
3301yes:)
3302{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3303$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3304ac_tool_warned=yes ;;
3305esac
3306 CC=$ac_ct_CC
3307 fi
bec39cab
AC
3308fi
3309
3310fi
3311
3312
81ecdfbb
RW
3313test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3314$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3315as_fn_error $? "no acceptable C compiler found in \$PATH
3316See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3317
3318# Provide some information about the compiler.
81ecdfbb
RW
3319$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3320set X $ac_compile
3321ac_compiler=$2
3322for ac_option in --version -v -V -qversion; do
3323 { { ac_try="$ac_compiler $ac_option >&5"
3324case "(($ac_try" in
3325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3326 *) ac_try_echo=$ac_try;;
3327esac
3328eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3329$as_echo "$ac_try_echo"; } >&5
3330 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3331 ac_status=$?
81ecdfbb
RW
3332 if test -s conftest.err; then
3333 sed '10a\
3334... rest of stderr output deleted ...
3335 10q' conftest.err >conftest.er1
3336 cat conftest.er1 >&5
81ecdfbb 3337 fi
d0ac1c44 3338 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3339 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3340 test $ac_status = 0; }
3341done
bec39cab 3342
81ecdfbb 3343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3344/* end confdefs.h. */
3345
3346int
3347main ()
3348{
3349
3350 ;
3351 return 0;
3352}
3353_ACEOF
3354ac_clean_files_save=$ac_clean_files
d0ac1c44 3355ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3356# Try to create an executable without -o first, disregard a.out.
3357# It will help us diagnose broken compilers, and finding out an intuition
3358# of exeext.
d0ac1c44
SM
3359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3360$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3361ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3362
3363# The possible output files:
3364ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3365
3366ac_rmfiles=
3367for ac_file in $ac_files
3368do
3369 case $ac_file in
3370 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3371 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3372 esac
3373done
3374rm -f $ac_rmfiles
3375
3376if { { ac_try="$ac_link_default"
3377case "(($ac_try" in
3378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3379 *) ac_try_echo=$ac_try;;
3380esac
3381eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3382$as_echo "$ac_try_echo"; } >&5
3383 (eval "$ac_link_default") 2>&5
3384 ac_status=$?
3385 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3386 test $ac_status = 0; }; then :
3387 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3388# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3389# in a Makefile. We should not override ac_cv_exeext if it was cached,
3390# so that the user can short-circuit this test for compilers unknown to
3391# Autoconf.
3392for ac_file in $ac_files ''
bec39cab
AC
3393do
3394 test -f "$ac_file" || continue
3395 case $ac_file in
81ecdfbb 3396 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3397 ;;
3398 [ab].out )
3399 # We found the default executable, but exeext='' is most
3400 # certainly right.
3401 break;;
3402 *.* )
81ecdfbb
RW
3403 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3404 then :; else
3405 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3406 fi
3407 # We set ac_cv_exeext here because the later test for it is not
3408 # safe: cross compilers may not add the suffix if given an `-o'
3409 # argument, so we may need to know it at that point already.
3410 # Even if this section looks crufty: it has the advantage of
3411 # actually working.
b4e70030
JB
3412 break;;
3413 * )
3414 break;;
bec39cab
AC
3415 esac
3416done
81ecdfbb
RW
3417test "$ac_cv_exeext" = no && ac_cv_exeext=
3418
bec39cab 3419else
81ecdfbb
RW
3420 ac_file=''
3421fi
81ecdfbb 3422if test -z "$ac_file"; then :
d0ac1c44
SM
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3424$as_echo "no" >&6; }
3425$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3426sed 's/^/| /' conftest.$ac_ext >&5
3427
81ecdfbb
RW
3428{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3429$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3430as_fn_error 77 "C compiler cannot create executables
3431See \`config.log' for more details" "$LINENO" 5; }
3432else
3433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3434$as_echo "yes" >&6; }
bec39cab 3435fi
d0ac1c44
SM
3436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3437$as_echo_n "checking for C compiler default output file name... " >&6; }
3438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3439$as_echo "$ac_file" >&6; }
b4e70030 3440ac_exeext=$ac_cv_exeext
b4e70030 3441
d0ac1c44 3442rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3443ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3445$as_echo_n "checking for suffix of executables... " >&6; }
3446if { { ac_try="$ac_link"
3447case "(($ac_try" in
3448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3449 *) ac_try_echo=$ac_try;;
3450esac
3451eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3452$as_echo "$ac_try_echo"; } >&5
3453 (eval "$ac_link") 2>&5
bec39cab 3454 ac_status=$?
81ecdfbb
RW
3455 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3456 test $ac_status = 0; }; then :
b4e70030
JB
3457 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3458# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3459# work properly (i.e., refer to `conftest.exe'), while it won't with
3460# `rm'.
3461for ac_file in conftest.exe conftest conftest.*; do
3462 test -f "$ac_file" || continue
3463 case $ac_file in
81ecdfbb 3464 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3465 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3466 break;;
3467 * ) break;;
3468 esac
3469done
c906108c 3470else
81ecdfbb
RW
3471 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3472$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3473as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3474See \`config.log' for more details" "$LINENO" 5; }
c906108c 3475fi
d0ac1c44 3476rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3478$as_echo "$ac_cv_exeext" >&6; }
c906108c 3479
b4e70030 3480rm -f conftest.$ac_ext
bec39cab
AC
3481EXEEXT=$ac_cv_exeext
3482ac_exeext=$EXEEXT
d0ac1c44
SM
3483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3484/* end confdefs.h. */
3485#include <stdio.h>
3486int
3487main ()
3488{
3489FILE *f = fopen ("conftest.out", "w");
3490 return ferror (f) || fclose (f) != 0;
3491
3492 ;
3493 return 0;
3494}
3495_ACEOF
3496ac_clean_files="$ac_clean_files conftest.out"
3497# Check that the compiler produces executables we can run. If not, either
3498# the compiler is broken, or we cross compile.
3499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3500$as_echo_n "checking whether we are cross compiling... " >&6; }
3501if test "$cross_compiling" != yes; then
3502 { { ac_try="$ac_link"
3503case "(($ac_try" in
3504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3505 *) ac_try_echo=$ac_try;;
3506esac
3507eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3508$as_echo "$ac_try_echo"; } >&5
3509 (eval "$ac_link") 2>&5
3510 ac_status=$?
3511 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3512 test $ac_status = 0; }
3513 if { ac_try='./conftest$ac_cv_exeext'
3514 { { case "(($ac_try" in
3515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3516 *) ac_try_echo=$ac_try;;
3517esac
3518eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3519$as_echo "$ac_try_echo"; } >&5
3520 (eval "$ac_try") 2>&5
3521 ac_status=$?
3522 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3523 test $ac_status = 0; }; }; then
3524 cross_compiling=no
3525 else
3526 if test "$cross_compiling" = maybe; then
3527 cross_compiling=yes
3528 else
3529 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3530$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3531as_fn_error $? "cannot run C compiled programs.
3532If you meant to cross compile, use \`--host'.
3533See \`config.log' for more details" "$LINENO" 5; }
3534 fi
3535 fi
3536fi
3537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3538$as_echo "$cross_compiling" >&6; }
3539
3540rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3541ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3543$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3544if ${ac_cv_objext+:} false; then :
81ecdfbb 3545 $as_echo_n "(cached) " >&6
bec39cab 3546else
81ecdfbb 3547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3548/* end confdefs.h. */
3549
3550int
3551main ()
3552{
3553
3554 ;
3555 return 0;
3556}
3557_ACEOF
3558rm -f conftest.o conftest.obj
81ecdfbb
RW
3559if { { ac_try="$ac_compile"
3560case "(($ac_try" in
3561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3562 *) ac_try_echo=$ac_try;;
3563esac
3564eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3565$as_echo "$ac_try_echo"; } >&5
3566 (eval "$ac_compile") 2>&5
3567 ac_status=$?
3568 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3569 test $ac_status = 0; }; then :
3570 for ac_file in conftest.o conftest.obj conftest.*; do
3571 test -f "$ac_file" || continue;
bec39cab 3572 case $ac_file in
81ecdfbb 3573 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3574 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3575 break;;
3576 esac
3577done
c906108c 3578else
81ecdfbb 3579 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3580sed 's/^/| /' conftest.$ac_ext >&5
3581
81ecdfbb
RW
3582{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3584as_fn_error $? "cannot compute suffix of object files: cannot compile
3585See \`config.log' for more details" "$LINENO" 5; }
c906108c 3586fi
b4e70030 3587rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3588fi
81ecdfbb
RW
3589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3590$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3591OBJEXT=$ac_cv_objext
3592ac_objext=$OBJEXT
81ecdfbb
RW
3593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3594$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3595if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3596 $as_echo_n "(cached) " >&6
c906108c 3597else
81ecdfbb 3598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3599/* end confdefs.h. */
3600
3601int
3602main ()
3603{
3604#ifndef __GNUC__
3605 choke me
3606#endif
3607
3608 ;
3609 return 0;
3610}
3611_ACEOF
81ecdfbb 3612if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3613 ac_compiler_gnu=yes
3614else
81ecdfbb 3615 ac_compiler_gnu=no
bec39cab 3616fi
81ecdfbb 3617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3618ac_cv_c_compiler_gnu=$ac_compiler_gnu
3619
3620fi
81ecdfbb
RW
3621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3622$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3623if test $ac_compiler_gnu = yes; then
3624 GCC=yes
3625else
3626 GCC=
3627fi
bec39cab
AC
3628ac_test_CFLAGS=${CFLAGS+set}
3629ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3631$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3632if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3633 $as_echo_n "(cached) " >&6
bec39cab 3634else
81ecdfbb
RW
3635 ac_save_c_werror_flag=$ac_c_werror_flag
3636 ac_c_werror_flag=yes
3637 ac_cv_prog_cc_g=no
3638 CFLAGS="-g"
3639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3640/* end confdefs.h. */
3641
3642int
3643main ()
3644{
3645
3646 ;
3647 return 0;
3648}
3649_ACEOF
81ecdfbb 3650if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3651 ac_cv_prog_cc_g=yes
3652else
81ecdfbb
RW
3653 CFLAGS=""
3654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3655/* end confdefs.h. */
3656
3657int
3658main ()
3659{
3660
3661 ;
3662 return 0;
3663}
3664_ACEOF
3665if ac_fn_c_try_compile "$LINENO"; then :
3666
3667else
3668 ac_c_werror_flag=$ac_save_c_werror_flag
3669 CFLAGS="-g"
3670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3671/* end confdefs.h. */
3672
3673int
3674main ()
3675{
c906108c 3676
81ecdfbb
RW
3677 ;
3678 return 0;
3679}
3680_ACEOF
3681if ac_fn_c_try_compile "$LINENO"; then :
3682 ac_cv_prog_cc_g=yes
3683fi
3684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3685fi
3686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3687fi
81ecdfbb
RW
3688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3689 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3690fi
81ecdfbb
RW
3691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3692$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3693if test "$ac_test_CFLAGS" = set; then
bec39cab 3694 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3695elif test $ac_cv_prog_cc_g = yes; then
3696 if test "$GCC" = yes; then
3697 CFLAGS="-g -O2"
3698 else
3699 CFLAGS="-g"
3700 fi
3701else
3702 if test "$GCC" = yes; then
3703 CFLAGS="-O2"
3704 else
3705 CFLAGS=
3706 fi
3707fi
81ecdfbb
RW
3708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3709$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3710if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3711 $as_echo_n "(cached) " >&6
bec39cab 3712else
81ecdfbb 3713 ac_cv_prog_cc_c89=no
bec39cab 3714ac_save_CC=$CC
81ecdfbb 3715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3716/* end confdefs.h. */
c906108c
SS
3717#include <stdarg.h>
3718#include <stdio.h>
d0ac1c44 3719struct stat;
c906108c
SS
3720/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3721struct buf { int x; };
3722FILE * (*rcsopen) (struct buf *, struct stat *, int);
3723static char *e (p, i)
3724 char **p;
3725 int i;
3726{
3727 return p[i];
3728}
3729static char *f (char * (*g) (char **, int), char **p, ...)
3730{
3731 char *s;
3732 va_list v;
3733 va_start (v,p);
3734 s = g (p, va_arg (v,int));
3735 va_end (v);
3736 return s;
3737}
bec39cab
AC
3738
3739/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3740 function prototypes and stuff, but not '\xHH' hex character constants.
3741 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3742 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3743 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3744 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3745 that's true only with -std. */
bec39cab
AC
3746int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3747
81ecdfbb
RW
3748/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3749 inside strings and character constants. */
3750#define FOO(x) 'x'
3751int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3752
c906108c
SS
3753int test (int i, double x);
3754struct s1 {int (*f) (int a);};
3755struct s2 {int (*f) (double a);};
3756int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3757int argc;
3758char **argv;
bec39cab
AC
3759int
3760main ()
3761{
c906108c 3762return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3763 ;
3764 return 0;
3765}
3766_ACEOF
81ecdfbb
RW
3767for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3768 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3769do
3770 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3771 if ac_fn_c_try_compile "$LINENO"; then :
3772 ac_cv_prog_cc_c89=$ac_arg
c906108c 3773fi
81ecdfbb
RW
3774rm -f core conftest.err conftest.$ac_objext
3775 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3776done
81ecdfbb 3777rm -f conftest.$ac_ext
bec39cab 3778CC=$ac_save_CC
c906108c
SS
3779
3780fi
81ecdfbb
RW
3781# AC_CACHE_VAL
3782case "x$ac_cv_prog_cc_c89" in
3783 x)
3784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3785$as_echo "none needed" >&6; } ;;
3786 xno)
3787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3788$as_echo "unsupported" >&6; } ;;
bec39cab 3789 *)
81ecdfbb
RW
3790 CC="$CC $ac_cv_prog_cc_c89"
3791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3792$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3793esac
81ecdfbb 3794if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3795
b4e70030
JB
3796fi
3797
bec39cab
AC
3798ac_ext=c
3799ac_cpp='$CPP $CPPFLAGS'
3800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3802ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3803
3bc3d82a
PA
3804ac_ext=cpp
3805ac_cpp='$CXXCPP $CPPFLAGS'
3806ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3807ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3808ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3809if test -z "$CXX"; then
3810 if test -n "$CCC"; then
3811 CXX=$CCC
3812 else
3813 if test -n "$ac_tool_prefix"; then
3814 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3815 do
3816 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3817set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3819$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3820if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3821 $as_echo_n "(cached) " >&6
3822else
3823 if test -n "$CXX"; then
3824 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3825else
3826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3827for as_dir in $PATH
3828do
3829 IFS=$as_save_IFS
3830 test -z "$as_dir" && as_dir=.
3831 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3833 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3835 break 2
3836 fi
3837done
3838 done
3839IFS=$as_save_IFS
3840
3841fi
3842fi
3843CXX=$ac_cv_prog_CXX
3844if test -n "$CXX"; then
3845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3846$as_echo "$CXX" >&6; }
3847else
3848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3849$as_echo "no" >&6; }
3850fi
3851
3852
3853 test -n "$CXX" && break
3854 done
3855fi
3856if test -z "$CXX"; then
3857 ac_ct_CXX=$CXX
3858 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3859do
3860 # Extract the first word of "$ac_prog", so it can be a program name with args.
3861set dummy $ac_prog; ac_word=$2
3862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3863$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3864if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3865 $as_echo_n "(cached) " >&6
3866else
3867 if test -n "$ac_ct_CXX"; then
3868 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3869else
3870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3871for as_dir in $PATH
3872do
3873 IFS=$as_save_IFS
3874 test -z "$as_dir" && as_dir=.
3875 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3876 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3877 ac_cv_prog_ac_ct_CXX="$ac_prog"
3878 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3879 break 2
3880 fi
3881done
3882 done
3883IFS=$as_save_IFS
3884
3885fi
3886fi
3887ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3888if test -n "$ac_ct_CXX"; then
3889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3890$as_echo "$ac_ct_CXX" >&6; }
3891else
3892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3893$as_echo "no" >&6; }
3894fi
3895
3896
3897 test -n "$ac_ct_CXX" && break
3898done
3899
3900 if test "x$ac_ct_CXX" = x; then
3901 CXX="g++"
3902 else
3903 case $cross_compiling:$ac_tool_warned in
3904yes:)
3905{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3906$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3907ac_tool_warned=yes ;;
3908esac
3909 CXX=$ac_ct_CXX
3910 fi
3911fi
3912
3913 fi
3914fi
3915# Provide some information about the compiler.
3916$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3917set X $ac_compile
3918ac_compiler=$2
3919for ac_option in --version -v -V -qversion; do
3920 { { ac_try="$ac_compiler $ac_option >&5"
3921case "(($ac_try" in
3922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3923 *) ac_try_echo=$ac_try;;
3924esac
3925eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3926$as_echo "$ac_try_echo"; } >&5
3927 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3928 ac_status=$?
3929 if test -s conftest.err; then
3930 sed '10a\
3931... rest of stderr output deleted ...
3932 10q' conftest.err >conftest.er1
3933 cat conftest.er1 >&5
3bc3d82a 3934 fi
d0ac1c44 3935 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3936 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3937 test $ac_status = 0; }
3938done
3939
3940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3941$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3942if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3943 $as_echo_n "(cached) " >&6
3944else
3945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3946/* end confdefs.h. */
3947
3948int
3949main ()
3950{
3951#ifndef __GNUC__
3952 choke me
3953#endif
3954
3955 ;
3956 return 0;
3957}
3958_ACEOF
3959if ac_fn_cxx_try_compile "$LINENO"; then :
3960 ac_compiler_gnu=yes
3961else
3962 ac_compiler_gnu=no
3963fi
3964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3965ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3966
3967fi
3968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3969$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3970if test $ac_compiler_gnu = yes; then
3971 GXX=yes
3972else
3973 GXX=
3974fi
3975ac_test_CXXFLAGS=${CXXFLAGS+set}
3976ac_save_CXXFLAGS=$CXXFLAGS
3977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3978$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3979if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3980 $as_echo_n "(cached) " >&6
3981else
3982 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3983 ac_cxx_werror_flag=yes
3984 ac_cv_prog_cxx_g=no
3985 CXXFLAGS="-g"
3986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3987/* end confdefs.h. */
3988
3989int
3990main ()
3991{
3992
3993 ;
3994 return 0;
3995}
3996_ACEOF
3997if ac_fn_cxx_try_compile "$LINENO"; then :
3998 ac_cv_prog_cxx_g=yes
3999else
4000 CXXFLAGS=""
4001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4002/* end confdefs.h. */
4003
4004int
4005main ()
4006{
4007
4008 ;
4009 return 0;
4010}
4011_ACEOF
4012if ac_fn_cxx_try_compile "$LINENO"; then :
4013
4014else
4015 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4016 CXXFLAGS="-g"
4017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4018/* end confdefs.h. */
4019
4020int
4021main ()
4022{
4023
4024 ;
4025 return 0;
4026}
4027_ACEOF
4028if ac_fn_cxx_try_compile "$LINENO"; then :
4029 ac_cv_prog_cxx_g=yes
4030fi
4031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4032fi
4033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4034fi
4035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4036 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4037fi
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4039$as_echo "$ac_cv_prog_cxx_g" >&6; }
4040if test "$ac_test_CXXFLAGS" = set; then
4041 CXXFLAGS=$ac_save_CXXFLAGS
4042elif test $ac_cv_prog_cxx_g = yes; then
4043 if test "$GXX" = yes; then
4044 CXXFLAGS="-g -O2"
4045 else
4046 CXXFLAGS="-g"
4047 fi
4048else
4049 if test "$GXX" = yes; then
4050 CXXFLAGS="-O2"
4051 else
4052 CXXFLAGS=
4053 fi
4054fi
4055ac_ext=c
4056ac_cpp='$CPP $CPPFLAGS'
4057ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4058ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4059ac_compiler_gnu=$ac_cv_c_compiler_gnu
4060
4061
60ca704f 4062
bec39cab
AC
4063ac_ext=c
4064ac_cpp='$CPP $CPPFLAGS'
4065ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4066ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4067ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4069$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
4070# On Suns, sometimes $CPP names a directory.
4071if test -n "$CPP" && test -d "$CPP"; then
4072 CPP=
8bb2c122 4073fi
bec39cab 4074if test -z "$CPP"; then
d0ac1c44 4075 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 4076 $as_echo_n "(cached) " >&6
bec39cab
AC
4077else
4078 # Double quotes because CPP needs to be expanded
4079 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4080 do
4081 ac_preproc_ok=false
4082for ac_c_preproc_warn_flag in '' yes
4083do
4084 # Use a header file that comes with gcc, so configuring glibc
4085 # with a fresh cross-compiler works.
4086 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4087 # <limits.h> exists even on freestanding compilers.
4088 # On the NeXT, cc -E runs the code through the compiler's parser,
4089 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4091/* end confdefs.h. */
4092#ifdef __STDC__
4093# include <limits.h>
4094#else
4095# include <assert.h>
4096#endif
4097 Syntax error
4098_ACEOF
81ecdfbb 4099if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4100
81ecdfbb 4101else
bec39cab
AC
4102 # Broken: fails on valid input.
4103continue
4104fi
d0ac1c44 4105rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4106
81ecdfbb 4107 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4108 # can be detected and how.
81ecdfbb 4109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4110/* end confdefs.h. */
4111#include <ac_nonexistent.h>
4112_ACEOF
81ecdfbb 4113if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4114 # Broken: success on invalid input.
4115continue
8bb2c122 4116else
bec39cab
AC
4117 # Passes both tests.
4118ac_preproc_ok=:
4119break
8bb2c122 4120fi
d0ac1c44 4121rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4122
bec39cab
AC
4123done
4124# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4125rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4126if $ac_preproc_ok; then :
bec39cab
AC
4127 break
4128fi
8bb2c122 4129
bec39cab
AC
4130 done
4131 ac_cv_prog_CPP=$CPP
ddc9cd0f 4132
c906108c 4133fi
bec39cab
AC
4134 CPP=$ac_cv_prog_CPP
4135else
4136 ac_cv_prog_CPP=$CPP
c906108c 4137fi
81ecdfbb
RW
4138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4139$as_echo "$CPP" >&6; }
bec39cab
AC
4140ac_preproc_ok=false
4141for ac_c_preproc_warn_flag in '' yes
4142do
4143 # Use a header file that comes with gcc, so configuring glibc
4144 # with a fresh cross-compiler works.
4145 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4146 # <limits.h> exists even on freestanding compilers.
4147 # On the NeXT, cc -E runs the code through the compiler's parser,
4148 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4150/* end confdefs.h. */
4151#ifdef __STDC__
4152# include <limits.h>
4153#else
4154# include <assert.h>
4155#endif
4156 Syntax error
4157_ACEOF
81ecdfbb 4158if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4159
81ecdfbb 4160else
bec39cab
AC
4161 # Broken: fails on valid input.
4162continue
4163fi
d0ac1c44 4164rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4165
81ecdfbb 4166 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4167 # can be detected and how.
81ecdfbb 4168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4169/* end confdefs.h. */
4170#include <ac_nonexistent.h>
4171_ACEOF
81ecdfbb 4172if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4173 # Broken: success on invalid input.
4174continue
c906108c 4175else
bec39cab
AC
4176 # Passes both tests.
4177ac_preproc_ok=:
4178break
c906108c 4179fi
d0ac1c44 4180rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4181
bec39cab
AC
4182done
4183# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4184rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4185if $ac_preproc_ok; then :
4186
c906108c 4187else
81ecdfbb
RW
4188 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4189$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4190as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4191See \`config.log' for more details" "$LINENO" 5; }
c906108c 4192fi
c906108c 4193
bec39cab
AC
4194ac_ext=c
4195ac_cpp='$CPP $CPPFLAGS'
4196ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4197ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4198ac_compiler_gnu=$ac_cv_c_compiler_gnu
4199
4200
81ecdfbb
RW
4201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4202$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4203if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4204 $as_echo_n "(cached) " >&6
4e8d927d 4205else
81ecdfbb
RW
4206 if test -z "$GREP"; then
4207 ac_path_GREP_found=false
4208 # Loop through the user's path and test for each of PROGNAME-LIST
4209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4210for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4211do
4212 IFS=$as_save_IFS
4213 test -z "$as_dir" && as_dir=.
4214 for ac_prog in grep ggrep; do
4215 for ac_exec_ext in '' $ac_executable_extensions; do
4216 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4217 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4218# Check for GNU ac_path_GREP and select it if it is found.
4219 # Check for GNU $ac_path_GREP
4220case `"$ac_path_GREP" --version 2>&1` in
4221*GNU*)
4222 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4223*)
4224 ac_count=0
4225 $as_echo_n 0123456789 >"conftest.in"
4226 while :
4227 do
4228 cat "conftest.in" "conftest.in" >"conftest.tmp"
4229 mv "conftest.tmp" "conftest.in"
4230 cp "conftest.in" "conftest.nl"
4231 $as_echo 'GREP' >> "conftest.nl"
4232 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4233 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4234 as_fn_arith $ac_count + 1 && ac_count=$as_val
4235 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4236 # Best one so far, save it but keep looking for a better one
4237 ac_cv_path_GREP="$ac_path_GREP"
4238 ac_path_GREP_max=$ac_count
bec39cab 4239 fi
81ecdfbb
RW
4240 # 10*(2^10) chars as input seems more than enough
4241 test $ac_count -gt 10 && break
4242 done
4243 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4244esac
bec39cab 4245
81ecdfbb
RW
4246 $ac_path_GREP_found && break 3
4247 done
4248 done
4249 done
4250IFS=$as_save_IFS
4251 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4252 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4253 fi
c906108c 4254else
81ecdfbb 4255 ac_cv_path_GREP=$GREP
c906108c 4256fi
c906108c 4257
81ecdfbb
RW
4258fi
4259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4260$as_echo "$ac_cv_path_GREP" >&6; }
4261 GREP="$ac_cv_path_GREP"
c906108c 4262
c906108c 4263
81ecdfbb
RW
4264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4265$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4266if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4267 $as_echo_n "(cached) " >&6
783e057b 4268else
81ecdfbb
RW
4269 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4270 then ac_cv_path_EGREP="$GREP -E"
4271 else
4272 if test -z "$EGREP"; then
4273 ac_path_EGREP_found=false
4274 # Loop through the user's path and test for each of PROGNAME-LIST
4275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4276for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4277do
4278 IFS=$as_save_IFS
4279 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4280 for ac_prog in egrep; do
4281 for ac_exec_ext in '' $ac_executable_extensions; do
4282 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4283 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4284# Check for GNU ac_path_EGREP and select it if it is found.
4285 # Check for GNU $ac_path_EGREP
4286case `"$ac_path_EGREP" --version 2>&1` in
4287*GNU*)
4288 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4289*)
4290 ac_count=0
4291 $as_echo_n 0123456789 >"conftest.in"
4292 while :
4293 do
4294 cat "conftest.in" "conftest.in" >"conftest.tmp"
4295 mv "conftest.tmp" "conftest.in"
4296 cp "conftest.in" "conftest.nl"
4297 $as_echo 'EGREP' >> "conftest.nl"
4298 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4299 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4300 as_fn_arith $ac_count + 1 && ac_count=$as_val
4301 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4302 # Best one so far, save it but keep looking for a better one
4303 ac_cv_path_EGREP="$ac_path_EGREP"
4304 ac_path_EGREP_max=$ac_count
4305 fi
4306 # 10*(2^10) chars as input seems more than enough
4307 test $ac_count -gt 10 && break
4308 done
4309 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4310esac
bec39cab 4311
81ecdfbb
RW
4312 $ac_path_EGREP_found && break 3
4313 done
4314 done
4315 done
4316IFS=$as_save_IFS
4317 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4318 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4319 fi
783e057b 4320else
81ecdfbb 4321 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4322fi
4323
81ecdfbb 4324 fi
783e057b 4325fi
81ecdfbb
RW
4326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4327$as_echo "$ac_cv_path_EGREP" >&6; }
4328 EGREP="$ac_cv_path_EGREP"
4329
783e057b 4330
81ecdfbb
RW
4331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4332$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4333if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4334 $as_echo_n "(cached) " >&6
783e057b 4335else
81ecdfbb 4336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4337/* end confdefs.h. */
783e057b 4338#include <stdlib.h>
bec39cab 4339#include <stdarg.h>
783e057b
DJ
4340#include <string.h>
4341#include <float.h>
c906108c 4342
bec39cab
AC
4343int
4344main ()
4345{
c906108c 4346
bec39cab
AC
4347 ;
4348 return 0;
4349}
4350_ACEOF
81ecdfbb 4351if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4352 ac_cv_header_stdc=yes
c906108c 4353else
81ecdfbb 4354 ac_cv_header_stdc=no
c906108c 4355fi
81ecdfbb 4356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4357
783e057b
DJ
4358if test $ac_cv_header_stdc = yes; then
4359 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4361/* end confdefs.h. */
4362#include <string.h>
c906108c 4363
783e057b
DJ
4364_ACEOF
4365if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4366 $EGREP "memchr" >/dev/null 2>&1; then :
4367
c906108c 4368else
783e057b 4369 ac_cv_header_stdc=no
c906108c 4370fi
783e057b 4371rm -f conftest*
c906108c
SS
4372
4373fi
4374
783e057b
DJ
4375if test $ac_cv_header_stdc = yes; then
4376 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4378/* end confdefs.h. */
4379#include <stdlib.h>
bec39cab 4380
783e057b
DJ
4381_ACEOF
4382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4383 $EGREP "free" >/dev/null 2>&1; then :
4384
bec39cab 4385else
783e057b 4386 ac_cv_header_stdc=no
bec39cab 4387fi
783e057b 4388rm -f conftest*
bec39cab
AC
4389
4390fi
bec39cab 4391
783e057b
DJ
4392if test $ac_cv_header_stdc = yes; then
4393 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4394 if test "$cross_compiling" = yes; then :
783e057b 4395 :
bec39cab 4396else
81ecdfbb 4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4398/* end confdefs.h. */
4399#include <ctype.h>
81ecdfbb 4400#include <stdlib.h>
783e057b
DJ
4401#if ((' ' & 0x0FF) == 0x020)
4402# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4403# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4404#else
4405# define ISLOWER(c) \
4406 (('a' <= (c) && (c) <= 'i') \
4407 || ('j' <= (c) && (c) <= 'r') \
4408 || ('s' <= (c) && (c) <= 'z'))
4409# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4410#endif
4411
4412#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4413int
4414main ()
4415{
4416 int i;
4417 for (i = 0; i < 256; i++)
4418 if (XOR (islower (i), ISLOWER (i))
4419 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4420 return 2;
4421 return 0;
783e057b
DJ
4422}
4423_ACEOF
81ecdfbb 4424if ac_fn_c_try_run "$LINENO"; then :
783e057b 4425
81ecdfbb
RW
4426else
4427 ac_cv_header_stdc=no
783e057b 4428fi
81ecdfbb
RW
4429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4430 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4431fi
81ecdfbb 4432
783e057b
DJ
4433fi
4434fi
81ecdfbb
RW
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4436$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4437if test $ac_cv_header_stdc = yes; then
4438
81ecdfbb 4439$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4440
4441fi
4442
4443# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4444for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4445 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4446do :
4447 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4448ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4449"
d0ac1c44 4450if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4451 cat >>confdefs.h <<_ACEOF
81ecdfbb 4452#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4453_ACEOF
4454
4455fi
4456
4457done
4458
4459
4460
81ecdfbb 4461 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4462if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4463 MINIX=yes
4464else
4465 MINIX=
4466fi
4467
4468
4469 if test "$MINIX" = yes; then
4470
81ecdfbb 4471$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4472
4473
81ecdfbb 4474$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4475
4476
81ecdfbb 4477$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4478
4479 fi
4480
4481
81ecdfbb
RW
4482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4483$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4484if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4485 $as_echo_n "(cached) " >&6
783e057b 4486else
81ecdfbb 4487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4488/* end confdefs.h. */
4489
d0ac1c44
SM
4490# define __EXTENSIONS__ 1
4491 $ac_includes_default
783e057b
DJ
4492int
4493main ()
4494{
4495
4496 ;
4497 return 0;
4498}
4499_ACEOF
81ecdfbb 4500if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4501 ac_cv_safe_to_define___extensions__=yes
4502else
81ecdfbb 4503 ac_cv_safe_to_define___extensions__=no
783e057b 4504fi
81ecdfbb 4505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4506fi
81ecdfbb
RW
4507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4508$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4509 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4510 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4511
81ecdfbb 4512 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4513
81ecdfbb 4514 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4515
81ecdfbb 4516 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4517
81ecdfbb 4518 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4519
4520
c971b7fa
PA
4521ac_aux_dir=
4522for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4523 if test -f "$ac_dir/install-sh"; then
4524 ac_aux_dir=$ac_dir
4525 ac_install_sh="$ac_aux_dir/install-sh -c"
4526 break
4527 elif test -f "$ac_dir/install.sh"; then
4528 ac_aux_dir=$ac_dir
4529 ac_install_sh="$ac_aux_dir/install.sh -c"
4530 break
4531 elif test -f "$ac_dir/shtool"; then
4532 ac_aux_dir=$ac_dir
4533 ac_install_sh="$ac_aux_dir/shtool install -c"
4534 break
4535 fi
c971b7fa
PA
4536done
4537if test -z "$ac_aux_dir"; then
d0ac1c44 4538 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4539fi
770d76d7 4540
c971b7fa
PA
4541# These three variables are undocumented and unsupported,
4542# and are intended to be withdrawn in a future Autoconf release.
4543# They can cause serious problems if a builder's source tree is in a directory
4544# whose full name contains unusual characters.
4545ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4546ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4547ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4548
770d76d7 4549
c971b7fa
PA
4550# Make sure we can run config.sub.
4551$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4552 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4553
c971b7fa
PA
4554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4555$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4556if ${ac_cv_build+:} false; then :
c971b7fa 4557 $as_echo_n "(cached) " >&6
770d76d7 4558else
c971b7fa
PA
4559 ac_build_alias=$build_alias
4560test "x$ac_build_alias" = x &&
4561 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4562test "x$ac_build_alias" = x &&
d0ac1c44 4563 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4564ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4565 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4566
770d76d7 4567fi
c971b7fa
PA
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4569$as_echo "$ac_cv_build" >&6; }
4570case $ac_cv_build in
4571*-*-*) ;;
d0ac1c44 4572*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4573esac
c971b7fa
PA
4574build=$ac_cv_build
4575ac_save_IFS=$IFS; IFS='-'
4576set x $ac_cv_build
4577shift
4578build_cpu=$1
4579build_vendor=$2
4580shift; shift
4581# Remember, the first character of IFS is used to create $*,
4582# except with old shells:
4583build_os=$*
4584IFS=$ac_save_IFS
4585case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4586
4587
c971b7fa
PA
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4589$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4590if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4591 $as_echo_n "(cached) " >&6
4592else
c971b7fa
PA
4593 if test "x$host_alias" = x; then
4594 ac_cv_host=$ac_cv_build
81ecdfbb 4595else
c971b7fa 4596 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4597 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4598fi
81ecdfbb
RW
4599
4600fi
c971b7fa
PA
4601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4602$as_echo "$ac_cv_host" >&6; }
4603case $ac_cv_host in
4604*-*-*) ;;
d0ac1c44 4605*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4606esac
c971b7fa
PA
4607host=$ac_cv_host
4608ac_save_IFS=$IFS; IFS='-'
4609set x $ac_cv_host
4610shift
4611host_cpu=$1
4612host_vendor=$2
4613shift; shift
4614# Remember, the first character of IFS is used to create $*,
4615# except with old shells:
4616host_os=$*
4617IFS=$ac_save_IFS
4618case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4619
4620
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4622$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4623if ${ac_cv_target+:} false; then :
3388710e
JM
4624 $as_echo_n "(cached) " >&6
4625else
4626 if test "x$target_alias" = x; then
4627 ac_cv_target=$ac_cv_host
4628else
4629 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4630 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4631fi
4632
4633fi
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4635$as_echo "$ac_cv_target" >&6; }
4636case $ac_cv_target in
4637*-*-*) ;;
d0ac1c44 4638*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4639esac
4640target=$ac_cv_target
4641ac_save_IFS=$IFS; IFS='-'
4642set x $ac_cv_target
4643shift
4644target_cpu=$1
4645target_vendor=$2
4646shift; shift
4647# Remember, the first character of IFS is used to create $*,
4648# except with old shells:
4649target_os=$*
4650IFS=$ac_save_IFS
4651case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4652
4653
4654# The aliases save the names the user supplied, while $host etc.
4655# will get canonicalized.
4656test -n "$target_alias" &&
4657 test "$program_prefix$program_suffix$program_transform_name" = \
4658 NONENONEs,x,x, &&
4659 program_prefix=${target_alias}-
4660
4661# The tests for host and target for $enable_largefile require
4662# canonical names.
4663
4664
81ecdfbb 4665
da2f07f1
JK
4666# As the $enable_largefile decision depends on --enable-plugins we must set it
4667# even in directories otherwise not depending on the $plugins option.
4668
4669
2974be62
AM
4670 maybe_plugins=no
4671 for ac_header in dlfcn.h
4672do :
4673 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4674"
d0ac1c44 4675if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4676 cat >>confdefs.h <<_ACEOF
4677#define HAVE_DLFCN_H 1
4678_ACEOF
4679 maybe_plugins=yes
4680fi
4681
4682done
4683
4684 for ac_header in windows.h
4685do :
4686 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4687"
d0ac1c44 4688if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4689 cat >>confdefs.h <<_ACEOF
4690#define HAVE_WINDOWS_H 1
4691_ACEOF
4692 maybe_plugins=yes
4693fi
4694
4695done
4696
4697
4698 # Check whether --enable-plugins was given.
da2f07f1
JK
4699if test "${enable_plugins+set}" = set; then :
4700 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4701 no) plugins=no ;;
4702 *) plugins=yes
4703 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4704 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4705 fi ;;
4706 esac
da2f07f1 4707else
2974be62
AM
4708 plugins=$maybe_plugins
4709
da2f07f1
JK
4710fi
4711
2974be62 4712 if test "$plugins" = "yes"; then
458412c3
TT
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4714$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4715if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4716 $as_echo_n "(cached) " >&6
4717else
4718 ac_func_search_save_LIBS=$LIBS
4719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4720/* end confdefs.h. */
4721
4722/* Override any GCC internal prototype to avoid an error.
4723 Use char because int might match the return type of a GCC
4724 builtin and then its argument prototype would still apply. */
4725#ifdef __cplusplus
4726extern "C"
4727#endif
458412c3 4728char dlsym ();
2974be62
AM
4729int
4730main ()
4731{
458412c3 4732return dlsym ();
2974be62
AM
4733 ;
4734 return 0;
4735}
4736_ACEOF
4737for ac_lib in '' dl; do
4738 if test -z "$ac_lib"; then
4739 ac_res="none required"
4740 else
4741 ac_res=-l$ac_lib
4742 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4743 fi
4744 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4745 ac_cv_search_dlsym=$ac_res
2974be62
AM
4746fi
4747rm -f core conftest.err conftest.$ac_objext \
4748 conftest$ac_exeext
d0ac1c44 4749 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4750 break
4751fi
4752done
d0ac1c44 4753if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4754
4755else
458412c3 4756 ac_cv_search_dlsym=no
2974be62
AM
4757fi
4758rm conftest.$ac_ext
4759LIBS=$ac_func_search_save_LIBS
4760fi
458412c3
TT
4761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4762$as_echo "$ac_cv_search_dlsym" >&6; }
4763ac_res=$ac_cv_search_dlsym
2974be62
AM
4764if test "$ac_res" != no; then :
4765 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4766
4767fi
4768
4769 fi
da2f07f1
JK
4770
4771
4772case "${host}" in
c8693053
RO
4773 sparc-*-solaris*|i?86-*-solaris*)
4774 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
4775 # were mutually exclusive until Solaris 11.3. Without procfs support,
4776 # the bfd/ elf module cannot provide certain routines such as
4777 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
4778 # explicitly requested large-file support through the
4779 # --enable-largefile switch, disable large-file support in favor of
4780 # procfs support.
4781 #
4782 # Check if <sys/procfs.h> is incompatible with large-file support.
4783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4784/* end confdefs.h. */
4785#define _FILE_OFFSET_BITS 64
4786#define _STRUCTURED_PROC 1
4787#include <sys/procfs.h>
4788int
4789main ()
4790{
4791
4792 ;
4793 return 0;
4794}
4795_ACEOF
4796if ac_fn_c_try_compile "$LINENO"; then :
4797 acx_cv_procfs_lfs=yes
4798else
4799 acx_cv_procfs_lfs=no
4800fi
4801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4802 #
4803 # Forcefully disable large-file support only if necessary, gdb is in
4804 # tree and enabled.
4805 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
4806 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
4807 : ${enable_largefile="no"}
4808 if test "$plugins" = yes; then
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4810plugin support disabled; require large-file support which is incompatible with GDB." >&5
4811$as_echo "$as_me: WARNING:
4812plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
4813 plugins=no
4814 fi
4815 fi
4816 #
4817 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
4818 # benefit of g++ 9+ which predefines it on Solaris.
4819 if test "$enable_largefile" = no; then
4820 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
4821
4822 fi
da2f07f1
JK
4823 ;;
4824esac
4825
4826# Check whether --enable-largefile was given.
4827if test "${enable_largefile+set}" = set; then :
4828 enableval=$enable_largefile;
4829fi
4830
4831if test "$enable_largefile" != no; then
4832
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4834$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4835if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4836 $as_echo_n "(cached) " >&6
4837else
4838 ac_cv_sys_largefile_CC=no
4839 if test "$GCC" != yes; then
4840 ac_save_CC=$CC
4841 while :; do
4842 # IRIX 6.2 and later do not support large files by default,
4843 # so use the C compiler's -n32 option if that helps.
4844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4845/* end confdefs.h. */
4846#include <sys/types.h>
4847 /* Check that off_t can represent 2**63 - 1 correctly.
4848 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4849 since some C++ compilers masquerading as C compilers
4850 incorrectly reject 9223372036854775807. */
4851#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4852 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4853 && LARGE_OFF_T % 2147483647 == 1)
4854 ? 1 : -1];
4855int
4856main ()
4857{
4858
4859 ;
4860 return 0;
4861}
4862_ACEOF
4863 if ac_fn_c_try_compile "$LINENO"; then :
4864 break
4865fi
4866rm -f core conftest.err conftest.$ac_objext
4867 CC="$CC -n32"
4868 if ac_fn_c_try_compile "$LINENO"; then :
4869 ac_cv_sys_largefile_CC=' -n32'; break
4870fi
4871rm -f core conftest.err conftest.$ac_objext
4872 break
4873 done
4874 CC=$ac_save_CC
4875 rm -f conftest.$ac_ext
4876 fi
4877fi
4878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4879$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4880 if test "$ac_cv_sys_largefile_CC" != no; then
4881 CC=$CC$ac_cv_sys_largefile_CC
4882 fi
4883
4884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4885$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4886if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4887 $as_echo_n "(cached) " >&6
4888else
4889 while :; do
4890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4891/* end confdefs.h. */
4892#include <sys/types.h>
4893 /* Check that off_t can represent 2**63 - 1 correctly.
4894 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4895 since some C++ compilers masquerading as C compilers
4896 incorrectly reject 9223372036854775807. */
4897#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4898 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4899 && LARGE_OFF_T % 2147483647 == 1)
4900 ? 1 : -1];
4901int
4902main ()
4903{
4904
4905 ;
4906 return 0;
4907}
4908_ACEOF
4909if ac_fn_c_try_compile "$LINENO"; then :
4910 ac_cv_sys_file_offset_bits=no; break
4911fi
4912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4914/* end confdefs.h. */
4915#define _FILE_OFFSET_BITS 64
4916#include <sys/types.h>
4917 /* Check that off_t can represent 2**63 - 1 correctly.
4918 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4919 since some C++ compilers masquerading as C compilers
4920 incorrectly reject 9223372036854775807. */
4921#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4922 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4923 && LARGE_OFF_T % 2147483647 == 1)
4924 ? 1 : -1];
4925int
4926main ()
4927{
4928
4929 ;
4930 return 0;
4931}
4932_ACEOF
4933if ac_fn_c_try_compile "$LINENO"; then :
4934 ac_cv_sys_file_offset_bits=64; break
4935fi
4936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4937 ac_cv_sys_file_offset_bits=unknown
4938 break
4939done
4940fi
4941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4942$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4943case $ac_cv_sys_file_offset_bits in #(
4944 no | unknown) ;;
4945 *)
4946cat >>confdefs.h <<_ACEOF
4947#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4948_ACEOF
4949;;
4950esac
4951rm -rf conftest*
4952 if test $ac_cv_sys_file_offset_bits = unknown; then
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4954$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4955if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4956 $as_echo_n "(cached) " >&6
4957else
4958 while :; do
4959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4960/* end confdefs.h. */
4961#include <sys/types.h>
4962 /* Check that off_t can represent 2**63 - 1 correctly.
4963 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4964 since some C++ compilers masquerading as C compilers
4965 incorrectly reject 9223372036854775807. */
4966#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4967 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4968 && LARGE_OFF_T % 2147483647 == 1)
4969 ? 1 : -1];
4970int
4971main ()
4972{
4973
4974 ;
4975 return 0;
4976}
4977_ACEOF
4978if ac_fn_c_try_compile "$LINENO"; then :
4979 ac_cv_sys_large_files=no; break
4980fi
4981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4983/* end confdefs.h. */
4984#define _LARGE_FILES 1
4985#include <sys/types.h>
4986 /* Check that off_t can represent 2**63 - 1 correctly.
4987 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4988 since some C++ compilers masquerading as C compilers
4989 incorrectly reject 9223372036854775807. */
4990#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4991 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4992 && LARGE_OFF_T % 2147483647 == 1)
4993 ? 1 : -1];
4994int
4995main ()
4996{
4997
4998 ;
4999 return 0;
5000}
5001_ACEOF
5002if ac_fn_c_try_compile "$LINENO"; then :
5003 ac_cv_sys_large_files=1; break
5004fi
5005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5006 ac_cv_sys_large_files=unknown
5007 break
5008done
5009fi
5010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5011$as_echo "$ac_cv_sys_large_files" >&6; }
5012case $ac_cv_sys_large_files in #(
5013 no | unknown) ;;
5014 *)
5015cat >>confdefs.h <<_ACEOF
5016#define _LARGE_FILES $ac_cv_sys_large_files
5017_ACEOF
5018;;
5019esac
5020rm -rf conftest*
5021 fi
d0ac1c44
SM
5022
5023
da2f07f1
JK
5024fi
5025
5026
5027
81ecdfbb
RW
5028
5029
5030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
5031$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 5032if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
5033 $as_echo_n "(cached) " >&6
5034else
5035 am_cv_prog_cc_stdc=no
5036ac_save_CC="$CC"
5037# Don't try gcc -ansi; that turns off useful extensions and
5038# breaks some systems' header files.
5039# AIX -qlanglvl=ansi
5040# Ultrix and OSF/1 -std1
5041# HP-UX 10.20 and later -Ae
5042# HP-UX older versions -Aa -D_HPUX_SOURCE
5043# SVR4 -Xc -D__EXTENSIONS__
5044for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5045do
783e057b 5046 CC="$ac_save_CC $ac_arg"
81ecdfbb 5047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
5048/* end confdefs.h. */
5049#include <stdarg.h>
5050#include <stdio.h>
5051#include <sys/types.h>
5052#include <sys/stat.h>
5053/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5054struct buf { int x; };
5055FILE * (*rcsopen) (struct buf *, struct stat *, int);
5056static char *e (p, i)
5057 char **p;
5058 int i;
5059{
5060 return p[i];
5061}
5062static char *f (char * (*g) (char **, int), char **p, ...)
5063{
5064 char *s;
5065 va_list v;
5066 va_start (v,p);
5067 s = g (p, va_arg (v,int));
5068 va_end (v);
5069 return s;
5070}
5071int test (int i, double x);
5072struct s1 {int (*f) (int a);};
5073struct s2 {int (*f) (double a);};
5074int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5075int argc;
5076char **argv;
5077
5078int
5079main ()
5080{
5081
5082return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5083
5084 ;
5085 return 0;
5086}
5087_ACEOF
81ecdfbb 5088if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5089 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 5090fi
81ecdfbb 5091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5092done
5093CC="$ac_save_CC"
5094
5095fi
5096
5097if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5099$as_echo "none needed" >&6; }
783e057b 5100else
81ecdfbb
RW
5101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5102$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
5103fi
5104case "x$am_cv_prog_cc_stdc" in
5105 x|xno) ;;
5106 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5107esac
5108
d0ac1c44
SM
5109# Expand $ac_aux_dir to an absolute path.
5110am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 5111
d0ac1c44 5112if test x"${install_sh+set}" != xset; then
4869db5e
RM
5113 case $am_aux_dir in
5114 *\ * | *\ *)
5115 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5116 *)
5117 install_sh="\${SHELL} $am_aux_dir/install-sh"
5118 esac
5119fi
5120
d0ac1c44
SM
5121# Installed binaries are usually stripped using 'strip' when the user
5122# run "make install-strip". However 'strip' might not be the right
4869db5e 5123# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 5124# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
5125if test "$cross_compiling" != no; then
5126 if test -n "$ac_tool_prefix"; then
5127 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5128set dummy ${ac_tool_prefix}strip; ac_word=$2
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5131if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
5132 $as_echo_n "(cached) " >&6
5133else
5134 if test -n "$STRIP"; then
5135 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5136else
5137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140 IFS=$as_save_IFS
5141 test -z "$as_dir" && as_dir=.
5142 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5144 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146 break 2
5147 fi
5148done
5149 done
5150IFS=$as_save_IFS
5151
5152fi
5153fi
5154STRIP=$ac_cv_prog_STRIP
5155if test -n "$STRIP"; then
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5157$as_echo "$STRIP" >&6; }
5158else
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160$as_echo "no" >&6; }
5161fi
5162
5163
5164fi
5165if test -z "$ac_cv_prog_STRIP"; then
5166 ac_ct_STRIP=$STRIP
5167 # Extract the first word of "strip", so it can be a program name with args.
5168set dummy strip; ac_word=$2
5169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5170$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5171if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5172 $as_echo_n "(cached) " >&6
5173else
5174 if test -n "$ac_ct_STRIP"; then
5175 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5176else
5177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5178for as_dir in $PATH
5179do
5180 IFS=$as_save_IFS
5181 test -z "$as_dir" && as_dir=.
5182 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5183 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5184 ac_cv_prog_ac_ct_STRIP="strip"
5185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5186 break 2
5187 fi
5188done
5189 done
5190IFS=$as_save_IFS
5191
5192fi
5193fi
5194ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5195if test -n "$ac_ct_STRIP"; then
5196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5197$as_echo "$ac_ct_STRIP" >&6; }
5198else
5199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5200$as_echo "no" >&6; }
5201fi
5202
5203 if test "x$ac_ct_STRIP" = x; then
5204 STRIP=":"
5205 else
5206 case $cross_compiling:$ac_tool_warned in
5207yes:)
5208{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5209$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5210ac_tool_warned=yes ;;
5211esac
5212 STRIP=$ac_ct_STRIP
5213 fi
5214else
5215 STRIP="$ac_cv_prog_STRIP"
5216fi
5217
5218fi
5219INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5220
783e057b
DJ
5221
5222ac_aux_dir=
81ecdfbb 5223for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5224 if test -f "$ac_dir/install-sh"; then
5225 ac_aux_dir=$ac_dir
5226 ac_install_sh="$ac_aux_dir/install-sh -c"
5227 break
5228 elif test -f "$ac_dir/install.sh"; then
5229 ac_aux_dir=$ac_dir
5230 ac_install_sh="$ac_aux_dir/install.sh -c"
5231 break
5232 elif test -f "$ac_dir/shtool"; then
5233 ac_aux_dir=$ac_dir
5234 ac_install_sh="$ac_aux_dir/shtool install -c"
5235 break
5236 fi
783e057b
DJ
5237done
5238if test -z "$ac_aux_dir"; then
d0ac1c44 5239 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5240fi
81ecdfbb
RW
5241
5242# These three variables are undocumented and unsupported,
5243# and are intended to be withdrawn in a future Autoconf release.
5244# They can cause serious problems if a builder's source tree is in a directory
5245# whose full name contains unusual characters.
5246ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5247ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5248ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5249
783e057b 5250
783e057b 5251
9009e1ae
MR
5252test "$program_prefix" != NONE &&
5253 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5254# Use a double $ so make ignores it.
5255test "$program_suffix" != NONE &&
5256 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5257# Double any \ or $.
5258# By default was `s,x,x', remove it if useless.
5259ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5260program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5261
81ecdfbb 5262
0bcda685
PA
5263# We require a C++11 compiler. Check if one is available, and if
5264# necessary, set CXX_DIALECT to some -std=xxx switch.
5265
41260ac2 5266 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5267 ac_ext=cpp
5268ac_cpp='$CXXCPP $CPPFLAGS'
5269ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5270ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5271ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5272 CXX_DIALECT=""
5273 ac_success=no
5274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5275$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5276if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5277 $as_echo_n "(cached) " >&6
5278else
5279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5280/* end confdefs.h. */
5281
5282
5283// If the compiler admits that it is not ready for C++11, why torture it?
5284// Hopefully, this will speed up the test.
5285
5286#ifndef __cplusplus
5287
5288#error "This is not a C++ compiler"
5289
5290#elif __cplusplus < 201103L
5291
5292#error "This is not a C++11 compiler"
5293
5294#else
5295
5296namespace cxx11
5297{
5298
5299 namespace test_static_assert
5300 {
5301
5302 template <typename T>
5303 struct check
5304 {
5305 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5306 };
5307
5308 }
5309
5310 namespace test_final_override
5311 {
5312
5313 struct Base
5314 {
5315 virtual void f() {}
5316 };
5317
5318 struct Derived : public Base
5319 {
5320 virtual void f() override {}
5321 };
5322
5323 }
5324
5325 namespace test_double_right_angle_brackets
5326 {
5327
5328 template < typename T >
5329 struct check {};
5330
5331 typedef check<void> single_type;
5332 typedef check<check<void>> double_type;
5333 typedef check<check<check<void>>> triple_type;
5334 typedef check<check<check<check<void>>>> quadruple_type;
5335
5336 }
5337
5338 namespace test_decltype
5339 {
5340
5341 int
5342 f()
5343 {
5344 int a = 1;
5345 decltype(a) b = 2;
5346 return a + b;
5347 }
5348
5349 }
5350
5351 namespace test_type_deduction
5352 {
5353
5354 template < typename T1, typename T2 >
5355 struct is_same
5356 {
5357 static const bool value = false;
5358 };
5359
5360 template < typename T >
5361 struct is_same<T, T>
5362 {
5363 static const bool value = true;
5364 };
5365
5366 template < typename T1, typename T2 >
5367 auto
5368 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5369 {
5370 return a1 + a2;
5371 }
5372
5373 int
5374 test(const int c, volatile int v)
5375 {
5376 static_assert(is_same<int, decltype(0)>::value == true, "");
5377 static_assert(is_same<int, decltype(c)>::value == false, "");
5378 static_assert(is_same<int, decltype(v)>::value == false, "");
5379 auto ac = c;
5380 auto av = v;
5381 auto sumi = ac + av + 'x';
5382 auto sumf = ac + av + 1.0;
5383 static_assert(is_same<int, decltype(ac)>::value == true, "");
5384 static_assert(is_same<int, decltype(av)>::value == true, "");
5385 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5386 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5387 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5388 return (sumf > 0.0) ? sumi : add(c, v);
5389 }
5390
5391 }
5392
5393 namespace test_noexcept
5394 {
5395
5396 int f() { return 0; }
5397 int g() noexcept { return 0; }
5398
5399 static_assert(noexcept(f()) == false, "");
5400 static_assert(noexcept(g()) == true, "");
5401
5402 }
5403
5404 namespace test_constexpr
5405 {
5406
5407 template < typename CharT >
5408 unsigned long constexpr
5409 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5410 {
5411 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5412 }
5413
5414 template < typename CharT >
5415 unsigned long constexpr
5416 strlen_c(const CharT *const s) noexcept
5417 {
5418 return strlen_c_r(s, 0UL);
5419 }
5420
5421 static_assert(strlen_c("") == 0UL, "");
5422 static_assert(strlen_c("1") == 1UL, "");
5423 static_assert(strlen_c("example") == 7UL, "");
5424 static_assert(strlen_c("another\0example") == 7UL, "");
5425
5426 }
5427
5428 namespace test_rvalue_references
5429 {
5430
5431 template < int N >
5432 struct answer
5433 {
5434 static constexpr int value = N;
5435 };
5436
5437 answer<1> f(int&) { return answer<1>(); }
5438 answer<2> f(const int&) { return answer<2>(); }
5439 answer<3> f(int&&) { return answer<3>(); }
5440
5441 void
5442 test()
5443 {
5444 int i = 0;
5445 const int c = 0;
5446 static_assert(decltype(f(i))::value == 1, "");
5447 static_assert(decltype(f(c))::value == 2, "");
5448 static_assert(decltype(f(0))::value == 3, "");
5449 }
5450
5451 }
5452
5453 namespace test_uniform_initialization
5454 {
5455
5456 struct test
5457 {
5458 static const int zero {};
5459 static const int one {1};
5460 };
5461
5462 static_assert(test::zero == 0, "");
5463 static_assert(test::one == 1, "");
5464
5465 }
5466
5467 namespace test_lambdas
5468 {
5469
5470 void
5471 test1()
5472 {
5473 auto lambda1 = [](){};
5474 auto lambda2 = lambda1;
5475 lambda1();
5476 lambda2();
5477 }
5478
5479 int
5480 test2()
5481 {
5482 auto a = [](int i, int j){ return i + j; }(1, 2);
5483 auto b = []() -> int { return '0'; }();
5484 auto c = [=](){ return a + b; }();
5485 auto d = [&](){ return c; }();
5486 auto e = [a, &b](int x) mutable {
5487 const auto identity = [](int y){ return y; };
5488 for (auto i = 0; i < a; ++i)
5489 a += b--;
5490 return x + identity(a + b);
5491 }(0);
5492 return a + b + c + d + e;
5493 }
5494
5495 int
5496 test3()
5497 {
5498 const auto nullary = [](){ return 0; };
5499 const auto unary = [](int x){ return x; };
5500 using nullary_t = decltype(nullary);
5501 using unary_t = decltype(unary);
5502 const auto higher1st = [](nullary_t f){ return f(); };
5503 const auto higher2nd = [unary](nullary_t f1){
5504 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5505 };
5506 return higher1st(nullary) + higher2nd(nullary)(unary);
5507 }
5508
5509 }
5510
5511 namespace test_variadic_templates
5512 {
5513
5514 template <int...>
5515 struct sum;
5516
5517 template <int N0, int... N1toN>
5518 struct sum<N0, N1toN...>
5519 {
5520 static constexpr auto value = N0 + sum<N1toN...>::value;
5521 };
5522
5523 template <>
5524 struct sum<>
5525 {
5526 static constexpr auto value = 0;
5527 };
5528
5529 static_assert(sum<>::value == 0, "");
5530 static_assert(sum<1>::value == 1, "");
5531 static_assert(sum<23>::value == 23, "");
5532 static_assert(sum<1, 2>::value == 3, "");
5533 static_assert(sum<5, 5, 11>::value == 21, "");
5534 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5535
5536 }
5537
5538 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5539 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5540 // because of this.
5541 namespace test_template_alias_sfinae
5542 {
5543
5544 struct foo {};
5545
5546 template<typename T>
5547 using member = typename T::member_type;
5548
5549 template<typename T>
5550 void func(...) {}
5551
5552 template<typename T>
5553 void func(member<T>*) {}
5554
5555 void test();
5556
5557 void test() { func<foo>(0); }
5558
5559 }
5560
5561} // namespace cxx11
5562
5563#endif // __cplusplus >= 201103L
5564
5565
5566
5567_ACEOF
5568if ac_fn_cxx_try_compile "$LINENO"; then :
5569 ax_cv_cxx_compile_cxx11=yes
5570else
5571 ax_cv_cxx_compile_cxx11=no
5572fi
5573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5574fi
5575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5576$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5577 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5578 ac_success=yes
5579 fi
5580
5581 if test x$ac_success = xno; then
41260ac2
SM
5582 for alternative in ${ax_cxx_compile_alternatives}; do
5583 switch="-std=gnu++${alternative}"
0bcda685
PA
5584 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5586$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5587if eval \${$cachevar+:} false; then :
0bcda685
PA
5588 $as_echo_n "(cached) " >&6
5589else
5590 ac_save_CXX="$CXX"
5591 CXX="$CXX $switch"
5592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5593/* end confdefs.h. */
5594
5595
5596// If the compiler admits that it is not ready for C++11, why torture it?
5597// Hopefully, this will speed up the test.
5598
5599#ifndef __cplusplus
5600
5601#error "This is not a C++ compiler"
5602
5603#elif __cplusplus < 201103L
5604
5605#error "This is not a C++11 compiler"
5606
5607#else
5608
5609namespace cxx11
5610{
5611
5612 namespace test_static_assert
5613 {
5614
5615 template <typename T>
5616 struct check
5617 {
5618 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5619 };
5620
5621 }
5622
5623 namespace test_final_override
5624 {
5625
5626 struct Base
5627 {
5628 virtual void f() {}
5629 };
5630
5631 struct Derived : public Base
5632 {
5633 virtual void f() override {}
5634 };
5635
5636 }
5637
5638 namespace test_double_right_angle_brackets
5639 {
5640
5641 template < typename T >
5642 struct check {};
5643
5644 typedef check<void> single_type;
5645 typedef check<check<void>> double_type;
5646 typedef check<check<check<void>>> triple_type;
5647 typedef check<check<check<check<void>>>> quadruple_type;
5648
5649 }
5650
5651 namespace test_decltype
5652 {
5653
5654 int
5655 f()
5656 {
5657 int a = 1;
5658 decltype(a) b = 2;
5659 return a + b;
5660 }
5661
5662 }
5663
5664 namespace test_type_deduction
5665 {
5666
5667 template < typename T1, typename T2 >
5668 struct is_same
5669 {
5670 static const bool value = false;
5671 };
5672
5673 template < typename T >
5674 struct is_same<T, T>
5675 {
5676 static const bool value = true;
5677 };
5678
5679 template < typename T1, typename T2 >
5680 auto
5681 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5682 {
5683 return a1 + a2;
5684 }
5685
5686 int
5687 test(const int c, volatile int v)
5688 {
5689 static_assert(is_same<int, decltype(0)>::value == true, "");
5690 static_assert(is_same<int, decltype(c)>::value == false, "");
5691 static_assert(is_same<int, decltype(v)>::value == false, "");
5692 auto ac = c;
5693 auto av = v;
5694 auto sumi = ac + av + 'x';
5695 auto sumf = ac + av + 1.0;
5696 static_assert(is_same<int, decltype(ac)>::value == true, "");
5697 static_assert(is_same<int, decltype(av)>::value == true, "");
5698 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5699 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5700 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5701 return (sumf > 0.0) ? sumi : add(c, v);
5702 }
5703
5704 }
5705
5706 namespace test_noexcept
5707 {
5708
5709 int f() { return 0; }
5710 int g() noexcept { return 0; }
5711
5712 static_assert(noexcept(f()) == false, "");
5713 static_assert(noexcept(g()) == true, "");
5714
5715 }
5716
5717 namespace test_constexpr
5718 {
5719
5720 template < typename CharT >
5721 unsigned long constexpr
5722 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5723 {
5724 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5725 }
5726
5727 template < typename CharT >
5728 unsigned long constexpr
5729 strlen_c(const CharT *const s) noexcept
5730 {
5731 return strlen_c_r(s, 0UL);
5732 }
5733
5734 static_assert(strlen_c("") == 0UL, "");
5735 static_assert(strlen_c("1") == 1UL, "");
5736 static_assert(strlen_c("example") == 7UL, "");
5737 static_assert(strlen_c("another\0example") == 7UL, "");
5738
5739 }
5740
5741 namespace test_rvalue_references
5742 {
5743
5744 template < int N >
5745 struct answer
5746 {
5747 static constexpr int value = N;
5748 };
5749
5750 answer<1> f(int&) { return answer<1>(); }
5751 answer<2> f(const int&) { return answer<2>(); }
5752 answer<3> f(int&&) { return answer<3>(); }
5753
5754 void
5755 test()
5756 {
5757 int i = 0;
5758 const int c = 0;
5759 static_assert(decltype(f(i))::value == 1, "");
5760 static_assert(decltype(f(c))::value == 2, "");
5761 static_assert(decltype(f(0))::value == 3, "");
5762 }
5763
5764 }
5765
5766 namespace test_uniform_initialization
5767 {
5768
5769 struct test
5770 {
5771 static const int zero {};
5772 static const int one {1};
5773 };
5774
5775 static_assert(test::zero == 0, "");
5776 static_assert(test::one == 1, "");
5777
5778 }
5779
5780 namespace test_lambdas
5781 {
5782
5783 void
5784 test1()
5785 {
5786 auto lambda1 = [](){};
5787 auto lambda2 = lambda1;
5788 lambda1();
5789 lambda2();
5790 }
5791
5792 int
5793 test2()
5794 {
5795 auto a = [](int i, int j){ return i + j; }(1, 2);
5796 auto b = []() -> int { return '0'; }();
5797 auto c = [=](){ return a + b; }();
5798 auto d = [&](){ return c; }();
5799 auto e = [a, &b](int x) mutable {
5800 const auto identity = [](int y){ return y; };
5801 for (auto i = 0; i < a; ++i)
5802 a += b--;
5803 return x + identity(a + b);
5804 }(0);
5805 return a + b + c + d + e;
5806 }
5807
5808 int
5809 test3()
5810 {
5811 const auto nullary = [](){ return 0; };
5812 const auto unary = [](int x){ return x; };
5813 using nullary_t = decltype(nullary);
5814 using unary_t = decltype(unary);
5815 const auto higher1st = [](nullary_t f){ return f(); };
5816 const auto higher2nd = [unary](nullary_t f1){
5817 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5818 };
5819 return higher1st(nullary) + higher2nd(nullary)(unary);
5820 }
5821
5822 }
5823
5824 namespace test_variadic_templates
5825 {
5826
5827 template <int...>
5828 struct sum;
5829
5830 template <int N0, int... N1toN>
5831 struct sum<N0, N1toN...>
5832 {
5833 static constexpr auto value = N0 + sum<N1toN...>::value;
5834 };
5835
5836 template <>
5837 struct sum<>
5838 {
5839 static constexpr auto value = 0;
5840 };
5841
5842 static_assert(sum<>::value == 0, "");
5843 static_assert(sum<1>::value == 1, "");
5844 static_assert(sum<23>::value == 23, "");
5845 static_assert(sum<1, 2>::value == 3, "");
5846 static_assert(sum<5, 5, 11>::value == 21, "");
5847 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5848
5849 }
5850
5851 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5852 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5853 // because of this.
5854 namespace test_template_alias_sfinae
5855 {
5856
5857 struct foo {};
5858
5859 template<typename T>
5860 using member = typename T::member_type;
5861
5862 template<typename T>
5863 void func(...) {}
5864
5865 template<typename T>
5866 void func(member<T>*) {}
5867
5868 void test();
5869
5870 void test() { func<foo>(0); }
5871
5872 }
5873
5874} // namespace cxx11
5875
5876#endif // __cplusplus >= 201103L
5877
5878
5879
5880_ACEOF
5881if ac_fn_cxx_try_compile "$LINENO"; then :
5882 eval $cachevar=yes
5883else
5884 eval $cachevar=no
5885fi
5886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5887 CXX="$ac_save_CXX"
5888fi
5889eval ac_res=\$$cachevar
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5891$as_echo "$ac_res" >&6; }
5892 if eval test x\$$cachevar = xyes; then
5893 CXX_DIALECT="$switch"
5894 ac_success=yes
5895 break
5896 fi
5897 done
5898 fi
5899
5900 if test x$ac_success = xno; then
41260ac2
SM
5901 for alternative in ${ax_cxx_compile_alternatives}; do
5902 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5903 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5905$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5906if eval \${$cachevar+:} false; then :
0bcda685
PA
5907 $as_echo_n "(cached) " >&6
5908else
5909 ac_save_CXX="$CXX"
41260ac2
SM
5910 CXX="$CXX $switch"
5911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5912/* end confdefs.h. */
5913
5914
5915// If the compiler admits that it is not ready for C++11, why torture it?
5916// Hopefully, this will speed up the test.
5917
5918#ifndef __cplusplus
5919
5920#error "This is not a C++ compiler"
5921
5922#elif __cplusplus < 201103L
5923
5924#error "This is not a C++11 compiler"
5925
5926#else
5927
5928namespace cxx11
5929{
5930
5931 namespace test_static_assert
5932 {
5933
5934 template <typename T>
5935 struct check
5936 {
5937 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5938 };
5939
5940 }
5941
5942 namespace test_final_override
5943 {
5944
5945 struct Base
5946 {
5947 virtual void f() {}
5948 };
5949
5950 struct Derived : public Base
5951 {
5952 virtual void f() override {}
5953 };
5954
5955 }
5956
5957 namespace test_double_right_angle_brackets
5958 {
5959
5960 template < typename T >
5961 struct check {};
5962
5963 typedef check<void> single_type;
5964 typedef check<check<void>> double_type;
5965 typedef check<check<check<void>>> triple_type;
5966 typedef check<check<check<check<void>>>> quadruple_type;
5967
5968 }
5969
5970 namespace test_decltype
5971 {
5972
5973 int
5974 f()
5975 {
5976 int a = 1;
5977 decltype(a) b = 2;
5978 return a + b;
5979 }
5980
5981 }
5982
5983 namespace test_type_deduction
5984 {
5985
5986 template < typename T1, typename T2 >
5987 struct is_same
5988 {
5989 static const bool value = false;
5990 };
5991
5992 template < typename T >
5993 struct is_same<T, T>
5994 {
5995 static const bool value = true;
5996 };
5997
5998 template < typename T1, typename T2 >
5999 auto
6000 add(T1 a1, T2 a2) -> decltype(a1 + a2)
6001 {
6002 return a1 + a2;
6003 }
6004
6005 int
6006 test(const int c, volatile int v)
6007 {
6008 static_assert(is_same<int, decltype(0)>::value == true, "");
6009 static_assert(is_same<int, decltype(c)>::value == false, "");
6010 static_assert(is_same<int, decltype(v)>::value == false, "");
6011 auto ac = c;
6012 auto av = v;
6013 auto sumi = ac + av + 'x';
6014 auto sumf = ac + av + 1.0;
6015 static_assert(is_same<int, decltype(ac)>::value == true, "");
6016 static_assert(is_same<int, decltype(av)>::value == true, "");
6017 static_assert(is_same<int, decltype(sumi)>::value == true, "");
6018 static_assert(is_same<int, decltype(sumf)>::value == false, "");
6019 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6020 return (sumf > 0.0) ? sumi : add(c, v);
6021 }
6022
6023 }
6024
6025 namespace test_noexcept
6026 {
6027
6028 int f() { return 0; }
6029 int g() noexcept { return 0; }
6030
6031 static_assert(noexcept(f()) == false, "");
6032 static_assert(noexcept(g()) == true, "");
6033
6034 }
6035
6036 namespace test_constexpr
6037 {
6038
6039 template < typename CharT >
6040 unsigned long constexpr
6041 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6042 {
6043 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6044 }
6045
6046 template < typename CharT >
6047 unsigned long constexpr
6048 strlen_c(const CharT *const s) noexcept
6049 {
6050 return strlen_c_r(s, 0UL);
6051 }
6052
6053 static_assert(strlen_c("") == 0UL, "");
6054 static_assert(strlen_c("1") == 1UL, "");
6055 static_assert(strlen_c("example") == 7UL, "");
6056 static_assert(strlen_c("another\0example") == 7UL, "");
6057
6058 }
6059
6060 namespace test_rvalue_references
6061 {
6062
6063 template < int N >
6064 struct answer
6065 {
6066 static constexpr int value = N;
6067 };
6068
6069 answer<1> f(int&) { return answer<1>(); }
6070 answer<2> f(const int&) { return answer<2>(); }
6071 answer<3> f(int&&) { return answer<3>(); }
6072
6073 void
6074 test()
6075 {
6076 int i = 0;
6077 const int c = 0;
6078 static_assert(decltype(f(i))::value == 1, "");
6079 static_assert(decltype(f(c))::value == 2, "");
6080 static_assert(decltype(f(0))::value == 3, "");
6081 }
6082
6083 }
6084
6085 namespace test_uniform_initialization
6086 {
6087
6088 struct test
6089 {
6090 static const int zero {};
6091 static const int one {1};
6092 };
6093
6094 static_assert(test::zero == 0, "");
6095 static_assert(test::one == 1, "");
6096
6097 }
6098
6099 namespace test_lambdas
6100 {
6101
6102 void
6103 test1()
6104 {
6105 auto lambda1 = [](){};
6106 auto lambda2 = lambda1;
6107 lambda1();
6108 lambda2();
6109 }
6110
6111 int
6112 test2()
6113 {
6114 auto a = [](int i, int j){ return i + j; }(1, 2);
6115 auto b = []() -> int { return '0'; }();
6116 auto c = [=](){ return a + b; }();
6117 auto d = [&](){ return c; }();
6118 auto e = [a, &b](int x) mutable {
6119 const auto identity = [](int y){ return y; };
6120 for (auto i = 0; i < a; ++i)
6121 a += b--;
6122 return x + identity(a + b);
6123 }(0);
6124 return a + b + c + d + e;
6125 }
6126
6127 int
6128 test3()
6129 {
6130 const auto nullary = [](){ return 0; };
6131 const auto unary = [](int x){ return x; };
6132 using nullary_t = decltype(nullary);
6133 using unary_t = decltype(unary);
6134 const auto higher1st = [](nullary_t f){ return f(); };
6135 const auto higher2nd = [unary](nullary_t f1){
6136 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6137 };
6138 return higher1st(nullary) + higher2nd(nullary)(unary);
6139 }
6140
6141 }
6142
6143 namespace test_variadic_templates
6144 {
6145
6146 template <int...>
6147 struct sum;
6148
6149 template <int N0, int... N1toN>
6150 struct sum<N0, N1toN...>
6151 {
6152 static constexpr auto value = N0 + sum<N1toN...>::value;
6153 };
6154
6155 template <>
6156 struct sum<>
6157 {
6158 static constexpr auto value = 0;
6159 };
6160
6161 static_assert(sum<>::value == 0, "");
6162 static_assert(sum<1>::value == 1, "");
6163 static_assert(sum<23>::value == 23, "");
6164 static_assert(sum<1, 2>::value == 3, "");
6165 static_assert(sum<5, 5, 11>::value == 21, "");
6166 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6167
6168 }
6169
6170 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6171 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6172 // because of this.
6173 namespace test_template_alias_sfinae
6174 {
6175
6176 struct foo {};
6177
6178 template<typename T>
6179 using member = typename T::member_type;
6180
6181 template<typename T>
6182 void func(...) {}
6183
6184 template<typename T>
6185 void func(member<T>*) {}
6186
6187 void test();
6188
6189 void test() { func<foo>(0); }
6190
6191 }
6192
6193} // namespace cxx11
6194
6195#endif // __cplusplus >= 201103L
6196
6197
6198
6199_ACEOF
6200if ac_fn_cxx_try_compile "$LINENO"; then :
6201 eval $cachevar=yes
6202else
6203 eval $cachevar=no
6204fi
6205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6206 CXX="$ac_save_CXX"
0bcda685
PA
6207fi
6208eval ac_res=\$$cachevar
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6210$as_echo "$ac_res" >&6; }
41260ac2
SM
6211 if eval test x\$$cachevar = xyes; then
6212 CXX_DIALECT="$switch"
6213 ac_success=yes
6214 break
6215 fi
6216 done
6217 if test x$ac_success = xyes; then
0bcda685
PA
6218 break
6219 fi
6220 done
6221 fi
6222 ac_ext=c
6223ac_cpp='$CPP $CPPFLAGS'
6224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6226ac_compiler_gnu=$ac_cv_c_compiler_gnu
6227
6228 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6229 if test x$ac_success = xno; then
d0ac1c44 6230 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6231 fi
6232 fi
6233 if test x$ac_success = xno; then
6234 HAVE_CXX11=0
6235 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6236$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6237 else
6238 HAVE_CXX11=1
6239
6240$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6241
6242 fi
6243
6244
6245
6246
a417dc56
RW
6247# Dependency checking.
6248rm -rf .tst 2>/dev/null
6249mkdir .tst 2>/dev/null
6250if test -d .tst; then
6251 am__leading_dot=.
6252else
6253 am__leading_dot=_
6254fi
6255rmdir .tst 2>/dev/null
6256
6257DEPDIR="${am__leading_dot}deps"
6258
81ecdfbb 6259ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6260
6261
6262depcc="$CC" am_compiler_list=
6263
6264am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6266$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6267if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6268 $as_echo_n "(cached) " >&6
a417dc56
RW
6269else
6270 if test -f "$am_depcomp"; then
6271 # We make a subdir and do the tests there. Otherwise we can end up
6272 # making bogus files that we don't know about and never remove. For
6273 # instance it was reported that on HP-UX the gcc test will end up
6274 # making a dummy file named `D' -- because `-MD' means `put the output
6275 # in D'.
6276 mkdir conftest.dir
6277 # Copy depcomp to subdir because otherwise we won't find it if we're
6278 # using a relative directory.
6279 cp "$am_depcomp" conftest.dir
6280 cd conftest.dir
6281 # We will build objects and dependencies in a subdirectory because
6282 # it helps to detect inapplicable dependency modes. For instance
6283 # both Tru64's cc and ICC support -MD to output dependencies as a
6284 # side effect of compilation, but ICC will put the dependencies in
6285 # the current directory while Tru64 will put them in the object
6286 # directory.
6287 mkdir sub
6288
6289 am_cv_CC_dependencies_compiler_type=none
6290 if test "$am_compiler_list" = ""; then
6291 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6292 fi
6293 for depmode in $am_compiler_list; do
6294 if test $depmode = none; then break; fi
6295
81ecdfbb 6296 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6297 # Setup a source with many dependencies, because some compilers
6298 # like to wrap large dependency lists on column 80 (with \), and
6299 # we should not choose a depcomp mode which is confused by this.
6300 #
6301 # We need to recreate these files for each test, as the compiler may
6302 # overwrite some of them when testing with obscure command lines.
6303 # This happens at least with the AIX C compiler.
6304 : > sub/conftest.c
6305 for i in 1 2 3 4 5 6; do
6306 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6307 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6308 # Solaris 8's {/usr,}/bin/sh.
6309 touch sub/conftst$i.h
6310 done
6311 echo "include sub/conftest.Po" > confmf
6312
6313 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6314 # mode. It turns out that the SunPro C++ compiler does not properly
6315 # handle `-M -o', and we need to detect this.
6316 depcmd="depmode=$depmode \
6317 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6318 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6319 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6320 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6321 if env $depcmd > conftest.err 2>&1 &&
6322 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6323 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6324 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6325 # icc doesn't choke on unknown options, it will just issue warnings
6326 # or remarks (even with -Werror). So we grep stderr for any message
6327 # that says an option was ignored or not supported.
6328 # When given -MP, icc 7.0 and 7.1 complain thusly:
6329 # icc: Command line warning: ignoring option '-M'; no argument required
6330 # The diagnosis changed in icc 8.0:
6331 # icc: Command line remark: option '-MP' not supported
6332 if (grep 'ignoring option' conftest.err ||
6333 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6334 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6335 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6336 break
6337 fi
6338 fi
81ecdfbb 6339 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6340 sed -e 's/^/| /' < conftest.err >&5
6341 done
6342
6343 cd ..
6344 rm -rf conftest.dir
6345else
6346 am_cv_CC_dependencies_compiler_type=none
6347fi
6348
6349fi
81ecdfbb
RW
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6351$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6352if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6353then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6354else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6355
6356fi
6357
6358
c971b7fa
PA
6359
6360CONFIG_OBS=
6361CONFIG_DEPS=
6362CONFIG_SRCS=
6363ENABLE_CFLAGS=
6364
6365CONFIG_ALL=
6366CONFIG_CLEAN=
6367CONFIG_INSTALL=
6368CONFIG_UNINSTALL=
6369
6370# If we haven't got the data from the intl directory,
6371# assume NLS is disabled.
6372USE_NLS=no
6373LIBINTL=
6374LIBINTL_DEP=
6375INCINTL=
6376XGETTEXT=
6377GMSGFMT=
6378POSUB=
783e057b
DJ
6379
6380if test -f ../intl/config.intl; then
6381 . ../intl/config.intl
6382fi
81ecdfbb
RW
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6384$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6385if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387$as_echo "no" >&6; }
783e057b 6388else
81ecdfbb
RW
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6390$as_echo "yes" >&6; }
783e057b 6391
81ecdfbb 6392$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6393
6394
81ecdfbb
RW
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6396$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6397 # Look for .po and .gmo files in the source directory.
6398 CATALOGS=
6399 XLINGUAS=
6400 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6401 # If there aren't any .gmo files the shell will give us the
6402 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6403 # weeded out.
6404 case "$cat" in *\**)
6405 continue;;
6406 esac
6407 # The quadruple backslash is collapsed to a double backslash
6408 # by the backticks, then collapsed again by the double quotes,
6409 # leaving us with one backslash in the sed expression (right
6410 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6411 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6412 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6413 # The user is allowed to set LINGUAS to a list of languages to
6414 # install catalogs for. If it's empty that means "all of them."
6415 if test "x$LINGUAS" = x; then
6416 CATALOGS="$CATALOGS $cat"
6417 XLINGUAS="$XLINGUAS $lang"
6418 else
6419 case "$LINGUAS" in *$lang*)
6420 CATALOGS="$CATALOGS $cat"
6421 XLINGUAS="$XLINGUAS $lang"
6422 ;;
6423 esac
e28b3332
DJ
6424 fi
6425 done
c971b7fa
PA
6426 LINGUAS="$XLINGUAS"
6427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6428$as_echo "$LINGUAS" >&6; }
6429
6430
6431 DATADIRNAME=share
6432
6433 INSTOBJEXT=.mo
6434
6435 GENCAT=gencat
6436
6437 CATOBJEXT=.gmo
e28b3332 6438
e28b3332
DJ
6439fi
6440
c971b7fa
PA
6441localedir='${datadir}/locale'
6442
6443
6444if test x"$USE_NLS" = xyes; then
6445 CONFIG_ALL="$CONFIG_ALL all-po"
6446 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6447 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6448 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6449fi
e28b3332 6450
c971b7fa
PA
6451PACKAGE=gdb
6452
6453cat >>confdefs.h <<_ACEOF
6454#define PACKAGE "$PACKAGE"
6455_ACEOF
6456
6457
6458
6459# We never need to detect it in this sub-configure.
6460# But preserve it for config.status --recheck.
6461
6462
6463
6464MAKEINFO_EXTRA_FLAGS=""
6465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6466$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6467if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6468 $as_echo_n "(cached) " >&6
6469else
6470 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6471 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6472 gdb_cv_have_makeinfo_click=yes
6473 else
6474 gdb_cv_have_makeinfo_click=no
6475 fi
6476fi
6477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6478$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6479if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6480 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6481fi
e28b3332
DJ
6482
6483
bec39cab
AC
6484
6485
81ecdfbb
RW
6486# Check whether --with-separate-debug-dir was given.
6487if test "${with_separate_debug_dir+set}" = set; then :
6488 withval=$with_separate_debug_dir;
b14b1491
TT
6489 DEBUGDIR=$withval
6490else
6491 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6492fi
6493
20e95c23 6494
783e057b
DJ
6495 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6496 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6497 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6498 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6499
783e057b
DJ
6500cat >>confdefs.h <<_ACEOF
6501#define DEBUGDIR "$ac_define_dir"
20e95c23 6502_ACEOF
20e95c23 6503
20e95c23 6504
20e95c23 6505
0c4a4063 6506
b14b1491
TT
6507 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6508 if test "x$prefix" = xNONE; then
6509 test_prefix=/usr/local
6510 else
6511 test_prefix=$prefix
6512 fi
783e057b 6513 else
b14b1491 6514 test_prefix=$exec_prefix
783e057b 6515 fi
b14b1491
TT
6516 value=0
6517 case ${ac_define_dir} in
6518 "${test_prefix}"|"${test_prefix}/"*|\
6519 '${exec_prefix}'|'${exec_prefix}/'*)
6520 value=1
6521 ;;
6522 esac
6523
6524cat >>confdefs.h <<_ACEOF
6525#define DEBUGDIR_RELOCATABLE $value
6526_ACEOF
6527
6528
6529
0c4a4063 6530
f83d8a90
DE
6531# We can't pass paths as command line arguments.
6532# Mingw32 tries to be clever and will convert the paths for us.
6533# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6534# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6535# This breaks GDB's relocatable path conversions since paths passed in
6536# config.h would not get so translated, the path prefixes no longer match.
6537
6538 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6539 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6540 ac_define_dir=`eval echo $bindir`
6541 ac_define_dir=`eval echo $ac_define_dir`
6542
6543cat >>confdefs.h <<_ACEOF
6544#define BINDIR "$ac_define_dir"
6545_ACEOF
6546
6547
6548
b14b1491
TT
6549# GDB's datadir relocation
6550
6551
6552
81ecdfbb
RW
6553# Check whether --with-gdb-datadir was given.
6554if test "${with_gdb_datadir+set}" = set; then :
6555 withval=$with_gdb_datadir;
b14b1491 6556 GDB_DATADIR=$withval
20e95c23 6557else
b14b1491 6558 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6559fi
6560
20e95c23 6561
b14b1491
TT
6562 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6563 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6564 ac_define_dir=`eval echo $GDB_DATADIR`
6565 ac_define_dir=`eval echo $ac_define_dir`
6566
6567cat >>confdefs.h <<_ACEOF
6568#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6569_ACEOF
6570
b14b1491
TT
6571
6572
0c4a4063 6573
b14b1491
TT
6574 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6575 if test "x$prefix" = xNONE; then
6576 test_prefix=/usr/local
6577 else
6578 test_prefix=$prefix
6579 fi
6580 else
6581 test_prefix=$exec_prefix
6582 fi
6583 value=0
6584 case ${ac_define_dir} in
6585 "${test_prefix}"|"${test_prefix}/"*|\
6586 '${exec_prefix}'|'${exec_prefix}/'*)
6587 value=1
6588 ;;
6589 esac
6590
6591cat >>confdefs.h <<_ACEOF
6592#define GDB_DATADIR_RELOCATABLE $value
6593_ACEOF
6594
6595
783e057b 6596
20e95c23 6597
0c4a4063 6598
81ecdfbb
RW
6599# Check whether --with-relocated-sources was given.
6600if test "${with_relocated_sources+set}" = set; then :
6601 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6602
6603 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6604 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6605 ac_define_dir=`eval echo $reloc_srcdir`
6606 ac_define_dir=`eval echo $ac_define_dir`
6607
6608cat >>confdefs.h <<_ACEOF
6609#define RELOC_SRCDIR "$ac_define_dir"
6610_ACEOF
6611
6612
6613
81ecdfbb
RW
6614fi
6615
29b0e8a2 6616
7349ff92
JK
6617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6618$as_echo_n "checking for default auto-load directory... " >&6; }
6619
6620# Check whether --with-auto-load-dir was given.
6621if test "${with_auto_load_dir+set}" = set; then :
6622 withval=$with_auto_load_dir;
6623else
1564a261 6624 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6625fi
6626
2861ee4f 6627escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6628
6629 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6630 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6631 ac_define_dir=`eval echo $escape_dir`
6632 ac_define_dir=`eval echo $ac_define_dir`
6633
6634cat >>confdefs.h <<_ACEOF
6635#define AUTO_LOAD_DIR "$ac_define_dir"
6636_ACEOF
6637
6638
6639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6640$as_echo "$with_auto_load_dir" >&6; }
6641
bccbefd2
JK
6642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6643$as_echo_n "checking for default auto-load safe-path... " >&6; }
6644
6645# Check whether --with-auto-load-safe-path was given.
6646if test "${with_auto_load_safe_path+set}" = set; then :
6647 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6648 with_auto_load_safe_path="/"
6649 fi
bccbefd2 6650else
7349ff92 6651 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6652fi
6653
2861ee4f 6654escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6655
6656 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6657 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6658 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6659 ac_define_dir=`eval echo $ac_define_dir`
6660
6661cat >>confdefs.h <<_ACEOF
6dea1fbd 6662#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6663_ACEOF
6664
6665
6666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6667$as_echo "$with_auto_load_safe_path" >&6; }
6668
29b0e8a2 6669
20e95c23 6670
5ae98d25 6671subdirs="$subdirs testsuite"
20e95c23
DJ
6672
6673
783e057b 6674# Check whether to support alternative target configurations
81ecdfbb
RW
6675# Check whether --enable-targets was given.
6676if test "${enable_targets+set}" = set; then :
6677 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6678 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6679 ;;
6680 no) enable_targets= ;;
6681 *) enable_targets=$enableval ;;
6682esac
81ecdfbb
RW
6683fi
6684
20e95c23 6685
783e057b 6686# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6687# Check whether --enable-64-bit-bfd was given.
6688if test "${enable_64_bit_bfd+set}" = set; then :
6689 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6690 yes) want64=true ;;
6691 no) want64=false ;;
d0ac1c44 6692 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6693esac
6694else
6695 want64=false
81ecdfbb
RW
6696fi
6697
783e057b
DJ
6698# Provide defaults for some variables set by the per-host and per-target
6699# configuration.
6700gdb_host_obs=posix-hdep.o
20e95c23 6701
783e057b
DJ
6702if test "${target}" = "${host}"; then
6703 gdb_native=yes
6704else
6705 gdb_native=no
6706fi
20e95c23 6707
783e057b 6708. $srcdir/configure.host
20e95c23 6709
783e057b 6710# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6711
783e057b
DJ
6712TARGET_OBS=
6713all_targets=
b292c783 6714HAVE_NATIVE_GCORE_TARGET=
20e95c23 6715
783e057b 6716for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6717do
783e057b
DJ
6718 if test "$targ_alias" = "all"; then
6719 all_targets=true
6720 else
6721 # Canonicalize the secondary target names.
6722 result=`$ac_config_sub $targ_alias 2>/dev/null`
6723 if test -n "$result"; then
6724 targ=$result
6725 else
6726 targ=$targ_alias
6727 fi
20e95c23 6728
783e057b 6729 . ${srcdir}/configure.tgt
20e95c23 6730
bf307134 6731 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6732 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6733fi
6734
783e057b
DJ
6735 # Target-specific object files
6736 for i in ${gdb_target_obs}; do
6737 case " $TARGET_OBS " in
6738 *" ${i} "*) ;;
6739 *)
6740 TARGET_OBS="$TARGET_OBS ${i}"
6741 ;;
6742 esac
6743 done
20e95c23 6744
783e057b
DJ
6745 # Check whether this target needs 64-bit CORE_ADDR
6746 if test x${want64} = xfalse; then
6747 . ${srcdir}/../bfd/config.bfd
6748 fi
b292c783
JK
6749
6750 # Check whether this target is native and supports gcore.
6751 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6752 && $gdb_have_gcore; then
6753 HAVE_NATIVE_GCORE_TARGET=1
6754 fi
783e057b 6755 fi
20e95c23
DJ
6756done
6757
783e057b
DJ
6758if test x${all_targets} = xtrue; then
6759
6760 # We want all 64-bit targets if we either:
6761 # - run on a 64-bit host or
6762 # - already require 64-bit support for some other target or
6763 # - the --enable-64-bit-bfd option was supplied
6764 # Otherwise we only support all 32-bit targets.
6765 #
6766 # NOTE: This test must be in sync with the corresponding
6767 # tests in BFD!
20e95c23 6768
783e057b 6769 if test x${want64} = xfalse; then
81ecdfbb
RW
6770 # The cast to long int works around a bug in the HP C Compiler
6771# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6772# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6773# This bug is HP SR number 8606223364.
6774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6775$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6776if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6777 $as_echo_n "(cached) " >&6
c0993dbe 6778else
81ecdfbb 6779 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6780
81ecdfbb
RW
6781else
6782 if test "$ac_cv_type_long" = yes; then
6783 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6785as_fn_error 77 "cannot compute sizeof (long)
6786See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6787 else
6788 ac_cv_sizeof_long=0
6789 fi
c0993dbe 6790fi
81ecdfbb 6791
c0993dbe 6792fi
81ecdfbb
RW
6793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6794$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6795
c0993dbe 6796
c0993dbe 6797
c0993dbe
UW
6798cat >>confdefs.h <<_ACEOF
6799#define SIZEOF_LONG $ac_cv_sizeof_long
6800_ACEOF
6801
6802
6803 if test "x${ac_cv_sizeof_long}" = "x8"; then
6804 want64=true
6805 fi
6806 fi
6807 if test x${want64} = xtrue; then
6808 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6809 else
6810 TARGET_OBS='$(ALL_TARGET_OBS)'
6811 fi
6812fi
6813
6814
6815
b292c783 6816
c0993dbe
UW
6817# For other settings, only the main target counts.
6818gdb_sim=
6819gdb_osabi=
c0993dbe
UW
6820targ=$target; . ${srcdir}/configure.tgt
6821
6822# Fetch the default architecture and default target vector from BFD.
6823targ=$target; . $srcdir/../bfd/config.bfd
6824
6825# We only want the first architecture, so strip off the others if
6826# there is more than one.
6827targ_archs=`echo $targ_archs | sed 's/ .*//'`
6828
6829if test "x$targ_archs" != x; then
6830
6831cat >>confdefs.h <<_ACEOF
6832#define DEFAULT_BFD_ARCH $targ_archs
6833_ACEOF
6834
6835fi
6836if test "x$targ_defvec" != x; then
6837
6838cat >>confdefs.h <<_ACEOF
6839#define DEFAULT_BFD_VEC $targ_defvec
6840_ACEOF
6841
6842fi
6843
c0993dbe 6844# Enable MI.
81ecdfbb
RW
6845# Check whether --enable-gdbmi was given.
6846if test "${enable_gdbmi+set}" = set; then :
6847 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6848 yes | no)
6849 ;;
6850 *)
d0ac1c44 6851 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6852 esac
6853else
6854 enable_gdbmi=yes
81ecdfbb
RW
6855fi
6856
c0993dbe 6857if test x"$enable_gdbmi" = xyes; then
0ad6b8ee 6858 if test -d "$srcdir/mi"; then
c0993dbe
UW
6859 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6860 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6861 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6862 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6863 fi
6864fi
6865
6866# Enable TUI.
81ecdfbb
RW
6867# Check whether --enable-tui was given.
6868if test "${enable_tui+set}" = set; then :
6869 enableval=$enable_tui; case $enableval in
3ca64bd3 6870 yes | no | auto)
c0993dbe
UW
6871 ;;
6872 *)
d0ac1c44 6873 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6874 esac
6875else
3ca64bd3 6876 enable_tui=auto
81ecdfbb
RW
6877fi
6878
c0993dbe
UW
6879
6880# Enable gdbtk.
81ecdfbb
RW
6881# Check whether --enable-gdbtk was given.
6882if test "${enable_gdbtk+set}" = set; then :
6883 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6884 yes | no)
6885 ;;
6886 *)
d0ac1c44 6887 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6888 esac
6889else
0ad6b8ee 6890 if test -d "$srcdir/gdbtk"; then
c0993dbe
UW
6891 enable_gdbtk=yes
6892 else
6893 enable_gdbtk=no
6894 fi
81ecdfbb
RW
6895fi
6896
c0993dbe
UW
6897# We unconditionally disable gdbtk tests on selected platforms.
6898case $host_os in
6899 go32* | windows*)
81ecdfbb
RW
6900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6901$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6902 enable_gdbtk=no ;;
6903esac
6904
0d79cdc4
AM
6905# Handle optional debuginfod support
6906
f6720b1c
AM
6907
6908
6909
6910
6911
6912
6913if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6914 if test -n "$ac_tool_prefix"; then
6915 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6916set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6918$as_echo_n "checking for $ac_word... " >&6; }
6919if ${ac_cv_path_PKG_CONFIG+:} false; then :
6920 $as_echo_n "(cached) " >&6
6921else
6922 case $PKG_CONFIG in
6923 [\\/]* | ?:[\\/]*)
6924 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6925 ;;
6926 *)
6927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6928for as_dir in $PATH
6929do
6930 IFS=$as_save_IFS
6931 test -z "$as_dir" && as_dir=.
6932 for ac_exec_ext in '' $ac_executable_extensions; do
6933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6934 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6936 break 2
6937 fi
6938done
6939 done
6940IFS=$as_save_IFS
6941
6942 ;;
6943esac
6944fi
6945PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6946if test -n "$PKG_CONFIG"; then
6947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6948$as_echo "$PKG_CONFIG" >&6; }
6949else
6950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6951$as_echo "no" >&6; }
6952fi
6953
6954
6955fi
6956if test -z "$ac_cv_path_PKG_CONFIG"; then
6957 ac_pt_PKG_CONFIG=$PKG_CONFIG
6958 # Extract the first word of "pkg-config", so it can be a program name with args.
6959set dummy pkg-config; ac_word=$2
6960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6961$as_echo_n "checking for $ac_word... " >&6; }
6962if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6963 $as_echo_n "(cached) " >&6
6964else
6965 case $ac_pt_PKG_CONFIG in
6966 [\\/]* | ?:[\\/]*)
6967 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6968 ;;
6969 *)
6970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6971for as_dir in $PATH
6972do
6973 IFS=$as_save_IFS
6974 test -z "$as_dir" && as_dir=.
6975 for ac_exec_ext in '' $ac_executable_extensions; do
6976 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6977 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6979 break 2
6980 fi
6981done
6982 done
6983IFS=$as_save_IFS
6984
6985 ;;
6986esac
6987fi
6988ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6989if test -n "$ac_pt_PKG_CONFIG"; then
6990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6991$as_echo "$ac_pt_PKG_CONFIG" >&6; }
6992else
6993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6994$as_echo "no" >&6; }
6995fi
6996
6997 if test "x$ac_pt_PKG_CONFIG" = x; then
6998 PKG_CONFIG=""
6999 else
7000 case $cross_compiling:$ac_tool_warned in
7001yes:)
7002{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7003$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7004ac_tool_warned=yes ;;
7005esac
7006 PKG_CONFIG=$ac_pt_PKG_CONFIG
7007 fi
7008else
7009 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7010fi
7011
7012fi
7013if test -n "$PKG_CONFIG"; then
7014 _pkg_min_version=0.9.0
7015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7016$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7017 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7019$as_echo "yes" >&6; }
7020 else
7021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7022$as_echo "no" >&6; }
7023 PKG_CONFIG=""
7024 fi
7025fi
7026
7027# Handle optional debuginfod support
0d79cdc4
AM
7028
7029# Check whether --with-debuginfod was given.
7030if test "${with_debuginfod+set}" = set; then :
7031 withval=$with_debuginfod;
7032else
7033 with_debuginfod=auto
7034fi
7035
7036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
7037$as_echo_n "checking whether to use debuginfod... " >&6; }
7038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
7039$as_echo "$with_debuginfod" >&6; }
7040
f6720b1c 7041if test "x$with_debuginfod" != xno; then
0d79cdc4 7042
f6720b1c
AM
7043pkg_failed=no
7044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
7045$as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
7046
7047if test -n "$DEBUGINFOD_CFLAGS"; then
7048 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
7049 elif test -n "$PKG_CONFIG"; then
7050 if test -n "$PKG_CONFIG" && \
7051 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7052 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7053 ac_status=$?
7054 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7055 test $ac_status = 0; }; then
7056 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
7057 test "x$?" != "x0" && pkg_failed=yes
0d79cdc4 7058else
f6720b1c 7059 pkg_failed=yes
0d79cdc4 7060fi
f6720b1c
AM
7061 else
7062 pkg_failed=untried
0d79cdc4 7063fi
f6720b1c
AM
7064if test -n "$DEBUGINFOD_LIBS"; then
7065 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
7066 elif test -n "$PKG_CONFIG"; then
7067 if test -n "$PKG_CONFIG" && \
7068 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7069 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7070 ac_status=$?
7071 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7072 test $ac_status = 0; }; then
7073 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7074 test "x$?" != "x0" && pkg_failed=yes
7075else
7076 pkg_failed=yes
0d79cdc4 7077fi
f6720b1c
AM
7078 else
7079 pkg_failed=untried
0d79cdc4 7080fi
bec39cab 7081
377170fa
L
7082if test $pkg_failed = no; then
7083 pkg_save_LDFLAGS="$LDFLAGS"
7084 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
7085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d70f978b
L
7086/* end confdefs.h. */
7087
7088int
7089main ()
7090{
377170fa 7091
d70f978b
L
7092 ;
7093 return 0;
7094}
7095_ACEOF
7096if ac_fn_c_try_link "$LINENO"; then :
377170fa 7097
d70f978b
L
7098else
7099 pkg_failed=yes
7100fi
7101rm -f core conftest.err conftest.$ac_objext \
7102 conftest$ac_exeext conftest.$ac_ext
377170fa
L
7103 LDFLAGS=$pkg_save_LDFLAGS
7104fi
d70f978b 7105
0d79cdc4 7106
0d79cdc4 7107
f6720b1c
AM
7108if test $pkg_failed = yes; then
7109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7110$as_echo "no" >&6; }
0d79cdc4 7111
f6720b1c
AM
7112if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7113 _pkg_short_errors_supported=yes
7114else
7115 _pkg_short_errors_supported=no
7116fi
7117 if test $_pkg_short_errors_supported = yes; then
7118 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7119 else
7120 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7121 fi
7122 # Put the nasty error message in config.log where it belongs
7123 echo "$DEBUGINFOD_PKG_ERRORS" >&5
0d79cdc4 7124
f6720b1c
AM
7125 if test "x$with_debuginfod" = xyes; then
7126 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7127 else
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7129$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7130 fi
7131elif test $pkg_failed = untried; then
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7133$as_echo "no" >&6; }
7134 if test "x$with_debuginfod" = xyes; then
7135 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7136 else
7137 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7138$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7139 fi
7140else
7141 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7142 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7144$as_echo "yes" >&6; }
7145
7146$as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7147
7148fi
7149else
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7151$as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
0d79cdc4
AM
7152fi
7153
7154
7155# Libunwind support for ia64.
05e7c244
JK
7156
7157# Check whether --with-libunwind-ia64 was given.
7158if test "${with_libunwind_ia64+set}" = set; then :
7159 withval=$with_libunwind_ia64;
bec39cab 7160else
05e7c244
JK
7161 with_libunwind_ia64=auto
7162fi
bec39cab 7163
05e7c244
JK
7164
7165# Backward compatibility option.
7166if test "${with_libunwind+set}" = set; then
7167 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 7168 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
7169 fi
7170 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7171$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7172 with_libunwind_ia64="$with_libunwind"
7173fi
7174
7175case "$with_libunwind_ia64" in
7176 yes | no)
7177 ;;
7178 auto)
7179 for ac_header in libunwind-ia64.h
81ecdfbb 7180do :
b54a8fd7 7181 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 7182if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 7183 cat >>confdefs.h <<_ACEOF
b54a8fd7 7184#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
7185_ACEOF
7186
7187fi
7188
7189done
7190
05e7c244
JK
7191 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7192 ;;
7193 *)
d0ac1c44 7194 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
7195 ;;
7196esac
bec39cab 7197
05e7c244 7198if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 7199 for ac_header in libunwind-ia64.h
81ecdfbb 7200do :
b54a8fd7 7201 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 7202if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 7203 cat >>confdefs.h <<_ACEOF
b54a8fd7 7204#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
7205_ACEOF
7206
7207fi
7208
7209done
7210
05e7c244 7211 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 7212 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
7213 fi
7214 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7215 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7216 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
7217fi
7218
cb01cfba
JB
7219opt_curses=no
7220
81ecdfbb
RW
7221# Check whether --with-curses was given.
7222if test "${with_curses+set}" = set; then :
7223 withval=$with_curses; opt_curses=$withval
7224fi
7225
cb01cfba 7226
76a39ba7 7227prefer_curses=no
cb01cfba 7228if test "$opt_curses" = "yes"; then
76a39ba7 7229 prefer_curses=yes
cb01cfba
JB
7230fi
7231
a9322a30 7232# Profiling support.
81ecdfbb
RW
7233# Check whether --enable-profiling was given.
7234if test "${enable_profiling+set}" = set; then :
7235 enableval=$enable_profiling; case $enableval in
a9322a30
TT
7236 yes | no)
7237 ;;
7238 *)
d0ac1c44 7239 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
7240 esac
7241else
7242 enable_profiling=no
81ecdfbb 7243fi
bec39cab 7244
a9322a30
TT
7245
7246for ac_func in monstartup _mcleanup
81ecdfbb
RW
7247do :
7248 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7249ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 7250if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
7251 cat >>confdefs.h <<_ACEOF
7252#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 7253_ACEOF
a9322a30 7254
81ecdfbb
RW
7255fi
7256done
a9322a30 7257
81ecdfbb
RW
7258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7259$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 7260if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
7261 $as_echo_n "(cached) " >&6
7262else
7263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7264/* end confdefs.h. */
7265#include <stdlib.h>
7266extern char _etext;
a9322a30
TT
7267
7268int
7269main ()
7270{
7271free (&_etext);
7272 ;
7273 return 0;
7274}
bec39cab 7275_ACEOF
81ecdfbb 7276if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7277 ac_cv_var__etext=yes
bec39cab 7278else
81ecdfbb 7279 ac_cv_var__etext=no
bec39cab 7280fi
81ecdfbb
RW
7281rm -f core conftest.err conftest.$ac_objext \
7282 conftest$ac_exeext conftest.$ac_ext
bec39cab 7283fi
81ecdfbb
RW
7284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7285$as_echo "$ac_cv_var__etext" >&6; }
0ad6b8ee 7286if test "$ac_cv_var__etext" = yes; then
60ca704f 7287
81ecdfbb 7288$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7289
bec39cab 7290fi
81ecdfbb
RW
7291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7292$as_echo_n "checking for etext... " >&6; }
d0ac1c44 7293if ${ac_cv_var_etext+:} false; then :
81ecdfbb 7294 $as_echo_n "(cached) " >&6
bec39cab 7295else
81ecdfbb 7296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7297/* end confdefs.h. */
a9322a30
TT
7298#include <stdlib.h>
7299extern char etext;
bec39cab
AC
7300
7301int
7302main ()
7303{
a9322a30 7304free (&etext);
bec39cab
AC
7305 ;
7306 return 0;
7307}
7308_ACEOF
81ecdfbb 7309if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7310 ac_cv_var_etext=yes
bec39cab 7311else
81ecdfbb 7312 ac_cv_var_etext=no
bec39cab 7313fi
81ecdfbb
RW
7314rm -f core conftest.err conftest.$ac_objext \
7315 conftest$ac_exeext conftest.$ac_ext
bec39cab 7316fi
81ecdfbb
RW
7317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7318$as_echo "$ac_cv_var_etext" >&6; }
0ad6b8ee 7319if test "$ac_cv_var_etext" = yes; then
a9322a30 7320
81ecdfbb 7321$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7322
7323fi
a9322a30 7324if test "$enable_profiling" = yes ; then
0ad6b8ee 7325 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
d0ac1c44 7326 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7327 fi
7328 PROFILE_CFLAGS=-pg
7329 OLD_CFLAGS="$CFLAGS"
7330 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7331
81ecdfbb
RW
7332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7333$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7334if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7335 $as_echo_n "(cached) " >&6
bec39cab 7336else
81ecdfbb 7337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7338/* end confdefs.h. */
bec39cab
AC
7339
7340int
7341main ()
7342{
a9322a30 7343int x;
bec39cab
AC
7344 ;
7345 return 0;
7346}
7347_ACEOF
81ecdfbb 7348if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7349 ac_cv_cc_supports_pg=yes
bec39cab 7350else
81ecdfbb 7351 ac_cv_cc_supports_pg=no
bec39cab 7352fi
81ecdfbb 7353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7354fi
81ecdfbb
RW
7355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7356$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7357
0ad6b8ee 7358 if test "$ac_cv_cc_supports_pg" = no; then
d0ac1c44 7359 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7360 fi
bec39cab 7361
a9322a30 7362 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7363fi
7364
44cee4fd
TT
7365CODESIGN_CERT=
7366# Check whether --enable-codesign was given.
7367if test "${enable_codesign+set}" = set; then :
7368 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7369fi
7370
7371
7372
c16158bc
JM
7373
7374
81ecdfbb
RW
7375# Check whether --with-pkgversion was given.
7376if test "${with_pkgversion+set}" = set; then :
7377 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7378 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7379 no) PKGVERSION= ;;
7380 *) PKGVERSION="($withval) " ;;
7381 esac
7382else
7383 PKGVERSION="(GDB) "
7384
81ecdfbb 7385fi
c16158bc
JM
7386
7387
7388
7389
81ecdfbb
RW
7390
7391# Check whether --with-bugurl was given.
7392if test "${with_bugurl+set}" = set; then :
7393 withval=$with_bugurl; case "$withval" in
d0ac1c44 7394 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7395 no) BUGURL=
7396 ;;
7397 *) BUGURL="$withval"
7398 ;;
7399 esac
7400else
112c22ed 7401 BUGURL="https://www.gnu.org/software/gdb/bugs/"
c16158bc 7402
81ecdfbb
RW
7403fi
7404
c16158bc
JM
7405 case ${BUGURL} in
7406 "")
7407 REPORT_BUGS_TO=
7408 REPORT_BUGS_TEXI=
7409 ;;
7410 *)
7411 REPORT_BUGS_TO="<$BUGURL>"
7412 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7413 ;;
7414 esac;
7415
7416
7417
7418
7419cat >>confdefs.h <<_ACEOF
7420#define PKGVERSION "$PKGVERSION"
7421_ACEOF
7422
7423
7424cat >>confdefs.h <<_ACEOF
7425#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7426_ACEOF
7427
7428
bec39cab
AC
7429# --------------------- #
7430# Checks for programs. #
7431# --------------------- #
7432
7433for ac_prog in gawk mawk nawk awk
7434do
7435 # Extract the first word of "$ac_prog", so it can be a program name with args.
7436set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7438$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7439if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7440 $as_echo_n "(cached) " >&6
bec39cab
AC
7441else
7442 if test -n "$AWK"; then
7443 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7444else
7445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7446for as_dir in $PATH
7447do
7448 IFS=$as_save_IFS
7449 test -z "$as_dir" && as_dir=.
81ecdfbb 7450 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7452 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7454 break 2
7455 fi
7456done
81ecdfbb
RW
7457 done
7458IFS=$as_save_IFS
bec39cab
AC
7459
7460fi
7461fi
7462AWK=$ac_cv_prog_AWK
7463if test -n "$AWK"; then
81ecdfbb
RW
7464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7465$as_echo "$AWK" >&6; }
bec39cab 7466else
81ecdfbb
RW
7467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468$as_echo "no" >&6; }
bec39cab
AC
7469fi
7470
bec39cab 7471
81ecdfbb 7472 test -n "$AWK" && break
bec39cab
AC
7473done
7474
c971b7fa
PA
7475# Find a good install program. We prefer a C program (faster),
7476# so one script is as good as another. But avoid the broken or
7477# incompatible versions:
7478# SysV /etc/install, /usr/sbin/install
7479# SunOS /usr/etc/install
7480# IRIX /sbin/install
7481# AIX /bin/install
7482# AmigaOS /C/install, which installs bootblocks on floppy discs
7483# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7484# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7485# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7486# OS/2's system install, which has a completely different semantic
7487# ./install, which can be erroneously created by make from ./install.sh.
7488# Reject install programs that cannot install multiple files.
7489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7490$as_echo_n "checking for a BSD-compatible install... " >&6; }
7491if test -z "$INSTALL"; then
d0ac1c44 7492if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7493 $as_echo_n "(cached) " >&6
7494else
7495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7496for as_dir in $PATH
7497do
7498 IFS=$as_save_IFS
7499 test -z "$as_dir" && as_dir=.
7500 # Account for people who put trailing slashes in PATH elements.
7501case $as_dir/ in #((
7502 ./ | .// | /[cC]/* | \
7503 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7504 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7505 /usr/ucb/* ) ;;
7506 *)
7507 # OSF1 and SCO ODT 3.0 have their own names for install.
7508 # Don't use installbsd from OSF since it installs stuff as root
7509 # by default.
7510 for ac_prog in ginstall scoinst install; do
7511 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7512 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7513 if test $ac_prog = install &&
7514 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7515 # AIX install. It has an incompatible calling convention.
7516 :
7517 elif test $ac_prog = install &&
7518 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7519 # program-specific install script used by HP pwplus--don't use.
7520 :
7521 else
7522 rm -rf conftest.one conftest.two conftest.dir
7523 echo one > conftest.one
7524 echo two > conftest.two
7525 mkdir conftest.dir
7526 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7527 test -s conftest.one && test -s conftest.two &&
7528 test -s conftest.dir/conftest.one &&
7529 test -s conftest.dir/conftest.two
7530 then
7531 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7532 break 3
7533 fi
7534 fi
7535 fi
7536 done
7537 done
7538 ;;
7539esac
7540
7541 done
7542IFS=$as_save_IFS
7543
7544rm -rf conftest.one conftest.two conftest.dir
7545
7546fi
7547 if test "${ac_cv_path_install+set}" = set; then
7548 INSTALL=$ac_cv_path_install
7549 else
7550 # As a last resort, use the slow shell script. Don't cache a
7551 # value for INSTALL within a source directory, because that will
7552 # break other packages using the cache if that directory is
7553 # removed, or if the value is a relative name.
7554 INSTALL=$ac_install_sh
7555 fi
7556fi
7557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7558$as_echo "$INSTALL" >&6; }
7559
7560# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7561# It thinks the first close brace ends the variable substitution.
7562test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7563
7564test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7565
7566test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7567
81ecdfbb
RW
7568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7569$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7570LN_S=$as_ln_s
7571if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7573$as_echo "yes" >&6; }
bec39cab 7574else
81ecdfbb
RW
7575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7576$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7577fi
7578
7579if test -n "$ac_tool_prefix"; then
7580 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7581set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7583$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7584if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7585 $as_echo_n "(cached) " >&6
bec39cab
AC
7586else
7587 if test -n "$RANLIB"; then
7588 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7589else
7590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7591for as_dir in $PATH
7592do
7593 IFS=$as_save_IFS
7594 test -z "$as_dir" && as_dir=.
81ecdfbb 7595 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7597 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7599 break 2
7600 fi
7601done
81ecdfbb
RW
7602 done
7603IFS=$as_save_IFS
bec39cab
AC
7604
7605fi
7606fi
7607RANLIB=$ac_cv_prog_RANLIB
7608if test -n "$RANLIB"; then
81ecdfbb
RW
7609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7610$as_echo "$RANLIB" >&6; }
bec39cab 7611else
81ecdfbb
RW
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7613$as_echo "no" >&6; }
bec39cab
AC
7614fi
7615
81ecdfbb 7616
bec39cab
AC
7617fi
7618if test -z "$ac_cv_prog_RANLIB"; then
7619 ac_ct_RANLIB=$RANLIB
7620 # Extract the first word of "ranlib", so it can be a program name with args.
7621set dummy ranlib; ac_word=$2
81ecdfbb
RW
7622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7623$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7624if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7625 $as_echo_n "(cached) " >&6
bec39cab
AC
7626else
7627 if test -n "$ac_ct_RANLIB"; then
7628 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7629else
7630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7631for as_dir in $PATH
7632do
7633 IFS=$as_save_IFS
7634 test -z "$as_dir" && as_dir=.
81ecdfbb 7635 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7637 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7639 break 2
7640 fi
7641done
81ecdfbb
RW
7642 done
7643IFS=$as_save_IFS
bec39cab 7644
bec39cab
AC
7645fi
7646fi
7647ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7648if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7650$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7651else
81ecdfbb
RW
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7653$as_echo "no" >&6; }
bec39cab
AC
7654fi
7655
81ecdfbb
RW
7656 if test "x$ac_ct_RANLIB" = x; then
7657 RANLIB=":"
7658 else
7659 case $cross_compiling:$ac_tool_warned in
7660yes:)
7661{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7662$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7663ac_tool_warned=yes ;;
7664esac
7665 RANLIB=$ac_ct_RANLIB
7666 fi
bec39cab
AC
7667else
7668 RANLIB="$ac_cv_prog_RANLIB"
7669fi
7670
7671for ac_prog in 'bison -y' byacc
7672do
7673 # Extract the first word of "$ac_prog", so it can be a program name with args.
7674set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7676$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7677if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7678 $as_echo_n "(cached) " >&6
bec39cab
AC
7679else
7680 if test -n "$YACC"; then
7681 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7682else
7683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7684for as_dir in $PATH
7685do
7686 IFS=$as_save_IFS
7687 test -z "$as_dir" && as_dir=.
81ecdfbb 7688 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7690 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7692 break 2
7693 fi
7694done
81ecdfbb
RW
7695 done
7696IFS=$as_save_IFS
bec39cab
AC
7697
7698fi
7699fi
7700YACC=$ac_cv_prog_YACC
7701if test -n "$YACC"; then
81ecdfbb
RW
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7703$as_echo "$YACC" >&6; }
bec39cab 7704else
81ecdfbb
RW
7705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706$as_echo "no" >&6; }
bec39cab
AC
7707fi
7708
81ecdfbb 7709
bec39cab
AC
7710 test -n "$YACC" && break
7711done
7712test -n "$YACC" || YACC="yacc"
7713
7714
7715if test -n "$ac_tool_prefix"; then
7716 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7717set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7719$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7720if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7721 $as_echo_n "(cached) " >&6
bec39cab
AC
7722else
7723 if test -n "$AR"; then
7724 ac_cv_prog_AR="$AR" # Let the user override the test.
7725else
7726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7727for as_dir in $PATH
7728do
7729 IFS=$as_save_IFS
7730 test -z "$as_dir" && as_dir=.
81ecdfbb 7731 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7733 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7735 break 2
7736 fi
7737done
81ecdfbb
RW
7738 done
7739IFS=$as_save_IFS
bec39cab
AC
7740
7741fi
7742fi
7743AR=$ac_cv_prog_AR
7744if test -n "$AR"; then
81ecdfbb
RW
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7746$as_echo "$AR" >&6; }
bec39cab 7747else
81ecdfbb
RW
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7749$as_echo "no" >&6; }
bec39cab
AC
7750fi
7751
81ecdfbb 7752
bec39cab
AC
7753fi
7754if test -z "$ac_cv_prog_AR"; then
7755 ac_ct_AR=$AR
7756 # Extract the first word of "ar", so it can be a program name with args.
7757set dummy ar; ac_word=$2
81ecdfbb
RW
7758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7759$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7760if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7761 $as_echo_n "(cached) " >&6
bec39cab
AC
7762else
7763 if test -n "$ac_ct_AR"; then
7764 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7765else
7766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7767for as_dir in $PATH
7768do
7769 IFS=$as_save_IFS
7770 test -z "$as_dir" && as_dir=.
81ecdfbb 7771 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7772 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7773 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7774 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7775 break 2
7776 fi
7777done
81ecdfbb
RW
7778 done
7779IFS=$as_save_IFS
bec39cab
AC
7780
7781fi
7782fi
7783ac_ct_AR=$ac_cv_prog_ac_ct_AR
7784if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7786$as_echo "$ac_ct_AR" >&6; }
bec39cab 7787else
81ecdfbb
RW
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7789$as_echo "no" >&6; }
bec39cab
AC
7790fi
7791
81ecdfbb
RW
7792 if test "x$ac_ct_AR" = x; then
7793 AR=""
7794 else
7795 case $cross_compiling:$ac_tool_warned in
7796yes:)
7797{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7798$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7799ac_tool_warned=yes ;;
7800esac
7801 AR=$ac_ct_AR
7802 fi
bec39cab
AC
7803else
7804 AR="$ac_cv_prog_AR"
7805fi
7806
7807if test -n "$ac_tool_prefix"; then
7808 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7809set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7811$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7812if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7813 $as_echo_n "(cached) " >&6
bec39cab
AC
7814else
7815 if test -n "$DLLTOOL"; then
7816 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7817else
7818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7819for as_dir in $PATH
7820do
7821 IFS=$as_save_IFS
7822 test -z "$as_dir" && as_dir=.
81ecdfbb 7823 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7825 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7827 break 2
7828 fi
7829done
81ecdfbb
RW
7830 done
7831IFS=$as_save_IFS
bec39cab
AC
7832
7833fi
7834fi
7835DLLTOOL=$ac_cv_prog_DLLTOOL
7836if test -n "$DLLTOOL"; then
81ecdfbb
RW
7837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7838$as_echo "$DLLTOOL" >&6; }
bec39cab 7839else
81ecdfbb
RW
7840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7841$as_echo "no" >&6; }
bec39cab
AC
7842fi
7843
81ecdfbb 7844
bec39cab
AC
7845fi
7846if test -z "$ac_cv_prog_DLLTOOL"; then
7847 ac_ct_DLLTOOL=$DLLTOOL
7848 # Extract the first word of "dlltool", so it can be a program name with args.
7849set dummy dlltool; ac_word=$2
81ecdfbb
RW
7850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7851$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7852if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7853 $as_echo_n "(cached) " >&6
bec39cab
AC
7854else
7855 if test -n "$ac_ct_DLLTOOL"; then
7856 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7857else
7858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7859for as_dir in $PATH
7860do
7861 IFS=$as_save_IFS
7862 test -z "$as_dir" && as_dir=.
81ecdfbb 7863 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7865 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7866 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7867 break 2
7868 fi
7869done
81ecdfbb
RW
7870 done
7871IFS=$as_save_IFS
bec39cab
AC
7872
7873fi
7874fi
7875ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7876if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7878$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7879else
81ecdfbb
RW
7880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7881$as_echo "no" >&6; }
bec39cab
AC
7882fi
7883
81ecdfbb
RW
7884 if test "x$ac_ct_DLLTOOL" = x; then
7885 DLLTOOL=""
7886 else
7887 case $cross_compiling:$ac_tool_warned in
7888yes:)
7889{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7890$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7891ac_tool_warned=yes ;;
7892esac
7893 DLLTOOL=$ac_ct_DLLTOOL
7894 fi
bec39cab
AC
7895else
7896 DLLTOOL="$ac_cv_prog_DLLTOOL"
7897fi
7898
7899if test -n "$ac_tool_prefix"; then
7900 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7901set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7903$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7904if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7905 $as_echo_n "(cached) " >&6
bec39cab
AC
7906else
7907 if test -n "$WINDRES"; then
7908 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7909else
7910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7911for as_dir in $PATH
7912do
7913 IFS=$as_save_IFS
7914 test -z "$as_dir" && as_dir=.
81ecdfbb 7915 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7916 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7917 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7919 break 2
7920 fi
7921done
81ecdfbb
RW
7922 done
7923IFS=$as_save_IFS
bec39cab
AC
7924
7925fi
7926fi
7927WINDRES=$ac_cv_prog_WINDRES
7928if test -n "$WINDRES"; then
81ecdfbb
RW
7929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7930$as_echo "$WINDRES" >&6; }
bec39cab 7931else
81ecdfbb
RW
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7933$as_echo "no" >&6; }
bec39cab
AC
7934fi
7935
81ecdfbb 7936
bec39cab
AC
7937fi
7938if test -z "$ac_cv_prog_WINDRES"; then
7939 ac_ct_WINDRES=$WINDRES
7940 # Extract the first word of "windres", so it can be a program name with args.
7941set dummy windres; ac_word=$2
81ecdfbb
RW
7942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7943$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7944if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7945 $as_echo_n "(cached) " >&6
bec39cab
AC
7946else
7947 if test -n "$ac_ct_WINDRES"; then
7948 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7949else
7950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7951for as_dir in $PATH
7952do
7953 IFS=$as_save_IFS
7954 test -z "$as_dir" && as_dir=.
81ecdfbb 7955 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7956 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7957 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7959 break 2
7960 fi
7961done
81ecdfbb
RW
7962 done
7963IFS=$as_save_IFS
bec39cab
AC
7964
7965fi
7966fi
7967ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7968if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7970$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7971else
81ecdfbb
RW
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7973$as_echo "no" >&6; }
c906108c 7974fi
bec39cab 7975
81ecdfbb
RW
7976 if test "x$ac_ct_WINDRES" = x; then
7977 WINDRES=""
7978 else
7979 case $cross_compiling:$ac_tool_warned in
7980yes:)
7981{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7982$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7983ac_tool_warned=yes ;;
7984esac
7985 WINDRES=$ac_ct_WINDRES
7986 fi
c906108c 7987else
bec39cab 7988 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7989fi
7990
bec39cab 7991
036c3acb
TS
7992case $host_os in
7993 gnu*)
7994 # Needed for GNU Hurd hosts.
7995 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7996 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7997set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7999$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 8000if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 8001 $as_echo_n "(cached) " >&6
c906108c 8002else
bec39cab
AC
8003 if test -n "$MIG"; then
8004 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8005else
8006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8007for as_dir in $PATH
8008do
8009 IFS=$as_save_IFS
8010 test -z "$as_dir" && as_dir=.
81ecdfbb 8011 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 8012 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 8013 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 8014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8015 break 2
8016 fi
8017done
81ecdfbb
RW
8018 done
8019IFS=$as_save_IFS
bec39cab 8020
c906108c 8021fi
bec39cab
AC
8022fi
8023MIG=$ac_cv_prog_MIG
8024if test -n "$MIG"; then
81ecdfbb
RW
8025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8026$as_echo "$MIG" >&6; }
c906108c 8027else
81ecdfbb
RW
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8029$as_echo "no" >&6; }
c906108c
SS
8030fi
8031
81ecdfbb 8032
bec39cab
AC
8033fi
8034if test -z "$ac_cv_prog_MIG"; then
8035 ac_ct_MIG=$MIG
8036 # Extract the first word of "mig", so it can be a program name with args.
8037set dummy mig; ac_word=$2
81ecdfbb
RW
8038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8039$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 8040if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 8041 $as_echo_n "(cached) " >&6
bec39cab
AC
8042else
8043 if test -n "$ac_ct_MIG"; then
8044 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8045else
8046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8047for as_dir in $PATH
8048do
8049 IFS=$as_save_IFS
8050 test -z "$as_dir" && as_dir=.
81ecdfbb 8051 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 8052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 8053 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 8054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
8055 break 2
8056 fi
8057done
81ecdfbb
RW
8058 done
8059IFS=$as_save_IFS
c906108c 8060
bec39cab
AC
8061fi
8062fi
8063ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8064if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8066$as_echo "$ac_ct_MIG" >&6; }
bec39cab 8067else
81ecdfbb
RW
8068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8069$as_echo "no" >&6; }
bec39cab 8070fi
c906108c 8071
81ecdfbb
RW
8072 if test "x$ac_ct_MIG" = x; then
8073 MIG=""
8074 else
8075 case $cross_compiling:$ac_tool_warned in
8076yes:)
8077{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8078$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8079ac_tool_warned=yes ;;
8080esac
8081 MIG=$ac_ct_MIG
8082 fi
bec39cab
AC
8083else
8084 MIG="$ac_cv_prog_MIG"
8085fi
c906108c 8086
036c3acb 8087 if test x"$MIG" = x; then
d0ac1c44 8088 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
8089 fi
8090 ;;
8091esac
c906108c 8092
bec39cab
AC
8093# ---------------------- #
8094# Checks for libraries. #
8095# ---------------------- #
c906108c 8096
bec39cab 8097# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
8098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8099$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 8100if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 8101 $as_echo_n "(cached) " >&6
bec39cab
AC
8102else
8103 ac_check_lib_save_LIBS=$LIBS
8104LIBS="-lm $LIBS"
81ecdfbb 8105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8106/* end confdefs.h. */
c906108c 8107
c906108c 8108
bec39cab
AC
8109int
8110main ()
8111{
81ecdfbb 8112return main ();
bec39cab
AC
8113 ;
8114 return 0;
8115}
8116_ACEOF
81ecdfbb 8117if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
8118 ac_cv_lib_m_main=yes
8119else
81ecdfbb 8120 ac_cv_lib_m_main=no
bec39cab 8121fi
81ecdfbb
RW
8122rm -f core conftest.err conftest.$ac_objext \
8123 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
8124LIBS=$ac_check_lib_save_LIBS
8125fi
81ecdfbb
RW
8126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8127$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 8128if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
8129 cat >>confdefs.h <<_ACEOF
8130#define HAVE_LIBM 1
8131_ACEOF
8132
8133 LIBS="-lm $LIBS"
c906108c 8134
c906108c 8135fi
bec39cab
AC
8136
8137
bec39cab 8138# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
8139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8140$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 8141if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 8142 $as_echo_n "(cached) " >&6
bec39cab
AC
8143else
8144 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8146/* end confdefs.h. */
ddc9cd0f 8147
81ecdfbb
RW
8148/* Override any GCC internal prototype to avoid an error.
8149 Use char because int might match the return type of a GCC
8150 builtin and then its argument prototype would still apply. */
bec39cab
AC
8151#ifdef __cplusplus
8152extern "C"
8153#endif
bec39cab
AC
8154char gethostbyname ();
8155int
8156main ()
8157{
81ecdfbb 8158return gethostbyname ();
bec39cab
AC
8159 ;
8160 return 0;
8161}
8162_ACEOF
81ecdfbb
RW
8163for ac_lib in '' nsl; do
8164 if test -z "$ac_lib"; then
8165 ac_res="none required"
8166 else
8167 ac_res=-l$ac_lib
b4e70030 8168 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8169 fi
8170 if ac_fn_c_try_link "$LINENO"; then :
8171 ac_cv_search_gethostbyname=$ac_res
8172fi
8173rm -f core conftest.err conftest.$ac_objext \
8174 conftest$ac_exeext
d0ac1c44 8175 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
8176 break
8177fi
8178done
d0ac1c44 8179if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 8180
bec39cab 8181else
81ecdfbb 8182 ac_cv_search_gethostbyname=no
bec39cab 8183fi
81ecdfbb 8184rm conftest.$ac_ext
bec39cab
AC
8185LIBS=$ac_func_search_save_LIBS
8186fi
81ecdfbb
RW
8187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8188$as_echo "$ac_cv_search_gethostbyname" >&6; }
8189ac_res=$ac_cv_search_gethostbyname
8190if test "$ac_res" != no; then :
8191 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 8192
bec39cab 8193fi
96baa820 8194
c906108c 8195
b4e70030 8196# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
8197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8198$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 8199if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 8200 $as_echo_n "(cached) " >&6
b4e70030
JB
8201else
8202 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8204/* end confdefs.h. */
8205
81ecdfbb
RW
8206/* Override any GCC internal prototype to avoid an error.
8207 Use char because int might match the return type of a GCC
8208 builtin and then its argument prototype would still apply. */
b4e70030
JB
8209#ifdef __cplusplus
8210extern "C"
8211#endif
b4e70030
JB
8212char socketpair ();
8213int
8214main ()
8215{
81ecdfbb 8216return socketpair ();
b4e70030
JB
8217 ;
8218 return 0;
8219}
8220_ACEOF
81ecdfbb
RW
8221for ac_lib in '' socket; do
8222 if test -z "$ac_lib"; then
8223 ac_res="none required"
8224 else
8225 ac_res=-l$ac_lib
b4e70030 8226 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8227 fi
8228 if ac_fn_c_try_link "$LINENO"; then :
8229 ac_cv_search_socketpair=$ac_res
8230fi
8231rm -f core conftest.err conftest.$ac_objext \
8232 conftest$ac_exeext
d0ac1c44 8233 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
8234 break
8235fi
8236done
d0ac1c44 8237if ${ac_cv_search_socketpair+:} false; then :
b4e70030 8238
b4e70030 8239else
81ecdfbb 8240 ac_cv_search_socketpair=no
b4e70030 8241fi
81ecdfbb 8242rm conftest.$ac_ext
b4e70030
JB
8243LIBS=$ac_func_search_save_LIBS
8244fi
81ecdfbb
RW
8245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8246$as_echo "$ac_cv_search_socketpair" >&6; }
8247ac_res=$ac_cv_search_socketpair
8248if test "$ac_res" != no; then :
8249 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
8250
8251fi
8252
8253
233a11ab 8254# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 8255
711a72d3 8256 # Use the system's zlib library.
39f3de7c
L
8257 zlibdir="-L\$(top_builddir)/../zlib"
8258 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 8259
711a72d3
L
8260# Check whether --with-system-zlib was given.
8261if test "${with_system_zlib+set}" = set; then :
afa59b79
L
8262 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8263 zlibdir=
8264 zlibinc=
8265 fi
b040ad30 8266
233a11ab 8267fi
233a11ab 8268
233a11ab 8269
233a11ab 8270
b040ad30 8271
233a11ab 8272
77f120bf 8273
016a3251
DD
8274 if test "X$prefix" = "XNONE"; then
8275 acl_final_prefix="$ac_default_prefix"
8276 else
8277 acl_final_prefix="$prefix"
8278 fi
8279 if test "X$exec_prefix" = "XNONE"; then
8280 acl_final_exec_prefix='${prefix}'
8281 else
8282 acl_final_exec_prefix="$exec_prefix"
8283 fi
8284 acl_save_prefix="$prefix"
8285 prefix="$acl_final_prefix"
8286 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8287 prefix="$acl_save_prefix"
8288
8289
8290# Check whether --with-gnu-ld was given.
8291if test "${with_gnu_ld+set}" = set; then :
8292 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8293else
8294 with_gnu_ld=no
8295fi
8296
8297# Prepare PATH_SEPARATOR.
8298# The user is always right.
8299if test "${PATH_SEPARATOR+set}" != set; then
8300 echo "#! /bin/sh" >conf$$.sh
8301 echo "exit 0" >>conf$$.sh
8302 chmod +x conf$$.sh
8303 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8304 PATH_SEPARATOR=';'
8305 else
8306 PATH_SEPARATOR=:
8307 fi
8308 rm -f conf$$.sh
8309fi
8310ac_prog=ld
8311if test "$GCC" = yes; then
8312 # Check if gcc -print-prog-name=ld gives a path.
8313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8314$as_echo_n "checking for ld used by GCC... " >&6; }
8315 case $host in
8316 *-*-mingw*)
8317 # gcc leaves a trailing carriage return which upsets mingw
8318 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8319 *)
8320 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8321 esac
8322 case $ac_prog in
8323 # Accept absolute paths.
8324 [\\/]* | [A-Za-z]:[\\/]*)
8325 re_direlt='/[^/][^/]*/\.\./'
8326 # Canonicalize the path of ld
8327 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8328 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8329 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8330 done
8331 test -z "$LD" && LD="$ac_prog"
8332 ;;
8333 "")
8334 # If it fails, then pretend we aren't using GCC.
8335 ac_prog=ld
8336 ;;
8337 *)
8338 # If it is relative, then search for the first ld in PATH.
8339 with_gnu_ld=unknown
8340 ;;
8341 esac
8342elif test "$with_gnu_ld" = yes; then
8343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8344$as_echo_n "checking for GNU ld... " >&6; }
8345else
8346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8347$as_echo_n "checking for non-GNU ld... " >&6; }
8348fi
d0ac1c44 8349if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8350 $as_echo_n "(cached) " >&6
8351else
8352 if test -z "$LD"; then
8353 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8354 for ac_dir in $PATH; do
8355 test -z "$ac_dir" && ac_dir=.
8356 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8357 acl_cv_path_LD="$ac_dir/$ac_prog"
8358 # Check to see if the program is GNU ld. I'd rather use --version,
8359 # but apparently some GNU ld's only accept -v.
8360 # Break only if it was the GNU/non-GNU ld that we prefer.
8361 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8362 test "$with_gnu_ld" != no && break
8363 else
8364 test "$with_gnu_ld" != yes && break
8365 fi
8366 fi
8367 done
8368 IFS="$ac_save_ifs"
8369else
8370 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8371fi
8372fi
8373
8374LD="$acl_cv_path_LD"
8375if test -n "$LD"; then
8376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8377$as_echo "$LD" >&6; }
8378else
8379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8380$as_echo "no" >&6; }
8381fi
d0ac1c44 8382test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8384$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8385if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8386 $as_echo_n "(cached) " >&6
8387else
8388 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8389if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8390 acl_cv_prog_gnu_ld=yes
8391else
8392 acl_cv_prog_gnu_ld=no
8393fi
8394fi
8395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8396$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8397with_gnu_ld=$acl_cv_prog_gnu_ld
8398
8399
8400
8401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8402$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8403if ${acl_cv_rpath+:} false; then :
016a3251
DD
8404 $as_echo_n "(cached) " >&6
8405else
8406
8407 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8408 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8409 . ./conftest.sh
8410 rm -f ./conftest.sh
8411 acl_cv_rpath=done
8412
8413fi
8414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8415$as_echo "$acl_cv_rpath" >&6; }
8416 wl="$acl_cv_wl"
8417 libext="$acl_cv_libext"
8418 shlibext="$acl_cv_shlibext"
8419 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8420 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8421 hardcode_direct="$acl_cv_hardcode_direct"
8422 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8423 # Check whether --enable-rpath was given.
8424if test "${enable_rpath+set}" = set; then :
8425 enableval=$enable_rpath; :
8426else
8427 enable_rpath=yes
8428fi
8429
8430
8431
8432
8433
8434
8435
8436
8437 use_additional=yes
8438
8439 acl_save_prefix="$prefix"
8440 prefix="$acl_final_prefix"
8441 acl_save_exec_prefix="$exec_prefix"
8442 exec_prefix="$acl_final_exec_prefix"
8443
8444 eval additional_includedir=\"$includedir\"
8445 eval additional_libdir=\"$libdir\"
8446
8447 exec_prefix="$acl_save_exec_prefix"
8448 prefix="$acl_save_prefix"
77f120bf 8449
6c7a06a3 8450
81ecdfbb
RW
8451# Check whether --with-libiconv-prefix was given.
8452if test "${with_libiconv_prefix+set}" = set; then :
8453 withval=$with_libiconv_prefix;
016a3251
DD
8454 if test "X$withval" = "Xno"; then
8455 use_additional=no
8456 else
8457 if test "X$withval" = "X"; then
8458
8459 acl_save_prefix="$prefix"
8460 prefix="$acl_final_prefix"
8461 acl_save_exec_prefix="$exec_prefix"
8462 exec_prefix="$acl_final_exec_prefix"
8463
8464 eval additional_includedir=\"$includedir\"
8465 eval additional_libdir=\"$libdir\"
8466
8467 exec_prefix="$acl_save_exec_prefix"
8468 prefix="$acl_save_prefix"
8469
8470 else
8471 additional_includedir="$withval/include"
8472 additional_libdir="$withval/lib"
8473 fi
8474 fi
6c7a06a3 8475
81ecdfbb
RW
8476fi
8477
9f1528a1
AB
8478
8479# Check whether --with-libiconv-type was given.
8480if test "${with_libiconv_type+set}" = set; then :
8481 withval=$with_libiconv_type; with_libiconv_type=$withval
8482else
8483 with_libiconv_type=auto
8484fi
8485
8486 lib_type=`eval echo \$with_libiconv_type`
8487
016a3251
DD
8488 LIBICONV=
8489 LTLIBICONV=
8490 INCICONV=
8491 rpathdirs=
8492 ltrpathdirs=
8493 names_already_handled=
8494 names_next_round='iconv '
8495 while test -n "$names_next_round"; do
8496 names_this_round="$names_next_round"
8497 names_next_round=
8498 for name in $names_this_round; do
8499 already_handled=
8500 for n in $names_already_handled; do
8501 if test "$n" = "$name"; then
8502 already_handled=yes
8503 break
8504 fi
8505 done
8506 if test -z "$already_handled"; then
8507 names_already_handled="$names_already_handled $name"
8508 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8509 eval value=\"\$HAVE_LIB$uppername\"
8510 if test -n "$value"; then
8511 if test "$value" = yes; then
8512 eval value=\"\$LIB$uppername\"
8513 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8514 eval value=\"\$LTLIB$uppername\"
8515 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8516 else
8517 :
8518 fi
8519 else
8520 found_dir=
8521 found_la=
8522 found_so=
8523 found_a=
8524 if test $use_additional = yes; then
9f1528a1 8525 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8526 found_dir="$additional_libdir"
8527 found_so="$additional_libdir/lib$name.$shlibext"
8528 if test -f "$additional_libdir/lib$name.la"; then
8529 found_la="$additional_libdir/lib$name.la"
8530 fi
9f1528a1 8531 elif test x$lib_type != xshared; then
016a3251
DD
8532 if test -f "$additional_libdir/lib$name.$libext"; then
8533 found_dir="$additional_libdir"
8534 found_a="$additional_libdir/lib$name.$libext"
8535 if test -f "$additional_libdir/lib$name.la"; then
8536 found_la="$additional_libdir/lib$name.la"
8537 fi
8538 fi
8539 fi
8540 fi
8541 if test "X$found_dir" = "X"; then
8542 for x in $LDFLAGS $LTLIBICONV; do
8543
8544 acl_save_prefix="$prefix"
8545 prefix="$acl_final_prefix"
8546 acl_save_exec_prefix="$exec_prefix"
8547 exec_prefix="$acl_final_exec_prefix"
8548 eval x=\"$x\"
8549 exec_prefix="$acl_save_exec_prefix"
8550 prefix="$acl_save_prefix"
8551
8552 case "$x" in
8553 -L*)
8554 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 8555 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8556 found_dir="$dir"
8557 found_so="$dir/lib$name.$shlibext"
8558 if test -f "$dir/lib$name.la"; then
8559 found_la="$dir/lib$name.la"
8560 fi
9f1528a1 8561 elif test x$lib_type != xshared; then
016a3251
DD
8562 if test -f "$dir/lib$name.$libext"; then
8563 found_dir="$dir"
8564 found_a="$dir/lib$name.$libext"
8565 if test -f "$dir/lib$name.la"; then
8566 found_la="$dir/lib$name.la"
8567 fi
8568 fi
8569 fi
8570 ;;
8571 esac
8572 if test "X$found_dir" != "X"; then
8573 break
8574 fi
8575 done
8576 fi
8577 if test "X$found_dir" != "X"; then
8578 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8579 if test "X$found_so" != "X"; then
8580 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8581 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8582 else
8583 haveit=
8584 for x in $ltrpathdirs; do
8585 if test "X$x" = "X$found_dir"; then
8586 haveit=yes
8587 break
8588 fi
8589 done
8590 if test -z "$haveit"; then
8591 ltrpathdirs="$ltrpathdirs $found_dir"
8592 fi
8593 if test "$hardcode_direct" = yes; then
8594 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8595 else
8596 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8597 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8598 haveit=
8599 for x in $rpathdirs; do
8600 if test "X$x" = "X$found_dir"; then
8601 haveit=yes
8602 break
8603 fi
8604 done
8605 if test -z "$haveit"; then
8606 rpathdirs="$rpathdirs $found_dir"
8607 fi
8608 else
8609 haveit=
8610 for x in $LDFLAGS $LIBICONV; do
8611
8612 acl_save_prefix="$prefix"
8613 prefix="$acl_final_prefix"
8614 acl_save_exec_prefix="$exec_prefix"
8615 exec_prefix="$acl_final_exec_prefix"
8616 eval x=\"$x\"
8617 exec_prefix="$acl_save_exec_prefix"
8618 prefix="$acl_save_prefix"
8619
8620 if test "X$x" = "X-L$found_dir"; then
8621 haveit=yes
8622 break
8623 fi
8624 done
8625 if test -z "$haveit"; then
8626 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8627 fi
8628 if test "$hardcode_minus_L" != no; then
8629 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8630 else
8631 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8632 fi
8633 fi
8634 fi
8635 fi
8636 else
8637 if test "X$found_a" != "X"; then
8638 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8639 else
8640 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8641 fi
8642 fi
8643 additional_includedir=
8644 case "$found_dir" in
8645 */lib | */lib/)
8646 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8647 additional_includedir="$basedir/include"
8648 ;;
8649 esac
8650 if test "X$additional_includedir" != "X"; then
8651 if test "X$additional_includedir" != "X/usr/include"; then
8652 haveit=
8653 if test "X$additional_includedir" = "X/usr/local/include"; then
8654 if test -n "$GCC"; then
8655 case $host_os in
8656 linux*) haveit=yes;;
8657 esac
8658 fi
8659 fi
8660 if test -z "$haveit"; then
8661 for x in $CPPFLAGS $INCICONV; do
8662
8663 acl_save_prefix="$prefix"
8664 prefix="$acl_final_prefix"
8665 acl_save_exec_prefix="$exec_prefix"
8666 exec_prefix="$acl_final_exec_prefix"
8667 eval x=\"$x\"
8668 exec_prefix="$acl_save_exec_prefix"
8669 prefix="$acl_save_prefix"
8670
8671 if test "X$x" = "X-I$additional_includedir"; then
8672 haveit=yes
8673 break
8674 fi
8675 done
8676 if test -z "$haveit"; then
8677 if test -d "$additional_includedir"; then
8678 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8679 fi
8680 fi
8681 fi
8682 fi
8683 fi
8684 if test -n "$found_la"; then
8685 save_libdir="$libdir"
8686 case "$found_la" in
8687 */* | *\\*) . "$found_la" ;;
8688 *) . "./$found_la" ;;
8689 esac
8690 libdir="$save_libdir"
8691 for dep in $dependency_libs; do
8692 case "$dep" in
8693 -L*)
8694 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8695 if test "X$additional_libdir" != "X/usr/lib"; then
8696 haveit=
8697 if test "X$additional_libdir" = "X/usr/local/lib"; then
8698 if test -n "$GCC"; then
8699 case $host_os in
8700 linux*) haveit=yes;;
8701 esac
8702 fi
8703 fi
8704 if test -z "$haveit"; then
8705 haveit=
8706 for x in $LDFLAGS $LIBICONV; do
8707
8708 acl_save_prefix="$prefix"
8709 prefix="$acl_final_prefix"
8710 acl_save_exec_prefix="$exec_prefix"
8711 exec_prefix="$acl_final_exec_prefix"
8712 eval x=\"$x\"
8713 exec_prefix="$acl_save_exec_prefix"
8714 prefix="$acl_save_prefix"
8715
8716 if test "X$x" = "X-L$additional_libdir"; then
8717 haveit=yes
8718 break
8719 fi
8720 done
8721 if test -z "$haveit"; then
8722 if test -d "$additional_libdir"; then
8723 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8724 fi
8725 fi
8726 haveit=
8727 for x in $LDFLAGS $LTLIBICONV; do
8728
8729 acl_save_prefix="$prefix"
8730 prefix="$acl_final_prefix"
8731 acl_save_exec_prefix="$exec_prefix"
8732 exec_prefix="$acl_final_exec_prefix"
8733 eval x=\"$x\"
8734 exec_prefix="$acl_save_exec_prefix"
8735 prefix="$acl_save_prefix"
8736
8737 if test "X$x" = "X-L$additional_libdir"; then
8738 haveit=yes
8739 break
8740 fi
8741 done
8742 if test -z "$haveit"; then
8743 if test -d "$additional_libdir"; then
8744 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8745 fi
8746 fi
8747 fi
8748 fi
8749 ;;
8750 -R*)
8751 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8752 if test "$enable_rpath" != no; then
8753 haveit=
8754 for x in $rpathdirs; do
8755 if test "X$x" = "X$dir"; then
8756 haveit=yes
8757 break
8758 fi
8759 done
8760 if test -z "$haveit"; then
8761 rpathdirs="$rpathdirs $dir"
8762 fi
8763 haveit=
8764 for x in $ltrpathdirs; do
8765 if test "X$x" = "X$dir"; then
8766 haveit=yes
8767 break
8768 fi
8769 done
8770 if test -z "$haveit"; then
8771 ltrpathdirs="$ltrpathdirs $dir"
8772 fi
8773 fi
8774 ;;
8775 -l*)
8776 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8777 ;;
8778 *.la)
8779 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8780 ;;
8781 *)
8782 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8783 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8784 ;;
8785 esac
8786 done
8787 fi
8788 else
9f1528a1
AB
8789 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8790 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8791 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8792 else
8793 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8794 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8795 fi
016a3251
DD
8796 fi
8797 fi
8798 fi
8799 done
8800 done
8801 if test "X$rpathdirs" != "X"; then
8802 if test -n "$hardcode_libdir_separator"; then
8803 alldirs=
8804 for found_dir in $rpathdirs; do
8805 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8806 done
8807 acl_save_libdir="$libdir"
8808 libdir="$alldirs"
8809 eval flag=\"$hardcode_libdir_flag_spec\"
8810 libdir="$acl_save_libdir"
8811 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8812 else
8813 for found_dir in $rpathdirs; do
8814 acl_save_libdir="$libdir"
8815 libdir="$found_dir"
8816 eval flag=\"$hardcode_libdir_flag_spec\"
8817 libdir="$acl_save_libdir"
8818 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8819 done
8820 fi
8821 fi
8822 if test "X$ltrpathdirs" != "X"; then
8823 for found_dir in $ltrpathdirs; do
8824 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8825 done
8826 fi
8827
8828
8829
8830
8831
6c7a06a3 8832
6c7a06a3 8833
81ecdfbb
RW
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8835$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8836if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8837 $as_echo_n "(cached) " >&6
d542061a 8838else
6c7a06a3
TT
8839
8840 am_cv_func_iconv="no, consider installing GNU libiconv"
8841 am_cv_lib_iconv=no
016a3251
DD
8842 am_save_CPPFLAGS="$CPPFLAGS"
8843 CPPFLAGS="$CPPFLAGS $INCICONV"
8844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8845/* end confdefs.h. */
6c7a06a3
TT
8846#include <stdlib.h>
8847#include <iconv.h>
d542061a
UW
8848int
8849main ()
8850{
6c7a06a3 8851iconv_t cd = iconv_open("","");
016a3251
DD
8852 iconv(cd,NULL,NULL,NULL,NULL);
8853 iconv_close(cd);
d542061a
UW
8854 ;
8855 return 0;
8856}
8857_ACEOF
81ecdfbb 8858if ac_fn_c_try_link "$LINENO"; then :
016a3251 8859 am_cv_func_iconv=yes
d542061a 8860fi
81ecdfbb
RW
8861rm -f core conftest.err conftest.$ac_objext \
8862 conftest$ac_exeext conftest.$ac_ext
016a3251 8863 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8864
016a3251
DD
8865 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8866 for _libs in .libs _libs; do
8867 am_save_CPPFLAGS="$CPPFLAGS"
8868 am_save_LIBS="$LIBS"
8869 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8870 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8872/* end confdefs.h. */
6c7a06a3
TT
8873#include <stdlib.h>
8874#include <iconv.h>
d542061a
UW
8875int
8876main ()
8877{
6c7a06a3 8878iconv_t cd = iconv_open("","");
016a3251
DD
8879 iconv(cd,NULL,NULL,NULL,NULL);
8880 iconv_close(cd);
d542061a
UW
8881 ;
8882 return 0;
8883}
8884_ACEOF
81ecdfbb 8885if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8886 INCICONV="-I../libiconv/include"
8887 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8888 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8889 am_cv_lib_iconv=yes
8890 am_cv_func_iconv=yes
d542061a 8891fi
81ecdfbb
RW
8892rm -f core conftest.err conftest.$ac_objext \
8893 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8894 CPPFLAGS="$am_save_CPPFLAGS"
8895 LIBS="$am_save_LIBS"
8896 if test "$am_cv_func_iconv" = "yes"; then
8897 break
8898 fi
8899 done
77f120bf 8900 fi
94ae1714 8901
4edb1e84 8902 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8903 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8904 am_save_LIBS="$LIBS"
5d762de0 8905 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8906 LIBS="$LIBS $LIBICONV"
81ecdfbb 8907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8908/* end confdefs.h. */
6c7a06a3
TT
8909#include <stdlib.h>
8910#include <iconv.h>
bec39cab
AC
8911int
8912main ()
8913{
6c7a06a3
TT
8914iconv_t cd = iconv_open("","");
8915 iconv(cd,NULL,NULL,NULL,NULL);
8916 iconv_close(cd);
bec39cab
AC
8917 ;
8918 return 0;
8919}
8920_ACEOF
81ecdfbb 8921if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8922 am_cv_lib_iconv=yes
6c7a06a3 8923 am_cv_func_iconv=yes
627af7ea 8924fi
81ecdfbb
RW
8925rm -f core conftest.err conftest.$ac_objext \
8926 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8927 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8928 LIBS="$am_save_LIBS"
6c7a06a3
TT
8929 fi
8930
8931fi
81ecdfbb
RW
8932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8933$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8934 if test "$am_cv_func_iconv" = yes; then
8935
8936$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8937
016a3251 8938 fi
fc3b640d 8939 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8940
8941 for element in $INCICONV; do
8942 haveit=
8943 for x in $CPPFLAGS; do
8944
8945 acl_save_prefix="$prefix"
8946 prefix="$acl_final_prefix"
8947 acl_save_exec_prefix="$exec_prefix"
8948 exec_prefix="$acl_final_exec_prefix"
8949 eval x=\"$x\"
8950 exec_prefix="$acl_save_exec_prefix"
8951 prefix="$acl_save_prefix"
8952
8953 if test "X$x" = "X$element"; then
8954 haveit=yes
8955 break
8956 fi
8957 done
8958 if test -z "$haveit"; then
8959 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8960 fi
8961 done
8962
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8964$as_echo_n "checking how to link with libiconv... " >&6; }
8965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8966$as_echo "$LIBICONV" >&6; }
94ae1714 8967 else
016a3251
DD
8968 LIBICONV=
8969 LTLIBICONV=
fc3b640d 8970 fi
94ae1714 8971
6c7a06a3 8972
6c7a06a3 8973
016a3251 8974 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8976$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8977 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8978 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8979else
8980
81ecdfbb 8981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8982/* end confdefs.h. */
8983
6c7a06a3
TT
8984#include <stdlib.h>
8985#include <iconv.h>
8986extern
b4e70030 8987#ifdef __cplusplus
6c7a06a3 8988"C"
b4e70030 8989#endif
6c7a06a3
TT
8990#if defined(__STDC__) || defined(__cplusplus)
8991size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8992#else
8993size_t iconv();
8994#endif
8995
b4e70030
JB
8996int
8997main ()
8998{
6c7a06a3 8999
b4e70030
JB
9000 ;
9001 return 0;
9002}
9003_ACEOF
81ecdfbb 9004if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 9005 am_cv_proto_iconv_arg1=""
4e8d927d 9006else
81ecdfbb 9007 am_cv_proto_iconv_arg1="const"
b4e70030 9008fi
81ecdfbb 9009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
9010 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);"
9011fi
9012
9013 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 9014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 9015 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
9016$as_echo "${ac_t:-
9017 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
9018
9019cat >>confdefs.h <<_ACEOF
9020#define ICONV_CONST $am_cv_proto_iconv_arg1
9021_ACEOF
9022
9023 fi
6c7a06a3
TT
9024
9025
478aac75
DE
9026# GDB may fork/exec the iconv program to get the list of supported character
9027# sets. Allow the user to specify where to find it.
9028# There are several factors affecting the choice of option name:
9029# - There is already --with-libiconv-prefix but we can't use it, it specifies
9030# the build-time location of libiconv files.
9031# - The program we need to find is iconv, which comes with glibc. The user
9032# doesn't necessarily have libiconv installed. Therefore naming this
9033# --with-libiconv-foo feels wrong.
9034# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9035# defined to work on directories not files (though it really doesn't know
9036# the difference).
9037# - Calling this --with-iconv-prefix is perceived to cause too much confusion
9038# with --with-libiconv-prefix.
9039# Putting these together is why the option name is --with-iconv-bin.
9040
9041
9042# Check whether --with-iconv-bin was given.
9043if test "${with_iconv_bin+set}" = set; then :
9044 withval=$with_iconv_bin; iconv_bin="${withval}"
9045
9046cat >>confdefs.h <<_ACEOF
9047#define ICONV_BIN "${iconv_bin}"
9048_ACEOF
9049
9050
9051 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9052 if test "x$prefix" = xNONE; then
9053 test_prefix=/usr/local
9054 else
9055 test_prefix=$prefix
9056 fi
9057 else
9058 test_prefix=$exec_prefix
9059 fi
9060 value=0
9061 case ${iconv_bin} in
9062 "${test_prefix}"|"${test_prefix}/"*|\
9063 '${exec_prefix}'|'${exec_prefix}/'*)
9064 value=1
9065 ;;
9066 esac
9067
9068cat >>confdefs.h <<_ACEOF
9069#define ICONV_BIN_RELOCATABLE $value
9070_ACEOF
9071
9072
9073
9074fi
9075
9076
cb01cfba 9077# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9078if test x"$enable_tui" != xno; then
cb01cfba
JB
9079 prefer_curses=yes
9080fi
9081
9082curses_found=no
9083if test x"$prefer_curses" = xyes; then
9084 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9085 # curses library because the latter might not provide all the
9086 # functionality we need. However, this leads to problems on systems
9087 # where the linker searches /usr/local/lib, but the compiler doesn't
9088 # search /usr/local/include, if ncurses is installed in /usr/local. A
9089 # default installation of ncurses on alpha*-dec-osf* will lead to such
9090 # a situation.
81ecdfbb
RW
9091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9092$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 9093if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 9094 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9095else
9096 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9098/* end confdefs.h. */
9099
81ecdfbb
RW
9100/* Override any GCC internal prototype to avoid an error.
9101 Use char because int might match the return type of a GCC
9102 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9103#ifdef __cplusplus
9104extern "C"
9105#endif
6c7a06a3
TT
9106char waddstr ();
9107int
9108main ()
9109{
81ecdfbb 9110return waddstr ();
6c7a06a3
TT
9111 ;
9112 return 0;
9113}
9114_ACEOF
5007d765 9115for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
9116 if test -z "$ac_lib"; then
9117 ac_res="none required"
9118 else
9119 ac_res=-l$ac_lib
9120 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9121 fi
9122 if ac_fn_c_try_link "$LINENO"; then :
9123 ac_cv_search_waddstr=$ac_res
9124fi
9125rm -f core conftest.err conftest.$ac_objext \
9126 conftest$ac_exeext
d0ac1c44 9127 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
9128 break
9129fi
9130done
d0ac1c44 9131if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 9132
6c7a06a3 9133else
81ecdfbb
RW
9134 ac_cv_search_waddstr=no
9135fi
9136rm conftest.$ac_ext
9137LIBS=$ac_func_search_save_LIBS
9138fi
9139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9140$as_echo "$ac_cv_search_waddstr" >&6; }
9141ac_res=$ac_cv_search_waddstr
9142if test "$ac_res" != no; then :
9143 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9144
9145fi
9146
9147
cb01cfba
JB
9148 if test "$ac_cv_search_waddstr" != no; then
9149 curses_found=yes
9150 fi
9151fi
9152
9153# Check whether we should enable the TUI, but only do so if we really
9154# can.
9155if test x"$enable_tui" != xno; then
0ad6b8ee 9156 if test -d "$srcdir/tui"; then
cb01cfba 9157 if test "$curses_found" != no; then
6c7a06a3
TT
9158 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9159 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9160 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9161 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
9162 else
9163 if test x"$enable_tui" = xyes; then
d0ac1c44 9164 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9165 else
81ecdfbb
RW
9166 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9167$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9168 fi
9169 fi
9170 fi
9171fi
9172
9173# Since GDB uses Readline, we need termcap functionality. In many
9174# cases this will be provided by the curses library, but some systems
96fe4562 9175# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
9176
9177case $host_os in
9178 cygwin*)
0ad6b8ee 9179 if test -d "$srcdir/libtermcap"; then
6c7a06a3
TT
9180 LIBS="../libtermcap/libtermcap.a $LIBS"
9181 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9182 fi ;;
9183 go32* | *djgpp*)
9184 ac_cv_search_tgetent="none required"
9185 ;;
6c7a06a3
TT
9186esac
9187
9188# These are the libraries checked by Readline.
81ecdfbb
RW
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9190$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 9191if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 9192 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9193else
9194 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9196/* end confdefs.h. */
9197
81ecdfbb
RW
9198/* Override any GCC internal prototype to avoid an error.
9199 Use char because int might match the return type of a GCC
9200 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9201#ifdef __cplusplus
9202extern "C"
9203#endif
6c7a06a3
TT
9204char tgetent ();
9205int
9206main ()
9207{
81ecdfbb 9208return tgetent ();
6c7a06a3
TT
9209 ;
9210 return 0;
9211}
9212_ACEOF
2578ecb1 9213for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9214 if test -z "$ac_lib"; then
9215 ac_res="none required"
9216 else
9217 ac_res=-l$ac_lib
6c7a06a3 9218 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9219 fi
9220 if ac_fn_c_try_link "$LINENO"; then :
9221 ac_cv_search_tgetent=$ac_res
9222fi
9223rm -f core conftest.err conftest.$ac_objext \
9224 conftest$ac_exeext
d0ac1c44 9225 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9226 break
9227fi
9228done
d0ac1c44 9229if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9230
6c7a06a3 9231else
81ecdfbb 9232 ac_cv_search_tgetent=no
6c7a06a3 9233fi
81ecdfbb 9234rm conftest.$ac_ext
6c7a06a3
TT
9235LIBS=$ac_func_search_save_LIBS
9236fi
81ecdfbb
RW
9237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9238$as_echo "$ac_cv_search_tgetent" >&6; }
9239ac_res=$ac_cv_search_tgetent
9240if test "$ac_res" != no; then :
9241 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9242
06825bd1
MK
9243fi
9244
06825bd1 9245
bec39cab 9246if test "$ac_cv_search_tgetent" = no; then
7a85168d 9247 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9248fi
9249
3841debe 9250
81ecdfbb
RW
9251# Check whether --with-system-readline was given.
9252if test "${with_system_readline+set}" = set; then :
9253 withval=$with_system_readline;
9254fi
6a30b0a5 9255
6a30b0a5
AS
9256
9257if test "$with_system_readline" = yes; then
86c6b807
TT
9258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9259$as_echo_n "checking whether system readline is new enough... " >&6; }
9260if ${gdb_cv_readline_ok+:} false; then :
9261 $as_echo_n "(cached) " >&6
9262else
9263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9264/* end confdefs.h. */
9265#include <stdio.h>
9266#include <readline/readline.h>
9267int
9268main ()
9269{
9270#if RL_VERSION_MAJOR < 7
9271# error "readline version 7 required"
9272#endif
9273 ;
9274 return 0;
9275}
9276_ACEOF
9277if ac_fn_c_try_compile "$LINENO"; then :
9278 gdb_cv_readline_ok=yes
9279else
9280 gdb_cv_readline_ok=no
9281fi
9282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9283fi
9284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9285$as_echo "$gdb_cv_readline_ok" >&6; }
9286 if test "$gdb_cv_readline_ok" != yes; then
9287 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9288 fi
9289
6a30b0a5
AS
9290 READLINE=-lreadline
9291 READLINE_DEPS=
9292 READLINE_CFLAGS=
39037522 9293 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9294else
9295 READLINE='$(READLINE_DIR)/libreadline.a'
9296 READLINE_DEPS='$(READLINE)'
9297 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9298 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9299fi
9300
9301
9302
9303
9304
f997c383
SD
9305# Generate jit-reader.h
9306
9307# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9308TARGET_PTR=
9309
9310# The cast to long int works around a bug in the HP C Compiler
9311# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9312# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9313# This bug is HP SR number 8606223364.
9314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9315$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9316if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9317 $as_echo_n "(cached) " >&6
9318else
9319 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9320
9321else
9322 if test "$ac_cv_type_unsigned_long_long" = yes; then
9323 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9324$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9325as_fn_error 77 "cannot compute sizeof (unsigned long long)
9326See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9327 else
9328 ac_cv_sizeof_unsigned_long_long=0
9329 fi
9330fi
9331
9332fi
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9334$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9335
9336
9337
9338cat >>confdefs.h <<_ACEOF
9339#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9340_ACEOF
9341
9342
9343# The cast to long int works around a bug in the HP C Compiler
9344# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9345# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9346# This bug is HP SR number 8606223364.
9347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9348$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9349if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9350 $as_echo_n "(cached) " >&6
9351else
9352 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9353
9354else
9355 if test "$ac_cv_type_unsigned_long" = yes; then
9356 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9357$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9358as_fn_error 77 "cannot compute sizeof (unsigned long)
9359See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9360 else
9361 ac_cv_sizeof_unsigned_long=0
9362 fi
9363fi
9364
9365fi
9366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9367$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9368
9369
9370
9371cat >>confdefs.h <<_ACEOF
9372#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9373_ACEOF
9374
9375
9376# The cast to long int works around a bug in the HP C Compiler
9377# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9378# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9379# This bug is HP SR number 8606223364.
9380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9381$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9382if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9383 $as_echo_n "(cached) " >&6
9384else
9385 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9386
9387else
9388 if test "$ac_cv_type_unsigned___int128" = yes; then
9389 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9390$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9391as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9392See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9393 else
9394 ac_cv_sizeof_unsigned___int128=0
9395 fi
9396fi
9397
9398fi
9399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9400$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9401
9402
9403
9404cat >>confdefs.h <<_ACEOF
9405#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9406_ACEOF
9407
9408
9409
9410if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9411 TARGET_PTR="unsigned long"
9412elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9413 TARGET_PTR="unsigned long long"
9414elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9415 TARGET_PTR="unsigned __int128"
9416else
9417 TARGET_PTR="unsigned long"
9418fi
9419
9420
9421ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9422
9423
a2d08b9e
SD
9424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9425$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9426if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9427 $as_echo_n "(cached) " >&6
9428else
9429 ac_func_search_save_LIBS=$LIBS
9430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9431/* end confdefs.h. */
9432
9433/* Override any GCC internal prototype to avoid an error.
9434 Use char because int might match the return type of a GCC
9435 builtin and then its argument prototype would still apply. */
9436#ifdef __cplusplus
9437extern "C"
9438#endif
9439char dlopen ();
9440int
9441main ()
9442{
9443return dlopen ();
9444 ;
9445 return 0;
9446}
9447_ACEOF
9448for ac_lib in '' dl; do
9449 if test -z "$ac_lib"; then
9450 ac_res="none required"
9451 else
9452 ac_res=-l$ac_lib
9453 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9454 fi
9455 if ac_fn_c_try_link "$LINENO"; then :
9456 ac_cv_search_dlopen=$ac_res
9457fi
9458rm -f core conftest.err conftest.$ac_objext \
9459 conftest$ac_exeext
d0ac1c44 9460 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9461 break
9462fi
9463done
d0ac1c44 9464if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9465
9466else
9467 ac_cv_search_dlopen=no
9468fi
9469rm conftest.$ac_ext
9470LIBS=$ac_func_search_save_LIBS
9471fi
9472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9473$as_echo "$ac_cv_search_dlopen" >&6; }
9474ac_res=$ac_cv_search_dlopen
9475if test "$ac_res" != no; then :
9476 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9477
9478fi
9479
9480
39037522 9481
b8e0a31c
SD
9482
9483# Check whether --with-jit-reader-dir was given.
9484if test "${with_jit_reader_dir+set}" = set; then :
9485 withval=$with_jit_reader_dir;
9486 JIT_READER_DIR=$withval
9487else
9488 JIT_READER_DIR=${libdir}/gdb
9489fi
9490
9491
9492 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9493 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9494 ac_define_dir=`eval echo $JIT_READER_DIR`
9495 ac_define_dir=`eval echo $ac_define_dir`
9496
9497cat >>confdefs.h <<_ACEOF
9498#define JIT_READER_DIR "$ac_define_dir"
9499_ACEOF
9500
9501
9502
9503
9504 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9505 if test "x$prefix" = xNONE; then
9506 test_prefix=/usr/local
9507 else
9508 test_prefix=$prefix
9509 fi
9510 else
9511 test_prefix=$exec_prefix
9512 fi
9513 value=0
9514 case ${ac_define_dir} in
9515 "${test_prefix}"|"${test_prefix}/"*|\
9516 '${exec_prefix}'|'${exec_prefix}/'*)
9517 value=1
9518 ;;
9519 esac
9520
9521cat >>confdefs.h <<_ACEOF
9522#define JIT_READER_DIR_RELOCATABLE $value
9523_ACEOF
9524
9525
9526
9527
9528
81ecdfbb
RW
9529# Check whether --with-expat was given.
9530if test "${with_expat+set}" = set; then :
9531 withval=$with_expat;
5c39566f
DJ
9532else
9533 with_expat=auto
81ecdfbb
RW
9534fi
9535
9536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9537$as_echo_n "checking whether to use expat... " >&6; }
9538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9539$as_echo "$with_expat" >&6; }
5c39566f
DJ
9540
9541if test "${with_expat}" = no; then
81ecdfbb
RW
9542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9543$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9544 HAVE_LIBEXPAT=no
9545else
9546
3841debe
DJ
9547
9548
9549
9550
9551
9552
9553
9554 use_additional=yes
9555
9556 acl_save_prefix="$prefix"
9557 prefix="$acl_final_prefix"
9558 acl_save_exec_prefix="$exec_prefix"
9559 exec_prefix="$acl_final_exec_prefix"
9560
9561 eval additional_includedir=\"$includedir\"
9562 eval additional_libdir=\"$libdir\"
9563
9564 exec_prefix="$acl_save_exec_prefix"
9565 prefix="$acl_save_prefix"
9566
9567
81ecdfbb
RW
9568# Check whether --with-libexpat-prefix was given.
9569if test "${with_libexpat_prefix+set}" = set; then :
9570 withval=$with_libexpat_prefix;
3841debe
DJ
9571 if test "X$withval" = "Xno"; then
9572 use_additional=no
9573 else
9574 if test "X$withval" = "X"; then
9575
9576 acl_save_prefix="$prefix"
9577 prefix="$acl_final_prefix"
9578 acl_save_exec_prefix="$exec_prefix"
9579 exec_prefix="$acl_final_exec_prefix"
9580
9581 eval additional_includedir=\"$includedir\"
9582 eval additional_libdir=\"$libdir\"
9583
9584 exec_prefix="$acl_save_exec_prefix"
9585 prefix="$acl_save_prefix"
9586
9587 else
9588 additional_includedir="$withval/include"
9589 additional_libdir="$withval/lib"
9590 fi
9591 fi
9592
81ecdfbb
RW
9593fi
9594
9f1528a1
AB
9595
9596# Check whether --with-libexpat-type was given.
9597if test "${with_libexpat_type+set}" = set; then :
9598 withval=$with_libexpat_type; with_libexpat_type=$withval
9599else
9600 with_libexpat_type=auto
9601fi
9602
9603 lib_type=`eval echo \$with_libexpat_type`
9604
3841debe
DJ
9605 LIBEXPAT=
9606 LTLIBEXPAT=
9607 INCEXPAT=
9608 rpathdirs=
9609 ltrpathdirs=
9610 names_already_handled=
9611 names_next_round='expat '
9612 while test -n "$names_next_round"; do
9613 names_this_round="$names_next_round"
9614 names_next_round=
9615 for name in $names_this_round; do
9616 already_handled=
9617 for n in $names_already_handled; do
9618 if test "$n" = "$name"; then
9619 already_handled=yes
9620 break
9621 fi
9622 done
9623 if test -z "$already_handled"; then
9624 names_already_handled="$names_already_handled $name"
9625 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9626 eval value=\"\$HAVE_LIB$uppername\"
9627 if test -n "$value"; then
9628 if test "$value" = yes; then
9629 eval value=\"\$LIB$uppername\"
9630 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9631 eval value=\"\$LTLIB$uppername\"
9632 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9633 else
9634 :
9635 fi
9636 else
9637 found_dir=
9638 found_la=
9639 found_so=
9640 found_a=
9641 if test $use_additional = yes; then
9f1528a1 9642 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9643 found_dir="$additional_libdir"
9644 found_so="$additional_libdir/lib$name.$shlibext"
9645 if test -f "$additional_libdir/lib$name.la"; then
9646 found_la="$additional_libdir/lib$name.la"
9647 fi
9f1528a1 9648 elif test x$lib_type != xshared; then
3841debe
DJ
9649 if test -f "$additional_libdir/lib$name.$libext"; then
9650 found_dir="$additional_libdir"
9651 found_a="$additional_libdir/lib$name.$libext"
9652 if test -f "$additional_libdir/lib$name.la"; then
9653 found_la="$additional_libdir/lib$name.la"
9654 fi
9655 fi
9656 fi
9657 fi
9658 if test "X$found_dir" = "X"; then
9659 for x in $LDFLAGS $LTLIBEXPAT; do
9660
9661 acl_save_prefix="$prefix"
9662 prefix="$acl_final_prefix"
9663 acl_save_exec_prefix="$exec_prefix"
9664 exec_prefix="$acl_final_exec_prefix"
9665 eval x=\"$x\"
9666 exec_prefix="$acl_save_exec_prefix"
9667 prefix="$acl_save_prefix"
9668
9669 case "$x" in
9670 -L*)
9671 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 9672 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9673 found_dir="$dir"
9674 found_so="$dir/lib$name.$shlibext"
9675 if test -f "$dir/lib$name.la"; then
9676 found_la="$dir/lib$name.la"
9677 fi
9f1528a1 9678 elif test x$lib_type != xshared; then
3841debe
DJ
9679 if test -f "$dir/lib$name.$libext"; then
9680 found_dir="$dir"
9681 found_a="$dir/lib$name.$libext"
9682 if test -f "$dir/lib$name.la"; then
9683 found_la="$dir/lib$name.la"
9684 fi
9685 fi
9686 fi
9687 ;;
9688 esac
9689 if test "X$found_dir" != "X"; then
9690 break
9691 fi
9692 done
9693 fi
9694 if test "X$found_dir" != "X"; then
9695 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9696 if test "X$found_so" != "X"; then
9697 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9698 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9699 else
9700 haveit=
9701 for x in $ltrpathdirs; do
9702 if test "X$x" = "X$found_dir"; then
9703 haveit=yes
9704 break
9705 fi
9706 done
9707 if test -z "$haveit"; then
9708 ltrpathdirs="$ltrpathdirs $found_dir"
9709 fi
9710 if test "$hardcode_direct" = yes; then
9711 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9712 else
9713 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9714 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9715 haveit=
9716 for x in $rpathdirs; do
9717 if test "X$x" = "X$found_dir"; then
9718 haveit=yes
9719 break
9720 fi
9721 done
9722 if test -z "$haveit"; then
9723 rpathdirs="$rpathdirs $found_dir"
9724 fi
9725 else
9726 haveit=
9727 for x in $LDFLAGS $LIBEXPAT; do
9728
9729 acl_save_prefix="$prefix"
9730 prefix="$acl_final_prefix"
9731 acl_save_exec_prefix="$exec_prefix"
9732 exec_prefix="$acl_final_exec_prefix"
9733 eval x=\"$x\"
9734 exec_prefix="$acl_save_exec_prefix"
9735 prefix="$acl_save_prefix"
9736
9737 if test "X$x" = "X-L$found_dir"; then
9738 haveit=yes
9739 break
9740 fi
9741 done
9742 if test -z "$haveit"; then
9743 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9744 fi
9745 if test "$hardcode_minus_L" != no; then
9746 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9747 else
9748 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9749 fi
9750 fi
9751 fi
9752 fi
9753 else
9754 if test "X$found_a" != "X"; then
9755 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9756 else
9757 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9758 fi
9759 fi
9760 additional_includedir=
9761 case "$found_dir" in
9762 */lib | */lib/)
9763 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9764 additional_includedir="$basedir/include"
9765 ;;
9766 esac
9767 if test "X$additional_includedir" != "X"; then
9768 if test "X$additional_includedir" != "X/usr/include"; then
9769 haveit=
9770 if test "X$additional_includedir" = "X/usr/local/include"; then
9771 if test -n "$GCC"; then
9772 case $host_os in
9773 linux*) haveit=yes;;
9774 esac
9775 fi
9776 fi
9777 if test -z "$haveit"; then
9778 for x in $CPPFLAGS $INCEXPAT; do
9779
9780 acl_save_prefix="$prefix"
9781 prefix="$acl_final_prefix"
9782 acl_save_exec_prefix="$exec_prefix"
9783 exec_prefix="$acl_final_exec_prefix"
9784 eval x=\"$x\"
9785 exec_prefix="$acl_save_exec_prefix"
9786 prefix="$acl_save_prefix"
9787
9788 if test "X$x" = "X-I$additional_includedir"; then
9789 haveit=yes
9790 break
9791 fi
9792 done
9793 if test -z "$haveit"; then
9794 if test -d "$additional_includedir"; then
9795 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9796 fi
9797 fi
9798 fi
9799 fi
9800 fi
9801 if test -n "$found_la"; then
9802 save_libdir="$libdir"
9803 case "$found_la" in
9804 */* | *\\*) . "$found_la" ;;
9805 *) . "./$found_la" ;;
9806 esac
9807 libdir="$save_libdir"
9808 for dep in $dependency_libs; do
9809 case "$dep" in
9810 -L*)
9811 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9812 if test "X$additional_libdir" != "X/usr/lib"; then
9813 haveit=
9814 if test "X$additional_libdir" = "X/usr/local/lib"; then
9815 if test -n "$GCC"; then
9816 case $host_os in
9817 linux*) haveit=yes;;
9818 esac
9819 fi
9820 fi
9821 if test -z "$haveit"; then
9822 haveit=
9823 for x in $LDFLAGS $LIBEXPAT; do
9824
9825 acl_save_prefix="$prefix"
9826 prefix="$acl_final_prefix"
9827 acl_save_exec_prefix="$exec_prefix"
9828 exec_prefix="$acl_final_exec_prefix"
9829 eval x=\"$x\"
9830 exec_prefix="$acl_save_exec_prefix"
9831 prefix="$acl_save_prefix"
9832
9833 if test "X$x" = "X-L$additional_libdir"; then
9834 haveit=yes
9835 break
9836 fi
9837 done
9838 if test -z "$haveit"; then
9839 if test -d "$additional_libdir"; then
9840 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9841 fi
9842 fi
9843 haveit=
9844 for x in $LDFLAGS $LTLIBEXPAT; do
9845
9846 acl_save_prefix="$prefix"
9847 prefix="$acl_final_prefix"
9848 acl_save_exec_prefix="$exec_prefix"
9849 exec_prefix="$acl_final_exec_prefix"
9850 eval x=\"$x\"
9851 exec_prefix="$acl_save_exec_prefix"
9852 prefix="$acl_save_prefix"
9853
9854 if test "X$x" = "X-L$additional_libdir"; then
9855 haveit=yes
9856 break
9857 fi
9858 done
9859 if test -z "$haveit"; then
9860 if test -d "$additional_libdir"; then
9861 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9862 fi
9863 fi
9864 fi
9865 fi
9866 ;;
9867 -R*)
9868 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9869 if test "$enable_rpath" != no; then
9870 haveit=
9871 for x in $rpathdirs; do
9872 if test "X$x" = "X$dir"; then
9873 haveit=yes
9874 break
9875 fi
9876 done
9877 if test -z "$haveit"; then
9878 rpathdirs="$rpathdirs $dir"
9879 fi
9880 haveit=
9881 for x in $ltrpathdirs; do
9882 if test "X$x" = "X$dir"; then
9883 haveit=yes
9884 break
9885 fi
9886 done
9887 if test -z "$haveit"; then
9888 ltrpathdirs="$ltrpathdirs $dir"
9889 fi
9890 fi
9891 ;;
9892 -l*)
9893 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9894 ;;
9895 *.la)
9896 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9897 ;;
9898 *)
9899 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9900 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9901 ;;
81ecdfbb
RW
9902 esac
9903 done
9904 fi
9905 else
9f1528a1
AB
9906 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9907 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9908 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9909 else
9910 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9911 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9912 fi
81ecdfbb
RW
9913 fi
9914 fi
9915 fi
9916 done
9917 done
9918 if test "X$rpathdirs" != "X"; then
9919 if test -n "$hardcode_libdir_separator"; then
9920 alldirs=
9921 for found_dir in $rpathdirs; do
9922 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9923 done
9924 acl_save_libdir="$libdir"
9925 libdir="$alldirs"
9926 eval flag=\"$hardcode_libdir_flag_spec\"
9927 libdir="$acl_save_libdir"
9928 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9929 else
9930 for found_dir in $rpathdirs; do
9931 acl_save_libdir="$libdir"
9932 libdir="$found_dir"
9933 eval flag=\"$hardcode_libdir_flag_spec\"
9934 libdir="$acl_save_libdir"
9935 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9936 done
9937 fi
9938 fi
9939 if test "X$ltrpathdirs" != "X"; then
9940 for found_dir in $ltrpathdirs; do
9941 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9942 done
9943 fi
a9322a30
TT
9944
9945
81ecdfbb 9946 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9947
81ecdfbb
RW
9948 for element in $INCEXPAT; do
9949 haveit=
9950 for x in $CPPFLAGS; do
a9322a30 9951
81ecdfbb
RW
9952 acl_save_prefix="$prefix"
9953 prefix="$acl_final_prefix"
9954 acl_save_exec_prefix="$exec_prefix"
9955 exec_prefix="$acl_final_exec_prefix"
9956 eval x=\"$x\"
9957 exec_prefix="$acl_save_exec_prefix"
9958 prefix="$acl_save_prefix"
a8111142 9959
81ecdfbb
RW
9960 if test "X$x" = "X$element"; then
9961 haveit=yes
9962 break
9963 fi
9964 done
9965 if test -z "$haveit"; then
9966 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9967 fi
9968 done
a9322a30
TT
9969
9970
81ecdfbb
RW
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9972$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9973if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9974 $as_echo_n "(cached) " >&6
bec39cab 9975else
bec39cab 9976
81ecdfbb
RW
9977 ac_save_LIBS="$LIBS"
9978 LIBS="$LIBS $LIBEXPAT"
9979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9980/* end confdefs.h. */
81ecdfbb
RW
9981#include "expat.h"
9982int
9983main ()
9984{
9985XML_Parser p = XML_ParserCreate (0);
9986 ;
9987 return 0;
9988}
bec39cab 9989_ACEOF
81ecdfbb
RW
9990if ac_fn_c_try_link "$LINENO"; then :
9991 ac_cv_libexpat=yes
c906108c 9992else
81ecdfbb 9993 ac_cv_libexpat=no
bec39cab 9994fi
81ecdfbb
RW
9995rm -f core conftest.err conftest.$ac_objext \
9996 conftest$ac_exeext conftest.$ac_ext
9997 LIBS="$ac_save_LIBS"
c906108c 9998
95ca63c4 9999fi
81ecdfbb
RW
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10001$as_echo "$ac_cv_libexpat" >&6; }
10002 if test "$ac_cv_libexpat" = yes; then
10003 HAVE_LIBEXPAT=yes
bec39cab 10004
81ecdfbb 10005$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 10006
81ecdfbb
RW
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10008$as_echo_n "checking how to link with libexpat... " >&6; }
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10010$as_echo "$LIBEXPAT" >&6; }
10011 else
10012 HAVE_LIBEXPAT=no
10013 CPPFLAGS="$ac_save_CPPFLAGS"
10014 LIBEXPAT=
10015 LTLIBEXPAT=
10016 fi
95ca63c4
CF
10017
10018
10019
7cb9022a
MK
10020
10021
bec39cab 10022
81ecdfbb
RW
10023 if test "$HAVE_LIBEXPAT" != yes; then
10024 if test "$with_expat" = yes; then
d0ac1c44 10025 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10026 else
10027 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10028$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10029 fi
10030 else
10031 save_LIBS=$LIBS
10032 LIBS="$LIBS $LIBEXPAT"
10033 for ac_func in XML_StopParser
10034do :
10035 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 10036if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 10037 cat >>confdefs.h <<_ACEOF
81ecdfbb 10038#define HAVE_XML_STOPPARSER 1
bec39cab 10039_ACEOF
95ca63c4 10040
bec39cab 10041fi
bec39cab 10042done
95ca63c4 10043
81ecdfbb
RW
10044 LIBS=$save_LIBS
10045 fi
a9322a30
TT
10046fi
10047
2400729e
UW
10048
10049# Check whether --with-mpfr was given.
10050if test "${with_mpfr+set}" = set; then :
10051 withval=$with_mpfr;
10052else
10053 with_mpfr=auto
10054fi
10055
10056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
10057$as_echo_n "checking whether to use MPFR... " >&6; }
10058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
10059$as_echo "$with_mpfr" >&6; }
10060
10061if test "${with_mpfr}" = no; then
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10063$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10064 HAVE_LIBMPFR=no
10065else
10066
10067
10068
10069
10070
10071
10072
10073
10074 use_additional=yes
10075
10076 acl_save_prefix="$prefix"
10077 prefix="$acl_final_prefix"
10078 acl_save_exec_prefix="$exec_prefix"
10079 exec_prefix="$acl_final_exec_prefix"
10080
10081 eval additional_includedir=\"$includedir\"
10082 eval additional_libdir=\"$libdir\"
10083
10084 exec_prefix="$acl_save_exec_prefix"
10085 prefix="$acl_save_prefix"
10086
10087
10088# Check whether --with-libmpfr-prefix was given.
10089if test "${with_libmpfr_prefix+set}" = set; then :
10090 withval=$with_libmpfr_prefix;
10091 if test "X$withval" = "Xno"; then
10092 use_additional=no
10093 else
10094 if test "X$withval" = "X"; then
10095
10096 acl_save_prefix="$prefix"
10097 prefix="$acl_final_prefix"
10098 acl_save_exec_prefix="$exec_prefix"
10099 exec_prefix="$acl_final_exec_prefix"
10100
10101 eval additional_includedir=\"$includedir\"
10102 eval additional_libdir=\"$libdir\"
10103
10104 exec_prefix="$acl_save_exec_prefix"
10105 prefix="$acl_save_prefix"
10106
10107 else
10108 additional_includedir="$withval/include"
10109 additional_libdir="$withval/lib"
10110 fi
10111 fi
10112
10113fi
10114
9f1528a1
AB
10115
10116# Check whether --with-libmpfr-type was given.
10117if test "${with_libmpfr_type+set}" = set; then :
10118 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10119else
10120 with_libmpfr_type=auto
10121fi
10122
10123 lib_type=`eval echo \$with_libmpfr_type`
10124
2400729e
UW
10125 LIBMPFR=
10126 LTLIBMPFR=
10127 INCMPFR=
10128 rpathdirs=
10129 ltrpathdirs=
10130 names_already_handled=
da658607 10131 names_next_round='mpfr gmp'
2400729e
UW
10132 while test -n "$names_next_round"; do
10133 names_this_round="$names_next_round"
10134 names_next_round=
10135 for name in $names_this_round; do
10136 already_handled=
10137 for n in $names_already_handled; do
10138 if test "$n" = "$name"; then
10139 already_handled=yes
10140 break
10141 fi
10142 done
10143 if test -z "$already_handled"; then
10144 names_already_handled="$names_already_handled $name"
10145 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10146 eval value=\"\$HAVE_LIB$uppername\"
10147 if test -n "$value"; then
10148 if test "$value" = yes; then
10149 eval value=\"\$LIB$uppername\"
10150 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10151 eval value=\"\$LTLIB$uppername\"
10152 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10153 else
10154 :
10155 fi
10156 else
10157 found_dir=
10158 found_la=
10159 found_so=
10160 found_a=
10161 if test $use_additional = yes; then
9f1528a1 10162 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
10163 found_dir="$additional_libdir"
10164 found_so="$additional_libdir/lib$name.$shlibext"
10165 if test -f "$additional_libdir/lib$name.la"; then
10166 found_la="$additional_libdir/lib$name.la"
10167 fi
9f1528a1 10168 elif test x$lib_type != xshared; then
2400729e
UW
10169 if test -f "$additional_libdir/lib$name.$libext"; then
10170 found_dir="$additional_libdir"
10171 found_a="$additional_libdir/lib$name.$libext"
10172 if test -f "$additional_libdir/lib$name.la"; then
10173 found_la="$additional_libdir/lib$name.la"
10174 fi
10175 fi
10176 fi
10177 fi
10178 if test "X$found_dir" = "X"; then
10179 for x in $LDFLAGS $LTLIBMPFR; do
10180
10181 acl_save_prefix="$prefix"
10182 prefix="$acl_final_prefix"
10183 acl_save_exec_prefix="$exec_prefix"
10184 exec_prefix="$acl_final_exec_prefix"
10185 eval x=\"$x\"
10186 exec_prefix="$acl_save_exec_prefix"
10187 prefix="$acl_save_prefix"
10188
10189 case "$x" in
10190 -L*)
10191 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 10192 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
10193 found_dir="$dir"
10194 found_so="$dir/lib$name.$shlibext"
10195 if test -f "$dir/lib$name.la"; then
10196 found_la="$dir/lib$name.la"
10197 fi
9f1528a1 10198 elif test x$lib_type != xshared; then
2400729e
UW
10199 if test -f "$dir/lib$name.$libext"; then
10200 found_dir="$dir"
10201 found_a="$dir/lib$name.$libext"
10202 if test -f "$dir/lib$name.la"; then
10203 found_la="$dir/lib$name.la"
10204 fi
10205 fi
10206 fi
10207 ;;
10208 esac
10209 if test "X$found_dir" != "X"; then
10210 break
10211 fi
10212 done
10213 fi
10214 if test "X$found_dir" != "X"; then
10215 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10216 if test "X$found_so" != "X"; then
10217 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10218 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10219 else
10220 haveit=
10221 for x in $ltrpathdirs; do
10222 if test "X$x" = "X$found_dir"; then
10223 haveit=yes
10224 break
10225 fi
10226 done
10227 if test -z "$haveit"; then
10228 ltrpathdirs="$ltrpathdirs $found_dir"
10229 fi
10230 if test "$hardcode_direct" = yes; then
10231 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10232 else
10233 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10234 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10235 haveit=
10236 for x in $rpathdirs; do
10237 if test "X$x" = "X$found_dir"; then
10238 haveit=yes
10239 break
10240 fi
10241 done
10242 if test -z "$haveit"; then
10243 rpathdirs="$rpathdirs $found_dir"
10244 fi
10245 else
10246 haveit=
10247 for x in $LDFLAGS $LIBMPFR; do
10248
10249 acl_save_prefix="$prefix"
10250 prefix="$acl_final_prefix"
10251 acl_save_exec_prefix="$exec_prefix"
10252 exec_prefix="$acl_final_exec_prefix"
10253 eval x=\"$x\"
10254 exec_prefix="$acl_save_exec_prefix"
10255 prefix="$acl_save_prefix"
10256
10257 if test "X$x" = "X-L$found_dir"; then
10258 haveit=yes
10259 break
10260 fi
10261 done
10262 if test -z "$haveit"; then
10263 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10264 fi
10265 if test "$hardcode_minus_L" != no; then
10266 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10267 else
10268 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10269 fi
10270 fi
10271 fi
10272 fi
10273 else
10274 if test "X$found_a" != "X"; then
10275 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10276 else
10277 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10278 fi
10279 fi
10280 additional_includedir=
10281 case "$found_dir" in
10282 */lib | */lib/)
10283 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10284 additional_includedir="$basedir/include"
10285 ;;
10286 esac
10287 if test "X$additional_includedir" != "X"; then
10288 if test "X$additional_includedir" != "X/usr/include"; then
10289 haveit=
10290 if test "X$additional_includedir" = "X/usr/local/include"; then
10291 if test -n "$GCC"; then
10292 case $host_os in
10293 linux*) haveit=yes;;
10294 esac
10295 fi
10296 fi
10297 if test -z "$haveit"; then
10298 for x in $CPPFLAGS $INCMPFR; do
10299
10300 acl_save_prefix="$prefix"
10301 prefix="$acl_final_prefix"
10302 acl_save_exec_prefix="$exec_prefix"
10303 exec_prefix="$acl_final_exec_prefix"
10304 eval x=\"$x\"
10305 exec_prefix="$acl_save_exec_prefix"
10306 prefix="$acl_save_prefix"
10307
10308 if test "X$x" = "X-I$additional_includedir"; then
10309 haveit=yes
10310 break
10311 fi
10312 done
10313 if test -z "$haveit"; then
10314 if test -d "$additional_includedir"; then
10315 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10316 fi
10317 fi
10318 fi
10319 fi
10320 fi
10321 if test -n "$found_la"; then
10322 save_libdir="$libdir"
10323 case "$found_la" in
10324 */* | *\\*) . "$found_la" ;;
10325 *) . "./$found_la" ;;
10326 esac
10327 libdir="$save_libdir"
10328 for dep in $dependency_libs; do
10329 case "$dep" in
10330 -L*)
10331 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10332 if test "X$additional_libdir" != "X/usr/lib"; then
10333 haveit=
10334 if test "X$additional_libdir" = "X/usr/local/lib"; then
10335 if test -n "$GCC"; then
10336 case $host_os in
10337 linux*) haveit=yes;;
10338 esac
10339 fi
10340 fi
10341 if test -z "$haveit"; then
10342 haveit=
10343 for x in $LDFLAGS $LIBMPFR; do
10344
10345 acl_save_prefix="$prefix"
10346 prefix="$acl_final_prefix"
10347 acl_save_exec_prefix="$exec_prefix"
10348 exec_prefix="$acl_final_exec_prefix"
10349 eval x=\"$x\"
10350 exec_prefix="$acl_save_exec_prefix"
10351 prefix="$acl_save_prefix"
10352
10353 if test "X$x" = "X-L$additional_libdir"; then
10354 haveit=yes
10355 break
10356 fi
10357 done
10358 if test -z "$haveit"; then
10359 if test -d "$additional_libdir"; then
10360 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10361 fi
10362 fi
10363 haveit=
10364 for x in $LDFLAGS $LTLIBMPFR; do
10365
10366 acl_save_prefix="$prefix"
10367 prefix="$acl_final_prefix"
10368 acl_save_exec_prefix="$exec_prefix"
10369 exec_prefix="$acl_final_exec_prefix"
10370 eval x=\"$x\"
10371 exec_prefix="$acl_save_exec_prefix"
10372 prefix="$acl_save_prefix"
10373
10374 if test "X$x" = "X-L$additional_libdir"; then
10375 haveit=yes
10376 break
10377 fi
10378 done
10379 if test -z "$haveit"; then
10380 if test -d "$additional_libdir"; then
10381 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10382 fi
10383 fi
10384 fi
10385 fi
10386 ;;
10387 -R*)
10388 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10389 if test "$enable_rpath" != no; then
10390 haveit=
10391 for x in $rpathdirs; do
10392 if test "X$x" = "X$dir"; then
10393 haveit=yes
10394 break
10395 fi
10396 done
10397 if test -z "$haveit"; then
10398 rpathdirs="$rpathdirs $dir"
10399 fi
10400 haveit=
10401 for x in $ltrpathdirs; do
10402 if test "X$x" = "X$dir"; then
10403 haveit=yes
10404 break
10405 fi
10406 done
10407 if test -z "$haveit"; then
10408 ltrpathdirs="$ltrpathdirs $dir"
10409 fi
10410 fi
10411 ;;
10412 -l*)
10413 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10414 ;;
10415 *.la)
10416 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10417 ;;
10418 *)
10419 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10420 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10421 ;;
10422 esac
10423 done
10424 fi
10425 else
9f1528a1
AB
10426 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10427 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10428 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10429 else
10430 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10431 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10432 fi
2400729e
UW
10433 fi
10434 fi
10435 fi
10436 done
10437 done
10438 if test "X$rpathdirs" != "X"; then
10439 if test -n "$hardcode_libdir_separator"; then
10440 alldirs=
10441 for found_dir in $rpathdirs; do
10442 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10443 done
10444 acl_save_libdir="$libdir"
10445 libdir="$alldirs"
10446 eval flag=\"$hardcode_libdir_flag_spec\"
10447 libdir="$acl_save_libdir"
10448 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10449 else
10450 for found_dir in $rpathdirs; do
10451 acl_save_libdir="$libdir"
10452 libdir="$found_dir"
10453 eval flag=\"$hardcode_libdir_flag_spec\"
10454 libdir="$acl_save_libdir"
10455 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10456 done
10457 fi
10458 fi
10459 if test "X$ltrpathdirs" != "X"; then
10460 for found_dir in $ltrpathdirs; do
10461 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10462 done
10463 fi
10464
10465
10466 ac_save_CPPFLAGS="$CPPFLAGS"
10467
10468 for element in $INCMPFR; do
10469 haveit=
10470 for x in $CPPFLAGS; do
10471
10472 acl_save_prefix="$prefix"
10473 prefix="$acl_final_prefix"
10474 acl_save_exec_prefix="$exec_prefix"
10475 exec_prefix="$acl_final_exec_prefix"
10476 eval x=\"$x\"
10477 exec_prefix="$acl_save_exec_prefix"
10478 prefix="$acl_save_prefix"
10479
10480 if test "X$x" = "X$element"; then
10481 haveit=yes
10482 break
10483 fi
10484 done
10485 if test -z "$haveit"; then
10486 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10487 fi
10488 done
10489
10490
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10492$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10493if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10494 $as_echo_n "(cached) " >&6
10495else
10496
10497 ac_save_LIBS="$LIBS"
10498 LIBS="$LIBS $LIBMPFR"
10499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10500/* end confdefs.h. */
10501#include <mpfr.h>
10502int
10503main ()
10504{
10505mpfr_exp_t exp; mpfr_t x;
10506 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10507 ;
10508 return 0;
10509}
10510_ACEOF
10511if ac_fn_c_try_link "$LINENO"; then :
10512 ac_cv_libmpfr=yes
10513else
10514 ac_cv_libmpfr=no
10515fi
10516rm -f core conftest.err conftest.$ac_objext \
10517 conftest$ac_exeext conftest.$ac_ext
10518 LIBS="$ac_save_LIBS"
10519
10520fi
10521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10522$as_echo "$ac_cv_libmpfr" >&6; }
10523 if test "$ac_cv_libmpfr" = yes; then
10524 HAVE_LIBMPFR=yes
10525
10526$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10527
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10529$as_echo_n "checking how to link with libmpfr... " >&6; }
10530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10531$as_echo "$LIBMPFR" >&6; }
10532 else
10533 HAVE_LIBMPFR=no
10534 CPPFLAGS="$ac_save_CPPFLAGS"
10535 LIBMPFR=
10536 LTLIBMPFR=
10537 fi
10538
10539
10540
10541
10542
10543
10544 if test "$HAVE_LIBMPFR" != yes; then
10545 if test "$with_mpfr" = yes; then
d0ac1c44 10546 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10547 else
10548 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10549$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10550 fi
10551 fi
10552fi
10553
d344e670
DE
10554# --------------------- #
10555# Check for libpython. #
10556# --------------------- #
10557
a9322a30 10558
a9322a30
TT
10559
10560
ec685c5e 10561
0c4a4063 10562
81ecdfbb
RW
10563# Check whether --with-python was given.
10564if test "${with_python+set}" = set; then :
10565 withval=$with_python;
bec39cab 10566else
81ecdfbb 10567 with_python=auto
bec39cab 10568fi
bec39cab 10569
81ecdfbb
RW
10570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10571$as_echo_n "checking whether to use python... " >&6; }
10572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10573$as_echo "$with_python" >&6; }
9a156167 10574
81ecdfbb
RW
10575if test "${with_python}" = no; then
10576 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10577$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10578 have_libpython=no
bec39cab 10579else
81ecdfbb 10580 case "${with_python}" in
8c85a4e2 10581 [\\/]* | ?:[\\/]*)
0ad6b8ee 10582 if test -d "${with_python}"; then
ec685c5e 10583 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10584 python_prog="${with_python}/bin/python"
0c4a4063 10585 python_prefix=
9c4ea6c5
JB
10586 # If python does not exit ${with_python}/bin, then try in
10587 # ${with_python}. On Windows/MinGW, this is where the Python
10588 # executable is.
10589 if test ! -x "${python_prog}"; then
10590 python_prog="${with_python}/python"
10591 python_prefix=
10592 fi
e7a30f46 10593 if test ! -x "${python_prog}"; then
ec685c5e
DE
10594 # Fall back to gdb 7.0/7.1 behaviour.
10595 python_prog=missing
0c4a4063 10596 python_prefix=${with_python}
ec685c5e 10597 fi
e7a30f46 10598 elif test -x "${with_python}"; then
ec685c5e
DE
10599 # While we can't run python compiled for $host (unless host == build),
10600 # the user could write a script that provides the needed information,
10601 # so we support that.
ec685c5e 10602 python_prog=${with_python}
0c4a4063 10603 python_prefix=
ec685c5e 10604 else
d0ac1c44 10605 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10606 fi
81ecdfbb 10607 ;;
ec685c5e
DE
10608 */*)
10609 # Disallow --with-python=foo/bar.
d0ac1c44 10610 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10611 ;;
ec685c5e
DE
10612 *)
10613 # The user has either specified auto, yes, or the name of the python
10614 # program assumed to be in $PATH.
10615 python_prefix=
10616 case "${with_python}" in
10617 yes | auto)
0ad6b8ee 10618 if test "${build}" = "${host}"; then
ec685c5e
DE
10619 # Extract the first word of "python", so it can be a program name with args.
10620set dummy python; ac_word=$2
10621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10622$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10623if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10624 $as_echo_n "(cached) " >&6
10625else
10626 case $python_prog_path in
10627 [\\/]* | ?:[\\/]*)
10628 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10629 ;;
10630 *)
10631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10632for as_dir in $PATH
10633do
10634 IFS=$as_save_IFS
10635 test -z "$as_dir" && as_dir=.
10636 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10637 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10638 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10639 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10640 break 2
10641 fi
10642done
10643 done
10644IFS=$as_save_IFS
10645
10646 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10647 ;;
10648esac
10649fi
10650python_prog_path=$ac_cv_path_python_prog_path
10651if test -n "$python_prog_path"; then
10652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10653$as_echo "$python_prog_path" >&6; }
10654else
10655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10656$as_echo "no" >&6; }
10657fi
10658
10659
10660 if test "${python_prog_path}" = missing; then
10661 python_prog=missing
10662 else
10663 python_prog=${python_prog_path}
10664 fi
10665 else
10666 # Not much we can do except assume the cross-compiler will find the
10667 # right files.
10668 python_prog=missing
10669 fi
10670 ;;
10671 *)
10672 # While we can't run python compiled for $host (unless host == build),
10673 # the user could write a script that provides the needed information,
10674 # so we support that.
10675 python_prog="${with_python}"
10676 # Extract the first word of "${python_prog}", so it can be a program name with args.
10677set dummy ${python_prog}; ac_word=$2
10678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10679$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10680if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10681 $as_echo_n "(cached) " >&6
10682else
10683 case $python_prog_path in
10684 [\\/]* | ?:[\\/]*)
10685 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10686 ;;
10687 *)
10688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10689for as_dir in $PATH
10690do
10691 IFS=$as_save_IFS
10692 test -z "$as_dir" && as_dir=.
10693 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10694 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10695 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10697 break 2
10698 fi
10699done
10700 done
10701IFS=$as_save_IFS
10702
10703 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10704 ;;
10705esac
10706fi
10707python_prog_path=$ac_cv_path_python_prog_path
10708if test -n "$python_prog_path"; then
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10710$as_echo "$python_prog_path" >&6; }
10711else
10712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10713$as_echo "no" >&6; }
10714fi
10715
10716
10717 if test "${python_prog_path}" = missing; then
d0ac1c44 10718 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10719 fi
10720 ;;
10721 esac
81ecdfbb
RW
10722 esac
10723
ec685c5e 10724 if test "${python_prog}" != missing; then
e7a30f46
DE
10725 # We have a python program to use, but it may be too old.
10726 # Don't flag an error for --with-python=auto (the default).
10727 have_python_config=yes
ec685c5e
DE
10728 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10729 if test $? != 0; then
e7a30f46
DE
10730 have_python_config=failed
10731 if test "${with_python}" != auto; then
d0ac1c44 10732 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10733 fi
ec685c5e
DE
10734 fi
10735 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10736 if test $? != 0; then
e7a30f46
DE
10737 have_python_config=failed
10738 if test "${with_python}" != auto; then
d0ac1c44 10739 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10740 fi
ec685c5e 10741 fi
0c4a4063
DE
10742 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10743 if test $? != 0; then
e7a30f46
DE
10744 have_python_config=failed
10745 if test "${with_python}" != auto; then
d0ac1c44 10746 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10747 fi
0c4a4063 10748 fi
ec685c5e 10749 else
ac534cba
JB
10750 # We do not have a python executable we can use to determine where
10751 # to find the Python headers and libs. We cannot guess the include
10752 # path from the python_prefix either, because that include path
10753 # depends on the Python version. So, there is nothing much we can
10754 # do except assume that the compiler will be able to find those files.
10755 python_includes=
10756 python_libs=
0c4a4063 10757 have_python_config=no
ec685c5e 10758 fi
bec39cab 10759
ec685c5e
DE
10760 # If we have python-config, only try the configuration it provides.
10761 # Otherwise fallback on the old way of trying different versions of
10762 # python in turn.
81ecdfbb 10763
ec685c5e
DE
10764 have_libpython=no
10765 if test "${have_python_config}" = yes; then
71737c43 10766
ec685c5e
DE
10767
10768 new_CPPFLAGS=${python_includes}
10769 new_LIBS=${python_libs}
71737c43
CB
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10771$as_echo_n "checking for python... " >&6; }
ec685c5e 10772 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10773 save_LIBS=$LIBS
ec685c5e 10774 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10775 LIBS="$new_LIBS $LIBS"
ec685c5e 10776 found_usable_python=no
81ecdfbb 10777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10778/* end confdefs.h. */
ac534cba 10779#include "Python.h"
81ecdfbb
RW
10780int
10781main ()
10782{
10783Py_Initialize ();
10784 ;
10785 return 0;
10786}
bec39cab 10787_ACEOF
81ecdfbb 10788if ac_fn_c_try_link "$LINENO"; then :
71737c43 10789 have_libpython=yes
ec685c5e 10790 found_usable_python=yes
ac534cba
JB
10791 PYTHON_CPPFLAGS=$new_CPPFLAGS
10792 PYTHON_LIBS=$new_LIBS
9a156167 10793fi
81ecdfbb
RW
10794rm -f core conftest.err conftest.$ac_objext \
10795 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10796 CPPFLAGS=$save_CPPFLAGS
10797 LIBS=$save_LIBS
ec685c5e
DE
10798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10799$as_echo "${found_usable_python}" >&6; }
9a156167 10800
e7a30f46 10801 elif test "${have_python_config}" != failed; then
ec685c5e 10802 if test "${have_libpython}" = no; then
9a156167 10803
420697bb
TT
10804
10805 new_CPPFLAGS=${python_includes}
bf27f0e2 10806 new_LIBS="-lpython2.7 ${python_libs}"
71737c43
CB
10807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10808$as_echo_n "checking for python... " >&6; }
420697bb
TT
10809 save_CPPFLAGS=$CPPFLAGS
10810 save_LIBS=$LIBS
10811 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10812 LIBS="$new_LIBS $LIBS"
420697bb
TT
10813 found_usable_python=no
10814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10815/* end confdefs.h. */
ac534cba 10816#include "Python.h"
420697bb
TT
10817int
10818main ()
10819{
10820Py_Initialize ();
10821 ;
10822 return 0;
10823}
10824_ACEOF
10825if ac_fn_c_try_link "$LINENO"; then :
71737c43 10826 have_libpython=yes
420697bb 10827 found_usable_python=yes
ac534cba
JB
10828 PYTHON_CPPFLAGS=$new_CPPFLAGS
10829 PYTHON_LIBS=$new_LIBS
420697bb
TT
10830fi
10831rm -f core conftest.err conftest.$ac_objext \
10832 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10833 CPPFLAGS=$save_CPPFLAGS
10834 LIBS=$save_LIBS
420697bb
TT
10835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10836$as_echo "${found_usable_python}" >&6; }
10837
10838 fi
10839 if test "${have_libpython}" = no; then
10840
ec685c5e
DE
10841
10842 new_CPPFLAGS=${python_includes}
bf27f0e2 10843 new_LIBS="-lpython2.6 ${python_libs}"
71737c43
CB
10844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10845$as_echo_n "checking for python... " >&6; }
ec685c5e
DE
10846 save_CPPFLAGS=$CPPFLAGS
10847 save_LIBS=$LIBS
10848 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10849 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10850 found_usable_python=no
10851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10852/* end confdefs.h. */
ac534cba 10853#include "Python.h"
ec685c5e
DE
10854int
10855main ()
10856{
10857Py_Initialize ();
10858 ;
10859 return 0;
10860}
10861_ACEOF
10862if ac_fn_c_try_link "$LINENO"; then :
71737c43 10863 have_libpython=yes
ec685c5e 10864 found_usable_python=yes
ac534cba
JB
10865 PYTHON_CPPFLAGS=$new_CPPFLAGS
10866 PYTHON_LIBS=$new_LIBS
ec685c5e 10867fi
81ecdfbb
RW
10868rm -f core conftest.err conftest.$ac_objext \
10869 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10870 CPPFLAGS=$save_CPPFLAGS
10871 LIBS=$save_LIBS
ec685c5e
DE
10872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10873$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10874
ec685c5e
DE
10875 fi
10876 fi
ec685c5e
DE
10877
10878 if test "${have_libpython}" = no; then
81ecdfbb
RW
10879 case "${with_python}" in
10880 yes)
d0ac1c44 10881 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10882 ;;
10883 auto)
10884 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10885$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10886 ;;
10887 *)
d0ac1c44 10888 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10889 ;;
10890 esac
0c4a4063
DE
10891 else
10892 if test -n "${python_prefix}"; then
10893
10894cat >>confdefs.h <<_ACEOF
10895#define WITH_PYTHON_PATH "${python_prefix}"
10896_ACEOF
10897
10898
10899 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10900 if test "x$prefix" = xNONE; then
10901 test_prefix=/usr/local
10902 else
10903 test_prefix=$prefix
10904 fi
10905 else
10906 test_prefix=$exec_prefix
10907 fi
10908 value=0
10909 case ${python_prefix} in
10910 "${test_prefix}"|"${test_prefix}/"*|\
10911 '${exec_prefix}'|'${exec_prefix}/'*)
10912 value=1
10913 ;;
10914 esac
10915
10916cat >>confdefs.h <<_ACEOF
10917#define PYTHON_PATH_RELOCATABLE $value
10918_ACEOF
10919
10920
10921 fi
81ecdfbb 10922 fi
436868fb 10923fi
436868fb 10924
d13c7322
AB
10925
10926# Check whether --with-python-libdir was given.
10927if test "${with_python_libdir+set}" = set; then :
10928 withval=$with_python_libdir;
10929else
10930
10931 # If no python libdir is specified then select one based on
10932 # python's prefix path.
10933 if test -n "${python_prefix}"; then
10934 with_python_libdir=${python_prefix}/lib
10935 fi
10936
10937fi
10938
10939
ec685c5e 10940if test "${have_libpython}" != no; then
436868fb 10941
81ecdfbb 10942$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10943
81ecdfbb
RW
10944 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10945 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10946 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10947 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10948 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10949
d13c7322
AB
10950 if test -n "${with_python_libdir}"; then
10951
10952cat >>confdefs.h <<_ACEOF
10953#define WITH_PYTHON_LIBDIR "${with_python_libdir}"
10954_ACEOF
10955
10956
10957 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10958 if test "x$prefix" = xNONE; then
10959 test_prefix=/usr/local
10960 else
10961 test_prefix=$prefix
10962 fi
10963 else
10964 test_prefix=$exec_prefix
10965 fi
10966 value=0
10967 case ${with_python_libdir} in
10968 "${test_prefix}"|"${test_prefix}/"*|\
10969 '${exec_prefix}'|'${exec_prefix}/'*)
10970 value=1
10971 ;;
10972 esac
10973
10974cat >>confdefs.h <<_ACEOF
10975#define PYTHON_LIBDIR_RELOCATABLE $value
10976_ACEOF
10977
10978
10979 fi
10980
81ecdfbb
RW
10981 # Flags needed to compile Python code (taken from python-config --cflags).
10982 # We cannot call python-config directly because it will output whatever was
10983 # used when compiling the Python interpreter itself, including flags which
10984 # would make the python-related objects be compiled differently from the
10985 # rest of GDB (e.g., -O2 and -fPIC).
10986 if test "${GCC}" = yes; then
ae292b3a
TT
10987 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10988 # Python headers recommend -DNDEBUG, but it's unclear if that just
10989 # refers to building Python itself. In release mode, though, it
10990 # doesn't hurt for the Python code in gdb to follow.
10991 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10992 fi
436868fb 10993
81ecdfbb
RW
10994 if test "x${tentative_python_cflags}" != x; then
10995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10996$as_echo_n "checking compiler flags for python code... " >&6; }
10997 for flag in ${tentative_python_cflags}; do
10998 # Check that the compiler accepts it
10999 saved_CFLAGS="$CFLAGS"
11000 CFLAGS="$CFLAGS $flag"
11001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11002/* end confdefs.h. */
81ecdfbb 11003
a9322a30
TT
11004int
11005main ()
11006{
a9322a30
TT
11007
11008 ;
11009 return 0;
11010}
bec39cab 11011_ACEOF
81ecdfbb
RW
11012if ac_fn_c_try_compile "$LINENO"; then :
11013 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 11014fi
81ecdfbb
RW
11015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11016 CFLAGS="$saved_CFLAGS"
11017 done
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11019$as_echo "${PYTHON_CFLAGS}" >&6; }
11020 fi
043b6510 11021
c83393b9
JB
11022 # On x64 Windows, Python's include headers, and pyconfig.h in
11023 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
11024 # version of Windows. Unfortunately, MS_WIN64 is only defined if
11025 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
11026 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
11027 # The issue was reported to the Python community, but still isn't
11028 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
11029
043b6510 11030 case "$gdb_host" in
c83393b9
JB
11031 mingw64)
11032 if test "${GCC}" = yes; then
11033 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
11034 fi
11035 ;;
043b6510 11036 esac
81ecdfbb 11037else
6dddc817
DE
11038 # Even if Python support is not compiled in, we need to have this file
11039 # included so that the "python" command, et.al., still exists.
8fd8d003 11040 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 11041 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 11042fi
9a156167 11043
a4a1c157
PA
11044# Work around Python http://bugs.python.org/issue10112. See also
11045# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
11046# no effect. Note that the only test after this that uses Python is
11047# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
11048# run without -export-dynamic too.
11049PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
11050
11051
ed3ef339
DE
11052
11053
4df42755
DE
11054 if test "${have_libpython}" != no; then
11055 HAVE_PYTHON_TRUE=
11056 HAVE_PYTHON_FALSE='#'
11057else
11058 HAVE_PYTHON_TRUE='#'
11059 HAVE_PYTHON_FALSE=
11060fi
11061
ed3ef339
DE
11062
11063# -------------------- #
11064# Check for libguile. #
11065# -------------------- #
11066
11067
e1402065
DE
11068
11069
11070
11071
11072# Check whether --with-guile was given.
11073if test "${with_guile+set}" = set; then :
11074 withval=$with_guile;
11075else
11076 with_guile=auto
11077fi
11078
11079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11080$as_echo_n "checking whether to use guile... " >&6; }
11081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11082$as_echo "$with_guile" >&6; }
11083
ed3ef339
DE
11084# Extract the first word of "pkg-config", so it can be a program name with args.
11085set dummy pkg-config; ac_word=$2
11086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11087$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 11088if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
11089 $as_echo_n "(cached) " >&6
11090else
11091 case $pkg_config_prog_path in
11092 [\\/]* | ?:[\\/]*)
11093 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11094 ;;
11095 *)
11096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11097for as_dir in $PATH
11098do
11099 IFS=$as_save_IFS
11100 test -z "$as_dir" && as_dir=.
11101 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 11102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
11103 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11105 break 2
11106 fi
11107done
11108 done
11109IFS=$as_save_IFS
11110
11111 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11112 ;;
11113esac
11114fi
11115pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11116if test -n "$pkg_config_prog_path"; then
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11118$as_echo "$pkg_config_prog_path" >&6; }
11119else
11120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11121$as_echo "no" >&6; }
11122fi
11123
11124
11125
ae5369e7 11126try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
ed3ef339
DE
11127have_libguile=no
11128case "${with_guile}" in
11129no)
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11131$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11132 ;;
11133auto)
e1402065
DE
11134 if test "${pkg_config_prog_path}" = "missing"; then
11135 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11136$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11137 else
ed3ef339
DE
11138
11139 pkg_config=${pkg_config_prog_path}
11140 guile_version_list=${try_guile_versions}
11141 flag_errors=no
11142
ed3ef339
DE
11143 found_usable_guile=checking
11144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11145$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11146 for guile_version in ${guile_version_list}; do
11147 ${pkg_config} --exists ${guile_version} 2>/dev/null
11148 if test $? != 0; then
11149 continue
11150 fi
11151 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11152 if test $? != 0; then
d0ac1c44 11153 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11154 fi
11155 new_LIBS=`${pkg_config} --libs ${guile_version}`
11156 if test $? != 0; then
d0ac1c44 11157 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11158 fi
11159 found_usable_guile=${guile_version}
11160 break
11161 done
11162 if test "${found_usable_guile}" = "checking"; then
11163 if test "${flag_errors}" = "yes"; then
d0ac1c44 11164 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11165 else
11166 found_usable_guile=no
11167 fi
11168 fi
11169 if test "${found_usable_guile}" != no; then
11170 save_CPPFLAGS=$CPPFLAGS
11171 save_LIBS=$LIBS
11172 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11173 LIBS="$LIBS $new_LIBS"
11174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11175/* end confdefs.h. */
11176#include "libguile.h"
11177int
11178main ()
11179{
11180scm_init_guile ();
11181 ;
11182 return 0;
11183}
11184_ACEOF
11185if ac_fn_c_try_link "$LINENO"; then :
11186 have_libguile=yes
11187 GUILE_CPPFLAGS=$new_CPPFLAGS
11188 GUILE_LIBS=$new_LIBS
11189else
11190 found_usable_guile=no
11191fi
11192rm -f core conftest.err conftest.$ac_objext \
11193 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11194 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11195if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11196
11197$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11198
11199
11200fi
11201
ed3ef339
DE
11202 CPPFLAGS=$save_CPPFLAGS
11203 LIBS=$save_LIBS
11204 if test "${found_usable_guile}" = no; then
11205 if test "${flag_errors}" = yes; then
11206 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11207$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11208as_fn_error $? "linking guile version ${guile_version} test program failed
11209See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11210 fi
11211 fi
11212 fi
11213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11214$as_echo "${found_usable_guile}" >&6; }
11215
e1402065 11216 fi
ed3ef339
DE
11217 ;;
11218yes)
e1402065 11219 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11220 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11221 fi
ed3ef339
DE
11222
11223 pkg_config=${pkg_config_prog_path}
11224 guile_version_list=${try_guile_versions}
11225 flag_errors=yes
11226
ed3ef339
DE
11227 found_usable_guile=checking
11228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11229$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11230 for guile_version in ${guile_version_list}; do
11231 ${pkg_config} --exists ${guile_version} 2>/dev/null
11232 if test $? != 0; then
11233 continue
11234 fi
11235 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11236 if test $? != 0; then
d0ac1c44 11237 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11238 fi
11239 new_LIBS=`${pkg_config} --libs ${guile_version}`
11240 if test $? != 0; then
d0ac1c44 11241 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11242 fi
11243 found_usable_guile=${guile_version}
11244 break
11245 done
11246 if test "${found_usable_guile}" = "checking"; then
11247 if test "${flag_errors}" = "yes"; then
d0ac1c44 11248 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11249 else
11250 found_usable_guile=no
11251 fi
11252 fi
11253 if test "${found_usable_guile}" != no; then
11254 save_CPPFLAGS=$CPPFLAGS
11255 save_LIBS=$LIBS
11256 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11257 LIBS="$LIBS $new_LIBS"
11258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11259/* end confdefs.h. */
11260#include "libguile.h"
11261int
11262main ()
11263{
11264scm_init_guile ();
11265 ;
11266 return 0;
11267}
11268_ACEOF
11269if ac_fn_c_try_link "$LINENO"; then :
11270 have_libguile=yes
11271 GUILE_CPPFLAGS=$new_CPPFLAGS
11272 GUILE_LIBS=$new_LIBS
11273else
11274 found_usable_guile=no
11275fi
11276rm -f core conftest.err conftest.$ac_objext \
11277 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11278 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11279if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11280
11281$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11282
11283
11284fi
11285
ed3ef339
DE
11286 CPPFLAGS=$save_CPPFLAGS
11287 LIBS=$save_LIBS
11288 if test "${found_usable_guile}" = no; then
11289 if test "${flag_errors}" = yes; then
11290 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11291$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11292as_fn_error $? "linking guile version ${guile_version} test program failed
11293See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11294 fi
11295 fi
11296 fi
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11298$as_echo "${found_usable_guile}" >&6; }
11299
11300 ;;
11301[\\/]* | ?:[\\/]*)
e1402065 11302 if test -x "${with_guile}"; then
ed3ef339
DE
11303
11304 pkg_config=${with_guile}
11305 guile_version_list=${try_guile_versions}
11306 flag_errors=yes
11307
ed3ef339
DE
11308 found_usable_guile=checking
11309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11310$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11311 for guile_version in ${guile_version_list}; do
11312 ${pkg_config} --exists ${guile_version} 2>/dev/null
11313 if test $? != 0; then
11314 continue
11315 fi
11316 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11317 if test $? != 0; then
d0ac1c44 11318 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11319 fi
11320 new_LIBS=`${pkg_config} --libs ${guile_version}`
11321 if test $? != 0; then
d0ac1c44 11322 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11323 fi
11324 found_usable_guile=${guile_version}
11325 break
11326 done
11327 if test "${found_usable_guile}" = "checking"; then
11328 if test "${flag_errors}" = "yes"; then
d0ac1c44 11329 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11330 else
11331 found_usable_guile=no
11332 fi
11333 fi
11334 if test "${found_usable_guile}" != no; then
11335 save_CPPFLAGS=$CPPFLAGS
11336 save_LIBS=$LIBS
11337 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11338 LIBS="$LIBS $new_LIBS"
11339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11340/* end confdefs.h. */
11341#include "libguile.h"
11342int
11343main ()
11344{
11345scm_init_guile ();
11346 ;
11347 return 0;
11348}
11349_ACEOF
11350if ac_fn_c_try_link "$LINENO"; then :
11351 have_libguile=yes
11352 GUILE_CPPFLAGS=$new_CPPFLAGS
11353 GUILE_LIBS=$new_LIBS
11354else
11355 found_usable_guile=no
11356fi
11357rm -f core conftest.err conftest.$ac_objext \
11358 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11359 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11360if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11361
11362$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11363
11364
11365fi
11366
ed3ef339
DE
11367 CPPFLAGS=$save_CPPFLAGS
11368 LIBS=$save_LIBS
11369 if test "${found_usable_guile}" = no; then
11370 if test "${flag_errors}" = yes; then
11371 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11373as_fn_error $? "linking guile version ${guile_version} test program failed
11374See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11375 fi
11376 fi
11377 fi
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11379$as_echo "${found_usable_guile}" >&6; }
11380
e1402065 11381 else
d0ac1c44 11382 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11383 fi
ed3ef339
DE
11384 ;;
11385"" | */*)
11386 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11387 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11388 ;;
11389*)
11390 # A space separate list of guile versions to try, in order.
e1402065 11391 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11392 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11393 fi
ed3ef339
DE
11394
11395 pkg_config=${pkg_config_prog_path}
11396 guile_version_list=${with_guile}
11397 flag_errors=yes
11398
ed3ef339
DE
11399 found_usable_guile=checking
11400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11401$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11402 for guile_version in ${guile_version_list}; do
11403 ${pkg_config} --exists ${guile_version} 2>/dev/null
11404 if test $? != 0; then
11405 continue
11406 fi
11407 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11408 if test $? != 0; then
d0ac1c44 11409 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11410 fi
11411 new_LIBS=`${pkg_config} --libs ${guile_version}`
11412 if test $? != 0; then
d0ac1c44 11413 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11414 fi
11415 found_usable_guile=${guile_version}
11416 break
11417 done
11418 if test "${found_usable_guile}" = "checking"; then
11419 if test "${flag_errors}" = "yes"; then
d0ac1c44 11420 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11421 else
11422 found_usable_guile=no
11423 fi
11424 fi
11425 if test "${found_usable_guile}" != no; then
11426 save_CPPFLAGS=$CPPFLAGS
11427 save_LIBS=$LIBS
11428 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11429 LIBS="$LIBS $new_LIBS"
11430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11431/* end confdefs.h. */
11432#include "libguile.h"
11433int
11434main ()
11435{
11436scm_init_guile ();
11437 ;
11438 return 0;
11439}
11440_ACEOF
11441if ac_fn_c_try_link "$LINENO"; then :
11442 have_libguile=yes
11443 GUILE_CPPFLAGS=$new_CPPFLAGS
11444 GUILE_LIBS=$new_LIBS
11445else
11446 found_usable_guile=no
11447fi
11448rm -f core conftest.err conftest.$ac_objext \
11449 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11450 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11451if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11452
11453$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11454
11455
11456fi
11457
ed3ef339
DE
11458 CPPFLAGS=$save_CPPFLAGS
11459 LIBS=$save_LIBS
11460 if test "${found_usable_guile}" = no; then
11461 if test "${flag_errors}" = yes; then
11462 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11463$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11464as_fn_error $? "linking guile version ${guile_version} test program failed
11465See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11466 fi
11467 fi
11468 fi
11469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11470$as_echo "${found_usable_guile}" >&6; }
11471
11472 ;;
11473esac
11474
e76c5d17 11475if test "${have_libguile}" != no; then
d342a0da
DE
11476 case "${with_guile}" in
11477 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11478
11479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11480$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11481if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11482 $as_echo_n "(cached) " >&6
11483else
d342a0da 11484 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11485
11486 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11487 # the 'guild' and 'bindir' variables. In that case, try to guess
11488 # what the program name is, at the risk of getting it wrong if
11489 # Guile was configured with '--program-suffix' or similar.
11490 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11491 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11492 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11493 fi
11494
11495fi
11496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11497$as_echo "$ac_cv_guild_program_name" >&6; }
11498
11499 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11500 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11501 fi
11502
11503 GUILD="$ac_cv_guild_program_name"
11504
11505
d342a0da
DE
11506 ;;
11507 *)
11508
11509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11510$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11511if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11512 $as_echo_n "(cached) " >&6
11513else
11514 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11515
11516 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11517 # the 'guild' and 'bindir' variables. In that case, try to guess
11518 # what the program name is, at the risk of getting it wrong if
11519 # Guile was configured with '--program-suffix' or similar.
11520 if test "x$ac_cv_guild_program_name" = "x"; then
11521 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11522 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11523 fi
11524
11525fi
11526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11527$as_echo "$ac_cv_guild_program_name" >&6; }
11528
11529 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11530 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11531 fi
11532
11533 GUILD="$ac_cv_guild_program_name"
11534
11535
11536 ;;
11537 esac
e76c5d17
DE
11538
11539
11540 if test "$cross_compiling" = no; then
11541 GUILD_TARGET_FLAG=
11542 else
11543 GUILD_TARGET_FLAG="--target=$host"
11544 fi
11545
11546
11547
11548
11549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11550$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11551if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11552 $as_echo_n "(cached) " >&6
11553else
11554 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11555 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11556 ac_cv_guild_ok=yes
11557 else
11558 ac_cv_guild_ok=no
11559 fi
11560fi
11561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11562$as_echo "$ac_cv_guild_ok" >&6; }
11563
11564 if test "$ac_cv_guild_ok" = no; then
11565 have_libguile=no
11566 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11567$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11568 fi
11569fi
11570
ed3ef339
DE
11571if test "${have_libguile}" != no; then
11572
11573$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11574
11575 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11576 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11577 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11578 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11579 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11580
11581 save_LIBS="$LIBS"
11582 save_CPPFLAGS="$CPPFLAGS"
11583 LIBS="$GUILE_LIBS"
11584 CPPFLAGS="$GUILE_CPPFLAGS"
11585 for ac_func in scm_new_smob
11586do :
11587 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11588if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11589 cat >>confdefs.h <<_ACEOF
11590#define HAVE_SCM_NEW_SMOB 1
11591_ACEOF
11592
11593fi
11594done
11595
11596 LIBS="$save_LIBS"
11597 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11598else
11599 # Even if Guile support is not compiled in, we need to have these files
11600 # included.
bd810fff 11601 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11602 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11603fi
9a156167 11604
ac534cba 11605
4df42755
DE
11606 if test "${have_libguile}" != no; then
11607 HAVE_GUILE_TRUE=
11608 HAVE_GUILE_FALSE='#'
11609else
11610 HAVE_GUILE_TRUE='#'
11611 HAVE_GUILE_FALSE=
11612fi
11613
ac534cba 11614
62f29fda
TT
11615# ---------------------------- #
11616# Check for source highlight. #
11617# ---------------------------- #
11618
11619SRCHIGH_LIBS=
11620SRCHIGH_CFLAGS=
189b8c2e
ST
11621
11622# Check whether --enable-source-highlight was given.
11623if test "${enable_source_highlight+set}" = set; then :
11624 enableval=$enable_source_highlight; case "${enableval}" in
11625 yes) enable_source_highlight=yes ;;
11626 no) enable_source_highlight=no ;;
11627 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11628esac
11629else
11630 enable_source_highlight=auto
11631fi
11632
11633
11634if test "${enable_source_highlight}" != "no"; then
11635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11636$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11637 if test "${pkg_config_prog_path}" = "missing"; then
11638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11639$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11640 if test "${enable_source_highlight}" = "yes"; then
11641 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11642 fi
11643 else
d806ea2d
TT
11644 case "$LDFLAGS" in
11645 *static-libstdc*)
11646 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11647 ;;
11648 esac
11649
189b8c2e 11650 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11651 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11652 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11653
11654$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11655
11656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11657$as_echo "yes" >&6; }
189b8c2e 11658 else
62f29fda
TT
11659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11660$as_echo "no" >&6; }
189b8c2e
ST
11661 if test "${enable_source_highlight}" = "yes"; then
11662 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11663 fi
11664 fi
11665 fi
62f29fda
TT
11666fi
11667
11668
11669
05ea2a05
TT
11670# ------------------------- #
11671# Checks for header files. #
11672# ------------------------- #
58bfce93 11673
05ea2a05
TT
11674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11675$as_echo_n "checking for ANSI C header files... " >&6; }
11676if ${ac_cv_header_stdc+:} false; then :
11677 $as_echo_n "(cached) " >&6
58bfce93 11678else
5599c404
MM
11679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11680/* end confdefs.h. */
05ea2a05
TT
11681#include <stdlib.h>
11682#include <stdarg.h>
11683#include <string.h>
11684#include <float.h>
5599c404 11685
05ea2a05
TT
11686int
11687main ()
11688{
5599c404 11689
05ea2a05
TT
11690 ;
11691 return 0;
11692}
5599c404 11693_ACEOF
05ea2a05
TT
11694if ac_fn_c_try_compile "$LINENO"; then :
11695 ac_cv_header_stdc=yes
5599c404 11696else
05ea2a05 11697 ac_cv_header_stdc=no
5599c404 11698fi
05ea2a05 11699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58bfce93 11700
05ea2a05
TT
11701if test $ac_cv_header_stdc = yes; then
11702 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11704/* end confdefs.h. */
11705#include <string.h>
58bfce93 11706
05ea2a05
TT
11707_ACEOF
11708if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11709 $EGREP "memchr" >/dev/null 2>&1; then :
58bfce93 11710
05ea2a05
TT
11711else
11712 ac_cv_header_stdc=no
11713fi
11714rm -f conftest*
58bfce93 11715
05ea2a05 11716fi
58bfce93 11717
05ea2a05
TT
11718if test $ac_cv_header_stdc = yes; then
11719 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11721/* end confdefs.h. */
11722#include <stdlib.h>
58bfce93 11723
05ea2a05
TT
11724_ACEOF
11725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11726 $EGREP "free" >/dev/null 2>&1; then :
58bfce93 11727
05ea2a05
TT
11728else
11729 ac_cv_header_stdc=no
11730fi
11731rm -f conftest*
58bfce93 11732
05ea2a05 11733fi
58bfce93 11734
05ea2a05
TT
11735if test $ac_cv_header_stdc = yes; then
11736 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11737 if test "$cross_compiling" = yes; then :
11738 :
11739else
11740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11741/* end confdefs.h. */
11742#include <ctype.h>
11743#include <stdlib.h>
11744#if ((' ' & 0x0FF) == 0x020)
11745# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11746# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11747#else
11748# define ISLOWER(c) \
11749 (('a' <= (c) && (c) <= 'i') \
11750 || ('j' <= (c) && (c) <= 'r') \
11751 || ('s' <= (c) && (c) <= 'z'))
11752# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11753#endif
58bfce93 11754
05ea2a05
TT
11755#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11756int
11757main ()
11758{
11759 int i;
11760 for (i = 0; i < 256; i++)
11761 if (XOR (islower (i), ISLOWER (i))
11762 || toupper (i) != TOUPPER (i))
11763 return 2;
11764 return 0;
11765}
11766_ACEOF
11767if ac_fn_c_try_run "$LINENO"; then :
58bfce93 11768
05ea2a05
TT
11769else
11770 ac_cv_header_stdc=no
11771fi
11772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11773 conftest.$ac_objext conftest.beam conftest.$ac_ext
11774fi
58bfce93 11775
05ea2a05
TT
11776fi
11777fi
11778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11779$as_echo "$ac_cv_header_stdc" >&6; }
11780if test $ac_cv_header_stdc = yes; then
58bfce93 11781
05ea2a05 11782$as_echo "#define STDC_HEADERS 1" >>confdefs.h
58bfce93 11783
05ea2a05 11784fi
58bfce93 11785
05ea2a05 11786# elf_hp.h is for HP/UX 64-bit shared library support.
8ae8e197 11787for ac_header in nlist.h machine/reg.h \
05ea2a05
TT
11788 thread_db.h \
11789 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11790 sys/resource.h sys/ptrace.h ptrace.h \
8ae8e197 11791 sys/reg.h sys/debugreg.h \
05ea2a05
TT
11792 termios.h elf_hp.h
11793do :
11794 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11795ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11796if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11797 cat >>confdefs.h <<_ACEOF
11798#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11799_ACEOF
58bfce93
MM
11800
11801fi
11802
05ea2a05 11803done
58bfce93 11804
05ea2a05
TT
11805for ac_header in sys/user.h
11806do :
11807 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11808# include <sys/param.h>
11809#endif
58bfce93 11810
05ea2a05
TT
11811"
11812if test "x$ac_cv_header_sys_user_h" = xyes; then :
11813 cat >>confdefs.h <<_ACEOF
11814#define HAVE_SYS_USER_H 1
11815_ACEOF
58bfce93 11816
05ea2a05 11817fi
58bfce93 11818
05ea2a05 11819done
58bfce93 11820
58bfce93 11821
05ea2a05
TT
11822for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11823do :
11824 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11825ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11826if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11827 cat >>confdefs.h <<_ACEOF
11828#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11829_ACEOF
58bfce93 11830
05ea2a05 11831fi
58bfce93 11832
05ea2a05 11833done
58bfce93 11834
05ea2a05
TT
11835for ac_header in term.h
11836do :
11837 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11838# include <curses.h>
11839#endif
58bfce93 11840
05ea2a05
TT
11841"
11842if test "x$ac_cv_header_term_h" = xyes; then :
11843 cat >>confdefs.h <<_ACEOF
11844#define HAVE_TERM_H 1
11845_ACEOF
58bfce93 11846
05ea2a05 11847fi
58bfce93 11848
05ea2a05 11849done
58bfce93 11850
58bfce93 11851
95420d30 11852for ac_header in sys/socket.h
05a6b8c2 11853do :
95420d30
TV
11854 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
11855if test "x$ac_cv_header_sys_socket_h" = xyes; then :
05a6b8c2 11856 cat >>confdefs.h <<_ACEOF
95420d30 11857#define HAVE_SYS_SOCKET_H 1
05a6b8c2
EZ
11858_ACEOF
11859
11860fi
11861
11862done
11863
11864for ac_header in ws2tcpip.h
11865do :
11866 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
11867if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
11868 cat >>confdefs.h <<_ACEOF
11869#define HAVE_WS2TCPIP_H 1
11870_ACEOF
11871
11872fi
11873
11874done
11875
11876
05ea2a05
TT
11877# ------------------------- #
11878# Checks for declarations. #
11879# ------------------------- #
58bfce93 11880
58bfce93 11881
05ea2a05
TT
11882 # Check for presence and size of long long.
11883 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11884if test "x$ac_cv_type_long_long" = xyes; then :
58bfce93 11885
05ea2a05
TT
11886cat >>confdefs.h <<_ACEOF
11887#define HAVE_LONG_LONG 1
11888_ACEOF
11889
11890# The cast to long int works around a bug in the HP C Compiler
11891# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11892# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11893# This bug is HP SR number 8606223364.
11894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11895$as_echo_n "checking size of long long... " >&6; }
11896if ${ac_cv_sizeof_long_long+:} false; then :
58bfce93
MM
11897 $as_echo_n "(cached) " >&6
11898else
05ea2a05 11899 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
58bfce93 11900
58bfce93 11901else
05ea2a05
TT
11902 if test "$ac_cv_type_long_long" = yes; then
11903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11905as_fn_error 77 "cannot compute sizeof (long long)
11906See \`config.log' for more details" "$LINENO" 5; }
11907 else
11908 ac_cv_sizeof_long_long=0
11909 fi
58bfce93 11910fi
58bfce93
MM
11911
11912fi
05ea2a05
TT
11913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11914$as_echo "$ac_cv_sizeof_long_long" >&6; }
58bfce93 11915
58bfce93 11916
58bfce93 11917
05ea2a05
TT
11918cat >>confdefs.h <<_ACEOF
11919#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11920_ACEOF
58bfce93
MM
11921
11922
05ea2a05 11923fi
58bfce93
MM
11924
11925
05ea2a05
TT
11926 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11927ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11928if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11929 ac_have_decl=1
11930else
11931 ac_have_decl=0
11932fi
58bfce93 11933
05ea2a05
TT
11934cat >>confdefs.h <<_ACEOF
11935#define HAVE_DECL_BASENAME $ac_have_decl
c56ccc05 11936_ACEOF
05ea2a05
TT
11937ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11938if test "x$ac_cv_have_decl_ffs" = xyes; then :
11939 ac_have_decl=1
11940else
11941 ac_have_decl=0
c56ccc05 11942fi
c56ccc05
MM
11943
11944cat >>confdefs.h <<_ACEOF
05ea2a05 11945#define HAVE_DECL_FFS $ac_have_decl
c56ccc05 11946_ACEOF
05ea2a05
TT
11947ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11948if test "x$ac_cv_have_decl_asprintf" = xyes; then :
11949 ac_have_decl=1
11950else
11951 ac_have_decl=0
c56ccc05 11952fi
c56ccc05
MM
11953
11954cat >>confdefs.h <<_ACEOF
05ea2a05 11955#define HAVE_DECL_ASPRINTF $ac_have_decl
c56ccc05 11956_ACEOF
05ea2a05
TT
11957ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11958if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11959 ac_have_decl=1
11960else
11961 ac_have_decl=0
11962fi
c56ccc05 11963
05ea2a05
TT
11964cat >>confdefs.h <<_ACEOF
11965#define HAVE_DECL_VASPRINTF $ac_have_decl
11966_ACEOF
11967ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11968if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11969 ac_have_decl=1
11970else
11971 ac_have_decl=0
c56ccc05
MM
11972fi
11973
05ea2a05
TT
11974cat >>confdefs.h <<_ACEOF
11975#define HAVE_DECL_SNPRINTF $ac_have_decl
11976_ACEOF
11977ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11978if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11979 ac_have_decl=1
11980else
11981 ac_have_decl=0
58bfce93
MM
11982fi
11983
05ea2a05
TT
11984cat >>confdefs.h <<_ACEOF
11985#define HAVE_DECL_VSNPRINTF $ac_have_decl
11986_ACEOF
c890192f 11987
05ea2a05
TT
11988 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11989if test "x$ac_cv_have_decl_strtol" = xyes; then :
11990 ac_have_decl=1
bec39cab 11991else
05ea2a05
TT
11992 ac_have_decl=0
11993fi
81ecdfbb 11994
05ea2a05
TT
11995cat >>confdefs.h <<_ACEOF
11996#define HAVE_DECL_STRTOL $ac_have_decl
11997_ACEOF
11998ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11999if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12000 ac_have_decl=1
12001else
12002 ac_have_decl=0
12003fi
a9322a30 12004
05ea2a05
TT
12005cat >>confdefs.h <<_ACEOF
12006#define HAVE_DECL_STRTOUL $ac_have_decl
bec39cab 12007_ACEOF
05ea2a05
TT
12008ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12009if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12010 ac_have_decl=1
bec39cab 12011else
05ea2a05 12012 ac_have_decl=0
a9322a30 12013fi
bec39cab 12014
05ea2a05
TT
12015cat >>confdefs.h <<_ACEOF
12016#define HAVE_DECL_STRTOLL $ac_have_decl
12017_ACEOF
12018ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12019if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12020 ac_have_decl=1
12021else
12022 ac_have_decl=0
12023fi
bec39cab 12024
05ea2a05
TT
12025cat >>confdefs.h <<_ACEOF
12026#define HAVE_DECL_STRTOULL $ac_have_decl
81ecdfbb 12027_ACEOF
bec39cab 12028
05ea2a05
TT
12029 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12030if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12031 ac_have_decl=1
bec39cab 12032else
05ea2a05 12033 ac_have_decl=0
81ecdfbb 12034fi
81ecdfbb 12035
05ea2a05
TT
12036cat >>confdefs.h <<_ACEOF
12037#define HAVE_DECL_STRVERSCMP $ac_have_decl
12038_ACEOF
81ecdfbb 12039
81ecdfbb 12040
06825bd1 12041
05ea2a05
TT
12042ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12043if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12044 ac_have_decl=1
81ecdfbb 12045else
05ea2a05 12046 ac_have_decl=0
81ecdfbb 12047fi
bec39cab 12048
05ea2a05
TT
12049cat >>confdefs.h <<_ACEOF
12050#define HAVE_DECL_SNPRINTF $ac_have_decl
12051_ACEOF
81ecdfbb 12052
05ea2a05
TT
12053
12054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12055$as_echo_n "checking for LC_MESSAGES... " >&6; }
12056if ${am_cv_val_LC_MESSAGES+:} false; then :
12057 $as_echo_n "(cached) " >&6
bec39cab 12058else
81ecdfbb 12059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12060/* end confdefs.h. */
05ea2a05 12061#include <locale.h>
a9322a30
TT
12062int
12063main ()
12064{
05ea2a05
TT
12065return LC_MESSAGES
12066 ;
a9322a30
TT
12067 return 0;
12068}
bec39cab 12069_ACEOF
05ea2a05
TT
12070if ac_fn_c_try_link "$LINENO"; then :
12071 am_cv_val_LC_MESSAGES=yes
bec39cab 12072else
05ea2a05 12073 am_cv_val_LC_MESSAGES=no
81ecdfbb 12074fi
05ea2a05
TT
12075rm -f core conftest.err conftest.$ac_objext \
12076 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 12077fi
05ea2a05
TT
12078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12079$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12080 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12081
05ea2a05 12082$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
bec39cab 12083
05ea2a05 12084 fi
5ee754fc 12085
bec39cab 12086
05ea2a05
TT
12087# ------------------ #
12088# Checks for types. #
12089# ------------------ #
12090
12091ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
05a6b8c2
EZ
12092#if HAVE_SYS_SOCKET_H
12093# include <sys/socket.h>
12094#elif HAVE_WS2TCPIP_H
12095# include <ws2tcpip.h>
12096#endif
05ea2a05
TT
12097
12098"
12099if test "x$ac_cv_type_socklen_t" = xyes; then :
12100
12101cat >>confdefs.h <<_ACEOF
12102#define HAVE_SOCKLEN_T 1
bec39cab 12103_ACEOF
c906108c 12104
05ea2a05 12105
bec39cab 12106fi
81ecdfbb 12107
81ecdfbb 12108
05ea2a05
TT
12109# ------------------------------------- #
12110# Checks for compiler characteristics. #
12111# ------------------------------------- #
a9322a30 12112
05ea2a05
TT
12113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12114$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12115if ${ac_cv_c_const+:} false; then :
12116 $as_echo_n "(cached) " >&6
12117else
12118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12119/* end confdefs.h. */
bec39cab 12120
05ea2a05
TT
12121int
12122main ()
12123{
bec39cab 12124
05ea2a05
TT
12125#ifndef __cplusplus
12126 /* Ultrix mips cc rejects this sort of thing. */
12127 typedef int charset[2];
12128 const charset cs = { 0, 0 };
12129 /* SunOS 4.1.1 cc rejects this. */
12130 char const *const *pcpcc;
12131 char **ppc;
12132 /* NEC SVR4.0.2 mips cc rejects this. */
12133 struct point {int x, y;};
12134 static struct point const zero = {0,0};
12135 /* AIX XL C 1.02.0.0 rejects this.
12136 It does not let you subtract one const X* pointer from another in
12137 an arm of an if-expression whose if-part is not a constant
12138 expression */
12139 const char *g = "string";
12140 pcpcc = &g + (g ? g-g : 0);
12141 /* HPUX 7.0 cc rejects these. */
12142 ++pcpcc;
12143 ppc = (char**) pcpcc;
12144 pcpcc = (char const *const *) ppc;
12145 { /* SCO 3.2v4 cc rejects this sort of thing. */
12146 char tx;
12147 char *t = &tx;
12148 char const *s = 0 ? (char *) 0 : (char const *) 0;
5ee754fc 12149
05ea2a05
TT
12150 *t++ = 0;
12151 if (s) return 0;
12152 }
12153 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12154 int x[] = {25, 17};
12155 const int *foo = &x[0];
12156 ++foo;
12157 }
12158 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12159 typedef const int *iptr;
12160 iptr p = 0;
12161 ++p;
12162 }
12163 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12164 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12165 struct s { int j; const int *ap[3]; } bx;
12166 struct s *b = &bx; b->j = 5;
12167 }
12168 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12169 const int foo = 10;
12170 if (!foo) return 0;
12171 }
12172 return !cs[0] && !zero.x;
12173#endif
5ee754fc 12174
05ea2a05
TT
12175 ;
12176 return 0;
12177}
bec39cab 12178_ACEOF
05ea2a05
TT
12179if ac_fn_c_try_compile "$LINENO"; then :
12180 ac_cv_c_const=yes
12181else
12182 ac_cv_c_const=no
12183fi
12184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12185fi
05ea2a05
TT
12186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12187$as_echo "$ac_cv_c_const" >&6; }
12188if test $ac_cv_c_const = no; then
5ee754fc 12189
05ea2a05 12190$as_echo "#define const /**/" >>confdefs.h
bec39cab 12191
05ea2a05
TT
12192fi
12193
12194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12195$as_echo_n "checking for inline... " >&6; }
12196if ${ac_cv_c_inline+:} false; then :
12197 $as_echo_n "(cached) " >&6
12198else
12199 ac_cv_c_inline=no
12200for ac_kw in inline __inline__ __inline; do
12201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12202/* end confdefs.h. */
12203#ifndef __cplusplus
12204typedef int foo_t;
12205static $ac_kw foo_t static_foo () {return 0; }
12206$ac_kw foo_t foo () {return 0; }
81ecdfbb 12207#endif
bec39cab 12208
a8111142 12209_ACEOF
05ea2a05
TT
12210if ac_fn_c_try_compile "$LINENO"; then :
12211 ac_cv_c_inline=$ac_kw
a8111142 12212fi
05ea2a05
TT
12213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12214 test "$ac_cv_c_inline" != no && break
81ecdfbb 12215done
a8111142 12216
05ea2a05
TT
12217fi
12218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12219$as_echo "$ac_cv_c_inline" >&6; }
a8111142 12220
05ea2a05
TT
12221case $ac_cv_c_inline in
12222 inline | yes) ;;
12223 *)
12224 case $ac_cv_c_inline in
12225 no) ac_val=;;
12226 *) ac_val=$ac_cv_c_inline;;
12227 esac
12228 cat >>confdefs.h <<_ACEOF
12229#ifndef __cplusplus
12230#define inline $ac_val
12231#endif
07697489 12232_ACEOF
05ea2a05
TT
12233 ;;
12234esac
07697489 12235
05ea2a05
TT
12236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12237$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12238if ${ac_cv_c_bigendian+:} false; then :
07697489
PA
12239 $as_echo_n "(cached) " >&6
12240else
05ea2a05
TT
12241 ac_cv_c_bigendian=unknown
12242 # See if we're dealing with a universal compiler.
12243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12244/* end confdefs.h. */
12245#ifndef __APPLE_CC__
12246 not a universal capable compiler
12247 #endif
12248 typedef int dummy;
07697489 12249
05ea2a05
TT
12250_ACEOF
12251if ac_fn_c_try_compile "$LINENO"; then :
07697489 12252
05ea2a05
TT
12253 # Check for potential -arch flags. It is not universal unless
12254 # there are at least two -arch flags with different values.
12255 ac_arch=
12256 ac_prev=
12257 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12258 if test -n "$ac_prev"; then
12259 case $ac_word in
12260 i?86 | x86_64 | ppc | ppc64)
12261 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12262 ac_arch=$ac_word
12263 else
12264 ac_cv_c_bigendian=universal
12265 break
12266 fi
12267 ;;
12268 esac
12269 ac_prev=
12270 elif test "x$ac_word" = "x-arch"; then
12271 ac_prev=arch
12272 fi
12273 done
07697489 12274fi
05ea2a05
TT
12275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12276 if test $ac_cv_c_bigendian = unknown; then
12277 # See if sys/param.h defines the BYTE_ORDER macro.
12278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12279/* end confdefs.h. */
12280#include <sys/types.h>
12281 #include <sys/param.h>
07697489 12282
05ea2a05
TT
12283int
12284main ()
12285{
12286#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12287 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12288 && LITTLE_ENDIAN)
12289 bogus endian macros
12290 #endif
07697489 12291
05ea2a05
TT
12292 ;
12293 return 0;
12294}
07697489 12295_ACEOF
05ea2a05
TT
12296if ac_fn_c_try_compile "$LINENO"; then :
12297 # It does; now see whether it defined to BIG_ENDIAN or not.
12298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12299/* end confdefs.h. */
12300#include <sys/types.h>
12301 #include <sys/param.h>
07697489 12302
05ea2a05
TT
12303int
12304main ()
12305{
12306#if BYTE_ORDER != BIG_ENDIAN
12307 not big endian
12308 #endif
07697489 12309
05ea2a05
TT
12310 ;
12311 return 0;
12312}
07697489 12313_ACEOF
05ea2a05
TT
12314if ac_fn_c_try_compile "$LINENO"; then :
12315 ac_cv_c_bigendian=yes
07697489 12316else
05ea2a05 12317 ac_cv_c_bigendian=no
07697489 12318fi
05ea2a05 12319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12320fi
05ea2a05
TT
12321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12322 fi
12323 if test $ac_cv_c_bigendian = unknown; then
12324 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12326/* end confdefs.h. */
12327#include <limits.h>
07697489 12328
05ea2a05
TT
12329int
12330main ()
12331{
12332#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12333 bogus endian macros
12334 #endif
07697489 12335
05ea2a05
TT
12336 ;
12337 return 0;
12338}
07697489 12339_ACEOF
05ea2a05
TT
12340if ac_fn_c_try_compile "$LINENO"; then :
12341 # It does; now see whether it defined to _BIG_ENDIAN or not.
12342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12343/* end confdefs.h. */
12344#include <limits.h>
07697489 12345
05ea2a05
TT
12346int
12347main ()
12348{
12349#ifndef _BIG_ENDIAN
12350 not big endian
12351 #endif
07697489 12352
05ea2a05
TT
12353 ;
12354 return 0;
12355}
07697489 12356_ACEOF
05ea2a05
TT
12357if ac_fn_c_try_compile "$LINENO"; then :
12358 ac_cv_c_bigendian=yes
07697489 12359else
05ea2a05 12360 ac_cv_c_bigendian=no
07697489 12361fi
05ea2a05 12362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12363fi
05ea2a05
TT
12364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12365 fi
12366 if test $ac_cv_c_bigendian = unknown; then
12367 # Compile a test program.
12368 if test "$cross_compiling" = yes; then :
12369 # Try to guess by grepping values from an object file.
12370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12371/* end confdefs.h. */
12372short int ascii_mm[] =
12373 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12374 short int ascii_ii[] =
12375 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12376 int use_ascii (int i) {
12377 return ascii_mm[i] + ascii_ii[i];
12378 }
12379 short int ebcdic_ii[] =
12380 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12381 short int ebcdic_mm[] =
12382 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12383 int use_ebcdic (int i) {
12384 return ebcdic_mm[i] + ebcdic_ii[i];
12385 }
12386 extern int foo;
07697489 12387
05ea2a05
TT
12388int
12389main ()
12390{
12391return use_ascii (foo) == use_ebcdic (foo);
12392 ;
12393 return 0;
12394}
07697489 12395_ACEOF
05ea2a05
TT
12396if ac_fn_c_try_compile "$LINENO"; then :
12397 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12398 ac_cv_c_bigendian=yes
12399 fi
12400 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12401 if test "$ac_cv_c_bigendian" = unknown; then
12402 ac_cv_c_bigendian=no
12403 else
12404 # finding both strings is unlikely to happen, but who knows?
12405 ac_cv_c_bigendian=unknown
12406 fi
12407 fi
07697489 12408fi
05ea2a05
TT
12409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12410else
12411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12412/* end confdefs.h. */
12413$ac_includes_default
12414int
12415main ()
12416{
07697489 12417
05ea2a05
TT
12418 /* Are we little or big endian? From Harbison&Steele. */
12419 union
12420 {
12421 long int l;
12422 char c[sizeof (long int)];
12423 } u;
12424 u.l = 1;
12425 return u.c[sizeof (long int) - 1] == 1;
12426
12427 ;
12428 return 0;
12429}
07697489 12430_ACEOF
05ea2a05
TT
12431if ac_fn_c_try_run "$LINENO"; then :
12432 ac_cv_c_bigendian=no
07697489 12433else
05ea2a05
TT
12434 ac_cv_c_bigendian=yes
12435fi
12436rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12437 conftest.$ac_objext conftest.beam conftest.$ac_ext
07697489
PA
12438fi
12439
05ea2a05 12440 fi
07697489 12441fi
05ea2a05
TT
12442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12443$as_echo "$ac_cv_c_bigendian" >&6; }
12444 case $ac_cv_c_bigendian in #(
12445 yes)
12446 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12447;; #(
12448 no)
12449 ;; #(
12450 universal)
07697489 12451
05ea2a05 12452$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
07697489 12453
05ea2a05
TT
12454 ;; #(
12455 *)
12456 as_fn_error $? "unknown endianness
12457 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12458 esac
07697489
PA
12459
12460
05ea2a05
TT
12461# ------------------------------ #
12462# Checks for library functions. #
12463# ------------------------------ #
81ecdfbb 12464
05ea2a05 12465for ac_func in getuid getgid \
8ae8e197 12466 pipe pread pread64 pwrite resize_term \
05ea2a05
TT
12467 getpgid setsid \
12468 sigaction sigsetmask socketpair \
12469 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12470 setrlimit getrlimit posix_madvise waitpid \
12471 use_default_colors
12472do :
12473 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12474ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12475if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12476 cat >>confdefs.h <<_ACEOF
12477#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
a9322a30 12478_ACEOF
5ee754fc 12479
05ea2a05
TT
12480fi
12481done
5ee754fc 12482
05ea2a05
TT
12483
12484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12485$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12486if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 12487 $as_echo_n "(cached) " >&6
bec39cab 12488else
81ecdfbb 12489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12490/* end confdefs.h. */
05ea2a05 12491#include <langinfo.h>
a9322a30
TT
12492int
12493main ()
12494{
05ea2a05 12495char* cs = nl_langinfo(CODESET);
a9322a30
TT
12496 ;
12497 return 0;
12498}
bec39cab 12499_ACEOF
81ecdfbb 12500if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 12501 am_cv_langinfo_codeset=yes
bec39cab 12502else
05ea2a05 12503 am_cv_langinfo_codeset=no
81ecdfbb
RW
12504fi
12505rm -f core conftest.err conftest.$ac_objext \
12506 conftest$ac_exeext conftest.$ac_ext
05ea2a05 12507
81ecdfbb 12508fi
05ea2a05
TT
12509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12510$as_echo "$am_cv_langinfo_codeset" >&6; }
12511 if test $am_cv_langinfo_codeset = yes; then
bec39cab 12512
05ea2a05 12513$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
81ecdfbb
RW
12514
12515 fi
12516
05ea2a05
TT
12517ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12518if test "x$ac_cv_type_size_t" = xyes; then :
81ecdfbb 12519
05ea2a05 12520else
81ecdfbb
RW
12521
12522cat >>confdefs.h <<_ACEOF
05ea2a05 12523#define size_t unsigned int
7eb368b3 12524_ACEOF
7eb368b3 12525
7eb368b3 12526fi
7eb368b3 12527
7eb368b3 12528
a9322a30 12529
7eb368b3 12530
05ea2a05
TT
12531 for ac_header in $ac_header_list
12532do :
12533 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12534ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12535"
12536if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12537 cat >>confdefs.h <<_ACEOF
12538#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12539_ACEOF
7eb368b3 12540
05ea2a05 12541fi
7eb368b3 12542
05ea2a05 12543done
a9322a30 12544
05ea2a05
TT
12545
12546
12547
12548
12549
12550
12551ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12552if test "x$ac_cv_type_pid_t" = xyes; then :
12553
12554else
bec39cab 12555
a9322a30 12556cat >>confdefs.h <<_ACEOF
05ea2a05 12557#define pid_t int
a9322a30
TT
12558_ACEOF
12559
05ea2a05
TT
12560fi
12561
12562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12563$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12564if ${ac_cv_path_SED+:} false; then :
12565 $as_echo_n "(cached) " >&6
12566else
12567 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12568 for ac_i in 1 2 3 4 5 6 7; do
12569 ac_script="$ac_script$as_nl$ac_script"
12570 done
12571 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12572 { ac_script=; unset ac_script;}
12573 if test -z "$SED"; then
12574 ac_path_SED_found=false
12575 # Loop through the user's path and test for each of PROGNAME-LIST
12576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12577for as_dir in $PATH
12578do
12579 IFS=$as_save_IFS
12580 test -z "$as_dir" && as_dir=.
12581 for ac_prog in sed gsed; do
12582 for ac_exec_ext in '' $ac_executable_extensions; do
12583 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12584 as_fn_executable_p "$ac_path_SED" || continue
12585# Check for GNU ac_path_SED and select it if it is found.
12586 # Check for GNU $ac_path_SED
12587case `"$ac_path_SED" --version 2>&1` in
12588*GNU*)
12589 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12590*)
12591 ac_count=0
12592 $as_echo_n 0123456789 >"conftest.in"
12593 while :
12594 do
12595 cat "conftest.in" "conftest.in" >"conftest.tmp"
12596 mv "conftest.tmp" "conftest.in"
12597 cp "conftest.in" "conftest.nl"
12598 $as_echo '' >> "conftest.nl"
12599 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12600 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12601 as_fn_arith $ac_count + 1 && ac_count=$as_val
12602 if test $ac_count -gt ${ac_path_SED_max-0}; then
12603 # Best one so far, save it but keep looking for a better one
12604 ac_cv_path_SED="$ac_path_SED"
12605 ac_path_SED_max=$ac_count
12606 fi
12607 # 10*(2^10) chars as input seems more than enough
12608 test $ac_count -gt 10 && break
12609 done
12610 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12611esac
a9322a30 12612
05ea2a05
TT
12613 $ac_path_SED_found && break 3
12614 done
12615 done
12616 done
12617IFS=$as_save_IFS
12618 if test -z "$ac_cv_path_SED"; then
12619 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12620 fi
12621else
12622 ac_cv_path_SED=$SED
a9322a30
TT
12623fi
12624
05ea2a05
TT
12625fi
12626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12627$as_echo "$ac_cv_path_SED" >&6; }
12628 SED="$ac_cv_path_SED"
12629 rm -f conftest.sed
a9322a30 12630
a9322a30 12631
db6878ac
SM
12632 # Set the 'development' global.
12633 . $srcdir/../bfd/development.sh
12634
05ea2a05
TT
12635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12636$as_echo_n "checking for ANSI C header files... " >&6; }
12637if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12638 $as_echo_n "(cached) " >&6
a9322a30 12639else
81ecdfbb 12640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12641/* end confdefs.h. */
05ea2a05
TT
12642#include <stdlib.h>
12643#include <stdarg.h>
12644#include <string.h>
12645#include <float.h>
a9322a30
TT
12646
12647int
12648main ()
12649{
d0ac1c44 12650
a9322a30
TT
12651 ;
12652 return 0;
12653}
bec39cab 12654_ACEOF
81ecdfbb 12655if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 12656 ac_cv_header_stdc=yes
5ee754fc 12657else
05ea2a05 12658 ac_cv_header_stdc=no
5ee754fc 12659fi
81ecdfbb 12660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12661
05ea2a05
TT
12662if test $ac_cv_header_stdc = yes; then
12663 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12665/* end confdefs.h. */
12666#include <string.h>
bec39cab 12667
05ea2a05
TT
12668_ACEOF
12669if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12670 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12671
bec39cab 12672else
05ea2a05
TT
12673 ac_cv_header_stdc=no
12674fi
12675rm -f conftest*
12676
12677fi
12678
12679if test $ac_cv_header_stdc = yes; then
12680 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 12681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12682/* end confdefs.h. */
05ea2a05 12683#include <stdlib.h>
a9322a30 12684
bec39cab 12685_ACEOF
05ea2a05
TT
12686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12687 $EGREP "free" >/dev/null 2>&1; then :
bec39cab 12688
05ea2a05
TT
12689else
12690 ac_cv_header_stdc=no
5ee754fc 12691fi
05ea2a05 12692rm -f conftest*
5ee754fc 12693
05ea2a05 12694fi
bec39cab 12695
05ea2a05
TT
12696if test $ac_cv_header_stdc = yes; then
12697 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12698 if test "$cross_compiling" = yes; then :
12699 :
bec39cab 12700else
05ea2a05 12701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 12702/* end confdefs.h. */
05ea2a05
TT
12703#include <ctype.h>
12704#include <stdlib.h>
12705#if ((' ' & 0x0FF) == 0x020)
12706# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12707# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12708#else
12709# define ISLOWER(c) \
12710 (('a' <= (c) && (c) <= 'i') \
12711 || ('j' <= (c) && (c) <= 'r') \
12712 || ('s' <= (c) && (c) <= 'z'))
12713# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12714#endif
a9322a30 12715
05ea2a05 12716#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12717int
12718main ()
12719{
05ea2a05
TT
12720 int i;
12721 for (i = 0; i < 256; i++)
12722 if (XOR (islower (i), ISLOWER (i))
12723 || toupper (i) != TOUPPER (i))
12724 return 2;
a9322a30
TT
12725 return 0;
12726}
bec39cab 12727_ACEOF
05ea2a05 12728if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12729
5ee754fc 12730else
05ea2a05 12731 ac_cv_header_stdc=no
5ee754fc 12732fi
05ea2a05
TT
12733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12734 conftest.$ac_objext conftest.beam conftest.$ac_ext
81ecdfbb 12735fi
bec39cab 12736
05ea2a05
TT
12737fi
12738fi
12739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12740$as_echo "$ac_cv_header_stdc" >&6; }
12741if test $ac_cv_header_stdc = yes; then
81ecdfbb 12742
05ea2a05
TT
12743$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12744
12745fi
81ecdfbb 12746
05ea2a05
TT
12747 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12748# for constant arguments. Useless!
12749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12750$as_echo_n "checking for working alloca.h... " >&6; }
12751if ${ac_cv_working_alloca_h+:} false; then :
12752 $as_echo_n "(cached) " >&6
12753else
12754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12755/* end confdefs.h. */
12756#include <alloca.h>
7eb368b3
NR
12757int
12758main ()
12759{
05ea2a05
TT
12760char *p = (char *) alloca (2 * sizeof (int));
12761 if (p) return 0;
7eb368b3
NR
12762 ;
12763 return 0;
12764}
12765_ACEOF
05ea2a05
TT
12766if ac_fn_c_try_link "$LINENO"; then :
12767 ac_cv_working_alloca_h=yes
81ecdfbb 12768else
05ea2a05 12769 ac_cv_working_alloca_h=no
a9322a30 12770fi
05ea2a05
TT
12771rm -f core conftest.err conftest.$ac_objext \
12772 conftest$ac_exeext conftest.$ac_ext
a9322a30 12773fi
05ea2a05
TT
12774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12775$as_echo "$ac_cv_working_alloca_h" >&6; }
12776if test $ac_cv_working_alloca_h = yes; then
12777
12778$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7eb368b3 12779
7eb368b3 12780fi
05ea2a05
TT
12781
12782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12783$as_echo_n "checking for alloca... " >&6; }
12784if ${ac_cv_func_alloca_works+:} false; then :
12785 $as_echo_n "(cached) " >&6
bec39cab 12786else
81ecdfbb 12787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12788/* end confdefs.h. */
05ea2a05
TT
12789#ifdef __GNUC__
12790# define alloca __builtin_alloca
12791#else
12792# ifdef _MSC_VER
12793# include <malloc.h>
12794# define alloca _alloca
12795# else
12796# ifdef HAVE_ALLOCA_H
12797# include <alloca.h>
12798# else
12799# ifdef _AIX
12800 #pragma alloca
12801# else
12802# ifndef alloca /* predefined by HP cc +Olibcalls */
12803void *alloca (size_t);
12804# endif
12805# endif
12806# endif
12807# endif
12808#endif
12809
d3ea6809
MM
12810int
12811main ()
12812{
05ea2a05
TT
12813char *p = (char *) alloca (1);
12814 if (p) return 0;
81ecdfbb
RW
12815 ;
12816 return 0;
d3ea6809
MM
12817}
12818_ACEOF
05ea2a05
TT
12819if ac_fn_c_try_link "$LINENO"; then :
12820 ac_cv_func_alloca_works=yes
d3ea6809 12821else
05ea2a05 12822 ac_cv_func_alloca_works=no
a9322a30 12823fi
05ea2a05
TT
12824rm -f core conftest.err conftest.$ac_objext \
12825 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 12826fi
05ea2a05
TT
12827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12828$as_echo "$ac_cv_func_alloca_works" >&6; }
81ecdfbb 12829
05ea2a05 12830if test $ac_cv_func_alloca_works = yes; then
d3ea6809 12831
05ea2a05 12832$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
d3ea6809 12833
05ea2a05
TT
12834else
12835 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12836# that cause trouble. Some versions do not even contain alloca or
12837# contain a buggy version. If you still want to use their alloca,
12838# use ar to extract alloca.o from them instead of compiling alloca.c.
d3ea6809 12839
05ea2a05 12840ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
d0ac1c44 12841
05ea2a05 12842$as_echo "#define C_ALLOCA 1" >>confdefs.h
d0ac1c44
SM
12843
12844
05ea2a05
TT
12845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12846$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12847if ${ac_cv_os_cray+:} false; then :
12848 $as_echo_n "(cached) " >&6
12849else
12850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12851/* end confdefs.h. */
12852#if defined CRAY && ! defined CRAY2
12853webecray
12854#else
12855wenotbecray
12856#endif
12857
12858_ACEOF
12859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12860 $EGREP "webecray" >/dev/null 2>&1; then :
12861 ac_cv_os_cray=yes
12862else
12863 ac_cv_os_cray=no
12864fi
12865rm -f conftest*
12866
12867fi
12868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12869$as_echo "$ac_cv_os_cray" >&6; }
12870if test $ac_cv_os_cray = yes; then
12871 for ac_func in _getb67 GETB67 getb67; do
12872 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12873ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12874if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12875
12876cat >>confdefs.h <<_ACEOF
12877#define CRAY_STACKSEG_END $ac_func
12878_ACEOF
12879
12880 break
12881fi
12882
12883 done
12884fi
12885
12886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12887$as_echo_n "checking stack direction for C alloca... " >&6; }
12888if ${ac_cv_c_stack_direction+:} false; then :
12889 $as_echo_n "(cached) " >&6
12890else
12891 if test "$cross_compiling" = yes; then :
12892 ac_cv_c_stack_direction=0
12893else
12894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12895/* end confdefs.h. */
12896$ac_includes_default
12897int
12898find_stack_direction (int *addr, int depth)
12899{
12900 int dir, dummy = 0;
12901 if (! addr)
12902 addr = &dummy;
12903 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12904 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12905 return dir + dummy;
12906}
12907
12908int
12909main (int argc, char **argv)
12910{
12911 return find_stack_direction (0, argc + !argv + 20) < 0;
12912}
12913_ACEOF
12914if ac_fn_c_try_run "$LINENO"; then :
12915 ac_cv_c_stack_direction=1
12916else
12917 ac_cv_c_stack_direction=-1
12918fi
12919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12920 conftest.$ac_objext conftest.beam conftest.$ac_ext
12921fi
12922
12923fi
12924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12925$as_echo "$ac_cv_c_stack_direction" >&6; }
12926cat >>confdefs.h <<_ACEOF
12927#define STACK_DIRECTION $ac_cv_c_stack_direction
12928_ACEOF
12929
12930
12931fi
12932
12933
12934 WIN32APILIBS=
12935 case ${host} in
12936 *mingw32*)
12937
12938$as_echo "#define USE_WIN32API 1" >>confdefs.h
12939
12940 WIN32APILIBS="-lws2_32"
12941 ;;
12942 esac
12943
12944
12945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12946$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12947if ${am_cv_langinfo_codeset+:} false; then :
12948 $as_echo_n "(cached) " >&6
12949else
12950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12951/* end confdefs.h. */
12952#include <langinfo.h>
12953int
12954main ()
12955{
12956char* cs = nl_langinfo(CODESET);
12957 ;
12958 return 0;
12959}
12960_ACEOF
12961if ac_fn_c_try_link "$LINENO"; then :
12962 am_cv_langinfo_codeset=yes
12963else
12964 am_cv_langinfo_codeset=no
12965fi
12966rm -f core conftest.err conftest.$ac_objext \
12967 conftest$ac_exeext conftest.$ac_ext
12968
12969fi
12970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12971$as_echo "$am_cv_langinfo_codeset" >&6; }
12972 if test $am_cv_langinfo_codeset = yes; then
12973
12974$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12975
12976 fi
12977
12978
c8693053 12979 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h proc_service.h poll.h sys/poll.h sys/select.h
81ecdfbb
RW
12980do :
12981 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
05ea2a05 12982ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12983if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12984 cat >>confdefs.h <<_ACEOF
81ecdfbb 12985#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12986_ACEOF
b757528f 12987
b757528f 12988fi
bec39cab 12989
a9322a30 12990done
a3828db0 12991
d0ac1c44
SM
12992
12993
a9322a30 12994for ac_func in getpagesize
81ecdfbb
RW
12995do :
12996 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12997if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12998 cat >>confdefs.h <<_ACEOF
81ecdfbb 12999#define HAVE_GETPAGESIZE 1
bec39cab 13000_ACEOF
bcb3dc3d 13001
bcb3dc3d
MK
13002fi
13003done
13004
81ecdfbb
RW
13005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
13006$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 13007if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 13008 $as_echo_n "(cached) " >&6
a9322a30 13009else
81ecdfbb 13010 if test "$cross_compiling" = yes; then :
a9322a30 13011 ac_cv_func_mmap_fixed_mapped=no
bec39cab 13012else
81ecdfbb 13013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13014/* end confdefs.h. */
a9322a30
TT
13015$ac_includes_default
13016/* malloc might have been renamed as rpl_malloc. */
13017#undef malloc
bec39cab 13018
a9322a30
TT
13019/* Thanks to Mike Haertel and Jim Avera for this test.
13020 Here is a matrix of mmap possibilities:
13021 mmap private not fixed
13022 mmap private fixed at somewhere currently unmapped
13023 mmap private fixed at somewhere already mapped
13024 mmap shared not fixed
13025 mmap shared fixed at somewhere currently unmapped
13026 mmap shared fixed at somewhere already mapped
13027 For private mappings, we should verify that changes cannot be read()
13028 back from the file, nor mmap's back from the file at a different
13029 address. (There have been systems where private was not correctly
13030 implemented like the infamous i386 svr4.0, and systems where the
13031 VM page cache was not coherent with the file system buffer cache
13032 like early versions of FreeBSD and possibly contemporary NetBSD.)
13033 For shared mappings, we should conversely verify that changes get
13034 propagated back to all the places they're supposed to be.
bec39cab 13035
a9322a30
TT
13036 Grep wants private fixed already mapped.
13037 The main things grep needs to know about mmap are:
13038 * does it exist and is it safe to write into the mmap'd area
13039 * how to use it (BSD variants) */
8b9cf735 13040
a9322a30
TT
13041#include <fcntl.h>
13042#include <sys/mman.h>
8b9cf735 13043
81ecdfbb 13044#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 13045char *malloc ();
a3828db0
MK
13046#endif
13047
a9322a30 13048/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 13049#ifndef HAVE_GETPAGESIZE
a9322a30
TT
13050# ifdef _SC_PAGESIZE
13051# define getpagesize() sysconf(_SC_PAGESIZE)
13052# else /* no _SC_PAGESIZE */
81ecdfbb 13053# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
13054# include <sys/param.h>
13055# ifdef EXEC_PAGESIZE
13056# define getpagesize() EXEC_PAGESIZE
13057# else /* no EXEC_PAGESIZE */
13058# ifdef NBPG
13059# define getpagesize() NBPG * CLSIZE
13060# ifndef CLSIZE
13061# define CLSIZE 1
13062# endif /* no CLSIZE */
13063# else /* no NBPG */
13064# ifdef NBPC
13065# define getpagesize() NBPC
13066# else /* no NBPC */
13067# ifdef PAGESIZE
13068# define getpagesize() PAGESIZE
13069# endif /* PAGESIZE */
13070# endif /* no NBPC */
13071# endif /* no NBPG */
13072# endif /* no EXEC_PAGESIZE */
13073# else /* no HAVE_SYS_PARAM_H */
13074# define getpagesize() 8192 /* punt totally */
13075# endif /* no HAVE_SYS_PARAM_H */
13076# endif /* no _SC_PAGESIZE */
13077
13078#endif /* no HAVE_GETPAGESIZE */
13079
bec39cab
AC
13080int
13081main ()
13082{
a9322a30 13083 char *data, *data2, *data3;
d0ac1c44 13084 const char *cdata2;
a9322a30 13085 int i, pagesize;
d0ac1c44 13086 int fd, fd2;
a9322a30
TT
13087
13088 pagesize = getpagesize ();
13089
13090 /* First, make a file with some known garbage in it. */
13091 data = (char *) malloc (pagesize);
13092 if (!data)
81ecdfbb 13093 return 1;
a9322a30
TT
13094 for (i = 0; i < pagesize; ++i)
13095 *(data + i) = rand ();
13096 umask (0);
13097 fd = creat ("conftest.mmap", 0600);
13098 if (fd < 0)
d0ac1c44 13099 return 2;
a9322a30 13100 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 13101 return 3;
a9322a30
TT
13102 close (fd);
13103
d0ac1c44
SM
13104 /* Next, check that the tail of a page is zero-filled. File must have
13105 non-zero length, otherwise we risk SIGBUS for entire page. */
13106 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13107 if (fd2 < 0)
13108 return 4;
13109 cdata2 = "";
13110 if (write (fd2, cdata2, 1) != 1)
13111 return 5;
13112 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13113 if (data2 == MAP_FAILED)
13114 return 6;
13115 for (i = 0; i < pagesize; ++i)
13116 if (*(data2 + i))
13117 return 7;
13118 close (fd2);
13119 if (munmap (data2, pagesize))
13120 return 8;
13121
a9322a30
TT
13122 /* Next, try to mmap the file at a fixed address which already has
13123 something else allocated at it. If we can, also make sure that
13124 we see the same garbage. */
13125 fd = open ("conftest.mmap", O_RDWR);
13126 if (fd < 0)
d0ac1c44 13127 return 9;
a9322a30
TT
13128 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13129 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 13130 return 10;
a9322a30
TT
13131 for (i = 0; i < pagesize; ++i)
13132 if (*(data + i) != *(data2 + i))
d0ac1c44 13133 return 11;
a9322a30
TT
13134
13135 /* Finally, make sure that changes to the mapped area do not
13136 percolate back to the file as seen by read(). (This is a bug on
13137 some variants of i386 svr4.0.) */
13138 for (i = 0; i < pagesize; ++i)
13139 *(data2 + i) = *(data2 + i) + 1;
13140 data3 = (char *) malloc (pagesize);
13141 if (!data3)
d0ac1c44 13142 return 12;
a9322a30 13143 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 13144 return 13;
a9322a30
TT
13145 for (i = 0; i < pagesize; ++i)
13146 if (*(data + i) != *(data3 + i))
d0ac1c44 13147 return 14;
a9322a30 13148 close (fd);
81ecdfbb 13149 return 0;
bec39cab
AC
13150}
13151_ACEOF
81ecdfbb 13152if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13153 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13154else
81ecdfbb 13155 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13156fi
81ecdfbb
RW
13157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13158 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13159fi
81ecdfbb 13160
a9322a30 13161fi
81ecdfbb
RW
13162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13163$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13164if test $ac_cv_func_mmap_fixed_mapped = yes; then
13165
81ecdfbb 13166$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13167
086ec9eb 13168fi
d0ac1c44 13169rm -f conftest.mmap conftest.txt
a3828db0 13170
05ea2a05 13171 for ac_header in vfork.h
81ecdfbb
RW
13172do :
13173 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 13174if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13175 cat >>confdefs.h <<_ACEOF
81ecdfbb 13176#define HAVE_VFORK_H 1
bec39cab 13177_ACEOF
c906108c
SS
13178
13179fi
a9322a30 13180
a3828db0 13181done
c906108c 13182
a9322a30 13183for ac_func in fork vfork
81ecdfbb
RW
13184do :
13185 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13186ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13187if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13188 cat >>confdefs.h <<_ACEOF
81ecdfbb 13189#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13190_ACEOF
b83266a0 13191
97bf5e38 13192fi
a3828db0 13193done
b83266a0 13194
a9322a30 13195if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13197$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13198if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13199 $as_echo_n "(cached) " >&6
a9322a30 13200else
81ecdfbb 13201 if test "$cross_compiling" = yes; then :
a9322a30
TT
13202 ac_cv_func_fork_works=cross
13203else
81ecdfbb
RW
13204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13205/* end confdefs.h. */
13206$ac_includes_default
13207int
13208main ()
13209{
13210
13211 /* By Ruediger Kuhlmann. */
13212 return fork () < 0;
13213
13214 ;
13215 return 0;
13216}
a9322a30 13217_ACEOF
81ecdfbb 13218if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13219 ac_cv_func_fork_works=yes
13220else
81ecdfbb 13221 ac_cv_func_fork_works=no
a9322a30 13222fi
81ecdfbb
RW
13223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13224 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13225fi
81ecdfbb 13226
a9322a30 13227fi
81ecdfbb
RW
13228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13229$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13230
13231else
13232 ac_cv_func_fork_works=$ac_cv_func_fork
13233fi
13234if test "x$ac_cv_func_fork_works" = xcross; then
13235 case $host in
13236 *-*-amigaos* | *-*-msdosdjgpp*)
13237 # Override, as these systems have only a dummy fork() stub
13238 ac_cv_func_fork_works=no
13239 ;;
13240 *)
13241 ac_cv_func_fork_works=yes
13242 ;;
13243 esac
81ecdfbb
RW
13244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13245$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13246fi
13247ac_cv_func_vfork_works=$ac_cv_func_vfork
13248if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13250$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13251if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13252 $as_echo_n "(cached) " >&6
a9322a30 13253else
81ecdfbb 13254 if test "$cross_compiling" = yes; then :
a9322a30
TT
13255 ac_cv_func_vfork_works=cross
13256else
81ecdfbb 13257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13258/* end confdefs.h. */
13259/* Thanks to Paul Eggert for this test. */
81ecdfbb 13260$ac_includes_default
a9322a30 13261#include <sys/wait.h>
81ecdfbb 13262#ifdef HAVE_VFORK_H
a9322a30
TT
13263# include <vfork.h>
13264#endif
13265/* On some sparc systems, changes by the child to local and incoming
13266 argument registers are propagated back to the parent. The compiler
13267 is told about this with #include <vfork.h>, but some compilers
13268 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13269 static variable whose address is put into a register that is
13270 clobbered by the vfork. */
13271static void
13272#ifdef __cplusplus
13273sparc_address_test (int arg)
13274# else
13275sparc_address_test (arg) int arg;
13276#endif
13277{
13278 static pid_t child;
13279 if (!child) {
13280 child = vfork ();
13281 if (child < 0) {
13282 perror ("vfork");
13283 _exit(2);
13284 }
13285 if (!child) {
13286 arg = getpid();
13287 write(-1, "", 0);
13288 _exit (arg);
13289 }
13290 }
13291}
13292
13293int
13294main ()
13295{
13296 pid_t parent = getpid ();
13297 pid_t child;
13298
13299 sparc_address_test (0);
13300
13301 child = vfork ();
13302
13303 if (child == 0) {
13304 /* Here is another test for sparc vfork register problems. This
13305 test uses lots of local variables, at least as many local
13306 variables as main has allocated so far including compiler
13307 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13308 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13309 reuse the register of parent for one of the local variables,
13310 since it will think that parent can't possibly be used any more
13311 in this routine. Assigning to the local variable will thus
13312 munge parent in the parent process. */
13313 pid_t
13314 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13315 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13316 /* Convince the compiler that p..p7 are live; otherwise, it might
13317 use the same hardware register for all 8 local variables. */
13318 if (p != p1 || p != p2 || p != p3 || p != p4
13319 || p != p5 || p != p6 || p != p7)
13320 _exit(1);
13321
13322 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13323 from child file descriptors. If the child closes a descriptor
13324 before it execs or exits, this munges the parent's descriptor
13325 as well. Test for this by closing stdout in the child. */
13326 _exit(close(fileno(stdout)) != 0);
13327 } else {
13328 int status;
13329 struct stat st;
13330
13331 while (wait(&status) != child)
13332 ;
81ecdfbb 13333 return (
a9322a30
TT
13334 /* Was there some problem with vforking? */
13335 child < 0
13336
13337 /* Did the child fail? (This shouldn't happen.) */
13338 || status
13339
13340 /* Did the vfork/compiler bug occur? */
13341 || parent != getpid()
13342
13343 /* Did the file descriptor bug occur? */
13344 || fstat(fileno(stdout), &st) != 0
13345 );
13346 }
13347}
13348_ACEOF
81ecdfbb 13349if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13350 ac_cv_func_vfork_works=yes
13351else
81ecdfbb 13352 ac_cv_func_vfork_works=no
a9322a30 13353fi
81ecdfbb
RW
13354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13355 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13356fi
81ecdfbb 13357
a9322a30 13358fi
81ecdfbb
RW
13359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13360$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13361
13362fi;
13363if test "x$ac_cv_func_fork_works" = xcross; then
13364 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13365 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13366$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13367fi
13368
13369if test "x$ac_cv_func_vfork_works" = xyes; then
13370
81ecdfbb 13371$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13372
13373else
13374
81ecdfbb 13375$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13376
13377fi
13378if test "x$ac_cv_func_fork_works" = xyes; then
13379
81ecdfbb 13380$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13381
13382fi
13383
8ae8e197 13384 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
05ea2a05
TT
13385 ptrace64 sbrk setns sigaltstack sigprocmask \
13386 setpgid setpgrp getrusage getauxval
81ecdfbb
RW
13387do :
13388 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13389ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13390if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13391 cat >>confdefs.h <<_ACEOF
81ecdfbb 13392#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13393_ACEOF
13394
13395fi
13396done
13397
13398
05ea2a05
TT
13399 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13400"
13401if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13402 ac_have_decl=1
6c7a06a3 13403else
05ea2a05
TT
13404 ac_have_decl=0
13405fi
13406
13407cat >>confdefs.h <<_ACEOF
13408#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13409_ACEOF
13410
13411
13412 if test "$cross_compiling" = yes; then :
81ecdfbb 13413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3 13414/* end confdefs.h. */
05ea2a05 13415#include <sys/personality.h>
6c7a06a3
TT
13416int
13417main ()
13418{
05ea2a05
TT
13419
13420 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13421 # define ADDR_NO_RANDOMIZE 0x0040000
13422 # endif
13423 /* Test the flag could be set and stays set. */
13424 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13425 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13426 return 1
bec39cab
AC
13427 ;
13428 return 0;
13429}
13430_ACEOF
81ecdfbb 13431if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13432 have_personality=true
a4db0f07 13433else
05ea2a05 13434 have_personality=false
a4db0f07 13435fi
81ecdfbb
RW
13436rm -f core conftest.err conftest.$ac_objext \
13437 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13438else
13439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13440/* end confdefs.h. */
13441#include <sys/personality.h>
13442int
13443main ()
13444{
6c7a06a3 13445
05ea2a05
TT
13446 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13447 # define ADDR_NO_RANDOMIZE 0x0040000
13448 # endif
13449 /* Test the flag could be set and stays set. */
13450 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13451 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13452 return 1
13453 ;
13454 return 0;
13455}
13456_ACEOF
13457if ac_fn_c_try_run "$LINENO"; then :
13458 have_personality=true
13459else
13460 have_personality=false
13461fi
13462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13463 conftest.$ac_objext conftest.beam conftest.$ac_ext
a4db0f07 13464fi
6c7a06a3 13465
05ea2a05
TT
13466 if $have_personality
13467 then
a4db0f07 13468
05ea2a05 13469$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
c906108c 13470
05ea2a05 13471 fi
d0ac1c44 13472
05ea2a05
TT
13473 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13474if test "x$ac_cv_have_decl_strstr" = xyes; then :
13475 ac_have_decl=1
d0ac1c44 13476else
05ea2a05
TT
13477 ac_have_decl=0
13478fi
d0ac1c44
SM
13479
13480cat >>confdefs.h <<_ACEOF
05ea2a05
TT
13481#define HAVE_DECL_STRSTR $ac_have_decl
13482_ACEOF
13483
13484
13485 # ----------------------- #
13486 # Checks for structures. #
13487 # ----------------------- #
13488
13489 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13490if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13491
13492cat >>confdefs.h <<_ACEOF
13493#define HAVE_STRUCT_STAT_ST_BLOCKS 1
d0ac1c44
SM
13494_ACEOF
13495
05ea2a05 13496
d0ac1c44 13497fi
05ea2a05
TT
13498ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13499if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
d0ac1c44 13500
05ea2a05
TT
13501cat >>confdefs.h <<_ACEOF
13502#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13503_ACEOF
13504
13505
13506fi
13507
13508
e911c666
JB
13509 # On FreeBSD we need libutil for the kinfo_get* functions. On
13510 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
13511 # Figure out which one to use.
05ea2a05
TT
13512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13513$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13514if ${ac_cv_search_kinfo_getfile+:} false; then :
5e030278
TT
13515 $as_echo_n "(cached) " >&6
13516else
05ea2a05
TT
13517 ac_func_search_save_LIBS=$LIBS
13518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13519/* end confdefs.h. */
3266f10b 13520
05ea2a05
TT
13521/* Override any GCC internal prototype to avoid an error.
13522 Use char because int might match the return type of a GCC
13523 builtin and then its argument prototype would still apply. */
13524#ifdef __cplusplus
13525extern "C"
13526#endif
13527char kinfo_getfile ();
3266f10b
TT
13528int
13529main ()
13530{
05ea2a05 13531return kinfo_getfile ();
3266f10b
TT
13532 ;
13533 return 0;
13534}
13535_ACEOF
05ea2a05
TT
13536for ac_lib in '' util util-freebsd; do
13537 if test -z "$ac_lib"; then
13538 ac_res="none required"
13539 else
13540 ac_res=-l$ac_lib
13541 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13542 fi
13543 if ac_fn_c_try_link "$LINENO"; then :
13544 ac_cv_search_kinfo_getfile=$ac_res
3266f10b 13545fi
05ea2a05
TT
13546rm -f core conftest.err conftest.$ac_objext \
13547 conftest$ac_exeext
13548 if ${ac_cv_search_kinfo_getfile+:} false; then :
13549 break
13550fi
13551done
13552if ${ac_cv_search_kinfo_getfile+:} false; then :
3266f10b
TT
13553
13554else
05ea2a05 13555 ac_cv_search_kinfo_getfile=no
3266f10b 13556fi
05ea2a05
TT
13557rm conftest.$ac_ext
13558LIBS=$ac_func_search_save_LIBS
13559fi
13560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13561$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13562ac_res=$ac_cv_search_kinfo_getfile
13563if test "$ac_res" != no; then :
13564 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13565
e911c666
JB
13566fi
13567
13568
13569 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
13570 for ac_func in kinfo_getfile
13571do :
13572 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
13573if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
13574 cat >>confdefs.h <<_ACEOF
13575#define HAVE_KINFO_GETFILE 1
13576_ACEOF
3266f10b
TT
13577
13578fi
e911c666 13579done
3266f10b 13580
3266f10b 13581
05ea2a05
TT
13582 # Check for std::thread. This does not work on some platforms, like
13583 # mingw and DJGPP.
13584 ac_ext=cpp
13585ac_cpp='$CXXCPP $CPPFLAGS'
13586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3266f10b 13589
3266f10b 13590
3266f10b 13591
3266f10b 13592
3266f10b 13593
05ea2a05
TT
13594ac_ext=c
13595ac_cpp='$CPP $CPPFLAGS'
13596ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13597ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13598ac_compiler_gnu=$ac_cv_c_compiler_gnu
3266f10b 13599
05ea2a05 13600ax_pthread_ok=no
3266f10b 13601
05ea2a05
TT
13602# We used to check for pthread.h first, but this fails if pthread.h
13603# requires special compiler flags (e.g. on Tru64 or Sequent).
13604# It gets checked for in the link test anyway.
3266f10b 13605
05ea2a05
TT
13606# First of all, check if the user has set any of the PTHREAD_LIBS,
13607# etcetera environment variables, and if threads linking works using
13608# them:
13609if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13610 ax_pthread_save_CC="$CC"
13611 ax_pthread_save_CFLAGS="$CFLAGS"
13612 ax_pthread_save_LIBS="$LIBS"
13613 if test "x$PTHREAD_CC" != "x"; then :
13614 CC="$PTHREAD_CC"
3266f10b 13615fi
05ea2a05
TT
13616 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13617 LIBS="$PTHREAD_LIBS $LIBS"
13618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13619$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13621/* end confdefs.h. */
05ea2a05
TT
13622
13623/* Override any GCC internal prototype to avoid an error.
13624 Use char because int might match the return type of a GCC
13625 builtin and then its argument prototype would still apply. */
13626#ifdef __cplusplus
13627extern "C"
13628#endif
13629char pthread_join ();
3266f10b
TT
13630int
13631main ()
13632{
05ea2a05 13633return pthread_join ();
3266f10b
TT
13634 ;
13635 return 0;
13636}
13637_ACEOF
13638if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13639 ax_pthread_ok=yes
3266f10b
TT
13640fi
13641rm -f core conftest.err conftest.$ac_objext \
13642 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13644$as_echo "$ax_pthread_ok" >&6; }
13645 if test "x$ax_pthread_ok" = "xno"; then
13646 PTHREAD_LIBS=""
13647 PTHREAD_CFLAGS=""
13648 fi
13649 CC="$ax_pthread_save_CC"
13650 CFLAGS="$ax_pthread_save_CFLAGS"
13651 LIBS="$ax_pthread_save_LIBS"
3266f10b 13652fi
3266f10b 13653
05ea2a05
TT
13654# We must check for the threads library under a number of different
13655# names; the ordering is very important because some systems
13656# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13657# libraries is broken (non-POSIX).
3266f10b 13658
05ea2a05
TT
13659# Create a list of thread flags to try. Items starting with a "-" are
13660# C compiler flags, and other items are library names, except for "none"
13661# which indicates that we try without any flags at all, and "pthread-config"
13662# which is a program returning the flags for the Pth emulation library.
3266f10b 13663
05ea2a05 13664ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3266f10b 13665
05ea2a05
TT
13666# The ordering *is* (sometimes) important. Some notes on the
13667# individual items follow:
3266f10b 13668
05ea2a05
TT
13669# pthreads: AIX (must check this before -lpthread)
13670# none: in case threads are in libc; should be tried before -Kthread and
13671# other compiler flags to prevent continual compiler warnings
13672# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13673# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13674# (Note: HP C rejects this with "bad form for `-t' option")
13675# -pthreads: Solaris/gcc (Note: HP C also rejects)
13676# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13677# doesn't hurt to check since this sometimes defines pthreads and
13678# -D_REENTRANT too), HP C (must be checked before -lpthread, which
13679# is present but should not be used directly; and before -mthreads,
13680# because the compiler interprets this as "-mt" + "-hreads")
13681# -mthreads: Mingw32/gcc, Lynx/gcc
13682# pthread: Linux, etcetera
13683# --thread-safe: KAI C++
13684# pthread-config: use pthread-config program (for GNU Pth library)
3266f10b 13685
05ea2a05 13686case $host_os in
3266f10b 13687
05ea2a05 13688 freebsd*)
3266f10b 13689
05ea2a05
TT
13690 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13691 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3266f10b 13692
05ea2a05
TT
13693 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13694 ;;
3266f10b 13695
05ea2a05 13696 hpux*)
3266f10b 13697
05ea2a05
TT
13698 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13699 # multi-threading and also sets -lpthread."
13700
13701 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13702 ;;
13703
13704 openedition*)
13705
13706 # IBM z/OS requires a feature-test macro to be defined in order to
13707 # enable POSIX threads at all, so give the user a hint if this is
13708 # not set. (We don't define these ourselves, as they can affect
13709 # other portions of the system API in unpredictable ways.)
13710
13711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13712/* end confdefs.h. */
05ea2a05
TT
13713
13714# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13715 AX_PTHREAD_ZOS_MISSING
13716# endif
3266f10b
TT
13717
13718_ACEOF
13719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
05ea2a05
TT
13720 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13722$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
3266f10b
TT
13723fi
13724rm -f conftest*
13725
05ea2a05 13726 ;;
3266f10b 13727
05ea2a05 13728 solaris*)
3266f10b 13729
05ea2a05
TT
13730 # On Solaris (at least, for some versions), libc contains stubbed
13731 # (non-functional) versions of the pthreads routines, so link-based
13732 # tests will erroneously succeed. (N.B.: The stubs are missing
13733 # pthread_cleanup_push, or rather a function called by this macro,
13734 # so we could check for that, but who knows whether they'll stub
13735 # that too in a future libc.) So we'll check first for the
13736 # standard Solaris way of linking pthreads (-mt -lpthread).
13737
13738 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13739 ;;
13740esac
13741
13742# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13743
13744if test "x$GCC" = "xyes"; then :
13745 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
3266f10b
TT
13746fi
13747
05ea2a05
TT
13748# The presence of a feature test macro requesting re-entrant function
13749# definitions is, on some systems, a strong hint that pthreads support is
13750# correctly enabled
13751
13752case $host_os in
13753 darwin* | hpux* | linux* | osf* | solaris*)
13754 ax_pthread_check_macro="_REENTRANT"
13755 ;;
13756
13757 aix*)
13758 ax_pthread_check_macro="_THREAD_SAFE"
13759 ;;
13760
13761 *)
13762 ax_pthread_check_macro="--"
13763 ;;
13764esac
13765if test "x$ax_pthread_check_macro" = "x--"; then :
13766 ax_pthread_check_cond=0
13767else
13768 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
3266f10b
TT
13769fi
13770
05ea2a05
TT
13771# Are we compiling with Clang?
13772
13773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13774$as_echo_n "checking whether $CC is Clang... " >&6; }
13775if ${ax_cv_PTHREAD_CLANG+:} false; then :
3266f10b
TT
13776 $as_echo_n "(cached) " >&6
13777else
05ea2a05
TT
13778 ax_cv_PTHREAD_CLANG=no
13779 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13780 if test "x$GCC" = "xyes"; then
13781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13782/* end confdefs.h. */
05ea2a05
TT
13783/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13784# if defined(__clang__) && defined(__llvm__)
13785 AX_PTHREAD_CC_IS_CLANG
13786# endif
3266f10b 13787
3266f10b 13788_ACEOF
05ea2a05
TT
13789if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13790 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13791 ax_cv_PTHREAD_CLANG=yes
3266f10b 13792fi
05ea2a05
TT
13793rm -f conftest*
13794
13795 fi
3266f10b
TT
13796
13797fi
05ea2a05
TT
13798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13799$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13800ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
3266f10b 13801
05ea2a05 13802ax_pthread_clang_warning=no
3266f10b 13803
05ea2a05
TT
13804# Clang needs special handling, because older versions handle the -pthread
13805# option in a rather... idiosyncratic way
3266f10b 13806
05ea2a05 13807if test "x$ax_pthread_clang" = "xyes"; then
3266f10b 13808
05ea2a05 13809 # Clang takes -pthread; it has never supported any other flag
b2ceabe8 13810
05ea2a05
TT
13811 # (Note 1: This will need to be revisited if a system that Clang
13812 # supports has POSIX threads in a separate library. This tends not
13813 # to be the way of modern systems, but it's conceivable.)
b2ceabe8 13814
05ea2a05
TT
13815 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13816 # to get POSIX threads support; the API is always present and
13817 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13818 # -pthread does define _REENTRANT, and while the Darwin headers
13819 # ignore this macro, third-party headers might not.)
b2ceabe8 13820
05ea2a05
TT
13821 PTHREAD_CFLAGS="-pthread"
13822 PTHREAD_LIBS=
3266f10b 13823
05ea2a05
TT
13824 ax_pthread_ok=yes
13825
13826 # However, older versions of Clang make a point of warning the user
13827 # that, in an invocation where only linking and no compilation is
13828 # taking place, the -pthread option has no effect ("argument unused
13829 # during compilation"). They expect -pthread to be passed in only
13830 # when source code is being compiled.
13831 #
13832 # Problem is, this is at odds with the way Automake and most other
13833 # C build frameworks function, which is that the same flags used in
13834 # compilation (CFLAGS) are also used in linking. Many systems
13835 # supported by AX_PTHREAD require exactly this for POSIX threads
13836 # support, and in fact it is often not straightforward to specify a
13837 # flag that is used only in the compilation phase and not in
13838 # linking. Such a scenario is extremely rare in practice.
13839 #
13840 # Even though use of the -pthread flag in linking would only print
13841 # a warning, this can be a nuisance for well-run software projects
13842 # that build with -Werror. So if the active version of Clang has
13843 # this misfeature, we search for an option to squash it.
13844
13845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13846$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13847if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13848 $as_echo_n "(cached) " >&6
13849else
13850 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13851 # Create an alternate version of $ac_link that compiles and
13852 # links in two steps (.c -> .o, .o -> exe) instead of one
13853 # (.c -> exe), because the warning occurs only in the second
13854 # step
13855 ax_pthread_save_ac_link="$ac_link"
13856 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13857 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13858 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13859 ax_pthread_save_CFLAGS="$CFLAGS"
13860 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13861 if test "x$ax_pthread_try" = "xunknown"; then :
13862 break
13863fi
13864 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13865 ac_link="$ax_pthread_save_ac_link"
13866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13867/* end confdefs.h. */
13868int main(void){return 0;}
3266f10b
TT
13869_ACEOF
13870if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
13871 ac_link="$ax_pthread_2step_ac_link"
13872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13873/* end confdefs.h. */
13874int main(void){return 0;}
13875_ACEOF
13876if ac_fn_c_try_link "$LINENO"; then :
13877 break
3266f10b
TT
13878fi
13879rm -f core conftest.err conftest.$ac_objext \
13880 conftest$ac_exeext conftest.$ac_ext
13881
13882fi
05ea2a05
TT
13883rm -f core conftest.err conftest.$ac_objext \
13884 conftest$ac_exeext conftest.$ac_ext
13885 done
13886 ac_link="$ax_pthread_save_ac_link"
13887 CFLAGS="$ax_pthread_save_CFLAGS"
13888 if test "x$ax_pthread_try" = "x"; then :
13889 ax_pthread_try=no
13890fi
13891 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
3266f10b 13892
05ea2a05
TT
13893fi
13894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13895$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
3266f10b 13896
05ea2a05
TT
13897 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13898 no | unknown) ;;
13899 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13900 esac
3266f10b 13901
05ea2a05 13902fi # $ax_pthread_clang = yes
3266f10b 13903
05ea2a05
TT
13904if test "x$ax_pthread_ok" = "xno"; then
13905for ax_pthread_try_flag in $ax_pthread_flags; do
3266f10b 13906
05ea2a05
TT
13907 case $ax_pthread_try_flag in
13908 none)
13909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13910$as_echo_n "checking whether pthreads work without any flags... " >&6; }
13911 ;;
3266f10b 13912
05ea2a05
TT
13913 -mt,pthread)
13914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13915$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13916 PTHREAD_CFLAGS="-mt"
13917 PTHREAD_LIBS="-lpthread"
13918 ;;
3266f10b 13919
05ea2a05
TT
13920 -*)
13921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13922$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13923 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13924 ;;
3266f10b 13925
05ea2a05
TT
13926 pthread-config)
13927 # Extract the first word of "pthread-config", so it can be a program name with args.
13928set dummy pthread-config; ac_word=$2
13929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13930$as_echo_n "checking for $ac_word... " >&6; }
13931if ${ac_cv_prog_ax_pthread_config+:} false; then :
13932 $as_echo_n "(cached) " >&6
13933else
13934 if test -n "$ax_pthread_config"; then
13935 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13936else
13937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13938for as_dir in $PATH
13939do
13940 IFS=$as_save_IFS
13941 test -z "$as_dir" && as_dir=.
13942 for ac_exec_ext in '' $ac_executable_extensions; do
13943 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13944 ac_cv_prog_ax_pthread_config="yes"
13945 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13946 break 2
13947 fi
3266f10b 13948done
05ea2a05
TT
13949 done
13950IFS=$as_save_IFS
3266f10b 13951
05ea2a05
TT
13952 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13953fi
13954fi
13955ax_pthread_config=$ac_cv_prog_ax_pthread_config
13956if test -n "$ax_pthread_config"; then
13957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13958$as_echo "$ax_pthread_config" >&6; }
3266f10b 13959else
05ea2a05
TT
13960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13961$as_echo "no" >&6; }
3266f10b
TT
13962fi
13963
5e030278 13964
05ea2a05
TT
13965 if test "x$ax_pthread_config" = "xno"; then :
13966 continue
13967fi
13968 PTHREAD_CFLAGS="`pthread-config --cflags`"
13969 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13970 ;;
5e030278 13971
05ea2a05
TT
13972 *)
13973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13974$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13975 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13976 ;;
13977 esac
5e030278 13978
5e030278
TT
13979 ax_pthread_save_CFLAGS="$CFLAGS"
13980 ax_pthread_save_LIBS="$LIBS"
5e030278
TT
13981 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13982 LIBS="$PTHREAD_LIBS $LIBS"
05ea2a05
TT
13983
13984 # Check for various functions. We must include pthread.h,
13985 # since some functions may be macros. (On the Sequent, we
13986 # need a special flag -Kthread to make this header compile.)
13987 # We check for pthread_join because it is in -lpthread on IRIX
13988 # while pthread_create is in libc. We check for pthread_attr_init
13989 # due to DEC craziness with -lpthreads. We check for
13990 # pthread_cleanup_push because it is one of the few pthread
13991 # functions on Solaris that doesn't have a non-functional libc stub.
13992 # We try pthread_create on general principles.
13993
5e030278
TT
13994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13995/* end confdefs.h. */
05ea2a05
TT
13996#include <pthread.h>
13997# if $ax_pthread_check_cond
13998# error "$ax_pthread_check_macro must be defined"
13999# endif
14000 static void routine(void *a) { a = 0; }
14001 static void *start_routine(void *a) { return a; }
5e030278
TT
14002int
14003main ()
14004{
05ea2a05
TT
14005pthread_t th; pthread_attr_t attr;
14006 pthread_create(&th, 0, start_routine, 0);
14007 pthread_join(th, 0);
14008 pthread_attr_init(&attr);
14009 pthread_cleanup_push(routine, 0);
14010 pthread_cleanup_pop(0) /* ; */
5e030278
TT
14011 ;
14012 return 0;
14013}
14014_ACEOF
14015if ac_fn_c_try_link "$LINENO"; then :
14016 ax_pthread_ok=yes
14017fi
14018rm -f core conftest.err conftest.$ac_objext \
14019 conftest$ac_exeext conftest.$ac_ext
05ea2a05 14020
5e030278
TT
14021 CFLAGS="$ax_pthread_save_CFLAGS"
14022 LIBS="$ax_pthread_save_LIBS"
05ea2a05
TT
14023
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14025$as_echo "$ax_pthread_ok" >&6; }
14026 if test "x$ax_pthread_ok" = "xyes"; then :
14027 break
5e030278
TT
14028fi
14029
05ea2a05
TT
14030 PTHREAD_LIBS=""
14031 PTHREAD_CFLAGS=""
14032done
14033fi
5e030278 14034
05ea2a05
TT
14035# Various other checks:
14036if test "x$ax_pthread_ok" = "xyes"; then
14037 ax_pthread_save_CFLAGS="$CFLAGS"
14038 ax_pthread_save_LIBS="$LIBS"
14039 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14040 LIBS="$PTHREAD_LIBS $LIBS"
5e030278 14041
05ea2a05
TT
14042 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14044$as_echo_n "checking for joinable pthread attribute... " >&6; }
14045if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14046 $as_echo_n "(cached) " >&6
14047else
14048 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14049 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14051/* end confdefs.h. */
14052#include <pthread.h>
14053int
14054main ()
14055{
14056int attr = $ax_pthread_attr; return attr /* ; */
14057 ;
14058 return 0;
14059}
14060_ACEOF
14061if ac_fn_c_try_link "$LINENO"; then :
14062 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14063fi
14064rm -f core conftest.err conftest.$ac_objext \
14065 conftest$ac_exeext conftest.$ac_ext
14066 done
5e030278 14067
05ea2a05
TT
14068fi
14069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14070$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14071 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14072 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14073 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
5e030278 14074
05ea2a05
TT
14075cat >>confdefs.h <<_ACEOF
14076#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14077_ACEOF
5e030278 14078
05ea2a05 14079 ax_pthread_joinable_attr_defined=yes
5e030278 14080
05ea2a05 14081fi
5e030278 14082
05ea2a05
TT
14083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14084$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14085if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14086 $as_echo_n "(cached) " >&6
14087else
14088 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14089 case $host_os in
14090 solaris*)
14091 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14092 ;;
14093 esac
5e030278 14094
05ea2a05
TT
14095fi
14096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14097$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14098 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14099 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14100 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14101 ax_pthread_special_flags_added=yes
14102fi
5e030278 14103
05ea2a05
TT
14104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14105$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14106if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14107 $as_echo_n "(cached) " >&6
14108else
14109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14110/* end confdefs.h. */
14111#include <pthread.h>
14112int
14113main ()
14114{
14115int i = PTHREAD_PRIO_INHERIT;
14116 ;
14117 return 0;
14118}
14119_ACEOF
14120if ac_fn_c_try_link "$LINENO"; then :
14121 ax_cv_PTHREAD_PRIO_INHERIT=yes
14122else
14123 ax_cv_PTHREAD_PRIO_INHERIT=no
14124fi
14125rm -f core conftest.err conftest.$ac_objext \
14126 conftest$ac_exeext conftest.$ac_ext
5e030278 14127
05ea2a05
TT
14128fi
14129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14130$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14131 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14132 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
5e030278 14133
05ea2a05 14134$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
5e030278 14135
05ea2a05 14136 ax_pthread_prio_inherit_defined=yes
5e030278 14137
05ea2a05 14138fi
5e030278 14139
05ea2a05
TT
14140 CFLAGS="$ax_pthread_save_CFLAGS"
14141 LIBS="$ax_pthread_save_LIBS"
5e030278 14142
05ea2a05
TT
14143 # More AIX lossage: compile with *_r variant
14144 if test "x$GCC" != "xyes"; then
14145 case $host_os in
14146 aix*)
14147 case "x/$CC" in #(
14148 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14149 #handle absolute path differently from PATH based program lookup
14150 case "x$CC" in #(
14151 x/*) :
14152 if as_fn_executable_p ${CC}_r; then :
14153 PTHREAD_CC="${CC}_r"
14154fi ;; #(
14155 *) :
14156 for ac_prog in ${CC}_r
14157do
14158 # Extract the first word of "$ac_prog", so it can be a program name with args.
14159set dummy $ac_prog; ac_word=$2
14160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14161$as_echo_n "checking for $ac_word... " >&6; }
14162if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14163 $as_echo_n "(cached) " >&6
14164else
14165 if test -n "$PTHREAD_CC"; then
14166 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14167else
14168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14169for as_dir in $PATH
14170do
14171 IFS=$as_save_IFS
14172 test -z "$as_dir" && as_dir=.
14173 for ac_exec_ext in '' $ac_executable_extensions; do
14174 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14175 ac_cv_prog_PTHREAD_CC="$ac_prog"
14176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14177 break 2
14178 fi
14179done
14180 done
14181IFS=$as_save_IFS
5e030278 14182
5e030278 14183fi
05ea2a05
TT
14184fi
14185PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14186if test -n "$PTHREAD_CC"; then
14187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14188$as_echo "$PTHREAD_CC" >&6; }
14189else
14190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14191$as_echo "no" >&6; }
14192fi
5e030278 14193
5e030278 14194
05ea2a05
TT
14195 test -n "$PTHREAD_CC" && break
14196done
14197test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14198 ;;
14199esac ;; #(
14200 *) :
14201 ;;
5e030278 14202esac
05ea2a05
TT
14203 ;;
14204 esac
14205 fi
14206fi
5e030278 14207
05ea2a05 14208test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
5e030278 14209
5e030278 14210
5e030278 14211
5e030278 14212
5e030278 14213
05ea2a05
TT
14214# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14215if test "x$ax_pthread_ok" = "xyes"; then
14216 threads=yes
14217 :
5e030278 14218else
05ea2a05
TT
14219 ax_pthread_ok=no
14220 threads=no
5e030278 14221fi
05ea2a05
TT
14222ac_ext=cpp
14223ac_cpp='$CXXCPP $CPPFLAGS'
14224ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14225ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14226ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5e030278 14227
5e030278 14228
05ea2a05
TT
14229 if test "$threads" = "yes"; then
14230 save_LIBS="$LIBS"
14231 LIBS="$PTHREAD_LIBS $LIBS"
14232 save_CXXFLAGS="$CXXFLAGS"
14233 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14235$as_echo_n "checking for std::thread... " >&6; }
14236if ${gdb_cv_cxx_std_thread+:} false; then :
14237 $as_echo_n "(cached) " >&6
14238else
14239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14240/* end confdefs.h. */
05ea2a05
TT
14241#include <thread>
14242 void callback() { }
14243int
14244main ()
14245{
14246std::thread t(callback);
14247 ;
14248 return 0;
14249}
5e030278 14250_ACEOF
05ea2a05
TT
14251if ac_fn_cxx_try_compile "$LINENO"; then :
14252 gdb_cv_cxx_std_thread=yes
14253else
14254 gdb_cv_cxx_std_thread=no
5e030278 14255fi
05ea2a05
TT
14256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14257fi
14258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14259$as_echo "$gdb_cv_cxx_std_thread" >&6; }
5e030278 14260
05ea2a05
TT
14261 # This check must be here, while LIBS includes any necessary
14262 # threading library.
14263 for ac_func in pthread_sigmask pthread_setname_np
14264do :
14265 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14266ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14267if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14268 cat >>confdefs.h <<_ACEOF
14269#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14270_ACEOF
5e030278
TT
14271
14272fi
05ea2a05 14273done
5e030278 14274
5e030278 14275
05ea2a05
TT
14276 LIBS="$save_LIBS"
14277 CXXFLAGS="$save_CXXFLAGS"
14278 fi
14279 if test "$gdb_cv_cxx_std_thread" = "yes"; then
5e030278 14280
05ea2a05 14281$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
5e030278 14282
05ea2a05
TT
14283 fi
14284 ac_ext=c
14285ac_cpp='$CPP $CPPFLAGS'
14286ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14287ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14288ac_compiler_gnu=$ac_cv_c_compiler_gnu
5e030278 14289
5e030278 14290
05ea2a05
TT
14291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14292$as_echo_n "checking for sigsetjmp... " >&6; }
14293if ${gdb_cv_func_sigsetjmp+:} false; then :
14294 $as_echo_n "(cached) " >&6
14295else
14296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14297/* end confdefs.h. */
5e030278 14298
05ea2a05 14299 #include <setjmp.h>
5e030278 14300
05ea2a05
TT
14301int
14302main ()
14303{
14304sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
14305 ;
14306 return 0;
14307}
14308_ACEOF
14309if ac_fn_c_try_compile "$LINENO"; then :
14310 gdb_cv_func_sigsetjmp=yes
14311else
14312 gdb_cv_func_sigsetjmp=no
14313fi
14314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14315fi
14316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14317$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14318 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
5e030278 14319
05ea2a05 14320$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
5e030278 14321
05ea2a05
TT
14322 fi
14323
14324
14325# Check whether --with-intel_pt was given.
14326if test "${with_intel_pt+set}" = set; then :
14327 withval=$with_intel_pt;
5e030278 14328else
05ea2a05 14329 with_intel_pt=auto
5e030278 14330fi
05ea2a05
TT
14331
14332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14333$as_echo_n "checking whether to use intel pt... " >&6; }
14334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14335$as_echo "$with_intel_pt" >&6; }
14336
14337 if test "${with_intel_pt}" = no; then
14338 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14339$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14340 HAVE_LIBIPT=no
14341 else
14342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14343/* end confdefs.h. */
5e030278 14344
05ea2a05
TT
14345 #include <linux/perf_event.h>
14346 #ifndef PERF_ATTR_SIZE_VER5
14347 # error
14348 #endif
5e030278 14349
05ea2a05
TT
14350_ACEOF
14351if ac_fn_c_try_cpp "$LINENO"; then :
14352 perf_event=yes
14353else
14354 perf_event=no
5e030278 14355fi
05ea2a05
TT
14356rm -f conftest.err conftest.i conftest.$ac_ext
14357 if test "$perf_event" != yes; then
14358 if test "$with_intel_pt" = yes; then
14359 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14360 else
14361 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14362$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14363 fi
14364 fi
5e030278 14365
5e030278 14366
5e030278 14367
5e030278 14368
5e030278 14369
5e030278 14370
5e030278 14371
5e030278 14372
5e030278 14373
05ea2a05 14374 use_additional=yes
5e030278 14375
05ea2a05
TT
14376 acl_save_prefix="$prefix"
14377 prefix="$acl_final_prefix"
14378 acl_save_exec_prefix="$exec_prefix"
14379 exec_prefix="$acl_final_exec_prefix"
5e030278 14380
05ea2a05
TT
14381 eval additional_includedir=\"$includedir\"
14382 eval additional_libdir=\"$libdir\"
5e030278 14383
05ea2a05
TT
14384 exec_prefix="$acl_save_exec_prefix"
14385 prefix="$acl_save_prefix"
5e030278 14386
5e030278 14387
05ea2a05
TT
14388# Check whether --with-libipt-prefix was given.
14389if test "${with_libipt_prefix+set}" = set; then :
14390 withval=$with_libipt_prefix;
14391 if test "X$withval" = "Xno"; then
14392 use_additional=no
14393 else
14394 if test "X$withval" = "X"; then
5e030278 14395
05ea2a05
TT
14396 acl_save_prefix="$prefix"
14397 prefix="$acl_final_prefix"
14398 acl_save_exec_prefix="$exec_prefix"
14399 exec_prefix="$acl_final_exec_prefix"
5e030278 14400
05ea2a05
TT
14401 eval additional_includedir=\"$includedir\"
14402 eval additional_libdir=\"$libdir\"
5e030278 14403
05ea2a05
TT
14404 exec_prefix="$acl_save_exec_prefix"
14405 prefix="$acl_save_prefix"
5e030278 14406
05ea2a05
TT
14407 else
14408 additional_includedir="$withval/include"
14409 additional_libdir="$withval/lib"
14410 fi
14411 fi
5e030278
TT
14412
14413fi
5e030278 14414
9f1528a1
AB
14415
14416# Check whether --with-libipt-type was given.
14417if test "${with_libipt_type+set}" = set; then :
14418 withval=$with_libipt_type; with_libipt_type=$withval
14419else
14420 with_libipt_type=auto
14421fi
14422
14423 lib_type=`eval echo \$with_libipt_type`
14424
05ea2a05
TT
14425 LIBIPT=
14426 LTLIBIPT=
14427 INCIPT=
14428 rpathdirs=
14429 ltrpathdirs=
14430 names_already_handled=
14431 names_next_round='ipt '
14432 while test -n "$names_next_round"; do
14433 names_this_round="$names_next_round"
14434 names_next_round=
14435 for name in $names_this_round; do
14436 already_handled=
14437 for n in $names_already_handled; do
14438 if test "$n" = "$name"; then
14439 already_handled=yes
14440 break
14441 fi
14442 done
14443 if test -z "$already_handled"; then
14444 names_already_handled="$names_already_handled $name"
14445 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14446 eval value=\"\$HAVE_LIB$uppername\"
14447 if test -n "$value"; then
14448 if test "$value" = yes; then
14449 eval value=\"\$LIB$uppername\"
14450 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14451 eval value=\"\$LTLIB$uppername\"
14452 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14453 else
14454 :
14455 fi
14456 else
14457 found_dir=
14458 found_la=
14459 found_so=
14460 found_a=
14461 if test $use_additional = yes; then
9f1528a1 14462 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14463 found_dir="$additional_libdir"
14464 found_so="$additional_libdir/lib$name.$shlibext"
14465 if test -f "$additional_libdir/lib$name.la"; then
14466 found_la="$additional_libdir/lib$name.la"
14467 fi
9f1528a1 14468 elif test x$lib_type != xshared; then
05ea2a05
TT
14469 if test -f "$additional_libdir/lib$name.$libext"; then
14470 found_dir="$additional_libdir"
14471 found_a="$additional_libdir/lib$name.$libext"
14472 if test -f "$additional_libdir/lib$name.la"; then
14473 found_la="$additional_libdir/lib$name.la"
14474 fi
14475 fi
14476 fi
14477 fi
14478 if test "X$found_dir" = "X"; then
14479 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14480
05ea2a05
TT
14481 acl_save_prefix="$prefix"
14482 prefix="$acl_final_prefix"
14483 acl_save_exec_prefix="$exec_prefix"
14484 exec_prefix="$acl_final_exec_prefix"
14485 eval x=\"$x\"
14486 exec_prefix="$acl_save_exec_prefix"
14487 prefix="$acl_save_prefix"
5e030278 14488
05ea2a05
TT
14489 case "$x" in
14490 -L*)
14491 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 14492 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14493 found_dir="$dir"
14494 found_so="$dir/lib$name.$shlibext"
14495 if test -f "$dir/lib$name.la"; then
14496 found_la="$dir/lib$name.la"
14497 fi
9f1528a1 14498 elif test x$lib_type != xshared; then
05ea2a05
TT
14499 if test -f "$dir/lib$name.$libext"; then
14500 found_dir="$dir"
14501 found_a="$dir/lib$name.$libext"
14502 if test -f "$dir/lib$name.la"; then
14503 found_la="$dir/lib$name.la"
14504 fi
14505 fi
14506 fi
14507 ;;
14508 esac
14509 if test "X$found_dir" != "X"; then
14510 break
14511 fi
14512 done
14513 fi
14514 if test "X$found_dir" != "X"; then
14515 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14516 if test "X$found_so" != "X"; then
14517 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14518 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14519 else
14520 haveit=
14521 for x in $ltrpathdirs; do
14522 if test "X$x" = "X$found_dir"; then
14523 haveit=yes
14524 break
14525 fi
14526 done
14527 if test -z "$haveit"; then
14528 ltrpathdirs="$ltrpathdirs $found_dir"
14529 fi
14530 if test "$hardcode_direct" = yes; then
14531 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14532 else
14533 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14534 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14535 haveit=
14536 for x in $rpathdirs; do
14537 if test "X$x" = "X$found_dir"; then
14538 haveit=yes
14539 break
14540 fi
14541 done
14542 if test -z "$haveit"; then
14543 rpathdirs="$rpathdirs $found_dir"
14544 fi
14545 else
14546 haveit=
14547 for x in $LDFLAGS $LIBIPT; do
5e030278 14548
05ea2a05
TT
14549 acl_save_prefix="$prefix"
14550 prefix="$acl_final_prefix"
14551 acl_save_exec_prefix="$exec_prefix"
14552 exec_prefix="$acl_final_exec_prefix"
14553 eval x=\"$x\"
14554 exec_prefix="$acl_save_exec_prefix"
14555 prefix="$acl_save_prefix"
5e030278 14556
05ea2a05
TT
14557 if test "X$x" = "X-L$found_dir"; then
14558 haveit=yes
14559 break
14560 fi
14561 done
14562 if test -z "$haveit"; then
14563 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14564 fi
14565 if test "$hardcode_minus_L" != no; then
14566 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14567 else
14568 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14569 fi
14570 fi
14571 fi
14572 fi
14573 else
14574 if test "X$found_a" != "X"; then
14575 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14576 else
14577 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14578 fi
14579 fi
14580 additional_includedir=
14581 case "$found_dir" in
14582 */lib | */lib/)
14583 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14584 additional_includedir="$basedir/include"
14585 ;;
14586 esac
14587 if test "X$additional_includedir" != "X"; then
14588 if test "X$additional_includedir" != "X/usr/include"; then
14589 haveit=
14590 if test "X$additional_includedir" = "X/usr/local/include"; then
14591 if test -n "$GCC"; then
14592 case $host_os in
14593 linux*) haveit=yes;;
14594 esac
14595 fi
14596 fi
14597 if test -z "$haveit"; then
14598 for x in $CPPFLAGS $INCIPT; do
5e030278 14599
05ea2a05
TT
14600 acl_save_prefix="$prefix"
14601 prefix="$acl_final_prefix"
14602 acl_save_exec_prefix="$exec_prefix"
14603 exec_prefix="$acl_final_exec_prefix"
14604 eval x=\"$x\"
14605 exec_prefix="$acl_save_exec_prefix"
14606 prefix="$acl_save_prefix"
5e030278 14607
05ea2a05
TT
14608 if test "X$x" = "X-I$additional_includedir"; then
14609 haveit=yes
14610 break
14611 fi
14612 done
14613 if test -z "$haveit"; then
14614 if test -d "$additional_includedir"; then
14615 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14616 fi
14617 fi
14618 fi
14619 fi
14620 fi
14621 if test -n "$found_la"; then
14622 save_libdir="$libdir"
14623 case "$found_la" in
14624 */* | *\\*) . "$found_la" ;;
14625 *) . "./$found_la" ;;
14626 esac
14627 libdir="$save_libdir"
14628 for dep in $dependency_libs; do
14629 case "$dep" in
14630 -L*)
14631 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14632 if test "X$additional_libdir" != "X/usr/lib"; then
14633 haveit=
14634 if test "X$additional_libdir" = "X/usr/local/lib"; then
14635 if test -n "$GCC"; then
14636 case $host_os in
14637 linux*) haveit=yes;;
14638 esac
14639 fi
14640 fi
14641 if test -z "$haveit"; then
14642 haveit=
14643 for x in $LDFLAGS $LIBIPT; do
5e030278 14644
05ea2a05
TT
14645 acl_save_prefix="$prefix"
14646 prefix="$acl_final_prefix"
14647 acl_save_exec_prefix="$exec_prefix"
14648 exec_prefix="$acl_final_exec_prefix"
14649 eval x=\"$x\"
14650 exec_prefix="$acl_save_exec_prefix"
14651 prefix="$acl_save_prefix"
5e030278 14652
05ea2a05
TT
14653 if test "X$x" = "X-L$additional_libdir"; then
14654 haveit=yes
14655 break
14656 fi
14657 done
14658 if test -z "$haveit"; then
14659 if test -d "$additional_libdir"; then
14660 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14661 fi
14662 fi
14663 haveit=
14664 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14665
05ea2a05
TT
14666 acl_save_prefix="$prefix"
14667 prefix="$acl_final_prefix"
14668 acl_save_exec_prefix="$exec_prefix"
14669 exec_prefix="$acl_final_exec_prefix"
14670 eval x=\"$x\"
14671 exec_prefix="$acl_save_exec_prefix"
14672 prefix="$acl_save_prefix"
5e030278 14673
05ea2a05
TT
14674 if test "X$x" = "X-L$additional_libdir"; then
14675 haveit=yes
14676 break
14677 fi
14678 done
14679 if test -z "$haveit"; then
14680 if test -d "$additional_libdir"; then
14681 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14682 fi
14683 fi
14684 fi
14685 fi
14686 ;;
14687 -R*)
14688 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14689 if test "$enable_rpath" != no; then
14690 haveit=
14691 for x in $rpathdirs; do
14692 if test "X$x" = "X$dir"; then
14693 haveit=yes
14694 break
14695 fi
14696 done
14697 if test -z "$haveit"; then
14698 rpathdirs="$rpathdirs $dir"
14699 fi
14700 haveit=
14701 for x in $ltrpathdirs; do
14702 if test "X$x" = "X$dir"; then
14703 haveit=yes
14704 break
14705 fi
14706 done
14707 if test -z "$haveit"; then
14708 ltrpathdirs="$ltrpathdirs $dir"
14709 fi
14710 fi
14711 ;;
14712 -l*)
14713 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14714 ;;
14715 *.la)
14716 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14717 ;;
14718 *)
14719 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14720 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14721 ;;
14722 esac
14723 done
14724 fi
14725 else
9f1528a1
AB
14726 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
14727 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14728 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14729 else
14730 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
14731 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
14732 fi
05ea2a05 14733 fi
5e030278 14734 fi
05ea2a05
TT
14735 fi
14736 done
14737 done
14738 if test "X$rpathdirs" != "X"; then
14739 if test -n "$hardcode_libdir_separator"; then
14740 alldirs=
14741 for found_dir in $rpathdirs; do
14742 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14743 done
14744 acl_save_libdir="$libdir"
14745 libdir="$alldirs"
14746 eval flag=\"$hardcode_libdir_flag_spec\"
14747 libdir="$acl_save_libdir"
14748 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14749 else
14750 for found_dir in $rpathdirs; do
14751 acl_save_libdir="$libdir"
14752 libdir="$found_dir"
14753 eval flag=\"$hardcode_libdir_flag_spec\"
14754 libdir="$acl_save_libdir"
14755 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14756 done
14757 fi
14758 fi
14759 if test "X$ltrpathdirs" != "X"; then
14760 for found_dir in $ltrpathdirs; do
14761 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14762 done
14763 fi
5e030278
TT
14764
14765
05ea2a05 14766 ac_save_CPPFLAGS="$CPPFLAGS"
5e030278 14767
05ea2a05
TT
14768 for element in $INCIPT; do
14769 haveit=
14770 for x in $CPPFLAGS; do
5e030278 14771
05ea2a05
TT
14772 acl_save_prefix="$prefix"
14773 prefix="$acl_final_prefix"
14774 acl_save_exec_prefix="$exec_prefix"
14775 exec_prefix="$acl_final_exec_prefix"
14776 eval x=\"$x\"
14777 exec_prefix="$acl_save_exec_prefix"
14778 prefix="$acl_save_prefix"
5e030278 14779
05ea2a05
TT
14780 if test "X$x" = "X$element"; then
14781 haveit=yes
14782 break
14783 fi
14784 done
14785 if test -z "$haveit"; then
14786 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14787 fi
14788 done
5e030278
TT
14789
14790
05ea2a05
TT
14791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14792$as_echo_n "checking for libipt... " >&6; }
14793if ${ac_cv_libipt+:} false; then :
5e030278
TT
14794 $as_echo_n "(cached) " >&6
14795else
05ea2a05
TT
14796
14797 ac_save_LIBS="$LIBS"
14798 LIBS="$LIBS $LIBIPT"
14799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14800/* end confdefs.h. */
05ea2a05 14801#include "intel-pt.h"
5e030278
TT
14802int
14803main ()
14804{
05ea2a05 14805pt_insn_alloc_decoder (0);
5e030278
TT
14806 ;
14807 return 0;
14808}
14809_ACEOF
05ea2a05
TT
14810if ac_fn_c_try_link "$LINENO"; then :
14811 ac_cv_libipt=yes
5e030278 14812else
05ea2a05 14813 ac_cv_libipt=no
5e030278 14814fi
05ea2a05
TT
14815rm -f core conftest.err conftest.$ac_objext \
14816 conftest$ac_exeext conftest.$ac_ext
14817 LIBS="$ac_save_LIBS"
14818
5e030278 14819fi
05ea2a05
TT
14820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14821$as_echo "$ac_cv_libipt" >&6; }
14822 if test "$ac_cv_libipt" = yes; then
14823 HAVE_LIBIPT=yes
21987b9c 14824
05ea2a05
TT
14825$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14826
14827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14828$as_echo_n "checking how to link with libipt... " >&6; }
14829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14830$as_echo "$LIBIPT" >&6; }
14831 else
14832 HAVE_LIBIPT=no
14833 CPPFLAGS="$ac_save_CPPFLAGS"
14834 LIBIPT=
14835 LTLIBIPT=
14836 fi
14837
14838
14839
14840
14841
14842
14843 if test "$HAVE_LIBIPT" != yes; then
14844 if test "$with_intel_pt" = yes; then
14845 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14846 else
14847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14848$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14849 fi
14850 else
14851 save_LIBS=$LIBS
14852 LIBS="$LIBS $LIBIPT"
14853 for ac_func in pt_insn_event
21987b9c 14854do :
05ea2a05
TT
14855 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14856if test "x$ac_cv_func_pt_insn_event" = xyes; then :
21987b9c 14857 cat >>confdefs.h <<_ACEOF
05ea2a05 14858#define HAVE_PT_INSN_EVENT 1
21987b9c
TT
14859_ACEOF
14860
14861fi
14862done
14863
05ea2a05
TT
14864 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14865"
14866if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
21987b9c 14867
05ea2a05
TT
14868cat >>confdefs.h <<_ACEOF
14869#define HAVE_STRUCT_PT_INSN_ENABLED 1
14870_ACEOF
5e030278 14871
5e030278 14872
05ea2a05
TT
14873fi
14874ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14875"
14876if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14877
14878cat >>confdefs.h <<_ACEOF
14879#define HAVE_STRUCT_PT_INSN_RESYNCED 1
14880_ACEOF
5e030278
TT
14881
14882
05ea2a05
TT
14883fi
14884
14885 LIBS=$save_LIBS
14886 fi
14887 fi
14888
c8693053
RO
14889
14890$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
14891
14892 for ac_header in sys/procfs.h
14893do :
14894 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
14895if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
14896 cat >>confdefs.h <<_ACEOF
14897#define HAVE_SYS_PROCFS_H 1
14898_ACEOF
14899
14900fi
14901
14902done
14903
05ea2a05 14904 if test "$ac_cv_header_sys_procfs_h" = yes; then
c8693053
RO
14905
14906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
05ea2a05
TT
14907$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14908 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
e9bcb658
GB
14909 $as_echo_n "(cached) " >&6
14910else
14911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14912/* end confdefs.h. */
14913
05ea2a05 14914#define _SYSCALL32
05ea2a05 14915#include <sys/procfs.h>
e9bcb658
GB
14916int
14917main ()
14918{
05ea2a05 14919gregset_t avar
e9bcb658
GB
14920 ;
14921 return 0;
14922}
14923_ACEOF
14924if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14925 bfd_cv_have_sys_procfs_type_gregset_t=yes
e9bcb658 14926else
05ea2a05 14927 bfd_cv_have_sys_procfs_type_gregset_t=no
54019719
PA
14928
14929fi
05ea2a05 14930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 14931fi
06825bd1 14932
05ea2a05 14933 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
a3828db0 14934
05ea2a05 14935$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
06825bd1 14936
05ea2a05
TT
14937 fi
14938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14939$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14940
c8693053
RO
14941
14942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
14943$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14944 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14945 $as_echo_n "(cached) " >&6
bec39cab 14946else
81ecdfbb 14947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14948/* end confdefs.h. */
05ea2a05
TT
14949
14950#define _SYSCALL32
05ea2a05 14951#include <sys/procfs.h>
bec39cab
AC
14952int
14953main ()
14954{
05ea2a05 14955fpregset_t avar
064ef605
DJ
14956 ;
14957 return 0;
14958}
14959_ACEOF
9b30624b 14960if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
14961 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14962else
14963 bfd_cv_have_sys_procfs_type_fpregset_t=no
14964
14965fi
14966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14967fi
14968
14969 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14970
14971$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14972
14973 fi
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14975$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14976
c8693053
RO
14977
14978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
05ea2a05
TT
14979$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14980 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14981 $as_echo_n "(cached) " >&6
064ef605 14982else
81ecdfbb 14983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 14984/* end confdefs.h. */
05ea2a05
TT
14985
14986#define _SYSCALL32
05ea2a05 14987#include <sys/procfs.h>
064ef605
DJ
14988int
14989main ()
14990{
05ea2a05 14991prgregset_t avar
bec39cab
AC
14992 ;
14993 return 0;
14994}
14995_ACEOF
9b30624b 14996if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14997 bfd_cv_have_sys_procfs_type_prgregset_t=yes
70f9f479 14998else
05ea2a05
TT
14999 bfd_cv_have_sys_procfs_type_prgregset_t=no
15000
70f9f479 15001fi
81ecdfbb 15002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 15003fi
bec39cab 15004
05ea2a05 15005 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
70f9f479 15006
05ea2a05
TT
15007$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
15008
15009 fi
15010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15011$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
15012
c8693053
RO
15013
15014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
05ea2a05
TT
15015$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
15016 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 15017 $as_echo_n "(cached) " >&6
bec39cab 15018else
81ecdfbb 15019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 15020/* end confdefs.h. */
05ea2a05
TT
15021
15022#define _SYSCALL32
05ea2a05 15023#include <sys/procfs.h>
064ef605
DJ
15024int
15025main ()
15026{
05ea2a05 15027prfpregset_t avar
064ef605
DJ
15028 ;
15029 return 0;
15030}
15031_ACEOF
9b30624b 15032if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15033 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
064ef605 15034else
05ea2a05 15035 bfd_cv_have_sys_procfs_type_prfpregset_t=no
064ef605 15036
5c7f2947 15037fi
81ecdfbb 15038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
05ea2a05
TT
15039fi
15040
15041 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
15042
15043$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
15044
15045 fi
15046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15047$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
15048
c8693053
RO
15049
15050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
05ea2a05
TT
15051$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
15052 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
15053 $as_echo_n "(cached) " >&6
15054else
15055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15056/* end confdefs.h. */
05ea2a05
TT
15057
15058#define _SYSCALL32
05ea2a05 15059#include <sys/procfs.h>
bec39cab
AC
15060int
15061main ()
15062{
05ea2a05 15063prgregset32_t avar
bec39cab
AC
15064 ;
15065 return 0;
15066}
15067_ACEOF
9b30624b 15068if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
15069 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15070else
15071 bfd_cv_have_sys_procfs_type_prgregset32_t=no
a3828db0 15072
064ef605 15073fi
81ecdfbb 15074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 15075fi
96d7229d 15076
05ea2a05 15077 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
78434e59 15078
05ea2a05 15079$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
78434e59 15080
05ea2a05
TT
15081 fi
15082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15083$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
54019719 15084
c8693053
RO
15085
15086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
05ea2a05
TT
15087$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15088 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 15089 $as_echo_n "(cached) " >&6
bec39cab 15090else
81ecdfbb 15091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15092/* end confdefs.h. */
05ea2a05
TT
15093
15094#define _SYSCALL32
05ea2a05 15095#include <sys/procfs.h>
bec39cab
AC
15096int
15097main ()
15098{
05ea2a05 15099lwpid_t avar
bec39cab
AC
15100 ;
15101 return 0;
15102}
15103_ACEOF
05ea2a05
TT
15104if ac_fn_c_try_compile "$LINENO"; then :
15105 bfd_cv_have_sys_procfs_type_lwpid_t=yes
c906108c 15106else
05ea2a05
TT
15107 bfd_cv_have_sys_procfs_type_lwpid_t=no
15108
c906108c 15109fi
05ea2a05 15110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15111fi
81ecdfbb 15112
05ea2a05 15113 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
a3828db0 15114
05ea2a05 15115$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
97bf5e38 15116
05ea2a05
TT
15117 fi
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15119$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
a3828db0 15120
c8693053
RO
15121
15122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
05ea2a05
TT
15123$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15124 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 15125 $as_echo_n "(cached) " >&6
97bf5e38 15126else
81ecdfbb 15127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15128/* end confdefs.h. */
a3828db0 15129
05ea2a05 15130#define _SYSCALL32
05ea2a05 15131#include <sys/procfs.h>
bec39cab
AC
15132int
15133main ()
15134{
05ea2a05 15135psaddr_t avar
bec39cab
AC
15136 ;
15137 return 0;
15138}
15139_ACEOF
81ecdfbb 15140if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15141 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 15142else
05ea2a05
TT
15143 bfd_cv_have_sys_procfs_type_psaddr_t=no
15144
c906108c 15145fi
81ecdfbb 15146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 15147fi
c3f6f71d 15148
05ea2a05 15149 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
c906108c 15150
05ea2a05 15151$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
db1ff28b 15152
05ea2a05
TT
15153 fi
15154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15155$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15156
c8693053
RO
15157
15158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
15159$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15160 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
db1ff28b
JK
15161 $as_echo_n "(cached) " >&6
15162else
15163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15164/* end confdefs.h. */
05ea2a05
TT
15165
15166#define _SYSCALL32
05ea2a05 15167#include <sys/procfs.h>
db1ff28b
JK
15168int
15169main ()
15170{
05ea2a05 15171elf_fpregset_t avar
db1ff28b
JK
15172 ;
15173 return 0;
15174}
15175_ACEOF
15176if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15177 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
db1ff28b 15178else
05ea2a05
TT
15179 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15180
db1ff28b
JK
15181fi
15182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15183fi
db1ff28b 15184
05ea2a05 15185 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
db1ff28b 15186
05ea2a05 15187$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
db1ff28b 15188
05ea2a05
TT
15189 fi
15190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15191$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
db1ff28b 15192
05ea2a05
TT
15193 fi
15194
15195
15196# Check the return and argument types of ptrace.
15197
15198
15199for ac_header in sys/ptrace.h ptrace.h
15200do :
15201 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15202ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15203if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15204 cat >>confdefs.h <<_ACEOF
15205#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15206_ACEOF
db1ff28b
JK
15207
15208fi
15209
05ea2a05
TT
15210done
15211
81ecdfbb 15212
05ea2a05
TT
15213gdb_ptrace_headers='
15214#include <sys/types.h>
15215#if HAVE_SYS_PTRACE_H
15216# include <sys/ptrace.h>
15217#endif
15218#if HAVE_UNISTD_H
15219# include <unistd.h>
15220#endif
15221'
5c45e068 15222
05ea2a05
TT
15223# Check return type. Varargs (used on GNU/Linux) conflict with the
15224# empty argument list, so check for that explicitly.
15225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15226$as_echo_n "checking return type of ptrace... " >&6; }
15227if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 15228 $as_echo_n "(cached) " >&6
bec39cab 15229else
81ecdfbb 15230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15231/* end confdefs.h. */
05ea2a05 15232$gdb_ptrace_headers
bec39cab
AC
15233int
15234main ()
15235{
05ea2a05 15236extern long ptrace (enum __ptrace_request, ...);
bec39cab
AC
15237 ;
15238 return 0;
15239}
15240_ACEOF
81ecdfbb 15241if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15242 gdb_cv_func_ptrace_ret='long'
bec39cab 15243else
81ecdfbb 15244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15245/* end confdefs.h. */
05ea2a05 15246$gdb_ptrace_headers
bec39cab
AC
15247int
15248main ()
15249{
05ea2a05 15250extern int ptrace ();
bec39cab
AC
15251 ;
15252 return 0;
15253}
15254_ACEOF
81ecdfbb 15255if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15256 gdb_cv_func_ptrace_ret='int'
27ca5dad 15257else
05ea2a05 15258 gdb_cv_func_ptrace_ret='long'
27ca5dad 15259fi
81ecdfbb 15260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 15261fi
05ea2a05 15262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 15263fi
05ea2a05
TT
15264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15265$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
5c45e068
MK
15266
15267cat >>confdefs.h <<_ACEOF
05ea2a05 15268#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 15269_ACEOF
3862412b 15270
05ea2a05
TT
15271# Check argument types.
15272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15273$as_echo_n "checking types of arguments for ptrace... " >&6; }
15274if ${gdb_cv_func_ptrace_args+:} false; then :
15275 $as_echo_n "(cached) " >&6
15276else
5c45e068 15277
05ea2a05
TT
15278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15279/* end confdefs.h. */
15280$gdb_ptrace_headers
15281int
15282main ()
15283{
15284extern long ptrace (enum __ptrace_request, ...);
15285 ;
15286 return 0;
15287}
bec39cab 15288_ACEOF
05ea2a05
TT
15289if ac_fn_c_try_compile "$LINENO"; then :
15290 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15291else
15292
15293for gdb_arg1 in 'int' 'long'; do
15294 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15295 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15296 for gdb_arg4 in 'int' 'long' 'void *'; do
15297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15298/* end confdefs.h. */
15299$gdb_ptrace_headers
15300int
15301main ()
15302{
3862412b 15303
05ea2a05
TT
15304extern $gdb_cv_func_ptrace_ret
15305 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
5c45e068 15306
05ea2a05
TT
15307 ;
15308 return 0;
15309}
15310_ACEOF
15311if ac_fn_c_try_compile "$LINENO"; then :
15312 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15313 break 4;
97bf5e38 15314fi
05ea2a05
TT
15315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15316 for gdb_arg5 in 'int *' 'int' 'long'; do
15317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15318/* end confdefs.h. */
15319$gdb_ptrace_headers
15320int
15321main ()
15322{
3862412b 15323
05ea2a05
TT
15324extern $gdb_cv_func_ptrace_ret
15325 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
5c45e068 15326
05ea2a05
TT
15327 ;
15328 return 0;
15329}
6fea9e18 15330_ACEOF
05ea2a05 15331if ac_fn_c_try_compile "$LINENO"; then :
6fea9e18 15332
05ea2a05
TT
15333gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15334 break 5;
15335fi
15336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15337 done
15338 done
15339 done
15340 done
15341done
15342# Provide a safe default value.
15343: ${gdb_cv_func_ptrace_args='int,int,long,long'}
6fea9e18
L
15344
15345fi
05ea2a05
TT
15346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15347fi
15348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15349$as_echo "$gdb_cv_func_ptrace_args" >&6; }
15350ac_save_IFS=$IFS; IFS=','
15351set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15352IFS=$ac_save_IFS
15353shift
6fea9e18
L
15354
15355cat >>confdefs.h <<_ACEOF
05ea2a05 15356#define PTRACE_TYPE_ARG1 $1
6fea9e18
L
15357_ACEOF
15358
15359
05ea2a05
TT
15360cat >>confdefs.h <<_ACEOF
15361#define PTRACE_TYPE_ARG3 $3
bec39cab 15362_ACEOF
451928c5 15363
60ca704f 15364
05ea2a05
TT
15365cat >>confdefs.h <<_ACEOF
15366#define PTRACE_TYPE_ARG4 $4
15367_ACEOF
15368
15369if test -n "$5"; then
15370
15371cat >>confdefs.h <<_ACEOF
15372#define PTRACE_TYPE_ARG5 $5
15373_ACEOF
451928c5 15374
97bf5e38 15375fi
451928c5 15376
05ea2a05
TT
15377
15378if test "$cross_compiling" = no; then
15379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15380$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15381if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15382 $as_echo_n "(cached) " >&6
05ea2a05
TT
15383else
15384 if test "$cross_compiling" = yes; then :
15385 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
451928c5 15386else
81ecdfbb 15387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15388/* end confdefs.h. */
05ea2a05 15389$ac_includes_default
bec39cab
AC
15390int
15391main ()
15392{
05ea2a05
TT
15393/* If this system has a BSD-style setpgrp which takes arguments,
15394 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15395 exit successfully. */
15396 return setpgrp (1,1) != -1;
bec39cab
AC
15397 ;
15398 return 0;
15399}
15400_ACEOF
05ea2a05
TT
15401if ac_fn_c_try_run "$LINENO"; then :
15402 ac_cv_func_setpgrp_void=no
451928c5 15403else
05ea2a05 15404 ac_cv_func_setpgrp_void=yes
451928c5 15405fi
05ea2a05
TT
15406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15407 conftest.$ac_objext conftest.beam conftest.$ac_ext
451928c5
AC
15408fi
15409
05ea2a05
TT
15410fi
15411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15412$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15413if test $ac_cv_func_setpgrp_void = yes; then
60ca704f 15414
05ea2a05 15415$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
451928c5 15416
97bf5e38 15417fi
451928c5 15418
05ea2a05
TT
15419else
15420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15421$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15422if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15423 $as_echo_n "(cached) " >&6
3862412b 15424else
81ecdfbb 15425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15426/* end confdefs.h. */
05ea2a05
TT
15427
15428#include <unistd.h>
15429
bec39cab
AC
15430int
15431main ()
15432{
05ea2a05
TT
15433
15434 if (setpgrp(1,1) == -1)
15435 exit (0);
15436 else
15437 exit (1);
15438
bec39cab
AC
15439 ;
15440 return 0;
15441}
15442_ACEOF
81ecdfbb 15443if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15444 ac_cv_func_setpgrp_void=no
3862412b 15445else
05ea2a05 15446 ac_cv_func_setpgrp_void=yes
3862412b 15447fi
81ecdfbb 15448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 15449fi
05ea2a05
TT
15450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15451$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15452if test "$ac_cv_func_setpgrp_void" = yes; then
15453 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
3862412b 15454
05ea2a05 15455fi
97bf5e38 15456fi
3862412b 15457
05ea2a05
TT
15458# Assume we'll default to using the included libiberty regex.
15459gdb_use_included_regex=yes
15460
15461# However, if the system regex is GNU regex, then default to *not*
15462# using the included regex.
15463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15464$as_echo_n "checking for GNU regex... " >&6; }
15465if ${gdb_cv_have_gnu_regex+:} false; then :
81ecdfbb 15466 $as_echo_n "(cached) " >&6
3862412b 15467else
81ecdfbb 15468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15469/* end confdefs.h. */
05ea2a05 15470#include <gnu-versions.h>
bec39cab
AC
15471int
15472main ()
15473{
05ea2a05
TT
15474#define REGEX_INTERFACE_VERSION 1
15475#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15476# error "Version mismatch"
15477#endif
bec39cab
AC
15478 ;
15479 return 0;
15480}
15481_ACEOF
81ecdfbb 15482if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15483 gdb_cv_have_gnu_regex=yes
3862412b 15484else
05ea2a05 15485 gdb_cv_have_gnu_regex=no
3862412b 15486fi
81ecdfbb 15487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 15488fi
05ea2a05
TT
15489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15490$as_echo "$gdb_cv_have_gnu_regex" >&6; }
15491if test "$gdb_cv_have_gnu_regex" = yes; then
15492 gdb_use_included_regex=no
15493fi
3862412b 15494
3862412b 15495
05ea2a05
TT
15496# Check whether --with-included-regex was given.
15497if test "${with_included_regex+set}" = set; then :
15498 withval=$with_included_regex; gdb_with_regex=$withval
15499else
15500 gdb_with_regex=$gdb_use_included_regex
97bf5e38 15501fi
3862412b 15502
05ea2a05 15503if test "$gdb_with_regex" = yes; then
6e9567fe 15504
05ea2a05 15505$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
6e9567fe
JB
15506
15507fi
15508
05ea2a05
TT
15509# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15510ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15511#include <sys/proc.h>
6e9567fe 15512
e6cdd38e 15513"
05ea2a05 15514if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
e6cdd38e
JB
15515
15516cat >>confdefs.h <<_ACEOF
05ea2a05 15517#define HAVE_STRUCT_THREAD_TD_PCB 1
e6cdd38e
JB
15518_ACEOF
15519
15520
15521fi
15522
6e9567fe 15523
05ea2a05
TT
15524# See if <sys/lwp.h> defines `struct lwp`.
15525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15526$as_echo_n "checking for struct lwp... " >&6; }
15527if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 15528 $as_echo_n "(cached) " >&6
596c9d4b 15529else
81ecdfbb 15530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15531/* end confdefs.h. */
05ea2a05
TT
15532#include <sys/param.h>
15533#define _KMEMUSER
15534#include <sys/lwp.h>
bec39cab
AC
15535int
15536main ()
15537{
05ea2a05 15538struct lwp l;
bec39cab
AC
15539 ;
15540 return 0;
15541}
15542_ACEOF
81ecdfbb 15543if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15544 gdb_cv_struct_lwp=yes
596c9d4b 15545else
05ea2a05 15546 gdb_cv_struct_lwp=no
596c9d4b 15547fi
81ecdfbb 15548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b 15549fi
05ea2a05
TT
15550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15551$as_echo "$gdb_cv_struct_lwp" >&6; }
15552if test "$gdb_cv_struct_lwp" = yes; then
596c9d4b 15553
05ea2a05 15554$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
596c9d4b 15555
05ea2a05 15556fi
451928c5 15557
05ea2a05
TT
15558# See if <machine/reg.h> degines `struct reg'.
15559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15560$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15561if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 15562 $as_echo_n "(cached) " >&6
d84dd0c5 15563else
81ecdfbb 15564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15565/* end confdefs.h. */
05ea2a05
TT
15566#include <sys/types.h>
15567#include <machine/reg.h>
bec39cab
AC
15568int
15569main ()
15570{
05ea2a05 15571struct reg r;
bec39cab
AC
15572 ;
15573 return 0;
15574}
15575_ACEOF
81ecdfbb 15576if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15577 gdb_cv_struct_reg=yes
d84dd0c5 15578else
05ea2a05 15579 gdb_cv_struct_reg=no
d84dd0c5 15580fi
81ecdfbb 15581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5 15582fi
05ea2a05
TT
15583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15584$as_echo "$gdb_cv_struct_reg" >&6; }
15585if test "$gdb_cv_struct_reg" = yes; then
d84dd0c5 15586
05ea2a05 15587$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
bec39cab 15588
05ea2a05 15589fi
d84dd0c5 15590
05ea2a05
TT
15591# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15592# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15593ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15594#include <machine/reg.h>
15595"
15596if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
d84dd0c5 15597
05ea2a05
TT
15598cat >>confdefs.h <<_ACEOF
15599#define HAVE_STRUCT_REG_R_FS 1
15600_ACEOF
15601
15602
15603fi
15604ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15605#include <machine/reg.h>
15606"
15607if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15608
15609cat >>confdefs.h <<_ACEOF
15610#define HAVE_STRUCT_REG_R_GS 1
15611_ACEOF
15612
15613
15614fi
15615
15616
05ea2a05
TT
15617# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15619$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15620if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 15621 $as_echo_n "(cached) " >&6
d45fe813 15622else
81ecdfbb 15623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15624/* end confdefs.h. */
05ea2a05 15625#include <sys/ptrace.h>
bec39cab
AC
15626int
15627main ()
15628{
05ea2a05 15629PTRACE_GETREGS;
bec39cab
AC
15630 ;
15631 return 0;
15632}
15633_ACEOF
81ecdfbb 15634if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15635 gdb_cv_have_ptrace_getregs=yes
d45fe813 15636else
05ea2a05 15637 gdb_cv_have_ptrace_getregs=no
d45fe813 15638fi
81ecdfbb 15639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15640fi
15641
05ea2a05
TT
15642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15643$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15644if test "$gdb_cv_have_ptrace_getregs" = yes; then
bec39cab 15645
05ea2a05 15646$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
d45fe813 15647
05ea2a05 15648fi
d45fe813 15649
05ea2a05
TT
15650# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15652$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15653if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 15654 $as_echo_n "(cached) " >&6
d45fe813 15655else
81ecdfbb 15656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15657/* end confdefs.h. */
05ea2a05 15658#include <sys/ptrace.h>
bec39cab
AC
15659int
15660main ()
15661{
05ea2a05 15662PTRACE_GETFPXREGS;
bec39cab
AC
15663 ;
15664 return 0;
15665}
15666_ACEOF
81ecdfbb 15667if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15668 gdb_cv_have_ptrace_getfpxregs=yes
d45fe813 15669else
05ea2a05 15670 gdb_cv_have_ptrace_getfpxregs=no
d45fe813 15671fi
81ecdfbb 15672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15673fi
15674
05ea2a05
TT
15675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15676$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15677if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
bec39cab 15678
05ea2a05 15679$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
d45fe813 15680
05ea2a05 15681fi
d45fe813 15682
05ea2a05
TT
15683# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15685$as_echo_n "checking for PT_GETDBREGS... " >&6; }
15686if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 15687 $as_echo_n "(cached) " >&6
d45fe813 15688else
81ecdfbb 15689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15690/* end confdefs.h. */
05ea2a05
TT
15691#include <sys/types.h>
15692#include <sys/ptrace.h>
bec39cab
AC
15693int
15694main ()
15695{
05ea2a05 15696PT_GETDBREGS;
bec39cab
AC
15697 ;
15698 return 0;
15699}
15700_ACEOF
81ecdfbb 15701if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15702 gdb_cv_have_pt_getdbregs=yes
d45fe813 15703else
05ea2a05 15704 gdb_cv_have_pt_getdbregs=no
d45fe813 15705fi
81ecdfbb 15706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15707fi
15708
05ea2a05
TT
15709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15710$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15711if test "$gdb_cv_have_pt_getdbregs" = yes; then
bec39cab 15712
05ea2a05 15713$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
d45fe813 15714
05ea2a05 15715fi
c906108c 15716
05ea2a05
TT
15717# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15719$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15720if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 15721 $as_echo_n "(cached) " >&6
c906108c 15722else
81ecdfbb 15723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15724/* end confdefs.h. */
05ea2a05
TT
15725#include <sys/types.h>
15726#include <sys/ptrace.h>
bec39cab
AC
15727int
15728main ()
15729{
05ea2a05 15730PT_GETXMMREGS;
bec39cab
AC
15731 ;
15732 return 0;
15733}
15734_ACEOF
81ecdfbb 15735if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15736 gdb_cv_have_pt_getxmmregs=yes
c906108c 15737else
05ea2a05 15738 gdb_cv_have_pt_getxmmregs=no
c906108c 15739fi
81ecdfbb 15740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15741fi
15742
05ea2a05
TT
15743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15744$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15745if test "$gdb_cv_have_pt_getxmmregs" = yes; then
bec39cab 15746
05ea2a05 15747$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
c906108c 15748
05ea2a05 15749fi
c906108c 15750
05ea2a05
TT
15751# See if <sys/ptrace.h> supports LWP names on FreeBSD
15752# Older FreeBSD versions don't have the pl_tdname member of
15753# `struct ptrace_lwpinfo'.
15754ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15755"
15756if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
43b7e92b 15757
05ea2a05
TT
15758cat >>confdefs.h <<_ACEOF
15759#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
43b7e92b 15760_ACEOF
43b7e92b 15761
05ea2a05 15762
43b7e92b
GB
15763fi
15764
43b7e92b 15765
05ea2a05
TT
15766# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15767# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15768# FreeBSD 10.3.
15769ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
15770"
15771if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15772
15773cat >>confdefs.h <<_ACEOF
15774#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15775_ACEOF
43b7e92b 15776
43b7e92b 15777
c906108c 15778fi
c906108c 15779
05ea2a05 15780
bc8bcb4b 15781# Check if the compiler supports the `long long' type.
c906108c 15782
81ecdfbb
RW
15783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15784$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 15785if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 15786 $as_echo_n "(cached) " >&6
97bf5e38 15787else
81ecdfbb 15788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15789/* end confdefs.h. */
bc8bcb4b 15790extern long long foo;
bec39cab
AC
15791int
15792main ()
15793{
bc8bcb4b 15794switch (foo & 2) { case 0: return 1; }
bec39cab
AC
15795 ;
15796 return 0;
15797}
15798_ACEOF
81ecdfbb 15799if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15800 gdb_cv_c_long_long=yes
15801else
81ecdfbb 15802 gdb_cv_c_long_long=no
97bf5e38 15803fi
81ecdfbb 15804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15805fi
81ecdfbb
RW
15806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15807$as_echo "$gdb_cv_c_long_long" >&6; }
0ad6b8ee 15808if test "$gdb_cv_c_long_long" != yes; then
74a0d9f6 15809 # libdecnumber requires long long.
d0ac1c44 15810 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
15811fi
15812
bc8bcb4b 15813# Check if the compiler and runtime support printing long longs.
97bf5e38 15814
81ecdfbb
RW
15815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15816$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 15817if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 15818 $as_echo_n "(cached) " >&6
97bf5e38 15819else
81ecdfbb 15820 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15821 gdb_cv_printf_has_long_long=no
15822else
81ecdfbb 15823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15824/* end confdefs.h. */
bc8bcb4b
MK
15825$ac_includes_default
15826int
15827main ()
15828{
15829char buf[32];
97bf5e38
MK
15830 long long l = 0;
15831 l = (l << 16) + 0x0123;
15832 l = (l << 16) + 0x4567;
15833 l = (l << 16) + 0x89ab;
15834 l = (l << 16) + 0xcdef;
15835 sprintf (buf, "0x%016llx", l);
15836 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
15837 ;
15838 return 0;
c906108c 15839}
bec39cab 15840_ACEOF
81ecdfbb 15841if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15842 gdb_cv_printf_has_long_long=yes
15843else
81ecdfbb 15844 gdb_cv_printf_has_long_long=no
97bf5e38 15845fi
81ecdfbb
RW
15846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15847 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15848fi
81ecdfbb 15849
97bf5e38 15850fi
81ecdfbb
RW
15851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15852$as_echo "$gdb_cv_printf_has_long_long" >&6; }
0ad6b8ee 15853if test "$gdb_cv_printf_has_long_long" = yes; then
bc8bcb4b 15854
81ecdfbb 15855$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
15856
15857fi
97bf5e38 15858
1a619819
LM
15859# Check if the compiler and runtime support printing decfloats.
15860
81ecdfbb
RW
15861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15862$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 15863if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 15864 $as_echo_n "(cached) " >&6
1a619819 15865else
81ecdfbb 15866 if test "$cross_compiling" = yes; then :
1a619819
LM
15867 gdb_cv_printf_has_decfloat=no
15868else
81ecdfbb 15869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
15870/* end confdefs.h. */
15871$ac_includes_default
15872int
15873main ()
15874{
15875char buf[64];
15876 _Decimal32 d32 = 1.2345df;
15877 _Decimal64 d64 = 1.2345dd;
15878 _Decimal128 d128 = 1.2345dl;
15879 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15880 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15881 ;
15882 return 0;
15883}
15884_ACEOF
81ecdfbb 15885if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
15886 gdb_cv_printf_has_decfloat=yes
15887else
81ecdfbb 15888 gdb_cv_printf_has_decfloat=no
1a619819 15889fi
81ecdfbb
RW
15890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15891 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 15892fi
81ecdfbb 15893
1a619819 15894fi
81ecdfbb
RW
15895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15896$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
0ad6b8ee 15897if test "$gdb_cv_printf_has_decfloat" = yes; then
1a619819 15898
81ecdfbb 15899$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
15900
15901fi
15902
bc8bcb4b
MK
15903# Check if the compiler supports the `long double' type. We can't use
15904# AC_C_LONG_DOUBLE because that one does additional checks on the
15905# constants defined in <float.h> that fail on some systems,
15906# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 15907
81ecdfbb
RW
15908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15909$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 15910if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 15911 $as_echo_n "(cached) " >&6
97bf5e38 15912else
81ecdfbb 15913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15914/* end confdefs.h. */
97bf5e38 15915long double foo;
bec39cab 15916_ACEOF
81ecdfbb 15917if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 15918 gdb_cv_c_long_double=yes
97bf5e38 15919else
81ecdfbb 15920 gdb_cv_c_long_double=no
97bf5e38 15921fi
81ecdfbb 15922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15923fi
81ecdfbb
RW
15924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15925$as_echo "$gdb_cv_c_long_double" >&6; }
0ad6b8ee 15926if test "$gdb_cv_c_long_double" = yes; then
c906108c 15927
81ecdfbb 15928$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15929
15930fi
15931
bc8bcb4b 15932# Check if the compiler and runtime support printing long doubles.
97bf5e38 15933
81ecdfbb
RW
15934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15935$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 15936if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 15937 $as_echo_n "(cached) " >&6
97bf5e38 15938else
81ecdfbb 15939 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15940 gdb_cv_printf_has_long_double=no
15941else
81ecdfbb 15942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15943/* end confdefs.h. */
bc8bcb4b
MK
15944$ac_includes_default
15945int
15946main ()
15947{
15948char buf[16];
97bf5e38
MK
15949 long double f = 3.141592653;
15950 sprintf (buf, "%Lg", f);
15951 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
15952 ;
15953 return 0;
97bf5e38 15954}
bec39cab 15955_ACEOF
81ecdfbb 15956if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 15957 gdb_cv_printf_has_long_double=yes
c906108c 15958else
81ecdfbb 15959 gdb_cv_printf_has_long_double=no
c906108c 15960fi
81ecdfbb
RW
15961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15962 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 15963fi
81ecdfbb 15964
c906108c 15965fi
81ecdfbb
RW
15966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15967$as_echo "$gdb_cv_printf_has_long_double" >&6; }
0ad6b8ee 15968if test "$gdb_cv_printf_has_long_double" = yes; then
bc8bcb4b 15969
81ecdfbb 15970$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15971
15972fi
97bf5e38 15973
bc8bcb4b 15974# Check if the compiler and runtime support scanning long doubles.
97bf5e38 15975
81ecdfbb
RW
15976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15977$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 15978if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 15979 $as_echo_n "(cached) " >&6
97bf5e38 15980else
81ecdfbb 15981 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15982 gdb_cv_scanf_has_long_double=no
15983else
81ecdfbb 15984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15985/* end confdefs.h. */
bc8bcb4b
MK
15986#include <stdio.h>
15987int
15988main ()
15989{
15990char *buf = "3.141592653";
97bf5e38
MK
15991 long double f = 0;
15992 sscanf (buf, "%Lg", &f);
15993 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
15994 ;
15995 return 0;
97bf5e38 15996}
bec39cab 15997_ACEOF
81ecdfbb 15998if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15999 gdb_cv_scanf_has_long_double=yes
16000else
81ecdfbb 16001 gdb_cv_scanf_has_long_double=no
97bf5e38 16002fi
81ecdfbb
RW
16003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16004 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 16005fi
81ecdfbb 16006
c906108c 16007fi
81ecdfbb
RW
16008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
16009$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
0ad6b8ee 16010if test "$gdb_cv_scanf_has_long_double" = yes; then
bc8bcb4b 16011
81ecdfbb 16012$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
16013
16014fi
c906108c 16015
438013df
AO
16016case ${host_os} in
16017aix*)
81ecdfbb
RW
16018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
16019$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 16020if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 16021 $as_echo_n "(cached) " >&6
438013df 16022else
bec39cab 16023
438013df
AO
16024 SAVE_LDFLAGS=$LDFLAGS
16025
16026 case $GCC in
16027 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
16028 *) gdb_cv_bigtoc=-bbigtoc ;;
16029 esac
16030
16031 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 16032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16033/* end confdefs.h. */
438013df 16034
bec39cab
AC
16035int
16036main ()
16037{
438013df 16038int i;
bec39cab
AC
16039 ;
16040 return 0;
16041}
16042_ACEOF
81ecdfbb 16043if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16044
81ecdfbb
RW
16045else
16046 gdb_cv_bigtoc=
438013df 16047fi
81ecdfbb
RW
16048rm -f core conftest.err conftest.$ac_objext \
16049 conftest$ac_exeext conftest.$ac_ext
ec76baa5 16050 LDFLAGS="${SAVE_LDFLAGS}"
438013df 16051
bec39cab 16052fi
81ecdfbb
RW
16053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
16054$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
16055 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16056 ;;
16057esac
16058
38f6b338 16059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 16060$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
16061dynamic_list=false
16062if test "${gdb_native}" = yes; then
16063 # The dynamically loaded libthread_db needs access to symbols in the gdb
16064 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
16065 # may not be supported there.
16066 old_LDFLAGS="$LDFLAGS"
16067 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16068 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16069 LDFLAGS="$LDFLAGS $RDYNAMIC"
16070 if test "${have_libpython}" = no; then
16071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
16072/* end confdefs.h. */
16073
16074int
16075main ()
16076{
16077
16078 ;
16079 return 0;
16080}
16081_ACEOF
16082if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
16083 dynamic_list=true
16084fi
16085rm -f core conftest.err conftest.$ac_objext \
16086 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
16087 else
16088 # Workaround http://bugs.python.org/issue4434 where static
16089 # libpythonX.Y.a would get its symbols required for
16090 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16091 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
16092
16093 # Note the workaround for Python
16094 # http://bugs.python.org/issue10112 earlier has removed
16095 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16096 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16097 # always pass.
38f6b338
JK
16098 old_CFLAGS="$CFLAGS"
16099 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
16100 old_LIBS="$LIBS"
16101 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
16102 old_CPPFLAGS="$CPPFLAGS"
16103 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 16104 if test "$cross_compiling" = yes; then :
3bebe2f2 16105 true
f6528abd 16106else
3bebe2f2
JK
16107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16108/* end confdefs.h. */
1b4f615e 16109#include "Python.h"
3bebe2f2
JK
16110int
16111main ()
16112{
16113int err;
38f6b338
JK
16114 Py_Initialize ();
16115 err = PyRun_SimpleString ("import itertools\n");
16116 Py_Finalize ();
16117 return err == 0 ? 0 : 1;
3bebe2f2
JK
16118 ;
16119 return 0;
16120}
16121_ACEOF
16122if ac_fn_c_try_run "$LINENO"; then :
16123 dynamic_list=true
16124fi
16125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16126 conftest.$ac_objext conftest.beam conftest.$ac_ext
16127fi
16128
8c1fb155 16129 LIBS="$old_LIBS"
38f6b338 16130 CFLAGS="$old_CFLAGS"
1b4f615e 16131 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
16132 fi
16133 LDFLAGS="$old_LDFLAGS"
16134fi
16135if $dynamic_list; then
16136 found="-Wl,--dynamic-list"
16137 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 16138else
38f6b338
JK
16139 found="-rdynamic"
16140 RDYNAMIC="-rdynamic"
f6528abd 16141fi
f6528abd 16142
38f6b338 16143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 16144$as_echo "$found" >&6; }
0407b3f1 16145
f6528abd 16146
0ad6b8ee 16147if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
c906108c 16148 case ${host_os} in
d92419e5 16149 aix*)
81ecdfbb
RW
16150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16151$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 16152 if ${gdb_cv_have_aix_thread_debug+:} 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. */
d92419e5 16157#include <sys/pthdebug.h>
bec39cab
AC
16158int
16159main ()
16160{
d92419e5
JB
16161#ifndef PTHDB_VERSION_3
16162 #error
16163 #endif
bec39cab
AC
16164 ;
16165 return 0;
16166}
16167_ACEOF
81ecdfbb 16168if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
16169 gdb_cv_have_aix_thread_debug=yes
16170else
81ecdfbb 16171 gdb_cv_have_aix_thread_debug=no
d92419e5 16172fi
81ecdfbb 16173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
16174fi
16175
81ecdfbb
RW
16176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16177$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
0ad6b8ee 16178 if test "$gdb_cv_have_aix_thread_debug" = yes; then
d92419e5 16179 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 16180 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 16181 LIBS="$LIBS -lpthdebug"
d645e32e
JB
16182
16183 # Older versions of AIX do not provide the declaration for
16184 # the getthrds function (it appears that it was introduced
16185 # with AIX 6.x).
16186 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16187"
d0ac1c44 16188if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
16189 ac_have_decl=1
16190else
16191 ac_have_decl=0
16192fi
16193
16194cat >>confdefs.h <<_ACEOF
16195#define HAVE_DECL_GETTHRDS $ac_have_decl
16196_ACEOF
16197
d92419e5
JB
16198 fi
16199 ;;
c906108c 16200 esac
bec39cab 16201
c906108c
SS
16202fi
16203
3f47be5c 16204if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
16205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
16206$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 16207if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 16208 $as_echo_n "(cached) " >&6
bec39cab 16209else
81ecdfbb 16210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16211/* end confdefs.h. */
3f47be5c 16212#include <thread_db.h>
bec39cab
AC
16213int
16214main ()
16215{
3f47be5c 16216int i = TD_NOTALLOC;
bec39cab
AC
16217 ;
16218 return 0;
16219}
16220_ACEOF
81ecdfbb 16221if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
16222 gdb_cv_thread_db_h_has_td_notalloc=yes
16223else
81ecdfbb 16224 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 16225
3f47be5c 16226fi
81ecdfbb 16227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 16228
bec39cab 16229fi
81ecdfbb
RW
16230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16231$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16233$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 16234if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 16235 $as_echo_n "(cached) " >&6
59f80f10 16236else
81ecdfbb 16237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16238/* end confdefs.h. */
16239#include <thread_db.h>
16240int
16241main ()
16242{
16243int i = TD_VERSION;
16244 ;
16245 return 0;
16246}
16247_ACEOF
81ecdfbb 16248if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16249 gdb_cv_thread_db_h_has_td_version=yes
16250else
81ecdfbb 16251 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
16252
16253fi
81ecdfbb 16254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16255
16256fi
81ecdfbb
RW
16257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16258$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16260$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 16261if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 16262 $as_echo_n "(cached) " >&6
59f80f10 16263else
81ecdfbb 16264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16265/* end confdefs.h. */
16266#include <thread_db.h>
16267int
16268main ()
16269{
16270int i = TD_NOTLS;
16271 ;
16272 return 0;
16273}
16274_ACEOF
81ecdfbb 16275if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16276 gdb_cv_thread_db_h_has_td_notls=yes
16277else
81ecdfbb 16278 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
16279
16280fi
81ecdfbb 16281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16282
16283fi
81ecdfbb
RW
16284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16285$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
16286fi
16287if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 16288
81ecdfbb 16289$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 16290
59f80f10
DJ
16291fi
16292if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16293
81ecdfbb 16294$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
16295
16296fi
16297if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16298
81ecdfbb 16299$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 16300
3f47be5c
EZ
16301fi
16302
e655c1a2
PA
16303case $host_os in
16304 go32* | *djgpp*)
16305 gdbinit=gdb.ini
16306 ;;
16307 *)
16308 gdbinit=.gdbinit
16309 ;;
16310esac
16311
16312cat >>confdefs.h <<_ACEOF
16313#define GDBINIT "$gdbinit"
16314_ACEOF
16315
16316
fb40c209 16317
f83d8a90
DE
16318# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16319# except that the argument to --with-sysroot is optional.
16320# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16321if test "x$with_sysroot" = xyes; then
16322 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16323fi
bec39cab 16324
81ecdfbb
RW
16325# Check whether --with-sysroot was given.
16326if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
16327 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16328else
16329 TARGET_SYSTEM_ROOT=
16330fi
030292b7 16331
030292b7 16332
f83d8a90
DE
16333 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16334 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16335 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16336 ac_define_dir=`eval echo $ac_define_dir`
030292b7 16337
f83d8a90
DE
16338cat >>confdefs.h <<_ACEOF
16339#define TARGET_SYSTEM_ROOT "$ac_define_dir"
16340_ACEOF
bec39cab 16341
030292b7 16342
b14b1491 16343
f83d8a90
DE
16344
16345 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16346 if test "x$prefix" = xNONE; then
16347 test_prefix=/usr/local
16348 else
16349 test_prefix=$prefix
16350 fi
16351 else
16352 test_prefix=$exec_prefix
16353 fi
16354 value=0
16355 case ${ac_define_dir} in
16356 "${test_prefix}"|"${test_prefix}/"*|\
16357 '${exec_prefix}'|'${exec_prefix}/'*)
16358 value=1
16359 ;;
16360 esac
16361
16362cat >>confdefs.h <<_ACEOF
16363#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16364_ACEOF
030292b7
DJ
16365
16366
16367
16e7150e 16368
16e7150e 16369
81ecdfbb
RW
16370# Check whether --with-system-gdbinit was given.
16371if test "${with_system_gdbinit+set}" = set; then :
16372 withval=$with_system_gdbinit;
b14b1491
TT
16373 SYSTEM_GDBINIT=$withval
16374else
16375 SYSTEM_GDBINIT=
81ecdfbb
RW
16376fi
16377
16e7150e
JG
16378
16379 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16380 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 16381 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
16382 ac_define_dir=`eval echo $ac_define_dir`
16383
16384cat >>confdefs.h <<_ACEOF
16385#define SYSTEM_GDBINIT "$ac_define_dir"
16386_ACEOF
16387
16388
16389
0c4a4063 16390
b14b1491
TT
16391 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16392 if test "x$prefix" = xNONE; then
16393 test_prefix=/usr/local
16394 else
16395 test_prefix=$prefix
16396 fi
16397 else
16398 test_prefix=$exec_prefix
16399 fi
16400 value=0
16401 case ${ac_define_dir} in
16402 "${test_prefix}"|"${test_prefix}/"*|\
16403 '${exec_prefix}'|'${exec_prefix}/'*)
16404 value=1
16405 ;;
16406 esac
16e7150e 16407
b14b1491
TT
16408cat >>confdefs.h <<_ACEOF
16409#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
16410_ACEOF
16411
b14b1491 16412
16e7150e 16413
0c4a4063 16414
b835bb52 16415
ed2a2229
CB
16416# Check whether --with-system-gdbinit-dir was given.
16417if test "${with_system_gdbinit_dir+set}" = set; then :
16418 withval=$with_system_gdbinit_dir;
16419 SYSTEM_GDBINIT_DIR=$withval
16420else
16421 SYSTEM_GDBINIT_DIR=
16422fi
16423
16424
16425 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16426 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16427 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16428 ac_define_dir=`eval echo $ac_define_dir`
16429
16430cat >>confdefs.h <<_ACEOF
16431#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16432_ACEOF
16433
16434
16435
16436
16437 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16438 if test "x$prefix" = xNONE; then
16439 test_prefix=/usr/local
16440 else
16441 test_prefix=$prefix
16442 fi
16443 else
16444 test_prefix=$exec_prefix
16445 fi
16446 value=0
16447 case ${ac_define_dir} in
16448 "${test_prefix}"|"${test_prefix}/"*|\
16449 '${exec_prefix}'|'${exec_prefix}/'*)
16450 value=1
16451 ;;
16452 esac
16453
16454cat >>confdefs.h <<_ACEOF
16455#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16456_ACEOF
16457
16458
16459
16460
16461
81ecdfbb
RW
16462# Check whether --enable-werror was given.
16463if test "${enable_werror+set}" = set; then :
16464 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
16465 yes | y) ERROR_ON_WARNING="yes" ;;
16466 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 16467 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 16468 esac
81ecdfbb
RW
16469fi
16470
094a342e 16471
9a084706
PA
16472# Enable -Werror by default when using gcc. Turn it off for releases.
16473if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
16474 ERROR_ON_WARNING=yes
16475fi
16476
16477WERROR_CFLAGS=""
16478if test "${ERROR_ON_WARNING}" = yes ; then
16479 WERROR_CFLAGS="-Werror"
16480fi
16481
cf6de44d 16482# The options we'll try to enable.
aac331e4 16483build_warnings="-Wall -Wpointer-arith \
a0de763e 16484-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 16485-Wno-switch -Wno-char-subscripts \
cf6de44d 16486-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 16487-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 16488-Wno-mismatched-tags \
632e107b 16489-Wno-error=deprecated-register \
85e26832 16490-Wsuggest-override \
1a34f210 16491-Wimplicit-fallthrough=3 \
96643e35 16492-Wduplicated-cond \
33a6bc35
TT
16493-Wshadow=local \
16494-Wdeprecated-copy \
16495-Wdeprecated-copy-dtor \
bb564c58 16496-Wredundant-move \
8ddd8e0e 16497-Wmissing-declarations \
a0761e34 16498-Wmissing-prototypes \
898e7f60
SM
16499-Wstrict-null-sentinel \
16500"
3bc3d82a 16501
3526781e 16502case "${host}" in
4fa7574e
RO
16503 *-*-mingw32*)
16504 # Enable -Wno-format by default when using gcc on mingw since many
16505 # GCC versions complain about %I64.
16506 build_warnings="$build_warnings -Wno-format" ;;
16507 *-*-solaris*)
16508 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16509 # doesn't understand.
16510 build_warnings="$build_warnings -Wno-unknown-pragmas"
16511 # Solaris 11 <unistd.h> marks vfork deprecated.
16512 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
16513 *)
16514 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16515 # but there's a special case for this below.
16516 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
16517esac
16518
81ecdfbb
RW
16519# Check whether --enable-build-warnings was given.
16520if test "${enable_build_warnings+set}" = set; then :
16521 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
16522 yes) ;;
16523 no) build_warnings="-w";;
16524 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16525 build_warnings="${build_warnings} ${t}";;
16526 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16527 build_warnings="${t} ${build_warnings}";;
16528 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16529esac
d4f3574e 16530if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 16531 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 16532fi
81ecdfbb
RW
16533fi
16534# Check whether --enable-gdb-build-warnings was given.
16535if test "${enable_gdb_build_warnings+set}" = set; then :
16536 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
16537 yes) ;;
16538 no) build_warnings="-w";;
16539 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16540 build_warnings="${build_warnings} ${t}";;
16541 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16542 build_warnings="${t} ${build_warnings}";;
16543 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16544esac
16545if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16546 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16547fi
81ecdfbb 16548fi
3bc3d82a
PA
16549
16550# The set of warnings supported by a C++ compiler is not the same as
16551# of the C compiler.
cf6de44d 16552ac_ext=cpp
3bc3d82a
PA
16553ac_cpp='$CXXCPP $CPPFLAGS'
16554ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16555ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16556ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16557
3bc3d82a 16558
81ecdfbb 16559WARN_CFLAGS=""
c906108c
SS
16560if test "x${build_warnings}" != x -a "x$GCC" = xyes
16561then
81ecdfbb
RW
16562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16563$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
16564 # Separate out the -Werror flag as some files just cannot be
16565 # compiled with it enabled.
16566 for w in ${build_warnings}; do
7544db95
PA
16567 # GCC does not complain about -Wno-unknown-warning. Invert
16568 # and test -Wunknown-warning instead.
16569 case $w in
16570 -Wno-*)
16571 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
16572 -Wformat-nonliteral)
16573 # gcc requires -Wformat before -Wformat-nonliteral
16574 # will work, so stick them together.
16575 w="-Wformat $w"
16576 wtest="$w"
16577 ;;
7544db95
PA
16578 *)
16579 wtest=$w ;;
16580 esac
16581
746a987d
AC
16582 case $w in
16583 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
16584 *)
16585 # Check whether GCC accepts it.
4536bbc6 16586 saved_CFLAGS="$CFLAGS"
3e019bdc 16587 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 16588 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 16589 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
16590 if test "x$w" = "x-Wunused-variable"; then
16591 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16592 # fixed in GCC 4.9. This test is derived from the gdb
16593 # source code that triggered this bug in GCC.
16594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16595/* end confdefs.h. */
16596struct scoped_restore_base {};
16597 struct scoped_restore_tmpl : public scoped_restore_base {
16598 ~scoped_restore_tmpl() {}
16599 };
16600int
16601main ()
16602{
16603const scoped_restore_base &b = scoped_restore_tmpl();
16604 ;
16605 return 0;
16606}
16607_ACEOF
16608if ac_fn_cxx_try_compile "$LINENO"; then :
16609 WARN_CFLAGS="${WARN_CFLAGS} $w"
16610fi
16611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16612 else
16613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16614/* end confdefs.h. */
4536bbc6 16615
bec39cab
AC
16616int
16617main ()
16618{
4536bbc6 16619
bec39cab
AC
16620 ;
16621 return 0;
16622}
16623_ACEOF
3bc3d82a 16624if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 16625 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 16626fi
81ecdfbb 16627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 16628 fi
4536bbc6 16629 CFLAGS="$saved_CFLAGS"
3bc3d82a 16630 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
16631 esac
16632 done
81ecdfbb
RW
16633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16634$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
16635fi
16636
16637
104c1213 16638
cf6de44d 16639ac_ext=c
3bc3d82a
PA
16640ac_cpp='$CPP $CPPFLAGS'
16641ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16642ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16643ac_compiler_gnu=$ac_cv_c_compiler_gnu
16644
3bc3d82a 16645
b835bb52 16646
f35d5ade
TT
16647# Check whether --enable-ubsan was given.
16648if test "${enable_ubsan+set}" = set; then :
16649 enableval=$enable_ubsan;
16650else
eff98030 16651 enable_ubsan=no
f35d5ade
TT
16652fi
16653
16654if test "x$enable_ubsan" = xauto; then
16655 if $development; then
16656 enable_ubsan=yes
16657 fi
16658fi
16659ac_ext=cpp
16660ac_cpp='$CXXCPP $CPPFLAGS'
16661ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16662ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16663ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16664
16665if test "x$enable_ubsan" = xyes; then
16666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16667$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16668 saved_CXXFLAGS="$CXXFLAGS"
16669 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16671/* end confdefs.h. */
16672
16673int
16674main ()
16675{
16676
16677 ;
16678 return 0;
16679}
16680_ACEOF
16681if ac_fn_cxx_try_link "$LINENO"; then :
16682 enable_ubsan=yes
16683else
16684 enable_ubsan=no
16685fi
16686rm -f core conftest.err conftest.$ac_objext \
16687 conftest$ac_exeext conftest.$ac_ext
16688 CXXFLAGS="$saved_CXXFLAGS"
16689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16690$as_echo "$enable_ubsan" >&6; }
16691 if test "x$enable_ubsan" = xyes; then
16692 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16693 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16694 fi
16695fi
16696ac_ext=c
16697ac_cpp='$CPP $CPPFLAGS'
16698ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16699ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16700ac_compiler_gnu=$ac_cv_c_compiler_gnu
16701
16702
16703
7a292a7a 16704# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
16705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16706$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 16707if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 16708 $as_echo_n "(cached) " >&6
bec39cab 16709else
81ecdfbb 16710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16711/* end confdefs.h. */
7a292a7a
SS
16712
16713#if defined (__CYGWIN__) || defined (__CYGWIN32__)
16714lose
16715#endif
bec39cab 16716_ACEOF
7a292a7a 16717if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 16718 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
16719 gdb_cv_os_cygwin=yes
16720else
7a292a7a
SS
16721 gdb_cv_os_cygwin=no
16722fi
16723rm -f conftest*
16724
16725fi
81ecdfbb
RW
16726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16727$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 16728
aff38e61 16729
3eb25fda 16730SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 16731case ${host} in
95cbc983
AC
16732 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16733 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 16734 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 16735 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
16736esac
16737
16738
cd0fc7c3
SS
16739# libreadline needs libuser32.a in a cygwin environment
16740WIN32LIBS=
0ad6b8ee 16741if test x"$gdb_cv_os_cygwin" = xyes; then
c5394b80
JM
16742 WIN32LIBS="-luser32"
16743 case "${target}" in
16744 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16745 ;;
16746 esac
cd0fc7c3 16747fi
c906108c 16748
b4505029 16749# The ser-tcp.c module requires sockets.
b2ceabe8
TT
16750# Note that WIN32APILIBS is set by GDB_AC_COMMON.
16751WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
7a292a7a 16752
31d99776 16753# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
16754
16755 OLD_CFLAGS=$CFLAGS
16756 OLD_LDFLAGS=$LDFLAGS
16757 OLD_LIBS=$LIBS
16758 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16759 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16760 # always want our bfd.
16761 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16762 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16763 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 16764 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16765 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 16766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 16767$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 16768if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 16769 $as_echo_n "(cached) " >&6
31d99776 16770else
81ecdfbb 16771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
16772/* end confdefs.h. */
16773#include <stdlib.h>
def63ff0
TT
16774 #include "bfd.h"
16775 #include "elf-bfd.h"
31d99776
DJ
16776
16777int
16778main ()
16779{
def63ff0 16780return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
16781 ;
16782 return 0;
16783}
16784_ACEOF
81ecdfbb 16785if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
16786 gdb_cv_var_elf=yes
16787else
81ecdfbb 16788 gdb_cv_var_elf=no
31d99776 16789fi
81ecdfbb
RW
16790rm -f core conftest.err conftest.$ac_objext \
16791 conftest$ac_exeext conftest.$ac_ext
31d99776 16792fi
81ecdfbb
RW
16793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16794$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
16795 CFLAGS=$OLD_CFLAGS
16796 LDFLAGS=$OLD_LDFLAGS
16797 LIBS=$OLD_LIBS
0ad6b8ee 16798if test "$gdb_cv_var_elf" = yes; then
d4777acb 16799 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 16800
81ecdfbb 16801$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 16802
075ff26d
JK
16803 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16804 if test "$plugins" = "yes"; then
a48b32c0
L
16805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16806$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 16807if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16808 $as_echo_n "(cached) " >&6
16809else
16810 ac_func_search_save_LIBS=$LIBS
16811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16812/* end confdefs.h. */
16813
16814/* Override any GCC internal prototype to avoid an error.
16815 Use char because int might match the return type of a GCC
16816 builtin and then its argument prototype would still apply. */
16817#ifdef __cplusplus
16818extern "C"
16819#endif
16820char dlopen ();
16821int
16822main ()
16823{
16824return dlopen ();
16825 ;
16826 return 0;
16827}
16828_ACEOF
16829for ac_lib in '' dl; do
16830 if test -z "$ac_lib"; then
16831 ac_res="none required"
16832 else
16833 ac_res=-l$ac_lib
16834 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16835 fi
16836 if ac_fn_c_try_link "$LINENO"; then :
16837 ac_cv_search_dlopen=$ac_res
16838fi
16839rm -f core conftest.err conftest.$ac_objext \
16840 conftest$ac_exeext
d0ac1c44 16841 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16842 break
16843fi
16844done
d0ac1c44 16845if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16846
16847else
16848 ac_cv_search_dlopen=no
16849fi
16850rm conftest.$ac_ext
16851LIBS=$ac_func_search_save_LIBS
16852fi
16853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16854$as_echo "$ac_cv_search_dlopen" >&6; }
16855ac_res=$ac_cv_search_dlopen
16856if test "$ac_res" != no; then :
16857 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16858
16859fi
16860
075ff26d 16861 fi
31d99776 16862fi
31d99776 16863
4f05add4
TT
16864# Add macho support to GDB, but only if BFD includes it.
16865
16866 OLD_CFLAGS=$CFLAGS
16867 OLD_LDFLAGS=$LDFLAGS
16868 OLD_LIBS=$LIBS
16869 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16870 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16871 # always want our bfd.
16872 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16873 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16874 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 16875 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16876 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
16877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16878$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 16879if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
16880 $as_echo_n "(cached) " >&6
16881else
16882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16883/* end confdefs.h. */
16884#include <stdlib.h>
16885 #include "bfd.h"
16886 #include "mach-o.h"
16887
16888int
16889main ()
16890{
16891return bfd_mach_o_lookup_command (NULL, 0, NULL);
16892 ;
16893 return 0;
16894}
16895_ACEOF
16896if ac_fn_c_try_link "$LINENO"; then :
16897 gdb_cv_var_macho=yes
16898else
16899 gdb_cv_var_macho=no
16900fi
16901rm -f core conftest.err conftest.$ac_objext \
16902 conftest$ac_exeext conftest.$ac_ext
16903fi
16904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16905$as_echo "$gdb_cv_var_macho" >&6; }
16906 CFLAGS=$OLD_CFLAGS
16907 LDFLAGS=$OLD_LDFLAGS
16908 LIBS=$OLD_LIBS
0ad6b8ee 16909if test "$gdb_cv_var_macho" = yes; then
4f05add4
TT
16910 CONFIG_OBS="$CONFIG_OBS machoread.o"
16911fi
16912
121ce6e5
DJ
16913# Add any host-specific objects to GDB.
16914CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16915
608e2dbb 16916# If building on ELF, look for lzma support for embedded compressed debug info.
0ad6b8ee 16917if test "$gdb_cv_var_elf" = yes; then
608e2dbb
TT
16918
16919# Check whether --with-lzma was given.
16920if test "${with_lzma+set}" = set; then :
16921 withval=$with_lzma;
16922else
16923 with_lzma=auto
16924fi
16925
16926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16927$as_echo_n "checking whether to use lzma... " >&6; }
16928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16929$as_echo "$with_lzma" >&6; }
16930
16931 if test "${with_lzma}" != no; then
16932
16933
16934
16935
16936
16937
16938
16939
16940 use_additional=yes
16941
16942 acl_save_prefix="$prefix"
16943 prefix="$acl_final_prefix"
16944 acl_save_exec_prefix="$exec_prefix"
16945 exec_prefix="$acl_final_exec_prefix"
16946
16947 eval additional_includedir=\"$includedir\"
16948 eval additional_libdir=\"$libdir\"
16949
16950 exec_prefix="$acl_save_exec_prefix"
16951 prefix="$acl_save_prefix"
16952
16953
16954# Check whether --with-liblzma-prefix was given.
16955if test "${with_liblzma_prefix+set}" = set; then :
16956 withval=$with_liblzma_prefix;
16957 if test "X$withval" = "Xno"; then
16958 use_additional=no
16959 else
16960 if test "X$withval" = "X"; then
16961
16962 acl_save_prefix="$prefix"
16963 prefix="$acl_final_prefix"
16964 acl_save_exec_prefix="$exec_prefix"
16965 exec_prefix="$acl_final_exec_prefix"
16966
16967 eval additional_includedir=\"$includedir\"
16968 eval additional_libdir=\"$libdir\"
16969
16970 exec_prefix="$acl_save_exec_prefix"
16971 prefix="$acl_save_prefix"
16972
16973 else
16974 additional_includedir="$withval/include"
16975 additional_libdir="$withval/lib"
16976 fi
16977 fi
16978
16979fi
16980
9f1528a1
AB
16981
16982# Check whether --with-liblzma-type was given.
16983if test "${with_liblzma_type+set}" = set; then :
16984 withval=$with_liblzma_type; with_liblzma_type=$withval
16985else
16986 with_liblzma_type=auto
16987fi
16988
16989 lib_type=`eval echo \$with_liblzma_type`
16990
608e2dbb
TT
16991 LIBLZMA=
16992 LTLIBLZMA=
16993 INCLZMA=
16994 rpathdirs=
16995 ltrpathdirs=
16996 names_already_handled=
16997 names_next_round='lzma '
16998 while test -n "$names_next_round"; do
16999 names_this_round="$names_next_round"
17000 names_next_round=
17001 for name in $names_this_round; do
17002 already_handled=
17003 for n in $names_already_handled; do
17004 if test "$n" = "$name"; then
17005 already_handled=yes
17006 break
17007 fi
17008 done
17009 if test -z "$already_handled"; then
17010 names_already_handled="$names_already_handled $name"
17011 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17012 eval value=\"\$HAVE_LIB$uppername\"
17013 if test -n "$value"; then
17014 if test "$value" = yes; then
17015 eval value=\"\$LIB$uppername\"
17016 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
17017 eval value=\"\$LTLIB$uppername\"
17018 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
17019 else
17020 :
17021 fi
17022 else
17023 found_dir=
17024 found_la=
17025 found_so=
17026 found_a=
17027 if test $use_additional = yes; then
9f1528a1 17028 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
17029 found_dir="$additional_libdir"
17030 found_so="$additional_libdir/lib$name.$shlibext"
17031 if test -f "$additional_libdir/lib$name.la"; then
17032 found_la="$additional_libdir/lib$name.la"
17033 fi
9f1528a1 17034 elif test x$lib_type != xshared; then
608e2dbb
TT
17035 if test -f "$additional_libdir/lib$name.$libext"; then
17036 found_dir="$additional_libdir"
17037 found_a="$additional_libdir/lib$name.$libext"
17038 if test -f "$additional_libdir/lib$name.la"; then
17039 found_la="$additional_libdir/lib$name.la"
17040 fi
17041 fi
17042 fi
17043 fi
17044 if test "X$found_dir" = "X"; then
17045 for x in $LDFLAGS $LTLIBLZMA; do
17046
17047 acl_save_prefix="$prefix"
17048 prefix="$acl_final_prefix"
17049 acl_save_exec_prefix="$exec_prefix"
17050 exec_prefix="$acl_final_exec_prefix"
17051 eval x=\"$x\"
17052 exec_prefix="$acl_save_exec_prefix"
17053 prefix="$acl_save_prefix"
17054
17055 case "$x" in
17056 -L*)
17057 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 17058 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
17059 found_dir="$dir"
17060 found_so="$dir/lib$name.$shlibext"
17061 if test -f "$dir/lib$name.la"; then
17062 found_la="$dir/lib$name.la"
17063 fi
9f1528a1 17064 elif test x$lib_type != xshared; then
608e2dbb
TT
17065 if test -f "$dir/lib$name.$libext"; then
17066 found_dir="$dir"
17067 found_a="$dir/lib$name.$libext"
17068 if test -f "$dir/lib$name.la"; then
17069 found_la="$dir/lib$name.la"
17070 fi
17071 fi
17072 fi
17073 ;;
17074 esac
17075 if test "X$found_dir" != "X"; then
17076 break
17077 fi
17078 done
17079 fi
17080 if test "X$found_dir" != "X"; then
17081 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17082 if test "X$found_so" != "X"; then
17083 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17084 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17085 else
17086 haveit=
17087 for x in $ltrpathdirs; do
17088 if test "X$x" = "X$found_dir"; then
17089 haveit=yes
17090 break
17091 fi
17092 done
17093 if test -z "$haveit"; then
17094 ltrpathdirs="$ltrpathdirs $found_dir"
17095 fi
17096 if test "$hardcode_direct" = yes; then
17097 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17098 else
17099 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17100 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17101 haveit=
17102 for x in $rpathdirs; do
17103 if test "X$x" = "X$found_dir"; then
17104 haveit=yes
17105 break
17106 fi
17107 done
17108 if test -z "$haveit"; then
17109 rpathdirs="$rpathdirs $found_dir"
17110 fi
17111 else
17112 haveit=
17113 for x in $LDFLAGS $LIBLZMA; do
17114
17115 acl_save_prefix="$prefix"
17116 prefix="$acl_final_prefix"
17117 acl_save_exec_prefix="$exec_prefix"
17118 exec_prefix="$acl_final_exec_prefix"
17119 eval x=\"$x\"
17120 exec_prefix="$acl_save_exec_prefix"
17121 prefix="$acl_save_prefix"
17122
17123 if test "X$x" = "X-L$found_dir"; then
17124 haveit=yes
17125 break
17126 fi
17127 done
17128 if test -z "$haveit"; then
17129 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17130 fi
17131 if test "$hardcode_minus_L" != no; then
17132 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17133 else
17134 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17135 fi
17136 fi
17137 fi
17138 fi
17139 else
17140 if test "X$found_a" != "X"; then
17141 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17142 else
17143 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17144 fi
17145 fi
17146 additional_includedir=
17147 case "$found_dir" in
17148 */lib | */lib/)
17149 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17150 additional_includedir="$basedir/include"
17151 ;;
17152 esac
17153 if test "X$additional_includedir" != "X"; then
17154 if test "X$additional_includedir" != "X/usr/include"; then
17155 haveit=
17156 if test "X$additional_includedir" = "X/usr/local/include"; then
17157 if test -n "$GCC"; then
17158 case $host_os in
17159 linux*) haveit=yes;;
17160 esac
17161 fi
17162 fi
17163 if test -z "$haveit"; then
17164 for x in $CPPFLAGS $INCLZMA; do
17165
17166 acl_save_prefix="$prefix"
17167 prefix="$acl_final_prefix"
17168 acl_save_exec_prefix="$exec_prefix"
17169 exec_prefix="$acl_final_exec_prefix"
17170 eval x=\"$x\"
17171 exec_prefix="$acl_save_exec_prefix"
17172 prefix="$acl_save_prefix"
17173
17174 if test "X$x" = "X-I$additional_includedir"; then
17175 haveit=yes
17176 break
17177 fi
17178 done
17179 if test -z "$haveit"; then
17180 if test -d "$additional_includedir"; then
17181 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17182 fi
17183 fi
17184 fi
17185 fi
17186 fi
17187 if test -n "$found_la"; then
17188 save_libdir="$libdir"
17189 case "$found_la" in
17190 */* | *\\*) . "$found_la" ;;
17191 *) . "./$found_la" ;;
17192 esac
17193 libdir="$save_libdir"
17194 for dep in $dependency_libs; do
17195 case "$dep" in
17196 -L*)
17197 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17198 if test "X$additional_libdir" != "X/usr/lib"; then
17199 haveit=
17200 if test "X$additional_libdir" = "X/usr/local/lib"; then
17201 if test -n "$GCC"; then
17202 case $host_os in
17203 linux*) haveit=yes;;
17204 esac
17205 fi
17206 fi
17207 if test -z "$haveit"; then
17208 haveit=
17209 for x in $LDFLAGS $LIBLZMA; do
17210
17211 acl_save_prefix="$prefix"
17212 prefix="$acl_final_prefix"
17213 acl_save_exec_prefix="$exec_prefix"
17214 exec_prefix="$acl_final_exec_prefix"
17215 eval x=\"$x\"
17216 exec_prefix="$acl_save_exec_prefix"
17217 prefix="$acl_save_prefix"
17218
17219 if test "X$x" = "X-L$additional_libdir"; then
17220 haveit=yes
17221 break
17222 fi
17223 done
17224 if test -z "$haveit"; then
17225 if test -d "$additional_libdir"; then
17226 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17227 fi
17228 fi
17229 haveit=
17230 for x in $LDFLAGS $LTLIBLZMA; do
17231
17232 acl_save_prefix="$prefix"
17233 prefix="$acl_final_prefix"
17234 acl_save_exec_prefix="$exec_prefix"
17235 exec_prefix="$acl_final_exec_prefix"
17236 eval x=\"$x\"
17237 exec_prefix="$acl_save_exec_prefix"
17238 prefix="$acl_save_prefix"
17239
17240 if test "X$x" = "X-L$additional_libdir"; then
17241 haveit=yes
17242 break
17243 fi
17244 done
17245 if test -z "$haveit"; then
17246 if test -d "$additional_libdir"; then
17247 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17248 fi
17249 fi
17250 fi
17251 fi
17252 ;;
17253 -R*)
17254 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17255 if test "$enable_rpath" != no; then
17256 haveit=
17257 for x in $rpathdirs; do
17258 if test "X$x" = "X$dir"; then
17259 haveit=yes
17260 break
17261 fi
17262 done
17263 if test -z "$haveit"; then
17264 rpathdirs="$rpathdirs $dir"
17265 fi
17266 haveit=
17267 for x in $ltrpathdirs; do
17268 if test "X$x" = "X$dir"; then
17269 haveit=yes
17270 break
17271 fi
17272 done
17273 if test -z "$haveit"; then
17274 ltrpathdirs="$ltrpathdirs $dir"
17275 fi
17276 fi
17277 ;;
17278 -l*)
17279 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17280 ;;
17281 *.la)
17282 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17283 ;;
17284 *)
17285 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17286 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17287 ;;
17288 esac
17289 done
17290 fi
17291 else
9f1528a1
AB
17292 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17293 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17294 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17295 else
17296 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17297 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17298 fi
608e2dbb
TT
17299 fi
17300 fi
17301 fi
17302 done
17303 done
17304 if test "X$rpathdirs" != "X"; then
17305 if test -n "$hardcode_libdir_separator"; then
17306 alldirs=
17307 for found_dir in $rpathdirs; do
17308 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17309 done
17310 acl_save_libdir="$libdir"
17311 libdir="$alldirs"
17312 eval flag=\"$hardcode_libdir_flag_spec\"
17313 libdir="$acl_save_libdir"
17314 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17315 else
17316 for found_dir in $rpathdirs; do
17317 acl_save_libdir="$libdir"
17318 libdir="$found_dir"
17319 eval flag=\"$hardcode_libdir_flag_spec\"
17320 libdir="$acl_save_libdir"
17321 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17322 done
17323 fi
17324 fi
17325 if test "X$ltrpathdirs" != "X"; then
17326 for found_dir in $ltrpathdirs; do
17327 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17328 done
17329 fi
17330
17331
17332 ac_save_CPPFLAGS="$CPPFLAGS"
17333
17334 for element in $INCLZMA; do
17335 haveit=
17336 for x in $CPPFLAGS; do
17337
17338 acl_save_prefix="$prefix"
17339 prefix="$acl_final_prefix"
17340 acl_save_exec_prefix="$exec_prefix"
17341 exec_prefix="$acl_final_exec_prefix"
17342 eval x=\"$x\"
17343 exec_prefix="$acl_save_exec_prefix"
17344 prefix="$acl_save_prefix"
17345
17346 if test "X$x" = "X$element"; then
17347 haveit=yes
17348 break
17349 fi
17350 done
17351 if test -z "$haveit"; then
17352 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17353 fi
17354 done
17355
17356
17357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17358$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 17359if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
17360 $as_echo_n "(cached) " >&6
17361else
17362
17363 ac_save_LIBS="$LIBS"
17364 LIBS="$LIBS $LIBLZMA"
17365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17366/* end confdefs.h. */
17367#include "lzma.h"
17368int
17369main ()
17370{
17371lzma_index_iter iter;
17372 lzma_index_iter_init (&iter, 0);
17373 lzma_mf_is_supported (LZMA_MF_HC3);
17374 ;
17375 return 0;
17376}
17377_ACEOF
17378if ac_fn_c_try_link "$LINENO"; then :
17379 ac_cv_liblzma=yes
17380else
17381 ac_cv_liblzma=no
17382fi
17383rm -f core conftest.err conftest.$ac_objext \
17384 conftest$ac_exeext conftest.$ac_ext
17385 LIBS="$ac_save_LIBS"
17386
17387fi
17388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17389$as_echo "$ac_cv_liblzma" >&6; }
17390 if test "$ac_cv_liblzma" = yes; then
17391 HAVE_LIBLZMA=yes
17392
17393$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17394
17395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17396$as_echo_n "checking how to link with liblzma... " >&6; }
17397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17398$as_echo "$LIBLZMA" >&6; }
17399 else
17400 HAVE_LIBLZMA=no
17401 CPPFLAGS="$ac_save_CPPFLAGS"
17402 LIBLZMA=
17403 LTLIBLZMA=
17404 fi
17405
17406
17407
17408
17409
17410
17411 if test "$HAVE_LIBLZMA" != yes; then
17412 if test "$with_lzma" = yes; then
d0ac1c44 17413 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
17414 fi
17415 fi
17416 fi
17417fi
17418
3fc11d3e
JM
17419LIBGUI="../libgui/src/libgui.a"
17420GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17421
17422
7a292a7a 17423
3fc11d3e
JM
17424WIN32LDAPP=
17425
17426
17427
d91670b9 17428case "${host}" in
686a5eed 17429*-*-cygwin* | *-*-mingw* )
d91670b9
CV
17430 configdir="win"
17431 ;;
17432*)
17433 configdir="unix"
17434 ;;
17435esac
3fc11d3e
JM
17436
17437GDBTKLIBS=
17438if test "${enable_gdbtk}" = "yes"; then
17439
d1c3b63a
KS
17440 # Gdbtk must have an absolute path to srcdir in order to run
17441 # properly when not installed.
17442 here=`pwd`
17443 cd ${srcdir}
17444 GDBTK_SRC_DIR=`pwd`
17445 cd $here
17446
bec39cab 17447
5062cc19
KS
17448 #
17449 # Ok, lets find the tcl configuration
17450 # First, look for one uninstalled.
17451 # the alternative search directory is invoked by --with-tcl
17452 #
3fc11d3e 17453
5062cc19
KS
17454 if test x"${no_tcl}" = x ; then
17455 # we reset no_tcl in case something fails here
17456 no_tcl=true
bec39cab 17457
81ecdfbb
RW
17458# Check whether --with-tcl was given.
17459if test "${with_tcl+set}" = set; then :
17460 withval=$with_tcl; with_tclconfig=${withval}
17461fi
17462
17463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17464$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 17465 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 17466 $as_echo_n "(cached) " >&6
3fc11d3e 17467else
bec39cab 17468
3fc11d3e 17469
5062cc19
KS
17470 # First check to see if --with-tcl was specified.
17471 case "${host}" in
17472 *-*-cygwin*) platDir="win" ;;
17473 *) platDir="unix" ;;
17474 esac
17475 if test x"${with_tclconfig}" != x ; then
17476 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17477 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17478 else
d0ac1c44 17479 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
17480 fi
17481 fi
17482
17483 # then check for a private Tcl installation
17484 if test x"${ac_cv_c_tclconfig}" = x ; then
17485 for i in \
17486 ../tcl \
17487 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17488 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17489 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17490 ../../tcl \
17491 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17492 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17493 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17494 ../../../tcl \
17495 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17496 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17497 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17498 if test -f "$i/$platDir/tclConfig.sh" ; then
17499 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17500 break
17501 fi
17502 done
17503 fi
17504
17505 # on Darwin, check in Framework installation locations
17506 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17507 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17508 `ls -d /Library/Frameworks 2>/dev/null` \
17509 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17510 `ls -d /System/Library/Frameworks 2>/dev/null` \
17511 ; do
17512 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17513 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17514 break
17515 fi
17516 done
17517 fi
17518
17519 # check in a few common install locations
17520 if test x"${ac_cv_c_tclconfig}" = x ; then
17521 for i in `ls -d ${libdir} 2>/dev/null` \
17522 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17523 `ls -d ${prefix}/lib 2>/dev/null` \
17524 `ls -d /usr/local/lib 2>/dev/null` \
17525 `ls -d /usr/contrib/lib 2>/dev/null` \
17526 `ls -d /usr/lib 2>/dev/null` \
17527 ; do
17528 if test -f "$i/tclConfig.sh" ; then
17529 ac_cv_c_tclconfig=`(cd $i; pwd)`
17530 break
17531 fi
17532 done
17533 fi
3fc11d3e 17534
5062cc19
KS
17535 # check in a few other private locations
17536 if test x"${ac_cv_c_tclconfig}" = x ; then
17537 for i in \
17538 ${srcdir}/../tcl \
17539 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17540 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17541 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17542 if test -f "$i/$platDir/tclConfig.sh" ; then
17543 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17544 break
17545 fi
17546 done
17547 fi
bec39cab 17548
3fc11d3e
JM
17549fi
17550
5062cc19
KS
17551
17552 if test x"${ac_cv_c_tclconfig}" = x ; then
17553 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
17554 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17555$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
17556 else
17557 no_tcl=
17558 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
17559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17560$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
17561 fi
17562 fi
3fc11d3e 17563
bec39cab 17564
85541719
DE
17565 # If $no_tk is nonempty, then we can't do Tk, and there is no
17566 # point to doing Tcl.
bec39cab 17567
5062cc19
KS
17568 #
17569 # Ok, lets find the tk configuration
17570 # First, look for one uninstalled.
17571 # the alternative search directory is invoked by --with-tk
17572 #
3fc11d3e 17573
5062cc19
KS
17574 if test x"${no_tk}" = x ; then
17575 # we reset no_tk in case something fails here
17576 no_tk=true
bec39cab 17577
81ecdfbb
RW
17578# Check whether --with-tk was given.
17579if test "${with_tk+set}" = set; then :
17580 withval=$with_tk; with_tkconfig=${withval}
17581fi
17582
17583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17584$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 17585 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 17586 $as_echo_n "(cached) " >&6
bec39cab 17587else
3fc11d3e
JM
17588
17589
5062cc19
KS
17590 # First check to see if --with-tkconfig was specified.
17591 if test x"${with_tkconfig}" != x ; then
17592 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17593 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17594 else
d0ac1c44 17595 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
17596 fi
17597 fi
3fc11d3e 17598
5062cc19
KS
17599 # then check for a private Tk library
17600 case "${host}" in
17601 *-*-cygwin*) platDir="win" ;;
17602 *) platDir="unix" ;;
17603 esac
17604 if test x"${ac_cv_c_tkconfig}" = x ; then
17605 for i in \
17606 ../tk \
17607 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17608 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17609 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17610 ../../tk \
17611 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17612 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17613 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17614 ../../../tk \
17615 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17616 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17617 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17618 if test -f "$i/$platDir/tkConfig.sh" ; then
17619 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17620 break
17621 fi
17622 done
17623 fi
17624
17625 # on Darwin, check in Framework installation locations
17626 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17627 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17628 `ls -d /Library/Frameworks 2>/dev/null` \
17629 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17630 `ls -d /System/Library/Frameworks 2>/dev/null` \
17631 ; do
17632 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17633 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17634 break
17635 fi
17636 done
17637 fi
17638
17639 # check in a few common install locations
17640 if test x"${ac_cv_c_tkconfig}" = x ; then
17641 for i in `ls -d ${libdir} 2>/dev/null` \
17642 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17643 `ls -d ${prefix}/lib 2>/dev/null` \
17644 `ls -d /usr/local/lib 2>/dev/null` \
17645 `ls -d /usr/contrib/lib 2>/dev/null` \
17646 `ls -d /usr/lib 2>/dev/null` \
17647 ; do
17648 if test -f "$i/tkConfig.sh" ; then
17649 ac_cv_c_tkconfig=`(cd $i; pwd)`
17650 break
17651 fi
17652 done
17653 fi
17654 # check in a few other private locations
17655 if test x"${ac_cv_c_tkconfig}" = x ; then
17656 for i in \
17657 ${srcdir}/../tk \
17658 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17659 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17660 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17661 if test -f "$i/$platDir/tkConfig.sh" ; then
17662 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17663 break
17664 fi
17665 done
17666 fi
3fc11d3e 17667
3fc11d3e
JM
17668fi
17669
17670
5062cc19
KS
17671 if test x"${ac_cv_c_tkconfig}" = x ; then
17672 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
17673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17674$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
17675 else
17676 no_tk=
17677 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
17678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17679$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 17680 fi
3fc11d3e 17681 fi
dd2504ab 17682
dd2504ab 17683
85541719
DE
17684 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17685
81ecdfbb
RW
17686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17687$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
17688
17689 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
17690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17691$as_echo "loading" >&6; }
85541719
DE
17692 . ${TCL_BIN_DIR}/tclConfig.sh
17693 else
81ecdfbb
RW
17694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17695$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
17696 fi
17697
17698 # eval is required to do the TCL_DBGX substitution
17699 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17700 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17701
17702 # If the TCL_BIN_DIR is the build directory (not the install directory),
17703 # then set the common variable name to the value of the build variables.
17704 # For example, the variable TCL_LIB_SPEC will be set to the value
17705 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17706 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17707 # installed and uninstalled version of Tcl.
17708 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17709 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17710 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17711 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17712 elif test "`uname -s`" = "Darwin"; then
17713 # If Tcl was built as a framework, attempt to use the libraries
17714 # from the framework at the given location so that linking works
a68ffae9 17715 # against Tcl.framework installed in an arbitrary location.
85541719
DE
17716 case ${TCL_DEFS} in
17717 *TCL_FRAMEWORK*)
17718 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17719 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17720 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17721 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17722 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17723 break
17724 fi
17725 done
17726 fi
17727 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17728 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17729 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17730 fi
17731 ;;
17732 esac
17733 fi
17734
17735 # eval is required to do the TCL_DBGX substitution
17736 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17737 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17738 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17739 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755 # Check for in-tree tcl
17756 here=`pwd`
17757 cd ${srcdir}/..
17758 topdir=`pwd`
17759 cd ${here}
17760
17761 intree="no"
17762 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17763 intree="yes"
17764 fi
17765
17766 # Find Tcl private headers
17767 if test x"${intree}" = xno; then
17768
81ecdfbb
RW
17769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17770$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
17771 private_dir=""
17772 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17773 if test -f ${dir}/tclInt.h ; then
17774 private_dir=${dir}
17775 fi
17776
17777 if test x"${private_dir}" = x; then
d0ac1c44 17778 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
17779 else
17780 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17782$as_echo "${private_dir}" >&6; }
85541719
DE
17783 fi
17784
17785 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17786 TCL_LIBRARY="${TCL_LIB_SPEC}"
17787 TCL_DEPS=""
17788 else
17789 # If building tcl in the same src tree, private headers
17790 # are not needed, but we need to be sure to use the right
17791 # headers library
17792 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17793 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17794 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17795 fi
17796
17797
17798
17799
17800
81ecdfbb
RW
17801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17802$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 17803
5062cc19 17804 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
17805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17806$as_echo "loading" >&6; }
5062cc19 17807 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 17808 else
81ecdfbb
RW
17809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17810$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 17811 fi
bec39cab 17812
5062cc19
KS
17813 # eval is required to do the TK_DBGX substitution
17814 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17815 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17816
17817 # If the TK_BIN_DIR is the build directory (not the install directory),
17818 # then set the common variable name to the value of the build variables.
17819 # For example, the variable TK_LIB_SPEC will be set to the value
17820 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17821 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17822 # installed and uninstalled version of Tcl.
85541719 17823 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
17824 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17825 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17826 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17827 elif test "`uname -s`" = "Darwin"; then
17828 # If Tk was built as a framework, attempt to use the libraries
17829 # from the framework at the given location so that linking works
a68ffae9 17830 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
17831 case ${TK_DEFS} in
17832 *TK_FRAMEWORK*)
85541719 17833 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
17834 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17835 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17836 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17837 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17838 break
17839 fi
17840 done
17841 fi
85541719 17842 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
17843 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17844 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17845 fi
17846 ;;
17847 esac
3fc11d3e
JM
17848 fi
17849
5062cc19
KS
17850 # eval is required to do the TK_DBGX substitution
17851 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17852 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17853 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17854 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 17855
3fc11d3e
JM
17856
17857
bec39cab
AC
17858
17859
17860
17861
17862
17863
17864
3fc11d3e 17865
3fc11d3e 17866
bec39cab 17867
bec39cab 17868
85541719
DE
17869 # Check for in-tree Tk
17870 intree="no"
17871 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17872 intree="yes"
17873 fi
3fc11d3e 17874
85541719
DE
17875 # Find Tk private headers
17876 if test x"${intree}" = xno; then
3fc11d3e 17877
81ecdfbb
RW
17878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17879$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
17880 private_dir=""
17881 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17882 if test -f ${dir}/tkInt.h; then
17883 private_dir=${dir}
3fc11d3e 17884 fi
bec39cab 17885
5062cc19 17886 if test x"${private_dir}" = x; then
d0ac1c44 17887 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 17888 else
5062cc19 17889 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17891$as_echo "${private_dir}" >&6; }
3fc11d3e 17892 fi
3fc11d3e 17893
85541719
DE
17894 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17895 TK_LIBRARY=${TK_LIB_SPEC}
17896 TK_DEPS=""
17897 else
17898 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17899 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17900 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17901 fi
3fc11d3e
JM
17902
17903
3fc11d3e
JM
17904
17905
3fc11d3e 17906
85541719 17907 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 17908
85541719
DE
17909 # Include some libraries that Tcl and Tk want.
17910 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17911 # Yes, the ordering seems wrong here. But it isn't.
17912 # TK_LIBS is the list of libraries that need to be linked
17913 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17914 # were in LIBS then any link tests after this point would
17915 # try to include things like `$(LIBGUI)', which wouldn't work.
17916 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 17917
85541719
DE
17918 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17919 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17920 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17921 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17922 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17923 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17924 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 17925
0ad6b8ee 17926 if test x"$gdb_cv_os_cygwin" = xyes; then
85541719
DE
17927 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17928 WIN32LDAPP="-Wl,--subsystem,console"
17929 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 17930 fi
ffc6a242 17931
81ecdfbb 17932 subdirs="$subdirs gdbtk"
3ace7edb 17933
85541719 17934 fi
3fc11d3e
JM
17935fi
17936
17937
17938
17939
17940
17941
17942
17943
81ecdfbb
RW
17944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17945$as_echo_n "checking for X... " >&6; }
bec39cab 17946
c906108c 17947
81ecdfbb
RW
17948# Check whether --with-x was given.
17949if test "${with_x+set}" = set; then :
17950 withval=$with_x;
17951fi
c906108c
SS
17952
17953# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17954if test "x$with_x" = xno; then
17955 # The user explicitly disabled X.
17956 have_x=disabled
17957else
81ecdfbb 17958 case $x_includes,$x_libraries in #(
d0ac1c44
SM
17959 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17960 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 17961 $as_echo_n "(cached) " >&6
c906108c
SS
17962else
17963 # One or both of the vars are not set, and there is no cached value.
bec39cab 17964ac_x_includes=no ac_x_libraries=no
81ecdfbb 17965rm -f -r conftest.dir
bec39cab
AC
17966if mkdir conftest.dir; then
17967 cd conftest.dir
bec39cab 17968 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
17969incroot:
17970 @echo incroot='${INCROOT}'
17971usrlibdir:
17972 @echo usrlibdir='${USRLIBDIR}'
17973libdir:
17974 @echo libdir='${LIBDIR}'
17975_ACEOF
17976 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 17977 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
17978 for ac_var in incroot usrlibdir libdir; do
17979 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17980 done
c906108c 17981 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
17982 for ac_extension in a so sl dylib la dll; do
17983 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17984 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 17985 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
17986 fi
17987 done
17988 # Screen out bogus values from the imake configuration. They are
17989 # bogus both because they are the default anyway, and because
17990 # using them would break gcc on systems where it needs fixed includes.
bec39cab 17991 case $ac_im_incroot in
81ecdfbb 17992 /usr/include) ac_x_includes= ;;
bec39cab 17993 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 17994 esac
bec39cab 17995 case $ac_im_usrlibdir in
81ecdfbb 17996 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 17997 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
17998 esac
17999 fi
18000 cd ..
81ecdfbb 18001 rm -f -r conftest.dir
c906108c
SS
18002fi
18003
bec39cab
AC
18004# Standard set of common directories for X headers.
18005# Check X11 before X11Rn because it is often a symlink to the current release.
18006ac_x_header_dirs='
18007/usr/X11/include
81ecdfbb 18008/usr/X11R7/include
bec39cab
AC
18009/usr/X11R6/include
18010/usr/X11R5/include
18011/usr/X11R4/include
18012
18013/usr/include/X11
81ecdfbb 18014/usr/include/X11R7
bec39cab
AC
18015/usr/include/X11R6
18016/usr/include/X11R5
18017/usr/include/X11R4
18018
18019/usr/local/X11/include
81ecdfbb 18020/usr/local/X11R7/include
bec39cab
AC
18021/usr/local/X11R6/include
18022/usr/local/X11R5/include
18023/usr/local/X11R4/include
18024
18025/usr/local/include/X11
81ecdfbb 18026/usr/local/include/X11R7
bec39cab
AC
18027/usr/local/include/X11R6
18028/usr/local/include/X11R5
18029/usr/local/include/X11R4
18030
18031/usr/X386/include
18032/usr/x386/include
18033/usr/XFree86/include/X11
18034
18035/usr/include
18036/usr/local/include
18037/usr/unsupported/include
18038/usr/athena/include
18039/usr/local/x11r5/include
18040/usr/lpp/Xamples/include
18041
18042/usr/openwin/include
18043/usr/openwin/share/include'
18044
18045if test "$ac_x_includes" = no; then
81ecdfbb 18046 # Guess where to find include files, by looking for Xlib.h.
c906108c 18047 # First, try using that file with no special directory specified.
81ecdfbb 18048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 18049/* end confdefs.h. */
81ecdfbb 18050#include <X11/Xlib.h>
bec39cab 18051_ACEOF
81ecdfbb 18052if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
18053 # We can compile using X headers with no special include directory.
18054ac_x_includes=
18055else
bec39cab 18056 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 18057 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
18058 ac_x_includes=$ac_dir
18059 break
18060 fi
18061done
c906108c 18062fi
d0ac1c44 18063rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 18064fi # $ac_x_includes = no
c906108c 18065
bec39cab 18066if test "$ac_x_libraries" = no; then
c906108c 18067 # Check for the libraries.
c906108c
SS
18068 # See if we find them without any special options.
18069 # Don't add to $LIBS permanently.
bec39cab 18070 ac_save_LIBS=$LIBS
81ecdfbb
RW
18071 LIBS="-lX11 $LIBS"
18072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 18073/* end confdefs.h. */
81ecdfbb 18074#include <X11/Xlib.h>
bec39cab
AC
18075int
18076main ()
18077{
81ecdfbb 18078XrmInitialize ()
bec39cab
AC
18079 ;
18080 return 0;
18081}
18082_ACEOF
81ecdfbb 18083if ac_fn_c_try_link "$LINENO"; then :
bec39cab 18084 LIBS=$ac_save_LIBS
c906108c
SS
18085# We can link X programs with no special library path.
18086ac_x_libraries=
18087else
81ecdfbb
RW
18088 LIBS=$ac_save_LIBS
18089for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 18090do
bec39cab 18091 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
18092 for ac_extension in a so sl dylib la dll; do
18093 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
18094 ac_x_libraries=$ac_dir
18095 break 2
18096 fi
18097 done
18098done
18099fi
81ecdfbb
RW
18100rm -f core conftest.err conftest.$ac_objext \
18101 conftest$ac_exeext conftest.$ac_ext
bec39cab 18102fi # $ac_x_libraries = no
c906108c 18103
81ecdfbb
RW
18104case $ac_x_includes,$ac_x_libraries in #(
18105 no,* | *,no | *\'*)
18106 # Didn't find X, or a directory has "'" in its name.
18107 ac_cv_have_x="have_x=no";; #(
18108 *)
18109 # Record where we found X for the cache.
18110 ac_cv_have_x="have_x=yes\
18111 ac_x_includes='$ac_x_includes'\
18112 ac_x_libraries='$ac_x_libraries'"
18113esac
c906108c 18114fi
81ecdfbb
RW
18115;; #(
18116 *) have_x=yes;;
18117 esac
c906108c
SS
18118 eval "$ac_cv_have_x"
18119fi # $with_x != no
18120
18121if test "$have_x" != yes; then
81ecdfbb
RW
18122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18123$as_echo "$have_x" >&6; }
c906108c
SS
18124 no_x=yes
18125else
18126 # If each of the values was on the command line, it overrides each guess.
18127 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18128 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18129 # Update the cache value to reflect the command line values.
81ecdfbb
RW
18130 ac_cv_have_x="have_x=yes\
18131 ac_x_includes='$x_includes'\
18132 ac_x_libraries='$x_libraries'"
18133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18134$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
18135fi
18136
18137
bec39cab 18138# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 18139# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
18140# This code just checks for a few cases where we'd like to ignore those
18141# definitions, even when they're present in the '.mt' file. These cases
18142# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 18143# not part of the source tree.
7a292a7a 18144#
81ecdfbb
RW
18145# Check whether --enable-sim was given.
18146if test "${enable_sim+set}" = set; then :
18147 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
18148 echo "enableval = ${enableval}";
18149 case "${enableval}" in
18150 yes) ignore_sim=false ;;
18151 no) ignore_sim=true ;;
18152 *) ignore_sim=false ;;
18153 esac
18154else
18155 ignore_sim=false
81ecdfbb
RW
18156fi
18157
7a292a7a
SS
18158
18159if test ! -d "${srcdir}/../sim"; then
18160 ignore_sim=true
18161fi
18162
9b624dbe
UW
18163SIM=
18164SIM_OBS=
18165if test "${ignore_sim}" = "false"; then
18166 if test x"${gdb_sim}" != x ; then
18167 SIM="${gdb_sim}"
18168 SIM_OBS="remote-sim.o"
60ca704f 18169
81ecdfbb 18170$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 18171
976102cd
PA
18172
18173 # Some tdep code should only be compiled in when the ppc sim is
18174 # built. PR sim/13418.
18175 case $target in
18176 powerpc*-*-*)
18177
18178$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18179
18180 ;;
18181 esac
9b624dbe 18182 fi
7a292a7a
SS
18183fi
18184
18185
18186
c906108c
SS
18187
18188
18189
18190
18191
18192
dfcd3bfb 18193
e56ac5c3
AC
18194
18195
b3a90332
AC
18196
18197
c35f4ffc 18198# List of host floatformats.
bec39cab
AC
18199
18200cat >>confdefs.h <<_ACEOF
c35f4ffc 18201#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 18202_ACEOF
c35f4ffc 18203
bec39cab
AC
18204
18205cat >>confdefs.h <<_ACEOF
c35f4ffc 18206#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
18207_ACEOF
18208
c35f4ffc 18209
bec39cab 18210cat >>confdefs.h <<_ACEOF
c35f4ffc 18211#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 18212_ACEOF
c35f4ffc
AC
18213
18214
c906108c
SS
18215# target_subdir is used by the testsuite to find the target libraries.
18216target_subdir=
18217if test "${host}" != "${target}"; then
18218 target_subdir="${target_alias}/"
18219fi
18220
18221
21ea5acd 18222# Import nat definitions.
2b351b19 18223nat_makefile_frag=/dev/null
771b4502 18224if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
18225 . ${srcdir}/configure.nat
18226 nativefile=$NAT_FILE
c906108c 18227fi
c906108c 18228
c906108c
SS
18229
18230
18231
21ea5acd
SDJ
18232
18233
18234
18235
18236
c906108c
SS
18237
18238
b00a8037 18239if test x"${gdb_osabi}" != x ; then
bec39cab
AC
18240
18241cat >>confdefs.h <<_ACEOF
b00a8037 18242#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 18243_ACEOF
b00a8037
DJ
18244
18245fi
18246
393fd4c3
YQ
18247# Check for babeltrace and babeltrace-ctf
18248
18249# Check whether --with-babeltrace was given.
18250if test "${with_babeltrace+set}" = set; then :
18251 withval=$with_babeltrace;
18252else
18253 with_babeltrace=auto
18254fi
18255
18256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18257$as_echo_n "checking whether to use babeltrace... " >&6; }
18258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18259$as_echo "$with_babeltrace" >&6; }
18260
18261if test "x$with_babeltrace" = "xno"; then
18262 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18263$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18264else
18265 # Append -Werror to CFLAGS so that configure can catch the warning
18266 # "assignment from incompatible pointer type", which is related to
18267 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18268 # in GDB, while babeltrace 1.0.3 is broken.
18269 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18270 # safe to save and restore CFLAGS here.
18271 saved_CFLAGS=$CFLAGS
18272 CFLAGS="$CFLAGS -Werror"
18273
18274
18275
18276
18277
18278
18279
18280
18281 use_additional=yes
18282
18283 acl_save_prefix="$prefix"
18284 prefix="$acl_final_prefix"
18285 acl_save_exec_prefix="$exec_prefix"
18286 exec_prefix="$acl_final_exec_prefix"
18287
18288 eval additional_includedir=\"$includedir\"
18289 eval additional_libdir=\"$libdir\"
18290
18291 exec_prefix="$acl_save_exec_prefix"
18292 prefix="$acl_save_prefix"
18293
18294
18295# Check whether --with-libbabeltrace-prefix was given.
18296if test "${with_libbabeltrace_prefix+set}" = set; then :
18297 withval=$with_libbabeltrace_prefix;
18298 if test "X$withval" = "Xno"; then
18299 use_additional=no
18300 else
18301 if test "X$withval" = "X"; then
18302
18303 acl_save_prefix="$prefix"
18304 prefix="$acl_final_prefix"
18305 acl_save_exec_prefix="$exec_prefix"
18306 exec_prefix="$acl_final_exec_prefix"
18307
18308 eval additional_includedir=\"$includedir\"
18309 eval additional_libdir=\"$libdir\"
18310
18311 exec_prefix="$acl_save_exec_prefix"
18312 prefix="$acl_save_prefix"
18313
18314 else
18315 additional_includedir="$withval/include"
18316 additional_libdir="$withval/lib"
18317 fi
18318 fi
18319
18320fi
18321
9f1528a1
AB
18322
18323# Check whether --with-libbabeltrace-type was given.
18324if test "${with_libbabeltrace_type+set}" = set; then :
18325 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18326else
18327 with_libbabeltrace_type=auto
18328fi
18329
18330 lib_type=`eval echo \$with_libbabeltrace_type`
18331
393fd4c3
YQ
18332 LIBBABELTRACE=
18333 LTLIBBABELTRACE=
18334 INCBABELTRACE=
18335 rpathdirs=
18336 ltrpathdirs=
18337 names_already_handled=
18338 names_next_round='babeltrace babeltrace-ctf'
18339 while test -n "$names_next_round"; do
18340 names_this_round="$names_next_round"
18341 names_next_round=
18342 for name in $names_this_round; do
18343 already_handled=
18344 for n in $names_already_handled; do
18345 if test "$n" = "$name"; then
18346 already_handled=yes
18347 break
18348 fi
18349 done
18350 if test -z "$already_handled"; then
18351 names_already_handled="$names_already_handled $name"
18352 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18353 eval value=\"\$HAVE_LIB$uppername\"
18354 if test -n "$value"; then
18355 if test "$value" = yes; then
18356 eval value=\"\$LIB$uppername\"
18357 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18358 eval value=\"\$LTLIB$uppername\"
18359 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18360 else
18361 :
18362 fi
18363 else
18364 found_dir=
18365 found_la=
18366 found_so=
18367 found_a=
18368 if test $use_additional = yes; then
9f1528a1 18369 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18370 found_dir="$additional_libdir"
18371 found_so="$additional_libdir/lib$name.$shlibext"
18372 if test -f "$additional_libdir/lib$name.la"; then
18373 found_la="$additional_libdir/lib$name.la"
18374 fi
9f1528a1 18375 elif test x$lib_type != xshared; then
393fd4c3
YQ
18376 if test -f "$additional_libdir/lib$name.$libext"; then
18377 found_dir="$additional_libdir"
18378 found_a="$additional_libdir/lib$name.$libext"
18379 if test -f "$additional_libdir/lib$name.la"; then
18380 found_la="$additional_libdir/lib$name.la"
18381 fi
18382 fi
18383 fi
18384 fi
18385 if test "X$found_dir" = "X"; then
18386 for x in $LDFLAGS $LTLIBBABELTRACE; do
18387
18388 acl_save_prefix="$prefix"
18389 prefix="$acl_final_prefix"
18390 acl_save_exec_prefix="$exec_prefix"
18391 exec_prefix="$acl_final_exec_prefix"
18392 eval x=\"$x\"
18393 exec_prefix="$acl_save_exec_prefix"
18394 prefix="$acl_save_prefix"
18395
18396 case "$x" in
18397 -L*)
18398 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 18399 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18400 found_dir="$dir"
18401 found_so="$dir/lib$name.$shlibext"
18402 if test -f "$dir/lib$name.la"; then
18403 found_la="$dir/lib$name.la"
18404 fi
9f1528a1 18405 elif test x$lib_type != xshared; then
393fd4c3
YQ
18406 if test -f "$dir/lib$name.$libext"; then
18407 found_dir="$dir"
18408 found_a="$dir/lib$name.$libext"
18409 if test -f "$dir/lib$name.la"; then
18410 found_la="$dir/lib$name.la"
18411 fi
18412 fi
18413 fi
18414 ;;
18415 esac
18416 if test "X$found_dir" != "X"; then
18417 break
18418 fi
18419 done
18420 fi
18421 if test "X$found_dir" != "X"; then
18422 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18423 if test "X$found_so" != "X"; then
18424 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18425 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18426 else
18427 haveit=
18428 for x in $ltrpathdirs; do
18429 if test "X$x" = "X$found_dir"; then
18430 haveit=yes
18431 break
18432 fi
18433 done
18434 if test -z "$haveit"; then
18435 ltrpathdirs="$ltrpathdirs $found_dir"
18436 fi
18437 if test "$hardcode_direct" = yes; then
18438 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18439 else
18440 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18441 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18442 haveit=
18443 for x in $rpathdirs; do
18444 if test "X$x" = "X$found_dir"; then
18445 haveit=yes
18446 break
18447 fi
18448 done
18449 if test -z "$haveit"; then
18450 rpathdirs="$rpathdirs $found_dir"
18451 fi
18452 else
18453 haveit=
18454 for x in $LDFLAGS $LIBBABELTRACE; do
18455
18456 acl_save_prefix="$prefix"
18457 prefix="$acl_final_prefix"
18458 acl_save_exec_prefix="$exec_prefix"
18459 exec_prefix="$acl_final_exec_prefix"
18460 eval x=\"$x\"
18461 exec_prefix="$acl_save_exec_prefix"
18462 prefix="$acl_save_prefix"
18463
18464 if test "X$x" = "X-L$found_dir"; then
18465 haveit=yes
18466 break
18467 fi
18468 done
18469 if test -z "$haveit"; then
18470 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18471 fi
18472 if test "$hardcode_minus_L" != no; then
18473 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18474 else
18475 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18476 fi
18477 fi
18478 fi
18479 fi
18480 else
18481 if test "X$found_a" != "X"; then
18482 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18483 else
18484 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18485 fi
18486 fi
18487 additional_includedir=
18488 case "$found_dir" in
18489 */lib | */lib/)
18490 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18491 additional_includedir="$basedir/include"
18492 ;;
18493 esac
18494 if test "X$additional_includedir" != "X"; then
18495 if test "X$additional_includedir" != "X/usr/include"; then
18496 haveit=
18497 if test "X$additional_includedir" = "X/usr/local/include"; then
18498 if test -n "$GCC"; then
18499 case $host_os in
18500 linux*) haveit=yes;;
18501 esac
18502 fi
18503 fi
18504 if test -z "$haveit"; then
18505 for x in $CPPFLAGS $INCBABELTRACE; do
18506
18507 acl_save_prefix="$prefix"
18508 prefix="$acl_final_prefix"
18509 acl_save_exec_prefix="$exec_prefix"
18510 exec_prefix="$acl_final_exec_prefix"
18511 eval x=\"$x\"
18512 exec_prefix="$acl_save_exec_prefix"
18513 prefix="$acl_save_prefix"
18514
18515 if test "X$x" = "X-I$additional_includedir"; then
18516 haveit=yes
18517 break
18518 fi
18519 done
18520 if test -z "$haveit"; then
18521 if test -d "$additional_includedir"; then
18522 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18523 fi
18524 fi
18525 fi
18526 fi
18527 fi
18528 if test -n "$found_la"; then
18529 save_libdir="$libdir"
18530 case "$found_la" in
18531 */* | *\\*) . "$found_la" ;;
18532 *) . "./$found_la" ;;
18533 esac
18534 libdir="$save_libdir"
18535 for dep in $dependency_libs; do
18536 case "$dep" in
18537 -L*)
18538 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18539 if test "X$additional_libdir" != "X/usr/lib"; then
18540 haveit=
18541 if test "X$additional_libdir" = "X/usr/local/lib"; then
18542 if test -n "$GCC"; then
18543 case $host_os in
18544 linux*) haveit=yes;;
18545 esac
18546 fi
18547 fi
18548 if test -z "$haveit"; then
18549 haveit=
18550 for x in $LDFLAGS $LIBBABELTRACE; do
18551
18552 acl_save_prefix="$prefix"
18553 prefix="$acl_final_prefix"
18554 acl_save_exec_prefix="$exec_prefix"
18555 exec_prefix="$acl_final_exec_prefix"
18556 eval x=\"$x\"
18557 exec_prefix="$acl_save_exec_prefix"
18558 prefix="$acl_save_prefix"
18559
18560 if test "X$x" = "X-L$additional_libdir"; then
18561 haveit=yes
18562 break
18563 fi
18564 done
18565 if test -z "$haveit"; then
18566 if test -d "$additional_libdir"; then
18567 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18568 fi
18569 fi
18570 haveit=
18571 for x in $LDFLAGS $LTLIBBABELTRACE; do
18572
18573 acl_save_prefix="$prefix"
18574 prefix="$acl_final_prefix"
18575 acl_save_exec_prefix="$exec_prefix"
18576 exec_prefix="$acl_final_exec_prefix"
18577 eval x=\"$x\"
18578 exec_prefix="$acl_save_exec_prefix"
18579 prefix="$acl_save_prefix"
18580
18581 if test "X$x" = "X-L$additional_libdir"; then
18582 haveit=yes
18583 break
18584 fi
18585 done
18586 if test -z "$haveit"; then
18587 if test -d "$additional_libdir"; then
18588 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18589 fi
18590 fi
18591 fi
18592 fi
18593 ;;
18594 -R*)
18595 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18596 if test "$enable_rpath" != no; then
18597 haveit=
18598 for x in $rpathdirs; do
18599 if test "X$x" = "X$dir"; then
18600 haveit=yes
18601 break
18602 fi
18603 done
18604 if test -z "$haveit"; then
18605 rpathdirs="$rpathdirs $dir"
18606 fi
18607 haveit=
18608 for x in $ltrpathdirs; do
18609 if test "X$x" = "X$dir"; then
18610 haveit=yes
18611 break
18612 fi
18613 done
18614 if test -z "$haveit"; then
18615 ltrpathdirs="$ltrpathdirs $dir"
18616 fi
18617 fi
18618 ;;
18619 -l*)
18620 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18621 ;;
18622 *.la)
18623 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18624 ;;
18625 *)
18626 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18627 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18628 ;;
18629 esac
18630 done
18631 fi
18632 else
9f1528a1
AB
18633 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18634 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18635 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18636 else
18637 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
18638 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
18639 fi
393fd4c3
YQ
18640 fi
18641 fi
18642 fi
18643 done
18644 done
18645 if test "X$rpathdirs" != "X"; then
18646 if test -n "$hardcode_libdir_separator"; then
18647 alldirs=
18648 for found_dir in $rpathdirs; do
18649 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18650 done
18651 acl_save_libdir="$libdir"
18652 libdir="$alldirs"
18653 eval flag=\"$hardcode_libdir_flag_spec\"
18654 libdir="$acl_save_libdir"
18655 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18656 else
18657 for found_dir in $rpathdirs; do
18658 acl_save_libdir="$libdir"
18659 libdir="$found_dir"
18660 eval flag=\"$hardcode_libdir_flag_spec\"
18661 libdir="$acl_save_libdir"
18662 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18663 done
18664 fi
18665 fi
18666 if test "X$ltrpathdirs" != "X"; then
18667 for found_dir in $ltrpathdirs; do
18668 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18669 done
18670 fi
18671
18672
18673 ac_save_CPPFLAGS="$CPPFLAGS"
18674
18675 for element in $INCBABELTRACE; do
18676 haveit=
18677 for x in $CPPFLAGS; do
18678
18679 acl_save_prefix="$prefix"
18680 prefix="$acl_final_prefix"
18681 acl_save_exec_prefix="$exec_prefix"
18682 exec_prefix="$acl_final_exec_prefix"
18683 eval x=\"$x\"
18684 exec_prefix="$acl_save_exec_prefix"
18685 prefix="$acl_save_prefix"
18686
18687 if test "X$x" = "X$element"; then
18688 haveit=yes
18689 break
18690 fi
18691 done
18692 if test -z "$haveit"; then
18693 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18694 fi
18695 done
18696
18697
18698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18699$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 18700if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
18701 $as_echo_n "(cached) " >&6
18702else
18703
18704 ac_save_LIBS="$LIBS"
18705 LIBS="$LIBS $LIBBABELTRACE"
18706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18707/* end confdefs.h. */
18708#include <babeltrace/babeltrace.h>
18709 #include <babeltrace/ctf/events.h>
18710 #include <babeltrace/ctf/iterator.h>
18711int
18712main ()
18713{
18714struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18715 struct bt_ctf_event *event = NULL;
18716 const struct bt_definition *scope;
18717
13cdc2af 18718 pos->type = BT_SEEK_BEGIN;
65c749e7 18719 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
18720 scope = bt_ctf_get_top_level_scope (event,
18721 BT_STREAM_EVENT_HEADER);
18722 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18723
18724 ;
18725 return 0;
18726}
18727_ACEOF
18728if ac_fn_c_try_link "$LINENO"; then :
18729 ac_cv_libbabeltrace=yes
18730else
18731 ac_cv_libbabeltrace=no
18732fi
18733rm -f core conftest.err conftest.$ac_objext \
18734 conftest$ac_exeext conftest.$ac_ext
18735 LIBS="$ac_save_LIBS"
18736
18737fi
18738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18739$as_echo "$ac_cv_libbabeltrace" >&6; }
18740 if test "$ac_cv_libbabeltrace" = yes; then
18741 HAVE_LIBBABELTRACE=yes
18742
18743$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18744
18745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18746$as_echo_n "checking how to link with libbabeltrace... " >&6; }
18747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18748$as_echo "$LIBBABELTRACE" >&6; }
18749 else
18750 HAVE_LIBBABELTRACE=no
18751 CPPFLAGS="$ac_save_CPPFLAGS"
18752 LIBBABELTRACE=
18753 LTLIBBABELTRACE=
18754 fi
18755
18756
18757
18758
18759
18760
18761 CFLAGS=$saved_CFLAGS
18762
18763 if test "$HAVE_LIBBABELTRACE" != yes; then
18764 if test "$with_babeltrace" = yes; then
d0ac1c44 18765 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
18766 else
18767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18768$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18769 fi
18770 fi
18771fi
18772
ccb1ba62
CB
18773# Check for xxhash
18774
18775# Check whether --with-xxhash was given.
18776if test "${with_xxhash+set}" = set; then :
18777 withval=$with_xxhash;
18778else
18779 with_xxhash=auto
18780fi
18781
18782
1776e3e5
NA
18783 # Check whether --enable-libctf was given.
18784if test "${enable_libctf+set}" = set; then :
18785 enableval=$enable_libctf;
18786 case "$enableval" in
18787 yes|no) ;;
18788 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
18789 esac
18790
18791else
18792 enable_libctf=yes
18793fi
18794
18795
18796if test x${enable_static} = xno; then
18797 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
18798 CTF_DEPS="../libctf/.libs/libctf.so"
18799else
18800 LIBCTF="../libctf/.libs/libctf.a"
18801 CTF_DEPS="$LIBCTF"
18802fi
18803if test "${enable_libctf}" = yes; then
18804
18805$as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
18806
18807else
18808 LIBCTF=
18809 CTF_DEPS=
18810fi
18811
18812
18813
18814
18815# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
18816# empty version.
18817
ccb1ba62
CB
18818if test "x$with_xxhash" != "xno"; then
18819
18820
18821
18822
18823
18824
18825
18826
18827 use_additional=yes
18828
18829 acl_save_prefix="$prefix"
18830 prefix="$acl_final_prefix"
18831 acl_save_exec_prefix="$exec_prefix"
18832 exec_prefix="$acl_final_exec_prefix"
18833
18834 eval additional_includedir=\"$includedir\"
18835 eval additional_libdir=\"$libdir\"
18836
18837 exec_prefix="$acl_save_exec_prefix"
18838 prefix="$acl_save_prefix"
18839
18840
18841# Check whether --with-libxxhash-prefix was given.
18842if test "${with_libxxhash_prefix+set}" = set; then :
18843 withval=$with_libxxhash_prefix;
18844 if test "X$withval" = "Xno"; then
18845 use_additional=no
18846 else
18847 if test "X$withval" = "X"; then
18848
18849 acl_save_prefix="$prefix"
18850 prefix="$acl_final_prefix"
18851 acl_save_exec_prefix="$exec_prefix"
18852 exec_prefix="$acl_final_exec_prefix"
18853
18854 eval additional_includedir=\"$includedir\"
18855 eval additional_libdir=\"$libdir\"
18856
18857 exec_prefix="$acl_save_exec_prefix"
18858 prefix="$acl_save_prefix"
18859
18860 else
18861 additional_includedir="$withval/include"
18862 additional_libdir="$withval/lib"
18863 fi
18864 fi
18865
18866fi
18867
9f1528a1
AB
18868
18869# Check whether --with-libxxhash-type was given.
18870if test "${with_libxxhash_type+set}" = set; then :
18871 withval=$with_libxxhash_type; with_libxxhash_type=$withval
18872else
18873 with_libxxhash_type=auto
18874fi
18875
18876 lib_type=`eval echo \$with_libxxhash_type`
18877
ccb1ba62
CB
18878 LIBXXHASH=
18879 LTLIBXXHASH=
18880 INCXXHASH=
18881 rpathdirs=
18882 ltrpathdirs=
18883 names_already_handled=
18884 names_next_round='xxhash '
18885 while test -n "$names_next_round"; do
18886 names_this_round="$names_next_round"
18887 names_next_round=
18888 for name in $names_this_round; do
18889 already_handled=
18890 for n in $names_already_handled; do
18891 if test "$n" = "$name"; then
18892 already_handled=yes
18893 break
18894 fi
18895 done
18896 if test -z "$already_handled"; then
18897 names_already_handled="$names_already_handled $name"
18898 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18899 eval value=\"\$HAVE_LIB$uppername\"
18900 if test -n "$value"; then
18901 if test "$value" = yes; then
18902 eval value=\"\$LIB$uppername\"
18903 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18904 eval value=\"\$LTLIB$uppername\"
18905 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18906 else
18907 :
18908 fi
18909 else
18910 found_dir=
18911 found_la=
18912 found_so=
18913 found_a=
18914 if test $use_additional = yes; then
9f1528a1 18915 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
18916 found_dir="$additional_libdir"
18917 found_so="$additional_libdir/lib$name.$shlibext"
18918 if test -f "$additional_libdir/lib$name.la"; then
18919 found_la="$additional_libdir/lib$name.la"
18920 fi
9f1528a1 18921 elif test x$lib_type != xshared; then
ccb1ba62
CB
18922 if test -f "$additional_libdir/lib$name.$libext"; then
18923 found_dir="$additional_libdir"
18924 found_a="$additional_libdir/lib$name.$libext"
18925 if test -f "$additional_libdir/lib$name.la"; then
18926 found_la="$additional_libdir/lib$name.la"
18927 fi
18928 fi
18929 fi
18930 fi
18931 if test "X$found_dir" = "X"; then
18932 for x in $LDFLAGS $LTLIBXXHASH; do
18933
18934 acl_save_prefix="$prefix"
18935 prefix="$acl_final_prefix"
18936 acl_save_exec_prefix="$exec_prefix"
18937 exec_prefix="$acl_final_exec_prefix"
18938 eval x=\"$x\"
18939 exec_prefix="$acl_save_exec_prefix"
18940 prefix="$acl_save_prefix"
18941
18942 case "$x" in
18943 -L*)
18944 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 18945 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
18946 found_dir="$dir"
18947 found_so="$dir/lib$name.$shlibext"
18948 if test -f "$dir/lib$name.la"; then
18949 found_la="$dir/lib$name.la"
18950 fi
9f1528a1 18951 elif test x$lib_type != xshared; then
ccb1ba62
CB
18952 if test -f "$dir/lib$name.$libext"; then
18953 found_dir="$dir"
18954 found_a="$dir/lib$name.$libext"
18955 if test -f "$dir/lib$name.la"; then
18956 found_la="$dir/lib$name.la"
18957 fi
18958 fi
18959 fi
18960 ;;
18961 esac
18962 if test "X$found_dir" != "X"; then
18963 break
18964 fi
18965 done
18966 fi
18967 if test "X$found_dir" != "X"; then
18968 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18969 if test "X$found_so" != "X"; then
18970 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18971 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18972 else
18973 haveit=
18974 for x in $ltrpathdirs; do
18975 if test "X$x" = "X$found_dir"; then
18976 haveit=yes
18977 break
18978 fi
18979 done
18980 if test -z "$haveit"; then
18981 ltrpathdirs="$ltrpathdirs $found_dir"
18982 fi
18983 if test "$hardcode_direct" = yes; then
18984 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18985 else
18986 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18987 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18988 haveit=
18989 for x in $rpathdirs; do
18990 if test "X$x" = "X$found_dir"; then
18991 haveit=yes
18992 break
18993 fi
18994 done
18995 if test -z "$haveit"; then
18996 rpathdirs="$rpathdirs $found_dir"
18997 fi
18998 else
18999 haveit=
19000 for x in $LDFLAGS $LIBXXHASH; do
19001
19002 acl_save_prefix="$prefix"
19003 prefix="$acl_final_prefix"
19004 acl_save_exec_prefix="$exec_prefix"
19005 exec_prefix="$acl_final_exec_prefix"
19006 eval x=\"$x\"
19007 exec_prefix="$acl_save_exec_prefix"
19008 prefix="$acl_save_prefix"
19009
19010 if test "X$x" = "X-L$found_dir"; then
19011 haveit=yes
19012 break
19013 fi
19014 done
19015 if test -z "$haveit"; then
19016 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
19017 fi
19018 if test "$hardcode_minus_L" != no; then
19019 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19020 else
19021 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19022 fi
19023 fi
19024 fi
19025 fi
19026 else
19027 if test "X$found_a" != "X"; then
19028 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
19029 else
19030 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
19031 fi
19032 fi
19033 additional_includedir=
19034 case "$found_dir" in
19035 */lib | */lib/)
19036 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19037 additional_includedir="$basedir/include"
19038 ;;
19039 esac
19040 if test "X$additional_includedir" != "X"; then
19041 if test "X$additional_includedir" != "X/usr/include"; then
19042 haveit=
19043 if test "X$additional_includedir" = "X/usr/local/include"; then
19044 if test -n "$GCC"; then
19045 case $host_os in
19046 linux*) haveit=yes;;
19047 esac
19048 fi
19049 fi
19050 if test -z "$haveit"; then
19051 for x in $CPPFLAGS $INCXXHASH; do
19052
19053 acl_save_prefix="$prefix"
19054 prefix="$acl_final_prefix"
19055 acl_save_exec_prefix="$exec_prefix"
19056 exec_prefix="$acl_final_exec_prefix"
19057 eval x=\"$x\"
19058 exec_prefix="$acl_save_exec_prefix"
19059 prefix="$acl_save_prefix"
19060
19061 if test "X$x" = "X-I$additional_includedir"; then
19062 haveit=yes
19063 break
19064 fi
19065 done
19066 if test -z "$haveit"; then
19067 if test -d "$additional_includedir"; then
19068 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19069 fi
19070 fi
19071 fi
19072 fi
19073 fi
19074 if test -n "$found_la"; then
19075 save_libdir="$libdir"
19076 case "$found_la" in
19077 */* | *\\*) . "$found_la" ;;
19078 *) . "./$found_la" ;;
19079 esac
19080 libdir="$save_libdir"
19081 for dep in $dependency_libs; do
19082 case "$dep" in
19083 -L*)
19084 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19085 if test "X$additional_libdir" != "X/usr/lib"; then
19086 haveit=
19087 if test "X$additional_libdir" = "X/usr/local/lib"; then
19088 if test -n "$GCC"; then
19089 case $host_os in
19090 linux*) haveit=yes;;
19091 esac
19092 fi
19093 fi
19094 if test -z "$haveit"; then
19095 haveit=
19096 for x in $LDFLAGS $LIBXXHASH; do
19097
19098 acl_save_prefix="$prefix"
19099 prefix="$acl_final_prefix"
19100 acl_save_exec_prefix="$exec_prefix"
19101 exec_prefix="$acl_final_exec_prefix"
19102 eval x=\"$x\"
19103 exec_prefix="$acl_save_exec_prefix"
19104 prefix="$acl_save_prefix"
19105
19106 if test "X$x" = "X-L$additional_libdir"; then
19107 haveit=yes
19108 break
19109 fi
19110 done
19111 if test -z "$haveit"; then
19112 if test -d "$additional_libdir"; then
19113 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19114 fi
19115 fi
19116 haveit=
19117 for x in $LDFLAGS $LTLIBXXHASH; do
19118
19119 acl_save_prefix="$prefix"
19120 prefix="$acl_final_prefix"
19121 acl_save_exec_prefix="$exec_prefix"
19122 exec_prefix="$acl_final_exec_prefix"
19123 eval x=\"$x\"
19124 exec_prefix="$acl_save_exec_prefix"
19125 prefix="$acl_save_prefix"
19126
19127 if test "X$x" = "X-L$additional_libdir"; then
19128 haveit=yes
19129 break
19130 fi
19131 done
19132 if test -z "$haveit"; then
19133 if test -d "$additional_libdir"; then
19134 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19135 fi
19136 fi
19137 fi
19138 fi
19139 ;;
19140 -R*)
19141 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19142 if test "$enable_rpath" != no; then
19143 haveit=
19144 for x in $rpathdirs; do
19145 if test "X$x" = "X$dir"; then
19146 haveit=yes
19147 break
19148 fi
19149 done
19150 if test -z "$haveit"; then
19151 rpathdirs="$rpathdirs $dir"
19152 fi
19153 haveit=
19154 for x in $ltrpathdirs; do
19155 if test "X$x" = "X$dir"; then
19156 haveit=yes
19157 break
19158 fi
19159 done
19160 if test -z "$haveit"; then
19161 ltrpathdirs="$ltrpathdirs $dir"
19162 fi
19163 fi
19164 ;;
19165 -l*)
19166 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19167 ;;
19168 *.la)
19169 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19170 ;;
19171 *)
19172 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19173 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19174 ;;
19175 esac
19176 done
19177 fi
19178 else
9f1528a1
AB
19179 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19180 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19181 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19182 else
19183 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19184 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19185 fi
ccb1ba62
CB
19186 fi
19187 fi
19188 fi
19189 done
19190 done
19191 if test "X$rpathdirs" != "X"; then
19192 if test -n "$hardcode_libdir_separator"; then
19193 alldirs=
19194 for found_dir in $rpathdirs; do
19195 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19196 done
19197 acl_save_libdir="$libdir"
19198 libdir="$alldirs"
19199 eval flag=\"$hardcode_libdir_flag_spec\"
19200 libdir="$acl_save_libdir"
19201 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19202 else
19203 for found_dir in $rpathdirs; do
19204 acl_save_libdir="$libdir"
19205 libdir="$found_dir"
19206 eval flag=\"$hardcode_libdir_flag_spec\"
19207 libdir="$acl_save_libdir"
19208 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19209 done
19210 fi
19211 fi
19212 if test "X$ltrpathdirs" != "X"; then
19213 for found_dir in $ltrpathdirs; do
19214 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19215 done
19216 fi
19217
19218
19219 ac_save_CPPFLAGS="$CPPFLAGS"
19220
19221 for element in $INCXXHASH; do
19222 haveit=
19223 for x in $CPPFLAGS; do
19224
19225 acl_save_prefix="$prefix"
19226 prefix="$acl_final_prefix"
19227 acl_save_exec_prefix="$exec_prefix"
19228 exec_prefix="$acl_final_exec_prefix"
19229 eval x=\"$x\"
19230 exec_prefix="$acl_save_exec_prefix"
19231 prefix="$acl_save_prefix"
19232
19233 if test "X$x" = "X$element"; then
19234 haveit=yes
19235 break
19236 fi
19237 done
19238 if test -z "$haveit"; then
19239 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19240 fi
19241 done
19242
19243
19244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19245$as_echo_n "checking for libxxhash... " >&6; }
19246if ${ac_cv_libxxhash+:} false; then :
19247 $as_echo_n "(cached) " >&6
19248else
19249
19250 ac_save_LIBS="$LIBS"
19251 LIBS="$LIBS $LIBXXHASH"
19252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19253/* end confdefs.h. */
19254#include <xxhash.h>
19255int
19256main ()
19257{
19258XXH32("foo", 3, 0);
19259
19260 ;
19261 return 0;
19262}
19263_ACEOF
19264if ac_fn_c_try_link "$LINENO"; then :
19265 ac_cv_libxxhash=yes
19266else
19267 ac_cv_libxxhash=no
19268fi
19269rm -f core conftest.err conftest.$ac_objext \
19270 conftest$ac_exeext conftest.$ac_ext
19271 LIBS="$ac_save_LIBS"
19272
19273fi
19274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19275$as_echo "$ac_cv_libxxhash" >&6; }
19276 if test "$ac_cv_libxxhash" = yes; then
19277 HAVE_LIBXXHASH=yes
19278
19279$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19280
19281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19282$as_echo_n "checking how to link with libxxhash... " >&6; }
19283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19284$as_echo "$LIBXXHASH" >&6; }
19285 else
19286 HAVE_LIBXXHASH=no
19287 CPPFLAGS="$ac_save_CPPFLAGS"
19288 LIBXXHASH=
19289 LTLIBXXHASH=
19290 fi
19291
19292
19293
19294
19295
19296
19297 if test "$HAVE_LIBXXHASH" != yes; then
19298 if test "$with_xxhash" = yes; then
19299 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19300 fi
19301 fi
19302 if test "x$with_xxhash" = "xauto"; then
19303 with_xxhash="$HAVE_LIBXXHASH"
19304 fi
19305fi
19306
19307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19308$as_echo_n "checking whether to use xxhash... " >&6; }
19309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19310$as_echo "$with_xxhash" >&6; }
19311
a0a461e5 19312NM_H=
c906108c
SS
19313rm -f nm.h
19314if test "${nativefile}" != ""; then
0f475e27
AC
19315 case "${nativefile}" in
19316 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19317 * ) GDB_NM_FILE="${nativefile}"
19318 esac
a0a461e5
TT
19319 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19320
60ca704f
SE
19321
19322cat >>confdefs.h <<_ACEOF
b78960be 19323#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 19324_ACEOF
5a2402b8 19325
a0a461e5 19326 NM_H=nm.h
c906108c 19327fi
5a2402b8
AC
19328
19329
a0a461e5 19330
e3487908
GKB
19331for ac_prog in xsltproc
19332do
19333 # Extract the first word of "$ac_prog", so it can be a program name with args.
19334set dummy $ac_prog; ac_word=$2
19335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19336$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 19337if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
19338 $as_echo_n "(cached) " >&6
19339else
19340 case $XSLTPROC in
19341 [\\/]* | ?:[\\/]*)
19342 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19343 ;;
19344 *)
19345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19346for as_dir in $PATH
19347do
19348 IFS=$as_save_IFS
19349 test -z "$as_dir" && as_dir=.
19350 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 19351 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
19352 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19353 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19354 break 2
19355 fi
19356done
19357 done
19358IFS=$as_save_IFS
19359
19360 ;;
19361esac
19362fi
19363XSLTPROC=$ac_cv_path_XSLTPROC
19364if test -n "$XSLTPROC"; then
19365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19366$as_echo "$XSLTPROC" >&6; }
19367else
19368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19369$as_echo "no" >&6; }
19370fi
19371
19372
19373 test -n "$XSLTPROC" && break
19374done
19375test -n "$XSLTPROC" || XSLTPROC="missing"
19376
19377if test "x$USE_MAINTAINER_MODE" = xyes; then
19378 if test "${XSLTPROC}" = missing; then
d0ac1c44 19379 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
19380 fi
19381fi
19382
19383
c906108c
SS
19384
19385
c906108c 19386
81ecdfbb 19387$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 19388
bec39cab 19389
8ecfd7bd
SDJ
19390
19391# Check whether we will enable the inclusion of unit tests when
19392# compiling GDB.
19393#
19394# The default value of this option changes depending whether we're on
19395# development mode (in which case it's "true") or not (in which case
db6878ac
SM
19396# it's "false"). The $development variable is set by the GDB_AC_COMMON
19397# macro, which must therefore be used before GDB_AC_SELFTEST.
4d696a5c
SM
19398
19399if test "x$development" != xtrue && test "x$development" != xfalse; then :
19400 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19401fi
19402
8ecfd7bd
SDJ
19403# Check whether --enable-unit-tests was given.
19404if test "${enable_unit_tests+set}" = set; then :
19405 enableval=$enable_unit_tests; case "${enableval}" in
19406 yes) enable_unittests=true ;;
19407 no) enable_unittests=false ;;
19408 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19409esac
19410else
19411 enable_unittests=$development
19412fi
19413
19414
19415if $enable_unittests; then
dcd1f979
TT
19416
19417$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19418
8ecfd7bd 19419
74cd3f9d
SM
19420 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19421 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
8ecfd7bd 19422
dcd1f979
TT
19423fi
19424
b292c783 19425
8ecfd7bd 19426
f6a88844
JM
19427 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19428 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19429 if test "x$GDB_TRANSFORM_NAME" = x; then
19430 GDB_TRANSFORM_NAME=gdb
19431 fi
19432
19433
19434
19435 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19436 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19437 if test "x$GCORE_TRANSFORM_NAME" = x; then
19438 GCORE_TRANSFORM_NAME=gcore
19439 fi
19440
b292c783
JK
19441
19442ac_config_files="$ac_config_files gcore"
19443
141ec9f6 19444ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 19445
89a34d1b 19446
bec39cab
AC
19447cat >confcache <<\_ACEOF
19448# This file is a shell script that caches the results of configure
19449# tests run on this system so they can be shared between configure
19450# scripts and configure runs, see configure's option --config-cache.
19451# It is not useful on other systems. If it contains results you don't
19452# want to keep, you may remove or edit it.
19453#
19454# config.status only pays attention to the cache file if you give it
19455# the --recheck option to rerun configure.
19456#
19457# `ac_cv_env_foo' variables (set or unset) will be overridden when
19458# loading this file, other *unset* `ac_cv_foo' will be assigned the
19459# following values.
19460
19461_ACEOF
19462
19463# The following way of writing the cache mishandles newlines in values,
19464# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 19465# So, we kill variables containing newlines.
bec39cab
AC
19466# Ultrix sh set writes to stderr and can't be redirected directly,
19467# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
19468(
19469 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19470 eval ac_val=\$$ac_var
19471 case $ac_val in #(
19472 *${as_nl}*)
19473 case $ac_var in #(
19474 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19475$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19476 esac
19477 case $ac_var in #(
19478 _ | IFS | as_nl) ;; #(
19479 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19480 *) { eval $ac_var=; unset $ac_var;} ;;
19481 esac ;;
19482 esac
19483 done
19484
bec39cab 19485 (set) 2>&1 |
81ecdfbb
RW
19486 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19487 *${as_nl}ac_space=\ *)
19488 # `set' does not quote correctly, so add quotes: double-quote
19489 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
19490 sed -n \
19491 "s/'/'\\\\''/g;
19492 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 19493 ;; #(
bec39cab
AC
19494 *)
19495 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 19496 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 19497 ;;
81ecdfbb
RW
19498 esac |
19499 sort
19500) |
bec39cab 19501 sed '
81ecdfbb 19502 /^ac_cv_env_/b end
bec39cab 19503 t clear
81ecdfbb 19504 :clear
bec39cab
AC
19505 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19506 t end
81ecdfbb
RW
19507 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19508 :end' >>confcache
19509if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19510 if test -w "$cache_file"; then
d0ac1c44 19511 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
19512 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19513$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
19514 if test ! -f "$cache_file" || test -h "$cache_file"; then
19515 cat confcache >"$cache_file"
19516 else
19517 case $cache_file in #(
19518 */* | ?:*)
19519 mv -f confcache "$cache_file"$$ &&
19520 mv -f "$cache_file"$$ "$cache_file" ;; #(
19521 *)
19522 mv -f confcache "$cache_file" ;;
19523 esac
19524 fi
19525 fi
bec39cab 19526 else
81ecdfbb
RW
19527 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19528$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
19529 fi
19530fi
19531rm -f confcache
19532
19533test "x$prefix" = xNONE && prefix=$ac_default_prefix
19534# Let make expand exec_prefix.
19535test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19536
bec39cab
AC
19537DEFS=-DHAVE_CONFIG_H
19538
19539ac_libobjs=
19540ac_ltlibobjs=
d0ac1c44 19541U=
bec39cab
AC
19542for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19543 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
19544 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19545 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19546 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19547 # will be set to the directory where LIBOBJS objects are built.
19548 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19549 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
19550done
19551LIBOBJS=$ac_libobjs
19552
19553LTLIBOBJS=$ac_ltlibobjs
19554
19555
85981d60 19556if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 19557 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 19558Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 19559fi
4df42755 19560if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 19561 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
19562Usually this means the macro was only invoked conditionally." "$LINENO" 5
19563fi
19564if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 19565 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
19566Usually this means the macro was only invoked conditionally." "$LINENO" 5
19567fi
81ecdfbb
RW
19568
19569
d0ac1c44 19570: "${CONFIG_STATUS=./config.status}"
81ecdfbb 19571ac_write_fail=0
bec39cab
AC
19572ac_clean_files_save=$ac_clean_files
19573ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
19574{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19575$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19576as_write_fail=0
19577cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
19578#! $SHELL
19579# Generated by $as_me.
19580# Run this file to recreate the current configuration.
19581# Compiler output produced by configure, useful for debugging
19582# configure, is in config.log if it exists.
19583
19584debug=false
19585ac_cs_recheck=false
19586ac_cs_silent=false
bec39cab 19587
81ecdfbb
RW
19588SHELL=\${CONFIG_SHELL-$SHELL}
19589export SHELL
19590_ASEOF
19591cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19592## -------------------- ##
19593## M4sh Initialization. ##
19594## -------------------- ##
19595
19596# Be more Bourne compatible
19597DUALCASE=1; export DUALCASE # for MKS sh
19598if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
19599 emulate sh
19600 NULLCMD=:
81ecdfbb 19601 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
19602 # is contrary to our usage. Disable this feature.
19603 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
19604 setopt NO_GLOB_SUBST
19605else
19606 case `(set -o) 2>/dev/null` in #(
19607 *posix*) :
19608 set -o posix ;; #(
19609 *) :
19610 ;;
19611esac
bec39cab 19612fi
bec39cab 19613
81ecdfbb
RW
19614
19615as_nl='
19616'
19617export as_nl
19618# Printing a long string crashes Solaris 7 /usr/bin/printf.
19619as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19620as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19621as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19622# Prefer a ksh shell builtin over an external printf program on Solaris,
19623# but without wasting forks for bash or zsh.
19624if test -z "$BASH_VERSION$ZSH_VERSION" \
19625 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19626 as_echo='print -r --'
19627 as_echo_n='print -rn --'
19628elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19629 as_echo='printf %s\n'
19630 as_echo_n='printf %s'
19631else
19632 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19633 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19634 as_echo_n='/usr/ucb/echo -n'
19635 else
19636 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19637 as_echo_n_body='eval
19638 arg=$1;
19639 case $arg in #(
19640 *"$as_nl"*)
19641 expr "X$arg" : "X\\(.*\\)$as_nl";
19642 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19643 esac;
19644 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19645 '
19646 export as_echo_n_body
19647 as_echo_n='sh -c $as_echo_n_body as_echo'
19648 fi
19649 export as_echo_body
19650 as_echo='sh -c $as_echo_body as_echo'
19651fi
19652
19653# The user is always right.
19654if test "${PATH_SEPARATOR+set}" != set; then
19655 PATH_SEPARATOR=:
19656 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19657 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19658 PATH_SEPARATOR=';'
19659 }
bec39cab
AC
19660fi
19661
19662
81ecdfbb
RW
19663# IFS
19664# We need space, tab and new line, in precisely that order. Quoting is
19665# there to prevent editors from complaining about space-tab.
19666# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19667# splitting by setting IFS to empty value.)
19668IFS=" "" $as_nl"
19669
19670# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 19671as_myself=
81ecdfbb
RW
19672case $0 in #((
19673 *[\\/]* ) as_myself=$0 ;;
19674 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19675for as_dir in $PATH
19676do
19677 IFS=$as_save_IFS
19678 test -z "$as_dir" && as_dir=.
19679 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19680 done
19681IFS=$as_save_IFS
19682
19683 ;;
19684esac
19685# We did not find ourselves, most probably we were run as `sh COMMAND'
19686# in which case we are not to be found in the path.
19687if test "x$as_myself" = x; then
19688 as_myself=$0
19689fi
19690if test ! -f "$as_myself"; then
19691 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19692 exit 1
19693fi
19694
19695# Unset variables that we do not need and which cause bugs (e.g. in
19696# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19697# suppresses any "Segmentation fault" message there. '((' could
19698# trigger a bug in pdksh 5.2.14.
19699for as_var in BASH_ENV ENV MAIL MAILPATH
19700do eval test x\${$as_var+set} = xset \
19701 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19702done
bec39cab
AC
19703PS1='$ '
19704PS2='> '
19705PS4='+ '
19706
19707# NLS nuisances.
81ecdfbb
RW
19708LC_ALL=C
19709export LC_ALL
19710LANGUAGE=C
19711export LANGUAGE
19712
19713# CDPATH.
19714(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19715
19716
d0ac1c44
SM
19717# as_fn_error STATUS ERROR [LINENO LOG_FD]
19718# ----------------------------------------
81ecdfbb
RW
19719# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19720# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 19721# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
19722as_fn_error ()
19723{
d0ac1c44
SM
19724 as_status=$1; test $as_status -eq 0 && as_status=1
19725 if test "$4"; then
19726 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19727 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 19728 fi
d0ac1c44 19729 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
19730 as_fn_exit $as_status
19731} # as_fn_error
19732
19733
19734# as_fn_set_status STATUS
19735# -----------------------
19736# Set $? to STATUS, without forking.
19737as_fn_set_status ()
19738{
19739 return $1
19740} # as_fn_set_status
19741
19742# as_fn_exit STATUS
19743# -----------------
19744# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19745as_fn_exit ()
19746{
19747 set +e
19748 as_fn_set_status $1
19749 exit $1
19750} # as_fn_exit
19751
19752# as_fn_unset VAR
19753# ---------------
19754# Portably unset VAR.
19755as_fn_unset ()
19756{
19757 { eval $1=; unset $1;}
19758}
19759as_unset=as_fn_unset
19760# as_fn_append VAR VALUE
19761# ----------------------
19762# Append the text in VALUE to the end of the definition contained in VAR. Take
19763# advantage of any shell optimizations that allow amortized linear growth over
19764# repeated appends, instead of the typical quadratic growth present in naive
19765# implementations.
19766if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19767 eval 'as_fn_append ()
19768 {
19769 eval $1+=\$2
19770 }'
19771else
19772 as_fn_append ()
19773 {
19774 eval $1=\$$1\$2
19775 }
19776fi # as_fn_append
19777
19778# as_fn_arith ARG...
19779# ------------------
19780# Perform arithmetic evaluation on the ARGs, and store the result in the
19781# global $as_val. Take advantage of shells that can avoid forks. The arguments
19782# must be portable across $(()) and expr.
19783if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19784 eval 'as_fn_arith ()
19785 {
19786 as_val=$(( $* ))
19787 }'
19788else
19789 as_fn_arith ()
19790 {
19791 as_val=`expr "$@" || test $? -eq 1`
19792 }
19793fi # as_fn_arith
bec39cab 19794
81ecdfbb
RW
19795
19796if expr a : '\(a\)' >/dev/null 2>&1 &&
19797 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
19798 as_expr=expr
19799else
19800 as_expr=false
19801fi
19802
81ecdfbb 19803if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
19804 as_basename=basename
19805else
19806 as_basename=false
19807fi
19808
81ecdfbb
RW
19809if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19810 as_dirname=dirname
19811else
19812 as_dirname=false
19813fi
bec39cab 19814
81ecdfbb 19815as_me=`$as_basename -- "$0" ||
bec39cab
AC
19816$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19817 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
19818 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19819$as_echo X/"$0" |
19820 sed '/^.*\/\([^/][^/]*\)\/*$/{
19821 s//\1/
19822 q
19823 }
19824 /^X\/\(\/\/\)$/{
19825 s//\1/
19826 q
19827 }
19828 /^X\/\(\/\).*/{
19829 s//\1/
19830 q
19831 }
19832 s/.*/./; q'`
b4e70030 19833
b4e70030
JB
19834# Avoid depending upon Character Ranges.
19835as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19836as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19837as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19838as_cr_digits='0123456789'
19839as_cr_alnum=$as_cr_Letters$as_cr_digits
19840
81ecdfbb
RW
19841ECHO_C= ECHO_N= ECHO_T=
19842case `echo -n x` in #(((((
19843-n*)
19844 case `echo 'xy\c'` in
19845 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19846 xy) ECHO_C='\c';;
19847 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19848 ECHO_T=' ';;
19849 esac;;
19850*)
19851 ECHO_N='-n';;
bec39cab
AC
19852esac
19853
81ecdfbb
RW
19854rm -f conf$$ conf$$.exe conf$$.file
19855if test -d conf$$.dir; then
19856 rm -f conf$$.dir/conf$$.file
bec39cab 19857else
81ecdfbb
RW
19858 rm -f conf$$.dir
19859 mkdir conf$$.dir 2>/dev/null
bec39cab 19860fi
81ecdfbb
RW
19861if (echo >conf$$.file) 2>/dev/null; then
19862 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 19863 as_ln_s='ln -s'
81ecdfbb
RW
19864 # ... but there are two gotchas:
19865 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19866 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 19867 # In both cases, we have to default to `cp -pR'.
81ecdfbb 19868 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 19869 as_ln_s='cp -pR'
81ecdfbb
RW
19870 elif ln conf$$.file conf$$ 2>/dev/null; then
19871 as_ln_s=ln
19872 else
d0ac1c44 19873 as_ln_s='cp -pR'
b4e70030 19874 fi
bec39cab 19875else
d0ac1c44 19876 as_ln_s='cp -pR'
bec39cab 19877fi
81ecdfbb
RW
19878rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19879rmdir conf$$.dir 2>/dev/null
19880
19881
19882# as_fn_mkdir_p
19883# -------------
19884# Create "$as_dir" as a directory, including parents if necessary.
19885as_fn_mkdir_p ()
19886{
19887
19888 case $as_dir in #(
19889 -*) as_dir=./$as_dir;;
19890 esac
19891 test -d "$as_dir" || eval $as_mkdir_p || {
19892 as_dirs=
19893 while :; do
19894 case $as_dir in #(
19895 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19896 *) as_qdir=$as_dir;;
19897 esac
19898 as_dirs="'$as_qdir' $as_dirs"
19899 as_dir=`$as_dirname -- "$as_dir" ||
19900$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19901 X"$as_dir" : 'X\(//\)[^/]' \| \
19902 X"$as_dir" : 'X\(//\)$' \| \
19903 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19904$as_echo X"$as_dir" |
19905 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19906 s//\1/
19907 q
19908 }
19909 /^X\(\/\/\)[^/].*/{
19910 s//\1/
19911 q
19912 }
19913 /^X\(\/\/\)$/{
19914 s//\1/
19915 q
19916 }
19917 /^X\(\/\).*/{
19918 s//\1/
19919 q
19920 }
19921 s/.*/./; q'`
19922 test -d "$as_dir" && break
19923 done
19924 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 19925 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 19926
bec39cab 19927
81ecdfbb 19928} # as_fn_mkdir_p
bec39cab 19929if mkdir -p . 2>/dev/null; then
81ecdfbb 19930 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
19931else
19932 test -d ./-p && rmdir ./-p
19933 as_mkdir_p=false
19934fi
19935
d0ac1c44
SM
19936
19937# as_fn_executable_p FILE
19938# -----------------------
19939# Test if FILE is an executable regular file.
19940as_fn_executable_p ()
19941{
19942 test -f "$1" && test -x "$1"
19943} # as_fn_executable_p
19944as_test_x='test -x'
19945as_executable_p=as_fn_executable_p
bec39cab
AC
19946
19947# Sed expression to map a string onto a valid CPP name.
19948as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19949
19950# Sed expression to map a string onto a valid variable name.
19951as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19952
19953
bec39cab 19954exec 6>&1
81ecdfbb
RW
19955## ----------------------------------- ##
19956## Main body of $CONFIG_STATUS script. ##
19957## ----------------------------------- ##
19958_ASEOF
19959test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19960
19961cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19962# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 19963# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
19964# values after options handling.
19965ac_log="
bec39cab 19966This file was extended by $as_me, which was
d0ac1c44 19967generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
19968
19969 CONFIG_FILES = $CONFIG_FILES
19970 CONFIG_HEADERS = $CONFIG_HEADERS
19971 CONFIG_LINKS = $CONFIG_LINKS
19972 CONFIG_COMMANDS = $CONFIG_COMMANDS
19973 $ $0 $@
19974
81ecdfbb
RW
19975on `(hostname || uname -n) 2>/dev/null | sed 1q`
19976"
19977
bec39cab
AC
19978_ACEOF
19979
81ecdfbb
RW
19980case $ac_config_files in *"
19981"*) set x $ac_config_files; shift; ac_config_files=$*;;
19982esac
234b45d4 19983
81ecdfbb
RW
19984case $ac_config_headers in *"
19985"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19986esac
b4e70030 19987
b4e70030 19988
81ecdfbb
RW
19989cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19990# Files that config.status was made for.
19991config_files="$ac_config_files"
19992config_headers="$ac_config_headers"
19993config_links="$ac_config_links"
19994config_commands="$ac_config_commands"
234b45d4 19995
81ecdfbb 19996_ACEOF
b4e70030 19997
81ecdfbb 19998cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 19999ac_cs_usage="\
81ecdfbb
RW
20000\`$as_me' instantiates files and other configuration actions
20001from templates according to the current configuration. Unless the files
20002and actions are specified as TAGs, all are instantiated by default.
234b45d4 20003
81ecdfbb 20004Usage: $0 [OPTION]... [TAG]...
234b45d4 20005
bec39cab 20006 -h, --help print this help, then exit
81ecdfbb 20007 -V, --version print version number and configuration settings, then exit
d0ac1c44 20008 --config print configuration, then exit
81ecdfbb
RW
20009 -q, --quiet, --silent
20010 do not print progress messages
bec39cab
AC
20011 -d, --debug don't remove temporary files
20012 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
20013 --file=FILE[:TEMPLATE]
20014 instantiate the configuration file FILE
20015 --header=FILE[:TEMPLATE]
20016 instantiate the configuration header FILE
234b45d4 20017
bec39cab
AC
20018Configuration files:
20019$config_files
234b45d4 20020
bec39cab
AC
20021Configuration headers:
20022$config_headers
234b45d4 20023
bec39cab
AC
20024Configuration links:
20025$config_links
234b45d4 20026
bec39cab
AC
20027Configuration commands:
20028$config_commands
20029
81ecdfbb 20030Report bugs to the package provider."
b4e70030 20031
81ecdfbb
RW
20032_ACEOF
20033cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 20034ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
20035ac_cs_version="\\
20036config.status
d0ac1c44
SM
20037configured by $0, generated by GNU Autoconf 2.69,
20038 with options \\"\$ac_cs_config\\"
bec39cab 20039
d0ac1c44 20040Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
20041This config.status script is free software; the Free Software Foundation
20042gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
20043
20044ac_pwd='$ac_pwd'
20045srcdir='$srcdir'
20046INSTALL='$INSTALL'
81ecdfbb
RW
20047AWK='$AWK'
20048test -n "\$AWK" || AWK=awk
bec39cab
AC
20049_ACEOF
20050
81ecdfbb
RW
20051cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20052# The default lists apply if the user does not specify any file.
bec39cab
AC
20053ac_need_defaults=:
20054while test $# != 0
20055do
20056 case $1 in
d0ac1c44 20057 --*=?*)
81ecdfbb
RW
20058 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20059 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 20060 ac_shift=:
c906108c 20061 ;;
d0ac1c44
SM
20062 --*=)
20063 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20064 ac_optarg=
20065 ac_shift=:
20066 ;;
81ecdfbb 20067 *)
bec39cab
AC
20068 ac_option=$1
20069 ac_optarg=$2
20070 ac_shift=shift
c906108c 20071 ;;
bec39cab 20072 esac
c906108c 20073
bec39cab
AC
20074 case $ac_option in
20075 # Handling of the options.
bec39cab
AC
20076 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20077 ac_cs_recheck=: ;;
81ecdfbb
RW
20078 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20079 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
20080 --config | --confi | --conf | --con | --co | --c )
20081 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 20082 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
20083 debug=: ;;
20084 --file | --fil | --fi | --f )
20085 $ac_shift
81ecdfbb
RW
20086 case $ac_optarg in
20087 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 20088 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
20089 esac
20090 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
20091 ac_need_defaults=false;;
20092 --header | --heade | --head | --hea )
20093 $ac_shift
81ecdfbb
RW
20094 case $ac_optarg in
20095 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20096 esac
20097 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 20098 ac_need_defaults=false;;
81ecdfbb
RW
20099 --he | --h)
20100 # Conflict between --help and --header
d0ac1c44 20101 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
20102Try \`$0 --help' for more information.";;
20103 --help | --hel | -h )
20104 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
20105 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20106 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20107 ac_cs_silent=: ;;
c906108c 20108
bec39cab 20109 # This is an error.
d0ac1c44 20110 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 20111Try \`$0 --help' for more information." ;;
c906108c 20112
81ecdfbb
RW
20113 *) as_fn_append ac_config_targets " $1"
20114 ac_need_defaults=false ;;
c906108c 20115
bec39cab
AC
20116 esac
20117 shift
20118done
c906108c 20119
bec39cab 20120ac_configure_extra_args=
c906108c 20121
bec39cab
AC
20122if $ac_cs_silent; then
20123 exec 6>/dev/null
20124 ac_configure_extra_args="$ac_configure_extra_args --silent"
20125fi
c906108c 20126
bec39cab 20127_ACEOF
81ecdfbb 20128cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 20129if \$ac_cs_recheck; then
d0ac1c44 20130 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
20131 shift
20132 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20133 CONFIG_SHELL='$SHELL'
20134 export CONFIG_SHELL
20135 exec "\$@"
bec39cab
AC
20136fi
20137
20138_ACEOF
81ecdfbb
RW
20139cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20140exec 5>>config.log
20141{
20142 echo
20143 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20144## Running $as_me. ##
20145_ASBOX
20146 $as_echo "$ac_log"
20147} >&5
bec39cab 20148
81ecdfbb
RW
20149_ACEOF
20150cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 20151#
81ecdfbb 20152# INIT-COMMANDS
c906108c 20153#
a417dc56 20154ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 20155GDB_NM_FILE=$GDB_NM_FILE
b4e70030 20156
bec39cab
AC
20157_ACEOF
20158
81ecdfbb 20159cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 20160
81ecdfbb 20161# Handling of arguments.
bec39cab 20162for ac_config_target in $ac_config_targets
c906108c 20163do
81ecdfbb
RW
20164 case $ac_config_target in
20165 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20166 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 20167 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 20168 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 20169 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 20170 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 20171 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 20172 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 20173 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 20174 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 20175
d0ac1c44 20176 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
20177 esac
20178done
20179
81ecdfbb 20180
bec39cab
AC
20181# If the user did not use the arguments to specify the items to instantiate,
20182# then the envvar interface is used. Set only those that are not.
20183# We use the long form for the default assignment because of an extremely
20184# bizarre bug on SunOS 4.1.3.
20185if $ac_need_defaults; then
20186 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20187 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20188 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20189 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20190fi
20191
b4e70030 20192# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 20193# simply because there is no reason against having it here, and in addition,
b4e70030 20194# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
20195# Hook for its removal unless debugging.
20196# Note that there is a small window in which the directory will not be cleaned:
20197# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
20198$debug ||
20199{
d0ac1c44 20200 tmp= ac_tmp=
81ecdfbb 20201 trap 'exit_status=$?
d0ac1c44
SM
20202 : "${ac_tmp:=$tmp}"
20203 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
20204' 0
20205 trap 'as_fn_exit 1' 1 2 13 15
20206}
20207# Create a (secure) tmp directory for tmp files.
20208
20209{
20210 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 20211 test -d "$tmp"
81ecdfbb
RW
20212} ||
20213{
20214 tmp=./conf$$-$RANDOM
20215 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
20216} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20217ac_tmp=$tmp
81ecdfbb
RW
20218
20219# Set up the scripts for CONFIG_FILES section.
20220# No need to generate them if there are no CONFIG_FILES.
20221# This happens for instance with `./config.status config.h'.
20222if test -n "$CONFIG_FILES"; then
20223
20224if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20225 ac_cs_awk_getline=:
20226 ac_cs_awk_pipe_init=
20227 ac_cs_awk_read_file='
20228 while ((getline aline < (F[key])) > 0)
20229 print(aline)
20230 close(F[key])'
20231 ac_cs_awk_pipe_fini=
20232else
20233 ac_cs_awk_getline=false
20234 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20235 ac_cs_awk_read_file='
20236 print "|#_!!_#|"
20237 print "cat " F[key] " &&"
20238 '$ac_cs_awk_pipe_init
20239 # The final `:' finishes the AND list.
20240 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20241fi
20242ac_cr=`echo X | tr X '\015'`
20243# On cygwin, bash can eat \r inside `` if the user requested igncr.
20244# But we know of no other shell where ac_cr would be empty at this
20245# point, so we can use a bashism as a fallback.
20246if test "x$ac_cr" = x; then
20247 eval ac_cr=\$\'\\r\'
20248fi
20249ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20250if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 20251 ac_cs_awk_cr='\\r'
81ecdfbb
RW
20252else
20253 ac_cs_awk_cr=$ac_cr
20254fi
20255
d0ac1c44 20256echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
20257_ACEOF
20258
20259# Create commands to substitute file output variables.
20260{
20261 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 20262 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
20263 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20264 echo "_ACAWK" &&
20265 echo "_ACEOF"
20266} >conf$$files.sh &&
20267. ./conf$$files.sh ||
d0ac1c44 20268 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20269rm -f conf$$files.sh
20270
20271{
20272 echo "cat >conf$$subs.awk <<_ACEOF" &&
20273 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20274 echo "_ACEOF"
20275} >conf$$subs.sh ||
d0ac1c44
SM
20276 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20277ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
20278ac_delim='%!_!# '
20279for ac_last_try in false false false false false :; do
20280 . ./conf$$subs.sh ||
d0ac1c44 20281 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20282
20283 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20284 if test $ac_delim_n = $ac_delim_num; then
20285 break
20286 elif $ac_last_try; then
d0ac1c44 20287 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20288 else
20289 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20290 fi
20291done
20292rm -f conf$$subs.sh
20293
20294cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 20295cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
20296_ACEOF
20297sed -n '
20298h
20299s/^/S["/; s/!.*/"]=/
20300p
20301g
20302s/^[^!]*!//
20303:repl
20304t repl
20305s/'"$ac_delim"'$//
20306t delim
20307:nl
20308h
d0ac1c44 20309s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20310t more1
20311s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20312p
20313n
20314b repl
20315:more1
20316s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20317p
20318g
20319s/.\{148\}//
20320t nl
20321:delim
20322h
d0ac1c44 20323s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20324t more2
20325s/["\\]/\\&/g; s/^/"/; s/$/"/
20326p
20327b
20328:more2
20329s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20330p
20331g
20332s/.\{148\}//
20333t delim
20334' <conf$$subs.awk | sed '
20335/^[^""]/{
20336 N
20337 s/\n//
20338}
20339' >>$CONFIG_STATUS || ac_write_fail=1
20340rm -f conf$$subs.awk
20341cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20342_ACAWK
d0ac1c44 20343cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
20344 for (key in S) S_is_set[key] = 1
20345 FS = "\a"
20346 \$ac_cs_awk_pipe_init
20347}
20348{
20349 line = $ 0
20350 nfields = split(line, field, "@")
20351 substed = 0
20352 len = length(field[1])
20353 for (i = 2; i < nfields; i++) {
20354 key = field[i]
20355 keylen = length(key)
20356 if (S_is_set[key]) {
20357 value = S[key]
20358 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20359 len += length(value) + length(field[++i])
20360 substed = 1
20361 } else
20362 len += 1 + keylen
20363 }
20364 if (nfields == 3 && !substed) {
20365 key = field[2]
20366 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20367 \$ac_cs_awk_read_file
20368 next
20369 }
20370 }
20371 print line
b4e70030 20372}
81ecdfbb
RW
20373\$ac_cs_awk_pipe_fini
20374_ACAWK
20375_ACEOF
20376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20377if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20378 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20379else
20380 cat
d0ac1c44
SM
20381fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20382 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
20383_ACEOF
20384
d0ac1c44
SM
20385# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20386# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
20387# trailing colons and then remove the whole line if VPATH becomes empty
20388# (actually we leave an empty line to preserve line numbers).
20389if test "x$srcdir" = x.; then
d0ac1c44
SM
20390 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20391h
20392s///
20393s/^/:/
20394s/[ ]*$/:/
20395s/:\$(srcdir):/:/g
20396s/:\${srcdir}:/:/g
20397s/:@srcdir@:/:/g
20398s/^:*//
81ecdfbb 20399s/:*$//
d0ac1c44
SM
20400x
20401s/\(=[ ]*\).*/\1/
20402G
20403s/\n//
81ecdfbb
RW
20404s/^[^=]*=[ ]*$//
20405}'
20406fi
20407
20408cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20409fi # test -n "$CONFIG_FILES"
20410
20411# Set up the scripts for CONFIG_HEADERS section.
20412# No need to generate them if there are no CONFIG_HEADERS.
20413# This happens for instance with `./config.status Makefile'.
20414if test -n "$CONFIG_HEADERS"; then
d0ac1c44 20415cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
20416BEGIN {
20417_ACEOF
20418
20419# Transform confdefs.h into an awk script `defines.awk', embedded as
20420# here-document in config.status, that substitutes the proper values into
20421# config.h.in to produce config.h.
4e8d927d 20422
81ecdfbb
RW
20423# Create a delimiter string that does not exist in confdefs.h, to ease
20424# handling of long lines.
20425ac_delim='%!_!# '
20426for ac_last_try in false false :; do
d0ac1c44
SM
20427 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20428 if test -z "$ac_tt"; then
81ecdfbb
RW
20429 break
20430 elif $ac_last_try; then
d0ac1c44 20431 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
20432 else
20433 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20434 fi
20435done
4e8d927d 20436
81ecdfbb
RW
20437# For the awk script, D is an array of macro values keyed by name,
20438# likewise P contains macro parameters if any. Preserve backslash
20439# newline sequences.
20440
20441ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20442sed -n '
20443s/.\{148\}/&'"$ac_delim"'/g
20444t rset
20445:rset
20446s/^[ ]*#[ ]*define[ ][ ]*/ /
20447t def
20448d
20449:def
20450s/\\$//
20451t bsnl
20452s/["\\]/\\&/g
20453s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20454D["\1"]=" \3"/p
20455s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20456d
20457:bsnl
20458s/["\\]/\\&/g
20459s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20460D["\1"]=" \3\\\\\\n"\\/p
20461t cont
20462s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20463t cont
20464d
20465:cont
20466n
20467s/.\{148\}/&'"$ac_delim"'/g
20468t clear
20469:clear
20470s/\\$//
20471t bsnlc
20472s/["\\]/\\&/g; s/^/"/; s/$/"/p
20473d
20474:bsnlc
20475s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20476b cont
20477' <confdefs.h | sed '
20478s/'"$ac_delim"'/"\\\
20479"/g' >>$CONFIG_STATUS || ac_write_fail=1
20480
20481cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20482 for (key in D) D_is_set[key] = 1
20483 FS = "\a"
20484}
20485/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20486 line = \$ 0
20487 split(line, arg, " ")
20488 if (arg[1] == "#") {
20489 defundef = arg[2]
20490 mac1 = arg[3]
20491 } else {
20492 defundef = substr(arg[1], 2)
20493 mac1 = arg[2]
20494 }
20495 split(mac1, mac2, "(") #)
20496 macro = mac2[1]
20497 prefix = substr(line, 1, index(line, defundef) - 1)
20498 if (D_is_set[macro]) {
20499 # Preserve the white space surrounding the "#".
20500 print prefix "define", macro P[macro] D[macro]
20501 next
20502 } else {
20503 # Replace #undef with comments. This is necessary, for example,
20504 # in the case of _POSIX_SOURCE, which is predefined and required
20505 # on some systems where configure will not decide to define it.
20506 if (defundef == "undef") {
20507 print "/*", prefix defundef, macro, "*/"
20508 next
20509 }
20510 }
b4e70030 20511}
81ecdfbb
RW
20512{ print }
20513_ACAWK
b4e70030 20514_ACEOF
81ecdfbb 20515cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 20516 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 20517fi # test -n "$CONFIG_HEADERS"
4e8d927d 20518
4e8d927d 20519
81ecdfbb
RW
20520eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20521shift
20522for ac_tag
20523do
20524 case $ac_tag in
20525 :[FHLC]) ac_mode=$ac_tag; continue;;
20526 esac
20527 case $ac_mode$ac_tag in
20528 :[FHL]*:*);;
d0ac1c44 20529 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
20530 :[FH]-) ac_tag=-:-;;
20531 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20532 esac
20533 ac_save_IFS=$IFS
20534 IFS=:
20535 set x $ac_tag
20536 IFS=$ac_save_IFS
20537 shift
20538 ac_file=$1
20539 shift
4e8d927d 20540
81ecdfbb
RW
20541 case $ac_mode in
20542 :L) ac_source=$1;;
20543 :[FH])
20544 ac_file_inputs=
20545 for ac_f
20546 do
20547 case $ac_f in
d0ac1c44 20548 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
20549 *) # Look for the file first in the build tree, then in the source tree
20550 # (if the path is not absolute). The absolute path cannot be DOS-style,
20551 # because $ac_f cannot contain `:'.
20552 test -f "$ac_f" ||
20553 case $ac_f in
20554 [\\/$]*) false;;
20555 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20556 esac ||
d0ac1c44 20557 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
20558 esac
20559 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20560 as_fn_append ac_file_inputs " '$ac_f'"
20561 done
20562
20563 # Let's still pretend it is `configure' which instantiates (i.e., don't
20564 # use $as_me), people would be surprised to read:
20565 # /* config.h. Generated by config.status. */
20566 configure_input='Generated from '`
20567 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20568 `' by configure.'
20569 if test x"$ac_file" != x-; then
20570 configure_input="$ac_file. $configure_input"
20571 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20572$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 20573 fi
81ecdfbb
RW
20574 # Neutralize special characters interpreted by sed in replacement strings.
20575 case $configure_input in #(
20576 *\&* | *\|* | *\\* )
20577 ac_sed_conf_input=`$as_echo "$configure_input" |
20578 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20579 *) ac_sed_conf_input=$configure_input;;
20580 esac
4e8d927d 20581
81ecdfbb 20582 case $ac_tag in
d0ac1c44
SM
20583 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20584 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
20585 esac
20586 ;;
c906108c
SS
20587 esac
20588
81ecdfbb 20589 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
20590$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20591 X"$ac_file" : 'X\(//\)[^/]' \| \
20592 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
20593 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20594$as_echo X"$ac_file" |
20595 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20596 s//\1/
20597 q
20598 }
20599 /^X\(\/\/\)[^/].*/{
20600 s//\1/
20601 q
20602 }
20603 /^X\(\/\/\)$/{
20604 s//\1/
20605 q
20606 }
20607 /^X\(\/\).*/{
20608 s//\1/
20609 q
20610 }
20611 s/.*/./; q'`
20612 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20613 ac_builddir=.
20614
81ecdfbb
RW
20615case "$ac_dir" in
20616.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20617*)
20618 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20619 # A ".." for each directory in $ac_dir_suffix.
20620 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20621 case $ac_top_builddir_sub in
20622 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20623 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20624 esac ;;
20625esac
20626ac_abs_top_builddir=$ac_pwd
20627ac_abs_builddir=$ac_pwd$ac_dir_suffix
20628# for backward compatibility:
20629ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20630
20631case $srcdir in
81ecdfbb 20632 .) # We are building in place.
bec39cab 20633 ac_srcdir=.
81ecdfbb
RW
20634 ac_top_srcdir=$ac_top_builddir_sub
20635 ac_abs_top_srcdir=$ac_pwd ;;
20636 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20637 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20638 ac_top_srcdir=$srcdir
20639 ac_abs_top_srcdir=$srcdir ;;
20640 *) # Relative name.
20641 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20642 ac_top_srcdir=$ac_top_build_prefix$srcdir
20643 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20644esac
81ecdfbb 20645ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 20646
c906108c 20647
81ecdfbb
RW
20648 case $ac_mode in
20649 :F)
20650 #
20651 # CONFIG_FILE
20652 #
c906108c 20653
bec39cab
AC
20654 case $INSTALL in
20655 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 20656 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 20657 esac
81ecdfbb 20658_ACEOF
121ce6e5 20659
81ecdfbb
RW
20660cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20661# If the template does not know about datarootdir, expand it.
20662# FIXME: This hack should be removed a few years after 2.60.
20663ac_datarootdir_hack=; ac_datarootdir_seen=
20664ac_sed_dataroot='
20665/datarootdir/ {
20666 p
20667 q
20668}
20669/@datadir@/p
20670/@docdir@/p
20671/@infodir@/p
20672/@localedir@/p
20673/@mandir@/p'
20674case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20675*datarootdir*) ac_datarootdir_seen=yes;;
20676*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20678$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20679_ACEOF
20680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20681 ac_datarootdir_hack='
20682 s&@datadir@&$datadir&g
20683 s&@docdir@&$docdir&g
20684 s&@infodir@&$infodir&g
20685 s&@localedir@&$localedir&g
20686 s&@mandir@&$mandir&g
20687 s&\\\${datarootdir}&$datarootdir&g' ;;
20688esac
4e8d927d 20689_ACEOF
81ecdfbb
RW
20690
20691# Neutralize VPATH when `$srcdir' = `.'.
20692# Shell code in configure.ac might set extrasub.
20693# FIXME: do we really want to maintain this feature?
20694cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20695ac_sed_extra="$ac_vpsub
bec39cab
AC
20696$extrasub
20697_ACEOF
81ecdfbb 20698cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
20699:t
20700/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
20701s|@configure_input@|$ac_sed_conf_input|;t t
20702s&@top_builddir@&$ac_top_builddir_sub&;t t
20703s&@top_build_prefix@&$ac_top_build_prefix&;t t
20704s&@srcdir@&$ac_srcdir&;t t
20705s&@abs_srcdir@&$ac_abs_srcdir&;t t
20706s&@top_srcdir@&$ac_top_srcdir&;t t
20707s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20708s&@builddir@&$ac_builddir&;t t
20709s&@abs_builddir@&$ac_abs_builddir&;t t
20710s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20711s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
20712$ac_datarootdir_hack
20713"
20714eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20715if $ac_cs_awk_getline; then
d0ac1c44 20716 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 20717else
d0ac1c44
SM
20718 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20719fi \
20720 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20721
20722test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
20723 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20724 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20725 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 20726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20727which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 20728$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20729which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 20730
d0ac1c44 20731 rm -f "$ac_tmp/stdin"
bec39cab 20732 case $ac_file in
d0ac1c44
SM
20733 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20734 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 20735 esac \
d0ac1c44 20736 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20737 ;;
20738 :H)
20739 #
20740 # CONFIG_HEADER
20741 #
bec39cab 20742 if test x"$ac_file" != x-; then
81ecdfbb
RW
20743 {
20744 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20745 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20746 } >"$ac_tmp/config.h" \
20747 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20748 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
20749 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20750$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 20751 else
81ecdfbb 20752 rm -f "$ac_file"
d0ac1c44
SM
20753 mv "$ac_tmp/config.h" "$ac_file" \
20754 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
20755 fi
20756 else
81ecdfbb 20757 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20758 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20759 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 20760 fi
81ecdfbb
RW
20761 ;;
20762 :L)
20763 #
20764 # CONFIG_LINK
20765 #
c906108c 20766
81ecdfbb
RW
20767 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20768 :
b4e70030 20769 else
81ecdfbb
RW
20770 # Prefer the file from the source tree if names are identical.
20771 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20772 ac_source=$srcdir/$ac_source
20773 fi
b4e70030 20774
81ecdfbb
RW
20775 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20776$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 20777
81ecdfbb 20778 if test ! -r "$ac_source"; then
d0ac1c44 20779 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
20780 fi
20781 rm -f "$ac_file"
bec39cab 20782
81ecdfbb 20783 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 20784 case $ac_source in
81ecdfbb
RW
20785 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20786 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20787 esac
20788 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20789 ln "$ac_source" "$ac_file" 2>/dev/null ||
20790 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 20791 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
20792 fi
20793 ;;
20794 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20795$as_echo "$as_me: executing $ac_file commands" >&6;}
20796 ;;
c906108c 20797 esac
b4e70030 20798
bec39cab 20799
81ecdfbb 20800 case $ac_file$ac_mode in
c5adaa19 20801 "config.h":H) echo > stamp-h ;;
81ecdfbb 20802 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 20803 "nm.h":L) echo > stamp-nmh ;;
b292c783 20804 "gcore":F) chmod +x gcore ;;
81ecdfbb 20805
bec39cab 20806 esac
81ecdfbb 20807done # for ac_tag
c906108c 20808
bec39cab 20809
81ecdfbb 20810as_fn_exit 0
bec39cab 20811_ACEOF
bec39cab
AC
20812ac_clean_files=$ac_clean_files_save
20813
81ecdfbb 20814test $ac_write_fail = 0 ||
d0ac1c44 20815 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 20816
bec39cab
AC
20817
20818# configure is writing to config.log, and then calls config.status.
20819# config.status does its own redirection, appending to config.log.
20820# Unfortunately, on DOS this fails, as config.log is still kept open
20821# by configure, so config.status won't be able to write to it; its
20822# output is simply discarded. So we exec the FD to /dev/null,
20823# effectively closing config.log, so it can be properly (re)opened and
20824# appended to by config.status. When coming back to configure, we
20825# need to make the FD available again.
20826if test "$no_create" != yes; then
20827 ac_cs_success=:
20828 ac_config_status_args=
20829 test "$silent" = yes &&
20830 ac_config_status_args="$ac_config_status_args --quiet"
20831 exec 5>/dev/null
20832 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20833 exec 5>>config.log
20834 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20835 # would make configure fail if this is the last instruction.
d0ac1c44 20836 $ac_cs_success || as_fn_exit 1
bec39cab 20837fi
c906108c 20838
bec39cab 20839#
81ecdfbb 20840# CONFIG_SUBDIRS section.
bec39cab 20841#
c906108c
SS
20842if test "$no_recursion" != yes; then
20843
81ecdfbb
RW
20844 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20845 # so they do not pile up.
c906108c
SS
20846 ac_sub_configure_args=
20847 ac_prev=
fdc59709
PB
20848 eval "set x $ac_configure_args"
20849 shift
20850 for ac_arg
20851 do
c906108c
SS
20852 if test -n "$ac_prev"; then
20853 ac_prev=
20854 continue
20855 fi
bec39cab 20856 case $ac_arg in
c906108c
SS
20857 -cache-file | --cache-file | --cache-fil | --cache-fi \
20858 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20859 ac_prev=cache_file ;;
20860 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
20861 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20862 | --c=*)
20863 ;;
20864 --config-cache | -C)
c906108c
SS
20865 ;;
20866 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20867 ac_prev=srcdir ;;
20868 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20869 ;;
bec39cab
AC
20870 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20871 ac_prev=prefix ;;
20872 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20873 ;;
81ecdfbb
RW
20874 --disable-option-checking)
20875 ;;
fdc59709
PB
20876 *)
20877 case $ac_arg in
81ecdfbb 20878 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20879 esac
81ecdfbb 20880 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
20881 esac
20882 done
20883
bec39cab
AC
20884 # Always prepend --prefix to ensure using the same prefix
20885 # in subdir configurations.
fdc59709
PB
20886 ac_arg="--prefix=$prefix"
20887 case $ac_arg in
81ecdfbb 20888 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20889 esac
81ecdfbb
RW
20890 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20891
20892 # Pass --silent
20893 if test "$silent" = yes; then
20894 ac_sub_configure_args="--silent $ac_sub_configure_args"
20895 fi
20896
20897 # Always prepend --disable-option-checking to silence warnings, since
20898 # different subdirs can have different --enable and --with options.
20899 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 20900
b4e70030 20901 ac_popdir=`pwd`
bec39cab 20902 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
20903
20904 # Do not complain, so a configure script can configure whichever
20905 # parts of a large source tree are present.
fdc59709 20906 test -d "$srcdir/$ac_dir" || continue
c906108c 20907
81ecdfbb
RW
20908 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20909 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20910 $as_echo "$ac_msg" >&6
20911 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20912 ac_builddir=.
20913
81ecdfbb
RW
20914case "$ac_dir" in
20915.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20916*)
20917 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20918 # A ".." for each directory in $ac_dir_suffix.
20919 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20920 case $ac_top_builddir_sub in
20921 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20922 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20923 esac ;;
20924esac
20925ac_abs_top_builddir=$ac_pwd
20926ac_abs_builddir=$ac_pwd$ac_dir_suffix
20927# for backward compatibility:
20928ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20929
20930case $srcdir in
81ecdfbb 20931 .) # We are building in place.
bec39cab 20932 ac_srcdir=.
81ecdfbb
RW
20933 ac_top_srcdir=$ac_top_builddir_sub
20934 ac_abs_top_srcdir=$ac_pwd ;;
20935 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20936 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20937 ac_top_srcdir=$srcdir
20938 ac_abs_top_srcdir=$srcdir ;;
20939 *) # Relative name.
20940 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20941 ac_top_srcdir=$ac_top_build_prefix$srcdir
20942 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20943esac
81ecdfbb 20944ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 20945
c906108c 20946
fdc59709 20947 cd "$ac_dir"
c906108c
SS
20948
20949 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
20950 if test -f "$ac_srcdir/configure.gnu"; then
20951 ac_sub_configure=$ac_srcdir/configure.gnu
20952 elif test -f "$ac_srcdir/configure"; then
20953 ac_sub_configure=$ac_srcdir/configure
20954 elif test -f "$ac_srcdir/configure.in"; then
20955 # This should be Cygnus configure.
20956 ac_sub_configure=$ac_aux_dir/configure
c906108c 20957 else
81ecdfbb
RW
20958 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20959$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
20960 ac_sub_configure=
20961 fi
20962
20963 # The recursion is here.
20964 if test -n "$ac_sub_configure"; then
c906108c 20965 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
20966 case $cache_file in
20967 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
20968 *) # Relative name.
20969 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 20970 esac
c906108c 20971
81ecdfbb
RW
20972 { $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
20973$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 20974 # The eval makes quoting arguments work.
fdc59709
PB
20975 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20976 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 20977 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
20978 fi
20979
fdc59709 20980 cd "$ac_popdir"
c906108c
SS
20981 done
20982fi
81ecdfbb
RW
20983if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20985$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20986fi
c906108c 20987
This page took 3.449275 seconds and 4 git commands to generate.