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