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