Fix build with GNU Make 3.81
[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
ab7d13f0 7025 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 7026if test "x$ac_cv_have_decl_strstr" = 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_STRSTR $ac_have_decl
7034_ACEOF
7035
7036
5e030278
TT
7037 # Check for std::thread. This does not work on some platforms, like
7038 # mingw and DJGPP.
7039 ac_ext=cpp
7040ac_cpp='$CXXCPP $CPPFLAGS'
7041ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7042ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7043ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7044
7045
7046
7047
7048
7049ac_ext=c
7050ac_cpp='$CPP $CPPFLAGS'
7051ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7052ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7053ac_compiler_gnu=$ac_cv_c_compiler_gnu
7054
7055ax_pthread_ok=no
7056
7057# We used to check for pthread.h first, but this fails if pthread.h
7058# requires special compiler flags (e.g. on Tru64 or Sequent).
7059# It gets checked for in the link test anyway.
7060
7061# First of all, check if the user has set any of the PTHREAD_LIBS,
7062# etcetera environment variables, and if threads linking works using
7063# them:
7064if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
7065 ax_pthread_save_CC="$CC"
7066 ax_pthread_save_CFLAGS="$CFLAGS"
7067 ax_pthread_save_LIBS="$LIBS"
7068 if test "x$PTHREAD_CC" != "x"; then :
7069 CC="$PTHREAD_CC"
7070fi
7071 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7072 LIBS="$PTHREAD_LIBS $LIBS"
7073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
7074$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
7075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7076/* end confdefs.h. */
7077
7078/* Override any GCC internal prototype to avoid an error.
7079 Use char because int might match the return type of a GCC
7080 builtin and then its argument prototype would still apply. */
7081#ifdef __cplusplus
7082extern "C"
7083#endif
7084char pthread_join ();
7085int
7086main ()
7087{
7088return pthread_join ();
7089 ;
7090 return 0;
7091}
7092_ACEOF
7093if ac_fn_c_try_link "$LINENO"; then :
7094 ax_pthread_ok=yes
7095fi
7096rm -f core conftest.err conftest.$ac_objext \
7097 conftest$ac_exeext conftest.$ac_ext
7098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7099$as_echo "$ax_pthread_ok" >&6; }
7100 if test "x$ax_pthread_ok" = "xno"; then
7101 PTHREAD_LIBS=""
7102 PTHREAD_CFLAGS=""
7103 fi
7104 CC="$ax_pthread_save_CC"
7105 CFLAGS="$ax_pthread_save_CFLAGS"
7106 LIBS="$ax_pthread_save_LIBS"
7107fi
7108
7109# We must check for the threads library under a number of different
7110# names; the ordering is very important because some systems
7111# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
7112# libraries is broken (non-POSIX).
7113
7114# Create a list of thread flags to try. Items starting with a "-" are
7115# C compiler flags, and other items are library names, except for "none"
7116# which indicates that we try without any flags at all, and "pthread-config"
7117# which is a program returning the flags for the Pth emulation library.
7118
7119ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
7120
7121# The ordering *is* (sometimes) important. Some notes on the
7122# individual items follow:
7123
7124# pthreads: AIX (must check this before -lpthread)
7125# none: in case threads are in libc; should be tried before -Kthread and
7126# other compiler flags to prevent continual compiler warnings
7127# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
7128# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
7129# (Note: HP C rejects this with "bad form for `-t' option")
7130# -pthreads: Solaris/gcc (Note: HP C also rejects)
7131# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
7132# doesn't hurt to check since this sometimes defines pthreads and
7133# -D_REENTRANT too), HP C (must be checked before -lpthread, which
7134# is present but should not be used directly; and before -mthreads,
7135# because the compiler interprets this as "-mt" + "-hreads")
7136# -mthreads: Mingw32/gcc, Lynx/gcc
7137# pthread: Linux, etcetera
7138# --thread-safe: KAI C++
7139# pthread-config: use pthread-config program (for GNU Pth library)
7140
7141case $host_os in
7142
7143 freebsd*)
7144
7145 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
7146 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
7147
7148 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
7149 ;;
7150
7151 hpux*)
7152
7153 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
7154 # multi-threading and also sets -lpthread."
7155
7156 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
7157 ;;
7158
7159 openedition*)
7160
7161 # IBM z/OS requires a feature-test macro to be defined in order to
7162 # enable POSIX threads at all, so give the user a hint if this is
7163 # not set. (We don't define these ourselves, as they can affect
7164 # other portions of the system API in unpredictable ways.)
7165
7166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7167/* end confdefs.h. */
7168
7169# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
7170 AX_PTHREAD_ZOS_MISSING
7171# endif
7172
7173_ACEOF
7174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7175 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
7176 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
7177$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
7178fi
7179rm -f conftest*
7180
7181 ;;
7182
7183 solaris*)
7184
7185 # On Solaris (at least, for some versions), libc contains stubbed
7186 # (non-functional) versions of the pthreads routines, so link-based
7187 # tests will erroneously succeed. (N.B.: The stubs are missing
7188 # pthread_cleanup_push, or rather a function called by this macro,
7189 # so we could check for that, but who knows whether they'll stub
7190 # that too in a future libc.) So we'll check first for the
7191 # standard Solaris way of linking pthreads (-mt -lpthread).
7192
7193 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
7194 ;;
7195esac
7196
7197# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
7198
7199if test "x$GCC" = "xyes"; then :
7200 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
7201fi
7202
7203# The presence of a feature test macro requesting re-entrant function
7204# definitions is, on some systems, a strong hint that pthreads support is
7205# correctly enabled
7206
7207case $host_os in
7208 darwin* | hpux* | linux* | osf* | solaris*)
7209 ax_pthread_check_macro="_REENTRANT"
7210 ;;
7211
7212 aix*)
7213 ax_pthread_check_macro="_THREAD_SAFE"
7214 ;;
7215
7216 *)
7217 ax_pthread_check_macro="--"
7218 ;;
7219esac
7220if test "x$ax_pthread_check_macro" = "x--"; then :
7221 ax_pthread_check_cond=0
7222else
7223 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
7224fi
7225
7226# Are we compiling with Clang?
7227
7228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
7229$as_echo_n "checking whether $CC is Clang... " >&6; }
7230if ${ax_cv_PTHREAD_CLANG+:} false; then :
7231 $as_echo_n "(cached) " >&6
7232else
7233 ax_cv_PTHREAD_CLANG=no
7234 # Note that Autoconf sets GCC=yes for Clang as well as GCC
7235 if test "x$GCC" = "xyes"; then
7236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7237/* end confdefs.h. */
7238/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
7239# if defined(__clang__) && defined(__llvm__)
7240 AX_PTHREAD_CC_IS_CLANG
7241# endif
7242
7243_ACEOF
7244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7245 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
7246 ax_cv_PTHREAD_CLANG=yes
7247fi
7248rm -f conftest*
7249
7250 fi
7251
7252fi
7253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
7254$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
7255ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
7256
7257ax_pthread_clang_warning=no
7258
7259# Clang needs special handling, because older versions handle the -pthread
7260# option in a rather... idiosyncratic way
7261
7262if test "x$ax_pthread_clang" = "xyes"; then
7263
7264 # Clang takes -pthread; it has never supported any other flag
7265
7266 # (Note 1: This will need to be revisited if a system that Clang
7267 # supports has POSIX threads in a separate library. This tends not
7268 # to be the way of modern systems, but it's conceivable.)
7269
7270 # (Note 2: On some systems, notably Darwin, -pthread is not needed
7271 # to get POSIX threads support; the API is always present and
7272 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
7273 # -pthread does define _REENTRANT, and while the Darwin headers
7274 # ignore this macro, third-party headers might not.)
7275
7276 PTHREAD_CFLAGS="-pthread"
7277 PTHREAD_LIBS=
7278
7279 ax_pthread_ok=yes
7280
7281 # However, older versions of Clang make a point of warning the user
7282 # that, in an invocation where only linking and no compilation is
7283 # taking place, the -pthread option has no effect ("argument unused
7284 # during compilation"). They expect -pthread to be passed in only
7285 # when source code is being compiled.
7286 #
7287 # Problem is, this is at odds with the way Automake and most other
7288 # C build frameworks function, which is that the same flags used in
7289 # compilation (CFLAGS) are also used in linking. Many systems
7290 # supported by AX_PTHREAD require exactly this for POSIX threads
7291 # support, and in fact it is often not straightforward to specify a
7292 # flag that is used only in the compilation phase and not in
7293 # linking. Such a scenario is extremely rare in practice.
7294 #
7295 # Even though use of the -pthread flag in linking would only print
7296 # a warning, this can be a nuisance for well-run software projects
7297 # that build with -Werror. So if the active version of Clang has
7298 # this misfeature, we search for an option to squash it.
7299
7300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
7301$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
7302if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
7303 $as_echo_n "(cached) " >&6
7304else
7305 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
7306 # Create an alternate version of $ac_link that compiles and
7307 # links in two steps (.c -> .o, .o -> exe) instead of one
7308 # (.c -> exe), because the warning occurs only in the second
7309 # step
7310 ax_pthread_save_ac_link="$ac_link"
7311 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
7312 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
7313 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
7314 ax_pthread_save_CFLAGS="$CFLAGS"
7315 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
7316 if test "x$ax_pthread_try" = "xunknown"; then :
7317 break
7318fi
7319 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
7320 ac_link="$ax_pthread_save_ac_link"
7321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7322/* end confdefs.h. */
7323int main(void){return 0;}
7324_ACEOF
7325if ac_fn_c_try_link "$LINENO"; then :
7326 ac_link="$ax_pthread_2step_ac_link"
7327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7328/* end confdefs.h. */
7329int main(void){return 0;}
7330_ACEOF
7331if ac_fn_c_try_link "$LINENO"; then :
7332 break
7333fi
7334rm -f core conftest.err conftest.$ac_objext \
7335 conftest$ac_exeext conftest.$ac_ext
7336
7337fi
7338rm -f core conftest.err conftest.$ac_objext \
7339 conftest$ac_exeext conftest.$ac_ext
7340 done
7341 ac_link="$ax_pthread_save_ac_link"
7342 CFLAGS="$ax_pthread_save_CFLAGS"
7343 if test "x$ax_pthread_try" = "x"; then :
7344 ax_pthread_try=no
7345fi
7346 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
7347
7348fi
7349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
7350$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
7351
7352 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
7353 no | unknown) ;;
7354 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
7355 esac
7356
7357fi # $ax_pthread_clang = yes
7358
7359if test "x$ax_pthread_ok" = "xno"; then
7360for ax_pthread_try_flag in $ax_pthread_flags; do
7361
7362 case $ax_pthread_try_flag in
7363 none)
7364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
7365$as_echo_n "checking whether pthreads work without any flags... " >&6; }
7366 ;;
7367
7368 -mt,pthread)
7369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
7370$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
7371 PTHREAD_CFLAGS="-mt"
7372 PTHREAD_LIBS="-lpthread"
7373 ;;
7374
7375 -*)
7376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
7377$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
7378 PTHREAD_CFLAGS="$ax_pthread_try_flag"
7379 ;;
7380
7381 pthread-config)
7382 # Extract the first word of "pthread-config", so it can be a program name with args.
7383set dummy pthread-config; ac_word=$2
7384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7385$as_echo_n "checking for $ac_word... " >&6; }
7386if ${ac_cv_prog_ax_pthread_config+:} false; then :
7387 $as_echo_n "(cached) " >&6
7388else
7389 if test -n "$ax_pthread_config"; then
7390 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
7391else
7392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7393for as_dir in $PATH
7394do
7395 IFS=$as_save_IFS
7396 test -z "$as_dir" && as_dir=.
7397 for ac_exec_ext in '' $ac_executable_extensions; do
7398 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7399 ac_cv_prog_ax_pthread_config="yes"
7400 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7401 break 2
7402 fi
7403done
7404 done
7405IFS=$as_save_IFS
7406
7407 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
7408fi
7409fi
7410ax_pthread_config=$ac_cv_prog_ax_pthread_config
7411if test -n "$ax_pthread_config"; then
7412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
7413$as_echo "$ax_pthread_config" >&6; }
7414else
7415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7416$as_echo "no" >&6; }
7417fi
7418
7419
7420 if test "x$ax_pthread_config" = "xno"; then :
7421 continue
7422fi
7423 PTHREAD_CFLAGS="`pthread-config --cflags`"
7424 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
7425 ;;
7426
7427 *)
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
7429$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
7430 PTHREAD_LIBS="-l$ax_pthread_try_flag"
7431 ;;
7432 esac
7433
7434 ax_pthread_save_CFLAGS="$CFLAGS"
7435 ax_pthread_save_LIBS="$LIBS"
7436 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7437 LIBS="$PTHREAD_LIBS $LIBS"
7438
7439 # Check for various functions. We must include pthread.h,
7440 # since some functions may be macros. (On the Sequent, we
7441 # need a special flag -Kthread to make this header compile.)
7442 # We check for pthread_join because it is in -lpthread on IRIX
7443 # while pthread_create is in libc. We check for pthread_attr_init
7444 # due to DEC craziness with -lpthreads. We check for
7445 # pthread_cleanup_push because it is one of the few pthread
7446 # functions on Solaris that doesn't have a non-functional libc stub.
7447 # We try pthread_create on general principles.
7448
7449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7450/* end confdefs.h. */
7451#include <pthread.h>
7452# if $ax_pthread_check_cond
7453# error "$ax_pthread_check_macro must be defined"
7454# endif
7455 static void routine(void *a) { a = 0; }
7456 static void *start_routine(void *a) { return a; }
7457int
7458main ()
7459{
7460pthread_t th; pthread_attr_t attr;
7461 pthread_create(&th, 0, start_routine, 0);
7462 pthread_join(th, 0);
7463 pthread_attr_init(&attr);
7464 pthread_cleanup_push(routine, 0);
7465 pthread_cleanup_pop(0) /* ; */
7466 ;
7467 return 0;
7468}
7469_ACEOF
7470if ac_fn_c_try_link "$LINENO"; then :
7471 ax_pthread_ok=yes
7472fi
7473rm -f core conftest.err conftest.$ac_objext \
7474 conftest$ac_exeext conftest.$ac_ext
7475
7476 CFLAGS="$ax_pthread_save_CFLAGS"
7477 LIBS="$ax_pthread_save_LIBS"
7478
7479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7480$as_echo "$ax_pthread_ok" >&6; }
7481 if test "x$ax_pthread_ok" = "xyes"; then :
7482 break
7483fi
7484
7485 PTHREAD_LIBS=""
7486 PTHREAD_CFLAGS=""
7487done
7488fi
7489
7490# Various other checks:
7491if test "x$ax_pthread_ok" = "xyes"; then
7492 ax_pthread_save_CFLAGS="$CFLAGS"
7493 ax_pthread_save_LIBS="$LIBS"
7494 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7495 LIBS="$PTHREAD_LIBS $LIBS"
7496
7497 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
7498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
7499$as_echo_n "checking for joinable pthread attribute... " >&6; }
7500if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
7501 $as_echo_n "(cached) " >&6
7502else
7503 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
7504 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
7505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7506/* end confdefs.h. */
7507#include <pthread.h>
7508int
7509main ()
7510{
7511int attr = $ax_pthread_attr; return attr /* ; */
7512 ;
7513 return 0;
7514}
7515_ACEOF
7516if ac_fn_c_try_link "$LINENO"; then :
7517 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
7518fi
7519rm -f core conftest.err conftest.$ac_objext \
7520 conftest$ac_exeext conftest.$ac_ext
7521 done
7522
7523fi
7524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
7525$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
7526 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
7527 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
7528 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
7529
7530cat >>confdefs.h <<_ACEOF
7531#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
7532_ACEOF
7533
7534 ax_pthread_joinable_attr_defined=yes
7535
7536fi
7537
7538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
7539$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
7540if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
7541 $as_echo_n "(cached) " >&6
7542else
7543 ax_cv_PTHREAD_SPECIAL_FLAGS=no
7544 case $host_os in
7545 solaris*)
7546 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
7547 ;;
7548 esac
7549
7550fi
7551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
7552$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
7553 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
7554 test "x$ax_pthread_special_flags_added" != "xyes"; then :
7555 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
7556 ax_pthread_special_flags_added=yes
7557fi
7558
7559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
7560$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
7561if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
7562 $as_echo_n "(cached) " >&6
7563else
7564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7565/* end confdefs.h. */
7566#include <pthread.h>
7567int
7568main ()
7569{
7570int i = PTHREAD_PRIO_INHERIT;
7571 ;
7572 return 0;
7573}
7574_ACEOF
7575if ac_fn_c_try_link "$LINENO"; then :
7576 ax_cv_PTHREAD_PRIO_INHERIT=yes
7577else
7578 ax_cv_PTHREAD_PRIO_INHERIT=no
7579fi
7580rm -f core conftest.err conftest.$ac_objext \
7581 conftest$ac_exeext conftest.$ac_ext
7582
7583fi
7584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
7585$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
7586 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
7587 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
7588
7589$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
7590
7591 ax_pthread_prio_inherit_defined=yes
7592
7593fi
7594
7595 CFLAGS="$ax_pthread_save_CFLAGS"
7596 LIBS="$ax_pthread_save_LIBS"
7597
7598 # More AIX lossage: compile with *_r variant
7599 if test "x$GCC" != "xyes"; then
7600 case $host_os in
7601 aix*)
7602 case "x/$CC" in #(
7603 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
7604 #handle absolute path differently from PATH based program lookup
7605 case "x$CC" in #(
7606 x/*) :
7607 if as_fn_executable_p ${CC}_r; then :
7608 PTHREAD_CC="${CC}_r"
7609fi ;; #(
7610 *) :
7611 for ac_prog in ${CC}_r
7612do
7613 # Extract the first word of "$ac_prog", so it can be a program name with args.
7614set dummy $ac_prog; ac_word=$2
7615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7616$as_echo_n "checking for $ac_word... " >&6; }
7617if ${ac_cv_prog_PTHREAD_CC+:} false; then :
7618 $as_echo_n "(cached) " >&6
7619else
7620 if test -n "$PTHREAD_CC"; then
7621 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
7622else
7623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7624for as_dir in $PATH
7625do
7626 IFS=$as_save_IFS
7627 test -z "$as_dir" && as_dir=.
7628 for ac_exec_ext in '' $ac_executable_extensions; do
7629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7630 ac_cv_prog_PTHREAD_CC="$ac_prog"
7631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7632 break 2
7633 fi
7634done
7635 done
7636IFS=$as_save_IFS
7637
7638fi
7639fi
7640PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
7641if test -n "$PTHREAD_CC"; then
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
7643$as_echo "$PTHREAD_CC" >&6; }
7644else
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7646$as_echo "no" >&6; }
7647fi
7648
7649
7650 test -n "$PTHREAD_CC" && break
7651done
7652test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
7653 ;;
7654esac ;; #(
7655 *) :
7656 ;;
7657esac
7658 ;;
7659 esac
7660 fi
7661fi
7662
7663test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
7664
7665
7666
7667
7668
7669# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
7670if test "x$ax_pthread_ok" = "xyes"; then
7671 threads=yes
7672 :
7673else
7674 ax_pthread_ok=no
7675 threads=no
7676fi
7677ac_ext=cpp
7678ac_cpp='$CXXCPP $CPPFLAGS'
7679ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7680ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7681ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7682
7683
7684 if test "$threads" = "yes"; then
7685 save_LIBS="$LIBS"
7686 LIBS="$PTHREAD_LIBS $LIBS"
7687 save_CXXFLAGS="$CXXFLAGS"
7688 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
7689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
7690$as_echo_n "checking for std::thread... " >&6; }
7691if ${gdb_cv_cxx_std_thread+:} false; then :
7692 $as_echo_n "(cached) " >&6
7693else
7694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7695/* end confdefs.h. */
7696#include <thread>
7697 void callback() { }
7698int
7699main ()
7700{
7701std::thread t(callback);
7702 ;
7703 return 0;
7704}
7705_ACEOF
7706if ac_fn_cxx_try_compile "$LINENO"; then :
7707 gdb_cv_cxx_std_thread=yes
7708else
7709 gdb_cv_cxx_std_thread=no
7710fi
7711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7712fi
7713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
7714$as_echo "$gdb_cv_cxx_std_thread" >&6; }
21987b9c
TT
7715
7716 # This check must be here, while LIBS includes any necessary
7717 # threading library.
4da8c3a8 7718 for ac_func in pthread_sigmask pthread_setname_np
21987b9c 7719do :
4da8c3a8
TT
7720 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7721ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
7722if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
21987b9c 7723 cat >>confdefs.h <<_ACEOF
4da8c3a8 7724#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21987b9c
TT
7725_ACEOF
7726
7727fi
7728done
7729
7730
5e030278
TT
7731 LIBS="$save_LIBS"
7732 CXXFLAGS="$save_CXXFLAGS"
7733 fi
7734 if test $gdb_cv_cxx_std_thread = yes; then
7735
7736$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
7737
7738 fi
7739 ac_ext=c
7740ac_cpp='$CPP $CPPFLAGS'
7741ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7742ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7743ac_compiler_gnu=$ac_cv_c_compiler_gnu
7744
7745
e9bcb658
GB
7746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
7747$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 7748if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
7749 $as_echo_n "(cached) " >&6
7750else
7751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7752/* end confdefs.h. */
7753
7754#include <setjmp.h>
7755
7756int
7757main ()
7758{
7759sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
7760 ;
7761 return 0;
7762}
7763_ACEOF
7764if ac_fn_c_try_compile "$LINENO"; then :
7765 gdb_cv_func_sigsetjmp=yes
7766else
7767 gdb_cv_func_sigsetjmp=no
7768fi
7769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7770fi
7771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
7772$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
7773if test $gdb_cv_func_sigsetjmp = yes; then
7774
7775$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
7776
7777fi
7778
3266f10b 7779
eb7aa561
PA
7780# Check the return and argument types of ptrace.
7781
7782
7783for ac_header in sys/ptrace.h ptrace.h
7784do :
7785 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7786ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 7787if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
eb7aa561
PA
7788 cat >>confdefs.h <<_ACEOF
7789#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7790_ACEOF
7791
7792fi
7793
7794done
7795
7796
7797gdb_ptrace_headers='
7798#include <sys/types.h>
7799#if HAVE_SYS_PTRACE_H
7800# include <sys/ptrace.h>
7801#endif
7802#if HAVE_UNISTD_H
7803# include <unistd.h>
7804#endif
7805'
7806# There is no point in checking if we don't have a prototype.
9b30624b 7807ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
eb7aa561 7808"
d0ac1c44 7809if test "x$ac_cv_have_decl_ptrace" = xyes; then :
eb7aa561
PA
7810 ac_have_decl=1
7811else
7812 ac_have_decl=0
7813fi
7814
7815cat >>confdefs.h <<_ACEOF
7816#define HAVE_DECL_PTRACE $ac_have_decl
7817_ACEOF
7818if test $ac_have_decl = 1; then :
7819
7820else
7821
7822 : ${gdb_cv_func_ptrace_ret='int'}
7823 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
7824
7825fi
7826
7827# Check return type. Varargs (used on GNU/Linux) conflict with the
7828# empty argument list, so check for that explicitly.
7829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
7830$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 7831if ${gdb_cv_func_ptrace_ret+:} false; then :
eb7aa561
PA
7832 $as_echo_n "(cached) " >&6
7833else
7834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7835/* end confdefs.h. */
7836$gdb_ptrace_headers
7837int
7838main ()
7839{
7840extern long ptrace (enum __ptrace_request, ...);
7841 ;
7842 return 0;
7843}
7844_ACEOF
9b30624b 7845if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
7846 gdb_cv_func_ptrace_ret='long'
7847else
7848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7849/* end confdefs.h. */
7850$gdb_ptrace_headers
7851int
7852main ()
7853{
7854extern int ptrace ();
7855 ;
7856 return 0;
7857}
7858_ACEOF
9b30624b 7859if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
7860 gdb_cv_func_ptrace_ret='int'
7861else
7862 gdb_cv_func_ptrace_ret='long'
7863fi
7864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7865fi
7866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7867fi
7868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
7869$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
7870
7871cat >>confdefs.h <<_ACEOF
7872#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
7873_ACEOF
7874
7875# Check argument types.
7876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
7877$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 7878if ${gdb_cv_func_ptrace_args+:} false; then :
eb7aa561
PA
7879 $as_echo_n "(cached) " >&6
7880else
7881
7882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7883/* end confdefs.h. */
7884$gdb_ptrace_headers
7885int
7886main ()
7887{
7888extern long ptrace (enum __ptrace_request, ...);
7889 ;
7890 return 0;
7891}
7892_ACEOF
9b30624b 7893if ac_fn_c_try_compile "$LINENO"; then :
54019719 7894 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
eb7aa561
PA
7895else
7896
7897for gdb_arg1 in 'int' 'long'; do
7898 for gdb_arg2 in 'pid_t' 'int' 'long'; do
7899 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
7900 for gdb_arg4 in 'int' 'long' 'void *'; do
7901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7902/* end confdefs.h. */
7903$gdb_ptrace_headers
7904int
7905main ()
7906{
7907
7908extern $gdb_cv_func_ptrace_ret
7909 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
7910
7911 ;
7912 return 0;
7913}
7914_ACEOF
9b30624b 7915if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
7916 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
7917 break 4;
7918fi
7919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7920 for gdb_arg5 in 'int *' 'int' 'long'; do
7921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7922/* end confdefs.h. */
7923$gdb_ptrace_headers
7924int
7925main ()
7926{
7927
7928extern $gdb_cv_func_ptrace_ret
7929 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
7930
7931 ;
7932 return 0;
7933}
7934_ACEOF
9b30624b 7935if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
7936
7937gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
7938 break 5;
7939fi
7940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7941 done
7942 done
7943 done
7944 done
7945done
7946# Provide a safe default value.
7947: ${gdb_cv_func_ptrace_args='int,int,long,long'}
7948
7949fi
7950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7951fi
7952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
7953$as_echo "$gdb_cv_func_ptrace_args" >&6; }
7954ac_save_IFS=$IFS; IFS=','
7955set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
7956IFS=$ac_save_IFS
7957shift
7958
54019719
PA
7959cat >>confdefs.h <<_ACEOF
7960#define PTRACE_TYPE_ARG1 $1
7961_ACEOF
7962
7963
eb7aa561
PA
7964cat >>confdefs.h <<_ACEOF
7965#define PTRACE_TYPE_ARG3 $3
7966_ACEOF
7967
7968
7969cat >>confdefs.h <<_ACEOF
7970#define PTRACE_TYPE_ARG4 $4
7971_ACEOF
7972
7973if test -n "$5"; then
7974
7975cat >>confdefs.h <<_ACEOF
7976#define PTRACE_TYPE_ARG5 $5
7977_ACEOF
7978
7979fi
7980
7981
0fb4aa4b
PA
7982# Check for UST
7983ustlibs=""
7984ustinc=""
7985
7986
7987# Check whether --with-ust was given.
7988if test "${with_ust+set}" = set; then :
7989 withval=$with_ust;
7990fi
7991
7992
7993# Check whether --with-ust_include was given.
7994if test "${with_ust_include+set}" = set; then :
7995 withval=$with_ust_include;
7996fi
7997
7998
7999# Check whether --with-ust_lib was given.
8000if test "${with_ust_lib+set}" = set; then :
8001 withval=$with_ust_lib;
8002fi
8003
8004
8005case $with_ust in
8006 no)
8007 ustlibs=
8008 ustinc=
8009 ;;
8010 "" | yes)
8011 ustlibs=" -lust "
8012 ustinc=""
8013 ;;
8014 *)
8015 ustlibs="-L$with_ust/lib -lust"
8016 ustinc="-I$with_ust/include "
8017 ;;
8018esac
8019if test "x$with_ust_include" != x; then
8020 ustinc="-I$with_ust_include "
8021fi
8022if test "x$with_ust_lib" != x; then
8023 ustlibs="-L$with_ust_lib -lust"
8024fi
8025
8026if test "x$with_ust" != "xno"; then
8027 saved_CFLAGS="$CFLAGS"
8028 CFLAGS="$CFLAGS $ustinc"
8029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ust" >&5
8030$as_echo_n "checking for ust... " >&6; }
8031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8032/* end confdefs.h. */
8033
8034#define CONFIG_UST_GDB_INTEGRATION
8035#include <ust/ust.h>
8036
8037int
8038main ()
8039{
8040
8041 ;
8042 return 0;
8043}
8044_ACEOF
8045if ac_fn_c_try_compile "$LINENO"; then :
8046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8047$as_echo "yes" >&6; };
8048$as_echo "#define HAVE_UST 1" >>confdefs.h
8049
8050else
8051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8052$as_echo "no" >&6; }; ustlibs= ; ustinc=
8053fi
8054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8055 CFLAGS="$saved_CFLAGS"
8056fi
8057
8058# Flags needed for UST
8059
8060
8061
8f13a3ce 8062
d4596a3d
PA
8063# Check whether --enable-werror was given.
8064if test "${enable_werror+set}" = set; then :
8065 enableval=$enable_werror; case "${enableval}" in
8066 yes | y) ERROR_ON_WARNING="yes" ;;
8067 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 8068 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
d4596a3d
PA
8069 esac
8070fi
8071
8072
9a084706 8073# Enable -Werror by default when using gcc. Turn it off for releases.
8f13a3ce 8074if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
d4596a3d
PA
8075 ERROR_ON_WARNING=yes
8076fi
8077
8078WERROR_CFLAGS=""
8079if test "${ERROR_ON_WARNING}" = yes ; then
8080 WERROR_CFLAGS="-Werror"
8081fi
8082
cf6de44d 8083# The options we'll try to enable.
aac331e4 8084build_warnings="-Wall -Wpointer-arith \
a0de763e 8085-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
8f13a3ce 8086-Wno-switch -Wno-char-subscripts \
cf6de44d 8087-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 8088-Wno-sign-compare -Wno-error=maybe-uninitialized \
458412c3 8089-Wno-mismatched-tags \
632e107b 8090-Wno-error=deprecated-register \
85e26832 8091-Wsuggest-override \
1a34f210 8092-Wimplicit-fallthrough=3 \
96643e35 8093-Wduplicated-cond \
33a6bc35
TT
8094-Wshadow=local \
8095-Wdeprecated-copy \
8096-Wdeprecated-copy-dtor \
8097-Wredundant-move"
8f13a3ce 8098
8f13a3ce 8099case "${host}" in
5bfda255
YQ
8100 *-*-mingw32*)
8101 # Enable -Wno-format by default when using gcc on mingw since many
8102 # GCC versions complain about %I64.
8103 build_warnings="$build_warnings -Wno-format" ;;
8104 *-*-solaris*)
8105 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
8106 # doesn't understand.
8107 build_warnings="$build_warnings -Wno-unknown-pragmas"
8108 # Solaris 11 <unistd.h> marks vfork deprecated.
8109 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
8110 *)
8111 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
8112 # but there's a special case for this below.
8113 build_warnings="$build_warnings -Wformat-nonliteral" ;;
8f13a3ce
MF
8114esac
8115
8116# Check whether --enable-build-warnings was given.
8117if test "${enable_build_warnings+set}" = set; then :
8118 enableval=$enable_build_warnings; case "${enableval}" in
8119 yes) ;;
8120 no) build_warnings="-w";;
8121 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8122 build_warnings="${build_warnings} ${t}";;
8123 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8124 build_warnings="${t} ${build_warnings}";;
8125 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8126esac
8127if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8128 echo "Setting compiler warning flags = $build_warnings" 6>&1
8129fi
8130fi
8131# Check whether --enable-gdb-build-warnings was given.
8132if test "${enable_gdb_build_warnings+set}" = set; then :
8133 enableval=$enable_gdb_build_warnings; case "${enableval}" in
8134 yes) ;;
8135 no) build_warnings="-w";;
8136 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8137 build_warnings="${build_warnings} ${t}";;
8138 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8139 build_warnings="${t} ${build_warnings}";;
8140 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8141esac
8142if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8143 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8144fi
3bc3d82a
PA
8145fi
8146
8147# The set of warnings supported by a C++ compiler is not the same as
8148# of the C compiler.
cf6de44d 8149ac_ext=cpp
3bc3d82a
PA
8150ac_cpp='$CXXCPP $CPPFLAGS'
8151ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8152ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8153ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8154
3bc3d82a 8155
d4596a3d 8156WARN_CFLAGS=""
8f13a3ce 8157if test "x${build_warnings}" != x -a "x$GCC" = xyes
d4596a3d
PA
8158then
8159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
8160$as_echo_n "checking compiler warning flags... " >&6; }
8161 # Separate out the -Werror flag as some files just cannot be
8162 # compiled with it enabled.
8163 for w in ${build_warnings}; do
7544db95
PA
8164 # GCC does not complain about -Wno-unknown-warning. Invert
8165 # and test -Wunknown-warning instead.
8166 case $w in
8167 -Wno-*)
8168 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
8169 -Wformat-nonliteral)
8170 # gcc requires -Wformat before -Wformat-nonliteral
8171 # will work, so stick them together.
8172 w="-Wformat $w"
8173 wtest="$w"
8174 ;;
7544db95
PA
8175 *)
8176 wtest=$w ;;
8177 esac
8178
d4596a3d
PA
8179 case $w in
8180 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
8181 *)
8182 # Check whether GCC accepts it.
d4596a3d 8183 saved_CFLAGS="$CFLAGS"
3e019bdc 8184 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 8185 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 8186 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
8187 if test "x$w" = "x-Wunused-variable"; then
8188 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
8189 # fixed in GCC 4.9. This test is derived from the gdb
8190 # source code that triggered this bug in GCC.
8191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8192/* end confdefs.h. */
8193struct scoped_restore_base {};
8194 struct scoped_restore_tmpl : public scoped_restore_base {
8195 ~scoped_restore_tmpl() {}
8196 };
8197int
8198main ()
8199{
8200const scoped_restore_base &b = scoped_restore_tmpl();
8201 ;
8202 return 0;
8203}
8204_ACEOF
8205if ac_fn_cxx_try_compile "$LINENO"; then :
8206 WARN_CFLAGS="${WARN_CFLAGS} $w"
8207fi
8208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8209 else
8210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d4596a3d
PA
8211/* end confdefs.h. */
8212
8213int
8214main ()
8215{
8216
8217 ;
8218 return 0;
8219}
8220_ACEOF
3bc3d82a 8221if ac_fn_cxx_try_compile "$LINENO"; then :
d4596a3d
PA
8222 WARN_CFLAGS="${WARN_CFLAGS} $w"
8223fi
8224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 8225 fi
d4596a3d 8226 CFLAGS="$saved_CFLAGS"
3bc3d82a 8227 CXXFLAGS="$saved_CXXFLAGS"
d4596a3d
PA
8228 esac
8229 done
8230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
8231$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
8232fi
8233
8234
8235
cf6de44d 8236ac_ext=c
3bc3d82a
PA
8237ac_cpp='$CPP $CPPFLAGS'
8238ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8239ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8240ac_compiler_gnu=$ac_cv_c_compiler_gnu
8241
3bc3d82a 8242
8f13a3ce 8243
10e86dd7
DE
8244old_LIBS="$LIBS"
8245LIBS="$LIBS -ldl"
8246for ac_func in dladdr
8247do :
8248 ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
d0ac1c44 8249if test "x$ac_cv_func_dladdr" = xyes; then :
10e86dd7
DE
8250 cat >>confdefs.h <<_ACEOF
8251#define HAVE_DLADDR 1
8252_ACEOF
8253
8254fi
8255done
8256
8257LIBS="$old_LIBS"
8258
07697489
PA
8259
8260 # Check for presence and size of long long.
8261 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 8262if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
8263
8264cat >>confdefs.h <<_ACEOF
8265#define HAVE_LONG_LONG 1
8266_ACEOF
8267
8268# The cast to long int works around a bug in the HP C Compiler
8269# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8270# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8271# This bug is HP SR number 8606223364.
8272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8273$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 8274if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
8275 $as_echo_n "(cached) " >&6
8276else
8277 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8278
8279else
8280 if test "$ac_cv_type_long_long" = yes; then
8281 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8282$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
8283as_fn_error 77 "cannot compute sizeof (long long)
8284See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
8285 else
8286 ac_cv_sizeof_long_long=0
8287 fi
8288fi
8289
8290fi
8291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8292$as_echo "$ac_cv_sizeof_long_long" >&6; }
8293
8294
8295
8296cat >>confdefs.h <<_ACEOF
8297#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8298_ACEOF
8299
8300
8301fi
8302
8303
d0ac1c44
SM
8304 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
8305ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
8306if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
8307 ac_have_decl=1
8308else
8309 ac_have_decl=0
8310fi
8311
8312cat >>confdefs.h <<_ACEOF
8313#define HAVE_DECL_BASENAME $ac_have_decl
8314_ACEOF
8315ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 8316if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
8317 ac_have_decl=1
8318else
8319 ac_have_decl=0
8320fi
8321
8322cat >>confdefs.h <<_ACEOF
8323#define HAVE_DECL_FFS $ac_have_decl
8324_ACEOF
8325ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 8326if test "x$ac_cv_have_decl_asprintf" = 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_ASPRINTF $ac_have_decl
8334_ACEOF
8335ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 8336if test "x$ac_cv_have_decl_vasprintf" = 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_VASPRINTF $ac_have_decl
8344_ACEOF
8345ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 8346if test "x$ac_cv_have_decl_snprintf" = 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_SNPRINTF $ac_have_decl
8354_ACEOF
8355ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 8356if test "x$ac_cv_have_decl_vsnprintf" = 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_VSNPRINTF $ac_have_decl
8364_ACEOF
8365
8366 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 8367if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
8368 ac_have_decl=1
8369else
8370 ac_have_decl=0
8371fi
8372
8373cat >>confdefs.h <<_ACEOF
8374#define HAVE_DECL_STRTOL $ac_have_decl
8375_ACEOF
8376ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 8377if test "x$ac_cv_have_decl_strtoul" = 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_STRTOUL $ac_have_decl
8385_ACEOF
8386ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 8387if test "x$ac_cv_have_decl_strtoll" = 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_STRTOLL $ac_have_decl
8395_ACEOF
8396ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 8397if test "x$ac_cv_have_decl_strtoull" = 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_STRTOULL $ac_have_decl
8405_ACEOF
8406
8407 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 8408if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
8409 ac_have_decl=1
8410else
8411 ac_have_decl=0
8412fi
8413
8414cat >>confdefs.h <<_ACEOF
8415#define HAVE_DECL_STRVERSCMP $ac_have_decl
8416_ACEOF
8417
8418
8419
81ecdfbb 8420ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default"
d0ac1c44 8421if test "x$ac_cv_have_decl_perror" = xyes; then :
81ecdfbb
RW
8422 ac_have_decl=1
8423else
8424 ac_have_decl=0
f450004a 8425fi
81ecdfbb
RW
8426
8427cat >>confdefs.h <<_ACEOF
8428#define HAVE_DECL_PERROR $ac_have_decl
8429_ACEOF
bb0116a4 8430ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 8431if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
bb0116a4
JB
8432 ac_have_decl=1
8433else
8434 ac_have_decl=0
8435fi
8436
8437cat >>confdefs.h <<_ACEOF
8438#define HAVE_DECL_VASPRINTF $ac_have_decl
8439_ACEOF
8440ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 8441if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
bb0116a4
JB
8442 ac_have_decl=1
8443else
8444 ac_have_decl=0
8445fi
8446
8447cat >>confdefs.h <<_ACEOF
8448#define HAVE_DECL_VSNPRINTF $ac_have_decl
8449_ACEOF
81ecdfbb
RW
8450
8451
791c0056 8452ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 8453if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
791c0056
GB
8454
8455cat >>confdefs.h <<_ACEOF
8456#define HAVE_STRUCT_STAT_ST_BLOCKS 1
8457_ACEOF
8458
8459
8460fi
8461ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 8462if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
791c0056
GB
8463
8464cat >>confdefs.h <<_ACEOF
8465#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
8466_ACEOF
8467
8468
8469fi
8470
8471
3e019bdc
SM
8472# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
8473# Older amd64 Linux's don't have the fs_base and gs_base members of
8474# `struct user_regs_struct'.
f517c180
EA
8475ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
8476#include <sys/user.h>
239b6d10 8477"
d0ac1c44 8478if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
239b6d10
WT
8479
8480cat >>confdefs.h <<_ACEOF
8481#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
8482_ACEOF
8483
8484
8485fi
f517c180
EA
8486ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
8487#include <sys/user.h>
239b6d10 8488"
d0ac1c44 8489if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
239b6d10
WT
8490
8491cat >>confdefs.h <<_ACEOF
8492#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
8493_ACEOF
8494
8495
8496fi
8497
8498
8499
81ecdfbb
RW
8500ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
8501#include <sys/socket.h>
8502
8503"
d0ac1c44 8504if test "x$ac_cv_type_socklen_t" = xyes; then :
f450004a 8505
ccbd4912 8506cat >>confdefs.h <<_ACEOF
f450004a
DJ
8507#define HAVE_SOCKLEN_T 1
8508_ACEOF
8509
f450004a 8510
ccbd4912 8511fi
f450004a 8512
fb1e4ffc 8513
64da5dd5
JB
8514case "${target}" in
8515 *-android*)
8516 # Starting with NDK version 9, <elf.h> actually includes definitions
8517 # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
8518 # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
8519 # leading to conflicts with the defintions from <linux/elf.h>.
8520 # This makes it impossible for us to include both <elf.h> and
8521 # <linux/elf.h>, which means that, in practice, we do not have
8522 # access to Elf32_auxv_t and Elf64_auxv_t on this platform.
8523 # Therefore, do not try to auto-detect availability, as it would
8524 # get it wrong on this platform.
8525 ;;
8526 *)
8527 ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
8365dcf5
TJB
8528
8529"
d0ac1c44 8530if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then :
8365dcf5
TJB
8531
8532cat >>confdefs.h <<_ACEOF
8533#define HAVE_ELF32_AUXV_T 1
8534_ACEOF
8535
8536
8537fi
8538ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h>
8539
8540"
d0ac1c44 8541if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then :
8365dcf5
TJB
8542
8543cat >>confdefs.h <<_ACEOF
8544#define HAVE_ELF64_AUXV_T 1
8545_ACEOF
8546
8547
8548fi
8549
64da5dd5 8550esac
8365dcf5 8551
c16158bc
JM
8552
8553
81ecdfbb
RW
8554# Check whether --with-pkgversion was given.
8555if test "${with_pkgversion+set}" = set; then :
8556 withval=$with_pkgversion; case "$withval" in
d0ac1c44 8557 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
8558 no) PKGVERSION= ;;
8559 *) PKGVERSION="($withval) " ;;
8560 esac
8561else
8562 PKGVERSION="(GDB) "
8563
81ecdfbb
RW
8564fi
8565
c16158bc
JM
8566
8567
8568
8569
81ecdfbb
RW
8570# Check whether --with-bugurl was given.
8571if test "${with_bugurl+set}" = set; then :
8572 withval=$with_bugurl; case "$withval" in
d0ac1c44 8573 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
8574 no) BUGURL=
8575 ;;
8576 *) BUGURL="$withval"
8577 ;;
8578 esac
8579else
8580 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8581
81ecdfbb
RW
8582fi
8583
c16158bc
JM
8584 case ${BUGURL} in
8585 "")
8586 REPORT_BUGS_TO=
8587 REPORT_BUGS_TEXI=
8588 ;;
8589 *)
8590 REPORT_BUGS_TO="<$BUGURL>"
8591 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8592 ;;
8593 esac;
8594
8595
8596
8597
8598cat >>confdefs.h <<_ACEOF
8599#define PKGVERSION "$PKGVERSION"
8600_ACEOF
8601
8602
8603cat >>confdefs.h <<_ACEOF
8604#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8605_ACEOF
8606
8607
8838b45e
NS
8608# Check for various supplementary target information (beyond the
8609# triplet) which might affect the choices in configure.srv.
8610case "${target}" in
8611 i[34567]86-*-linux*)
8612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5
8613$as_echo_n "checking if building for x86-64... " >&6; }
d0ac1c44 8614if ${gdb_cv_i386_is_x86_64+:} false; then :
8838b45e
NS
8615 $as_echo_n "(cached) " >&6
8616else
8617 save_CPPFLAGS="$CPPFLAGS"
8618 CPPFLAGS="$CPPFLAGS $CFLAGS"
8619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8620/* end confdefs.h. */
8621
8622#if __x86_64__
8623got it
8624#endif
8625
8626_ACEOF
8627if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8628 $EGREP "got it" >/dev/null 2>&1; then :
8629 gdb_cv_i386_is_x86_64=yes
8630else
8631 gdb_cv_i386_is_x86_64=no
8632fi
8633rm -f conftest*
8634
8635 CPPFLAGS="$save_CPPFLAGS"
8636fi
8637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
8638$as_echo "$gdb_cv_i386_is_x86_64" >&6; }
8639 ;;
201506da
PA
8640
8641 x86_64-*-linux*)
8642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5
8643$as_echo_n "checking if building for x32... " >&6; }
d0ac1c44 8644if ${gdb_cv_x86_is_x32+:} false; then :
201506da
PA
8645 $as_echo_n "(cached) " >&6
8646else
8647 save_CPPFLAGS="$CPPFLAGS"
8648 CPPFLAGS="$CPPFLAGS $CFLAGS"
8649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8650/* end confdefs.h. */
8651
8652#if __x86_64__ && __ILP32__
8653got it
8654#endif
8655
8656_ACEOF
8657if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8658 $EGREP "got it" >/dev/null 2>&1; then :
8659 gdb_cv_x86_is_x32=yes
8660else
8661 gdb_cv_x86_is_x32=no
8662fi
8663rm -f conftest*
8664
8665 CPPFLAGS="$save_CPPFLAGS"
8666fi
8667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5
8668$as_echo "$gdb_cv_x86_is_x32" >&6; }
8669 ;;
8670
9ac544ce
MK
8671 m68k-*-*)
8672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5
8673$as_echo_n "checking if building for Coldfire... " >&6; }
d0ac1c44 8674if ${gdb_cv_m68k_is_coldfire+:} false; then :
9ac544ce
MK
8675 $as_echo_n "(cached) " >&6
8676else
8677 save_CPPFLAGS="$CPPFLAGS"
8678 CPPFLAGS="$CPPFLAGS $CFLAGS"
8679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8680/* end confdefs.h. */
8681
8682#ifdef __mcoldfire__
8683got it
8684#endif
8685
8686_ACEOF
8687if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8688 $EGREP "got it" >/dev/null 2>&1; then :
8689 gdb_cv_m68k_is_coldfire=yes
8690else
8691 gdb_cv_m68k_is_coldfire=no
8692fi
8693rm -f conftest*
8694
8695 CPPFLAGS="$save_CPPFLAGS"
8696fi
8697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5
8698$as_echo "$gdb_cv_m68k_is_coldfire" >&6; }
8699 ;;
8838b45e
NS
8700esac
8701
7ea81414 8702. ${srcdir}/configure.srv
d6e9fb05 8703
68070c10
PA
8704if test "${srv_mingwce}" = "yes"; then
8705 LIBS="$LIBS -lws2"
8706elif test "${srv_mingw}" = "yes"; then
12ea4b69 8707 LIBS="$LIBS -lws2_32"
ac8c974e
AR
8708elif test "${srv_qnx}" = "yes"; then
8709 LIBS="$LIBS -lsocket"
8ed54b31
JB
8710elif test "${srv_lynxos}" = "yes"; then
8711 LIBS="$LIBS -lnetinet"
68070c10
PA
8712fi
8713
8714if test "${srv_mingw}" = "yes"; then
b80864fb 8715
81ecdfbb 8716$as_echo "#define USE_WIN32API 1" >>confdefs.h
b80864fb
DJ
8717
8718fi
8719
58caa3dc 8720if test "${srv_linux_usrregs}" = "yes"; then
f450004a 8721
81ecdfbb 8722$as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h
58caa3dc
DJ
8723
8724fi
8725
8726if test "${srv_linux_regsets}" = "yes"; then
e9d25b98 8727
81ecdfbb 8728$as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h
e9d25b98
DJ
8729
8730
81ecdfbb
RW
8731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
8732$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 8733 if ${gdbsrv_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 8734 $as_echo_n "(cached) " >&6
bec39cab 8735else
81ecdfbb 8736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8737/* end confdefs.h. */
58caa3dc 8738#include <sys/ptrace.h>
bec39cab
AC
8739int
8740main ()
8741{
58caa3dc 8742PTRACE_GETREGS;
bec39cab
AC
8743 ;
8744 return 0;
8745}
8746_ACEOF
81ecdfbb 8747if ac_fn_c_try_compile "$LINENO"; then :
58caa3dc
DJ
8748 gdbsrv_cv_have_ptrace_getregs=yes
8749else
81ecdfbb 8750 gdbsrv_cv_have_ptrace_getregs=no
58caa3dc 8751fi
81ecdfbb 8752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58caa3dc
DJ
8753fi
8754
81ecdfbb
RW
8755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
8756$as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; }
58caa3dc 8757 if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
f450004a 8758
81ecdfbb 8759$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
58caa3dc
DJ
8760
8761 fi
8762
81ecdfbb
RW
8763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
8764$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 8765 if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 8766 $as_echo_n "(cached) " >&6
58caa3dc 8767else
81ecdfbb 8768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8769/* end confdefs.h. */
58caa3dc 8770#include <sys/ptrace.h>
bec39cab
AC
8771int
8772main ()
8773{
58caa3dc 8774PTRACE_GETFPXREGS;
bec39cab
AC
8775 ;
8776 return 0;
8777}
8778_ACEOF
81ecdfbb 8779if ac_fn_c_try_compile "$LINENO"; then :
58caa3dc
DJ
8780 gdbsrv_cv_have_ptrace_getfpxregs=yes
8781else
81ecdfbb 8782 gdbsrv_cv_have_ptrace_getfpxregs=no
58caa3dc 8783fi
81ecdfbb 8784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58caa3dc
DJ
8785fi
8786
81ecdfbb
RW
8787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
8788$as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; }
58caa3dc 8789 if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
f450004a 8790
81ecdfbb 8791$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
58caa3dc
DJ
8792
8793 fi
8794fi
8795
9accd112
MM
8796if test "${srv_linux_btrace}" = "yes"; then
8797
8798$as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h
8799
8800fi
8801
0d62e5e8 8802if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
8804$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 8805 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 8806 $as_echo_n "(cached) " >&6
0d62e5e8 8807else
81ecdfbb 8808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8809/* end confdefs.h. */
0d62e5e8
DJ
8810
8811#define _SYSCALL32
8e642873
PM
8812/* Needed for new procfs interface on sparc-solaris. */
8813#define _STRUCTURED_PROC 1
0d62e5e8 8814#include <sys/procfs.h>
bec39cab
AC
8815int
8816main ()
8817{
0d62e5e8 8818lwpid_t avar
bec39cab
AC
8819 ;
8820 return 0;
8821}
8822_ACEOF
81ecdfbb 8823if ac_fn_c_try_compile "$LINENO"; then :
0d62e5e8
DJ
8824 bfd_cv_have_sys_procfs_type_lwpid_t=yes
8825else
81ecdfbb 8826 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 8827
0d62e5e8 8828fi
81ecdfbb 8829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0d62e5e8
DJ
8830fi
8831
8832 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 8833
81ecdfbb 8834$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
0d62e5e8
DJ
8835
8836 fi
81ecdfbb
RW
8837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
8838$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
0d62e5e8 8839
81ecdfbb
RW
8840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
8841$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 8842 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 8843 $as_echo_n "(cached) " >&6
0d62e5e8 8844else
81ecdfbb 8845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8846/* end confdefs.h. */
0d62e5e8
DJ
8847
8848#define _SYSCALL32
8e642873
PM
8849/* Needed for new procfs interface on sparc-solaris. */
8850#define _STRUCTURED_PROC 1
0d62e5e8 8851#include <sys/procfs.h>
bec39cab
AC
8852int
8853main ()
8854{
0d62e5e8 8855psaddr_t avar
bec39cab
AC
8856 ;
8857 return 0;
8858}
8859_ACEOF
81ecdfbb 8860if ac_fn_c_try_compile "$LINENO"; then :
0d62e5e8
DJ
8861 bfd_cv_have_sys_procfs_type_psaddr_t=yes
8862else
81ecdfbb 8863 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 8864
0d62e5e8 8865fi
81ecdfbb 8866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0d62e5e8
DJ
8867fi
8868
8869 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 8870
81ecdfbb 8871$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
0d62e5e8
DJ
8872
8873 fi
81ecdfbb
RW
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
8875$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
0d62e5e8 8876
81ecdfbb
RW
8877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
8878$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 8879 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 8880 $as_echo_n "(cached) " >&6
0d62e5e8 8881else
81ecdfbb 8882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8883/* end confdefs.h. */
0d62e5e8
DJ
8884
8885#define _SYSCALL32
8e642873
PM
8886/* Needed for new procfs interface on sparc-solaris. */
8887#define _STRUCTURED_PROC 1
0d62e5e8 8888#include <sys/procfs.h>
bec39cab
AC
8889int
8890main ()
8891{
0d62e5e8 8892prgregset_t avar
bec39cab
AC
8893 ;
8894 return 0;
8895}
8896_ACEOF
81ecdfbb 8897if ac_fn_c_try_compile "$LINENO"; then :
0d62e5e8
DJ
8898 bfd_cv_have_sys_procfs_type_prgregset_t=yes
8899else
81ecdfbb 8900 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 8901
0d62e5e8 8902fi
81ecdfbb 8903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0d62e5e8
DJ
8904fi
8905
8906 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 8907
81ecdfbb 8908$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
0d62e5e8
DJ
8909
8910 fi
81ecdfbb
RW
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
8912$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
0d62e5e8 8913
1041a03c
JB
8914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
8915$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 8916 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
1041a03c
JB
8917 $as_echo_n "(cached) " >&6
8918else
8919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8920/* end confdefs.h. */
8921
8922#define _SYSCALL32
8923/* Needed for new procfs interface on sparc-solaris. */
8924#define _STRUCTURED_PROC 1
8925#include <sys/procfs.h>
8926int
8927main ()
8928{
8929prfpregset_t avar
8930 ;
8931 return 0;
8932}
8933_ACEOF
8934if ac_fn_c_try_compile "$LINENO"; then :
8935 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
8936else
8937 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8938
8939fi
8940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8941fi
8942
8943 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8944
8945$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
8946
8947 fi
8948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
8949$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
8950
81ecdfbb
RW
8951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
8952$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 8953 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
81ecdfbb 8954 $as_echo_n "(cached) " >&6
0d62e5e8 8955else
81ecdfbb 8956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8957/* end confdefs.h. */
0d62e5e8
DJ
8958
8959#define _SYSCALL32
8e642873
PM
8960/* Needed for new procfs interface on sparc-solaris. */
8961#define _STRUCTURED_PROC 1
0d62e5e8 8962#include <sys/procfs.h>
bec39cab
AC
8963int
8964main ()
8965{
0d62e5e8 8966elf_fpregset_t avar
bec39cab
AC
8967 ;
8968 return 0;
8969}
8970_ACEOF
81ecdfbb 8971if ac_fn_c_try_compile "$LINENO"; then :
0d62e5e8
DJ
8972 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
8973else
81ecdfbb 8974 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
bec39cab 8975
0d62e5e8 8976fi
81ecdfbb 8977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0d62e5e8
DJ
8978fi
8979
8980 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
bec39cab 8981
81ecdfbb 8982$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
0d62e5e8
DJ
8983
8984 fi
81ecdfbb
RW
8985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
8986$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
0d62e5e8
DJ
8987
8988fi
8989
18f5fd81
TJB
8990if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
8991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
8992$as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
d0ac1c44 8993 if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
18f5fd81
TJB
8994 $as_echo_n "(cached) " >&6
8995else
8996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8997/* end confdefs.h. */
8998
8999#include <thread_db.h>
9000int
9001main ()
9002{
9003lwpid_t avar
9004 ;
9005 return 0;
9006}
9007_ACEOF
9008if ac_fn_c_try_compile "$LINENO"; then :
9009 gdbserver_cv_have_thread_db_type_lwpid_t=yes
9010else
9011 gdbserver_cv_have_thread_db_type_lwpid_t=no
9012
9013fi
9014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9015fi
9016
9017 if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
9018
9019$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
9020
9021 fi
9022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
9023$as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
9024
9025fi
9026
9027if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
9028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
9029$as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
d0ac1c44 9030 if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
18f5fd81
TJB
9031 $as_echo_n "(cached) " >&6
9032else
9033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9034/* end confdefs.h. */
9035
9036#include <thread_db.h>
9037int
9038main ()
9039{
9040psaddr_t avar
9041 ;
9042 return 0;
9043}
9044_ACEOF
9045if ac_fn_c_try_compile "$LINENO"; then :
9046 gdbserver_cv_have_thread_db_type_psaddr_t=yes
9047else
9048 gdbserver_cv_have_thread_db_type_psaddr_t=no
9049
9050fi
9051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9052fi
9053
9054 if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
9055
9056$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
9057
9058 fi
9059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
9060$as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
9061
9062fi
9063
193f13e6
MK
9064old_LIBS="$LIBS"
9065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9066$as_echo_n "checking for dlopen in -ldl... " >&6; }
d0ac1c44 9067if ${ac_cv_lib_dl_dlopen+:} false; then :
193f13e6
MK
9068 $as_echo_n "(cached) " >&6
9069else
9070 ac_check_lib_save_LIBS=$LIBS
9071LIBS="-ldl $LIBS"
9072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9073/* end confdefs.h. */
9074
9075/* Override any GCC internal prototype to avoid an error.
9076 Use char because int might match the return type of a GCC
9077 builtin and then its argument prototype would still apply. */
9078#ifdef __cplusplus
9079extern "C"
9080#endif
9081char dlopen ();
9082int
9083main ()
9084{
9085return dlopen ();
9086 ;
9087 return 0;
9088}
9089_ACEOF
9090if ac_fn_c_try_link "$LINENO"; then :
9091 ac_cv_lib_dl_dlopen=yes
9092else
9093 ac_cv_lib_dl_dlopen=no
9094fi
9095rm -f core conftest.err conftest.$ac_objext \
9096 conftest$ac_exeext conftest.$ac_ext
9097LIBS=$ac_check_lib_save_LIBS
9098fi
9099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9100$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
d0ac1c44 9101if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
193f13e6
MK
9102 cat >>confdefs.h <<_ACEOF
9103#define HAVE_LIBDL 1
9104_ACEOF
9105
9106 LIBS="-ldl $LIBS"
9107
9108fi
9109
9110LIBS="$old_LIBS"
9111
0d62e5e8
DJ
9112srv_thread_depfiles=
9113srv_libs=
0d62e5e8
DJ
9114
9115if test "$srv_linux_thread_db" = "yes"; then
193f13e6
MK
9116 if test "$ac_cv_lib_dl_dlopen" = "yes"; then
9117 srv_libs="-ldl"
f6528abd
JK
9118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
9119$as_echo_n "checking for the dynamic export flag... " >&6; }
193f13e6 9120 old_LDFLAGS="$LDFLAGS"
f6528abd
JK
9121 # Older GNU ld supports --export-dynamic but --dynamic-list may not be
9122 # supported there.
9123 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
9124 LDFLAGS="$LDFLAGS $RDYNAMIC"
193f13e6 9125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
9126/* end confdefs.h. */
9127
9128int
9129main ()
9130{
9131
9132 ;
9133 return 0;
9134}
9135_ACEOF
81ecdfbb 9136if ac_fn_c_try_link "$LINENO"; then :
f6528abd
JK
9137 found="-Wl,--dynamic-list"
9138 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6de3c42 9139else
f6528abd
JK
9140 RDYNAMIC="-rdynamic"
9141 LDFLAGS="$old_LDFLAGS $RDYNAMIC"
9142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9143/* end confdefs.h. */
9144
9145int
9146main ()
9147{
9148
9149 ;
9150 return 0;
9151}
9152_ACEOF
9153if ac_fn_c_try_link "$LINENO"; then :
9154 found="-rdynamic"
9155else
9156 found="no"
9157 RDYNAMIC=""
770d76d7
PA
9158fi
9159rm -f core conftest.err conftest.$ac_objext \
9160 conftest$ac_exeext conftest.$ac_ext
9161fi
9162rm -f core conftest.err conftest.$ac_objext \
9163 conftest$ac_exeext conftest.$ac_ext
9164
9165 LDFLAGS="$old_LDFLAGS"
9166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
9167$as_echo "$found" >&6; }
9168 else
9169 srv_libs="-lthread_db"
9170 fi
55a8c076 9171
770d76d7 9172 srv_thread_depfiles="thread-db.o proc-service.o"
7d4e5717
PA
9173
9174$as_echo "#define USE_THREAD_DB 1" >>confdefs.h
9175
770d76d7
PA
9176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5
9177$as_echo_n "checking for TD_VERSION... " >&6; }
d0ac1c44 9178if ${gdbsrv_cv_have_td_version+:} false; then :
770d76d7
PA
9179 $as_echo_n "(cached) " >&6
9180else
9181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9182/* end confdefs.h. */
9183#include <thread_db.h>
55a8c076
YQ
9184int
9185main ()
9186{
770d76d7 9187TD_VERSION;
c9a1864a
YQ
9188 ;
9189 return 0;
9190}
9191_ACEOF
55a8c076 9192if ac_fn_c_try_compile "$LINENO"; then :
770d76d7 9193 gdbsrv_cv_have_td_version=yes
c9a1864a 9194else
770d76d7
PA
9195 gdbsrv_cv_have_td_version=no
9196fi
9197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9198fi
9199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
9200$as_echo "$gdbsrv_cv_have_td_version" >&6; }
9201 if test $gdbsrv_cv_have_td_version = yes; then
c9a1864a 9202
770d76d7 9203$as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h
55a8c076 9204
770d76d7
PA
9205 fi
9206fi
c9a1864a
YQ
9207
9208
770d76d7
PA
9209# Check whether --with-libthread-db was given.
9210if test "${with_libthread_db+set}" = set; then :
9211 withval=$with_libthread_db; srv_libthread_db_path="${withval}"
9212 srv_libs="$srv_libthread_db_path"
c9a1864a 9213
770d76d7 9214fi
c9a1864a
YQ
9215
9216
770d76d7 9217if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then
c9a1864a 9218
770d76d7 9219$as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h
c9a1864a 9220
55a8c076 9221fi
c9a1864a 9222
770d76d7
PA
9223if test "$srv_xmlfiles" != ""; then
9224 srv_xmlbuiltin="xml-builtin.o"
c9a1864a 9225
770d76d7 9226$as_echo "#define USE_XML 1" >>confdefs.h
c9a1864a 9227
c9a1864a 9228
770d76d7
PA
9229 tmp_xmlfiles=$srv_xmlfiles
9230 srv_xmlfiles=""
9231 for f in $tmp_xmlfiles; do
9232 srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f"
9233 done
c9a1864a
YQ
9234fi
9235
cd850b40 9236GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles $srv_selftest_objs"
770d76d7 9237GDBSERVER_LIBS="$srv_libs"
c9a1864a 9238
770d76d7
PA
9239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5
9240$as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; }
d0ac1c44 9241if ${gdbsrv_cv_have_sync_builtins+:} false; then :
770d76d7
PA
9242 $as_echo_n "(cached) " >&6
9243else
c9a1864a 9244
770d76d7
PA
9245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9246/* end confdefs.h. */
c9a1864a 9247
770d76d7
PA
9248int
9249main ()
9250{
9251int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);
9252 ;
9253 return 0;
9254}
9255_ACEOF
9256if ac_fn_c_try_link "$LINENO"; then :
9257 gdbsrv_cv_have_sync_builtins=yes
9258else
c971b7fa 9259 gdbsrv_cv_have_sync_builtins=no
c9a1864a 9260fi
c971b7fa
PA
9261rm -f core conftest.err conftest.$ac_objext \
9262 conftest$ac_exeext conftest.$ac_ext
c9a1864a 9263fi
c971b7fa
PA
9264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
9265$as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
9266if test $gdbsrv_cv_have_sync_builtins = yes; then
9267
9268$as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h
9269
c9a1864a
YQ
9270fi
9271
c971b7fa
PA
9272saved_cflags="$CFLAGS"
9273CFLAGS="$CFLAGS -fvisibility=hidden"
9274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9275/* end confdefs.h. */
c9a1864a 9276
c971b7fa
PA
9277int
9278main ()
9279{
c9a1864a 9280
c971b7fa
PA
9281 ;
9282 return 0;
9283}
c9a1864a 9284_ACEOF
c971b7fa
PA
9285if ac_fn_c_try_compile "$LINENO"; then :
9286 gdbsrv_cv_have_visibility_hidden=yes
9287else
9288 gdbsrv_cv_have_visibility_hidden=no
c9a1864a 9289fi
c971b7fa
PA
9290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9291CFLAGS="$saved_cflags"
9292
9293ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
9294"
d0ac1c44 9295if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
c971b7fa 9296 ac_have_decl=1
c9a1864a 9297else
c971b7fa 9298 ac_have_decl=0
c9a1864a
YQ
9299fi
9300
c971b7fa
PA
9301cat >>confdefs.h <<_ACEOF
9302#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
9303_ACEOF
c9a1864a 9304
c9a1864a 9305
c971b7fa
PA
9306if test "$cross_compiling" = yes; then :
9307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9308/* end confdefs.h. */
9309#include <sys/personality.h>
9310int
9311main ()
9312{
fb1e4ffc 9313
c971b7fa
PA
9314# if !HAVE_DECL_ADDR_NO_RANDOMIZE
9315# define ADDR_NO_RANDOMIZE 0x0040000
9316# endif
9317 /* Test the flag could be set and stays set. */
9318 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
9319 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
9320 return 1
9321 ;
9322 return 0;
9323}
9324_ACEOF
9325if ac_fn_c_try_link "$LINENO"; then :
9326 gdbsrv_cv_have_personality=true
fa593d66 9327else
c971b7fa 9328 gdbsrv_cv_have_personality=false
c9a1864a 9329fi
c971b7fa
PA
9330rm -f core conftest.err conftest.$ac_objext \
9331 conftest$ac_exeext conftest.$ac_ext
9332else
9333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9334/* end confdefs.h. */
9335#include <sys/personality.h>
9336int
9337main ()
9338{
fa593d66 9339
c971b7fa
PA
9340# if !HAVE_DECL_ADDR_NO_RANDOMIZE
9341# define ADDR_NO_RANDOMIZE 0x0040000
9342# endif
9343 /* Test the flag could be set and stays set. */
9344 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
9345 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
9346 return 1
9347 ;
9348 return 0;
9349}
9350_ACEOF
9351if ac_fn_c_try_run "$LINENO"; then :
9352 gdbsrv_cv_have_personality=true
9353else
9354 gdbsrv_cv_have_personality=false
fa593d66 9355fi
c971b7fa
PA
9356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9357 conftest.$ac_objext conftest.beam conftest.$ac_ext
fa593d66 9358fi
fa593d66 9359
c971b7fa
PA
9360if $gdbsrv_cv_have_personality
9361then
fa593d66 9362
c971b7fa 9363$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
03583c20 9364
c971b7fa 9365fi
03583c20 9366
03583c20 9367
c971b7fa
PA
9368IPA_DEPFILES=""
9369extra_libraries=""
c2a66c29 9370
c971b7fa
PA
9371# check whether to enable the inprocess agent
9372if test "$ipa_obj" != "" \
9373 -a "$gdbsrv_cv_have_sync_builtins" = yes \
9374 -a "$gdbsrv_cv_have_visibility_hidden" = yes; then
9375 have_ipa=true
9376else
9377 have_ipa=false
9378fi
fa593d66 9379
c971b7fa
PA
9380# Check whether --enable-inprocess-agent was given.
9381if test "${enable_inprocess_agent+set}" = set; then :
9382 enableval=$enable_inprocess_agent; case "$enableval" in
9383 yes) want_ipa=true ;;
9384 no) want_ipa=false ;;
d0ac1c44 9385 *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;;
c971b7fa
PA
9386esac
9387else
9388 want_ipa=$have_ipa
9389fi
c2a66c29 9390
c9a1864a 9391
c971b7fa
PA
9392if $want_ipa ; then
9393 if $have_ipa ; then
9394 IPA_DEPFILES="$ipa_obj"
9395 extra_libraries="$extra_libraries libinproctrace.so"
9396 else
d0ac1c44 9397 as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5
c971b7fa
PA
9398 fi
9399fi
c9a1864a 9400
c9a1864a 9401
c2a66c29
NS
9402
9403
fa593d66
PA
9404
9405
9406
0d62e5e8 9407
c971b7fa 9408GNULIB=build-gnulib-gdbserver/import
d6e9fb05 9409
c9a1864a
YQ
9410GNULIB_STDINT_H=
9411if test x"$STDINT_H" != x; then
c971b7fa 9412 GNULIB_STDINT_H=$GNULIB/$STDINT_H
c9a1864a 9413fi
d6e9fb05 9414
fb1e4ffc 9415
c971b7fa 9416ac_config_files="$ac_config_files Makefile"
81ecdfbb 9417
81ecdfbb 9418
bec39cab 9419cat >confcache <<\_ACEOF
d6e9fb05
JK
9420# This file is a shell script that caches the results of configure
9421# tests run on this system so they can be shared between configure
bec39cab
AC
9422# scripts and configure runs, see configure's option --config-cache.
9423# It is not useful on other systems. If it contains results you don't
9424# want to keep, you may remove or edit it.
d6e9fb05 9425#
bec39cab
AC
9426# config.status only pays attention to the cache file if you give it
9427# the --recheck option to rerun configure.
d6e9fb05 9428#
bec39cab
AC
9429# `ac_cv_env_foo' variables (set or unset) will be overridden when
9430# loading this file, other *unset* `ac_cv_foo' will be assigned the
9431# following values.
9432
9433_ACEOF
9434
d6e9fb05
JK
9435# The following way of writing the cache mishandles newlines in values,
9436# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 9437# So, we kill variables containing newlines.
d6e9fb05
JK
9438# Ultrix sh set writes to stderr and can't be redirected directly,
9439# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
9440(
9441 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
9442 eval ac_val=\$$ac_var
9443 case $ac_val in #(
9444 *${as_nl}*)
9445 case $ac_var in #(
9446 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
9447$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
9448 esac
9449 case $ac_var in #(
9450 _ | IFS | as_nl) ;; #(
9451 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
9452 *) { eval $ac_var=; unset $ac_var;} ;;
9453 esac ;;
9454 esac
9455 done
9456
bec39cab 9457 (set) 2>&1 |
81ecdfbb
RW
9458 case $as_nl`(ac_space=' '; set) 2>&1` in #(
9459 *${as_nl}ac_space=\ *)
9460 # `set' does not quote correctly, so add quotes: double-quote
9461 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
9462 sed -n \
9463 "s/'/'\\\\''/g;
9464 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 9465 ;; #(
bec39cab
AC
9466 *)
9467 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 9468 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 9469 ;;
81ecdfbb
RW
9470 esac |
9471 sort
9472) |
bec39cab 9473 sed '
81ecdfbb 9474 /^ac_cv_env_/b end
bec39cab 9475 t clear
81ecdfbb 9476 :clear
bec39cab
AC
9477 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
9478 t end
81ecdfbb
RW
9479 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9480 :end' >>confcache
9481if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
9482 if test -w "$cache_file"; then
d0ac1c44 9483 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
9484 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
9485$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
9486 if test ! -f "$cache_file" || test -h "$cache_file"; then
9487 cat confcache >"$cache_file"
9488 else
9489 case $cache_file in #(
9490 */* | ?:*)
9491 mv -f confcache "$cache_file"$$ &&
9492 mv -f "$cache_file"$$ "$cache_file" ;; #(
9493 *)
9494 mv -f confcache "$cache_file" ;;
9495 esac
9496 fi
9497 fi
d6e9fb05 9498 else
81ecdfbb
RW
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
9500$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
d6e9fb05
JK
9501 fi
9502fi
9503rm -f confcache
9504
d6e9fb05
JK
9505test "x$prefix" = xNONE && prefix=$ac_default_prefix
9506# Let make expand exec_prefix.
9507test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9508
84563040 9509DEFS=-DHAVE_CONFIG_H
d6e9fb05 9510
bec39cab
AC
9511ac_libobjs=
9512ac_ltlibobjs=
d0ac1c44 9513U=
bec39cab
AC
9514for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9515 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
9516 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
9517 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
9518 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
9519 # will be set to the directory where LIBOBJS objects are built.
9520 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
9521 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
9522done
9523LIBOBJS=$ac_libobjs
d6e9fb05 9524
bec39cab
AC
9525LTLIBOBJS=$ac_ltlibobjs
9526
9527
c9a1864a 9528if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 9529 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c9a1864a
YQ
9530Usually this means the macro was only invoked conditionally." "$LINENO" 5
9531fi
bec39cab 9532
d0ac1c44 9533: "${CONFIG_STATUS=./config.status}"
81ecdfbb 9534ac_write_fail=0
bec39cab
AC
9535ac_clean_files_save=$ac_clean_files
9536ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
9537{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
9538$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
9539as_write_fail=0
9540cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
9541#! $SHELL
9542# Generated by $as_me.
d6e9fb05 9543# Run this file to recreate the current configuration.
d6e9fb05 9544# Compiler output produced by configure, useful for debugging
bec39cab
AC
9545# configure, is in config.log if it exists.
9546
9547debug=false
9548ac_cs_recheck=false
9549ac_cs_silent=false
bec39cab 9550
81ecdfbb
RW
9551SHELL=\${CONFIG_SHELL-$SHELL}
9552export SHELL
9553_ASEOF
9554cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
9555## -------------------- ##
9556## M4sh Initialization. ##
9557## -------------------- ##
9558
9559# Be more Bourne compatible
9560DUALCASE=1; export DUALCASE # for MKS sh
9561if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
9562 emulate sh
9563 NULLCMD=:
81ecdfbb 9564 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
9565 # is contrary to our usage. Disable this feature.
9566 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
9567 setopt NO_GLOB_SUBST
9568else
9569 case `(set -o) 2>/dev/null` in #(
9570 *posix*) :
9571 set -o posix ;; #(
9572 *) :
9573 ;;
9574esac
bec39cab 9575fi
d6e9fb05 9576
81ecdfbb
RW
9577
9578as_nl='
9579'
9580export as_nl
9581# Printing a long string crashes Solaris 7 /usr/bin/printf.
9582as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
9583as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
9584as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
9585# Prefer a ksh shell builtin over an external printf program on Solaris,
9586# but without wasting forks for bash or zsh.
9587if test -z "$BASH_VERSION$ZSH_VERSION" \
9588 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
9589 as_echo='print -r --'
9590 as_echo_n='print -rn --'
9591elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
9592 as_echo='printf %s\n'
9593 as_echo_n='printf %s'
bec39cab 9594else
81ecdfbb
RW
9595 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
9596 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
9597 as_echo_n='/usr/ucb/echo -n'
9598 else
9599 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
9600 as_echo_n_body='eval
9601 arg=$1;
9602 case $arg in #(
9603 *"$as_nl"*)
9604 expr "X$arg" : "X\\(.*\\)$as_nl";
9605 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
9606 esac;
9607 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
9608 '
9609 export as_echo_n_body
9610 as_echo_n='sh -c $as_echo_n_body as_echo'
9611 fi
9612 export as_echo_body
9613 as_echo='sh -c $as_echo_body as_echo'
9614fi
9615
9616# The user is always right.
9617if test "${PATH_SEPARATOR+set}" != set; then
9618 PATH_SEPARATOR=:
9619 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
9620 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
9621 PATH_SEPARATOR=';'
9622 }
bec39cab
AC
9623fi
9624
9625
81ecdfbb
RW
9626# IFS
9627# We need space, tab and new line, in precisely that order. Quoting is
9628# there to prevent editors from complaining about space-tab.
9629# (If _AS_PATH_WALK were called with IFS unset, it would disable word
9630# splitting by setting IFS to empty value.)
9631IFS=" "" $as_nl"
9632
9633# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 9634as_myself=
81ecdfbb
RW
9635case $0 in #((
9636 *[\\/]* ) as_myself=$0 ;;
9637 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9638for as_dir in $PATH
9639do
9640 IFS=$as_save_IFS
9641 test -z "$as_dir" && as_dir=.
9642 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9643 done
9644IFS=$as_save_IFS
9645
9646 ;;
9647esac
9648# We did not find ourselves, most probably we were run as `sh COMMAND'
9649# in which case we are not to be found in the path.
9650if test "x$as_myself" = x; then
9651 as_myself=$0
9652fi
9653if test ! -f "$as_myself"; then
9654 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
9655 exit 1
9656fi
9657
9658# Unset variables that we do not need and which cause bugs (e.g. in
9659# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
9660# suppresses any "Segmentation fault" message there. '((' could
9661# trigger a bug in pdksh 5.2.14.
9662for as_var in BASH_ENV ENV MAIL MAILPATH
9663do eval test x\${$as_var+set} = xset \
9664 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
9665done
bec39cab
AC
9666PS1='$ '
9667PS2='> '
9668PS4='+ '
9669
9670# NLS nuisances.
81ecdfbb
RW
9671LC_ALL=C
9672export LC_ALL
9673LANGUAGE=C
9674export LANGUAGE
9675
9676# CDPATH.
9677(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9678
9679
d0ac1c44
SM
9680# as_fn_error STATUS ERROR [LINENO LOG_FD]
9681# ----------------------------------------
81ecdfbb
RW
9682# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
9683# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 9684# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
9685as_fn_error ()
9686{
d0ac1c44
SM
9687 as_status=$1; test $as_status -eq 0 && as_status=1
9688 if test "$4"; then
9689 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9690 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
bec39cab 9691 fi
d0ac1c44 9692 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
9693 as_fn_exit $as_status
9694} # as_fn_error
9695
9696
9697# as_fn_set_status STATUS
9698# -----------------------
9699# Set $? to STATUS, without forking.
9700as_fn_set_status ()
9701{
9702 return $1
9703} # as_fn_set_status
9704
9705# as_fn_exit STATUS
9706# -----------------
9707# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
9708as_fn_exit ()
9709{
9710 set +e
9711 as_fn_set_status $1
9712 exit $1
9713} # as_fn_exit
9714
9715# as_fn_unset VAR
9716# ---------------
9717# Portably unset VAR.
9718as_fn_unset ()
9719{
9720 { eval $1=; unset $1;}
9721}
9722as_unset=as_fn_unset
9723# as_fn_append VAR VALUE
9724# ----------------------
9725# Append the text in VALUE to the end of the definition contained in VAR. Take
9726# advantage of any shell optimizations that allow amortized linear growth over
9727# repeated appends, instead of the typical quadratic growth present in naive
9728# implementations.
9729if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
9730 eval 'as_fn_append ()
9731 {
9732 eval $1+=\$2
9733 }'
9734else
9735 as_fn_append ()
9736 {
9737 eval $1=\$$1\$2
9738 }
9739fi # as_fn_append
9740
9741# as_fn_arith ARG...
9742# ------------------
9743# Perform arithmetic evaluation on the ARGs, and store the result in the
9744# global $as_val. Take advantage of shells that can avoid forks. The arguments
9745# must be portable across $(()) and expr.
9746if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
9747 eval 'as_fn_arith ()
9748 {
9749 as_val=$(( $* ))
9750 }'
9751else
9752 as_fn_arith ()
9753 {
9754 as_val=`expr "$@" || test $? -eq 1`
9755 }
9756fi # as_fn_arith
9757
d6e9fb05 9758
81ecdfbb
RW
9759if expr a : '\(a\)' >/dev/null 2>&1 &&
9760 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
9761 as_expr=expr
9762else
9763 as_expr=false
9764fi
d6e9fb05 9765
81ecdfbb 9766if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
9767 as_basename=basename
9768else
9769 as_basename=false
9770fi
d6e9fb05 9771
81ecdfbb
RW
9772if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
9773 as_dirname=dirname
9774else
9775 as_dirname=false
9776fi
d6e9fb05 9777
81ecdfbb 9778as_me=`$as_basename -- "$0" ||
bec39cab
AC
9779$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9780 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
9781 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
9782$as_echo X/"$0" |
9783 sed '/^.*\/\([^/][^/]*\)\/*$/{
9784 s//\1/
9785 q
9786 }
9787 /^X\/\(\/\/\)$/{
9788 s//\1/
9789 q
9790 }
9791 /^X\/\(\/\).*/{
9792 s//\1/
9793 q
9794 }
9795 s/.*/./; q'`
bec39cab 9796
dae5f5cf
DJ
9797# Avoid depending upon Character Ranges.
9798as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9799as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9800as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9801as_cr_digits='0123456789'
9802as_cr_alnum=$as_cr_Letters$as_cr_digits
9803
81ecdfbb
RW
9804ECHO_C= ECHO_N= ECHO_T=
9805case `echo -n x` in #(((((
9806-n*)
9807 case `echo 'xy\c'` in
9808 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
9809 xy) ECHO_C='\c';;
9810 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
9811 ECHO_T=' ';;
9812 esac;;
9813*)
9814 ECHO_N='-n';;
bec39cab
AC
9815esac
9816
81ecdfbb
RW
9817rm -f conf$$ conf$$.exe conf$$.file
9818if test -d conf$$.dir; then
9819 rm -f conf$$.dir/conf$$.file
bec39cab 9820else
81ecdfbb
RW
9821 rm -f conf$$.dir
9822 mkdir conf$$.dir 2>/dev/null
bec39cab 9823fi
81ecdfbb
RW
9824if (echo >conf$$.file) 2>/dev/null; then
9825 if ln -s conf$$.file conf$$ 2>/dev/null; then
dae5f5cf 9826 as_ln_s='ln -s'
81ecdfbb
RW
9827 # ... but there are two gotchas:
9828 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
9829 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 9830 # In both cases, we have to default to `cp -pR'.
81ecdfbb 9831 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 9832 as_ln_s='cp -pR'
81ecdfbb
RW
9833 elif ln conf$$.file conf$$ 2>/dev/null; then
9834 as_ln_s=ln
9835 else
d0ac1c44 9836 as_ln_s='cp -pR'
dae5f5cf 9837 fi
bec39cab 9838else
d0ac1c44 9839 as_ln_s='cp -pR'
bec39cab 9840fi
81ecdfbb
RW
9841rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
9842rmdir conf$$.dir 2>/dev/null
9843
9844
9845# as_fn_mkdir_p
9846# -------------
9847# Create "$as_dir" as a directory, including parents if necessary.
9848as_fn_mkdir_p ()
9849{
9850
9851 case $as_dir in #(
9852 -*) as_dir=./$as_dir;;
9853 esac
9854 test -d "$as_dir" || eval $as_mkdir_p || {
9855 as_dirs=
9856 while :; do
9857 case $as_dir in #(
9858 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
9859 *) as_qdir=$as_dir;;
9860 esac
9861 as_dirs="'$as_qdir' $as_dirs"
9862 as_dir=`$as_dirname -- "$as_dir" ||
9863$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9864 X"$as_dir" : 'X\(//\)[^/]' \| \
9865 X"$as_dir" : 'X\(//\)$' \| \
9866 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
9867$as_echo X"$as_dir" |
9868 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9869 s//\1/
9870 q
9871 }
9872 /^X\(\/\/\)[^/].*/{
9873 s//\1/
9874 q
9875 }
9876 /^X\(\/\/\)$/{
9877 s//\1/
9878 q
9879 }
9880 /^X\(\/\).*/{
9881 s//\1/
9882 q
9883 }
9884 s/.*/./; q'`
9885 test -d "$as_dir" && break
9886 done
9887 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 9888 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
bec39cab 9889
81ecdfbb
RW
9890
9891} # as_fn_mkdir_p
bec39cab 9892if mkdir -p . 2>/dev/null; then
81ecdfbb 9893 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
9894else
9895 test -d ./-p && rmdir ./-p
9896 as_mkdir_p=false
9897fi
9898
d0ac1c44
SM
9899
9900# as_fn_executable_p FILE
9901# -----------------------
9902# Test if FILE is an executable regular file.
9903as_fn_executable_p ()
9904{
9905 test -f "$1" && test -x "$1"
9906} # as_fn_executable_p
9907as_test_x='test -x'
9908as_executable_p=as_fn_executable_p
bec39cab
AC
9909
9910# Sed expression to map a string onto a valid CPP name.
9911as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
9912
9913# Sed expression to map a string onto a valid variable name.
9914as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
9915
9916
bec39cab 9917exec 6>&1
81ecdfbb
RW
9918## ----------------------------------- ##
9919## Main body of $CONFIG_STATUS script. ##
9920## ----------------------------------- ##
9921_ASEOF
9922test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
9923
9924cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9925# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 9926# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
9927# values after options handling.
9928ac_log="
bec39cab 9929This file was extended by $as_me, which was
d0ac1c44 9930generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
9931
9932 CONFIG_FILES = $CONFIG_FILES
9933 CONFIG_HEADERS = $CONFIG_HEADERS
9934 CONFIG_LINKS = $CONFIG_LINKS
9935 CONFIG_COMMANDS = $CONFIG_COMMANDS
9936 $ $0 $@
9937
81ecdfbb
RW
9938on `(hostname || uname -n) 2>/dev/null | sed 1q`
9939"
9940
bec39cab
AC
9941_ACEOF
9942
81ecdfbb
RW
9943case $ac_config_files in *"
9944"*) set x $ac_config_files; shift; ac_config_files=$*;;
9945esac
bec39cab 9946
81ecdfbb
RW
9947case $ac_config_headers in *"
9948"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
9949esac
dae5f5cf 9950
dae5f5cf 9951
81ecdfbb
RW
9952cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9953# Files that config.status was made for.
9954config_files="$ac_config_files"
9955config_headers="$ac_config_headers"
9956config_commands="$ac_config_commands"
bec39cab 9957
81ecdfbb 9958_ACEOF
dae5f5cf 9959
81ecdfbb 9960cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 9961ac_cs_usage="\
81ecdfbb
RW
9962\`$as_me' instantiates files and other configuration actions
9963from templates according to the current configuration. Unless the files
9964and actions are specified as TAGs, all are instantiated by default.
bec39cab 9965
81ecdfbb 9966Usage: $0 [OPTION]... [TAG]...
bec39cab
AC
9967
9968 -h, --help print this help, then exit
81ecdfbb 9969 -V, --version print version number and configuration settings, then exit
d0ac1c44 9970 --config print configuration, then exit
81ecdfbb
RW
9971 -q, --quiet, --silent
9972 do not print progress messages
bec39cab
AC
9973 -d, --debug don't remove temporary files
9974 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
9975 --file=FILE[:TEMPLATE]
9976 instantiate the configuration file FILE
9977 --header=FILE[:TEMPLATE]
9978 instantiate the configuration header FILE
bec39cab
AC
9979
9980Configuration files:
9981$config_files
9982
9983Configuration headers:
9984$config_headers
9985
9986Configuration commands:
9987$config_commands
9988
81ecdfbb 9989Report bugs to the package provider."
dae5f5cf 9990
81ecdfbb
RW
9991_ACEOF
9992cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 9993ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
9994ac_cs_version="\\
9995config.status
d0ac1c44
SM
9996configured by $0, generated by GNU Autoconf 2.69,
9997 with options \\"\$ac_cs_config\\"
bec39cab 9998
d0ac1c44 9999Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
10000This config.status script is free software; the Free Software Foundation
10001gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
10002
10003ac_pwd='$ac_pwd'
10004srcdir='$srcdir'
10005INSTALL='$INSTALL'
10006test -n "\$AWK" || AWK=awk
bec39cab
AC
10007_ACEOF
10008
81ecdfbb
RW
10009cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10010# The default lists apply if the user does not specify any file.
bec39cab
AC
10011ac_need_defaults=:
10012while test $# != 0
10013do
10014 case $1 in
d0ac1c44 10015 --*=?*)
81ecdfbb
RW
10016 ac_option=`expr "X$1" : 'X\([^=]*\)='`
10017 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab
AC
10018 ac_shift=:
10019 ;;
d0ac1c44
SM
10020 --*=)
10021 ac_option=`expr "X$1" : 'X\([^=]*\)='`
10022 ac_optarg=
10023 ac_shift=:
10024 ;;
81ecdfbb 10025 *)
bec39cab
AC
10026 ac_option=$1
10027 ac_optarg=$2
10028 ac_shift=shift
10029 ;;
bec39cab
AC
10030 esac
10031
10032 case $ac_option in
10033 # Handling of the options.
bec39cab
AC
10034 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10035 ac_cs_recheck=: ;;
81ecdfbb
RW
10036 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
10037 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
10038 --config | --confi | --conf | --con | --co | --c )
10039 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 10040 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
10041 debug=: ;;
10042 --file | --fil | --fi | --f )
10043 $ac_shift
81ecdfbb
RW
10044 case $ac_optarg in
10045 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 10046 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
10047 esac
10048 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
10049 ac_need_defaults=false;;
10050 --header | --heade | --head | --hea )
10051 $ac_shift
81ecdfbb
RW
10052 case $ac_optarg in
10053 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
10054 esac
10055 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 10056 ac_need_defaults=false;;
81ecdfbb
RW
10057 --he | --h)
10058 # Conflict between --help and --header
d0ac1c44 10059 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
10060Try \`$0 --help' for more information.";;
10061 --help | --hel | -h )
10062 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
10063 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
10064 | -silent | --silent | --silen | --sile | --sil | --si | --s)
10065 ac_cs_silent=: ;;
10066
10067 # This is an error.
d0ac1c44 10068 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 10069Try \`$0 --help' for more information." ;;
bec39cab 10070
81ecdfbb
RW
10071 *) as_fn_append ac_config_targets " $1"
10072 ac_need_defaults=false ;;
bec39cab
AC
10073
10074 esac
10075 shift
d6e9fb05 10076done
bec39cab
AC
10077
10078ac_configure_extra_args=
10079
10080if $ac_cs_silent; then
10081 exec 6>/dev/null
10082 ac_configure_extra_args="$ac_configure_extra_args --silent"
d6e9fb05 10083fi
d6e9fb05 10084
bec39cab 10085_ACEOF
81ecdfbb 10086cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 10087if \$ac_cs_recheck; then
d0ac1c44 10088 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
10089 shift
10090 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
10091 CONFIG_SHELL='$SHELL'
10092 export CONFIG_SHELL
10093 exec "\$@"
bec39cab 10094fi
d6e9fb05 10095
bec39cab 10096_ACEOF
81ecdfbb
RW
10097cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10098exec 5>>config.log
10099{
10100 echo
10101 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
10102## Running $as_me. ##
10103_ASBOX
10104 $as_echo "$ac_log"
10105} >&5
bec39cab 10106
81ecdfbb
RW
10107_ACEOF
10108cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61c125b9
TT
10109#
10110# INIT-COMMANDS
10111#
10112ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
60d6cfc9 10113ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
61c125b9 10114
81ecdfbb 10115_ACEOF
bec39cab 10116
81ecdfbb 10117cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b80864fb 10118
81ecdfbb 10119# Handling of arguments.
bec39cab
AC
10120for ac_config_target in $ac_config_targets
10121do
81ecdfbb
RW
10122 case $ac_config_target in
10123 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
61c125b9 10124 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
60d6cfc9 10125 "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
81ecdfbb 10126 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
81ecdfbb 10127
d0ac1c44 10128 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
d6e9fb05 10129 esac
bec39cab
AC
10130done
10131
81ecdfbb 10132
bec39cab
AC
10133# If the user did not use the arguments to specify the items to instantiate,
10134# then the envvar interface is used. Set only those that are not.
10135# We use the long form for the default assignment because of an extremely
10136# bizarre bug on SunOS 4.1.3.
10137if $ac_need_defaults; then
10138 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
10139 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
10140 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
10141fi
d6e9fb05 10142
bec39cab 10143# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 10144# simply because there is no reason against having it here, and in addition,
bec39cab 10145# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
10146# Hook for its removal unless debugging.
10147# Note that there is a small window in which the directory will not be cleaned:
10148# after its creation but before its name has been assigned to `$tmp'.
bec39cab
AC
10149$debug ||
10150{
d0ac1c44 10151 tmp= ac_tmp=
81ecdfbb 10152 trap 'exit_status=$?
d0ac1c44
SM
10153 : "${ac_tmp:=$tmp}"
10154 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
10155' 0
10156 trap 'as_fn_exit 1' 1 2 13 15
bec39cab 10157}
bec39cab
AC
10158# Create a (secure) tmp directory for tmp files.
10159
10160{
81ecdfbb 10161 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 10162 test -d "$tmp"
bec39cab
AC
10163} ||
10164{
81ecdfbb
RW
10165 tmp=./conf$$-$RANDOM
10166 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
10167} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
10168ac_tmp=$tmp
81ecdfbb
RW
10169
10170# Set up the scripts for CONFIG_FILES section.
10171# No need to generate them if there are no CONFIG_FILES.
10172# This happens for instance with `./config.status config.h'.
10173if test -n "$CONFIG_FILES"; then
10174
10175
10176ac_cr=`echo X | tr X '\015'`
10177# On cygwin, bash can eat \r inside `` if the user requested igncr.
10178# But we know of no other shell where ac_cr would be empty at this
10179# point, so we can use a bashism as a fallback.
10180if test "x$ac_cr" = x; then
10181 eval ac_cr=\$\'\\r\'
10182fi
10183ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
10184if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 10185 ac_cs_awk_cr='\\r'
81ecdfbb
RW
10186else
10187 ac_cs_awk_cr=$ac_cr
10188fi
10189
d0ac1c44 10190echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
10191_ACEOF
10192
10193
10194{
10195 echo "cat >conf$$subs.awk <<_ACEOF" &&
10196 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
10197 echo "_ACEOF"
10198} >conf$$subs.sh ||
d0ac1c44
SM
10199 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10200ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
10201ac_delim='%!_!# '
10202for ac_last_try in false false false false false :; do
10203 . ./conf$$subs.sh ||
d0ac1c44 10204 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
10205
10206 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
10207 if test $ac_delim_n = $ac_delim_num; then
10208 break
10209 elif $ac_last_try; then
d0ac1c44 10210 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
10211 else
10212 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
10213 fi
10214done
10215rm -f conf$$subs.sh
10216
10217cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 10218cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
10219_ACEOF
10220sed -n '
10221h
10222s/^/S["/; s/!.*/"]=/
10223p
10224g
10225s/^[^!]*!//
10226:repl
10227t repl
10228s/'"$ac_delim"'$//
10229t delim
10230:nl
10231h
d0ac1c44 10232s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
10233t more1
10234s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
10235p
10236n
10237b repl
10238:more1
10239s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10240p
10241g
10242s/.\{148\}//
10243t nl
10244:delim
10245h
d0ac1c44 10246s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
10247t more2
10248s/["\\]/\\&/g; s/^/"/; s/$/"/
10249p
10250b
10251:more2
10252s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10253p
10254g
10255s/.\{148\}//
10256t delim
10257' <conf$$subs.awk | sed '
10258/^[^""]/{
10259 N
10260 s/\n//
10261}
10262' >>$CONFIG_STATUS || ac_write_fail=1
10263rm -f conf$$subs.awk
10264cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10265_ACAWK
d0ac1c44 10266cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
10267 for (key in S) S_is_set[key] = 1
10268 FS = "\a"
10269
10270}
bec39cab 10271{
81ecdfbb
RW
10272 line = $ 0
10273 nfields = split(line, field, "@")
10274 substed = 0
10275 len = length(field[1])
10276 for (i = 2; i < nfields; i++) {
10277 key = field[i]
10278 keylen = length(key)
10279 if (S_is_set[key]) {
10280 value = S[key]
10281 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
10282 len += length(value) + length(field[++i])
10283 substed = 1
10284 } else
10285 len += 1 + keylen
10286 }
10287
10288 print line
bec39cab
AC
10289}
10290
81ecdfbb
RW
10291_ACAWK
10292_ACEOF
10293cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10294if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
10295 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
10296else
10297 cat
d0ac1c44
SM
10298fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
10299 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
dae5f5cf
DJ
10300_ACEOF
10301
d0ac1c44
SM
10302# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
10303# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
10304# trailing colons and then remove the whole line if VPATH becomes empty
10305# (actually we leave an empty line to preserve line numbers).
10306if test "x$srcdir" = x.; then
d0ac1c44
SM
10307 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
10308h
10309s///
10310s/^/:/
10311s/[ ]*$/:/
10312s/:\$(srcdir):/:/g
10313s/:\${srcdir}:/:/g
10314s/:@srcdir@:/:/g
10315s/^:*//
81ecdfbb 10316s/:*$//
d0ac1c44
SM
10317x
10318s/\(=[ ]*\).*/\1/
10319G
10320s/\n//
81ecdfbb
RW
10321s/^[^=]*=[ ]*$//
10322}'
10323fi
bec39cab 10324
81ecdfbb
RW
10325cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10326fi # test -n "$CONFIG_FILES"
bec39cab 10327
81ecdfbb
RW
10328# Set up the scripts for CONFIG_HEADERS section.
10329# No need to generate them if there are no CONFIG_HEADERS.
10330# This happens for instance with `./config.status Makefile'.
10331if test -n "$CONFIG_HEADERS"; then
d0ac1c44 10332cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb 10333BEGIN {
b80864fb
DJ
10334_ACEOF
10335
81ecdfbb
RW
10336# Transform confdefs.h into an awk script `defines.awk', embedded as
10337# here-document in config.status, that substitutes the proper values into
10338# config.h.in to produce config.h.
10339
10340# Create a delimiter string that does not exist in confdefs.h, to ease
10341# handling of long lines.
10342ac_delim='%!_!# '
10343for ac_last_try in false false :; do
d0ac1c44
SM
10344 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
10345 if test -z "$ac_tt"; then
81ecdfbb
RW
10346 break
10347 elif $ac_last_try; then
d0ac1c44 10348 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
10349 else
10350 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
d6e9fb05 10351 fi
81ecdfbb 10352done
d6e9fb05 10353
81ecdfbb
RW
10354# For the awk script, D is an array of macro values keyed by name,
10355# likewise P contains macro parameters if any. Preserve backslash
10356# newline sequences.
10357
10358ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
10359sed -n '
10360s/.\{148\}/&'"$ac_delim"'/g
10361t rset
10362:rset
10363s/^[ ]*#[ ]*define[ ][ ]*/ /
10364t def
10365d
10366:def
10367s/\\$//
10368t bsnl
10369s/["\\]/\\&/g
10370s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
10371D["\1"]=" \3"/p
10372s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
10373d
10374:bsnl
10375s/["\\]/\\&/g
10376s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
10377D["\1"]=" \3\\\\\\n"\\/p
10378t cont
10379s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
10380t cont
10381d
10382:cont
10383n
10384s/.\{148\}/&'"$ac_delim"'/g
10385t clear
10386:clear
10387s/\\$//
10388t bsnlc
10389s/["\\]/\\&/g; s/^/"/; s/$/"/p
10390d
10391:bsnlc
10392s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
10393b cont
10394' <confdefs.h | sed '
10395s/'"$ac_delim"'/"\\\
10396"/g' >>$CONFIG_STATUS || ac_write_fail=1
10397
10398cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10399 for (key in D) D_is_set[key] = 1
10400 FS = "\a"
10401}
10402/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
10403 line = \$ 0
10404 split(line, arg, " ")
10405 if (arg[1] == "#") {
10406 defundef = arg[2]
10407 mac1 = arg[3]
10408 } else {
10409 defundef = substr(arg[1], 2)
10410 mac1 = arg[2]
10411 }
10412 split(mac1, mac2, "(") #)
10413 macro = mac2[1]
10414 prefix = substr(line, 1, index(line, defundef) - 1)
10415 if (D_is_set[macro]) {
10416 # Preserve the white space surrounding the "#".
10417 print prefix "define", macro P[macro] D[macro]
10418 next
10419 } else {
10420 # Replace #undef with comments. This is necessary, for example,
10421 # in the case of _POSIX_SOURCE, which is predefined and required
10422 # on some systems where configure will not decide to define it.
10423 if (defundef == "undef") {
10424 print "/*", prefix defundef, macro, "*/"
10425 next
10426 }
10427 }
10428}
10429{ print }
10430_ACAWK
bec39cab 10431_ACEOF
81ecdfbb 10432cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 10433 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb
RW
10434fi # test -n "$CONFIG_HEADERS"
10435
10436
10437eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
10438shift
10439for ac_tag
10440do
10441 case $ac_tag in
10442 :[FHLC]) ac_mode=$ac_tag; continue;;
10443 esac
10444 case $ac_mode$ac_tag in
10445 :[FHL]*:*);;
d0ac1c44 10446 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
10447 :[FH]-) ac_tag=-:-;;
10448 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
10449 esac
10450 ac_save_IFS=$IFS
10451 IFS=:
10452 set x $ac_tag
10453 IFS=$ac_save_IFS
10454 shift
10455 ac_file=$1
10456 shift
10457
10458 case $ac_mode in
10459 :L) ac_source=$1;;
10460 :[FH])
10461 ac_file_inputs=
10462 for ac_f
10463 do
10464 case $ac_f in
d0ac1c44 10465 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
10466 *) # Look for the file first in the build tree, then in the source tree
10467 # (if the path is not absolute). The absolute path cannot be DOS-style,
10468 # because $ac_f cannot contain `:'.
10469 test -f "$ac_f" ||
10470 case $ac_f in
10471 [\\/$]*) false;;
10472 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
10473 esac ||
d0ac1c44 10474 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
10475 esac
10476 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
10477 as_fn_append ac_file_inputs " '$ac_f'"
10478 done
10479
10480 # Let's still pretend it is `configure' which instantiates (i.e., don't
10481 # use $as_me), people would be surprised to read:
10482 # /* config.h. Generated by config.status. */
10483 configure_input='Generated from '`
10484 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
10485 `' by configure.'
10486 if test x"$ac_file" != x-; then
10487 configure_input="$ac_file. $configure_input"
10488 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
10489$as_echo "$as_me: creating $ac_file" >&6;}
10490 fi
10491 # Neutralize special characters interpreted by sed in replacement strings.
10492 case $configure_input in #(
10493 *\&* | *\|* | *\\* )
10494 ac_sed_conf_input=`$as_echo "$configure_input" |
10495 sed 's/[\\\\&|]/\\\\&/g'`;; #(
10496 *) ac_sed_conf_input=$configure_input;;
10497 esac
10498
10499 case $ac_tag in
d0ac1c44
SM
10500 *:-:* | *:-) cat >"$ac_tmp/stdin" \
10501 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
10502 esac
10503 ;;
d6e9fb05
JK
10504 esac
10505
81ecdfbb 10506 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
10507$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10508 X"$ac_file" : 'X\(//\)[^/]' \| \
10509 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
10510 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
10511$as_echo X"$ac_file" |
10512 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10513 s//\1/
10514 q
10515 }
10516 /^X\(\/\/\)[^/].*/{
10517 s//\1/
10518 q
10519 }
10520 /^X\(\/\/\)$/{
10521 s//\1/
10522 q
10523 }
10524 /^X\(\/\).*/{
10525 s//\1/
10526 q
10527 }
10528 s/.*/./; q'`
10529 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
10530 ac_builddir=.
10531
81ecdfbb
RW
10532case "$ac_dir" in
10533.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
10534*)
10535 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
10536 # A ".." for each directory in $ac_dir_suffix.
10537 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
10538 case $ac_top_builddir_sub in
10539 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
10540 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
10541 esac ;;
10542esac
10543ac_abs_top_builddir=$ac_pwd
10544ac_abs_builddir=$ac_pwd$ac_dir_suffix
10545# for backward compatibility:
10546ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
10547
10548case $srcdir in
81ecdfbb 10549 .) # We are building in place.
bec39cab 10550 ac_srcdir=.
81ecdfbb
RW
10551 ac_top_srcdir=$ac_top_builddir_sub
10552 ac_abs_top_srcdir=$ac_pwd ;;
10553 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 10554 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
10555 ac_top_srcdir=$srcdir
10556 ac_abs_top_srcdir=$srcdir ;;
10557 *) # Relative name.
10558 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
10559 ac_top_srcdir=$ac_top_build_prefix$srcdir
10560 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 10561esac
81ecdfbb 10562ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 10563
bec39cab 10564
81ecdfbb
RW
10565 case $ac_mode in
10566 :F)
10567 #
10568 # CONFIG_FILE
10569 #
d6e9fb05 10570
bec39cab
AC
10571 case $INSTALL in
10572 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 10573 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
d6e9fb05 10574 esac
81ecdfbb 10575_ACEOF
3db0444b 10576
81ecdfbb
RW
10577cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10578# If the template does not know about datarootdir, expand it.
10579# FIXME: This hack should be removed a few years after 2.60.
10580ac_datarootdir_hack=; ac_datarootdir_seen=
10581ac_sed_dataroot='
10582/datarootdir/ {
10583 p
10584 q
10585}
10586/@datadir@/p
10587/@docdir@/p
10588/@infodir@/p
10589/@localedir@/p
10590/@mandir@/p'
10591case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
10592*datarootdir*) ac_datarootdir_seen=yes;;
10593*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
10594 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
10595$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
10596_ACEOF
10597cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10598 ac_datarootdir_hack='
10599 s&@datadir@&$datadir&g
10600 s&@docdir@&$docdir&g
10601 s&@infodir@&$infodir&g
10602 s&@localedir@&$localedir&g
10603 s&@mandir@&$mandir&g
10604 s&\\\${datarootdir}&$datarootdir&g' ;;
10605esac
bec39cab 10606_ACEOF
81ecdfbb
RW
10607
10608# Neutralize VPATH when `$srcdir' = `.'.
10609# Shell code in configure.ac might set extrasub.
10610# FIXME: do we really want to maintain this feature?
10611cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10612ac_sed_extra="$ac_vpsub
bec39cab
AC
10613$extrasub
10614_ACEOF
81ecdfbb 10615cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
10616:t
10617/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
10618s|@configure_input@|$ac_sed_conf_input|;t t
10619s&@top_builddir@&$ac_top_builddir_sub&;t t
10620s&@top_build_prefix@&$ac_top_build_prefix&;t t
10621s&@srcdir@&$ac_srcdir&;t t
10622s&@abs_srcdir@&$ac_abs_srcdir&;t t
10623s&@top_srcdir@&$ac_top_srcdir&;t t
10624s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
10625s&@builddir@&$ac_builddir&;t t
10626s&@abs_builddir@&$ac_abs_builddir&;t t
10627s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
10628s&@INSTALL@&$ac_INSTALL&;t t
10629$ac_datarootdir_hack
10630"
d0ac1c44
SM
10631eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
10632 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
10633
10634test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
10635 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
10636 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
10637 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 10638 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 10639which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 10640$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 10641which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 10642
d0ac1c44 10643 rm -f "$ac_tmp/stdin"
bec39cab 10644 case $ac_file in
d0ac1c44
SM
10645 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
10646 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 10647 esac \
d0ac1c44 10648 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
10649 ;;
10650 :H)
10651 #
10652 # CONFIG_HEADER
10653 #
bec39cab 10654 if test x"$ac_file" != x-; then
81ecdfbb
RW
10655 {
10656 $as_echo "/* $configure_input */" \
d0ac1c44
SM
10657 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
10658 } >"$ac_tmp/config.h" \
10659 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10660 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
10662$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 10663 else
81ecdfbb 10664 rm -f "$ac_file"
d0ac1c44
SM
10665 mv "$ac_tmp/config.h" "$ac_file" \
10666 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
84563040 10667 fi
bec39cab 10668 else
81ecdfbb 10669 $as_echo "/* $configure_input */" \
d0ac1c44
SM
10670 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
10671 || as_fn_error $? "could not create -" "$LINENO" 5
d6e9fb05 10672 fi
81ecdfbb 10673 ;;
dae5f5cf 10674
81ecdfbb
RW
10675 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
10676$as_echo "$as_me: executing $ac_file commands" >&6;}
10677 ;;
10678 esac
dae5f5cf
DJ
10679
10680
81ecdfbb 10681 case $ac_file$ac_mode in
c5adaa19 10682 "config.h":H) echo > stamp-h ;;
61c125b9 10683 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
60d6cfc9
YQ
10684 "gdbdepdir":C)
10685 for subdir in ${CONFIG_SRC_SUBDIR}
10686 do
10687 $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
10688 done ;;
81ecdfbb 10689
bec39cab 10690 esac
81ecdfbb 10691done # for ac_tag
d6e9fb05 10692
bec39cab 10693
81ecdfbb 10694as_fn_exit 0
bec39cab 10695_ACEOF
bec39cab
AC
10696ac_clean_files=$ac_clean_files_save
10697
81ecdfbb 10698test $ac_write_fail = 0 ||
d0ac1c44 10699 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 10700
bec39cab
AC
10701
10702# configure is writing to config.log, and then calls config.status.
10703# config.status does its own redirection, appending to config.log.
10704# Unfortunately, on DOS this fails, as config.log is still kept open
10705# by configure, so config.status won't be able to write to it; its
10706# output is simply discarded. So we exec the FD to /dev/null,
10707# effectively closing config.log, so it can be properly (re)opened and
10708# appended to by config.status. When coming back to configure, we
10709# need to make the FD available again.
10710if test "$no_create" != yes; then
10711 ac_cs_success=:
10712 ac_config_status_args=
10713 test "$silent" = yes &&
10714 ac_config_status_args="$ac_config_status_args --quiet"
10715 exec 5>/dev/null
10716 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
10717 exec 5>>config.log
10718 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10719 # would make configure fail if this is the last instruction.
d0ac1c44 10720 $ac_cs_success || as_fn_exit 1
81ecdfbb
RW
10721fi
10722if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
10723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
10724$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
bec39cab 10725fi
d6e9fb05 10726
This page took 2.661342 seconds and 4 git commands to generate.