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