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