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