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