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