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