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