]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/configure
Shadowing fix in gdbscm_frame_read_var
[thirdparty/binutils-gdb.git] / gdb / gdbserver / configure
CommitLineData
d6e9fb05 1#! /bin/sh
d6e9fb05 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#
d6e9fb05
JK
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'
bec39cab 50else
81ecdfbb
RW
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
301
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
bec39cab 418
81ecdfbb
RW
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
dae5f5cf
DJ
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
b80864fb 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
dae5f5cf 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'
dae5f5cf 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
d6e9fb05 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
bec39cab
AC
559
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#
d6e9fb05 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
dae5f5cf 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="server.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
c971b7fa 622ac_subst_vars='LTLIBOBJS
698b3e08 623LIBOBJS
c9a1864a 624GNULIB_STDINT_H
fa593d66
PA
625extra_libraries
626IPA_DEPFILES
81ecdfbb
RW
627srv_xmlfiles
628srv_xmlbuiltin
81ecdfbb
RW
629GDBSERVER_LIBS
630GDBSERVER_DEPFILES
631RDYNAMIC
632REPORT_BUGS_TEXI
633REPORT_BUGS_TO
634PKGVERSION
d4596a3d
PA
635WERROR_CFLAGS
636WARN_CFLAGS
0fb4aa4b
PA
637ustinc
638ustlibs
9c232dda 639ALLOCA
61c125b9 640CCDEPMODE
60d6cfc9 641CONFIG_SRC_SUBDIR
61c125b9
TT
642DEPDIR
643am__leading_dot
bd885420
YQ
644host_noncanonical
645target_noncanonical
0bcda685
PA
646CXX_DIALECT
647HAVE_CXX11
c971b7fa 648RANLIB
e1d2394b 649AR
81ecdfbb
RW
650INSTALL_DATA
651INSTALL_SCRIPT
652INSTALL_PROGRAM
653target_os
654target_vendor
655target_cpu
656target
657host_os
658host_vendor
659host_cpu
660host
661build_os
662build_vendor
663build_cpu
664build
770d76d7
PA
665EGREP
666GREP
667CPP
3bc3d82a
PA
668ac_ct_CXX
669CXXFLAGS
670CXX
81ecdfbb
RW
671OBJEXT
672EXEEXT
673ac_ct_CC
674CPPFLAGS
675LDFLAGS
676CFLAGS
677CC
c9a1864a
YQ
678MAINT
679MAINTAINER_MODE_FALSE
680MAINTAINER_MODE_TRUE
81ecdfbb
RW
681target_alias
682host_alias
683build_alias
684LIBS
685ECHO_T
686ECHO_N
687ECHO_C
688DEFS
689mandir
690localedir
691libdir
692psdir
693pdfdir
694dvidir
695htmldir
696infodir
697docdir
698oldincludedir
699includedir
700localstatedir
701sharedstatedir
702sysconfdir
703datadir
704datarootdir
705libexecdir
706sbindir
707bindir
708program_transform_name
709prefix
710exec_prefix
711PACKAGE_URL
712PACKAGE_BUGREPORT
713PACKAGE_STRING
714PACKAGE_VERSION
715PACKAGE_TARNAME
716PACKAGE_NAME
717PATH_SEPARATOR
718SHELL'
bec39cab 719ac_subst_files=''
81ecdfbb
RW
720ac_user_opts='
721enable_option_checking
c9a1864a 722enable_maintainer_mode
589bc927 723enable_largefile
17ef446e 724enable_libmcheck
0fb4aa4b
PA
725with_ust
726with_ust_include
727with_ust_lib
d4596a3d 728enable_werror
8f13a3ce
MF
729enable_build_warnings
730enable_gdb_build_warnings
81ecdfbb
RW
731with_pkgversion
732with_bugurl
96f15937 733with_libthread_db
c2a66c29 734enable_inprocess_agent
81ecdfbb
RW
735'
736 ac_precious_vars='build_alias
737host_alias
738target_alias
739CC
740CFLAGS
741LDFLAGS
742LIBS
743CPPFLAGS
3bc3d82a
PA
744CXX
745CXXFLAGS
746CCC
81ecdfbb
RW
747CPP'
748
d6e9fb05
JK
749
750# Initialize some variables set by options.
bec39cab
AC
751ac_init_help=
752ac_init_version=false
81ecdfbb
RW
753ac_unrecognized_opts=
754ac_unrecognized_sep=
d6e9fb05
JK
755# The variables have the same names as the options, with
756# dashes changed to underlines.
bec39cab 757cache_file=/dev/null
d6e9fb05 758exec_prefix=NONE
d6e9fb05 759no_create=
d6e9fb05
JK
760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
765silent=
766site=
767srcdir=
d6e9fb05
JK
768verbose=
769x_includes=NONE
770x_libraries=NONE
bec39cab
AC
771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 777# (The list follows the same order as the GNU Coding Standards.)
d6e9fb05
JK
778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
d6e9fb05
JK
783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
d6e9fb05
JK
786includedir='${prefix}/include'
787oldincludedir='/usr/include'
81ecdfbb
RW
788docdir='${datarootdir}/doc/${PACKAGE}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
d6e9fb05 797
d6e9fb05 798ac_prev=
81ecdfbb 799ac_dashdash=
d6e9fb05
JK
800for ac_option
801do
d6e9fb05
JK
802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
81ecdfbb 804 eval $ac_prev=\$ac_option
d6e9fb05
JK
805 ac_prev=
806 continue
807 fi
808
81ecdfbb 809 case $ac_option in
d0ac1c44
SM
810 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *=) ac_optarg= ;;
812 *) ac_optarg=yes ;;
81ecdfbb 813 esac
d6e9fb05
JK
814
815 # Accept the important Cygnus configure options, so we can diagnose typos.
816
81ecdfbb
RW
817 case $ac_dashdash$ac_option in
818 --)
819 ac_dashdash=yes ;;
d6e9fb05
JK
820
821 -bindir | --bindir | --bindi | --bind | --bin | --bi)
822 ac_prev=bindir ;;
823 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 824 bindir=$ac_optarg ;;
d6e9fb05
JK
825
826 -build | --build | --buil | --bui | --bu)
bec39cab 827 ac_prev=build_alias ;;
d6e9fb05 828 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 829 build_alias=$ac_optarg ;;
d6e9fb05
JK
830
831 -cache-file | --cache-file | --cache-fil | --cache-fi \
832 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
833 ac_prev=cache_file ;;
834 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
835 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
836 cache_file=$ac_optarg ;;
837
838 --config-cache | -C)
839 cache_file=config.cache ;;
d6e9fb05 840
81ecdfbb 841 -datadir | --datadir | --datadi | --datad)
d6e9fb05 842 ac_prev=datadir ;;
81ecdfbb 843 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 844 datadir=$ac_optarg ;;
d6e9fb05 845
81ecdfbb
RW
846 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
847 | --dataroo | --dataro | --datar)
848 ac_prev=datarootdir ;;
849 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
850 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
851 datarootdir=$ac_optarg ;;
852
d6e9fb05 853 -disable-* | --disable-*)
81ecdfbb 854 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
d6e9fb05 855 # Reject names that are not valid shell variable names.
81ecdfbb 856 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 857 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
858 ac_useropt_orig=$ac_useropt
859 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
860 case $ac_user_opts in
861 *"
862"enable_$ac_useropt"
863"*) ;;
864 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
865 ac_unrecognized_sep=', ';;
866 esac
867 eval enable_$ac_useropt=no ;;
868
869 -docdir | --docdir | --docdi | --doc | --do)
870 ac_prev=docdir ;;
871 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
872 docdir=$ac_optarg ;;
873
874 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
875 ac_prev=dvidir ;;
876 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
877 dvidir=$ac_optarg ;;
d6e9fb05
JK
878
879 -enable-* | --enable-*)
81ecdfbb 880 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
d6e9fb05 881 # Reject names that are not valid shell variable names.
81ecdfbb 882 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 883 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
884 ac_useropt_orig=$ac_useropt
885 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
886 case $ac_user_opts in
887 *"
888"enable_$ac_useropt"
889"*) ;;
890 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
891 ac_unrecognized_sep=', ';;
dae5f5cf 892 esac
81ecdfbb 893 eval enable_$ac_useropt=\$ac_optarg ;;
d6e9fb05
JK
894
895 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
896 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
897 | --exec | --exe | --ex)
898 ac_prev=exec_prefix ;;
899 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
900 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
901 | --exec=* | --exe=* | --ex=*)
bec39cab 902 exec_prefix=$ac_optarg ;;
d6e9fb05
JK
903
904 -gas | --gas | --ga | --g)
905 # Obsolete; use --with-gas.
906 with_gas=yes ;;
907
bec39cab
AC
908 -help | --help | --hel | --he | -h)
909 ac_init_help=long ;;
910 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
911 ac_init_help=recursive ;;
912 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
913 ac_init_help=short ;;
d6e9fb05
JK
914
915 -host | --host | --hos | --ho)
bec39cab 916 ac_prev=host_alias ;;
d6e9fb05 917 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 918 host_alias=$ac_optarg ;;
d6e9fb05 919
81ecdfbb
RW
920 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
921 ac_prev=htmldir ;;
922 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
923 | --ht=*)
924 htmldir=$ac_optarg ;;
925
d6e9fb05
JK
926 -includedir | --includedir | --includedi | --included | --include \
927 | --includ | --inclu | --incl | --inc)
928 ac_prev=includedir ;;
929 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
930 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 931 includedir=$ac_optarg ;;
d6e9fb05
JK
932
933 -infodir | --infodir | --infodi | --infod | --info | --inf)
934 ac_prev=infodir ;;
935 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 936 infodir=$ac_optarg ;;
d6e9fb05
JK
937
938 -libdir | --libdir | --libdi | --libd)
939 ac_prev=libdir ;;
940 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 941 libdir=$ac_optarg ;;
d6e9fb05
JK
942
943 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
944 | --libexe | --libex | --libe)
945 ac_prev=libexecdir ;;
946 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
947 | --libexe=* | --libex=* | --libe=*)
bec39cab 948 libexecdir=$ac_optarg ;;
d6e9fb05 949
81ecdfbb
RW
950 -localedir | --localedir | --localedi | --localed | --locale)
951 ac_prev=localedir ;;
952 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
953 localedir=$ac_optarg ;;
954
d6e9fb05 955 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 956 | --localstate | --localstat | --localsta | --localst | --locals)
d6e9fb05
JK
957 ac_prev=localstatedir ;;
958 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 959 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 960 localstatedir=$ac_optarg ;;
d6e9fb05
JK
961
962 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
963 ac_prev=mandir ;;
964 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 965 mandir=$ac_optarg ;;
d6e9fb05
JK
966
967 -nfp | --nfp | --nf)
968 # Obsolete; use --without-fp.
969 with_fp=no ;;
970
971 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 972 | --no-cr | --no-c | -n)
d6e9fb05
JK
973 no_create=yes ;;
974
975 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
976 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
977 no_recursion=yes ;;
978
979 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
980 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
981 | --oldin | --oldi | --old | --ol | --o)
982 ac_prev=oldincludedir ;;
983 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
984 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
985 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 986 oldincludedir=$ac_optarg ;;
d6e9fb05
JK
987
988 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
989 ac_prev=prefix ;;
990 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 991 prefix=$ac_optarg ;;
d6e9fb05
JK
992
993 -program-prefix | --program-prefix | --program-prefi | --program-pref \
994 | --program-pre | --program-pr | --program-p)
995 ac_prev=program_prefix ;;
996 -program-prefix=* | --program-prefix=* | --program-prefi=* \
997 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 998 program_prefix=$ac_optarg ;;
d6e9fb05
JK
999
1000 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1001 | --program-suf | --program-su | --program-s)
1002 ac_prev=program_suffix ;;
1003 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1004 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1005 program_suffix=$ac_optarg ;;
d6e9fb05
JK
1006
1007 -program-transform-name | --program-transform-name \
1008 | --program-transform-nam | --program-transform-na \
1009 | --program-transform-n | --program-transform- \
1010 | --program-transform | --program-transfor \
1011 | --program-transfo | --program-transf \
1012 | --program-trans | --program-tran \
1013 | --progr-tra | --program-tr | --program-t)
1014 ac_prev=program_transform_name ;;
1015 -program-transform-name=* | --program-transform-name=* \
1016 | --program-transform-nam=* | --program-transform-na=* \
1017 | --program-transform-n=* | --program-transform-=* \
1018 | --program-transform=* | --program-transfor=* \
1019 | --program-transfo=* | --program-transf=* \
1020 | --program-trans=* | --program-tran=* \
1021 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1022 program_transform_name=$ac_optarg ;;
d6e9fb05 1023
81ecdfbb
RW
1024 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1025 ac_prev=pdfdir ;;
1026 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1027 pdfdir=$ac_optarg ;;
1028
1029 -psdir | --psdir | --psdi | --psd | --ps)
1030 ac_prev=psdir ;;
1031 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1032 psdir=$ac_optarg ;;
1033
d6e9fb05
JK
1034 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1035 | -silent | --silent | --silen | --sile | --sil)
1036 silent=yes ;;
1037
1038 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1039 ac_prev=sbindir ;;
1040 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1041 | --sbi=* | --sb=*)
bec39cab 1042 sbindir=$ac_optarg ;;
d6e9fb05
JK
1043
1044 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1045 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1046 | --sharedst | --shareds | --shared | --share | --shar \
1047 | --sha | --sh)
1048 ac_prev=sharedstatedir ;;
1049 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1050 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1051 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1052 | --sha=* | --sh=*)
bec39cab 1053 sharedstatedir=$ac_optarg ;;
d6e9fb05
JK
1054
1055 -site | --site | --sit)
1056 ac_prev=site ;;
1057 -site=* | --site=* | --sit=*)
bec39cab 1058 site=$ac_optarg ;;
434c4c77 1059
d6e9fb05
JK
1060 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1061 ac_prev=srcdir ;;
1062 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1063 srcdir=$ac_optarg ;;
d6e9fb05
JK
1064
1065 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1066 | --syscon | --sysco | --sysc | --sys | --sy)
1067 ac_prev=sysconfdir ;;
1068 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1069 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1070 sysconfdir=$ac_optarg ;;
d6e9fb05
JK
1071
1072 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1073 ac_prev=target_alias ;;
d6e9fb05 1074 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1075 target_alias=$ac_optarg ;;
d6e9fb05
JK
1076
1077 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1078 verbose=yes ;;
1079
bec39cab
AC
1080 -version | --version | --versio | --versi | --vers | -V)
1081 ac_init_version=: ;;
d6e9fb05
JK
1082
1083 -with-* | --with-*)
81ecdfbb 1084 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
d6e9fb05 1085 # Reject names that are not valid shell variable names.
81ecdfbb 1086 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1087 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1088 ac_useropt_orig=$ac_useropt
1089 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1090 case $ac_user_opts in
1091 *"
1092"with_$ac_useropt"
1093"*) ;;
1094 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1095 ac_unrecognized_sep=', ';;
dae5f5cf 1096 esac
81ecdfbb 1097 eval with_$ac_useropt=\$ac_optarg ;;
d6e9fb05
JK
1098
1099 -without-* | --without-*)
81ecdfbb 1100 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
d6e9fb05 1101 # Reject names that are not valid shell variable names.
81ecdfbb 1102 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1103 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1104 ac_useropt_orig=$ac_useropt
1105 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1106 case $ac_user_opts in
1107 *"
1108"with_$ac_useropt"
1109"*) ;;
1110 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1111 ac_unrecognized_sep=', ';;
1112 esac
1113 eval with_$ac_useropt=no ;;
d6e9fb05
JK
1114
1115 --x)
1116 # Obsolete; use --with-x.
1117 with_x=yes ;;
1118
1119 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1120 | --x-incl | --x-inc | --x-in | --x-i)
1121 ac_prev=x_includes ;;
1122 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1123 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1124 x_includes=$ac_optarg ;;
d6e9fb05
JK
1125
1126 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1127 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1128 ac_prev=x_libraries ;;
1129 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1130 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1131 x_libraries=$ac_optarg ;;
d6e9fb05 1132
d0ac1c44
SM
1133 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1134Try \`$0 --help' for more information"
d6e9fb05
JK
1135 ;;
1136
bec39cab
AC
1137 *=*)
1138 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1139 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1140 case $ac_envvar in #(
1141 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1142 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1143 esac
1144 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1145 export $ac_envvar ;;
1146
d6e9fb05 1147 *)
bec39cab 1148 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1149 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1150 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1151 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1152 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
d6e9fb05
JK
1153 ;;
1154
1155 esac
1156done
1157
1158if test -n "$ac_prev"; then
bec39cab 1159 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1160 as_fn_error $? "missing argument to $ac_option"
d6e9fb05 1161fi
d6e9fb05 1162
81ecdfbb
RW
1163if test -n "$ac_unrecognized_opts"; then
1164 case $enable_option_checking in
1165 no) ;;
d0ac1c44 1166 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1167 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
dae5f5cf 1168 esac
81ecdfbb 1169fi
dae5f5cf 1170
81ecdfbb
RW
1171# Check all directory arguments for consistency.
1172for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1173 datadir sysconfdir sharedstatedir localstatedir includedir \
1174 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1175 libdir localedir mandir
dae5f5cf 1176do
81ecdfbb
RW
1177 eval ac_val=\$$ac_var
1178 # Remove trailing slashes.
1179 case $ac_val in
1180 */ )
1181 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1182 eval $ac_var=\$ac_val;;
1183 esac
1184 # Be sure to have absolute directory names.
dae5f5cf 1185 case $ac_val in
81ecdfbb
RW
1186 [\\/$]* | ?:[\\/]* ) continue;;
1187 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
d6e9fb05 1188 esac
d0ac1c44 1189 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
d6e9fb05
JK
1190done
1191
bec39cab
AC
1192# There might be people who depend on the old broken behavior: `$host'
1193# used to hold the argument of --host etc.
1194# FIXME: To remove some day.
1195build=$build_alias
1196host=$host_alias
1197target=$target_alias
1198
1199# FIXME: To remove some day.
1200if test "x$host_alias" != x; then
1201 if test "x$build_alias" = x; then
1202 cross_compiling=maybe
bec39cab
AC
1203 elif test "x$build_alias" != "x$host_alias"; then
1204 cross_compiling=yes
1205 fi
1206fi
d6e9fb05 1207
bec39cab
AC
1208ac_tool_prefix=
1209test -n "$host_alias" && ac_tool_prefix=$host_alias-
1210
1211test "$silent" = yes && exec 6>/dev/null
d6e9fb05 1212
d6e9fb05 1213
81ecdfbb
RW
1214ac_pwd=`pwd` && test -n "$ac_pwd" &&
1215ac_ls_di=`ls -di .` &&
1216ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1217 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1218test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1219 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1220
1221
d6e9fb05
JK
1222# Find the source files, if location was not specified.
1223if test -z "$srcdir"; then
1224 ac_srcdir_defaulted=yes
81ecdfbb
RW
1225 # Try the directory containing this script, then the parent directory.
1226 ac_confdir=`$as_dirname -- "$as_myself" ||
1227$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1228 X"$as_myself" : 'X\(//\)[^/]' \| \
1229 X"$as_myself" : 'X\(//\)$' \| \
1230 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1231$as_echo X"$as_myself" |
1232 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1233 s//\1/
1234 q
1235 }
1236 /^X\(\/\/\)[^/].*/{
1237 s//\1/
1238 q
1239 }
1240 /^X\(\/\/\)$/{
1241 s//\1/
1242 q
1243 }
1244 /^X\(\/\).*/{
1245 s//\1/
1246 q
1247 }
1248 s/.*/./; q'`
d6e9fb05 1249 srcdir=$ac_confdir
81ecdfbb 1250 if test ! -r "$srcdir/$ac_unique_file"; then
d6e9fb05
JK
1251 srcdir=..
1252 fi
1253else
1254 ac_srcdir_defaulted=no
1255fi
81ecdfbb
RW
1256if test ! -r "$srcdir/$ac_unique_file"; then
1257 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1258 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1259fi
1260ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1261ac_abs_confdir=`(
d0ac1c44 1262 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1263 pwd)`
1264# When building in place, set srcdir=.
1265if test "$ac_abs_confdir" = "$ac_pwd"; then
1266 srcdir=.
1267fi
1268# Remove unnecessary trailing slashes from srcdir.
1269# Double slashes in file names in object file debugging info
1270# mess up M-x gdb in Emacs.
1271case $srcdir in
1272*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1273esac
1274for ac_var in $ac_precious_vars; do
1275 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1276 eval ac_env_${ac_var}_value=\$${ac_var}
1277 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1278 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1279done
d6e9fb05 1280
bec39cab
AC
1281#
1282# Report the --help message.
1283#
1284if test "$ac_init_help" = "long"; then
1285 # Omit some internal or obsolete options to make the list less imposing.
1286 # This message is too long to be a string in the A/UX 3.1 sh.
1287 cat <<_ACEOF
1288\`configure' configures this package to adapt to many kinds of systems.
1289
1290Usage: $0 [OPTION]... [VAR=VALUE]...
1291
1292To assign environment variables (e.g., CC, CFLAGS...), specify them as
1293VAR=VALUE. See below for descriptions of some of the useful variables.
1294
1295Defaults for the options are specified in brackets.
1296
1297Configuration:
1298 -h, --help display this help and exit
1299 --help=short display options specific to this package
1300 --help=recursive display the short help of all the included packages
1301 -V, --version display version information and exit
d0ac1c44 1302 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1303 --cache-file=FILE cache test results in FILE [disabled]
1304 -C, --config-cache alias for \`--cache-file=config.cache'
1305 -n, --no-create do not create output files
1306 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1307
bec39cab
AC
1308Installation directories:
1309 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1310 [$ac_default_prefix]
bec39cab 1311 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1312 [PREFIX]
bec39cab
AC
1313
1314By default, \`make install' will install all the files in
1315\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1316an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1317for instance \`--prefix=\$HOME'.
1318
1319For better control, use the options below.
1320
1321Fine tuning of the installation directories:
81ecdfbb
RW
1322 --bindir=DIR user executables [EPREFIX/bin]
1323 --sbindir=DIR system admin executables [EPREFIX/sbin]
1324 --libexecdir=DIR program executables [EPREFIX/libexec]
1325 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1326 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1327 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1328 --libdir=DIR object code libraries [EPREFIX/lib]
1329 --includedir=DIR C header files [PREFIX/include]
1330 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1331 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1332 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1333 --infodir=DIR info documentation [DATAROOTDIR/info]
1334 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1335 --mandir=DIR man documentation [DATAROOTDIR/man]
1336 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1337 --htmldir=DIR html documentation [DOCDIR]
1338 --dvidir=DIR dvi documentation [DOCDIR]
1339 --pdfdir=DIR pdf documentation [DOCDIR]
1340 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1341_ACEOF
1342
1343 cat <<\_ACEOF
1344
dcdb98d2
DJ
1345Program names:
1346 --program-prefix=PREFIX prepend PREFIX to installed program names
1347 --program-suffix=SUFFIX append SUFFIX to installed program names
1348 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1349
bec39cab
AC
1350System types:
1351 --build=BUILD configure for building on BUILD [guessed]
1352 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1353 --target=TARGET configure for building compilers for TARGET [HOST]
1354_ACEOF
1355fi
1356
1357if test -n "$ac_init_help"; then
1358
1359 cat <<\_ACEOF
1360
d4596a3d
PA
1361Optional Features:
1362 --disable-option-checking ignore unrecognized --enable/--with options
1363 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1364 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1365 --enable-maintainer-mode
1366 enable make rules and dependencies not useful (and
1367 sometimes confusing) to the casual installer
589bc927 1368 --disable-largefile omit support for large files
17ef446e 1369 --enable-libmcheck Try linking with -lmcheck if available
d4596a3d 1370 --enable-werror treat compile warnings as errors
8f13a3ce
MF
1371 --enable-build-warnings enable build-time compiler warnings if gcc is used
1372 --enable-gdb-build-warnings
1373 enable GDB specific build-time compiler warnings if
1374 gcc is used
c2a66c29
NS
1375 --enable-inprocess-agent
1376 inprocess agent
d4596a3d 1377
c16158bc
JM
1378Optional Packages:
1379 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1380 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
0fb4aa4b
PA
1381 --with-ust=PATH Specify prefix directory for the installed UST package
1382 Equivalent to --with-ust-include=PATH/include
1383 plus --with-ust-lib=PATH/lib
1384 --with-ust-include=PATH Specify directory for installed UST include files
1385 --with-ust-lib=PATH Specify the directory for the installed UST library
c16158bc
JM
1386 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1387 --with-bugurl=URL Direct users to URL to report a bug
96f15937
PP
1388 --with-libthread-db=PATH
1389 use given libthread_db directly
c16158bc 1390
bec39cab
AC
1391Some influential environment variables:
1392 CC C compiler command
1393 CFLAGS C compiler flags
1394 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1395 nonstandard directory <lib dir>
81ecdfbb 1396 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1397 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1398 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1399 CXX C++ compiler command
1400 CXXFLAGS C++ compiler flags
bec39cab
AC
1401 CPP C preprocessor
1402
1403Use these variables to override the choices made by `configure' or to help
1404it to find libraries and programs with nonstandard names/locations.
1405
81ecdfbb 1406Report bugs to the package provider.
bec39cab 1407_ACEOF
81ecdfbb 1408ac_status=$?
bec39cab
AC
1409fi
1410
1411if test "$ac_init_help" = "recursive"; then
1412 # If there are subdirs, report their specific --help.
bec39cab 1413 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1414 test -d "$ac_dir" ||
1415 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1416 continue
bec39cab
AC
1417 ac_builddir=.
1418
81ecdfbb
RW
1419case "$ac_dir" in
1420.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1421*)
1422 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1423 # A ".." for each directory in $ac_dir_suffix.
1424 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1425 case $ac_top_builddir_sub in
1426 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1427 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1428 esac ;;
1429esac
1430ac_abs_top_builddir=$ac_pwd
1431ac_abs_builddir=$ac_pwd$ac_dir_suffix
1432# for backward compatibility:
1433ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1434
1435case $srcdir in
81ecdfbb 1436 .) # We are building in place.
bec39cab 1437 ac_srcdir=.
81ecdfbb
RW
1438 ac_top_srcdir=$ac_top_builddir_sub
1439 ac_abs_top_srcdir=$ac_pwd ;;
1440 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1441 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1442 ac_top_srcdir=$srcdir
1443 ac_abs_top_srcdir=$srcdir ;;
1444 *) # Relative name.
1445 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1446 ac_top_srcdir=$ac_top_build_prefix$srcdir
1447 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
dae5f5cf 1448esac
81ecdfbb
RW
1449ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1450
1451 cd "$ac_dir" || { ac_status=$?; continue; }
1452 # Check for guested configure.
1453 if test -f "$ac_srcdir/configure.gnu"; then
1454 echo &&
1455 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1456 elif test -f "$ac_srcdir/configure"; then
1457 echo &&
1458 $SHELL "$ac_srcdir/configure" --help=recursive
434c4c77 1459 else
81ecdfbb
RW
1460 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1461 fi || ac_status=$?
1462 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1463 done
1464fi
1465
81ecdfbb 1466test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1467if $ac_init_version; then
1468 cat <<\_ACEOF
81ecdfbb 1469configure
d0ac1c44 1470generated by GNU Autoconf 2.69
bec39cab 1471
d0ac1c44 1472Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1473This configure script is free software; the Free Software Foundation
1474gives unlimited permission to copy, distribute and modify it.
1475_ACEOF
81ecdfbb 1476 exit
bec39cab 1477fi
bec39cab 1478
81ecdfbb
RW
1479## ------------------------ ##
1480## Autoconf initialization. ##
1481## ------------------------ ##
bec39cab 1482
81ecdfbb
RW
1483# ac_fn_c_try_compile LINENO
1484# --------------------------
1485# Try to compile conftest.$ac_ext, and return whether this succeeded.
1486ac_fn_c_try_compile ()
bec39cab 1487{
81ecdfbb
RW
1488 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1489 rm -f conftest.$ac_objext
1490 if { { ac_try="$ac_compile"
1491case "(($ac_try" in
1492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1493 *) ac_try_echo=$ac_try;;
1494esac
1495eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1496$as_echo "$ac_try_echo"; } >&5
1497 (eval "$ac_compile") 2>conftest.err
1498 ac_status=$?
1499 if test -s conftest.err; then
1500 grep -v '^ *+' conftest.err >conftest.er1
1501 cat conftest.er1 >&5
1502 mv -f conftest.er1 conftest.err
1503 fi
1504 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1505 test $ac_status = 0; } && {
1506 test -z "$ac_c_werror_flag" ||
1507 test ! -s conftest.err
1508 } && test -s conftest.$ac_objext; then :
1509 ac_retval=0
1510else
1511 $as_echo "$as_me: failed program was:" >&5
1512sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1513
81ecdfbb
RW
1514 ac_retval=1
1515fi
d0ac1c44
SM
1516 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1517 as_fn_set_status $ac_retval
bec39cab 1518
81ecdfbb 1519} # ac_fn_c_try_compile
bec39cab 1520
3bc3d82a
PA
1521# ac_fn_cxx_try_compile LINENO
1522# ----------------------------
1523# Try to compile conftest.$ac_ext, and return whether this succeeded.
1524ac_fn_cxx_try_compile ()
1525{
1526 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1527 rm -f conftest.$ac_objext
1528 if { { ac_try="$ac_compile"
1529case "(($ac_try" in
1530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1531 *) ac_try_echo=$ac_try;;
1532esac
1533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1534$as_echo "$ac_try_echo"; } >&5
1535 (eval "$ac_compile") 2>conftest.err
1536 ac_status=$?
1537 if test -s conftest.err; then
1538 grep -v '^ *+' conftest.err >conftest.er1
1539 cat conftest.er1 >&5
1540 mv -f conftest.er1 conftest.err
1541 fi
1542 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1543 test $ac_status = 0; } && {
1544 test -z "$ac_cxx_werror_flag" ||
1545 test ! -s conftest.err
1546 } && test -s conftest.$ac_objext; then :
1547 ac_retval=0
1548else
1549 $as_echo "$as_me: failed program was:" >&5
1550sed 's/^/| /' conftest.$ac_ext >&5
1551
1552 ac_retval=1
1553fi
d0ac1c44
SM
1554 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1555 as_fn_set_status $ac_retval
3bc3d82a
PA
1556
1557} # ac_fn_cxx_try_compile
1558
81ecdfbb
RW
1559# ac_fn_c_try_cpp LINENO
1560# ----------------------
1561# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1562ac_fn_c_try_cpp ()
1563{
1564 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1565 if { { ac_try="$ac_cpp conftest.$ac_ext"
1566case "(($ac_try" in
1567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1568 *) ac_try_echo=$ac_try;;
1569esac
1570eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1571$as_echo "$ac_try_echo"; } >&5
1572 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1573 ac_status=$?
1574 if test -s conftest.err; then
1575 grep -v '^ *+' conftest.err >conftest.er1
1576 cat conftest.er1 >&5
1577 mv -f conftest.er1 conftest.err
1578 fi
1579 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1580 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1581 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1582 test ! -s conftest.err
1583 }; then :
1584 ac_retval=0
1585else
1586 $as_echo "$as_me: failed program was:" >&5
1587sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1588
81ecdfbb
RW
1589 ac_retval=1
1590fi
d0ac1c44
SM
1591 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1592 as_fn_set_status $ac_retval
bec39cab 1593
81ecdfbb
RW
1594} # ac_fn_c_try_cpp
1595
1596# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1597# -------------------------------------------------------
1598# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1599# the include files in INCLUDES and setting the cache variable VAR
1600# accordingly.
1601ac_fn_c_check_header_mongrel ()
1602{
1603 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1604 if eval \${$3+:} false; then :
81ecdfbb
RW
1605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1606$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1607if eval \${$3+:} false; then :
81ecdfbb
RW
1608 $as_echo_n "(cached) " >&6
1609fi
1610eval ac_res=\$$3
1611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1612$as_echo "$ac_res" >&6; }
1613else
1614 # Is the header compilable?
1615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1616$as_echo_n "checking $2 usability... " >&6; }
1617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1618/* end confdefs.h. */
1619$4
1620#include <$2>
1621_ACEOF
1622if ac_fn_c_try_compile "$LINENO"; then :
1623 ac_header_compiler=yes
1624else
1625 ac_header_compiler=no
1626fi
1627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1629$as_echo "$ac_header_compiler" >&6; }
1630
1631# Is the header present?
1632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1633$as_echo_n "checking $2 presence... " >&6; }
1634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1635/* end confdefs.h. */
1636#include <$2>
1637_ACEOF
1638if ac_fn_c_try_cpp "$LINENO"; then :
1639 ac_header_preproc=yes
1640else
1641 ac_header_preproc=no
1642fi
d0ac1c44 1643rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1645$as_echo "$ac_header_preproc" >&6; }
1646
1647# So? What about this header?
1648case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1649 yes:no: )
1650 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1651$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1653$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1654 ;;
1655 no:yes:* )
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1657$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1659$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1661$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1663$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1665$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1666 ;;
1667esac
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1669$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1670if eval \${$3+:} false; then :
81ecdfbb
RW
1671 $as_echo_n "(cached) " >&6
1672else
1673 eval "$3=\$ac_header_compiler"
1674fi
1675eval ac_res=\$$3
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1677$as_echo "$ac_res" >&6; }
1678fi
d0ac1c44 1679 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1680
1681} # ac_fn_c_check_header_mongrel
1682
1683# ac_fn_c_try_run LINENO
1684# ----------------------
1685# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1686# that executables *can* be run.
1687ac_fn_c_try_run ()
1688{
1689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690 if { { ac_try="$ac_link"
1691case "(($ac_try" in
1692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1693 *) ac_try_echo=$ac_try;;
1694esac
1695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1696$as_echo "$ac_try_echo"; } >&5
1697 (eval "$ac_link") 2>&5
1698 ac_status=$?
1699 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1700 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1701 { { case "(($ac_try" in
1702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1703 *) ac_try_echo=$ac_try;;
1704esac
1705eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1706$as_echo "$ac_try_echo"; } >&5
1707 (eval "$ac_try") 2>&5
1708 ac_status=$?
1709 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1710 test $ac_status = 0; }; }; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: program exited with status $ac_status" >&5
1714 $as_echo "$as_me: failed program was:" >&5
1715sed 's/^/| /' conftest.$ac_ext >&5
1716
1717 ac_retval=$ac_status
1718fi
1719 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1720 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1721 as_fn_set_status $ac_retval
81ecdfbb
RW
1722
1723} # ac_fn_c_try_run
1724
1725# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1726# -------------------------------------------------------
1727# Tests whether HEADER exists and can be compiled using the include files in
1728# INCLUDES, setting the cache variable VAR accordingly.
1729ac_fn_c_check_header_compile ()
1730{
1731 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1733$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1734if eval \${$3+:} false; then :
81ecdfbb
RW
1735 $as_echo_n "(cached) " >&6
1736else
1737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1738/* end confdefs.h. */
1739$4
1740#include <$2>
1741_ACEOF
1742if ac_fn_c_try_compile "$LINENO"; then :
1743 eval "$3=yes"
1744else
1745 eval "$3=no"
1746fi
1747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1748fi
1749eval ac_res=\$$3
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1751$as_echo "$ac_res" >&6; }
d0ac1c44 1752 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1753
1754} # ac_fn_c_check_header_compile
1755
1756# ac_fn_c_try_link LINENO
1757# -----------------------
1758# Try to link conftest.$ac_ext, and return whether this succeeded.
1759ac_fn_c_try_link ()
1760{
1761 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1762 rm -f conftest.$ac_objext conftest$ac_exeext
1763 if { { ac_try="$ac_link"
1764case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767esac
1768eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1769$as_echo "$ac_try_echo"; } >&5
1770 (eval "$ac_link") 2>conftest.err
1771 ac_status=$?
1772 if test -s conftest.err; then
1773 grep -v '^ *+' conftest.err >conftest.er1
1774 cat conftest.er1 >&5
1775 mv -f conftest.er1 conftest.err
1776 fi
1777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1778 test $ac_status = 0; } && {
1779 test -z "$ac_c_werror_flag" ||
1780 test ! -s conftest.err
1781 } && test -s conftest$ac_exeext && {
1782 test "$cross_compiling" = yes ||
d0ac1c44 1783 test -x conftest$ac_exeext
81ecdfbb
RW
1784 }; then :
1785 ac_retval=0
1786else
1787 $as_echo "$as_me: failed program was:" >&5
1788sed 's/^/| /' conftest.$ac_ext >&5
1789
1790 ac_retval=1
1791fi
1792 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1793 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1794 # interfere with the next link command; also delete a directory that is
1795 # left behind by Apple's compiler. We do this before executing the actions.
1796 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1797 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1798 as_fn_set_status $ac_retval
81ecdfbb
RW
1799
1800} # ac_fn_c_try_link
1801
eb0edac8
GB
1802# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1803# -------------------------------------------
1804# Tests whether TYPE exists after having included INCLUDES, setting cache
1805# variable VAR accordingly.
1806ac_fn_c_check_type ()
1807{
1808 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1810$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1811if eval \${$3+:} false; then :
eb0edac8
GB
1812 $as_echo_n "(cached) " >&6
1813else
1814 eval "$3=no"
1815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1816/* end confdefs.h. */
1817$4
1818int
1819main ()
1820{
1821if (sizeof ($2))
1822 return 0;
1823 ;
1824 return 0;
1825}
1826_ACEOF
1827if ac_fn_c_try_compile "$LINENO"; then :
1828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1829/* end confdefs.h. */
1830$4
1831int
1832main ()
1833{
1834if (sizeof (($2)))
1835 return 0;
1836 ;
1837 return 0;
1838}
1839_ACEOF
1840if ac_fn_c_try_compile "$LINENO"; then :
1841
1842else
1843 eval "$3=yes"
1844fi
1845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1846fi
1847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1848fi
1849eval ac_res=\$$3
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1851$as_echo "$ac_res" >&6; }
d0ac1c44 1852 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
eb0edac8
GB
1853
1854} # ac_fn_c_check_type
1855
81ecdfbb
RW
1856# ac_fn_c_check_func LINENO FUNC VAR
1857# ----------------------------------
1858# Tests whether FUNC exists, setting the cache variable VAR accordingly
1859ac_fn_c_check_func ()
1860{
1861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1863$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1864if eval \${$3+:} false; then :
81ecdfbb
RW
1865 $as_echo_n "(cached) " >&6
1866else
1867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868/* end confdefs.h. */
1869/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1870 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1871#define $2 innocuous_$2
1872
1873/* System header to define __stub macros and hopefully few prototypes,
1874 which can conflict with char $2 (); below.
1875 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1876 <limits.h> exists even on freestanding compilers. */
1877
1878#ifdef __STDC__
1879# include <limits.h>
1880#else
1881# include <assert.h>
1882#endif
1883
1884#undef $2
1885
1886/* Override any GCC internal prototype to avoid an error.
1887 Use char because int might match the return type of a GCC
1888 builtin and then its argument prototype would still apply. */
1889#ifdef __cplusplus
1890extern "C"
1891#endif
1892char $2 ();
1893/* The GNU C library defines this for functions which it implements
1894 to always fail with ENOSYS. Some functions are actually named
1895 something starting with __ and the normal name is an alias. */
1896#if defined __stub_$2 || defined __stub___$2
1897choke me
1898#endif
1899
1900int
1901main ()
1902{
1903return $2 ();
1904 ;
1905 return 0;
1906}
1907_ACEOF
1908if ac_fn_c_try_link "$LINENO"; then :
1909 eval "$3=yes"
1910else
1911 eval "$3=no"
1912fi
1913rm -f core conftest.err conftest.$ac_objext \
1914 conftest$ac_exeext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
d0ac1c44 1919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1920
1921} # ac_fn_c_check_func
1922
d0ac1c44
SM
1923# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1924# ---------------------------------------------
1925# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1926# accordingly.
81ecdfbb
RW
1927ac_fn_c_check_decl ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
0fb4aa4b
PA
1930 as_decl_name=`echo $2|sed 's/ *(.*//'`
1931 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1933$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 1934if eval \${$3+:} false; then :
81ecdfbb
RW
1935 $as_echo_n "(cached) " >&6
1936else
1937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938/* end confdefs.h. */
1939$4
1940int
1941main ()
1942{
0fb4aa4b
PA
1943#ifndef $as_decl_name
1944#ifdef __cplusplus
1945 (void) $as_decl_use;
1946#else
1947 (void) $as_decl_name;
1948#endif
81ecdfbb
RW
1949#endif
1950
1951 ;
1952 return 0;
1953}
1954_ACEOF
1955if ac_fn_c_try_compile "$LINENO"; then :
1956 eval "$3=yes"
1957else
1958 eval "$3=no"
1959fi
1960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1961fi
1962eval ac_res=\$$3
1963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1964$as_echo "$ac_res" >&6; }
d0ac1c44 1965 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1966
1967} # ac_fn_c_check_decl
1968
07697489
PA
1969# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1970# --------------------------------------------
1971# Tries to find the compile-time value of EXPR in a program that includes
1972# INCLUDES, setting VAR accordingly. Returns whether the value could be
1973# computed
1974ac_fn_c_compute_int ()
1975{
1976 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1977 if test "$cross_compiling" = yes; then
1978 # Depending upon the size, compute the lo and hi bounds.
1979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1980/* end confdefs.h. */
1981$4
1982int
1983main ()
1984{
1985static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
1986test_array [0] = 0;
1987return test_array [0];
07697489
PA
1988
1989 ;
1990 return 0;
1991}
1992_ACEOF
1993if ac_fn_c_try_compile "$LINENO"; then :
1994 ac_lo=0 ac_mid=0
1995 while :; do
1996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999int
2000main ()
2001{
2002static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2003test_array [0] = 0;
2004return test_array [0];
07697489
PA
2005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_hi=$ac_mid; break
2012else
2013 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2014 if test $ac_lo -le $ac_mid; then
2015 ac_lo= ac_hi=
2016 break
2017 fi
2018 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2019fi
2020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2021 done
2022else
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$4
2026int
2027main ()
2028{
2029static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2030test_array [0] = 0;
2031return test_array [0];
07697489
PA
2032
2033 ;
2034 return 0;
2035}
2036_ACEOF
2037if ac_fn_c_try_compile "$LINENO"; then :
2038 ac_hi=-1 ac_mid=-1
2039 while :; do
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
2044main ()
2045{
2046static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2047test_array [0] = 0;
2048return test_array [0];
07697489
PA
2049
2050 ;
2051 return 0;
2052}
2053_ACEOF
2054if ac_fn_c_try_compile "$LINENO"; then :
2055 ac_lo=$ac_mid; break
2056else
2057 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2058 if test $ac_mid -le $ac_hi; then
2059 ac_lo= ac_hi=
2060 break
2061 fi
2062 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2063fi
2064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2065 done
2066else
2067 ac_lo= ac_hi=
2068fi
2069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2070fi
2071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2072# Binary search between lo and hi bounds.
2073while test "x$ac_lo" != "x$ac_hi"; do
2074 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h. */
2077$4
2078int
2079main ()
2080{
2081static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2082test_array [0] = 0;
2083return test_array [0];
07697489
PA
2084
2085 ;
2086 return 0;
2087}
2088_ACEOF
2089if ac_fn_c_try_compile "$LINENO"; then :
2090 ac_hi=$ac_mid
2091else
2092 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095done
2096case $ac_lo in #((
2097?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2098'') ac_retval=1 ;;
2099esac
2100 else
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104static long int longval () { return $2; }
2105static unsigned long int ulongval () { return $2; }
2106#include <stdio.h>
2107#include <stdlib.h>
2108int
2109main ()
2110{
2111
2112 FILE *f = fopen ("conftest.val", "w");
2113 if (! f)
2114 return 1;
2115 if (($2) < 0)
2116 {
2117 long int i = longval ();
2118 if (i != ($2))
2119 return 1;
2120 fprintf (f, "%ld", i);
2121 }
2122 else
2123 {
2124 unsigned long int i = ulongval ();
2125 if (i != ($2))
2126 return 1;
2127 fprintf (f, "%lu", i);
2128 }
2129 /* Do not output a trailing newline, as this causes \r\n confusion
2130 on some platforms. */
2131 return ferror (f) || fclose (f) != 0;
2132
2133 ;
2134 return 0;
2135}
2136_ACEOF
2137if ac_fn_c_try_run "$LINENO"; then :
2138 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2139else
2140 ac_retval=1
2141fi
2142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2143 conftest.$ac_objext conftest.beam conftest.$ac_ext
2144rm -f conftest.val
2145
2146 fi
d0ac1c44
SM
2147 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2148 as_fn_set_status $ac_retval
07697489
PA
2149
2150} # ac_fn_c_compute_int
791c0056
GB
2151
2152# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2153# ----------------------------------------------------
2154# Tries to find if the field MEMBER exists in type AGGR, after including
2155# INCLUDES, setting cache variable VAR accordingly.
2156ac_fn_c_check_member ()
2157{
2158 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2160$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2161if eval \${$4+:} false; then :
791c0056
GB
2162 $as_echo_n "(cached) " >&6
2163else
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165/* end confdefs.h. */
2166$5
2167int
2168main ()
2169{
2170static $2 ac_aggr;
2171if (ac_aggr.$3)
2172return 0;
2173 ;
2174 return 0;
2175}
2176_ACEOF
2177if ac_fn_c_try_compile "$LINENO"; then :
2178 eval "$4=yes"
2179else
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
2182$5
2183int
2184main ()
2185{
2186static $2 ac_aggr;
2187if (sizeof ac_aggr.$3)
2188return 0;
2189 ;
2190 return 0;
2191}
2192_ACEOF
2193if ac_fn_c_try_compile "$LINENO"; then :
2194 eval "$4=yes"
2195else
2196 eval "$4=no"
2197fi
2198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2199fi
2200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2201fi
2202eval ac_res=\$$4
2203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2204$as_echo "$ac_res" >&6; }
d0ac1c44 2205 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
791c0056
GB
2206
2207} # ac_fn_c_check_member
81ecdfbb
RW
2208cat >config.log <<_ACEOF
2209This file contains any messages produced by compilers while
2210running configure, to aid debugging if configure makes a mistake.
2211
2212It was created by $as_me, which was
d0ac1c44 2213generated by GNU Autoconf 2.69. Invocation command line was
81ecdfbb
RW
2214
2215 $ $0 $@
2216
2217_ACEOF
2218exec 5>>config.log
2219{
2220cat <<_ASUNAME
2221## --------- ##
2222## Platform. ##
2223## --------- ##
2224
2225hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2226uname -m = `(uname -m) 2>/dev/null || echo unknown`
2227uname -r = `(uname -r) 2>/dev/null || echo unknown`
2228uname -s = `(uname -s) 2>/dev/null || echo unknown`
2229uname -v = `(uname -v) 2>/dev/null || echo unknown`
2230
2231/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2232/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2233
2234/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2235/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2236/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2237/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2238/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2239/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2240/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2241
2242_ASUNAME
2243
2244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2245for as_dir in $PATH
2246do
2247 IFS=$as_save_IFS
2248 test -z "$as_dir" && as_dir=.
2249 $as_echo "PATH: $as_dir"
2250 done
2251IFS=$as_save_IFS
2252
2253} >&5
2254
2255cat >&5 <<_ACEOF
2256
2257
2258## ----------- ##
2259## Core tests. ##
2260## ----------- ##
bec39cab
AC
2261
2262_ACEOF
2263
2264
2265# Keep a trace of the command line.
2266# Strip out --no-create and --no-recursion so they do not pile up.
2267# Strip out --silent because we don't want to record it for future runs.
2268# Also quote any args containing shell meta-characters.
2269# Make two passes to allow for proper duplicate-argument suppression.
2270ac_configure_args=
2271ac_configure_args0=
2272ac_configure_args1=
bec39cab
AC
2273ac_must_keep_next=false
2274for ac_pass in 1 2
2275do
2276 for ac_arg
2277 do
2278 case $ac_arg in
2279 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2280 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2281 | -silent | --silent | --silen | --sile | --sil)
2282 continue ;;
81ecdfbb
RW
2283 *\'*)
2284 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
2285 esac
2286 case $ac_pass in
81ecdfbb 2287 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
bec39cab 2288 2)
81ecdfbb 2289 as_fn_append ac_configure_args1 " '$ac_arg'"
bec39cab
AC
2290 if test $ac_must_keep_next = true; then
2291 ac_must_keep_next=false # Got value, back to normal.
2292 else
2293 case $ac_arg in
2294 *=* | --config-cache | -C | -disable-* | --disable-* \
2295 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2296 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2297 | -with-* | --with-* | -without-* | --without-* | --x)
2298 case "$ac_configure_args0 " in
2299 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2300 esac
2301 ;;
2302 -* ) ac_must_keep_next=true ;;
2303 esac
2304 fi
81ecdfbb 2305 as_fn_append ac_configure_args " '$ac_arg'"
bec39cab
AC
2306 ;;
2307 esac
2308 done
2309done
81ecdfbb
RW
2310{ ac_configure_args0=; unset ac_configure_args0;}
2311{ ac_configure_args1=; unset ac_configure_args1;}
bec39cab
AC
2312
2313# When interrupted or exit'd, cleanup temporary files, and complete
2314# config.log. We remove comments because anyway the quotes in there
2315# would cause problems or look ugly.
81ecdfbb
RW
2316# WARNING: Use '\'' to represent an apostrophe within the trap.
2317# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
bec39cab
AC
2318trap 'exit_status=$?
2319 # Save into config.log some information that might help in debugging.
2320 {
2321 echo
2322
d0ac1c44 2323 $as_echo "## ---------------- ##
bec39cab 2324## Cache variables. ##
d0ac1c44 2325## ---------------- ##"
bec39cab
AC
2326 echo
2327 # The following way of writing the cache mishandles newlines in values,
81ecdfbb
RW
2328(
2329 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2330 eval ac_val=\$$ac_var
2331 case $ac_val in #(
2332 *${as_nl}*)
2333 case $ac_var in #(
2334 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2335$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2336 esac
2337 case $ac_var in #(
2338 _ | IFS | as_nl) ;; #(
2339 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2340 *) { eval $ac_var=; unset $ac_var;} ;;
2341 esac ;;
2342 esac
2343 done
bec39cab 2344 (set) 2>&1 |
81ecdfbb
RW
2345 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2346 *${as_nl}ac_space=\ *)
bec39cab 2347 sed -n \
81ecdfbb
RW
2348 "s/'\''/'\''\\\\'\'''\''/g;
2349 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2350 ;; #(
bec39cab 2351 *)
81ecdfbb 2352 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 2353 ;;
81ecdfbb
RW
2354 esac |
2355 sort
2356)
bec39cab
AC
2357 echo
2358
d0ac1c44 2359 $as_echo "## ----------------- ##
bec39cab 2360## Output variables. ##
d0ac1c44 2361## ----------------- ##"
bec39cab
AC
2362 echo
2363 for ac_var in $ac_subst_vars
2364 do
81ecdfbb
RW
2365 eval ac_val=\$$ac_var
2366 case $ac_val in
2367 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2368 esac
2369 $as_echo "$ac_var='\''$ac_val'\''"
bec39cab
AC
2370 done | sort
2371 echo
2372
2373 if test -n "$ac_subst_files"; then
d0ac1c44 2374 $as_echo "## ------------------- ##
81ecdfbb 2375## File substitutions. ##
d0ac1c44 2376## ------------------- ##"
bec39cab
AC
2377 echo
2378 for ac_var in $ac_subst_files
2379 do
81ecdfbb
RW
2380 eval ac_val=\$$ac_var
2381 case $ac_val in
2382 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2383 esac
2384 $as_echo "$ac_var='\''$ac_val'\''"
bec39cab
AC
2385 done | sort
2386 echo
434c4c77 2387 fi
bec39cab
AC
2388
2389 if test -s confdefs.h; then
d0ac1c44 2390 $as_echo "## ----------- ##
bec39cab 2391## confdefs.h. ##
d0ac1c44 2392## ----------- ##"
bec39cab 2393 echo
81ecdfbb 2394 cat confdefs.h
bec39cab
AC
2395 echo
2396 fi
2397 test "$ac_signal" != 0 &&
81ecdfbb
RW
2398 $as_echo "$as_me: caught signal $ac_signal"
2399 $as_echo "$as_me: exit $exit_status"
bec39cab 2400 } >&5
81ecdfbb
RW
2401 rm -f core *.core core.conftest.* &&
2402 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
bec39cab 2403 exit $exit_status
81ecdfbb 2404' 0
bec39cab 2405for ac_signal in 1 2 13 15; do
81ecdfbb 2406 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
bec39cab
AC
2407done
2408ac_signal=0
2409
2410# confdefs.h avoids OS command line length limits that DEFS can exceed.
81ecdfbb
RW
2411rm -f -r conftest* confdefs.h
2412
2413$as_echo "/* confdefs.h */" > confdefs.h
bec39cab
AC
2414
2415# Predefined preprocessor variables.
2416
2417cat >>confdefs.h <<_ACEOF
2418#define PACKAGE_NAME "$PACKAGE_NAME"
2419_ACEOF
2420
bec39cab
AC
2421cat >>confdefs.h <<_ACEOF
2422#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2423_ACEOF
2424
bec39cab
AC
2425cat >>confdefs.h <<_ACEOF
2426#define PACKAGE_VERSION "$PACKAGE_VERSION"
2427_ACEOF
2428
bec39cab
AC
2429cat >>confdefs.h <<_ACEOF
2430#define PACKAGE_STRING "$PACKAGE_STRING"
2431_ACEOF
2432
bec39cab
AC
2433cat >>confdefs.h <<_ACEOF
2434#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2435_ACEOF
2436
81ecdfbb
RW
2437cat >>confdefs.h <<_ACEOF
2438#define PACKAGE_URL "$PACKAGE_URL"
2439_ACEOF
2440
bec39cab
AC
2441
2442# Let the site file select an alternate cache file if it wants to.
81ecdfbb
RW
2443# Prefer an explicitly selected file to automatically selected ones.
2444ac_site_file1=NONE
2445ac_site_file2=NONE
2446if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2447 # We do not want a PATH search for config.site.
2448 case $CONFIG_SITE in #((
2449 -*) ac_site_file1=./$CONFIG_SITE;;
2450 */*) ac_site_file1=$CONFIG_SITE;;
2451 *) ac_site_file1=./$CONFIG_SITE;;
2452 esac
81ecdfbb
RW
2453elif test "x$prefix" != xNONE; then
2454 ac_site_file1=$prefix/share/config.site
2455 ac_site_file2=$prefix/etc/config.site
2456else
2457 ac_site_file1=$ac_default_prefix/share/config.site
2458 ac_site_file2=$ac_default_prefix/etc/config.site
d6e9fb05 2459fi
81ecdfbb
RW
2460for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2461do
2462 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2463 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2464 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2465$as_echo "$as_me: loading site script $ac_site_file" >&6;}
bec39cab 2466 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2467 . "$ac_site_file" \
2468 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2469$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2470as_fn_error $? "failed to load site script $ac_site_file
2471See \`config.log' for more details" "$LINENO" 5; }
d6e9fb05
JK
2472 fi
2473done
2474
2475if test -r "$cache_file"; then
d0ac1c44
SM
2476 # Some versions of bash will fail to source /dev/null (special files
2477 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2478 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2479 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2480$as_echo "$as_me: loading cache $cache_file" >&6;}
bec39cab 2481 case $cache_file in
81ecdfbb
RW
2482 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2483 *) . "./$cache_file";;
bec39cab
AC
2484 esac
2485 fi
d6e9fb05 2486else
81ecdfbb
RW
2487 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2488$as_echo "$as_me: creating cache $cache_file" >&6;}
bec39cab 2489 >$cache_file
d6e9fb05
JK
2490fi
2491
bec39cab
AC
2492# Check that the precious variables saved in the cache have kept the same
2493# value.
2494ac_cache_corrupted=false
81ecdfbb 2495for ac_var in $ac_precious_vars; do
bec39cab
AC
2496 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2497 eval ac_new_set=\$ac_env_${ac_var}_set
81ecdfbb
RW
2498 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2499 eval ac_new_val=\$ac_env_${ac_var}_value
bec39cab
AC
2500 case $ac_old_set,$ac_new_set in
2501 set,)
81ecdfbb
RW
2502 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2503$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
bec39cab
AC
2504 ac_cache_corrupted=: ;;
2505 ,set)
81ecdfbb
RW
2506 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2507$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
bec39cab
AC
2508 ac_cache_corrupted=: ;;
2509 ,);;
2510 *)
2511 if test "x$ac_old_val" != "x$ac_new_val"; then
81ecdfbb
RW
2512 # differences in whitespace do not lead to failure.
2513 ac_old_val_w=`echo x $ac_old_val`
2514 ac_new_val_w=`echo x $ac_new_val`
2515 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2516 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2517$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2518 ac_cache_corrupted=:
2519 else
2520 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2521$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2522 eval $ac_var=\$ac_old_val
2523 fi
2524 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2525$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2526 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2527$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
bec39cab
AC
2528 fi;;
2529 esac
2530 # Pass precious variables to config.status.
2531 if test "$ac_new_set" = set; then
2532 case $ac_new_val in
81ecdfbb 2533 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
2534 *) ac_arg=$ac_var=$ac_new_val ;;
2535 esac
2536 case " $ac_configure_args " in
2537 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
81ecdfbb 2538 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
bec39cab 2539 esac
d6e9fb05 2540 fi
bec39cab
AC
2541done
2542if $ac_cache_corrupted; then
81ecdfbb
RW
2543 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2544$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2545 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2546$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2547 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
d6e9fb05 2548fi
81ecdfbb
RW
2549## -------------------- ##
2550## Main body of script. ##
2551## -------------------- ##
d6e9fb05 2552
dae5f5cf
DJ
2553ac_ext=c
2554ac_cpp='$CPP $CPPFLAGS'
2555ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2556ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2557ac_compiler_gnu=$ac_cv_c_compiler_gnu
2558
d6e9fb05 2559
84563040 2560
bec39cab
AC
2561
2562
81ecdfbb 2563ac_config_headers="$ac_config_headers config.h:config.in"
bec39cab
AC
2564
2565
e28b3332 2566
c9a1864a
YQ
2567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2568$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2569 # Check whether --enable-maintainer-mode was given.
2570if test "${enable_maintainer_mode+set}" = set; then :
2571 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2572else
2573 USE_MAINTAINER_MODE=no
2574fi
2575
2576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2577$as_echo "$USE_MAINTAINER_MODE" >&6; }
2578 if test $USE_MAINTAINER_MODE = yes; then
2579 MAINTAINER_MODE_TRUE=
2580 MAINTAINER_MODE_FALSE='#'
2581else
2582 MAINTAINER_MODE_TRUE='#'
2583 MAINTAINER_MODE_FALSE=
2584fi
2585
2586 MAINT=$MAINTAINER_MODE_TRUE
2587
2588
2589
bec39cab
AC
2590ac_ext=c
2591ac_cpp='$CPP $CPPFLAGS'
2592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2594ac_compiler_gnu=$ac_cv_c_compiler_gnu
2595if test -n "$ac_tool_prefix"; then
2596 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2597set dummy ${ac_tool_prefix}gcc; ac_word=$2
81ecdfbb
RW
2598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2599$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2600if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2601 $as_echo_n "(cached) " >&6
84563040
DJ
2602else
2603 if test -n "$CC"; then
2604 ac_cv_prog_CC="$CC" # Let the user override the test.
2605else
bec39cab
AC
2606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2607for as_dir in $PATH
2608do
2609 IFS=$as_save_IFS
2610 test -z "$as_dir" && as_dir=.
81ecdfbb 2611 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2613 ac_cv_prog_CC="${ac_tool_prefix}gcc"
81ecdfbb 2614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2615 break 2
2616 fi
2617done
81ecdfbb
RW
2618 done
2619IFS=$as_save_IFS
bec39cab 2620
84563040
DJ
2621fi
2622fi
bec39cab 2623CC=$ac_cv_prog_CC
84563040 2624if test -n "$CC"; then
81ecdfbb
RW
2625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2626$as_echo "$CC" >&6; }
84563040 2627else
81ecdfbb
RW
2628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2629$as_echo "no" >&6; }
84563040
DJ
2630fi
2631
81ecdfbb 2632
bec39cab
AC
2633fi
2634if test -z "$ac_cv_prog_CC"; then
2635 ac_ct_CC=$CC
2636 # Extract the first word of "gcc", so it can be a program name with args.
2637set dummy gcc; ac_word=$2
81ecdfbb
RW
2638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2639$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2640if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2641 $as_echo_n "(cached) " >&6
84563040 2642else
bec39cab
AC
2643 if test -n "$ac_ct_CC"; then
2644 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
84563040 2645else
bec39cab
AC
2646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2647for as_dir in $PATH
2648do
2649 IFS=$as_save_IFS
2650 test -z "$as_dir" && as_dir=.
81ecdfbb 2651 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2653 ac_cv_prog_ac_ct_CC="gcc"
81ecdfbb 2654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2655 break 2
2656 fi
2657done
81ecdfbb
RW
2658 done
2659IFS=$as_save_IFS
bec39cab
AC
2660
2661fi
2662fi
2663ac_ct_CC=$ac_cv_prog_ac_ct_CC
2664if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2666$as_echo "$ac_ct_CC" >&6; }
bec39cab 2667else
81ecdfbb
RW
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2669$as_echo "no" >&6; }
bec39cab
AC
2670fi
2671
81ecdfbb
RW
2672 if test "x$ac_ct_CC" = x; then
2673 CC=""
2674 else
2675 case $cross_compiling:$ac_tool_warned in
2676yes:)
2677{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2678$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2679ac_tool_warned=yes ;;
2680esac
2681 CC=$ac_ct_CC
2682 fi
bec39cab
AC
2683else
2684 CC="$ac_cv_prog_CC"
2685fi
2686
2687if test -z "$CC"; then
81ecdfbb
RW
2688 if test -n "$ac_tool_prefix"; then
2689 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
bec39cab 2690set dummy ${ac_tool_prefix}cc; ac_word=$2
81ecdfbb
RW
2691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2692$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2693if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2694 $as_echo_n "(cached) " >&6
bec39cab
AC
2695else
2696 if test -n "$CC"; then
2697 ac_cv_prog_CC="$CC" # Let the user override the test.
2698else
2699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2700for as_dir in $PATH
2701do
2702 IFS=$as_save_IFS
2703 test -z "$as_dir" && as_dir=.
81ecdfbb 2704 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2706 ac_cv_prog_CC="${ac_tool_prefix}cc"
81ecdfbb 2707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2708 break 2
2709 fi
2710done
81ecdfbb
RW
2711 done
2712IFS=$as_save_IFS
bec39cab
AC
2713
2714fi
2715fi
2716CC=$ac_cv_prog_CC
2717if test -n "$CC"; then
81ecdfbb
RW
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2719$as_echo "$CC" >&6; }
bec39cab 2720else
81ecdfbb
RW
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2722$as_echo "no" >&6; }
bec39cab
AC
2723fi
2724
81ecdfbb
RW
2725
2726 fi
dae5f5cf 2727fi
81ecdfbb 2728if test -z "$CC"; then
dae5f5cf
DJ
2729 # Extract the first word of "cc", so it can be a program name with args.
2730set dummy cc; ac_word=$2
81ecdfbb
RW
2731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2732$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2733if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2734 $as_echo_n "(cached) " >&6
dae5f5cf 2735else
81ecdfbb
RW
2736 if test -n "$CC"; then
2737 ac_cv_prog_CC="$CC" # Let the user override the test.
dae5f5cf 2738else
81ecdfbb 2739 ac_prog_rejected=no
dae5f5cf
DJ
2740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2741for as_dir in $PATH
2742do
2743 IFS=$as_save_IFS
2744 test -z "$as_dir" && as_dir=.
81ecdfbb 2745 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2747 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2748 ac_prog_rejected=yes
2749 continue
2750 fi
2751 ac_cv_prog_CC="cc"
2752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
dae5f5cf 2753 break 2
b80864fb 2754 fi
dae5f5cf 2755done
81ecdfbb
RW
2756 done
2757IFS=$as_save_IFS
bec39cab 2758
84563040
DJ
2759if test $ac_prog_rejected = yes; then
2760 # We found a bogon in the path, so make sure we never use it.
2761 set dummy $ac_cv_prog_CC
2762 shift
bec39cab 2763 if test $# != 0; then
84563040
DJ
2764 # We chose a different compiler from the bogus one.
2765 # However, it has the same basename, so the bogon will be chosen
2766 # first if we set CC to just the basename; use the full file name.
2767 shift
bec39cab 2768 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
84563040
DJ
2769 fi
2770fi
2771fi
2772fi
bec39cab 2773CC=$ac_cv_prog_CC
84563040 2774if test -n "$CC"; then
81ecdfbb
RW
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2776$as_echo "$CC" >&6; }
84563040 2777else
81ecdfbb
RW
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2779$as_echo "no" >&6; }
84563040
DJ
2780fi
2781
81ecdfbb 2782
bec39cab
AC
2783fi
2784if test -z "$CC"; then
2785 if test -n "$ac_tool_prefix"; then
81ecdfbb 2786 for ac_prog in cl.exe
bec39cab
AC
2787 do
2788 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2789set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2791$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2792if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2793 $as_echo_n "(cached) " >&6
84563040
DJ
2794else
2795 if test -n "$CC"; then
2796 ac_cv_prog_CC="$CC" # Let the user override the test.
2797else
bec39cab
AC
2798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2799for as_dir in $PATH
2800do
2801 IFS=$as_save_IFS
2802 test -z "$as_dir" && as_dir=.
81ecdfbb 2803 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2805 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2807 break 2
2808 fi
2809done
81ecdfbb
RW
2810 done
2811IFS=$as_save_IFS
bec39cab 2812
84563040
DJ
2813fi
2814fi
bec39cab 2815CC=$ac_cv_prog_CC
84563040 2816if test -n "$CC"; then
81ecdfbb
RW
2817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2818$as_echo "$CC" >&6; }
84563040 2819else
81ecdfbb
RW
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2821$as_echo "no" >&6; }
84563040 2822fi
bec39cab 2823
81ecdfbb 2824
bec39cab
AC
2825 test -n "$CC" && break
2826 done
2827fi
2828if test -z "$CC"; then
2829 ac_ct_CC=$CC
81ecdfbb 2830 for ac_prog in cl.exe
bec39cab
AC
2831do
2832 # Extract the first word of "$ac_prog", so it can be a program name with args.
2833set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2835$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2836if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2837 $as_echo_n "(cached) " >&6
bec39cab
AC
2838else
2839 if test -n "$ac_ct_CC"; then
2840 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2841else
2842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2843for as_dir in $PATH
2844do
2845 IFS=$as_save_IFS
2846 test -z "$as_dir" && as_dir=.
81ecdfbb 2847 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2849 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2850 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2851 break 2
84563040 2852 fi
bec39cab 2853done
81ecdfbb
RW
2854 done
2855IFS=$as_save_IFS
bec39cab
AC
2856
2857fi
2858fi
2859ac_ct_CC=$ac_cv_prog_ac_ct_CC
2860if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2862$as_echo "$ac_ct_CC" >&6; }
bec39cab 2863else
81ecdfbb
RW
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2865$as_echo "no" >&6; }
84563040
DJ
2866fi
2867
81ecdfbb 2868
bec39cab
AC
2869 test -n "$ac_ct_CC" && break
2870done
84563040 2871
81ecdfbb
RW
2872 if test "x$ac_ct_CC" = x; then
2873 CC=""
2874 else
2875 case $cross_compiling:$ac_tool_warned in
2876yes:)
2877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2879ac_tool_warned=yes ;;
2880esac
2881 CC=$ac_ct_CC
2882 fi
bec39cab
AC
2883fi
2884
2885fi
2886
2887
81ecdfbb
RW
2888test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
2890as_fn_error $? "no acceptable C compiler found in \$PATH
2891See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
2892
2893# Provide some information about the compiler.
81ecdfbb
RW
2894$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2895set X $ac_compile
2896ac_compiler=$2
2897for ac_option in --version -v -V -qversion; do
2898 { { ac_try="$ac_compiler $ac_option >&5"
2899case "(($ac_try" in
2900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2901 *) ac_try_echo=$ac_try;;
2902esac
2903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2904$as_echo "$ac_try_echo"; } >&5
2905 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 2906 ac_status=$?
81ecdfbb
RW
2907 if test -s conftest.err; then
2908 sed '10a\
2909... rest of stderr output deleted ...
2910 10q' conftest.err >conftest.er1
2911 cat conftest.er1 >&5
81ecdfbb 2912 fi
d0ac1c44 2913 rm -f conftest.er1 conftest.err
81ecdfbb
RW
2914 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2915 test $ac_status = 0; }
2916done
bec39cab 2917
81ecdfbb 2918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
2919/* end confdefs.h. */
2920
2921int
2922main ()
2923{
2924
2925 ;
2926 return 0;
2927}
2928_ACEOF
2929ac_clean_files_save=$ac_clean_files
d0ac1c44 2930ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
2931# Try to create an executable without -o first, disregard a.out.
2932# It will help us diagnose broken compilers, and finding out an intuition
2933# of exeext.
d0ac1c44
SM
2934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2935$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
2936ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2937
2938# The possible output files:
2939ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2940
2941ac_rmfiles=
2942for ac_file in $ac_files
2943do
2944 case $ac_file in
2945 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2946 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2947 esac
2948done
2949rm -f $ac_rmfiles
2950
2951if { { ac_try="$ac_link_default"
2952case "(($ac_try" in
2953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2954 *) ac_try_echo=$ac_try;;
2955esac
2956eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2957$as_echo "$ac_try_echo"; } >&5
2958 (eval "$ac_link_default") 2>&5
bec39cab 2959 ac_status=$?
81ecdfbb
RW
2960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2961 test $ac_status = 0; }; then :
2962 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2963# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2964# in a Makefile. We should not override ac_cv_exeext if it was cached,
2965# so that the user can short-circuit this test for compilers unknown to
2966# Autoconf.
2967for ac_file in $ac_files ''
bec39cab
AC
2968do
2969 test -f "$ac_file" || continue
2970 case $ac_file in
81ecdfbb 2971 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
bec39cab
AC
2972 ;;
2973 [ab].out )
2974 # We found the default executable, but exeext='' is most
2975 # certainly right.
2976 break;;
2977 *.* )
81ecdfbb
RW
2978 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2979 then :; else
2980 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2981 fi
2982 # We set ac_cv_exeext here because the later test for it is not
2983 # safe: cross compilers may not add the suffix if given an `-o'
2984 # argument, so we may need to know it at that point already.
2985 # Even if this section looks crufty: it has the advantage of
2986 # actually working.
bec39cab
AC
2987 break;;
2988 * )
2989 break;;
2990 esac
2991done
81ecdfbb
RW
2992test "$ac_cv_exeext" = no && ac_cv_exeext=
2993
bec39cab 2994else
81ecdfbb
RW
2995 ac_file=''
2996fi
81ecdfbb 2997if test -z "$ac_file"; then :
d0ac1c44
SM
2998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2999$as_echo "no" >&6; }
3000$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3001sed 's/^/| /' conftest.$ac_ext >&5
3002
81ecdfbb
RW
3003{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3005as_fn_error 77 "C compiler cannot create executables
3006See \`config.log' for more details" "$LINENO" 5; }
3007else
3008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3009$as_echo "yes" >&6; }
bec39cab 3010fi
d0ac1c44
SM
3011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3012$as_echo_n "checking for C compiler default output file name... " >&6; }
3013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3014$as_echo "$ac_file" >&6; }
bec39cab 3015ac_exeext=$ac_cv_exeext
bec39cab 3016
d0ac1c44 3017rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
bec39cab 3018ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3020$as_echo_n "checking for suffix of executables... " >&6; }
3021if { { ac_try="$ac_link"
3022case "(($ac_try" in
3023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3024 *) ac_try_echo=$ac_try;;
3025esac
3026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3027$as_echo "$ac_try_echo"; } >&5
3028 (eval "$ac_link") 2>&5
bec39cab 3029 ac_status=$?
81ecdfbb
RW
3030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3031 test $ac_status = 0; }; then :
bec39cab
AC
3032 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3033# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3034# work properly (i.e., refer to `conftest.exe'), while it won't with
3035# `rm'.
3036for ac_file in conftest.exe conftest conftest.*; do
3037 test -f "$ac_file" || continue
3038 case $ac_file in
81ecdfbb 3039 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
bec39cab 3040 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
bec39cab
AC
3041 break;;
3042 * ) break;;
3043 esac
3044done
84563040 3045else
81ecdfbb
RW
3046 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3047$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3048as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3049See \`config.log' for more details" "$LINENO" 5; }
84563040 3050fi
d0ac1c44 3051rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3053$as_echo "$ac_cv_exeext" >&6; }
bec39cab
AC
3054
3055rm -f conftest.$ac_ext
3056EXEEXT=$ac_cv_exeext
3057ac_exeext=$EXEEXT
d0ac1c44
SM
3058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3059/* end confdefs.h. */
3060#include <stdio.h>
3061int
3062main ()
3063{
3064FILE *f = fopen ("conftest.out", "w");
3065 return ferror (f) || fclose (f) != 0;
3066
3067 ;
3068 return 0;
3069}
3070_ACEOF
3071ac_clean_files="$ac_clean_files conftest.out"
3072# Check that the compiler produces executables we can run. If not, either
3073# the compiler is broken, or we cross compile.
3074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3075$as_echo_n "checking whether we are cross compiling... " >&6; }
3076if test "$cross_compiling" != yes; then
3077 { { ac_try="$ac_link"
3078case "(($ac_try" in
3079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3080 *) ac_try_echo=$ac_try;;
3081esac
3082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3083$as_echo "$ac_try_echo"; } >&5
3084 (eval "$ac_link") 2>&5
3085 ac_status=$?
3086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3087 test $ac_status = 0; }
3088 if { ac_try='./conftest$ac_cv_exeext'
3089 { { case "(($ac_try" in
3090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3091 *) ac_try_echo=$ac_try;;
3092esac
3093eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3094$as_echo "$ac_try_echo"; } >&5
3095 (eval "$ac_try") 2>&5
3096 ac_status=$?
3097 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3098 test $ac_status = 0; }; }; then
3099 cross_compiling=no
3100 else
3101 if test "$cross_compiling" = maybe; then
3102 cross_compiling=yes
3103 else
3104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3106as_fn_error $? "cannot run C compiled programs.
3107If you meant to cross compile, use \`--host'.
3108See \`config.log' for more details" "$LINENO" 5; }
3109 fi
3110 fi
3111fi
3112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3113$as_echo "$cross_compiling" >&6; }
3114
3115rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3116ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3118$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3119if ${ac_cv_objext+:} false; then :
81ecdfbb 3120 $as_echo_n "(cached) " >&6
bec39cab 3121else
81ecdfbb 3122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3123/* end confdefs.h. */
3124
3125int
3126main ()
3127{
3128
3129 ;
3130 return 0;
3131}
3132_ACEOF
3133rm -f conftest.o conftest.obj
81ecdfbb
RW
3134if { { ac_try="$ac_compile"
3135case "(($ac_try" in
3136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3137 *) ac_try_echo=$ac_try;;
3138esac
3139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3140$as_echo "$ac_try_echo"; } >&5
3141 (eval "$ac_compile") 2>&5
bec39cab 3142 ac_status=$?
81ecdfbb
RW
3143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3144 test $ac_status = 0; }; then :
3145 for ac_file in conftest.o conftest.obj conftest.*; do
3146 test -f "$ac_file" || continue;
bec39cab 3147 case $ac_file in
81ecdfbb 3148 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3149 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3150 break;;
3151 esac
3152done
3153else
81ecdfbb 3154 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3155sed 's/^/| /' conftest.$ac_ext >&5
3156
81ecdfbb
RW
3157{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3159as_fn_error $? "cannot compute suffix of object files: cannot compile
3160See \`config.log' for more details" "$LINENO" 5; }
84563040 3161fi
bec39cab
AC
3162rm -f conftest.$ac_cv_objext conftest.$ac_ext
3163fi
81ecdfbb
RW
3164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3165$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3166OBJEXT=$ac_cv_objext
3167ac_objext=$OBJEXT
81ecdfbb
RW
3168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3169$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3170if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3171 $as_echo_n "(cached) " >&6
bec39cab 3172else
81ecdfbb 3173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3174/* end confdefs.h. */
3175
3176int
3177main ()
3178{
3179#ifndef __GNUC__
3180 choke me
3181#endif
84563040 3182
bec39cab
AC
3183 ;
3184 return 0;
3185}
3186_ACEOF
81ecdfbb 3187if ac_fn_c_try_compile "$LINENO"; then :
bec39cab 3188 ac_compiler_gnu=yes
84563040 3189else
81ecdfbb 3190 ac_compiler_gnu=no
84563040 3191fi
81ecdfbb 3192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 3193ac_cv_c_compiler_gnu=$ac_compiler_gnu
84563040 3194
bec39cab 3195fi
81ecdfbb
RW
3196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3197$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3198if test $ac_compiler_gnu = yes; then
3199 GCC=yes
3200else
3201 GCC=
3202fi
bec39cab
AC
3203ac_test_CFLAGS=${CFLAGS+set}
3204ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3206$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3207if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb
RW
3208 $as_echo_n "(cached) " >&6
3209else
3210 ac_save_c_werror_flag=$ac_c_werror_flag
3211 ac_c_werror_flag=yes
3212 ac_cv_prog_cc_g=no
3213 CFLAGS="-g"
3214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3215/* end confdefs.h. */
3216
3217int
3218main ()
3219{
3220
3221 ;
3222 return 0;
3223}
3224_ACEOF
81ecdfbb 3225if ac_fn_c_try_compile "$LINENO"; then :
84563040
DJ
3226 ac_cv_prog_cc_g=yes
3227else
81ecdfbb
RW
3228 CFLAGS=""
3229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3230/* end confdefs.h. */
3231
3232int
3233main ()
3234{
3235
3236 ;
3237 return 0;
3238}
3239_ACEOF
3240if ac_fn_c_try_compile "$LINENO"; then :
3241
3242else
3243 ac_c_werror_flag=$ac_save_c_werror_flag
3244 CFLAGS="-g"
3245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3246/* end confdefs.h. */
3247
3248int
3249main ()
3250{
84563040 3251
81ecdfbb
RW
3252 ;
3253 return 0;
3254}
3255_ACEOF
3256if ac_fn_c_try_compile "$LINENO"; then :
3257 ac_cv_prog_cc_g=yes
3258fi
3259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84563040 3260fi
81ecdfbb 3261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 3262fi
81ecdfbb
RW
3263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3264 ac_c_werror_flag=$ac_save_c_werror_flag
3265fi
3266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3267$as_echo "$ac_cv_prog_cc_g" >&6; }
84563040 3268if test "$ac_test_CFLAGS" = set; then
bec39cab 3269 CFLAGS=$ac_save_CFLAGS
84563040
DJ
3270elif test $ac_cv_prog_cc_g = yes; then
3271 if test "$GCC" = yes; then
3272 CFLAGS="-g -O2"
3273 else
3274 CFLAGS="-g"
3275 fi
3276else
3277 if test "$GCC" = yes; then
3278 CFLAGS="-O2"
3279 else
3280 CFLAGS=
3281 fi
3282fi
81ecdfbb
RW
3283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3284$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3285if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3286 $as_echo_n "(cached) " >&6
bec39cab 3287else
81ecdfbb 3288 ac_cv_prog_cc_c89=no
bec39cab 3289ac_save_CC=$CC
81ecdfbb 3290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3291/* end confdefs.h. */
3292#include <stdarg.h>
3293#include <stdio.h>
d0ac1c44 3294struct stat;
bec39cab
AC
3295/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3296struct buf { int x; };
3297FILE * (*rcsopen) (struct buf *, struct stat *, int);
3298static char *e (p, i)
3299 char **p;
3300 int i;
3301{
3302 return p[i];
3303}
3304static char *f (char * (*g) (char **, int), char **p, ...)
3305{
3306 char *s;
3307 va_list v;
3308 va_start (v,p);
3309 s = g (p, va_arg (v,int));
3310 va_end (v);
3311 return s;
3312}
3313
3314/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3315 function prototypes and stuff, but not '\xHH' hex character constants.
3316 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3317 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3318 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3319 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3320 that's true only with -std. */
bec39cab
AC
3321int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3322
81ecdfbb
RW
3323/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3324 inside strings and character constants. */
3325#define FOO(x) 'x'
3326int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3327
bec39cab
AC
3328int test (int i, double x);
3329struct s1 {int (*f) (int a);};
3330struct s2 {int (*f) (double a);};
3331int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3332int argc;
3333char **argv;
3334int
3335main ()
3336{
3337return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3338 ;
3339 return 0;
3340}
3341_ACEOF
81ecdfbb
RW
3342for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3343 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3344do
3345 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3346 if ac_fn_c_try_compile "$LINENO"; then :
3347 ac_cv_prog_cc_c89=$ac_arg
bec39cab 3348fi
81ecdfbb
RW
3349rm -f core conftest.err conftest.$ac_objext
3350 test "x$ac_cv_prog_cc_c89" != "xno" && break
bec39cab 3351done
81ecdfbb 3352rm -f conftest.$ac_ext
bec39cab
AC
3353CC=$ac_save_CC
3354
3355fi
81ecdfbb
RW
3356# AC_CACHE_VAL
3357case "x$ac_cv_prog_cc_c89" in
3358 x)
3359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3360$as_echo "none needed" >&6; } ;;
3361 xno)
3362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3363$as_echo "unsupported" >&6; } ;;
bec39cab 3364 *)
81ecdfbb
RW
3365 CC="$CC $ac_cv_prog_cc_c89"
3366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3367$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
bec39cab 3368esac
81ecdfbb 3369if test "x$ac_cv_prog_cc_c89" != xno; then :
bec39cab 3370
dae5f5cf
DJ
3371fi
3372
dae5f5cf 3373ac_ext=c
bec39cab
AC
3374ac_cpp='$CPP $CPPFLAGS'
3375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3377ac_compiler_gnu=$ac_cv_c_compiler_gnu
84563040 3378
3bc3d82a
PA
3379ac_ext=cpp
3380ac_cpp='$CXXCPP $CPPFLAGS'
3381ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3382ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3383ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3384if test -z "$CXX"; then
3385 if test -n "$CCC"; then
3386 CXX=$CCC
3387 else
3388 if test -n "$ac_tool_prefix"; then
3389 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3390 do
3391 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3392set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3394$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3395if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3396 $as_echo_n "(cached) " >&6
3397else
3398 if test -n "$CXX"; then
3399 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3400else
3401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3402for as_dir in $PATH
3403do
3404 IFS=$as_save_IFS
3405 test -z "$as_dir" && as_dir=.
3406 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3407 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3408 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3409 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3410 break 2
3411 fi
3412done
3413 done
3414IFS=$as_save_IFS
3415
3416fi
3417fi
3418CXX=$ac_cv_prog_CXX
3419if test -n "$CXX"; then
3420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3421$as_echo "$CXX" >&6; }
3422else
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3424$as_echo "no" >&6; }
3425fi
3426
3427
3428 test -n "$CXX" && break
3429 done
3430fi
3431if test -z "$CXX"; then
3432 ac_ct_CXX=$CXX
3433 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3434do
3435 # Extract the first word of "$ac_prog", so it can be a program name with args.
3436set dummy $ac_prog; ac_word=$2
3437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3438$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3439if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3440 $as_echo_n "(cached) " >&6
3441else
3442 if test -n "$ac_ct_CXX"; then
3443 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3444else
3445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3446for as_dir in $PATH
3447do
3448 IFS=$as_save_IFS
3449 test -z "$as_dir" && as_dir=.
3450 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3452 ac_cv_prog_ac_ct_CXX="$ac_prog"
3453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3454 break 2
3455 fi
3456done
3457 done
3458IFS=$as_save_IFS
3459
3460fi
3461fi
3462ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3463if test -n "$ac_ct_CXX"; then
3464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3465$as_echo "$ac_ct_CXX" >&6; }
3466else
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3468$as_echo "no" >&6; }
3469fi
3470
3471
3472 test -n "$ac_ct_CXX" && break
3473done
3474
3475 if test "x$ac_ct_CXX" = x; then
3476 CXX="g++"
3477 else
3478 case $cross_compiling:$ac_tool_warned in
3479yes:)
3480{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3481$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3482ac_tool_warned=yes ;;
3483esac
3484 CXX=$ac_ct_CXX
3485 fi
3486fi
3487
3488 fi
3489fi
3490# Provide some information about the compiler.
3491$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3492set X $ac_compile
3493ac_compiler=$2
3494for ac_option in --version -v -V -qversion; do
3495 { { ac_try="$ac_compiler $ac_option >&5"
3496case "(($ac_try" in
3497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3498 *) ac_try_echo=$ac_try;;
3499esac
3500eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3501$as_echo "$ac_try_echo"; } >&5
3502 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3503 ac_status=$?
3504 if test -s conftest.err; then
3505 sed '10a\
3506... rest of stderr output deleted ...
3507 10q' conftest.err >conftest.er1
3508 cat conftest.er1 >&5
3bc3d82a 3509 fi
d0ac1c44 3510 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3511 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3512 test $ac_status = 0; }
3513done
3514
3515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3516$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3517if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3518 $as_echo_n "(cached) " >&6
3519else
3520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3521/* end confdefs.h. */
3522
3523int
3524main ()
3525{
3526#ifndef __GNUC__
3527 choke me
3528#endif
3529
3530 ;
3531 return 0;
3532}
3533_ACEOF
3534if ac_fn_cxx_try_compile "$LINENO"; then :
3535 ac_compiler_gnu=yes
3536else
3537 ac_compiler_gnu=no
3538fi
3539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3540ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3541
3542fi
3543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3544$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3545if test $ac_compiler_gnu = yes; then
3546 GXX=yes
3547else
3548 GXX=
3549fi
3550ac_test_CXXFLAGS=${CXXFLAGS+set}
3551ac_save_CXXFLAGS=$CXXFLAGS
3552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3553$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3554if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3555 $as_echo_n "(cached) " >&6
3556else
3557 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3558 ac_cxx_werror_flag=yes
3559 ac_cv_prog_cxx_g=no
3560 CXXFLAGS="-g"
3561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3562/* end confdefs.h. */
3563
3564int
3565main ()
3566{
3567
3568 ;
3569 return 0;
3570}
3571_ACEOF
3572if ac_fn_cxx_try_compile "$LINENO"; then :
3573 ac_cv_prog_cxx_g=yes
3574else
3575 CXXFLAGS=""
3576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3577/* end confdefs.h. */
3578
3579int
3580main ()
3581{
3582
3583 ;
3584 return 0;
3585}
3586_ACEOF
3587if ac_fn_cxx_try_compile "$LINENO"; then :
3588
3589else
3590 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3591 CXXFLAGS="-g"
3592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3593/* end confdefs.h. */
3594
3595int
3596main ()
3597{
3598
3599 ;
3600 return 0;
3601}
3602_ACEOF
3603if ac_fn_cxx_try_compile "$LINENO"; then :
3604 ac_cv_prog_cxx_g=yes
3605fi
3606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3607fi
3608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3609fi
3610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3611 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3612fi
3613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3614$as_echo "$ac_cv_prog_cxx_g" >&6; }
3615if test "$ac_test_CXXFLAGS" = set; then
3616 CXXFLAGS=$ac_save_CXXFLAGS
3617elif test $ac_cv_prog_cxx_g = yes; then
3618 if test "$GXX" = yes; then
3619 CXXFLAGS="-g -O2"
3620 else
3621 CXXFLAGS="-g"
3622 fi
3623else
3624 if test "$GXX" = yes; then
3625 CXXFLAGS="-O2"
3626 else
3627 CXXFLAGS=
3628 fi
3629fi
3630ac_ext=c
3631ac_cpp='$CPP $CPPFLAGS'
3632ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3633ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3634ac_compiler_gnu=$ac_cv_c_compiler_gnu
3635
c9a1864a
YQ
3636
3637ac_ext=c
3638ac_cpp='$CPP $CPPFLAGS'
3639ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3640ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3641ac_compiler_gnu=$ac_cv_c_compiler_gnu
3642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3643$as_echo_n "checking how to run the C preprocessor... " >&6; }
3644# On Suns, sometimes $CPP names a directory.
3645if test -n "$CPP" && test -d "$CPP"; then
3646 CPP=
3647fi
3648if test -z "$CPP"; then
d0ac1c44 3649 if ${ac_cv_prog_CPP+:} false; then :
c9a1864a
YQ
3650 $as_echo_n "(cached) " >&6
3651else
3652 # Double quotes because CPP needs to be expanded
3653 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3654 do
3655 ac_preproc_ok=false
3656for ac_c_preproc_warn_flag in '' yes
3657do
3658 # Use a header file that comes with gcc, so configuring glibc
3659 # with a fresh cross-compiler works.
3660 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3661 # <limits.h> exists even on freestanding compilers.
3662 # On the NeXT, cc -E runs the code through the compiler's parser,
3663 # not just through cpp. "Syntax error" is here to catch this case.
3664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3665/* end confdefs.h. */
3666#ifdef __STDC__
3667# include <limits.h>
3668#else
3669# include <assert.h>
3670#endif
3671 Syntax error
3672_ACEOF
3673if ac_fn_c_try_cpp "$LINENO"; then :
3674
3675else
3676 # Broken: fails on valid input.
3677continue
3678fi
d0ac1c44 3679rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3680
3681 # OK, works on sane cases. Now check whether nonexistent headers
3682 # can be detected and how.
3683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3684/* end confdefs.h. */
3685#include <ac_nonexistent.h>
3686_ACEOF
3687if ac_fn_c_try_cpp "$LINENO"; then :
3688 # Broken: success on invalid input.
3689continue
3690else
3691 # Passes both tests.
3692ac_preproc_ok=:
3693break
3694fi
d0ac1c44 3695rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3696
3697done
3698# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3699rm -f conftest.i conftest.err conftest.$ac_ext
c9a1864a
YQ
3700if $ac_preproc_ok; then :
3701 break
3702fi
3703
3704 done
3705 ac_cv_prog_CPP=$CPP
3706
3707fi
3708 CPP=$ac_cv_prog_CPP
3709else
3710 ac_cv_prog_CPP=$CPP
3711fi
3712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3713$as_echo "$CPP" >&6; }
3714ac_preproc_ok=false
3715for ac_c_preproc_warn_flag in '' yes
3716do
3717 # Use a header file that comes with gcc, so configuring glibc
3718 # with a fresh cross-compiler works.
3719 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3720 # <limits.h> exists even on freestanding compilers.
3721 # On the NeXT, cc -E runs the code through the compiler's parser,
3722 # not just through cpp. "Syntax error" is here to catch this case.
3723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3724/* end confdefs.h. */
3725#ifdef __STDC__
3726# include <limits.h>
3727#else
3728# include <assert.h>
3729#endif
3730 Syntax error
3731_ACEOF
3732if ac_fn_c_try_cpp "$LINENO"; then :
3733
3734else
3735 # Broken: fails on valid input.
3736continue
3737fi
d0ac1c44 3738rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3739
3740 # OK, works on sane cases. Now check whether nonexistent headers
3741 # can be detected and how.
81ecdfbb 3742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3743/* end confdefs.h. */
3744#include <ac_nonexistent.h>
3745_ACEOF
81ecdfbb 3746if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3747 # Broken: success on invalid input.
3748continue
3749else
bec39cab
AC
3750 # Passes both tests.
3751ac_preproc_ok=:
3752break
3753fi
d0ac1c44 3754rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab
AC
3755
3756done
3757# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3758rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
3759if $ac_preproc_ok; then :
3760
3761else
3762 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3764as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3765See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3766fi
3767
81ecdfbb
RW
3768ac_ext=c
3769ac_cpp='$CPP $CPPFLAGS'
3770ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3771ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3772ac_compiler_gnu=$ac_cv_c_compiler_gnu
bec39cab 3773
81ecdfbb
RW
3774
3775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3776$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 3777if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 3778 $as_echo_n "(cached) " >&6
bec39cab 3779else
81ecdfbb
RW
3780 if test -z "$GREP"; then
3781 ac_path_GREP_found=false
3782 # Loop through the user's path and test for each of PROGNAME-LIST
3783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3784for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
bec39cab 3785do
81ecdfbb
RW
3786 IFS=$as_save_IFS
3787 test -z "$as_dir" && as_dir=.
3788 for ac_prog in grep ggrep; do
3789 for ac_exec_ext in '' $ac_executable_extensions; do
3790 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 3791 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
3792# Check for GNU ac_path_GREP and select it if it is found.
3793 # Check for GNU $ac_path_GREP
3794case `"$ac_path_GREP" --version 2>&1` in
3795*GNU*)
3796 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3797*)
3798 ac_count=0
3799 $as_echo_n 0123456789 >"conftest.in"
3800 while :
3801 do
3802 cat "conftest.in" "conftest.in" >"conftest.tmp"
3803 mv "conftest.tmp" "conftest.in"
3804 cp "conftest.in" "conftest.nl"
3805 $as_echo 'GREP' >> "conftest.nl"
3806 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3807 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3808 as_fn_arith $ac_count + 1 && ac_count=$as_val
3809 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3810 # Best one so far, save it but keep looking for a better one
3811 ac_cv_path_GREP="$ac_path_GREP"
3812 ac_path_GREP_max=$ac_count
3813 fi
3814 # 10*(2^10) chars as input seems more than enough
3815 test $ac_count -gt 10 && break
3816 done
3817 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3818esac
3819
3820 $ac_path_GREP_found && break 3
3821 done
3822 done
3823 done
3824IFS=$as_save_IFS
3825 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 3826 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
bec39cab
AC
3827 fi
3828else
81ecdfbb 3829 ac_cv_path_GREP=$GREP
bec39cab 3830fi
bec39cab 3831
84563040 3832fi
81ecdfbb
RW
3833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3834$as_echo "$ac_cv_path_GREP" >&6; }
3835 GREP="$ac_cv_path_GREP"
bec39cab 3836
bec39cab 3837
81ecdfbb
RW
3838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3839$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 3840if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb
RW
3841 $as_echo_n "(cached) " >&6
3842else
3843 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3844 then ac_cv_path_EGREP="$GREP -E"
3845 else
3846 if test -z "$EGREP"; then
3847 ac_path_EGREP_found=false
3848 # Loop through the user's path and test for each of PROGNAME-LIST
3849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3850for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3851do
3852 IFS=$as_save_IFS
3853 test -z "$as_dir" && as_dir=.
3854 for ac_prog in egrep; do
3855 for ac_exec_ext in '' $ac_executable_extensions; do
3856 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 3857 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
3858# Check for GNU ac_path_EGREP and select it if it is found.
3859 # Check for GNU $ac_path_EGREP
3860case `"$ac_path_EGREP" --version 2>&1` in
3861*GNU*)
3862 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3863*)
3864 ac_count=0
3865 $as_echo_n 0123456789 >"conftest.in"
3866 while :
3867 do
3868 cat "conftest.in" "conftest.in" >"conftest.tmp"
3869 mv "conftest.tmp" "conftest.in"
3870 cp "conftest.in" "conftest.nl"
3871 $as_echo 'EGREP' >> "conftest.nl"
3872 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3873 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3874 as_fn_arith $ac_count + 1 && ac_count=$as_val
3875 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3876 # Best one so far, save it but keep looking for a better one
3877 ac_cv_path_EGREP="$ac_path_EGREP"
3878 ac_path_EGREP_max=$ac_count
3879 fi
3880 # 10*(2^10) chars as input seems more than enough
3881 test $ac_count -gt 10 && break
3882 done
3883 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3884esac
bec39cab 3885
81ecdfbb
RW
3886 $ac_path_EGREP_found && break 3
3887 done
3888 done
3889 done
3890IFS=$as_save_IFS
3891 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 3892 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 3893 fi
bec39cab 3894else
81ecdfbb 3895 ac_cv_path_EGREP=$EGREP
84563040 3896fi
bec39cab 3897
81ecdfbb 3898 fi
b80864fb 3899fi
81ecdfbb
RW
3900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3901$as_echo "$ac_cv_path_EGREP" >&6; }
3902 EGREP="$ac_cv_path_EGREP"
b80864fb
DJ
3903
3904
c971b7fa
PA
3905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3906$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 3907if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
3908 $as_echo_n "(cached) " >&6
3909else
3910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3911/* end confdefs.h. */
3912#include <stdlib.h>
3913#include <stdarg.h>
3914#include <string.h>
3915#include <float.h>
bec39cab 3916
c971b7fa
PA
3917int
3918main ()
3919{
bec39cab 3920
c971b7fa
PA
3921 ;
3922 return 0;
3923}
3924_ACEOF
3925if ac_fn_c_try_compile "$LINENO"; then :
3926 ac_cv_header_stdc=yes
84563040 3927else
c971b7fa
PA
3928 ac_cv_header_stdc=no
3929fi
3930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84563040 3931
c971b7fa
PA
3932if test $ac_cv_header_stdc = yes; then
3933 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3935/* end confdefs.h. */
c971b7fa 3936#include <string.h>
bec39cab
AC
3937
3938_ACEOF
84563040 3939if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
c971b7fa
PA
3940 $EGREP "memchr" >/dev/null 2>&1; then :
3941
84563040 3942else
c971b7fa 3943 ac_cv_header_stdc=no
84563040
DJ
3944fi
3945rm -f conftest*
3946
770d76d7 3947fi
81ecdfbb 3948
c971b7fa
PA
3949if test $ac_cv_header_stdc = yes; then
3950 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3952/* end confdefs.h. */
3953#include <stdlib.h>
3954
3955_ACEOF
3956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3957 $EGREP "free" >/dev/null 2>&1; then :
3958
770d76d7 3959else
c971b7fa 3960 ac_cv_header_stdc=no
bec39cab 3961fi
c971b7fa 3962rm -f conftest*
bec39cab
AC
3963
3964fi
c971b7fa
PA
3965
3966if test $ac_cv_header_stdc = yes; then
3967 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3968 if test "$cross_compiling" = yes; then :
3969 :
770d76d7 3970else
c971b7fa
PA
3971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3972/* end confdefs.h. */
3973#include <ctype.h>
3974#include <stdlib.h>
3975#if ((' ' & 0x0FF) == 0x020)
3976# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3977# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3978#else
3979# define ISLOWER(c) \
3980 (('a' <= (c) && (c) <= 'i') \
3981 || ('j' <= (c) && (c) <= 'r') \
3982 || ('s' <= (c) && (c) <= 'z'))
3983# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3984#endif
3985
3986#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3987int
3988main ()
3989{
3990 int i;
3991 for (i = 0; i < 256; i++)
3992 if (XOR (islower (i), ISLOWER (i))
3993 || toupper (i) != TOUPPER (i))
3994 return 2;
3995 return 0;
3996}
3997_ACEOF
3998if ac_fn_c_try_run "$LINENO"; then :
3999
770d76d7 4000else
c971b7fa
PA
4001 ac_cv_header_stdc=no
4002fi
4003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4004 conftest.$ac_objext conftest.beam conftest.$ac_ext
4005fi
bec39cab 4006
770d76d7
PA
4007fi
4008fi
c971b7fa
PA
4009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4010$as_echo "$ac_cv_header_stdc" >&6; }
4011if test $ac_cv_header_stdc = yes; then
4012
4013$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4014
770d76d7 4015fi
bec39cab 4016
c971b7fa
PA
4017# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4018for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4019 inttypes.h stdint.h unistd.h
4020do :
4021 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4022ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4023"
d0ac1c44 4024if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c971b7fa
PA
4025 cat >>confdefs.h <<_ACEOF
4026#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4027_ACEOF
4028
81ecdfbb 4029fi
bec39cab 4030
c971b7fa 4031done
bec39cab
AC
4032
4033
4034
c971b7fa 4035 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4036if test "x$ac_cv_header_minix_config_h" = xyes; then :
c971b7fa 4037 MINIX=yes
770d76d7 4038else
c971b7fa 4039 MINIX=
770d76d7 4040fi
bec39cab
AC
4041
4042
c971b7fa
PA
4043 if test "$MINIX" = yes; then
4044
4045$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4046
4047
4048$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4049
4050
4051$as_echo "#define _MINIX 1" >>confdefs.h
4052
770d76d7 4053 fi
bec39cab 4054
c971b7fa
PA
4055
4056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4057$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4058if ${ac_cv_safe_to_define___extensions__+:} false; then :
c971b7fa 4059 $as_echo_n "(cached) " >&6
770d76d7 4060else
c971b7fa
PA
4061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4062/* end confdefs.h. */
bec39cab 4063
d0ac1c44
SM
4064# define __EXTENSIONS__ 1
4065 $ac_includes_default
c971b7fa
PA
4066int
4067main ()
4068{
4069
4070 ;
4071 return 0;
4072}
4073_ACEOF
4074if ac_fn_c_try_compile "$LINENO"; then :
4075 ac_cv_safe_to_define___extensions__=yes
770d76d7 4076else
c971b7fa
PA
4077 ac_cv_safe_to_define___extensions__=no
4078fi
4079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
770d76d7 4080fi
c971b7fa
PA
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4082$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4083 test $ac_cv_safe_to_define___extensions__ = yes &&
4084 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4085
4086 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4087
4088 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4089
4090 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4091
4092 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4093
bec39cab 4094
c9a1864a 4095
589bc927
TT
4096# Check whether --enable-largefile was given.
4097if test "${enable_largefile+set}" = set; then :
4098 enableval=$enable_largefile;
4099fi
4100
4101if test "$enable_largefile" != no; then
4102
4103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4104$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4105if ${ac_cv_sys_largefile_CC+:} false; then :
589bc927
TT
4106 $as_echo_n "(cached) " >&6
4107else
4108 ac_cv_sys_largefile_CC=no
4109 if test "$GCC" != yes; then
4110 ac_save_CC=$CC
4111 while :; do
4112 # IRIX 6.2 and later do not support large files by default,
4113 # so use the C compiler's -n32 option if that helps.
4114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4115/* end confdefs.h. */
4116#include <sys/types.h>
4117 /* Check that off_t can represent 2**63 - 1 correctly.
4118 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4119 since some C++ compilers masquerading as C compilers
4120 incorrectly reject 9223372036854775807. */
4121#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4122 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4123 && LARGE_OFF_T % 2147483647 == 1)
4124 ? 1 : -1];
4125int
4126main ()
4127{
4128
4129 ;
4130 return 0;
4131}
4132_ACEOF
4133 if ac_fn_c_try_compile "$LINENO"; then :
4134 break
4135fi
4136rm -f core conftest.err conftest.$ac_objext
4137 CC="$CC -n32"
4138 if ac_fn_c_try_compile "$LINENO"; then :
4139 ac_cv_sys_largefile_CC=' -n32'; break
4140fi
4141rm -f core conftest.err conftest.$ac_objext
4142 break
4143 done
4144 CC=$ac_save_CC
4145 rm -f conftest.$ac_ext
4146 fi
4147fi
4148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4149$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4150 if test "$ac_cv_sys_largefile_CC" != no; then
4151 CC=$CC$ac_cv_sys_largefile_CC
4152 fi
4153
4154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4155$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4156if ${ac_cv_sys_file_offset_bits+:} false; then :
589bc927
TT
4157 $as_echo_n "(cached) " >&6
4158else
4159 while :; do
4160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4161/* end confdefs.h. */
4162#include <sys/types.h>
4163 /* Check that off_t can represent 2**63 - 1 correctly.
4164 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4165 since some C++ compilers masquerading as C compilers
4166 incorrectly reject 9223372036854775807. */
4167#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4168 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4169 && LARGE_OFF_T % 2147483647 == 1)
4170 ? 1 : -1];
4171int
4172main ()
4173{
4174
4175 ;
4176 return 0;
4177}
4178_ACEOF
4179if ac_fn_c_try_compile "$LINENO"; then :
4180 ac_cv_sys_file_offset_bits=no; break
4181fi
4182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4184/* end confdefs.h. */
4185#define _FILE_OFFSET_BITS 64
4186#include <sys/types.h>
4187 /* Check that off_t can represent 2**63 - 1 correctly.
4188 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4189 since some C++ compilers masquerading as C compilers
4190 incorrectly reject 9223372036854775807. */
4191#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4192 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4193 && LARGE_OFF_T % 2147483647 == 1)
4194 ? 1 : -1];
4195int
4196main ()
4197{
4198
4199 ;
4200 return 0;
4201}
4202_ACEOF
4203if ac_fn_c_try_compile "$LINENO"; then :
4204 ac_cv_sys_file_offset_bits=64; break
4205fi
4206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4207 ac_cv_sys_file_offset_bits=unknown
4208 break
4209done
4210fi
4211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4212$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4213case $ac_cv_sys_file_offset_bits in #(
4214 no | unknown) ;;
4215 *)
4216cat >>confdefs.h <<_ACEOF
4217#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4218_ACEOF
4219;;
4220esac
4221rm -rf conftest*
4222 if test $ac_cv_sys_file_offset_bits = unknown; then
4223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4224$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4225if ${ac_cv_sys_large_files+:} false; then :
589bc927
TT
4226 $as_echo_n "(cached) " >&6
4227else
4228 while :; do
4229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4230/* end confdefs.h. */
4231#include <sys/types.h>
4232 /* Check that off_t can represent 2**63 - 1 correctly.
4233 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4234 since some C++ compilers masquerading as C compilers
4235 incorrectly reject 9223372036854775807. */
4236#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4237 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4238 && LARGE_OFF_T % 2147483647 == 1)
4239 ? 1 : -1];
4240int
4241main ()
4242{
4243
4244 ;
4245 return 0;
4246}
4247_ACEOF
4248if ac_fn_c_try_compile "$LINENO"; then :
4249 ac_cv_sys_large_files=no; break
4250fi
4251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4253/* end confdefs.h. */
4254#define _LARGE_FILES 1
4255#include <sys/types.h>
4256 /* Check that off_t can represent 2**63 - 1 correctly.
4257 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4258 since some C++ compilers masquerading as C compilers
4259 incorrectly reject 9223372036854775807. */
4260#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4261 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4262 && LARGE_OFF_T % 2147483647 == 1)
4263 ? 1 : -1];
4264int
4265main ()
4266{
4267
4268 ;
4269 return 0;
4270}
4271_ACEOF
4272if ac_fn_c_try_compile "$LINENO"; then :
4273 ac_cv_sys_large_files=1; break
4274fi
4275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4276 ac_cv_sys_large_files=unknown
4277 break
4278done
4279fi
4280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4281$as_echo "$ac_cv_sys_large_files" >&6; }
4282case $ac_cv_sys_large_files in #(
4283 no | unknown) ;;
4284 *)
4285cat >>confdefs.h <<_ACEOF
4286#define _LARGE_FILES $ac_cv_sys_large_files
4287_ACEOF
4288;;
4289esac
4290rm -rf conftest*
4291 fi
d0ac1c44
SM
4292
4293
589bc927
TT
4294fi
4295
c9a1864a 4296
770d76d7
PA
4297ac_aux_dir=
4298for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4299 if test -f "$ac_dir/install-sh"; then
4300 ac_aux_dir=$ac_dir
4301 ac_install_sh="$ac_aux_dir/install-sh -c"
4302 break
4303 elif test -f "$ac_dir/install.sh"; then
4304 ac_aux_dir=$ac_dir
4305 ac_install_sh="$ac_aux_dir/install.sh -c"
4306 break
4307 elif test -f "$ac_dir/shtool"; then
4308 ac_aux_dir=$ac_dir
4309 ac_install_sh="$ac_aux_dir/shtool install -c"
4310 break
4311 fi
770d76d7
PA
4312done
4313if test -z "$ac_aux_dir"; then
d0ac1c44 4314 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
770d76d7
PA
4315fi
4316
4317# These three variables are undocumented and unsupported,
4318# and are intended to be withdrawn in a future Autoconf release.
4319# They can cause serious problems if a builder's source tree is in a directory
4320# whose full name contains unusual characters.
4321ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4322ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4323ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
c9a1864a 4324
bec39cab 4325
770d76d7
PA
4326# Make sure we can run config.sub.
4327$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4328 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7
PA
4329
4330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4331$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4332if ${ac_cv_build+:} false; then :
81ecdfbb
RW
4333 $as_echo_n "(cached) " >&6
4334else
770d76d7
PA
4335 ac_build_alias=$build_alias
4336test "x$ac_build_alias" = x &&
4337 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4338test "x$ac_build_alias" = x &&
d0ac1c44 4339 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
770d76d7 4340ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4341 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
770d76d7
PA
4342
4343fi
4344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4345$as_echo "$ac_cv_build" >&6; }
4346case $ac_cv_build in
4347*-*-*) ;;
d0ac1c44 4348*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7
PA
4349esac
4350build=$ac_cv_build
4351ac_save_IFS=$IFS; IFS='-'
4352set x $ac_cv_build
4353shift
4354build_cpu=$1
4355build_vendor=$2
4356shift; shift
4357# Remember, the first character of IFS is used to create $*,
4358# except with old shells:
4359build_os=$*
4360IFS=$ac_save_IFS
4361case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4362
4363
4364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4365$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4366if ${ac_cv_host+:} false; then :
770d76d7
PA
4367 $as_echo_n "(cached) " >&6
4368else
4369 if test "x$host_alias" = x; then
4370 ac_cv_host=$ac_cv_build
4371else
4372 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4373 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
770d76d7
PA
4374fi
4375
4376fi
4377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4378$as_echo "$ac_cv_host" >&6; }
4379case $ac_cv_host in
4380*-*-*) ;;
d0ac1c44 4381*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
770d76d7
PA
4382esac
4383host=$ac_cv_host
4384ac_save_IFS=$IFS; IFS='-'
4385set x $ac_cv_host
4386shift
4387host_cpu=$1
4388host_vendor=$2
4389shift; shift
4390# Remember, the first character of IFS is used to create $*,
4391# except with old shells:
4392host_os=$*
4393IFS=$ac_save_IFS
4394case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4395
4396
c971b7fa
PA
4397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4398$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4399if ${ac_cv_target+:} false; then :
770d76d7
PA
4400 $as_echo_n "(cached) " >&6
4401else
c971b7fa
PA
4402 if test "x$target_alias" = x; then
4403 ac_cv_target=$ac_cv_host
770d76d7 4404else
c971b7fa 4405 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4406 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
770d76d7 4407fi
770d76d7
PA
4408
4409fi
c971b7fa
PA
4410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4411$as_echo "$ac_cv_target" >&6; }
4412case $ac_cv_target in
4413*-*-*) ;;
d0ac1c44 4414*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
c971b7fa
PA
4415esac
4416target=$ac_cv_target
4417ac_save_IFS=$IFS; IFS='-'
4418set x $ac_cv_target
4419shift
4420target_cpu=$1
4421target_vendor=$2
4422shift; shift
4423# Remember, the first character of IFS is used to create $*,
4424# except with old shells:
4425target_os=$*
4426IFS=$ac_save_IFS
4427case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
770d76d7 4428
770d76d7 4429
c971b7fa
PA
4430# The aliases save the names the user supplied, while $host etc.
4431# will get canonicalized.
4432test -n "$target_alias" &&
4433 test "$program_prefix$program_suffix$program_transform_name" = \
4434 NONENONEs,x,x, &&
4435 program_prefix=${target_alias}-
770d76d7 4436
770d76d7 4437
c971b7fa
PA
4438# Find a good install program. We prefer a C program (faster),
4439# so one script is as good as another. But avoid the broken or
4440# incompatible versions:
4441# SysV /etc/install, /usr/sbin/install
4442# SunOS /usr/etc/install
4443# IRIX /sbin/install
4444# AIX /bin/install
4445# AmigaOS /C/install, which installs bootblocks on floppy discs
4446# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4447# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4448# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4449# OS/2's system install, which has a completely different semantic
4450# ./install, which can be erroneously created by make from ./install.sh.
4451# Reject install programs that cannot install multiple files.
4452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4453$as_echo_n "checking for a BSD-compatible install... " >&6; }
4454if test -z "$INSTALL"; then
d0ac1c44 4455if ${ac_cv_path_install+:} false; then :
c971b7fa 4456 $as_echo_n "(cached) " >&6
81ecdfbb
RW
4457else
4458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4459for as_dir in $PATH
fd462a61 4460do
81ecdfbb
RW
4461 IFS=$as_save_IFS
4462 test -z "$as_dir" && as_dir=.
4463 # Account for people who put trailing slashes in PATH elements.
4464case $as_dir/ in #((
4465 ./ | .// | /[cC]/* | \
4466 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4467 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4468 /usr/ucb/* ) ;;
4469 *)
4470 # OSF1 and SCO ODT 3.0 have their own names for install.
4471 # Don't use installbsd from OSF since it installs stuff as root
4472 # by default.
4473 for ac_prog in ginstall scoinst install; do
4474 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4475 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
81ecdfbb
RW
4476 if test $ac_prog = install &&
4477 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4478 # AIX install. It has an incompatible calling convention.
4479 :
4480 elif test $ac_prog = install &&
4481 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4482 # program-specific install script used by HP pwplus--don't use.
4483 :
4484 else
4485 rm -rf conftest.one conftest.two conftest.dir
4486 echo one > conftest.one
4487 echo two > conftest.two
4488 mkdir conftest.dir
4489 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4490 test -s conftest.one && test -s conftest.two &&
4491 test -s conftest.dir/conftest.one &&
4492 test -s conftest.dir/conftest.two
4493 then
4494 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4495 break 3
4496 fi
4497 fi
4498 fi
4499 done
4500 done
4501 ;;
4502esac
fd462a61 4503
81ecdfbb
RW
4504 done
4505IFS=$as_save_IFS
fd462a61 4506
81ecdfbb 4507rm -rf conftest.one conftest.two conftest.dir
fd462a61 4508
fd462a61 4509fi
81ecdfbb
RW
4510 if test "${ac_cv_path_install+set}" = set; then
4511 INSTALL=$ac_cv_path_install
4512 else
4513 # As a last resort, use the slow shell script. Don't cache a
4514 # value for INSTALL within a source directory, because that will
4515 # break other packages using the cache if that directory is
4516 # removed, or if the value is a relative name.
4517 INSTALL=$ac_install_sh
4518 fi
fd462a61 4519fi
81ecdfbb
RW
4520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4521$as_echo "$INSTALL" >&6; }
fd462a61 4522
81ecdfbb
RW
4523# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4524# It thinks the first close brace ends the variable substitution.
4525test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
fd462a61 4526
81ecdfbb 4527test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
fd462a61 4528
81ecdfbb 4529test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
e28b3332 4530
e1d2394b
MS
4531if test -n "$ac_tool_prefix"; then
4532 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4533set dummy ${ac_tool_prefix}ar; ac_word=$2
4534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4535$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4536if ${ac_cv_prog_AR+:} false; then :
e1d2394b
MS
4537 $as_echo_n "(cached) " >&6
4538else
4539 if test -n "$AR"; then
4540 ac_cv_prog_AR="$AR" # Let the user override the test.
4541else
4542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4543for as_dir in $PATH
4544do
4545 IFS=$as_save_IFS
4546 test -z "$as_dir" && as_dir=.
4547 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4548 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e1d2394b
MS
4549 ac_cv_prog_AR="${ac_tool_prefix}ar"
4550 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4551 break 2
4552 fi
4553done
4554 done
4555IFS=$as_save_IFS
4556
4557fi
4558fi
4559AR=$ac_cv_prog_AR
4560if test -n "$AR"; then
4561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4562$as_echo "$AR" >&6; }
4563else
4564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4565$as_echo "no" >&6; }
4566fi
4567
4568
4569fi
4570if test -z "$ac_cv_prog_AR"; then
4571 ac_ct_AR=$AR
4572 # Extract the first word of "ar", so it can be a program name with args.
4573set dummy ar; ac_word=$2
4574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4575$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4576if ${ac_cv_prog_ac_ct_AR+:} false; then :
e1d2394b
MS
4577 $as_echo_n "(cached) " >&6
4578else
4579 if test -n "$ac_ct_AR"; then
4580 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4581else
4582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4583for as_dir in $PATH
4584do
4585 IFS=$as_save_IFS
4586 test -z "$as_dir" && as_dir=.
4587 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e1d2394b
MS
4589 ac_cv_prog_ac_ct_AR="ar"
4590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4591 break 2
4592 fi
4593done
4594 done
4595IFS=$as_save_IFS
4596
4597fi
4598fi
4599ac_ct_AR=$ac_cv_prog_ac_ct_AR
4600if test -n "$ac_ct_AR"; then
4601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4602$as_echo "$ac_ct_AR" >&6; }
4603else
4604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4605$as_echo "no" >&6; }
4606fi
4607
4608 if test "x$ac_ct_AR" = x; then
4609 AR=""
4610 else
4611 case $cross_compiling:$ac_tool_warned in
4612yes:)
4613{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4614$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4615ac_tool_warned=yes ;;
4616esac
4617 AR=$ac_ct_AR
4618 fi
4619else
4620 AR="$ac_cv_prog_AR"
4621fi
4622
c971b7fa
PA
4623if test -n "$ac_tool_prefix"; then
4624 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4625set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4627$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4628if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb
RW
4629 $as_echo_n "(cached) " >&6
4630else
c971b7fa
PA
4631 if test -n "$RANLIB"; then
4632 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
e28b3332 4633else
c971b7fa
PA
4634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635for as_dir in $PATH
4636do
4637 IFS=$as_save_IFS
4638 test -z "$as_dir" && as_dir=.
4639 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
4641 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643 break 2
4644 fi
4645done
4646 done
4647IFS=$as_save_IFS
4648
4649fi
4650fi
4651RANLIB=$ac_cv_prog_RANLIB
4652if test -n "$RANLIB"; then
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4654$as_echo "$RANLIB" >&6; }
4655else
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
4658fi
4659
4660
4661fi
4662if test -z "$ac_cv_prog_RANLIB"; then
4663 ac_ct_RANLIB=$RANLIB
4664 # Extract the first word of "ranlib", so it can be a program name with args.
4665set dummy ranlib; ac_word=$2
4666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4667$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4668if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
4669 $as_echo_n "(cached) " >&6
4670else
4671 if test -n "$ac_ct_RANLIB"; then
4672 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4673else
4674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4675for as_dir in $PATH
4676do
4677 IFS=$as_save_IFS
4678 test -z "$as_dir" && as_dir=.
4679 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
4681 ac_cv_prog_ac_ct_RANLIB="ranlib"
4682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4683 break 2
4684 fi
4685done
4686 done
4687IFS=$as_save_IFS
4688
4689fi
4690fi
4691ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4692if test -n "$ac_ct_RANLIB"; then
4693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4694$as_echo "$ac_ct_RANLIB" >&6; }
4695else
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4697$as_echo "no" >&6; }
4698fi
4699
4700 if test "x$ac_ct_RANLIB" = x; then
4701 RANLIB=":"
4702 else
4703 case $cross_compiling:$ac_tool_warned in
4704yes:)
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4706$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4707ac_tool_warned=yes ;;
4708esac
4709 RANLIB=$ac_ct_RANLIB
4710 fi
4711else
4712 RANLIB="$ac_cv_prog_RANLIB"
4713fi
4714
4715
4716test "$program_prefix" != NONE &&
4717 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4718# Use a double $ so make ignores it.
4719test "$program_suffix" != NONE &&
4720 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4721# Double any \ or $.
4722# By default was `s,x,x', remove it if useless.
4723ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4724program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4725
4726
0bcda685
PA
4727# We require a C++11 compiler. Check if one is available, and if
4728# necessary, set CXX_DIALECT to some -std=xxx switch.
4729
458412c3 4730 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
4731 ac_ext=cpp
4732ac_cpp='$CXXCPP $CPPFLAGS'
4733ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4734ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4735ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4736 CXX_DIALECT=""
4737 ac_success=no
4738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
4739$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 4740if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
4741 $as_echo_n "(cached) " >&6
4742else
4743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4744/* end confdefs.h. */
4745
4746
4747// If the compiler admits that it is not ready for C++11, why torture it?
4748// Hopefully, this will speed up the test.
4749
4750#ifndef __cplusplus
4751
4752#error "This is not a C++ compiler"
4753
4754#elif __cplusplus < 201103L
4755
4756#error "This is not a C++11 compiler"
4757
4758#else
4759
4760namespace cxx11
4761{
4762
4763 namespace test_static_assert
4764 {
4765
4766 template <typename T>
4767 struct check
4768 {
4769 static_assert(sizeof(int) <= sizeof(T), "not big enough");
4770 };
4771
4772 }
4773
4774 namespace test_final_override
4775 {
4776
4777 struct Base
4778 {
4779 virtual void f() {}
4780 };
4781
4782 struct Derived : public Base
4783 {
4784 virtual void f() override {}
4785 };
4786
4787 }
4788
4789 namespace test_double_right_angle_brackets
4790 {
4791
4792 template < typename T >
4793 struct check {};
4794
4795 typedef check<void> single_type;
4796 typedef check<check<void>> double_type;
4797 typedef check<check<check<void>>> triple_type;
4798 typedef check<check<check<check<void>>>> quadruple_type;
4799
4800 }
4801
4802 namespace test_decltype
4803 {
4804
4805 int
4806 f()
4807 {
4808 int a = 1;
4809 decltype(a) b = 2;
4810 return a + b;
4811 }
4812
4813 }
4814
4815 namespace test_type_deduction
4816 {
4817
4818 template < typename T1, typename T2 >
4819 struct is_same
4820 {
4821 static const bool value = false;
4822 };
4823
4824 template < typename T >
4825 struct is_same<T, T>
4826 {
4827 static const bool value = true;
4828 };
4829
4830 template < typename T1, typename T2 >
4831 auto
4832 add(T1 a1, T2 a2) -> decltype(a1 + a2)
4833 {
4834 return a1 + a2;
4835 }
4836
4837 int
4838 test(const int c, volatile int v)
4839 {
4840 static_assert(is_same<int, decltype(0)>::value == true, "");
4841 static_assert(is_same<int, decltype(c)>::value == false, "");
4842 static_assert(is_same<int, decltype(v)>::value == false, "");
4843 auto ac = c;
4844 auto av = v;
4845 auto sumi = ac + av + 'x';
4846 auto sumf = ac + av + 1.0;
4847 static_assert(is_same<int, decltype(ac)>::value == true, "");
4848 static_assert(is_same<int, decltype(av)>::value == true, "");
4849 static_assert(is_same<int, decltype(sumi)>::value == true, "");
4850 static_assert(is_same<int, decltype(sumf)>::value == false, "");
4851 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
4852 return (sumf > 0.0) ? sumi : add(c, v);
4853 }
4854
4855 }
4856
4857 namespace test_noexcept
4858 {
4859
4860 int f() { return 0; }
4861 int g() noexcept { return 0; }
4862
4863 static_assert(noexcept(f()) == false, "");
4864 static_assert(noexcept(g()) == true, "");
4865
4866 }
4867
4868 namespace test_constexpr
4869 {
4870
4871 template < typename CharT >
4872 unsigned long constexpr
4873 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
4874 {
4875 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
4876 }
4877
4878 template < typename CharT >
4879 unsigned long constexpr
4880 strlen_c(const CharT *const s) noexcept
4881 {
4882 return strlen_c_r(s, 0UL);
4883 }
4884
4885 static_assert(strlen_c("") == 0UL, "");
4886 static_assert(strlen_c("1") == 1UL, "");
4887 static_assert(strlen_c("example") == 7UL, "");
4888 static_assert(strlen_c("another\0example") == 7UL, "");
4889
4890 }
4891
4892 namespace test_rvalue_references
4893 {
4894
4895 template < int N >
4896 struct answer
4897 {
4898 static constexpr int value = N;
4899 };
4900
4901 answer<1> f(int&) { return answer<1>(); }
4902 answer<2> f(const int&) { return answer<2>(); }
4903 answer<3> f(int&&) { return answer<3>(); }
4904
4905 void
4906 test()
4907 {
4908 int i = 0;
4909 const int c = 0;
4910 static_assert(decltype(f(i))::value == 1, "");
4911 static_assert(decltype(f(c))::value == 2, "");
4912 static_assert(decltype(f(0))::value == 3, "");
4913 }
4914
4915 }
4916
4917 namespace test_uniform_initialization
4918 {
4919
4920 struct test
4921 {
4922 static const int zero {};
4923 static const int one {1};
4924 };
4925
4926 static_assert(test::zero == 0, "");
4927 static_assert(test::one == 1, "");
4928
4929 }
4930
4931 namespace test_lambdas
4932 {
4933
4934 void
4935 test1()
4936 {
4937 auto lambda1 = [](){};
4938 auto lambda2 = lambda1;
4939 lambda1();
4940 lambda2();
4941 }
4942
4943 int
4944 test2()
4945 {
4946 auto a = [](int i, int j){ return i + j; }(1, 2);
4947 auto b = []() -> int { return '0'; }();
4948 auto c = [=](){ return a + b; }();
4949 auto d = [&](){ return c; }();
4950 auto e = [a, &b](int x) mutable {
4951 const auto identity = [](int y){ return y; };
4952 for (auto i = 0; i < a; ++i)
4953 a += b--;
4954 return x + identity(a + b);
4955 }(0);
4956 return a + b + c + d + e;
4957 }
4958
4959 int
4960 test3()
4961 {
4962 const auto nullary = [](){ return 0; };
4963 const auto unary = [](int x){ return x; };
4964 using nullary_t = decltype(nullary);
4965 using unary_t = decltype(unary);
4966 const auto higher1st = [](nullary_t f){ return f(); };
4967 const auto higher2nd = [unary](nullary_t f1){
4968 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
4969 };
4970 return higher1st(nullary) + higher2nd(nullary)(unary);
4971 }
4972
4973 }
4974
4975 namespace test_variadic_templates
4976 {
4977
4978 template <int...>
4979 struct sum;
4980
4981 template <int N0, int... N1toN>
4982 struct sum<N0, N1toN...>
4983 {
4984 static constexpr auto value = N0 + sum<N1toN...>::value;
4985 };
4986
4987 template <>
4988 struct sum<>
4989 {
4990 static constexpr auto value = 0;
4991 };
4992
4993 static_assert(sum<>::value == 0, "");
4994 static_assert(sum<1>::value == 1, "");
4995 static_assert(sum<23>::value == 23, "");
4996 static_assert(sum<1, 2>::value == 3, "");
4997 static_assert(sum<5, 5, 11>::value == 21, "");
4998 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
4999
5000 }
5001
5002 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5003 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5004 // because of this.
5005 namespace test_template_alias_sfinae
5006 {
5007
5008 struct foo {};
5009
5010 template<typename T>
5011 using member = typename T::member_type;
5012
5013 template<typename T>
5014 void func(...) {}
5015
5016 template<typename T>
5017 void func(member<T>*) {}
5018
5019 void test();
5020
5021 void test() { func<foo>(0); }
5022
5023 }
5024
5025} // namespace cxx11
5026
5027#endif // __cplusplus >= 201103L
5028
5029
5030
5031_ACEOF
5032if ac_fn_cxx_try_compile "$LINENO"; then :
5033 ax_cv_cxx_compile_cxx11=yes
5034else
5035 ax_cv_cxx_compile_cxx11=no
5036fi
5037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5038fi
5039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5040$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5041 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5042 ac_success=yes
5043 fi
5044
5045 if test x$ac_success = xno; then
458412c3
TT
5046 for alternative in ${ax_cxx_compile_alternatives}; do
5047 switch="-std=gnu++${alternative}"
0bcda685
PA
5048 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5050$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5051if eval \${$cachevar+:} false; then :
0bcda685
PA
5052 $as_echo_n "(cached) " >&6
5053else
5054 ac_save_CXX="$CXX"
5055 CXX="$CXX $switch"
5056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5057/* end confdefs.h. */
5058
5059
5060// If the compiler admits that it is not ready for C++11, why torture it?
5061// Hopefully, this will speed up the test.
5062
5063#ifndef __cplusplus
5064
5065#error "This is not a C++ compiler"
5066
5067#elif __cplusplus < 201103L
5068
5069#error "This is not a C++11 compiler"
5070
5071#else
5072
5073namespace cxx11
5074{
5075
5076 namespace test_static_assert
5077 {
5078
5079 template <typename T>
5080 struct check
5081 {
5082 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5083 };
5084
5085 }
5086
5087 namespace test_final_override
5088 {
5089
5090 struct Base
5091 {
5092 virtual void f() {}
5093 };
5094
5095 struct Derived : public Base
5096 {
5097 virtual void f() override {}
5098 };
5099
5100 }
5101
5102 namespace test_double_right_angle_brackets
5103 {
5104
5105 template < typename T >
5106 struct check {};
5107
5108 typedef check<void> single_type;
5109 typedef check<check<void>> double_type;
5110 typedef check<check<check<void>>> triple_type;
5111 typedef check<check<check<check<void>>>> quadruple_type;
5112
5113 }
5114
5115 namespace test_decltype
5116 {
5117
5118 int
5119 f()
5120 {
5121 int a = 1;
5122 decltype(a) b = 2;
5123 return a + b;
5124 }
5125
5126 }
5127
5128 namespace test_type_deduction
5129 {
5130
5131 template < typename T1, typename T2 >
5132 struct is_same
5133 {
5134 static const bool value = false;
5135 };
5136
5137 template < typename T >
5138 struct is_same<T, T>
5139 {
5140 static const bool value = true;
5141 };
5142
5143 template < typename T1, typename T2 >
5144 auto
5145 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5146 {
5147 return a1 + a2;
5148 }
5149
5150 int
5151 test(const int c, volatile int v)
5152 {
5153 static_assert(is_same<int, decltype(0)>::value == true, "");
5154 static_assert(is_same<int, decltype(c)>::value == false, "");
5155 static_assert(is_same<int, decltype(v)>::value == false, "");
5156 auto ac = c;
5157 auto av = v;
5158 auto sumi = ac + av + 'x';
5159 auto sumf = ac + av + 1.0;
5160 static_assert(is_same<int, decltype(ac)>::value == true, "");
5161 static_assert(is_same<int, decltype(av)>::value == true, "");
5162 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5163 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5164 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5165 return (sumf > 0.0) ? sumi : add(c, v);
5166 }
5167
5168 }
5169
5170 namespace test_noexcept
5171 {
5172
5173 int f() { return 0; }
5174 int g() noexcept { return 0; }
5175
5176 static_assert(noexcept(f()) == false, "");
5177 static_assert(noexcept(g()) == true, "");
5178
5179 }
5180
5181 namespace test_constexpr
5182 {
5183
5184 template < typename CharT >
5185 unsigned long constexpr
5186 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5187 {
5188 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5189 }
5190
5191 template < typename CharT >
5192 unsigned long constexpr
5193 strlen_c(const CharT *const s) noexcept
5194 {
5195 return strlen_c_r(s, 0UL);
5196 }
5197
5198 static_assert(strlen_c("") == 0UL, "");
5199 static_assert(strlen_c("1") == 1UL, "");
5200 static_assert(strlen_c("example") == 7UL, "");
5201 static_assert(strlen_c("another\0example") == 7UL, "");
5202
5203 }
5204
5205 namespace test_rvalue_references
5206 {
5207
5208 template < int N >
5209 struct answer
5210 {
5211 static constexpr int value = N;
5212 };
5213
5214 answer<1> f(int&) { return answer<1>(); }
5215 answer<2> f(const int&) { return answer<2>(); }
5216 answer<3> f(int&&) { return answer<3>(); }
5217
5218 void
5219 test()
5220 {
5221 int i = 0;
5222 const int c = 0;
5223 static_assert(decltype(f(i))::value == 1, "");
5224 static_assert(decltype(f(c))::value == 2, "");
5225 static_assert(decltype(f(0))::value == 3, "");
5226 }
5227
5228 }
5229
5230 namespace test_uniform_initialization
5231 {
5232
5233 struct test
5234 {
5235 static const int zero {};
5236 static const int one {1};
5237 };
5238
5239 static_assert(test::zero == 0, "");
5240 static_assert(test::one == 1, "");
5241
5242 }
5243
5244 namespace test_lambdas
5245 {
5246
5247 void
5248 test1()
5249 {
5250 auto lambda1 = [](){};
5251 auto lambda2 = lambda1;
5252 lambda1();
5253 lambda2();
5254 }
5255
5256 int
5257 test2()
5258 {
5259 auto a = [](int i, int j){ return i + j; }(1, 2);
5260 auto b = []() -> int { return '0'; }();
5261 auto c = [=](){ return a + b; }();
5262 auto d = [&](){ return c; }();
5263 auto e = [a, &b](int x) mutable {
5264 const auto identity = [](int y){ return y; };
5265 for (auto i = 0; i < a; ++i)
5266 a += b--;
5267 return x + identity(a + b);
5268 }(0);
5269 return a + b + c + d + e;
5270 }
5271
5272 int
5273 test3()
5274 {
5275 const auto nullary = [](){ return 0; };
5276 const auto unary = [](int x){ return x; };
5277 using nullary_t = decltype(nullary);
5278 using unary_t = decltype(unary);
5279 const auto higher1st = [](nullary_t f){ return f(); };
5280 const auto higher2nd = [unary](nullary_t f1){
5281 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5282 };
5283 return higher1st(nullary) + higher2nd(nullary)(unary);
5284 }
5285
5286 }
5287
5288 namespace test_variadic_templates
5289 {
5290
5291 template <int...>
5292 struct sum;
5293
5294 template <int N0, int... N1toN>
5295 struct sum<N0, N1toN...>
5296 {
5297 static constexpr auto value = N0 + sum<N1toN...>::value;
5298 };
5299
5300 template <>
5301 struct sum<>
5302 {
5303 static constexpr auto value = 0;
5304 };
5305
5306 static_assert(sum<>::value == 0, "");
5307 static_assert(sum<1>::value == 1, "");
5308 static_assert(sum<23>::value == 23, "");
5309 static_assert(sum<1, 2>::value == 3, "");
5310 static_assert(sum<5, 5, 11>::value == 21, "");
5311 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5312
5313 }
5314
5315 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5316 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5317 // because of this.
5318 namespace test_template_alias_sfinae
5319 {
5320
5321 struct foo {};
5322
5323 template<typename T>
5324 using member = typename T::member_type;
5325
5326 template<typename T>
5327 void func(...) {}
5328
5329 template<typename T>
5330 void func(member<T>*) {}
5331
5332 void test();
5333
5334 void test() { func<foo>(0); }
5335
5336 }
5337
5338} // namespace cxx11
5339
5340#endif // __cplusplus >= 201103L
5341
5342
5343
5344_ACEOF
5345if ac_fn_cxx_try_compile "$LINENO"; then :
5346 eval $cachevar=yes
5347else
5348 eval $cachevar=no
5349fi
5350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5351 CXX="$ac_save_CXX"
5352fi
5353eval ac_res=\$$cachevar
5354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5355$as_echo "$ac_res" >&6; }
5356 if eval test x\$$cachevar = xyes; then
5357 CXX_DIALECT="$switch"
5358 ac_success=yes
5359 break
5360 fi
5361 done
5362 fi
5363
5364 if test x$ac_success = xno; then
458412c3
TT
5365 for alternative in ${ax_cxx_compile_alternatives}; do
5366 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5367 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5369$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5370if eval \${$cachevar+:} false; then :
0bcda685
PA
5371 $as_echo_n "(cached) " >&6
5372else
5373 ac_save_CXX="$CXX"
458412c3
TT
5374 CXX="$CXX $switch"
5375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5376/* end confdefs.h. */
5377
5378
5379// If the compiler admits that it is not ready for C++11, why torture it?
5380// Hopefully, this will speed up the test.
5381
5382#ifndef __cplusplus
5383
5384#error "This is not a C++ compiler"
5385
5386#elif __cplusplus < 201103L
5387
5388#error "This is not a C++11 compiler"
5389
5390#else
5391
5392namespace cxx11
5393{
5394
5395 namespace test_static_assert
5396 {
5397
5398 template <typename T>
5399 struct check
5400 {
5401 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5402 };
5403
5404 }
5405
5406 namespace test_final_override
5407 {
5408
5409 struct Base
5410 {
5411 virtual void f() {}
5412 };
5413
5414 struct Derived : public Base
5415 {
5416 virtual void f() override {}
5417 };
5418
5419 }
5420
5421 namespace test_double_right_angle_brackets
5422 {
5423
5424 template < typename T >
5425 struct check {};
5426
5427 typedef check<void> single_type;
5428 typedef check<check<void>> double_type;
5429 typedef check<check<check<void>>> triple_type;
5430 typedef check<check<check<check<void>>>> quadruple_type;
5431
5432 }
5433
5434 namespace test_decltype
5435 {
5436
5437 int
5438 f()
5439 {
5440 int a = 1;
5441 decltype(a) b = 2;
5442 return a + b;
5443 }
5444
5445 }
5446
5447 namespace test_type_deduction
5448 {
5449
5450 template < typename T1, typename T2 >
5451 struct is_same
5452 {
5453 static const bool value = false;
5454 };
5455
5456 template < typename T >
5457 struct is_same<T, T>
5458 {
5459 static const bool value = true;
5460 };
5461
5462 template < typename T1, typename T2 >
5463 auto
5464 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5465 {
5466 return a1 + a2;
5467 }
5468
5469 int
5470 test(const int c, volatile int v)
5471 {
5472 static_assert(is_same<int, decltype(0)>::value == true, "");
5473 static_assert(is_same<int, decltype(c)>::value == false, "");
5474 static_assert(is_same<int, decltype(v)>::value == false, "");
5475 auto ac = c;
5476 auto av = v;
5477 auto sumi = ac + av + 'x';
5478 auto sumf = ac + av + 1.0;
5479 static_assert(is_same<int, decltype(ac)>::value == true, "");
5480 static_assert(is_same<int, decltype(av)>::value == true, "");
5481 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5482 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5483 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5484 return (sumf > 0.0) ? sumi : add(c, v);
5485 }
5486
5487 }
5488
5489 namespace test_noexcept
5490 {
5491
5492 int f() { return 0; }
5493 int g() noexcept { return 0; }
5494
5495 static_assert(noexcept(f()) == false, "");
5496 static_assert(noexcept(g()) == true, "");
5497
5498 }
5499
5500 namespace test_constexpr
5501 {
5502
5503 template < typename CharT >
5504 unsigned long constexpr
5505 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5506 {
5507 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5508 }
5509
5510 template < typename CharT >
5511 unsigned long constexpr
5512 strlen_c(const CharT *const s) noexcept
5513 {
5514 return strlen_c_r(s, 0UL);
5515 }
5516
5517 static_assert(strlen_c("") == 0UL, "");
5518 static_assert(strlen_c("1") == 1UL, "");
5519 static_assert(strlen_c("example") == 7UL, "");
5520 static_assert(strlen_c("another\0example") == 7UL, "");
5521
5522 }
5523
5524 namespace test_rvalue_references
5525 {
5526
5527 template < int N >
5528 struct answer
5529 {
5530 static constexpr int value = N;
5531 };
5532
5533 answer<1> f(int&) { return answer<1>(); }
5534 answer<2> f(const int&) { return answer<2>(); }
5535 answer<3> f(int&&) { return answer<3>(); }
5536
5537 void
5538 test()
5539 {
5540 int i = 0;
5541 const int c = 0;
5542 static_assert(decltype(f(i))::value == 1, "");
5543 static_assert(decltype(f(c))::value == 2, "");
5544 static_assert(decltype(f(0))::value == 3, "");
5545 }
5546
5547 }
5548
5549 namespace test_uniform_initialization
5550 {
5551
5552 struct test
5553 {
5554 static const int zero {};
5555 static const int one {1};
5556 };
5557
5558 static_assert(test::zero == 0, "");
5559 static_assert(test::one == 1, "");
5560
5561 }
5562
5563 namespace test_lambdas
5564 {
5565
5566 void
5567 test1()
5568 {
5569 auto lambda1 = [](){};
5570 auto lambda2 = lambda1;
5571 lambda1();
5572 lambda2();
5573 }
5574
5575 int
5576 test2()
5577 {
5578 auto a = [](int i, int j){ return i + j; }(1, 2);
5579 auto b = []() -> int { return '0'; }();
5580 auto c = [=](){ return a + b; }();
5581 auto d = [&](){ return c; }();
5582 auto e = [a, &b](int x) mutable {
5583 const auto identity = [](int y){ return y; };
5584 for (auto i = 0; i < a; ++i)
5585 a += b--;
5586 return x + identity(a + b);
5587 }(0);
5588 return a + b + c + d + e;
5589 }
5590
5591 int
5592 test3()
5593 {
5594 const auto nullary = [](){ return 0; };
5595 const auto unary = [](int x){ return x; };
5596 using nullary_t = decltype(nullary);
5597 using unary_t = decltype(unary);
5598 const auto higher1st = [](nullary_t f){ return f(); };
5599 const auto higher2nd = [unary](nullary_t f1){
5600 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5601 };
5602 return higher1st(nullary) + higher2nd(nullary)(unary);
5603 }
5604
5605 }
5606
5607 namespace test_variadic_templates
5608 {
5609
5610 template <int...>
5611 struct sum;
5612
5613 template <int N0, int... N1toN>
5614 struct sum<N0, N1toN...>
5615 {
5616 static constexpr auto value = N0 + sum<N1toN...>::value;
5617 };
5618
5619 template <>
5620 struct sum<>
5621 {
5622 static constexpr auto value = 0;
5623 };
5624
5625 static_assert(sum<>::value == 0, "");
5626 static_assert(sum<1>::value == 1, "");
5627 static_assert(sum<23>::value == 23, "");
5628 static_assert(sum<1, 2>::value == 3, "");
5629 static_assert(sum<5, 5, 11>::value == 21, "");
5630 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5631
5632 }
5633
5634 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5635 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5636 // because of this.
5637 namespace test_template_alias_sfinae
5638 {
5639
5640 struct foo {};
5641
5642 template<typename T>
5643 using member = typename T::member_type;
5644
5645 template<typename T>
5646 void func(...) {}
5647
5648 template<typename T>
5649 void func(member<T>*) {}
5650
5651 void test();
5652
5653 void test() { func<foo>(0); }
5654
5655 }
5656
5657} // namespace cxx11
5658
5659#endif // __cplusplus >= 201103L
5660
5661
5662
5663_ACEOF
5664if ac_fn_cxx_try_compile "$LINENO"; then :
5665 eval $cachevar=yes
5666else
5667 eval $cachevar=no
5668fi
5669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
458412c3 5670 CXX="$ac_save_CXX"
0bcda685
PA
5671fi
5672eval ac_res=\$$cachevar
5673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5674$as_echo "$ac_res" >&6; }
458412c3
TT
5675 if eval test x\$$cachevar = xyes; then
5676 CXX_DIALECT="$switch"
5677 ac_success=yes
5678 break
5679 fi
5680 done
5681 if test x$ac_success = xyes; then
0bcda685
PA
5682 break
5683 fi
5684 done
5685 fi
5686 ac_ext=c
5687ac_cpp='$CPP $CPPFLAGS'
5688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5690ac_compiler_gnu=$ac_cv_c_compiler_gnu
5691
5692 if test x$ax_cxx_compile_cxx11_required = xtrue; then
5693 if test x$ac_success = xno; then
d0ac1c44 5694 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
5695 fi
5696 fi
5697 if test x$ac_success = xno; then
5698 HAVE_CXX11=0
5699 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5700$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5701 else
5702 HAVE_CXX11=1
5703
5704$as_echo "#define HAVE_CXX11 1" >>confdefs.h
5705
5706 fi
5707
5708
5709
5710
c971b7fa
PA
5711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5712$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 5713if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
5714 $as_echo_n "(cached) " >&6
5715else
5716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5717/* end confdefs.h. */
5718#include <stdlib.h>
5719#include <stdarg.h>
5720#include <string.h>
5721#include <float.h>
5722
5723int
5724main ()
5725{
5726
5727 ;
5728 return 0;
5729}
5730_ACEOF
5731if ac_fn_c_try_compile "$LINENO"; then :
5732 ac_cv_header_stdc=yes
5733else
5734 ac_cv_header_stdc=no
5735fi
5736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5737
5738if test $ac_cv_header_stdc = yes; then
5739 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5741/* end confdefs.h. */
5742#include <string.h>
5743
5744_ACEOF
5745if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
5746 $EGREP "memchr" >/dev/null 2>&1; then :
5747
68070c10 5748else
81ecdfbb
RW
5749 ac_cv_header_stdc=no
5750fi
5751rm -f conftest*
68070c10
PA
5752
5753fi
68070c10 5754
81ecdfbb
RW
5755if test $ac_cv_header_stdc = yes; then
5756 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5758/* end confdefs.h. */
5759#include <stdlib.h>
68070c10 5760
68070c10 5761_ACEOF
81ecdfbb
RW
5762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5763 $EGREP "free" >/dev/null 2>&1; then :
68070c10
PA
5764
5765else
81ecdfbb 5766 ac_cv_header_stdc=no
68070c10 5767fi
81ecdfbb
RW
5768rm -f conftest*
5769
68070c10
PA
5770fi
5771
81ecdfbb
RW
5772if test $ac_cv_header_stdc = yes; then
5773 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5774 if test "$cross_compiling" = yes; then :
5775 :
43d5792c 5776else
81ecdfbb 5777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5778/* end confdefs.h. */
81ecdfbb
RW
5779#include <ctype.h>
5780#include <stdlib.h>
5781#if ((' ' & 0x0FF) == 0x020)
5782# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5783# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5784#else
5785# define ISLOWER(c) \
5786 (('a' <= (c) && (c) <= 'i') \
5787 || ('j' <= (c) && (c) <= 'r') \
5788 || ('s' <= (c) && (c) <= 'z'))
5789# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5790#endif
5791
5792#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
bec39cab
AC
5793int
5794main ()
5795{
81ecdfbb
RW
5796 int i;
5797 for (i = 0; i < 256; i++)
5798 if (XOR (islower (i), ISLOWER (i))
5799 || toupper (i) != TOUPPER (i))
5800 return 2;
bec39cab
AC
5801 return 0;
5802}
5803_ACEOF
81ecdfbb 5804if ac_fn_c_try_run "$LINENO"; then :
bec39cab 5805
81ecdfbb
RW
5806else
5807 ac_cv_header_stdc=no
43d5792c 5808fi
81ecdfbb
RW
5809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5810 conftest.$ac_objext conftest.beam conftest.$ac_ext
43d5792c 5811fi
e122f1f5 5812
68070c10 5813fi
81ecdfbb
RW
5814fi
5815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5816$as_echo "$ac_cv_header_stdc" >&6; }
5817if test $ac_cv_header_stdc = yes; then
68070c10 5818
81ecdfbb 5819$as_echo "#define STDC_HEADERS 1" >>confdefs.h
68070c10 5820
68070c10 5821fi
68070c10 5822
68070c10 5823
17ef446e 5824# Set the 'development' global.
270c9937 5825. $srcdir/../../bfd/development.sh
17ef446e
PA
5826
5827# Enable -lmcheck by default (it provides cheap-enough memory
5828# mangling), but turn it off for releases.
5829if $development; then
5830 libmcheck_default=yes
5831else
5832 libmcheck_default=no
5833fi
5834
5835 # Check whether --enable-libmcheck was given.
5836if test "${enable_libmcheck+set}" = set; then :
5837 enableval=$enable_libmcheck; case "${enableval}" in
5838 yes | y) ENABLE_LIBMCHECK="yes" ;;
5839 no | n) ENABLE_LIBMCHECK="no" ;;
d0ac1c44 5840 *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
17ef446e
PA
5841 esac
5842fi
5843
5844
5845 if test -z "${ENABLE_LIBMCHECK}"; then
5846 ENABLE_LIBMCHECK=${libmcheck_default}
5847 fi
5848
5849 if test "$ENABLE_LIBMCHECK" = "yes" ; then
5850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
5851$as_echo_n "checking for main in -lmcheck... " >&6; }
d0ac1c44 5852if ${ac_cv_lib_mcheck_main+:} false; then :
17ef446e
PA
5853 $as_echo_n "(cached) " >&6
5854else
5855 ac_check_lib_save_LIBS=$LIBS
5856LIBS="-lmcheck $LIBS"
5857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5858/* end confdefs.h. */
5859
5860
5861int
5862main ()
5863{
5864return main ();
5865 ;
5866 return 0;
5867}
5868_ACEOF
5869if ac_fn_c_try_link "$LINENO"; then :
5870 ac_cv_lib_mcheck_main=yes
5871else
5872 ac_cv_lib_mcheck_main=no
5873fi
5874rm -f core conftest.err conftest.$ac_objext \
5875 conftest$ac_exeext conftest.$ac_ext
5876LIBS=$ac_check_lib_save_LIBS
5877fi
5878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
5879$as_echo "$ac_cv_lib_mcheck_main" >&6; }
d0ac1c44 5880if test "x$ac_cv_lib_mcheck_main" = xyes; then :
17ef446e
PA
5881 cat >>confdefs.h <<_ACEOF
5882#define HAVE_LIBMCHECK 1
5883_ACEOF
5884
5885 LIBS="-lmcheck $LIBS"
5886
5887fi
5888
5889 fi
5890
5891
6d580b63 5892if $development; then
b5884fa7 5893 srv_selftest_objs="common/selftest.o"
6d580b63
YQ
5894
5895$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
5896
5897fi
5898
bd885420
YQ
5899 case ${build_alias} in
5900 "") build_noncanonical=${build} ;;
5901 *) build_noncanonical=${build_alias} ;;
5902esac
5903
5904 case ${host_alias} in
5905 "") host_noncanonical=${build_noncanonical} ;;
5906 *) host_noncanonical=${host_alias} ;;
5907esac
5908
5909 case ${target_alias} in
5910 "") target_noncanonical=${host_noncanonical} ;;
5911 *) target_noncanonical=${target_alias} ;;
5912esac
5913
5914
5915
5916
5917
5918
61c125b9
TT
5919# Dependency checking.
5920rm -rf .tst 2>/dev/null
5921mkdir .tst 2>/dev/null
5922if test -d .tst; then
5923 am__leading_dot=.
5924else
5925 am__leading_dot=_
5926fi
5927rmdir .tst 2>/dev/null
5928
5929DEPDIR="${am__leading_dot}deps"
5930
5931ac_config_commands="$ac_config_commands depdir"
5932
5933
60d6cfc9
YQ
5934
5935# Create sub-directories for objects and dependencies.
b5884fa7 5936CONFIG_SRC_SUBDIR="arch common"
60d6cfc9
YQ
5937
5938
5939ac_config_commands="$ac_config_commands gdbdepdir"
5940
5941
61c125b9
TT
5942depcc="$CC" am_compiler_list=
5943
5944am_depcomp=$ac_aux_dir/depcomp
5945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5946$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 5947if ${am_cv_CC_dependencies_compiler_type+:} false; then :
61c125b9
TT
5948 $as_echo_n "(cached) " >&6
5949else
5950 if test -f "$am_depcomp"; then
5951 # We make a subdir and do the tests there. Otherwise we can end up
5952 # making bogus files that we don't know about and never remove. For
5953 # instance it was reported that on HP-UX the gcc test will end up
5954 # making a dummy file named `D' -- because `-MD' means `put the output
5955 # in D'.
5956 mkdir conftest.dir
5957 # Copy depcomp to subdir because otherwise we won't find it if we're
5958 # using a relative directory.
5959 cp "$am_depcomp" conftest.dir
5960 cd conftest.dir
5961 # We will build objects and dependencies in a subdirectory because
5962 # it helps to detect inapplicable dependency modes. For instance
5963 # both Tru64's cc and ICC support -MD to output dependencies as a
5964 # side effect of compilation, but ICC will put the dependencies in
5965 # the current directory while Tru64 will put them in the object
5966 # directory.
5967 mkdir sub
5968
5969 am_cv_CC_dependencies_compiler_type=none
5970 if test "$am_compiler_list" = ""; then
5971 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5972 fi
5973 for depmode in $am_compiler_list; do
5974 if test $depmode = none; then break; fi
5975
5976 $as_echo "$as_me:$LINENO: trying $depmode" >&5
5977 # Setup a source with many dependencies, because some compilers
5978 # like to wrap large dependency lists on column 80 (with \), and
5979 # we should not choose a depcomp mode which is confused by this.
5980 #
5981 # We need to recreate these files for each test, as the compiler may
5982 # overwrite some of them when testing with obscure command lines.
5983 # This happens at least with the AIX C compiler.
5984 : > sub/conftest.c
5985 for i in 1 2 3 4 5 6; do
5986 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5987 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5988 # Solaris 8's {/usr,}/bin/sh.
5989 touch sub/conftst$i.h
5990 done
5991 echo "include sub/conftest.Po" > confmf
5992
5993 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5994 # mode. It turns out that the SunPro C++ compiler does not properly
5995 # handle `-M -o', and we need to detect this.
5996 depcmd="depmode=$depmode \
5997 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5998 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5999 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6000 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6001 if env $depcmd > conftest.err 2>&1 &&
6002 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6003 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6004 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6005 # icc doesn't choke on unknown options, it will just issue warnings
6006 # or remarks (even with -Werror). So we grep stderr for any message
6007 # that says an option was ignored or not supported.
6008 # When given -MP, icc 7.0 and 7.1 complain thusly:
6009 # icc: Command line warning: ignoring option '-M'; no argument required
6010 # The diagnosis changed in icc 8.0:
6011 # icc: Command line remark: option '-MP' not supported
6012 if (grep 'ignoring option' conftest.err ||
6013 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6014 am_cv_CC_dependencies_compiler_type=$depmode
6015 $as_echo "$as_me:$LINENO: success" >&5
6016 break
6017 fi
6018 fi
6019 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6020 sed -e 's/^/| /' < conftest.err >&5
6021 done
6022
6023 cd ..
6024 rm -rf conftest.dir
6025else
6026 am_cv_CC_dependencies_compiler_type=none
6027fi
6028
6029fi
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6031$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6032if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6033then as_fn_error $? "no usable dependency style found" "$LINENO" 5
61c125b9
TT
6034else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6035
6036fi
6037
6038
648d586d
JB
6039gnulib_extra_configure_args=
6040# If large-file support is disabled, make sure gnulib does the same.
6041if test "$enable_largefile" = no; then
6042gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6043fi
6044
c971b7fa
PA
6045# Configure gnulib. We can't use AC_CONFIG_SUBDIRS as that'd expect
6046# to find the the source subdir to be configured directly under
6047# gdbserver/. We need to build gnulib under some other directory not
6048# "gnulib", to avoid the problem of both GDB and GDBserver wanting to
6049# build it in the same directory, when building in the source dir.
6050
6051 in_src="../gnulib"
6052 in_build="build-gnulib-gdbserver"
648d586d 6053 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6054
6055 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6056 # so they do not pile up.
6057 ac_sub_configure_args=
6058 ac_prev=
6059 eval "set x $ac_configure_args"
6060 shift
6061 for ac_arg
6062 do
6063 if test -n "$ac_prev"; then
6064 ac_prev=
6065 continue
6066 fi
6067 case $ac_arg in
6068 -cache-file | --cache-file | --cache-fil | --cache-fi \
6069 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6070 ac_prev=cache_file ;;
6071 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6072 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6073 | --c=*)
6074 ;;
6075 --config-cache | -C)
6076 ;;
6077 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6078 ac_prev=srcdir ;;
6079 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6080 ;;
6081 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6082 ac_prev=prefix ;;
6083 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6084 ;;
6085 --disable-option-checking)
6086 ;;
6087 *)
6088 case $ac_arg in
6089 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6090 esac
6091 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6092 esac
6093 done
6094
6095 # Always prepend --prefix to ensure using the same prefix
6096 # in subdir configurations.
6097 ac_arg="--prefix=$prefix"
6098 case $ac_arg in
6099 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6100 esac
6101 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6102
6103 # Pass --silent
6104 if test "$silent" = yes; then
6105 ac_sub_configure_args="--silent $ac_sub_configure_args"
6106 fi
6107
6108 # Always prepend --disable-option-checking to silence warnings, since
6109 # different subdirs can have different --enable and --with options.
6110 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6111
6112 ac_popdir=`pwd`
6113 ac_dir=$in_build
6114
6115 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6116 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6117 $as_echo "$ac_msg" >&6
6118 as_dir="$ac_dir"; as_fn_mkdir_p
6119
38ea300a
PA
6120 case $srcdir in
6121 [\\/]* | ?:[\\/]* )
6122 ac_srcdir=$srcdir/$in_src ;;
6123 *) # Relative name.
6124 ac_srcdir=../$srcdir/$in_src ;;
6125 esac
c971b7fa
PA
6126
6127 cd "$ac_dir"
6128
6129 ac_sub_configure=$ac_srcdir/configure
6130
6131 # Make the cache file name correct relative to the subdirectory.
6132 case $cache_file in
6133 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6134 *) # Relative name.
6135 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6136 esac
6137
648d586d
JB
6138 if test -n "$in_extra_args"; then
6139 # Add the extra args at the end.
6140 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6141 fi
6142
c971b7fa
PA
6143 { $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
6144$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6145 # The eval makes quoting arguments work.
6146 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6147 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 6148 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c971b7fa
PA
6149
6150 cd "$ac_popdir"
6151
6152
0b04e523
TT
6153
6154 in_src="../../libiberty"
6155 in_build="build-libiberty-gdbserver"
648d586d 6156 in_extra_args=
0b04e523
TT
6157
6158 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6159 # so they do not pile up.
6160 ac_sub_configure_args=
6161 ac_prev=
6162 eval "set x $ac_configure_args"
6163 shift
6164 for ac_arg
6165 do
6166 if test -n "$ac_prev"; then
6167 ac_prev=
6168 continue
6169 fi
6170 case $ac_arg in
6171 -cache-file | --cache-file | --cache-fil | --cache-fi \
6172 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6173 ac_prev=cache_file ;;
6174 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6175 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6176 | --c=*)
6177 ;;
6178 --config-cache | -C)
6179 ;;
6180 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6181 ac_prev=srcdir ;;
6182 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6183 ;;
6184 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6185 ac_prev=prefix ;;
6186 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6187 ;;
6188 --disable-option-checking)
6189 ;;
6190 *)
6191 case $ac_arg in
6192 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6193 esac
6194 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6195 esac
6196 done
6197
6198 # Always prepend --prefix to ensure using the same prefix
6199 # in subdir configurations.
6200 ac_arg="--prefix=$prefix"
6201 case $ac_arg in
6202 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6203 esac
6204 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6205
6206 # Pass --silent
6207 if test "$silent" = yes; then
6208 ac_sub_configure_args="--silent $ac_sub_configure_args"
6209 fi
6210
6211 # Always prepend --disable-option-checking to silence warnings, since
6212 # different subdirs can have different --enable and --with options.
6213 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6214
6215 ac_popdir=`pwd`
6216 ac_dir=$in_build
6217
6218 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6219 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6220 $as_echo "$ac_msg" >&6
6221 as_dir="$ac_dir"; as_fn_mkdir_p
6222
6223 case $srcdir in
6224 [\\/]* | ?:[\\/]* )
6225 ac_srcdir=$srcdir/$in_src ;;
6226 *) # Relative name.
6227 ac_srcdir=../$srcdir/$in_src ;;
6228 esac
6229
6230 cd "$ac_dir"
6231
6232 ac_sub_configure=$ac_srcdir/configure
6233
6234 # Make the cache file name correct relative to the subdirectory.
6235 case $cache_file in
6236 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6237 *) # Relative name.
6238 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6239 esac
6240
648d586d
JB
6241 if test -n "$in_extra_args"; then
6242 # Add the extra args at the end.
6243 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6244 fi
6245
0b04e523
TT
6246 { $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
6247$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6248 # The eval makes quoting arguments work.
6249 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6250 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 6251 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
0b04e523
TT
6252
6253 cd "$ac_popdir"
6254
6255
726e1356 6256for ac_header in termios.h sys/reg.h string.h proc_service.h sys/procfs.h linux/elf.h fcntl.h signal.h sys/file.h sys/ioctl.h netinet/in.h sys/socket.h netdb.h netinet/tcp.h arpa/inet.h
81ecdfbb
RW
6257do :
6258 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6259ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 6260if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
68070c10 6261 cat >>confdefs.h <<_ACEOF
81ecdfbb 6262#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
68070c10
PA
6263_ACEOF
6264
ec56be1b 6265fi
ec56be1b 6266
81ecdfbb
RW
6267done
6268
eb0edac8 6269ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 6270if test "x$ac_cv_type_pid_t" = xyes; then :
eb0edac8
GB
6271
6272else
6273
6274cat >>confdefs.h <<_ACEOF
6275#define pid_t int
6276_ACEOF
6277
6278fi
6279
6280for ac_header in vfork.h
6281do :
6282 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 6283if test "x$ac_cv_header_vfork_h" = xyes; then :
eb0edac8
GB
6284 cat >>confdefs.h <<_ACEOF
6285#define HAVE_VFORK_H 1
6286_ACEOF
6287
6288fi
6289
6290done
6291
6292for ac_func in fork vfork
6293do :
6294 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6295ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6296if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
eb0edac8
GB
6297 cat >>confdefs.h <<_ACEOF
6298#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6299_ACEOF
6300
6301fi
6302done
6303
6304if test "x$ac_cv_func_fork" = xyes; then
6305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
6306$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 6307if ${ac_cv_func_fork_works+:} false; then :
eb0edac8
GB
6308 $as_echo_n "(cached) " >&6
6309else
6310 if test "$cross_compiling" = yes; then :
6311 ac_cv_func_fork_works=cross
6312else
6313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6314/* end confdefs.h. */
6315$ac_includes_default
6316int
6317main ()
6318{
6319
6320 /* By Ruediger Kuhlmann. */
6321 return fork () < 0;
6322
6323 ;
6324 return 0;
6325}
6326_ACEOF
6327if ac_fn_c_try_run "$LINENO"; then :
6328 ac_cv_func_fork_works=yes
6329else
6330 ac_cv_func_fork_works=no
6331fi
6332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6333 conftest.$ac_objext conftest.beam conftest.$ac_ext
6334fi
6335
6336fi
6337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
6338$as_echo "$ac_cv_func_fork_works" >&6; }
6339
6340else
6341 ac_cv_func_fork_works=$ac_cv_func_fork
6342fi
6343if test "x$ac_cv_func_fork_works" = xcross; then
6344 case $host in
6345 *-*-amigaos* | *-*-msdosdjgpp*)
6346 # Override, as these systems have only a dummy fork() stub
6347 ac_cv_func_fork_works=no
6348 ;;
6349 *)
6350 ac_cv_func_fork_works=yes
6351 ;;
6352 esac
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
6354$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
6355fi
6356ac_cv_func_vfork_works=$ac_cv_func_vfork
6357if test "x$ac_cv_func_vfork" = xyes; then
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
6359$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 6360if ${ac_cv_func_vfork_works+:} false; then :
eb0edac8
GB
6361 $as_echo_n "(cached) " >&6
6362else
6363 if test "$cross_compiling" = yes; then :
6364 ac_cv_func_vfork_works=cross
6365else
6366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6367/* end confdefs.h. */
6368/* Thanks to Paul Eggert for this test. */
6369$ac_includes_default
6370#include <sys/wait.h>
6371#ifdef HAVE_VFORK_H
6372# include <vfork.h>
6373#endif
6374/* On some sparc systems, changes by the child to local and incoming
6375 argument registers are propagated back to the parent. The compiler
6376 is told about this with #include <vfork.h>, but some compilers
6377 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
6378 static variable whose address is put into a register that is
6379 clobbered by the vfork. */
6380static void
6381#ifdef __cplusplus
6382sparc_address_test (int arg)
6383# else
6384sparc_address_test (arg) int arg;
6385#endif
6386{
6387 static pid_t child;
6388 if (!child) {
6389 child = vfork ();
6390 if (child < 0) {
6391 perror ("vfork");
6392 _exit(2);
6393 }
6394 if (!child) {
6395 arg = getpid();
6396 write(-1, "", 0);
6397 _exit (arg);
6398 }
6399 }
6400}
6401
6402int
6403main ()
6404{
6405 pid_t parent = getpid ();
6406 pid_t child;
6407
6408 sparc_address_test (0);
6409
6410 child = vfork ();
6411
6412 if (child == 0) {
6413 /* Here is another test for sparc vfork register problems. This
6414 test uses lots of local variables, at least as many local
6415 variables as main has allocated so far including compiler
6416 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
6417 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
6418 reuse the register of parent for one of the local variables,
6419 since it will think that parent can't possibly be used any more
6420 in this routine. Assigning to the local variable will thus
6421 munge parent in the parent process. */
6422 pid_t
6423 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6424 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6425 /* Convince the compiler that p..p7 are live; otherwise, it might
6426 use the same hardware register for all 8 local variables. */
6427 if (p != p1 || p != p2 || p != p3 || p != p4
6428 || p != p5 || p != p6 || p != p7)
6429 _exit(1);
6430
6431 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
6432 from child file descriptors. If the child closes a descriptor
6433 before it execs or exits, this munges the parent's descriptor
6434 as well. Test for this by closing stdout in the child. */
6435 _exit(close(fileno(stdout)) != 0);
6436 } else {
6437 int status;
6438 struct stat st;
6439
6440 while (wait(&status) != child)
6441 ;
6442 return (
6443 /* Was there some problem with vforking? */
6444 child < 0
6445
6446 /* Did the child fail? (This shouldn't happen.) */
6447 || status
6448
6449 /* Did the vfork/compiler bug occur? */
6450 || parent != getpid()
6451
6452 /* Did the file descriptor bug occur? */
6453 || fstat(fileno(stdout), &st) != 0
6454 );
6455 }
6456}
6457_ACEOF
6458if ac_fn_c_try_run "$LINENO"; then :
6459 ac_cv_func_vfork_works=yes
6460else
6461 ac_cv_func_vfork_works=no
6462fi
6463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6464 conftest.$ac_objext conftest.beam conftest.$ac_ext
6465fi
6466
6467fi
6468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
6469$as_echo "$ac_cv_func_vfork_works" >&6; }
6470
6471fi;
6472if test "x$ac_cv_func_fork_works" = xcross; then
6473 ac_cv_func_vfork_works=$ac_cv_func_vfork
6474 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
6475$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
6476fi
6477
6478if test "x$ac_cv_func_vfork_works" = xyes; then
6479
6480$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
6481
6482else
6483
6484$as_echo "#define vfork fork" >>confdefs.h
6485
6486fi
6487if test "x$ac_cv_func_fork_works" = xyes; then
6488
6489$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
6490
6491fi
6492
4b8b5e72 6493for ac_func in getauxval pread pwrite pread64 setns
81ecdfbb
RW
6494do :
6495 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6496ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6497if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6498 cat >>confdefs.h <<_ACEOF
6499#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
ec56be1b
PA
6500_ACEOF
6501
81ecdfbb
RW
6502fi
6503done
ec56be1b 6504
e122f1f5 6505
d0ac1c44
SM
6506ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6507if test "x$ac_cv_type_size_t" = xyes; then :
6508
6509else
6510
6511cat >>confdefs.h <<_ACEOF
6512#define size_t unsigned int
6513_ACEOF
6514
6515fi
6516
3266f10b
TT
6517
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6519$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 6520if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
6521 $as_echo_n "(cached) " >&6
6522else
6523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6524/* end confdefs.h. */
6525#include <stdlib.h>
6526#include <stdarg.h>
6527#include <string.h>
6528#include <float.h>
6529
6530int
6531main ()
6532{
6533
6534 ;
6535 return 0;
6536}
6537_ACEOF
6538if ac_fn_c_try_compile "$LINENO"; then :
6539 ac_cv_header_stdc=yes
6540else
6541 ac_cv_header_stdc=no
6542fi
6543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6544
6545if test $ac_cv_header_stdc = yes; then
6546 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6548/* end confdefs.h. */
6549#include <string.h>
6550
6551_ACEOF
6552if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6553 $EGREP "memchr" >/dev/null 2>&1; then :
6554
6555else
6556 ac_cv_header_stdc=no
6557fi
6558rm -f conftest*
6559
6560fi
6561
6562if test $ac_cv_header_stdc = yes; then
6563 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6565/* end confdefs.h. */
6566#include <stdlib.h>
6567
6568_ACEOF
6569if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6570 $EGREP "free" >/dev/null 2>&1; then :
6571
6572else
6573 ac_cv_header_stdc=no
6574fi
6575rm -f conftest*
6576
6577fi
6578
6579if test $ac_cv_header_stdc = yes; then
6580 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6581 if test "$cross_compiling" = yes; then :
6582 :
6583else
6584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6585/* end confdefs.h. */
6586#include <ctype.h>
6587#include <stdlib.h>
6588#if ((' ' & 0x0FF) == 0x020)
6589# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6590# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6591#else
6592# define ISLOWER(c) \
6593 (('a' <= (c) && (c) <= 'i') \
6594 || ('j' <= (c) && (c) <= 'r') \
6595 || ('s' <= (c) && (c) <= 'z'))
6596# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6597#endif
6598
6599#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6600int
6601main ()
6602{
6603 int i;
6604 for (i = 0; i < 256; i++)
6605 if (XOR (islower (i), ISLOWER (i))
6606 || toupper (i) != TOUPPER (i))
6607 return 2;
6608 return 0;
6609}
6610_ACEOF
6611if ac_fn_c_try_run "$LINENO"; then :
6612
6613else
6614 ac_cv_header_stdc=no
6615fi
6616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6617 conftest.$ac_objext conftest.beam conftest.$ac_ext
6618fi
6619
6620fi
6621fi
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6623$as_echo "$ac_cv_header_stdc" >&6; }
6624if test $ac_cv_header_stdc = yes; then
6625
6626$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6627
3266f10b
TT
6628fi
6629
6630 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6631# for constant arguments. Useless!
6632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6633$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 6634if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
6635 $as_echo_n "(cached) " >&6
6636else
6637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6638/* end confdefs.h. */
6639#include <alloca.h>
6640int
6641main ()
6642{
6643char *p = (char *) alloca (2 * sizeof (int));
6644 if (p) return 0;
6645 ;
6646 return 0;
6647}
6648_ACEOF
6649if ac_fn_c_try_link "$LINENO"; then :
6650 ac_cv_working_alloca_h=yes
6651else
6652 ac_cv_working_alloca_h=no
6653fi
6654rm -f core conftest.err conftest.$ac_objext \
6655 conftest$ac_exeext conftest.$ac_ext
6656fi
6657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6658$as_echo "$ac_cv_working_alloca_h" >&6; }
6659if test $ac_cv_working_alloca_h = yes; then
6660
6661$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6662
6663fi
6664
6665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6666$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 6667if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
6668 $as_echo_n "(cached) " >&6
6669else
6670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6671/* end confdefs.h. */
6672#ifdef __GNUC__
6673# define alloca __builtin_alloca
6674#else
6675# ifdef _MSC_VER
6676# include <malloc.h>
6677# define alloca _alloca
6678# else
6679# ifdef HAVE_ALLOCA_H
6680# include <alloca.h>
6681# else
6682# ifdef _AIX
6683 #pragma alloca
6684# else
6685# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 6686void *alloca (size_t);
3266f10b
TT
6687# endif
6688# endif
6689# endif
6690# endif
6691#endif
6692
6693int
6694main ()
6695{
6696char *p = (char *) alloca (1);
6697 if (p) return 0;
6698 ;
6699 return 0;
6700}
6701_ACEOF
6702if ac_fn_c_try_link "$LINENO"; then :
6703 ac_cv_func_alloca_works=yes
6704else
6705 ac_cv_func_alloca_works=no
6706fi
6707rm -f core conftest.err conftest.$ac_objext \
6708 conftest$ac_exeext conftest.$ac_ext
6709fi
6710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6711$as_echo "$ac_cv_func_alloca_works" >&6; }
6712
6713if test $ac_cv_func_alloca_works = yes; then
6714
6715$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6716
6717else
6718 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6719# that cause trouble. Some versions do not even contain alloca or
6720# contain a buggy version. If you still want to use their alloca,
6721# use ar to extract alloca.o from them instead of compiling alloca.c.
6722
6723ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
6724
6725$as_echo "#define C_ALLOCA 1" >>confdefs.h
6726
6727
6728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6729$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 6730if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
6731 $as_echo_n "(cached) " >&6
6732else
6733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6734/* end confdefs.h. */
6735#if defined CRAY && ! defined CRAY2
6736webecray
6737#else
6738wenotbecray
6739#endif
6740
6741_ACEOF
6742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6743 $EGREP "webecray" >/dev/null 2>&1; then :
6744 ac_cv_os_cray=yes
6745else
6746 ac_cv_os_cray=no
6747fi
6748rm -f conftest*
6749
6750fi
6751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6752$as_echo "$ac_cv_os_cray" >&6; }
6753if test $ac_cv_os_cray = yes; then
6754 for ac_func in _getb67 GETB67 getb67; do
6755 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6756ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6757if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
6758
6759cat >>confdefs.h <<_ACEOF
6760#define CRAY_STACKSEG_END $ac_func
6761_ACEOF
6762
6763 break
6764fi
6765
6766 done
6767fi
6768
6769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6770$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 6771if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
6772 $as_echo_n "(cached) " >&6
6773else
6774 if test "$cross_compiling" = yes; then :
6775 ac_cv_c_stack_direction=0
6776else
6777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6778/* end confdefs.h. */
6779$ac_includes_default
6780int
d0ac1c44 6781find_stack_direction (int *addr, int depth)
3266f10b 6782{
d0ac1c44
SM
6783 int dir, dummy = 0;
6784 if (! addr)
6785 addr = &dummy;
6786 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6787 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6788 return dir + dummy;
3266f10b
TT
6789}
6790
6791int
d0ac1c44 6792main (int argc, char **argv)
3266f10b 6793{
d0ac1c44 6794 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
6795}
6796_ACEOF
6797if ac_fn_c_try_run "$LINENO"; then :
6798 ac_cv_c_stack_direction=1
6799else
6800 ac_cv_c_stack_direction=-1
6801fi
6802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6803 conftest.$ac_objext conftest.beam conftest.$ac_ext
6804fi
6805
6806fi
6807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6808$as_echo "$ac_cv_c_stack_direction" >&6; }
6809cat >>confdefs.h <<_ACEOF
6810#define STACK_DIRECTION $ac_cv_c_stack_direction
6811_ACEOF
6812
6813
6814fi
6815
6816
6817
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
6819$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 6820if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
6821 $as_echo_n "(cached) " >&6
6822else
6823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6824/* end confdefs.h. */
6825#include <langinfo.h>
6826int
6827main ()
6828{
6829char* cs = nl_langinfo(CODESET);
6830 ;
6831 return 0;
6832}
6833_ACEOF
6834if ac_fn_c_try_link "$LINENO"; then :
6835 am_cv_langinfo_codeset=yes
6836else
6837 am_cv_langinfo_codeset=no
6838fi
6839rm -f core conftest.err conftest.$ac_objext \
6840 conftest$ac_exeext conftest.$ac_ext
6841
6842fi
6843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
6844$as_echo "$am_cv_langinfo_codeset" >&6; }
6845 if test $am_cv_langinfo_codeset = yes; then
6846
6847$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
6848
6849 fi
6850
6851
44122162 6852 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
3266f10b
TT
6853do :
6854 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6855ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 6856if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
6857 cat >>confdefs.h <<_ACEOF
6858#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6859_ACEOF
6860
6861fi
6862
6863done
6864
6865
f348d89a 6866 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
6867do :
6868 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6869ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6870if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
6871 cat >>confdefs.h <<_ACEOF
6872#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6873_ACEOF
6874
6875fi
6876done
6877
6878
6879 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
d0ac1c44 6880if test "x$ac_cv_have_decl_strerror" = xyes; then :
3266f10b
TT
6881 ac_have_decl=1
6882else
6883 ac_have_decl=0
6884fi
6885
6886cat >>confdefs.h <<_ACEOF
6887#define HAVE_DECL_STRERROR $ac_have_decl
6888_ACEOF
6889ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 6890if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
6891 ac_have_decl=1
6892else
6893 ac_have_decl=0
6894fi
6895
6896cat >>confdefs.h <<_ACEOF
6897#define HAVE_DECL_STRSTR $ac_have_decl
6898_ACEOF
6899
6900
e9bcb658
GB
6901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
6902$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 6903if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
6904 $as_echo_n "(cached) " >&6
6905else
6906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6907/* end confdefs.h. */
6908
6909#include <setjmp.h>
6910
6911int
6912main ()
6913{
6914sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
6915 ;
6916 return 0;
6917}
6918_ACEOF
6919if ac_fn_c_try_compile "$LINENO"; then :
6920 gdb_cv_func_sigsetjmp=yes
6921else
6922 gdb_cv_func_sigsetjmp=no
6923fi
6924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6925fi
6926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
6927$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
6928if test $gdb_cv_func_sigsetjmp = yes; then
6929
6930$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
6931
6932fi
6933
3266f10b 6934
eb7aa561
PA
6935# Check the return and argument types of ptrace.
6936
6937
6938for ac_header in sys/ptrace.h ptrace.h
6939do :
6940 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6941ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 6942if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
eb7aa561
PA
6943 cat >>confdefs.h <<_ACEOF
6944#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6945_ACEOF
6946
6947fi
6948
6949done
6950
6951
6952gdb_ptrace_headers='
6953#include <sys/types.h>
6954#if HAVE_SYS_PTRACE_H
6955# include <sys/ptrace.h>
6956#endif
6957#if HAVE_UNISTD_H
6958# include <unistd.h>
6959#endif
6960'
6961# There is no point in checking if we don't have a prototype.
9b30624b 6962ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
eb7aa561 6963"
d0ac1c44 6964if test "x$ac_cv_have_decl_ptrace" = xyes; then :
eb7aa561
PA
6965 ac_have_decl=1
6966else
6967 ac_have_decl=0
6968fi
6969
6970cat >>confdefs.h <<_ACEOF
6971#define HAVE_DECL_PTRACE $ac_have_decl
6972_ACEOF
6973if test $ac_have_decl = 1; then :
6974
6975else
6976
6977 : ${gdb_cv_func_ptrace_ret='int'}
6978 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
6979
6980fi
6981
6982# Check return type. Varargs (used on GNU/Linux) conflict with the
6983# empty argument list, so check for that explicitly.
6984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
6985$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 6986if ${gdb_cv_func_ptrace_ret+:} false; then :
eb7aa561
PA
6987 $as_echo_n "(cached) " >&6
6988else
6989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6990/* end confdefs.h. */
6991$gdb_ptrace_headers
6992int
6993main ()
6994{
6995extern long ptrace (enum __ptrace_request, ...);
6996 ;
6997 return 0;
6998}
6999_ACEOF
9b30624b 7000if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
7001 gdb_cv_func_ptrace_ret='long'
7002else
7003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7004/* end confdefs.h. */
7005$gdb_ptrace_headers
7006int
7007main ()
7008{
7009extern int ptrace ();
7010 ;
7011 return 0;
7012}
7013_ACEOF
9b30624b 7014if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
7015 gdb_cv_func_ptrace_ret='int'
7016else
7017 gdb_cv_func_ptrace_ret='long'
7018fi
7019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7020fi
7021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7022fi
7023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
7024$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
7025
7026cat >>confdefs.h <<_ACEOF
7027#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
7028_ACEOF
7029
7030# Check argument types.
7031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
7032$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 7033if ${gdb_cv_func_ptrace_args+:} false; then :
eb7aa561
PA
7034 $as_echo_n "(cached) " >&6
7035else
7036
7037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7038/* end confdefs.h. */
7039$gdb_ptrace_headers
7040int
7041main ()
7042{
7043extern long ptrace (enum __ptrace_request, ...);
7044 ;
7045 return 0;
7046}
7047_ACEOF
9b30624b 7048if ac_fn_c_try_compile "$LINENO"; then :
54019719 7049 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
eb7aa561
PA
7050else
7051
7052for gdb_arg1 in 'int' 'long'; do
7053 for gdb_arg2 in 'pid_t' 'int' 'long'; do
7054 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
7055 for gdb_arg4 in 'int' 'long' 'void *'; do
7056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7057/* end confdefs.h. */
7058$gdb_ptrace_headers
7059int
7060main ()
7061{
7062
7063extern $gdb_cv_func_ptrace_ret
7064 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
7065
7066 ;
7067 return 0;
7068}
7069_ACEOF
9b30624b 7070if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
7071 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
7072 break 4;
7073fi
7074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7075 for gdb_arg5 in 'int *' 'int' 'long'; do
7076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7077/* end confdefs.h. */
7078$gdb_ptrace_headers
7079int
7080main ()
7081{
7082
7083extern $gdb_cv_func_ptrace_ret
7084 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
7085
7086 ;
7087 return 0;
7088}
7089_ACEOF
9b30624b 7090if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
7091
7092gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
7093 break 5;
7094fi
7095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7096 done
7097 done
7098 done
7099 done
7100done
7101# Provide a safe default value.
7102: ${gdb_cv_func_ptrace_args='int,int,long,long'}
7103
7104fi
7105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7106fi
7107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
7108$as_echo "$gdb_cv_func_ptrace_args" >&6; }
7109ac_save_IFS=$IFS; IFS=','
7110set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
7111IFS=$ac_save_IFS
7112shift
7113
54019719
PA
7114cat >>confdefs.h <<_ACEOF
7115#define PTRACE_TYPE_ARG1 $1
7116_ACEOF
7117
7118
eb7aa561
PA
7119cat >>confdefs.h <<_ACEOF
7120#define PTRACE_TYPE_ARG3 $3
7121_ACEOF
7122
7123
7124cat >>confdefs.h <<_ACEOF
7125#define PTRACE_TYPE_ARG4 $4
7126_ACEOF
7127
7128if test -n "$5"; then
7129
7130cat >>confdefs.h <<_ACEOF
7131#define PTRACE_TYPE_ARG5 $5
7132_ACEOF
7133
7134fi
7135
7136
0fb4aa4b
PA
7137# Check for UST
7138ustlibs=""
7139ustinc=""
7140
7141
7142# Check whether --with-ust was given.
7143if test "${with_ust+set}" = set; then :
7144 withval=$with_ust;
7145fi
7146
7147
7148# Check whether --with-ust_include was given.
7149if test "${with_ust_include+set}" = set; then :
7150 withval=$with_ust_include;
7151fi
7152
7153
7154# Check whether --with-ust_lib was given.
7155if test "${with_ust_lib+set}" = set; then :
7156 withval=$with_ust_lib;
7157fi
7158
7159
7160case $with_ust in
7161 no)
7162 ustlibs=
7163 ustinc=
7164 ;;
7165 "" | yes)
7166 ustlibs=" -lust "
7167 ustinc=""
7168 ;;
7169 *)
7170 ustlibs="-L$with_ust/lib -lust"
7171 ustinc="-I$with_ust/include "
7172 ;;
7173esac
7174if test "x$with_ust_include" != x; then
7175 ustinc="-I$with_ust_include "
7176fi
7177if test "x$with_ust_lib" != x; then
7178 ustlibs="-L$with_ust_lib -lust"
7179fi
7180
7181if test "x$with_ust" != "xno"; then
7182 saved_CFLAGS="$CFLAGS"
7183 CFLAGS="$CFLAGS $ustinc"
7184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ust" >&5
7185$as_echo_n "checking for ust... " >&6; }
7186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7187/* end confdefs.h. */
7188
7189#define CONFIG_UST_GDB_INTEGRATION
7190#include <ust/ust.h>
7191
7192int
7193main ()
7194{
7195
7196 ;
7197 return 0;
7198}
7199_ACEOF
7200if ac_fn_c_try_compile "$LINENO"; then :
7201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7202$as_echo "yes" >&6; };
7203$as_echo "#define HAVE_UST 1" >>confdefs.h
7204
7205else
7206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7207$as_echo "no" >&6; }; ustlibs= ; ustinc=
7208fi
7209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7210 CFLAGS="$saved_CFLAGS"
7211fi
7212
7213# Flags needed for UST
7214
7215
7216
8f13a3ce 7217
d4596a3d
PA
7218# Check whether --enable-werror was given.
7219if test "${enable_werror+set}" = set; then :
7220 enableval=$enable_werror; case "${enableval}" in
7221 yes | y) ERROR_ON_WARNING="yes" ;;
7222 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 7223 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
d4596a3d
PA
7224 esac
7225fi
7226
7227
9a084706 7228# Enable -Werror by default when using gcc. Turn it off for releases.
8f13a3ce 7229if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
d4596a3d
PA
7230 ERROR_ON_WARNING=yes
7231fi
7232
7233WERROR_CFLAGS=""
7234if test "${ERROR_ON_WARNING}" = yes ; then
7235 WERROR_CFLAGS="-Werror"
7236fi
7237
cf6de44d 7238# The options we'll try to enable.
aac331e4 7239build_warnings="-Wall -Wpointer-arith \
a0de763e 7240-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
8f13a3ce 7241-Wno-switch -Wno-char-subscripts \
cf6de44d 7242-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 7243-Wno-sign-compare -Wno-error=maybe-uninitialized \
458412c3 7244-Wno-mismatched-tags \
632e107b 7245-Wno-error=deprecated-register \
85e26832 7246-Wsuggest-override \
1a34f210 7247-Wimplicit-fallthrough=3 \
aff689d3 7248-Wduplicated-cond"
8f13a3ce 7249
8f13a3ce 7250case "${host}" in
5bfda255
YQ
7251 *-*-mingw32*)
7252 # Enable -Wno-format by default when using gcc on mingw since many
7253 # GCC versions complain about %I64.
7254 build_warnings="$build_warnings -Wno-format" ;;
7255 *-*-solaris*)
7256 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
7257 # doesn't understand.
7258 build_warnings="$build_warnings -Wno-unknown-pragmas"
7259 # Solaris 11 <unistd.h> marks vfork deprecated.
7260 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
7261 *)
7262 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
7263 # but there's a special case for this below.
7264 build_warnings="$build_warnings -Wformat-nonliteral" ;;
8f13a3ce
MF
7265esac
7266
7267# Check whether --enable-build-warnings was given.
7268if test "${enable_build_warnings+set}" = set; then :
7269 enableval=$enable_build_warnings; case "${enableval}" in
7270 yes) ;;
7271 no) build_warnings="-w";;
7272 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
7273 build_warnings="${build_warnings} ${t}";;
7274 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
7275 build_warnings="${t} ${build_warnings}";;
7276 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
7277esac
7278if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
7279 echo "Setting compiler warning flags = $build_warnings" 6>&1
7280fi
7281fi
7282# Check whether --enable-gdb-build-warnings was given.
7283if test "${enable_gdb_build_warnings+set}" = set; then :
7284 enableval=$enable_gdb_build_warnings; case "${enableval}" in
7285 yes) ;;
7286 no) build_warnings="-w";;
7287 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
7288 build_warnings="${build_warnings} ${t}";;
7289 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
7290 build_warnings="${t} ${build_warnings}";;
7291 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
7292esac
7293if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
7294 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
7295fi
3bc3d82a
PA
7296fi
7297
7298# The set of warnings supported by a C++ compiler is not the same as
7299# of the C compiler.
cf6de44d 7300ac_ext=cpp
3bc3d82a
PA
7301ac_cpp='$CXXCPP $CPPFLAGS'
7302ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7303ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7304ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7305
3bc3d82a 7306
d4596a3d 7307WARN_CFLAGS=""
8f13a3ce 7308if test "x${build_warnings}" != x -a "x$GCC" = xyes
d4596a3d
PA
7309then
7310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
7311$as_echo_n "checking compiler warning flags... " >&6; }
7312 # Separate out the -Werror flag as some files just cannot be
7313 # compiled with it enabled.
7314 for w in ${build_warnings}; do
7544db95
PA
7315 # GCC does not complain about -Wno-unknown-warning. Invert
7316 # and test -Wunknown-warning instead.
7317 case $w in
7318 -Wno-*)
7319 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
7320 -Wformat-nonliteral)
7321 # gcc requires -Wformat before -Wformat-nonliteral
7322 # will work, so stick them together.
7323 w="-Wformat $w"
7324 wtest="$w"
7325 ;;
7544db95
PA
7326 *)
7327 wtest=$w ;;
7328 esac
7329
d4596a3d
PA
7330 case $w in
7331 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
7332 *)
7333 # Check whether GCC accepts it.
d4596a3d 7334 saved_CFLAGS="$CFLAGS"
3e019bdc 7335 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 7336 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 7337 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
7338 if test "x$w" = "x-Wunused-variable"; then
7339 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
7340 # fixed in GCC 4.9. This test is derived from the gdb
7341 # source code that triggered this bug in GCC.
7342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7343/* end confdefs.h. */
7344struct scoped_restore_base {};
7345 struct scoped_restore_tmpl : public scoped_restore_base {
7346 ~scoped_restore_tmpl() {}
7347 };
7348int
7349main ()
7350{
7351const scoped_restore_base &b = scoped_restore_tmpl();
7352 ;
7353 return 0;
7354}
7355_ACEOF
7356if ac_fn_cxx_try_compile "$LINENO"; then :
7357 WARN_CFLAGS="${WARN_CFLAGS} $w"
7358fi
7359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7360 else
7361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d4596a3d
PA
7362/* end confdefs.h. */
7363
7364int
7365main ()
7366{
7367
7368 ;
7369 return 0;
7370}
7371_ACEOF
3bc3d82a 7372if ac_fn_cxx_try_compile "$LINENO"; then :
d4596a3d
PA
7373 WARN_CFLAGS="${WARN_CFLAGS} $w"
7374fi
7375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 7376 fi
d4596a3d 7377 CFLAGS="$saved_CFLAGS"
3bc3d82a 7378 CXXFLAGS="$saved_CXXFLAGS"
d4596a3d
PA
7379 esac
7380 done
7381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
7382$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
7383fi
7384
7385
7386
cf6de44d 7387ac_ext=c
3bc3d82a
PA
7388ac_cpp='$CPP $CPPFLAGS'
7389ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7390ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7391ac_compiler_gnu=$ac_cv_c_compiler_gnu
7392
3bc3d82a 7393
8f13a3ce 7394
10e86dd7
DE
7395old_LIBS="$LIBS"
7396LIBS="$LIBS -ldl"
7397for ac_func in dladdr
7398do :
7399 ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
d0ac1c44 7400if test "x$ac_cv_func_dladdr" = xyes; then :
10e86dd7
DE
7401 cat >>confdefs.h <<_ACEOF
7402#define HAVE_DLADDR 1
7403_ACEOF
7404
7405fi
7406done
7407
7408LIBS="$old_LIBS"
7409
07697489
PA
7410
7411 # Check for presence and size of long long.
7412 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 7413if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
7414
7415cat >>confdefs.h <<_ACEOF
7416#define HAVE_LONG_LONG 1
7417_ACEOF
7418
7419# The cast to long int works around a bug in the HP C Compiler
7420# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7421# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7422# This bug is HP SR number 8606223364.
7423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7424$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 7425if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
7426 $as_echo_n "(cached) " >&6
7427else
7428 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
7429
7430else
7431 if test "$ac_cv_type_long_long" = yes; then
7432 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7433$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
7434as_fn_error 77 "cannot compute sizeof (long long)
7435See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
7436 else
7437 ac_cv_sizeof_long_long=0
7438 fi
7439fi
7440
7441fi
7442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7443$as_echo "$ac_cv_sizeof_long_long" >&6; }
7444
7445
7446
7447cat >>confdefs.h <<_ACEOF
7448#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
7449_ACEOF
7450
7451
7452fi
7453
7454
d0ac1c44
SM
7455 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
7456ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
7457if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
7458 ac_have_decl=1
7459else
7460 ac_have_decl=0
7461fi
7462
7463cat >>confdefs.h <<_ACEOF
7464#define HAVE_DECL_BASENAME $ac_have_decl
7465_ACEOF
7466ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 7467if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
7468 ac_have_decl=1
7469else
7470 ac_have_decl=0
7471fi
7472
7473cat >>confdefs.h <<_ACEOF
7474#define HAVE_DECL_FFS $ac_have_decl
7475_ACEOF
7476ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 7477if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
7478 ac_have_decl=1
7479else
7480 ac_have_decl=0
7481fi
7482
7483cat >>confdefs.h <<_ACEOF
7484#define HAVE_DECL_ASPRINTF $ac_have_decl
7485_ACEOF
7486ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 7487if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
7488 ac_have_decl=1
7489else
7490 ac_have_decl=0
7491fi
7492
7493cat >>confdefs.h <<_ACEOF
7494#define HAVE_DECL_VASPRINTF $ac_have_decl
7495_ACEOF
7496ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 7497if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
7498 ac_have_decl=1
7499else
7500 ac_have_decl=0
7501fi
7502
7503cat >>confdefs.h <<_ACEOF
7504#define HAVE_DECL_SNPRINTF $ac_have_decl
7505_ACEOF
7506ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 7507if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
7508 ac_have_decl=1
7509else
7510 ac_have_decl=0
7511fi
7512
7513cat >>confdefs.h <<_ACEOF
7514#define HAVE_DECL_VSNPRINTF $ac_have_decl
7515_ACEOF
7516
7517 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 7518if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
7519 ac_have_decl=1
7520else
7521 ac_have_decl=0
7522fi
7523
7524cat >>confdefs.h <<_ACEOF
7525#define HAVE_DECL_STRTOL $ac_have_decl
7526_ACEOF
7527ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 7528if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
7529 ac_have_decl=1
7530else
7531 ac_have_decl=0
7532fi
7533
7534cat >>confdefs.h <<_ACEOF
7535#define HAVE_DECL_STRTOUL $ac_have_decl
7536_ACEOF
7537ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 7538if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
7539 ac_have_decl=1
7540else
7541 ac_have_decl=0
7542fi
7543
7544cat >>confdefs.h <<_ACEOF
7545#define HAVE_DECL_STRTOLL $ac_have_decl
7546_ACEOF
7547ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 7548if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
7549 ac_have_decl=1
7550else
7551 ac_have_decl=0
7552fi
7553
7554cat >>confdefs.h <<_ACEOF
7555#define HAVE_DECL_STRTOULL $ac_have_decl
7556_ACEOF
7557
7558 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 7559if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
7560 ac_have_decl=1
7561else
7562 ac_have_decl=0
7563fi
7564
7565cat >>confdefs.h <<_ACEOF
7566#define HAVE_DECL_STRVERSCMP $ac_have_decl
7567_ACEOF
7568
7569
7570
81ecdfbb 7571ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
d0ac1c44 7572if test "x$ac_cv_have_decl_strerror" = xyes; then :
81ecdfbb
RW
7573 ac_have_decl=1
7574else
7575 ac_have_decl=0
7576fi
f450004a 7577
81ecdfbb
RW
7578cat >>confdefs.h <<_ACEOF
7579#define HAVE_DECL_STRERROR $ac_have_decl
7580_ACEOF
7581ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default"
d0ac1c44 7582if test "x$ac_cv_have_decl_perror" = xyes; then :
81ecdfbb
RW
7583 ac_have_decl=1
7584else
7585 ac_have_decl=0
f450004a 7586fi
81ecdfbb
RW
7587
7588cat >>confdefs.h <<_ACEOF
7589#define HAVE_DECL_PERROR $ac_have_decl
7590_ACEOF
bb0116a4 7591ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 7592if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
bb0116a4
JB
7593 ac_have_decl=1
7594else
7595 ac_have_decl=0
7596fi
7597
7598cat >>confdefs.h <<_ACEOF
7599#define HAVE_DECL_VASPRINTF $ac_have_decl
7600_ACEOF
7601ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 7602if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
bb0116a4
JB
7603 ac_have_decl=1
7604else
7605 ac_have_decl=0
7606fi
7607
7608cat >>confdefs.h <<_ACEOF
7609#define HAVE_DECL_VSNPRINTF $ac_have_decl
7610_ACEOF
81ecdfbb
RW
7611
7612
791c0056 7613ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 7614if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
791c0056
GB
7615
7616cat >>confdefs.h <<_ACEOF
7617#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7618_ACEOF
7619
7620
7621fi
7622ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 7623if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
791c0056
GB
7624
7625cat >>confdefs.h <<_ACEOF
7626#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7627_ACEOF
7628
7629
7630fi
7631
7632
3e019bdc
SM
7633# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
7634# Older amd64 Linux's don't have the fs_base and gs_base members of
7635# `struct user_regs_struct'.
f517c180
EA
7636ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
7637#include <sys/user.h>
239b6d10 7638"
d0ac1c44 7639if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
239b6d10
WT
7640
7641cat >>confdefs.h <<_ACEOF
7642#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
7643_ACEOF
7644
7645
7646fi
f517c180
EA
7647ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
7648#include <sys/user.h>
239b6d10 7649"
d0ac1c44 7650if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
239b6d10
WT
7651
7652cat >>confdefs.h <<_ACEOF
7653#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
7654_ACEOF
7655
7656
7657fi
7658
7659
7660
81ecdfbb
RW
7661ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
7662#include <sys/socket.h>
7663
7664"
d0ac1c44 7665if test "x$ac_cv_type_socklen_t" = xyes; then :
f450004a 7666
ccbd4912 7667cat >>confdefs.h <<_ACEOF
f450004a
DJ
7668#define HAVE_SOCKLEN_T 1
7669_ACEOF
7670
f450004a 7671
ccbd4912 7672fi
f450004a 7673
fb1e4ffc 7674
64da5dd5
JB
7675case "${target}" in
7676 *-android*)
7677 # Starting with NDK version 9, <elf.h> actually includes definitions
7678 # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
7679 # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
7680 # leading to conflicts with the defintions from <linux/elf.h>.
7681 # This makes it impossible for us to include both <elf.h> and
7682 # <linux/elf.h>, which means that, in practice, we do not have
7683 # access to Elf32_auxv_t and Elf64_auxv_t on this platform.
7684 # Therefore, do not try to auto-detect availability, as it would
7685 # get it wrong on this platform.
7686 ;;
7687 *)
7688 ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
8365dcf5
TJB
7689
7690"
d0ac1c44 7691if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then :
8365dcf5
TJB
7692
7693cat >>confdefs.h <<_ACEOF
7694#define HAVE_ELF32_AUXV_T 1
7695_ACEOF
7696
7697
7698fi
7699ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h>
7700
7701"
d0ac1c44 7702if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then :
8365dcf5
TJB
7703
7704cat >>confdefs.h <<_ACEOF
7705#define HAVE_ELF64_AUXV_T 1
7706_ACEOF
7707
7708
7709fi
7710
64da5dd5 7711esac
8365dcf5 7712
c16158bc
JM
7713
7714
81ecdfbb
RW
7715# Check whether --with-pkgversion was given.
7716if test "${with_pkgversion+set}" = set; then :
7717 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7718 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7719 no) PKGVERSION= ;;
7720 *) PKGVERSION="($withval) " ;;
7721 esac
7722else
7723 PKGVERSION="(GDB) "
7724
81ecdfbb
RW
7725fi
7726
c16158bc
JM
7727
7728
7729
7730
81ecdfbb
RW
7731# Check whether --with-bugurl was given.
7732if test "${with_bugurl+set}" = set; then :
7733 withval=$with_bugurl; case "$withval" in
d0ac1c44 7734 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7735 no) BUGURL=
7736 ;;
7737 *) BUGURL="$withval"
7738 ;;
7739 esac
7740else
7741 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7742
81ecdfbb
RW
7743fi
7744
c16158bc
JM
7745 case ${BUGURL} in
7746 "")
7747 REPORT_BUGS_TO=
7748 REPORT_BUGS_TEXI=
7749 ;;
7750 *)
7751 REPORT_BUGS_TO="<$BUGURL>"
7752 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7753 ;;
7754 esac;
7755
7756
7757
7758
7759cat >>confdefs.h <<_ACEOF
7760#define PKGVERSION "$PKGVERSION"
7761_ACEOF
7762
7763
7764cat >>confdefs.h <<_ACEOF
7765#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7766_ACEOF
7767
7768
8838b45e
NS
7769# Check for various supplementary target information (beyond the
7770# triplet) which might affect the choices in configure.srv.
7771case "${target}" in
7772 i[34567]86-*-linux*)
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5
7774$as_echo_n "checking if building for x86-64... " >&6; }
d0ac1c44 7775if ${gdb_cv_i386_is_x86_64+:} false; then :
8838b45e
NS
7776 $as_echo_n "(cached) " >&6
7777else
7778 save_CPPFLAGS="$CPPFLAGS"
7779 CPPFLAGS="$CPPFLAGS $CFLAGS"
7780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7781/* end confdefs.h. */
7782
7783#if __x86_64__
7784got it
7785#endif
7786
7787_ACEOF
7788if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7789 $EGREP "got it" >/dev/null 2>&1; then :
7790 gdb_cv_i386_is_x86_64=yes
7791else
7792 gdb_cv_i386_is_x86_64=no
7793fi
7794rm -f conftest*
7795
7796 CPPFLAGS="$save_CPPFLAGS"
7797fi
7798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
7799$as_echo "$gdb_cv_i386_is_x86_64" >&6; }
7800 ;;
201506da
PA
7801
7802 x86_64-*-linux*)
7803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5
7804$as_echo_n "checking if building for x32... " >&6; }
d0ac1c44 7805if ${gdb_cv_x86_is_x32+:} false; then :
201506da
PA
7806 $as_echo_n "(cached) " >&6
7807else
7808 save_CPPFLAGS="$CPPFLAGS"
7809 CPPFLAGS="$CPPFLAGS $CFLAGS"
7810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7811/* end confdefs.h. */
7812
7813#if __x86_64__ && __ILP32__
7814got it
7815#endif
7816
7817_ACEOF
7818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7819 $EGREP "got it" >/dev/null 2>&1; then :
7820 gdb_cv_x86_is_x32=yes
7821else
7822 gdb_cv_x86_is_x32=no
7823fi
7824rm -f conftest*
7825
7826 CPPFLAGS="$save_CPPFLAGS"
7827fi
7828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5
7829$as_echo "$gdb_cv_x86_is_x32" >&6; }
7830 ;;
7831
9ac544ce
MK
7832 m68k-*-*)
7833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5
7834$as_echo_n "checking if building for Coldfire... " >&6; }
d0ac1c44 7835if ${gdb_cv_m68k_is_coldfire+:} false; then :
9ac544ce
MK
7836 $as_echo_n "(cached) " >&6
7837else
7838 save_CPPFLAGS="$CPPFLAGS"
7839 CPPFLAGS="$CPPFLAGS $CFLAGS"
7840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7841/* end confdefs.h. */
7842
7843#ifdef __mcoldfire__
7844got it
7845#endif
7846
7847_ACEOF
7848if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7849 $EGREP "got it" >/dev/null 2>&1; then :
7850 gdb_cv_m68k_is_coldfire=yes
7851else
7852 gdb_cv_m68k_is_coldfire=no
7853fi
7854rm -f conftest*
7855
7856 CPPFLAGS="$save_CPPFLAGS"
7857fi
7858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5
7859$as_echo "$gdb_cv_m68k_is_coldfire" >&6; }
7860 ;;
8838b45e
NS
7861esac
7862
7ea81414 7863. ${srcdir}/configure.srv
d6e9fb05 7864
fb23d554
SDJ
7865# Add in the common host objects.
7866. ${srcdir}/../common/common.host
7867srv_host_obs="$common_host_obs"
7868
68070c10
PA
7869if test "${srv_mingwce}" = "yes"; then
7870 LIBS="$LIBS -lws2"
7871elif test "${srv_mingw}" = "yes"; then
12ea4b69 7872 LIBS="$LIBS -lws2_32"
ac8c974e
AR
7873elif test "${srv_qnx}" = "yes"; then
7874 LIBS="$LIBS -lsocket"
8ed54b31
JB
7875elif test "${srv_lynxos}" = "yes"; then
7876 LIBS="$LIBS -lnetinet"
68070c10
PA
7877fi
7878
7879if test "${srv_mingw}" = "yes"; then
b80864fb 7880
81ecdfbb 7881$as_echo "#define USE_WIN32API 1" >>confdefs.h
b80864fb
DJ
7882
7883fi
7884
58caa3dc 7885if test "${srv_linux_usrregs}" = "yes"; then
f450004a 7886
81ecdfbb 7887$as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h
58caa3dc
DJ
7888
7889fi
7890
7891if test "${srv_linux_regsets}" = "yes"; then
e9d25b98 7892
81ecdfbb 7893$as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h
e9d25b98
DJ
7894
7895
81ecdfbb
RW
7896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
7897$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 7898 if ${gdbsrv_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 7899 $as_echo_n "(cached) " >&6
bec39cab 7900else
81ecdfbb 7901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7902/* end confdefs.h. */
58caa3dc 7903#include <sys/ptrace.h>
bec39cab
AC
7904int
7905main ()
7906{
58caa3dc 7907PTRACE_GETREGS;
bec39cab
AC
7908 ;
7909 return 0;
7910}
7911_ACEOF
81ecdfbb 7912if ac_fn_c_try_compile "$LINENO"; then :
58caa3dc
DJ
7913 gdbsrv_cv_have_ptrace_getregs=yes
7914else
81ecdfbb 7915 gdbsrv_cv_have_ptrace_getregs=no
58caa3dc 7916fi
81ecdfbb 7917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58caa3dc
DJ
7918fi
7919
81ecdfbb
RW
7920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
7921$as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; }
58caa3dc 7922 if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
f450004a 7923
81ecdfbb 7924$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
58caa3dc
DJ
7925
7926 fi
7927
81ecdfbb
RW
7928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
7929$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 7930 if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 7931 $as_echo_n "(cached) " >&6
58caa3dc 7932else
81ecdfbb 7933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7934/* end confdefs.h. */
58caa3dc 7935#include <sys/ptrace.h>
bec39cab
AC
7936int
7937main ()
7938{
58caa3dc 7939PTRACE_GETFPXREGS;
bec39cab
AC
7940 ;
7941 return 0;
7942}
7943_ACEOF
81ecdfbb 7944if ac_fn_c_try_compile "$LINENO"; then :
58caa3dc
DJ
7945 gdbsrv_cv_have_ptrace_getfpxregs=yes
7946else
81ecdfbb 7947 gdbsrv_cv_have_ptrace_getfpxregs=no
58caa3dc 7948fi
81ecdfbb 7949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58caa3dc
DJ
7950fi
7951
81ecdfbb
RW
7952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
7953$as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; }
58caa3dc 7954 if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
f450004a 7955
81ecdfbb 7956$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
58caa3dc
DJ
7957
7958 fi
7959fi
7960
9accd112
MM
7961if test "${srv_linux_btrace}" = "yes"; then
7962
7963$as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h
7964
7965fi
7966
0d62e5e8 7967if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
7968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
7969$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 7970 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 7971 $as_echo_n "(cached) " >&6
0d62e5e8 7972else
81ecdfbb 7973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7974/* end confdefs.h. */
0d62e5e8
DJ
7975
7976#define _SYSCALL32
8e642873
PM
7977/* Needed for new procfs interface on sparc-solaris. */
7978#define _STRUCTURED_PROC 1
0d62e5e8 7979#include <sys/procfs.h>
bec39cab
AC
7980int
7981main ()
7982{
0d62e5e8 7983lwpid_t avar
bec39cab
AC
7984 ;
7985 return 0;
7986}
7987_ACEOF
81ecdfbb 7988if ac_fn_c_try_compile "$LINENO"; then :
0d62e5e8
DJ
7989 bfd_cv_have_sys_procfs_type_lwpid_t=yes
7990else
81ecdfbb 7991 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 7992
0d62e5e8 7993fi
81ecdfbb 7994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0d62e5e8
DJ
7995fi
7996
7997 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 7998
81ecdfbb 7999$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
0d62e5e8
DJ
8000
8001 fi
81ecdfbb
RW
8002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
8003$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
0d62e5e8 8004
81ecdfbb
RW
8005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
8006$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 8007 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 8008 $as_echo_n "(cached) " >&6
0d62e5e8 8009else
81ecdfbb 8010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8011/* end confdefs.h. */
0d62e5e8
DJ
8012
8013#define _SYSCALL32
8e642873
PM
8014/* Needed for new procfs interface on sparc-solaris. */
8015#define _STRUCTURED_PROC 1
0d62e5e8 8016#include <sys/procfs.h>
bec39cab
AC
8017int
8018main ()
8019{
0d62e5e8 8020psaddr_t avar
bec39cab
AC
8021 ;
8022 return 0;
8023}
8024_ACEOF
81ecdfbb 8025if ac_fn_c_try_compile "$LINENO"; then :
0d62e5e8
DJ
8026 bfd_cv_have_sys_procfs_type_psaddr_t=yes
8027else
81ecdfbb 8028 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 8029
0d62e5e8 8030fi
81ecdfbb 8031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0d62e5e8
DJ
8032fi
8033
8034 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 8035
81ecdfbb 8036$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
0d62e5e8
DJ
8037
8038 fi
81ecdfbb
RW
8039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
8040$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
0d62e5e8 8041
81ecdfbb
RW
8042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
8043$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 8044 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 8045 $as_echo_n "(cached) " >&6
0d62e5e8 8046else
81ecdfbb 8047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8048/* end confdefs.h. */
0d62e5e8
DJ
8049
8050#define _SYSCALL32
8e642873
PM
8051/* Needed for new procfs interface on sparc-solaris. */
8052#define _STRUCTURED_PROC 1
0d62e5e8 8053#include <sys/procfs.h>
bec39cab
AC
8054int
8055main ()
8056{
0d62e5e8 8057prgregset_t avar
bec39cab
AC
8058 ;
8059 return 0;
8060}
8061_ACEOF
81ecdfbb 8062if ac_fn_c_try_compile "$LINENO"; then :
0d62e5e8
DJ
8063 bfd_cv_have_sys_procfs_type_prgregset_t=yes
8064else
81ecdfbb 8065 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 8066
0d62e5e8 8067fi
81ecdfbb 8068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0d62e5e8
DJ
8069fi
8070
8071 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 8072
81ecdfbb 8073$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
0d62e5e8
DJ
8074
8075 fi
81ecdfbb
RW
8076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
8077$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
0d62e5e8 8078
1041a03c
JB
8079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
8080$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 8081 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
1041a03c
JB
8082 $as_echo_n "(cached) " >&6
8083else
8084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8085/* end confdefs.h. */
8086
8087#define _SYSCALL32
8088/* Needed for new procfs interface on sparc-solaris. */
8089#define _STRUCTURED_PROC 1
8090#include <sys/procfs.h>
8091int
8092main ()
8093{
8094prfpregset_t avar
8095 ;
8096 return 0;
8097}
8098_ACEOF
8099if ac_fn_c_try_compile "$LINENO"; then :
8100 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
8101else
8102 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8103
8104fi
8105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8106fi
8107
8108 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8109
8110$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
8111
8112 fi
8113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
8114$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
8115
81ecdfbb
RW
8116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
8117$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 8118 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
81ecdfbb 8119 $as_echo_n "(cached) " >&6
0d62e5e8 8120else
81ecdfbb 8121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8122/* end confdefs.h. */
0d62e5e8
DJ
8123
8124#define _SYSCALL32
8e642873
PM
8125/* Needed for new procfs interface on sparc-solaris. */
8126#define _STRUCTURED_PROC 1
0d62e5e8 8127#include <sys/procfs.h>
bec39cab
AC
8128int
8129main ()
8130{
0d62e5e8 8131elf_fpregset_t avar
bec39cab
AC
8132 ;
8133 return 0;
8134}
8135_ACEOF
81ecdfbb 8136if ac_fn_c_try_compile "$LINENO"; then :
0d62e5e8
DJ
8137 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
8138else
81ecdfbb 8139 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
bec39cab 8140
0d62e5e8 8141fi
81ecdfbb 8142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0d62e5e8
DJ
8143fi
8144
8145 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
bec39cab 8146
81ecdfbb 8147$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
0d62e5e8
DJ
8148
8149 fi
81ecdfbb
RW
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
8151$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
0d62e5e8
DJ
8152
8153fi
8154
18f5fd81
TJB
8155if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
8157$as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
d0ac1c44 8158 if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
18f5fd81
TJB
8159 $as_echo_n "(cached) " >&6
8160else
8161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8162/* end confdefs.h. */
8163
8164#include <thread_db.h>
8165int
8166main ()
8167{
8168lwpid_t avar
8169 ;
8170 return 0;
8171}
8172_ACEOF
8173if ac_fn_c_try_compile "$LINENO"; then :
8174 gdbserver_cv_have_thread_db_type_lwpid_t=yes
8175else
8176 gdbserver_cv_have_thread_db_type_lwpid_t=no
8177
8178fi
8179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8180fi
8181
8182 if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
8183
8184$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
8185
8186 fi
8187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
8188$as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
8189
8190fi
8191
8192if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
8193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
8194$as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
d0ac1c44 8195 if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
18f5fd81
TJB
8196 $as_echo_n "(cached) " >&6
8197else
8198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8199/* end confdefs.h. */
8200
8201#include <thread_db.h>
8202int
8203main ()
8204{
8205psaddr_t avar
8206 ;
8207 return 0;
8208}
8209_ACEOF
8210if ac_fn_c_try_compile "$LINENO"; then :
8211 gdbserver_cv_have_thread_db_type_psaddr_t=yes
8212else
8213 gdbserver_cv_have_thread_db_type_psaddr_t=no
8214
8215fi
8216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8217fi
8218
8219 if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
8220
8221$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
8222
8223 fi
8224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
8225$as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
8226
8227fi
8228
193f13e6
MK
8229old_LIBS="$LIBS"
8230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8231$as_echo_n "checking for dlopen in -ldl... " >&6; }
d0ac1c44 8232if ${ac_cv_lib_dl_dlopen+:} false; then :
193f13e6
MK
8233 $as_echo_n "(cached) " >&6
8234else
8235 ac_check_lib_save_LIBS=$LIBS
8236LIBS="-ldl $LIBS"
8237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8238/* end confdefs.h. */
8239
8240/* Override any GCC internal prototype to avoid an error.
8241 Use char because int might match the return type of a GCC
8242 builtin and then its argument prototype would still apply. */
8243#ifdef __cplusplus
8244extern "C"
8245#endif
8246char dlopen ();
8247int
8248main ()
8249{
8250return dlopen ();
8251 ;
8252 return 0;
8253}
8254_ACEOF
8255if ac_fn_c_try_link "$LINENO"; then :
8256 ac_cv_lib_dl_dlopen=yes
8257else
8258 ac_cv_lib_dl_dlopen=no
8259fi
8260rm -f core conftest.err conftest.$ac_objext \
8261 conftest$ac_exeext conftest.$ac_ext
8262LIBS=$ac_check_lib_save_LIBS
8263fi
8264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8265$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
d0ac1c44 8266if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
193f13e6
MK
8267 cat >>confdefs.h <<_ACEOF
8268#define HAVE_LIBDL 1
8269_ACEOF
8270
8271 LIBS="-ldl $LIBS"
8272
8273fi
8274
8275LIBS="$old_LIBS"
8276
0d62e5e8
DJ
8277srv_thread_depfiles=
8278srv_libs=
0d62e5e8
DJ
8279
8280if test "$srv_linux_thread_db" = "yes"; then
193f13e6
MK
8281 if test "$ac_cv_lib_dl_dlopen" = "yes"; then
8282 srv_libs="-ldl"
f6528abd
JK
8283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
8284$as_echo_n "checking for the dynamic export flag... " >&6; }
193f13e6 8285 old_LDFLAGS="$LDFLAGS"
f6528abd
JK
8286 # Older GNU ld supports --export-dynamic but --dynamic-list may not be
8287 # supported there.
8288 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
8289 LDFLAGS="$LDFLAGS $RDYNAMIC"
193f13e6 8290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
8291/* end confdefs.h. */
8292
8293int
8294main ()
8295{
8296
8297 ;
8298 return 0;
8299}
8300_ACEOF
81ecdfbb 8301if ac_fn_c_try_link "$LINENO"; then :
f6528abd
JK
8302 found="-Wl,--dynamic-list"
8303 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6de3c42 8304else
f6528abd
JK
8305 RDYNAMIC="-rdynamic"
8306 LDFLAGS="$old_LDFLAGS $RDYNAMIC"
8307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8308/* end confdefs.h. */
8309
8310int
8311main ()
8312{
8313
8314 ;
8315 return 0;
8316}
8317_ACEOF
8318if ac_fn_c_try_link "$LINENO"; then :
8319 found="-rdynamic"
8320else
8321 found="no"
8322 RDYNAMIC=""
770d76d7
PA
8323fi
8324rm -f core conftest.err conftest.$ac_objext \
8325 conftest$ac_exeext conftest.$ac_ext
8326fi
8327rm -f core conftest.err conftest.$ac_objext \
8328 conftest$ac_exeext conftest.$ac_ext
8329
8330 LDFLAGS="$old_LDFLAGS"
8331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
8332$as_echo "$found" >&6; }
8333 else
8334 srv_libs="-lthread_db"
8335 fi
55a8c076 8336
770d76d7 8337 srv_thread_depfiles="thread-db.o proc-service.o"
7d4e5717
PA
8338
8339$as_echo "#define USE_THREAD_DB 1" >>confdefs.h
8340
770d76d7
PA
8341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5
8342$as_echo_n "checking for TD_VERSION... " >&6; }
d0ac1c44 8343if ${gdbsrv_cv_have_td_version+:} false; then :
770d76d7
PA
8344 $as_echo_n "(cached) " >&6
8345else
8346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8347/* end confdefs.h. */
8348#include <thread_db.h>
55a8c076
YQ
8349int
8350main ()
8351{
770d76d7 8352TD_VERSION;
c9a1864a
YQ
8353 ;
8354 return 0;
8355}
8356_ACEOF
55a8c076 8357if ac_fn_c_try_compile "$LINENO"; then :
770d76d7 8358 gdbsrv_cv_have_td_version=yes
c9a1864a 8359else
770d76d7
PA
8360 gdbsrv_cv_have_td_version=no
8361fi
8362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8363fi
8364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
8365$as_echo "$gdbsrv_cv_have_td_version" >&6; }
8366 if test $gdbsrv_cv_have_td_version = yes; then
c9a1864a 8367
770d76d7 8368$as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h
55a8c076 8369
770d76d7
PA
8370 fi
8371fi
c9a1864a
YQ
8372
8373
770d76d7
PA
8374# Check whether --with-libthread-db was given.
8375if test "${with_libthread_db+set}" = set; then :
8376 withval=$with_libthread_db; srv_libthread_db_path="${withval}"
8377 srv_libs="$srv_libthread_db_path"
c9a1864a 8378
770d76d7 8379fi
c9a1864a
YQ
8380
8381
770d76d7 8382if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then
c9a1864a 8383
770d76d7 8384$as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h
c9a1864a 8385
55a8c076 8386fi
c9a1864a 8387
770d76d7
PA
8388if test "$srv_xmlfiles" != ""; then
8389 srv_xmlbuiltin="xml-builtin.o"
c9a1864a 8390
770d76d7 8391$as_echo "#define USE_XML 1" >>confdefs.h
c9a1864a 8392
c9a1864a 8393
770d76d7
PA
8394 tmp_xmlfiles=$srv_xmlfiles
8395 srv_xmlfiles=""
8396 for f in $tmp_xmlfiles; do
8397 srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f"
8398 done
c9a1864a
YQ
8399fi
8400
605fd3c6 8401GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles $srv_host_obs $srv_selftest_objs"
770d76d7 8402GDBSERVER_LIBS="$srv_libs"
c9a1864a 8403
770d76d7
PA
8404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5
8405$as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; }
d0ac1c44 8406if ${gdbsrv_cv_have_sync_builtins+:} false; then :
770d76d7
PA
8407 $as_echo_n "(cached) " >&6
8408else
c9a1864a 8409
770d76d7
PA
8410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8411/* end confdefs.h. */
c9a1864a 8412
770d76d7
PA
8413int
8414main ()
8415{
8416int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);
8417 ;
8418 return 0;
8419}
8420_ACEOF
8421if ac_fn_c_try_link "$LINENO"; then :
8422 gdbsrv_cv_have_sync_builtins=yes
8423else
c971b7fa 8424 gdbsrv_cv_have_sync_builtins=no
c9a1864a 8425fi
c971b7fa
PA
8426rm -f core conftest.err conftest.$ac_objext \
8427 conftest$ac_exeext conftest.$ac_ext
c9a1864a 8428fi
c971b7fa
PA
8429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
8430$as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
8431if test $gdbsrv_cv_have_sync_builtins = yes; then
8432
8433$as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h
8434
c9a1864a
YQ
8435fi
8436
c971b7fa
PA
8437saved_cflags="$CFLAGS"
8438CFLAGS="$CFLAGS -fvisibility=hidden"
8439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8440/* end confdefs.h. */
c9a1864a 8441
c971b7fa
PA
8442int
8443main ()
8444{
c9a1864a 8445
c971b7fa
PA
8446 ;
8447 return 0;
8448}
c9a1864a 8449_ACEOF
c971b7fa
PA
8450if ac_fn_c_try_compile "$LINENO"; then :
8451 gdbsrv_cv_have_visibility_hidden=yes
8452else
8453 gdbsrv_cv_have_visibility_hidden=no
c9a1864a 8454fi
c971b7fa
PA
8455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8456CFLAGS="$saved_cflags"
8457
8458ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
8459"
d0ac1c44 8460if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
c971b7fa 8461 ac_have_decl=1
c9a1864a 8462else
c971b7fa 8463 ac_have_decl=0
c9a1864a
YQ
8464fi
8465
c971b7fa
PA
8466cat >>confdefs.h <<_ACEOF
8467#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
8468_ACEOF
c9a1864a 8469
c9a1864a 8470
c971b7fa
PA
8471if test "$cross_compiling" = yes; then :
8472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8473/* end confdefs.h. */
8474#include <sys/personality.h>
8475int
8476main ()
8477{
fb1e4ffc 8478
c971b7fa
PA
8479# if !HAVE_DECL_ADDR_NO_RANDOMIZE
8480# define ADDR_NO_RANDOMIZE 0x0040000
8481# endif
8482 /* Test the flag could be set and stays set. */
8483 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
8484 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
8485 return 1
8486 ;
8487 return 0;
8488}
8489_ACEOF
8490if ac_fn_c_try_link "$LINENO"; then :
8491 gdbsrv_cv_have_personality=true
fa593d66 8492else
c971b7fa 8493 gdbsrv_cv_have_personality=false
c9a1864a 8494fi
c971b7fa
PA
8495rm -f core conftest.err conftest.$ac_objext \
8496 conftest$ac_exeext conftest.$ac_ext
8497else
8498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8499/* end confdefs.h. */
8500#include <sys/personality.h>
8501int
8502main ()
8503{
fa593d66 8504
c971b7fa
PA
8505# if !HAVE_DECL_ADDR_NO_RANDOMIZE
8506# define ADDR_NO_RANDOMIZE 0x0040000
8507# endif
8508 /* Test the flag could be set and stays set. */
8509 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
8510 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
8511 return 1
8512 ;
8513 return 0;
8514}
8515_ACEOF
8516if ac_fn_c_try_run "$LINENO"; then :
8517 gdbsrv_cv_have_personality=true
8518else
8519 gdbsrv_cv_have_personality=false
fa593d66 8520fi
c971b7fa
PA
8521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8522 conftest.$ac_objext conftest.beam conftest.$ac_ext
fa593d66 8523fi
fa593d66 8524
c971b7fa
PA
8525if $gdbsrv_cv_have_personality
8526then
fa593d66 8527
c971b7fa 8528$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
03583c20 8529
c971b7fa 8530fi
03583c20 8531
03583c20 8532
c971b7fa
PA
8533IPA_DEPFILES=""
8534extra_libraries=""
c2a66c29 8535
c971b7fa
PA
8536# check whether to enable the inprocess agent
8537if test "$ipa_obj" != "" \
8538 -a "$gdbsrv_cv_have_sync_builtins" = yes \
8539 -a "$gdbsrv_cv_have_visibility_hidden" = yes; then
8540 have_ipa=true
8541else
8542 have_ipa=false
8543fi
fa593d66 8544
c971b7fa
PA
8545# Check whether --enable-inprocess-agent was given.
8546if test "${enable_inprocess_agent+set}" = set; then :
8547 enableval=$enable_inprocess_agent; case "$enableval" in
8548 yes) want_ipa=true ;;
8549 no) want_ipa=false ;;
d0ac1c44 8550 *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;;
c971b7fa
PA
8551esac
8552else
8553 want_ipa=$have_ipa
8554fi
c2a66c29 8555
c9a1864a 8556
c971b7fa
PA
8557if $want_ipa ; then
8558 if $have_ipa ; then
8559 IPA_DEPFILES="$ipa_obj"
8560 extra_libraries="$extra_libraries libinproctrace.so"
8561 else
d0ac1c44 8562 as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5
c971b7fa
PA
8563 fi
8564fi
c9a1864a 8565
c9a1864a 8566
c2a66c29
NS
8567
8568
fa593d66
PA
8569
8570
8571
0d62e5e8 8572
c971b7fa 8573GNULIB=build-gnulib-gdbserver/import
d6e9fb05 8574
c9a1864a
YQ
8575GNULIB_STDINT_H=
8576if test x"$STDINT_H" != x; then
c971b7fa 8577 GNULIB_STDINT_H=$GNULIB/$STDINT_H
c9a1864a 8578fi
d6e9fb05 8579
fb1e4ffc 8580
c971b7fa 8581ac_config_files="$ac_config_files Makefile"
81ecdfbb 8582
81ecdfbb 8583
bec39cab 8584cat >confcache <<\_ACEOF
d6e9fb05
JK
8585# This file is a shell script that caches the results of configure
8586# tests run on this system so they can be shared between configure
bec39cab
AC
8587# scripts and configure runs, see configure's option --config-cache.
8588# It is not useful on other systems. If it contains results you don't
8589# want to keep, you may remove or edit it.
d6e9fb05 8590#
bec39cab
AC
8591# config.status only pays attention to the cache file if you give it
8592# the --recheck option to rerun configure.
d6e9fb05 8593#
bec39cab
AC
8594# `ac_cv_env_foo' variables (set or unset) will be overridden when
8595# loading this file, other *unset* `ac_cv_foo' will be assigned the
8596# following values.
8597
8598_ACEOF
8599
d6e9fb05
JK
8600# The following way of writing the cache mishandles newlines in values,
8601# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 8602# So, we kill variables containing newlines.
d6e9fb05
JK
8603# Ultrix sh set writes to stderr and can't be redirected directly,
8604# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
8605(
8606 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
8607 eval ac_val=\$$ac_var
8608 case $ac_val in #(
8609 *${as_nl}*)
8610 case $ac_var in #(
8611 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
8612$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
8613 esac
8614 case $ac_var in #(
8615 _ | IFS | as_nl) ;; #(
8616 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
8617 *) { eval $ac_var=; unset $ac_var;} ;;
8618 esac ;;
8619 esac
8620 done
8621
bec39cab 8622 (set) 2>&1 |
81ecdfbb
RW
8623 case $as_nl`(ac_space=' '; set) 2>&1` in #(
8624 *${as_nl}ac_space=\ *)
8625 # `set' does not quote correctly, so add quotes: double-quote
8626 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
8627 sed -n \
8628 "s/'/'\\\\''/g;
8629 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 8630 ;; #(
bec39cab
AC
8631 *)
8632 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 8633 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 8634 ;;
81ecdfbb
RW
8635 esac |
8636 sort
8637) |
bec39cab 8638 sed '
81ecdfbb 8639 /^ac_cv_env_/b end
bec39cab 8640 t clear
81ecdfbb 8641 :clear
bec39cab
AC
8642 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
8643 t end
81ecdfbb
RW
8644 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
8645 :end' >>confcache
8646if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
8647 if test -w "$cache_file"; then
d0ac1c44 8648 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
8649 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
8650$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
8651 if test ! -f "$cache_file" || test -h "$cache_file"; then
8652 cat confcache >"$cache_file"
8653 else
8654 case $cache_file in #(
8655 */* | ?:*)
8656 mv -f confcache "$cache_file"$$ &&
8657 mv -f "$cache_file"$$ "$cache_file" ;; #(
8658 *)
8659 mv -f confcache "$cache_file" ;;
8660 esac
8661 fi
8662 fi
d6e9fb05 8663 else
81ecdfbb
RW
8664 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
8665$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
d6e9fb05
JK
8666 fi
8667fi
8668rm -f confcache
8669
d6e9fb05
JK
8670test "x$prefix" = xNONE && prefix=$ac_default_prefix
8671# Let make expand exec_prefix.
8672test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8673
84563040 8674DEFS=-DHAVE_CONFIG_H
d6e9fb05 8675
bec39cab
AC
8676ac_libobjs=
8677ac_ltlibobjs=
d0ac1c44 8678U=
bec39cab
AC
8679for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
8680 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
8681 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
8682 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
8683 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
8684 # will be set to the directory where LIBOBJS objects are built.
8685 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
8686 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
8687done
8688LIBOBJS=$ac_libobjs
d6e9fb05 8689
bec39cab
AC
8690LTLIBOBJS=$ac_ltlibobjs
8691
8692
c9a1864a 8693if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 8694 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c9a1864a
YQ
8695Usually this means the macro was only invoked conditionally." "$LINENO" 5
8696fi
bec39cab 8697
d0ac1c44 8698: "${CONFIG_STATUS=./config.status}"
81ecdfbb 8699ac_write_fail=0
bec39cab
AC
8700ac_clean_files_save=$ac_clean_files
8701ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
8702{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
8703$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
8704as_write_fail=0
8705cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
8706#! $SHELL
8707# Generated by $as_me.
d6e9fb05 8708# Run this file to recreate the current configuration.
d6e9fb05 8709# Compiler output produced by configure, useful for debugging
bec39cab
AC
8710# configure, is in config.log if it exists.
8711
8712debug=false
8713ac_cs_recheck=false
8714ac_cs_silent=false
bec39cab 8715
81ecdfbb
RW
8716SHELL=\${CONFIG_SHELL-$SHELL}
8717export SHELL
8718_ASEOF
8719cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
8720## -------------------- ##
8721## M4sh Initialization. ##
8722## -------------------- ##
8723
8724# Be more Bourne compatible
8725DUALCASE=1; export DUALCASE # for MKS sh
8726if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
8727 emulate sh
8728 NULLCMD=:
81ecdfbb 8729 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
8730 # is contrary to our usage. Disable this feature.
8731 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
8732 setopt NO_GLOB_SUBST
8733else
8734 case `(set -o) 2>/dev/null` in #(
8735 *posix*) :
8736 set -o posix ;; #(
8737 *) :
8738 ;;
8739esac
bec39cab 8740fi
d6e9fb05 8741
81ecdfbb
RW
8742
8743as_nl='
8744'
8745export as_nl
8746# Printing a long string crashes Solaris 7 /usr/bin/printf.
8747as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
8748as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
8749as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
8750# Prefer a ksh shell builtin over an external printf program on Solaris,
8751# but without wasting forks for bash or zsh.
8752if test -z "$BASH_VERSION$ZSH_VERSION" \
8753 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
8754 as_echo='print -r --'
8755 as_echo_n='print -rn --'
8756elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
8757 as_echo='printf %s\n'
8758 as_echo_n='printf %s'
bec39cab 8759else
81ecdfbb
RW
8760 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
8761 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
8762 as_echo_n='/usr/ucb/echo -n'
8763 else
8764 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
8765 as_echo_n_body='eval
8766 arg=$1;
8767 case $arg in #(
8768 *"$as_nl"*)
8769 expr "X$arg" : "X\\(.*\\)$as_nl";
8770 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
8771 esac;
8772 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
8773 '
8774 export as_echo_n_body
8775 as_echo_n='sh -c $as_echo_n_body as_echo'
8776 fi
8777 export as_echo_body
8778 as_echo='sh -c $as_echo_body as_echo'
8779fi
8780
8781# The user is always right.
8782if test "${PATH_SEPARATOR+set}" != set; then
8783 PATH_SEPARATOR=:
8784 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
8785 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
8786 PATH_SEPARATOR=';'
8787 }
bec39cab
AC
8788fi
8789
8790
81ecdfbb
RW
8791# IFS
8792# We need space, tab and new line, in precisely that order. Quoting is
8793# there to prevent editors from complaining about space-tab.
8794# (If _AS_PATH_WALK were called with IFS unset, it would disable word
8795# splitting by setting IFS to empty value.)
8796IFS=" "" $as_nl"
8797
8798# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 8799as_myself=
81ecdfbb
RW
8800case $0 in #((
8801 *[\\/]* ) as_myself=$0 ;;
8802 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8803for as_dir in $PATH
8804do
8805 IFS=$as_save_IFS
8806 test -z "$as_dir" && as_dir=.
8807 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
8808 done
8809IFS=$as_save_IFS
8810
8811 ;;
8812esac
8813# We did not find ourselves, most probably we were run as `sh COMMAND'
8814# in which case we are not to be found in the path.
8815if test "x$as_myself" = x; then
8816 as_myself=$0
8817fi
8818if test ! -f "$as_myself"; then
8819 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
8820 exit 1
8821fi
8822
8823# Unset variables that we do not need and which cause bugs (e.g. in
8824# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
8825# suppresses any "Segmentation fault" message there. '((' could
8826# trigger a bug in pdksh 5.2.14.
8827for as_var in BASH_ENV ENV MAIL MAILPATH
8828do eval test x\${$as_var+set} = xset \
8829 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
8830done
bec39cab
AC
8831PS1='$ '
8832PS2='> '
8833PS4='+ '
8834
8835# NLS nuisances.
81ecdfbb
RW
8836LC_ALL=C
8837export LC_ALL
8838LANGUAGE=C
8839export LANGUAGE
8840
8841# CDPATH.
8842(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
8843
8844
d0ac1c44
SM
8845# as_fn_error STATUS ERROR [LINENO LOG_FD]
8846# ----------------------------------------
81ecdfbb
RW
8847# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
8848# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 8849# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
8850as_fn_error ()
8851{
d0ac1c44
SM
8852 as_status=$1; test $as_status -eq 0 && as_status=1
8853 if test "$4"; then
8854 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
8855 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
bec39cab 8856 fi
d0ac1c44 8857 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
8858 as_fn_exit $as_status
8859} # as_fn_error
8860
8861
8862# as_fn_set_status STATUS
8863# -----------------------
8864# Set $? to STATUS, without forking.
8865as_fn_set_status ()
8866{
8867 return $1
8868} # as_fn_set_status
8869
8870# as_fn_exit STATUS
8871# -----------------
8872# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
8873as_fn_exit ()
8874{
8875 set +e
8876 as_fn_set_status $1
8877 exit $1
8878} # as_fn_exit
8879
8880# as_fn_unset VAR
8881# ---------------
8882# Portably unset VAR.
8883as_fn_unset ()
8884{
8885 { eval $1=; unset $1;}
8886}
8887as_unset=as_fn_unset
8888# as_fn_append VAR VALUE
8889# ----------------------
8890# Append the text in VALUE to the end of the definition contained in VAR. Take
8891# advantage of any shell optimizations that allow amortized linear growth over
8892# repeated appends, instead of the typical quadratic growth present in naive
8893# implementations.
8894if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
8895 eval 'as_fn_append ()
8896 {
8897 eval $1+=\$2
8898 }'
8899else
8900 as_fn_append ()
8901 {
8902 eval $1=\$$1\$2
8903 }
8904fi # as_fn_append
8905
8906# as_fn_arith ARG...
8907# ------------------
8908# Perform arithmetic evaluation on the ARGs, and store the result in the
8909# global $as_val. Take advantage of shells that can avoid forks. The arguments
8910# must be portable across $(()) and expr.
8911if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
8912 eval 'as_fn_arith ()
8913 {
8914 as_val=$(( $* ))
8915 }'
8916else
8917 as_fn_arith ()
8918 {
8919 as_val=`expr "$@" || test $? -eq 1`
8920 }
8921fi # as_fn_arith
8922
d6e9fb05 8923
81ecdfbb
RW
8924if expr a : '\(a\)' >/dev/null 2>&1 &&
8925 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
8926 as_expr=expr
8927else
8928 as_expr=false
8929fi
d6e9fb05 8930
81ecdfbb 8931if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
8932 as_basename=basename
8933else
8934 as_basename=false
8935fi
d6e9fb05 8936
81ecdfbb
RW
8937if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
8938 as_dirname=dirname
8939else
8940 as_dirname=false
8941fi
d6e9fb05 8942
81ecdfbb 8943as_me=`$as_basename -- "$0" ||
bec39cab
AC
8944$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
8945 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
8946 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
8947$as_echo X/"$0" |
8948 sed '/^.*\/\([^/][^/]*\)\/*$/{
8949 s//\1/
8950 q
8951 }
8952 /^X\/\(\/\/\)$/{
8953 s//\1/
8954 q
8955 }
8956 /^X\/\(\/\).*/{
8957 s//\1/
8958 q
8959 }
8960 s/.*/./; q'`
bec39cab 8961
dae5f5cf
DJ
8962# Avoid depending upon Character Ranges.
8963as_cr_letters='abcdefghijklmnopqrstuvwxyz'
8964as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
8965as_cr_Letters=$as_cr_letters$as_cr_LETTERS
8966as_cr_digits='0123456789'
8967as_cr_alnum=$as_cr_Letters$as_cr_digits
8968
81ecdfbb
RW
8969ECHO_C= ECHO_N= ECHO_T=
8970case `echo -n x` in #(((((
8971-n*)
8972 case `echo 'xy\c'` in
8973 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
8974 xy) ECHO_C='\c';;
8975 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
8976 ECHO_T=' ';;
8977 esac;;
8978*)
8979 ECHO_N='-n';;
bec39cab
AC
8980esac
8981
81ecdfbb
RW
8982rm -f conf$$ conf$$.exe conf$$.file
8983if test -d conf$$.dir; then
8984 rm -f conf$$.dir/conf$$.file
bec39cab 8985else
81ecdfbb
RW
8986 rm -f conf$$.dir
8987 mkdir conf$$.dir 2>/dev/null
bec39cab 8988fi
81ecdfbb
RW
8989if (echo >conf$$.file) 2>/dev/null; then
8990 if ln -s conf$$.file conf$$ 2>/dev/null; then
dae5f5cf 8991 as_ln_s='ln -s'
81ecdfbb
RW
8992 # ... but there are two gotchas:
8993 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
8994 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 8995 # In both cases, we have to default to `cp -pR'.
81ecdfbb 8996 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 8997 as_ln_s='cp -pR'
81ecdfbb
RW
8998 elif ln conf$$.file conf$$ 2>/dev/null; then
8999 as_ln_s=ln
9000 else
d0ac1c44 9001 as_ln_s='cp -pR'
dae5f5cf 9002 fi
bec39cab 9003else
d0ac1c44 9004 as_ln_s='cp -pR'
bec39cab 9005fi
81ecdfbb
RW
9006rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
9007rmdir conf$$.dir 2>/dev/null
9008
9009
9010# as_fn_mkdir_p
9011# -------------
9012# Create "$as_dir" as a directory, including parents if necessary.
9013as_fn_mkdir_p ()
9014{
9015
9016 case $as_dir in #(
9017 -*) as_dir=./$as_dir;;
9018 esac
9019 test -d "$as_dir" || eval $as_mkdir_p || {
9020 as_dirs=
9021 while :; do
9022 case $as_dir in #(
9023 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
9024 *) as_qdir=$as_dir;;
9025 esac
9026 as_dirs="'$as_qdir' $as_dirs"
9027 as_dir=`$as_dirname -- "$as_dir" ||
9028$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9029 X"$as_dir" : 'X\(//\)[^/]' \| \
9030 X"$as_dir" : 'X\(//\)$' \| \
9031 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
9032$as_echo X"$as_dir" |
9033 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9034 s//\1/
9035 q
9036 }
9037 /^X\(\/\/\)[^/].*/{
9038 s//\1/
9039 q
9040 }
9041 /^X\(\/\/\)$/{
9042 s//\1/
9043 q
9044 }
9045 /^X\(\/\).*/{
9046 s//\1/
9047 q
9048 }
9049 s/.*/./; q'`
9050 test -d "$as_dir" && break
9051 done
9052 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 9053 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
bec39cab 9054
81ecdfbb
RW
9055
9056} # as_fn_mkdir_p
bec39cab 9057if mkdir -p . 2>/dev/null; then
81ecdfbb 9058 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
9059else
9060 test -d ./-p && rmdir ./-p
9061 as_mkdir_p=false
9062fi
9063
d0ac1c44
SM
9064
9065# as_fn_executable_p FILE
9066# -----------------------
9067# Test if FILE is an executable regular file.
9068as_fn_executable_p ()
9069{
9070 test -f "$1" && test -x "$1"
9071} # as_fn_executable_p
9072as_test_x='test -x'
9073as_executable_p=as_fn_executable_p
bec39cab
AC
9074
9075# Sed expression to map a string onto a valid CPP name.
9076as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
9077
9078# Sed expression to map a string onto a valid variable name.
9079as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
9080
9081
bec39cab 9082exec 6>&1
81ecdfbb
RW
9083## ----------------------------------- ##
9084## Main body of $CONFIG_STATUS script. ##
9085## ----------------------------------- ##
9086_ASEOF
9087test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
9088
9089cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9090# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 9091# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
9092# values after options handling.
9093ac_log="
bec39cab 9094This file was extended by $as_me, which was
d0ac1c44 9095generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
9096
9097 CONFIG_FILES = $CONFIG_FILES
9098 CONFIG_HEADERS = $CONFIG_HEADERS
9099 CONFIG_LINKS = $CONFIG_LINKS
9100 CONFIG_COMMANDS = $CONFIG_COMMANDS
9101 $ $0 $@
9102
81ecdfbb
RW
9103on `(hostname || uname -n) 2>/dev/null | sed 1q`
9104"
9105
bec39cab
AC
9106_ACEOF
9107
81ecdfbb
RW
9108case $ac_config_files in *"
9109"*) set x $ac_config_files; shift; ac_config_files=$*;;
9110esac
bec39cab 9111
81ecdfbb
RW
9112case $ac_config_headers in *"
9113"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
9114esac
dae5f5cf 9115
dae5f5cf 9116
81ecdfbb
RW
9117cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9118# Files that config.status was made for.
9119config_files="$ac_config_files"
9120config_headers="$ac_config_headers"
9121config_commands="$ac_config_commands"
bec39cab 9122
81ecdfbb 9123_ACEOF
dae5f5cf 9124
81ecdfbb 9125cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 9126ac_cs_usage="\
81ecdfbb
RW
9127\`$as_me' instantiates files and other configuration actions
9128from templates according to the current configuration. Unless the files
9129and actions are specified as TAGs, all are instantiated by default.
bec39cab 9130
81ecdfbb 9131Usage: $0 [OPTION]... [TAG]...
bec39cab
AC
9132
9133 -h, --help print this help, then exit
81ecdfbb 9134 -V, --version print version number and configuration settings, then exit
d0ac1c44 9135 --config print configuration, then exit
81ecdfbb
RW
9136 -q, --quiet, --silent
9137 do not print progress messages
bec39cab
AC
9138 -d, --debug don't remove temporary files
9139 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
9140 --file=FILE[:TEMPLATE]
9141 instantiate the configuration file FILE
9142 --header=FILE[:TEMPLATE]
9143 instantiate the configuration header FILE
bec39cab
AC
9144
9145Configuration files:
9146$config_files
9147
9148Configuration headers:
9149$config_headers
9150
9151Configuration commands:
9152$config_commands
9153
81ecdfbb 9154Report bugs to the package provider."
dae5f5cf 9155
81ecdfbb
RW
9156_ACEOF
9157cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 9158ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
9159ac_cs_version="\\
9160config.status
d0ac1c44
SM
9161configured by $0, generated by GNU Autoconf 2.69,
9162 with options \\"\$ac_cs_config\\"
bec39cab 9163
d0ac1c44 9164Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
9165This config.status script is free software; the Free Software Foundation
9166gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
9167
9168ac_pwd='$ac_pwd'
9169srcdir='$srcdir'
9170INSTALL='$INSTALL'
9171test -n "\$AWK" || AWK=awk
bec39cab
AC
9172_ACEOF
9173
81ecdfbb
RW
9174cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9175# The default lists apply if the user does not specify any file.
bec39cab
AC
9176ac_need_defaults=:
9177while test $# != 0
9178do
9179 case $1 in
d0ac1c44 9180 --*=?*)
81ecdfbb
RW
9181 ac_option=`expr "X$1" : 'X\([^=]*\)='`
9182 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab
AC
9183 ac_shift=:
9184 ;;
d0ac1c44
SM
9185 --*=)
9186 ac_option=`expr "X$1" : 'X\([^=]*\)='`
9187 ac_optarg=
9188 ac_shift=:
9189 ;;
81ecdfbb 9190 *)
bec39cab
AC
9191 ac_option=$1
9192 ac_optarg=$2
9193 ac_shift=shift
9194 ;;
bec39cab
AC
9195 esac
9196
9197 case $ac_option in
9198 # Handling of the options.
bec39cab
AC
9199 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9200 ac_cs_recheck=: ;;
81ecdfbb
RW
9201 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
9202 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
9203 --config | --confi | --conf | --con | --co | --c )
9204 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 9205 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
9206 debug=: ;;
9207 --file | --fil | --fi | --f )
9208 $ac_shift
81ecdfbb
RW
9209 case $ac_optarg in
9210 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 9211 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
9212 esac
9213 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
9214 ac_need_defaults=false;;
9215 --header | --heade | --head | --hea )
9216 $ac_shift
81ecdfbb
RW
9217 case $ac_optarg in
9218 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9219 esac
9220 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 9221 ac_need_defaults=false;;
81ecdfbb
RW
9222 --he | --h)
9223 # Conflict between --help and --header
d0ac1c44 9224 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
9225Try \`$0 --help' for more information.";;
9226 --help | --hel | -h )
9227 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
9228 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9229 | -silent | --silent | --silen | --sile | --sil | --si | --s)
9230 ac_cs_silent=: ;;
9231
9232 # This is an error.
d0ac1c44 9233 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 9234Try \`$0 --help' for more information." ;;
bec39cab 9235
81ecdfbb
RW
9236 *) as_fn_append ac_config_targets " $1"
9237 ac_need_defaults=false ;;
bec39cab
AC
9238
9239 esac
9240 shift
d6e9fb05 9241done
bec39cab
AC
9242
9243ac_configure_extra_args=
9244
9245if $ac_cs_silent; then
9246 exec 6>/dev/null
9247 ac_configure_extra_args="$ac_configure_extra_args --silent"
d6e9fb05 9248fi
d6e9fb05 9249
bec39cab 9250_ACEOF
81ecdfbb 9251cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 9252if \$ac_cs_recheck; then
d0ac1c44 9253 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
9254 shift
9255 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
9256 CONFIG_SHELL='$SHELL'
9257 export CONFIG_SHELL
9258 exec "\$@"
bec39cab 9259fi
d6e9fb05 9260
bec39cab 9261_ACEOF
81ecdfbb
RW
9262cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9263exec 5>>config.log
9264{
9265 echo
9266 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9267## Running $as_me. ##
9268_ASBOX
9269 $as_echo "$ac_log"
9270} >&5
bec39cab 9271
81ecdfbb
RW
9272_ACEOF
9273cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61c125b9
TT
9274#
9275# INIT-COMMANDS
9276#
9277ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
60d6cfc9 9278ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
61c125b9 9279
81ecdfbb 9280_ACEOF
bec39cab 9281
81ecdfbb 9282cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b80864fb 9283
81ecdfbb 9284# Handling of arguments.
bec39cab
AC
9285for ac_config_target in $ac_config_targets
9286do
81ecdfbb
RW
9287 case $ac_config_target in
9288 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
61c125b9 9289 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
60d6cfc9 9290 "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
81ecdfbb 9291 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
81ecdfbb 9292
d0ac1c44 9293 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
d6e9fb05 9294 esac
bec39cab
AC
9295done
9296
81ecdfbb 9297
bec39cab
AC
9298# If the user did not use the arguments to specify the items to instantiate,
9299# then the envvar interface is used. Set only those that are not.
9300# We use the long form for the default assignment because of an extremely
9301# bizarre bug on SunOS 4.1.3.
9302if $ac_need_defaults; then
9303 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
9304 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
9305 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
9306fi
d6e9fb05 9307
bec39cab 9308# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 9309# simply because there is no reason against having it here, and in addition,
bec39cab 9310# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
9311# Hook for its removal unless debugging.
9312# Note that there is a small window in which the directory will not be cleaned:
9313# after its creation but before its name has been assigned to `$tmp'.
bec39cab
AC
9314$debug ||
9315{
d0ac1c44 9316 tmp= ac_tmp=
81ecdfbb 9317 trap 'exit_status=$?
d0ac1c44
SM
9318 : "${ac_tmp:=$tmp}"
9319 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
9320' 0
9321 trap 'as_fn_exit 1' 1 2 13 15
bec39cab 9322}
bec39cab
AC
9323# Create a (secure) tmp directory for tmp files.
9324
9325{
81ecdfbb 9326 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 9327 test -d "$tmp"
bec39cab
AC
9328} ||
9329{
81ecdfbb
RW
9330 tmp=./conf$$-$RANDOM
9331 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
9332} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
9333ac_tmp=$tmp
81ecdfbb
RW
9334
9335# Set up the scripts for CONFIG_FILES section.
9336# No need to generate them if there are no CONFIG_FILES.
9337# This happens for instance with `./config.status config.h'.
9338if test -n "$CONFIG_FILES"; then
9339
9340
9341ac_cr=`echo X | tr X '\015'`
9342# On cygwin, bash can eat \r inside `` if the user requested igncr.
9343# But we know of no other shell where ac_cr would be empty at this
9344# point, so we can use a bashism as a fallback.
9345if test "x$ac_cr" = x; then
9346 eval ac_cr=\$\'\\r\'
9347fi
9348ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
9349if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 9350 ac_cs_awk_cr='\\r'
81ecdfbb
RW
9351else
9352 ac_cs_awk_cr=$ac_cr
9353fi
9354
d0ac1c44 9355echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
9356_ACEOF
9357
9358
9359{
9360 echo "cat >conf$$subs.awk <<_ACEOF" &&
9361 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
9362 echo "_ACEOF"
9363} >conf$$subs.sh ||
d0ac1c44
SM
9364 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9365ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
9366ac_delim='%!_!# '
9367for ac_last_try in false false false false false :; do
9368 . ./conf$$subs.sh ||
d0ac1c44 9369 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
9370
9371 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
9372 if test $ac_delim_n = $ac_delim_num; then
9373 break
9374 elif $ac_last_try; then
d0ac1c44 9375 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
9376 else
9377 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
9378 fi
9379done
9380rm -f conf$$subs.sh
9381
9382cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 9383cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
9384_ACEOF
9385sed -n '
9386h
9387s/^/S["/; s/!.*/"]=/
9388p
9389g
9390s/^[^!]*!//
9391:repl
9392t repl
9393s/'"$ac_delim"'$//
9394t delim
9395:nl
9396h
d0ac1c44 9397s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
9398t more1
9399s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
9400p
9401n
9402b repl
9403:more1
9404s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9405p
9406g
9407s/.\{148\}//
9408t nl
9409:delim
9410h
d0ac1c44 9411s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
9412t more2
9413s/["\\]/\\&/g; s/^/"/; s/$/"/
9414p
9415b
9416:more2
9417s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9418p
9419g
9420s/.\{148\}//
9421t delim
9422' <conf$$subs.awk | sed '
9423/^[^""]/{
9424 N
9425 s/\n//
9426}
9427' >>$CONFIG_STATUS || ac_write_fail=1
9428rm -f conf$$subs.awk
9429cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9430_ACAWK
d0ac1c44 9431cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
9432 for (key in S) S_is_set[key] = 1
9433 FS = "\a"
9434
9435}
bec39cab 9436{
81ecdfbb
RW
9437 line = $ 0
9438 nfields = split(line, field, "@")
9439 substed = 0
9440 len = length(field[1])
9441 for (i = 2; i < nfields; i++) {
9442 key = field[i]
9443 keylen = length(key)
9444 if (S_is_set[key]) {
9445 value = S[key]
9446 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
9447 len += length(value) + length(field[++i])
9448 substed = 1
9449 } else
9450 len += 1 + keylen
9451 }
9452
9453 print line
bec39cab
AC
9454}
9455
81ecdfbb
RW
9456_ACAWK
9457_ACEOF
9458cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9459if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
9460 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
9461else
9462 cat
d0ac1c44
SM
9463fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
9464 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
dae5f5cf
DJ
9465_ACEOF
9466
d0ac1c44
SM
9467# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
9468# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
9469# trailing colons and then remove the whole line if VPATH becomes empty
9470# (actually we leave an empty line to preserve line numbers).
9471if test "x$srcdir" = x.; then
d0ac1c44
SM
9472 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
9473h
9474s///
9475s/^/:/
9476s/[ ]*$/:/
9477s/:\$(srcdir):/:/g
9478s/:\${srcdir}:/:/g
9479s/:@srcdir@:/:/g
9480s/^:*//
81ecdfbb 9481s/:*$//
d0ac1c44
SM
9482x
9483s/\(=[ ]*\).*/\1/
9484G
9485s/\n//
81ecdfbb
RW
9486s/^[^=]*=[ ]*$//
9487}'
9488fi
bec39cab 9489
81ecdfbb
RW
9490cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9491fi # test -n "$CONFIG_FILES"
bec39cab 9492
81ecdfbb
RW
9493# Set up the scripts for CONFIG_HEADERS section.
9494# No need to generate them if there are no CONFIG_HEADERS.
9495# This happens for instance with `./config.status Makefile'.
9496if test -n "$CONFIG_HEADERS"; then
d0ac1c44 9497cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb 9498BEGIN {
b80864fb
DJ
9499_ACEOF
9500
81ecdfbb
RW
9501# Transform confdefs.h into an awk script `defines.awk', embedded as
9502# here-document in config.status, that substitutes the proper values into
9503# config.h.in to produce config.h.
9504
9505# Create a delimiter string that does not exist in confdefs.h, to ease
9506# handling of long lines.
9507ac_delim='%!_!# '
9508for ac_last_try in false false :; do
d0ac1c44
SM
9509 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
9510 if test -z "$ac_tt"; then
81ecdfbb
RW
9511 break
9512 elif $ac_last_try; then
d0ac1c44 9513 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
9514 else
9515 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
d6e9fb05 9516 fi
81ecdfbb 9517done
d6e9fb05 9518
81ecdfbb
RW
9519# For the awk script, D is an array of macro values keyed by name,
9520# likewise P contains macro parameters if any. Preserve backslash
9521# newline sequences.
9522
9523ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
9524sed -n '
9525s/.\{148\}/&'"$ac_delim"'/g
9526t rset
9527:rset
9528s/^[ ]*#[ ]*define[ ][ ]*/ /
9529t def
9530d
9531:def
9532s/\\$//
9533t bsnl
9534s/["\\]/\\&/g
9535s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
9536D["\1"]=" \3"/p
9537s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
9538d
9539:bsnl
9540s/["\\]/\\&/g
9541s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
9542D["\1"]=" \3\\\\\\n"\\/p
9543t cont
9544s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
9545t cont
9546d
9547:cont
9548n
9549s/.\{148\}/&'"$ac_delim"'/g
9550t clear
9551:clear
9552s/\\$//
9553t bsnlc
9554s/["\\]/\\&/g; s/^/"/; s/$/"/p
9555d
9556:bsnlc
9557s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
9558b cont
9559' <confdefs.h | sed '
9560s/'"$ac_delim"'/"\\\
9561"/g' >>$CONFIG_STATUS || ac_write_fail=1
9562
9563cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9564 for (key in D) D_is_set[key] = 1
9565 FS = "\a"
9566}
9567/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
9568 line = \$ 0
9569 split(line, arg, " ")
9570 if (arg[1] == "#") {
9571 defundef = arg[2]
9572 mac1 = arg[3]
9573 } else {
9574 defundef = substr(arg[1], 2)
9575 mac1 = arg[2]
9576 }
9577 split(mac1, mac2, "(") #)
9578 macro = mac2[1]
9579 prefix = substr(line, 1, index(line, defundef) - 1)
9580 if (D_is_set[macro]) {
9581 # Preserve the white space surrounding the "#".
9582 print prefix "define", macro P[macro] D[macro]
9583 next
9584 } else {
9585 # Replace #undef with comments. This is necessary, for example,
9586 # in the case of _POSIX_SOURCE, which is predefined and required
9587 # on some systems where configure will not decide to define it.
9588 if (defundef == "undef") {
9589 print "/*", prefix defundef, macro, "*/"
9590 next
9591 }
9592 }
9593}
9594{ print }
9595_ACAWK
bec39cab 9596_ACEOF
81ecdfbb 9597cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 9598 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb
RW
9599fi # test -n "$CONFIG_HEADERS"
9600
9601
9602eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
9603shift
9604for ac_tag
9605do
9606 case $ac_tag in
9607 :[FHLC]) ac_mode=$ac_tag; continue;;
9608 esac
9609 case $ac_mode$ac_tag in
9610 :[FHL]*:*);;
d0ac1c44 9611 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
9612 :[FH]-) ac_tag=-:-;;
9613 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
9614 esac
9615 ac_save_IFS=$IFS
9616 IFS=:
9617 set x $ac_tag
9618 IFS=$ac_save_IFS
9619 shift
9620 ac_file=$1
9621 shift
9622
9623 case $ac_mode in
9624 :L) ac_source=$1;;
9625 :[FH])
9626 ac_file_inputs=
9627 for ac_f
9628 do
9629 case $ac_f in
d0ac1c44 9630 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
9631 *) # Look for the file first in the build tree, then in the source tree
9632 # (if the path is not absolute). The absolute path cannot be DOS-style,
9633 # because $ac_f cannot contain `:'.
9634 test -f "$ac_f" ||
9635 case $ac_f in
9636 [\\/$]*) false;;
9637 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
9638 esac ||
d0ac1c44 9639 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
9640 esac
9641 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
9642 as_fn_append ac_file_inputs " '$ac_f'"
9643 done
9644
9645 # Let's still pretend it is `configure' which instantiates (i.e., don't
9646 # use $as_me), people would be surprised to read:
9647 # /* config.h. Generated by config.status. */
9648 configure_input='Generated from '`
9649 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
9650 `' by configure.'
9651 if test x"$ac_file" != x-; then
9652 configure_input="$ac_file. $configure_input"
9653 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
9654$as_echo "$as_me: creating $ac_file" >&6;}
9655 fi
9656 # Neutralize special characters interpreted by sed in replacement strings.
9657 case $configure_input in #(
9658 *\&* | *\|* | *\\* )
9659 ac_sed_conf_input=`$as_echo "$configure_input" |
9660 sed 's/[\\\\&|]/\\\\&/g'`;; #(
9661 *) ac_sed_conf_input=$configure_input;;
9662 esac
9663
9664 case $ac_tag in
d0ac1c44
SM
9665 *:-:* | *:-) cat >"$ac_tmp/stdin" \
9666 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
9667 esac
9668 ;;
d6e9fb05
JK
9669 esac
9670
81ecdfbb 9671 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
9672$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9673 X"$ac_file" : 'X\(//\)[^/]' \| \
9674 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
9675 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
9676$as_echo X"$ac_file" |
9677 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9678 s//\1/
9679 q
9680 }
9681 /^X\(\/\/\)[^/].*/{
9682 s//\1/
9683 q
9684 }
9685 /^X\(\/\/\)$/{
9686 s//\1/
9687 q
9688 }
9689 /^X\(\/\).*/{
9690 s//\1/
9691 q
9692 }
9693 s/.*/./; q'`
9694 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
9695 ac_builddir=.
9696
81ecdfbb
RW
9697case "$ac_dir" in
9698.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
9699*)
9700 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
9701 # A ".." for each directory in $ac_dir_suffix.
9702 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
9703 case $ac_top_builddir_sub in
9704 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
9705 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
9706 esac ;;
9707esac
9708ac_abs_top_builddir=$ac_pwd
9709ac_abs_builddir=$ac_pwd$ac_dir_suffix
9710# for backward compatibility:
9711ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
9712
9713case $srcdir in
81ecdfbb 9714 .) # We are building in place.
bec39cab 9715 ac_srcdir=.
81ecdfbb
RW
9716 ac_top_srcdir=$ac_top_builddir_sub
9717 ac_abs_top_srcdir=$ac_pwd ;;
9718 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 9719 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
9720 ac_top_srcdir=$srcdir
9721 ac_abs_top_srcdir=$srcdir ;;
9722 *) # Relative name.
9723 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
9724 ac_top_srcdir=$ac_top_build_prefix$srcdir
9725 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 9726esac
81ecdfbb 9727ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 9728
bec39cab 9729
81ecdfbb
RW
9730 case $ac_mode in
9731 :F)
9732 #
9733 # CONFIG_FILE
9734 #
d6e9fb05 9735
bec39cab
AC
9736 case $INSTALL in
9737 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 9738 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
d6e9fb05 9739 esac
81ecdfbb 9740_ACEOF
3db0444b 9741
81ecdfbb
RW
9742cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9743# If the template does not know about datarootdir, expand it.
9744# FIXME: This hack should be removed a few years after 2.60.
9745ac_datarootdir_hack=; ac_datarootdir_seen=
9746ac_sed_dataroot='
9747/datarootdir/ {
9748 p
9749 q
9750}
9751/@datadir@/p
9752/@docdir@/p
9753/@infodir@/p
9754/@localedir@/p
9755/@mandir@/p'
9756case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
9757*datarootdir*) ac_datarootdir_seen=yes;;
9758*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
9759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
9760$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
9761_ACEOF
9762cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9763 ac_datarootdir_hack='
9764 s&@datadir@&$datadir&g
9765 s&@docdir@&$docdir&g
9766 s&@infodir@&$infodir&g
9767 s&@localedir@&$localedir&g
9768 s&@mandir@&$mandir&g
9769 s&\\\${datarootdir}&$datarootdir&g' ;;
9770esac
bec39cab 9771_ACEOF
81ecdfbb
RW
9772
9773# Neutralize VPATH when `$srcdir' = `.'.
9774# Shell code in configure.ac might set extrasub.
9775# FIXME: do we really want to maintain this feature?
9776cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9777ac_sed_extra="$ac_vpsub
bec39cab
AC
9778$extrasub
9779_ACEOF
81ecdfbb 9780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
9781:t
9782/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
9783s|@configure_input@|$ac_sed_conf_input|;t t
9784s&@top_builddir@&$ac_top_builddir_sub&;t t
9785s&@top_build_prefix@&$ac_top_build_prefix&;t t
9786s&@srcdir@&$ac_srcdir&;t t
9787s&@abs_srcdir@&$ac_abs_srcdir&;t t
9788s&@top_srcdir@&$ac_top_srcdir&;t t
9789s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
9790s&@builddir@&$ac_builddir&;t t
9791s&@abs_builddir@&$ac_abs_builddir&;t t
9792s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
9793s&@INSTALL@&$ac_INSTALL&;t t
9794$ac_datarootdir_hack
9795"
d0ac1c44
SM
9796eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
9797 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
9798
9799test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
9800 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
9801 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
9802 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 9803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 9804which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 9805$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 9806which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 9807
d0ac1c44 9808 rm -f "$ac_tmp/stdin"
bec39cab 9809 case $ac_file in
d0ac1c44
SM
9810 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
9811 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 9812 esac \
d0ac1c44 9813 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
9814 ;;
9815 :H)
9816 #
9817 # CONFIG_HEADER
9818 #
bec39cab 9819 if test x"$ac_file" != x-; then
81ecdfbb
RW
9820 {
9821 $as_echo "/* $configure_input */" \
d0ac1c44
SM
9822 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
9823 } >"$ac_tmp/config.h" \
9824 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
9825 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
9826 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
9827$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 9828 else
81ecdfbb 9829 rm -f "$ac_file"
d0ac1c44
SM
9830 mv "$ac_tmp/config.h" "$ac_file" \
9831 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
84563040 9832 fi
bec39cab 9833 else
81ecdfbb 9834 $as_echo "/* $configure_input */" \
d0ac1c44
SM
9835 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
9836 || as_fn_error $? "could not create -" "$LINENO" 5
d6e9fb05 9837 fi
81ecdfbb 9838 ;;
dae5f5cf 9839
81ecdfbb
RW
9840 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
9841$as_echo "$as_me: executing $ac_file commands" >&6;}
9842 ;;
9843 esac
dae5f5cf
DJ
9844
9845
81ecdfbb 9846 case $ac_file$ac_mode in
61c125b9 9847 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
60d6cfc9
YQ
9848 "gdbdepdir":C)
9849 for subdir in ${CONFIG_SRC_SUBDIR}
9850 do
9851 $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
9852 done ;;
1e94266c 9853 "Makefile":F) case x$CONFIG_HEADERS in
c3a3ccc7
DJ
9854xconfig.h:config.in)
9855echo > stamp-h ;;
9856esac
bec39cab 9857 ;;
81ecdfbb 9858
bec39cab 9859 esac
81ecdfbb 9860done # for ac_tag
d6e9fb05 9861
bec39cab 9862
81ecdfbb 9863as_fn_exit 0
bec39cab 9864_ACEOF
bec39cab
AC
9865ac_clean_files=$ac_clean_files_save
9866
81ecdfbb 9867test $ac_write_fail = 0 ||
d0ac1c44 9868 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 9869
bec39cab
AC
9870
9871# configure is writing to config.log, and then calls config.status.
9872# config.status does its own redirection, appending to config.log.
9873# Unfortunately, on DOS this fails, as config.log is still kept open
9874# by configure, so config.status won't be able to write to it; its
9875# output is simply discarded. So we exec the FD to /dev/null,
9876# effectively closing config.log, so it can be properly (re)opened and
9877# appended to by config.status. When coming back to configure, we
9878# need to make the FD available again.
9879if test "$no_create" != yes; then
9880 ac_cs_success=:
9881 ac_config_status_args=
9882 test "$silent" = yes &&
9883 ac_config_status_args="$ac_config_status_args --quiet"
9884 exec 5>/dev/null
9885 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
9886 exec 5>>config.log
9887 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
9888 # would make configure fail if this is the last instruction.
d0ac1c44 9889 $ac_cs_success || as_fn_exit 1
81ecdfbb
RW
9890fi
9891if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
9892 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
9893$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
bec39cab 9894fi
d6e9fb05 9895