Use "bool" in more spots in TUI
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 90as_myself=
81ecdfbb
RW
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
81ecdfbb
RW
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 211do
81ecdfbb
RW
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
81ecdfbb
RW
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 266 else
81ecdfbb
RW
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
bec39cab 271 fi
81ecdfbb
RW
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
bec39cab 301
81ecdfbb
RW
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
81ecdfbb
RW
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
81ecdfbb
RW
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
421 as_expr=expr
422else
423 as_expr=false
424fi
425
81ecdfbb 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
427 as_basename=basename
428else
429 as_basename=false
430fi
431
81ecdfbb
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
bec39cab 437
81ecdfbb 438as_me=`$as_basename -- "$0" ||
bec39cab
AC
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
bec39cab 456
b4e70030
JB
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 463
bec39cab 464
81ecdfbb
RW
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
bec39cab 474 sed '
81ecdfbb
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
bec39cab 479 N
81ecdfbb
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 482 t loop
81ecdfbb 483 s/-\n.*//
bec39cab 484 ' >$as_me.lineno &&
81ecdfbb
RW
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab 487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
bec39cab
AC
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
bec39cab
AC
496 # Exit status is that of the last command.
497 exit
498}
499
81ecdfbb
RW
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
bec39cab
AC
511esac
512
81ecdfbb
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
bec39cab 516else
81ecdfbb
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
bec39cab 519fi
81ecdfbb
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 522 as_ln_s='ln -s'
81ecdfbb
RW
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
81ecdfbb 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
81ecdfbb
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
b4e70030 533 fi
bec39cab 534else
d0ac1c44 535 as_ln_s='cp -pR'
bec39cab 536fi
81ecdfbb
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
bec39cab
AC
539
540if mkdir -p . 2>/dev/null; then
81ecdfbb 541 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
bec39cab
AC
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c906108c 559
bec39cab 560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
bec39cab
AC
565#
566# Initializations.
567#
c906108c 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
b4e70030 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab
AC
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
81ecdfbb 622enable_option_checking=no
d0ac1c44 623ac_header_list=
c971b7fa 624ac_subst_vars='LTLIBOBJS
81ecdfbb 625LIBOBJS
b292c783
JK
626GCORE_TRANSFORM_NAME
627GDB_TRANSFORM_NAME
e3487908 628XSLTPROC
a0a461e5 629NM_H
81ecdfbb 630GDB_NM_FILE
ccb1ba62
CB
631LTLIBXXHASH
632LIBXXHASH
633HAVE_LIBXXHASH
393fd4c3
YQ
634LTLIBBABELTRACE
635LIBBABELTRACE
636HAVE_LIBBABELTRACE
21ea5acd
SDJ
637HAVE_NATIVE_GCORE_HOST
638NAT_GENERATED_FILES
639XM_CLIBS
640MH_CFLAGS
641LOADLIBES
642NAT_CDEPS
643NATDEPFILES
644NAT_FILE
81ecdfbb
RW
645target_subdir
646CONFIG_UNINSTALL
647CONFIG_INSTALL
648CONFIG_CLEAN
649CONFIG_ALL
650CONFIG_SRCS
651CONFIG_DEPS
652CONFIG_OBS
653PROFILE_CFLAGS
654ENABLE_CFLAGS
655SIM_OBS
656SIM
657XMKMF
658GDBTK_SRC_DIR
659GDBTK_CFLAGS
660GDBTKLIBS
661X_LIBS
662X_LDFLAGS
663X_CFLAGS
664TK_XINCLUDES
665TK_DEPS
666TK_LIBRARY
667TK_INCLUDE
668TK_STUB_LIB_SPEC
669TK_STUB_LIB_FLAG
670TK_STUB_LIB_FILE
671TK_LIB_SPEC
672TK_LIB_FLAG
673TK_LIB_FILE
674TK_SRC_DIR
675TK_BIN_DIR
676TK_VERSION
677TCL_DEPS
678TCL_LIBRARY
679TCL_INCLUDE
680TCL_STUB_LIB_SPEC
681TCL_STUB_LIB_FLAG
682TCL_STUB_LIB_FILE
683TCL_LIB_SPEC
684TCL_LIB_FLAG
685TCL_LIB_FILE
686TCL_SRC_DIR
687TCL_BIN_DIR
688TCL_PATCH_LEVEL
689TCL_VERSION
690WIN32LDAPP
691GUI_CFLAGS_X
692LIBGUI
608e2dbb
TT
693LTLIBLZMA
694LIBLZMA
695HAVE_LIBLZMA
81ecdfbb
RW
696WIN32LIBS
697SER_HARDWIRE
698WERROR_CFLAGS
699WARN_CFLAGS
ed2a2229 700SYSTEM_GDBINIT_DIR
81ecdfbb 701SYSTEM_GDBINIT
81ecdfbb
RW
702TARGET_SYSTEM_ROOT
703CONFIG_LDFLAGS
f6528abd 704RDYNAMIC
5e030278
TT
705PTHREAD_CFLAGS
706PTHREAD_LIBS
707PTHREAD_CC
708ax_pthread_config
709SED
81ecdfbb 710ALLOCA
58bfce93
MM
711LTLIBIPT
712LIBIPT
713HAVE_LIBIPT
62f29fda
TT
714SRCHIGH_CFLAGS
715SRCHIGH_LIBS
4df42755
DE
716HAVE_GUILE_FALSE
717HAVE_GUILE_TRUE
ed3ef339
DE
718GUILE_LIBS
719GUILE_CPPFLAGS
e76c5d17
DE
720GUILD_TARGET_FLAG
721GUILD
ed3ef339 722pkg_config_prog_path
4df42755
DE
723HAVE_PYTHON_FALSE
724HAVE_PYTHON_TRUE
ac534cba
JB
725PYTHON_LIBS
726PYTHON_CPPFLAGS
81ecdfbb 727PYTHON_CFLAGS
ec685c5e 728python_prog_path
2400729e
UW
729LTLIBMPFR
730LIBMPFR
731HAVE_LIBMPFR
81ecdfbb
RW
732LTLIBEXPAT
733LIBEXPAT
734HAVE_LIBEXPAT
b8e0a31c 735JIT_READER_DIR
f997c383 736TARGET_PTR
39037522 737READLINE_TEXI_INCFLAG
81ecdfbb
RW
738READLINE_CFLAGS
739READLINE_DEPS
740READLINE
016a3251
DD
741LTLIBICONV
742LIBICONV
711a72d3
L
743zlibinc
744zlibdir
81ecdfbb
RW
745MIG
746WINDRES
747DLLTOOL
c971b7fa 748AR
81ecdfbb
RW
749YFLAGS
750YACC
c971b7fa 751RANLIB
81ecdfbb 752LN_S
c971b7fa
PA
753INSTALL_DATA
754INSTALL_SCRIPT
755INSTALL_PROGRAM
756AWK
81ecdfbb
RW
757REPORT_BUGS_TEXI
758REPORT_BUGS_TO
759PKGVERSION
44cee4fd 760CODESIGN_CERT
b292c783 761HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
762TARGET_OBS
763subdirs
764GDB_DATADIR
765DEBUGDIR
5048e516
JK
766MAKEINFO_EXTRA_FLAGS
767MAKEINFOFLAGS
768MAKEINFO
81ecdfbb 769PACKAGE
81ecdfbb
RW
770CATOBJEXT
771GENCAT
772INSTOBJEXT
773DATADIRNAME
774CATALOGS
775POSUB
776GMSGFMT
777XGETTEXT
778INCINTL
779LIBINTL_DEP
780LIBINTL
781USE_NLS
81ecdfbb
RW
782CCDEPMODE
783DEPDIR
784am__leading_dot
0bcda685
PA
785CXX_DIALECT
786HAVE_CXX11
4869db5e
RM
787INSTALL_STRIP_PROGRAM
788STRIP
789install_sh
81ecdfbb
RW
790target_os
791target_vendor
792target_cpu
793target
794host_os
795host_vendor
796host_cpu
797host
798build_os
799build_vendor
800build_cpu
801build
c971b7fa
PA
802EGREP
803GREP
804CPP
3bc3d82a
PA
805ac_ct_CXX
806CXXFLAGS
807CXX
81ecdfbb
RW
808OBJEXT
809EXEEXT
810ac_ct_CC
811CPPFLAGS
812LDFLAGS
813CFLAGS
814CC
815MAINT
816MAINTAINER_MODE_FALSE
817MAINTAINER_MODE_TRUE
818target_alias
819host_alias
820build_alias
821LIBS
822ECHO_T
823ECHO_N
824ECHO_C
825DEFS
826mandir
827localedir
828libdir
829psdir
830pdfdir
831dvidir
832htmldir
833infodir
834docdir
835oldincludedir
836includedir
837localstatedir
838sharedstatedir
839sysconfdir
840datadir
841datarootdir
842libexecdir
843sbindir
844bindir
845program_transform_name
846prefix
847exec_prefix
848PACKAGE_URL
849PACKAGE_BUGREPORT
850PACKAGE_STRING
851PACKAGE_VERSION
852PACKAGE_TARNAME
853PACKAGE_NAME
854PATH_SEPARATOR
855SHELL'
2b351b19 856ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
857ac_user_opts='
858enable_option_checking
859enable_maintainer_mode
da2f07f1
JK
860enable_plugins
861enable_largefile
81ecdfbb
RW
862with_separate_debug_dir
863with_gdb_datadir
864with_relocated_sources
7349ff92 865with_auto_load_dir
bccbefd2 866with_auto_load_safe_path
81ecdfbb
RW
867enable_targets
868enable_64_bit_bfd
81ecdfbb
RW
869enable_gdbmi
870enable_tui
871enable_gdbtk
05e7c244 872with_libunwind_ia64
81ecdfbb
RW
873with_curses
874enable_profiling
44cee4fd 875enable_codesign
81ecdfbb
RW
876with_pkgversion
877with_bugurl
711a72d3 878with_system_zlib
016a3251
DD
879with_gnu_ld
880enable_rpath
81ecdfbb 881with_libiconv_prefix
478aac75 882with_iconv_bin
81ecdfbb 883with_system_readline
b8e0a31c 884with_jit_reader_dir
81ecdfbb 885with_expat
81ecdfbb 886with_libexpat_prefix
2400729e
UW
887with_mpfr
888with_libmpfr_prefix
81ecdfbb 889with_python
ed3ef339 890with_guile
189b8c2e 891enable_source_highlight
58bfce93
MM
892with_intel_pt
893with_libipt_prefix
81ecdfbb
RW
894with_included_regex
895with_sysroot
896with_system_gdbinit
ed2a2229 897with_system_gdbinit_dir
81ecdfbb
RW
898enable_werror
899enable_build_warnings
900enable_gdb_build_warnings
f35d5ade 901enable_ubsan
608e2dbb
TT
902with_lzma
903with_liblzma_prefix
81ecdfbb
RW
904with_tcl
905with_tk
906with_x
907enable_sim
496c0e1b 908enable_gdbserver
393fd4c3
YQ
909with_babeltrace
910with_libbabeltrace_prefix
ccb1ba62
CB
911with_xxhash
912with_libxxhash_prefix
8ecfd7bd 913enable_unit_tests
81ecdfbb
RW
914'
915 ac_precious_vars='build_alias
916host_alias
917target_alias
918CC
919CFLAGS
920LDFLAGS
921LIBS
922CPPFLAGS
3bc3d82a
PA
923CXX
924CXXFLAGS
925CCC
81ecdfbb 926CPP
f06e05e0
JK
927MAKEINFO
928MAKEINFOFLAGS
81ecdfbb
RW
929YACC
930YFLAGS
931XMKMF'
5ae98d25 932ac_subdirs_all='testsuite
81ecdfbb 933gdbtk
81ecdfbb 934gdbserver'
c906108c
SS
935
936# Initialize some variables set by options.
bec39cab
AC
937ac_init_help=
938ac_init_version=false
81ecdfbb
RW
939ac_unrecognized_opts=
940ac_unrecognized_sep=
c906108c
SS
941# The variables have the same names as the options, with
942# dashes changed to underlines.
bec39cab 943cache_file=/dev/null
c906108c 944exec_prefix=NONE
c906108c 945no_create=
c906108c
SS
946no_recursion=
947prefix=NONE
948program_prefix=NONE
949program_suffix=NONE
950program_transform_name=s,x,x,
951silent=
952site=
953srcdir=
c906108c
SS
954verbose=
955x_includes=NONE
956x_libraries=NONE
bec39cab
AC
957
958# Installation directory options.
959# These are left unexpanded so users can "make install exec_prefix=/foo"
960# and all the variables that are supposed to be based on exec_prefix
961# by default will actually change.
962# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 963# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
964bindir='${exec_prefix}/bin'
965sbindir='${exec_prefix}/sbin'
966libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
967datarootdir='${prefix}/share'
968datadir='${datarootdir}'
c906108c
SS
969sysconfdir='${prefix}/etc'
970sharedstatedir='${prefix}/com'
971localstatedir='${prefix}/var'
c906108c
SS
972includedir='${prefix}/include'
973oldincludedir='/usr/include'
81ecdfbb
RW
974docdir='${datarootdir}/doc/${PACKAGE}'
975infodir='${datarootdir}/info'
976htmldir='${docdir}'
977dvidir='${docdir}'
978pdfdir='${docdir}'
979psdir='${docdir}'
980libdir='${exec_prefix}/lib'
981localedir='${datarootdir}/locale'
982mandir='${datarootdir}/man'
c906108c 983
c906108c 984ac_prev=
81ecdfbb 985ac_dashdash=
c906108c
SS
986for ac_option
987do
c906108c
SS
988 # If the previous option needs an argument, assign it.
989 if test -n "$ac_prev"; then
81ecdfbb 990 eval $ac_prev=\$ac_option
c906108c
SS
991 ac_prev=
992 continue
993 fi
994
81ecdfbb 995 case $ac_option in
d0ac1c44
SM
996 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
997 *=) ac_optarg= ;;
998 *) ac_optarg=yes ;;
81ecdfbb 999 esac
c906108c
SS
1000
1001 # Accept the important Cygnus configure options, so we can diagnose typos.
1002
81ecdfbb
RW
1003 case $ac_dashdash$ac_option in
1004 --)
1005 ac_dashdash=yes ;;
c906108c
SS
1006
1007 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1008 ac_prev=bindir ;;
1009 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1010 bindir=$ac_optarg ;;
c906108c
SS
1011
1012 -build | --build | --buil | --bui | --bu)
bec39cab 1013 ac_prev=build_alias ;;
c906108c 1014 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1015 build_alias=$ac_optarg ;;
c906108c
SS
1016
1017 -cache-file | --cache-file | --cache-fil | --cache-fi \
1018 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1019 ac_prev=cache_file ;;
1020 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1021 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1022 cache_file=$ac_optarg ;;
1023
1024 --config-cache | -C)
1025 cache_file=config.cache ;;
c906108c 1026
81ecdfbb 1027 -datadir | --datadir | --datadi | --datad)
c906108c 1028 ac_prev=datadir ;;
81ecdfbb 1029 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1030 datadir=$ac_optarg ;;
c906108c 1031
81ecdfbb
RW
1032 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1033 | --dataroo | --dataro | --datar)
1034 ac_prev=datarootdir ;;
1035 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1036 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1037 datarootdir=$ac_optarg ;;
1038
c906108c 1039 -disable-* | --disable-*)
81ecdfbb 1040 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1041 # Reject names that are not valid shell variable names.
81ecdfbb 1042 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1043 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1044 ac_useropt_orig=$ac_useropt
1045 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1046 case $ac_user_opts in
1047 *"
1048"enable_$ac_useropt"
1049"*) ;;
1050 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1051 ac_unrecognized_sep=', ';;
1052 esac
1053 eval enable_$ac_useropt=no ;;
1054
1055 -docdir | --docdir | --docdi | --doc | --do)
1056 ac_prev=docdir ;;
1057 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1058 docdir=$ac_optarg ;;
1059
1060 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1061 ac_prev=dvidir ;;
1062 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1063 dvidir=$ac_optarg ;;
c906108c
SS
1064
1065 -enable-* | --enable-*)
81ecdfbb 1066 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1067 # Reject names that are not valid shell variable names.
81ecdfbb 1068 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1069 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1070 ac_useropt_orig=$ac_useropt
1071 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1072 case $ac_user_opts in
1073 *"
1074"enable_$ac_useropt"
1075"*) ;;
1076 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1077 ac_unrecognized_sep=', ';;
b4e70030 1078 esac
81ecdfbb 1079 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1080
1081 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1082 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1083 | --exec | --exe | --ex)
1084 ac_prev=exec_prefix ;;
1085 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1086 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1087 | --exec=* | --exe=* | --ex=*)
bec39cab 1088 exec_prefix=$ac_optarg ;;
c906108c
SS
1089
1090 -gas | --gas | --ga | --g)
1091 # Obsolete; use --with-gas.
1092 with_gas=yes ;;
1093
bec39cab
AC
1094 -help | --help | --hel | --he | -h)
1095 ac_init_help=long ;;
1096 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1097 ac_init_help=recursive ;;
1098 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1099 ac_init_help=short ;;
c906108c
SS
1100
1101 -host | --host | --hos | --ho)
bec39cab 1102 ac_prev=host_alias ;;
c906108c 1103 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1104 host_alias=$ac_optarg ;;
c906108c 1105
81ecdfbb
RW
1106 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1107 ac_prev=htmldir ;;
1108 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1109 | --ht=*)
1110 htmldir=$ac_optarg ;;
1111
c906108c
SS
1112 -includedir | --includedir | --includedi | --included | --include \
1113 | --includ | --inclu | --incl | --inc)
1114 ac_prev=includedir ;;
1115 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1116 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1117 includedir=$ac_optarg ;;
c906108c
SS
1118
1119 -infodir | --infodir | --infodi | --infod | --info | --inf)
1120 ac_prev=infodir ;;
1121 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1122 infodir=$ac_optarg ;;
c906108c
SS
1123
1124 -libdir | --libdir | --libdi | --libd)
1125 ac_prev=libdir ;;
1126 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1127 libdir=$ac_optarg ;;
c906108c
SS
1128
1129 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1130 | --libexe | --libex | --libe)
1131 ac_prev=libexecdir ;;
1132 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1133 | --libexe=* | --libex=* | --libe=*)
bec39cab 1134 libexecdir=$ac_optarg ;;
c906108c 1135
81ecdfbb
RW
1136 -localedir | --localedir | --localedi | --localed | --locale)
1137 ac_prev=localedir ;;
1138 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1139 localedir=$ac_optarg ;;
1140
c906108c 1141 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1142 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1143 ac_prev=localstatedir ;;
1144 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1145 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1146 localstatedir=$ac_optarg ;;
c906108c
SS
1147
1148 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1149 ac_prev=mandir ;;
1150 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1151 mandir=$ac_optarg ;;
c906108c
SS
1152
1153 -nfp | --nfp | --nf)
1154 # Obsolete; use --without-fp.
1155 with_fp=no ;;
1156
1157 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1158 | --no-cr | --no-c | -n)
c906108c
SS
1159 no_create=yes ;;
1160
1161 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1162 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1163 no_recursion=yes ;;
1164
1165 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1166 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1167 | --oldin | --oldi | --old | --ol | --o)
1168 ac_prev=oldincludedir ;;
1169 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1170 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1171 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1172 oldincludedir=$ac_optarg ;;
c906108c
SS
1173
1174 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1175 ac_prev=prefix ;;
1176 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1177 prefix=$ac_optarg ;;
c906108c
SS
1178
1179 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1180 | --program-pre | --program-pr | --program-p)
1181 ac_prev=program_prefix ;;
1182 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1183 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1184 program_prefix=$ac_optarg ;;
c906108c
SS
1185
1186 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1187 | --program-suf | --program-su | --program-s)
1188 ac_prev=program_suffix ;;
1189 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1190 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1191 program_suffix=$ac_optarg ;;
c906108c
SS
1192
1193 -program-transform-name | --program-transform-name \
1194 | --program-transform-nam | --program-transform-na \
1195 | --program-transform-n | --program-transform- \
1196 | --program-transform | --program-transfor \
1197 | --program-transfo | --program-transf \
1198 | --program-trans | --program-tran \
1199 | --progr-tra | --program-tr | --program-t)
1200 ac_prev=program_transform_name ;;
1201 -program-transform-name=* | --program-transform-name=* \
1202 | --program-transform-nam=* | --program-transform-na=* \
1203 | --program-transform-n=* | --program-transform-=* \
1204 | --program-transform=* | --program-transfor=* \
1205 | --program-transfo=* | --program-transf=* \
1206 | --program-trans=* | --program-tran=* \
1207 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1208 program_transform_name=$ac_optarg ;;
c906108c 1209
81ecdfbb
RW
1210 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1211 ac_prev=pdfdir ;;
1212 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1213 pdfdir=$ac_optarg ;;
1214
1215 -psdir | --psdir | --psdi | --psd | --ps)
1216 ac_prev=psdir ;;
1217 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1218 psdir=$ac_optarg ;;
1219
c906108c
SS
1220 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1221 | -silent | --silent | --silen | --sile | --sil)
1222 silent=yes ;;
1223
1224 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1225 ac_prev=sbindir ;;
1226 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1227 | --sbi=* | --sb=*)
bec39cab 1228 sbindir=$ac_optarg ;;
c906108c
SS
1229
1230 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1231 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1232 | --sharedst | --shareds | --shared | --share | --shar \
1233 | --sha | --sh)
1234 ac_prev=sharedstatedir ;;
1235 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1236 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1237 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1238 | --sha=* | --sh=*)
bec39cab 1239 sharedstatedir=$ac_optarg ;;
c906108c
SS
1240
1241 -site | --site | --sit)
1242 ac_prev=site ;;
1243 -site=* | --site=* | --sit=*)
bec39cab 1244 site=$ac_optarg ;;
3ace7edb 1245
c906108c
SS
1246 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1247 ac_prev=srcdir ;;
1248 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1249 srcdir=$ac_optarg ;;
c906108c
SS
1250
1251 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1252 | --syscon | --sysco | --sysc | --sys | --sy)
1253 ac_prev=sysconfdir ;;
1254 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1255 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1256 sysconfdir=$ac_optarg ;;
c906108c
SS
1257
1258 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1259 ac_prev=target_alias ;;
c906108c 1260 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1261 target_alias=$ac_optarg ;;
c906108c
SS
1262
1263 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1264 verbose=yes ;;
1265
bec39cab
AC
1266 -version | --version | --versio | --versi | --vers | -V)
1267 ac_init_version=: ;;
c906108c
SS
1268
1269 -with-* | --with-*)
81ecdfbb 1270 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1271 # Reject names that are not valid shell variable names.
81ecdfbb 1272 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1273 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1274 ac_useropt_orig=$ac_useropt
1275 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1276 case $ac_user_opts in
1277 *"
1278"with_$ac_useropt"
1279"*) ;;
1280 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1281 ac_unrecognized_sep=', ';;
b4e70030 1282 esac
81ecdfbb 1283 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1284
1285 -without-* | --without-*)
81ecdfbb 1286 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1287 # Reject names that are not valid shell variable names.
81ecdfbb 1288 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1289 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1290 ac_useropt_orig=$ac_useropt
1291 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1292 case $ac_user_opts in
1293 *"
1294"with_$ac_useropt"
1295"*) ;;
1296 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1297 ac_unrecognized_sep=', ';;
1298 esac
1299 eval with_$ac_useropt=no ;;
c906108c
SS
1300
1301 --x)
1302 # Obsolete; use --with-x.
1303 with_x=yes ;;
1304
1305 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1306 | --x-incl | --x-inc | --x-in | --x-i)
1307 ac_prev=x_includes ;;
1308 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1309 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1310 x_includes=$ac_optarg ;;
c906108c
SS
1311
1312 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1313 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1314 ac_prev=x_libraries ;;
1315 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1316 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1317 x_libraries=$ac_optarg ;;
c906108c 1318
d0ac1c44
SM
1319 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1320Try \`$0 --help' for more information"
c906108c
SS
1321 ;;
1322
bec39cab
AC
1323 *=*)
1324 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1325 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1326 case $ac_envvar in #(
1327 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1328 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1329 esac
1330 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1331 export $ac_envvar ;;
1332
c906108c 1333 *)
bec39cab 1334 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1335 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1336 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1337 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1338 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1339 ;;
1340
1341 esac
1342done
1343
1344if test -n "$ac_prev"; then
bec39cab 1345 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1346 as_fn_error $? "missing argument to $ac_option"
c906108c 1347fi
c906108c 1348
81ecdfbb
RW
1349if test -n "$ac_unrecognized_opts"; then
1350 case $enable_option_checking in
1351 no) ;;
d0ac1c44 1352 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1353 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1354 esac
81ecdfbb 1355fi
b4e70030 1356
81ecdfbb
RW
1357# Check all directory arguments for consistency.
1358for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1359 datadir sysconfdir sharedstatedir localstatedir includedir \
1360 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1361 libdir localedir mandir
b4e70030 1362do
81ecdfbb
RW
1363 eval ac_val=\$$ac_var
1364 # Remove trailing slashes.
1365 case $ac_val in
1366 */ )
1367 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1368 eval $ac_var=\$ac_val;;
1369 esac
1370 # Be sure to have absolute directory names.
b4e70030 1371 case $ac_val in
81ecdfbb
RW
1372 [\\/$]* | ?:[\\/]* ) continue;;
1373 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1374 esac
d0ac1c44 1375 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1376done
1377
bec39cab
AC
1378# There might be people who depend on the old broken behavior: `$host'
1379# used to hold the argument of --host etc.
1380# FIXME: To remove some day.
1381build=$build_alias
1382host=$host_alias
1383target=$target_alias
1384
1385# FIXME: To remove some day.
1386if test "x$host_alias" != x; then
1387 if test "x$build_alias" = x; then
1388 cross_compiling=maybe
bec39cab
AC
1389 elif test "x$build_alias" != "x$host_alias"; then
1390 cross_compiling=yes
1391 fi
1392fi
c906108c 1393
bec39cab
AC
1394ac_tool_prefix=
1395test -n "$host_alias" && ac_tool_prefix=$host_alias-
1396
1397test "$silent" = yes && exec 6>/dev/null
c906108c 1398
c906108c 1399
81ecdfbb
RW
1400ac_pwd=`pwd` && test -n "$ac_pwd" &&
1401ac_ls_di=`ls -di .` &&
1402ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1403 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1404test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1405 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1406
1407
c906108c
SS
1408# Find the source files, if location was not specified.
1409if test -z "$srcdir"; then
1410 ac_srcdir_defaulted=yes
81ecdfbb
RW
1411 # Try the directory containing this script, then the parent directory.
1412 ac_confdir=`$as_dirname -- "$as_myself" ||
1413$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1414 X"$as_myself" : 'X\(//\)[^/]' \| \
1415 X"$as_myself" : 'X\(//\)$' \| \
1416 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1417$as_echo X"$as_myself" |
1418 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1419 s//\1/
1420 q
1421 }
1422 /^X\(\/\/\)[^/].*/{
1423 s//\1/
1424 q
1425 }
1426 /^X\(\/\/\)$/{
1427 s//\1/
1428 q
1429 }
1430 /^X\(\/\).*/{
1431 s//\1/
1432 q
1433 }
1434 s/.*/./; q'`
c906108c 1435 srcdir=$ac_confdir
81ecdfbb 1436 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1437 srcdir=..
1438 fi
1439else
1440 ac_srcdir_defaulted=no
1441fi
81ecdfbb
RW
1442if test ! -r "$srcdir/$ac_unique_file"; then
1443 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1444 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1445fi
1446ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1447ac_abs_confdir=`(
d0ac1c44 1448 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1449 pwd)`
1450# When building in place, set srcdir=.
1451if test "$ac_abs_confdir" = "$ac_pwd"; then
1452 srcdir=.
1453fi
1454# Remove unnecessary trailing slashes from srcdir.
1455# Double slashes in file names in object file debugging info
1456# mess up M-x gdb in Emacs.
1457case $srcdir in
1458*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1459esac
1460for ac_var in $ac_precious_vars; do
1461 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1462 eval ac_env_${ac_var}_value=\$${ac_var}
1463 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1464 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1465done
c906108c 1466
bec39cab
AC
1467#
1468# Report the --help message.
1469#
1470if test "$ac_init_help" = "long"; then
1471 # Omit some internal or obsolete options to make the list less imposing.
1472 # This message is too long to be a string in the A/UX 3.1 sh.
1473 cat <<_ACEOF
1474\`configure' configures this package to adapt to many kinds of systems.
1475
1476Usage: $0 [OPTION]... [VAR=VALUE]...
1477
1478To assign environment variables (e.g., CC, CFLAGS...), specify them as
1479VAR=VALUE. See below for descriptions of some of the useful variables.
1480
1481Defaults for the options are specified in brackets.
1482
1483Configuration:
1484 -h, --help display this help and exit
1485 --help=short display options specific to this package
1486 --help=recursive display the short help of all the included packages
1487 -V, --version display version information and exit
d0ac1c44 1488 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1489 --cache-file=FILE cache test results in FILE [disabled]
1490 -C, --config-cache alias for \`--cache-file=config.cache'
1491 -n, --no-create do not create output files
1492 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1493
bec39cab
AC
1494Installation directories:
1495 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1496 [$ac_default_prefix]
bec39cab 1497 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1498 [PREFIX]
bec39cab
AC
1499
1500By default, \`make install' will install all the files in
1501\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1502an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1503for instance \`--prefix=\$HOME'.
1504
1505For better control, use the options below.
1506
1507Fine tuning of the installation directories:
81ecdfbb
RW
1508 --bindir=DIR user executables [EPREFIX/bin]
1509 --sbindir=DIR system admin executables [EPREFIX/sbin]
1510 --libexecdir=DIR program executables [EPREFIX/libexec]
1511 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1512 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1513 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1514 --libdir=DIR object code libraries [EPREFIX/lib]
1515 --includedir=DIR C header files [PREFIX/include]
1516 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1517 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1518 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1519 --infodir=DIR info documentation [DATAROOTDIR/info]
1520 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1521 --mandir=DIR man documentation [DATAROOTDIR/man]
1522 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1523 --htmldir=DIR html documentation [DOCDIR]
1524 --dvidir=DIR dvi documentation [DOCDIR]
1525 --pdfdir=DIR pdf documentation [DOCDIR]
1526 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1527_ACEOF
1528
1529 cat <<\_ACEOF
1530
9009e1ae
MR
1531Program names:
1532 --program-prefix=PREFIX prepend PREFIX to installed program names
1533 --program-suffix=SUFFIX append SUFFIX to installed program names
1534 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1535
bec39cab
AC
1536X features:
1537 --x-includes=DIR X include files are in DIR
1538 --x-libraries=DIR X library files are in DIR
1539
1540System types:
1541 --build=BUILD configure for building on BUILD [guessed]
1542 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1543 --target=TARGET configure for building compilers for TARGET [HOST]
1544_ACEOF
1545fi
1546
1547if test -n "$ac_init_help"; then
1548
1549 cat <<\_ACEOF
1550
1551Optional Features:
81ecdfbb 1552 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1553 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1554 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1555 --enable-maintainer-mode
1556 enable make rules and dependencies not useful (and
1557 sometimes confusing) to the casual installer
2974be62 1558 --enable-plugins Enable support for plugins
da2f07f1 1559 --disable-largefile omit support for large files
a1220294
TT
1560 --enable-targets=TARGETS
1561 alternative target configurations
c0993dbe 1562 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1563 --disable-gdbmi disable machine-interface (MI)
1564 --enable-tui enable full-screen terminal user interface (TUI)
1565 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1566 --enable-profiling enable profiling of GDB
44cee4fd 1567 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1568 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1569 --enable-source-highlight
1570 enable source-highlight for source listings
a1220294 1571 --enable-werror treat compile warnings as errors
32c1c914 1572 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1573 --enable-gdb-build-warnings
32c1c914 1574 enable GDB specific build-time compiler warnings if
a1220294 1575 gcc is used
f35d5ade 1576 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1577 --enable-sim link gdb with simulator
496c0e1b
JB
1578 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1579 is auto)
8ecfd7bd
SDJ
1580 --enable-unit-tests Enable the inclusion of unit tests when compiling
1581 GDB
bec39cab
AC
1582
1583Optional Packages:
1584 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1585 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1586 --with-separate-debug-dir=PATH
32c1c914 1587 look for global separate debug info in this path
62e4f60c 1588 [LIBDIR/debug]
b14b1491
TT
1589 --with-gdb-datadir=PATH look for global separate data files in this path
1590 [DATADIR/gdb]
29b0e8a2 1591 --with-relocated-sources=PATH
32c1c914 1592 automatically relocate this path for source files
7349ff92 1593 --with-auto-load-dir=PATH
aff139ff 1594 directories from which to load auto-loaded scripts
1564a261 1595 [$debugdir:$datadir/auto-load]
bccbefd2 1596 --with-auto-load-safe-path=PATH
aff139ff 1597 directories safe to hold auto-loaded files
7349ff92 1598 [--with-auto-load-dir]
bccbefd2
JK
1599 --without-auto-load-safe-path
1600 do not restrict auto-loaded files locations
05e7c244 1601 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1602 --with-curses use the curses library instead of the termcap
1603 library
c16158bc
JM
1604 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1605 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1606 --with-system-zlib use installed libz
016a3251
DD
1607 --with-gnu-ld assume the C compiler uses GNU ld default=no
1608 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1609 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1610 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1611 --with-system-readline use installed readline library
b8e0a31c
SD
1612 --with-jit-reader-dir=PATH
1613 directory to load the JIT readers from
5c39566f 1614 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1615 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1616 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1617 --with-mpfr include MPFR support (auto/yes/no)
1618 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1619 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1620 --with-python[=PYTHON] include python support
1621 (auto/yes/no/<python-program>)
ed3ef339
DE
1622 --with-guile[=GUILE] include guile support
1623 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1624 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1625 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1626 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1627 --without-included-regex
1628 don't use included regex; this is the default on
1629 systems with version 2 of the GNU C library (use
1630 with caution on other system)
81ecdfbb 1631 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1632 --with-system-gdbinit=PATH
32c1c914 1633 automatically load a system-wide gdbinit file
ed2a2229
CB
1634 --with-system-gdbinit-dir=PATH
1635 automatically load system-wide gdbinit files from
1636 this directory
608e2dbb
TT
1637 --with-lzma support lzma compression (auto/yes/no)
1638 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1639 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1640 --with-tcl directory containing tcl configuration (tclConfig.sh)
1641 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1642 --with-x use the X Window System
393fd4c3
YQ
1643 --with-babeltrace include babeltrace support (auto/yes/no)
1644 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1645 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
ccb1ba62
CB
1646 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1647 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1648 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
bec39cab
AC
1649
1650Some influential environment variables:
1651 CC C compiler command
1652 CFLAGS C compiler flags
1653 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1654 nonstandard directory <lib dir>
81ecdfbb 1655 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1656 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1657 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1658 CXX C++ compiler command
1659 CXXFLAGS C++ compiler flags
bec39cab 1660 CPP C preprocessor
f06e05e0
JK
1661 MAKEINFO Parent configure detects if it is of sufficient version.
1662 MAKEINFOFLAGS
1663 Parameters for MAKEINFO.
d0ac1c44
SM
1664 YACC The `Yet Another Compiler Compiler' implementation to use.
1665 Defaults to the first program found out of: `bison -y', `byacc',
1666 `yacc'.
81ecdfbb
RW
1667 YFLAGS The list of arguments that will be passed by default to $YACC.
1668 This script will default YFLAGS to the empty string to avoid a
1669 default value of `-d' given by some make applications.
1670 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1671
1672Use these variables to override the choices made by `configure' or to help
1673it to find libraries and programs with nonstandard names/locations.
1674
81ecdfbb 1675Report bugs to the package provider.
bec39cab 1676_ACEOF
81ecdfbb 1677ac_status=$?
bec39cab
AC
1678fi
1679
1680if test "$ac_init_help" = "recursive"; then
1681 # If there are subdirs, report their specific --help.
bec39cab 1682 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1683 test -d "$ac_dir" ||
1684 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1685 continue
bec39cab
AC
1686 ac_builddir=.
1687
81ecdfbb
RW
1688case "$ac_dir" in
1689.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1690*)
1691 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1692 # A ".." for each directory in $ac_dir_suffix.
1693 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1694 case $ac_top_builddir_sub in
1695 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1696 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1697 esac ;;
1698esac
1699ac_abs_top_builddir=$ac_pwd
1700ac_abs_builddir=$ac_pwd$ac_dir_suffix
1701# for backward compatibility:
1702ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1703
1704case $srcdir in
81ecdfbb 1705 .) # We are building in place.
bec39cab 1706 ac_srcdir=.
81ecdfbb
RW
1707 ac_top_srcdir=$ac_top_builddir_sub
1708 ac_abs_top_srcdir=$ac_pwd ;;
1709 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1710 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1711 ac_top_srcdir=$srcdir
1712 ac_abs_top_srcdir=$srcdir ;;
1713 *) # Relative name.
1714 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1715 ac_top_srcdir=$ac_top_build_prefix$srcdir
1716 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1717esac
81ecdfbb 1718ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1719
81ecdfbb
RW
1720 cd "$ac_dir" || { ac_status=$?; continue; }
1721 # Check for guested configure.
1722 if test -f "$ac_srcdir/configure.gnu"; then
1723 echo &&
1724 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1725 elif test -f "$ac_srcdir/configure"; then
1726 echo &&
1727 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1728 else
81ecdfbb
RW
1729 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1730 fi || ac_status=$?
1731 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1732 done
1733fi
1734
81ecdfbb 1735test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1736if $ac_init_version; then
1737 cat <<\_ACEOF
81ecdfbb 1738configure
d0ac1c44 1739generated by GNU Autoconf 2.69
bec39cab 1740
d0ac1c44 1741Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1742This configure script is free software; the Free Software Foundation
1743gives unlimited permission to copy, distribute and modify it.
1744_ACEOF
81ecdfbb 1745 exit
bec39cab 1746fi
bec39cab 1747
81ecdfbb
RW
1748## ------------------------ ##
1749## Autoconf initialization. ##
1750## ------------------------ ##
bec39cab 1751
81ecdfbb
RW
1752# ac_fn_c_try_compile LINENO
1753# --------------------------
1754# Try to compile conftest.$ac_ext, and return whether this succeeded.
1755ac_fn_c_try_compile ()
1756{
1757 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1758 rm -f conftest.$ac_objext
1759 if { { ac_try="$ac_compile"
1760case "(($ac_try" in
1761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1762 *) ac_try_echo=$ac_try;;
1763esac
1764eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1765$as_echo "$ac_try_echo"; } >&5
1766 (eval "$ac_compile") 2>conftest.err
1767 ac_status=$?
1768 if test -s conftest.err; then
1769 grep -v '^ *+' conftest.err >conftest.er1
1770 cat conftest.er1 >&5
1771 mv -f conftest.er1 conftest.err
1772 fi
1773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1774 test $ac_status = 0; } && {
1775 test -z "$ac_c_werror_flag" ||
1776 test ! -s conftest.err
1777 } && test -s conftest.$ac_objext; then :
1778 ac_retval=0
1779else
1780 $as_echo "$as_me: failed program was:" >&5
1781sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1782
81ecdfbb
RW
1783 ac_retval=1
1784fi
d0ac1c44
SM
1785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1786 as_fn_set_status $ac_retval
81ecdfbb
RW
1787
1788} # ac_fn_c_try_compile
1789
3bc3d82a
PA
1790# ac_fn_cxx_try_compile LINENO
1791# ----------------------------
1792# Try to compile conftest.$ac_ext, and return whether this succeeded.
1793ac_fn_cxx_try_compile ()
1794{
1795 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1796 rm -f conftest.$ac_objext
1797 if { { ac_try="$ac_compile"
1798case "(($ac_try" in
1799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1800 *) ac_try_echo=$ac_try;;
1801esac
1802eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1803$as_echo "$ac_try_echo"; } >&5
1804 (eval "$ac_compile") 2>conftest.err
1805 ac_status=$?
1806 if test -s conftest.err; then
1807 grep -v '^ *+' conftest.err >conftest.er1
1808 cat conftest.er1 >&5
1809 mv -f conftest.er1 conftest.err
1810 fi
1811 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1812 test $ac_status = 0; } && {
1813 test -z "$ac_cxx_werror_flag" ||
1814 test ! -s conftest.err
1815 } && test -s conftest.$ac_objext; then :
1816 ac_retval=0
1817else
1818 $as_echo "$as_me: failed program was:" >&5
1819sed 's/^/| /' conftest.$ac_ext >&5
1820
1821 ac_retval=1
1822fi
d0ac1c44
SM
1823 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1824 as_fn_set_status $ac_retval
3bc3d82a
PA
1825
1826} # ac_fn_cxx_try_compile
1827
81ecdfbb
RW
1828# ac_fn_c_try_cpp LINENO
1829# ----------------------
1830# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1831ac_fn_c_try_cpp ()
bec39cab 1832{
81ecdfbb
RW
1833 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1834 if { { ac_try="$ac_cpp conftest.$ac_ext"
1835case "(($ac_try" in
1836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1837 *) ac_try_echo=$ac_try;;
1838esac
1839eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1840$as_echo "$ac_try_echo"; } >&5
1841 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1842 ac_status=$?
1843 if test -s conftest.err; then
1844 grep -v '^ *+' conftest.err >conftest.er1
1845 cat conftest.er1 >&5
1846 mv -f conftest.er1 conftest.err
1847 fi
1848 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1849 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1850 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1851 test ! -s conftest.err
1852 }; then :
1853 ac_retval=0
1854else
1855 $as_echo "$as_me: failed program was:" >&5
1856sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1857
81ecdfbb
RW
1858 ac_retval=1
1859fi
d0ac1c44
SM
1860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1861 as_fn_set_status $ac_retval
bec39cab 1862
81ecdfbb 1863} # ac_fn_c_try_cpp
bec39cab 1864
81ecdfbb
RW
1865# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1866# -------------------------------------------------------
1867# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1868# the include files in INCLUDES and setting the cache variable VAR
1869# accordingly.
1870ac_fn_c_check_header_mongrel ()
1871{
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1873 if eval \${$3+:} false; then :
81ecdfbb
RW
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1875$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1876if eval \${$3+:} false; then :
81ecdfbb
RW
1877 $as_echo_n "(cached) " >&6
1878fi
1879eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881$as_echo "$ac_res" >&6; }
1882else
1883 # Is the header compilable?
1884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1885$as_echo_n "checking $2 usability... " >&6; }
1886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887/* end confdefs.h. */
1888$4
1889#include <$2>
1890_ACEOF
1891if ac_fn_c_try_compile "$LINENO"; then :
1892 ac_header_compiler=yes
1893else
1894 ac_header_compiler=no
1895fi
1896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1898$as_echo "$ac_header_compiler" >&6; }
bec39cab 1899
81ecdfbb
RW
1900# Is the header present?
1901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1902$as_echo_n "checking $2 presence... " >&6; }
1903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h. */
1905#include <$2>
1906_ACEOF
1907if ac_fn_c_try_cpp "$LINENO"; then :
1908 ac_header_preproc=yes
1909else
1910 ac_header_preproc=no
1911fi
d0ac1c44 1912rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1914$as_echo "$ac_header_preproc" >&6; }
bec39cab 1915
81ecdfbb
RW
1916# So? What about this header?
1917case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1918 yes:no: )
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1920$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1922$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1923 ;;
1924 no:yes:* )
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1926$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1928$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1930$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1932$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1934$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1935 ;;
1936esac
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1938$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1939if eval \${$3+:} false; then :
81ecdfbb
RW
1940 $as_echo_n "(cached) " >&6
1941else
1942 eval "$3=\$ac_header_compiler"
1943fi
1944eval ac_res=\$$3
1945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1946$as_echo "$ac_res" >&6; }
1947fi
d0ac1c44 1948 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1949
81ecdfbb 1950} # ac_fn_c_check_header_mongrel
bec39cab 1951
81ecdfbb
RW
1952# ac_fn_c_try_run LINENO
1953# ----------------------
1954# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1955# that executables *can* be run.
1956ac_fn_c_try_run ()
1957{
1958 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1959 if { { ac_try="$ac_link"
1960case "(($ac_try" in
1961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1962 *) ac_try_echo=$ac_try;;
1963esac
1964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1965$as_echo "$ac_try_echo"; } >&5
1966 (eval "$ac_link") 2>&5
1967 ac_status=$?
1968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1969 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1970 { { case "(($ac_try" in
1971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1972 *) ac_try_echo=$ac_try;;
1973esac
1974eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1975$as_echo "$ac_try_echo"; } >&5
1976 (eval "$ac_try") 2>&5
1977 ac_status=$?
1978 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1979 test $ac_status = 0; }; }; then :
1980 ac_retval=0
1981else
1982 $as_echo "$as_me: program exited with status $ac_status" >&5
1983 $as_echo "$as_me: failed program was:" >&5
1984sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1985
81ecdfbb
RW
1986 ac_retval=$ac_status
1987fi
1988 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1989 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1990 as_fn_set_status $ac_retval
bec39cab 1991
81ecdfbb 1992} # ac_fn_c_try_run
bec39cab 1993
81ecdfbb
RW
1994# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1995# -------------------------------------------------------
1996# Tests whether HEADER exists and can be compiled using the include files in
1997# INCLUDES, setting the cache variable VAR accordingly.
1998ac_fn_c_check_header_compile ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2002$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2003if eval \${$3+:} false; then :
81ecdfbb
RW
2004 $as_echo_n "(cached) " >&6
2005else
2006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008$4
2009#include <$2>
bec39cab 2010_ACEOF
81ecdfbb
RW
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 eval "$3=yes"
2013else
2014 eval "$3=no"
2015fi
2016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2017fi
2018eval ac_res=\$$3
2019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2020$as_echo "$ac_res" >&6; }
d0ac1c44 2021 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2022
81ecdfbb 2023} # ac_fn_c_check_header_compile
bec39cab 2024
2974be62
AM
2025# ac_fn_c_try_link LINENO
2026# -----------------------
2027# Try to link conftest.$ac_ext, and return whether this succeeded.
2028ac_fn_c_try_link ()
2029{
2030 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031 rm -f conftest.$ac_objext conftest$ac_exeext
2032 if { { ac_try="$ac_link"
2033case "(($ac_try" in
2034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035 *) ac_try_echo=$ac_try;;
2036esac
2037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038$as_echo "$ac_try_echo"; } >&5
2039 (eval "$ac_link") 2>conftest.err
2040 ac_status=$?
2041 if test -s conftest.err; then
2042 grep -v '^ *+' conftest.err >conftest.er1
2043 cat conftest.er1 >&5
2044 mv -f conftest.er1 conftest.err
2045 fi
2046 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047 test $ac_status = 0; } && {
2048 test -z "$ac_c_werror_flag" ||
2049 test ! -s conftest.err
2050 } && test -s conftest$ac_exeext && {
2051 test "$cross_compiling" = yes ||
d0ac1c44 2052 test -x conftest$ac_exeext
2974be62
AM
2053 }; then :
2054 ac_retval=0
2055else
2056 $as_echo "$as_me: failed program was:" >&5
2057sed 's/^/| /' conftest.$ac_ext >&5
2058
2059 ac_retval=1
2060fi
2061 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2062 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2063 # interfere with the next link command; also delete a directory that is
2064 # left behind by Apple's compiler. We do this before executing the actions.
2065 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2066 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2067 as_fn_set_status $ac_retval
2974be62
AM
2068
2069} # ac_fn_c_try_link
2070
81ecdfbb
RW
2071# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2072# --------------------------------------------
2073# Tries to find the compile-time value of EXPR in a program that includes
2074# INCLUDES, setting VAR accordingly. Returns whether the value could be
2075# computed
2076ac_fn_c_compute_int ()
2077{
2078 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2079 if test "$cross_compiling" = yes; then
2080 # Depending upon the size, compute the lo and hi bounds.
2081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2082/* end confdefs.h. */
2083$4
2084int
2085main ()
2086{
2087static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2088test_array [0] = 0;
2089return test_array [0];
bec39cab 2090
81ecdfbb
RW
2091 ;
2092 return 0;
2093}
2094_ACEOF
2095if ac_fn_c_try_compile "$LINENO"; then :
2096 ac_lo=0 ac_mid=0
2097 while :; do
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099/* end confdefs.h. */
2100$4
2101int
2102main ()
2103{
2104static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2105test_array [0] = 0;
2106return test_array [0];
bec39cab 2107
81ecdfbb
RW
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112if ac_fn_c_try_compile "$LINENO"; then :
2113 ac_hi=$ac_mid; break
2114else
2115 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2116 if test $ac_lo -le $ac_mid; then
2117 ac_lo= ac_hi=
2118 break
2119 fi
2120 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2121fi
81ecdfbb
RW
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123 done
c906108c 2124else
81ecdfbb
RW
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h. */
2127$4
2128int
2129main ()
2130{
2131static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2132test_array [0] = 0;
2133return test_array [0];
bec39cab 2134
81ecdfbb
RW
2135 ;
2136 return 0;
2137}
2138_ACEOF
2139if ac_fn_c_try_compile "$LINENO"; then :
2140 ac_hi=-1 ac_mid=-1
2141 while :; do
2142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143/* end confdefs.h. */
2144$4
2145int
2146main ()
2147{
2148static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2149test_array [0] = 0;
2150return test_array [0];
bec39cab 2151
81ecdfbb
RW
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_compile "$LINENO"; then :
2157 ac_lo=$ac_mid; break
2158else
2159 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2160 if test $ac_mid -le $ac_hi; then
2161 ac_lo= ac_hi=
2162 break
2163 fi
2164 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167 done
2168else
2169 ac_lo= ac_hi=
2170fi
2171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2172fi
2173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2174# Binary search between lo and hi bounds.
2175while test "x$ac_lo" != "x$ac_hi"; do
2176 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179$4
2180int
2181main ()
2182{
2183static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2184test_array [0] = 0;
2185return test_array [0];
bec39cab 2186
81ecdfbb
RW
2187 ;
2188 return 0;
2189}
2190_ACEOF
2191if ac_fn_c_try_compile "$LINENO"; then :
2192 ac_hi=$ac_mid
2193else
2194 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2195fi
2196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197done
2198case $ac_lo in #((
2199?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2200'') ac_retval=1 ;;
2201esac
2202 else
2203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204/* end confdefs.h. */
2205$4
2206static long int longval () { return $2; }
2207static unsigned long int ulongval () { return $2; }
2208#include <stdio.h>
2209#include <stdlib.h>
2210int
2211main ()
2212{
bec39cab 2213
81ecdfbb
RW
2214 FILE *f = fopen ("conftest.val", "w");
2215 if (! f)
2216 return 1;
2217 if (($2) < 0)
2218 {
2219 long int i = longval ();
2220 if (i != ($2))
2221 return 1;
2222 fprintf (f, "%ld", i);
2223 }
2224 else
2225 {
2226 unsigned long int i = ulongval ();
2227 if (i != ($2))
2228 return 1;
2229 fprintf (f, "%lu", i);
2230 }
2231 /* Do not output a trailing newline, as this causes \r\n confusion
2232 on some platforms. */
2233 return ferror (f) || fclose (f) != 0;
bec39cab 2234
81ecdfbb
RW
2235 ;
2236 return 0;
2237}
2238_ACEOF
2239if ac_fn_c_try_run "$LINENO"; then :
2240 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2241else
2242 ac_retval=1
2243fi
2244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2245 conftest.$ac_objext conftest.beam conftest.$ac_ext
2246rm -f conftest.val
bec39cab 2247
81ecdfbb 2248 fi
d0ac1c44
SM
2249 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2250 as_fn_set_status $ac_retval
bec39cab 2251
81ecdfbb 2252} # ac_fn_c_compute_int
bec39cab 2253
55a8c076
YQ
2254# ac_fn_c_check_func LINENO FUNC VAR
2255# ----------------------------------
2256# Tests whether FUNC exists, setting the cache variable VAR accordingly
2257ac_fn_c_check_func ()
81ecdfbb
RW
2258{
2259 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2261$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2262if eval \${$3+:} false; then :
81ecdfbb
RW
2263 $as_echo_n "(cached) " >&6
2264else
81ecdfbb
RW
2265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266/* end confdefs.h. */
55a8c076
YQ
2267/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2268 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2269#define $2 innocuous_$2
2270
2271/* System header to define __stub macros and hopefully few prototypes,
2272 which can conflict with char $2 (); below.
2273 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2274 <limits.h> exists even on freestanding compilers. */
2275
2276#ifdef __STDC__
2277# include <limits.h>
2278#else
2279# include <assert.h>
2280#endif
2281
2282#undef $2
2283
2284/* Override any GCC internal prototype to avoid an error.
2285 Use char because int might match the return type of a GCC
2286 builtin and then its argument prototype would still apply. */
2287#ifdef __cplusplus
2288extern "C"
2289#endif
2290char $2 ();
2291/* The GNU C library defines this for functions which it implements
2292 to always fail with ENOSYS. Some functions are actually named
2293 something starting with __ and the normal name is an alias. */
2294#if defined __stub_$2 || defined __stub___$2
2295choke me
2296#endif
2297
2298int
2299main ()
2300{
2301return $2 ();
2302 ;
2303 return 0;
2304}
2305_ACEOF
2306if ac_fn_c_try_link "$LINENO"; then :
2307 eval "$3=yes"
2308else
2309 eval "$3=no"
2310fi
2311rm -f core conftest.err conftest.$ac_objext \
2312 conftest$ac_exeext conftest.$ac_ext
2313fi
2314eval ac_res=\$$3
2315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2316$as_echo "$ac_res" >&6; }
d0ac1c44 2317 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2318
2319} # ac_fn_c_check_func
2320
c56ccc05
MM
2321# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2322# ----------------------------------------------------
2323# Tries to find if the field MEMBER exists in type AGGR, after including
2324# INCLUDES, setting cache variable VAR accordingly.
2325ac_fn_c_check_member ()
2326{
2327 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2329$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2330if eval \${$4+:} false; then :
c56ccc05
MM
2331 $as_echo_n "(cached) " >&6
2332else
2333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2334/* end confdefs.h. */
2335$5
2336int
2337main ()
2338{
2339static $2 ac_aggr;
2340if (ac_aggr.$3)
2341return 0;
2342 ;
2343 return 0;
2344}
2345_ACEOF
2346if ac_fn_c_try_compile "$LINENO"; then :
2347 eval "$4=yes"
2348else
2349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2350/* end confdefs.h. */
2351$5
2352int
2353main ()
2354{
2355static $2 ac_aggr;
2356if (sizeof ac_aggr.$3)
2357return 0;
2358 ;
2359 return 0;
2360}
2361_ACEOF
2362if ac_fn_c_try_compile "$LINENO"; then :
2363 eval "$4=yes"
2364else
2365 eval "$4=no"
2366fi
2367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2368fi
2369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2370fi
2371eval ac_res=\$$4
2372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2373$as_echo "$ac_res" >&6; }
d0ac1c44 2374 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2375
2376} # ac_fn_c_check_member
2377
07697489
PA
2378# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2379# -------------------------------------------
2380# Tests whether TYPE exists after having included INCLUDES, setting cache
2381# variable VAR accordingly.
2382ac_fn_c_check_type ()
2383{
2384 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2386$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2387if eval \${$3+:} false; then :
07697489
PA
2388 $as_echo_n "(cached) " >&6
2389else
2390 eval "$3=no"
2391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392/* end confdefs.h. */
2393$4
2394int
2395main ()
2396{
2397if (sizeof ($2))
2398 return 0;
2399 ;
2400 return 0;
2401}
2402_ACEOF
2403if ac_fn_c_try_compile "$LINENO"; then :
2404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2405/* end confdefs.h. */
2406$4
2407int
2408main ()
2409{
2410if (sizeof (($2)))
2411 return 0;
2412 ;
2413 return 0;
2414}
2415_ACEOF
2416if ac_fn_c_try_compile "$LINENO"; then :
2417
2418else
2419 eval "$3=yes"
2420fi
2421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2422fi
2423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2424fi
2425eval ac_res=\$$3
2426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2427$as_echo "$ac_res" >&6; }
d0ac1c44 2428 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2429
2430} # ac_fn_c_check_type
2431
d0ac1c44
SM
2432# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2433# ---------------------------------------------
2434# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2435# accordingly.
770d76d7
PA
2436ac_fn_c_check_decl ()
2437{
2438 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2439 as_decl_name=`echo $2|sed 's/ *(.*//'`
2440 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2442$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2443if eval \${$3+:} false; then :
770d76d7
PA
2444 $as_echo_n "(cached) " >&6
2445else
2446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2447/* end confdefs.h. */
2448$4
2449int
2450main ()
2451{
2452#ifndef $as_decl_name
2453#ifdef __cplusplus
2454 (void) $as_decl_use;
2455#else
2456 (void) $as_decl_name;
2457#endif
2458#endif
2459
2460 ;
2461 return 0;
2462}
2463_ACEOF
2464if ac_fn_c_try_compile "$LINENO"; then :
2465 eval "$3=yes"
2466else
2467 eval "$3=no"
2468fi
2469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2470fi
2471eval ac_res=\$$3
2472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2473$as_echo "$ac_res" >&6; }
d0ac1c44 2474 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2475
2476} # ac_fn_c_check_decl
f35d5ade
TT
2477
2478# ac_fn_cxx_try_link LINENO
2479# -------------------------
2480# Try to link conftest.$ac_ext, and return whether this succeeded.
2481ac_fn_cxx_try_link ()
2482{
2483 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2484 rm -f conftest.$ac_objext conftest$ac_exeext
2485 if { { ac_try="$ac_link"
2486case "(($ac_try" in
2487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2488 *) ac_try_echo=$ac_try;;
2489esac
2490eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2491$as_echo "$ac_try_echo"; } >&5
2492 (eval "$ac_link") 2>conftest.err
2493 ac_status=$?
2494 if test -s conftest.err; then
2495 grep -v '^ *+' conftest.err >conftest.er1
2496 cat conftest.er1 >&5
2497 mv -f conftest.er1 conftest.err
2498 fi
2499 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2500 test $ac_status = 0; } && {
2501 test -z "$ac_cxx_werror_flag" ||
2502 test ! -s conftest.err
2503 } && test -s conftest$ac_exeext && {
2504 test "$cross_compiling" = yes ||
2505 test -x conftest$ac_exeext
2506 }; then :
2507 ac_retval=0
2508else
2509 $as_echo "$as_me: failed program was:" >&5
2510sed 's/^/| /' conftest.$ac_ext >&5
2511
2512 ac_retval=1
2513fi
2514 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2515 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2516 # interfere with the next link command; also delete a directory that is
2517 # left behind by Apple's compiler. We do this before executing the actions.
2518 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2519 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2520 as_fn_set_status $ac_retval
2521
2522} # ac_fn_cxx_try_link
21987b9c
TT
2523
2524# ac_fn_cxx_check_func LINENO FUNC VAR
2525# ------------------------------------
2526# Tests whether FUNC exists, setting the cache variable VAR accordingly
2527ac_fn_cxx_check_func ()
2528{
2529 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2531$as_echo_n "checking for $2... " >&6; }
2532if eval \${$3+:} false; then :
2533 $as_echo_n "(cached) " >&6
2534else
2535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2536/* end confdefs.h. */
2537/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2538 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2539#define $2 innocuous_$2
2540
2541/* System header to define __stub macros and hopefully few prototypes,
2542 which can conflict with char $2 (); below.
2543 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2544 <limits.h> exists even on freestanding compilers. */
2545
2546#ifdef __STDC__
2547# include <limits.h>
2548#else
2549# include <assert.h>
2550#endif
2551
2552#undef $2
2553
2554/* Override any GCC internal prototype to avoid an error.
2555 Use char because int might match the return type of a GCC
2556 builtin and then its argument prototype would still apply. */
2557#ifdef __cplusplus
2558extern "C"
2559#endif
2560char $2 ();
2561/* The GNU C library defines this for functions which it implements
2562 to always fail with ENOSYS. Some functions are actually named
2563 something starting with __ and the normal name is an alias. */
2564#if defined __stub_$2 || defined __stub___$2
2565choke me
2566#endif
2567
2568int
2569main ()
2570{
2571return $2 ();
2572 ;
2573 return 0;
2574}
2575_ACEOF
2576if ac_fn_cxx_try_link "$LINENO"; then :
2577 eval "$3=yes"
2578else
2579 eval "$3=no"
2580fi
2581rm -f core conftest.err conftest.$ac_objext \
2582 conftest$ac_exeext conftest.$ac_ext
2583fi
2584eval ac_res=\$$3
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2586$as_echo "$ac_res" >&6; }
2587 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2588
2589} # ac_fn_cxx_check_func
81ecdfbb
RW
2590cat >config.log <<_ACEOF
2591This file contains any messages produced by compilers while
2592running configure, to aid debugging if configure makes a mistake.
d5af19ba 2593
81ecdfbb 2594It was created by $as_me, which was
d0ac1c44 2595generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2596
81ecdfbb 2597 $ $0 $@
413ccac7 2598
81ecdfbb
RW
2599_ACEOF
2600exec 5>>config.log
2601{
2602cat <<_ASUNAME
2603## --------- ##
2604## Platform. ##
2605## --------- ##
413ccac7 2606
81ecdfbb
RW
2607hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2608uname -m = `(uname -m) 2>/dev/null || echo unknown`
2609uname -r = `(uname -r) 2>/dev/null || echo unknown`
2610uname -s = `(uname -s) 2>/dev/null || echo unknown`
2611uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2612
81ecdfbb
RW
2613/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2614/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2615
81ecdfbb
RW
2616/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2617/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2618/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2619/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2620/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2621/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2622/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2623
81ecdfbb 2624_ASUNAME
bec39cab 2625
bec39cab
AC
2626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2627for as_dir in $PATH
2628do
2629 IFS=$as_save_IFS
2630 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2631 $as_echo "PATH: $as_dir"
2632 done
2633IFS=$as_save_IFS
bec39cab 2634
81ecdfbb 2635} >&5
bec39cab 2636
81ecdfbb 2637cat >&5 <<_ACEOF
bec39cab 2638
bec39cab 2639
81ecdfbb
RW
2640## ----------- ##
2641## Core tests. ##
2642## ----------- ##
2643
2644_ACEOF
2645
2646
2647# Keep a trace of the command line.
2648# Strip out --no-create and --no-recursion so they do not pile up.
2649# Strip out --silent because we don't want to record it for future runs.
2650# Also quote any args containing shell meta-characters.
2651# Make two passes to allow for proper duplicate-argument suppression.
2652ac_configure_args=
2653ac_configure_args0=
2654ac_configure_args1=
2655ac_must_keep_next=false
2656for ac_pass in 1 2
2657do
2658 for ac_arg
2659 do
2660 case $ac_arg in
2661 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2662 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2663 | -silent | --silent | --silen | --sile | --sil)
2664 continue ;;
2665 *\'*)
2666 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2667 esac
2668 case $ac_pass in
2669 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2670 2)
2671 as_fn_append ac_configure_args1 " '$ac_arg'"
2672 if test $ac_must_keep_next = true; then
2673 ac_must_keep_next=false # Got value, back to normal.
2674 else
2675 case $ac_arg in
2676 *=* | --config-cache | -C | -disable-* | --disable-* \
2677 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2678 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2679 | -with-* | --with-* | -without-* | --without-* | --x)
2680 case "$ac_configure_args0 " in
2681 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2682 esac
2683 ;;
2684 -* ) ac_must_keep_next=true ;;
2685 esac
2686 fi
2687 as_fn_append ac_configure_args " '$ac_arg'"
2688 ;;
2689 esac
2690 done
2691done
2692{ ac_configure_args0=; unset ac_configure_args0;}
2693{ ac_configure_args1=; unset ac_configure_args1;}
2694
2695# When interrupted or exit'd, cleanup temporary files, and complete
2696# config.log. We remove comments because anyway the quotes in there
2697# would cause problems or look ugly.
2698# WARNING: Use '\'' to represent an apostrophe within the trap.
2699# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2700trap 'exit_status=$?
2701 # Save into config.log some information that might help in debugging.
2702 {
2703 echo
2704
d0ac1c44 2705 $as_echo "## ---------------- ##
81ecdfbb 2706## Cache variables. ##
d0ac1c44 2707## ---------------- ##"
81ecdfbb
RW
2708 echo
2709 # The following way of writing the cache mishandles newlines in values,
2710(
2711 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2712 eval ac_val=\$$ac_var
2713 case $ac_val in #(
2714 *${as_nl}*)
2715 case $ac_var in #(
2716 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2717$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2718 esac
2719 case $ac_var in #(
2720 _ | IFS | as_nl) ;; #(
2721 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2722 *) { eval $ac_var=; unset $ac_var;} ;;
2723 esac ;;
2724 esac
2725 done
2726 (set) 2>&1 |
2727 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2728 *${as_nl}ac_space=\ *)
2729 sed -n \
2730 "s/'\''/'\''\\\\'\'''\''/g;
2731 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2732 ;; #(
2733 *)
2734 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2735 ;;
2736 esac |
2737 sort
2738)
2739 echo
2740
d0ac1c44 2741 $as_echo "## ----------------- ##
81ecdfbb 2742## Output variables. ##
d0ac1c44 2743## ----------------- ##"
81ecdfbb
RW
2744 echo
2745 for ac_var in $ac_subst_vars
2746 do
2747 eval ac_val=\$$ac_var
2748 case $ac_val in
2749 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2750 esac
2751 $as_echo "$ac_var='\''$ac_val'\''"
2752 done | sort
2753 echo
2754
2755 if test -n "$ac_subst_files"; then
d0ac1c44 2756 $as_echo "## ------------------- ##
81ecdfbb 2757## File substitutions. ##
d0ac1c44 2758## ------------------- ##"
81ecdfbb
RW
2759 echo
2760 for ac_var in $ac_subst_files
2761 do
2762 eval ac_val=\$$ac_var
2763 case $ac_val in
2764 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2765 esac
2766 $as_echo "$ac_var='\''$ac_val'\''"
2767 done | sort
2768 echo
2769 fi
2770
2771 if test -s confdefs.h; then
d0ac1c44 2772 $as_echo "## ----------- ##
81ecdfbb 2773## confdefs.h. ##
d0ac1c44 2774## ----------- ##"
81ecdfbb
RW
2775 echo
2776 cat confdefs.h
2777 echo
2778 fi
2779 test "$ac_signal" != 0 &&
2780 $as_echo "$as_me: caught signal $ac_signal"
2781 $as_echo "$as_me: exit $exit_status"
2782 } >&5
2783 rm -f core *.core core.conftest.* &&
2784 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2785 exit $exit_status
2786' 0
2787for ac_signal in 1 2 13 15; do
2788 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2789done
2790ac_signal=0
2791
2792# confdefs.h avoids OS command line length limits that DEFS can exceed.
2793rm -f -r conftest* confdefs.h
2794
2795$as_echo "/* confdefs.h */" > confdefs.h
2796
2797# Predefined preprocessor variables.
2798
2799cat >>confdefs.h <<_ACEOF
2800#define PACKAGE_NAME "$PACKAGE_NAME"
2801_ACEOF
2802
2803cat >>confdefs.h <<_ACEOF
2804#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2805_ACEOF
2806
2807cat >>confdefs.h <<_ACEOF
2808#define PACKAGE_VERSION "$PACKAGE_VERSION"
2809_ACEOF
2810
2811cat >>confdefs.h <<_ACEOF
2812#define PACKAGE_STRING "$PACKAGE_STRING"
2813_ACEOF
2814
2815cat >>confdefs.h <<_ACEOF
2816#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2817_ACEOF
2818
2819cat >>confdefs.h <<_ACEOF
2820#define PACKAGE_URL "$PACKAGE_URL"
2821_ACEOF
2822
2823
2824# Let the site file select an alternate cache file if it wants to.
2825# Prefer an explicitly selected file to automatically selected ones.
2826ac_site_file1=NONE
2827ac_site_file2=NONE
2828if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2829 # We do not want a PATH search for config.site.
2830 case $CONFIG_SITE in #((
2831 -*) ac_site_file1=./$CONFIG_SITE;;
2832 */*) ac_site_file1=$CONFIG_SITE;;
2833 *) ac_site_file1=./$CONFIG_SITE;;
2834 esac
81ecdfbb
RW
2835elif test "x$prefix" != xNONE; then
2836 ac_site_file1=$prefix/share/config.site
2837 ac_site_file2=$prefix/etc/config.site
2838else
2839 ac_site_file1=$ac_default_prefix/share/config.site
2840 ac_site_file2=$ac_default_prefix/etc/config.site
2841fi
2842for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2843do
2844 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2845 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2846 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2847$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2848 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2849 . "$ac_site_file" \
2850 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2851$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2852as_fn_error $? "failed to load site script $ac_site_file
2853See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2854 fi
2855done
2856
2857if test -r "$cache_file"; then
d0ac1c44
SM
2858 # Some versions of bash will fail to source /dev/null (special files
2859 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2860 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2862$as_echo "$as_me: loading cache $cache_file" >&6;}
2863 case $cache_file in
2864 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2865 *) . "./$cache_file";;
2866 esac
2867 fi
2868else
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2870$as_echo "$as_me: creating cache $cache_file" >&6;}
2871 >$cache_file
bec39cab
AC
2872fi
2873
d0ac1c44
SM
2874as_fn_append ac_header_list " stdlib.h"
2875as_fn_append ac_header_list " unistd.h"
2876as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2877# Check that the precious variables saved in the cache have kept the same
2878# value.
2879ac_cache_corrupted=false
2880for ac_var in $ac_precious_vars; do
2881 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2882 eval ac_new_set=\$ac_env_${ac_var}_set
2883 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2884 eval ac_new_val=\$ac_env_${ac_var}_value
2885 case $ac_old_set,$ac_new_set in
2886 set,)
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2888$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2889 ac_cache_corrupted=: ;;
2890 ,set)
2891 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2892$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2893 ac_cache_corrupted=: ;;
2894 ,);;
2895 *)
2896 if test "x$ac_old_val" != "x$ac_new_val"; then
2897 # differences in whitespace do not lead to failure.
2898 ac_old_val_w=`echo x $ac_old_val`
2899 ac_new_val_w=`echo x $ac_new_val`
2900 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2902$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2903 ac_cache_corrupted=:
2904 else
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2906$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2907 eval $ac_var=\$ac_old_val
2908 fi
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2910$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2912$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2913 fi;;
2914 esac
2915 # Pass precious variables to config.status.
2916 if test "$ac_new_set" = set; then
2917 case $ac_new_val in
2918 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2919 *) ac_arg=$ac_var=$ac_new_val ;;
2920 esac
2921 case " $ac_configure_args " in
2922 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2923 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2924 esac
2925 fi
2926done
2927if $ac_cache_corrupted; then
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2931$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2932 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2933fi
2934## -------------------- ##
2935## Main body of script. ##
2936## -------------------- ##
2937
2938ac_ext=c
2939ac_cpp='$CPP $CPPFLAGS'
2940ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2941ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2942ac_compiler_gnu=$ac_cv_c_compiler_gnu
2943
2944
2945
2946
2947
2948ac_config_headers="$ac_config_headers config.h:config.in"
2949
2950
2951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2952$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2953 # Check whether --enable-maintainer-mode was given.
2954if test "${enable_maintainer_mode+set}" = set; then :
2955 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2956else
2957 USE_MAINTAINER_MODE=no
2958fi
2959
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2961$as_echo "$USE_MAINTAINER_MODE" >&6; }
2962 if test $USE_MAINTAINER_MODE = yes; then
2963 MAINTAINER_MODE_TRUE=
2964 MAINTAINER_MODE_FALSE='#'
2965else
2966 MAINTAINER_MODE_TRUE='#'
2967 MAINTAINER_MODE_FALSE=
2968fi
2969
2970 MAINT=$MAINTAINER_MODE_TRUE
2971
2972
2973
17ef446e 2974# Set the 'development' global.
270c9937 2975. $srcdir/../bfd/development.sh
f5f1cdb6 2976
81ecdfbb
RW
2977ac_ext=c
2978ac_cpp='$CPP $CPPFLAGS'
2979ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2980ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2981ac_compiler_gnu=$ac_cv_c_compiler_gnu
2982if test -n "$ac_tool_prefix"; then
2983 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2984set dummy ${ac_tool_prefix}gcc; ac_word=$2
2985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2986$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2987if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2988 $as_echo_n "(cached) " >&6
c906108c
SS
2989else
2990 if test -n "$CC"; then
2991 ac_cv_prog_CC="$CC" # Let the user override the test.
2992else
bec39cab
AC
2993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2994for as_dir in $PATH
2995do
2996 IFS=$as_save_IFS
2997 test -z "$as_dir" && as_dir=.
81ecdfbb 2998 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3000 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3002 break 2
3003 fi
3004done
81ecdfbb
RW
3005 done
3006IFS=$as_save_IFS
bec39cab 3007
c906108c
SS
3008fi
3009fi
bec39cab 3010CC=$ac_cv_prog_CC
c906108c 3011if test -n "$CC"; then
81ecdfbb
RW
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3013$as_echo "$CC" >&6; }
c906108c 3014else
81ecdfbb
RW
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3016$as_echo "no" >&6; }
c906108c
SS
3017fi
3018
81ecdfbb 3019
b4e70030
JB
3020fi
3021if test -z "$ac_cv_prog_CC"; then
3022 ac_ct_CC=$CC
81ecdfbb
RW
3023 # Extract the first word of "gcc", so it can be a program name with args.
3024set dummy gcc; ac_word=$2
3025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3026$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3027if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3028 $as_echo_n "(cached) " >&6
b4e70030
JB
3029else
3030 if test -n "$ac_ct_CC"; then
3031 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3032else
3033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3034for as_dir in $PATH
3035do
3036 IFS=$as_save_IFS
3037 test -z "$as_dir" && as_dir=.
81ecdfbb 3038 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3040 ac_cv_prog_ac_ct_CC="gcc"
3041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 3042 break 2
4e8d927d 3043 fi
b4e70030 3044done
81ecdfbb
RW
3045 done
3046IFS=$as_save_IFS
b4e70030
JB
3047
3048fi
3049fi
3050ac_ct_CC=$ac_cv_prog_ac_ct_CC
3051if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3053$as_echo "$ac_ct_CC" >&6; }
b4e70030 3054else
81ecdfbb
RW
3055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3056$as_echo "no" >&6; }
b4e70030
JB
3057fi
3058
81ecdfbb
RW
3059 if test "x$ac_ct_CC" = x; then
3060 CC=""
3061 else
3062 case $cross_compiling:$ac_tool_warned in
3063yes:)
3064{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3065$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3066ac_tool_warned=yes ;;
3067esac
3068 CC=$ac_ct_CC
3069 fi
b4e70030
JB
3070else
3071 CC="$ac_cv_prog_CC"
3072fi
3073
c906108c 3074if test -z "$CC"; then
81ecdfbb
RW
3075 if test -n "$ac_tool_prefix"; then
3076 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3077set dummy ${ac_tool_prefix}cc; ac_word=$2
3078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3079$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3080if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3081 $as_echo_n "(cached) " >&6
c906108c
SS
3082else
3083 if test -n "$CC"; then
3084 ac_cv_prog_CC="$CC" # Let the user override the test.
3085else
bec39cab
AC
3086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3087for as_dir in $PATH
3088do
3089 IFS=$as_save_IFS
3090 test -z "$as_dir" && as_dir=.
81ecdfbb 3091 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3092 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3093 ac_cv_prog_CC="${ac_tool_prefix}cc"
3094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3095 break 2
3096 fi
3097done
81ecdfbb
RW
3098 done
3099IFS=$as_save_IFS
3100
3101fi
3102fi
3103CC=$ac_cv_prog_CC
3104if test -n "$CC"; then
3105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3106$as_echo "$CC" >&6; }
3107else
3108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3109$as_echo "no" >&6; }
3110fi
3111
3112
3113 fi
3114fi
3115if test -z "$CC"; then
3116 # Extract the first word of "cc", so it can be a program name with args.
3117set dummy cc; ac_word=$2
3118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3119$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3120if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3121 $as_echo_n "(cached) " >&6
3122else
3123 if test -n "$CC"; then
3124 ac_cv_prog_CC="$CC" # Let the user override the test.
3125else
3126 ac_prog_rejected=no
3127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3128for as_dir in $PATH
3129do
3130 IFS=$as_save_IFS
3131 test -z "$as_dir" && as_dir=.
3132 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3133 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3134 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3135 ac_prog_rejected=yes
3136 continue
3137 fi
3138 ac_cv_prog_CC="cc"
3139 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3140 break 2
3141 fi
3142done
3143 done
3144IFS=$as_save_IFS
bec39cab 3145
c906108c
SS
3146if test $ac_prog_rejected = yes; then
3147 # We found a bogon in the path, so make sure we never use it.
3148 set dummy $ac_cv_prog_CC
3149 shift
bec39cab 3150 if test $# != 0; then
c906108c
SS
3151 # We chose a different compiler from the bogus one.
3152 # However, it has the same basename, so the bogon will be chosen
3153 # first if we set CC to just the basename; use the full file name.
3154 shift
bec39cab 3155 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3156 fi
3157fi
3158fi
3159fi
bec39cab 3160CC=$ac_cv_prog_CC
c906108c 3161if test -n "$CC"; then
81ecdfbb
RW
3162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3163$as_echo "$CC" >&6; }
c906108c 3164else
81ecdfbb
RW
3165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3166$as_echo "no" >&6; }
c906108c
SS
3167fi
3168
81ecdfbb 3169
bec39cab
AC
3170fi
3171if test -z "$CC"; then
3172 if test -n "$ac_tool_prefix"; then
81ecdfbb 3173 for ac_prog in cl.exe
bec39cab
AC
3174 do
3175 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3176set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3178$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3179if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3180 $as_echo_n "(cached) " >&6
c906108c
SS
3181else
3182 if test -n "$CC"; then
3183 ac_cv_prog_CC="$CC" # Let the user override the test.
3184else
bec39cab
AC
3185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3186for as_dir in $PATH
3187do
3188 IFS=$as_save_IFS
3189 test -z "$as_dir" && as_dir=.
81ecdfbb 3190 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3191 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3192 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3193 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3194 break 2
3195 fi
3196done
81ecdfbb
RW
3197 done
3198IFS=$as_save_IFS
bec39cab 3199
c906108c
SS
3200fi
3201fi
bec39cab 3202CC=$ac_cv_prog_CC
c906108c 3203if test -n "$CC"; then
81ecdfbb
RW
3204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3205$as_echo "$CC" >&6; }
c906108c 3206else
81ecdfbb
RW
3207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3208$as_echo "no" >&6; }
c906108c 3209fi
bec39cab 3210
81ecdfbb 3211
bec39cab
AC
3212 test -n "$CC" && break
3213 done
3214fi
3215if test -z "$CC"; then
3216 ac_ct_CC=$CC
81ecdfbb 3217 for ac_prog in cl.exe
bec39cab
AC
3218do
3219 # Extract the first word of "$ac_prog", so it can be a program name with args.
3220set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3222$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3223if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3224 $as_echo_n "(cached) " >&6
bec39cab
AC
3225else
3226 if test -n "$ac_ct_CC"; then
3227 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3228else
3229as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3230for as_dir in $PATH
3231do
3232 IFS=$as_save_IFS
3233 test -z "$as_dir" && as_dir=.
81ecdfbb 3234 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3235 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3236 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3237 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3238 break 2
c906108c 3239 fi
bec39cab 3240done
81ecdfbb
RW
3241 done
3242IFS=$as_save_IFS
bec39cab
AC
3243
3244fi
3245fi
3246ac_ct_CC=$ac_cv_prog_ac_ct_CC
3247if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3249$as_echo "$ac_ct_CC" >&6; }
bec39cab 3250else
81ecdfbb
RW
3251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3252$as_echo "no" >&6; }
c906108c
SS
3253fi
3254
81ecdfbb 3255
bec39cab
AC
3256 test -n "$ac_ct_CC" && break
3257done
c906108c 3258
81ecdfbb
RW
3259 if test "x$ac_ct_CC" = x; then
3260 CC=""
3261 else
3262 case $cross_compiling:$ac_tool_warned in
3263yes:)
3264{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3265$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3266ac_tool_warned=yes ;;
3267esac
3268 CC=$ac_ct_CC
3269 fi
bec39cab
AC
3270fi
3271
3272fi
3273
3274
81ecdfbb
RW
3275test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3277as_fn_error $? "no acceptable C compiler found in \$PATH
3278See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3279
3280# Provide some information about the compiler.
81ecdfbb
RW
3281$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3282set X $ac_compile
3283ac_compiler=$2
3284for ac_option in --version -v -V -qversion; do
3285 { { ac_try="$ac_compiler $ac_option >&5"
3286case "(($ac_try" in
3287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3288 *) ac_try_echo=$ac_try;;
3289esac
3290eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3291$as_echo "$ac_try_echo"; } >&5
3292 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3293 ac_status=$?
81ecdfbb
RW
3294 if test -s conftest.err; then
3295 sed '10a\
3296... rest of stderr output deleted ...
3297 10q' conftest.err >conftest.er1
3298 cat conftest.er1 >&5
81ecdfbb 3299 fi
d0ac1c44 3300 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3301 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3302 test $ac_status = 0; }
3303done
bec39cab 3304
81ecdfbb 3305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3306/* end confdefs.h. */
3307
3308int
3309main ()
3310{
3311
3312 ;
3313 return 0;
3314}
3315_ACEOF
3316ac_clean_files_save=$ac_clean_files
d0ac1c44 3317ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3318# Try to create an executable without -o first, disregard a.out.
3319# It will help us diagnose broken compilers, and finding out an intuition
3320# of exeext.
d0ac1c44
SM
3321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3322$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3323ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3324
3325# The possible output files:
3326ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3327
3328ac_rmfiles=
3329for ac_file in $ac_files
3330do
3331 case $ac_file in
3332 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3333 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3334 esac
3335done
3336rm -f $ac_rmfiles
3337
3338if { { ac_try="$ac_link_default"
3339case "(($ac_try" in
3340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3341 *) ac_try_echo=$ac_try;;
3342esac
3343eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3344$as_echo "$ac_try_echo"; } >&5
3345 (eval "$ac_link_default") 2>&5
3346 ac_status=$?
3347 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3348 test $ac_status = 0; }; then :
3349 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3350# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3351# in a Makefile. We should not override ac_cv_exeext if it was cached,
3352# so that the user can short-circuit this test for compilers unknown to
3353# Autoconf.
3354for ac_file in $ac_files ''
bec39cab
AC
3355do
3356 test -f "$ac_file" || continue
3357 case $ac_file in
81ecdfbb 3358 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3359 ;;
3360 [ab].out )
3361 # We found the default executable, but exeext='' is most
3362 # certainly right.
3363 break;;
3364 *.* )
81ecdfbb
RW
3365 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3366 then :; else
3367 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3368 fi
3369 # We set ac_cv_exeext here because the later test for it is not
3370 # safe: cross compilers may not add the suffix if given an `-o'
3371 # argument, so we may need to know it at that point already.
3372 # Even if this section looks crufty: it has the advantage of
3373 # actually working.
b4e70030
JB
3374 break;;
3375 * )
3376 break;;
bec39cab
AC
3377 esac
3378done
81ecdfbb
RW
3379test "$ac_cv_exeext" = no && ac_cv_exeext=
3380
bec39cab 3381else
81ecdfbb
RW
3382 ac_file=''
3383fi
81ecdfbb 3384if test -z "$ac_file"; then :
d0ac1c44
SM
3385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3386$as_echo "no" >&6; }
3387$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3388sed 's/^/| /' conftest.$ac_ext >&5
3389
81ecdfbb
RW
3390{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3391$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3392as_fn_error 77 "C compiler cannot create executables
3393See \`config.log' for more details" "$LINENO" 5; }
3394else
3395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3396$as_echo "yes" >&6; }
bec39cab 3397fi
d0ac1c44
SM
3398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3399$as_echo_n "checking for C compiler default output file name... " >&6; }
3400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3401$as_echo "$ac_file" >&6; }
b4e70030 3402ac_exeext=$ac_cv_exeext
b4e70030 3403
d0ac1c44 3404rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3405ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3407$as_echo_n "checking for suffix of executables... " >&6; }
3408if { { ac_try="$ac_link"
3409case "(($ac_try" in
3410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3411 *) ac_try_echo=$ac_try;;
3412esac
3413eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3414$as_echo "$ac_try_echo"; } >&5
3415 (eval "$ac_link") 2>&5
bec39cab 3416 ac_status=$?
81ecdfbb
RW
3417 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3418 test $ac_status = 0; }; then :
b4e70030
JB
3419 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3420# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3421# work properly (i.e., refer to `conftest.exe'), while it won't with
3422# `rm'.
3423for ac_file in conftest.exe conftest conftest.*; do
3424 test -f "$ac_file" || continue
3425 case $ac_file in
81ecdfbb 3426 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3427 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3428 break;;
3429 * ) break;;
3430 esac
3431done
c906108c 3432else
81ecdfbb
RW
3433 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3434$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3435as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3436See \`config.log' for more details" "$LINENO" 5; }
c906108c 3437fi
d0ac1c44 3438rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3440$as_echo "$ac_cv_exeext" >&6; }
c906108c 3441
b4e70030 3442rm -f conftest.$ac_ext
bec39cab
AC
3443EXEEXT=$ac_cv_exeext
3444ac_exeext=$EXEEXT
d0ac1c44
SM
3445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3446/* end confdefs.h. */
3447#include <stdio.h>
3448int
3449main ()
3450{
3451FILE *f = fopen ("conftest.out", "w");
3452 return ferror (f) || fclose (f) != 0;
3453
3454 ;
3455 return 0;
3456}
3457_ACEOF
3458ac_clean_files="$ac_clean_files conftest.out"
3459# Check that the compiler produces executables we can run. If not, either
3460# the compiler is broken, or we cross compile.
3461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3462$as_echo_n "checking whether we are cross compiling... " >&6; }
3463if test "$cross_compiling" != yes; then
3464 { { ac_try="$ac_link"
3465case "(($ac_try" in
3466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3467 *) ac_try_echo=$ac_try;;
3468esac
3469eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3470$as_echo "$ac_try_echo"; } >&5
3471 (eval "$ac_link") 2>&5
3472 ac_status=$?
3473 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3474 test $ac_status = 0; }
3475 if { ac_try='./conftest$ac_cv_exeext'
3476 { { case "(($ac_try" in
3477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3478 *) ac_try_echo=$ac_try;;
3479esac
3480eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3481$as_echo "$ac_try_echo"; } >&5
3482 (eval "$ac_try") 2>&5
3483 ac_status=$?
3484 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3485 test $ac_status = 0; }; }; then
3486 cross_compiling=no
3487 else
3488 if test "$cross_compiling" = maybe; then
3489 cross_compiling=yes
3490 else
3491 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3493as_fn_error $? "cannot run C compiled programs.
3494If you meant to cross compile, use \`--host'.
3495See \`config.log' for more details" "$LINENO" 5; }
3496 fi
3497 fi
3498fi
3499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3500$as_echo "$cross_compiling" >&6; }
3501
3502rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3503ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3505$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3506if ${ac_cv_objext+:} false; then :
81ecdfbb 3507 $as_echo_n "(cached) " >&6
bec39cab 3508else
81ecdfbb 3509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3510/* end confdefs.h. */
3511
3512int
3513main ()
3514{
3515
3516 ;
3517 return 0;
3518}
3519_ACEOF
3520rm -f conftest.o conftest.obj
81ecdfbb
RW
3521if { { ac_try="$ac_compile"
3522case "(($ac_try" in
3523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3524 *) ac_try_echo=$ac_try;;
3525esac
3526eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3527$as_echo "$ac_try_echo"; } >&5
3528 (eval "$ac_compile") 2>&5
3529 ac_status=$?
3530 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3531 test $ac_status = 0; }; then :
3532 for ac_file in conftest.o conftest.obj conftest.*; do
3533 test -f "$ac_file" || continue;
bec39cab 3534 case $ac_file in
81ecdfbb 3535 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3536 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3537 break;;
3538 esac
3539done
c906108c 3540else
81ecdfbb 3541 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3542sed 's/^/| /' conftest.$ac_ext >&5
3543
81ecdfbb
RW
3544{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3545$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3546as_fn_error $? "cannot compute suffix of object files: cannot compile
3547See \`config.log' for more details" "$LINENO" 5; }
c906108c 3548fi
b4e70030 3549rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3550fi
81ecdfbb
RW
3551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3552$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3553OBJEXT=$ac_cv_objext
3554ac_objext=$OBJEXT
81ecdfbb
RW
3555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3556$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3557if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3558 $as_echo_n "(cached) " >&6
c906108c 3559else
81ecdfbb 3560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3561/* end confdefs.h. */
3562
3563int
3564main ()
3565{
3566#ifndef __GNUC__
3567 choke me
3568#endif
3569
3570 ;
3571 return 0;
3572}
3573_ACEOF
81ecdfbb 3574if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3575 ac_compiler_gnu=yes
3576else
81ecdfbb 3577 ac_compiler_gnu=no
bec39cab 3578fi
81ecdfbb 3579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3580ac_cv_c_compiler_gnu=$ac_compiler_gnu
3581
3582fi
81ecdfbb
RW
3583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3584$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3585if test $ac_compiler_gnu = yes; then
3586 GCC=yes
3587else
3588 GCC=
3589fi
bec39cab
AC
3590ac_test_CFLAGS=${CFLAGS+set}
3591ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3593$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3594if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3595 $as_echo_n "(cached) " >&6
bec39cab 3596else
81ecdfbb
RW
3597 ac_save_c_werror_flag=$ac_c_werror_flag
3598 ac_c_werror_flag=yes
3599 ac_cv_prog_cc_g=no
3600 CFLAGS="-g"
3601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3602/* end confdefs.h. */
3603
3604int
3605main ()
3606{
3607
3608 ;
3609 return 0;
3610}
3611_ACEOF
81ecdfbb 3612if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3613 ac_cv_prog_cc_g=yes
3614else
81ecdfbb
RW
3615 CFLAGS=""
3616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3617/* end confdefs.h. */
3618
3619int
3620main ()
3621{
3622
3623 ;
3624 return 0;
3625}
3626_ACEOF
3627if ac_fn_c_try_compile "$LINENO"; then :
3628
3629else
3630 ac_c_werror_flag=$ac_save_c_werror_flag
3631 CFLAGS="-g"
3632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3633/* end confdefs.h. */
3634
3635int
3636main ()
3637{
c906108c 3638
81ecdfbb
RW
3639 ;
3640 return 0;
3641}
3642_ACEOF
3643if ac_fn_c_try_compile "$LINENO"; then :
3644 ac_cv_prog_cc_g=yes
3645fi
3646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3647fi
3648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3649fi
81ecdfbb
RW
3650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3651 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3652fi
81ecdfbb
RW
3653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3654$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3655if test "$ac_test_CFLAGS" = set; then
bec39cab 3656 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3657elif test $ac_cv_prog_cc_g = yes; then
3658 if test "$GCC" = yes; then
3659 CFLAGS="-g -O2"
3660 else
3661 CFLAGS="-g"
3662 fi
3663else
3664 if test "$GCC" = yes; then
3665 CFLAGS="-O2"
3666 else
3667 CFLAGS=
3668 fi
3669fi
81ecdfbb
RW
3670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3671$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3672if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3673 $as_echo_n "(cached) " >&6
bec39cab 3674else
81ecdfbb 3675 ac_cv_prog_cc_c89=no
bec39cab 3676ac_save_CC=$CC
81ecdfbb 3677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3678/* end confdefs.h. */
c906108c
SS
3679#include <stdarg.h>
3680#include <stdio.h>
d0ac1c44 3681struct stat;
c906108c
SS
3682/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3683struct buf { int x; };
3684FILE * (*rcsopen) (struct buf *, struct stat *, int);
3685static char *e (p, i)
3686 char **p;
3687 int i;
3688{
3689 return p[i];
3690}
3691static char *f (char * (*g) (char **, int), char **p, ...)
3692{
3693 char *s;
3694 va_list v;
3695 va_start (v,p);
3696 s = g (p, va_arg (v,int));
3697 va_end (v);
3698 return s;
3699}
bec39cab
AC
3700
3701/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3702 function prototypes and stuff, but not '\xHH' hex character constants.
3703 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3704 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3705 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3706 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3707 that's true only with -std. */
bec39cab
AC
3708int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3709
81ecdfbb
RW
3710/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3711 inside strings and character constants. */
3712#define FOO(x) 'x'
3713int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3714
c906108c
SS
3715int test (int i, double x);
3716struct s1 {int (*f) (int a);};
3717struct s2 {int (*f) (double a);};
3718int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3719int argc;
3720char **argv;
bec39cab
AC
3721int
3722main ()
3723{
c906108c 3724return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3725 ;
3726 return 0;
3727}
3728_ACEOF
81ecdfbb
RW
3729for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3730 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3731do
3732 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3733 if ac_fn_c_try_compile "$LINENO"; then :
3734 ac_cv_prog_cc_c89=$ac_arg
c906108c 3735fi
81ecdfbb
RW
3736rm -f core conftest.err conftest.$ac_objext
3737 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3738done
81ecdfbb 3739rm -f conftest.$ac_ext
bec39cab 3740CC=$ac_save_CC
c906108c
SS
3741
3742fi
81ecdfbb
RW
3743# AC_CACHE_VAL
3744case "x$ac_cv_prog_cc_c89" in
3745 x)
3746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3747$as_echo "none needed" >&6; } ;;
3748 xno)
3749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3750$as_echo "unsupported" >&6; } ;;
bec39cab 3751 *)
81ecdfbb
RW
3752 CC="$CC $ac_cv_prog_cc_c89"
3753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3754$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3755esac
81ecdfbb 3756if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3757
b4e70030
JB
3758fi
3759
bec39cab
AC
3760ac_ext=c
3761ac_cpp='$CPP $CPPFLAGS'
3762ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3763ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3764ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3765
3bc3d82a
PA
3766ac_ext=cpp
3767ac_cpp='$CXXCPP $CPPFLAGS'
3768ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3769ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3770ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3771if test -z "$CXX"; then
3772 if test -n "$CCC"; then
3773 CXX=$CCC
3774 else
3775 if test -n "$ac_tool_prefix"; then
3776 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3777 do
3778 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3779set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3781$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3782if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3783 $as_echo_n "(cached) " >&6
3784else
3785 if test -n "$CXX"; then
3786 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3787else
3788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3789for as_dir in $PATH
3790do
3791 IFS=$as_save_IFS
3792 test -z "$as_dir" && as_dir=.
3793 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3795 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3797 break 2
3798 fi
3799done
3800 done
3801IFS=$as_save_IFS
3802
3803fi
3804fi
3805CXX=$ac_cv_prog_CXX
3806if test -n "$CXX"; then
3807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3808$as_echo "$CXX" >&6; }
3809else
3810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3811$as_echo "no" >&6; }
3812fi
3813
3814
3815 test -n "$CXX" && break
3816 done
3817fi
3818if test -z "$CXX"; then
3819 ac_ct_CXX=$CXX
3820 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3821do
3822 # Extract the first word of "$ac_prog", so it can be a program name with args.
3823set dummy $ac_prog; ac_word=$2
3824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3825$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3826if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3827 $as_echo_n "(cached) " >&6
3828else
3829 if test -n "$ac_ct_CXX"; then
3830 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3831else
3832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3833for as_dir in $PATH
3834do
3835 IFS=$as_save_IFS
3836 test -z "$as_dir" && as_dir=.
3837 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3839 ac_cv_prog_ac_ct_CXX="$ac_prog"
3840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3841 break 2
3842 fi
3843done
3844 done
3845IFS=$as_save_IFS
3846
3847fi
3848fi
3849ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3850if test -n "$ac_ct_CXX"; then
3851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3852$as_echo "$ac_ct_CXX" >&6; }
3853else
3854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3855$as_echo "no" >&6; }
3856fi
3857
3858
3859 test -n "$ac_ct_CXX" && break
3860done
3861
3862 if test "x$ac_ct_CXX" = x; then
3863 CXX="g++"
3864 else
3865 case $cross_compiling:$ac_tool_warned in
3866yes:)
3867{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3868$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3869ac_tool_warned=yes ;;
3870esac
3871 CXX=$ac_ct_CXX
3872 fi
3873fi
3874
3875 fi
3876fi
3877# Provide some information about the compiler.
3878$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3879set X $ac_compile
3880ac_compiler=$2
3881for ac_option in --version -v -V -qversion; do
3882 { { ac_try="$ac_compiler $ac_option >&5"
3883case "(($ac_try" in
3884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3885 *) ac_try_echo=$ac_try;;
3886esac
3887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3888$as_echo "$ac_try_echo"; } >&5
3889 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3890 ac_status=$?
3891 if test -s conftest.err; then
3892 sed '10a\
3893... rest of stderr output deleted ...
3894 10q' conftest.err >conftest.er1
3895 cat conftest.er1 >&5
3bc3d82a 3896 fi
d0ac1c44 3897 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3899 test $ac_status = 0; }
3900done
3901
3902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3903$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3904if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3905 $as_echo_n "(cached) " >&6
3906else
3907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3908/* end confdefs.h. */
3909
3910int
3911main ()
3912{
3913#ifndef __GNUC__
3914 choke me
3915#endif
3916
3917 ;
3918 return 0;
3919}
3920_ACEOF
3921if ac_fn_cxx_try_compile "$LINENO"; then :
3922 ac_compiler_gnu=yes
3923else
3924 ac_compiler_gnu=no
3925fi
3926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3927ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3928
3929fi
3930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3931$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3932if test $ac_compiler_gnu = yes; then
3933 GXX=yes
3934else
3935 GXX=
3936fi
3937ac_test_CXXFLAGS=${CXXFLAGS+set}
3938ac_save_CXXFLAGS=$CXXFLAGS
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3940$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3941if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3942 $as_echo_n "(cached) " >&6
3943else
3944 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3945 ac_cxx_werror_flag=yes
3946 ac_cv_prog_cxx_g=no
3947 CXXFLAGS="-g"
3948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3949/* end confdefs.h. */
3950
3951int
3952main ()
3953{
3954
3955 ;
3956 return 0;
3957}
3958_ACEOF
3959if ac_fn_cxx_try_compile "$LINENO"; then :
3960 ac_cv_prog_cxx_g=yes
3961else
3962 CXXFLAGS=""
3963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3964/* end confdefs.h. */
3965
3966int
3967main ()
3968{
3969
3970 ;
3971 return 0;
3972}
3973_ACEOF
3974if ac_fn_cxx_try_compile "$LINENO"; then :
3975
3976else
3977 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3978 CXXFLAGS="-g"
3979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3980/* end confdefs.h. */
3981
3982int
3983main ()
3984{
3985
3986 ;
3987 return 0;
3988}
3989_ACEOF
3990if ac_fn_cxx_try_compile "$LINENO"; then :
3991 ac_cv_prog_cxx_g=yes
3992fi
3993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3994fi
3995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3996fi
3997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3998 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3999fi
4000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4001$as_echo "$ac_cv_prog_cxx_g" >&6; }
4002if test "$ac_test_CXXFLAGS" = set; then
4003 CXXFLAGS=$ac_save_CXXFLAGS
4004elif test $ac_cv_prog_cxx_g = yes; then
4005 if test "$GXX" = yes; then
4006 CXXFLAGS="-g -O2"
4007 else
4008 CXXFLAGS="-g"
4009 fi
4010else
4011 if test "$GXX" = yes; then
4012 CXXFLAGS="-O2"
4013 else
4014 CXXFLAGS=
4015 fi
4016fi
4017ac_ext=c
4018ac_cpp='$CPP $CPPFLAGS'
4019ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4020ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4021ac_compiler_gnu=$ac_cv_c_compiler_gnu
4022
4023
60ca704f 4024
bec39cab
AC
4025ac_ext=c
4026ac_cpp='$CPP $CPPFLAGS'
4027ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4028ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4029ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4031$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
4032# On Suns, sometimes $CPP names a directory.
4033if test -n "$CPP" && test -d "$CPP"; then
4034 CPP=
8bb2c122 4035fi
bec39cab 4036if test -z "$CPP"; then
d0ac1c44 4037 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 4038 $as_echo_n "(cached) " >&6
bec39cab
AC
4039else
4040 # Double quotes because CPP needs to be expanded
4041 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4042 do
4043 ac_preproc_ok=false
4044for ac_c_preproc_warn_flag in '' yes
4045do
4046 # Use a header file that comes with gcc, so configuring glibc
4047 # with a fresh cross-compiler works.
4048 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4049 # <limits.h> exists even on freestanding compilers.
4050 # On the NeXT, cc -E runs the code through the compiler's parser,
4051 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4053/* end confdefs.h. */
4054#ifdef __STDC__
4055# include <limits.h>
4056#else
4057# include <assert.h>
4058#endif
4059 Syntax error
4060_ACEOF
81ecdfbb 4061if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4062
81ecdfbb 4063else
bec39cab
AC
4064 # Broken: fails on valid input.
4065continue
4066fi
d0ac1c44 4067rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4068
81ecdfbb 4069 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4070 # can be detected and how.
81ecdfbb 4071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4072/* end confdefs.h. */
4073#include <ac_nonexistent.h>
4074_ACEOF
81ecdfbb 4075if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4076 # Broken: success on invalid input.
4077continue
8bb2c122 4078else
bec39cab
AC
4079 # Passes both tests.
4080ac_preproc_ok=:
4081break
8bb2c122 4082fi
d0ac1c44 4083rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4084
bec39cab
AC
4085done
4086# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4087rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4088if $ac_preproc_ok; then :
bec39cab
AC
4089 break
4090fi
8bb2c122 4091
bec39cab
AC
4092 done
4093 ac_cv_prog_CPP=$CPP
ddc9cd0f 4094
c906108c 4095fi
bec39cab
AC
4096 CPP=$ac_cv_prog_CPP
4097else
4098 ac_cv_prog_CPP=$CPP
c906108c 4099fi
81ecdfbb
RW
4100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4101$as_echo "$CPP" >&6; }
bec39cab
AC
4102ac_preproc_ok=false
4103for ac_c_preproc_warn_flag in '' yes
4104do
4105 # Use a header file that comes with gcc, so configuring glibc
4106 # with a fresh cross-compiler works.
4107 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4108 # <limits.h> exists even on freestanding compilers.
4109 # On the NeXT, cc -E runs the code through the compiler's parser,
4110 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4112/* end confdefs.h. */
4113#ifdef __STDC__
4114# include <limits.h>
4115#else
4116# include <assert.h>
4117#endif
4118 Syntax error
4119_ACEOF
81ecdfbb 4120if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4121
81ecdfbb 4122else
bec39cab
AC
4123 # Broken: fails on valid input.
4124continue
4125fi
d0ac1c44 4126rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4127
81ecdfbb 4128 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4129 # can be detected and how.
81ecdfbb 4130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4131/* end confdefs.h. */
4132#include <ac_nonexistent.h>
4133_ACEOF
81ecdfbb 4134if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4135 # Broken: success on invalid input.
4136continue
c906108c 4137else
bec39cab
AC
4138 # Passes both tests.
4139ac_preproc_ok=:
4140break
c906108c 4141fi
d0ac1c44 4142rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4143
bec39cab
AC
4144done
4145# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4146rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4147if $ac_preproc_ok; then :
4148
c906108c 4149else
81ecdfbb
RW
4150 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4152as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4153See \`config.log' for more details" "$LINENO" 5; }
c906108c 4154fi
c906108c 4155
bec39cab
AC
4156ac_ext=c
4157ac_cpp='$CPP $CPPFLAGS'
4158ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4159ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4160ac_compiler_gnu=$ac_cv_c_compiler_gnu
4161
4162
81ecdfbb
RW
4163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4164$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4165if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4166 $as_echo_n "(cached) " >&6
4e8d927d 4167else
81ecdfbb
RW
4168 if test -z "$GREP"; then
4169 ac_path_GREP_found=false
4170 # Loop through the user's path and test for each of PROGNAME-LIST
4171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4172for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4173do
4174 IFS=$as_save_IFS
4175 test -z "$as_dir" && as_dir=.
4176 for ac_prog in grep ggrep; do
4177 for ac_exec_ext in '' $ac_executable_extensions; do
4178 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4179 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4180# Check for GNU ac_path_GREP and select it if it is found.
4181 # Check for GNU $ac_path_GREP
4182case `"$ac_path_GREP" --version 2>&1` in
4183*GNU*)
4184 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4185*)
4186 ac_count=0
4187 $as_echo_n 0123456789 >"conftest.in"
4188 while :
4189 do
4190 cat "conftest.in" "conftest.in" >"conftest.tmp"
4191 mv "conftest.tmp" "conftest.in"
4192 cp "conftest.in" "conftest.nl"
4193 $as_echo 'GREP' >> "conftest.nl"
4194 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4195 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4196 as_fn_arith $ac_count + 1 && ac_count=$as_val
4197 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4198 # Best one so far, save it but keep looking for a better one
4199 ac_cv_path_GREP="$ac_path_GREP"
4200 ac_path_GREP_max=$ac_count
bec39cab 4201 fi
81ecdfbb
RW
4202 # 10*(2^10) chars as input seems more than enough
4203 test $ac_count -gt 10 && break
4204 done
4205 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4206esac
bec39cab 4207
81ecdfbb
RW
4208 $ac_path_GREP_found && break 3
4209 done
4210 done
4211 done
4212IFS=$as_save_IFS
4213 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4214 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4215 fi
c906108c 4216else
81ecdfbb 4217 ac_cv_path_GREP=$GREP
c906108c 4218fi
c906108c 4219
81ecdfbb
RW
4220fi
4221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4222$as_echo "$ac_cv_path_GREP" >&6; }
4223 GREP="$ac_cv_path_GREP"
c906108c 4224
c906108c 4225
81ecdfbb
RW
4226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4227$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4228if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4229 $as_echo_n "(cached) " >&6
783e057b 4230else
81ecdfbb
RW
4231 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4232 then ac_cv_path_EGREP="$GREP -E"
4233 else
4234 if test -z "$EGREP"; then
4235 ac_path_EGREP_found=false
4236 # Loop through the user's path and test for each of PROGNAME-LIST
4237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4238for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4239do
4240 IFS=$as_save_IFS
4241 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4242 for ac_prog in egrep; do
4243 for ac_exec_ext in '' $ac_executable_extensions; do
4244 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4245 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4246# Check for GNU ac_path_EGREP and select it if it is found.
4247 # Check for GNU $ac_path_EGREP
4248case `"$ac_path_EGREP" --version 2>&1` in
4249*GNU*)
4250 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4251*)
4252 ac_count=0
4253 $as_echo_n 0123456789 >"conftest.in"
4254 while :
4255 do
4256 cat "conftest.in" "conftest.in" >"conftest.tmp"
4257 mv "conftest.tmp" "conftest.in"
4258 cp "conftest.in" "conftest.nl"
4259 $as_echo 'EGREP' >> "conftest.nl"
4260 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4261 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4262 as_fn_arith $ac_count + 1 && ac_count=$as_val
4263 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4264 # Best one so far, save it but keep looking for a better one
4265 ac_cv_path_EGREP="$ac_path_EGREP"
4266 ac_path_EGREP_max=$ac_count
4267 fi
4268 # 10*(2^10) chars as input seems more than enough
4269 test $ac_count -gt 10 && break
4270 done
4271 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4272esac
bec39cab 4273
81ecdfbb
RW
4274 $ac_path_EGREP_found && break 3
4275 done
4276 done
4277 done
4278IFS=$as_save_IFS
4279 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4280 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4281 fi
783e057b 4282else
81ecdfbb 4283 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4284fi
4285
81ecdfbb 4286 fi
783e057b 4287fi
81ecdfbb
RW
4288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4289$as_echo "$ac_cv_path_EGREP" >&6; }
4290 EGREP="$ac_cv_path_EGREP"
4291
783e057b 4292
81ecdfbb
RW
4293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4294$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4295if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4296 $as_echo_n "(cached) " >&6
783e057b 4297else
81ecdfbb 4298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4299/* end confdefs.h. */
783e057b 4300#include <stdlib.h>
bec39cab 4301#include <stdarg.h>
783e057b
DJ
4302#include <string.h>
4303#include <float.h>
c906108c 4304
bec39cab
AC
4305int
4306main ()
4307{
c906108c 4308
bec39cab
AC
4309 ;
4310 return 0;
4311}
4312_ACEOF
81ecdfbb 4313if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4314 ac_cv_header_stdc=yes
c906108c 4315else
81ecdfbb 4316 ac_cv_header_stdc=no
c906108c 4317fi
81ecdfbb 4318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4319
783e057b
DJ
4320if test $ac_cv_header_stdc = yes; then
4321 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4323/* end confdefs.h. */
4324#include <string.h>
c906108c 4325
783e057b
DJ
4326_ACEOF
4327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4328 $EGREP "memchr" >/dev/null 2>&1; then :
4329
c906108c 4330else
783e057b 4331 ac_cv_header_stdc=no
c906108c 4332fi
783e057b 4333rm -f conftest*
c906108c
SS
4334
4335fi
4336
783e057b
DJ
4337if test $ac_cv_header_stdc = yes; then
4338 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4340/* end confdefs.h. */
4341#include <stdlib.h>
bec39cab 4342
783e057b
DJ
4343_ACEOF
4344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4345 $EGREP "free" >/dev/null 2>&1; then :
4346
bec39cab 4347else
783e057b 4348 ac_cv_header_stdc=no
bec39cab 4349fi
783e057b 4350rm -f conftest*
bec39cab
AC
4351
4352fi
bec39cab 4353
783e057b
DJ
4354if test $ac_cv_header_stdc = yes; then
4355 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4356 if test "$cross_compiling" = yes; then :
783e057b 4357 :
bec39cab 4358else
81ecdfbb 4359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4360/* end confdefs.h. */
4361#include <ctype.h>
81ecdfbb 4362#include <stdlib.h>
783e057b
DJ
4363#if ((' ' & 0x0FF) == 0x020)
4364# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4365# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4366#else
4367# define ISLOWER(c) \
4368 (('a' <= (c) && (c) <= 'i') \
4369 || ('j' <= (c) && (c) <= 'r') \
4370 || ('s' <= (c) && (c) <= 'z'))
4371# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4372#endif
4373
4374#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4375int
4376main ()
4377{
4378 int i;
4379 for (i = 0; i < 256; i++)
4380 if (XOR (islower (i), ISLOWER (i))
4381 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4382 return 2;
4383 return 0;
783e057b
DJ
4384}
4385_ACEOF
81ecdfbb 4386if ac_fn_c_try_run "$LINENO"; then :
783e057b 4387
81ecdfbb
RW
4388else
4389 ac_cv_header_stdc=no
783e057b 4390fi
81ecdfbb
RW
4391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4392 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4393fi
81ecdfbb 4394
783e057b
DJ
4395fi
4396fi
81ecdfbb
RW
4397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4398$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4399if test $ac_cv_header_stdc = yes; then
4400
81ecdfbb 4401$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4402
4403fi
4404
4405# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4406for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4407 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4408do :
4409 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4410ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4411"
d0ac1c44 4412if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4413 cat >>confdefs.h <<_ACEOF
81ecdfbb 4414#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4415_ACEOF
4416
4417fi
4418
4419done
4420
4421
4422
81ecdfbb 4423 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4424if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4425 MINIX=yes
4426else
4427 MINIX=
4428fi
4429
4430
4431 if test "$MINIX" = yes; then
4432
81ecdfbb 4433$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4434
4435
81ecdfbb 4436$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4437
4438
81ecdfbb 4439$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4440
4441 fi
4442
4443
81ecdfbb
RW
4444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4445$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4446if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4447 $as_echo_n "(cached) " >&6
783e057b 4448else
81ecdfbb 4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4450/* end confdefs.h. */
4451
d0ac1c44
SM
4452# define __EXTENSIONS__ 1
4453 $ac_includes_default
783e057b
DJ
4454int
4455main ()
4456{
4457
4458 ;
4459 return 0;
4460}
4461_ACEOF
81ecdfbb 4462if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4463 ac_cv_safe_to_define___extensions__=yes
4464else
81ecdfbb 4465 ac_cv_safe_to_define___extensions__=no
783e057b 4466fi
81ecdfbb 4467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4468fi
81ecdfbb
RW
4469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4470$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4471 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4472 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4473
81ecdfbb 4474 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4475
81ecdfbb 4476 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4477
81ecdfbb 4478 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4479
81ecdfbb 4480 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4481
4482
c971b7fa
PA
4483ac_aux_dir=
4484for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4485 if test -f "$ac_dir/install-sh"; then
4486 ac_aux_dir=$ac_dir
4487 ac_install_sh="$ac_aux_dir/install-sh -c"
4488 break
4489 elif test -f "$ac_dir/install.sh"; then
4490 ac_aux_dir=$ac_dir
4491 ac_install_sh="$ac_aux_dir/install.sh -c"
4492 break
4493 elif test -f "$ac_dir/shtool"; then
4494 ac_aux_dir=$ac_dir
4495 ac_install_sh="$ac_aux_dir/shtool install -c"
4496 break
4497 fi
c971b7fa
PA
4498done
4499if test -z "$ac_aux_dir"; then
d0ac1c44 4500 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4501fi
770d76d7 4502
c971b7fa
PA
4503# These three variables are undocumented and unsupported,
4504# and are intended to be withdrawn in a future Autoconf release.
4505# They can cause serious problems if a builder's source tree is in a directory
4506# whose full name contains unusual characters.
4507ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4508ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4509ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4510
770d76d7 4511
c971b7fa
PA
4512# Make sure we can run config.sub.
4513$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4514 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4515
c971b7fa
PA
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4517$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4518if ${ac_cv_build+:} false; then :
c971b7fa 4519 $as_echo_n "(cached) " >&6
770d76d7 4520else
c971b7fa
PA
4521 ac_build_alias=$build_alias
4522test "x$ac_build_alias" = x &&
4523 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4524test "x$ac_build_alias" = x &&
d0ac1c44 4525 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4526ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4527 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4528
770d76d7 4529fi
c971b7fa
PA
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4531$as_echo "$ac_cv_build" >&6; }
4532case $ac_cv_build in
4533*-*-*) ;;
d0ac1c44 4534*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4535esac
c971b7fa
PA
4536build=$ac_cv_build
4537ac_save_IFS=$IFS; IFS='-'
4538set x $ac_cv_build
4539shift
4540build_cpu=$1
4541build_vendor=$2
4542shift; shift
4543# Remember, the first character of IFS is used to create $*,
4544# except with old shells:
4545build_os=$*
4546IFS=$ac_save_IFS
4547case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4548
4549
c971b7fa
PA
4550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4551$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4552if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4553 $as_echo_n "(cached) " >&6
4554else
c971b7fa
PA
4555 if test "x$host_alias" = x; then
4556 ac_cv_host=$ac_cv_build
81ecdfbb 4557else
c971b7fa 4558 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4559 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4560fi
81ecdfbb
RW
4561
4562fi
c971b7fa
PA
4563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4564$as_echo "$ac_cv_host" >&6; }
4565case $ac_cv_host in
4566*-*-*) ;;
d0ac1c44 4567*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4568esac
c971b7fa
PA
4569host=$ac_cv_host
4570ac_save_IFS=$IFS; IFS='-'
4571set x $ac_cv_host
4572shift
4573host_cpu=$1
4574host_vendor=$2
4575shift; shift
4576# Remember, the first character of IFS is used to create $*,
4577# except with old shells:
4578host_os=$*
4579IFS=$ac_save_IFS
4580case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4581
4582
4583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4584$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4585if ${ac_cv_target+:} false; then :
3388710e
JM
4586 $as_echo_n "(cached) " >&6
4587else
4588 if test "x$target_alias" = x; then
4589 ac_cv_target=$ac_cv_host
4590else
4591 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4592 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4593fi
4594
4595fi
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4597$as_echo "$ac_cv_target" >&6; }
4598case $ac_cv_target in
4599*-*-*) ;;
d0ac1c44 4600*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4601esac
4602target=$ac_cv_target
4603ac_save_IFS=$IFS; IFS='-'
4604set x $ac_cv_target
4605shift
4606target_cpu=$1
4607target_vendor=$2
4608shift; shift
4609# Remember, the first character of IFS is used to create $*,
4610# except with old shells:
4611target_os=$*
4612IFS=$ac_save_IFS
4613case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4614
4615
4616# The aliases save the names the user supplied, while $host etc.
4617# will get canonicalized.
4618test -n "$target_alias" &&
4619 test "$program_prefix$program_suffix$program_transform_name" = \
4620 NONENONEs,x,x, &&
4621 program_prefix=${target_alias}-
4622
4623# The tests for host and target for $enable_largefile require
4624# canonical names.
4625
4626
81ecdfbb 4627
da2f07f1
JK
4628# As the $enable_largefile decision depends on --enable-plugins we must set it
4629# even in directories otherwise not depending on the $plugins option.
4630
4631
2974be62
AM
4632 maybe_plugins=no
4633 for ac_header in dlfcn.h
4634do :
4635 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4636"
d0ac1c44 4637if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4638 cat >>confdefs.h <<_ACEOF
4639#define HAVE_DLFCN_H 1
4640_ACEOF
4641 maybe_plugins=yes
4642fi
4643
4644done
4645
4646 for ac_header in windows.h
4647do :
4648 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4649"
d0ac1c44 4650if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4651 cat >>confdefs.h <<_ACEOF
4652#define HAVE_WINDOWS_H 1
4653_ACEOF
4654 maybe_plugins=yes
4655fi
4656
4657done
4658
4659
4660 # Check whether --enable-plugins was given.
da2f07f1
JK
4661if test "${enable_plugins+set}" = set; then :
4662 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4663 no) plugins=no ;;
4664 *) plugins=yes
4665 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4666 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4667 fi ;;
4668 esac
da2f07f1 4669else
2974be62
AM
4670 plugins=$maybe_plugins
4671
da2f07f1
JK
4672fi
4673
2974be62 4674 if test "$plugins" = "yes"; then
458412c3
TT
4675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4676$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4677if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4678 $as_echo_n "(cached) " >&6
4679else
4680 ac_func_search_save_LIBS=$LIBS
4681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4682/* end confdefs.h. */
4683
4684/* Override any GCC internal prototype to avoid an error.
4685 Use char because int might match the return type of a GCC
4686 builtin and then its argument prototype would still apply. */
4687#ifdef __cplusplus
4688extern "C"
4689#endif
458412c3 4690char dlsym ();
2974be62
AM
4691int
4692main ()
4693{
458412c3 4694return dlsym ();
2974be62
AM
4695 ;
4696 return 0;
4697}
4698_ACEOF
4699for ac_lib in '' dl; do
4700 if test -z "$ac_lib"; then
4701 ac_res="none required"
4702 else
4703 ac_res=-l$ac_lib
4704 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4705 fi
4706 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4707 ac_cv_search_dlsym=$ac_res
2974be62
AM
4708fi
4709rm -f core conftest.err conftest.$ac_objext \
4710 conftest$ac_exeext
d0ac1c44 4711 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4712 break
4713fi
4714done
d0ac1c44 4715if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4716
4717else
458412c3 4718 ac_cv_search_dlsym=no
2974be62
AM
4719fi
4720rm conftest.$ac_ext
4721LIBS=$ac_func_search_save_LIBS
4722fi
458412c3
TT
4723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4724$as_echo "$ac_cv_search_dlsym" >&6; }
4725ac_res=$ac_cv_search_dlsym
2974be62
AM
4726if test "$ac_res" != no; then :
4727 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4728
4729fi
4730
4731 fi
da2f07f1
JK
4732
4733
4734case "${host}" in
4735 sparc-*-solaris*|i[3-7]86-*-solaris*)
4736 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4737 # are mutually exclusive; and without procfs support, the bfd/ elf module
4738 # cannot provide certain routines such as elfcore_write_prpsinfo
4739 # or elfcore_write_prstatus. So unless the user explicitly requested
4740 # large-file support through the --enable-largefile switch, disable
4741 # large-file support in favor of procfs support.
4742 test "${target}" = "${host}" -a "x$plugins" = xno \
4743 && : ${enable_largefile="no"}
4744 ;;
4745esac
4746
4747# Check whether --enable-largefile was given.
4748if test "${enable_largefile+set}" = set; then :
4749 enableval=$enable_largefile;
4750fi
4751
4752if test "$enable_largefile" != no; then
4753
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4755$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4756if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4757 $as_echo_n "(cached) " >&6
4758else
4759 ac_cv_sys_largefile_CC=no
4760 if test "$GCC" != yes; then
4761 ac_save_CC=$CC
4762 while :; do
4763 # IRIX 6.2 and later do not support large files by default,
4764 # so use the C compiler's -n32 option if that helps.
4765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4766/* end confdefs.h. */
4767#include <sys/types.h>
4768 /* Check that off_t can represent 2**63 - 1 correctly.
4769 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4770 since some C++ compilers masquerading as C compilers
4771 incorrectly reject 9223372036854775807. */
4772#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4773 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4774 && LARGE_OFF_T % 2147483647 == 1)
4775 ? 1 : -1];
4776int
4777main ()
4778{
4779
4780 ;
4781 return 0;
4782}
4783_ACEOF
4784 if ac_fn_c_try_compile "$LINENO"; then :
4785 break
4786fi
4787rm -f core conftest.err conftest.$ac_objext
4788 CC="$CC -n32"
4789 if ac_fn_c_try_compile "$LINENO"; then :
4790 ac_cv_sys_largefile_CC=' -n32'; break
4791fi
4792rm -f core conftest.err conftest.$ac_objext
4793 break
4794 done
4795 CC=$ac_save_CC
4796 rm -f conftest.$ac_ext
4797 fi
4798fi
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4800$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4801 if test "$ac_cv_sys_largefile_CC" != no; then
4802 CC=$CC$ac_cv_sys_largefile_CC
4803 fi
4804
4805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4806$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4807if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4808 $as_echo_n "(cached) " >&6
4809else
4810 while :; do
4811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4812/* end confdefs.h. */
4813#include <sys/types.h>
4814 /* Check that off_t can represent 2**63 - 1 correctly.
4815 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4816 since some C++ compilers masquerading as C compilers
4817 incorrectly reject 9223372036854775807. */
4818#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4819 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4820 && LARGE_OFF_T % 2147483647 == 1)
4821 ? 1 : -1];
4822int
4823main ()
4824{
4825
4826 ;
4827 return 0;
4828}
4829_ACEOF
4830if ac_fn_c_try_compile "$LINENO"; then :
4831 ac_cv_sys_file_offset_bits=no; break
4832fi
4833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4835/* end confdefs.h. */
4836#define _FILE_OFFSET_BITS 64
4837#include <sys/types.h>
4838 /* Check that off_t can represent 2**63 - 1 correctly.
4839 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4840 since some C++ compilers masquerading as C compilers
4841 incorrectly reject 9223372036854775807. */
4842#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4843 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4844 && LARGE_OFF_T % 2147483647 == 1)
4845 ? 1 : -1];
4846int
4847main ()
4848{
4849
4850 ;
4851 return 0;
4852}
4853_ACEOF
4854if ac_fn_c_try_compile "$LINENO"; then :
4855 ac_cv_sys_file_offset_bits=64; break
4856fi
4857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4858 ac_cv_sys_file_offset_bits=unknown
4859 break
4860done
4861fi
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4863$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4864case $ac_cv_sys_file_offset_bits in #(
4865 no | unknown) ;;
4866 *)
4867cat >>confdefs.h <<_ACEOF
4868#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4869_ACEOF
4870;;
4871esac
4872rm -rf conftest*
4873 if test $ac_cv_sys_file_offset_bits = unknown; then
4874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4875$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4876if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4877 $as_echo_n "(cached) " >&6
4878else
4879 while :; do
4880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4881/* end confdefs.h. */
4882#include <sys/types.h>
4883 /* Check that off_t can represent 2**63 - 1 correctly.
4884 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4885 since some C++ compilers masquerading as C compilers
4886 incorrectly reject 9223372036854775807. */
4887#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4888 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4889 && LARGE_OFF_T % 2147483647 == 1)
4890 ? 1 : -1];
4891int
4892main ()
4893{
4894
4895 ;
4896 return 0;
4897}
4898_ACEOF
4899if ac_fn_c_try_compile "$LINENO"; then :
4900 ac_cv_sys_large_files=no; break
4901fi
4902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4904/* end confdefs.h. */
4905#define _LARGE_FILES 1
4906#include <sys/types.h>
4907 /* Check that off_t can represent 2**63 - 1 correctly.
4908 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4909 since some C++ compilers masquerading as C compilers
4910 incorrectly reject 9223372036854775807. */
4911#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4912 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4913 && LARGE_OFF_T % 2147483647 == 1)
4914 ? 1 : -1];
4915int
4916main ()
4917{
4918
4919 ;
4920 return 0;
4921}
4922_ACEOF
4923if ac_fn_c_try_compile "$LINENO"; then :
4924 ac_cv_sys_large_files=1; break
4925fi
4926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4927 ac_cv_sys_large_files=unknown
4928 break
4929done
4930fi
4931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4932$as_echo "$ac_cv_sys_large_files" >&6; }
4933case $ac_cv_sys_large_files in #(
4934 no | unknown) ;;
4935 *)
4936cat >>confdefs.h <<_ACEOF
4937#define _LARGE_FILES $ac_cv_sys_large_files
4938_ACEOF
4939;;
4940esac
4941rm -rf conftest*
4942 fi
d0ac1c44
SM
4943
4944
da2f07f1
JK
4945fi
4946
4947
4948
81ecdfbb
RW
4949
4950
4951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4952$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4953if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4954 $as_echo_n "(cached) " >&6
4955else
4956 am_cv_prog_cc_stdc=no
4957ac_save_CC="$CC"
4958# Don't try gcc -ansi; that turns off useful extensions and
4959# breaks some systems' header files.
4960# AIX -qlanglvl=ansi
4961# Ultrix and OSF/1 -std1
4962# HP-UX 10.20 and later -Ae
4963# HP-UX older versions -Aa -D_HPUX_SOURCE
4964# SVR4 -Xc -D__EXTENSIONS__
4965for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4966do
783e057b 4967 CC="$ac_save_CC $ac_arg"
81ecdfbb 4968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4969/* end confdefs.h. */
4970#include <stdarg.h>
4971#include <stdio.h>
4972#include <sys/types.h>
4973#include <sys/stat.h>
4974/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4975struct buf { int x; };
4976FILE * (*rcsopen) (struct buf *, struct stat *, int);
4977static char *e (p, i)
4978 char **p;
4979 int i;
4980{
4981 return p[i];
4982}
4983static char *f (char * (*g) (char **, int), char **p, ...)
4984{
4985 char *s;
4986 va_list v;
4987 va_start (v,p);
4988 s = g (p, va_arg (v,int));
4989 va_end (v);
4990 return s;
4991}
4992int test (int i, double x);
4993struct s1 {int (*f) (int a);};
4994struct s2 {int (*f) (double a);};
4995int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4996int argc;
4997char **argv;
4998
4999int
5000main ()
5001{
5002
5003return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5004
5005 ;
5006 return 0;
5007}
5008_ACEOF
81ecdfbb 5009if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5010 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 5011fi
81ecdfbb 5012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5013done
5014CC="$ac_save_CC"
5015
5016fi
5017
5018if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
5019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5020$as_echo "none needed" >&6; }
783e057b 5021else
81ecdfbb
RW
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5023$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
5024fi
5025case "x$am_cv_prog_cc_stdc" in
5026 x|xno) ;;
5027 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5028esac
5029
d0ac1c44
SM
5030# Expand $ac_aux_dir to an absolute path.
5031am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 5032
d0ac1c44 5033if test x"${install_sh+set}" != xset; then
4869db5e
RM
5034 case $am_aux_dir in
5035 *\ * | *\ *)
5036 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5037 *)
5038 install_sh="\${SHELL} $am_aux_dir/install-sh"
5039 esac
5040fi
5041
d0ac1c44
SM
5042# Installed binaries are usually stripped using 'strip' when the user
5043# run "make install-strip". However 'strip' might not be the right
4869db5e 5044# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 5045# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
5046if test "$cross_compiling" != no; then
5047 if test -n "$ac_tool_prefix"; then
5048 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5049set dummy ${ac_tool_prefix}strip; ac_word=$2
5050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5051$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5052if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
5053 $as_echo_n "(cached) " >&6
5054else
5055 if test -n "$STRIP"; then
5056 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5057else
5058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5059for as_dir in $PATH
5060do
5061 IFS=$as_save_IFS
5062 test -z "$as_dir" && as_dir=.
5063 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5064 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5065 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5066 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5067 break 2
5068 fi
5069done
5070 done
5071IFS=$as_save_IFS
5072
5073fi
5074fi
5075STRIP=$ac_cv_prog_STRIP
5076if test -n "$STRIP"; then
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5078$as_echo "$STRIP" >&6; }
5079else
5080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5081$as_echo "no" >&6; }
5082fi
5083
5084
5085fi
5086if test -z "$ac_cv_prog_STRIP"; then
5087 ac_ct_STRIP=$STRIP
5088 # Extract the first word of "strip", so it can be a program name with args.
5089set dummy strip; ac_word=$2
5090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5091$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5092if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5093 $as_echo_n "(cached) " >&6
5094else
5095 if test -n "$ac_ct_STRIP"; then
5096 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5097else
5098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099for as_dir in $PATH
5100do
5101 IFS=$as_save_IFS
5102 test -z "$as_dir" && as_dir=.
5103 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5105 ac_cv_prog_ac_ct_STRIP="strip"
5106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5107 break 2
5108 fi
5109done
5110 done
5111IFS=$as_save_IFS
5112
5113fi
5114fi
5115ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5116if test -n "$ac_ct_STRIP"; then
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5118$as_echo "$ac_ct_STRIP" >&6; }
5119else
5120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5121$as_echo "no" >&6; }
5122fi
5123
5124 if test "x$ac_ct_STRIP" = x; then
5125 STRIP=":"
5126 else
5127 case $cross_compiling:$ac_tool_warned in
5128yes:)
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5130$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5131ac_tool_warned=yes ;;
5132esac
5133 STRIP=$ac_ct_STRIP
5134 fi
5135else
5136 STRIP="$ac_cv_prog_STRIP"
5137fi
5138
5139fi
5140INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5141
783e057b
DJ
5142
5143ac_aux_dir=
81ecdfbb 5144for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5145 if test -f "$ac_dir/install-sh"; then
5146 ac_aux_dir=$ac_dir
5147 ac_install_sh="$ac_aux_dir/install-sh -c"
5148 break
5149 elif test -f "$ac_dir/install.sh"; then
5150 ac_aux_dir=$ac_dir
5151 ac_install_sh="$ac_aux_dir/install.sh -c"
5152 break
5153 elif test -f "$ac_dir/shtool"; then
5154 ac_aux_dir=$ac_dir
5155 ac_install_sh="$ac_aux_dir/shtool install -c"
5156 break
5157 fi
783e057b
DJ
5158done
5159if test -z "$ac_aux_dir"; then
d0ac1c44 5160 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5161fi
81ecdfbb
RW
5162
5163# These three variables are undocumented and unsupported,
5164# and are intended to be withdrawn in a future Autoconf release.
5165# They can cause serious problems if a builder's source tree is in a directory
5166# whose full name contains unusual characters.
5167ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5168ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5169ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5170
783e057b 5171
783e057b 5172
9009e1ae
MR
5173test "$program_prefix" != NONE &&
5174 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5175# Use a double $ so make ignores it.
5176test "$program_suffix" != NONE &&
5177 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5178# Double any \ or $.
5179# By default was `s,x,x', remove it if useless.
5180ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5181program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5182
81ecdfbb 5183
0bcda685
PA
5184# We require a C++11 compiler. Check if one is available, and if
5185# necessary, set CXX_DIALECT to some -std=xxx switch.
5186
41260ac2 5187 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5188 ac_ext=cpp
5189ac_cpp='$CXXCPP $CPPFLAGS'
5190ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5191ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5192ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5193 CXX_DIALECT=""
5194 ac_success=no
5195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5196$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5197if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5198 $as_echo_n "(cached) " >&6
5199else
5200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5201/* end confdefs.h. */
5202
5203
5204// If the compiler admits that it is not ready for C++11, why torture it?
5205// Hopefully, this will speed up the test.
5206
5207#ifndef __cplusplus
5208
5209#error "This is not a C++ compiler"
5210
5211#elif __cplusplus < 201103L
5212
5213#error "This is not a C++11 compiler"
5214
5215#else
5216
5217namespace cxx11
5218{
5219
5220 namespace test_static_assert
5221 {
5222
5223 template <typename T>
5224 struct check
5225 {
5226 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5227 };
5228
5229 }
5230
5231 namespace test_final_override
5232 {
5233
5234 struct Base
5235 {
5236 virtual void f() {}
5237 };
5238
5239 struct Derived : public Base
5240 {
5241 virtual void f() override {}
5242 };
5243
5244 }
5245
5246 namespace test_double_right_angle_brackets
5247 {
5248
5249 template < typename T >
5250 struct check {};
5251
5252 typedef check<void> single_type;
5253 typedef check<check<void>> double_type;
5254 typedef check<check<check<void>>> triple_type;
5255 typedef check<check<check<check<void>>>> quadruple_type;
5256
5257 }
5258
5259 namespace test_decltype
5260 {
5261
5262 int
5263 f()
5264 {
5265 int a = 1;
5266 decltype(a) b = 2;
5267 return a + b;
5268 }
5269
5270 }
5271
5272 namespace test_type_deduction
5273 {
5274
5275 template < typename T1, typename T2 >
5276 struct is_same
5277 {
5278 static const bool value = false;
5279 };
5280
5281 template < typename T >
5282 struct is_same<T, T>
5283 {
5284 static const bool value = true;
5285 };
5286
5287 template < typename T1, typename T2 >
5288 auto
5289 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5290 {
5291 return a1 + a2;
5292 }
5293
5294 int
5295 test(const int c, volatile int v)
5296 {
5297 static_assert(is_same<int, decltype(0)>::value == true, "");
5298 static_assert(is_same<int, decltype(c)>::value == false, "");
5299 static_assert(is_same<int, decltype(v)>::value == false, "");
5300 auto ac = c;
5301 auto av = v;
5302 auto sumi = ac + av + 'x';
5303 auto sumf = ac + av + 1.0;
5304 static_assert(is_same<int, decltype(ac)>::value == true, "");
5305 static_assert(is_same<int, decltype(av)>::value == true, "");
5306 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5307 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5308 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5309 return (sumf > 0.0) ? sumi : add(c, v);
5310 }
5311
5312 }
5313
5314 namespace test_noexcept
5315 {
5316
5317 int f() { return 0; }
5318 int g() noexcept { return 0; }
5319
5320 static_assert(noexcept(f()) == false, "");
5321 static_assert(noexcept(g()) == true, "");
5322
5323 }
5324
5325 namespace test_constexpr
5326 {
5327
5328 template < typename CharT >
5329 unsigned long constexpr
5330 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5331 {
5332 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5333 }
5334
5335 template < typename CharT >
5336 unsigned long constexpr
5337 strlen_c(const CharT *const s) noexcept
5338 {
5339 return strlen_c_r(s, 0UL);
5340 }
5341
5342 static_assert(strlen_c("") == 0UL, "");
5343 static_assert(strlen_c("1") == 1UL, "");
5344 static_assert(strlen_c("example") == 7UL, "");
5345 static_assert(strlen_c("another\0example") == 7UL, "");
5346
5347 }
5348
5349 namespace test_rvalue_references
5350 {
5351
5352 template < int N >
5353 struct answer
5354 {
5355 static constexpr int value = N;
5356 };
5357
5358 answer<1> f(int&) { return answer<1>(); }
5359 answer<2> f(const int&) { return answer<2>(); }
5360 answer<3> f(int&&) { return answer<3>(); }
5361
5362 void
5363 test()
5364 {
5365 int i = 0;
5366 const int c = 0;
5367 static_assert(decltype(f(i))::value == 1, "");
5368 static_assert(decltype(f(c))::value == 2, "");
5369 static_assert(decltype(f(0))::value == 3, "");
5370 }
5371
5372 }
5373
5374 namespace test_uniform_initialization
5375 {
5376
5377 struct test
5378 {
5379 static const int zero {};
5380 static const int one {1};
5381 };
5382
5383 static_assert(test::zero == 0, "");
5384 static_assert(test::one == 1, "");
5385
5386 }
5387
5388 namespace test_lambdas
5389 {
5390
5391 void
5392 test1()
5393 {
5394 auto lambda1 = [](){};
5395 auto lambda2 = lambda1;
5396 lambda1();
5397 lambda2();
5398 }
5399
5400 int
5401 test2()
5402 {
5403 auto a = [](int i, int j){ return i + j; }(1, 2);
5404 auto b = []() -> int { return '0'; }();
5405 auto c = [=](){ return a + b; }();
5406 auto d = [&](){ return c; }();
5407 auto e = [a, &b](int x) mutable {
5408 const auto identity = [](int y){ return y; };
5409 for (auto i = 0; i < a; ++i)
5410 a += b--;
5411 return x + identity(a + b);
5412 }(0);
5413 return a + b + c + d + e;
5414 }
5415
5416 int
5417 test3()
5418 {
5419 const auto nullary = [](){ return 0; };
5420 const auto unary = [](int x){ return x; };
5421 using nullary_t = decltype(nullary);
5422 using unary_t = decltype(unary);
5423 const auto higher1st = [](nullary_t f){ return f(); };
5424 const auto higher2nd = [unary](nullary_t f1){
5425 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5426 };
5427 return higher1st(nullary) + higher2nd(nullary)(unary);
5428 }
5429
5430 }
5431
5432 namespace test_variadic_templates
5433 {
5434
5435 template <int...>
5436 struct sum;
5437
5438 template <int N0, int... N1toN>
5439 struct sum<N0, N1toN...>
5440 {
5441 static constexpr auto value = N0 + sum<N1toN...>::value;
5442 };
5443
5444 template <>
5445 struct sum<>
5446 {
5447 static constexpr auto value = 0;
5448 };
5449
5450 static_assert(sum<>::value == 0, "");
5451 static_assert(sum<1>::value == 1, "");
5452 static_assert(sum<23>::value == 23, "");
5453 static_assert(sum<1, 2>::value == 3, "");
5454 static_assert(sum<5, 5, 11>::value == 21, "");
5455 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5456
5457 }
5458
5459 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5460 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5461 // because of this.
5462 namespace test_template_alias_sfinae
5463 {
5464
5465 struct foo {};
5466
5467 template<typename T>
5468 using member = typename T::member_type;
5469
5470 template<typename T>
5471 void func(...) {}
5472
5473 template<typename T>
5474 void func(member<T>*) {}
5475
5476 void test();
5477
5478 void test() { func<foo>(0); }
5479
5480 }
5481
5482} // namespace cxx11
5483
5484#endif // __cplusplus >= 201103L
5485
5486
5487
5488_ACEOF
5489if ac_fn_cxx_try_compile "$LINENO"; then :
5490 ax_cv_cxx_compile_cxx11=yes
5491else
5492 ax_cv_cxx_compile_cxx11=no
5493fi
5494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5495fi
5496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5497$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5498 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5499 ac_success=yes
5500 fi
5501
5502 if test x$ac_success = xno; then
41260ac2
SM
5503 for alternative in ${ax_cxx_compile_alternatives}; do
5504 switch="-std=gnu++${alternative}"
0bcda685
PA
5505 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5507$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5508if eval \${$cachevar+:} false; then :
0bcda685
PA
5509 $as_echo_n "(cached) " >&6
5510else
5511 ac_save_CXX="$CXX"
5512 CXX="$CXX $switch"
5513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5514/* end confdefs.h. */
5515
5516
5517// If the compiler admits that it is not ready for C++11, why torture it?
5518// Hopefully, this will speed up the test.
5519
5520#ifndef __cplusplus
5521
5522#error "This is not a C++ compiler"
5523
5524#elif __cplusplus < 201103L
5525
5526#error "This is not a C++11 compiler"
5527
5528#else
5529
5530namespace cxx11
5531{
5532
5533 namespace test_static_assert
5534 {
5535
5536 template <typename T>
5537 struct check
5538 {
5539 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5540 };
5541
5542 }
5543
5544 namespace test_final_override
5545 {
5546
5547 struct Base
5548 {
5549 virtual void f() {}
5550 };
5551
5552 struct Derived : public Base
5553 {
5554 virtual void f() override {}
5555 };
5556
5557 }
5558
5559 namespace test_double_right_angle_brackets
5560 {
5561
5562 template < typename T >
5563 struct check {};
5564
5565 typedef check<void> single_type;
5566 typedef check<check<void>> double_type;
5567 typedef check<check<check<void>>> triple_type;
5568 typedef check<check<check<check<void>>>> quadruple_type;
5569
5570 }
5571
5572 namespace test_decltype
5573 {
5574
5575 int
5576 f()
5577 {
5578 int a = 1;
5579 decltype(a) b = 2;
5580 return a + b;
5581 }
5582
5583 }
5584
5585 namespace test_type_deduction
5586 {
5587
5588 template < typename T1, typename T2 >
5589 struct is_same
5590 {
5591 static const bool value = false;
5592 };
5593
5594 template < typename T >
5595 struct is_same<T, T>
5596 {
5597 static const bool value = true;
5598 };
5599
5600 template < typename T1, typename T2 >
5601 auto
5602 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5603 {
5604 return a1 + a2;
5605 }
5606
5607 int
5608 test(const int c, volatile int v)
5609 {
5610 static_assert(is_same<int, decltype(0)>::value == true, "");
5611 static_assert(is_same<int, decltype(c)>::value == false, "");
5612 static_assert(is_same<int, decltype(v)>::value == false, "");
5613 auto ac = c;
5614 auto av = v;
5615 auto sumi = ac + av + 'x';
5616 auto sumf = ac + av + 1.0;
5617 static_assert(is_same<int, decltype(ac)>::value == true, "");
5618 static_assert(is_same<int, decltype(av)>::value == true, "");
5619 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5620 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5621 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5622 return (sumf > 0.0) ? sumi : add(c, v);
5623 }
5624
5625 }
5626
5627 namespace test_noexcept
5628 {
5629
5630 int f() { return 0; }
5631 int g() noexcept { return 0; }
5632
5633 static_assert(noexcept(f()) == false, "");
5634 static_assert(noexcept(g()) == true, "");
5635
5636 }
5637
5638 namespace test_constexpr
5639 {
5640
5641 template < typename CharT >
5642 unsigned long constexpr
5643 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5644 {
5645 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5646 }
5647
5648 template < typename CharT >
5649 unsigned long constexpr
5650 strlen_c(const CharT *const s) noexcept
5651 {
5652 return strlen_c_r(s, 0UL);
5653 }
5654
5655 static_assert(strlen_c("") == 0UL, "");
5656 static_assert(strlen_c("1") == 1UL, "");
5657 static_assert(strlen_c("example") == 7UL, "");
5658 static_assert(strlen_c("another\0example") == 7UL, "");
5659
5660 }
5661
5662 namespace test_rvalue_references
5663 {
5664
5665 template < int N >
5666 struct answer
5667 {
5668 static constexpr int value = N;
5669 };
5670
5671 answer<1> f(int&) { return answer<1>(); }
5672 answer<2> f(const int&) { return answer<2>(); }
5673 answer<3> f(int&&) { return answer<3>(); }
5674
5675 void
5676 test()
5677 {
5678 int i = 0;
5679 const int c = 0;
5680 static_assert(decltype(f(i))::value == 1, "");
5681 static_assert(decltype(f(c))::value == 2, "");
5682 static_assert(decltype(f(0))::value == 3, "");
5683 }
5684
5685 }
5686
5687 namespace test_uniform_initialization
5688 {
5689
5690 struct test
5691 {
5692 static const int zero {};
5693 static const int one {1};
5694 };
5695
5696 static_assert(test::zero == 0, "");
5697 static_assert(test::one == 1, "");
5698
5699 }
5700
5701 namespace test_lambdas
5702 {
5703
5704 void
5705 test1()
5706 {
5707 auto lambda1 = [](){};
5708 auto lambda2 = lambda1;
5709 lambda1();
5710 lambda2();
5711 }
5712
5713 int
5714 test2()
5715 {
5716 auto a = [](int i, int j){ return i + j; }(1, 2);
5717 auto b = []() -> int { return '0'; }();
5718 auto c = [=](){ return a + b; }();
5719 auto d = [&](){ return c; }();
5720 auto e = [a, &b](int x) mutable {
5721 const auto identity = [](int y){ return y; };
5722 for (auto i = 0; i < a; ++i)
5723 a += b--;
5724 return x + identity(a + b);
5725 }(0);
5726 return a + b + c + d + e;
5727 }
5728
5729 int
5730 test3()
5731 {
5732 const auto nullary = [](){ return 0; };
5733 const auto unary = [](int x){ return x; };
5734 using nullary_t = decltype(nullary);
5735 using unary_t = decltype(unary);
5736 const auto higher1st = [](nullary_t f){ return f(); };
5737 const auto higher2nd = [unary](nullary_t f1){
5738 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5739 };
5740 return higher1st(nullary) + higher2nd(nullary)(unary);
5741 }
5742
5743 }
5744
5745 namespace test_variadic_templates
5746 {
5747
5748 template <int...>
5749 struct sum;
5750
5751 template <int N0, int... N1toN>
5752 struct sum<N0, N1toN...>
5753 {
5754 static constexpr auto value = N0 + sum<N1toN...>::value;
5755 };
5756
5757 template <>
5758 struct sum<>
5759 {
5760 static constexpr auto value = 0;
5761 };
5762
5763 static_assert(sum<>::value == 0, "");
5764 static_assert(sum<1>::value == 1, "");
5765 static_assert(sum<23>::value == 23, "");
5766 static_assert(sum<1, 2>::value == 3, "");
5767 static_assert(sum<5, 5, 11>::value == 21, "");
5768 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5769
5770 }
5771
5772 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5773 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5774 // because of this.
5775 namespace test_template_alias_sfinae
5776 {
5777
5778 struct foo {};
5779
5780 template<typename T>
5781 using member = typename T::member_type;
5782
5783 template<typename T>
5784 void func(...) {}
5785
5786 template<typename T>
5787 void func(member<T>*) {}
5788
5789 void test();
5790
5791 void test() { func<foo>(0); }
5792
5793 }
5794
5795} // namespace cxx11
5796
5797#endif // __cplusplus >= 201103L
5798
5799
5800
5801_ACEOF
5802if ac_fn_cxx_try_compile "$LINENO"; then :
5803 eval $cachevar=yes
5804else
5805 eval $cachevar=no
5806fi
5807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5808 CXX="$ac_save_CXX"
5809fi
5810eval ac_res=\$$cachevar
5811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5812$as_echo "$ac_res" >&6; }
5813 if eval test x\$$cachevar = xyes; then
5814 CXX_DIALECT="$switch"
5815 ac_success=yes
5816 break
5817 fi
5818 done
5819 fi
5820
5821 if test x$ac_success = xno; then
41260ac2
SM
5822 for alternative in ${ax_cxx_compile_alternatives}; do
5823 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5824 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5826$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5827if eval \${$cachevar+:} false; then :
0bcda685
PA
5828 $as_echo_n "(cached) " >&6
5829else
5830 ac_save_CXX="$CXX"
41260ac2
SM
5831 CXX="$CXX $switch"
5832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5833/* end confdefs.h. */
5834
5835
5836// If the compiler admits that it is not ready for C++11, why torture it?
5837// Hopefully, this will speed up the test.
5838
5839#ifndef __cplusplus
5840
5841#error "This is not a C++ compiler"
5842
5843#elif __cplusplus < 201103L
5844
5845#error "This is not a C++11 compiler"
5846
5847#else
5848
5849namespace cxx11
5850{
5851
5852 namespace test_static_assert
5853 {
5854
5855 template <typename T>
5856 struct check
5857 {
5858 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5859 };
5860
5861 }
5862
5863 namespace test_final_override
5864 {
5865
5866 struct Base
5867 {
5868 virtual void f() {}
5869 };
5870
5871 struct Derived : public Base
5872 {
5873 virtual void f() override {}
5874 };
5875
5876 }
5877
5878 namespace test_double_right_angle_brackets
5879 {
5880
5881 template < typename T >
5882 struct check {};
5883
5884 typedef check<void> single_type;
5885 typedef check<check<void>> double_type;
5886 typedef check<check<check<void>>> triple_type;
5887 typedef check<check<check<check<void>>>> quadruple_type;
5888
5889 }
5890
5891 namespace test_decltype
5892 {
5893
5894 int
5895 f()
5896 {
5897 int a = 1;
5898 decltype(a) b = 2;
5899 return a + b;
5900 }
5901
5902 }
5903
5904 namespace test_type_deduction
5905 {
5906
5907 template < typename T1, typename T2 >
5908 struct is_same
5909 {
5910 static const bool value = false;
5911 };
5912
5913 template < typename T >
5914 struct is_same<T, T>
5915 {
5916 static const bool value = true;
5917 };
5918
5919 template < typename T1, typename T2 >
5920 auto
5921 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5922 {
5923 return a1 + a2;
5924 }
5925
5926 int
5927 test(const int c, volatile int v)
5928 {
5929 static_assert(is_same<int, decltype(0)>::value == true, "");
5930 static_assert(is_same<int, decltype(c)>::value == false, "");
5931 static_assert(is_same<int, decltype(v)>::value == false, "");
5932 auto ac = c;
5933 auto av = v;
5934 auto sumi = ac + av + 'x';
5935 auto sumf = ac + av + 1.0;
5936 static_assert(is_same<int, decltype(ac)>::value == true, "");
5937 static_assert(is_same<int, decltype(av)>::value == true, "");
5938 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5939 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5940 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5941 return (sumf > 0.0) ? sumi : add(c, v);
5942 }
5943
5944 }
5945
5946 namespace test_noexcept
5947 {
5948
5949 int f() { return 0; }
5950 int g() noexcept { return 0; }
5951
5952 static_assert(noexcept(f()) == false, "");
5953 static_assert(noexcept(g()) == true, "");
5954
5955 }
5956
5957 namespace test_constexpr
5958 {
5959
5960 template < typename CharT >
5961 unsigned long constexpr
5962 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5963 {
5964 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5965 }
5966
5967 template < typename CharT >
5968 unsigned long constexpr
5969 strlen_c(const CharT *const s) noexcept
5970 {
5971 return strlen_c_r(s, 0UL);
5972 }
5973
5974 static_assert(strlen_c("") == 0UL, "");
5975 static_assert(strlen_c("1") == 1UL, "");
5976 static_assert(strlen_c("example") == 7UL, "");
5977 static_assert(strlen_c("another\0example") == 7UL, "");
5978
5979 }
5980
5981 namespace test_rvalue_references
5982 {
5983
5984 template < int N >
5985 struct answer
5986 {
5987 static constexpr int value = N;
5988 };
5989
5990 answer<1> f(int&) { return answer<1>(); }
5991 answer<2> f(const int&) { return answer<2>(); }
5992 answer<3> f(int&&) { return answer<3>(); }
5993
5994 void
5995 test()
5996 {
5997 int i = 0;
5998 const int c = 0;
5999 static_assert(decltype(f(i))::value == 1, "");
6000 static_assert(decltype(f(c))::value == 2, "");
6001 static_assert(decltype(f(0))::value == 3, "");
6002 }
6003
6004 }
6005
6006 namespace test_uniform_initialization
6007 {
6008
6009 struct test
6010 {
6011 static const int zero {};
6012 static const int one {1};
6013 };
6014
6015 static_assert(test::zero == 0, "");
6016 static_assert(test::one == 1, "");
6017
6018 }
6019
6020 namespace test_lambdas
6021 {
6022
6023 void
6024 test1()
6025 {
6026 auto lambda1 = [](){};
6027 auto lambda2 = lambda1;
6028 lambda1();
6029 lambda2();
6030 }
6031
6032 int
6033 test2()
6034 {
6035 auto a = [](int i, int j){ return i + j; }(1, 2);
6036 auto b = []() -> int { return '0'; }();
6037 auto c = [=](){ return a + b; }();
6038 auto d = [&](){ return c; }();
6039 auto e = [a, &b](int x) mutable {
6040 const auto identity = [](int y){ return y; };
6041 for (auto i = 0; i < a; ++i)
6042 a += b--;
6043 return x + identity(a + b);
6044 }(0);
6045 return a + b + c + d + e;
6046 }
6047
6048 int
6049 test3()
6050 {
6051 const auto nullary = [](){ return 0; };
6052 const auto unary = [](int x){ return x; };
6053 using nullary_t = decltype(nullary);
6054 using unary_t = decltype(unary);
6055 const auto higher1st = [](nullary_t f){ return f(); };
6056 const auto higher2nd = [unary](nullary_t f1){
6057 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6058 };
6059 return higher1st(nullary) + higher2nd(nullary)(unary);
6060 }
6061
6062 }
6063
6064 namespace test_variadic_templates
6065 {
6066
6067 template <int...>
6068 struct sum;
6069
6070 template <int N0, int... N1toN>
6071 struct sum<N0, N1toN...>
6072 {
6073 static constexpr auto value = N0 + sum<N1toN...>::value;
6074 };
6075
6076 template <>
6077 struct sum<>
6078 {
6079 static constexpr auto value = 0;
6080 };
6081
6082 static_assert(sum<>::value == 0, "");
6083 static_assert(sum<1>::value == 1, "");
6084 static_assert(sum<23>::value == 23, "");
6085 static_assert(sum<1, 2>::value == 3, "");
6086 static_assert(sum<5, 5, 11>::value == 21, "");
6087 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6088
6089 }
6090
6091 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6092 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6093 // because of this.
6094 namespace test_template_alias_sfinae
6095 {
6096
6097 struct foo {};
6098
6099 template<typename T>
6100 using member = typename T::member_type;
6101
6102 template<typename T>
6103 void func(...) {}
6104
6105 template<typename T>
6106 void func(member<T>*) {}
6107
6108 void test();
6109
6110 void test() { func<foo>(0); }
6111
6112 }
6113
6114} // namespace cxx11
6115
6116#endif // __cplusplus >= 201103L
6117
6118
6119
6120_ACEOF
6121if ac_fn_cxx_try_compile "$LINENO"; then :
6122 eval $cachevar=yes
6123else
6124 eval $cachevar=no
6125fi
6126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6127 CXX="$ac_save_CXX"
0bcda685
PA
6128fi
6129eval ac_res=\$$cachevar
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6131$as_echo "$ac_res" >&6; }
41260ac2
SM
6132 if eval test x\$$cachevar = xyes; then
6133 CXX_DIALECT="$switch"
6134 ac_success=yes
6135 break
6136 fi
6137 done
6138 if test x$ac_success = xyes; then
0bcda685
PA
6139 break
6140 fi
6141 done
6142 fi
6143 ac_ext=c
6144ac_cpp='$CPP $CPPFLAGS'
6145ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6146ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6147ac_compiler_gnu=$ac_cv_c_compiler_gnu
6148
6149 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6150 if test x$ac_success = xno; then
d0ac1c44 6151 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6152 fi
6153 fi
6154 if test x$ac_success = xno; then
6155 HAVE_CXX11=0
6156 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6157$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6158 else
6159 HAVE_CXX11=1
6160
6161$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6162
6163 fi
6164
6165
6166
6167
a417dc56
RW
6168# Dependency checking.
6169rm -rf .tst 2>/dev/null
6170mkdir .tst 2>/dev/null
6171if test -d .tst; then
6172 am__leading_dot=.
6173else
6174 am__leading_dot=_
6175fi
6176rmdir .tst 2>/dev/null
6177
6178DEPDIR="${am__leading_dot}deps"
6179
81ecdfbb 6180ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6181
6182
6183depcc="$CC" am_compiler_list=
6184
6185am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6187$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6188if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6189 $as_echo_n "(cached) " >&6
a417dc56
RW
6190else
6191 if test -f "$am_depcomp"; then
6192 # We make a subdir and do the tests there. Otherwise we can end up
6193 # making bogus files that we don't know about and never remove. For
6194 # instance it was reported that on HP-UX the gcc test will end up
6195 # making a dummy file named `D' -- because `-MD' means `put the output
6196 # in D'.
6197 mkdir conftest.dir
6198 # Copy depcomp to subdir because otherwise we won't find it if we're
6199 # using a relative directory.
6200 cp "$am_depcomp" conftest.dir
6201 cd conftest.dir
6202 # We will build objects and dependencies in a subdirectory because
6203 # it helps to detect inapplicable dependency modes. For instance
6204 # both Tru64's cc and ICC support -MD to output dependencies as a
6205 # side effect of compilation, but ICC will put the dependencies in
6206 # the current directory while Tru64 will put them in the object
6207 # directory.
6208 mkdir sub
6209
6210 am_cv_CC_dependencies_compiler_type=none
6211 if test "$am_compiler_list" = ""; then
6212 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6213 fi
6214 for depmode in $am_compiler_list; do
6215 if test $depmode = none; then break; fi
6216
81ecdfbb 6217 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6218 # Setup a source with many dependencies, because some compilers
6219 # like to wrap large dependency lists on column 80 (with \), and
6220 # we should not choose a depcomp mode which is confused by this.
6221 #
6222 # We need to recreate these files for each test, as the compiler may
6223 # overwrite some of them when testing with obscure command lines.
6224 # This happens at least with the AIX C compiler.
6225 : > sub/conftest.c
6226 for i in 1 2 3 4 5 6; do
6227 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6228 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6229 # Solaris 8's {/usr,}/bin/sh.
6230 touch sub/conftst$i.h
6231 done
6232 echo "include sub/conftest.Po" > confmf
6233
6234 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6235 # mode. It turns out that the SunPro C++ compiler does not properly
6236 # handle `-M -o', and we need to detect this.
6237 depcmd="depmode=$depmode \
6238 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6239 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6240 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6241 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6242 if env $depcmd > conftest.err 2>&1 &&
6243 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6244 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6245 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6246 # icc doesn't choke on unknown options, it will just issue warnings
6247 # or remarks (even with -Werror). So we grep stderr for any message
6248 # that says an option was ignored or not supported.
6249 # When given -MP, icc 7.0 and 7.1 complain thusly:
6250 # icc: Command line warning: ignoring option '-M'; no argument required
6251 # The diagnosis changed in icc 8.0:
6252 # icc: Command line remark: option '-MP' not supported
6253 if (grep 'ignoring option' conftest.err ||
6254 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6255 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6256 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6257 break
6258 fi
6259 fi
81ecdfbb 6260 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6261 sed -e 's/^/| /' < conftest.err >&5
6262 done
6263
6264 cd ..
6265 rm -rf conftest.dir
6266else
6267 am_cv_CC_dependencies_compiler_type=none
6268fi
6269
6270fi
81ecdfbb
RW
6271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6272$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6273if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6274then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6275else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6276
6277fi
6278
6279
c971b7fa
PA
6280
6281CONFIG_OBS=
6282CONFIG_DEPS=
6283CONFIG_SRCS=
6284ENABLE_CFLAGS=
6285
6286CONFIG_ALL=
6287CONFIG_CLEAN=
6288CONFIG_INSTALL=
6289CONFIG_UNINSTALL=
6290
6291# If we haven't got the data from the intl directory,
6292# assume NLS is disabled.
6293USE_NLS=no
6294LIBINTL=
6295LIBINTL_DEP=
6296INCINTL=
6297XGETTEXT=
6298GMSGFMT=
6299POSUB=
783e057b
DJ
6300
6301if test -f ../intl/config.intl; then
6302 . ../intl/config.intl
6303fi
81ecdfbb
RW
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6305$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6306if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6308$as_echo "no" >&6; }
783e057b 6309else
81ecdfbb
RW
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6311$as_echo "yes" >&6; }
783e057b 6312
81ecdfbb 6313$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6314
6315
81ecdfbb
RW
6316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6317$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6318 # Look for .po and .gmo files in the source directory.
6319 CATALOGS=
6320 XLINGUAS=
6321 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6322 # If there aren't any .gmo files the shell will give us the
6323 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6324 # weeded out.
6325 case "$cat" in *\**)
6326 continue;;
6327 esac
6328 # The quadruple backslash is collapsed to a double backslash
6329 # by the backticks, then collapsed again by the double quotes,
6330 # leaving us with one backslash in the sed expression (right
6331 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6332 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6333 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6334 # The user is allowed to set LINGUAS to a list of languages to
6335 # install catalogs for. If it's empty that means "all of them."
6336 if test "x$LINGUAS" = x; then
6337 CATALOGS="$CATALOGS $cat"
6338 XLINGUAS="$XLINGUAS $lang"
6339 else
6340 case "$LINGUAS" in *$lang*)
6341 CATALOGS="$CATALOGS $cat"
6342 XLINGUAS="$XLINGUAS $lang"
6343 ;;
6344 esac
e28b3332
DJ
6345 fi
6346 done
c971b7fa
PA
6347 LINGUAS="$XLINGUAS"
6348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6349$as_echo "$LINGUAS" >&6; }
6350
6351
6352 DATADIRNAME=share
6353
6354 INSTOBJEXT=.mo
6355
6356 GENCAT=gencat
6357
6358 CATOBJEXT=.gmo
e28b3332 6359
e28b3332
DJ
6360fi
6361
c971b7fa
PA
6362localedir='${datadir}/locale'
6363
6364
6365if test x"$USE_NLS" = xyes; then
6366 CONFIG_ALL="$CONFIG_ALL all-po"
6367 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6368 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6369 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6370fi
e28b3332 6371
c971b7fa
PA
6372PACKAGE=gdb
6373
6374cat >>confdefs.h <<_ACEOF
6375#define PACKAGE "$PACKAGE"
6376_ACEOF
6377
6378
6379
6380# We never need to detect it in this sub-configure.
6381# But preserve it for config.status --recheck.
6382
6383
6384
6385MAKEINFO_EXTRA_FLAGS=""
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6387$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6388if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6389 $as_echo_n "(cached) " >&6
6390else
6391 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6392 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6393 gdb_cv_have_makeinfo_click=yes
6394 else
6395 gdb_cv_have_makeinfo_click=no
6396 fi
6397fi
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6399$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6400if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6401 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6402fi
e28b3332
DJ
6403
6404
bec39cab
AC
6405
6406
81ecdfbb
RW
6407# Check whether --with-separate-debug-dir was given.
6408if test "${with_separate_debug_dir+set}" = set; then :
6409 withval=$with_separate_debug_dir;
b14b1491
TT
6410 DEBUGDIR=$withval
6411else
6412 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6413fi
6414
20e95c23 6415
783e057b
DJ
6416 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6417 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6418 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6419 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6420
783e057b
DJ
6421cat >>confdefs.h <<_ACEOF
6422#define DEBUGDIR "$ac_define_dir"
20e95c23 6423_ACEOF
20e95c23 6424
20e95c23 6425
20e95c23 6426
0c4a4063 6427
b14b1491
TT
6428 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6429 if test "x$prefix" = xNONE; then
6430 test_prefix=/usr/local
6431 else
6432 test_prefix=$prefix
6433 fi
783e057b 6434 else
b14b1491 6435 test_prefix=$exec_prefix
783e057b 6436 fi
b14b1491
TT
6437 value=0
6438 case ${ac_define_dir} in
6439 "${test_prefix}"|"${test_prefix}/"*|\
6440 '${exec_prefix}'|'${exec_prefix}/'*)
6441 value=1
6442 ;;
6443 esac
6444
6445cat >>confdefs.h <<_ACEOF
6446#define DEBUGDIR_RELOCATABLE $value
6447_ACEOF
6448
6449
6450
0c4a4063 6451
f83d8a90
DE
6452# We can't pass paths as command line arguments.
6453# Mingw32 tries to be clever and will convert the paths for us.
6454# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6455# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6456# This breaks GDB's relocatable path conversions since paths passed in
6457# config.h would not get so translated, the path prefixes no longer match.
6458
6459 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6460 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6461 ac_define_dir=`eval echo $bindir`
6462 ac_define_dir=`eval echo $ac_define_dir`
6463
6464cat >>confdefs.h <<_ACEOF
6465#define BINDIR "$ac_define_dir"
6466_ACEOF
6467
6468
6469
b14b1491
TT
6470# GDB's datadir relocation
6471
6472
6473
81ecdfbb
RW
6474# Check whether --with-gdb-datadir was given.
6475if test "${with_gdb_datadir+set}" = set; then :
6476 withval=$with_gdb_datadir;
b14b1491 6477 GDB_DATADIR=$withval
20e95c23 6478else
b14b1491 6479 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6480fi
6481
20e95c23 6482
b14b1491
TT
6483 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6484 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6485 ac_define_dir=`eval echo $GDB_DATADIR`
6486 ac_define_dir=`eval echo $ac_define_dir`
6487
6488cat >>confdefs.h <<_ACEOF
6489#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6490_ACEOF
6491
b14b1491
TT
6492
6493
0c4a4063 6494
b14b1491
TT
6495 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6496 if test "x$prefix" = xNONE; then
6497 test_prefix=/usr/local
6498 else
6499 test_prefix=$prefix
6500 fi
6501 else
6502 test_prefix=$exec_prefix
6503 fi
6504 value=0
6505 case ${ac_define_dir} in
6506 "${test_prefix}"|"${test_prefix}/"*|\
6507 '${exec_prefix}'|'${exec_prefix}/'*)
6508 value=1
6509 ;;
6510 esac
6511
6512cat >>confdefs.h <<_ACEOF
6513#define GDB_DATADIR_RELOCATABLE $value
6514_ACEOF
6515
6516
783e057b 6517
20e95c23 6518
0c4a4063 6519
81ecdfbb
RW
6520# Check whether --with-relocated-sources was given.
6521if test "${with_relocated_sources+set}" = set; then :
6522 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6523
6524 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6525 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6526 ac_define_dir=`eval echo $reloc_srcdir`
6527 ac_define_dir=`eval echo $ac_define_dir`
6528
6529cat >>confdefs.h <<_ACEOF
6530#define RELOC_SRCDIR "$ac_define_dir"
6531_ACEOF
6532
6533
6534
81ecdfbb
RW
6535fi
6536
29b0e8a2 6537
7349ff92
JK
6538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6539$as_echo_n "checking for default auto-load directory... " >&6; }
6540
6541# Check whether --with-auto-load-dir was given.
6542if test "${with_auto_load_dir+set}" = set; then :
6543 withval=$with_auto_load_dir;
6544else
1564a261 6545 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6546fi
6547
2861ee4f 6548escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6549
6550 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6551 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6552 ac_define_dir=`eval echo $escape_dir`
6553 ac_define_dir=`eval echo $ac_define_dir`
6554
6555cat >>confdefs.h <<_ACEOF
6556#define AUTO_LOAD_DIR "$ac_define_dir"
6557_ACEOF
6558
6559
6560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6561$as_echo "$with_auto_load_dir" >&6; }
6562
bccbefd2
JK
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6564$as_echo_n "checking for default auto-load safe-path... " >&6; }
6565
6566# Check whether --with-auto-load-safe-path was given.
6567if test "${with_auto_load_safe_path+set}" = set; then :
6568 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6569 with_auto_load_safe_path="/"
6570 fi
bccbefd2 6571else
7349ff92 6572 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6573fi
6574
2861ee4f 6575escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6576
6577 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6578 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6579 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6580 ac_define_dir=`eval echo $ac_define_dir`
6581
6582cat >>confdefs.h <<_ACEOF
6dea1fbd 6583#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6584_ACEOF
6585
6586
6587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6588$as_echo "$with_auto_load_safe_path" >&6; }
6589
29b0e8a2 6590
20e95c23 6591
5ae98d25 6592subdirs="$subdirs testsuite"
20e95c23
DJ
6593
6594
783e057b 6595# Check whether to support alternative target configurations
81ecdfbb
RW
6596# Check whether --enable-targets was given.
6597if test "${enable_targets+set}" = set; then :
6598 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6599 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6600 ;;
6601 no) enable_targets= ;;
6602 *) enable_targets=$enableval ;;
6603esac
81ecdfbb
RW
6604fi
6605
20e95c23 6606
783e057b 6607# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6608# Check whether --enable-64-bit-bfd was given.
6609if test "${enable_64_bit_bfd+set}" = set; then :
6610 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6611 yes) want64=true ;;
6612 no) want64=false ;;
d0ac1c44 6613 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6614esac
6615else
6616 want64=false
81ecdfbb
RW
6617fi
6618
783e057b
DJ
6619# Provide defaults for some variables set by the per-host and per-target
6620# configuration.
6621gdb_host_obs=posix-hdep.o
20e95c23 6622
783e057b
DJ
6623if test "${target}" = "${host}"; then
6624 gdb_native=yes
6625else
6626 gdb_native=no
6627fi
20e95c23 6628
783e057b 6629. $srcdir/configure.host
20e95c23 6630
783e057b 6631# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6632
783e057b
DJ
6633TARGET_OBS=
6634all_targets=
b292c783 6635HAVE_NATIVE_GCORE_TARGET=
20e95c23 6636
783e057b 6637for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6638do
783e057b
DJ
6639 if test "$targ_alias" = "all"; then
6640 all_targets=true
6641 else
6642 # Canonicalize the secondary target names.
6643 result=`$ac_config_sub $targ_alias 2>/dev/null`
6644 if test -n "$result"; then
6645 targ=$result
6646 else
6647 targ=$targ_alias
6648 fi
20e95c23 6649
783e057b 6650 . ${srcdir}/configure.tgt
20e95c23 6651
bf307134 6652 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6653 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6654fi
6655
783e057b
DJ
6656 # Target-specific object files
6657 for i in ${gdb_target_obs}; do
6658 case " $TARGET_OBS " in
6659 *" ${i} "*) ;;
6660 *)
6661 TARGET_OBS="$TARGET_OBS ${i}"
6662 ;;
6663 esac
6664 done
20e95c23 6665
783e057b
DJ
6666 # Check whether this target needs 64-bit CORE_ADDR
6667 if test x${want64} = xfalse; then
6668 . ${srcdir}/../bfd/config.bfd
6669 fi
b292c783
JK
6670
6671 # Check whether this target is native and supports gcore.
6672 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6673 && $gdb_have_gcore; then
6674 HAVE_NATIVE_GCORE_TARGET=1
6675 fi
783e057b 6676 fi
20e95c23
DJ
6677done
6678
783e057b
DJ
6679if test x${all_targets} = xtrue; then
6680
6681 # We want all 64-bit targets if we either:
6682 # - run on a 64-bit host or
6683 # - already require 64-bit support for some other target or
6684 # - the --enable-64-bit-bfd option was supplied
6685 # Otherwise we only support all 32-bit targets.
6686 #
6687 # NOTE: This test must be in sync with the corresponding
6688 # tests in BFD!
20e95c23 6689
783e057b 6690 if test x${want64} = xfalse; then
81ecdfbb
RW
6691 # The cast to long int works around a bug in the HP C Compiler
6692# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6693# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6694# This bug is HP SR number 8606223364.
6695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6696$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6697if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6698 $as_echo_n "(cached) " >&6
c0993dbe 6699else
81ecdfbb 6700 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6701
81ecdfbb
RW
6702else
6703 if test "$ac_cv_type_long" = yes; then
6704 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6706as_fn_error 77 "cannot compute sizeof (long)
6707See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6708 else
6709 ac_cv_sizeof_long=0
6710 fi
c0993dbe 6711fi
81ecdfbb 6712
c0993dbe 6713fi
81ecdfbb
RW
6714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6715$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6716
c0993dbe 6717
c0993dbe 6718
c0993dbe
UW
6719cat >>confdefs.h <<_ACEOF
6720#define SIZEOF_LONG $ac_cv_sizeof_long
6721_ACEOF
6722
6723
6724 if test "x${ac_cv_sizeof_long}" = "x8"; then
6725 want64=true
6726 fi
6727 fi
6728 if test x${want64} = xtrue; then
6729 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6730 else
6731 TARGET_OBS='$(ALL_TARGET_OBS)'
6732 fi
6733fi
6734
6735
6736
b292c783 6737
c0993dbe
UW
6738# For other settings, only the main target counts.
6739gdb_sim=
6740gdb_osabi=
6741build_gdbserver=
6742targ=$target; . ${srcdir}/configure.tgt
6743
6744# Fetch the default architecture and default target vector from BFD.
6745targ=$target; . $srcdir/../bfd/config.bfd
6746
6747# We only want the first architecture, so strip off the others if
6748# there is more than one.
6749targ_archs=`echo $targ_archs | sed 's/ .*//'`
6750
6751if test "x$targ_archs" != x; then
6752
6753cat >>confdefs.h <<_ACEOF
6754#define DEFAULT_BFD_ARCH $targ_archs
6755_ACEOF
6756
6757fi
6758if test "x$targ_defvec" != x; then
6759
6760cat >>confdefs.h <<_ACEOF
6761#define DEFAULT_BFD_VEC $targ_defvec
6762_ACEOF
6763
6764fi
6765
c0993dbe 6766# Enable MI.
81ecdfbb
RW
6767# Check whether --enable-gdbmi was given.
6768if test "${enable_gdbmi+set}" = set; then :
6769 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6770 yes | no)
6771 ;;
6772 *)
d0ac1c44 6773 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6774 esac
6775else
6776 enable_gdbmi=yes
81ecdfbb
RW
6777fi
6778
c0993dbe 6779if test x"$enable_gdbmi" = xyes; then
0ad6b8ee 6780 if test -d "$srcdir/mi"; then
c0993dbe
UW
6781 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6782 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6783 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6784 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6785 fi
6786fi
6787
6788# Enable TUI.
81ecdfbb
RW
6789# Check whether --enable-tui was given.
6790if test "${enable_tui+set}" = set; then :
6791 enableval=$enable_tui; case $enableval in
3ca64bd3 6792 yes | no | auto)
c0993dbe
UW
6793 ;;
6794 *)
d0ac1c44 6795 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6796 esac
6797else
3ca64bd3 6798 enable_tui=auto
81ecdfbb
RW
6799fi
6800
c0993dbe
UW
6801
6802# Enable gdbtk.
81ecdfbb
RW
6803# Check whether --enable-gdbtk was given.
6804if test "${enable_gdbtk+set}" = set; then :
6805 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6806 yes | no)
6807 ;;
6808 *)
d0ac1c44 6809 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6810 esac
6811else
0ad6b8ee 6812 if test -d "$srcdir/gdbtk"; then
c0993dbe
UW
6813 enable_gdbtk=yes
6814 else
6815 enable_gdbtk=no
6816 fi
81ecdfbb
RW
6817fi
6818
c0993dbe
UW
6819# We unconditionally disable gdbtk tests on selected platforms.
6820case $host_os in
6821 go32* | windows*)
81ecdfbb
RW
6822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6823$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6824 enable_gdbtk=no ;;
6825esac
6826
05e7c244 6827# Libunwind support for ia64.
bec39cab 6828
05e7c244
JK
6829
6830# Check whether --with-libunwind-ia64 was given.
6831if test "${with_libunwind_ia64+set}" = set; then :
6832 withval=$with_libunwind_ia64;
bec39cab 6833else
05e7c244
JK
6834 with_libunwind_ia64=auto
6835fi
bec39cab 6836
05e7c244
JK
6837
6838# Backward compatibility option.
6839if test "${with_libunwind+set}" = set; then
6840 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6841 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6842 fi
6843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6844$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6845 with_libunwind_ia64="$with_libunwind"
6846fi
6847
6848case "$with_libunwind_ia64" in
6849 yes | no)
6850 ;;
6851 auto)
6852 for ac_header in libunwind-ia64.h
81ecdfbb 6853do :
b54a8fd7 6854 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6855if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6856 cat >>confdefs.h <<_ACEOF
b54a8fd7 6857#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6858_ACEOF
6859
6860fi
6861
6862done
6863
05e7c244
JK
6864 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6865 ;;
6866 *)
d0ac1c44 6867 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6868 ;;
6869esac
bec39cab 6870
05e7c244 6871if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6872 for ac_header in libunwind-ia64.h
81ecdfbb 6873do :
b54a8fd7 6874 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6875if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6876 cat >>confdefs.h <<_ACEOF
b54a8fd7 6877#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6878_ACEOF
6879
6880fi
6881
6882done
6883
05e7c244 6884 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6885 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6886 fi
6887 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6888 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6889 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6890fi
6891
cb01cfba
JB
6892opt_curses=no
6893
81ecdfbb
RW
6894# Check whether --with-curses was given.
6895if test "${with_curses+set}" = set; then :
6896 withval=$with_curses; opt_curses=$withval
6897fi
6898
cb01cfba 6899
76a39ba7 6900prefer_curses=no
cb01cfba 6901if test "$opt_curses" = "yes"; then
76a39ba7 6902 prefer_curses=yes
cb01cfba
JB
6903fi
6904
a9322a30 6905# Profiling support.
81ecdfbb
RW
6906# Check whether --enable-profiling was given.
6907if test "${enable_profiling+set}" = set; then :
6908 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6909 yes | no)
6910 ;;
6911 *)
d0ac1c44 6912 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6913 esac
6914else
6915 enable_profiling=no
81ecdfbb 6916fi
bec39cab 6917
a9322a30
TT
6918
6919for ac_func in monstartup _mcleanup
81ecdfbb
RW
6920do :
6921 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6922ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6923if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6924 cat >>confdefs.h <<_ACEOF
6925#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6926_ACEOF
a9322a30 6927
81ecdfbb
RW
6928fi
6929done
a9322a30 6930
81ecdfbb
RW
6931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6932$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6933if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6934 $as_echo_n "(cached) " >&6
6935else
6936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6937/* end confdefs.h. */
6938#include <stdlib.h>
6939extern char _etext;
a9322a30
TT
6940
6941int
6942main ()
6943{
6944free (&_etext);
6945 ;
6946 return 0;
6947}
bec39cab 6948_ACEOF
81ecdfbb 6949if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6950 ac_cv_var__etext=yes
bec39cab 6951else
81ecdfbb 6952 ac_cv_var__etext=no
bec39cab 6953fi
81ecdfbb
RW
6954rm -f core conftest.err conftest.$ac_objext \
6955 conftest$ac_exeext conftest.$ac_ext
bec39cab 6956fi
81ecdfbb
RW
6957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6958$as_echo "$ac_cv_var__etext" >&6; }
0ad6b8ee 6959if test "$ac_cv_var__etext" = yes; then
60ca704f 6960
81ecdfbb 6961$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6962
bec39cab 6963fi
81ecdfbb
RW
6964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6965$as_echo_n "checking for etext... " >&6; }
d0ac1c44 6966if ${ac_cv_var_etext+:} false; then :
81ecdfbb 6967 $as_echo_n "(cached) " >&6
bec39cab 6968else
81ecdfbb 6969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6970/* end confdefs.h. */
a9322a30
TT
6971#include <stdlib.h>
6972extern char etext;
bec39cab
AC
6973
6974int
6975main ()
6976{
a9322a30 6977free (&etext);
bec39cab
AC
6978 ;
6979 return 0;
6980}
6981_ACEOF
81ecdfbb 6982if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6983 ac_cv_var_etext=yes
bec39cab 6984else
81ecdfbb 6985 ac_cv_var_etext=no
bec39cab 6986fi
81ecdfbb
RW
6987rm -f core conftest.err conftest.$ac_objext \
6988 conftest$ac_exeext conftest.$ac_ext
bec39cab 6989fi
81ecdfbb
RW
6990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6991$as_echo "$ac_cv_var_etext" >&6; }
0ad6b8ee 6992if test "$ac_cv_var_etext" = yes; then
a9322a30 6993
81ecdfbb 6994$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6995
6996fi
a9322a30 6997if test "$enable_profiling" = yes ; then
0ad6b8ee 6998 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
d0ac1c44 6999 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7000 fi
7001 PROFILE_CFLAGS=-pg
7002 OLD_CFLAGS="$CFLAGS"
7003 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7004
81ecdfbb
RW
7005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7006$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7007if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7008 $as_echo_n "(cached) " >&6
bec39cab 7009else
81ecdfbb 7010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7011/* end confdefs.h. */
bec39cab
AC
7012
7013int
7014main ()
7015{
a9322a30 7016int x;
bec39cab
AC
7017 ;
7018 return 0;
7019}
7020_ACEOF
81ecdfbb 7021if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7022 ac_cv_cc_supports_pg=yes
bec39cab 7023else
81ecdfbb 7024 ac_cv_cc_supports_pg=no
bec39cab 7025fi
81ecdfbb 7026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7027fi
81ecdfbb
RW
7028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7029$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7030
0ad6b8ee 7031 if test "$ac_cv_cc_supports_pg" = no; then
d0ac1c44 7032 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7033 fi
bec39cab 7034
a9322a30 7035 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7036fi
7037
44cee4fd
TT
7038CODESIGN_CERT=
7039# Check whether --enable-codesign was given.
7040if test "${enable_codesign+set}" = set; then :
7041 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7042fi
7043
7044
7045
c16158bc
JM
7046
7047
81ecdfbb
RW
7048# Check whether --with-pkgversion was given.
7049if test "${with_pkgversion+set}" = set; then :
7050 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7051 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7052 no) PKGVERSION= ;;
7053 *) PKGVERSION="($withval) " ;;
7054 esac
7055else
7056 PKGVERSION="(GDB) "
7057
81ecdfbb 7058fi
c16158bc
JM
7059
7060
7061
7062
81ecdfbb
RW
7063
7064# Check whether --with-bugurl was given.
7065if test "${with_bugurl+set}" = set; then :
7066 withval=$with_bugurl; case "$withval" in
d0ac1c44 7067 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7068 no) BUGURL=
7069 ;;
7070 *) BUGURL="$withval"
7071 ;;
7072 esac
7073else
7074 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7075
81ecdfbb
RW
7076fi
7077
c16158bc
JM
7078 case ${BUGURL} in
7079 "")
7080 REPORT_BUGS_TO=
7081 REPORT_BUGS_TEXI=
7082 ;;
7083 *)
7084 REPORT_BUGS_TO="<$BUGURL>"
7085 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7086 ;;
7087 esac;
7088
7089
7090
7091
7092cat >>confdefs.h <<_ACEOF
7093#define PKGVERSION "$PKGVERSION"
7094_ACEOF
7095
7096
7097cat >>confdefs.h <<_ACEOF
7098#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7099_ACEOF
7100
7101
bec39cab
AC
7102# --------------------- #
7103# Checks for programs. #
7104# --------------------- #
7105
7106for ac_prog in gawk mawk nawk awk
7107do
7108 # Extract the first word of "$ac_prog", so it can be a program name with args.
7109set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7111$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7112if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7113 $as_echo_n "(cached) " >&6
bec39cab
AC
7114else
7115 if test -n "$AWK"; then
7116 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7117else
7118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7119for as_dir in $PATH
7120do
7121 IFS=$as_save_IFS
7122 test -z "$as_dir" && as_dir=.
81ecdfbb 7123 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7124 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7125 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7127 break 2
7128 fi
7129done
81ecdfbb
RW
7130 done
7131IFS=$as_save_IFS
bec39cab
AC
7132
7133fi
7134fi
7135AWK=$ac_cv_prog_AWK
7136if test -n "$AWK"; then
81ecdfbb
RW
7137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7138$as_echo "$AWK" >&6; }
bec39cab 7139else
81ecdfbb
RW
7140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7141$as_echo "no" >&6; }
bec39cab
AC
7142fi
7143
bec39cab 7144
81ecdfbb 7145 test -n "$AWK" && break
bec39cab
AC
7146done
7147
c971b7fa
PA
7148# Find a good install program. We prefer a C program (faster),
7149# so one script is as good as another. But avoid the broken or
7150# incompatible versions:
7151# SysV /etc/install, /usr/sbin/install
7152# SunOS /usr/etc/install
7153# IRIX /sbin/install
7154# AIX /bin/install
7155# AmigaOS /C/install, which installs bootblocks on floppy discs
7156# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7157# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7158# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7159# OS/2's system install, which has a completely different semantic
7160# ./install, which can be erroneously created by make from ./install.sh.
7161# Reject install programs that cannot install multiple files.
7162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7163$as_echo_n "checking for a BSD-compatible install... " >&6; }
7164if test -z "$INSTALL"; then
d0ac1c44 7165if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7166 $as_echo_n "(cached) " >&6
7167else
7168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7169for as_dir in $PATH
7170do
7171 IFS=$as_save_IFS
7172 test -z "$as_dir" && as_dir=.
7173 # Account for people who put trailing slashes in PATH elements.
7174case $as_dir/ in #((
7175 ./ | .// | /[cC]/* | \
7176 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7177 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7178 /usr/ucb/* ) ;;
7179 *)
7180 # OSF1 and SCO ODT 3.0 have their own names for install.
7181 # Don't use installbsd from OSF since it installs stuff as root
7182 # by default.
7183 for ac_prog in ginstall scoinst install; do
7184 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7185 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7186 if test $ac_prog = install &&
7187 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7188 # AIX install. It has an incompatible calling convention.
7189 :
7190 elif test $ac_prog = install &&
7191 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7192 # program-specific install script used by HP pwplus--don't use.
7193 :
7194 else
7195 rm -rf conftest.one conftest.two conftest.dir
7196 echo one > conftest.one
7197 echo two > conftest.two
7198 mkdir conftest.dir
7199 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7200 test -s conftest.one && test -s conftest.two &&
7201 test -s conftest.dir/conftest.one &&
7202 test -s conftest.dir/conftest.two
7203 then
7204 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7205 break 3
7206 fi
7207 fi
7208 fi
7209 done
7210 done
7211 ;;
7212esac
7213
7214 done
7215IFS=$as_save_IFS
7216
7217rm -rf conftest.one conftest.two conftest.dir
7218
7219fi
7220 if test "${ac_cv_path_install+set}" = set; then
7221 INSTALL=$ac_cv_path_install
7222 else
7223 # As a last resort, use the slow shell script. Don't cache a
7224 # value for INSTALL within a source directory, because that will
7225 # break other packages using the cache if that directory is
7226 # removed, or if the value is a relative name.
7227 INSTALL=$ac_install_sh
7228 fi
7229fi
7230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7231$as_echo "$INSTALL" >&6; }
7232
7233# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7234# It thinks the first close brace ends the variable substitution.
7235test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7236
7237test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7238
7239test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7240
81ecdfbb
RW
7241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7242$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7243LN_S=$as_ln_s
7244if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7246$as_echo "yes" >&6; }
bec39cab 7247else
81ecdfbb
RW
7248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7249$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7250fi
7251
7252if test -n "$ac_tool_prefix"; then
7253 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7254set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7256$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7257if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7258 $as_echo_n "(cached) " >&6
bec39cab
AC
7259else
7260 if test -n "$RANLIB"; then
7261 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7262else
7263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7264for as_dir in $PATH
7265do
7266 IFS=$as_save_IFS
7267 test -z "$as_dir" && as_dir=.
81ecdfbb 7268 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7269 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7270 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7271 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7272 break 2
7273 fi
7274done
81ecdfbb
RW
7275 done
7276IFS=$as_save_IFS
bec39cab
AC
7277
7278fi
7279fi
7280RANLIB=$ac_cv_prog_RANLIB
7281if test -n "$RANLIB"; then
81ecdfbb
RW
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7283$as_echo "$RANLIB" >&6; }
bec39cab 7284else
81ecdfbb
RW
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7286$as_echo "no" >&6; }
bec39cab
AC
7287fi
7288
81ecdfbb 7289
bec39cab
AC
7290fi
7291if test -z "$ac_cv_prog_RANLIB"; then
7292 ac_ct_RANLIB=$RANLIB
7293 # Extract the first word of "ranlib", so it can be a program name with args.
7294set dummy ranlib; ac_word=$2
81ecdfbb
RW
7295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7296$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7297if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7298 $as_echo_n "(cached) " >&6
bec39cab
AC
7299else
7300 if test -n "$ac_ct_RANLIB"; then
7301 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7302else
7303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7304for as_dir in $PATH
7305do
7306 IFS=$as_save_IFS
7307 test -z "$as_dir" && as_dir=.
81ecdfbb 7308 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7309 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7310 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7311 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7312 break 2
7313 fi
7314done
81ecdfbb
RW
7315 done
7316IFS=$as_save_IFS
bec39cab 7317
bec39cab
AC
7318fi
7319fi
7320ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7321if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7323$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7324else
81ecdfbb
RW
7325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7326$as_echo "no" >&6; }
bec39cab
AC
7327fi
7328
81ecdfbb
RW
7329 if test "x$ac_ct_RANLIB" = x; then
7330 RANLIB=":"
7331 else
7332 case $cross_compiling:$ac_tool_warned in
7333yes:)
7334{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7335$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7336ac_tool_warned=yes ;;
7337esac
7338 RANLIB=$ac_ct_RANLIB
7339 fi
bec39cab
AC
7340else
7341 RANLIB="$ac_cv_prog_RANLIB"
7342fi
7343
7344for ac_prog in 'bison -y' byacc
7345do
7346 # Extract the first word of "$ac_prog", so it can be a program name with args.
7347set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7349$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7350if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7351 $as_echo_n "(cached) " >&6
bec39cab
AC
7352else
7353 if test -n "$YACC"; then
7354 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7355else
7356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7357for as_dir in $PATH
7358do
7359 IFS=$as_save_IFS
7360 test -z "$as_dir" && as_dir=.
81ecdfbb 7361 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7362 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7363 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7365 break 2
7366 fi
7367done
81ecdfbb
RW
7368 done
7369IFS=$as_save_IFS
bec39cab
AC
7370
7371fi
7372fi
7373YACC=$ac_cv_prog_YACC
7374if test -n "$YACC"; then
81ecdfbb
RW
7375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7376$as_echo "$YACC" >&6; }
bec39cab 7377else
81ecdfbb
RW
7378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379$as_echo "no" >&6; }
bec39cab
AC
7380fi
7381
81ecdfbb 7382
bec39cab
AC
7383 test -n "$YACC" && break
7384done
7385test -n "$YACC" || YACC="yacc"
7386
7387
7388if test -n "$ac_tool_prefix"; then
7389 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7390set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7392$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7393if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7394 $as_echo_n "(cached) " >&6
bec39cab
AC
7395else
7396 if test -n "$AR"; then
7397 ac_cv_prog_AR="$AR" # Let the user override the test.
7398else
7399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7400for as_dir in $PATH
7401do
7402 IFS=$as_save_IFS
7403 test -z "$as_dir" && as_dir=.
81ecdfbb 7404 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7405 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7406 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7407 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7408 break 2
7409 fi
7410done
81ecdfbb
RW
7411 done
7412IFS=$as_save_IFS
bec39cab
AC
7413
7414fi
7415fi
7416AR=$ac_cv_prog_AR
7417if test -n "$AR"; then
81ecdfbb
RW
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7419$as_echo "$AR" >&6; }
bec39cab 7420else
81ecdfbb
RW
7421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7422$as_echo "no" >&6; }
bec39cab
AC
7423fi
7424
81ecdfbb 7425
bec39cab
AC
7426fi
7427if test -z "$ac_cv_prog_AR"; then
7428 ac_ct_AR=$AR
7429 # Extract the first word of "ar", so it can be a program name with args.
7430set dummy ar; ac_word=$2
81ecdfbb
RW
7431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7433if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7434 $as_echo_n "(cached) " >&6
bec39cab
AC
7435else
7436 if test -n "$ac_ct_AR"; then
7437 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7438else
7439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7440for as_dir in $PATH
7441do
7442 IFS=$as_save_IFS
7443 test -z "$as_dir" && as_dir=.
81ecdfbb 7444 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7445 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7446 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7447 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7448 break 2
7449 fi
7450done
81ecdfbb
RW
7451 done
7452IFS=$as_save_IFS
bec39cab
AC
7453
7454fi
7455fi
7456ac_ct_AR=$ac_cv_prog_ac_ct_AR
7457if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7459$as_echo "$ac_ct_AR" >&6; }
bec39cab 7460else
81ecdfbb
RW
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7462$as_echo "no" >&6; }
bec39cab
AC
7463fi
7464
81ecdfbb
RW
7465 if test "x$ac_ct_AR" = x; then
7466 AR=""
7467 else
7468 case $cross_compiling:$ac_tool_warned in
7469yes:)
7470{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7471$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7472ac_tool_warned=yes ;;
7473esac
7474 AR=$ac_ct_AR
7475 fi
bec39cab
AC
7476else
7477 AR="$ac_cv_prog_AR"
7478fi
7479
7480if test -n "$ac_tool_prefix"; then
7481 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7482set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7484$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7485if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7486 $as_echo_n "(cached) " >&6
bec39cab
AC
7487else
7488 if test -n "$DLLTOOL"; then
7489 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7490else
7491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7492for as_dir in $PATH
7493do
7494 IFS=$as_save_IFS
7495 test -z "$as_dir" && as_dir=.
81ecdfbb 7496 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7497 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7498 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7500 break 2
7501 fi
7502done
81ecdfbb
RW
7503 done
7504IFS=$as_save_IFS
bec39cab
AC
7505
7506fi
7507fi
7508DLLTOOL=$ac_cv_prog_DLLTOOL
7509if test -n "$DLLTOOL"; then
81ecdfbb
RW
7510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7511$as_echo "$DLLTOOL" >&6; }
bec39cab 7512else
81ecdfbb
RW
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7514$as_echo "no" >&6; }
bec39cab
AC
7515fi
7516
81ecdfbb 7517
bec39cab
AC
7518fi
7519if test -z "$ac_cv_prog_DLLTOOL"; then
7520 ac_ct_DLLTOOL=$DLLTOOL
7521 # Extract the first word of "dlltool", so it can be a program name with args.
7522set dummy dlltool; ac_word=$2
81ecdfbb
RW
7523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7524$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7525if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7526 $as_echo_n "(cached) " >&6
bec39cab
AC
7527else
7528 if test -n "$ac_ct_DLLTOOL"; then
7529 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7530else
7531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7532for as_dir in $PATH
7533do
7534 IFS=$as_save_IFS
7535 test -z "$as_dir" && as_dir=.
81ecdfbb 7536 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7538 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7540 break 2
7541 fi
7542done
81ecdfbb
RW
7543 done
7544IFS=$as_save_IFS
bec39cab
AC
7545
7546fi
7547fi
7548ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7549if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7551$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7552else
81ecdfbb
RW
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554$as_echo "no" >&6; }
bec39cab
AC
7555fi
7556
81ecdfbb
RW
7557 if test "x$ac_ct_DLLTOOL" = x; then
7558 DLLTOOL=""
7559 else
7560 case $cross_compiling:$ac_tool_warned in
7561yes:)
7562{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7563$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7564ac_tool_warned=yes ;;
7565esac
7566 DLLTOOL=$ac_ct_DLLTOOL
7567 fi
bec39cab
AC
7568else
7569 DLLTOOL="$ac_cv_prog_DLLTOOL"
7570fi
7571
7572if test -n "$ac_tool_prefix"; then
7573 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7574set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7576$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7577if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7578 $as_echo_n "(cached) " >&6
bec39cab
AC
7579else
7580 if test -n "$WINDRES"; then
7581 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7582else
7583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7584for as_dir in $PATH
7585do
7586 IFS=$as_save_IFS
7587 test -z "$as_dir" && as_dir=.
81ecdfbb 7588 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7589 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7590 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7592 break 2
7593 fi
7594done
81ecdfbb
RW
7595 done
7596IFS=$as_save_IFS
bec39cab
AC
7597
7598fi
7599fi
7600WINDRES=$ac_cv_prog_WINDRES
7601if test -n "$WINDRES"; then
81ecdfbb
RW
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7603$as_echo "$WINDRES" >&6; }
bec39cab 7604else
81ecdfbb
RW
7605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7606$as_echo "no" >&6; }
bec39cab
AC
7607fi
7608
81ecdfbb 7609
bec39cab
AC
7610fi
7611if test -z "$ac_cv_prog_WINDRES"; then
7612 ac_ct_WINDRES=$WINDRES
7613 # Extract the first word of "windres", so it can be a program name with args.
7614set dummy windres; ac_word=$2
81ecdfbb
RW
7615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7616$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7617if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7618 $as_echo_n "(cached) " >&6
bec39cab
AC
7619else
7620 if test -n "$ac_ct_WINDRES"; then
7621 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7622else
7623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7624for as_dir in $PATH
7625do
7626 IFS=$as_save_IFS
7627 test -z "$as_dir" && as_dir=.
81ecdfbb 7628 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7630 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7632 break 2
7633 fi
7634done
81ecdfbb
RW
7635 done
7636IFS=$as_save_IFS
bec39cab
AC
7637
7638fi
7639fi
7640ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7641if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7643$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7644else
81ecdfbb
RW
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7646$as_echo "no" >&6; }
c906108c 7647fi
bec39cab 7648
81ecdfbb
RW
7649 if test "x$ac_ct_WINDRES" = x; then
7650 WINDRES=""
7651 else
7652 case $cross_compiling:$ac_tool_warned in
7653yes:)
7654{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7655$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7656ac_tool_warned=yes ;;
7657esac
7658 WINDRES=$ac_ct_WINDRES
7659 fi
c906108c 7660else
bec39cab 7661 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7662fi
7663
bec39cab 7664
036c3acb
TS
7665case $host_os in
7666 gnu*)
7667 # Needed for GNU Hurd hosts.
7668 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7669 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7670set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7672$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7673if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7674 $as_echo_n "(cached) " >&6
c906108c 7675else
bec39cab
AC
7676 if test -n "$MIG"; then
7677 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7678else
7679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7680for as_dir in $PATH
7681do
7682 IFS=$as_save_IFS
7683 test -z "$as_dir" && as_dir=.
81ecdfbb 7684 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7686 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7688 break 2
7689 fi
7690done
81ecdfbb
RW
7691 done
7692IFS=$as_save_IFS
bec39cab 7693
c906108c 7694fi
bec39cab
AC
7695fi
7696MIG=$ac_cv_prog_MIG
7697if test -n "$MIG"; then
81ecdfbb
RW
7698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7699$as_echo "$MIG" >&6; }
c906108c 7700else
81ecdfbb
RW
7701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7702$as_echo "no" >&6; }
c906108c
SS
7703fi
7704
81ecdfbb 7705
bec39cab
AC
7706fi
7707if test -z "$ac_cv_prog_MIG"; then
7708 ac_ct_MIG=$MIG
7709 # Extract the first word of "mig", so it can be a program name with args.
7710set dummy mig; ac_word=$2
81ecdfbb
RW
7711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7712$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7713if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7714 $as_echo_n "(cached) " >&6
bec39cab
AC
7715else
7716 if test -n "$ac_ct_MIG"; then
7717 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7718else
7719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7720for as_dir in $PATH
7721do
7722 IFS=$as_save_IFS
7723 test -z "$as_dir" && as_dir=.
81ecdfbb 7724 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7726 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7728 break 2
7729 fi
7730done
81ecdfbb
RW
7731 done
7732IFS=$as_save_IFS
c906108c 7733
bec39cab
AC
7734fi
7735fi
7736ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7737if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7739$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7740else
81ecdfbb
RW
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7742$as_echo "no" >&6; }
bec39cab 7743fi
c906108c 7744
81ecdfbb
RW
7745 if test "x$ac_ct_MIG" = x; then
7746 MIG=""
7747 else
7748 case $cross_compiling:$ac_tool_warned in
7749yes:)
7750{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7751$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7752ac_tool_warned=yes ;;
7753esac
7754 MIG=$ac_ct_MIG
7755 fi
bec39cab
AC
7756else
7757 MIG="$ac_cv_prog_MIG"
7758fi
c906108c 7759
036c3acb 7760 if test x"$MIG" = x; then
d0ac1c44 7761 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7762 fi
7763 ;;
7764esac
c906108c 7765
bec39cab
AC
7766# ---------------------- #
7767# Checks for libraries. #
7768# ---------------------- #
c906108c 7769
bec39cab 7770# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7772$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7773if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7774 $as_echo_n "(cached) " >&6
bec39cab
AC
7775else
7776 ac_check_lib_save_LIBS=$LIBS
7777LIBS="-lm $LIBS"
81ecdfbb 7778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7779/* end confdefs.h. */
c906108c 7780
c906108c 7781
bec39cab
AC
7782int
7783main ()
7784{
81ecdfbb 7785return main ();
bec39cab
AC
7786 ;
7787 return 0;
7788}
7789_ACEOF
81ecdfbb 7790if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7791 ac_cv_lib_m_main=yes
7792else
81ecdfbb 7793 ac_cv_lib_m_main=no
bec39cab 7794fi
81ecdfbb
RW
7795rm -f core conftest.err conftest.$ac_objext \
7796 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7797LIBS=$ac_check_lib_save_LIBS
7798fi
81ecdfbb
RW
7799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7800$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7801if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7802 cat >>confdefs.h <<_ACEOF
7803#define HAVE_LIBM 1
7804_ACEOF
7805
7806 LIBS="-lm $LIBS"
c906108c 7807
c906108c 7808fi
bec39cab
AC
7809
7810
bec39cab 7811# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7813$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7814if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7815 $as_echo_n "(cached) " >&6
bec39cab
AC
7816else
7817 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7819/* end confdefs.h. */
ddc9cd0f 7820
81ecdfbb
RW
7821/* Override any GCC internal prototype to avoid an error.
7822 Use char because int might match the return type of a GCC
7823 builtin and then its argument prototype would still apply. */
bec39cab
AC
7824#ifdef __cplusplus
7825extern "C"
7826#endif
bec39cab
AC
7827char gethostbyname ();
7828int
7829main ()
7830{
81ecdfbb 7831return gethostbyname ();
bec39cab
AC
7832 ;
7833 return 0;
7834}
7835_ACEOF
81ecdfbb
RW
7836for ac_lib in '' nsl; do
7837 if test -z "$ac_lib"; then
7838 ac_res="none required"
7839 else
7840 ac_res=-l$ac_lib
b4e70030 7841 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7842 fi
7843 if ac_fn_c_try_link "$LINENO"; then :
7844 ac_cv_search_gethostbyname=$ac_res
7845fi
7846rm -f core conftest.err conftest.$ac_objext \
7847 conftest$ac_exeext
d0ac1c44 7848 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7849 break
7850fi
7851done
d0ac1c44 7852if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7853
bec39cab 7854else
81ecdfbb 7855 ac_cv_search_gethostbyname=no
bec39cab 7856fi
81ecdfbb 7857rm conftest.$ac_ext
bec39cab
AC
7858LIBS=$ac_func_search_save_LIBS
7859fi
81ecdfbb
RW
7860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7861$as_echo "$ac_cv_search_gethostbyname" >&6; }
7862ac_res=$ac_cv_search_gethostbyname
7863if test "$ac_res" != no; then :
7864 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7865
bec39cab 7866fi
96baa820 7867
c906108c 7868
b4e70030 7869# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7871$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7872if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7873 $as_echo_n "(cached) " >&6
b4e70030
JB
7874else
7875 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7877/* end confdefs.h. */
7878
81ecdfbb
RW
7879/* Override any GCC internal prototype to avoid an error.
7880 Use char because int might match the return type of a GCC
7881 builtin and then its argument prototype would still apply. */
b4e70030
JB
7882#ifdef __cplusplus
7883extern "C"
7884#endif
b4e70030
JB
7885char socketpair ();
7886int
7887main ()
7888{
81ecdfbb 7889return socketpair ();
b4e70030
JB
7890 ;
7891 return 0;
7892}
7893_ACEOF
81ecdfbb
RW
7894for ac_lib in '' socket; do
7895 if test -z "$ac_lib"; then
7896 ac_res="none required"
7897 else
7898 ac_res=-l$ac_lib
b4e70030 7899 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7900 fi
7901 if ac_fn_c_try_link "$LINENO"; then :
7902 ac_cv_search_socketpair=$ac_res
7903fi
7904rm -f core conftest.err conftest.$ac_objext \
7905 conftest$ac_exeext
d0ac1c44 7906 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7907 break
7908fi
7909done
d0ac1c44 7910if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7911
b4e70030 7912else
81ecdfbb 7913 ac_cv_search_socketpair=no
b4e70030 7914fi
81ecdfbb 7915rm conftest.$ac_ext
b4e70030
JB
7916LIBS=$ac_func_search_save_LIBS
7917fi
81ecdfbb
RW
7918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7919$as_echo "$ac_cv_search_socketpair" >&6; }
7920ac_res=$ac_cv_search_socketpair
7921if test "$ac_res" != no; then :
7922 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7923
7924fi
7925
7926
233a11ab 7927# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7928
711a72d3 7929 # Use the system's zlib library.
39f3de7c
L
7930 zlibdir="-L\$(top_builddir)/../zlib"
7931 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7932
711a72d3
L
7933# Check whether --with-system-zlib was given.
7934if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7935 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7936 zlibdir=
7937 zlibinc=
7938 fi
b040ad30 7939
233a11ab 7940fi
233a11ab 7941
233a11ab 7942
233a11ab 7943
b040ad30 7944
233a11ab 7945
25268153 7946# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7947# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7949$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7950if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7951 $as_echo_n "(cached) " >&6
7952else
7953 ac_func_search_save_LIBS=$LIBS
7954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7955/* end confdefs.h. */
7956
7957/* Override any GCC internal prototype to avoid an error.
7958 Use char because int might match the return type of a GCC
7959 builtin and then its argument prototype would still apply. */
7960#ifdef __cplusplus
7961extern "C"
7962#endif
7963char kinfo_getvmmap ();
7964int
7965main ()
7966{
7967return kinfo_getvmmap ();
7968 ;
7969 return 0;
7970}
7971_ACEOF
37773e78 7972for ac_lib in '' util util-freebsd; do
25268153
JB
7973 if test -z "$ac_lib"; then
7974 ac_res="none required"
7975 else
7976 ac_res=-l$ac_lib
7977 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7978 fi
7979 if ac_fn_c_try_link "$LINENO"; then :
7980 ac_cv_search_kinfo_getvmmap=$ac_res
7981fi
7982rm -f core conftest.err conftest.$ac_objext \
7983 conftest$ac_exeext
d0ac1c44 7984 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7985 break
7986fi
7987done
d0ac1c44 7988if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7989
7990else
7991 ac_cv_search_kinfo_getvmmap=no
7992fi
7993rm conftest.$ac_ext
7994LIBS=$ac_func_search_save_LIBS
7995fi
7996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7997$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7998ac_res=$ac_cv_search_kinfo_getvmmap
7999if test "$ac_res" != no; then :
8000 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8001
8002$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8003
8004fi
8005
8006
92fce24d
JB
8007# fbsd-nat.c can also use kinfo_getfile.
8008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8009$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
d0ac1c44 8010if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8011 $as_echo_n "(cached) " >&6
8012else
8013 ac_func_search_save_LIBS=$LIBS
8014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8015/* end confdefs.h. */
8016
8017/* Override any GCC internal prototype to avoid an error.
8018 Use char because int might match the return type of a GCC
8019 builtin and then its argument prototype would still apply. */
8020#ifdef __cplusplus
8021extern "C"
8022#endif
8023char kinfo_getfile ();
8024int
8025main ()
8026{
8027return kinfo_getfile ();
8028 ;
8029 return 0;
8030}
8031_ACEOF
8032for ac_lib in '' util util-freebsd; do
8033 if test -z "$ac_lib"; then
8034 ac_res="none required"
8035 else
8036 ac_res=-l$ac_lib
8037 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8038 fi
8039 if ac_fn_c_try_link "$LINENO"; then :
8040 ac_cv_search_kinfo_getfile=$ac_res
8041fi
8042rm -f core conftest.err conftest.$ac_objext \
8043 conftest$ac_exeext
d0ac1c44 8044 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8045 break
8046fi
8047done
d0ac1c44 8048if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8049
8050else
8051 ac_cv_search_kinfo_getfile=no
8052fi
8053rm conftest.$ac_ext
8054LIBS=$ac_func_search_save_LIBS
8055fi
8056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8057$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8058ac_res=$ac_cv_search_kinfo_getfile
8059if test "$ac_res" != no; then :
8060 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8061
8062$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
8063
8064fi
8065
8066
77f120bf 8067
016a3251
DD
8068 if test "X$prefix" = "XNONE"; then
8069 acl_final_prefix="$ac_default_prefix"
8070 else
8071 acl_final_prefix="$prefix"
8072 fi
8073 if test "X$exec_prefix" = "XNONE"; then
8074 acl_final_exec_prefix='${prefix}'
8075 else
8076 acl_final_exec_prefix="$exec_prefix"
8077 fi
8078 acl_save_prefix="$prefix"
8079 prefix="$acl_final_prefix"
8080 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8081 prefix="$acl_save_prefix"
8082
8083
8084# Check whether --with-gnu-ld was given.
8085if test "${with_gnu_ld+set}" = set; then :
8086 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8087else
8088 with_gnu_ld=no
8089fi
8090
8091# Prepare PATH_SEPARATOR.
8092# The user is always right.
8093if test "${PATH_SEPARATOR+set}" != set; then
8094 echo "#! /bin/sh" >conf$$.sh
8095 echo "exit 0" >>conf$$.sh
8096 chmod +x conf$$.sh
8097 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8098 PATH_SEPARATOR=';'
8099 else
8100 PATH_SEPARATOR=:
8101 fi
8102 rm -f conf$$.sh
8103fi
8104ac_prog=ld
8105if test "$GCC" = yes; then
8106 # Check if gcc -print-prog-name=ld gives a path.
8107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8108$as_echo_n "checking for ld used by GCC... " >&6; }
8109 case $host in
8110 *-*-mingw*)
8111 # gcc leaves a trailing carriage return which upsets mingw
8112 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8113 *)
8114 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8115 esac
8116 case $ac_prog in
8117 # Accept absolute paths.
8118 [\\/]* | [A-Za-z]:[\\/]*)
8119 re_direlt='/[^/][^/]*/\.\./'
8120 # Canonicalize the path of ld
8121 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8122 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8123 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8124 done
8125 test -z "$LD" && LD="$ac_prog"
8126 ;;
8127 "")
8128 # If it fails, then pretend we aren't using GCC.
8129 ac_prog=ld
8130 ;;
8131 *)
8132 # If it is relative, then search for the first ld in PATH.
8133 with_gnu_ld=unknown
8134 ;;
8135 esac
8136elif test "$with_gnu_ld" = yes; then
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8138$as_echo_n "checking for GNU ld... " >&6; }
8139else
8140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8141$as_echo_n "checking for non-GNU ld... " >&6; }
8142fi
d0ac1c44 8143if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8144 $as_echo_n "(cached) " >&6
8145else
8146 if test -z "$LD"; then
8147 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8148 for ac_dir in $PATH; do
8149 test -z "$ac_dir" && ac_dir=.
8150 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8151 acl_cv_path_LD="$ac_dir/$ac_prog"
8152 # Check to see if the program is GNU ld. I'd rather use --version,
8153 # but apparently some GNU ld's only accept -v.
8154 # Break only if it was the GNU/non-GNU ld that we prefer.
8155 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8156 test "$with_gnu_ld" != no && break
8157 else
8158 test "$with_gnu_ld" != yes && break
8159 fi
8160 fi
8161 done
8162 IFS="$ac_save_ifs"
8163else
8164 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8165fi
8166fi
8167
8168LD="$acl_cv_path_LD"
8169if test -n "$LD"; then
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8171$as_echo "$LD" >&6; }
8172else
8173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8174$as_echo "no" >&6; }
8175fi
d0ac1c44 8176test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8178$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8179if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8180 $as_echo_n "(cached) " >&6
8181else
8182 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8183if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8184 acl_cv_prog_gnu_ld=yes
8185else
8186 acl_cv_prog_gnu_ld=no
8187fi
8188fi
8189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8190$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8191with_gnu_ld=$acl_cv_prog_gnu_ld
8192
8193
8194
8195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8196$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8197if ${acl_cv_rpath+:} false; then :
016a3251
DD
8198 $as_echo_n "(cached) " >&6
8199else
8200
8201 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8202 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8203 . ./conftest.sh
8204 rm -f ./conftest.sh
8205 acl_cv_rpath=done
8206
8207fi
8208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8209$as_echo "$acl_cv_rpath" >&6; }
8210 wl="$acl_cv_wl"
8211 libext="$acl_cv_libext"
8212 shlibext="$acl_cv_shlibext"
8213 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8214 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8215 hardcode_direct="$acl_cv_hardcode_direct"
8216 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8217 # Check whether --enable-rpath was given.
8218if test "${enable_rpath+set}" = set; then :
8219 enableval=$enable_rpath; :
8220else
8221 enable_rpath=yes
8222fi
8223
8224
8225
8226
8227
8228
8229
8230
8231 use_additional=yes
8232
8233 acl_save_prefix="$prefix"
8234 prefix="$acl_final_prefix"
8235 acl_save_exec_prefix="$exec_prefix"
8236 exec_prefix="$acl_final_exec_prefix"
8237
8238 eval additional_includedir=\"$includedir\"
8239 eval additional_libdir=\"$libdir\"
8240
8241 exec_prefix="$acl_save_exec_prefix"
8242 prefix="$acl_save_prefix"
77f120bf 8243
6c7a06a3 8244
81ecdfbb
RW
8245# Check whether --with-libiconv-prefix was given.
8246if test "${with_libiconv_prefix+set}" = set; then :
8247 withval=$with_libiconv_prefix;
016a3251
DD
8248 if test "X$withval" = "Xno"; then
8249 use_additional=no
8250 else
8251 if test "X$withval" = "X"; then
8252
8253 acl_save_prefix="$prefix"
8254 prefix="$acl_final_prefix"
8255 acl_save_exec_prefix="$exec_prefix"
8256 exec_prefix="$acl_final_exec_prefix"
8257
8258 eval additional_includedir=\"$includedir\"
8259 eval additional_libdir=\"$libdir\"
8260
8261 exec_prefix="$acl_save_exec_prefix"
8262 prefix="$acl_save_prefix"
8263
8264 else
8265 additional_includedir="$withval/include"
8266 additional_libdir="$withval/lib"
8267 fi
8268 fi
6c7a06a3 8269
81ecdfbb
RW
8270fi
8271
016a3251
DD
8272 LIBICONV=
8273 LTLIBICONV=
8274 INCICONV=
8275 rpathdirs=
8276 ltrpathdirs=
8277 names_already_handled=
8278 names_next_round='iconv '
8279 while test -n "$names_next_round"; do
8280 names_this_round="$names_next_round"
8281 names_next_round=
8282 for name in $names_this_round; do
8283 already_handled=
8284 for n in $names_already_handled; do
8285 if test "$n" = "$name"; then
8286 already_handled=yes
8287 break
8288 fi
8289 done
8290 if test -z "$already_handled"; then
8291 names_already_handled="$names_already_handled $name"
8292 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8293 eval value=\"\$HAVE_LIB$uppername\"
8294 if test -n "$value"; then
8295 if test "$value" = yes; then
8296 eval value=\"\$LIB$uppername\"
8297 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8298 eval value=\"\$LTLIB$uppername\"
8299 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8300 else
8301 :
8302 fi
8303 else
8304 found_dir=
8305 found_la=
8306 found_so=
8307 found_a=
8308 if test $use_additional = yes; then
8309 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8310 found_dir="$additional_libdir"
8311 found_so="$additional_libdir/lib$name.$shlibext"
8312 if test -f "$additional_libdir/lib$name.la"; then
8313 found_la="$additional_libdir/lib$name.la"
8314 fi
8315 else
8316 if test -f "$additional_libdir/lib$name.$libext"; then
8317 found_dir="$additional_libdir"
8318 found_a="$additional_libdir/lib$name.$libext"
8319 if test -f "$additional_libdir/lib$name.la"; then
8320 found_la="$additional_libdir/lib$name.la"
8321 fi
8322 fi
8323 fi
8324 fi
8325 if test "X$found_dir" = "X"; then
8326 for x in $LDFLAGS $LTLIBICONV; do
8327
8328 acl_save_prefix="$prefix"
8329 prefix="$acl_final_prefix"
8330 acl_save_exec_prefix="$exec_prefix"
8331 exec_prefix="$acl_final_exec_prefix"
8332 eval x=\"$x\"
8333 exec_prefix="$acl_save_exec_prefix"
8334 prefix="$acl_save_prefix"
8335
8336 case "$x" in
8337 -L*)
8338 dir=`echo "X$x" | sed -e 's/^X-L//'`
8339 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8340 found_dir="$dir"
8341 found_so="$dir/lib$name.$shlibext"
8342 if test -f "$dir/lib$name.la"; then
8343 found_la="$dir/lib$name.la"
8344 fi
8345 else
8346 if test -f "$dir/lib$name.$libext"; then
8347 found_dir="$dir"
8348 found_a="$dir/lib$name.$libext"
8349 if test -f "$dir/lib$name.la"; then
8350 found_la="$dir/lib$name.la"
8351 fi
8352 fi
8353 fi
8354 ;;
8355 esac
8356 if test "X$found_dir" != "X"; then
8357 break
8358 fi
8359 done
8360 fi
8361 if test "X$found_dir" != "X"; then
8362 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8363 if test "X$found_so" != "X"; then
8364 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8365 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8366 else
8367 haveit=
8368 for x in $ltrpathdirs; do
8369 if test "X$x" = "X$found_dir"; then
8370 haveit=yes
8371 break
8372 fi
8373 done
8374 if test -z "$haveit"; then
8375 ltrpathdirs="$ltrpathdirs $found_dir"
8376 fi
8377 if test "$hardcode_direct" = yes; then
8378 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8379 else
8380 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8381 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8382 haveit=
8383 for x in $rpathdirs; do
8384 if test "X$x" = "X$found_dir"; then
8385 haveit=yes
8386 break
8387 fi
8388 done
8389 if test -z "$haveit"; then
8390 rpathdirs="$rpathdirs $found_dir"
8391 fi
8392 else
8393 haveit=
8394 for x in $LDFLAGS $LIBICONV; do
8395
8396 acl_save_prefix="$prefix"
8397 prefix="$acl_final_prefix"
8398 acl_save_exec_prefix="$exec_prefix"
8399 exec_prefix="$acl_final_exec_prefix"
8400 eval x=\"$x\"
8401 exec_prefix="$acl_save_exec_prefix"
8402 prefix="$acl_save_prefix"
8403
8404 if test "X$x" = "X-L$found_dir"; then
8405 haveit=yes
8406 break
8407 fi
8408 done
8409 if test -z "$haveit"; then
8410 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8411 fi
8412 if test "$hardcode_minus_L" != no; then
8413 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8414 else
8415 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8416 fi
8417 fi
8418 fi
8419 fi
8420 else
8421 if test "X$found_a" != "X"; then
8422 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8423 else
8424 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8425 fi
8426 fi
8427 additional_includedir=
8428 case "$found_dir" in
8429 */lib | */lib/)
8430 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8431 additional_includedir="$basedir/include"
8432 ;;
8433 esac
8434 if test "X$additional_includedir" != "X"; then
8435 if test "X$additional_includedir" != "X/usr/include"; then
8436 haveit=
8437 if test "X$additional_includedir" = "X/usr/local/include"; then
8438 if test -n "$GCC"; then
8439 case $host_os in
8440 linux*) haveit=yes;;
8441 esac
8442 fi
8443 fi
8444 if test -z "$haveit"; then
8445 for x in $CPPFLAGS $INCICONV; do
8446
8447 acl_save_prefix="$prefix"
8448 prefix="$acl_final_prefix"
8449 acl_save_exec_prefix="$exec_prefix"
8450 exec_prefix="$acl_final_exec_prefix"
8451 eval x=\"$x\"
8452 exec_prefix="$acl_save_exec_prefix"
8453 prefix="$acl_save_prefix"
8454
8455 if test "X$x" = "X-I$additional_includedir"; then
8456 haveit=yes
8457 break
8458 fi
8459 done
8460 if test -z "$haveit"; then
8461 if test -d "$additional_includedir"; then
8462 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8463 fi
8464 fi
8465 fi
8466 fi
8467 fi
8468 if test -n "$found_la"; then
8469 save_libdir="$libdir"
8470 case "$found_la" in
8471 */* | *\\*) . "$found_la" ;;
8472 *) . "./$found_la" ;;
8473 esac
8474 libdir="$save_libdir"
8475 for dep in $dependency_libs; do
8476 case "$dep" in
8477 -L*)
8478 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8479 if test "X$additional_libdir" != "X/usr/lib"; then
8480 haveit=
8481 if test "X$additional_libdir" = "X/usr/local/lib"; then
8482 if test -n "$GCC"; then
8483 case $host_os in
8484 linux*) haveit=yes;;
8485 esac
8486 fi
8487 fi
8488 if test -z "$haveit"; then
8489 haveit=
8490 for x in $LDFLAGS $LIBICONV; do
8491
8492 acl_save_prefix="$prefix"
8493 prefix="$acl_final_prefix"
8494 acl_save_exec_prefix="$exec_prefix"
8495 exec_prefix="$acl_final_exec_prefix"
8496 eval x=\"$x\"
8497 exec_prefix="$acl_save_exec_prefix"
8498 prefix="$acl_save_prefix"
8499
8500 if test "X$x" = "X-L$additional_libdir"; then
8501 haveit=yes
8502 break
8503 fi
8504 done
8505 if test -z "$haveit"; then
8506 if test -d "$additional_libdir"; then
8507 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8508 fi
8509 fi
8510 haveit=
8511 for x in $LDFLAGS $LTLIBICONV; do
8512
8513 acl_save_prefix="$prefix"
8514 prefix="$acl_final_prefix"
8515 acl_save_exec_prefix="$exec_prefix"
8516 exec_prefix="$acl_final_exec_prefix"
8517 eval x=\"$x\"
8518 exec_prefix="$acl_save_exec_prefix"
8519 prefix="$acl_save_prefix"
8520
8521 if test "X$x" = "X-L$additional_libdir"; then
8522 haveit=yes
8523 break
8524 fi
8525 done
8526 if test -z "$haveit"; then
8527 if test -d "$additional_libdir"; then
8528 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8529 fi
8530 fi
8531 fi
8532 fi
8533 ;;
8534 -R*)
8535 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8536 if test "$enable_rpath" != no; then
8537 haveit=
8538 for x in $rpathdirs; do
8539 if test "X$x" = "X$dir"; then
8540 haveit=yes
8541 break
8542 fi
8543 done
8544 if test -z "$haveit"; then
8545 rpathdirs="$rpathdirs $dir"
8546 fi
8547 haveit=
8548 for x in $ltrpathdirs; do
8549 if test "X$x" = "X$dir"; then
8550 haveit=yes
8551 break
8552 fi
8553 done
8554 if test -z "$haveit"; then
8555 ltrpathdirs="$ltrpathdirs $dir"
8556 fi
8557 fi
8558 ;;
8559 -l*)
8560 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8561 ;;
8562 *.la)
8563 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8564 ;;
8565 *)
8566 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8567 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8568 ;;
8569 esac
8570 done
8571 fi
8572 else
8573 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8574 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8575 fi
8576 fi
8577 fi
8578 done
8579 done
8580 if test "X$rpathdirs" != "X"; then
8581 if test -n "$hardcode_libdir_separator"; then
8582 alldirs=
8583 for found_dir in $rpathdirs; do
8584 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8585 done
8586 acl_save_libdir="$libdir"
8587 libdir="$alldirs"
8588 eval flag=\"$hardcode_libdir_flag_spec\"
8589 libdir="$acl_save_libdir"
8590 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8591 else
8592 for found_dir in $rpathdirs; do
8593 acl_save_libdir="$libdir"
8594 libdir="$found_dir"
8595 eval flag=\"$hardcode_libdir_flag_spec\"
8596 libdir="$acl_save_libdir"
8597 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8598 done
8599 fi
8600 fi
8601 if test "X$ltrpathdirs" != "X"; then
8602 for found_dir in $ltrpathdirs; do
8603 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8604 done
8605 fi
8606
8607
8608
8609
8610
6c7a06a3 8611
6c7a06a3 8612
81ecdfbb
RW
8613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8614$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8615if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8616 $as_echo_n "(cached) " >&6
d542061a 8617else
6c7a06a3
TT
8618
8619 am_cv_func_iconv="no, consider installing GNU libiconv"
8620 am_cv_lib_iconv=no
016a3251
DD
8621 am_save_CPPFLAGS="$CPPFLAGS"
8622 CPPFLAGS="$CPPFLAGS $INCICONV"
8623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8624/* end confdefs.h. */
6c7a06a3
TT
8625#include <stdlib.h>
8626#include <iconv.h>
d542061a
UW
8627int
8628main ()
8629{
6c7a06a3 8630iconv_t cd = iconv_open("","");
016a3251
DD
8631 iconv(cd,NULL,NULL,NULL,NULL);
8632 iconv_close(cd);
d542061a
UW
8633 ;
8634 return 0;
8635}
8636_ACEOF
81ecdfbb 8637if ac_fn_c_try_link "$LINENO"; then :
016a3251 8638 am_cv_func_iconv=yes
d542061a 8639fi
81ecdfbb
RW
8640rm -f core conftest.err conftest.$ac_objext \
8641 conftest$ac_exeext conftest.$ac_ext
016a3251 8642 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8643
016a3251
DD
8644 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8645 for _libs in .libs _libs; do
8646 am_save_CPPFLAGS="$CPPFLAGS"
8647 am_save_LIBS="$LIBS"
8648 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8649 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8651/* end confdefs.h. */
6c7a06a3
TT
8652#include <stdlib.h>
8653#include <iconv.h>
d542061a
UW
8654int
8655main ()
8656{
6c7a06a3 8657iconv_t cd = iconv_open("","");
016a3251
DD
8658 iconv(cd,NULL,NULL,NULL,NULL);
8659 iconv_close(cd);
d542061a
UW
8660 ;
8661 return 0;
8662}
8663_ACEOF
81ecdfbb 8664if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8665 INCICONV="-I../libiconv/include"
8666 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8667 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8668 am_cv_lib_iconv=yes
8669 am_cv_func_iconv=yes
d542061a 8670fi
81ecdfbb
RW
8671rm -f core conftest.err conftest.$ac_objext \
8672 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8673 CPPFLAGS="$am_save_CPPFLAGS"
8674 LIBS="$am_save_LIBS"
8675 if test "$am_cv_func_iconv" = "yes"; then
8676 break
8677 fi
8678 done
77f120bf 8679 fi
94ae1714 8680
4edb1e84 8681 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8682 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8683 am_save_LIBS="$LIBS"
5d762de0 8684 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8685 LIBS="$LIBS $LIBICONV"
81ecdfbb 8686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8687/* end confdefs.h. */
6c7a06a3
TT
8688#include <stdlib.h>
8689#include <iconv.h>
bec39cab
AC
8690int
8691main ()
8692{
6c7a06a3
TT
8693iconv_t cd = iconv_open("","");
8694 iconv(cd,NULL,NULL,NULL,NULL);
8695 iconv_close(cd);
bec39cab
AC
8696 ;
8697 return 0;
8698}
8699_ACEOF
81ecdfbb 8700if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8701 am_cv_lib_iconv=yes
6c7a06a3 8702 am_cv_func_iconv=yes
627af7ea 8703fi
81ecdfbb
RW
8704rm -f core conftest.err conftest.$ac_objext \
8705 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8706 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8707 LIBS="$am_save_LIBS"
6c7a06a3
TT
8708 fi
8709
8710fi
81ecdfbb
RW
8711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8712$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8713 if test "$am_cv_func_iconv" = yes; then
8714
8715$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8716
016a3251 8717 fi
fc3b640d 8718 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8719
8720 for element in $INCICONV; do
8721 haveit=
8722 for x in $CPPFLAGS; do
8723
8724 acl_save_prefix="$prefix"
8725 prefix="$acl_final_prefix"
8726 acl_save_exec_prefix="$exec_prefix"
8727 exec_prefix="$acl_final_exec_prefix"
8728 eval x=\"$x\"
8729 exec_prefix="$acl_save_exec_prefix"
8730 prefix="$acl_save_prefix"
8731
8732 if test "X$x" = "X$element"; then
8733 haveit=yes
8734 break
8735 fi
8736 done
8737 if test -z "$haveit"; then
8738 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8739 fi
8740 done
8741
8742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8743$as_echo_n "checking how to link with libiconv... " >&6; }
8744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8745$as_echo "$LIBICONV" >&6; }
94ae1714 8746 else
016a3251
DD
8747 LIBICONV=
8748 LTLIBICONV=
fc3b640d 8749 fi
94ae1714 8750
6c7a06a3 8751
6c7a06a3 8752
016a3251 8753 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8755$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8756 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8757 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8758else
8759
81ecdfbb 8760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8761/* end confdefs.h. */
8762
6c7a06a3
TT
8763#include <stdlib.h>
8764#include <iconv.h>
8765extern
b4e70030 8766#ifdef __cplusplus
6c7a06a3 8767"C"
b4e70030 8768#endif
6c7a06a3
TT
8769#if defined(__STDC__) || defined(__cplusplus)
8770size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8771#else
8772size_t iconv();
8773#endif
8774
b4e70030
JB
8775int
8776main ()
8777{
6c7a06a3 8778
b4e70030
JB
8779 ;
8780 return 0;
8781}
8782_ACEOF
81ecdfbb 8783if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8784 am_cv_proto_iconv_arg1=""
4e8d927d 8785else
81ecdfbb 8786 am_cv_proto_iconv_arg1="const"
b4e70030 8787fi
81ecdfbb 8788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8789 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);"
8790fi
8791
8792 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8794 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8795$as_echo "${ac_t:-
8796 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8797
8798cat >>confdefs.h <<_ACEOF
8799#define ICONV_CONST $am_cv_proto_iconv_arg1
8800_ACEOF
8801
8802 fi
6c7a06a3
TT
8803
8804
478aac75
DE
8805# GDB may fork/exec the iconv program to get the list of supported character
8806# sets. Allow the user to specify where to find it.
8807# There are several factors affecting the choice of option name:
8808# - There is already --with-libiconv-prefix but we can't use it, it specifies
8809# the build-time location of libiconv files.
8810# - The program we need to find is iconv, which comes with glibc. The user
8811# doesn't necessarily have libiconv installed. Therefore naming this
8812# --with-libiconv-foo feels wrong.
8813# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8814# defined to work on directories not files (though it really doesn't know
8815# the difference).
8816# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8817# with --with-libiconv-prefix.
8818# Putting these together is why the option name is --with-iconv-bin.
8819
8820
8821# Check whether --with-iconv-bin was given.
8822if test "${with_iconv_bin+set}" = set; then :
8823 withval=$with_iconv_bin; iconv_bin="${withval}"
8824
8825cat >>confdefs.h <<_ACEOF
8826#define ICONV_BIN "${iconv_bin}"
8827_ACEOF
8828
8829
8830 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8831 if test "x$prefix" = xNONE; then
8832 test_prefix=/usr/local
8833 else
8834 test_prefix=$prefix
8835 fi
8836 else
8837 test_prefix=$exec_prefix
8838 fi
8839 value=0
8840 case ${iconv_bin} in
8841 "${test_prefix}"|"${test_prefix}/"*|\
8842 '${exec_prefix}'|'${exec_prefix}/'*)
8843 value=1
8844 ;;
8845 esac
8846
8847cat >>confdefs.h <<_ACEOF
8848#define ICONV_BIN_RELOCATABLE $value
8849_ACEOF
8850
8851
8852
8853fi
8854
8855
cb01cfba 8856# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8857if test x"$enable_tui" != xno; then
cb01cfba
JB
8858 prefer_curses=yes
8859fi
8860
8861curses_found=no
8862if test x"$prefer_curses" = xyes; then
8863 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8864 # curses library because the latter might not provide all the
8865 # functionality we need. However, this leads to problems on systems
8866 # where the linker searches /usr/local/lib, but the compiler doesn't
8867 # search /usr/local/include, if ncurses is installed in /usr/local. A
8868 # default installation of ncurses on alpha*-dec-osf* will lead to such
8869 # a situation.
81ecdfbb
RW
8870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8871$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8872if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8873 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8874else
8875 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8877/* end confdefs.h. */
8878
81ecdfbb
RW
8879/* Override any GCC internal prototype to avoid an error.
8880 Use char because int might match the return type of a GCC
8881 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8882#ifdef __cplusplus
8883extern "C"
8884#endif
6c7a06a3
TT
8885char waddstr ();
8886int
8887main ()
8888{
81ecdfbb 8889return waddstr ();
6c7a06a3
TT
8890 ;
8891 return 0;
8892}
8893_ACEOF
5007d765 8894for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8895 if test -z "$ac_lib"; then
8896 ac_res="none required"
8897 else
8898 ac_res=-l$ac_lib
8899 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8900 fi
8901 if ac_fn_c_try_link "$LINENO"; then :
8902 ac_cv_search_waddstr=$ac_res
8903fi
8904rm -f core conftest.err conftest.$ac_objext \
8905 conftest$ac_exeext
d0ac1c44 8906 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8907 break
8908fi
8909done
d0ac1c44 8910if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8911
6c7a06a3 8912else
81ecdfbb
RW
8913 ac_cv_search_waddstr=no
8914fi
8915rm conftest.$ac_ext
8916LIBS=$ac_func_search_save_LIBS
8917fi
8918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8919$as_echo "$ac_cv_search_waddstr" >&6; }
8920ac_res=$ac_cv_search_waddstr
8921if test "$ac_res" != no; then :
8922 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8923
8924fi
8925
8926
cb01cfba
JB
8927 if test "$ac_cv_search_waddstr" != no; then
8928 curses_found=yes
8929 fi
8930fi
8931
8932# Check whether we should enable the TUI, but only do so if we really
8933# can.
8934if test x"$enable_tui" != xno; then
0ad6b8ee 8935 if test -d "$srcdir/tui"; then
cb01cfba 8936 if test "$curses_found" != no; then
6c7a06a3
TT
8937 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8938 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8939 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8940 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8941 else
8942 if test x"$enable_tui" = xyes; then
d0ac1c44 8943 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8944 else
81ecdfbb
RW
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8946$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8947 fi
8948 fi
8949 fi
8950fi
8951
8952# Since GDB uses Readline, we need termcap functionality. In many
8953# cases this will be provided by the curses library, but some systems
96fe4562 8954# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8955
8956case $host_os in
8957 cygwin*)
0ad6b8ee 8958 if test -d "$srcdir/libtermcap"; then
6c7a06a3
TT
8959 LIBS="../libtermcap/libtermcap.a $LIBS"
8960 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8961 fi ;;
8962 go32* | *djgpp*)
8963 ac_cv_search_tgetent="none required"
8964 ;;
6c7a06a3
TT
8965esac
8966
8967# These are the libraries checked by Readline.
81ecdfbb
RW
8968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8969$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 8970if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 8971 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8972else
8973 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8975/* end confdefs.h. */
8976
81ecdfbb
RW
8977/* Override any GCC internal prototype to avoid an error.
8978 Use char because int might match the return type of a GCC
8979 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8980#ifdef __cplusplus
8981extern "C"
8982#endif
6c7a06a3
TT
8983char tgetent ();
8984int
8985main ()
8986{
81ecdfbb 8987return tgetent ();
6c7a06a3
TT
8988 ;
8989 return 0;
8990}
8991_ACEOF
2578ecb1 8992for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
8993 if test -z "$ac_lib"; then
8994 ac_res="none required"
8995 else
8996 ac_res=-l$ac_lib
6c7a06a3 8997 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8998 fi
8999 if ac_fn_c_try_link "$LINENO"; then :
9000 ac_cv_search_tgetent=$ac_res
9001fi
9002rm -f core conftest.err conftest.$ac_objext \
9003 conftest$ac_exeext
d0ac1c44 9004 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9005 break
9006fi
9007done
d0ac1c44 9008if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9009
6c7a06a3 9010else
81ecdfbb 9011 ac_cv_search_tgetent=no
6c7a06a3 9012fi
81ecdfbb 9013rm conftest.$ac_ext
6c7a06a3
TT
9014LIBS=$ac_func_search_save_LIBS
9015fi
81ecdfbb
RW
9016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9017$as_echo "$ac_cv_search_tgetent" >&6; }
9018ac_res=$ac_cv_search_tgetent
9019if test "$ac_res" != no; then :
9020 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9021
06825bd1
MK
9022fi
9023
06825bd1 9024
bec39cab 9025if test "$ac_cv_search_tgetent" = no; then
7a85168d 9026 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9027fi
9028
3841debe 9029
81ecdfbb
RW
9030# Check whether --with-system-readline was given.
9031if test "${with_system_readline+set}" = set; then :
9032 withval=$with_system_readline;
9033fi
6a30b0a5 9034
6a30b0a5
AS
9035
9036if test "$with_system_readline" = yes; then
86c6b807
TT
9037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9038$as_echo_n "checking whether system readline is new enough... " >&6; }
9039if ${gdb_cv_readline_ok+:} false; then :
9040 $as_echo_n "(cached) " >&6
9041else
9042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9043/* end confdefs.h. */
9044#include <stdio.h>
9045#include <readline/readline.h>
9046int
9047main ()
9048{
9049#if RL_VERSION_MAJOR < 7
9050# error "readline version 7 required"
9051#endif
9052 ;
9053 return 0;
9054}
9055_ACEOF
9056if ac_fn_c_try_compile "$LINENO"; then :
9057 gdb_cv_readline_ok=yes
9058else
9059 gdb_cv_readline_ok=no
9060fi
9061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9062fi
9063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9064$as_echo "$gdb_cv_readline_ok" >&6; }
9065 if test "$gdb_cv_readline_ok" != yes; then
9066 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9067 fi
9068
6a30b0a5
AS
9069 READLINE=-lreadline
9070 READLINE_DEPS=
9071 READLINE_CFLAGS=
39037522 9072 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9073else
9074 READLINE='$(READLINE_DIR)/libreadline.a'
9075 READLINE_DEPS='$(READLINE)'
9076 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9077 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9078fi
9079
9080
9081
9082
9083
f997c383
SD
9084# Generate jit-reader.h
9085
9086# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9087TARGET_PTR=
9088
9089# The cast to long int works around a bug in the HP C Compiler
9090# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9091# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9092# This bug is HP SR number 8606223364.
9093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9094$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9095if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9096 $as_echo_n "(cached) " >&6
9097else
9098 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9099
9100else
9101 if test "$ac_cv_type_unsigned_long_long" = yes; then
9102 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9103$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9104as_fn_error 77 "cannot compute sizeof (unsigned long long)
9105See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9106 else
9107 ac_cv_sizeof_unsigned_long_long=0
9108 fi
9109fi
9110
9111fi
9112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9113$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9114
9115
9116
9117cat >>confdefs.h <<_ACEOF
9118#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9119_ACEOF
9120
9121
9122# The cast to long int works around a bug in the HP C Compiler
9123# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9124# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9125# This bug is HP SR number 8606223364.
9126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9127$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9128if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9129 $as_echo_n "(cached) " >&6
9130else
9131 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9132
9133else
9134 if test "$ac_cv_type_unsigned_long" = yes; then
9135 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9137as_fn_error 77 "cannot compute sizeof (unsigned long)
9138See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9139 else
9140 ac_cv_sizeof_unsigned_long=0
9141 fi
9142fi
9143
9144fi
9145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9146$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9147
9148
9149
9150cat >>confdefs.h <<_ACEOF
9151#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9152_ACEOF
9153
9154
9155# The cast to long int works around a bug in the HP C Compiler
9156# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9157# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9158# This bug is HP SR number 8606223364.
9159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9160$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9161if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9162 $as_echo_n "(cached) " >&6
9163else
9164 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9165
9166else
9167 if test "$ac_cv_type_unsigned___int128" = yes; then
9168 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9169$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9170as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9171See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9172 else
9173 ac_cv_sizeof_unsigned___int128=0
9174 fi
9175fi
9176
9177fi
9178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9179$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9180
9181
9182
9183cat >>confdefs.h <<_ACEOF
9184#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9185_ACEOF
9186
9187
9188
9189if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9190 TARGET_PTR="unsigned long"
9191elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9192 TARGET_PTR="unsigned long long"
9193elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9194 TARGET_PTR="unsigned __int128"
9195else
9196 TARGET_PTR="unsigned long"
9197fi
9198
9199
9200ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9201
9202
a2d08b9e
SD
9203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9204$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9205if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9206 $as_echo_n "(cached) " >&6
9207else
9208 ac_func_search_save_LIBS=$LIBS
9209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9210/* end confdefs.h. */
9211
9212/* Override any GCC internal prototype to avoid an error.
9213 Use char because int might match the return type of a GCC
9214 builtin and then its argument prototype would still apply. */
9215#ifdef __cplusplus
9216extern "C"
9217#endif
9218char dlopen ();
9219int
9220main ()
9221{
9222return dlopen ();
9223 ;
9224 return 0;
9225}
9226_ACEOF
9227for ac_lib in '' dl; do
9228 if test -z "$ac_lib"; then
9229 ac_res="none required"
9230 else
9231 ac_res=-l$ac_lib
9232 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9233 fi
9234 if ac_fn_c_try_link "$LINENO"; then :
9235 ac_cv_search_dlopen=$ac_res
9236fi
9237rm -f core conftest.err conftest.$ac_objext \
9238 conftest$ac_exeext
d0ac1c44 9239 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9240 break
9241fi
9242done
d0ac1c44 9243if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9244
9245else
9246 ac_cv_search_dlopen=no
9247fi
9248rm conftest.$ac_ext
9249LIBS=$ac_func_search_save_LIBS
9250fi
9251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9252$as_echo "$ac_cv_search_dlopen" >&6; }
9253ac_res=$ac_cv_search_dlopen
9254if test "$ac_res" != no; then :
9255 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9256
9257fi
9258
9259
39037522 9260
b8e0a31c
SD
9261
9262# Check whether --with-jit-reader-dir was given.
9263if test "${with_jit_reader_dir+set}" = set; then :
9264 withval=$with_jit_reader_dir;
9265 JIT_READER_DIR=$withval
9266else
9267 JIT_READER_DIR=${libdir}/gdb
9268fi
9269
9270
9271 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9272 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9273 ac_define_dir=`eval echo $JIT_READER_DIR`
9274 ac_define_dir=`eval echo $ac_define_dir`
9275
9276cat >>confdefs.h <<_ACEOF
9277#define JIT_READER_DIR "$ac_define_dir"
9278_ACEOF
9279
9280
9281
9282
9283 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9284 if test "x$prefix" = xNONE; then
9285 test_prefix=/usr/local
9286 else
9287 test_prefix=$prefix
9288 fi
9289 else
9290 test_prefix=$exec_prefix
9291 fi
9292 value=0
9293 case ${ac_define_dir} in
9294 "${test_prefix}"|"${test_prefix}/"*|\
9295 '${exec_prefix}'|'${exec_prefix}/'*)
9296 value=1
9297 ;;
9298 esac
9299
9300cat >>confdefs.h <<_ACEOF
9301#define JIT_READER_DIR_RELOCATABLE $value
9302_ACEOF
9303
9304
9305
9306
9307
81ecdfbb
RW
9308# Check whether --with-expat was given.
9309if test "${with_expat+set}" = set; then :
9310 withval=$with_expat;
5c39566f
DJ
9311else
9312 with_expat=auto
81ecdfbb
RW
9313fi
9314
9315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9316$as_echo_n "checking whether to use expat... " >&6; }
9317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9318$as_echo "$with_expat" >&6; }
5c39566f
DJ
9319
9320if test "${with_expat}" = no; then
81ecdfbb
RW
9321 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9322$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9323 HAVE_LIBEXPAT=no
9324else
9325
3841debe
DJ
9326
9327
9328
9329
9330
9331
9332
9333 use_additional=yes
9334
9335 acl_save_prefix="$prefix"
9336 prefix="$acl_final_prefix"
9337 acl_save_exec_prefix="$exec_prefix"
9338 exec_prefix="$acl_final_exec_prefix"
9339
9340 eval additional_includedir=\"$includedir\"
9341 eval additional_libdir=\"$libdir\"
9342
9343 exec_prefix="$acl_save_exec_prefix"
9344 prefix="$acl_save_prefix"
9345
9346
81ecdfbb
RW
9347# Check whether --with-libexpat-prefix was given.
9348if test "${with_libexpat_prefix+set}" = set; then :
9349 withval=$with_libexpat_prefix;
3841debe
DJ
9350 if test "X$withval" = "Xno"; then
9351 use_additional=no
9352 else
9353 if test "X$withval" = "X"; then
9354
9355 acl_save_prefix="$prefix"
9356 prefix="$acl_final_prefix"
9357 acl_save_exec_prefix="$exec_prefix"
9358 exec_prefix="$acl_final_exec_prefix"
9359
9360 eval additional_includedir=\"$includedir\"
9361 eval additional_libdir=\"$libdir\"
9362
9363 exec_prefix="$acl_save_exec_prefix"
9364 prefix="$acl_save_prefix"
9365
9366 else
9367 additional_includedir="$withval/include"
9368 additional_libdir="$withval/lib"
9369 fi
9370 fi
9371
81ecdfbb
RW
9372fi
9373
3841debe
DJ
9374 LIBEXPAT=
9375 LTLIBEXPAT=
9376 INCEXPAT=
9377 rpathdirs=
9378 ltrpathdirs=
9379 names_already_handled=
9380 names_next_round='expat '
9381 while test -n "$names_next_round"; do
9382 names_this_round="$names_next_round"
9383 names_next_round=
9384 for name in $names_this_round; do
9385 already_handled=
9386 for n in $names_already_handled; do
9387 if test "$n" = "$name"; then
9388 already_handled=yes
9389 break
9390 fi
9391 done
9392 if test -z "$already_handled"; then
9393 names_already_handled="$names_already_handled $name"
9394 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9395 eval value=\"\$HAVE_LIB$uppername\"
9396 if test -n "$value"; then
9397 if test "$value" = yes; then
9398 eval value=\"\$LIB$uppername\"
9399 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9400 eval value=\"\$LTLIB$uppername\"
9401 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9402 else
9403 :
9404 fi
9405 else
9406 found_dir=
9407 found_la=
9408 found_so=
9409 found_a=
9410 if test $use_additional = yes; then
9411 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9412 found_dir="$additional_libdir"
9413 found_so="$additional_libdir/lib$name.$shlibext"
9414 if test -f "$additional_libdir/lib$name.la"; then
9415 found_la="$additional_libdir/lib$name.la"
9416 fi
9417 else
9418 if test -f "$additional_libdir/lib$name.$libext"; then
9419 found_dir="$additional_libdir"
9420 found_a="$additional_libdir/lib$name.$libext"
9421 if test -f "$additional_libdir/lib$name.la"; then
9422 found_la="$additional_libdir/lib$name.la"
9423 fi
9424 fi
9425 fi
9426 fi
9427 if test "X$found_dir" = "X"; then
9428 for x in $LDFLAGS $LTLIBEXPAT; do
9429
9430 acl_save_prefix="$prefix"
9431 prefix="$acl_final_prefix"
9432 acl_save_exec_prefix="$exec_prefix"
9433 exec_prefix="$acl_final_exec_prefix"
9434 eval x=\"$x\"
9435 exec_prefix="$acl_save_exec_prefix"
9436 prefix="$acl_save_prefix"
9437
9438 case "$x" in
9439 -L*)
9440 dir=`echo "X$x" | sed -e 's/^X-L//'`
9441 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9442 found_dir="$dir"
9443 found_so="$dir/lib$name.$shlibext"
9444 if test -f "$dir/lib$name.la"; then
9445 found_la="$dir/lib$name.la"
9446 fi
9447 else
9448 if test -f "$dir/lib$name.$libext"; then
9449 found_dir="$dir"
9450 found_a="$dir/lib$name.$libext"
9451 if test -f "$dir/lib$name.la"; then
9452 found_la="$dir/lib$name.la"
9453 fi
9454 fi
9455 fi
9456 ;;
9457 esac
9458 if test "X$found_dir" != "X"; then
9459 break
9460 fi
9461 done
9462 fi
9463 if test "X$found_dir" != "X"; then
9464 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9465 if test "X$found_so" != "X"; then
9466 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9467 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9468 else
9469 haveit=
9470 for x in $ltrpathdirs; do
9471 if test "X$x" = "X$found_dir"; then
9472 haveit=yes
9473 break
9474 fi
9475 done
9476 if test -z "$haveit"; then
9477 ltrpathdirs="$ltrpathdirs $found_dir"
9478 fi
9479 if test "$hardcode_direct" = yes; then
9480 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9481 else
9482 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9483 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9484 haveit=
9485 for x in $rpathdirs; do
9486 if test "X$x" = "X$found_dir"; then
9487 haveit=yes
9488 break
9489 fi
9490 done
9491 if test -z "$haveit"; then
9492 rpathdirs="$rpathdirs $found_dir"
9493 fi
9494 else
9495 haveit=
9496 for x in $LDFLAGS $LIBEXPAT; do
9497
9498 acl_save_prefix="$prefix"
9499 prefix="$acl_final_prefix"
9500 acl_save_exec_prefix="$exec_prefix"
9501 exec_prefix="$acl_final_exec_prefix"
9502 eval x=\"$x\"
9503 exec_prefix="$acl_save_exec_prefix"
9504 prefix="$acl_save_prefix"
9505
9506 if test "X$x" = "X-L$found_dir"; then
9507 haveit=yes
9508 break
9509 fi
9510 done
9511 if test -z "$haveit"; then
9512 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9513 fi
9514 if test "$hardcode_minus_L" != no; then
9515 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9516 else
9517 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9518 fi
9519 fi
9520 fi
9521 fi
9522 else
9523 if test "X$found_a" != "X"; then
9524 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9525 else
9526 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9527 fi
9528 fi
9529 additional_includedir=
9530 case "$found_dir" in
9531 */lib | */lib/)
9532 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9533 additional_includedir="$basedir/include"
9534 ;;
9535 esac
9536 if test "X$additional_includedir" != "X"; then
9537 if test "X$additional_includedir" != "X/usr/include"; then
9538 haveit=
9539 if test "X$additional_includedir" = "X/usr/local/include"; then
9540 if test -n "$GCC"; then
9541 case $host_os in
9542 linux*) haveit=yes;;
9543 esac
9544 fi
9545 fi
9546 if test -z "$haveit"; then
9547 for x in $CPPFLAGS $INCEXPAT; do
9548
9549 acl_save_prefix="$prefix"
9550 prefix="$acl_final_prefix"
9551 acl_save_exec_prefix="$exec_prefix"
9552 exec_prefix="$acl_final_exec_prefix"
9553 eval x=\"$x\"
9554 exec_prefix="$acl_save_exec_prefix"
9555 prefix="$acl_save_prefix"
9556
9557 if test "X$x" = "X-I$additional_includedir"; then
9558 haveit=yes
9559 break
9560 fi
9561 done
9562 if test -z "$haveit"; then
9563 if test -d "$additional_includedir"; then
9564 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9565 fi
9566 fi
9567 fi
9568 fi
9569 fi
9570 if test -n "$found_la"; then
9571 save_libdir="$libdir"
9572 case "$found_la" in
9573 */* | *\\*) . "$found_la" ;;
9574 *) . "./$found_la" ;;
9575 esac
9576 libdir="$save_libdir"
9577 for dep in $dependency_libs; do
9578 case "$dep" in
9579 -L*)
9580 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9581 if test "X$additional_libdir" != "X/usr/lib"; then
9582 haveit=
9583 if test "X$additional_libdir" = "X/usr/local/lib"; then
9584 if test -n "$GCC"; then
9585 case $host_os in
9586 linux*) haveit=yes;;
9587 esac
9588 fi
9589 fi
9590 if test -z "$haveit"; then
9591 haveit=
9592 for x in $LDFLAGS $LIBEXPAT; do
9593
9594 acl_save_prefix="$prefix"
9595 prefix="$acl_final_prefix"
9596 acl_save_exec_prefix="$exec_prefix"
9597 exec_prefix="$acl_final_exec_prefix"
9598 eval x=\"$x\"
9599 exec_prefix="$acl_save_exec_prefix"
9600 prefix="$acl_save_prefix"
9601
9602 if test "X$x" = "X-L$additional_libdir"; then
9603 haveit=yes
9604 break
9605 fi
9606 done
9607 if test -z "$haveit"; then
9608 if test -d "$additional_libdir"; then
9609 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9610 fi
9611 fi
9612 haveit=
9613 for x in $LDFLAGS $LTLIBEXPAT; do
9614
9615 acl_save_prefix="$prefix"
9616 prefix="$acl_final_prefix"
9617 acl_save_exec_prefix="$exec_prefix"
9618 exec_prefix="$acl_final_exec_prefix"
9619 eval x=\"$x\"
9620 exec_prefix="$acl_save_exec_prefix"
9621 prefix="$acl_save_prefix"
9622
9623 if test "X$x" = "X-L$additional_libdir"; then
9624 haveit=yes
9625 break
9626 fi
9627 done
9628 if test -z "$haveit"; then
9629 if test -d "$additional_libdir"; then
9630 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9631 fi
9632 fi
9633 fi
9634 fi
9635 ;;
9636 -R*)
9637 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9638 if test "$enable_rpath" != no; then
9639 haveit=
9640 for x in $rpathdirs; do
9641 if test "X$x" = "X$dir"; then
9642 haveit=yes
9643 break
9644 fi
9645 done
9646 if test -z "$haveit"; then
9647 rpathdirs="$rpathdirs $dir"
9648 fi
9649 haveit=
9650 for x in $ltrpathdirs; do
9651 if test "X$x" = "X$dir"; then
9652 haveit=yes
9653 break
9654 fi
9655 done
9656 if test -z "$haveit"; then
9657 ltrpathdirs="$ltrpathdirs $dir"
9658 fi
9659 fi
9660 ;;
9661 -l*)
9662 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9663 ;;
9664 *.la)
9665 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9666 ;;
9667 *)
9668 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9669 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9670 ;;
81ecdfbb
RW
9671 esac
9672 done
9673 fi
9674 else
9675 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9676 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9677 fi
9678 fi
9679 fi
9680 done
9681 done
9682 if test "X$rpathdirs" != "X"; then
9683 if test -n "$hardcode_libdir_separator"; then
9684 alldirs=
9685 for found_dir in $rpathdirs; do
9686 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9687 done
9688 acl_save_libdir="$libdir"
9689 libdir="$alldirs"
9690 eval flag=\"$hardcode_libdir_flag_spec\"
9691 libdir="$acl_save_libdir"
9692 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9693 else
9694 for found_dir in $rpathdirs; do
9695 acl_save_libdir="$libdir"
9696 libdir="$found_dir"
9697 eval flag=\"$hardcode_libdir_flag_spec\"
9698 libdir="$acl_save_libdir"
9699 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9700 done
9701 fi
9702 fi
9703 if test "X$ltrpathdirs" != "X"; then
9704 for found_dir in $ltrpathdirs; do
9705 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9706 done
9707 fi
a9322a30
TT
9708
9709
81ecdfbb 9710 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9711
81ecdfbb
RW
9712 for element in $INCEXPAT; do
9713 haveit=
9714 for x in $CPPFLAGS; do
a9322a30 9715
81ecdfbb
RW
9716 acl_save_prefix="$prefix"
9717 prefix="$acl_final_prefix"
9718 acl_save_exec_prefix="$exec_prefix"
9719 exec_prefix="$acl_final_exec_prefix"
9720 eval x=\"$x\"
9721 exec_prefix="$acl_save_exec_prefix"
9722 prefix="$acl_save_prefix"
a8111142 9723
81ecdfbb
RW
9724 if test "X$x" = "X$element"; then
9725 haveit=yes
9726 break
9727 fi
9728 done
9729 if test -z "$haveit"; then
9730 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9731 fi
9732 done
a9322a30
TT
9733
9734
81ecdfbb
RW
9735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9736$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9737if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9738 $as_echo_n "(cached) " >&6
bec39cab 9739else
bec39cab 9740
81ecdfbb
RW
9741 ac_save_LIBS="$LIBS"
9742 LIBS="$LIBS $LIBEXPAT"
9743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9744/* end confdefs.h. */
81ecdfbb
RW
9745#include "expat.h"
9746int
9747main ()
9748{
9749XML_Parser p = XML_ParserCreate (0);
9750 ;
9751 return 0;
9752}
bec39cab 9753_ACEOF
81ecdfbb
RW
9754if ac_fn_c_try_link "$LINENO"; then :
9755 ac_cv_libexpat=yes
c906108c 9756else
81ecdfbb 9757 ac_cv_libexpat=no
bec39cab 9758fi
81ecdfbb
RW
9759rm -f core conftest.err conftest.$ac_objext \
9760 conftest$ac_exeext conftest.$ac_ext
9761 LIBS="$ac_save_LIBS"
c906108c 9762
95ca63c4 9763fi
81ecdfbb
RW
9764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9765$as_echo "$ac_cv_libexpat" >&6; }
9766 if test "$ac_cv_libexpat" = yes; then
9767 HAVE_LIBEXPAT=yes
bec39cab 9768
81ecdfbb 9769$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9770
81ecdfbb
RW
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9772$as_echo_n "checking how to link with libexpat... " >&6; }
9773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9774$as_echo "$LIBEXPAT" >&6; }
9775 else
9776 HAVE_LIBEXPAT=no
9777 CPPFLAGS="$ac_save_CPPFLAGS"
9778 LIBEXPAT=
9779 LTLIBEXPAT=
9780 fi
95ca63c4
CF
9781
9782
9783
7cb9022a
MK
9784
9785
bec39cab 9786
81ecdfbb
RW
9787 if test "$HAVE_LIBEXPAT" != yes; then
9788 if test "$with_expat" = yes; then
d0ac1c44 9789 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9790 else
9791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9792$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9793 fi
9794 else
9795 save_LIBS=$LIBS
9796 LIBS="$LIBS $LIBEXPAT"
9797 for ac_func in XML_StopParser
9798do :
9799 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9800if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9801 cat >>confdefs.h <<_ACEOF
81ecdfbb 9802#define HAVE_XML_STOPPARSER 1
bec39cab 9803_ACEOF
95ca63c4 9804
bec39cab 9805fi
bec39cab 9806done
95ca63c4 9807
81ecdfbb
RW
9808 LIBS=$save_LIBS
9809 fi
a9322a30
TT
9810fi
9811
2400729e
UW
9812
9813# Check whether --with-mpfr was given.
9814if test "${with_mpfr+set}" = set; then :
9815 withval=$with_mpfr;
9816else
9817 with_mpfr=auto
9818fi
9819
9820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9821$as_echo_n "checking whether to use MPFR... " >&6; }
9822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9823$as_echo "$with_mpfr" >&6; }
9824
9825if test "${with_mpfr}" = no; then
9826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9827$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9828 HAVE_LIBMPFR=no
9829else
9830
9831
9832
9833
9834
9835
9836
9837
9838 use_additional=yes
9839
9840 acl_save_prefix="$prefix"
9841 prefix="$acl_final_prefix"
9842 acl_save_exec_prefix="$exec_prefix"
9843 exec_prefix="$acl_final_exec_prefix"
9844
9845 eval additional_includedir=\"$includedir\"
9846 eval additional_libdir=\"$libdir\"
9847
9848 exec_prefix="$acl_save_exec_prefix"
9849 prefix="$acl_save_prefix"
9850
9851
9852# Check whether --with-libmpfr-prefix was given.
9853if test "${with_libmpfr_prefix+set}" = set; then :
9854 withval=$with_libmpfr_prefix;
9855 if test "X$withval" = "Xno"; then
9856 use_additional=no
9857 else
9858 if test "X$withval" = "X"; then
9859
9860 acl_save_prefix="$prefix"
9861 prefix="$acl_final_prefix"
9862 acl_save_exec_prefix="$exec_prefix"
9863 exec_prefix="$acl_final_exec_prefix"
9864
9865 eval additional_includedir=\"$includedir\"
9866 eval additional_libdir=\"$libdir\"
9867
9868 exec_prefix="$acl_save_exec_prefix"
9869 prefix="$acl_save_prefix"
9870
9871 else
9872 additional_includedir="$withval/include"
9873 additional_libdir="$withval/lib"
9874 fi
9875 fi
9876
9877fi
9878
9879 LIBMPFR=
9880 LTLIBMPFR=
9881 INCMPFR=
9882 rpathdirs=
9883 ltrpathdirs=
9884 names_already_handled=
da658607 9885 names_next_round='mpfr gmp'
2400729e
UW
9886 while test -n "$names_next_round"; do
9887 names_this_round="$names_next_round"
9888 names_next_round=
9889 for name in $names_this_round; do
9890 already_handled=
9891 for n in $names_already_handled; do
9892 if test "$n" = "$name"; then
9893 already_handled=yes
9894 break
9895 fi
9896 done
9897 if test -z "$already_handled"; then
9898 names_already_handled="$names_already_handled $name"
9899 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9900 eval value=\"\$HAVE_LIB$uppername\"
9901 if test -n "$value"; then
9902 if test "$value" = yes; then
9903 eval value=\"\$LIB$uppername\"
9904 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9905 eval value=\"\$LTLIB$uppername\"
9906 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9907 else
9908 :
9909 fi
9910 else
9911 found_dir=
9912 found_la=
9913 found_so=
9914 found_a=
9915 if test $use_additional = yes; then
9916 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9917 found_dir="$additional_libdir"
9918 found_so="$additional_libdir/lib$name.$shlibext"
9919 if test -f "$additional_libdir/lib$name.la"; then
9920 found_la="$additional_libdir/lib$name.la"
9921 fi
9922 else
9923 if test -f "$additional_libdir/lib$name.$libext"; then
9924 found_dir="$additional_libdir"
9925 found_a="$additional_libdir/lib$name.$libext"
9926 if test -f "$additional_libdir/lib$name.la"; then
9927 found_la="$additional_libdir/lib$name.la"
9928 fi
9929 fi
9930 fi
9931 fi
9932 if test "X$found_dir" = "X"; then
9933 for x in $LDFLAGS $LTLIBMPFR; do
9934
9935 acl_save_prefix="$prefix"
9936 prefix="$acl_final_prefix"
9937 acl_save_exec_prefix="$exec_prefix"
9938 exec_prefix="$acl_final_exec_prefix"
9939 eval x=\"$x\"
9940 exec_prefix="$acl_save_exec_prefix"
9941 prefix="$acl_save_prefix"
9942
9943 case "$x" in
9944 -L*)
9945 dir=`echo "X$x" | sed -e 's/^X-L//'`
9946 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9947 found_dir="$dir"
9948 found_so="$dir/lib$name.$shlibext"
9949 if test -f "$dir/lib$name.la"; then
9950 found_la="$dir/lib$name.la"
9951 fi
9952 else
9953 if test -f "$dir/lib$name.$libext"; then
9954 found_dir="$dir"
9955 found_a="$dir/lib$name.$libext"
9956 if test -f "$dir/lib$name.la"; then
9957 found_la="$dir/lib$name.la"
9958 fi
9959 fi
9960 fi
9961 ;;
9962 esac
9963 if test "X$found_dir" != "X"; then
9964 break
9965 fi
9966 done
9967 fi
9968 if test "X$found_dir" != "X"; then
9969 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9970 if test "X$found_so" != "X"; then
9971 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9972 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9973 else
9974 haveit=
9975 for x in $ltrpathdirs; do
9976 if test "X$x" = "X$found_dir"; then
9977 haveit=yes
9978 break
9979 fi
9980 done
9981 if test -z "$haveit"; then
9982 ltrpathdirs="$ltrpathdirs $found_dir"
9983 fi
9984 if test "$hardcode_direct" = yes; then
9985 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9986 else
9987 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9988 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9989 haveit=
9990 for x in $rpathdirs; do
9991 if test "X$x" = "X$found_dir"; then
9992 haveit=yes
9993 break
9994 fi
9995 done
9996 if test -z "$haveit"; then
9997 rpathdirs="$rpathdirs $found_dir"
9998 fi
9999 else
10000 haveit=
10001 for x in $LDFLAGS $LIBMPFR; do
10002
10003 acl_save_prefix="$prefix"
10004 prefix="$acl_final_prefix"
10005 acl_save_exec_prefix="$exec_prefix"
10006 exec_prefix="$acl_final_exec_prefix"
10007 eval x=\"$x\"
10008 exec_prefix="$acl_save_exec_prefix"
10009 prefix="$acl_save_prefix"
10010
10011 if test "X$x" = "X-L$found_dir"; then
10012 haveit=yes
10013 break
10014 fi
10015 done
10016 if test -z "$haveit"; then
10017 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10018 fi
10019 if test "$hardcode_minus_L" != no; then
10020 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10021 else
10022 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10023 fi
10024 fi
10025 fi
10026 fi
10027 else
10028 if test "X$found_a" != "X"; then
10029 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10030 else
10031 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10032 fi
10033 fi
10034 additional_includedir=
10035 case "$found_dir" in
10036 */lib | */lib/)
10037 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10038 additional_includedir="$basedir/include"
10039 ;;
10040 esac
10041 if test "X$additional_includedir" != "X"; then
10042 if test "X$additional_includedir" != "X/usr/include"; then
10043 haveit=
10044 if test "X$additional_includedir" = "X/usr/local/include"; then
10045 if test -n "$GCC"; then
10046 case $host_os in
10047 linux*) haveit=yes;;
10048 esac
10049 fi
10050 fi
10051 if test -z "$haveit"; then
10052 for x in $CPPFLAGS $INCMPFR; do
10053
10054 acl_save_prefix="$prefix"
10055 prefix="$acl_final_prefix"
10056 acl_save_exec_prefix="$exec_prefix"
10057 exec_prefix="$acl_final_exec_prefix"
10058 eval x=\"$x\"
10059 exec_prefix="$acl_save_exec_prefix"
10060 prefix="$acl_save_prefix"
10061
10062 if test "X$x" = "X-I$additional_includedir"; then
10063 haveit=yes
10064 break
10065 fi
10066 done
10067 if test -z "$haveit"; then
10068 if test -d "$additional_includedir"; then
10069 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10070 fi
10071 fi
10072 fi
10073 fi
10074 fi
10075 if test -n "$found_la"; then
10076 save_libdir="$libdir"
10077 case "$found_la" in
10078 */* | *\\*) . "$found_la" ;;
10079 *) . "./$found_la" ;;
10080 esac
10081 libdir="$save_libdir"
10082 for dep in $dependency_libs; do
10083 case "$dep" in
10084 -L*)
10085 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10086 if test "X$additional_libdir" != "X/usr/lib"; then
10087 haveit=
10088 if test "X$additional_libdir" = "X/usr/local/lib"; then
10089 if test -n "$GCC"; then
10090 case $host_os in
10091 linux*) haveit=yes;;
10092 esac
10093 fi
10094 fi
10095 if test -z "$haveit"; then
10096 haveit=
10097 for x in $LDFLAGS $LIBMPFR; do
10098
10099 acl_save_prefix="$prefix"
10100 prefix="$acl_final_prefix"
10101 acl_save_exec_prefix="$exec_prefix"
10102 exec_prefix="$acl_final_exec_prefix"
10103 eval x=\"$x\"
10104 exec_prefix="$acl_save_exec_prefix"
10105 prefix="$acl_save_prefix"
10106
10107 if test "X$x" = "X-L$additional_libdir"; then
10108 haveit=yes
10109 break
10110 fi
10111 done
10112 if test -z "$haveit"; then
10113 if test -d "$additional_libdir"; then
10114 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10115 fi
10116 fi
10117 haveit=
10118 for x in $LDFLAGS $LTLIBMPFR; do
10119
10120 acl_save_prefix="$prefix"
10121 prefix="$acl_final_prefix"
10122 acl_save_exec_prefix="$exec_prefix"
10123 exec_prefix="$acl_final_exec_prefix"
10124 eval x=\"$x\"
10125 exec_prefix="$acl_save_exec_prefix"
10126 prefix="$acl_save_prefix"
10127
10128 if test "X$x" = "X-L$additional_libdir"; then
10129 haveit=yes
10130 break
10131 fi
10132 done
10133 if test -z "$haveit"; then
10134 if test -d "$additional_libdir"; then
10135 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10136 fi
10137 fi
10138 fi
10139 fi
10140 ;;
10141 -R*)
10142 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10143 if test "$enable_rpath" != no; then
10144 haveit=
10145 for x in $rpathdirs; do
10146 if test "X$x" = "X$dir"; then
10147 haveit=yes
10148 break
10149 fi
10150 done
10151 if test -z "$haveit"; then
10152 rpathdirs="$rpathdirs $dir"
10153 fi
10154 haveit=
10155 for x in $ltrpathdirs; do
10156 if test "X$x" = "X$dir"; then
10157 haveit=yes
10158 break
10159 fi
10160 done
10161 if test -z "$haveit"; then
10162 ltrpathdirs="$ltrpathdirs $dir"
10163 fi
10164 fi
10165 ;;
10166 -l*)
10167 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10168 ;;
10169 *.la)
10170 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10171 ;;
10172 *)
10173 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10174 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10175 ;;
10176 esac
10177 done
10178 fi
10179 else
10180 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10181 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10182 fi
10183 fi
10184 fi
10185 done
10186 done
10187 if test "X$rpathdirs" != "X"; then
10188 if test -n "$hardcode_libdir_separator"; then
10189 alldirs=
10190 for found_dir in $rpathdirs; do
10191 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10192 done
10193 acl_save_libdir="$libdir"
10194 libdir="$alldirs"
10195 eval flag=\"$hardcode_libdir_flag_spec\"
10196 libdir="$acl_save_libdir"
10197 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10198 else
10199 for found_dir in $rpathdirs; do
10200 acl_save_libdir="$libdir"
10201 libdir="$found_dir"
10202 eval flag=\"$hardcode_libdir_flag_spec\"
10203 libdir="$acl_save_libdir"
10204 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10205 done
10206 fi
10207 fi
10208 if test "X$ltrpathdirs" != "X"; then
10209 for found_dir in $ltrpathdirs; do
10210 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10211 done
10212 fi
10213
10214
10215 ac_save_CPPFLAGS="$CPPFLAGS"
10216
10217 for element in $INCMPFR; do
10218 haveit=
10219 for x in $CPPFLAGS; do
10220
10221 acl_save_prefix="$prefix"
10222 prefix="$acl_final_prefix"
10223 acl_save_exec_prefix="$exec_prefix"
10224 exec_prefix="$acl_final_exec_prefix"
10225 eval x=\"$x\"
10226 exec_prefix="$acl_save_exec_prefix"
10227 prefix="$acl_save_prefix"
10228
10229 if test "X$x" = "X$element"; then
10230 haveit=yes
10231 break
10232 fi
10233 done
10234 if test -z "$haveit"; then
10235 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10236 fi
10237 done
10238
10239
10240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10241$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10242if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10243 $as_echo_n "(cached) " >&6
10244else
10245
10246 ac_save_LIBS="$LIBS"
10247 LIBS="$LIBS $LIBMPFR"
10248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10249/* end confdefs.h. */
10250#include <mpfr.h>
10251int
10252main ()
10253{
10254mpfr_exp_t exp; mpfr_t x;
10255 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10256 ;
10257 return 0;
10258}
10259_ACEOF
10260if ac_fn_c_try_link "$LINENO"; then :
10261 ac_cv_libmpfr=yes
10262else
10263 ac_cv_libmpfr=no
10264fi
10265rm -f core conftest.err conftest.$ac_objext \
10266 conftest$ac_exeext conftest.$ac_ext
10267 LIBS="$ac_save_LIBS"
10268
10269fi
10270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10271$as_echo "$ac_cv_libmpfr" >&6; }
10272 if test "$ac_cv_libmpfr" = yes; then
10273 HAVE_LIBMPFR=yes
10274
10275$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10276
10277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10278$as_echo_n "checking how to link with libmpfr... " >&6; }
10279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10280$as_echo "$LIBMPFR" >&6; }
10281 else
10282 HAVE_LIBMPFR=no
10283 CPPFLAGS="$ac_save_CPPFLAGS"
10284 LIBMPFR=
10285 LTLIBMPFR=
10286 fi
10287
10288
10289
10290
10291
10292
10293 if test "$HAVE_LIBMPFR" != yes; then
10294 if test "$with_mpfr" = yes; then
d0ac1c44 10295 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10296 else
10297 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10298$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10299 fi
10300 fi
10301fi
10302
d344e670
DE
10303# --------------------- #
10304# Check for libpython. #
10305# --------------------- #
10306
a9322a30 10307
a9322a30
TT
10308
10309
ec685c5e 10310
0c4a4063 10311
81ecdfbb
RW
10312# Check whether --with-python was given.
10313if test "${with_python+set}" = set; then :
10314 withval=$with_python;
bec39cab 10315else
81ecdfbb 10316 with_python=auto
bec39cab 10317fi
bec39cab 10318
81ecdfbb
RW
10319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10320$as_echo_n "checking whether to use python... " >&6; }
10321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10322$as_echo "$with_python" >&6; }
9a156167 10323
81ecdfbb
RW
10324if test "${with_python}" = no; then
10325 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10326$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10327 have_libpython=no
bec39cab 10328else
81ecdfbb 10329 case "${with_python}" in
8c85a4e2 10330 [\\/]* | ?:[\\/]*)
0ad6b8ee 10331 if test -d "${with_python}"; then
ec685c5e 10332 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10333 python_prog="${with_python}/bin/python"
0c4a4063 10334 python_prefix=
9c4ea6c5
JB
10335 # If python does not exit ${with_python}/bin, then try in
10336 # ${with_python}. On Windows/MinGW, this is where the Python
10337 # executable is.
10338 if test ! -x "${python_prog}"; then
10339 python_prog="${with_python}/python"
10340 python_prefix=
10341 fi
e7a30f46 10342 if test ! -x "${python_prog}"; then
ec685c5e
DE
10343 # Fall back to gdb 7.0/7.1 behaviour.
10344 python_prog=missing
0c4a4063 10345 python_prefix=${with_python}
ec685c5e 10346 fi
e7a30f46 10347 elif test -x "${with_python}"; then
ec685c5e
DE
10348 # While we can't run python compiled for $host (unless host == build),
10349 # the user could write a script that provides the needed information,
10350 # so we support that.
ec685c5e 10351 python_prog=${with_python}
0c4a4063 10352 python_prefix=
ec685c5e 10353 else
d0ac1c44 10354 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10355 fi
81ecdfbb 10356 ;;
ec685c5e
DE
10357 */*)
10358 # Disallow --with-python=foo/bar.
d0ac1c44 10359 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10360 ;;
ec685c5e
DE
10361 *)
10362 # The user has either specified auto, yes, or the name of the python
10363 # program assumed to be in $PATH.
10364 python_prefix=
10365 case "${with_python}" in
10366 yes | auto)
0ad6b8ee 10367 if test "${build}" = "${host}"; then
ec685c5e
DE
10368 # Extract the first word of "python", so it can be a program name with args.
10369set dummy python; ac_word=$2
10370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10371$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10372if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10373 $as_echo_n "(cached) " >&6
10374else
10375 case $python_prog_path in
10376 [\\/]* | ?:[\\/]*)
10377 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10378 ;;
10379 *)
10380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10381for as_dir in $PATH
10382do
10383 IFS=$as_save_IFS
10384 test -z "$as_dir" && as_dir=.
10385 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10386 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10387 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10388 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10389 break 2
10390 fi
10391done
10392 done
10393IFS=$as_save_IFS
10394
10395 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10396 ;;
10397esac
10398fi
10399python_prog_path=$ac_cv_path_python_prog_path
10400if test -n "$python_prog_path"; then
10401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10402$as_echo "$python_prog_path" >&6; }
10403else
10404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10405$as_echo "no" >&6; }
10406fi
10407
10408
10409 if test "${python_prog_path}" = missing; then
10410 python_prog=missing
10411 else
10412 python_prog=${python_prog_path}
10413 fi
10414 else
10415 # Not much we can do except assume the cross-compiler will find the
10416 # right files.
10417 python_prog=missing
10418 fi
10419 ;;
10420 *)
10421 # While we can't run python compiled for $host (unless host == build),
10422 # the user could write a script that provides the needed information,
10423 # so we support that.
10424 python_prog="${with_python}"
10425 # Extract the first word of "${python_prog}", so it can be a program name with args.
10426set dummy ${python_prog}; ac_word=$2
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10428$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10429if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10430 $as_echo_n "(cached) " >&6
10431else
10432 case $python_prog_path in
10433 [\\/]* | ?:[\\/]*)
10434 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10435 ;;
10436 *)
10437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10438for as_dir in $PATH
10439do
10440 IFS=$as_save_IFS
10441 test -z "$as_dir" && as_dir=.
10442 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10444 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10446 break 2
10447 fi
10448done
10449 done
10450IFS=$as_save_IFS
10451
10452 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10453 ;;
10454esac
10455fi
10456python_prog_path=$ac_cv_path_python_prog_path
10457if test -n "$python_prog_path"; then
10458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10459$as_echo "$python_prog_path" >&6; }
10460else
10461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10462$as_echo "no" >&6; }
10463fi
10464
10465
10466 if test "${python_prog_path}" = missing; then
d0ac1c44 10467 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10468 fi
10469 ;;
10470 esac
81ecdfbb
RW
10471 esac
10472
ec685c5e 10473 if test "${python_prog}" != missing; then
e7a30f46
DE
10474 # We have a python program to use, but it may be too old.
10475 # Don't flag an error for --with-python=auto (the default).
10476 have_python_config=yes
ec685c5e
DE
10477 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10478 if test $? != 0; then
e7a30f46
DE
10479 have_python_config=failed
10480 if test "${with_python}" != auto; then
d0ac1c44 10481 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10482 fi
ec685c5e
DE
10483 fi
10484 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10485 if test $? != 0; then
e7a30f46
DE
10486 have_python_config=failed
10487 if test "${with_python}" != auto; then
d0ac1c44 10488 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10489 fi
ec685c5e 10490 fi
0c4a4063
DE
10491 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10492 if test $? != 0; then
e7a30f46
DE
10493 have_python_config=failed
10494 if test "${with_python}" != auto; then
d0ac1c44 10495 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10496 fi
0c4a4063 10497 fi
ec685c5e 10498 else
ac534cba
JB
10499 # We do not have a python executable we can use to determine where
10500 # to find the Python headers and libs. We cannot guess the include
10501 # path from the python_prefix either, because that include path
10502 # depends on the Python version. So, there is nothing much we can
10503 # do except assume that the compiler will be able to find those files.
10504 python_includes=
10505 python_libs=
0c4a4063 10506 have_python_config=no
ec685c5e 10507 fi
bec39cab 10508
ec685c5e
DE
10509 # If we have python-config, only try the configuration it provides.
10510 # Otherwise fallback on the old way of trying different versions of
10511 # python in turn.
81ecdfbb 10512
ec685c5e
DE
10513 have_libpython=no
10514 if test "${have_python_config}" = yes; then
71737c43 10515
ec685c5e
DE
10516
10517 new_CPPFLAGS=${python_includes}
10518 new_LIBS=${python_libs}
71737c43
CB
10519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10520$as_echo_n "checking for python... " >&6; }
ec685c5e 10521 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10522 save_LIBS=$LIBS
ec685c5e 10523 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10524 LIBS="$new_LIBS $LIBS"
ec685c5e 10525 found_usable_python=no
81ecdfbb 10526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10527/* end confdefs.h. */
ac534cba 10528#include "Python.h"
81ecdfbb
RW
10529int
10530main ()
10531{
10532Py_Initialize ();
10533 ;
10534 return 0;
10535}
bec39cab 10536_ACEOF
81ecdfbb 10537if ac_fn_c_try_link "$LINENO"; then :
71737c43 10538 have_libpython=yes
ec685c5e 10539 found_usable_python=yes
ac534cba
JB
10540 PYTHON_CPPFLAGS=$new_CPPFLAGS
10541 PYTHON_LIBS=$new_LIBS
9a156167 10542fi
81ecdfbb
RW
10543rm -f core conftest.err conftest.$ac_objext \
10544 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10545 CPPFLAGS=$save_CPPFLAGS
10546 LIBS=$save_LIBS
ec685c5e
DE
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10548$as_echo "${found_usable_python}" >&6; }
9a156167 10549
e7a30f46 10550 elif test "${have_python_config}" != failed; then
ec685c5e 10551 if test "${have_libpython}" = no; then
9a156167 10552
420697bb
TT
10553
10554 new_CPPFLAGS=${python_includes}
bf27f0e2 10555 new_LIBS="-lpython2.7 ${python_libs}"
71737c43
CB
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10557$as_echo_n "checking for python... " >&6; }
420697bb
TT
10558 save_CPPFLAGS=$CPPFLAGS
10559 save_LIBS=$LIBS
10560 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10561 LIBS="$new_LIBS $LIBS"
420697bb
TT
10562 found_usable_python=no
10563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10564/* end confdefs.h. */
ac534cba 10565#include "Python.h"
420697bb
TT
10566int
10567main ()
10568{
10569Py_Initialize ();
10570 ;
10571 return 0;
10572}
10573_ACEOF
10574if ac_fn_c_try_link "$LINENO"; then :
71737c43 10575 have_libpython=yes
420697bb 10576 found_usable_python=yes
ac534cba
JB
10577 PYTHON_CPPFLAGS=$new_CPPFLAGS
10578 PYTHON_LIBS=$new_LIBS
420697bb
TT
10579fi
10580rm -f core conftest.err conftest.$ac_objext \
10581 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10582 CPPFLAGS=$save_CPPFLAGS
10583 LIBS=$save_LIBS
420697bb
TT
10584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10585$as_echo "${found_usable_python}" >&6; }
10586
10587 fi
10588 if test "${have_libpython}" = no; then
10589
ec685c5e
DE
10590
10591 new_CPPFLAGS=${python_includes}
bf27f0e2 10592 new_LIBS="-lpython2.6 ${python_libs}"
71737c43
CB
10593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10594$as_echo_n "checking for python... " >&6; }
ec685c5e
DE
10595 save_CPPFLAGS=$CPPFLAGS
10596 save_LIBS=$LIBS
10597 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10598 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10599 found_usable_python=no
10600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10601/* end confdefs.h. */
ac534cba 10602#include "Python.h"
ec685c5e
DE
10603int
10604main ()
10605{
10606Py_Initialize ();
10607 ;
10608 return 0;
10609}
10610_ACEOF
10611if ac_fn_c_try_link "$LINENO"; then :
71737c43 10612 have_libpython=yes
ec685c5e 10613 found_usable_python=yes
ac534cba
JB
10614 PYTHON_CPPFLAGS=$new_CPPFLAGS
10615 PYTHON_LIBS=$new_LIBS
ec685c5e 10616fi
81ecdfbb
RW
10617rm -f core conftest.err conftest.$ac_objext \
10618 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10619 CPPFLAGS=$save_CPPFLAGS
10620 LIBS=$save_LIBS
ec685c5e
DE
10621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10622$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10623
ec685c5e
DE
10624 fi
10625 fi
ec685c5e
DE
10626
10627 if test "${have_libpython}" = no; then
81ecdfbb
RW
10628 case "${with_python}" in
10629 yes)
d0ac1c44 10630 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10631 ;;
10632 auto)
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10634$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10635 ;;
10636 *)
d0ac1c44 10637 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10638 ;;
10639 esac
0c4a4063
DE
10640 else
10641 if test -n "${python_prefix}"; then
10642
10643cat >>confdefs.h <<_ACEOF
10644#define WITH_PYTHON_PATH "${python_prefix}"
10645_ACEOF
10646
10647
10648 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10649 if test "x$prefix" = xNONE; then
10650 test_prefix=/usr/local
10651 else
10652 test_prefix=$prefix
10653 fi
10654 else
10655 test_prefix=$exec_prefix
10656 fi
10657 value=0
10658 case ${python_prefix} in
10659 "${test_prefix}"|"${test_prefix}/"*|\
10660 '${exec_prefix}'|'${exec_prefix}/'*)
10661 value=1
10662 ;;
10663 esac
10664
10665cat >>confdefs.h <<_ACEOF
10666#define PYTHON_PATH_RELOCATABLE $value
10667_ACEOF
10668
10669
10670 fi
81ecdfbb 10671 fi
436868fb 10672fi
436868fb 10673
ec685c5e 10674if test "${have_libpython}" != no; then
436868fb 10675
81ecdfbb 10676$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10677
81ecdfbb
RW
10678 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10679 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10680 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10681 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10682 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10683
81ecdfbb
RW
10684 # Flags needed to compile Python code (taken from python-config --cflags).
10685 # We cannot call python-config directly because it will output whatever was
10686 # used when compiling the Python interpreter itself, including flags which
10687 # would make the python-related objects be compiled differently from the
10688 # rest of GDB (e.g., -O2 and -fPIC).
10689 if test "${GCC}" = yes; then
ae292b3a
TT
10690 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10691 # Python headers recommend -DNDEBUG, but it's unclear if that just
10692 # refers to building Python itself. In release mode, though, it
10693 # doesn't hurt for the Python code in gdb to follow.
10694 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10695 fi
436868fb 10696
81ecdfbb
RW
10697 if test "x${tentative_python_cflags}" != x; then
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10699$as_echo_n "checking compiler flags for python code... " >&6; }
10700 for flag in ${tentative_python_cflags}; do
10701 # Check that the compiler accepts it
10702 saved_CFLAGS="$CFLAGS"
10703 CFLAGS="$CFLAGS $flag"
10704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10705/* end confdefs.h. */
81ecdfbb 10706
a9322a30
TT
10707int
10708main ()
10709{
a9322a30
TT
10710
10711 ;
10712 return 0;
10713}
bec39cab 10714_ACEOF
81ecdfbb
RW
10715if ac_fn_c_try_compile "$LINENO"; then :
10716 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10717fi
81ecdfbb
RW
10718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10719 CFLAGS="$saved_CFLAGS"
10720 done
10721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10722$as_echo "${PYTHON_CFLAGS}" >&6; }
10723 fi
043b6510 10724
c83393b9
JB
10725 # On x64 Windows, Python's include headers, and pyconfig.h in
10726 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10727 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10728 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10729 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10730 # The issue was reported to the Python community, but still isn't
10731 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10732
043b6510 10733 case "$gdb_host" in
c83393b9
JB
10734 mingw64)
10735 if test "${GCC}" = yes; then
10736 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10737 fi
10738 ;;
043b6510 10739 esac
81ecdfbb 10740else
6dddc817
DE
10741 # Even if Python support is not compiled in, we need to have this file
10742 # included so that the "python" command, et.al., still exists.
8fd8d003 10743 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10744 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10745fi
9a156167 10746
a4a1c157
PA
10747# Work around Python http://bugs.python.org/issue10112. See also
10748# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10749# no effect. Note that the only test after this that uses Python is
10750# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10751# run without -export-dynamic too.
10752PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10753
10754
ed3ef339
DE
10755
10756
4df42755
DE
10757 if test "${have_libpython}" != no; then
10758 HAVE_PYTHON_TRUE=
10759 HAVE_PYTHON_FALSE='#'
10760else
10761 HAVE_PYTHON_TRUE='#'
10762 HAVE_PYTHON_FALSE=
10763fi
10764
ed3ef339
DE
10765
10766# -------------------- #
10767# Check for libguile. #
10768# -------------------- #
10769
10770
e1402065
DE
10771
10772
10773
10774
10775# Check whether --with-guile was given.
10776if test "${with_guile+set}" = set; then :
10777 withval=$with_guile;
10778else
10779 with_guile=auto
10780fi
10781
10782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10783$as_echo_n "checking whether to use guile... " >&6; }
10784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10785$as_echo "$with_guile" >&6; }
10786
ed3ef339
DE
10787# Extract the first word of "pkg-config", so it can be a program name with args.
10788set dummy pkg-config; ac_word=$2
10789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10790$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10791if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10792 $as_echo_n "(cached) " >&6
10793else
10794 case $pkg_config_prog_path in
10795 [\\/]* | ?:[\\/]*)
10796 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10797 ;;
10798 *)
10799 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10800for as_dir in $PATH
10801do
10802 IFS=$as_save_IFS
10803 test -z "$as_dir" && as_dir=.
10804 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10805 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10806 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10807 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10808 break 2
10809 fi
10810done
10811 done
10812IFS=$as_save_IFS
10813
10814 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10815 ;;
10816esac
10817fi
10818pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10819if test -n "$pkg_config_prog_path"; then
10820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10821$as_echo "$pkg_config_prog_path" >&6; }
10822else
10823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10824$as_echo "no" >&6; }
10825fi
10826
10827
10828
6e66f753 10829try_guile_versions="guile-2.0"
ed3ef339
DE
10830have_libguile=no
10831case "${with_guile}" in
10832no)
10833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10834$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10835 ;;
10836auto)
e1402065
DE
10837 if test "${pkg_config_prog_path}" = "missing"; then
10838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10839$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10840 else
ed3ef339
DE
10841
10842 pkg_config=${pkg_config_prog_path}
10843 guile_version_list=${try_guile_versions}
10844 flag_errors=no
10845
ed3ef339
DE
10846 found_usable_guile=checking
10847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10848$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10849 for guile_version in ${guile_version_list}; do
10850 ${pkg_config} --exists ${guile_version} 2>/dev/null
10851 if test $? != 0; then
10852 continue
10853 fi
10854 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10855 if test $? != 0; then
d0ac1c44 10856 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10857 fi
10858 new_LIBS=`${pkg_config} --libs ${guile_version}`
10859 if test $? != 0; then
d0ac1c44 10860 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10861 fi
10862 found_usable_guile=${guile_version}
10863 break
10864 done
10865 if test "${found_usable_guile}" = "checking"; then
10866 if test "${flag_errors}" = "yes"; then
d0ac1c44 10867 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10868 else
10869 found_usable_guile=no
10870 fi
10871 fi
10872 if test "${found_usable_guile}" != no; then
10873 save_CPPFLAGS=$CPPFLAGS
10874 save_LIBS=$LIBS
10875 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10876 LIBS="$LIBS $new_LIBS"
10877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10878/* end confdefs.h. */
10879#include "libguile.h"
10880int
10881main ()
10882{
10883scm_init_guile ();
10884 ;
10885 return 0;
10886}
10887_ACEOF
10888if ac_fn_c_try_link "$LINENO"; then :
10889 have_libguile=yes
10890 GUILE_CPPFLAGS=$new_CPPFLAGS
10891 GUILE_LIBS=$new_LIBS
10892else
10893 found_usable_guile=no
10894fi
10895rm -f core conftest.err conftest.$ac_objext \
10896 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10897 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10898if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10899
10900$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10901
10902
10903fi
10904
ed3ef339
DE
10905 CPPFLAGS=$save_CPPFLAGS
10906 LIBS=$save_LIBS
10907 if test "${found_usable_guile}" = no; then
10908 if test "${flag_errors}" = yes; then
10909 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10911as_fn_error $? "linking guile version ${guile_version} test program failed
10912See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10913 fi
10914 fi
10915 fi
10916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10917$as_echo "${found_usable_guile}" >&6; }
10918
e1402065 10919 fi
ed3ef339
DE
10920 ;;
10921yes)
e1402065 10922 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 10923 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 10924 fi
ed3ef339
DE
10925
10926 pkg_config=${pkg_config_prog_path}
10927 guile_version_list=${try_guile_versions}
10928 flag_errors=yes
10929
ed3ef339
DE
10930 found_usable_guile=checking
10931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10932$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10933 for guile_version in ${guile_version_list}; do
10934 ${pkg_config} --exists ${guile_version} 2>/dev/null
10935 if test $? != 0; then
10936 continue
10937 fi
10938 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10939 if test $? != 0; then
d0ac1c44 10940 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10941 fi
10942 new_LIBS=`${pkg_config} --libs ${guile_version}`
10943 if test $? != 0; then
d0ac1c44 10944 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10945 fi
10946 found_usable_guile=${guile_version}
10947 break
10948 done
10949 if test "${found_usable_guile}" = "checking"; then
10950 if test "${flag_errors}" = "yes"; then
d0ac1c44 10951 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10952 else
10953 found_usable_guile=no
10954 fi
10955 fi
10956 if test "${found_usable_guile}" != no; then
10957 save_CPPFLAGS=$CPPFLAGS
10958 save_LIBS=$LIBS
10959 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10960 LIBS="$LIBS $new_LIBS"
10961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10962/* end confdefs.h. */
10963#include "libguile.h"
10964int
10965main ()
10966{
10967scm_init_guile ();
10968 ;
10969 return 0;
10970}
10971_ACEOF
10972if ac_fn_c_try_link "$LINENO"; then :
10973 have_libguile=yes
10974 GUILE_CPPFLAGS=$new_CPPFLAGS
10975 GUILE_LIBS=$new_LIBS
10976else
10977 found_usable_guile=no
10978fi
10979rm -f core conftest.err conftest.$ac_objext \
10980 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10981 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10982if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10983
10984$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10985
10986
10987fi
10988
ed3ef339
DE
10989 CPPFLAGS=$save_CPPFLAGS
10990 LIBS=$save_LIBS
10991 if test "${found_usable_guile}" = no; then
10992 if test "${flag_errors}" = yes; then
10993 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10994$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10995as_fn_error $? "linking guile version ${guile_version} test program failed
10996See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10997 fi
10998 fi
10999 fi
11000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11001$as_echo "${found_usable_guile}" >&6; }
11002
11003 ;;
11004[\\/]* | ?:[\\/]*)
e1402065 11005 if test -x "${with_guile}"; then
ed3ef339
DE
11006
11007 pkg_config=${with_guile}
11008 guile_version_list=${try_guile_versions}
11009 flag_errors=yes
11010
ed3ef339
DE
11011 found_usable_guile=checking
11012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11013$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11014 for guile_version in ${guile_version_list}; do
11015 ${pkg_config} --exists ${guile_version} 2>/dev/null
11016 if test $? != 0; then
11017 continue
11018 fi
11019 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11020 if test $? != 0; then
d0ac1c44 11021 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11022 fi
11023 new_LIBS=`${pkg_config} --libs ${guile_version}`
11024 if test $? != 0; then
d0ac1c44 11025 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11026 fi
11027 found_usable_guile=${guile_version}
11028 break
11029 done
11030 if test "${found_usable_guile}" = "checking"; then
11031 if test "${flag_errors}" = "yes"; then
d0ac1c44 11032 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11033 else
11034 found_usable_guile=no
11035 fi
11036 fi
11037 if test "${found_usable_guile}" != no; then
11038 save_CPPFLAGS=$CPPFLAGS
11039 save_LIBS=$LIBS
11040 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11041 LIBS="$LIBS $new_LIBS"
11042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11043/* end confdefs.h. */
11044#include "libguile.h"
11045int
11046main ()
11047{
11048scm_init_guile ();
11049 ;
11050 return 0;
11051}
11052_ACEOF
11053if ac_fn_c_try_link "$LINENO"; then :
11054 have_libguile=yes
11055 GUILE_CPPFLAGS=$new_CPPFLAGS
11056 GUILE_LIBS=$new_LIBS
11057else
11058 found_usable_guile=no
11059fi
11060rm -f core conftest.err conftest.$ac_objext \
11061 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11062 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11063if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11064
11065$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11066
11067
11068fi
11069
ed3ef339
DE
11070 CPPFLAGS=$save_CPPFLAGS
11071 LIBS=$save_LIBS
11072 if test "${found_usable_guile}" = no; then
11073 if test "${flag_errors}" = yes; then
11074 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11075$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11076as_fn_error $? "linking guile version ${guile_version} test program failed
11077See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11078 fi
11079 fi
11080 fi
11081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11082$as_echo "${found_usable_guile}" >&6; }
11083
e1402065 11084 else
d0ac1c44 11085 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11086 fi
ed3ef339
DE
11087 ;;
11088"" | */*)
11089 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11090 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11091 ;;
11092*)
11093 # A space separate list of guile versions to try, in order.
e1402065 11094 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11095 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11096 fi
ed3ef339
DE
11097
11098 pkg_config=${pkg_config_prog_path}
11099 guile_version_list=${with_guile}
11100 flag_errors=yes
11101
ed3ef339
DE
11102 found_usable_guile=checking
11103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11104$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11105 for guile_version in ${guile_version_list}; do
11106 ${pkg_config} --exists ${guile_version} 2>/dev/null
11107 if test $? != 0; then
11108 continue
11109 fi
11110 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11111 if test $? != 0; then
d0ac1c44 11112 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11113 fi
11114 new_LIBS=`${pkg_config} --libs ${guile_version}`
11115 if test $? != 0; then
d0ac1c44 11116 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11117 fi
11118 found_usable_guile=${guile_version}
11119 break
11120 done
11121 if test "${found_usable_guile}" = "checking"; then
11122 if test "${flag_errors}" = "yes"; then
d0ac1c44 11123 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11124 else
11125 found_usable_guile=no
11126 fi
11127 fi
11128 if test "${found_usable_guile}" != no; then
11129 save_CPPFLAGS=$CPPFLAGS
11130 save_LIBS=$LIBS
11131 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11132 LIBS="$LIBS $new_LIBS"
11133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11134/* end confdefs.h. */
11135#include "libguile.h"
11136int
11137main ()
11138{
11139scm_init_guile ();
11140 ;
11141 return 0;
11142}
11143_ACEOF
11144if ac_fn_c_try_link "$LINENO"; then :
11145 have_libguile=yes
11146 GUILE_CPPFLAGS=$new_CPPFLAGS
11147 GUILE_LIBS=$new_LIBS
11148else
11149 found_usable_guile=no
11150fi
11151rm -f core conftest.err conftest.$ac_objext \
11152 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11153 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11154if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11155
11156$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11157
11158
11159fi
11160
ed3ef339
DE
11161 CPPFLAGS=$save_CPPFLAGS
11162 LIBS=$save_LIBS
11163 if test "${found_usable_guile}" = no; then
11164 if test "${flag_errors}" = yes; then
11165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11166$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11167as_fn_error $? "linking guile version ${guile_version} test program failed
11168See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11169 fi
11170 fi
11171 fi
11172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11173$as_echo "${found_usable_guile}" >&6; }
11174
11175 ;;
11176esac
11177
e76c5d17 11178if test "${have_libguile}" != no; then
d342a0da
DE
11179 case "${with_guile}" in
11180 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11181
11182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11183$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11184if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11185 $as_echo_n "(cached) " >&6
11186else
d342a0da 11187 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11188
11189 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11190 # the 'guild' and 'bindir' variables. In that case, try to guess
11191 # what the program name is, at the risk of getting it wrong if
11192 # Guile was configured with '--program-suffix' or similar.
11193 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11194 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11195 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11196 fi
11197
11198fi
11199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11200$as_echo "$ac_cv_guild_program_name" >&6; }
11201
11202 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11203 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11204 fi
11205
11206 GUILD="$ac_cv_guild_program_name"
11207
11208
d342a0da
DE
11209 ;;
11210 *)
11211
11212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11213$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11214if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11215 $as_echo_n "(cached) " >&6
11216else
11217 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11218
11219 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11220 # the 'guild' and 'bindir' variables. In that case, try to guess
11221 # what the program name is, at the risk of getting it wrong if
11222 # Guile was configured with '--program-suffix' or similar.
11223 if test "x$ac_cv_guild_program_name" = "x"; then
11224 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11225 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11226 fi
11227
11228fi
11229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11230$as_echo "$ac_cv_guild_program_name" >&6; }
11231
11232 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11233 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11234 fi
11235
11236 GUILD="$ac_cv_guild_program_name"
11237
11238
11239 ;;
11240 esac
e76c5d17
DE
11241
11242
11243 if test "$cross_compiling" = no; then
11244 GUILD_TARGET_FLAG=
11245 else
11246 GUILD_TARGET_FLAG="--target=$host"
11247 fi
11248
11249
11250
11251
11252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11253$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11254if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11255 $as_echo_n "(cached) " >&6
11256else
11257 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11258 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11259 ac_cv_guild_ok=yes
11260 else
11261 ac_cv_guild_ok=no
11262 fi
11263fi
11264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11265$as_echo "$ac_cv_guild_ok" >&6; }
11266
11267 if test "$ac_cv_guild_ok" = no; then
11268 have_libguile=no
11269 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11270$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11271 fi
11272fi
11273
ed3ef339
DE
11274if test "${have_libguile}" != no; then
11275
11276$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11277
11278 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11279 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11280 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11281 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11282 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11283
11284 save_LIBS="$LIBS"
11285 save_CPPFLAGS="$CPPFLAGS"
11286 LIBS="$GUILE_LIBS"
11287 CPPFLAGS="$GUILE_CPPFLAGS"
11288 for ac_func in scm_new_smob
11289do :
11290 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11291if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11292 cat >>confdefs.h <<_ACEOF
11293#define HAVE_SCM_NEW_SMOB 1
11294_ACEOF
11295
11296fi
11297done
11298
11299 LIBS="$save_LIBS"
11300 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11301else
11302 # Even if Guile support is not compiled in, we need to have these files
11303 # included.
bd810fff 11304 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11305 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11306fi
9a156167 11307
ac534cba 11308
4df42755
DE
11309 if test "${have_libguile}" != no; then
11310 HAVE_GUILE_TRUE=
11311 HAVE_GUILE_FALSE='#'
11312else
11313 HAVE_GUILE_TRUE='#'
11314 HAVE_GUILE_FALSE=
11315fi
11316
ac534cba 11317
62f29fda
TT
11318# ---------------------------- #
11319# Check for source highlight. #
11320# ---------------------------- #
11321
11322SRCHIGH_LIBS=
11323SRCHIGH_CFLAGS=
189b8c2e
ST
11324
11325# Check whether --enable-source-highlight was given.
11326if test "${enable_source_highlight+set}" = set; then :
11327 enableval=$enable_source_highlight; case "${enableval}" in
11328 yes) enable_source_highlight=yes ;;
11329 no) enable_source_highlight=no ;;
11330 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11331esac
11332else
11333 enable_source_highlight=auto
11334fi
11335
11336
11337if test "${enable_source_highlight}" != "no"; then
11338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11339$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11340 if test "${pkg_config_prog_path}" = "missing"; then
11341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11342$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11343 if test "${enable_source_highlight}" = "yes"; then
11344 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11345 fi
11346 else
d806ea2d
TT
11347 case "$LDFLAGS" in
11348 *static-libstdc*)
11349 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11350 ;;
11351 esac
11352
189b8c2e 11353 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11354 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11355 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11356
11357$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11358
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11360$as_echo "yes" >&6; }
189b8c2e 11361 else
62f29fda
TT
11362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363$as_echo "no" >&6; }
189b8c2e
ST
11364 if test "${enable_source_highlight}" = "yes"; then
11365 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11366 fi
11367 fi
11368 fi
62f29fda
TT
11369fi
11370
11371
11372
58bfce93
MM
11373
11374# Check whether --with-intel_pt was given.
11375if test "${with_intel_pt+set}" = set; then :
11376 withval=$with_intel_pt;
11377else
11378 with_intel_pt=auto
11379fi
11380
11381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11382$as_echo_n "checking whether to use intel pt... " >&6; }
11383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11384$as_echo "$with_intel_pt" >&6; }
11385
11386if test "${with_intel_pt}" = no; then
bc504a31
PA
11387 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11388$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11389 HAVE_LIBIPT=no
11390else
5599c404
MM
11391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11392/* end confdefs.h. */
11393
11394#include <linux/perf_event.h>
11395#ifndef PERF_ATTR_SIZE_VER5
11396# error
11397#endif
11398
11399_ACEOF
11400if ac_fn_c_try_cpp "$LINENO"; then :
11401 perf_event=yes
11402else
11403 perf_event=no
11404fi
d0ac1c44 11405rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11406 if test "$perf_event" != yes; then
11407 if test "$with_intel_pt" = yes; then
d0ac1c44 11408 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11409 else
11410 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11411$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11412 fi
11413 fi
11414
58bfce93
MM
11415
11416
11417
11418
11419
11420
11421
11422
11423 use_additional=yes
11424
11425 acl_save_prefix="$prefix"
11426 prefix="$acl_final_prefix"
11427 acl_save_exec_prefix="$exec_prefix"
11428 exec_prefix="$acl_final_exec_prefix"
11429
11430 eval additional_includedir=\"$includedir\"
11431 eval additional_libdir=\"$libdir\"
11432
11433 exec_prefix="$acl_save_exec_prefix"
11434 prefix="$acl_save_prefix"
11435
11436
11437# Check whether --with-libipt-prefix was given.
11438if test "${with_libipt_prefix+set}" = set; then :
11439 withval=$with_libipt_prefix;
11440 if test "X$withval" = "Xno"; then
11441 use_additional=no
11442 else
11443 if test "X$withval" = "X"; then
11444
11445 acl_save_prefix="$prefix"
11446 prefix="$acl_final_prefix"
11447 acl_save_exec_prefix="$exec_prefix"
11448 exec_prefix="$acl_final_exec_prefix"
11449
11450 eval additional_includedir=\"$includedir\"
11451 eval additional_libdir=\"$libdir\"
11452
11453 exec_prefix="$acl_save_exec_prefix"
11454 prefix="$acl_save_prefix"
11455
11456 else
11457 additional_includedir="$withval/include"
11458 additional_libdir="$withval/lib"
11459 fi
11460 fi
11461
11462fi
11463
11464 LIBIPT=
11465 LTLIBIPT=
11466 INCIPT=
11467 rpathdirs=
11468 ltrpathdirs=
11469 names_already_handled=
11470 names_next_round='ipt '
11471 while test -n "$names_next_round"; do
11472 names_this_round="$names_next_round"
11473 names_next_round=
11474 for name in $names_this_round; do
11475 already_handled=
11476 for n in $names_already_handled; do
11477 if test "$n" = "$name"; then
11478 already_handled=yes
11479 break
11480 fi
11481 done
11482 if test -z "$already_handled"; then
11483 names_already_handled="$names_already_handled $name"
11484 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11485 eval value=\"\$HAVE_LIB$uppername\"
11486 if test -n "$value"; then
11487 if test "$value" = yes; then
11488 eval value=\"\$LIB$uppername\"
11489 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11490 eval value=\"\$LTLIB$uppername\"
11491 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11492 else
11493 :
11494 fi
11495 else
11496 found_dir=
11497 found_la=
11498 found_so=
11499 found_a=
11500 if test $use_additional = yes; then
11501 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11502 found_dir="$additional_libdir"
11503 found_so="$additional_libdir/lib$name.$shlibext"
11504 if test -f "$additional_libdir/lib$name.la"; then
11505 found_la="$additional_libdir/lib$name.la"
11506 fi
11507 else
11508 if test -f "$additional_libdir/lib$name.$libext"; then
11509 found_dir="$additional_libdir"
11510 found_a="$additional_libdir/lib$name.$libext"
11511 if test -f "$additional_libdir/lib$name.la"; then
11512 found_la="$additional_libdir/lib$name.la"
11513 fi
11514 fi
11515 fi
11516 fi
11517 if test "X$found_dir" = "X"; then
11518 for x in $LDFLAGS $LTLIBIPT; do
11519
11520 acl_save_prefix="$prefix"
11521 prefix="$acl_final_prefix"
11522 acl_save_exec_prefix="$exec_prefix"
11523 exec_prefix="$acl_final_exec_prefix"
11524 eval x=\"$x\"
11525 exec_prefix="$acl_save_exec_prefix"
11526 prefix="$acl_save_prefix"
11527
11528 case "$x" in
11529 -L*)
11530 dir=`echo "X$x" | sed -e 's/^X-L//'`
11531 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11532 found_dir="$dir"
11533 found_so="$dir/lib$name.$shlibext"
11534 if test -f "$dir/lib$name.la"; then
11535 found_la="$dir/lib$name.la"
11536 fi
11537 else
11538 if test -f "$dir/lib$name.$libext"; then
11539 found_dir="$dir"
11540 found_a="$dir/lib$name.$libext"
11541 if test -f "$dir/lib$name.la"; then
11542 found_la="$dir/lib$name.la"
11543 fi
11544 fi
11545 fi
11546 ;;
11547 esac
11548 if test "X$found_dir" != "X"; then
11549 break
11550 fi
11551 done
11552 fi
11553 if test "X$found_dir" != "X"; then
11554 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11555 if test "X$found_so" != "X"; then
11556 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11557 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11558 else
11559 haveit=
11560 for x in $ltrpathdirs; do
11561 if test "X$x" = "X$found_dir"; then
11562 haveit=yes
11563 break
11564 fi
11565 done
11566 if test -z "$haveit"; then
11567 ltrpathdirs="$ltrpathdirs $found_dir"
11568 fi
11569 if test "$hardcode_direct" = yes; then
11570 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11571 else
11572 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11573 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11574 haveit=
11575 for x in $rpathdirs; do
11576 if test "X$x" = "X$found_dir"; then
11577 haveit=yes
11578 break
11579 fi
11580 done
11581 if test -z "$haveit"; then
11582 rpathdirs="$rpathdirs $found_dir"
11583 fi
11584 else
11585 haveit=
11586 for x in $LDFLAGS $LIBIPT; do
11587
11588 acl_save_prefix="$prefix"
11589 prefix="$acl_final_prefix"
11590 acl_save_exec_prefix="$exec_prefix"
11591 exec_prefix="$acl_final_exec_prefix"
11592 eval x=\"$x\"
11593 exec_prefix="$acl_save_exec_prefix"
11594 prefix="$acl_save_prefix"
11595
11596 if test "X$x" = "X-L$found_dir"; then
11597 haveit=yes
11598 break
11599 fi
11600 done
11601 if test -z "$haveit"; then
11602 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11603 fi
11604 if test "$hardcode_minus_L" != no; then
11605 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11606 else
11607 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11608 fi
11609 fi
11610 fi
11611 fi
11612 else
11613 if test "X$found_a" != "X"; then
11614 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11615 else
11616 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11617 fi
11618 fi
11619 additional_includedir=
11620 case "$found_dir" in
11621 */lib | */lib/)
11622 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11623 additional_includedir="$basedir/include"
11624 ;;
11625 esac
11626 if test "X$additional_includedir" != "X"; then
11627 if test "X$additional_includedir" != "X/usr/include"; then
11628 haveit=
11629 if test "X$additional_includedir" = "X/usr/local/include"; then
11630 if test -n "$GCC"; then
11631 case $host_os in
11632 linux*) haveit=yes;;
11633 esac
11634 fi
11635 fi
11636 if test -z "$haveit"; then
11637 for x in $CPPFLAGS $INCIPT; do
11638
11639 acl_save_prefix="$prefix"
11640 prefix="$acl_final_prefix"
11641 acl_save_exec_prefix="$exec_prefix"
11642 exec_prefix="$acl_final_exec_prefix"
11643 eval x=\"$x\"
11644 exec_prefix="$acl_save_exec_prefix"
11645 prefix="$acl_save_prefix"
11646
11647 if test "X$x" = "X-I$additional_includedir"; then
11648 haveit=yes
11649 break
11650 fi
11651 done
11652 if test -z "$haveit"; then
11653 if test -d "$additional_includedir"; then
11654 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11655 fi
11656 fi
11657 fi
11658 fi
11659 fi
11660 if test -n "$found_la"; then
11661 save_libdir="$libdir"
11662 case "$found_la" in
11663 */* | *\\*) . "$found_la" ;;
11664 *) . "./$found_la" ;;
11665 esac
11666 libdir="$save_libdir"
11667 for dep in $dependency_libs; do
11668 case "$dep" in
11669 -L*)
11670 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11671 if test "X$additional_libdir" != "X/usr/lib"; then
11672 haveit=
11673 if test "X$additional_libdir" = "X/usr/local/lib"; then
11674 if test -n "$GCC"; then
11675 case $host_os in
11676 linux*) haveit=yes;;
11677 esac
11678 fi
11679 fi
11680 if test -z "$haveit"; then
11681 haveit=
11682 for x in $LDFLAGS $LIBIPT; do
11683
11684 acl_save_prefix="$prefix"
11685 prefix="$acl_final_prefix"
11686 acl_save_exec_prefix="$exec_prefix"
11687 exec_prefix="$acl_final_exec_prefix"
11688 eval x=\"$x\"
11689 exec_prefix="$acl_save_exec_prefix"
11690 prefix="$acl_save_prefix"
11691
11692 if test "X$x" = "X-L$additional_libdir"; then
11693 haveit=yes
11694 break
11695 fi
11696 done
11697 if test -z "$haveit"; then
11698 if test -d "$additional_libdir"; then
11699 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11700 fi
11701 fi
11702 haveit=
11703 for x in $LDFLAGS $LTLIBIPT; do
11704
11705 acl_save_prefix="$prefix"
11706 prefix="$acl_final_prefix"
11707 acl_save_exec_prefix="$exec_prefix"
11708 exec_prefix="$acl_final_exec_prefix"
11709 eval x=\"$x\"
11710 exec_prefix="$acl_save_exec_prefix"
11711 prefix="$acl_save_prefix"
11712
11713 if test "X$x" = "X-L$additional_libdir"; then
11714 haveit=yes
11715 break
11716 fi
11717 done
11718 if test -z "$haveit"; then
11719 if test -d "$additional_libdir"; then
11720 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11721 fi
11722 fi
11723 fi
11724 fi
11725 ;;
11726 -R*)
11727 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11728 if test "$enable_rpath" != no; then
11729 haveit=
11730 for x in $rpathdirs; do
11731 if test "X$x" = "X$dir"; then
11732 haveit=yes
11733 break
11734 fi
11735 done
11736 if test -z "$haveit"; then
11737 rpathdirs="$rpathdirs $dir"
11738 fi
11739 haveit=
11740 for x in $ltrpathdirs; do
11741 if test "X$x" = "X$dir"; then
11742 haveit=yes
11743 break
11744 fi
11745 done
11746 if test -z "$haveit"; then
11747 ltrpathdirs="$ltrpathdirs $dir"
11748 fi
11749 fi
11750 ;;
11751 -l*)
11752 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11753 ;;
11754 *.la)
11755 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11756 ;;
11757 *)
11758 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11759 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11760 ;;
11761 esac
11762 done
11763 fi
11764 else
11765 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11766 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11767 fi
11768 fi
11769 fi
11770 done
11771 done
11772 if test "X$rpathdirs" != "X"; then
11773 if test -n "$hardcode_libdir_separator"; then
11774 alldirs=
11775 for found_dir in $rpathdirs; do
11776 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11777 done
11778 acl_save_libdir="$libdir"
11779 libdir="$alldirs"
11780 eval flag=\"$hardcode_libdir_flag_spec\"
11781 libdir="$acl_save_libdir"
11782 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11783 else
11784 for found_dir in $rpathdirs; do
11785 acl_save_libdir="$libdir"
11786 libdir="$found_dir"
11787 eval flag=\"$hardcode_libdir_flag_spec\"
11788 libdir="$acl_save_libdir"
11789 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11790 done
11791 fi
11792 fi
11793 if test "X$ltrpathdirs" != "X"; then
11794 for found_dir in $ltrpathdirs; do
11795 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11796 done
11797 fi
11798
11799
11800 ac_save_CPPFLAGS="$CPPFLAGS"
11801
11802 for element in $INCIPT; do
11803 haveit=
11804 for x in $CPPFLAGS; do
11805
11806 acl_save_prefix="$prefix"
11807 prefix="$acl_final_prefix"
11808 acl_save_exec_prefix="$exec_prefix"
11809 exec_prefix="$acl_final_exec_prefix"
11810 eval x=\"$x\"
11811 exec_prefix="$acl_save_exec_prefix"
11812 prefix="$acl_save_prefix"
11813
11814 if test "X$x" = "X$element"; then
11815 haveit=yes
11816 break
11817 fi
11818 done
11819 if test -z "$haveit"; then
11820 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11821 fi
11822 done
11823
11824
11825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11826$as_echo_n "checking for libipt... " >&6; }
d0ac1c44 11827if ${ac_cv_libipt+:} false; then :
58bfce93
MM
11828 $as_echo_n "(cached) " >&6
11829else
11830
11831 ac_save_LIBS="$LIBS"
11832 LIBS="$LIBS $LIBIPT"
11833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11834/* end confdefs.h. */
11835#include "intel-pt.h"
11836int
11837main ()
11838{
11839pt_insn_alloc_decoder (0);
11840 ;
11841 return 0;
11842}
11843_ACEOF
11844if ac_fn_c_try_link "$LINENO"; then :
11845 ac_cv_libipt=yes
11846else
11847 ac_cv_libipt=no
11848fi
11849rm -f core conftest.err conftest.$ac_objext \
11850 conftest$ac_exeext conftest.$ac_ext
11851 LIBS="$ac_save_LIBS"
11852
11853fi
11854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11855$as_echo "$ac_cv_libipt" >&6; }
11856 if test "$ac_cv_libipt" = yes; then
11857 HAVE_LIBIPT=yes
11858
11859$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11860
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11862$as_echo_n "checking how to link with libipt... " >&6; }
11863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11864$as_echo "$LIBIPT" >&6; }
11865 else
11866 HAVE_LIBIPT=no
11867 CPPFLAGS="$ac_save_CPPFLAGS"
11868 LIBIPT=
11869 LTLIBIPT=
11870 fi
11871
11872
11873
11874
11875
11876
11877 if test "$HAVE_LIBIPT" != yes; then
11878 if test "$with_intel_pt" = yes; then
d0ac1c44 11879 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
11880 else
11881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11882$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11883 fi
c56ccc05
MM
11884 else
11885 save_LIBS=$LIBS
11886 LIBS="$LIBS $LIBIPT"
11887 for ac_func in pt_insn_event
11888do :
11889 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
d0ac1c44 11890if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
11891 cat >>confdefs.h <<_ACEOF
11892#define HAVE_PT_INSN_EVENT 1
11893_ACEOF
11894
11895fi
11896done
11897
11898 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
11899"
d0ac1c44 11900if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
11901
11902cat >>confdefs.h <<_ACEOF
11903#define HAVE_STRUCT_PT_INSN_ENABLED 1
11904_ACEOF
11905
11906
11907fi
11908ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
11909"
d0ac1c44 11910if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
11911
11912cat >>confdefs.h <<_ACEOF
11913#define HAVE_STRUCT_PT_INSN_RESYNCED 1
11914_ACEOF
11915
11916
11917fi
11918
11919 LIBS=$save_LIBS
58bfce93
MM
11920 fi
11921fi
11922
81ecdfbb
RW
11923# ------------------------- #
11924# Checks for header files. #
11925# ------------------------- #
c890192f 11926
81ecdfbb
RW
11927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11928$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 11929if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 11930 $as_echo_n "(cached) " >&6
bec39cab 11931else
81ecdfbb 11932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11933/* end confdefs.h. */
81ecdfbb
RW
11934#include <stdlib.h>
11935#include <stdarg.h>
11936#include <string.h>
11937#include <float.h>
11938
a9322a30
TT
11939int
11940main ()
11941{
a9322a30
TT
11942
11943 ;
11944 return 0;
11945}
bec39cab 11946_ACEOF
81ecdfbb
RW
11947if ac_fn_c_try_compile "$LINENO"; then :
11948 ac_cv_header_stdc=yes
bec39cab 11949else
81ecdfbb 11950 ac_cv_header_stdc=no
a9322a30 11951fi
81ecdfbb 11952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11953
81ecdfbb
RW
11954if test $ac_cv_header_stdc = yes; then
11955 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11957/* end confdefs.h. */
11958#include <string.h>
bec39cab 11959
81ecdfbb
RW
11960_ACEOF
11961if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11962 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11963
bec39cab 11964else
81ecdfbb
RW
11965 ac_cv_header_stdc=no
11966fi
11967rm -f conftest*
11968
11969fi
11970
11971if test $ac_cv_header_stdc = yes; then
11972 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11974/* end confdefs.h. */
11975#include <stdlib.h>
11976
bec39cab 11977_ACEOF
81ecdfbb
RW
11978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11979 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11980
81ecdfbb
RW
11981else
11982 ac_cv_header_stdc=no
11983fi
11984rm -f conftest*
bec39cab 11985
bec39cab 11986fi
81ecdfbb
RW
11987
11988if test $ac_cv_header_stdc = yes; then
11989 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11990 if test "$cross_compiling" = yes; then :
11991 :
bec39cab 11992else
81ecdfbb 11993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11994/* end confdefs.h. */
81ecdfbb
RW
11995#include <ctype.h>
11996#include <stdlib.h>
11997#if ((' ' & 0x0FF) == 0x020)
11998# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11999# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12000#else
12001# define ISLOWER(c) \
12002 (('a' <= (c) && (c) <= 'i') \
12003 || ('j' <= (c) && (c) <= 'r') \
12004 || ('s' <= (c) && (c) <= 'z'))
12005# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12006#endif
12007
12008#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12009int
12010main ()
12011{
81ecdfbb
RW
12012 int i;
12013 for (i = 0; i < 256; i++)
12014 if (XOR (islower (i), ISLOWER (i))
12015 || toupper (i) != TOUPPER (i))
12016 return 2;
a9322a30
TT
12017 return 0;
12018}
bec39cab 12019_ACEOF
81ecdfbb
RW
12020if ac_fn_c_try_run "$LINENO"; then :
12021
bec39cab 12022else
81ecdfbb
RW
12023 ac_cv_header_stdc=no
12024fi
12025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12026 conftest.$ac_objext conftest.beam conftest.$ac_ext
12027fi
bec39cab 12028
bec39cab 12029fi
a9322a30 12030fi
81ecdfbb
RW
12031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12032$as_echo "$ac_cv_header_stdc" >&6; }
12033if test $ac_cv_header_stdc = yes; then
bec39cab 12034
81ecdfbb 12035$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12036
81ecdfbb 12037fi
bec39cab 12038
81ecdfbb 12039# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12040for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
43b7e92b 12041 thread_db.h linux/elf.h \
81ecdfbb
RW
12042 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12043 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 12044 sys/reg.h sys/debugreg.h sys/select.h \
2d41fa11 12045 termios.h elf_hp.h
81ecdfbb
RW
12046do :
12047 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12048ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12049if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12050 cat >>confdefs.h <<_ACEOF
81ecdfbb 12051#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12052_ACEOF
c906108c 12053
bec39cab 12054fi
81ecdfbb
RW
12055
12056done
12057
81ecdfbb
RW
12058for ac_header in sys/user.h
12059do :
12060 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12061# include <sys/param.h>
a9322a30
TT
12062#endif
12063
81ecdfbb 12064"
d0ac1c44 12065if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
12066 cat >>confdefs.h <<_ACEOF
12067#define HAVE_SYS_USER_H 1
bec39cab 12068_ACEOF
bec39cab 12069
a9322a30 12070fi
bec39cab 12071
81ecdfbb 12072done
5ee754fc 12073
5ee754fc 12074
5007d765 12075for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12076do :
12077 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12078ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12079if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12080 cat >>confdefs.h <<_ACEOF
81ecdfbb 12081#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12082_ACEOF
5ee754fc
MK
12083
12084fi
12085
81ecdfbb 12086done
bec39cab 12087
81ecdfbb
RW
12088for ac_header in term.h
12089do :
12090 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12091# include <curses.h>
12092#endif
bec39cab 12093
81ecdfbb 12094"
d0ac1c44 12095if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12096 cat >>confdefs.h <<_ACEOF
12097#define HAVE_TERM_H 1
a8111142 12098_ACEOF
a8111142 12099
a8111142 12100fi
a8111142 12101
81ecdfbb 12102done
a8111142
TT
12103
12104
81ecdfbb
RW
12105# ------------------------- #
12106# Checks for declarations. #
12107# ------------------------- #
a9322a30 12108
07697489
PA
12109
12110 # Check for presence and size of long long.
12111 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 12112if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12113
12114cat >>confdefs.h <<_ACEOF
12115#define HAVE_LONG_LONG 1
12116_ACEOF
12117
12118# The cast to long int works around a bug in the HP C Compiler
12119# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12120# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12121# This bug is HP SR number 8606223364.
12122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12123$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 12124if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12125 $as_echo_n "(cached) " >&6
12126else
12127 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12128
12129else
12130 if test "$ac_cv_type_long_long" = yes; then
12131 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12132$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
12133as_fn_error 77 "cannot compute sizeof (long long)
12134See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12135 else
12136 ac_cv_sizeof_long_long=0
12137 fi
12138fi
12139
12140fi
12141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12142$as_echo "$ac_cv_sizeof_long_long" >&6; }
12143
12144
12145
12146cat >>confdefs.h <<_ACEOF
12147#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12148_ACEOF
12149
12150
12151fi
12152
12153
d0ac1c44
SM
12154 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12155ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12156if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12157 ac_have_decl=1
12158else
12159 ac_have_decl=0
12160fi
12161
12162cat >>confdefs.h <<_ACEOF
12163#define HAVE_DECL_BASENAME $ac_have_decl
12164_ACEOF
12165ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 12166if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12167 ac_have_decl=1
12168else
12169 ac_have_decl=0
12170fi
12171
12172cat >>confdefs.h <<_ACEOF
12173#define HAVE_DECL_FFS $ac_have_decl
12174_ACEOF
12175ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 12176if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12177 ac_have_decl=1
12178else
12179 ac_have_decl=0
12180fi
12181
12182cat >>confdefs.h <<_ACEOF
12183#define HAVE_DECL_ASPRINTF $ac_have_decl
12184_ACEOF
12185ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 12186if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12187 ac_have_decl=1
12188else
12189 ac_have_decl=0
12190fi
12191
12192cat >>confdefs.h <<_ACEOF
12193#define HAVE_DECL_VASPRINTF $ac_have_decl
12194_ACEOF
12195ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12196if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12197 ac_have_decl=1
12198else
12199 ac_have_decl=0
12200fi
12201
12202cat >>confdefs.h <<_ACEOF
12203#define HAVE_DECL_SNPRINTF $ac_have_decl
12204_ACEOF
12205ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 12206if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12207 ac_have_decl=1
12208else
12209 ac_have_decl=0
12210fi
12211
12212cat >>confdefs.h <<_ACEOF
12213#define HAVE_DECL_VSNPRINTF $ac_have_decl
12214_ACEOF
12215
12216 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 12217if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
12218 ac_have_decl=1
12219else
12220 ac_have_decl=0
12221fi
12222
12223cat >>confdefs.h <<_ACEOF
12224#define HAVE_DECL_STRTOL $ac_have_decl
12225_ACEOF
12226ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 12227if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
12228 ac_have_decl=1
12229else
12230 ac_have_decl=0
12231fi
12232
12233cat >>confdefs.h <<_ACEOF
12234#define HAVE_DECL_STRTOUL $ac_have_decl
12235_ACEOF
12236ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 12237if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
12238 ac_have_decl=1
12239else
12240 ac_have_decl=0
12241fi
12242
12243cat >>confdefs.h <<_ACEOF
12244#define HAVE_DECL_STRTOLL $ac_have_decl
12245_ACEOF
12246ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 12247if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12248 ac_have_decl=1
12249else
12250 ac_have_decl=0
12251fi
12252
12253cat >>confdefs.h <<_ACEOF
12254#define HAVE_DECL_STRTOULL $ac_have_decl
12255_ACEOF
12256
12257 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 12258if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
12259 ac_have_decl=1
12260else
12261 ac_have_decl=0
12262fi
12263
12264cat >>confdefs.h <<_ACEOF
12265#define HAVE_DECL_STRVERSCMP $ac_have_decl
12266_ACEOF
12267
12268
12269
81ecdfbb 12270ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12271if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12272 ac_have_decl=1
12273else
12274 ac_have_decl=0
5ee754fc 12275fi
81ecdfbb
RW
12276
12277cat >>confdefs.h <<_ACEOF
12278#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12279_ACEOF
5ee754fc 12280
5ee754fc 12281
81ecdfbb
RW
12282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12283$as_echo_n "checking for LC_MESSAGES... " >&6; }
d0ac1c44 12284if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12285 $as_echo_n "(cached) " >&6
bec39cab 12286else
81ecdfbb 12287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12288/* end confdefs.h. */
81ecdfbb 12289#include <locale.h>
a9322a30
TT
12290int
12291main ()
12292{
81ecdfbb 12293return LC_MESSAGES
a9322a30
TT
12294 ;
12295 return 0;
12296}
bec39cab 12297_ACEOF
81ecdfbb
RW
12298if ac_fn_c_try_link "$LINENO"; then :
12299 am_cv_val_LC_MESSAGES=yes
bec39cab 12300else
81ecdfbb
RW
12301 am_cv_val_LC_MESSAGES=no
12302fi
12303rm -f core conftest.err conftest.$ac_objext \
12304 conftest$ac_exeext conftest.$ac_ext
12305fi
12306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12307$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12308 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12309
81ecdfbb
RW
12310$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12311
12312 fi
12313
12314
12315# ----------------------- #
12316# Checks for structures. #
12317# ----------------------- #
12318
12319ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 12320if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12321
12322cat >>confdefs.h <<_ACEOF
12323#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12324_ACEOF
7eb368b3 12325
81ecdfbb 12326
7eb368b3 12327fi
81ecdfbb 12328ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 12329if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12330
a9322a30
TT
12331cat >>confdefs.h <<_ACEOF
12332#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12333_ACEOF
12334
a9322a30 12335
7eb368b3
NR
12336fi
12337
7eb368b3 12338
a9322a30
TT
12339# ------------------ #
12340# Checks for types. #
12341# ------------------ #
7eb368b3 12342
81ecdfbb 12343ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12344#include <sys/socket.h>
12345
81ecdfbb 12346"
d0ac1c44 12347if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12348
a9322a30
TT
12349cat >>confdefs.h <<_ACEOF
12350#define HAVE_SOCKLEN_T 1
12351_ACEOF
12352
12353
12354fi
12355
12356
12357# ------------------------------------- #
12358# Checks for compiler characteristics. #
12359# ------------------------------------- #
12360
81ecdfbb
RW
12361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12362$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
d0ac1c44 12363if ${ac_cv_c_const+:} false; then :
81ecdfbb 12364 $as_echo_n "(cached) " >&6
a9322a30 12365else
81ecdfbb 12366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12367/* end confdefs.h. */
a9322a30
TT
12368
12369int
12370main ()
12371{
d0ac1c44 12372
a9322a30 12373#ifndef __cplusplus
d0ac1c44 12374 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12375 typedef int charset[2];
d0ac1c44 12376 const charset cs = { 0, 0 };
a9322a30 12377 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12378 char const *const *pcpcc;
12379 char **ppc;
a9322a30
TT
12380 /* NEC SVR4.0.2 mips cc rejects this. */
12381 struct point {int x, y;};
12382 static struct point const zero = {0,0};
12383 /* AIX XL C 1.02.0.0 rejects this.
12384 It does not let you subtract one const X* pointer from another in
12385 an arm of an if-expression whose if-part is not a constant
12386 expression */
12387 const char *g = "string";
81ecdfbb 12388 pcpcc = &g + (g ? g-g : 0);
a9322a30 12389 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12390 ++pcpcc;
12391 ppc = (char**) pcpcc;
12392 pcpcc = (char const *const *) ppc;
d0ac1c44
SM
12393 { /* SCO 3.2v4 cc rejects this sort of thing. */
12394 char tx;
12395 char *t = &tx;
a9322a30
TT
12396 char const *s = 0 ? (char *) 0 : (char const *) 0;
12397
12398 *t++ = 0;
81ecdfbb 12399 if (s) return 0;
a9322a30
TT
12400 }
12401 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12402 int x[] = {25, 17};
12403 const int *foo = &x[0];
12404 ++foo;
12405 }
12406 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12407 typedef const int *iptr;
12408 iptr p = 0;
12409 ++p;
12410 }
d0ac1c44 12411 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12412 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
d0ac1c44
SM
12413 struct s { int j; const int *ap[3]; } bx;
12414 struct s *b = &bx; b->j = 5;
a9322a30
TT
12415 }
12416 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12417 const int foo = 10;
81ecdfbb 12418 if (!foo) return 0;
a9322a30 12419 }
81ecdfbb 12420 return !cs[0] && !zero.x;
a9322a30
TT
12421#endif
12422
12423 ;
12424 return 0;
12425}
bec39cab 12426_ACEOF
81ecdfbb 12427if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12428 ac_cv_c_const=yes
5ee754fc 12429else
81ecdfbb 12430 ac_cv_c_const=no
5ee754fc 12431fi
81ecdfbb 12432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12433fi
81ecdfbb
RW
12434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12435$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12436if test $ac_cv_c_const = no; then
bec39cab 12437
81ecdfbb 12438$as_echo "#define const /**/" >>confdefs.h
bec39cab 12439
5ee754fc 12440fi
bec39cab 12441
81ecdfbb
RW
12442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12443$as_echo_n "checking for inline... " >&6; }
d0ac1c44 12444if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12445 $as_echo_n "(cached) " >&6
bec39cab 12446else
a9322a30
TT
12447 ac_cv_c_inline=no
12448for ac_kw in inline __inline__ __inline; do
81ecdfbb 12449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12450/* end confdefs.h. */
a9322a30
TT
12451#ifndef __cplusplus
12452typedef int foo_t;
12453static $ac_kw foo_t static_foo () {return 0; }
12454$ac_kw foo_t foo () {return 0; }
12455#endif
12456
bec39cab 12457_ACEOF
81ecdfbb
RW
12458if ac_fn_c_try_compile "$LINENO"; then :
12459 ac_cv_c_inline=$ac_kw
bec39cab 12460fi
81ecdfbb
RW
12461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12462 test "$ac_cv_c_inline" != no && break
a9322a30 12463done
bec39cab 12464
5ee754fc 12465fi
81ecdfbb
RW
12466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12467$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12468
a9322a30
TT
12469case $ac_cv_c_inline in
12470 inline | yes) ;;
12471 *)
12472 case $ac_cv_c_inline in
12473 no) ac_val=;;
12474 *) ac_val=$ac_cv_c_inline;;
12475 esac
12476 cat >>confdefs.h <<_ACEOF
12477#ifndef __cplusplus
12478#define inline $ac_val
12479#endif
12480_ACEOF
bec39cab
AC
12481 ;;
12482esac
bec39cab 12483
81ecdfbb
RW
12484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12485$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12486if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12487 $as_echo_n "(cached) " >&6
bec39cab 12488else
81ecdfbb
RW
12489 ac_cv_c_bigendian=unknown
12490 # See if we're dealing with a universal compiler.
12491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12492/* end confdefs.h. */
12493#ifndef __APPLE_CC__
12494 not a universal capable compiler
12495 #endif
12496 typedef int dummy;
12497
12498_ACEOF
12499if ac_fn_c_try_compile "$LINENO"; then :
12500
12501 # Check for potential -arch flags. It is not universal unless
12502 # there are at least two -arch flags with different values.
12503 ac_arch=
12504 ac_prev=
12505 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12506 if test -n "$ac_prev"; then
12507 case $ac_word in
12508 i?86 | x86_64 | ppc | ppc64)
12509 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12510 ac_arch=$ac_word
12511 else
12512 ac_cv_c_bigendian=universal
12513 break
12514 fi
12515 ;;
12516 esac
12517 ac_prev=
12518 elif test "x$ac_word" = "x-arch"; then
12519 ac_prev=arch
12520 fi
12521 done
12522fi
12523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12524 if test $ac_cv_c_bigendian = unknown; then
12525 # See if sys/param.h defines the BYTE_ORDER macro.
12526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12527/* end confdefs.h. */
a9322a30 12528#include <sys/types.h>
81ecdfbb 12529 #include <sys/param.h>
a9322a30
TT
12530
12531int
12532main ()
12533{
81ecdfbb
RW
12534#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12535 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12536 && LITTLE_ENDIAN)
12537 bogus endian macros
12538 #endif
a9322a30
TT
12539
12540 ;
12541 return 0;
12542}
bec39cab 12543_ACEOF
81ecdfbb 12544if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12545 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12547/* end confdefs.h. */
a9322a30 12548#include <sys/types.h>
81ecdfbb 12549 #include <sys/param.h>
a9322a30
TT
12550
12551int
12552main ()
12553{
12554#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12555 not big endian
12556 #endif
a9322a30
TT
12557
12558 ;
12559 return 0;
12560}
bec39cab 12561_ACEOF
81ecdfbb 12562if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12563 ac_cv_c_bigendian=yes
5ee754fc 12564else
81ecdfbb 12565 ac_cv_c_bigendian=no
5ee754fc 12566fi
81ecdfbb
RW
12567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12568fi
12569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12570 fi
12571 if test $ac_cv_c_bigendian = unknown; then
12572 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12574/* end confdefs.h. */
12575#include <limits.h>
bec39cab 12576
81ecdfbb
RW
12577int
12578main ()
12579{
12580#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12581 bogus endian macros
12582 #endif
12583
12584 ;
12585 return 0;
12586}
7eb368b3 12587_ACEOF
81ecdfbb
RW
12588if ac_fn_c_try_compile "$LINENO"; then :
12589 # It does; now see whether it defined to _BIG_ENDIAN or not.
12590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12591/* end confdefs.h. */
81ecdfbb
RW
12592#include <limits.h>
12593
7eb368b3
NR
12594int
12595main ()
12596{
81ecdfbb
RW
12597#ifndef _BIG_ENDIAN
12598 not big endian
12599 #endif
12600
7eb368b3
NR
12601 ;
12602 return 0;
12603}
12604_ACEOF
81ecdfbb 12605if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12606 ac_cv_c_bigendian=yes
81ecdfbb
RW
12607else
12608 ac_cv_c_bigendian=no
a9322a30 12609fi
81ecdfbb 12610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12611fi
81ecdfbb
RW
12612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12613 fi
12614 if test $ac_cv_c_bigendian = unknown; then
12615 # Compile a test program.
12616 if test "$cross_compiling" = yes; then :
12617 # Try to guess by grepping values from an object file.
12618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12619/* end confdefs.h. */
12620short int ascii_mm[] =
12621 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12622 short int ascii_ii[] =
12623 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12624 int use_ascii (int i) {
12625 return ascii_mm[i] + ascii_ii[i];
12626 }
12627 short int ebcdic_ii[] =
12628 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12629 short int ebcdic_mm[] =
12630 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12631 int use_ebcdic (int i) {
12632 return ebcdic_mm[i] + ebcdic_ii[i];
12633 }
12634 extern int foo;
7eb368b3 12635
81ecdfbb
RW
12636int
12637main ()
12638{
12639return use_ascii (foo) == use_ebcdic (foo);
12640 ;
12641 return 0;
12642}
12643_ACEOF
12644if ac_fn_c_try_compile "$LINENO"; then :
12645 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12646 ac_cv_c_bigendian=yes
12647 fi
12648 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12649 if test "$ac_cv_c_bigendian" = unknown; then
12650 ac_cv_c_bigendian=no
12651 else
12652 # finding both strings is unlikely to happen, but who knows?
12653 ac_cv_c_bigendian=unknown
12654 fi
12655 fi
7eb368b3 12656fi
81ecdfbb 12657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12658else
81ecdfbb 12659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12660/* end confdefs.h. */
81ecdfbb 12661$ac_includes_default
d3ea6809
MM
12662int
12663main ()
12664{
81ecdfbb
RW
12665
12666 /* Are we little or big endian? From Harbison&Steele. */
12667 union
12668 {
12669 long int l;
12670 char c[sizeof (long int)];
12671 } u;
12672 u.l = 1;
12673 return u.c[sizeof (long int) - 1] == 1;
12674
12675 ;
12676 return 0;
d3ea6809
MM
12677}
12678_ACEOF
81ecdfbb 12679if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12680 ac_cv_c_bigendian=no
d3ea6809 12681else
81ecdfbb 12682 ac_cv_c_bigendian=yes
d3ea6809 12683fi
81ecdfbb
RW
12684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12685 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12686fi
a9322a30 12687
81ecdfbb
RW
12688 fi
12689fi
12690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12691$as_echo "$ac_cv_c_bigendian" >&6; }
12692 case $ac_cv_c_bigendian in #(
12693 yes)
12694 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12695;; #(
12696 no)
12697 ;; #(
12698 universal)
12699
12700$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12701
12702 ;; #(
12703 *)
d0ac1c44 12704 as_fn_error $? "unknown endianness
81ecdfbb
RW
12705 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12706 esac
d3ea6809
MM
12707
12708
a9322a30
TT
12709# ------------------------------ #
12710# Checks for library functions. #
12711# ------------------------------ #
d3ea6809 12712
d0ac1c44
SM
12713
12714
12715
12716 for ac_header in $ac_header_list
81ecdfbb
RW
12717do :
12718 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
d0ac1c44
SM
12719ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12720"
12721if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12722 cat >>confdefs.h <<_ACEOF
81ecdfbb 12723#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12724_ACEOF
b757528f 12725
b757528f 12726fi
bec39cab 12727
a9322a30 12728done
a3828db0 12729
d0ac1c44
SM
12730
12731
12732
12733
12734
12735
12736
a9322a30 12737for ac_func in getpagesize
81ecdfbb
RW
12738do :
12739 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12740if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12741 cat >>confdefs.h <<_ACEOF
81ecdfbb 12742#define HAVE_GETPAGESIZE 1
bec39cab 12743_ACEOF
bcb3dc3d 12744
bcb3dc3d
MK
12745fi
12746done
12747
81ecdfbb
RW
12748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12749$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12750if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12751 $as_echo_n "(cached) " >&6
a9322a30 12752else
81ecdfbb 12753 if test "$cross_compiling" = yes; then :
a9322a30 12754 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12755else
81ecdfbb 12756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12757/* end confdefs.h. */
a9322a30
TT
12758$ac_includes_default
12759/* malloc might have been renamed as rpl_malloc. */
12760#undef malloc
bec39cab 12761
a9322a30
TT
12762/* Thanks to Mike Haertel and Jim Avera for this test.
12763 Here is a matrix of mmap possibilities:
12764 mmap private not fixed
12765 mmap private fixed at somewhere currently unmapped
12766 mmap private fixed at somewhere already mapped
12767 mmap shared not fixed
12768 mmap shared fixed at somewhere currently unmapped
12769 mmap shared fixed at somewhere already mapped
12770 For private mappings, we should verify that changes cannot be read()
12771 back from the file, nor mmap's back from the file at a different
12772 address. (There have been systems where private was not correctly
12773 implemented like the infamous i386 svr4.0, and systems where the
12774 VM page cache was not coherent with the file system buffer cache
12775 like early versions of FreeBSD and possibly contemporary NetBSD.)
12776 For shared mappings, we should conversely verify that changes get
12777 propagated back to all the places they're supposed to be.
bec39cab 12778
a9322a30
TT
12779 Grep wants private fixed already mapped.
12780 The main things grep needs to know about mmap are:
12781 * does it exist and is it safe to write into the mmap'd area
12782 * how to use it (BSD variants) */
8b9cf735 12783
a9322a30
TT
12784#include <fcntl.h>
12785#include <sys/mman.h>
8b9cf735 12786
81ecdfbb 12787#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12788char *malloc ();
a3828db0
MK
12789#endif
12790
a9322a30 12791/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12792#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12793# ifdef _SC_PAGESIZE
12794# define getpagesize() sysconf(_SC_PAGESIZE)
12795# else /* no _SC_PAGESIZE */
81ecdfbb 12796# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12797# include <sys/param.h>
12798# ifdef EXEC_PAGESIZE
12799# define getpagesize() EXEC_PAGESIZE
12800# else /* no EXEC_PAGESIZE */
12801# ifdef NBPG
12802# define getpagesize() NBPG * CLSIZE
12803# ifndef CLSIZE
12804# define CLSIZE 1
12805# endif /* no CLSIZE */
12806# else /* no NBPG */
12807# ifdef NBPC
12808# define getpagesize() NBPC
12809# else /* no NBPC */
12810# ifdef PAGESIZE
12811# define getpagesize() PAGESIZE
12812# endif /* PAGESIZE */
12813# endif /* no NBPC */
12814# endif /* no NBPG */
12815# endif /* no EXEC_PAGESIZE */
12816# else /* no HAVE_SYS_PARAM_H */
12817# define getpagesize() 8192 /* punt totally */
12818# endif /* no HAVE_SYS_PARAM_H */
12819# endif /* no _SC_PAGESIZE */
12820
12821#endif /* no HAVE_GETPAGESIZE */
12822
bec39cab
AC
12823int
12824main ()
12825{
a9322a30 12826 char *data, *data2, *data3;
d0ac1c44 12827 const char *cdata2;
a9322a30 12828 int i, pagesize;
d0ac1c44 12829 int fd, fd2;
a9322a30
TT
12830
12831 pagesize = getpagesize ();
12832
12833 /* First, make a file with some known garbage in it. */
12834 data = (char *) malloc (pagesize);
12835 if (!data)
81ecdfbb 12836 return 1;
a9322a30
TT
12837 for (i = 0; i < pagesize; ++i)
12838 *(data + i) = rand ();
12839 umask (0);
12840 fd = creat ("conftest.mmap", 0600);
12841 if (fd < 0)
d0ac1c44 12842 return 2;
a9322a30 12843 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 12844 return 3;
a9322a30
TT
12845 close (fd);
12846
d0ac1c44
SM
12847 /* Next, check that the tail of a page is zero-filled. File must have
12848 non-zero length, otherwise we risk SIGBUS for entire page. */
12849 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12850 if (fd2 < 0)
12851 return 4;
12852 cdata2 = "";
12853 if (write (fd2, cdata2, 1) != 1)
12854 return 5;
12855 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12856 if (data2 == MAP_FAILED)
12857 return 6;
12858 for (i = 0; i < pagesize; ++i)
12859 if (*(data2 + i))
12860 return 7;
12861 close (fd2);
12862 if (munmap (data2, pagesize))
12863 return 8;
12864
a9322a30
TT
12865 /* Next, try to mmap the file at a fixed address which already has
12866 something else allocated at it. If we can, also make sure that
12867 we see the same garbage. */
12868 fd = open ("conftest.mmap", O_RDWR);
12869 if (fd < 0)
d0ac1c44 12870 return 9;
a9322a30
TT
12871 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12872 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 12873 return 10;
a9322a30
TT
12874 for (i = 0; i < pagesize; ++i)
12875 if (*(data + i) != *(data2 + i))
d0ac1c44 12876 return 11;
a9322a30
TT
12877
12878 /* Finally, make sure that changes to the mapped area do not
12879 percolate back to the file as seen by read(). (This is a bug on
12880 some variants of i386 svr4.0.) */
12881 for (i = 0; i < pagesize; ++i)
12882 *(data2 + i) = *(data2 + i) + 1;
12883 data3 = (char *) malloc (pagesize);
12884 if (!data3)
d0ac1c44 12885 return 12;
a9322a30 12886 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 12887 return 13;
a9322a30
TT
12888 for (i = 0; i < pagesize; ++i)
12889 if (*(data + i) != *(data3 + i))
d0ac1c44 12890 return 14;
a9322a30 12891 close (fd);
81ecdfbb 12892 return 0;
bec39cab
AC
12893}
12894_ACEOF
81ecdfbb 12895if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12896 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12897else
81ecdfbb 12898 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12899fi
81ecdfbb
RW
12900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12901 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12902fi
81ecdfbb 12903
a9322a30 12904fi
81ecdfbb
RW
12905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12906$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12907if test $ac_cv_func_mmap_fixed_mapped = yes; then
12908
81ecdfbb 12909$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12910
086ec9eb 12911fi
d0ac1c44 12912rm -f conftest.mmap conftest.txt
a3828db0 12913
81ecdfbb 12914ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 12915if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 12916
a9322a30
TT
12917else
12918
12919cat >>confdefs.h <<_ACEOF
12920#define pid_t int
bec39cab 12921_ACEOF
086ec9eb
MK
12922
12923fi
12924
81ecdfbb
RW
12925for ac_header in vfork.h
12926do :
12927 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 12928if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 12929 cat >>confdefs.h <<_ACEOF
81ecdfbb 12930#define HAVE_VFORK_H 1
bec39cab 12931_ACEOF
c906108c
SS
12932
12933fi
a9322a30 12934
a3828db0 12935done
c906108c 12936
a9322a30 12937for ac_func in fork vfork
81ecdfbb
RW
12938do :
12939 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12940ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 12941if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 12942 cat >>confdefs.h <<_ACEOF
81ecdfbb 12943#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12944_ACEOF
b83266a0 12945
97bf5e38 12946fi
a3828db0 12947done
b83266a0 12948
a9322a30 12949if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12951$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 12952if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 12953 $as_echo_n "(cached) " >&6
a9322a30 12954else
81ecdfbb 12955 if test "$cross_compiling" = yes; then :
a9322a30
TT
12956 ac_cv_func_fork_works=cross
12957else
81ecdfbb
RW
12958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12959/* end confdefs.h. */
12960$ac_includes_default
12961int
12962main ()
12963{
12964
12965 /* By Ruediger Kuhlmann. */
12966 return fork () < 0;
12967
12968 ;
12969 return 0;
12970}
a9322a30 12971_ACEOF
81ecdfbb 12972if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12973 ac_cv_func_fork_works=yes
12974else
81ecdfbb 12975 ac_cv_func_fork_works=no
a9322a30 12976fi
81ecdfbb
RW
12977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12978 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12979fi
81ecdfbb 12980
a9322a30 12981fi
81ecdfbb
RW
12982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12983$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12984
12985else
12986 ac_cv_func_fork_works=$ac_cv_func_fork
12987fi
12988if test "x$ac_cv_func_fork_works" = xcross; then
12989 case $host in
12990 *-*-amigaos* | *-*-msdosdjgpp*)
12991 # Override, as these systems have only a dummy fork() stub
12992 ac_cv_func_fork_works=no
12993 ;;
12994 *)
12995 ac_cv_func_fork_works=yes
12996 ;;
12997 esac
81ecdfbb
RW
12998 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12999$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13000fi
13001ac_cv_func_vfork_works=$ac_cv_func_vfork
13002if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13004$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13005if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13006 $as_echo_n "(cached) " >&6
a9322a30 13007else
81ecdfbb 13008 if test "$cross_compiling" = yes; then :
a9322a30
TT
13009 ac_cv_func_vfork_works=cross
13010else
81ecdfbb 13011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13012/* end confdefs.h. */
13013/* Thanks to Paul Eggert for this test. */
81ecdfbb 13014$ac_includes_default
a9322a30 13015#include <sys/wait.h>
81ecdfbb 13016#ifdef HAVE_VFORK_H
a9322a30
TT
13017# include <vfork.h>
13018#endif
13019/* On some sparc systems, changes by the child to local and incoming
13020 argument registers are propagated back to the parent. The compiler
13021 is told about this with #include <vfork.h>, but some compilers
13022 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13023 static variable whose address is put into a register that is
13024 clobbered by the vfork. */
13025static void
13026#ifdef __cplusplus
13027sparc_address_test (int arg)
13028# else
13029sparc_address_test (arg) int arg;
13030#endif
13031{
13032 static pid_t child;
13033 if (!child) {
13034 child = vfork ();
13035 if (child < 0) {
13036 perror ("vfork");
13037 _exit(2);
13038 }
13039 if (!child) {
13040 arg = getpid();
13041 write(-1, "", 0);
13042 _exit (arg);
13043 }
13044 }
13045}
13046
13047int
13048main ()
13049{
13050 pid_t parent = getpid ();
13051 pid_t child;
13052
13053 sparc_address_test (0);
13054
13055 child = vfork ();
13056
13057 if (child == 0) {
13058 /* Here is another test for sparc vfork register problems. This
13059 test uses lots of local variables, at least as many local
13060 variables as main has allocated so far including compiler
13061 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13062 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13063 reuse the register of parent for one of the local variables,
13064 since it will think that parent can't possibly be used any more
13065 in this routine. Assigning to the local variable will thus
13066 munge parent in the parent process. */
13067 pid_t
13068 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13069 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13070 /* Convince the compiler that p..p7 are live; otherwise, it might
13071 use the same hardware register for all 8 local variables. */
13072 if (p != p1 || p != p2 || p != p3 || p != p4
13073 || p != p5 || p != p6 || p != p7)
13074 _exit(1);
13075
13076 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13077 from child file descriptors. If the child closes a descriptor
13078 before it execs or exits, this munges the parent's descriptor
13079 as well. Test for this by closing stdout in the child. */
13080 _exit(close(fileno(stdout)) != 0);
13081 } else {
13082 int status;
13083 struct stat st;
13084
13085 while (wait(&status) != child)
13086 ;
81ecdfbb 13087 return (
a9322a30
TT
13088 /* Was there some problem with vforking? */
13089 child < 0
13090
13091 /* Did the child fail? (This shouldn't happen.) */
13092 || status
13093
13094 /* Did the vfork/compiler bug occur? */
13095 || parent != getpid()
13096
13097 /* Did the file descriptor bug occur? */
13098 || fstat(fileno(stdout), &st) != 0
13099 );
13100 }
13101}
13102_ACEOF
81ecdfbb 13103if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13104 ac_cv_func_vfork_works=yes
13105else
81ecdfbb 13106 ac_cv_func_vfork_works=no
a9322a30 13107fi
81ecdfbb
RW
13108rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13109 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13110fi
81ecdfbb 13111
a9322a30 13112fi
81ecdfbb
RW
13113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13114$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13115
13116fi;
13117if test "x$ac_cv_func_fork_works" = xcross; then
13118 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13119 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13120$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13121fi
13122
13123if test "x$ac_cv_func_vfork_works" = xyes; then
13124
81ecdfbb 13125$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13126
13127else
13128
81ecdfbb 13129$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13130
13131fi
13132if test "x$ac_cv_func_fork_works" = xyes; then
13133
81ecdfbb 13134$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13135
13136fi
13137
cdf43629 13138for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13139 pipe poll pread pread64 pwrite resize_term \
e671cd59 13140 sbrk getpgid setpgid setpgrp setsid \
c12d372d 13141 sigaction sigsetmask socketpair \
110ed339 13142 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13143 setrlimit getrlimit posix_madvise waitpid \
e48f6033 13144 ptrace64 sigaltstack setns use_default_colors
81ecdfbb
RW
13145do :
13146 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13147ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13148if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13149 cat >>confdefs.h <<_ACEOF
81ecdfbb 13150#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13151_ACEOF
13152
13153fi
13154done
13155
13156
81ecdfbb
RW
13157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13158$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13159if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13160 $as_echo_n "(cached) " >&6
6c7a06a3 13161else
81ecdfbb 13162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13163/* end confdefs.h. */
13164#include <langinfo.h>
13165int
13166main ()
13167{
13168char* cs = nl_langinfo(CODESET);
bec39cab
AC
13169 ;
13170 return 0;
13171}
13172_ACEOF
81ecdfbb 13173if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13174 am_cv_langinfo_codeset=yes
a4db0f07 13175else
81ecdfbb 13176 am_cv_langinfo_codeset=no
a4db0f07 13177fi
81ecdfbb
RW
13178rm -f core conftest.err conftest.$ac_objext \
13179 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13180
a4db0f07 13181fi
81ecdfbb
RW
13182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13183$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13184 if test $am_cv_langinfo_codeset = yes; then
13185
81ecdfbb 13186$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13187
6c7a06a3 13188 fi
c906108c 13189
d0ac1c44
SM
13190ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13191if test "x$ac_cv_type_size_t" = xyes; then :
13192
13193else
13194
13195cat >>confdefs.h <<_ACEOF
13196#define size_t unsigned int
13197_ACEOF
13198
13199fi
13200
5e030278
TT
13201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13202$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13203if ${ac_cv_path_SED+:} false; then :
13204 $as_echo_n "(cached) " >&6
13205else
13206 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13207 for ac_i in 1 2 3 4 5 6 7; do
13208 ac_script="$ac_script$as_nl$ac_script"
13209 done
13210 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13211 { ac_script=; unset ac_script;}
13212 if test -z "$SED"; then
13213 ac_path_SED_found=false
13214 # Loop through the user's path and test for each of PROGNAME-LIST
13215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13216for as_dir in $PATH
13217do
13218 IFS=$as_save_IFS
13219 test -z "$as_dir" && as_dir=.
13220 for ac_prog in sed gsed; do
13221 for ac_exec_ext in '' $ac_executable_extensions; do
13222 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13223 as_fn_executable_p "$ac_path_SED" || continue
13224# Check for GNU ac_path_SED and select it if it is found.
13225 # Check for GNU $ac_path_SED
13226case `"$ac_path_SED" --version 2>&1` in
13227*GNU*)
13228 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13229*)
13230 ac_count=0
13231 $as_echo_n 0123456789 >"conftest.in"
13232 while :
13233 do
13234 cat "conftest.in" "conftest.in" >"conftest.tmp"
13235 mv "conftest.tmp" "conftest.in"
13236 cp "conftest.in" "conftest.nl"
13237 $as_echo '' >> "conftest.nl"
13238 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13239 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13240 as_fn_arith $ac_count + 1 && ac_count=$as_val
13241 if test $ac_count -gt ${ac_path_SED_max-0}; then
13242 # Best one so far, save it but keep looking for a better one
13243 ac_cv_path_SED="$ac_path_SED"
13244 ac_path_SED_max=$ac_count
13245 fi
13246 # 10*(2^10) chars as input seems more than enough
13247 test $ac_count -gt 10 && break
13248 done
13249 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13250esac
13251
13252 $ac_path_SED_found && break 3
13253 done
13254 done
13255 done
13256IFS=$as_save_IFS
13257 if test -z "$ac_cv_path_SED"; then
13258 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13259 fi
13260else
13261 ac_cv_path_SED=$SED
13262fi
13263
13264fi
13265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13266$as_echo "$ac_cv_path_SED" >&6; }
13267 SED="$ac_cv_path_SED"
13268 rm -f conftest.sed
13269
06825bd1 13270
3266f10b
TT
13271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13272$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 13273if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13274 $as_echo_n "(cached) " >&6
13275else
13276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13277/* end confdefs.h. */
13278#include <stdlib.h>
13279#include <stdarg.h>
13280#include <string.h>
13281#include <float.h>
13282
13283int
13284main ()
13285{
13286
13287 ;
13288 return 0;
13289}
13290_ACEOF
13291if ac_fn_c_try_compile "$LINENO"; then :
13292 ac_cv_header_stdc=yes
13293else
13294 ac_cv_header_stdc=no
13295fi
13296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13297
13298if test $ac_cv_header_stdc = yes; then
13299 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13301/* end confdefs.h. */
13302#include <string.h>
13303
13304_ACEOF
13305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13306 $EGREP "memchr" >/dev/null 2>&1; then :
13307
13308else
13309 ac_cv_header_stdc=no
13310fi
13311rm -f conftest*
13312
13313fi
13314
13315if test $ac_cv_header_stdc = yes; then
13316 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13318/* end confdefs.h. */
13319#include <stdlib.h>
13320
13321_ACEOF
13322if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13323 $EGREP "free" >/dev/null 2>&1; then :
13324
13325else
13326 ac_cv_header_stdc=no
13327fi
13328rm -f conftest*
13329
13330fi
13331
13332if test $ac_cv_header_stdc = yes; then
13333 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13334 if test "$cross_compiling" = yes; then :
13335 :
13336else
13337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13338/* end confdefs.h. */
13339#include <ctype.h>
13340#include <stdlib.h>
13341#if ((' ' & 0x0FF) == 0x020)
13342# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13343# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13344#else
13345# define ISLOWER(c) \
13346 (('a' <= (c) && (c) <= 'i') \
13347 || ('j' <= (c) && (c) <= 'r') \
13348 || ('s' <= (c) && (c) <= 'z'))
13349# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13350#endif
13351
13352#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13353int
13354main ()
13355{
13356 int i;
13357 for (i = 0; i < 256; i++)
13358 if (XOR (islower (i), ISLOWER (i))
13359 || toupper (i) != TOUPPER (i))
13360 return 2;
13361 return 0;
13362}
13363_ACEOF
13364if ac_fn_c_try_run "$LINENO"; then :
13365
13366else
13367 ac_cv_header_stdc=no
13368fi
13369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13370 conftest.$ac_objext conftest.beam conftest.$ac_ext
13371fi
13372
13373fi
13374fi
13375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13376$as_echo "$ac_cv_header_stdc" >&6; }
13377if test $ac_cv_header_stdc = yes; then
13378
13379$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13380
3266f10b
TT
13381fi
13382
13383 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13384# for constant arguments. Useless!
13385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13386$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 13387if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13388 $as_echo_n "(cached) " >&6
13389else
13390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13391/* end confdefs.h. */
13392#include <alloca.h>
13393int
13394main ()
13395{
13396char *p = (char *) alloca (2 * sizeof (int));
13397 if (p) return 0;
13398 ;
13399 return 0;
13400}
13401_ACEOF
13402if ac_fn_c_try_link "$LINENO"; then :
13403 ac_cv_working_alloca_h=yes
13404else
13405 ac_cv_working_alloca_h=no
13406fi
13407rm -f core conftest.err conftest.$ac_objext \
13408 conftest$ac_exeext conftest.$ac_ext
13409fi
13410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13411$as_echo "$ac_cv_working_alloca_h" >&6; }
13412if test $ac_cv_working_alloca_h = yes; then
13413
13414$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13415
13416fi
13417
13418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13419$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 13420if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13421 $as_echo_n "(cached) " >&6
13422else
13423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13424/* end confdefs.h. */
13425#ifdef __GNUC__
13426# define alloca __builtin_alloca
13427#else
13428# ifdef _MSC_VER
13429# include <malloc.h>
13430# define alloca _alloca
13431# else
13432# ifdef HAVE_ALLOCA_H
13433# include <alloca.h>
13434# else
13435# ifdef _AIX
13436 #pragma alloca
13437# else
13438# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 13439void *alloca (size_t);
3266f10b
TT
13440# endif
13441# endif
13442# endif
13443# endif
13444#endif
13445
13446int
13447main ()
13448{
13449char *p = (char *) alloca (1);
13450 if (p) return 0;
13451 ;
13452 return 0;
13453}
13454_ACEOF
13455if ac_fn_c_try_link "$LINENO"; then :
13456 ac_cv_func_alloca_works=yes
13457else
13458 ac_cv_func_alloca_works=no
13459fi
13460rm -f core conftest.err conftest.$ac_objext \
13461 conftest$ac_exeext conftest.$ac_ext
13462fi
13463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13464$as_echo "$ac_cv_func_alloca_works" >&6; }
13465
13466if test $ac_cv_func_alloca_works = yes; then
13467
13468$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13469
13470else
13471 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13472# that cause trouble. Some versions do not even contain alloca or
13473# contain a buggy version. If you still want to use their alloca,
13474# use ar to extract alloca.o from them instead of compiling alloca.c.
13475
13476ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13477
13478$as_echo "#define C_ALLOCA 1" >>confdefs.h
13479
13480
13481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13482$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 13483if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13484 $as_echo_n "(cached) " >&6
13485else
13486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13487/* end confdefs.h. */
13488#if defined CRAY && ! defined CRAY2
13489webecray
13490#else
13491wenotbecray
13492#endif
13493
13494_ACEOF
13495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13496 $EGREP "webecray" >/dev/null 2>&1; then :
13497 ac_cv_os_cray=yes
13498else
13499 ac_cv_os_cray=no
13500fi
13501rm -f conftest*
13502
13503fi
13504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13505$as_echo "$ac_cv_os_cray" >&6; }
13506if test $ac_cv_os_cray = yes; then
13507 for ac_func in _getb67 GETB67 getb67; do
13508 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13509ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13510if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13511
13512cat >>confdefs.h <<_ACEOF
13513#define CRAY_STACKSEG_END $ac_func
13514_ACEOF
13515
13516 break
13517fi
13518
13519 done
13520fi
13521
13522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13523$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 13524if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13525 $as_echo_n "(cached) " >&6
13526else
13527 if test "$cross_compiling" = yes; then :
13528 ac_cv_c_stack_direction=0
13529else
13530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13531/* end confdefs.h. */
13532$ac_includes_default
13533int
d0ac1c44 13534find_stack_direction (int *addr, int depth)
3266f10b 13535{
d0ac1c44
SM
13536 int dir, dummy = 0;
13537 if (! addr)
13538 addr = &dummy;
13539 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13540 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13541 return dir + dummy;
3266f10b
TT
13542}
13543
13544int
d0ac1c44 13545main (int argc, char **argv)
3266f10b 13546{
d0ac1c44 13547 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13548}
13549_ACEOF
13550if ac_fn_c_try_run "$LINENO"; then :
13551 ac_cv_c_stack_direction=1
13552else
13553 ac_cv_c_stack_direction=-1
13554fi
13555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13556 conftest.$ac_objext conftest.beam conftest.$ac_ext
13557fi
13558
13559fi
13560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13561$as_echo "$ac_cv_c_stack_direction" >&6; }
13562cat >>confdefs.h <<_ACEOF
13563#define STACK_DIRECTION $ac_cv_c_stack_direction
13564_ACEOF
13565
13566
13567fi
13568
13569
13570
13571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13572$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13573if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13574 $as_echo_n "(cached) " >&6
13575else
13576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13577/* end confdefs.h. */
13578#include <langinfo.h>
13579int
13580main ()
13581{
13582char* cs = nl_langinfo(CODESET);
13583 ;
13584 return 0;
13585}
13586_ACEOF
13587if ac_fn_c_try_link "$LINENO"; then :
13588 am_cv_langinfo_codeset=yes
13589else
13590 am_cv_langinfo_codeset=no
13591fi
13592rm -f core conftest.err conftest.$ac_objext \
13593 conftest$ac_exeext conftest.$ac_ext
13594
13595fi
13596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13597$as_echo "$am_cv_langinfo_codeset" >&6; }
13598 if test $am_cv_langinfo_codeset = yes; then
13599
13600$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13601
13602 fi
13603
13604
2d41fa11 13605 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h
3266f10b
TT
13606do :
13607 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13608ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13609if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13610 cat >>confdefs.h <<_ACEOF
13611#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13612_ACEOF
13613
13614fi
13615
13616done
13617
13618
c12d372d 13619 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
5abebf3c 13620 sigprocmask
3266f10b
TT
13621do :
13622 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13623ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13624if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13625 cat >>confdefs.h <<_ACEOF
13626#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13627_ACEOF
13628
13629fi
13630done
13631
13632
ab7d13f0 13633 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 13634if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13635 ac_have_decl=1
13636else
13637 ac_have_decl=0
13638fi
13639
13640cat >>confdefs.h <<_ACEOF
13641#define HAVE_DECL_STRSTR $ac_have_decl
13642_ACEOF
13643
13644
5e030278
TT
13645 # Check for std::thread. This does not work on some platforms, like
13646 # mingw and DJGPP.
13647 ac_ext=cpp
13648ac_cpp='$CXXCPP $CPPFLAGS'
13649ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13650ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13651ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13652
13653
13654
13655
13656
13657ac_ext=c
13658ac_cpp='$CPP $CPPFLAGS'
13659ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13660ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13661ac_compiler_gnu=$ac_cv_c_compiler_gnu
13662
13663ax_pthread_ok=no
13664
13665# We used to check for pthread.h first, but this fails if pthread.h
13666# requires special compiler flags (e.g. on Tru64 or Sequent).
13667# It gets checked for in the link test anyway.
13668
13669# First of all, check if the user has set any of the PTHREAD_LIBS,
13670# etcetera environment variables, and if threads linking works using
13671# them:
13672if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13673 ax_pthread_save_CC="$CC"
13674 ax_pthread_save_CFLAGS="$CFLAGS"
13675 ax_pthread_save_LIBS="$LIBS"
13676 if test "x$PTHREAD_CC" != "x"; then :
13677 CC="$PTHREAD_CC"
13678fi
13679 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13680 LIBS="$PTHREAD_LIBS $LIBS"
13681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13682$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13684/* end confdefs.h. */
13685
13686/* Override any GCC internal prototype to avoid an error.
13687 Use char because int might match the return type of a GCC
13688 builtin and then its argument prototype would still apply. */
13689#ifdef __cplusplus
13690extern "C"
13691#endif
13692char pthread_join ();
13693int
13694main ()
13695{
13696return pthread_join ();
13697 ;
13698 return 0;
13699}
13700_ACEOF
13701if ac_fn_c_try_link "$LINENO"; then :
13702 ax_pthread_ok=yes
13703fi
13704rm -f core conftest.err conftest.$ac_objext \
13705 conftest$ac_exeext conftest.$ac_ext
13706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13707$as_echo "$ax_pthread_ok" >&6; }
13708 if test "x$ax_pthread_ok" = "xno"; then
13709 PTHREAD_LIBS=""
13710 PTHREAD_CFLAGS=""
13711 fi
13712 CC="$ax_pthread_save_CC"
13713 CFLAGS="$ax_pthread_save_CFLAGS"
13714 LIBS="$ax_pthread_save_LIBS"
13715fi
13716
13717# We must check for the threads library under a number of different
13718# names; the ordering is very important because some systems
13719# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13720# libraries is broken (non-POSIX).
13721
13722# Create a list of thread flags to try. Items starting with a "-" are
13723# C compiler flags, and other items are library names, except for "none"
13724# which indicates that we try without any flags at all, and "pthread-config"
13725# which is a program returning the flags for the Pth emulation library.
13726
13727ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
13728
13729# The ordering *is* (sometimes) important. Some notes on the
13730# individual items follow:
13731
13732# pthreads: AIX (must check this before -lpthread)
13733# none: in case threads are in libc; should be tried before -Kthread and
13734# other compiler flags to prevent continual compiler warnings
13735# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13736# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13737# (Note: HP C rejects this with "bad form for `-t' option")
13738# -pthreads: Solaris/gcc (Note: HP C also rejects)
13739# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13740# doesn't hurt to check since this sometimes defines pthreads and
13741# -D_REENTRANT too), HP C (must be checked before -lpthread, which
13742# is present but should not be used directly; and before -mthreads,
13743# because the compiler interprets this as "-mt" + "-hreads")
13744# -mthreads: Mingw32/gcc, Lynx/gcc
13745# pthread: Linux, etcetera
13746# --thread-safe: KAI C++
13747# pthread-config: use pthread-config program (for GNU Pth library)
13748
13749case $host_os in
13750
13751 freebsd*)
13752
13753 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13754 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
13755
13756 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13757 ;;
13758
13759 hpux*)
13760
13761 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13762 # multi-threading and also sets -lpthread."
13763
13764 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13765 ;;
13766
13767 openedition*)
13768
13769 # IBM z/OS requires a feature-test macro to be defined in order to
13770 # enable POSIX threads at all, so give the user a hint if this is
13771 # not set. (We don't define these ourselves, as they can affect
13772 # other portions of the system API in unpredictable ways.)
13773
13774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13775/* end confdefs.h. */
13776
13777# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13778 AX_PTHREAD_ZOS_MISSING
13779# endif
13780
13781_ACEOF
13782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13783 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13785$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
13786fi
13787rm -f conftest*
13788
13789 ;;
13790
13791 solaris*)
13792
13793 # On Solaris (at least, for some versions), libc contains stubbed
13794 # (non-functional) versions of the pthreads routines, so link-based
13795 # tests will erroneously succeed. (N.B.: The stubs are missing
13796 # pthread_cleanup_push, or rather a function called by this macro,
13797 # so we could check for that, but who knows whether they'll stub
13798 # that too in a future libc.) So we'll check first for the
13799 # standard Solaris way of linking pthreads (-mt -lpthread).
13800
13801 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13802 ;;
13803esac
13804
13805# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13806
13807if test "x$GCC" = "xyes"; then :
13808 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
13809fi
13810
13811# The presence of a feature test macro requesting re-entrant function
13812# definitions is, on some systems, a strong hint that pthreads support is
13813# correctly enabled
13814
13815case $host_os in
13816 darwin* | hpux* | linux* | osf* | solaris*)
13817 ax_pthread_check_macro="_REENTRANT"
13818 ;;
13819
13820 aix*)
13821 ax_pthread_check_macro="_THREAD_SAFE"
13822 ;;
13823
13824 *)
13825 ax_pthread_check_macro="--"
13826 ;;
13827esac
13828if test "x$ax_pthread_check_macro" = "x--"; then :
13829 ax_pthread_check_cond=0
13830else
13831 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
13832fi
13833
13834# Are we compiling with Clang?
13835
13836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13837$as_echo_n "checking whether $CC is Clang... " >&6; }
13838if ${ax_cv_PTHREAD_CLANG+:} false; then :
13839 $as_echo_n "(cached) " >&6
13840else
13841 ax_cv_PTHREAD_CLANG=no
13842 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13843 if test "x$GCC" = "xyes"; then
13844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13845/* end confdefs.h. */
13846/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13847# if defined(__clang__) && defined(__llvm__)
13848 AX_PTHREAD_CC_IS_CLANG
13849# endif
13850
13851_ACEOF
13852if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13853 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13854 ax_cv_PTHREAD_CLANG=yes
13855fi
13856rm -f conftest*
13857
13858 fi
13859
13860fi
13861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13862$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13863ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
13864
13865ax_pthread_clang_warning=no
13866
13867# Clang needs special handling, because older versions handle the -pthread
13868# option in a rather... idiosyncratic way
13869
13870if test "x$ax_pthread_clang" = "xyes"; then
13871
13872 # Clang takes -pthread; it has never supported any other flag
13873
13874 # (Note 1: This will need to be revisited if a system that Clang
13875 # supports has POSIX threads in a separate library. This tends not
13876 # to be the way of modern systems, but it's conceivable.)
13877
13878 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13879 # to get POSIX threads support; the API is always present and
13880 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13881 # -pthread does define _REENTRANT, and while the Darwin headers
13882 # ignore this macro, third-party headers might not.)
13883
13884 PTHREAD_CFLAGS="-pthread"
13885 PTHREAD_LIBS=
13886
13887 ax_pthread_ok=yes
13888
13889 # However, older versions of Clang make a point of warning the user
13890 # that, in an invocation where only linking and no compilation is
13891 # taking place, the -pthread option has no effect ("argument unused
13892 # during compilation"). They expect -pthread to be passed in only
13893 # when source code is being compiled.
13894 #
13895 # Problem is, this is at odds with the way Automake and most other
13896 # C build frameworks function, which is that the same flags used in
13897 # compilation (CFLAGS) are also used in linking. Many systems
13898 # supported by AX_PTHREAD require exactly this for POSIX threads
13899 # support, and in fact it is often not straightforward to specify a
13900 # flag that is used only in the compilation phase and not in
13901 # linking. Such a scenario is extremely rare in practice.
13902 #
13903 # Even though use of the -pthread flag in linking would only print
13904 # a warning, this can be a nuisance for well-run software projects
13905 # that build with -Werror. So if the active version of Clang has
13906 # this misfeature, we search for an option to squash it.
13907
13908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13909$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13910if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13911 $as_echo_n "(cached) " >&6
13912else
13913 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13914 # Create an alternate version of $ac_link that compiles and
13915 # links in two steps (.c -> .o, .o -> exe) instead of one
13916 # (.c -> exe), because the warning occurs only in the second
13917 # step
13918 ax_pthread_save_ac_link="$ac_link"
13919 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13920 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13921 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13922 ax_pthread_save_CFLAGS="$CFLAGS"
13923 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13924 if test "x$ax_pthread_try" = "xunknown"; then :
13925 break
13926fi
13927 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13928 ac_link="$ax_pthread_save_ac_link"
13929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13930/* end confdefs.h. */
13931int main(void){return 0;}
13932_ACEOF
13933if ac_fn_c_try_link "$LINENO"; then :
13934 ac_link="$ax_pthread_2step_ac_link"
13935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13936/* end confdefs.h. */
13937int main(void){return 0;}
13938_ACEOF
13939if ac_fn_c_try_link "$LINENO"; then :
13940 break
13941fi
13942rm -f core conftest.err conftest.$ac_objext \
13943 conftest$ac_exeext conftest.$ac_ext
13944
13945fi
13946rm -f core conftest.err conftest.$ac_objext \
13947 conftest$ac_exeext conftest.$ac_ext
13948 done
13949 ac_link="$ax_pthread_save_ac_link"
13950 CFLAGS="$ax_pthread_save_CFLAGS"
13951 if test "x$ax_pthread_try" = "x"; then :
13952 ax_pthread_try=no
13953fi
13954 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
13955
13956fi
13957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13958$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
13959
13960 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13961 no | unknown) ;;
13962 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13963 esac
13964
13965fi # $ax_pthread_clang = yes
13966
13967if test "x$ax_pthread_ok" = "xno"; then
13968for ax_pthread_try_flag in $ax_pthread_flags; do
13969
13970 case $ax_pthread_try_flag in
13971 none)
13972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13973$as_echo_n "checking whether pthreads work without any flags... " >&6; }
13974 ;;
13975
13976 -mt,pthread)
13977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13978$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13979 PTHREAD_CFLAGS="-mt"
13980 PTHREAD_LIBS="-lpthread"
13981 ;;
13982
13983 -*)
13984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13985$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13986 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13987 ;;
13988
13989 pthread-config)
13990 # Extract the first word of "pthread-config", so it can be a program name with args.
13991set dummy pthread-config; ac_word=$2
13992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13993$as_echo_n "checking for $ac_word... " >&6; }
13994if ${ac_cv_prog_ax_pthread_config+:} false; then :
13995 $as_echo_n "(cached) " >&6
13996else
13997 if test -n "$ax_pthread_config"; then
13998 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13999else
14000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14001for as_dir in $PATH
14002do
14003 IFS=$as_save_IFS
14004 test -z "$as_dir" && as_dir=.
14005 for ac_exec_ext in '' $ac_executable_extensions; do
14006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14007 ac_cv_prog_ax_pthread_config="yes"
14008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14009 break 2
14010 fi
14011done
14012 done
14013IFS=$as_save_IFS
14014
14015 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
14016fi
14017fi
14018ax_pthread_config=$ac_cv_prog_ax_pthread_config
14019if test -n "$ax_pthread_config"; then
14020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
14021$as_echo "$ax_pthread_config" >&6; }
14022else
14023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14024$as_echo "no" >&6; }
14025fi
14026
14027
14028 if test "x$ax_pthread_config" = "xno"; then :
14029 continue
14030fi
14031 PTHREAD_CFLAGS="`pthread-config --cflags`"
14032 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
14033 ;;
14034
14035 *)
14036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
14037$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
14038 PTHREAD_LIBS="-l$ax_pthread_try_flag"
14039 ;;
14040 esac
14041
14042 ax_pthread_save_CFLAGS="$CFLAGS"
14043 ax_pthread_save_LIBS="$LIBS"
14044 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14045 LIBS="$PTHREAD_LIBS $LIBS"
14046
14047 # Check for various functions. We must include pthread.h,
14048 # since some functions may be macros. (On the Sequent, we
14049 # need a special flag -Kthread to make this header compile.)
14050 # We check for pthread_join because it is in -lpthread on IRIX
14051 # while pthread_create is in libc. We check for pthread_attr_init
14052 # due to DEC craziness with -lpthreads. We check for
14053 # pthread_cleanup_push because it is one of the few pthread
14054 # functions on Solaris that doesn't have a non-functional libc stub.
14055 # We try pthread_create on general principles.
14056
14057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14058/* end confdefs.h. */
14059#include <pthread.h>
14060# if $ax_pthread_check_cond
14061# error "$ax_pthread_check_macro must be defined"
14062# endif
14063 static void routine(void *a) { a = 0; }
14064 static void *start_routine(void *a) { return a; }
14065int
14066main ()
14067{
14068pthread_t th; pthread_attr_t attr;
14069 pthread_create(&th, 0, start_routine, 0);
14070 pthread_join(th, 0);
14071 pthread_attr_init(&attr);
14072 pthread_cleanup_push(routine, 0);
14073 pthread_cleanup_pop(0) /* ; */
14074 ;
14075 return 0;
14076}
14077_ACEOF
14078if ac_fn_c_try_link "$LINENO"; then :
14079 ax_pthread_ok=yes
14080fi
14081rm -f core conftest.err conftest.$ac_objext \
14082 conftest$ac_exeext conftest.$ac_ext
14083
14084 CFLAGS="$ax_pthread_save_CFLAGS"
14085 LIBS="$ax_pthread_save_LIBS"
14086
14087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14088$as_echo "$ax_pthread_ok" >&6; }
14089 if test "x$ax_pthread_ok" = "xyes"; then :
14090 break
14091fi
14092
14093 PTHREAD_LIBS=""
14094 PTHREAD_CFLAGS=""
14095done
14096fi
14097
14098# Various other checks:
14099if test "x$ax_pthread_ok" = "xyes"; then
14100 ax_pthread_save_CFLAGS="$CFLAGS"
14101 ax_pthread_save_LIBS="$LIBS"
14102 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14103 LIBS="$PTHREAD_LIBS $LIBS"
14104
14105 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14107$as_echo_n "checking for joinable pthread attribute... " >&6; }
14108if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14109 $as_echo_n "(cached) " >&6
14110else
14111 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14112 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14114/* end confdefs.h. */
14115#include <pthread.h>
14116int
14117main ()
14118{
14119int attr = $ax_pthread_attr; return attr /* ; */
14120 ;
14121 return 0;
14122}
14123_ACEOF
14124if ac_fn_c_try_link "$LINENO"; then :
14125 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14126fi
14127rm -f core conftest.err conftest.$ac_objext \
14128 conftest$ac_exeext conftest.$ac_ext
14129 done
14130
14131fi
14132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14133$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14134 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14135 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14136 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
14137
14138cat >>confdefs.h <<_ACEOF
14139#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14140_ACEOF
14141
14142 ax_pthread_joinable_attr_defined=yes
14143
14144fi
14145
14146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14147$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14148if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14149 $as_echo_n "(cached) " >&6
14150else
14151 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14152 case $host_os in
14153 solaris*)
14154 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14155 ;;
14156 esac
14157
14158fi
14159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14160$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14161 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14162 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14163 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14164 ax_pthread_special_flags_added=yes
14165fi
14166
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14168$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14169if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14170 $as_echo_n "(cached) " >&6
14171else
14172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14173/* end confdefs.h. */
14174#include <pthread.h>
14175int
14176main ()
14177{
14178int i = PTHREAD_PRIO_INHERIT;
14179 ;
14180 return 0;
14181}
14182_ACEOF
14183if ac_fn_c_try_link "$LINENO"; then :
14184 ax_cv_PTHREAD_PRIO_INHERIT=yes
14185else
14186 ax_cv_PTHREAD_PRIO_INHERIT=no
14187fi
14188rm -f core conftest.err conftest.$ac_objext \
14189 conftest$ac_exeext conftest.$ac_ext
14190
14191fi
14192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14193$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14194 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14195 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
14196
14197$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
14198
14199 ax_pthread_prio_inherit_defined=yes
14200
14201fi
14202
14203 CFLAGS="$ax_pthread_save_CFLAGS"
14204 LIBS="$ax_pthread_save_LIBS"
14205
14206 # More AIX lossage: compile with *_r variant
14207 if test "x$GCC" != "xyes"; then
14208 case $host_os in
14209 aix*)
14210 case "x/$CC" in #(
14211 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14212 #handle absolute path differently from PATH based program lookup
14213 case "x$CC" in #(
14214 x/*) :
14215 if as_fn_executable_p ${CC}_r; then :
14216 PTHREAD_CC="${CC}_r"
14217fi ;; #(
14218 *) :
14219 for ac_prog in ${CC}_r
14220do
14221 # Extract the first word of "$ac_prog", so it can be a program name with args.
14222set dummy $ac_prog; ac_word=$2
14223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14224$as_echo_n "checking for $ac_word... " >&6; }
14225if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14226 $as_echo_n "(cached) " >&6
14227else
14228 if test -n "$PTHREAD_CC"; then
14229 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14230else
14231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14232for as_dir in $PATH
14233do
14234 IFS=$as_save_IFS
14235 test -z "$as_dir" && as_dir=.
14236 for ac_exec_ext in '' $ac_executable_extensions; do
14237 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14238 ac_cv_prog_PTHREAD_CC="$ac_prog"
14239 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14240 break 2
14241 fi
14242done
14243 done
14244IFS=$as_save_IFS
14245
14246fi
14247fi
14248PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14249if test -n "$PTHREAD_CC"; then
14250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14251$as_echo "$PTHREAD_CC" >&6; }
14252else
14253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14254$as_echo "no" >&6; }
14255fi
14256
14257
14258 test -n "$PTHREAD_CC" && break
14259done
14260test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14261 ;;
14262esac ;; #(
14263 *) :
14264 ;;
14265esac
14266 ;;
14267 esac
14268 fi
14269fi
14270
14271test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14272
14273
14274
14275
14276
14277# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14278if test "x$ax_pthread_ok" = "xyes"; then
14279 threads=yes
14280 :
14281else
14282 ax_pthread_ok=no
14283 threads=no
14284fi
14285ac_ext=cpp
14286ac_cpp='$CXXCPP $CPPFLAGS'
14287ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14288ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14289ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14290
14291
14292 if test "$threads" = "yes"; then
14293 save_LIBS="$LIBS"
14294 LIBS="$PTHREAD_LIBS $LIBS"
14295 save_CXXFLAGS="$CXXFLAGS"
14296 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14298$as_echo_n "checking for std::thread... " >&6; }
14299if ${gdb_cv_cxx_std_thread+:} false; then :
14300 $as_echo_n "(cached) " >&6
14301else
14302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14303/* end confdefs.h. */
14304#include <thread>
14305 void callback() { }
14306int
14307main ()
14308{
14309std::thread t(callback);
14310 ;
14311 return 0;
14312}
14313_ACEOF
14314if ac_fn_cxx_try_compile "$LINENO"; then :
14315 gdb_cv_cxx_std_thread=yes
14316else
14317 gdb_cv_cxx_std_thread=no
14318fi
14319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14320fi
14321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14322$as_echo "$gdb_cv_cxx_std_thread" >&6; }
21987b9c
TT
14323
14324 # This check must be here, while LIBS includes any necessary
14325 # threading library.
4da8c3a8 14326 for ac_func in pthread_sigmask pthread_setname_np
21987b9c 14327do :
4da8c3a8
TT
14328 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14329ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14330if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
21987b9c 14331 cat >>confdefs.h <<_ACEOF
4da8c3a8 14332#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21987b9c
TT
14333_ACEOF
14334
14335fi
14336done
14337
14338
5e030278
TT
14339 LIBS="$save_LIBS"
14340 CXXFLAGS="$save_CXXFLAGS"
14341 fi
0ad6b8ee 14342 if test "$gdb_cv_cxx_std_thread" = "yes"; then
5e030278
TT
14343
14344$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
14345
14346 fi
14347 ac_ext=c
14348ac_cpp='$CPP $CPPFLAGS'
14349ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14350ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14351ac_compiler_gnu=$ac_cv_c_compiler_gnu
14352
14353
e9bcb658
GB
14354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14355$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 14356if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
14357 $as_echo_n "(cached) " >&6
14358else
14359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14360/* end confdefs.h. */
14361
14362#include <setjmp.h>
14363
14364int
14365main ()
14366{
14367sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
14368 ;
14369 return 0;
14370}
14371_ACEOF
14372if ac_fn_c_try_compile "$LINENO"; then :
14373 gdb_cv_func_sigsetjmp=yes
14374else
14375 gdb_cv_func_sigsetjmp=no
14376fi
14377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14378fi
14379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14380$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
0ad6b8ee 14381if test "$gdb_cv_func_sigsetjmp" = "yes"; then
e9bcb658
GB
14382
14383$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
14384
14385fi
14386
3266f10b 14387
54019719
PA
14388# Check the return and argument types of ptrace.
14389
14390
54019719
PA
14391for ac_header in sys/ptrace.h ptrace.h
14392do :
14393 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14394ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 14395if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
14396 cat >>confdefs.h <<_ACEOF
14397#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14398_ACEOF
14399
14400fi
14401
14402done
14403
14404
a3828db0 14405gdb_ptrace_headers='
4ff70b84 14406#include <sys/types.h>
a3828db0
MK
14407#if HAVE_SYS_PTRACE_H
14408# include <sys/ptrace.h>
14409#endif
14410#if HAVE_UNISTD_H
14411# include <unistd.h>
14412#endif
14413'
14414# There is no point in checking if we don't have a prototype.
9b30624b 14415ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 14416"
d0ac1c44 14417if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 14418 ac_have_decl=1
06825bd1 14419else
81ecdfbb 14420 ac_have_decl=0
06825bd1 14421fi
06825bd1 14422
a3828db0 14423cat >>confdefs.h <<_ACEOF
81ecdfbb 14424#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 14425_ACEOF
81ecdfbb 14426if test $ac_have_decl = 1; then :
bec39cab 14427
a3828db0 14428else
a3828db0
MK
14429
14430 : ${gdb_cv_func_ptrace_ret='int'}
14431 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
14432
06825bd1
MK
14433fi
14434
064ef605
DJ
14435# Check return type. Varargs (used on GNU/Linux) conflict with the
14436# empty argument list, so check for that explicitly.
81ecdfbb
RW
14437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
14438$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 14439if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 14440 $as_echo_n "(cached) " >&6
bec39cab 14441else
81ecdfbb 14442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14443/* end confdefs.h. */
a3828db0 14444$gdb_ptrace_headers
bec39cab
AC
14445int
14446main ()
14447{
064ef605
DJ
14448extern long ptrace (enum __ptrace_request, ...);
14449 ;
14450 return 0;
14451}
14452_ACEOF
9b30624b 14453if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
14454 gdb_cv_func_ptrace_ret='long'
14455else
81ecdfbb 14456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
14457/* end confdefs.h. */
14458$gdb_ptrace_headers
14459int
14460main ()
14461{
a3828db0 14462extern int ptrace ();
bec39cab
AC
14463 ;
14464 return 0;
14465}
14466_ACEOF
9b30624b 14467if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14468 gdb_cv_func_ptrace_ret='int'
70f9f479 14469else
81ecdfbb 14470 gdb_cv_func_ptrace_ret='long'
70f9f479 14471fi
81ecdfbb 14472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 14473fi
81ecdfbb 14474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 14475fi
81ecdfbb
RW
14476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
14477$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 14478
a3828db0
MK
14479cat >>confdefs.h <<_ACEOF
14480#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 14481_ACEOF
70f9f479 14482
a3828db0 14483# Check argument types.
81ecdfbb
RW
14484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
14485$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 14486if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 14487 $as_echo_n "(cached) " >&6
bec39cab 14488else
a3828db0 14489
81ecdfbb 14490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
14491/* end confdefs.h. */
14492$gdb_ptrace_headers
14493int
14494main ()
14495{
14496extern long ptrace (enum __ptrace_request, ...);
14497 ;
14498 return 0;
14499}
14500_ACEOF
9b30624b 14501if ac_fn_c_try_compile "$LINENO"; then :
54019719 14502 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 14503else
064ef605 14504
a3828db0
MK
14505for gdb_arg1 in 'int' 'long'; do
14506 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 14507 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 14508 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 14509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14510/* end confdefs.h. */
a3828db0 14511$gdb_ptrace_headers
bec39cab
AC
14512int
14513main ()
14514{
a3828db0
MK
14515
14516extern $gdb_cv_func_ptrace_ret
14517 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
14518
bec39cab
AC
14519 ;
14520 return 0;
14521}
14522_ACEOF
9b30624b 14523if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
14524 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
14525 break 4;
5c7f2947 14526fi
81ecdfbb 14527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 14528 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 14529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14530/* end confdefs.h. */
a3828db0 14531$gdb_ptrace_headers
bec39cab
AC
14532int
14533main ()
14534{
a3828db0
MK
14535
14536extern $gdb_cv_func_ptrace_ret
14537 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
14538
bec39cab
AC
14539 ;
14540 return 0;
14541}
14542_ACEOF
9b30624b 14543if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
14544
14545gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
14546 break 5;
78434e59 14547fi
81ecdfbb 14548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
14549 done
14550 done
14551 done
14552 done
14553done
14554# Provide a safe default value.
14555: ${gdb_cv_func_ptrace_args='int,int,long,long'}
14556
064ef605 14557fi
81ecdfbb 14558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 14559fi
81ecdfbb
RW
14560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
14561$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
14562ac_save_IFS=$IFS; IFS=','
14563set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
14564IFS=$ac_save_IFS
14565shift
bec39cab 14566
54019719
PA
14567cat >>confdefs.h <<_ACEOF
14568#define PTRACE_TYPE_ARG1 $1
14569_ACEOF
14570
14571
a3828db0
MK
14572cat >>confdefs.h <<_ACEOF
14573#define PTRACE_TYPE_ARG3 $3
14574_ACEOF
14575
96d7229d
LM
14576
14577cat >>confdefs.h <<_ACEOF
14578#define PTRACE_TYPE_ARG4 $4
14579_ACEOF
14580
a3828db0
MK
14581if test -n "$5"; then
14582
14583cat >>confdefs.h <<_ACEOF
14584#define PTRACE_TYPE_ARG5 $5
bec39cab 14585_ACEOF
78434e59
MK
14586
14587fi
14588
54019719 14589
a3828db0 14590if test "$cross_compiling" = no; then
81ecdfbb
RW
14591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14592$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 14593if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14594 $as_echo_n "(cached) " >&6
a3828db0 14595else
81ecdfbb 14596 if test "$cross_compiling" = yes; then :
d0ac1c44 14597 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 14598else
81ecdfbb 14599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14600/* end confdefs.h. */
81ecdfbb 14601$ac_includes_default
bec39cab
AC
14602int
14603main ()
14604{
a3828db0
MK
14605/* If this system has a BSD-style setpgrp which takes arguments,
14606 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14607 exit successfully. */
81ecdfbb 14608 return setpgrp (1,1) != -1;
bec39cab
AC
14609 ;
14610 return 0;
14611}
14612_ACEOF
81ecdfbb 14613if ac_fn_c_try_run "$LINENO"; then :
a3828db0 14614 ac_cv_func_setpgrp_void=no
c906108c 14615else
81ecdfbb 14616 ac_cv_func_setpgrp_void=yes
c906108c 14617fi
81ecdfbb
RW
14618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14619 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14620fi
81ecdfbb 14621
a3828db0 14622fi
81ecdfbb
RW
14623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14624$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
14625if test $ac_cv_func_setpgrp_void = yes; then
14626
81ecdfbb 14627$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
14628
14629fi
a3828db0
MK
14630
14631else
81ecdfbb
RW
14632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14633$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 14634if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14635 $as_echo_n "(cached) " >&6
97bf5e38 14636else
81ecdfbb 14637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14638/* end confdefs.h. */
a3828db0
MK
14639
14640#include <unistd.h>
14641
bec39cab
AC
14642int
14643main ()
14644{
a3828db0
MK
14645
14646 if (setpgrp(1,1) == -1)
14647 exit (0);
14648 else
14649 exit (1);
14650
bec39cab
AC
14651 ;
14652 return 0;
14653}
14654_ACEOF
81ecdfbb 14655if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14656 ac_cv_func_setpgrp_void=no
c906108c 14657else
81ecdfbb 14658 ac_cv_func_setpgrp_void=yes
c906108c 14659fi
81ecdfbb 14660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14661fi
81ecdfbb
RW
14662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14663$as_echo "$ac_cv_func_setpgrp_void" >&6; }
0ad6b8ee 14664if test "$ac_cv_func_setpgrp_void" = yes; then
81ecdfbb 14665 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 14666
a3828db0 14667fi
c906108c
SS
14668fi
14669
db1ff28b
JK
14670# Assume we'll default to using the included libiberty regex.
14671gdb_use_included_regex=yes
14672
14673# However, if the system regex is GNU regex, then default to *not*
14674# using the included regex.
14675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14676$as_echo_n "checking for GNU regex... " >&6; }
d0ac1c44 14677if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
14678 $as_echo_n "(cached) " >&6
14679else
14680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14681/* end confdefs.h. */
14682#include <gnu-versions.h>
14683int
14684main ()
14685{
14686#define REGEX_INTERFACE_VERSION 1
14687#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14688# error "Version mismatch"
14689#endif
14690 ;
14691 return 0;
14692}
14693_ACEOF
14694if ac_fn_c_try_compile "$LINENO"; then :
14695 gdb_cv_have_gnu_regex=yes
14696else
14697 gdb_cv_have_gnu_regex=no
14698fi
14699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14700fi
14701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14702$as_echo "$gdb_cv_have_gnu_regex" >&6; }
0ad6b8ee 14703if test "$gdb_cv_have_gnu_regex" = yes; then
db1ff28b
JK
14704 gdb_use_included_regex=no
14705fi
14706
14707
14708# Check whether --with-included-regex was given.
14709if test "${with_included_regex+set}" = set; then :
14710 withval=$with_included_regex; gdb_with_regex=$withval
14711else
14712 gdb_with_regex=$gdb_use_included_regex
14713fi
14714
14715if test "$gdb_with_regex" = yes; then
14716
14717$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14718
14719fi
14720
81ecdfbb
RW
14721# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14722ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14723#include <sys/proc.h>
14724
14725"
d0ac1c44 14726if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 14727
5c45e068 14728cat >>confdefs.h <<_ACEOF
a3828db0 14729#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 14730_ACEOF
c906108c 14731
5c45e068 14732
97bf5e38 14733fi
c906108c 14734
5c45e068 14735
a3828db0 14736# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
14737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14738$as_echo_n "checking for struct lwp... " >&6; }
d0ac1c44 14739if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 14740 $as_echo_n "(cached) " >&6
bec39cab 14741else
81ecdfbb 14742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14743/* end confdefs.h. */
a3828db0 14744#include <sys/param.h>
c49fbc6c 14745#define _KMEMUSER
a3828db0 14746#include <sys/lwp.h>
bec39cab
AC
14747int
14748main ()
14749{
a3828db0 14750struct lwp l;
bec39cab
AC
14751 ;
14752 return 0;
14753}
14754_ACEOF
81ecdfbb 14755if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14756 gdb_cv_struct_lwp=yes
c906108c 14757else
81ecdfbb 14758 gdb_cv_struct_lwp=no
c906108c 14759fi
81ecdfbb 14760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14761fi
81ecdfbb
RW
14762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14763$as_echo "$gdb_cv_struct_lwp" >&6; }
0ad6b8ee 14764if test "$gdb_cv_struct_lwp" = yes; then
c906108c 14765
81ecdfbb 14766$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 14767
97bf5e38 14768fi
c906108c 14769
a3828db0 14770# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
14771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14772$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
d0ac1c44 14773if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 14774 $as_echo_n "(cached) " >&6
bec39cab 14775else
81ecdfbb 14776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14777/* end confdefs.h. */
a3828db0
MK
14778#include <sys/types.h>
14779#include <machine/reg.h>
bec39cab
AC
14780int
14781main ()
14782{
a3828db0 14783struct reg r;
bec39cab
AC
14784 ;
14785 return 0;
14786}
14787_ACEOF
81ecdfbb 14788if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14789 gdb_cv_struct_reg=yes
27ca5dad 14790else
81ecdfbb 14791 gdb_cv_struct_reg=no
27ca5dad 14792fi
81ecdfbb 14793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14794fi
81ecdfbb
RW
14795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14796$as_echo "$gdb_cv_struct_reg" >&6; }
0ad6b8ee 14797if test "$gdb_cv_struct_reg" = yes; then
bec39cab 14798
81ecdfbb 14799$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14800
14801fi
97bf5e38 14802
a3828db0
MK
14803# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14804# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14805ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14806#include <machine/reg.h>
81ecdfbb 14807"
d0ac1c44 14808if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
14809
14810cat >>confdefs.h <<_ACEOF
a3828db0 14811#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14812_ACEOF
3862412b 14813
5c45e068 14814
97bf5e38 14815fi
a6e69c1f
JB
14816ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14817#include <machine/reg.h>
81ecdfbb 14818"
d0ac1c44 14819if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
14820
14821cat >>confdefs.h <<_ACEOF
a3828db0 14822#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14823_ACEOF
3862412b 14824
5c45e068 14825
97bf5e38 14826fi
3862412b 14827
5c45e068 14828
6fea9e18
L
14829# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14830# Older amd64 Linux's don't have the fs_base and gs_base members of
14831# `struct user_regs_struct'.
f517c180
EA
14832ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14833#include <sys/user.h>
6fea9e18 14834"
d0ac1c44 14835if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
14836
14837cat >>confdefs.h <<_ACEOF
14838#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14839_ACEOF
14840
14841
14842fi
f517c180
EA
14843ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14844#include <sys/user.h>
6fea9e18 14845"
d0ac1c44 14846if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14847
14848cat >>confdefs.h <<_ACEOF
14849#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14850_ACEOF
14851
14852
14853fi
14854
14855
a3828db0 14856# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14858$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14859if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14860 $as_echo_n "(cached) " >&6
451928c5 14861else
81ecdfbb 14862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14863/* end confdefs.h. */
a3828db0 14864#include <sys/ptrace.h>
bec39cab
AC
14865int
14866main ()
14867{
a3828db0 14868PTRACE_GETREGS;
bec39cab
AC
14869 ;
14870 return 0;
14871}
14872_ACEOF
81ecdfbb 14873if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14874 gdb_cv_have_ptrace_getregs=yes
451928c5 14875else
81ecdfbb 14876 gdb_cv_have_ptrace_getregs=no
451928c5 14877fi
81ecdfbb 14878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14879fi
14880
81ecdfbb
RW
14881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14882$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
0ad6b8ee 14883if test "$gdb_cv_have_ptrace_getregs" = yes; then
60ca704f 14884
81ecdfbb 14885$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14886
97bf5e38 14887fi
451928c5 14888
a3828db0 14889# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14891$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14892if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14893 $as_echo_n "(cached) " >&6
451928c5 14894else
81ecdfbb 14895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14896/* end confdefs.h. */
a3828db0 14897#include <sys/ptrace.h>
bec39cab
AC
14898int
14899main ()
14900{
a3828db0 14901PTRACE_GETFPXREGS;
bec39cab
AC
14902 ;
14903 return 0;
14904}
14905_ACEOF
81ecdfbb 14906if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14907 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14908else
81ecdfbb 14909 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14910fi
81ecdfbb 14911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14912fi
14913
81ecdfbb
RW
14914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14915$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
0ad6b8ee 14916if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
60ca704f 14917
81ecdfbb 14918$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14919
97bf5e38 14920fi
451928c5 14921
a3828db0 14922# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14924$as_echo_n "checking for PT_GETDBREGS... " >&6; }
d0ac1c44 14925if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 14926 $as_echo_n "(cached) " >&6
3862412b 14927else
81ecdfbb 14928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14929/* end confdefs.h. */
a3828db0
MK
14930#include <sys/types.h>
14931#include <sys/ptrace.h>
bec39cab
AC
14932int
14933main ()
14934{
a3828db0 14935PT_GETDBREGS;
bec39cab
AC
14936 ;
14937 return 0;
14938}
14939_ACEOF
81ecdfbb 14940if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14941 gdb_cv_have_pt_getdbregs=yes
3862412b 14942else
81ecdfbb 14943 gdb_cv_have_pt_getdbregs=no
3862412b 14944fi
81ecdfbb 14945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14946fi
14947
81ecdfbb
RW
14948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14949$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
0ad6b8ee 14950if test "$gdb_cv_have_pt_getdbregs" = yes; then
60ca704f 14951
81ecdfbb 14952$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14953
97bf5e38 14954fi
3862412b 14955
a3828db0 14956# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14958$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
d0ac1c44 14959if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 14960 $as_echo_n "(cached) " >&6
3862412b 14961else
81ecdfbb 14962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14963/* end confdefs.h. */
a3828db0
MK
14964#include <sys/types.h>
14965#include <sys/ptrace.h>
bec39cab
AC
14966int
14967main ()
14968{
a3828db0 14969PT_GETXMMREGS;
bec39cab
AC
14970 ;
14971 return 0;
14972}
14973_ACEOF
81ecdfbb 14974if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14975 gdb_cv_have_pt_getxmmregs=yes
3862412b 14976else
81ecdfbb 14977 gdb_cv_have_pt_getxmmregs=no
3862412b 14978fi
81ecdfbb 14979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14980fi
14981
81ecdfbb
RW
14982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14983$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
0ad6b8ee 14984if test "$gdb_cv_have_pt_getxmmregs" = yes; then
60ca704f 14985
81ecdfbb 14986$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14987
97bf5e38 14988fi
3862412b 14989
6e9567fe
JB
14990# See if <sys/ptrace.h> supports LWP names on FreeBSD
14991# Older FreeBSD versions don't have the pl_tdname member of
14992# `struct ptrace_lwpinfo'.
14993ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14994"
d0ac1c44 14995if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
14996
14997cat >>confdefs.h <<_ACEOF
14998#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14999_ACEOF
15000
15001
15002fi
15003
15004
e6cdd38e
JB
15005# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15006# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15007# FreeBSD 10.3.
15008ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
15009"
d0ac1c44 15010if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
15011
15012cat >>confdefs.h <<_ACEOF
15013#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15014_ACEOF
15015
15016
15017fi
15018
6e9567fe 15019
97bf5e38 15020if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
15021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
15022$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
d0ac1c44 15023 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 15024 $as_echo_n "(cached) " >&6
596c9d4b 15025else
81ecdfbb 15026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15027/* end confdefs.h. */
596c9d4b
KB
15028
15029#define _SYSCALL32
d30c5336
JK
15030/* Needed for new procfs interface on sparc-solaris. */
15031#define _STRUCTURED_PROC 1
596c9d4b 15032#include <sys/procfs.h>
bec39cab
AC
15033int
15034main ()
15035{
97bf5e38 15036gregset_t avar
bec39cab
AC
15037 ;
15038 return 0;
15039}
15040_ACEOF
81ecdfbb 15041if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15042 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 15043else
81ecdfbb 15044 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 15045
596c9d4b 15046fi
81ecdfbb 15047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
15048fi
15049
97bf5e38 15050 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 15051
81ecdfbb 15052$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
15053
15054 fi
81ecdfbb
RW
15055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
15056$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 15057
81ecdfbb
RW
15058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
15059$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 15060 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 15061 $as_echo_n "(cached) " >&6
d84dd0c5 15062else
81ecdfbb 15063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15064/* end confdefs.h. */
97bf5e38
MK
15065
15066#define _SYSCALL32
d30c5336
JK
15067/* Needed for new procfs interface on sparc-solaris. */
15068#define _STRUCTURED_PROC 1
d84dd0c5 15069#include <sys/procfs.h>
bec39cab
AC
15070int
15071main ()
15072{
97bf5e38 15073fpregset_t avar
bec39cab
AC
15074 ;
15075 return 0;
15076}
15077_ACEOF
81ecdfbb 15078if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15079 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 15080else
81ecdfbb 15081 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 15082
d84dd0c5 15083fi
81ecdfbb 15084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
15085fi
15086
97bf5e38 15087 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 15088
81ecdfbb 15089$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 15090
97bf5e38 15091 fi
81ecdfbb
RW
15092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
15093$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 15094
81ecdfbb
RW
15095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
15096$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 15097 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 15098 $as_echo_n "(cached) " >&6
c906108c 15099else
81ecdfbb 15100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15101/* end confdefs.h. */
c906108c 15102
97bf5e38 15103#define _SYSCALL32
d30c5336
JK
15104/* Needed for new procfs interface on sparc-solaris. */
15105#define _STRUCTURED_PROC 1
97bf5e38 15106#include <sys/procfs.h>
bec39cab
AC
15107int
15108main ()
15109{
97bf5e38 15110prgregset_t avar
bec39cab
AC
15111 ;
15112 return 0;
15113}
15114_ACEOF
81ecdfbb 15115if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15116 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 15117else
81ecdfbb 15118 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 15119
c906108c 15120fi
81ecdfbb 15121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15122fi
15123
97bf5e38 15124 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 15125
81ecdfbb 15126$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 15127
97bf5e38 15128 fi
81ecdfbb
RW
15129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15130$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 15131
81ecdfbb
RW
15132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
15133$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 15134 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 15135 $as_echo_n "(cached) " >&6
d45fe813 15136else
81ecdfbb 15137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15138/* end confdefs.h. */
97bf5e38
MK
15139
15140#define _SYSCALL32
d30c5336
JK
15141/* Needed for new procfs interface on sparc-solaris. */
15142#define _STRUCTURED_PROC 1
97bf5e38 15143#include <sys/procfs.h>
bec39cab
AC
15144int
15145main ()
15146{
97bf5e38 15147prfpregset_t avar
bec39cab
AC
15148 ;
15149 return 0;
15150}
15151_ACEOF
81ecdfbb 15152if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15153 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 15154else
81ecdfbb 15155 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 15156
d45fe813 15157fi
81ecdfbb 15158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15159fi
15160
97bf5e38 15161 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 15162
81ecdfbb 15163$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 15164
97bf5e38 15165 fi
81ecdfbb
RW
15166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15167$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 15168
81ecdfbb
RW
15169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
15170$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
d0ac1c44 15171 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 15172 $as_echo_n "(cached) " >&6
d45fe813 15173else
81ecdfbb 15174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15175/* end confdefs.h. */
97bf5e38
MK
15176
15177#define _SYSCALL32
d30c5336
JK
15178/* Needed for new procfs interface on sparc-solaris. */
15179#define _STRUCTURED_PROC 1
97bf5e38 15180#include <sys/procfs.h>
bec39cab
AC
15181int
15182main ()
15183{
97bf5e38 15184prgregset32_t avar
bec39cab
AC
15185 ;
15186 return 0;
15187}
15188_ACEOF
81ecdfbb 15189if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15190 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 15191else
81ecdfbb 15192 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 15193
d45fe813 15194fi
81ecdfbb 15195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15196fi
15197
97bf5e38 15198 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 15199
81ecdfbb 15200$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 15201
97bf5e38 15202 fi
81ecdfbb
RW
15203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15204$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 15205
81ecdfbb
RW
15206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
15207$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 15208 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 15209 $as_echo_n "(cached) " >&6
d45fe813 15210else
81ecdfbb 15211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15212/* end confdefs.h. */
97bf5e38 15213
d45fe813 15214#define _SYSCALL32
d30c5336
JK
15215/* Needed for new procfs interface on sparc-solaris. */
15216#define _STRUCTURED_PROC 1
97bf5e38 15217#include <sys/procfs.h>
bec39cab
AC
15218int
15219main ()
15220{
97bf5e38 15221lwpid_t avar
bec39cab
AC
15222 ;
15223 return 0;
15224}
15225_ACEOF
81ecdfbb 15226if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15227 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 15228else
81ecdfbb 15229 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 15230
d45fe813 15231fi
81ecdfbb 15232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15233fi
15234
97bf5e38 15235 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 15236
81ecdfbb 15237$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 15238
97bf5e38 15239 fi
81ecdfbb
RW
15240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15241$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 15242
81ecdfbb
RW
15243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
15244$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 15245 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 15246 $as_echo_n "(cached) " >&6
c906108c 15247else
81ecdfbb 15248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15249/* end confdefs.h. */
c906108c 15250
97bf5e38 15251#define _SYSCALL32
d30c5336
JK
15252/* Needed for new procfs interface on sparc-solaris. */
15253#define _STRUCTURED_PROC 1
97bf5e38 15254#include <sys/procfs.h>
bec39cab
AC
15255int
15256main ()
15257{
97bf5e38 15258psaddr_t avar
bec39cab
AC
15259 ;
15260 return 0;
15261}
15262_ACEOF
81ecdfbb 15263if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 15264 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 15265else
81ecdfbb 15266 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 15267
c906108c 15268fi
81ecdfbb 15269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15270fi
15271
97bf5e38 15272 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 15273
81ecdfbb 15274$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 15275
97bf5e38 15276 fi
81ecdfbb
RW
15277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15278$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 15279
43b7e92b
GB
15280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
15281$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15282 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
15283 $as_echo_n "(cached) " >&6
15284else
15285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15286/* end confdefs.h. */
15287
15288#define _SYSCALL32
15289/* Needed for new procfs interface on sparc-solaris. */
15290#define _STRUCTURED_PROC 1
15291#include <sys/procfs.h>
15292int
15293main ()
15294{
15295elf_fpregset_t avar
15296 ;
15297 return 0;
15298}
15299_ACEOF
15300if ac_fn_c_try_compile "$LINENO"; then :
15301 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
15302else
15303 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15304
15305fi
15306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15307fi
15308
15309 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
15310
15311$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
15312
15313 fi
15314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15315$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
15316
c906108c 15317fi
c906108c 15318
bc8bcb4b 15319# Check if the compiler supports the `long long' type.
c906108c 15320
81ecdfbb
RW
15321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15322$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 15323if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 15324 $as_echo_n "(cached) " >&6
97bf5e38 15325else
81ecdfbb 15326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15327/* end confdefs.h. */
bc8bcb4b 15328extern long long foo;
bec39cab
AC
15329int
15330main ()
15331{
bc8bcb4b 15332switch (foo & 2) { case 0: return 1; }
bec39cab
AC
15333 ;
15334 return 0;
15335}
15336_ACEOF
81ecdfbb 15337if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15338 gdb_cv_c_long_long=yes
15339else
81ecdfbb 15340 gdb_cv_c_long_long=no
97bf5e38 15341fi
81ecdfbb 15342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15343fi
81ecdfbb
RW
15344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15345$as_echo "$gdb_cv_c_long_long" >&6; }
0ad6b8ee 15346if test "$gdb_cv_c_long_long" != yes; then
74a0d9f6 15347 # libdecnumber requires long long.
d0ac1c44 15348 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
15349fi
15350
bc8bcb4b 15351# Check if the compiler and runtime support printing long longs.
97bf5e38 15352
81ecdfbb
RW
15353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15354$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 15355if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 15356 $as_echo_n "(cached) " >&6
97bf5e38 15357else
81ecdfbb 15358 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15359 gdb_cv_printf_has_long_long=no
15360else
81ecdfbb 15361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15362/* end confdefs.h. */
bc8bcb4b
MK
15363$ac_includes_default
15364int
15365main ()
15366{
15367char buf[32];
97bf5e38
MK
15368 long long l = 0;
15369 l = (l << 16) + 0x0123;
15370 l = (l << 16) + 0x4567;
15371 l = (l << 16) + 0x89ab;
15372 l = (l << 16) + 0xcdef;
15373 sprintf (buf, "0x%016llx", l);
15374 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
15375 ;
15376 return 0;
c906108c 15377}
bec39cab 15378_ACEOF
81ecdfbb 15379if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15380 gdb_cv_printf_has_long_long=yes
15381else
81ecdfbb 15382 gdb_cv_printf_has_long_long=no
97bf5e38 15383fi
81ecdfbb
RW
15384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15385 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15386fi
81ecdfbb 15387
97bf5e38 15388fi
81ecdfbb
RW
15389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15390$as_echo "$gdb_cv_printf_has_long_long" >&6; }
0ad6b8ee 15391if test "$gdb_cv_printf_has_long_long" = yes; then
bc8bcb4b 15392
81ecdfbb 15393$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
15394
15395fi
97bf5e38 15396
1a619819
LM
15397# Check if the compiler and runtime support printing decfloats.
15398
81ecdfbb
RW
15399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15400$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 15401if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 15402 $as_echo_n "(cached) " >&6
1a619819 15403else
81ecdfbb 15404 if test "$cross_compiling" = yes; then :
1a619819
LM
15405 gdb_cv_printf_has_decfloat=no
15406else
81ecdfbb 15407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
15408/* end confdefs.h. */
15409$ac_includes_default
15410int
15411main ()
15412{
15413char buf[64];
15414 _Decimal32 d32 = 1.2345df;
15415 _Decimal64 d64 = 1.2345dd;
15416 _Decimal128 d128 = 1.2345dl;
15417 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15418 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15419 ;
15420 return 0;
15421}
15422_ACEOF
81ecdfbb 15423if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
15424 gdb_cv_printf_has_decfloat=yes
15425else
81ecdfbb 15426 gdb_cv_printf_has_decfloat=no
1a619819 15427fi
81ecdfbb
RW
15428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15429 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 15430fi
81ecdfbb 15431
1a619819 15432fi
81ecdfbb
RW
15433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15434$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
0ad6b8ee 15435if test "$gdb_cv_printf_has_decfloat" = yes; then
1a619819 15436
81ecdfbb 15437$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
15438
15439fi
15440
bc8bcb4b
MK
15441# Check if the compiler supports the `long double' type. We can't use
15442# AC_C_LONG_DOUBLE because that one does additional checks on the
15443# constants defined in <float.h> that fail on some systems,
15444# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 15445
81ecdfbb
RW
15446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15447$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 15448if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 15449 $as_echo_n "(cached) " >&6
97bf5e38 15450else
81ecdfbb 15451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15452/* end confdefs.h. */
97bf5e38 15453long double foo;
bec39cab 15454_ACEOF
81ecdfbb 15455if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 15456 gdb_cv_c_long_double=yes
97bf5e38 15457else
81ecdfbb 15458 gdb_cv_c_long_double=no
97bf5e38 15459fi
81ecdfbb 15460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15461fi
81ecdfbb
RW
15462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15463$as_echo "$gdb_cv_c_long_double" >&6; }
0ad6b8ee 15464if test "$gdb_cv_c_long_double" = yes; then
c906108c 15465
81ecdfbb 15466$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15467
15468fi
15469
bc8bcb4b 15470# Check if the compiler and runtime support printing long doubles.
97bf5e38 15471
81ecdfbb
RW
15472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15473$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 15474if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 15475 $as_echo_n "(cached) " >&6
97bf5e38 15476else
81ecdfbb 15477 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15478 gdb_cv_printf_has_long_double=no
15479else
81ecdfbb 15480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15481/* end confdefs.h. */
bc8bcb4b
MK
15482$ac_includes_default
15483int
15484main ()
15485{
15486char buf[16];
97bf5e38
MK
15487 long double f = 3.141592653;
15488 sprintf (buf, "%Lg", f);
15489 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
15490 ;
15491 return 0;
97bf5e38 15492}
bec39cab 15493_ACEOF
81ecdfbb 15494if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 15495 gdb_cv_printf_has_long_double=yes
c906108c 15496else
81ecdfbb 15497 gdb_cv_printf_has_long_double=no
c906108c 15498fi
81ecdfbb
RW
15499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15500 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 15501fi
81ecdfbb 15502
c906108c 15503fi
81ecdfbb
RW
15504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15505$as_echo "$gdb_cv_printf_has_long_double" >&6; }
0ad6b8ee 15506if test "$gdb_cv_printf_has_long_double" = yes; then
bc8bcb4b 15507
81ecdfbb 15508$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15509
15510fi
97bf5e38 15511
bc8bcb4b 15512# Check if the compiler and runtime support scanning long doubles.
97bf5e38 15513
81ecdfbb
RW
15514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15515$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 15516if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 15517 $as_echo_n "(cached) " >&6
97bf5e38 15518else
81ecdfbb 15519 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15520 gdb_cv_scanf_has_long_double=no
15521else
81ecdfbb 15522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15523/* end confdefs.h. */
bc8bcb4b
MK
15524#include <stdio.h>
15525int
15526main ()
15527{
15528char *buf = "3.141592653";
97bf5e38
MK
15529 long double f = 0;
15530 sscanf (buf, "%Lg", &f);
15531 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
15532 ;
15533 return 0;
97bf5e38 15534}
bec39cab 15535_ACEOF
81ecdfbb 15536if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15537 gdb_cv_scanf_has_long_double=yes
15538else
81ecdfbb 15539 gdb_cv_scanf_has_long_double=no
97bf5e38 15540fi
81ecdfbb
RW
15541rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15542 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15543fi
81ecdfbb 15544
c906108c 15545fi
81ecdfbb
RW
15546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15547$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
0ad6b8ee 15548if test "$gdb_cv_scanf_has_long_double" = yes; then
bc8bcb4b 15549
81ecdfbb 15550$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15551
15552fi
c906108c 15553
438013df
AO
15554case ${host_os} in
15555aix*)
81ecdfbb
RW
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15557$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 15558if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 15559 $as_echo_n "(cached) " >&6
438013df 15560else
bec39cab 15561
438013df
AO
15562 SAVE_LDFLAGS=$LDFLAGS
15563
15564 case $GCC in
15565 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15566 *) gdb_cv_bigtoc=-bbigtoc ;;
15567 esac
15568
15569 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 15570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15571/* end confdefs.h. */
438013df 15572
bec39cab
AC
15573int
15574main ()
15575{
438013df 15576int i;
bec39cab
AC
15577 ;
15578 return 0;
15579}
15580_ACEOF
81ecdfbb 15581if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15582
81ecdfbb
RW
15583else
15584 gdb_cv_bigtoc=
438013df 15585fi
81ecdfbb
RW
15586rm -f core conftest.err conftest.$ac_objext \
15587 conftest$ac_exeext conftest.$ac_ext
ec76baa5 15588 LDFLAGS="${SAVE_LDFLAGS}"
438013df 15589
bec39cab 15590fi
81ecdfbb
RW
15591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15592$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
15593 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15594 ;;
15595esac
15596
38f6b338 15597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 15598$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
15599dynamic_list=false
15600if test "${gdb_native}" = yes; then
15601 # The dynamically loaded libthread_db needs access to symbols in the gdb
15602 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15603 # may not be supported there.
15604 old_LDFLAGS="$LDFLAGS"
15605 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15606 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15607 LDFLAGS="$LDFLAGS $RDYNAMIC"
15608 if test "${have_libpython}" = no; then
15609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
15610/* end confdefs.h. */
15611
15612int
15613main ()
15614{
15615
15616 ;
15617 return 0;
15618}
15619_ACEOF
15620if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
15621 dynamic_list=true
15622fi
15623rm -f core conftest.err conftest.$ac_objext \
15624 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
15625 else
15626 # Workaround http://bugs.python.org/issue4434 where static
15627 # libpythonX.Y.a would get its symbols required for
15628 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15629 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
15630
15631 # Note the workaround for Python
15632 # http://bugs.python.org/issue10112 earlier has removed
15633 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15634 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15635 # always pass.
38f6b338
JK
15636 old_CFLAGS="$CFLAGS"
15637 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
15638 old_LIBS="$LIBS"
15639 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
15640 old_CPPFLAGS="$CPPFLAGS"
15641 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 15642 if test "$cross_compiling" = yes; then :
3bebe2f2 15643 true
f6528abd 15644else
3bebe2f2
JK
15645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15646/* end confdefs.h. */
1b4f615e 15647#include "Python.h"
3bebe2f2
JK
15648int
15649main ()
15650{
15651int err;
38f6b338
JK
15652 Py_Initialize ();
15653 err = PyRun_SimpleString ("import itertools\n");
15654 Py_Finalize ();
15655 return err == 0 ? 0 : 1;
3bebe2f2
JK
15656 ;
15657 return 0;
15658}
15659_ACEOF
15660if ac_fn_c_try_run "$LINENO"; then :
15661 dynamic_list=true
15662fi
15663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15664 conftest.$ac_objext conftest.beam conftest.$ac_ext
15665fi
15666
8c1fb155 15667 LIBS="$old_LIBS"
38f6b338 15668 CFLAGS="$old_CFLAGS"
1b4f615e 15669 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
15670 fi
15671 LDFLAGS="$old_LDFLAGS"
15672fi
15673if $dynamic_list; then
15674 found="-Wl,--dynamic-list"
15675 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15676else
38f6b338
JK
15677 found="-rdynamic"
15678 RDYNAMIC="-rdynamic"
f6528abd 15679fi
f6528abd 15680
38f6b338 15681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15682$as_echo "$found" >&6; }
0407b3f1 15683
f6528abd 15684
0ad6b8ee 15685if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
c906108c 15686 case ${host_os} in
d92419e5 15687 aix*)
81ecdfbb
RW
15688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15689$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 15690 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 15691 $as_echo_n "(cached) " >&6
bec39cab 15692else
81ecdfbb 15693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15694/* end confdefs.h. */
d92419e5 15695#include <sys/pthdebug.h>
bec39cab
AC
15696int
15697main ()
15698{
d92419e5
JB
15699#ifndef PTHDB_VERSION_3
15700 #error
15701 #endif
bec39cab
AC
15702 ;
15703 return 0;
15704}
15705_ACEOF
81ecdfbb 15706if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15707 gdb_cv_have_aix_thread_debug=yes
15708else
81ecdfbb 15709 gdb_cv_have_aix_thread_debug=no
d92419e5 15710fi
81ecdfbb 15711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15712fi
15713
81ecdfbb
RW
15714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15715$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
0ad6b8ee 15716 if test "$gdb_cv_have_aix_thread_debug" = yes; then
d92419e5 15717 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15718 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15719 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15720
15721 # Older versions of AIX do not provide the declaration for
15722 # the getthrds function (it appears that it was introduced
15723 # with AIX 6.x).
15724 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15725"
d0ac1c44 15726if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
15727 ac_have_decl=1
15728else
15729 ac_have_decl=0
15730fi
15731
15732cat >>confdefs.h <<_ACEOF
15733#define HAVE_DECL_GETTHRDS $ac_have_decl
15734_ACEOF
15735
d92419e5
JB
15736 fi
15737 ;;
c906108c 15738 esac
bec39cab 15739
c906108c
SS
15740fi
15741
3f47be5c 15742if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15744$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 15745if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 15746 $as_echo_n "(cached) " >&6
bec39cab 15747else
81ecdfbb 15748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15749/* end confdefs.h. */
3f47be5c 15750#include <thread_db.h>
bec39cab
AC
15751int
15752main ()
15753{
3f47be5c 15754int i = TD_NOTALLOC;
bec39cab
AC
15755 ;
15756 return 0;
15757}
15758_ACEOF
81ecdfbb 15759if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15760 gdb_cv_thread_db_h_has_td_notalloc=yes
15761else
81ecdfbb 15762 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15763
3f47be5c 15764fi
81ecdfbb 15765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15766
bec39cab 15767fi
81ecdfbb
RW
15768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15769$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15771$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 15772if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 15773 $as_echo_n "(cached) " >&6
59f80f10 15774else
81ecdfbb 15775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15776/* end confdefs.h. */
15777#include <thread_db.h>
15778int
15779main ()
15780{
15781int i = TD_VERSION;
15782 ;
15783 return 0;
15784}
15785_ACEOF
81ecdfbb 15786if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15787 gdb_cv_thread_db_h_has_td_version=yes
15788else
81ecdfbb 15789 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15790
15791fi
81ecdfbb 15792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15793
15794fi
81ecdfbb
RW
15795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15796$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15798$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 15799if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15800 $as_echo_n "(cached) " >&6
59f80f10 15801else
81ecdfbb 15802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15803/* end confdefs.h. */
15804#include <thread_db.h>
15805int
15806main ()
15807{
15808int i = TD_NOTLS;
15809 ;
15810 return 0;
15811}
15812_ACEOF
81ecdfbb 15813if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15814 gdb_cv_thread_db_h_has_td_notls=yes
15815else
81ecdfbb 15816 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15817
15818fi
81ecdfbb 15819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15820
15821fi
81ecdfbb
RW
15822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15823$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15824fi
15825if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15826
81ecdfbb 15827$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15828
59f80f10
DJ
15829fi
15830if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15831
81ecdfbb 15832$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15833
15834fi
15835if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15836
81ecdfbb 15837$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15838
3f47be5c
EZ
15839fi
15840
81ecdfbb
RW
15841ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15842"
d0ac1c44 15843if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15844 ac_have_decl=1
10568435 15845else
81ecdfbb 15846 ac_have_decl=0
10568435 15847fi
10568435
JK
15848
15849cat >>confdefs.h <<_ACEOF
81ecdfbb 15850#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15851_ACEOF
15852
15853
81ecdfbb
RW
15854if test "$cross_compiling" = yes; then :
15855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15856/* end confdefs.h. */
15857#include <sys/personality.h>
15858int
15859main ()
15860{
15861
15862# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15863# define ADDR_NO_RANDOMIZE 0x0040000
15864# endif
15865 /* Test the flag could be set and stays set. */
15866 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15867 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15868 return 1
15869 ;
15870 return 0;
15871}
15872_ACEOF
81ecdfbb 15873if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15874 have_personality=true
15875else
81ecdfbb 15876 have_personality=false
10568435 15877fi
81ecdfbb
RW
15878rm -f core conftest.err conftest.$ac_objext \
15879 conftest$ac_exeext conftest.$ac_ext
10568435 15880else
81ecdfbb 15881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15882/* end confdefs.h. */
15883#include <sys/personality.h>
15884int
15885main ()
15886{
15887
15888# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15889# define ADDR_NO_RANDOMIZE 0x0040000
15890# endif
15891 /* Test the flag could be set and stays set. */
15892 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15893 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15894 return 1
15895 ;
15896 return 0;
15897}
15898_ACEOF
81ecdfbb 15899if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15900 have_personality=true
15901else
81ecdfbb 15902 have_personality=false
10568435 15903fi
81ecdfbb
RW
15904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15905 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15906fi
81ecdfbb 15907
10568435
JK
15908if $have_personality
15909then
15910
81ecdfbb 15911$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15912
15913fi
15914
e655c1a2
PA
15915case $host_os in
15916 go32* | *djgpp*)
15917 gdbinit=gdb.ini
15918 ;;
15919 *)
15920 gdbinit=.gdbinit
15921 ;;
15922esac
15923
15924cat >>confdefs.h <<_ACEOF
15925#define GDBINIT "$gdbinit"
15926_ACEOF
15927
15928
fb40c209 15929
f83d8a90
DE
15930# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15931# except that the argument to --with-sysroot is optional.
15932# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15933if test "x$with_sysroot" = xyes; then
15934 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15935fi
bec39cab 15936
81ecdfbb
RW
15937# Check whether --with-sysroot was given.
15938if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15939 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15940else
15941 TARGET_SYSTEM_ROOT=
15942fi
030292b7 15943
030292b7 15944
f83d8a90
DE
15945 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15946 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15947 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15948 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15949
f83d8a90
DE
15950cat >>confdefs.h <<_ACEOF
15951#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15952_ACEOF
bec39cab 15953
030292b7 15954
b14b1491 15955
f83d8a90
DE
15956
15957 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15958 if test "x$prefix" = xNONE; then
15959 test_prefix=/usr/local
15960 else
15961 test_prefix=$prefix
15962 fi
15963 else
15964 test_prefix=$exec_prefix
15965 fi
15966 value=0
15967 case ${ac_define_dir} in
15968 "${test_prefix}"|"${test_prefix}/"*|\
15969 '${exec_prefix}'|'${exec_prefix}/'*)
15970 value=1
15971 ;;
15972 esac
15973
15974cat >>confdefs.h <<_ACEOF
15975#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15976_ACEOF
030292b7
DJ
15977
15978
15979
16e7150e 15980
16e7150e 15981
81ecdfbb
RW
15982# Check whether --with-system-gdbinit was given.
15983if test "${with_system_gdbinit+set}" = set; then :
15984 withval=$with_system_gdbinit;
b14b1491
TT
15985 SYSTEM_GDBINIT=$withval
15986else
15987 SYSTEM_GDBINIT=
81ecdfbb
RW
15988fi
15989
16e7150e
JG
15990
15991 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15992 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15993 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15994 ac_define_dir=`eval echo $ac_define_dir`
15995
15996cat >>confdefs.h <<_ACEOF
15997#define SYSTEM_GDBINIT "$ac_define_dir"
15998_ACEOF
15999
16000
16001
0c4a4063 16002
b14b1491
TT
16003 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16004 if test "x$prefix" = xNONE; then
16005 test_prefix=/usr/local
16006 else
16007 test_prefix=$prefix
16008 fi
16009 else
16010 test_prefix=$exec_prefix
16011 fi
16012 value=0
16013 case ${ac_define_dir} in
16014 "${test_prefix}"|"${test_prefix}/"*|\
16015 '${exec_prefix}'|'${exec_prefix}/'*)
16016 value=1
16017 ;;
16018 esac
16e7150e 16019
b14b1491
TT
16020cat >>confdefs.h <<_ACEOF
16021#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
16022_ACEOF
16023
b14b1491 16024
16e7150e 16025
0c4a4063 16026
b835bb52 16027
ed2a2229
CB
16028# Check whether --with-system-gdbinit-dir was given.
16029if test "${with_system_gdbinit_dir+set}" = set; then :
16030 withval=$with_system_gdbinit_dir;
16031 SYSTEM_GDBINIT_DIR=$withval
16032else
16033 SYSTEM_GDBINIT_DIR=
16034fi
16035
16036
16037 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16038 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16039 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16040 ac_define_dir=`eval echo $ac_define_dir`
16041
16042cat >>confdefs.h <<_ACEOF
16043#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16044_ACEOF
16045
16046
16047
16048
16049 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16050 if test "x$prefix" = xNONE; then
16051 test_prefix=/usr/local
16052 else
16053 test_prefix=$prefix
16054 fi
16055 else
16056 test_prefix=$exec_prefix
16057 fi
16058 value=0
16059 case ${ac_define_dir} in
16060 "${test_prefix}"|"${test_prefix}/"*|\
16061 '${exec_prefix}'|'${exec_prefix}/'*)
16062 value=1
16063 ;;
16064 esac
16065
16066cat >>confdefs.h <<_ACEOF
16067#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16068_ACEOF
16069
16070
16071
16072
16073
81ecdfbb
RW
16074# Check whether --enable-werror was given.
16075if test "${enable_werror+set}" = set; then :
16076 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
16077 yes | y) ERROR_ON_WARNING="yes" ;;
16078 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 16079 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 16080 esac
81ecdfbb
RW
16081fi
16082
094a342e 16083
9a084706
PA
16084# Enable -Werror by default when using gcc. Turn it off for releases.
16085if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
16086 ERROR_ON_WARNING=yes
16087fi
16088
16089WERROR_CFLAGS=""
16090if test "${ERROR_ON_WARNING}" = yes ; then
16091 WERROR_CFLAGS="-Werror"
16092fi
16093
cf6de44d 16094# The options we'll try to enable.
aac331e4 16095build_warnings="-Wall -Wpointer-arith \
a0de763e 16096-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 16097-Wno-switch -Wno-char-subscripts \
cf6de44d 16098-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 16099-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 16100-Wno-mismatched-tags \
632e107b 16101-Wno-error=deprecated-register \
85e26832 16102-Wsuggest-override \
1a34f210 16103-Wimplicit-fallthrough=3 \
96643e35 16104-Wduplicated-cond \
33a6bc35
TT
16105-Wshadow=local \
16106-Wdeprecated-copy \
16107-Wdeprecated-copy-dtor \
16108-Wredundant-move"
3bc3d82a 16109
3526781e 16110case "${host}" in
4fa7574e
RO
16111 *-*-mingw32*)
16112 # Enable -Wno-format by default when using gcc on mingw since many
16113 # GCC versions complain about %I64.
16114 build_warnings="$build_warnings -Wno-format" ;;
16115 *-*-solaris*)
16116 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16117 # doesn't understand.
16118 build_warnings="$build_warnings -Wno-unknown-pragmas"
16119 # Solaris 11 <unistd.h> marks vfork deprecated.
16120 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
16121 *)
16122 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16123 # but there's a special case for this below.
16124 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
16125esac
16126
81ecdfbb
RW
16127# Check whether --enable-build-warnings was given.
16128if test "${enable_build_warnings+set}" = set; then :
16129 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
16130 yes) ;;
16131 no) build_warnings="-w";;
16132 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16133 build_warnings="${build_warnings} ${t}";;
16134 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16135 build_warnings="${t} ${build_warnings}";;
16136 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16137esac
d4f3574e 16138if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 16139 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 16140fi
81ecdfbb
RW
16141fi
16142# Check whether --enable-gdb-build-warnings was given.
16143if test "${enable_gdb_build_warnings+set}" = set; then :
16144 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
16145 yes) ;;
16146 no) build_warnings="-w";;
16147 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16148 build_warnings="${build_warnings} ${t}";;
16149 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16150 build_warnings="${t} ${build_warnings}";;
16151 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16152esac
16153if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16154 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16155fi
81ecdfbb 16156fi
3bc3d82a
PA
16157
16158# The set of warnings supported by a C++ compiler is not the same as
16159# of the C compiler.
cf6de44d 16160ac_ext=cpp
3bc3d82a
PA
16161ac_cpp='$CXXCPP $CPPFLAGS'
16162ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16163ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16164ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16165
3bc3d82a 16166
81ecdfbb 16167WARN_CFLAGS=""
c906108c
SS
16168if test "x${build_warnings}" != x -a "x$GCC" = xyes
16169then
81ecdfbb
RW
16170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16171$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
16172 # Separate out the -Werror flag as some files just cannot be
16173 # compiled with it enabled.
16174 for w in ${build_warnings}; do
7544db95
PA
16175 # GCC does not complain about -Wno-unknown-warning. Invert
16176 # and test -Wunknown-warning instead.
16177 case $w in
16178 -Wno-*)
16179 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
16180 -Wformat-nonliteral)
16181 # gcc requires -Wformat before -Wformat-nonliteral
16182 # will work, so stick them together.
16183 w="-Wformat $w"
16184 wtest="$w"
16185 ;;
7544db95
PA
16186 *)
16187 wtest=$w ;;
16188 esac
16189
746a987d
AC
16190 case $w in
16191 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
16192 *)
16193 # Check whether GCC accepts it.
4536bbc6 16194 saved_CFLAGS="$CFLAGS"
3e019bdc 16195 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 16196 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 16197 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
16198 if test "x$w" = "x-Wunused-variable"; then
16199 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16200 # fixed in GCC 4.9. This test is derived from the gdb
16201 # source code that triggered this bug in GCC.
16202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16203/* end confdefs.h. */
16204struct scoped_restore_base {};
16205 struct scoped_restore_tmpl : public scoped_restore_base {
16206 ~scoped_restore_tmpl() {}
16207 };
16208int
16209main ()
16210{
16211const scoped_restore_base &b = scoped_restore_tmpl();
16212 ;
16213 return 0;
16214}
16215_ACEOF
16216if ac_fn_cxx_try_compile "$LINENO"; then :
16217 WARN_CFLAGS="${WARN_CFLAGS} $w"
16218fi
16219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16220 else
16221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16222/* end confdefs.h. */
4536bbc6 16223
bec39cab
AC
16224int
16225main ()
16226{
4536bbc6 16227
bec39cab
AC
16228 ;
16229 return 0;
16230}
16231_ACEOF
3bc3d82a 16232if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 16233 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 16234fi
81ecdfbb 16235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 16236 fi
4536bbc6 16237 CFLAGS="$saved_CFLAGS"
3bc3d82a 16238 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
16239 esac
16240 done
81ecdfbb
RW
16241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16242$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
16243fi
16244
16245
104c1213 16246
cf6de44d 16247ac_ext=c
3bc3d82a
PA
16248ac_cpp='$CPP $CPPFLAGS'
16249ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16250ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16251ac_compiler_gnu=$ac_cv_c_compiler_gnu
16252
3bc3d82a 16253
b835bb52 16254
f35d5ade
TT
16255# Check whether --enable-ubsan was given.
16256if test "${enable_ubsan+set}" = set; then :
16257 enableval=$enable_ubsan;
16258else
eff98030 16259 enable_ubsan=no
f35d5ade
TT
16260fi
16261
16262if test "x$enable_ubsan" = xauto; then
16263 if $development; then
16264 enable_ubsan=yes
16265 fi
16266fi
16267ac_ext=cpp
16268ac_cpp='$CXXCPP $CPPFLAGS'
16269ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16270ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16271ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16272
16273if test "x$enable_ubsan" = xyes; then
16274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16275$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16276 saved_CXXFLAGS="$CXXFLAGS"
16277 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16279/* end confdefs.h. */
16280
16281int
16282main ()
16283{
16284
16285 ;
16286 return 0;
16287}
16288_ACEOF
16289if ac_fn_cxx_try_link "$LINENO"; then :
16290 enable_ubsan=yes
16291else
16292 enable_ubsan=no
16293fi
16294rm -f core conftest.err conftest.$ac_objext \
16295 conftest$ac_exeext conftest.$ac_ext
16296 CXXFLAGS="$saved_CXXFLAGS"
16297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16298$as_echo "$enable_ubsan" >&6; }
16299 if test "x$enable_ubsan" = xyes; then
16300 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16301 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16302 fi
16303fi
16304ac_ext=c
16305ac_cpp='$CPP $CPPFLAGS'
16306ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16307ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16308ac_compiler_gnu=$ac_cv_c_compiler_gnu
16309
16310
16311
7a292a7a 16312# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
16313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16314$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 16315if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 16316 $as_echo_n "(cached) " >&6
bec39cab 16317else
81ecdfbb 16318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16319/* end confdefs.h. */
7a292a7a
SS
16320
16321#if defined (__CYGWIN__) || defined (__CYGWIN32__)
16322lose
16323#endif
bec39cab 16324_ACEOF
7a292a7a 16325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 16326 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
16327 gdb_cv_os_cygwin=yes
16328else
7a292a7a
SS
16329 gdb_cv_os_cygwin=no
16330fi
16331rm -f conftest*
16332
16333fi
81ecdfbb
RW
16334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16335$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 16336
aff38e61 16337
3eb25fda 16338SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 16339case ${host} in
95cbc983
AC
16340 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16341 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 16342 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 16343 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
16344esac
16345
16346
cd0fc7c3
SS
16347# libreadline needs libuser32.a in a cygwin environment
16348WIN32LIBS=
0ad6b8ee 16349if test x"$gdb_cv_os_cygwin" = xyes; then
c5394b80
JM
16350 WIN32LIBS="-luser32"
16351 case "${target}" in
16352 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16353 ;;
16354 esac
cd0fc7c3 16355fi
c906108c 16356
b4505029
MM
16357# The ser-tcp.c module requires sockets.
16358case ${host} in
16359 *mingw32*)
16360
81ecdfbb 16361$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
16362
16363 WIN32LIBS="$WIN32LIBS -lws2_32"
16364 ;;
16365esac
16366
7a292a7a 16367
31d99776 16368# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
16369
16370 OLD_CFLAGS=$CFLAGS
16371 OLD_LDFLAGS=$LDFLAGS
16372 OLD_LIBS=$LIBS
16373 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16374 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16375 # always want our bfd.
16376 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16377 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16378 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 16379 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16380 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 16381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 16382$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 16383if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 16384 $as_echo_n "(cached) " >&6
31d99776 16385else
81ecdfbb 16386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
16387/* end confdefs.h. */
16388#include <stdlib.h>
def63ff0
TT
16389 #include "bfd.h"
16390 #include "elf-bfd.h"
31d99776
DJ
16391
16392int
16393main ()
16394{
def63ff0 16395return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
16396 ;
16397 return 0;
16398}
16399_ACEOF
81ecdfbb 16400if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
16401 gdb_cv_var_elf=yes
16402else
81ecdfbb 16403 gdb_cv_var_elf=no
31d99776 16404fi
81ecdfbb
RW
16405rm -f core conftest.err conftest.$ac_objext \
16406 conftest$ac_exeext conftest.$ac_ext
31d99776 16407fi
81ecdfbb
RW
16408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16409$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
16410 CFLAGS=$OLD_CFLAGS
16411 LDFLAGS=$OLD_LDFLAGS
16412 LIBS=$OLD_LIBS
0ad6b8ee 16413if test "$gdb_cv_var_elf" = yes; then
d4777acb 16414 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 16415
81ecdfbb 16416$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 16417
075ff26d
JK
16418 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16419 if test "$plugins" = "yes"; then
a48b32c0
L
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16421$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 16422if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16423 $as_echo_n "(cached) " >&6
16424else
16425 ac_func_search_save_LIBS=$LIBS
16426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16427/* end confdefs.h. */
16428
16429/* Override any GCC internal prototype to avoid an error.
16430 Use char because int might match the return type of a GCC
16431 builtin and then its argument prototype would still apply. */
16432#ifdef __cplusplus
16433extern "C"
16434#endif
16435char dlopen ();
16436int
16437main ()
16438{
16439return dlopen ();
16440 ;
16441 return 0;
16442}
16443_ACEOF
16444for ac_lib in '' dl; do
16445 if test -z "$ac_lib"; then
16446 ac_res="none required"
16447 else
16448 ac_res=-l$ac_lib
16449 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16450 fi
16451 if ac_fn_c_try_link "$LINENO"; then :
16452 ac_cv_search_dlopen=$ac_res
16453fi
16454rm -f core conftest.err conftest.$ac_objext \
16455 conftest$ac_exeext
d0ac1c44 16456 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16457 break
16458fi
16459done
d0ac1c44 16460if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16461
16462else
16463 ac_cv_search_dlopen=no
16464fi
16465rm conftest.$ac_ext
16466LIBS=$ac_func_search_save_LIBS
16467fi
16468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16469$as_echo "$ac_cv_search_dlopen" >&6; }
16470ac_res=$ac_cv_search_dlopen
16471if test "$ac_res" != no; then :
16472 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16473
16474fi
16475
075ff26d 16476 fi
31d99776 16477fi
31d99776 16478
4f05add4
TT
16479# Add macho support to GDB, but only if BFD includes it.
16480
16481 OLD_CFLAGS=$CFLAGS
16482 OLD_LDFLAGS=$LDFLAGS
16483 OLD_LIBS=$LIBS
16484 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16485 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16486 # always want our bfd.
16487 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16488 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16489 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 16490 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16491 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
16492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16493$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 16494if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
16495 $as_echo_n "(cached) " >&6
16496else
16497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16498/* end confdefs.h. */
16499#include <stdlib.h>
16500 #include "bfd.h"
16501 #include "mach-o.h"
16502
16503int
16504main ()
16505{
16506return bfd_mach_o_lookup_command (NULL, 0, NULL);
16507 ;
16508 return 0;
16509}
16510_ACEOF
16511if ac_fn_c_try_link "$LINENO"; then :
16512 gdb_cv_var_macho=yes
16513else
16514 gdb_cv_var_macho=no
16515fi
16516rm -f core conftest.err conftest.$ac_objext \
16517 conftest$ac_exeext conftest.$ac_ext
16518fi
16519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16520$as_echo "$gdb_cv_var_macho" >&6; }
16521 CFLAGS=$OLD_CFLAGS
16522 LDFLAGS=$OLD_LDFLAGS
16523 LIBS=$OLD_LIBS
0ad6b8ee 16524if test "$gdb_cv_var_macho" = yes; then
4f05add4
TT
16525 CONFIG_OBS="$CONFIG_OBS machoread.o"
16526fi
16527
121ce6e5
DJ
16528# Add any host-specific objects to GDB.
16529CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16530
608e2dbb 16531# If building on ELF, look for lzma support for embedded compressed debug info.
0ad6b8ee 16532if test "$gdb_cv_var_elf" = yes; then
608e2dbb
TT
16533
16534# Check whether --with-lzma was given.
16535if test "${with_lzma+set}" = set; then :
16536 withval=$with_lzma;
16537else
16538 with_lzma=auto
16539fi
16540
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16542$as_echo_n "checking whether to use lzma... " >&6; }
16543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16544$as_echo "$with_lzma" >&6; }
16545
16546 if test "${with_lzma}" != no; then
16547
16548
16549
16550
16551
16552
16553
16554
16555 use_additional=yes
16556
16557 acl_save_prefix="$prefix"
16558 prefix="$acl_final_prefix"
16559 acl_save_exec_prefix="$exec_prefix"
16560 exec_prefix="$acl_final_exec_prefix"
16561
16562 eval additional_includedir=\"$includedir\"
16563 eval additional_libdir=\"$libdir\"
16564
16565 exec_prefix="$acl_save_exec_prefix"
16566 prefix="$acl_save_prefix"
16567
16568
16569# Check whether --with-liblzma-prefix was given.
16570if test "${with_liblzma_prefix+set}" = set; then :
16571 withval=$with_liblzma_prefix;
16572 if test "X$withval" = "Xno"; then
16573 use_additional=no
16574 else
16575 if test "X$withval" = "X"; then
16576
16577 acl_save_prefix="$prefix"
16578 prefix="$acl_final_prefix"
16579 acl_save_exec_prefix="$exec_prefix"
16580 exec_prefix="$acl_final_exec_prefix"
16581
16582 eval additional_includedir=\"$includedir\"
16583 eval additional_libdir=\"$libdir\"
16584
16585 exec_prefix="$acl_save_exec_prefix"
16586 prefix="$acl_save_prefix"
16587
16588 else
16589 additional_includedir="$withval/include"
16590 additional_libdir="$withval/lib"
16591 fi
16592 fi
16593
16594fi
16595
16596 LIBLZMA=
16597 LTLIBLZMA=
16598 INCLZMA=
16599 rpathdirs=
16600 ltrpathdirs=
16601 names_already_handled=
16602 names_next_round='lzma '
16603 while test -n "$names_next_round"; do
16604 names_this_round="$names_next_round"
16605 names_next_round=
16606 for name in $names_this_round; do
16607 already_handled=
16608 for n in $names_already_handled; do
16609 if test "$n" = "$name"; then
16610 already_handled=yes
16611 break
16612 fi
16613 done
16614 if test -z "$already_handled"; then
16615 names_already_handled="$names_already_handled $name"
16616 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16617 eval value=\"\$HAVE_LIB$uppername\"
16618 if test -n "$value"; then
16619 if test "$value" = yes; then
16620 eval value=\"\$LIB$uppername\"
16621 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16622 eval value=\"\$LTLIB$uppername\"
16623 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16624 else
16625 :
16626 fi
16627 else
16628 found_dir=
16629 found_la=
16630 found_so=
16631 found_a=
16632 if test $use_additional = yes; then
16633 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16634 found_dir="$additional_libdir"
16635 found_so="$additional_libdir/lib$name.$shlibext"
16636 if test -f "$additional_libdir/lib$name.la"; then
16637 found_la="$additional_libdir/lib$name.la"
16638 fi
16639 else
16640 if test -f "$additional_libdir/lib$name.$libext"; then
16641 found_dir="$additional_libdir"
16642 found_a="$additional_libdir/lib$name.$libext"
16643 if test -f "$additional_libdir/lib$name.la"; then
16644 found_la="$additional_libdir/lib$name.la"
16645 fi
16646 fi
16647 fi
16648 fi
16649 if test "X$found_dir" = "X"; then
16650 for x in $LDFLAGS $LTLIBLZMA; do
16651
16652 acl_save_prefix="$prefix"
16653 prefix="$acl_final_prefix"
16654 acl_save_exec_prefix="$exec_prefix"
16655 exec_prefix="$acl_final_exec_prefix"
16656 eval x=\"$x\"
16657 exec_prefix="$acl_save_exec_prefix"
16658 prefix="$acl_save_prefix"
16659
16660 case "$x" in
16661 -L*)
16662 dir=`echo "X$x" | sed -e 's/^X-L//'`
16663 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16664 found_dir="$dir"
16665 found_so="$dir/lib$name.$shlibext"
16666 if test -f "$dir/lib$name.la"; then
16667 found_la="$dir/lib$name.la"
16668 fi
16669 else
16670 if test -f "$dir/lib$name.$libext"; then
16671 found_dir="$dir"
16672 found_a="$dir/lib$name.$libext"
16673 if test -f "$dir/lib$name.la"; then
16674 found_la="$dir/lib$name.la"
16675 fi
16676 fi
16677 fi
16678 ;;
16679 esac
16680 if test "X$found_dir" != "X"; then
16681 break
16682 fi
16683 done
16684 fi
16685 if test "X$found_dir" != "X"; then
16686 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16687 if test "X$found_so" != "X"; then
16688 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16689 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16690 else
16691 haveit=
16692 for x in $ltrpathdirs; do
16693 if test "X$x" = "X$found_dir"; then
16694 haveit=yes
16695 break
16696 fi
16697 done
16698 if test -z "$haveit"; then
16699 ltrpathdirs="$ltrpathdirs $found_dir"
16700 fi
16701 if test "$hardcode_direct" = yes; then
16702 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16703 else
16704 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16705 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16706 haveit=
16707 for x in $rpathdirs; do
16708 if test "X$x" = "X$found_dir"; then
16709 haveit=yes
16710 break
16711 fi
16712 done
16713 if test -z "$haveit"; then
16714 rpathdirs="$rpathdirs $found_dir"
16715 fi
16716 else
16717 haveit=
16718 for x in $LDFLAGS $LIBLZMA; do
16719
16720 acl_save_prefix="$prefix"
16721 prefix="$acl_final_prefix"
16722 acl_save_exec_prefix="$exec_prefix"
16723 exec_prefix="$acl_final_exec_prefix"
16724 eval x=\"$x\"
16725 exec_prefix="$acl_save_exec_prefix"
16726 prefix="$acl_save_prefix"
16727
16728 if test "X$x" = "X-L$found_dir"; then
16729 haveit=yes
16730 break
16731 fi
16732 done
16733 if test -z "$haveit"; then
16734 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16735 fi
16736 if test "$hardcode_minus_L" != no; then
16737 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16738 else
16739 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16740 fi
16741 fi
16742 fi
16743 fi
16744 else
16745 if test "X$found_a" != "X"; then
16746 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16747 else
16748 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16749 fi
16750 fi
16751 additional_includedir=
16752 case "$found_dir" in
16753 */lib | */lib/)
16754 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16755 additional_includedir="$basedir/include"
16756 ;;
16757 esac
16758 if test "X$additional_includedir" != "X"; then
16759 if test "X$additional_includedir" != "X/usr/include"; then
16760 haveit=
16761 if test "X$additional_includedir" = "X/usr/local/include"; then
16762 if test -n "$GCC"; then
16763 case $host_os in
16764 linux*) haveit=yes;;
16765 esac
16766 fi
16767 fi
16768 if test -z "$haveit"; then
16769 for x in $CPPFLAGS $INCLZMA; do
16770
16771 acl_save_prefix="$prefix"
16772 prefix="$acl_final_prefix"
16773 acl_save_exec_prefix="$exec_prefix"
16774 exec_prefix="$acl_final_exec_prefix"
16775 eval x=\"$x\"
16776 exec_prefix="$acl_save_exec_prefix"
16777 prefix="$acl_save_prefix"
16778
16779 if test "X$x" = "X-I$additional_includedir"; then
16780 haveit=yes
16781 break
16782 fi
16783 done
16784 if test -z "$haveit"; then
16785 if test -d "$additional_includedir"; then
16786 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16787 fi
16788 fi
16789 fi
16790 fi
16791 fi
16792 if test -n "$found_la"; then
16793 save_libdir="$libdir"
16794 case "$found_la" in
16795 */* | *\\*) . "$found_la" ;;
16796 *) . "./$found_la" ;;
16797 esac
16798 libdir="$save_libdir"
16799 for dep in $dependency_libs; do
16800 case "$dep" in
16801 -L*)
16802 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16803 if test "X$additional_libdir" != "X/usr/lib"; then
16804 haveit=
16805 if test "X$additional_libdir" = "X/usr/local/lib"; then
16806 if test -n "$GCC"; then
16807 case $host_os in
16808 linux*) haveit=yes;;
16809 esac
16810 fi
16811 fi
16812 if test -z "$haveit"; then
16813 haveit=
16814 for x in $LDFLAGS $LIBLZMA; do
16815
16816 acl_save_prefix="$prefix"
16817 prefix="$acl_final_prefix"
16818 acl_save_exec_prefix="$exec_prefix"
16819 exec_prefix="$acl_final_exec_prefix"
16820 eval x=\"$x\"
16821 exec_prefix="$acl_save_exec_prefix"
16822 prefix="$acl_save_prefix"
16823
16824 if test "X$x" = "X-L$additional_libdir"; then
16825 haveit=yes
16826 break
16827 fi
16828 done
16829 if test -z "$haveit"; then
16830 if test -d "$additional_libdir"; then
16831 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16832 fi
16833 fi
16834 haveit=
16835 for x in $LDFLAGS $LTLIBLZMA; do
16836
16837 acl_save_prefix="$prefix"
16838 prefix="$acl_final_prefix"
16839 acl_save_exec_prefix="$exec_prefix"
16840 exec_prefix="$acl_final_exec_prefix"
16841 eval x=\"$x\"
16842 exec_prefix="$acl_save_exec_prefix"
16843 prefix="$acl_save_prefix"
16844
16845 if test "X$x" = "X-L$additional_libdir"; then
16846 haveit=yes
16847 break
16848 fi
16849 done
16850 if test -z "$haveit"; then
16851 if test -d "$additional_libdir"; then
16852 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16853 fi
16854 fi
16855 fi
16856 fi
16857 ;;
16858 -R*)
16859 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16860 if test "$enable_rpath" != no; then
16861 haveit=
16862 for x in $rpathdirs; do
16863 if test "X$x" = "X$dir"; then
16864 haveit=yes
16865 break
16866 fi
16867 done
16868 if test -z "$haveit"; then
16869 rpathdirs="$rpathdirs $dir"
16870 fi
16871 haveit=
16872 for x in $ltrpathdirs; do
16873 if test "X$x" = "X$dir"; then
16874 haveit=yes
16875 break
16876 fi
16877 done
16878 if test -z "$haveit"; then
16879 ltrpathdirs="$ltrpathdirs $dir"
16880 fi
16881 fi
16882 ;;
16883 -l*)
16884 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16885 ;;
16886 *.la)
16887 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16888 ;;
16889 *)
16890 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16891 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16892 ;;
16893 esac
16894 done
16895 fi
16896 else
16897 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16898 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16899 fi
16900 fi
16901 fi
16902 done
16903 done
16904 if test "X$rpathdirs" != "X"; then
16905 if test -n "$hardcode_libdir_separator"; then
16906 alldirs=
16907 for found_dir in $rpathdirs; do
16908 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16909 done
16910 acl_save_libdir="$libdir"
16911 libdir="$alldirs"
16912 eval flag=\"$hardcode_libdir_flag_spec\"
16913 libdir="$acl_save_libdir"
16914 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16915 else
16916 for found_dir in $rpathdirs; do
16917 acl_save_libdir="$libdir"
16918 libdir="$found_dir"
16919 eval flag=\"$hardcode_libdir_flag_spec\"
16920 libdir="$acl_save_libdir"
16921 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16922 done
16923 fi
16924 fi
16925 if test "X$ltrpathdirs" != "X"; then
16926 for found_dir in $ltrpathdirs; do
16927 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16928 done
16929 fi
16930
16931
16932 ac_save_CPPFLAGS="$CPPFLAGS"
16933
16934 for element in $INCLZMA; do
16935 haveit=
16936 for x in $CPPFLAGS; do
16937
16938 acl_save_prefix="$prefix"
16939 prefix="$acl_final_prefix"
16940 acl_save_exec_prefix="$exec_prefix"
16941 exec_prefix="$acl_final_exec_prefix"
16942 eval x=\"$x\"
16943 exec_prefix="$acl_save_exec_prefix"
16944 prefix="$acl_save_prefix"
16945
16946 if test "X$x" = "X$element"; then
16947 haveit=yes
16948 break
16949 fi
16950 done
16951 if test -z "$haveit"; then
16952 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16953 fi
16954 done
16955
16956
16957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16958$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16959if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16960 $as_echo_n "(cached) " >&6
16961else
16962
16963 ac_save_LIBS="$LIBS"
16964 LIBS="$LIBS $LIBLZMA"
16965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16966/* end confdefs.h. */
16967#include "lzma.h"
16968int
16969main ()
16970{
16971lzma_index_iter iter;
16972 lzma_index_iter_init (&iter, 0);
16973 lzma_mf_is_supported (LZMA_MF_HC3);
16974 ;
16975 return 0;
16976}
16977_ACEOF
16978if ac_fn_c_try_link "$LINENO"; then :
16979 ac_cv_liblzma=yes
16980else
16981 ac_cv_liblzma=no
16982fi
16983rm -f core conftest.err conftest.$ac_objext \
16984 conftest$ac_exeext conftest.$ac_ext
16985 LIBS="$ac_save_LIBS"
16986
16987fi
16988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16989$as_echo "$ac_cv_liblzma" >&6; }
16990 if test "$ac_cv_liblzma" = yes; then
16991 HAVE_LIBLZMA=yes
16992
16993$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16994
16995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16996$as_echo_n "checking how to link with liblzma... " >&6; }
16997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16998$as_echo "$LIBLZMA" >&6; }
16999 else
17000 HAVE_LIBLZMA=no
17001 CPPFLAGS="$ac_save_CPPFLAGS"
17002 LIBLZMA=
17003 LTLIBLZMA=
17004 fi
17005
17006
17007
17008
17009
17010
17011 if test "$HAVE_LIBLZMA" != yes; then
17012 if test "$with_lzma" = yes; then
d0ac1c44 17013 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
17014 fi
17015 fi
17016 fi
17017fi
17018
3fc11d3e
JM
17019LIBGUI="../libgui/src/libgui.a"
17020GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17021
17022
7a292a7a 17023
3fc11d3e
JM
17024WIN32LDAPP=
17025
17026
17027
d91670b9 17028case "${host}" in
686a5eed 17029*-*-cygwin* | *-*-mingw* )
d91670b9
CV
17030 configdir="win"
17031 ;;
17032*)
17033 configdir="unix"
17034 ;;
17035esac
3fc11d3e
JM
17036
17037GDBTKLIBS=
17038if test "${enable_gdbtk}" = "yes"; then
17039
d1c3b63a
KS
17040 # Gdbtk must have an absolute path to srcdir in order to run
17041 # properly when not installed.
17042 here=`pwd`
17043 cd ${srcdir}
17044 GDBTK_SRC_DIR=`pwd`
17045 cd $here
17046
bec39cab 17047
5062cc19
KS
17048 #
17049 # Ok, lets find the tcl configuration
17050 # First, look for one uninstalled.
17051 # the alternative search directory is invoked by --with-tcl
17052 #
3fc11d3e 17053
5062cc19
KS
17054 if test x"${no_tcl}" = x ; then
17055 # we reset no_tcl in case something fails here
17056 no_tcl=true
bec39cab 17057
81ecdfbb
RW
17058# Check whether --with-tcl was given.
17059if test "${with_tcl+set}" = set; then :
17060 withval=$with_tcl; with_tclconfig=${withval}
17061fi
17062
17063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17064$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 17065 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 17066 $as_echo_n "(cached) " >&6
3fc11d3e 17067else
bec39cab 17068
3fc11d3e 17069
5062cc19
KS
17070 # First check to see if --with-tcl was specified.
17071 case "${host}" in
17072 *-*-cygwin*) platDir="win" ;;
17073 *) platDir="unix" ;;
17074 esac
17075 if test x"${with_tclconfig}" != x ; then
17076 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17077 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17078 else
d0ac1c44 17079 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
17080 fi
17081 fi
17082
17083 # then check for a private Tcl installation
17084 if test x"${ac_cv_c_tclconfig}" = x ; then
17085 for i in \
17086 ../tcl \
17087 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17088 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17089 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17090 ../../tcl \
17091 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17092 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17093 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17094 ../../../tcl \
17095 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17096 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17097 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17098 if test -f "$i/$platDir/tclConfig.sh" ; then
17099 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17100 break
17101 fi
17102 done
17103 fi
17104
17105 # on Darwin, check in Framework installation locations
17106 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17107 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17108 `ls -d /Library/Frameworks 2>/dev/null` \
17109 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17110 `ls -d /System/Library/Frameworks 2>/dev/null` \
17111 ; do
17112 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17113 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17114 break
17115 fi
17116 done
17117 fi
17118
17119 # check in a few common install locations
17120 if test x"${ac_cv_c_tclconfig}" = x ; then
17121 for i in `ls -d ${libdir} 2>/dev/null` \
17122 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17123 `ls -d ${prefix}/lib 2>/dev/null` \
17124 `ls -d /usr/local/lib 2>/dev/null` \
17125 `ls -d /usr/contrib/lib 2>/dev/null` \
17126 `ls -d /usr/lib 2>/dev/null` \
17127 ; do
17128 if test -f "$i/tclConfig.sh" ; then
17129 ac_cv_c_tclconfig=`(cd $i; pwd)`
17130 break
17131 fi
17132 done
17133 fi
3fc11d3e 17134
5062cc19
KS
17135 # check in a few other private locations
17136 if test x"${ac_cv_c_tclconfig}" = x ; then
17137 for i in \
17138 ${srcdir}/../tcl \
17139 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17140 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17141 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17142 if test -f "$i/$platDir/tclConfig.sh" ; then
17143 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17144 break
17145 fi
17146 done
17147 fi
bec39cab 17148
3fc11d3e
JM
17149fi
17150
5062cc19
KS
17151
17152 if test x"${ac_cv_c_tclconfig}" = x ; then
17153 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
17154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17155$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
17156 else
17157 no_tcl=
17158 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
17159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17160$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
17161 fi
17162 fi
3fc11d3e 17163
bec39cab 17164
85541719
DE
17165 # If $no_tk is nonempty, then we can't do Tk, and there is no
17166 # point to doing Tcl.
bec39cab 17167
5062cc19
KS
17168 #
17169 # Ok, lets find the tk configuration
17170 # First, look for one uninstalled.
17171 # the alternative search directory is invoked by --with-tk
17172 #
3fc11d3e 17173
5062cc19
KS
17174 if test x"${no_tk}" = x ; then
17175 # we reset no_tk in case something fails here
17176 no_tk=true
bec39cab 17177
81ecdfbb
RW
17178# Check whether --with-tk was given.
17179if test "${with_tk+set}" = set; then :
17180 withval=$with_tk; with_tkconfig=${withval}
17181fi
17182
17183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17184$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 17185 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 17186 $as_echo_n "(cached) " >&6
bec39cab 17187else
3fc11d3e
JM
17188
17189
5062cc19
KS
17190 # First check to see if --with-tkconfig was specified.
17191 if test x"${with_tkconfig}" != x ; then
17192 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17193 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17194 else
d0ac1c44 17195 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
17196 fi
17197 fi
3fc11d3e 17198
5062cc19
KS
17199 # then check for a private Tk library
17200 case "${host}" in
17201 *-*-cygwin*) platDir="win" ;;
17202 *) platDir="unix" ;;
17203 esac
17204 if test x"${ac_cv_c_tkconfig}" = x ; then
17205 for i in \
17206 ../tk \
17207 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17208 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17209 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17210 ../../tk \
17211 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17212 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17213 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17214 ../../../tk \
17215 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17216 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17217 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17218 if test -f "$i/$platDir/tkConfig.sh" ; then
17219 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17220 break
17221 fi
17222 done
17223 fi
17224
17225 # on Darwin, check in Framework installation locations
17226 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17227 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17228 `ls -d /Library/Frameworks 2>/dev/null` \
17229 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17230 `ls -d /System/Library/Frameworks 2>/dev/null` \
17231 ; do
17232 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17233 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17234 break
17235 fi
17236 done
17237 fi
17238
17239 # check in a few common install locations
17240 if test x"${ac_cv_c_tkconfig}" = x ; then
17241 for i in `ls -d ${libdir} 2>/dev/null` \
17242 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17243 `ls -d ${prefix}/lib 2>/dev/null` \
17244 `ls -d /usr/local/lib 2>/dev/null` \
17245 `ls -d /usr/contrib/lib 2>/dev/null` \
17246 `ls -d /usr/lib 2>/dev/null` \
17247 ; do
17248 if test -f "$i/tkConfig.sh" ; then
17249 ac_cv_c_tkconfig=`(cd $i; pwd)`
17250 break
17251 fi
17252 done
17253 fi
17254 # check in a few other private locations
17255 if test x"${ac_cv_c_tkconfig}" = x ; then
17256 for i in \
17257 ${srcdir}/../tk \
17258 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17259 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17260 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17261 if test -f "$i/$platDir/tkConfig.sh" ; then
17262 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17263 break
17264 fi
17265 done
17266 fi
3fc11d3e 17267
3fc11d3e
JM
17268fi
17269
17270
5062cc19
KS
17271 if test x"${ac_cv_c_tkconfig}" = x ; then
17272 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
17273 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17274$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
17275 else
17276 no_tk=
17277 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
17278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17279$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 17280 fi
3fc11d3e 17281 fi
dd2504ab 17282
dd2504ab 17283
85541719
DE
17284 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17285
81ecdfbb
RW
17286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17287$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
17288
17289 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
17290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17291$as_echo "loading" >&6; }
85541719
DE
17292 . ${TCL_BIN_DIR}/tclConfig.sh
17293 else
81ecdfbb
RW
17294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17295$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
17296 fi
17297
17298 # eval is required to do the TCL_DBGX substitution
17299 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17300 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17301
17302 # If the TCL_BIN_DIR is the build directory (not the install directory),
17303 # then set the common variable name to the value of the build variables.
17304 # For example, the variable TCL_LIB_SPEC will be set to the value
17305 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17306 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17307 # installed and uninstalled version of Tcl.
17308 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17309 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17310 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17311 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17312 elif test "`uname -s`" = "Darwin"; then
17313 # If Tcl was built as a framework, attempt to use the libraries
17314 # from the framework at the given location so that linking works
a68ffae9 17315 # against Tcl.framework installed in an arbitrary location.
85541719
DE
17316 case ${TCL_DEFS} in
17317 *TCL_FRAMEWORK*)
17318 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17319 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17320 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17321 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17322 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17323 break
17324 fi
17325 done
17326 fi
17327 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17328 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17329 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17330 fi
17331 ;;
17332 esac
17333 fi
17334
17335 # eval is required to do the TCL_DBGX substitution
17336 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17337 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17338 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17339 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355 # Check for in-tree tcl
17356 here=`pwd`
17357 cd ${srcdir}/..
17358 topdir=`pwd`
17359 cd ${here}
17360
17361 intree="no"
17362 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17363 intree="yes"
17364 fi
17365
17366 # Find Tcl private headers
17367 if test x"${intree}" = xno; then
17368
81ecdfbb
RW
17369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17370$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
17371 private_dir=""
17372 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17373 if test -f ${dir}/tclInt.h ; then
17374 private_dir=${dir}
17375 fi
17376
17377 if test x"${private_dir}" = x; then
d0ac1c44 17378 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
17379 else
17380 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17382$as_echo "${private_dir}" >&6; }
85541719
DE
17383 fi
17384
17385 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17386 TCL_LIBRARY="${TCL_LIB_SPEC}"
17387 TCL_DEPS=""
17388 else
17389 # If building tcl in the same src tree, private headers
17390 # are not needed, but we need to be sure to use the right
17391 # headers library
17392 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17393 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17394 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17395 fi
17396
17397
17398
17399
17400
81ecdfbb
RW
17401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17402$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 17403
5062cc19 17404 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
17405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17406$as_echo "loading" >&6; }
5062cc19 17407 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 17408 else
81ecdfbb
RW
17409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17410$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 17411 fi
bec39cab 17412
5062cc19
KS
17413 # eval is required to do the TK_DBGX substitution
17414 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17415 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17416
17417 # If the TK_BIN_DIR is the build directory (not the install directory),
17418 # then set the common variable name to the value of the build variables.
17419 # For example, the variable TK_LIB_SPEC will be set to the value
17420 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17421 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17422 # installed and uninstalled version of Tcl.
85541719 17423 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
17424 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17425 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17426 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17427 elif test "`uname -s`" = "Darwin"; then
17428 # If Tk was built as a framework, attempt to use the libraries
17429 # from the framework at the given location so that linking works
a68ffae9 17430 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
17431 case ${TK_DEFS} in
17432 *TK_FRAMEWORK*)
85541719 17433 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
17434 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17435 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17436 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17437 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17438 break
17439 fi
17440 done
17441 fi
85541719 17442 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
17443 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17444 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17445 fi
17446 ;;
17447 esac
3fc11d3e
JM
17448 fi
17449
5062cc19
KS
17450 # eval is required to do the TK_DBGX substitution
17451 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17452 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17453 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17454 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 17455
3fc11d3e
JM
17456
17457
bec39cab
AC
17458
17459
17460
17461
17462
17463
17464
3fc11d3e 17465
3fc11d3e 17466
bec39cab 17467
bec39cab 17468
85541719
DE
17469 # Check for in-tree Tk
17470 intree="no"
17471 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17472 intree="yes"
17473 fi
3fc11d3e 17474
85541719
DE
17475 # Find Tk private headers
17476 if test x"${intree}" = xno; then
3fc11d3e 17477
81ecdfbb
RW
17478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17479$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
17480 private_dir=""
17481 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17482 if test -f ${dir}/tkInt.h; then
17483 private_dir=${dir}
3fc11d3e 17484 fi
bec39cab 17485
5062cc19 17486 if test x"${private_dir}" = x; then
d0ac1c44 17487 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 17488 else
5062cc19 17489 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17491$as_echo "${private_dir}" >&6; }
3fc11d3e 17492 fi
3fc11d3e 17493
85541719
DE
17494 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17495 TK_LIBRARY=${TK_LIB_SPEC}
17496 TK_DEPS=""
17497 else
17498 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17499 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17500 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17501 fi
3fc11d3e
JM
17502
17503
3fc11d3e
JM
17504
17505
3fc11d3e 17506
85541719 17507 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 17508
85541719
DE
17509 # Include some libraries that Tcl and Tk want.
17510 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17511 # Yes, the ordering seems wrong here. But it isn't.
17512 # TK_LIBS is the list of libraries that need to be linked
17513 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17514 # were in LIBS then any link tests after this point would
17515 # try to include things like `$(LIBGUI)', which wouldn't work.
17516 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 17517
85541719
DE
17518 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17519 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17520 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17521 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17522 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17523 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17524 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 17525
0ad6b8ee 17526 if test x"$gdb_cv_os_cygwin" = xyes; then
85541719
DE
17527 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17528 WIN32LDAPP="-Wl,--subsystem,console"
17529 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 17530 fi
ffc6a242 17531
81ecdfbb 17532 subdirs="$subdirs gdbtk"
3ace7edb 17533
85541719 17534 fi
3fc11d3e
JM
17535fi
17536
17537
17538
17539
17540
17541
17542
17543
81ecdfbb
RW
17544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17545$as_echo_n "checking for X... " >&6; }
bec39cab 17546
c906108c 17547
81ecdfbb
RW
17548# Check whether --with-x was given.
17549if test "${with_x+set}" = set; then :
17550 withval=$with_x;
17551fi
c906108c
SS
17552
17553# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17554if test "x$with_x" = xno; then
17555 # The user explicitly disabled X.
17556 have_x=disabled
17557else
81ecdfbb 17558 case $x_includes,$x_libraries in #(
d0ac1c44
SM
17559 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17560 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 17561 $as_echo_n "(cached) " >&6
c906108c
SS
17562else
17563 # One or both of the vars are not set, and there is no cached value.
bec39cab 17564ac_x_includes=no ac_x_libraries=no
81ecdfbb 17565rm -f -r conftest.dir
bec39cab
AC
17566if mkdir conftest.dir; then
17567 cd conftest.dir
bec39cab 17568 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
17569incroot:
17570 @echo incroot='${INCROOT}'
17571usrlibdir:
17572 @echo usrlibdir='${USRLIBDIR}'
17573libdir:
17574 @echo libdir='${LIBDIR}'
17575_ACEOF
17576 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 17577 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
17578 for ac_var in incroot usrlibdir libdir; do
17579 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17580 done
c906108c 17581 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
17582 for ac_extension in a so sl dylib la dll; do
17583 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17584 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 17585 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
17586 fi
17587 done
17588 # Screen out bogus values from the imake configuration. They are
17589 # bogus both because they are the default anyway, and because
17590 # using them would break gcc on systems where it needs fixed includes.
bec39cab 17591 case $ac_im_incroot in
81ecdfbb 17592 /usr/include) ac_x_includes= ;;
bec39cab 17593 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 17594 esac
bec39cab 17595 case $ac_im_usrlibdir in
81ecdfbb 17596 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 17597 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
17598 esac
17599 fi
17600 cd ..
81ecdfbb 17601 rm -f -r conftest.dir
c906108c
SS
17602fi
17603
bec39cab
AC
17604# Standard set of common directories for X headers.
17605# Check X11 before X11Rn because it is often a symlink to the current release.
17606ac_x_header_dirs='
17607/usr/X11/include
81ecdfbb 17608/usr/X11R7/include
bec39cab
AC
17609/usr/X11R6/include
17610/usr/X11R5/include
17611/usr/X11R4/include
17612
17613/usr/include/X11
81ecdfbb 17614/usr/include/X11R7
bec39cab
AC
17615/usr/include/X11R6
17616/usr/include/X11R5
17617/usr/include/X11R4
17618
17619/usr/local/X11/include
81ecdfbb 17620/usr/local/X11R7/include
bec39cab
AC
17621/usr/local/X11R6/include
17622/usr/local/X11R5/include
17623/usr/local/X11R4/include
17624
17625/usr/local/include/X11
81ecdfbb 17626/usr/local/include/X11R7
bec39cab
AC
17627/usr/local/include/X11R6
17628/usr/local/include/X11R5
17629/usr/local/include/X11R4
17630
17631/usr/X386/include
17632/usr/x386/include
17633/usr/XFree86/include/X11
17634
17635/usr/include
17636/usr/local/include
17637/usr/unsupported/include
17638/usr/athena/include
17639/usr/local/x11r5/include
17640/usr/lpp/Xamples/include
17641
17642/usr/openwin/include
17643/usr/openwin/share/include'
17644
17645if test "$ac_x_includes" = no; then
81ecdfbb 17646 # Guess where to find include files, by looking for Xlib.h.
c906108c 17647 # First, try using that file with no special directory specified.
81ecdfbb 17648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17649/* end confdefs.h. */
81ecdfbb 17650#include <X11/Xlib.h>
bec39cab 17651_ACEOF
81ecdfbb 17652if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
17653 # We can compile using X headers with no special include directory.
17654ac_x_includes=
17655else
bec39cab 17656 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 17657 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
17658 ac_x_includes=$ac_dir
17659 break
17660 fi
17661done
c906108c 17662fi
d0ac1c44 17663rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 17664fi # $ac_x_includes = no
c906108c 17665
bec39cab 17666if test "$ac_x_libraries" = no; then
c906108c 17667 # Check for the libraries.
c906108c
SS
17668 # See if we find them without any special options.
17669 # Don't add to $LIBS permanently.
bec39cab 17670 ac_save_LIBS=$LIBS
81ecdfbb
RW
17671 LIBS="-lX11 $LIBS"
17672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17673/* end confdefs.h. */
81ecdfbb 17674#include <X11/Xlib.h>
bec39cab
AC
17675int
17676main ()
17677{
81ecdfbb 17678XrmInitialize ()
bec39cab
AC
17679 ;
17680 return 0;
17681}
17682_ACEOF
81ecdfbb 17683if ac_fn_c_try_link "$LINENO"; then :
bec39cab 17684 LIBS=$ac_save_LIBS
c906108c
SS
17685# We can link X programs with no special library path.
17686ac_x_libraries=
17687else
81ecdfbb
RW
17688 LIBS=$ac_save_LIBS
17689for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 17690do
bec39cab 17691 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
17692 for ac_extension in a so sl dylib la dll; do
17693 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
17694 ac_x_libraries=$ac_dir
17695 break 2
17696 fi
17697 done
17698done
17699fi
81ecdfbb
RW
17700rm -f core conftest.err conftest.$ac_objext \
17701 conftest$ac_exeext conftest.$ac_ext
bec39cab 17702fi # $ac_x_libraries = no
c906108c 17703
81ecdfbb
RW
17704case $ac_x_includes,$ac_x_libraries in #(
17705 no,* | *,no | *\'*)
17706 # Didn't find X, or a directory has "'" in its name.
17707 ac_cv_have_x="have_x=no";; #(
17708 *)
17709 # Record where we found X for the cache.
17710 ac_cv_have_x="have_x=yes\
17711 ac_x_includes='$ac_x_includes'\
17712 ac_x_libraries='$ac_x_libraries'"
17713esac
c906108c 17714fi
81ecdfbb
RW
17715;; #(
17716 *) have_x=yes;;
17717 esac
c906108c
SS
17718 eval "$ac_cv_have_x"
17719fi # $with_x != no
17720
17721if test "$have_x" != yes; then
81ecdfbb
RW
17722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17723$as_echo "$have_x" >&6; }
c906108c
SS
17724 no_x=yes
17725else
17726 # If each of the values was on the command line, it overrides each guess.
17727 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17728 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17729 # Update the cache value to reflect the command line values.
81ecdfbb
RW
17730 ac_cv_have_x="have_x=yes\
17731 ac_x_includes='$x_includes'\
17732 ac_x_libraries='$x_libraries'"
17733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17734$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
17735fi
17736
17737
bec39cab 17738# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 17739# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
17740# This code just checks for a few cases where we'd like to ignore those
17741# definitions, even when they're present in the '.mt' file. These cases
17742# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 17743# not part of the source tree.
7a292a7a 17744#
81ecdfbb
RW
17745# Check whether --enable-sim was given.
17746if test "${enable_sim+set}" = set; then :
17747 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
17748 echo "enableval = ${enableval}";
17749 case "${enableval}" in
17750 yes) ignore_sim=false ;;
17751 no) ignore_sim=true ;;
17752 *) ignore_sim=false ;;
17753 esac
17754else
17755 ignore_sim=false
81ecdfbb
RW
17756fi
17757
7a292a7a
SS
17758
17759if test ! -d "${srcdir}/../sim"; then
17760 ignore_sim=true
17761fi
17762
9b624dbe
UW
17763SIM=
17764SIM_OBS=
17765if test "${ignore_sim}" = "false"; then
17766 if test x"${gdb_sim}" != x ; then
17767 SIM="${gdb_sim}"
17768 SIM_OBS="remote-sim.o"
60ca704f 17769
81ecdfbb 17770$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17771
976102cd
PA
17772
17773 # Some tdep code should only be compiled in when the ppc sim is
17774 # built. PR sim/13418.
17775 case $target in
17776 powerpc*-*-*)
17777
17778$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17779
17780 ;;
17781 esac
9b624dbe 17782 fi
7a292a7a
SS
17783fi
17784
17785
17786
c906108c
SS
17787
17788
17789
17790
17791
17792
dfcd3bfb 17793
e56ac5c3
AC
17794
17795
b3a90332
AC
17796
17797
c35f4ffc 17798# List of host floatformats.
bec39cab
AC
17799
17800cat >>confdefs.h <<_ACEOF
c35f4ffc 17801#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17802_ACEOF
c35f4ffc 17803
bec39cab
AC
17804
17805cat >>confdefs.h <<_ACEOF
c35f4ffc 17806#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17807_ACEOF
17808
c35f4ffc 17809
bec39cab 17810cat >>confdefs.h <<_ACEOF
c35f4ffc 17811#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17812_ACEOF
c35f4ffc
AC
17813
17814
c906108c
SS
17815# target_subdir is used by the testsuite to find the target libraries.
17816target_subdir=
17817if test "${host}" != "${target}"; then
17818 target_subdir="${target_alias}/"
17819fi
17820
17821
21ea5acd 17822# Import nat definitions.
2b351b19 17823nat_makefile_frag=/dev/null
771b4502 17824if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17825 . ${srcdir}/configure.nat
17826 nativefile=$NAT_FILE
c906108c 17827fi
c906108c 17828
c906108c
SS
17829
17830
17831
21ea5acd
SDJ
17832
17833
17834
17835
17836
c906108c
SS
17837
17838
b00a8037 17839if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17840
17841cat >>confdefs.h <<_ACEOF
b00a8037 17842#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17843_ACEOF
b00a8037
DJ
17844
17845fi
17846
496c0e1b
JB
17847# Check whether --enable-gdbserver was given.
17848if test "${enable_gdbserver+set}" = set; then :
17849 enableval=$enable_gdbserver; case "${enableval}" in
17850 yes| no|auto) ;;
d0ac1c44 17851 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17852esac
17853else
17854 enable_gdbserver=auto
17855fi
17856
17857
17858# We only build gdbserver automatically in a native configuration, and
17859# only if the user did not explicitly disable its build.
17860if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17862$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17863 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17865$as_echo "yes" >&6; }
17866 subdirs="$subdirs gdbserver"
3ace7edb 17867
496c0e1b 17868 gdbserver_build_enabled=yes
8dcde887 17869 else
81ecdfbb
RW
17870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17871$as_echo "no" >&6; }
8dcde887
MK
17872 fi
17873fi
17874
496c0e1b
JB
17875# If the user explicitly request the gdbserver to be built, verify that
17876# we were in fact able to enable it.
17877if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17878 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17879fi
17880
393fd4c3
YQ
17881# Check for babeltrace and babeltrace-ctf
17882
17883# Check whether --with-babeltrace was given.
17884if test "${with_babeltrace+set}" = set; then :
17885 withval=$with_babeltrace;
17886else
17887 with_babeltrace=auto
17888fi
17889
17890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17891$as_echo_n "checking whether to use babeltrace... " >&6; }
17892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17893$as_echo "$with_babeltrace" >&6; }
17894
17895if test "x$with_babeltrace" = "xno"; then
17896 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17897$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17898else
17899 # Append -Werror to CFLAGS so that configure can catch the warning
17900 # "assignment from incompatible pointer type", which is related to
17901 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17902 # in GDB, while babeltrace 1.0.3 is broken.
17903 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17904 # safe to save and restore CFLAGS here.
17905 saved_CFLAGS=$CFLAGS
17906 CFLAGS="$CFLAGS -Werror"
17907
17908
17909
17910
17911
17912
17913
17914
17915 use_additional=yes
17916
17917 acl_save_prefix="$prefix"
17918 prefix="$acl_final_prefix"
17919 acl_save_exec_prefix="$exec_prefix"
17920 exec_prefix="$acl_final_exec_prefix"
17921
17922 eval additional_includedir=\"$includedir\"
17923 eval additional_libdir=\"$libdir\"
17924
17925 exec_prefix="$acl_save_exec_prefix"
17926 prefix="$acl_save_prefix"
17927
17928
17929# Check whether --with-libbabeltrace-prefix was given.
17930if test "${with_libbabeltrace_prefix+set}" = set; then :
17931 withval=$with_libbabeltrace_prefix;
17932 if test "X$withval" = "Xno"; then
17933 use_additional=no
17934 else
17935 if test "X$withval" = "X"; then
17936
17937 acl_save_prefix="$prefix"
17938 prefix="$acl_final_prefix"
17939 acl_save_exec_prefix="$exec_prefix"
17940 exec_prefix="$acl_final_exec_prefix"
17941
17942 eval additional_includedir=\"$includedir\"
17943 eval additional_libdir=\"$libdir\"
17944
17945 exec_prefix="$acl_save_exec_prefix"
17946 prefix="$acl_save_prefix"
17947
17948 else
17949 additional_includedir="$withval/include"
17950 additional_libdir="$withval/lib"
17951 fi
17952 fi
17953
17954fi
17955
17956 LIBBABELTRACE=
17957 LTLIBBABELTRACE=
17958 INCBABELTRACE=
17959 rpathdirs=
17960 ltrpathdirs=
17961 names_already_handled=
17962 names_next_round='babeltrace babeltrace-ctf'
17963 while test -n "$names_next_round"; do
17964 names_this_round="$names_next_round"
17965 names_next_round=
17966 for name in $names_this_round; do
17967 already_handled=
17968 for n in $names_already_handled; do
17969 if test "$n" = "$name"; then
17970 already_handled=yes
17971 break
17972 fi
17973 done
17974 if test -z "$already_handled"; then
17975 names_already_handled="$names_already_handled $name"
17976 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17977 eval value=\"\$HAVE_LIB$uppername\"
17978 if test -n "$value"; then
17979 if test "$value" = yes; then
17980 eval value=\"\$LIB$uppername\"
17981 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17982 eval value=\"\$LTLIB$uppername\"
17983 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17984 else
17985 :
17986 fi
17987 else
17988 found_dir=
17989 found_la=
17990 found_so=
17991 found_a=
17992 if test $use_additional = yes; then
17993 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17994 found_dir="$additional_libdir"
17995 found_so="$additional_libdir/lib$name.$shlibext"
17996 if test -f "$additional_libdir/lib$name.la"; then
17997 found_la="$additional_libdir/lib$name.la"
17998 fi
17999 else
18000 if test -f "$additional_libdir/lib$name.$libext"; then
18001 found_dir="$additional_libdir"
18002 found_a="$additional_libdir/lib$name.$libext"
18003 if test -f "$additional_libdir/lib$name.la"; then
18004 found_la="$additional_libdir/lib$name.la"
18005 fi
18006 fi
18007 fi
18008 fi
18009 if test "X$found_dir" = "X"; then
18010 for x in $LDFLAGS $LTLIBBABELTRACE; do
18011
18012 acl_save_prefix="$prefix"
18013 prefix="$acl_final_prefix"
18014 acl_save_exec_prefix="$exec_prefix"
18015 exec_prefix="$acl_final_exec_prefix"
18016 eval x=\"$x\"
18017 exec_prefix="$acl_save_exec_prefix"
18018 prefix="$acl_save_prefix"
18019
18020 case "$x" in
18021 -L*)
18022 dir=`echo "X$x" | sed -e 's/^X-L//'`
18023 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
18024 found_dir="$dir"
18025 found_so="$dir/lib$name.$shlibext"
18026 if test -f "$dir/lib$name.la"; then
18027 found_la="$dir/lib$name.la"
18028 fi
18029 else
18030 if test -f "$dir/lib$name.$libext"; then
18031 found_dir="$dir"
18032 found_a="$dir/lib$name.$libext"
18033 if test -f "$dir/lib$name.la"; then
18034 found_la="$dir/lib$name.la"
18035 fi
18036 fi
18037 fi
18038 ;;
18039 esac
18040 if test "X$found_dir" != "X"; then
18041 break
18042 fi
18043 done
18044 fi
18045 if test "X$found_dir" != "X"; then
18046 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18047 if test "X$found_so" != "X"; then
18048 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18049 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18050 else
18051 haveit=
18052 for x in $ltrpathdirs; do
18053 if test "X$x" = "X$found_dir"; then
18054 haveit=yes
18055 break
18056 fi
18057 done
18058 if test -z "$haveit"; then
18059 ltrpathdirs="$ltrpathdirs $found_dir"
18060 fi
18061 if test "$hardcode_direct" = yes; then
18062 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18063 else
18064 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18065 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18066 haveit=
18067 for x in $rpathdirs; do
18068 if test "X$x" = "X$found_dir"; then
18069 haveit=yes
18070 break
18071 fi
18072 done
18073 if test -z "$haveit"; then
18074 rpathdirs="$rpathdirs $found_dir"
18075 fi
18076 else
18077 haveit=
18078 for x in $LDFLAGS $LIBBABELTRACE; do
18079
18080 acl_save_prefix="$prefix"
18081 prefix="$acl_final_prefix"
18082 acl_save_exec_prefix="$exec_prefix"
18083 exec_prefix="$acl_final_exec_prefix"
18084 eval x=\"$x\"
18085 exec_prefix="$acl_save_exec_prefix"
18086 prefix="$acl_save_prefix"
18087
18088 if test "X$x" = "X-L$found_dir"; then
18089 haveit=yes
18090 break
18091 fi
18092 done
18093 if test -z "$haveit"; then
18094 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18095 fi
18096 if test "$hardcode_minus_L" != no; then
18097 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18098 else
18099 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18100 fi
18101 fi
18102 fi
18103 fi
18104 else
18105 if test "X$found_a" != "X"; then
18106 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18107 else
18108 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18109 fi
18110 fi
18111 additional_includedir=
18112 case "$found_dir" in
18113 */lib | */lib/)
18114 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18115 additional_includedir="$basedir/include"
18116 ;;
18117 esac
18118 if test "X$additional_includedir" != "X"; then
18119 if test "X$additional_includedir" != "X/usr/include"; then
18120 haveit=
18121 if test "X$additional_includedir" = "X/usr/local/include"; then
18122 if test -n "$GCC"; then
18123 case $host_os in
18124 linux*) haveit=yes;;
18125 esac
18126 fi
18127 fi
18128 if test -z "$haveit"; then
18129 for x in $CPPFLAGS $INCBABELTRACE; do
18130
18131 acl_save_prefix="$prefix"
18132 prefix="$acl_final_prefix"
18133 acl_save_exec_prefix="$exec_prefix"
18134 exec_prefix="$acl_final_exec_prefix"
18135 eval x=\"$x\"
18136 exec_prefix="$acl_save_exec_prefix"
18137 prefix="$acl_save_prefix"
18138
18139 if test "X$x" = "X-I$additional_includedir"; then
18140 haveit=yes
18141 break
18142 fi
18143 done
18144 if test -z "$haveit"; then
18145 if test -d "$additional_includedir"; then
18146 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18147 fi
18148 fi
18149 fi
18150 fi
18151 fi
18152 if test -n "$found_la"; then
18153 save_libdir="$libdir"
18154 case "$found_la" in
18155 */* | *\\*) . "$found_la" ;;
18156 *) . "./$found_la" ;;
18157 esac
18158 libdir="$save_libdir"
18159 for dep in $dependency_libs; do
18160 case "$dep" in
18161 -L*)
18162 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18163 if test "X$additional_libdir" != "X/usr/lib"; then
18164 haveit=
18165 if test "X$additional_libdir" = "X/usr/local/lib"; then
18166 if test -n "$GCC"; then
18167 case $host_os in
18168 linux*) haveit=yes;;
18169 esac
18170 fi
18171 fi
18172 if test -z "$haveit"; then
18173 haveit=
18174 for x in $LDFLAGS $LIBBABELTRACE; do
18175
18176 acl_save_prefix="$prefix"
18177 prefix="$acl_final_prefix"
18178 acl_save_exec_prefix="$exec_prefix"
18179 exec_prefix="$acl_final_exec_prefix"
18180 eval x=\"$x\"
18181 exec_prefix="$acl_save_exec_prefix"
18182 prefix="$acl_save_prefix"
18183
18184 if test "X$x" = "X-L$additional_libdir"; then
18185 haveit=yes
18186 break
18187 fi
18188 done
18189 if test -z "$haveit"; then
18190 if test -d "$additional_libdir"; then
18191 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18192 fi
18193 fi
18194 haveit=
18195 for x in $LDFLAGS $LTLIBBABELTRACE; do
18196
18197 acl_save_prefix="$prefix"
18198 prefix="$acl_final_prefix"
18199 acl_save_exec_prefix="$exec_prefix"
18200 exec_prefix="$acl_final_exec_prefix"
18201 eval x=\"$x\"
18202 exec_prefix="$acl_save_exec_prefix"
18203 prefix="$acl_save_prefix"
18204
18205 if test "X$x" = "X-L$additional_libdir"; then
18206 haveit=yes
18207 break
18208 fi
18209 done
18210 if test -z "$haveit"; then
18211 if test -d "$additional_libdir"; then
18212 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18213 fi
18214 fi
18215 fi
18216 fi
18217 ;;
18218 -R*)
18219 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18220 if test "$enable_rpath" != no; then
18221 haveit=
18222 for x in $rpathdirs; do
18223 if test "X$x" = "X$dir"; then
18224 haveit=yes
18225 break
18226 fi
18227 done
18228 if test -z "$haveit"; then
18229 rpathdirs="$rpathdirs $dir"
18230 fi
18231 haveit=
18232 for x in $ltrpathdirs; do
18233 if test "X$x" = "X$dir"; then
18234 haveit=yes
18235 break
18236 fi
18237 done
18238 if test -z "$haveit"; then
18239 ltrpathdirs="$ltrpathdirs $dir"
18240 fi
18241 fi
18242 ;;
18243 -l*)
18244 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18245 ;;
18246 *.la)
18247 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18248 ;;
18249 *)
18250 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18251 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18252 ;;
18253 esac
18254 done
18255 fi
18256 else
18257 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18258 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18259 fi
18260 fi
18261 fi
18262 done
18263 done
18264 if test "X$rpathdirs" != "X"; then
18265 if test -n "$hardcode_libdir_separator"; then
18266 alldirs=
18267 for found_dir in $rpathdirs; do
18268 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18269 done
18270 acl_save_libdir="$libdir"
18271 libdir="$alldirs"
18272 eval flag=\"$hardcode_libdir_flag_spec\"
18273 libdir="$acl_save_libdir"
18274 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18275 else
18276 for found_dir in $rpathdirs; do
18277 acl_save_libdir="$libdir"
18278 libdir="$found_dir"
18279 eval flag=\"$hardcode_libdir_flag_spec\"
18280 libdir="$acl_save_libdir"
18281 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18282 done
18283 fi
18284 fi
18285 if test "X$ltrpathdirs" != "X"; then
18286 for found_dir in $ltrpathdirs; do
18287 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18288 done
18289 fi
18290
18291
18292 ac_save_CPPFLAGS="$CPPFLAGS"
18293
18294 for element in $INCBABELTRACE; do
18295 haveit=
18296 for x in $CPPFLAGS; do
18297
18298 acl_save_prefix="$prefix"
18299 prefix="$acl_final_prefix"
18300 acl_save_exec_prefix="$exec_prefix"
18301 exec_prefix="$acl_final_exec_prefix"
18302 eval x=\"$x\"
18303 exec_prefix="$acl_save_exec_prefix"
18304 prefix="$acl_save_prefix"
18305
18306 if test "X$x" = "X$element"; then
18307 haveit=yes
18308 break
18309 fi
18310 done
18311 if test -z "$haveit"; then
18312 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18313 fi
18314 done
18315
18316
18317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18318$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 18319if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
18320 $as_echo_n "(cached) " >&6
18321else
18322
18323 ac_save_LIBS="$LIBS"
18324 LIBS="$LIBS $LIBBABELTRACE"
18325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18326/* end confdefs.h. */
18327#include <babeltrace/babeltrace.h>
18328 #include <babeltrace/ctf/events.h>
18329 #include <babeltrace/ctf/iterator.h>
18330int
18331main ()
18332{
18333struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18334 struct bt_ctf_event *event = NULL;
18335 const struct bt_definition *scope;
18336
13cdc2af 18337 pos->type = BT_SEEK_BEGIN;
65c749e7 18338 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
18339 scope = bt_ctf_get_top_level_scope (event,
18340 BT_STREAM_EVENT_HEADER);
18341 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18342
18343 ;
18344 return 0;
18345}
18346_ACEOF
18347if ac_fn_c_try_link "$LINENO"; then :
18348 ac_cv_libbabeltrace=yes
18349else
18350 ac_cv_libbabeltrace=no
18351fi
18352rm -f core conftest.err conftest.$ac_objext \
18353 conftest$ac_exeext conftest.$ac_ext
18354 LIBS="$ac_save_LIBS"
18355
18356fi
18357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18358$as_echo "$ac_cv_libbabeltrace" >&6; }
18359 if test "$ac_cv_libbabeltrace" = yes; then
18360 HAVE_LIBBABELTRACE=yes
18361
18362$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18363
18364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18365$as_echo_n "checking how to link with libbabeltrace... " >&6; }
18366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18367$as_echo "$LIBBABELTRACE" >&6; }
18368 else
18369 HAVE_LIBBABELTRACE=no
18370 CPPFLAGS="$ac_save_CPPFLAGS"
18371 LIBBABELTRACE=
18372 LTLIBBABELTRACE=
18373 fi
18374
18375
18376
18377
18378
18379
18380 CFLAGS=$saved_CFLAGS
18381
18382 if test "$HAVE_LIBBABELTRACE" != yes; then
18383 if test "$with_babeltrace" = yes; then
d0ac1c44 18384 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
18385 else
18386 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18387$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18388 fi
18389 fi
18390fi
18391
ccb1ba62
CB
18392# Check for xxhash
18393
18394# Check whether --with-xxhash was given.
18395if test "${with_xxhash+set}" = set; then :
18396 withval=$with_xxhash;
18397else
18398 with_xxhash=auto
18399fi
18400
18401
18402if test "x$with_xxhash" != "xno"; then
18403
18404
18405
18406
18407
18408
18409
18410
18411 use_additional=yes
18412
18413 acl_save_prefix="$prefix"
18414 prefix="$acl_final_prefix"
18415 acl_save_exec_prefix="$exec_prefix"
18416 exec_prefix="$acl_final_exec_prefix"
18417
18418 eval additional_includedir=\"$includedir\"
18419 eval additional_libdir=\"$libdir\"
18420
18421 exec_prefix="$acl_save_exec_prefix"
18422 prefix="$acl_save_prefix"
18423
18424
18425# Check whether --with-libxxhash-prefix was given.
18426if test "${with_libxxhash_prefix+set}" = set; then :
18427 withval=$with_libxxhash_prefix;
18428 if test "X$withval" = "Xno"; then
18429 use_additional=no
18430 else
18431 if test "X$withval" = "X"; then
18432
18433 acl_save_prefix="$prefix"
18434 prefix="$acl_final_prefix"
18435 acl_save_exec_prefix="$exec_prefix"
18436 exec_prefix="$acl_final_exec_prefix"
18437
18438 eval additional_includedir=\"$includedir\"
18439 eval additional_libdir=\"$libdir\"
18440
18441 exec_prefix="$acl_save_exec_prefix"
18442 prefix="$acl_save_prefix"
18443
18444 else
18445 additional_includedir="$withval/include"
18446 additional_libdir="$withval/lib"
18447 fi
18448 fi
18449
18450fi
18451
18452 LIBXXHASH=
18453 LTLIBXXHASH=
18454 INCXXHASH=
18455 rpathdirs=
18456 ltrpathdirs=
18457 names_already_handled=
18458 names_next_round='xxhash '
18459 while test -n "$names_next_round"; do
18460 names_this_round="$names_next_round"
18461 names_next_round=
18462 for name in $names_this_round; do
18463 already_handled=
18464 for n in $names_already_handled; do
18465 if test "$n" = "$name"; then
18466 already_handled=yes
18467 break
18468 fi
18469 done
18470 if test -z "$already_handled"; then
18471 names_already_handled="$names_already_handled $name"
18472 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18473 eval value=\"\$HAVE_LIB$uppername\"
18474 if test -n "$value"; then
18475 if test "$value" = yes; then
18476 eval value=\"\$LIB$uppername\"
18477 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18478 eval value=\"\$LTLIB$uppername\"
18479 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18480 else
18481 :
18482 fi
18483 else
18484 found_dir=
18485 found_la=
18486 found_so=
18487 found_a=
18488 if test $use_additional = yes; then
18489 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
18490 found_dir="$additional_libdir"
18491 found_so="$additional_libdir/lib$name.$shlibext"
18492 if test -f "$additional_libdir/lib$name.la"; then
18493 found_la="$additional_libdir/lib$name.la"
18494 fi
18495 else
18496 if test -f "$additional_libdir/lib$name.$libext"; then
18497 found_dir="$additional_libdir"
18498 found_a="$additional_libdir/lib$name.$libext"
18499 if test -f "$additional_libdir/lib$name.la"; then
18500 found_la="$additional_libdir/lib$name.la"
18501 fi
18502 fi
18503 fi
18504 fi
18505 if test "X$found_dir" = "X"; then
18506 for x in $LDFLAGS $LTLIBXXHASH; do
18507
18508 acl_save_prefix="$prefix"
18509 prefix="$acl_final_prefix"
18510 acl_save_exec_prefix="$exec_prefix"
18511 exec_prefix="$acl_final_exec_prefix"
18512 eval x=\"$x\"
18513 exec_prefix="$acl_save_exec_prefix"
18514 prefix="$acl_save_prefix"
18515
18516 case "$x" in
18517 -L*)
18518 dir=`echo "X$x" | sed -e 's/^X-L//'`
18519 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
18520 found_dir="$dir"
18521 found_so="$dir/lib$name.$shlibext"
18522 if test -f "$dir/lib$name.la"; then
18523 found_la="$dir/lib$name.la"
18524 fi
18525 else
18526 if test -f "$dir/lib$name.$libext"; then
18527 found_dir="$dir"
18528 found_a="$dir/lib$name.$libext"
18529 if test -f "$dir/lib$name.la"; then
18530 found_la="$dir/lib$name.la"
18531 fi
18532 fi
18533 fi
18534 ;;
18535 esac
18536 if test "X$found_dir" != "X"; then
18537 break
18538 fi
18539 done
18540 fi
18541 if test "X$found_dir" != "X"; then
18542 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18543 if test "X$found_so" != "X"; then
18544 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18545 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18546 else
18547 haveit=
18548 for x in $ltrpathdirs; do
18549 if test "X$x" = "X$found_dir"; then
18550 haveit=yes
18551 break
18552 fi
18553 done
18554 if test -z "$haveit"; then
18555 ltrpathdirs="$ltrpathdirs $found_dir"
18556 fi
18557 if test "$hardcode_direct" = yes; then
18558 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18559 else
18560 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18561 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18562 haveit=
18563 for x in $rpathdirs; do
18564 if test "X$x" = "X$found_dir"; then
18565 haveit=yes
18566 break
18567 fi
18568 done
18569 if test -z "$haveit"; then
18570 rpathdirs="$rpathdirs $found_dir"
18571 fi
18572 else
18573 haveit=
18574 for x in $LDFLAGS $LIBXXHASH; do
18575
18576 acl_save_prefix="$prefix"
18577 prefix="$acl_final_prefix"
18578 acl_save_exec_prefix="$exec_prefix"
18579 exec_prefix="$acl_final_exec_prefix"
18580 eval x=\"$x\"
18581 exec_prefix="$acl_save_exec_prefix"
18582 prefix="$acl_save_prefix"
18583
18584 if test "X$x" = "X-L$found_dir"; then
18585 haveit=yes
18586 break
18587 fi
18588 done
18589 if test -z "$haveit"; then
18590 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18591 fi
18592 if test "$hardcode_minus_L" != no; then
18593 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18594 else
18595 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18596 fi
18597 fi
18598 fi
18599 fi
18600 else
18601 if test "X$found_a" != "X"; then
18602 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
18603 else
18604 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
18605 fi
18606 fi
18607 additional_includedir=
18608 case "$found_dir" in
18609 */lib | */lib/)
18610 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18611 additional_includedir="$basedir/include"
18612 ;;
18613 esac
18614 if test "X$additional_includedir" != "X"; then
18615 if test "X$additional_includedir" != "X/usr/include"; then
18616 haveit=
18617 if test "X$additional_includedir" = "X/usr/local/include"; then
18618 if test -n "$GCC"; then
18619 case $host_os in
18620 linux*) haveit=yes;;
18621 esac
18622 fi
18623 fi
18624 if test -z "$haveit"; then
18625 for x in $CPPFLAGS $INCXXHASH; do
18626
18627 acl_save_prefix="$prefix"
18628 prefix="$acl_final_prefix"
18629 acl_save_exec_prefix="$exec_prefix"
18630 exec_prefix="$acl_final_exec_prefix"
18631 eval x=\"$x\"
18632 exec_prefix="$acl_save_exec_prefix"
18633 prefix="$acl_save_prefix"
18634
18635 if test "X$x" = "X-I$additional_includedir"; then
18636 haveit=yes
18637 break
18638 fi
18639 done
18640 if test -z "$haveit"; then
18641 if test -d "$additional_includedir"; then
18642 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
18643 fi
18644 fi
18645 fi
18646 fi
18647 fi
18648 if test -n "$found_la"; then
18649 save_libdir="$libdir"
18650 case "$found_la" in
18651 */* | *\\*) . "$found_la" ;;
18652 *) . "./$found_la" ;;
18653 esac
18654 libdir="$save_libdir"
18655 for dep in $dependency_libs; do
18656 case "$dep" in
18657 -L*)
18658 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18659 if test "X$additional_libdir" != "X/usr/lib"; then
18660 haveit=
18661 if test "X$additional_libdir" = "X/usr/local/lib"; then
18662 if test -n "$GCC"; then
18663 case $host_os in
18664 linux*) haveit=yes;;
18665 esac
18666 fi
18667 fi
18668 if test -z "$haveit"; then
18669 haveit=
18670 for x in $LDFLAGS $LIBXXHASH; do
18671
18672 acl_save_prefix="$prefix"
18673 prefix="$acl_final_prefix"
18674 acl_save_exec_prefix="$exec_prefix"
18675 exec_prefix="$acl_final_exec_prefix"
18676 eval x=\"$x\"
18677 exec_prefix="$acl_save_exec_prefix"
18678 prefix="$acl_save_prefix"
18679
18680 if test "X$x" = "X-L$additional_libdir"; then
18681 haveit=yes
18682 break
18683 fi
18684 done
18685 if test -z "$haveit"; then
18686 if test -d "$additional_libdir"; then
18687 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
18688 fi
18689 fi
18690 haveit=
18691 for x in $LDFLAGS $LTLIBXXHASH; do
18692
18693 acl_save_prefix="$prefix"
18694 prefix="$acl_final_prefix"
18695 acl_save_exec_prefix="$exec_prefix"
18696 exec_prefix="$acl_final_exec_prefix"
18697 eval x=\"$x\"
18698 exec_prefix="$acl_save_exec_prefix"
18699 prefix="$acl_save_prefix"
18700
18701 if test "X$x" = "X-L$additional_libdir"; then
18702 haveit=yes
18703 break
18704 fi
18705 done
18706 if test -z "$haveit"; then
18707 if test -d "$additional_libdir"; then
18708 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
18709 fi
18710 fi
18711 fi
18712 fi
18713 ;;
18714 -R*)
18715 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18716 if test "$enable_rpath" != no; then
18717 haveit=
18718 for x in $rpathdirs; do
18719 if test "X$x" = "X$dir"; then
18720 haveit=yes
18721 break
18722 fi
18723 done
18724 if test -z "$haveit"; then
18725 rpathdirs="$rpathdirs $dir"
18726 fi
18727 haveit=
18728 for x in $ltrpathdirs; do
18729 if test "X$x" = "X$dir"; then
18730 haveit=yes
18731 break
18732 fi
18733 done
18734 if test -z "$haveit"; then
18735 ltrpathdirs="$ltrpathdirs $dir"
18736 fi
18737 fi
18738 ;;
18739 -l*)
18740 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18741 ;;
18742 *.la)
18743 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18744 ;;
18745 *)
18746 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
18747 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
18748 ;;
18749 esac
18750 done
18751 fi
18752 else
18753 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18754 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
18755 fi
18756 fi
18757 fi
18758 done
18759 done
18760 if test "X$rpathdirs" != "X"; then
18761 if test -n "$hardcode_libdir_separator"; then
18762 alldirs=
18763 for found_dir in $rpathdirs; do
18764 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18765 done
18766 acl_save_libdir="$libdir"
18767 libdir="$alldirs"
18768 eval flag=\"$hardcode_libdir_flag_spec\"
18769 libdir="$acl_save_libdir"
18770 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18771 else
18772 for found_dir in $rpathdirs; do
18773 acl_save_libdir="$libdir"
18774 libdir="$found_dir"
18775 eval flag=\"$hardcode_libdir_flag_spec\"
18776 libdir="$acl_save_libdir"
18777 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18778 done
18779 fi
18780 fi
18781 if test "X$ltrpathdirs" != "X"; then
18782 for found_dir in $ltrpathdirs; do
18783 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
18784 done
18785 fi
18786
18787
18788 ac_save_CPPFLAGS="$CPPFLAGS"
18789
18790 for element in $INCXXHASH; do
18791 haveit=
18792 for x in $CPPFLAGS; do
18793
18794 acl_save_prefix="$prefix"
18795 prefix="$acl_final_prefix"
18796 acl_save_exec_prefix="$exec_prefix"
18797 exec_prefix="$acl_final_exec_prefix"
18798 eval x=\"$x\"
18799 exec_prefix="$acl_save_exec_prefix"
18800 prefix="$acl_save_prefix"
18801
18802 if test "X$x" = "X$element"; then
18803 haveit=yes
18804 break
18805 fi
18806 done
18807 if test -z "$haveit"; then
18808 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18809 fi
18810 done
18811
18812
18813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
18814$as_echo_n "checking for libxxhash... " >&6; }
18815if ${ac_cv_libxxhash+:} false; then :
18816 $as_echo_n "(cached) " >&6
18817else
18818
18819 ac_save_LIBS="$LIBS"
18820 LIBS="$LIBS $LIBXXHASH"
18821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18822/* end confdefs.h. */
18823#include <xxhash.h>
18824int
18825main ()
18826{
18827XXH32("foo", 3, 0);
18828
18829 ;
18830 return 0;
18831}
18832_ACEOF
18833if ac_fn_c_try_link "$LINENO"; then :
18834 ac_cv_libxxhash=yes
18835else
18836 ac_cv_libxxhash=no
18837fi
18838rm -f core conftest.err conftest.$ac_objext \
18839 conftest$ac_exeext conftest.$ac_ext
18840 LIBS="$ac_save_LIBS"
18841
18842fi
18843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
18844$as_echo "$ac_cv_libxxhash" >&6; }
18845 if test "$ac_cv_libxxhash" = yes; then
18846 HAVE_LIBXXHASH=yes
18847
18848$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
18849
18850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
18851$as_echo_n "checking how to link with libxxhash... " >&6; }
18852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
18853$as_echo "$LIBXXHASH" >&6; }
18854 else
18855 HAVE_LIBXXHASH=no
18856 CPPFLAGS="$ac_save_CPPFLAGS"
18857 LIBXXHASH=
18858 LTLIBXXHASH=
18859 fi
18860
18861
18862
18863
18864
18865
18866 if test "$HAVE_LIBXXHASH" != yes; then
18867 if test "$with_xxhash" = yes; then
18868 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
18869 fi
18870 fi
18871 if test "x$with_xxhash" = "xauto"; then
18872 with_xxhash="$HAVE_LIBXXHASH"
18873 fi
18874fi
18875
18876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
18877$as_echo_n "checking whether to use xxhash... " >&6; }
18878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
18879$as_echo "$with_xxhash" >&6; }
18880
a0a461e5 18881NM_H=
c906108c
SS
18882rm -f nm.h
18883if test "${nativefile}" != ""; then
0f475e27
AC
18884 case "${nativefile}" in
18885 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
18886 * ) GDB_NM_FILE="${nativefile}"
18887 esac
a0a461e5
TT
18888 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
18889
60ca704f
SE
18890
18891cat >>confdefs.h <<_ACEOF
b78960be 18892#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 18893_ACEOF
5a2402b8 18894
a0a461e5 18895 NM_H=nm.h
c906108c 18896fi
5a2402b8
AC
18897
18898
a0a461e5 18899
e3487908
GKB
18900for ac_prog in xsltproc
18901do
18902 # Extract the first word of "$ac_prog", so it can be a program name with args.
18903set dummy $ac_prog; ac_word=$2
18904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18905$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 18906if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
18907 $as_echo_n "(cached) " >&6
18908else
18909 case $XSLTPROC in
18910 [\\/]* | ?:[\\/]*)
18911 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18912 ;;
18913 *)
18914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18915for as_dir in $PATH
18916do
18917 IFS=$as_save_IFS
18918 test -z "$as_dir" && as_dir=.
18919 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 18920 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
18921 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18922 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18923 break 2
18924 fi
18925done
18926 done
18927IFS=$as_save_IFS
18928
18929 ;;
18930esac
18931fi
18932XSLTPROC=$ac_cv_path_XSLTPROC
18933if test -n "$XSLTPROC"; then
18934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18935$as_echo "$XSLTPROC" >&6; }
18936else
18937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18938$as_echo "no" >&6; }
18939fi
18940
18941
18942 test -n "$XSLTPROC" && break
18943done
18944test -n "$XSLTPROC" || XSLTPROC="missing"
18945
18946if test "x$USE_MAINTAINER_MODE" = xyes; then
18947 if test "${XSLTPROC}" = missing; then
d0ac1c44 18948 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
18949 fi
18950fi
18951
18952
c906108c
SS
18953
18954
c906108c 18955
81ecdfbb 18956$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 18957
bec39cab 18958
8ecfd7bd
SDJ
18959
18960# Check whether we will enable the inclusion of unit tests when
18961# compiling GDB.
18962#
18963# The default value of this option changes depending whether we're on
18964# development mode (in which case it's "true") or not (in which case
18965# it's "false").
18966# Check whether --enable-unit-tests was given.
18967if test "${enable_unit_tests+set}" = set; then :
18968 enableval=$enable_unit_tests; case "${enableval}" in
18969 yes) enable_unittests=true ;;
18970 no) enable_unittests=false ;;
18971 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
18972esac
18973else
18974 enable_unittests=$development
18975fi
18976
18977
18978if $enable_unittests; then
dcd1f979
TT
18979
18980$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
18981
8ecfd7bd 18982
268a13a5
TT
18983 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) gdbsupport/selftest.o selftest-arch.o"
18984 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) gdbsupport/selftest.c selftest-arch.c"
8ecfd7bd 18985
dcd1f979
TT
18986fi
18987
b292c783 18988
8ecfd7bd 18989
f6a88844
JM
18990 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
18991 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
18992 if test "x$GDB_TRANSFORM_NAME" = x; then
18993 GDB_TRANSFORM_NAME=gdb
18994 fi
18995
18996
18997
18998 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
18999 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19000 if test "x$GCORE_TRANSFORM_NAME" = x; then
19001 GCORE_TRANSFORM_NAME=gcore
19002 fi
19003
b292c783
JK
19004
19005ac_config_files="$ac_config_files gcore"
19006
141ec9f6 19007ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 19008
89a34d1b 19009
bec39cab
AC
19010cat >confcache <<\_ACEOF
19011# This file is a shell script that caches the results of configure
19012# tests run on this system so they can be shared between configure
19013# scripts and configure runs, see configure's option --config-cache.
19014# It is not useful on other systems. If it contains results you don't
19015# want to keep, you may remove or edit it.
19016#
19017# config.status only pays attention to the cache file if you give it
19018# the --recheck option to rerun configure.
19019#
19020# `ac_cv_env_foo' variables (set or unset) will be overridden when
19021# loading this file, other *unset* `ac_cv_foo' will be assigned the
19022# following values.
19023
19024_ACEOF
19025
19026# The following way of writing the cache mishandles newlines in values,
19027# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 19028# So, we kill variables containing newlines.
bec39cab
AC
19029# Ultrix sh set writes to stderr and can't be redirected directly,
19030# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
19031(
19032 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19033 eval ac_val=\$$ac_var
19034 case $ac_val in #(
19035 *${as_nl}*)
19036 case $ac_var in #(
19037 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19038$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19039 esac
19040 case $ac_var in #(
19041 _ | IFS | as_nl) ;; #(
19042 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19043 *) { eval $ac_var=; unset $ac_var;} ;;
19044 esac ;;
19045 esac
19046 done
19047
bec39cab 19048 (set) 2>&1 |
81ecdfbb
RW
19049 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19050 *${as_nl}ac_space=\ *)
19051 # `set' does not quote correctly, so add quotes: double-quote
19052 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
19053 sed -n \
19054 "s/'/'\\\\''/g;
19055 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 19056 ;; #(
bec39cab
AC
19057 *)
19058 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 19059 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 19060 ;;
81ecdfbb
RW
19061 esac |
19062 sort
19063) |
bec39cab 19064 sed '
81ecdfbb 19065 /^ac_cv_env_/b end
bec39cab 19066 t clear
81ecdfbb 19067 :clear
bec39cab
AC
19068 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19069 t end
81ecdfbb
RW
19070 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19071 :end' >>confcache
19072if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19073 if test -w "$cache_file"; then
d0ac1c44 19074 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
19075 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19076$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
19077 if test ! -f "$cache_file" || test -h "$cache_file"; then
19078 cat confcache >"$cache_file"
19079 else
19080 case $cache_file in #(
19081 */* | ?:*)
19082 mv -f confcache "$cache_file"$$ &&
19083 mv -f "$cache_file"$$ "$cache_file" ;; #(
19084 *)
19085 mv -f confcache "$cache_file" ;;
19086 esac
19087 fi
19088 fi
bec39cab 19089 else
81ecdfbb
RW
19090 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19091$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
19092 fi
19093fi
19094rm -f confcache
19095
19096test "x$prefix" = xNONE && prefix=$ac_default_prefix
19097# Let make expand exec_prefix.
19098test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19099
bec39cab
AC
19100DEFS=-DHAVE_CONFIG_H
19101
19102ac_libobjs=
19103ac_ltlibobjs=
d0ac1c44 19104U=
bec39cab
AC
19105for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19106 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
19107 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19108 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19109 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19110 # will be set to the directory where LIBOBJS objects are built.
19111 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19112 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
19113done
19114LIBOBJS=$ac_libobjs
19115
19116LTLIBOBJS=$ac_ltlibobjs
19117
19118
85981d60 19119if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 19120 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 19121Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 19122fi
4df42755 19123if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 19124 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
19125Usually this means the macro was only invoked conditionally." "$LINENO" 5
19126fi
19127if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 19128 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
19129Usually this means the macro was only invoked conditionally." "$LINENO" 5
19130fi
81ecdfbb
RW
19131
19132
d0ac1c44 19133: "${CONFIG_STATUS=./config.status}"
81ecdfbb 19134ac_write_fail=0
bec39cab
AC
19135ac_clean_files_save=$ac_clean_files
19136ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
19137{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19138$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19139as_write_fail=0
19140cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
19141#! $SHELL
19142# Generated by $as_me.
19143# Run this file to recreate the current configuration.
19144# Compiler output produced by configure, useful for debugging
19145# configure, is in config.log if it exists.
19146
19147debug=false
19148ac_cs_recheck=false
19149ac_cs_silent=false
bec39cab 19150
81ecdfbb
RW
19151SHELL=\${CONFIG_SHELL-$SHELL}
19152export SHELL
19153_ASEOF
19154cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19155## -------------------- ##
19156## M4sh Initialization. ##
19157## -------------------- ##
19158
19159# Be more Bourne compatible
19160DUALCASE=1; export DUALCASE # for MKS sh
19161if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
19162 emulate sh
19163 NULLCMD=:
81ecdfbb 19164 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
19165 # is contrary to our usage. Disable this feature.
19166 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
19167 setopt NO_GLOB_SUBST
19168else
19169 case `(set -o) 2>/dev/null` in #(
19170 *posix*) :
19171 set -o posix ;; #(
19172 *) :
19173 ;;
19174esac
bec39cab 19175fi
bec39cab 19176
81ecdfbb
RW
19177
19178as_nl='
19179'
19180export as_nl
19181# Printing a long string crashes Solaris 7 /usr/bin/printf.
19182as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19183as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19184as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19185# Prefer a ksh shell builtin over an external printf program on Solaris,
19186# but without wasting forks for bash or zsh.
19187if test -z "$BASH_VERSION$ZSH_VERSION" \
19188 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19189 as_echo='print -r --'
19190 as_echo_n='print -rn --'
19191elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19192 as_echo='printf %s\n'
19193 as_echo_n='printf %s'
19194else
19195 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19196 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19197 as_echo_n='/usr/ucb/echo -n'
19198 else
19199 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19200 as_echo_n_body='eval
19201 arg=$1;
19202 case $arg in #(
19203 *"$as_nl"*)
19204 expr "X$arg" : "X\\(.*\\)$as_nl";
19205 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19206 esac;
19207 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19208 '
19209 export as_echo_n_body
19210 as_echo_n='sh -c $as_echo_n_body as_echo'
19211 fi
19212 export as_echo_body
19213 as_echo='sh -c $as_echo_body as_echo'
19214fi
19215
19216# The user is always right.
19217if test "${PATH_SEPARATOR+set}" != set; then
19218 PATH_SEPARATOR=:
19219 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19220 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19221 PATH_SEPARATOR=';'
19222 }
bec39cab
AC
19223fi
19224
19225
81ecdfbb
RW
19226# IFS
19227# We need space, tab and new line, in precisely that order. Quoting is
19228# there to prevent editors from complaining about space-tab.
19229# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19230# splitting by setting IFS to empty value.)
19231IFS=" "" $as_nl"
19232
19233# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 19234as_myself=
81ecdfbb
RW
19235case $0 in #((
19236 *[\\/]* ) as_myself=$0 ;;
19237 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19238for as_dir in $PATH
19239do
19240 IFS=$as_save_IFS
19241 test -z "$as_dir" && as_dir=.
19242 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19243 done
19244IFS=$as_save_IFS
19245
19246 ;;
19247esac
19248# We did not find ourselves, most probably we were run as `sh COMMAND'
19249# in which case we are not to be found in the path.
19250if test "x$as_myself" = x; then
19251 as_myself=$0
19252fi
19253if test ! -f "$as_myself"; then
19254 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19255 exit 1
19256fi
19257
19258# Unset variables that we do not need and which cause bugs (e.g. in
19259# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19260# suppresses any "Segmentation fault" message there. '((' could
19261# trigger a bug in pdksh 5.2.14.
19262for as_var in BASH_ENV ENV MAIL MAILPATH
19263do eval test x\${$as_var+set} = xset \
19264 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19265done
bec39cab
AC
19266PS1='$ '
19267PS2='> '
19268PS4='+ '
19269
19270# NLS nuisances.
81ecdfbb
RW
19271LC_ALL=C
19272export LC_ALL
19273LANGUAGE=C
19274export LANGUAGE
19275
19276# CDPATH.
19277(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19278
19279
d0ac1c44
SM
19280# as_fn_error STATUS ERROR [LINENO LOG_FD]
19281# ----------------------------------------
81ecdfbb
RW
19282# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19283# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 19284# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
19285as_fn_error ()
19286{
d0ac1c44
SM
19287 as_status=$1; test $as_status -eq 0 && as_status=1
19288 if test "$4"; then
19289 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19290 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 19291 fi
d0ac1c44 19292 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
19293 as_fn_exit $as_status
19294} # as_fn_error
19295
19296
19297# as_fn_set_status STATUS
19298# -----------------------
19299# Set $? to STATUS, without forking.
19300as_fn_set_status ()
19301{
19302 return $1
19303} # as_fn_set_status
19304
19305# as_fn_exit STATUS
19306# -----------------
19307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19308as_fn_exit ()
19309{
19310 set +e
19311 as_fn_set_status $1
19312 exit $1
19313} # as_fn_exit
19314
19315# as_fn_unset VAR
19316# ---------------
19317# Portably unset VAR.
19318as_fn_unset ()
19319{
19320 { eval $1=; unset $1;}
19321}
19322as_unset=as_fn_unset
19323# as_fn_append VAR VALUE
19324# ----------------------
19325# Append the text in VALUE to the end of the definition contained in VAR. Take
19326# advantage of any shell optimizations that allow amortized linear growth over
19327# repeated appends, instead of the typical quadratic growth present in naive
19328# implementations.
19329if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19330 eval 'as_fn_append ()
19331 {
19332 eval $1+=\$2
19333 }'
19334else
19335 as_fn_append ()
19336 {
19337 eval $1=\$$1\$2
19338 }
19339fi # as_fn_append
19340
19341# as_fn_arith ARG...
19342# ------------------
19343# Perform arithmetic evaluation on the ARGs, and store the result in the
19344# global $as_val. Take advantage of shells that can avoid forks. The arguments
19345# must be portable across $(()) and expr.
19346if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19347 eval 'as_fn_arith ()
19348 {
19349 as_val=$(( $* ))
19350 }'
19351else
19352 as_fn_arith ()
19353 {
19354 as_val=`expr "$@" || test $? -eq 1`
19355 }
19356fi # as_fn_arith
bec39cab 19357
81ecdfbb
RW
19358
19359if expr a : '\(a\)' >/dev/null 2>&1 &&
19360 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
19361 as_expr=expr
19362else
19363 as_expr=false
19364fi
19365
81ecdfbb 19366if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
19367 as_basename=basename
19368else
19369 as_basename=false
19370fi
19371
81ecdfbb
RW
19372if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19373 as_dirname=dirname
19374else
19375 as_dirname=false
19376fi
bec39cab 19377
81ecdfbb 19378as_me=`$as_basename -- "$0" ||
bec39cab
AC
19379$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19380 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
19381 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19382$as_echo X/"$0" |
19383 sed '/^.*\/\([^/][^/]*\)\/*$/{
19384 s//\1/
19385 q
19386 }
19387 /^X\/\(\/\/\)$/{
19388 s//\1/
19389 q
19390 }
19391 /^X\/\(\/\).*/{
19392 s//\1/
19393 q
19394 }
19395 s/.*/./; q'`
b4e70030 19396
b4e70030
JB
19397# Avoid depending upon Character Ranges.
19398as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19399as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19400as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19401as_cr_digits='0123456789'
19402as_cr_alnum=$as_cr_Letters$as_cr_digits
19403
81ecdfbb
RW
19404ECHO_C= ECHO_N= ECHO_T=
19405case `echo -n x` in #(((((
19406-n*)
19407 case `echo 'xy\c'` in
19408 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19409 xy) ECHO_C='\c';;
19410 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19411 ECHO_T=' ';;
19412 esac;;
19413*)
19414 ECHO_N='-n';;
bec39cab
AC
19415esac
19416
81ecdfbb
RW
19417rm -f conf$$ conf$$.exe conf$$.file
19418if test -d conf$$.dir; then
19419 rm -f conf$$.dir/conf$$.file
bec39cab 19420else
81ecdfbb
RW
19421 rm -f conf$$.dir
19422 mkdir conf$$.dir 2>/dev/null
bec39cab 19423fi
81ecdfbb
RW
19424if (echo >conf$$.file) 2>/dev/null; then
19425 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 19426 as_ln_s='ln -s'
81ecdfbb
RW
19427 # ... but there are two gotchas:
19428 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19429 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 19430 # In both cases, we have to default to `cp -pR'.
81ecdfbb 19431 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 19432 as_ln_s='cp -pR'
81ecdfbb
RW
19433 elif ln conf$$.file conf$$ 2>/dev/null; then
19434 as_ln_s=ln
19435 else
d0ac1c44 19436 as_ln_s='cp -pR'
b4e70030 19437 fi
bec39cab 19438else
d0ac1c44 19439 as_ln_s='cp -pR'
bec39cab 19440fi
81ecdfbb
RW
19441rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19442rmdir conf$$.dir 2>/dev/null
19443
19444
19445# as_fn_mkdir_p
19446# -------------
19447# Create "$as_dir" as a directory, including parents if necessary.
19448as_fn_mkdir_p ()
19449{
19450
19451 case $as_dir in #(
19452 -*) as_dir=./$as_dir;;
19453 esac
19454 test -d "$as_dir" || eval $as_mkdir_p || {
19455 as_dirs=
19456 while :; do
19457 case $as_dir in #(
19458 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19459 *) as_qdir=$as_dir;;
19460 esac
19461 as_dirs="'$as_qdir' $as_dirs"
19462 as_dir=`$as_dirname -- "$as_dir" ||
19463$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19464 X"$as_dir" : 'X\(//\)[^/]' \| \
19465 X"$as_dir" : 'X\(//\)$' \| \
19466 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19467$as_echo X"$as_dir" |
19468 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19469 s//\1/
19470 q
19471 }
19472 /^X\(\/\/\)[^/].*/{
19473 s//\1/
19474 q
19475 }
19476 /^X\(\/\/\)$/{
19477 s//\1/
19478 q
19479 }
19480 /^X\(\/\).*/{
19481 s//\1/
19482 q
19483 }
19484 s/.*/./; q'`
19485 test -d "$as_dir" && break
19486 done
19487 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 19488 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 19489
bec39cab 19490
81ecdfbb 19491} # as_fn_mkdir_p
bec39cab 19492if mkdir -p . 2>/dev/null; then
81ecdfbb 19493 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
19494else
19495 test -d ./-p && rmdir ./-p
19496 as_mkdir_p=false
19497fi
19498
d0ac1c44
SM
19499
19500# as_fn_executable_p FILE
19501# -----------------------
19502# Test if FILE is an executable regular file.
19503as_fn_executable_p ()
19504{
19505 test -f "$1" && test -x "$1"
19506} # as_fn_executable_p
19507as_test_x='test -x'
19508as_executable_p=as_fn_executable_p
bec39cab
AC
19509
19510# Sed expression to map a string onto a valid CPP name.
19511as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19512
19513# Sed expression to map a string onto a valid variable name.
19514as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19515
19516
bec39cab 19517exec 6>&1
81ecdfbb
RW
19518## ----------------------------------- ##
19519## Main body of $CONFIG_STATUS script. ##
19520## ----------------------------------- ##
19521_ASEOF
19522test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19523
19524cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19525# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 19526# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
19527# values after options handling.
19528ac_log="
bec39cab 19529This file was extended by $as_me, which was
d0ac1c44 19530generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
19531
19532 CONFIG_FILES = $CONFIG_FILES
19533 CONFIG_HEADERS = $CONFIG_HEADERS
19534 CONFIG_LINKS = $CONFIG_LINKS
19535 CONFIG_COMMANDS = $CONFIG_COMMANDS
19536 $ $0 $@
19537
81ecdfbb
RW
19538on `(hostname || uname -n) 2>/dev/null | sed 1q`
19539"
19540
bec39cab
AC
19541_ACEOF
19542
81ecdfbb
RW
19543case $ac_config_files in *"
19544"*) set x $ac_config_files; shift; ac_config_files=$*;;
19545esac
234b45d4 19546
81ecdfbb
RW
19547case $ac_config_headers in *"
19548"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19549esac
b4e70030 19550
b4e70030 19551
81ecdfbb
RW
19552cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19553# Files that config.status was made for.
19554config_files="$ac_config_files"
19555config_headers="$ac_config_headers"
19556config_links="$ac_config_links"
19557config_commands="$ac_config_commands"
234b45d4 19558
81ecdfbb 19559_ACEOF
b4e70030 19560
81ecdfbb 19561cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 19562ac_cs_usage="\
81ecdfbb
RW
19563\`$as_me' instantiates files and other configuration actions
19564from templates according to the current configuration. Unless the files
19565and actions are specified as TAGs, all are instantiated by default.
234b45d4 19566
81ecdfbb 19567Usage: $0 [OPTION]... [TAG]...
234b45d4 19568
bec39cab 19569 -h, --help print this help, then exit
81ecdfbb 19570 -V, --version print version number and configuration settings, then exit
d0ac1c44 19571 --config print configuration, then exit
81ecdfbb
RW
19572 -q, --quiet, --silent
19573 do not print progress messages
bec39cab
AC
19574 -d, --debug don't remove temporary files
19575 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
19576 --file=FILE[:TEMPLATE]
19577 instantiate the configuration file FILE
19578 --header=FILE[:TEMPLATE]
19579 instantiate the configuration header FILE
234b45d4 19580
bec39cab
AC
19581Configuration files:
19582$config_files
234b45d4 19583
bec39cab
AC
19584Configuration headers:
19585$config_headers
234b45d4 19586
bec39cab
AC
19587Configuration links:
19588$config_links
234b45d4 19589
bec39cab
AC
19590Configuration commands:
19591$config_commands
19592
81ecdfbb 19593Report bugs to the package provider."
b4e70030 19594
81ecdfbb
RW
19595_ACEOF
19596cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 19597ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
19598ac_cs_version="\\
19599config.status
d0ac1c44
SM
19600configured by $0, generated by GNU Autoconf 2.69,
19601 with options \\"\$ac_cs_config\\"
bec39cab 19602
d0ac1c44 19603Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
19604This config.status script is free software; the Free Software Foundation
19605gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
19606
19607ac_pwd='$ac_pwd'
19608srcdir='$srcdir'
19609INSTALL='$INSTALL'
81ecdfbb
RW
19610AWK='$AWK'
19611test -n "\$AWK" || AWK=awk
bec39cab
AC
19612_ACEOF
19613
81ecdfbb
RW
19614cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19615# The default lists apply if the user does not specify any file.
bec39cab
AC
19616ac_need_defaults=:
19617while test $# != 0
19618do
19619 case $1 in
d0ac1c44 19620 --*=?*)
81ecdfbb
RW
19621 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19622 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 19623 ac_shift=:
c906108c 19624 ;;
d0ac1c44
SM
19625 --*=)
19626 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19627 ac_optarg=
19628 ac_shift=:
19629 ;;
81ecdfbb 19630 *)
bec39cab
AC
19631 ac_option=$1
19632 ac_optarg=$2
19633 ac_shift=shift
c906108c 19634 ;;
bec39cab 19635 esac
c906108c 19636
bec39cab
AC
19637 case $ac_option in
19638 # Handling of the options.
bec39cab
AC
19639 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19640 ac_cs_recheck=: ;;
81ecdfbb
RW
19641 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19642 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
19643 --config | --confi | --conf | --con | --co | --c )
19644 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 19645 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
19646 debug=: ;;
19647 --file | --fil | --fi | --f )
19648 $ac_shift
81ecdfbb
RW
19649 case $ac_optarg in
19650 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 19651 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
19652 esac
19653 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
19654 ac_need_defaults=false;;
19655 --header | --heade | --head | --hea )
19656 $ac_shift
81ecdfbb
RW
19657 case $ac_optarg in
19658 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19659 esac
19660 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 19661 ac_need_defaults=false;;
81ecdfbb
RW
19662 --he | --h)
19663 # Conflict between --help and --header
d0ac1c44 19664 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
19665Try \`$0 --help' for more information.";;
19666 --help | --hel | -h )
19667 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
19668 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19669 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19670 ac_cs_silent=: ;;
c906108c 19671
bec39cab 19672 # This is an error.
d0ac1c44 19673 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 19674Try \`$0 --help' for more information." ;;
c906108c 19675
81ecdfbb
RW
19676 *) as_fn_append ac_config_targets " $1"
19677 ac_need_defaults=false ;;
c906108c 19678
bec39cab
AC
19679 esac
19680 shift
19681done
c906108c 19682
bec39cab 19683ac_configure_extra_args=
c906108c 19684
bec39cab
AC
19685if $ac_cs_silent; then
19686 exec 6>/dev/null
19687 ac_configure_extra_args="$ac_configure_extra_args --silent"
19688fi
c906108c 19689
bec39cab 19690_ACEOF
81ecdfbb 19691cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 19692if \$ac_cs_recheck; then
d0ac1c44 19693 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
19694 shift
19695 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19696 CONFIG_SHELL='$SHELL'
19697 export CONFIG_SHELL
19698 exec "\$@"
bec39cab
AC
19699fi
19700
19701_ACEOF
81ecdfbb
RW
19702cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19703exec 5>>config.log
19704{
19705 echo
19706 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19707## Running $as_me. ##
19708_ASBOX
19709 $as_echo "$ac_log"
19710} >&5
bec39cab 19711
81ecdfbb
RW
19712_ACEOF
19713cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 19714#
81ecdfbb 19715# INIT-COMMANDS
c906108c 19716#
a417dc56 19717ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 19718GDB_NM_FILE=$GDB_NM_FILE
b4e70030 19719
bec39cab
AC
19720_ACEOF
19721
81ecdfbb 19722cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 19723
81ecdfbb 19724# Handling of arguments.
bec39cab 19725for ac_config_target in $ac_config_targets
c906108c 19726do
81ecdfbb
RW
19727 case $ac_config_target in
19728 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
19729 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 19730 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 19731 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 19732 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 19733 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 19734 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 19735 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 19736 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 19737 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 19738
d0ac1c44 19739 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
19740 esac
19741done
19742
81ecdfbb 19743
bec39cab
AC
19744# If the user did not use the arguments to specify the items to instantiate,
19745# then the envvar interface is used. Set only those that are not.
19746# We use the long form for the default assignment because of an extremely
19747# bizarre bug on SunOS 4.1.3.
19748if $ac_need_defaults; then
19749 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19750 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19751 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19752 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19753fi
19754
b4e70030 19755# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 19756# simply because there is no reason against having it here, and in addition,
b4e70030 19757# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
19758# Hook for its removal unless debugging.
19759# Note that there is a small window in which the directory will not be cleaned:
19760# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
19761$debug ||
19762{
d0ac1c44 19763 tmp= ac_tmp=
81ecdfbb 19764 trap 'exit_status=$?
d0ac1c44
SM
19765 : "${ac_tmp:=$tmp}"
19766 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
19767' 0
19768 trap 'as_fn_exit 1' 1 2 13 15
19769}
19770# Create a (secure) tmp directory for tmp files.
19771
19772{
19773 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 19774 test -d "$tmp"
81ecdfbb
RW
19775} ||
19776{
19777 tmp=./conf$$-$RANDOM
19778 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
19779} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19780ac_tmp=$tmp
81ecdfbb
RW
19781
19782# Set up the scripts for CONFIG_FILES section.
19783# No need to generate them if there are no CONFIG_FILES.
19784# This happens for instance with `./config.status config.h'.
19785if test -n "$CONFIG_FILES"; then
19786
19787if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
19788 ac_cs_awk_getline=:
19789 ac_cs_awk_pipe_init=
19790 ac_cs_awk_read_file='
19791 while ((getline aline < (F[key])) > 0)
19792 print(aline)
19793 close(F[key])'
19794 ac_cs_awk_pipe_fini=
19795else
19796 ac_cs_awk_getline=false
19797 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
19798 ac_cs_awk_read_file='
19799 print "|#_!!_#|"
19800 print "cat " F[key] " &&"
19801 '$ac_cs_awk_pipe_init
19802 # The final `:' finishes the AND list.
19803 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
19804fi
19805ac_cr=`echo X | tr X '\015'`
19806# On cygwin, bash can eat \r inside `` if the user requested igncr.
19807# But we know of no other shell where ac_cr would be empty at this
19808# point, so we can use a bashism as a fallback.
19809if test "x$ac_cr" = x; then
19810 eval ac_cr=\$\'\\r\'
19811fi
19812ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19813if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 19814 ac_cs_awk_cr='\\r'
81ecdfbb
RW
19815else
19816 ac_cs_awk_cr=$ac_cr
19817fi
19818
d0ac1c44 19819echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
19820_ACEOF
19821
19822# Create commands to substitute file output variables.
19823{
19824 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 19825 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
19826 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
19827 echo "_ACAWK" &&
19828 echo "_ACEOF"
19829} >conf$$files.sh &&
19830. ./conf$$files.sh ||
d0ac1c44 19831 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19832rm -f conf$$files.sh
19833
19834{
19835 echo "cat >conf$$subs.awk <<_ACEOF" &&
19836 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19837 echo "_ACEOF"
19838} >conf$$subs.sh ||
d0ac1c44
SM
19839 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19840ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
19841ac_delim='%!_!# '
19842for ac_last_try in false false false false false :; do
19843 . ./conf$$subs.sh ||
d0ac1c44 19844 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19845
19846 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19847 if test $ac_delim_n = $ac_delim_num; then
19848 break
19849 elif $ac_last_try; then
d0ac1c44 19850 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19851 else
19852 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19853 fi
19854done
19855rm -f conf$$subs.sh
19856
19857cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 19858cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
19859_ACEOF
19860sed -n '
19861h
19862s/^/S["/; s/!.*/"]=/
19863p
19864g
19865s/^[^!]*!//
19866:repl
19867t repl
19868s/'"$ac_delim"'$//
19869t delim
19870:nl
19871h
d0ac1c44 19872s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
19873t more1
19874s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19875p
19876n
19877b repl
19878:more1
19879s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19880p
19881g
19882s/.\{148\}//
19883t nl
19884:delim
19885h
d0ac1c44 19886s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
19887t more2
19888s/["\\]/\\&/g; s/^/"/; s/$/"/
19889p
19890b
19891:more2
19892s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19893p
19894g
19895s/.\{148\}//
19896t delim
19897' <conf$$subs.awk | sed '
19898/^[^""]/{
19899 N
19900 s/\n//
19901}
19902' >>$CONFIG_STATUS || ac_write_fail=1
19903rm -f conf$$subs.awk
19904cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19905_ACAWK
d0ac1c44 19906cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
19907 for (key in S) S_is_set[key] = 1
19908 FS = "\a"
19909 \$ac_cs_awk_pipe_init
19910}
19911{
19912 line = $ 0
19913 nfields = split(line, field, "@")
19914 substed = 0
19915 len = length(field[1])
19916 for (i = 2; i < nfields; i++) {
19917 key = field[i]
19918 keylen = length(key)
19919 if (S_is_set[key]) {
19920 value = S[key]
19921 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19922 len += length(value) + length(field[++i])
19923 substed = 1
19924 } else
19925 len += 1 + keylen
19926 }
19927 if (nfields == 3 && !substed) {
19928 key = field[2]
19929 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
19930 \$ac_cs_awk_read_file
19931 next
19932 }
19933 }
19934 print line
b4e70030 19935}
81ecdfbb
RW
19936\$ac_cs_awk_pipe_fini
19937_ACAWK
19938_ACEOF
19939cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19940if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19941 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19942else
19943 cat
d0ac1c44
SM
19944fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19945 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
19946_ACEOF
19947
d0ac1c44
SM
19948# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19949# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
19950# trailing colons and then remove the whole line if VPATH becomes empty
19951# (actually we leave an empty line to preserve line numbers).
19952if test "x$srcdir" = x.; then
d0ac1c44
SM
19953 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19954h
19955s///
19956s/^/:/
19957s/[ ]*$/:/
19958s/:\$(srcdir):/:/g
19959s/:\${srcdir}:/:/g
19960s/:@srcdir@:/:/g
19961s/^:*//
81ecdfbb 19962s/:*$//
d0ac1c44
SM
19963x
19964s/\(=[ ]*\).*/\1/
19965G
19966s/\n//
81ecdfbb
RW
19967s/^[^=]*=[ ]*$//
19968}'
19969fi
19970
19971cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19972fi # test -n "$CONFIG_FILES"
19973
19974# Set up the scripts for CONFIG_HEADERS section.
19975# No need to generate them if there are no CONFIG_HEADERS.
19976# This happens for instance with `./config.status Makefile'.
19977if test -n "$CONFIG_HEADERS"; then
d0ac1c44 19978cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
19979BEGIN {
19980_ACEOF
19981
19982# Transform confdefs.h into an awk script `defines.awk', embedded as
19983# here-document in config.status, that substitutes the proper values into
19984# config.h.in to produce config.h.
4e8d927d 19985
81ecdfbb
RW
19986# Create a delimiter string that does not exist in confdefs.h, to ease
19987# handling of long lines.
19988ac_delim='%!_!# '
19989for ac_last_try in false false :; do
d0ac1c44
SM
19990 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19991 if test -z "$ac_tt"; then
81ecdfbb
RW
19992 break
19993 elif $ac_last_try; then
d0ac1c44 19994 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
19995 else
19996 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19997 fi
19998done
4e8d927d 19999
81ecdfbb
RW
20000# For the awk script, D is an array of macro values keyed by name,
20001# likewise P contains macro parameters if any. Preserve backslash
20002# newline sequences.
20003
20004ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20005sed -n '
20006s/.\{148\}/&'"$ac_delim"'/g
20007t rset
20008:rset
20009s/^[ ]*#[ ]*define[ ][ ]*/ /
20010t def
20011d
20012:def
20013s/\\$//
20014t bsnl
20015s/["\\]/\\&/g
20016s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20017D["\1"]=" \3"/p
20018s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20019d
20020:bsnl
20021s/["\\]/\\&/g
20022s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20023D["\1"]=" \3\\\\\\n"\\/p
20024t cont
20025s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20026t cont
20027d
20028:cont
20029n
20030s/.\{148\}/&'"$ac_delim"'/g
20031t clear
20032:clear
20033s/\\$//
20034t bsnlc
20035s/["\\]/\\&/g; s/^/"/; s/$/"/p
20036d
20037:bsnlc
20038s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20039b cont
20040' <confdefs.h | sed '
20041s/'"$ac_delim"'/"\\\
20042"/g' >>$CONFIG_STATUS || ac_write_fail=1
20043
20044cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20045 for (key in D) D_is_set[key] = 1
20046 FS = "\a"
20047}
20048/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20049 line = \$ 0
20050 split(line, arg, " ")
20051 if (arg[1] == "#") {
20052 defundef = arg[2]
20053 mac1 = arg[3]
20054 } else {
20055 defundef = substr(arg[1], 2)
20056 mac1 = arg[2]
20057 }
20058 split(mac1, mac2, "(") #)
20059 macro = mac2[1]
20060 prefix = substr(line, 1, index(line, defundef) - 1)
20061 if (D_is_set[macro]) {
20062 # Preserve the white space surrounding the "#".
20063 print prefix "define", macro P[macro] D[macro]
20064 next
20065 } else {
20066 # Replace #undef with comments. This is necessary, for example,
20067 # in the case of _POSIX_SOURCE, which is predefined and required
20068 # on some systems where configure will not decide to define it.
20069 if (defundef == "undef") {
20070 print "/*", prefix defundef, macro, "*/"
20071 next
20072 }
20073 }
b4e70030 20074}
81ecdfbb
RW
20075{ print }
20076_ACAWK
b4e70030 20077_ACEOF
81ecdfbb 20078cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 20079 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 20080fi # test -n "$CONFIG_HEADERS"
4e8d927d 20081
4e8d927d 20082
81ecdfbb
RW
20083eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20084shift
20085for ac_tag
20086do
20087 case $ac_tag in
20088 :[FHLC]) ac_mode=$ac_tag; continue;;
20089 esac
20090 case $ac_mode$ac_tag in
20091 :[FHL]*:*);;
d0ac1c44 20092 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
20093 :[FH]-) ac_tag=-:-;;
20094 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20095 esac
20096 ac_save_IFS=$IFS
20097 IFS=:
20098 set x $ac_tag
20099 IFS=$ac_save_IFS
20100 shift
20101 ac_file=$1
20102 shift
4e8d927d 20103
81ecdfbb
RW
20104 case $ac_mode in
20105 :L) ac_source=$1;;
20106 :[FH])
20107 ac_file_inputs=
20108 for ac_f
20109 do
20110 case $ac_f in
d0ac1c44 20111 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
20112 *) # Look for the file first in the build tree, then in the source tree
20113 # (if the path is not absolute). The absolute path cannot be DOS-style,
20114 # because $ac_f cannot contain `:'.
20115 test -f "$ac_f" ||
20116 case $ac_f in
20117 [\\/$]*) false;;
20118 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20119 esac ||
d0ac1c44 20120 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
20121 esac
20122 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20123 as_fn_append ac_file_inputs " '$ac_f'"
20124 done
20125
20126 # Let's still pretend it is `configure' which instantiates (i.e., don't
20127 # use $as_me), people would be surprised to read:
20128 # /* config.h. Generated by config.status. */
20129 configure_input='Generated from '`
20130 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20131 `' by configure.'
20132 if test x"$ac_file" != x-; then
20133 configure_input="$ac_file. $configure_input"
20134 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20135$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 20136 fi
81ecdfbb
RW
20137 # Neutralize special characters interpreted by sed in replacement strings.
20138 case $configure_input in #(
20139 *\&* | *\|* | *\\* )
20140 ac_sed_conf_input=`$as_echo "$configure_input" |
20141 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20142 *) ac_sed_conf_input=$configure_input;;
20143 esac
4e8d927d 20144
81ecdfbb 20145 case $ac_tag in
d0ac1c44
SM
20146 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20147 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
20148 esac
20149 ;;
c906108c
SS
20150 esac
20151
81ecdfbb 20152 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
20153$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20154 X"$ac_file" : 'X\(//\)[^/]' \| \
20155 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
20156 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20157$as_echo X"$ac_file" |
20158 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20159 s//\1/
20160 q
20161 }
20162 /^X\(\/\/\)[^/].*/{
20163 s//\1/
20164 q
20165 }
20166 /^X\(\/\/\)$/{
20167 s//\1/
20168 q
20169 }
20170 /^X\(\/\).*/{
20171 s//\1/
20172 q
20173 }
20174 s/.*/./; q'`
20175 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20176 ac_builddir=.
20177
81ecdfbb
RW
20178case "$ac_dir" in
20179.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20180*)
20181 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20182 # A ".." for each directory in $ac_dir_suffix.
20183 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20184 case $ac_top_builddir_sub in
20185 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20186 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20187 esac ;;
20188esac
20189ac_abs_top_builddir=$ac_pwd
20190ac_abs_builddir=$ac_pwd$ac_dir_suffix
20191# for backward compatibility:
20192ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20193
20194case $srcdir in
81ecdfbb 20195 .) # We are building in place.
bec39cab 20196 ac_srcdir=.
81ecdfbb
RW
20197 ac_top_srcdir=$ac_top_builddir_sub
20198 ac_abs_top_srcdir=$ac_pwd ;;
20199 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20200 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20201 ac_top_srcdir=$srcdir
20202 ac_abs_top_srcdir=$srcdir ;;
20203 *) # Relative name.
20204 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20205 ac_top_srcdir=$ac_top_build_prefix$srcdir
20206 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20207esac
81ecdfbb 20208ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 20209
c906108c 20210
81ecdfbb
RW
20211 case $ac_mode in
20212 :F)
20213 #
20214 # CONFIG_FILE
20215 #
c906108c 20216
bec39cab
AC
20217 case $INSTALL in
20218 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 20219 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 20220 esac
81ecdfbb 20221_ACEOF
121ce6e5 20222
81ecdfbb
RW
20223cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20224# If the template does not know about datarootdir, expand it.
20225# FIXME: This hack should be removed a few years after 2.60.
20226ac_datarootdir_hack=; ac_datarootdir_seen=
20227ac_sed_dataroot='
20228/datarootdir/ {
20229 p
20230 q
20231}
20232/@datadir@/p
20233/@docdir@/p
20234/@infodir@/p
20235/@localedir@/p
20236/@mandir@/p'
20237case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20238*datarootdir*) ac_datarootdir_seen=yes;;
20239*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20240 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20241$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20242_ACEOF
20243cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20244 ac_datarootdir_hack='
20245 s&@datadir@&$datadir&g
20246 s&@docdir@&$docdir&g
20247 s&@infodir@&$infodir&g
20248 s&@localedir@&$localedir&g
20249 s&@mandir@&$mandir&g
20250 s&\\\${datarootdir}&$datarootdir&g' ;;
20251esac
4e8d927d 20252_ACEOF
81ecdfbb
RW
20253
20254# Neutralize VPATH when `$srcdir' = `.'.
20255# Shell code in configure.ac might set extrasub.
20256# FIXME: do we really want to maintain this feature?
20257cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20258ac_sed_extra="$ac_vpsub
bec39cab
AC
20259$extrasub
20260_ACEOF
81ecdfbb 20261cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
20262:t
20263/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
20264s|@configure_input@|$ac_sed_conf_input|;t t
20265s&@top_builddir@&$ac_top_builddir_sub&;t t
20266s&@top_build_prefix@&$ac_top_build_prefix&;t t
20267s&@srcdir@&$ac_srcdir&;t t
20268s&@abs_srcdir@&$ac_abs_srcdir&;t t
20269s&@top_srcdir@&$ac_top_srcdir&;t t
20270s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20271s&@builddir@&$ac_builddir&;t t
20272s&@abs_builddir@&$ac_abs_builddir&;t t
20273s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20274s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
20275$ac_datarootdir_hack
20276"
20277eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20278if $ac_cs_awk_getline; then
d0ac1c44 20279 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 20280else
d0ac1c44
SM
20281 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20282fi \
20283 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20284
20285test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
20286 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20287 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20288 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 20289 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20290which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 20291$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20292which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 20293
d0ac1c44 20294 rm -f "$ac_tmp/stdin"
bec39cab 20295 case $ac_file in
d0ac1c44
SM
20296 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20297 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 20298 esac \
d0ac1c44 20299 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20300 ;;
20301 :H)
20302 #
20303 # CONFIG_HEADER
20304 #
bec39cab 20305 if test x"$ac_file" != x-; then
81ecdfbb
RW
20306 {
20307 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20308 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20309 } >"$ac_tmp/config.h" \
20310 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20311 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
20312 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20313$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 20314 else
81ecdfbb 20315 rm -f "$ac_file"
d0ac1c44
SM
20316 mv "$ac_tmp/config.h" "$ac_file" \
20317 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
20318 fi
20319 else
81ecdfbb 20320 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20321 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20322 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 20323 fi
81ecdfbb
RW
20324 ;;
20325 :L)
20326 #
20327 # CONFIG_LINK
20328 #
c906108c 20329
81ecdfbb
RW
20330 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20331 :
b4e70030 20332 else
81ecdfbb
RW
20333 # Prefer the file from the source tree if names are identical.
20334 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20335 ac_source=$srcdir/$ac_source
20336 fi
b4e70030 20337
81ecdfbb
RW
20338 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20339$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 20340
81ecdfbb 20341 if test ! -r "$ac_source"; then
d0ac1c44 20342 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
20343 fi
20344 rm -f "$ac_file"
bec39cab 20345
81ecdfbb 20346 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 20347 case $ac_source in
81ecdfbb
RW
20348 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20349 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20350 esac
20351 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20352 ln "$ac_source" "$ac_file" 2>/dev/null ||
20353 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 20354 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
20355 fi
20356 ;;
20357 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20358$as_echo "$as_me: executing $ac_file commands" >&6;}
20359 ;;
c906108c 20360 esac
b4e70030 20361
bec39cab 20362
81ecdfbb 20363 case $ac_file$ac_mode in
c5adaa19 20364 "config.h":H) echo > stamp-h ;;
81ecdfbb 20365 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 20366 "nm.h":L) echo > stamp-nmh ;;
b292c783 20367 "gcore":F) chmod +x gcore ;;
81ecdfbb 20368
bec39cab 20369 esac
81ecdfbb 20370done # for ac_tag
c906108c 20371
bec39cab 20372
81ecdfbb 20373as_fn_exit 0
bec39cab 20374_ACEOF
bec39cab
AC
20375ac_clean_files=$ac_clean_files_save
20376
81ecdfbb 20377test $ac_write_fail = 0 ||
d0ac1c44 20378 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 20379
bec39cab
AC
20380
20381# configure is writing to config.log, and then calls config.status.
20382# config.status does its own redirection, appending to config.log.
20383# Unfortunately, on DOS this fails, as config.log is still kept open
20384# by configure, so config.status won't be able to write to it; its
20385# output is simply discarded. So we exec the FD to /dev/null,
20386# effectively closing config.log, so it can be properly (re)opened and
20387# appended to by config.status. When coming back to configure, we
20388# need to make the FD available again.
20389if test "$no_create" != yes; then
20390 ac_cs_success=:
20391 ac_config_status_args=
20392 test "$silent" = yes &&
20393 ac_config_status_args="$ac_config_status_args --quiet"
20394 exec 5>/dev/null
20395 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20396 exec 5>>config.log
20397 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20398 # would make configure fail if this is the last instruction.
d0ac1c44 20399 $ac_cs_success || as_fn_exit 1
bec39cab 20400fi
c906108c 20401
bec39cab 20402#
81ecdfbb 20403# CONFIG_SUBDIRS section.
bec39cab 20404#
c906108c
SS
20405if test "$no_recursion" != yes; then
20406
81ecdfbb
RW
20407 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20408 # so they do not pile up.
c906108c
SS
20409 ac_sub_configure_args=
20410 ac_prev=
fdc59709
PB
20411 eval "set x $ac_configure_args"
20412 shift
20413 for ac_arg
20414 do
c906108c
SS
20415 if test -n "$ac_prev"; then
20416 ac_prev=
20417 continue
20418 fi
bec39cab 20419 case $ac_arg in
c906108c
SS
20420 -cache-file | --cache-file | --cache-fil | --cache-fi \
20421 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20422 ac_prev=cache_file ;;
20423 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
20424 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20425 | --c=*)
20426 ;;
20427 --config-cache | -C)
c906108c
SS
20428 ;;
20429 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20430 ac_prev=srcdir ;;
20431 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20432 ;;
bec39cab
AC
20433 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20434 ac_prev=prefix ;;
20435 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20436 ;;
81ecdfbb
RW
20437 --disable-option-checking)
20438 ;;
fdc59709
PB
20439 *)
20440 case $ac_arg in
81ecdfbb 20441 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20442 esac
81ecdfbb 20443 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
20444 esac
20445 done
20446
bec39cab
AC
20447 # Always prepend --prefix to ensure using the same prefix
20448 # in subdir configurations.
fdc59709
PB
20449 ac_arg="--prefix=$prefix"
20450 case $ac_arg in
81ecdfbb 20451 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20452 esac
81ecdfbb
RW
20453 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20454
20455 # Pass --silent
20456 if test "$silent" = yes; then
20457 ac_sub_configure_args="--silent $ac_sub_configure_args"
20458 fi
20459
20460 # Always prepend --disable-option-checking to silence warnings, since
20461 # different subdirs can have different --enable and --with options.
20462 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 20463
b4e70030 20464 ac_popdir=`pwd`
bec39cab 20465 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
20466
20467 # Do not complain, so a configure script can configure whichever
20468 # parts of a large source tree are present.
fdc59709 20469 test -d "$srcdir/$ac_dir" || continue
c906108c 20470
81ecdfbb
RW
20471 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20472 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20473 $as_echo "$ac_msg" >&6
20474 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20475 ac_builddir=.
20476
81ecdfbb
RW
20477case "$ac_dir" in
20478.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20479*)
20480 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20481 # A ".." for each directory in $ac_dir_suffix.
20482 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20483 case $ac_top_builddir_sub in
20484 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20485 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20486 esac ;;
20487esac
20488ac_abs_top_builddir=$ac_pwd
20489ac_abs_builddir=$ac_pwd$ac_dir_suffix
20490# for backward compatibility:
20491ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20492
20493case $srcdir in
81ecdfbb 20494 .) # We are building in place.
bec39cab 20495 ac_srcdir=.
81ecdfbb
RW
20496 ac_top_srcdir=$ac_top_builddir_sub
20497 ac_abs_top_srcdir=$ac_pwd ;;
20498 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20499 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20500 ac_top_srcdir=$srcdir
20501 ac_abs_top_srcdir=$srcdir ;;
20502 *) # Relative name.
20503 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20504 ac_top_srcdir=$ac_top_build_prefix$srcdir
20505 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20506esac
81ecdfbb 20507ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 20508
c906108c 20509
fdc59709 20510 cd "$ac_dir"
c906108c
SS
20511
20512 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
20513 if test -f "$ac_srcdir/configure.gnu"; then
20514 ac_sub_configure=$ac_srcdir/configure.gnu
20515 elif test -f "$ac_srcdir/configure"; then
20516 ac_sub_configure=$ac_srcdir/configure
20517 elif test -f "$ac_srcdir/configure.in"; then
20518 # This should be Cygnus configure.
20519 ac_sub_configure=$ac_aux_dir/configure
c906108c 20520 else
81ecdfbb
RW
20521 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20522$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
20523 ac_sub_configure=
20524 fi
20525
20526 # The recursion is here.
20527 if test -n "$ac_sub_configure"; then
c906108c 20528 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
20529 case $cache_file in
20530 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
20531 *) # Relative name.
20532 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 20533 esac
c906108c 20534
81ecdfbb
RW
20535 { $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
20536$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 20537 # The eval makes quoting arguments work.
fdc59709
PB
20538 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20539 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 20540 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
20541 fi
20542
fdc59709 20543 cd "$ac_popdir"
c906108c
SS
20544 done
20545fi
81ecdfbb
RW
20546if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20547 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20548$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20549fi
c906108c 20550
This page took 3.58406 seconds and 4 git commands to generate.