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