]> Git Repo - binutils.git/blob - gdbserver/configure
Automatic date update in version.in
[binutils.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 [email protected] about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271   fi
272   exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290   { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299   return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307   set +e
308   as_fn_set_status $1
309   exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318   case $as_dir in #(
319   -*) as_dir=./$as_dir;;
320   esac
321   test -d "$as_dir" || eval $as_mkdir_p || {
322     as_dirs=
323     while :; do
324       case $as_dir in #(
325       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326       *) as_qdir=$as_dir;;
327       esac
328       as_dirs="'$as_qdir' $as_dirs"
329       as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331          X"$as_dir" : 'X\(//\)[^/]' \| \
332          X"$as_dir" : 'X\(//\)$' \| \
333          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336             s//\1/
337             q
338           }
339           /^X\(\/\/\)[^/].*/{
340             s//\1/
341             q
342           }
343           /^X\(\/\/\)$/{
344             s//\1/
345             q
346           }
347           /^X\(\/\).*/{
348             s//\1/
349             q
350           }
351           s/.*/./; q'`
352       test -d "$as_dir" && break
353     done
354     test -z "$as_dirs" || eval "mkdir $as_dirs"
355   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365   test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374   eval 'as_fn_append ()
375   {
376     eval $1+=\$2
377   }'
378 else
379   as_fn_append ()
380   {
381     eval $1=\$$1\$2
382   }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391   eval 'as_fn_arith ()
392   {
393     as_val=$(( $* ))
394   }'
395 else
396   as_fn_arith ()
397   {
398     as_val=`expr "$@" || test $? -eq 1`
399   }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410   as_status=$1; test $as_status -eq 0 && as_status=1
411   if test "$4"; then
412     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414   fi
415   $as_echo "$as_me: error: $2" >&2
416   as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420    test "X`expr 00001 : '.*\(...\)'`" = X001; then
421   as_expr=expr
422 else
423   as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427   as_basename=basename
428 else
429   as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433   as_dirname=dirname
434 else
435   as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440          X"$0" : 'X\(//\)$' \| \
441          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443     sed '/^.*\/\([^/][^/]*\)\/*$/{
444             s//\1/
445             q
446           }
447           /^X\/\(\/\/\)$/{
448             s//\1/
449             q
450           }
451           /^X\/\(\/\).*/{
452             s//\1/
453             q
454           }
455           s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465   as_lineno_1=$LINENO as_lineno_1a=$LINENO
466   as_lineno_2=$LINENO as_lineno_2a=$LINENO
467   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470   sed -n '
471     p
472     /[$]LINENO/=
473   ' <$as_myself |
474     sed '
475       s/[$]LINENO.*/&-/
476       t lineno
477       b
478       :lineno
479       N
480       :loop
481       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482       t loop
483       s/-\n.*//
484     ' >$as_me.lineno &&
485   chmod +x "$as_me.lineno" ||
486     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489   # already done that, so ensure we don't try to do so again and fall
490   # in an infinite loop.  This has already happened in practice.
491   _as_can_reexec=no; export _as_can_reexec
492   # Don't try to exec as it changes $[0], causing all sort of problems
493   # (the dirname of $[0] is not the place where we might find the
494   # original and so on.  Autoconf is especially sensitive to this).
495   . "./$as_me.lineno"
496   # Exit status is that of the last command.
497   exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503   case `echo 'xy\c'` in
504   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
505   xy)  ECHO_C='\c';;
506   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507        ECHO_T=' ';;
508   esac;;
509 *)
510   ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515   rm -f conf$$.dir/conf$$.file
516 else
517   rm -f conf$$.dir
518   mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521   if ln -s conf$$.file conf$$ 2>/dev/null; then
522     as_ln_s='ln -s'
523     # ... but there are two gotchas:
524     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526     # In both cases, we have to default to `cp -pR'.
527     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528       as_ln_s='cp -pR'
529   elif ln conf$$.file conf$$ 2>/dev/null; then
530     as_ln_s=ln
531   else
532     as_ln_s='cp -pR'
533   fi
534 else
535   as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541   as_mkdir_p='mkdir -p "$as_dir"'
542 else
543   test -d ./-p && rmdir ./-p
544   as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="server.cc"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 #  include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 #  include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 ac_header_list=
623 ac_subst_vars='LTLIBOBJS
624 LIBOBJS
625 GNULIB_STDINT_H
626 extra_libraries
627 IPA_DEPFILES
628 srv_xmlfiles
629 srv_xmlbuiltin
630 GDBSERVER_LIBS
631 GDBSERVER_DEPFILES
632 RDYNAMIC
633 REPORT_BUGS_TEXI
634 REPORT_BUGS_TO
635 PKGVERSION
636 WERROR_CFLAGS
637 WARN_CFLAGS
638 ustinc
639 ustlibs
640 CCDEPMODE
641 CONFIG_SRC_SUBDIR
642 CATOBJEXT
643 GENCAT
644 INSTOBJEXT
645 DATADIRNAME
646 CATALOGS
647 POSUB
648 GMSGFMT
649 XGETTEXT
650 INCINTL
651 LIBINTL_DEP
652 LIBINTL
653 USE_NLS
654 DEPDIR
655 am__leading_dot
656 host_noncanonical
657 target_noncanonical
658 WIN32APILIBS
659 LTLIBIPT
660 LIBIPT
661 HAVE_LIBIPT
662 PTHREAD_CFLAGS
663 PTHREAD_LIBS
664 PTHREAD_CC
665 ax_pthread_config
666 SED
667 ALLOCA
668 CXX_DIALECT
669 HAVE_CXX11
670 RANLIB
671 AR
672 INSTALL_DATA
673 INSTALL_SCRIPT
674 INSTALL_PROGRAM
675 target_os
676 target_vendor
677 target_cpu
678 target
679 host_os
680 host_vendor
681 host_cpu
682 host
683 build_os
684 build_vendor
685 build_cpu
686 build
687 INSTALL_STRIP_PROGRAM
688 STRIP
689 install_sh
690 EGREP
691 GREP
692 CPP
693 ac_ct_CXX
694 CXXFLAGS
695 CXX
696 OBJEXT
697 EXEEXT
698 ac_ct_CC
699 CPPFLAGS
700 LDFLAGS
701 CFLAGS
702 CC
703 MAINT
704 MAINTAINER_MODE_FALSE
705 MAINTAINER_MODE_TRUE
706 target_alias
707 host_alias
708 build_alias
709 LIBS
710 ECHO_T
711 ECHO_N
712 ECHO_C
713 DEFS
714 mandir
715 localedir
716 libdir
717 psdir
718 pdfdir
719 dvidir
720 htmldir
721 infodir
722 docdir
723 oldincludedir
724 includedir
725 localstatedir
726 sharedstatedir
727 sysconfdir
728 datadir
729 datarootdir
730 libexecdir
731 sbindir
732 bindir
733 program_transform_name
734 prefix
735 exec_prefix
736 PACKAGE_URL
737 PACKAGE_BUGREPORT
738 PACKAGE_STRING
739 PACKAGE_VERSION
740 PACKAGE_TARNAME
741 PACKAGE_NAME
742 PATH_SEPARATOR
743 SHELL'
744 ac_subst_files=''
745 ac_user_opts='
746 enable_option_checking
747 enable_maintainer_mode
748 enable_largefile
749 enable_threading
750 with_intel_pt
751 with_gnu_ld
752 enable_rpath
753 with_libipt_prefix
754 with_libipt_type
755 enable_unit_tests
756 with_ust
757 with_ust_include
758 with_ust_lib
759 enable_werror
760 enable_build_warnings
761 enable_gdb_build_warnings
762 with_pkgversion
763 with_bugurl
764 with_libthread_db
765 enable_inprocess_agent
766 '
767       ac_precious_vars='build_alias
768 host_alias
769 target_alias
770 CC
771 CFLAGS
772 LDFLAGS
773 LIBS
774 CPPFLAGS
775 CXX
776 CXXFLAGS
777 CCC
778 CPP'
779
780
781 # Initialize some variables set by options.
782 ac_init_help=
783 ac_init_version=false
784 ac_unrecognized_opts=
785 ac_unrecognized_sep=
786 # The variables have the same names as the options, with
787 # dashes changed to underlines.
788 cache_file=/dev/null
789 exec_prefix=NONE
790 no_create=
791 no_recursion=
792 prefix=NONE
793 program_prefix=NONE
794 program_suffix=NONE
795 program_transform_name=s,x,x,
796 silent=
797 site=
798 srcdir=
799 verbose=
800 x_includes=NONE
801 x_libraries=NONE
802
803 # Installation directory options.
804 # These are left unexpanded so users can "make install exec_prefix=/foo"
805 # and all the variables that are supposed to be based on exec_prefix
806 # by default will actually change.
807 # Use braces instead of parens because sh, perl, etc. also accept them.
808 # (The list follows the same order as the GNU Coding Standards.)
809 bindir='${exec_prefix}/bin'
810 sbindir='${exec_prefix}/sbin'
811 libexecdir='${exec_prefix}/libexec'
812 datarootdir='${prefix}/share'
813 datadir='${datarootdir}'
814 sysconfdir='${prefix}/etc'
815 sharedstatedir='${prefix}/com'
816 localstatedir='${prefix}/var'
817 includedir='${prefix}/include'
818 oldincludedir='/usr/include'
819 docdir='${datarootdir}/doc/${PACKAGE}'
820 infodir='${datarootdir}/info'
821 htmldir='${docdir}'
822 dvidir='${docdir}'
823 pdfdir='${docdir}'
824 psdir='${docdir}'
825 libdir='${exec_prefix}/lib'
826 localedir='${datarootdir}/locale'
827 mandir='${datarootdir}/man'
828
829 ac_prev=
830 ac_dashdash=
831 for ac_option
832 do
833   # If the previous option needs an argument, assign it.
834   if test -n "$ac_prev"; then
835     eval $ac_prev=\$ac_option
836     ac_prev=
837     continue
838   fi
839
840   case $ac_option in
841   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
842   *=)   ac_optarg= ;;
843   *)    ac_optarg=yes ;;
844   esac
845
846   # Accept the important Cygnus configure options, so we can diagnose typos.
847
848   case $ac_dashdash$ac_option in
849   --)
850     ac_dashdash=yes ;;
851
852   -bindir | --bindir | --bindi | --bind | --bin | --bi)
853     ac_prev=bindir ;;
854   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
855     bindir=$ac_optarg ;;
856
857   -build | --build | --buil | --bui | --bu)
858     ac_prev=build_alias ;;
859   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
860     build_alias=$ac_optarg ;;
861
862   -cache-file | --cache-file | --cache-fil | --cache-fi \
863   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
864     ac_prev=cache_file ;;
865   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
866   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
867     cache_file=$ac_optarg ;;
868
869   --config-cache | -C)
870     cache_file=config.cache ;;
871
872   -datadir | --datadir | --datadi | --datad)
873     ac_prev=datadir ;;
874   -datadir=* | --datadir=* | --datadi=* | --datad=*)
875     datadir=$ac_optarg ;;
876
877   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
878   | --dataroo | --dataro | --datar)
879     ac_prev=datarootdir ;;
880   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
881   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
882     datarootdir=$ac_optarg ;;
883
884   -disable-* | --disable-*)
885     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
886     # Reject names that are not valid shell variable names.
887     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
888       as_fn_error $? "invalid feature name: $ac_useropt"
889     ac_useropt_orig=$ac_useropt
890     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
891     case $ac_user_opts in
892       *"
893 "enable_$ac_useropt"
894 "*) ;;
895       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
896          ac_unrecognized_sep=', ';;
897     esac
898     eval enable_$ac_useropt=no ;;
899
900   -docdir | --docdir | --docdi | --doc | --do)
901     ac_prev=docdir ;;
902   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
903     docdir=$ac_optarg ;;
904
905   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
906     ac_prev=dvidir ;;
907   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
908     dvidir=$ac_optarg ;;
909
910   -enable-* | --enable-*)
911     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
912     # Reject names that are not valid shell variable names.
913     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
914       as_fn_error $? "invalid feature name: $ac_useropt"
915     ac_useropt_orig=$ac_useropt
916     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
917     case $ac_user_opts in
918       *"
919 "enable_$ac_useropt"
920 "*) ;;
921       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
922          ac_unrecognized_sep=', ';;
923     esac
924     eval enable_$ac_useropt=\$ac_optarg ;;
925
926   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
927   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
928   | --exec | --exe | --ex)
929     ac_prev=exec_prefix ;;
930   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
931   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
932   | --exec=* | --exe=* | --ex=*)
933     exec_prefix=$ac_optarg ;;
934
935   -gas | --gas | --ga | --g)
936     # Obsolete; use --with-gas.
937     with_gas=yes ;;
938
939   -help | --help | --hel | --he | -h)
940     ac_init_help=long ;;
941   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
942     ac_init_help=recursive ;;
943   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
944     ac_init_help=short ;;
945
946   -host | --host | --hos | --ho)
947     ac_prev=host_alias ;;
948   -host=* | --host=* | --hos=* | --ho=*)
949     host_alias=$ac_optarg ;;
950
951   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
952     ac_prev=htmldir ;;
953   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
954   | --ht=*)
955     htmldir=$ac_optarg ;;
956
957   -includedir | --includedir | --includedi | --included | --include \
958   | --includ | --inclu | --incl | --inc)
959     ac_prev=includedir ;;
960   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
961   | --includ=* | --inclu=* | --incl=* | --inc=*)
962     includedir=$ac_optarg ;;
963
964   -infodir | --infodir | --infodi | --infod | --info | --inf)
965     ac_prev=infodir ;;
966   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
967     infodir=$ac_optarg ;;
968
969   -libdir | --libdir | --libdi | --libd)
970     ac_prev=libdir ;;
971   -libdir=* | --libdir=* | --libdi=* | --libd=*)
972     libdir=$ac_optarg ;;
973
974   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
975   | --libexe | --libex | --libe)
976     ac_prev=libexecdir ;;
977   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
978   | --libexe=* | --libex=* | --libe=*)
979     libexecdir=$ac_optarg ;;
980
981   -localedir | --localedir | --localedi | --localed | --locale)
982     ac_prev=localedir ;;
983   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
984     localedir=$ac_optarg ;;
985
986   -localstatedir | --localstatedir | --localstatedi | --localstated \
987   | --localstate | --localstat | --localsta | --localst | --locals)
988     ac_prev=localstatedir ;;
989   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
990   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
991     localstatedir=$ac_optarg ;;
992
993   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
994     ac_prev=mandir ;;
995   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
996     mandir=$ac_optarg ;;
997
998   -nfp | --nfp | --nf)
999     # Obsolete; use --without-fp.
1000     with_fp=no ;;
1001
1002   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003   | --no-cr | --no-c | -n)
1004     no_create=yes ;;
1005
1006   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1007   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1008     no_recursion=yes ;;
1009
1010   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1011   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1012   | --oldin | --oldi | --old | --ol | --o)
1013     ac_prev=oldincludedir ;;
1014   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1015   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1016   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1017     oldincludedir=$ac_optarg ;;
1018
1019   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1020     ac_prev=prefix ;;
1021   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1022     prefix=$ac_optarg ;;
1023
1024   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1025   | --program-pre | --program-pr | --program-p)
1026     ac_prev=program_prefix ;;
1027   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1028   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1029     program_prefix=$ac_optarg ;;
1030
1031   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1032   | --program-suf | --program-su | --program-s)
1033     ac_prev=program_suffix ;;
1034   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1035   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1036     program_suffix=$ac_optarg ;;
1037
1038   -program-transform-name | --program-transform-name \
1039   | --program-transform-nam | --program-transform-na \
1040   | --program-transform-n | --program-transform- \
1041   | --program-transform | --program-transfor \
1042   | --program-transfo | --program-transf \
1043   | --program-trans | --program-tran \
1044   | --progr-tra | --program-tr | --program-t)
1045     ac_prev=program_transform_name ;;
1046   -program-transform-name=* | --program-transform-name=* \
1047   | --program-transform-nam=* | --program-transform-na=* \
1048   | --program-transform-n=* | --program-transform-=* \
1049   | --program-transform=* | --program-transfor=* \
1050   | --program-transfo=* | --program-transf=* \
1051   | --program-trans=* | --program-tran=* \
1052   | --progr-tra=* | --program-tr=* | --program-t=*)
1053     program_transform_name=$ac_optarg ;;
1054
1055   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1056     ac_prev=pdfdir ;;
1057   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1058     pdfdir=$ac_optarg ;;
1059
1060   -psdir | --psdir | --psdi | --psd | --ps)
1061     ac_prev=psdir ;;
1062   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1063     psdir=$ac_optarg ;;
1064
1065   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1066   | -silent | --silent | --silen | --sile | --sil)
1067     silent=yes ;;
1068
1069   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1070     ac_prev=sbindir ;;
1071   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1072   | --sbi=* | --sb=*)
1073     sbindir=$ac_optarg ;;
1074
1075   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1076   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1077   | --sharedst | --shareds | --shared | --share | --shar \
1078   | --sha | --sh)
1079     ac_prev=sharedstatedir ;;
1080   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1081   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1082   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1083   | --sha=* | --sh=*)
1084     sharedstatedir=$ac_optarg ;;
1085
1086   -site | --site | --sit)
1087     ac_prev=site ;;
1088   -site=* | --site=* | --sit=*)
1089     site=$ac_optarg ;;
1090
1091   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1092     ac_prev=srcdir ;;
1093   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1094     srcdir=$ac_optarg ;;
1095
1096   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1097   | --syscon | --sysco | --sysc | --sys | --sy)
1098     ac_prev=sysconfdir ;;
1099   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1100   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1101     sysconfdir=$ac_optarg ;;
1102
1103   -target | --target | --targe | --targ | --tar | --ta | --t)
1104     ac_prev=target_alias ;;
1105   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1106     target_alias=$ac_optarg ;;
1107
1108   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1109     verbose=yes ;;
1110
1111   -version | --version | --versio | --versi | --vers | -V)
1112     ac_init_version=: ;;
1113
1114   -with-* | --with-*)
1115     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1116     # Reject names that are not valid shell variable names.
1117     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1118       as_fn_error $? "invalid package name: $ac_useropt"
1119     ac_useropt_orig=$ac_useropt
1120     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1121     case $ac_user_opts in
1122       *"
1123 "with_$ac_useropt"
1124 "*) ;;
1125       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1126          ac_unrecognized_sep=', ';;
1127     esac
1128     eval with_$ac_useropt=\$ac_optarg ;;
1129
1130   -without-* | --without-*)
1131     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1132     # Reject names that are not valid shell variable names.
1133     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1134       as_fn_error $? "invalid package name: $ac_useropt"
1135     ac_useropt_orig=$ac_useropt
1136     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1137     case $ac_user_opts in
1138       *"
1139 "with_$ac_useropt"
1140 "*) ;;
1141       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1142          ac_unrecognized_sep=', ';;
1143     esac
1144     eval with_$ac_useropt=no ;;
1145
1146   --x)
1147     # Obsolete; use --with-x.
1148     with_x=yes ;;
1149
1150   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1151   | --x-incl | --x-inc | --x-in | --x-i)
1152     ac_prev=x_includes ;;
1153   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1154   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1155     x_includes=$ac_optarg ;;
1156
1157   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1158   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1159     ac_prev=x_libraries ;;
1160   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1161   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1162     x_libraries=$ac_optarg ;;
1163
1164   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1165 Try \`$0 --help' for more information"
1166     ;;
1167
1168   *=*)
1169     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1170     # Reject names that are not valid shell variable names.
1171     case $ac_envvar in #(
1172       '' | [0-9]* | *[!_$as_cr_alnum]* )
1173       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1174     esac
1175     eval $ac_envvar=\$ac_optarg
1176     export $ac_envvar ;;
1177
1178   *)
1179     # FIXME: should be removed in autoconf 3.0.
1180     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1181     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1182       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1183     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1184     ;;
1185
1186   esac
1187 done
1188
1189 if test -n "$ac_prev"; then
1190   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1191   as_fn_error $? "missing argument to $ac_option"
1192 fi
1193
1194 if test -n "$ac_unrecognized_opts"; then
1195   case $enable_option_checking in
1196     no) ;;
1197     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1198     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1199   esac
1200 fi
1201
1202 # Check all directory arguments for consistency.
1203 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1204                 datadir sysconfdir sharedstatedir localstatedir includedir \
1205                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1206                 libdir localedir mandir
1207 do
1208   eval ac_val=\$$ac_var
1209   # Remove trailing slashes.
1210   case $ac_val in
1211     */ )
1212       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1213       eval $ac_var=\$ac_val;;
1214   esac
1215   # Be sure to have absolute directory names.
1216   case $ac_val in
1217     [\\/$]* | ?:[\\/]* )  continue;;
1218     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1219   esac
1220   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1221 done
1222
1223 # There might be people who depend on the old broken behavior: `$host'
1224 # used to hold the argument of --host etc.
1225 # FIXME: To remove some day.
1226 build=$build_alias
1227 host=$host_alias
1228 target=$target_alias
1229
1230 # FIXME: To remove some day.
1231 if test "x$host_alias" != x; then
1232   if test "x$build_alias" = x; then
1233     cross_compiling=maybe
1234   elif test "x$build_alias" != "x$host_alias"; then
1235     cross_compiling=yes
1236   fi
1237 fi
1238
1239 ac_tool_prefix=
1240 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1241
1242 test "$silent" = yes && exec 6>/dev/null
1243
1244
1245 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1246 ac_ls_di=`ls -di .` &&
1247 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1248   as_fn_error $? "working directory cannot be determined"
1249 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1250   as_fn_error $? "pwd does not report name of working directory"
1251
1252
1253 # Find the source files, if location was not specified.
1254 if test -z "$srcdir"; then
1255   ac_srcdir_defaulted=yes
1256   # Try the directory containing this script, then the parent directory.
1257   ac_confdir=`$as_dirname -- "$as_myself" ||
1258 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1259          X"$as_myself" : 'X\(//\)[^/]' \| \
1260          X"$as_myself" : 'X\(//\)$' \| \
1261          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1262 $as_echo X"$as_myself" |
1263     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1264             s//\1/
1265             q
1266           }
1267           /^X\(\/\/\)[^/].*/{
1268             s//\1/
1269             q
1270           }
1271           /^X\(\/\/\)$/{
1272             s//\1/
1273             q
1274           }
1275           /^X\(\/\).*/{
1276             s//\1/
1277             q
1278           }
1279           s/.*/./; q'`
1280   srcdir=$ac_confdir
1281   if test ! -r "$srcdir/$ac_unique_file"; then
1282     srcdir=..
1283   fi
1284 else
1285   ac_srcdir_defaulted=no
1286 fi
1287 if test ! -r "$srcdir/$ac_unique_file"; then
1288   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1289   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1290 fi
1291 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1292 ac_abs_confdir=`(
1293         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1294         pwd)`
1295 # When building in place, set srcdir=.
1296 if test "$ac_abs_confdir" = "$ac_pwd"; then
1297   srcdir=.
1298 fi
1299 # Remove unnecessary trailing slashes from srcdir.
1300 # Double slashes in file names in object file debugging info
1301 # mess up M-x gdb in Emacs.
1302 case $srcdir in
1303 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1304 esac
1305 for ac_var in $ac_precious_vars; do
1306   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1307   eval ac_env_${ac_var}_value=\$${ac_var}
1308   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1309   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1310 done
1311
1312 #
1313 # Report the --help message.
1314 #
1315 if test "$ac_init_help" = "long"; then
1316   # Omit some internal or obsolete options to make the list less imposing.
1317   # This message is too long to be a string in the A/UX 3.1 sh.
1318   cat <<_ACEOF
1319 \`configure' configures this package to adapt to many kinds of systems.
1320
1321 Usage: $0 [OPTION]... [VAR=VALUE]...
1322
1323 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1324 VAR=VALUE.  See below for descriptions of some of the useful variables.
1325
1326 Defaults for the options are specified in brackets.
1327
1328 Configuration:
1329   -h, --help              display this help and exit
1330       --help=short        display options specific to this package
1331       --help=recursive    display the short help of all the included packages
1332   -V, --version           display version information and exit
1333   -q, --quiet, --silent   do not print \`checking ...' messages
1334       --cache-file=FILE   cache test results in FILE [disabled]
1335   -C, --config-cache      alias for \`--cache-file=config.cache'
1336   -n, --no-create         do not create output files
1337       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1338
1339 Installation directories:
1340   --prefix=PREFIX         install architecture-independent files in PREFIX
1341                           [$ac_default_prefix]
1342   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1343                           [PREFIX]
1344
1345 By default, \`make install' will install all the files in
1346 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1347 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1348 for instance \`--prefix=\$HOME'.
1349
1350 For better control, use the options below.
1351
1352 Fine tuning of the installation directories:
1353   --bindir=DIR            user executables [EPREFIX/bin]
1354   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1355   --libexecdir=DIR        program executables [EPREFIX/libexec]
1356   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1357   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1358   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1359   --libdir=DIR            object code libraries [EPREFIX/lib]
1360   --includedir=DIR        C header files [PREFIX/include]
1361   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1362   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1363   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1364   --infodir=DIR           info documentation [DATAROOTDIR/info]
1365   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1366   --mandir=DIR            man documentation [DATAROOTDIR/man]
1367   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1368   --htmldir=DIR           html documentation [DOCDIR]
1369   --dvidir=DIR            dvi documentation [DOCDIR]
1370   --pdfdir=DIR            pdf documentation [DOCDIR]
1371   --psdir=DIR             ps documentation [DOCDIR]
1372 _ACEOF
1373
1374   cat <<\_ACEOF
1375
1376 Program names:
1377   --program-prefix=PREFIX            prepend PREFIX to installed program names
1378   --program-suffix=SUFFIX            append SUFFIX to installed program names
1379   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1380
1381 System types:
1382   --build=BUILD     configure for building on BUILD [guessed]
1383   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1384   --target=TARGET   configure for building compilers for TARGET [HOST]
1385 _ACEOF
1386 fi
1387
1388 if test -n "$ac_init_help"; then
1389
1390   cat <<\_ACEOF
1391
1392 Optional Features:
1393   --disable-option-checking  ignore unrecognized --enable/--with options
1394   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1395   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1396   --enable-maintainer-mode
1397                           enable make rules and dependencies not useful (and
1398                           sometimes confusing) to the casual installer
1399   --disable-largefile     omit support for large files
1400   --enable-threading      include support for parallel processing of data
1401                           (yes/no)
1402   --disable-rpath         do not hardcode runtime library paths
1403   --enable-unit-tests     Enable the inclusion of unit tests when compiling
1404                           GDB
1405   --enable-werror         treat compile warnings as errors
1406   --enable-build-warnings enable build-time compiler warnings if gcc is used
1407   --enable-gdb-build-warnings
1408                           enable GDB specific build-time compiler warnings if
1409                           gcc is used
1410   --enable-inprocess-agent
1411                           inprocess agent
1412
1413 Optional Packages:
1414   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1415   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1416   --with-intel-pt         include Intel Processor Trace support (auto/yes/no)
1417   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1418   --with-libipt-prefix[=DIR]  search for libipt in DIR/include and DIR/lib
1419   --without-libipt-prefix     don't search for libipt in includedir and libdir
1420   --with-libipt-type=TYPE     type of library to search for (auto/static/shared)
1421   --with-ust=PATH       Specify prefix directory for the installed UST package
1422                           Equivalent to --with-ust-include=PATH/include
1423                           plus --with-ust-lib=PATH/lib
1424   --with-ust-include=PATH Specify directory for installed UST include files
1425   --with-ust-lib=PATH   Specify the directory for the installed UST library
1426   --with-pkgversion=PKG   Use PKG in the version string in place of "GDB"
1427   --with-bugurl=URL       Direct users to URL to report a bug
1428   --with-libthread-db=PATH
1429                           use given libthread_db directly
1430
1431 Some influential environment variables:
1432   CC          C compiler command
1433   CFLAGS      C compiler flags
1434   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1435               nonstandard directory <lib dir>
1436   LIBS        libraries to pass to the linker, e.g. -l<library>
1437   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1438               you have headers in a nonstandard directory <include dir>
1439   CXX         C++ compiler command
1440   CXXFLAGS    C++ compiler flags
1441   CPP         C preprocessor
1442
1443 Use these variables to override the choices made by `configure' or to help
1444 it to find libraries and programs with nonstandard names/locations.
1445
1446 Report bugs to the package provider.
1447 _ACEOF
1448 ac_status=$?
1449 fi
1450
1451 if test "$ac_init_help" = "recursive"; then
1452   # If there are subdirs, report their specific --help.
1453   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1454     test -d "$ac_dir" ||
1455       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1456       continue
1457     ac_builddir=.
1458
1459 case "$ac_dir" in
1460 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1461 *)
1462   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1463   # A ".." for each directory in $ac_dir_suffix.
1464   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1465   case $ac_top_builddir_sub in
1466   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1467   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1468   esac ;;
1469 esac
1470 ac_abs_top_builddir=$ac_pwd
1471 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1472 # for backward compatibility:
1473 ac_top_builddir=$ac_top_build_prefix
1474
1475 case $srcdir in
1476   .)  # We are building in place.
1477     ac_srcdir=.
1478     ac_top_srcdir=$ac_top_builddir_sub
1479     ac_abs_top_srcdir=$ac_pwd ;;
1480   [\\/]* | ?:[\\/]* )  # Absolute name.
1481     ac_srcdir=$srcdir$ac_dir_suffix;
1482     ac_top_srcdir=$srcdir
1483     ac_abs_top_srcdir=$srcdir ;;
1484   *) # Relative name.
1485     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1486     ac_top_srcdir=$ac_top_build_prefix$srcdir
1487     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1488 esac
1489 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1490
1491     cd "$ac_dir" || { ac_status=$?; continue; }
1492     # Check for guested configure.
1493     if test -f "$ac_srcdir/configure.gnu"; then
1494       echo &&
1495       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1496     elif test -f "$ac_srcdir/configure"; then
1497       echo &&
1498       $SHELL "$ac_srcdir/configure" --help=recursive
1499     else
1500       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1501     fi || ac_status=$?
1502     cd "$ac_pwd" || { ac_status=$?; break; }
1503   done
1504 fi
1505
1506 test -n "$ac_init_help" && exit $ac_status
1507 if $ac_init_version; then
1508   cat <<\_ACEOF
1509 configure
1510 generated by GNU Autoconf 2.69
1511
1512 Copyright (C) 2012 Free Software Foundation, Inc.
1513 This configure script is free software; the Free Software Foundation
1514 gives unlimited permission to copy, distribute and modify it.
1515 _ACEOF
1516   exit
1517 fi
1518
1519 ## ------------------------ ##
1520 ## Autoconf initialization. ##
1521 ## ------------------------ ##
1522
1523 # ac_fn_c_try_compile LINENO
1524 # --------------------------
1525 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1526 ac_fn_c_try_compile ()
1527 {
1528   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1529   rm -f conftest.$ac_objext
1530   if { { ac_try="$ac_compile"
1531 case "(($ac_try" in
1532   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1533   *) ac_try_echo=$ac_try;;
1534 esac
1535 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1536 $as_echo "$ac_try_echo"; } >&5
1537   (eval "$ac_compile") 2>conftest.err
1538   ac_status=$?
1539   if test -s conftest.err; then
1540     grep -v '^ *+' conftest.err >conftest.er1
1541     cat conftest.er1 >&5
1542     mv -f conftest.er1 conftest.err
1543   fi
1544   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1545   test $ac_status = 0; } && {
1546          test -z "$ac_c_werror_flag" ||
1547          test ! -s conftest.err
1548        } && test -s conftest.$ac_objext; then :
1549   ac_retval=0
1550 else
1551   $as_echo "$as_me: failed program was:" >&5
1552 sed 's/^/| /' conftest.$ac_ext >&5
1553
1554         ac_retval=1
1555 fi
1556   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1557   as_fn_set_status $ac_retval
1558
1559 } # ac_fn_c_try_compile
1560
1561 # ac_fn_cxx_try_compile LINENO
1562 # ----------------------------
1563 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1564 ac_fn_cxx_try_compile ()
1565 {
1566   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1567   rm -f conftest.$ac_objext
1568   if { { ac_try="$ac_compile"
1569 case "(($ac_try" in
1570   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1571   *) ac_try_echo=$ac_try;;
1572 esac
1573 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1574 $as_echo "$ac_try_echo"; } >&5
1575   (eval "$ac_compile") 2>conftest.err
1576   ac_status=$?
1577   if test -s conftest.err; then
1578     grep -v '^ *+' conftest.err >conftest.er1
1579     cat conftest.er1 >&5
1580     mv -f conftest.er1 conftest.err
1581   fi
1582   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1583   test $ac_status = 0; } && {
1584          test -z "$ac_cxx_werror_flag" ||
1585          test ! -s conftest.err
1586        } && test -s conftest.$ac_objext; then :
1587   ac_retval=0
1588 else
1589   $as_echo "$as_me: failed program was:" >&5
1590 sed 's/^/| /' conftest.$ac_ext >&5
1591
1592         ac_retval=1
1593 fi
1594   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1595   as_fn_set_status $ac_retval
1596
1597 } # ac_fn_cxx_try_compile
1598
1599 # ac_fn_c_try_cpp LINENO
1600 # ----------------------
1601 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1602 ac_fn_c_try_cpp ()
1603 {
1604   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1605   if { { ac_try="$ac_cpp conftest.$ac_ext"
1606 case "(($ac_try" in
1607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1608   *) ac_try_echo=$ac_try;;
1609 esac
1610 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1611 $as_echo "$ac_try_echo"; } >&5
1612   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1613   ac_status=$?
1614   if test -s conftest.err; then
1615     grep -v '^ *+' conftest.err >conftest.er1
1616     cat conftest.er1 >&5
1617     mv -f conftest.er1 conftest.err
1618   fi
1619   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1620   test $ac_status = 0; } > conftest.i && {
1621          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1622          test ! -s conftest.err
1623        }; then :
1624   ac_retval=0
1625 else
1626   $as_echo "$as_me: failed program was:" >&5
1627 sed 's/^/| /' conftest.$ac_ext >&5
1628
1629     ac_retval=1
1630 fi
1631   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1632   as_fn_set_status $ac_retval
1633
1634 } # ac_fn_c_try_cpp
1635
1636 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1637 # -------------------------------------------------------
1638 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1639 # the include files in INCLUDES and setting the cache variable VAR
1640 # accordingly.
1641 ac_fn_c_check_header_mongrel ()
1642 {
1643   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644   if eval \${$3+:} false; then :
1645   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1646 $as_echo_n "checking for $2... " >&6; }
1647 if eval \${$3+:} false; then :
1648   $as_echo_n "(cached) " >&6
1649 fi
1650 eval ac_res=\$$3
1651                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1652 $as_echo "$ac_res" >&6; }
1653 else
1654   # Is the header compilable?
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1656 $as_echo_n "checking $2 usability... " >&6; }
1657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1658 /* end confdefs.h.  */
1659 $4
1660 #include <$2>
1661 _ACEOF
1662 if ac_fn_c_try_compile "$LINENO"; then :
1663   ac_header_compiler=yes
1664 else
1665   ac_header_compiler=no
1666 fi
1667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1669 $as_echo "$ac_header_compiler" >&6; }
1670
1671 # Is the header present?
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1673 $as_echo_n "checking $2 presence... " >&6; }
1674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1675 /* end confdefs.h.  */
1676 #include <$2>
1677 _ACEOF
1678 if ac_fn_c_try_cpp "$LINENO"; then :
1679   ac_header_preproc=yes
1680 else
1681   ac_header_preproc=no
1682 fi
1683 rm -f conftest.err conftest.i conftest.$ac_ext
1684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1685 $as_echo "$ac_header_preproc" >&6; }
1686
1687 # So?  What about this header?
1688 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1689   yes:no: )
1690     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1691 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1692     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1693 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1694     ;;
1695   no:yes:* )
1696     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1697 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1698     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1699 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1700     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1701 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1702     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1703 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1704     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1705 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1706     ;;
1707 esac
1708   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1709 $as_echo_n "checking for $2... " >&6; }
1710 if eval \${$3+:} false; then :
1711   $as_echo_n "(cached) " >&6
1712 else
1713   eval "$3=\$ac_header_compiler"
1714 fi
1715 eval ac_res=\$$3
1716                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1717 $as_echo "$ac_res" >&6; }
1718 fi
1719   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1720
1721 } # ac_fn_c_check_header_mongrel
1722
1723 # ac_fn_c_try_run LINENO
1724 # ----------------------
1725 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1726 # that executables *can* be run.
1727 ac_fn_c_try_run ()
1728 {
1729   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730   if { { ac_try="$ac_link"
1731 case "(($ac_try" in
1732   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733   *) ac_try_echo=$ac_try;;
1734 esac
1735 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736 $as_echo "$ac_try_echo"; } >&5
1737   (eval "$ac_link") 2>&5
1738   ac_status=$?
1739   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1740   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1741   { { case "(($ac_try" in
1742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1743   *) ac_try_echo=$ac_try;;
1744 esac
1745 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1746 $as_echo "$ac_try_echo"; } >&5
1747   (eval "$ac_try") 2>&5
1748   ac_status=$?
1749   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1750   test $ac_status = 0; }; }; then :
1751   ac_retval=0
1752 else
1753   $as_echo "$as_me: program exited with status $ac_status" >&5
1754        $as_echo "$as_me: failed program was:" >&5
1755 sed 's/^/| /' conftest.$ac_ext >&5
1756
1757        ac_retval=$ac_status
1758 fi
1759   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1760   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1761   as_fn_set_status $ac_retval
1762
1763 } # ac_fn_c_try_run
1764
1765 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1766 # -------------------------------------------------------
1767 # Tests whether HEADER exists and can be compiled using the include files in
1768 # INCLUDES, setting the cache variable VAR accordingly.
1769 ac_fn_c_check_header_compile ()
1770 {
1771   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1772   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1773 $as_echo_n "checking for $2... " >&6; }
1774 if eval \${$3+:} false; then :
1775   $as_echo_n "(cached) " >&6
1776 else
1777   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1778 /* end confdefs.h.  */
1779 $4
1780 #include <$2>
1781 _ACEOF
1782 if ac_fn_c_try_compile "$LINENO"; then :
1783   eval "$3=yes"
1784 else
1785   eval "$3=no"
1786 fi
1787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1788 fi
1789 eval ac_res=\$$3
1790                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1791 $as_echo "$ac_res" >&6; }
1792   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1793
1794 } # ac_fn_c_check_header_compile
1795
1796 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1797 # -------------------------------------------
1798 # Tests whether TYPE exists after having included INCLUDES, setting cache
1799 # variable VAR accordingly.
1800 ac_fn_c_check_type ()
1801 {
1802   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1803   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1804 $as_echo_n "checking for $2... " >&6; }
1805 if eval \${$3+:} false; then :
1806   $as_echo_n "(cached) " >&6
1807 else
1808   eval "$3=no"
1809   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1810 /* end confdefs.h.  */
1811 $4
1812 int
1813 main ()
1814 {
1815 if (sizeof ($2))
1816          return 0;
1817   ;
1818   return 0;
1819 }
1820 _ACEOF
1821 if ac_fn_c_try_compile "$LINENO"; then :
1822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1823 /* end confdefs.h.  */
1824 $4
1825 int
1826 main ()
1827 {
1828 if (sizeof (($2)))
1829             return 0;
1830   ;
1831   return 0;
1832 }
1833 _ACEOF
1834 if ac_fn_c_try_compile "$LINENO"; then :
1835
1836 else
1837   eval "$3=yes"
1838 fi
1839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1840 fi
1841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1842 fi
1843 eval ac_res=\$$3
1844                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1845 $as_echo "$ac_res" >&6; }
1846   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1847
1848 } # ac_fn_c_check_type
1849
1850 # ac_fn_c_try_link LINENO
1851 # -----------------------
1852 # Try to link conftest.$ac_ext, and return whether this succeeded.
1853 ac_fn_c_try_link ()
1854 {
1855   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1856   rm -f conftest.$ac_objext conftest$ac_exeext
1857   if { { ac_try="$ac_link"
1858 case "(($ac_try" in
1859   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1860   *) ac_try_echo=$ac_try;;
1861 esac
1862 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1863 $as_echo "$ac_try_echo"; } >&5
1864   (eval "$ac_link") 2>conftest.err
1865   ac_status=$?
1866   if test -s conftest.err; then
1867     grep -v '^ *+' conftest.err >conftest.er1
1868     cat conftest.er1 >&5
1869     mv -f conftest.er1 conftest.err
1870   fi
1871   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1872   test $ac_status = 0; } && {
1873          test -z "$ac_c_werror_flag" ||
1874          test ! -s conftest.err
1875        } && test -s conftest$ac_exeext && {
1876          test "$cross_compiling" = yes ||
1877          test -x conftest$ac_exeext
1878        }; then :
1879   ac_retval=0
1880 else
1881   $as_echo "$as_me: failed program was:" >&5
1882 sed 's/^/| /' conftest.$ac_ext >&5
1883
1884         ac_retval=1
1885 fi
1886   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1887   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1888   # interfere with the next link command; also delete a directory that is
1889   # left behind by Apple's compiler.  We do this before executing the actions.
1890   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1891   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1892   as_fn_set_status $ac_retval
1893
1894 } # ac_fn_c_try_link
1895
1896 # ac_fn_c_check_func LINENO FUNC VAR
1897 # ----------------------------------
1898 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1899 ac_fn_c_check_func ()
1900 {
1901   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1903 $as_echo_n "checking for $2... " >&6; }
1904 if eval \${$3+:} false; then :
1905   $as_echo_n "(cached) " >&6
1906 else
1907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1908 /* end confdefs.h.  */
1909 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1910    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1911 #define $2 innocuous_$2
1912
1913 /* System header to define __stub macros and hopefully few prototypes,
1914     which can conflict with char $2 (); below.
1915     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1916     <limits.h> exists even on freestanding compilers.  */
1917
1918 #ifdef __STDC__
1919 # include <limits.h>
1920 #else
1921 # include <assert.h>
1922 #endif
1923
1924 #undef $2
1925
1926 /* Override any GCC internal prototype to avoid an error.
1927    Use char because int might match the return type of a GCC
1928    builtin and then its argument prototype would still apply.  */
1929 #ifdef __cplusplus
1930 extern "C"
1931 #endif
1932 char $2 ();
1933 /* The GNU C library defines this for functions which it implements
1934     to always fail with ENOSYS.  Some functions are actually named
1935     something starting with __ and the normal name is an alias.  */
1936 #if defined __stub_$2 || defined __stub___$2
1937 choke me
1938 #endif
1939
1940 int
1941 main ()
1942 {
1943 return $2 ();
1944   ;
1945   return 0;
1946 }
1947 _ACEOF
1948 if ac_fn_c_try_link "$LINENO"; then :
1949   eval "$3=yes"
1950 else
1951   eval "$3=no"
1952 fi
1953 rm -f core conftest.err conftest.$ac_objext \
1954     conftest$ac_exeext conftest.$ac_ext
1955 fi
1956 eval ac_res=\$$3
1957                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1958 $as_echo "$ac_res" >&6; }
1959   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1960
1961 } # ac_fn_c_check_func
1962
1963 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1964 # ---------------------------------------------
1965 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1966 # accordingly.
1967 ac_fn_c_check_decl ()
1968 {
1969   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1970   as_decl_name=`echo $2|sed 's/ *(.*//'`
1971   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1972   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1973 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1974 if eval \${$3+:} false; then :
1975   $as_echo_n "(cached) " >&6
1976 else
1977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1978 /* end confdefs.h.  */
1979 $4
1980 int
1981 main ()
1982 {
1983 #ifndef $as_decl_name
1984 #ifdef __cplusplus
1985   (void) $as_decl_use;
1986 #else
1987   (void) $as_decl_name;
1988 #endif
1989 #endif
1990
1991   ;
1992   return 0;
1993 }
1994 _ACEOF
1995 if ac_fn_c_try_compile "$LINENO"; then :
1996   eval "$3=yes"
1997 else
1998   eval "$3=no"
1999 fi
2000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2001 fi
2002 eval ac_res=\$$3
2003                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2004 $as_echo "$ac_res" >&6; }
2005   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2006
2007 } # ac_fn_c_check_decl
2008
2009 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2010 # ----------------------------------------------------
2011 # Tries to find if the field MEMBER exists in type AGGR, after including
2012 # INCLUDES, setting cache variable VAR accordingly.
2013 ac_fn_c_check_member ()
2014 {
2015   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2016   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2017 $as_echo_n "checking for $2.$3... " >&6; }
2018 if eval \${$4+:} false; then :
2019   $as_echo_n "(cached) " >&6
2020 else
2021   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2022 /* end confdefs.h.  */
2023 $5
2024 int
2025 main ()
2026 {
2027 static $2 ac_aggr;
2028 if (ac_aggr.$3)
2029 return 0;
2030   ;
2031   return 0;
2032 }
2033 _ACEOF
2034 if ac_fn_c_try_compile "$LINENO"; then :
2035   eval "$4=yes"
2036 else
2037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2038 /* end confdefs.h.  */
2039 $5
2040 int
2041 main ()
2042 {
2043 static $2 ac_aggr;
2044 if (sizeof ac_aggr.$3)
2045 return 0;
2046   ;
2047   return 0;
2048 }
2049 _ACEOF
2050 if ac_fn_c_try_compile "$LINENO"; then :
2051   eval "$4=yes"
2052 else
2053   eval "$4=no"
2054 fi
2055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2056 fi
2057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2058 fi
2059 eval ac_res=\$$4
2060                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2061 $as_echo "$ac_res" >&6; }
2062   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2063
2064 } # ac_fn_c_check_member
2065
2066 # ac_fn_cxx_try_link LINENO
2067 # -------------------------
2068 # Try to link conftest.$ac_ext, and return whether this succeeded.
2069 ac_fn_cxx_try_link ()
2070 {
2071   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2072   rm -f conftest.$ac_objext conftest$ac_exeext
2073   if { { ac_try="$ac_link"
2074 case "(($ac_try" in
2075   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2076   *) ac_try_echo=$ac_try;;
2077 esac
2078 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2079 $as_echo "$ac_try_echo"; } >&5
2080   (eval "$ac_link") 2>conftest.err
2081   ac_status=$?
2082   if test -s conftest.err; then
2083     grep -v '^ *+' conftest.err >conftest.er1
2084     cat conftest.er1 >&5
2085     mv -f conftest.er1 conftest.err
2086   fi
2087   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2088   test $ac_status = 0; } && {
2089          test -z "$ac_cxx_werror_flag" ||
2090          test ! -s conftest.err
2091        } && test -s conftest$ac_exeext && {
2092          test "$cross_compiling" = yes ||
2093          test -x conftest$ac_exeext
2094        }; then :
2095   ac_retval=0
2096 else
2097   $as_echo "$as_me: failed program was:" >&5
2098 sed 's/^/| /' conftest.$ac_ext >&5
2099
2100         ac_retval=1
2101 fi
2102   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2103   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2104   # interfere with the next link command; also delete a directory that is
2105   # left behind by Apple's compiler.  We do this before executing the actions.
2106   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2107   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2108   as_fn_set_status $ac_retval
2109
2110 } # ac_fn_cxx_try_link
2111
2112 # ac_fn_cxx_check_func LINENO FUNC VAR
2113 # ------------------------------------
2114 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2115 ac_fn_cxx_check_func ()
2116 {
2117   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2118   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2119 $as_echo_n "checking for $2... " >&6; }
2120 if eval \${$3+:} false; then :
2121   $as_echo_n "(cached) " >&6
2122 else
2123   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124 /* end confdefs.h.  */
2125 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2126    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2127 #define $2 innocuous_$2
2128
2129 /* System header to define __stub macros and hopefully few prototypes,
2130     which can conflict with char $2 (); below.
2131     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2132     <limits.h> exists even on freestanding compilers.  */
2133
2134 #ifdef __STDC__
2135 # include <limits.h>
2136 #else
2137 # include <assert.h>
2138 #endif
2139
2140 #undef $2
2141
2142 /* Override any GCC internal prototype to avoid an error.
2143    Use char because int might match the return type of a GCC
2144    builtin and then its argument prototype would still apply.  */
2145 #ifdef __cplusplus
2146 extern "C"
2147 #endif
2148 char $2 ();
2149 /* The GNU C library defines this for functions which it implements
2150     to always fail with ENOSYS.  Some functions are actually named
2151     something starting with __ and the normal name is an alias.  */
2152 #if defined __stub_$2 || defined __stub___$2
2153 choke me
2154 #endif
2155
2156 int
2157 main ()
2158 {
2159 return $2 ();
2160   ;
2161   return 0;
2162 }
2163 _ACEOF
2164 if ac_fn_cxx_try_link "$LINENO"; then :
2165   eval "$3=yes"
2166 else
2167   eval "$3=no"
2168 fi
2169 rm -f core conftest.err conftest.$ac_objext \
2170     conftest$ac_exeext conftest.$ac_ext
2171 fi
2172 eval ac_res=\$$3
2173                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2174 $as_echo "$ac_res" >&6; }
2175   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2176
2177 } # ac_fn_cxx_check_func
2178
2179 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2180 # --------------------------------------------
2181 # Tries to find the compile-time value of EXPR in a program that includes
2182 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2183 # computed
2184 ac_fn_c_compute_int ()
2185 {
2186   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187   if test "$cross_compiling" = yes; then
2188     # Depending upon the size, compute the lo and hi bounds.
2189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2190 /* end confdefs.h.  */
2191 $4
2192 int
2193 main ()
2194 {
2195 static int test_array [1 - 2 * !(($2) >= 0)];
2196 test_array [0] = 0;
2197 return test_array [0];
2198
2199   ;
2200   return 0;
2201 }
2202 _ACEOF
2203 if ac_fn_c_try_compile "$LINENO"; then :
2204   ac_lo=0 ac_mid=0
2205   while :; do
2206     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2207 /* end confdefs.h.  */
2208 $4
2209 int
2210 main ()
2211 {
2212 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2213 test_array [0] = 0;
2214 return test_array [0];
2215
2216   ;
2217   return 0;
2218 }
2219 _ACEOF
2220 if ac_fn_c_try_compile "$LINENO"; then :
2221   ac_hi=$ac_mid; break
2222 else
2223   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2224                         if test $ac_lo -le $ac_mid; then
2225                           ac_lo= ac_hi=
2226                           break
2227                         fi
2228                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2229 fi
2230 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2231   done
2232 else
2233   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2234 /* end confdefs.h.  */
2235 $4
2236 int
2237 main ()
2238 {
2239 static int test_array [1 - 2 * !(($2) < 0)];
2240 test_array [0] = 0;
2241 return test_array [0];
2242
2243   ;
2244   return 0;
2245 }
2246 _ACEOF
2247 if ac_fn_c_try_compile "$LINENO"; then :
2248   ac_hi=-1 ac_mid=-1
2249   while :; do
2250     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251 /* end confdefs.h.  */
2252 $4
2253 int
2254 main ()
2255 {
2256 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2257 test_array [0] = 0;
2258 return test_array [0];
2259
2260   ;
2261   return 0;
2262 }
2263 _ACEOF
2264 if ac_fn_c_try_compile "$LINENO"; then :
2265   ac_lo=$ac_mid; break
2266 else
2267   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2268                         if test $ac_mid -le $ac_hi; then
2269                           ac_lo= ac_hi=
2270                           break
2271                         fi
2272                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2273 fi
2274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275   done
2276 else
2277   ac_lo= ac_hi=
2278 fi
2279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2280 fi
2281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282 # Binary search between lo and hi bounds.
2283 while test "x$ac_lo" != "x$ac_hi"; do
2284   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286 /* end confdefs.h.  */
2287 $4
2288 int
2289 main ()
2290 {
2291 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2292 test_array [0] = 0;
2293 return test_array [0];
2294
2295   ;
2296   return 0;
2297 }
2298 _ACEOF
2299 if ac_fn_c_try_compile "$LINENO"; then :
2300   ac_hi=$ac_mid
2301 else
2302   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2303 fi
2304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2305 done
2306 case $ac_lo in #((
2307 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2308 '') ac_retval=1 ;;
2309 esac
2310   else
2311     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312 /* end confdefs.h.  */
2313 $4
2314 static long int longval () { return $2; }
2315 static unsigned long int ulongval () { return $2; }
2316 #include <stdio.h>
2317 #include <stdlib.h>
2318 int
2319 main ()
2320 {
2321
2322   FILE *f = fopen ("conftest.val", "w");
2323   if (! f)
2324     return 1;
2325   if (($2) < 0)
2326     {
2327       long int i = longval ();
2328       if (i != ($2))
2329         return 1;
2330       fprintf (f, "%ld", i);
2331     }
2332   else
2333     {
2334       unsigned long int i = ulongval ();
2335       if (i != ($2))
2336         return 1;
2337       fprintf (f, "%lu", i);
2338     }
2339   /* Do not output a trailing newline, as this causes \r\n confusion
2340      on some platforms.  */
2341   return ferror (f) || fclose (f) != 0;
2342
2343   ;
2344   return 0;
2345 }
2346 _ACEOF
2347 if ac_fn_c_try_run "$LINENO"; then :
2348   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2349 else
2350   ac_retval=1
2351 fi
2352 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2353   conftest.$ac_objext conftest.beam conftest.$ac_ext
2354 rm -f conftest.val
2355
2356   fi
2357   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2358   as_fn_set_status $ac_retval
2359
2360 } # ac_fn_c_compute_int
2361 cat >config.log <<_ACEOF
2362 This file contains any messages produced by compilers while
2363 running configure, to aid debugging if configure makes a mistake.
2364
2365 It was created by $as_me, which was
2366 generated by GNU Autoconf 2.69.  Invocation command line was
2367
2368   $ $0 $@
2369
2370 _ACEOF
2371 exec 5>>config.log
2372 {
2373 cat <<_ASUNAME
2374 ## --------- ##
2375 ## Platform. ##
2376 ## --------- ##
2377
2378 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2379 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2380 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2381 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2382 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2383
2384 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2385 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2386
2387 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2388 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2389 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2390 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2391 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2392 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2393 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2394
2395 _ASUNAME
2396
2397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2398 for as_dir in $PATH
2399 do
2400   IFS=$as_save_IFS
2401   test -z "$as_dir" && as_dir=.
2402     $as_echo "PATH: $as_dir"
2403   done
2404 IFS=$as_save_IFS
2405
2406 } >&5
2407
2408 cat >&5 <<_ACEOF
2409
2410
2411 ## ----------- ##
2412 ## Core tests. ##
2413 ## ----------- ##
2414
2415 _ACEOF
2416
2417
2418 # Keep a trace of the command line.
2419 # Strip out --no-create and --no-recursion so they do not pile up.
2420 # Strip out --silent because we don't want to record it for future runs.
2421 # Also quote any args containing shell meta-characters.
2422 # Make two passes to allow for proper duplicate-argument suppression.
2423 ac_configure_args=
2424 ac_configure_args0=
2425 ac_configure_args1=
2426 ac_must_keep_next=false
2427 for ac_pass in 1 2
2428 do
2429   for ac_arg
2430   do
2431     case $ac_arg in
2432     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2433     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2434     | -silent | --silent | --silen | --sile | --sil)
2435       continue ;;
2436     *\'*)
2437       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2438     esac
2439     case $ac_pass in
2440     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2441     2)
2442       as_fn_append ac_configure_args1 " '$ac_arg'"
2443       if test $ac_must_keep_next = true; then
2444         ac_must_keep_next=false # Got value, back to normal.
2445       else
2446         case $ac_arg in
2447           *=* | --config-cache | -C | -disable-* | --disable-* \
2448           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2449           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2450           | -with-* | --with-* | -without-* | --without-* | --x)
2451             case "$ac_configure_args0 " in
2452               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2453             esac
2454             ;;
2455           -* ) ac_must_keep_next=true ;;
2456         esac
2457       fi
2458       as_fn_append ac_configure_args " '$ac_arg'"
2459       ;;
2460     esac
2461   done
2462 done
2463 { ac_configure_args0=; unset ac_configure_args0;}
2464 { ac_configure_args1=; unset ac_configure_args1;}
2465
2466 # When interrupted or exit'd, cleanup temporary files, and complete
2467 # config.log.  We remove comments because anyway the quotes in there
2468 # would cause problems or look ugly.
2469 # WARNING: Use '\'' to represent an apostrophe within the trap.
2470 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2471 trap 'exit_status=$?
2472   # Save into config.log some information that might help in debugging.
2473   {
2474     echo
2475
2476     $as_echo "## ---------------- ##
2477 ## Cache variables. ##
2478 ## ---------------- ##"
2479     echo
2480     # The following way of writing the cache mishandles newlines in values,
2481 (
2482   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2483     eval ac_val=\$$ac_var
2484     case $ac_val in #(
2485     *${as_nl}*)
2486       case $ac_var in #(
2487       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2488 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2489       esac
2490       case $ac_var in #(
2491       _ | IFS | as_nl) ;; #(
2492       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2493       *) { eval $ac_var=; unset $ac_var;} ;;
2494       esac ;;
2495     esac
2496   done
2497   (set) 2>&1 |
2498     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2499     *${as_nl}ac_space=\ *)
2500       sed -n \
2501         "s/'\''/'\''\\\\'\'''\''/g;
2502           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2503       ;; #(
2504     *)
2505       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2506       ;;
2507     esac |
2508     sort
2509 )
2510     echo
2511
2512     $as_echo "## ----------------- ##
2513 ## Output variables. ##
2514 ## ----------------- ##"
2515     echo
2516     for ac_var in $ac_subst_vars
2517     do
2518       eval ac_val=\$$ac_var
2519       case $ac_val in
2520       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2521       esac
2522       $as_echo "$ac_var='\''$ac_val'\''"
2523     done | sort
2524     echo
2525
2526     if test -n "$ac_subst_files"; then
2527       $as_echo "## ------------------- ##
2528 ## File substitutions. ##
2529 ## ------------------- ##"
2530       echo
2531       for ac_var in $ac_subst_files
2532       do
2533         eval ac_val=\$$ac_var
2534         case $ac_val in
2535         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2536         esac
2537         $as_echo "$ac_var='\''$ac_val'\''"
2538       done | sort
2539       echo
2540     fi
2541
2542     if test -s confdefs.h; then
2543       $as_echo "## ----------- ##
2544 ## confdefs.h. ##
2545 ## ----------- ##"
2546       echo
2547       cat confdefs.h
2548       echo
2549     fi
2550     test "$ac_signal" != 0 &&
2551       $as_echo "$as_me: caught signal $ac_signal"
2552     $as_echo "$as_me: exit $exit_status"
2553   } >&5
2554   rm -f core *.core core.conftest.* &&
2555     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2556     exit $exit_status
2557 ' 0
2558 for ac_signal in 1 2 13 15; do
2559   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2560 done
2561 ac_signal=0
2562
2563 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2564 rm -f -r conftest* confdefs.h
2565
2566 $as_echo "/* confdefs.h */" > confdefs.h
2567
2568 # Predefined preprocessor variables.
2569
2570 cat >>confdefs.h <<_ACEOF
2571 #define PACKAGE_NAME "$PACKAGE_NAME"
2572 _ACEOF
2573
2574 cat >>confdefs.h <<_ACEOF
2575 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2576 _ACEOF
2577
2578 cat >>confdefs.h <<_ACEOF
2579 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2580 _ACEOF
2581
2582 cat >>confdefs.h <<_ACEOF
2583 #define PACKAGE_STRING "$PACKAGE_STRING"
2584 _ACEOF
2585
2586 cat >>confdefs.h <<_ACEOF
2587 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2588 _ACEOF
2589
2590 cat >>confdefs.h <<_ACEOF
2591 #define PACKAGE_URL "$PACKAGE_URL"
2592 _ACEOF
2593
2594
2595 # Let the site file select an alternate cache file if it wants to.
2596 # Prefer an explicitly selected file to automatically selected ones.
2597 ac_site_file1=NONE
2598 ac_site_file2=NONE
2599 if test -n "$CONFIG_SITE"; then
2600   # We do not want a PATH search for config.site.
2601   case $CONFIG_SITE in #((
2602     -*)  ac_site_file1=./$CONFIG_SITE;;
2603     */*) ac_site_file1=$CONFIG_SITE;;
2604     *)   ac_site_file1=./$CONFIG_SITE;;
2605   esac
2606 elif test "x$prefix" != xNONE; then
2607   ac_site_file1=$prefix/share/config.site
2608   ac_site_file2=$prefix/etc/config.site
2609 else
2610   ac_site_file1=$ac_default_prefix/share/config.site
2611   ac_site_file2=$ac_default_prefix/etc/config.site
2612 fi
2613 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2614 do
2615   test "x$ac_site_file" = xNONE && continue
2616   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2617     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2618 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2619     sed 's/^/| /' "$ac_site_file" >&5
2620     . "$ac_site_file" \
2621       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2622 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2623 as_fn_error $? "failed to load site script $ac_site_file
2624 See \`config.log' for more details" "$LINENO" 5; }
2625   fi
2626 done
2627
2628 if test -r "$cache_file"; then
2629   # Some versions of bash will fail to source /dev/null (special files
2630   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2631   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2632     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2633 $as_echo "$as_me: loading cache $cache_file" >&6;}
2634     case $cache_file in
2635       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2636       *)                      . "./$cache_file";;
2637     esac
2638   fi
2639 else
2640   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2641 $as_echo "$as_me: creating cache $cache_file" >&6;}
2642   >$cache_file
2643 fi
2644
2645 as_fn_append ac_header_list " stdlib.h"
2646 as_fn_append ac_header_list " unistd.h"
2647 as_fn_append ac_header_list " sys/param.h"
2648 # Check that the precious variables saved in the cache have kept the same
2649 # value.
2650 ac_cache_corrupted=false
2651 for ac_var in $ac_precious_vars; do
2652   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2653   eval ac_new_set=\$ac_env_${ac_var}_set
2654   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2655   eval ac_new_val=\$ac_env_${ac_var}_value
2656   case $ac_old_set,$ac_new_set in
2657     set,)
2658       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2659 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2660       ac_cache_corrupted=: ;;
2661     ,set)
2662       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2663 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2664       ac_cache_corrupted=: ;;
2665     ,);;
2666     *)
2667       if test "x$ac_old_val" != "x$ac_new_val"; then
2668         # differences in whitespace do not lead to failure.
2669         ac_old_val_w=`echo x $ac_old_val`
2670         ac_new_val_w=`echo x $ac_new_val`
2671         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2672           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2673 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2674           ac_cache_corrupted=:
2675         else
2676           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2677 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2678           eval $ac_var=\$ac_old_val
2679         fi
2680         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2681 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2682         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2683 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2684       fi;;
2685   esac
2686   # Pass precious variables to config.status.
2687   if test "$ac_new_set" = set; then
2688     case $ac_new_val in
2689     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2690     *) ac_arg=$ac_var=$ac_new_val ;;
2691     esac
2692     case " $ac_configure_args " in
2693       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2694       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2695     esac
2696   fi
2697 done
2698 if $ac_cache_corrupted; then
2699   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2700 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2701   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2702 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2703   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2704 fi
2705 ## -------------------- ##
2706 ## Main body of script. ##
2707 ## -------------------- ##
2708
2709 ac_ext=c
2710 ac_cpp='$CPP $CPPFLAGS'
2711 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2712 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2713 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2714
2715
2716
2717
2718
2719
2720
2721 ac_config_headers="$ac_config_headers config.h:config.in"
2722
2723
2724
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2726 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2727     # Check whether --enable-maintainer-mode was given.
2728 if test "${enable_maintainer_mode+set}" = set; then :
2729   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2730 else
2731   USE_MAINTAINER_MODE=no
2732 fi
2733
2734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2735 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2736    if test $USE_MAINTAINER_MODE = yes; then
2737   MAINTAINER_MODE_TRUE=
2738   MAINTAINER_MODE_FALSE='#'
2739 else
2740   MAINTAINER_MODE_TRUE='#'
2741   MAINTAINER_MODE_FALSE=
2742 fi
2743
2744   MAINT=$MAINTAINER_MODE_TRUE
2745
2746
2747
2748 ac_ext=c
2749 ac_cpp='$CPP $CPPFLAGS'
2750 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2751 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2752 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2753 if test -n "$ac_tool_prefix"; then
2754   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2755 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2757 $as_echo_n "checking for $ac_word... " >&6; }
2758 if ${ac_cv_prog_CC+:} false; then :
2759   $as_echo_n "(cached) " >&6
2760 else
2761   if test -n "$CC"; then
2762   ac_cv_prog_CC="$CC" # Let the user override the test.
2763 else
2764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2765 for as_dir in $PATH
2766 do
2767   IFS=$as_save_IFS
2768   test -z "$as_dir" && as_dir=.
2769     for ac_exec_ext in '' $ac_executable_extensions; do
2770   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2771     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2772     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2773     break 2
2774   fi
2775 done
2776   done
2777 IFS=$as_save_IFS
2778
2779 fi
2780 fi
2781 CC=$ac_cv_prog_CC
2782 if test -n "$CC"; then
2783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2784 $as_echo "$CC" >&6; }
2785 else
2786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2787 $as_echo "no" >&6; }
2788 fi
2789
2790
2791 fi
2792 if test -z "$ac_cv_prog_CC"; then
2793   ac_ct_CC=$CC
2794   # Extract the first word of "gcc", so it can be a program name with args.
2795 set dummy gcc; ac_word=$2
2796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2797 $as_echo_n "checking for $ac_word... " >&6; }
2798 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2799   $as_echo_n "(cached) " >&6
2800 else
2801   if test -n "$ac_ct_CC"; then
2802   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2803 else
2804 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2805 for as_dir in $PATH
2806 do
2807   IFS=$as_save_IFS
2808   test -z "$as_dir" && as_dir=.
2809     for ac_exec_ext in '' $ac_executable_extensions; do
2810   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2811     ac_cv_prog_ac_ct_CC="gcc"
2812     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2813     break 2
2814   fi
2815 done
2816   done
2817 IFS=$as_save_IFS
2818
2819 fi
2820 fi
2821 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2822 if test -n "$ac_ct_CC"; then
2823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2824 $as_echo "$ac_ct_CC" >&6; }
2825 else
2826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2827 $as_echo "no" >&6; }
2828 fi
2829
2830   if test "x$ac_ct_CC" = x; then
2831     CC=""
2832   else
2833     case $cross_compiling:$ac_tool_warned in
2834 yes:)
2835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2836 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2837 ac_tool_warned=yes ;;
2838 esac
2839     CC=$ac_ct_CC
2840   fi
2841 else
2842   CC="$ac_cv_prog_CC"
2843 fi
2844
2845 if test -z "$CC"; then
2846           if test -n "$ac_tool_prefix"; then
2847     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2848 set dummy ${ac_tool_prefix}cc; ac_word=$2
2849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2850 $as_echo_n "checking for $ac_word... " >&6; }
2851 if ${ac_cv_prog_CC+:} false; then :
2852   $as_echo_n "(cached) " >&6
2853 else
2854   if test -n "$CC"; then
2855   ac_cv_prog_CC="$CC" # Let the user override the test.
2856 else
2857 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2858 for as_dir in $PATH
2859 do
2860   IFS=$as_save_IFS
2861   test -z "$as_dir" && as_dir=.
2862     for ac_exec_ext in '' $ac_executable_extensions; do
2863   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2864     ac_cv_prog_CC="${ac_tool_prefix}cc"
2865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2866     break 2
2867   fi
2868 done
2869   done
2870 IFS=$as_save_IFS
2871
2872 fi
2873 fi
2874 CC=$ac_cv_prog_CC
2875 if test -n "$CC"; then
2876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2877 $as_echo "$CC" >&6; }
2878 else
2879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2880 $as_echo "no" >&6; }
2881 fi
2882
2883
2884   fi
2885 fi
2886 if test -z "$CC"; then
2887   # Extract the first word of "cc", so it can be a program name with args.
2888 set dummy cc; ac_word=$2
2889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2890 $as_echo_n "checking for $ac_word... " >&6; }
2891 if ${ac_cv_prog_CC+:} false; then :
2892   $as_echo_n "(cached) " >&6
2893 else
2894   if test -n "$CC"; then
2895   ac_cv_prog_CC="$CC" # Let the user override the test.
2896 else
2897   ac_prog_rejected=no
2898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2899 for as_dir in $PATH
2900 do
2901   IFS=$as_save_IFS
2902   test -z "$as_dir" && as_dir=.
2903     for ac_exec_ext in '' $ac_executable_extensions; do
2904   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2905     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2906        ac_prog_rejected=yes
2907        continue
2908      fi
2909     ac_cv_prog_CC="cc"
2910     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2911     break 2
2912   fi
2913 done
2914   done
2915 IFS=$as_save_IFS
2916
2917 if test $ac_prog_rejected = yes; then
2918   # We found a bogon in the path, so make sure we never use it.
2919   set dummy $ac_cv_prog_CC
2920   shift
2921   if test $# != 0; then
2922     # We chose a different compiler from the bogus one.
2923     # However, it has the same basename, so the bogon will be chosen
2924     # first if we set CC to just the basename; use the full file name.
2925     shift
2926     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2927   fi
2928 fi
2929 fi
2930 fi
2931 CC=$ac_cv_prog_CC
2932 if test -n "$CC"; then
2933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2934 $as_echo "$CC" >&6; }
2935 else
2936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2937 $as_echo "no" >&6; }
2938 fi
2939
2940
2941 fi
2942 if test -z "$CC"; then
2943   if test -n "$ac_tool_prefix"; then
2944   for ac_prog in cl.exe
2945   do
2946     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2947 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2949 $as_echo_n "checking for $ac_word... " >&6; }
2950 if ${ac_cv_prog_CC+:} false; then :
2951   $as_echo_n "(cached) " >&6
2952 else
2953   if test -n "$CC"; then
2954   ac_cv_prog_CC="$CC" # Let the user override the test.
2955 else
2956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2957 for as_dir in $PATH
2958 do
2959   IFS=$as_save_IFS
2960   test -z "$as_dir" && as_dir=.
2961     for ac_exec_ext in '' $ac_executable_extensions; do
2962   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2963     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2965     break 2
2966   fi
2967 done
2968   done
2969 IFS=$as_save_IFS
2970
2971 fi
2972 fi
2973 CC=$ac_cv_prog_CC
2974 if test -n "$CC"; then
2975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2976 $as_echo "$CC" >&6; }
2977 else
2978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2979 $as_echo "no" >&6; }
2980 fi
2981
2982
2983     test -n "$CC" && break
2984   done
2985 fi
2986 if test -z "$CC"; then
2987   ac_ct_CC=$CC
2988   for ac_prog in cl.exe
2989 do
2990   # Extract the first word of "$ac_prog", so it can be a program name with args.
2991 set dummy $ac_prog; ac_word=$2
2992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2993 $as_echo_n "checking for $ac_word... " >&6; }
2994 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2995   $as_echo_n "(cached) " >&6
2996 else
2997   if test -n "$ac_ct_CC"; then
2998   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2999 else
3000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3001 for as_dir in $PATH
3002 do
3003   IFS=$as_save_IFS
3004   test -z "$as_dir" && as_dir=.
3005     for ac_exec_ext in '' $ac_executable_extensions; do
3006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3007     ac_cv_prog_ac_ct_CC="$ac_prog"
3008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3009     break 2
3010   fi
3011 done
3012   done
3013 IFS=$as_save_IFS
3014
3015 fi
3016 fi
3017 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3018 if test -n "$ac_ct_CC"; then
3019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3020 $as_echo "$ac_ct_CC" >&6; }
3021 else
3022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3023 $as_echo "no" >&6; }
3024 fi
3025
3026
3027   test -n "$ac_ct_CC" && break
3028 done
3029
3030   if test "x$ac_ct_CC" = x; then
3031     CC=""
3032   else
3033     case $cross_compiling:$ac_tool_warned in
3034 yes:)
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3036 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3037 ac_tool_warned=yes ;;
3038 esac
3039     CC=$ac_ct_CC
3040   fi
3041 fi
3042
3043 fi
3044
3045
3046 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3047 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3048 as_fn_error $? "no acceptable C compiler found in \$PATH
3049 See \`config.log' for more details" "$LINENO" 5; }
3050
3051 # Provide some information about the compiler.
3052 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3053 set X $ac_compile
3054 ac_compiler=$2
3055 for ac_option in --version -v -V -qversion; do
3056   { { ac_try="$ac_compiler $ac_option >&5"
3057 case "(($ac_try" in
3058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3059   *) ac_try_echo=$ac_try;;
3060 esac
3061 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3062 $as_echo "$ac_try_echo"; } >&5
3063   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3064   ac_status=$?
3065   if test -s conftest.err; then
3066     sed '10a\
3067 ... rest of stderr output deleted ...
3068          10q' conftest.err >conftest.er1
3069     cat conftest.er1 >&5
3070   fi
3071   rm -f conftest.er1 conftest.err
3072   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3073   test $ac_status = 0; }
3074 done
3075
3076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3077 /* end confdefs.h.  */
3078
3079 int
3080 main ()
3081 {
3082
3083   ;
3084   return 0;
3085 }
3086 _ACEOF
3087 ac_clean_files_save=$ac_clean_files
3088 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3089 # Try to create an executable without -o first, disregard a.out.
3090 # It will help us diagnose broken compilers, and finding out an intuition
3091 # of exeext.
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3093 $as_echo_n "checking whether the C compiler works... " >&6; }
3094 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3095
3096 # The possible output files:
3097 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3098
3099 ac_rmfiles=
3100 for ac_file in $ac_files
3101 do
3102   case $ac_file in
3103     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3104     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3105   esac
3106 done
3107 rm -f $ac_rmfiles
3108
3109 if { { ac_try="$ac_link_default"
3110 case "(($ac_try" in
3111   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3112   *) ac_try_echo=$ac_try;;
3113 esac
3114 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3115 $as_echo "$ac_try_echo"; } >&5
3116   (eval "$ac_link_default") 2>&5
3117   ac_status=$?
3118   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3119   test $ac_status = 0; }; then :
3120   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3121 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3122 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3123 # so that the user can short-circuit this test for compilers unknown to
3124 # Autoconf.
3125 for ac_file in $ac_files ''
3126 do
3127   test -f "$ac_file" || continue
3128   case $ac_file in
3129     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3130         ;;
3131     [ab].out )
3132         # We found the default executable, but exeext='' is most
3133         # certainly right.
3134         break;;
3135     *.* )
3136         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3137         then :; else
3138            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3139         fi
3140         # We set ac_cv_exeext here because the later test for it is not
3141         # safe: cross compilers may not add the suffix if given an `-o'
3142         # argument, so we may need to know it at that point already.
3143         # Even if this section looks crufty: it has the advantage of
3144         # actually working.
3145         break;;
3146     * )
3147         break;;
3148   esac
3149 done
3150 test "$ac_cv_exeext" = no && ac_cv_exeext=
3151
3152 else
3153   ac_file=''
3154 fi
3155 if test -z "$ac_file"; then :
3156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3157 $as_echo "no" >&6; }
3158 $as_echo "$as_me: failed program was:" >&5
3159 sed 's/^/| /' conftest.$ac_ext >&5
3160
3161 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3162 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3163 as_fn_error 77 "C compiler cannot create executables
3164 See \`config.log' for more details" "$LINENO" 5; }
3165 else
3166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3167 $as_echo "yes" >&6; }
3168 fi
3169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3170 $as_echo_n "checking for C compiler default output file name... " >&6; }
3171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3172 $as_echo "$ac_file" >&6; }
3173 ac_exeext=$ac_cv_exeext
3174
3175 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3176 ac_clean_files=$ac_clean_files_save
3177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3178 $as_echo_n "checking for suffix of executables... " >&6; }
3179 if { { ac_try="$ac_link"
3180 case "(($ac_try" in
3181   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3182   *) ac_try_echo=$ac_try;;
3183 esac
3184 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3185 $as_echo "$ac_try_echo"; } >&5
3186   (eval "$ac_link") 2>&5
3187   ac_status=$?
3188   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3189   test $ac_status = 0; }; then :
3190   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3191 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3192 # work properly (i.e., refer to `conftest.exe'), while it won't with
3193 # `rm'.
3194 for ac_file in conftest.exe conftest conftest.*; do
3195   test -f "$ac_file" || continue
3196   case $ac_file in
3197     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3198     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3199           break;;
3200     * ) break;;
3201   esac
3202 done
3203 else
3204   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3205 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3206 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3207 See \`config.log' for more details" "$LINENO" 5; }
3208 fi
3209 rm -f conftest conftest$ac_cv_exeext
3210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3211 $as_echo "$ac_cv_exeext" >&6; }
3212
3213 rm -f conftest.$ac_ext
3214 EXEEXT=$ac_cv_exeext
3215 ac_exeext=$EXEEXT
3216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3217 /* end confdefs.h.  */
3218 #include <stdio.h>
3219 int
3220 main ()
3221 {
3222 FILE *f = fopen ("conftest.out", "w");
3223  return ferror (f) || fclose (f) != 0;
3224
3225   ;
3226   return 0;
3227 }
3228 _ACEOF
3229 ac_clean_files="$ac_clean_files conftest.out"
3230 # Check that the compiler produces executables we can run.  If not, either
3231 # the compiler is broken, or we cross compile.
3232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3233 $as_echo_n "checking whether we are cross compiling... " >&6; }
3234 if test "$cross_compiling" != yes; then
3235   { { ac_try="$ac_link"
3236 case "(($ac_try" in
3237   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3238   *) ac_try_echo=$ac_try;;
3239 esac
3240 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3241 $as_echo "$ac_try_echo"; } >&5
3242   (eval "$ac_link") 2>&5
3243   ac_status=$?
3244   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3245   test $ac_status = 0; }
3246   if { ac_try='./conftest$ac_cv_exeext'
3247   { { case "(($ac_try" in
3248   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3249   *) ac_try_echo=$ac_try;;
3250 esac
3251 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3252 $as_echo "$ac_try_echo"; } >&5
3253   (eval "$ac_try") 2>&5
3254   ac_status=$?
3255   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3256   test $ac_status = 0; }; }; then
3257     cross_compiling=no
3258   else
3259     if test "$cross_compiling" = maybe; then
3260         cross_compiling=yes
3261     else
3262         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3263 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3264 as_fn_error $? "cannot run C compiled programs.
3265 If you meant to cross compile, use \`--host'.
3266 See \`config.log' for more details" "$LINENO" 5; }
3267     fi
3268   fi
3269 fi
3270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3271 $as_echo "$cross_compiling" >&6; }
3272
3273 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3274 ac_clean_files=$ac_clean_files_save
3275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3276 $as_echo_n "checking for suffix of object files... " >&6; }
3277 if ${ac_cv_objext+:} false; then :
3278   $as_echo_n "(cached) " >&6
3279 else
3280   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3281 /* end confdefs.h.  */
3282
3283 int
3284 main ()
3285 {
3286
3287   ;
3288   return 0;
3289 }
3290 _ACEOF
3291 rm -f conftest.o conftest.obj
3292 if { { ac_try="$ac_compile"
3293 case "(($ac_try" in
3294   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3295   *) ac_try_echo=$ac_try;;
3296 esac
3297 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3298 $as_echo "$ac_try_echo"; } >&5
3299   (eval "$ac_compile") 2>&5
3300   ac_status=$?
3301   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3302   test $ac_status = 0; }; then :
3303   for ac_file in conftest.o conftest.obj conftest.*; do
3304   test -f "$ac_file" || continue;
3305   case $ac_file in
3306     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3307     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3308        break;;
3309   esac
3310 done
3311 else
3312   $as_echo "$as_me: failed program was:" >&5
3313 sed 's/^/| /' conftest.$ac_ext >&5
3314
3315 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3316 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3317 as_fn_error $? "cannot compute suffix of object files: cannot compile
3318 See \`config.log' for more details" "$LINENO" 5; }
3319 fi
3320 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3321 fi
3322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3323 $as_echo "$ac_cv_objext" >&6; }
3324 OBJEXT=$ac_cv_objext
3325 ac_objext=$OBJEXT
3326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3327 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3328 if ${ac_cv_c_compiler_gnu+:} false; then :
3329   $as_echo_n "(cached) " >&6
3330 else
3331   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3332 /* end confdefs.h.  */
3333
3334 int
3335 main ()
3336 {
3337 #ifndef __GNUC__
3338        choke me
3339 #endif
3340
3341   ;
3342   return 0;
3343 }
3344 _ACEOF
3345 if ac_fn_c_try_compile "$LINENO"; then :
3346   ac_compiler_gnu=yes
3347 else
3348   ac_compiler_gnu=no
3349 fi
3350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3351 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3352
3353 fi
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3355 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3356 if test $ac_compiler_gnu = yes; then
3357   GCC=yes
3358 else
3359   GCC=
3360 fi
3361 ac_test_CFLAGS=${CFLAGS+set}
3362 ac_save_CFLAGS=$CFLAGS
3363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3364 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3365 if ${ac_cv_prog_cc_g+:} false; then :
3366   $as_echo_n "(cached) " >&6
3367 else
3368   ac_save_c_werror_flag=$ac_c_werror_flag
3369    ac_c_werror_flag=yes
3370    ac_cv_prog_cc_g=no
3371    CFLAGS="-g"
3372    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3373 /* end confdefs.h.  */
3374
3375 int
3376 main ()
3377 {
3378
3379   ;
3380   return 0;
3381 }
3382 _ACEOF
3383 if ac_fn_c_try_compile "$LINENO"; then :
3384   ac_cv_prog_cc_g=yes
3385 else
3386   CFLAGS=""
3387       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3388 /* end confdefs.h.  */
3389
3390 int
3391 main ()
3392 {
3393
3394   ;
3395   return 0;
3396 }
3397 _ACEOF
3398 if ac_fn_c_try_compile "$LINENO"; then :
3399
3400 else
3401   ac_c_werror_flag=$ac_save_c_werror_flag
3402          CFLAGS="-g"
3403          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3404 /* end confdefs.h.  */
3405
3406 int
3407 main ()
3408 {
3409
3410   ;
3411   return 0;
3412 }
3413 _ACEOF
3414 if ac_fn_c_try_compile "$LINENO"; then :
3415   ac_cv_prog_cc_g=yes
3416 fi
3417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3418 fi
3419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3420 fi
3421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3422    ac_c_werror_flag=$ac_save_c_werror_flag
3423 fi
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3425 $as_echo "$ac_cv_prog_cc_g" >&6; }
3426 if test "$ac_test_CFLAGS" = set; then
3427   CFLAGS=$ac_save_CFLAGS
3428 elif test $ac_cv_prog_cc_g = yes; then
3429   if test "$GCC" = yes; then
3430     CFLAGS="-g -O2"
3431   else
3432     CFLAGS="-g"
3433   fi
3434 else
3435   if test "$GCC" = yes; then
3436     CFLAGS="-O2"
3437   else
3438     CFLAGS=
3439   fi
3440 fi
3441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3442 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3443 if ${ac_cv_prog_cc_c89+:} false; then :
3444   $as_echo_n "(cached) " >&6
3445 else
3446   ac_cv_prog_cc_c89=no
3447 ac_save_CC=$CC
3448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3449 /* end confdefs.h.  */
3450 #include <stdarg.h>
3451 #include <stdio.h>
3452 struct stat;
3453 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3454 struct buf { int x; };
3455 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3456 static char *e (p, i)
3457      char **p;
3458      int i;
3459 {
3460   return p[i];
3461 }
3462 static char *f (char * (*g) (char **, int), char **p, ...)
3463 {
3464   char *s;
3465   va_list v;
3466   va_start (v,p);
3467   s = g (p, va_arg (v,int));
3468   va_end (v);
3469   return s;
3470 }
3471
3472 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3473    function prototypes and stuff, but not '\xHH' hex character constants.
3474    These don't provoke an error unfortunately, instead are silently treated
3475    as 'x'.  The following induces an error, until -std is added to get
3476    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3477    array size at least.  It's necessary to write '\x00'==0 to get something
3478    that's true only with -std.  */
3479 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3480
3481 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3482    inside strings and character constants.  */
3483 #define FOO(x) 'x'
3484 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3485
3486 int test (int i, double x);
3487 struct s1 {int (*f) (int a);};
3488 struct s2 {int (*f) (double a);};
3489 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3490 int argc;
3491 char **argv;
3492 int
3493 main ()
3494 {
3495 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3496   ;
3497   return 0;
3498 }
3499 _ACEOF
3500 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3501         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3502 do
3503   CC="$ac_save_CC $ac_arg"
3504   if ac_fn_c_try_compile "$LINENO"; then :
3505   ac_cv_prog_cc_c89=$ac_arg
3506 fi
3507 rm -f core conftest.err conftest.$ac_objext
3508   test "x$ac_cv_prog_cc_c89" != "xno" && break
3509 done
3510 rm -f conftest.$ac_ext
3511 CC=$ac_save_CC
3512
3513 fi
3514 # AC_CACHE_VAL
3515 case "x$ac_cv_prog_cc_c89" in
3516   x)
3517     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3518 $as_echo "none needed" >&6; } ;;
3519   xno)
3520     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3521 $as_echo "unsupported" >&6; } ;;
3522   *)
3523     CC="$CC $ac_cv_prog_cc_c89"
3524     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3525 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3526 esac
3527 if test "x$ac_cv_prog_cc_c89" != xno; then :
3528
3529 fi
3530
3531 ac_ext=c
3532 ac_cpp='$CPP $CPPFLAGS'
3533 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3534 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3535 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3536
3537 ac_ext=cpp
3538 ac_cpp='$CXXCPP $CPPFLAGS'
3539 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3540 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3541 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3542 if test -z "$CXX"; then
3543   if test -n "$CCC"; then
3544     CXX=$CCC
3545   else
3546     if test -n "$ac_tool_prefix"; then
3547   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3548   do
3549     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3550 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3552 $as_echo_n "checking for $ac_word... " >&6; }
3553 if ${ac_cv_prog_CXX+:} false; then :
3554   $as_echo_n "(cached) " >&6
3555 else
3556   if test -n "$CXX"; then
3557   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3558 else
3559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3560 for as_dir in $PATH
3561 do
3562   IFS=$as_save_IFS
3563   test -z "$as_dir" && as_dir=.
3564     for ac_exec_ext in '' $ac_executable_extensions; do
3565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3566     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3568     break 2
3569   fi
3570 done
3571   done
3572 IFS=$as_save_IFS
3573
3574 fi
3575 fi
3576 CXX=$ac_cv_prog_CXX
3577 if test -n "$CXX"; then
3578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3579 $as_echo "$CXX" >&6; }
3580 else
3581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3582 $as_echo "no" >&6; }
3583 fi
3584
3585
3586     test -n "$CXX" && break
3587   done
3588 fi
3589 if test -z "$CXX"; then
3590   ac_ct_CXX=$CXX
3591   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3592 do
3593   # Extract the first word of "$ac_prog", so it can be a program name with args.
3594 set dummy $ac_prog; ac_word=$2
3595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3596 $as_echo_n "checking for $ac_word... " >&6; }
3597 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3598   $as_echo_n "(cached) " >&6
3599 else
3600   if test -n "$ac_ct_CXX"; then
3601   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3602 else
3603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3604 for as_dir in $PATH
3605 do
3606   IFS=$as_save_IFS
3607   test -z "$as_dir" && as_dir=.
3608     for ac_exec_ext in '' $ac_executable_extensions; do
3609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3610     ac_cv_prog_ac_ct_CXX="$ac_prog"
3611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3612     break 2
3613   fi
3614 done
3615   done
3616 IFS=$as_save_IFS
3617
3618 fi
3619 fi
3620 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3621 if test -n "$ac_ct_CXX"; then
3622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3623 $as_echo "$ac_ct_CXX" >&6; }
3624 else
3625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3626 $as_echo "no" >&6; }
3627 fi
3628
3629
3630   test -n "$ac_ct_CXX" && break
3631 done
3632
3633   if test "x$ac_ct_CXX" = x; then
3634     CXX="g++"
3635   else
3636     case $cross_compiling:$ac_tool_warned in
3637 yes:)
3638 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3639 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3640 ac_tool_warned=yes ;;
3641 esac
3642     CXX=$ac_ct_CXX
3643   fi
3644 fi
3645
3646   fi
3647 fi
3648 # Provide some information about the compiler.
3649 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3650 set X $ac_compile
3651 ac_compiler=$2
3652 for ac_option in --version -v -V -qversion; do
3653   { { ac_try="$ac_compiler $ac_option >&5"
3654 case "(($ac_try" in
3655   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3656   *) ac_try_echo=$ac_try;;
3657 esac
3658 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3659 $as_echo "$ac_try_echo"; } >&5
3660   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3661   ac_status=$?
3662   if test -s conftest.err; then
3663     sed '10a\
3664 ... rest of stderr output deleted ...
3665          10q' conftest.err >conftest.er1
3666     cat conftest.er1 >&5
3667   fi
3668   rm -f conftest.er1 conftest.err
3669   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3670   test $ac_status = 0; }
3671 done
3672
3673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3674 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3675 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3676   $as_echo_n "(cached) " >&6
3677 else
3678   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3679 /* end confdefs.h.  */
3680
3681 int
3682 main ()
3683 {
3684 #ifndef __GNUC__
3685        choke me
3686 #endif
3687
3688   ;
3689   return 0;
3690 }
3691 _ACEOF
3692 if ac_fn_cxx_try_compile "$LINENO"; then :
3693   ac_compiler_gnu=yes
3694 else
3695   ac_compiler_gnu=no
3696 fi
3697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3698 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3699
3700 fi
3701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3702 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3703 if test $ac_compiler_gnu = yes; then
3704   GXX=yes
3705 else
3706   GXX=
3707 fi
3708 ac_test_CXXFLAGS=${CXXFLAGS+set}
3709 ac_save_CXXFLAGS=$CXXFLAGS
3710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3711 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3712 if ${ac_cv_prog_cxx_g+:} false; then :
3713   $as_echo_n "(cached) " >&6
3714 else
3715   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3716    ac_cxx_werror_flag=yes
3717    ac_cv_prog_cxx_g=no
3718    CXXFLAGS="-g"
3719    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3720 /* end confdefs.h.  */
3721
3722 int
3723 main ()
3724 {
3725
3726   ;
3727   return 0;
3728 }
3729 _ACEOF
3730 if ac_fn_cxx_try_compile "$LINENO"; then :
3731   ac_cv_prog_cxx_g=yes
3732 else
3733   CXXFLAGS=""
3734       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3735 /* end confdefs.h.  */
3736
3737 int
3738 main ()
3739 {
3740
3741   ;
3742   return 0;
3743 }
3744 _ACEOF
3745 if ac_fn_cxx_try_compile "$LINENO"; then :
3746
3747 else
3748   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3749          CXXFLAGS="-g"
3750          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3751 /* end confdefs.h.  */
3752
3753 int
3754 main ()
3755 {
3756
3757   ;
3758   return 0;
3759 }
3760 _ACEOF
3761 if ac_fn_cxx_try_compile "$LINENO"; then :
3762   ac_cv_prog_cxx_g=yes
3763 fi
3764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3765 fi
3766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3767 fi
3768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3769    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3770 fi
3771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3772 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3773 if test "$ac_test_CXXFLAGS" = set; then
3774   CXXFLAGS=$ac_save_CXXFLAGS
3775 elif test $ac_cv_prog_cxx_g = yes; then
3776   if test "$GXX" = yes; then
3777     CXXFLAGS="-g -O2"
3778   else
3779     CXXFLAGS="-g"
3780   fi
3781 else
3782   if test "$GXX" = yes; then
3783     CXXFLAGS="-O2"
3784   else
3785     CXXFLAGS=
3786   fi
3787 fi
3788 ac_ext=c
3789 ac_cpp='$CPP $CPPFLAGS'
3790 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3791 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3792 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3793
3794
3795 ac_ext=c
3796 ac_cpp='$CPP $CPPFLAGS'
3797 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3798 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3799 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3801 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3802 # On Suns, sometimes $CPP names a directory.
3803 if test -n "$CPP" && test -d "$CPP"; then
3804   CPP=
3805 fi
3806 if test -z "$CPP"; then
3807   if ${ac_cv_prog_CPP+:} false; then :
3808   $as_echo_n "(cached) " >&6
3809 else
3810       # Double quotes because CPP needs to be expanded
3811     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3812     do
3813       ac_preproc_ok=false
3814 for ac_c_preproc_warn_flag in '' yes
3815 do
3816   # Use a header file that comes with gcc, so configuring glibc
3817   # with a fresh cross-compiler works.
3818   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3819   # <limits.h> exists even on freestanding compilers.
3820   # On the NeXT, cc -E runs the code through the compiler's parser,
3821   # not just through cpp. "Syntax error" is here to catch this case.
3822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3823 /* end confdefs.h.  */
3824 #ifdef __STDC__
3825 # include <limits.h>
3826 #else
3827 # include <assert.h>
3828 #endif
3829                      Syntax error
3830 _ACEOF
3831 if ac_fn_c_try_cpp "$LINENO"; then :
3832
3833 else
3834   # Broken: fails on valid input.
3835 continue
3836 fi
3837 rm -f conftest.err conftest.i conftest.$ac_ext
3838
3839   # OK, works on sane cases.  Now check whether nonexistent headers
3840   # can be detected and how.
3841   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3842 /* end confdefs.h.  */
3843 #include <ac_nonexistent.h>
3844 _ACEOF
3845 if ac_fn_c_try_cpp "$LINENO"; then :
3846   # Broken: success on invalid input.
3847 continue
3848 else
3849   # Passes both tests.
3850 ac_preproc_ok=:
3851 break
3852 fi
3853 rm -f conftest.err conftest.i conftest.$ac_ext
3854
3855 done
3856 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3857 rm -f conftest.i conftest.err conftest.$ac_ext
3858 if $ac_preproc_ok; then :
3859   break
3860 fi
3861
3862     done
3863     ac_cv_prog_CPP=$CPP
3864
3865 fi
3866   CPP=$ac_cv_prog_CPP
3867 else
3868   ac_cv_prog_CPP=$CPP
3869 fi
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3871 $as_echo "$CPP" >&6; }
3872 ac_preproc_ok=false
3873 for ac_c_preproc_warn_flag in '' yes
3874 do
3875   # Use a header file that comes with gcc, so configuring glibc
3876   # with a fresh cross-compiler works.
3877   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3878   # <limits.h> exists even on freestanding compilers.
3879   # On the NeXT, cc -E runs the code through the compiler's parser,
3880   # not just through cpp. "Syntax error" is here to catch this case.
3881   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3882 /* end confdefs.h.  */
3883 #ifdef __STDC__
3884 # include <limits.h>
3885 #else
3886 # include <assert.h>
3887 #endif
3888                      Syntax error
3889 _ACEOF
3890 if ac_fn_c_try_cpp "$LINENO"; then :
3891
3892 else
3893   # Broken: fails on valid input.
3894 continue
3895 fi
3896 rm -f conftest.err conftest.i conftest.$ac_ext
3897
3898   # OK, works on sane cases.  Now check whether nonexistent headers
3899   # can be detected and how.
3900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3901 /* end confdefs.h.  */
3902 #include <ac_nonexistent.h>
3903 _ACEOF
3904 if ac_fn_c_try_cpp "$LINENO"; then :
3905   # Broken: success on invalid input.
3906 continue
3907 else
3908   # Passes both tests.
3909 ac_preproc_ok=:
3910 break
3911 fi
3912 rm -f conftest.err conftest.i conftest.$ac_ext
3913
3914 done
3915 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3916 rm -f conftest.i conftest.err conftest.$ac_ext
3917 if $ac_preproc_ok; then :
3918
3919 else
3920   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3921 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3922 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3923 See \`config.log' for more details" "$LINENO" 5; }
3924 fi
3925
3926 ac_ext=c
3927 ac_cpp='$CPP $CPPFLAGS'
3928 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3929 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3930 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3931
3932
3933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3934 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3935 if ${ac_cv_path_GREP+:} false; then :
3936   $as_echo_n "(cached) " >&6
3937 else
3938   if test -z "$GREP"; then
3939   ac_path_GREP_found=false
3940   # Loop through the user's path and test for each of PROGNAME-LIST
3941   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3942 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3943 do
3944   IFS=$as_save_IFS
3945   test -z "$as_dir" && as_dir=.
3946     for ac_prog in grep ggrep; do
3947     for ac_exec_ext in '' $ac_executable_extensions; do
3948       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3949       as_fn_executable_p "$ac_path_GREP" || continue
3950 # Check for GNU ac_path_GREP and select it if it is found.
3951   # Check for GNU $ac_path_GREP
3952 case `"$ac_path_GREP" --version 2>&1` in
3953 *GNU*)
3954   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3955 *)
3956   ac_count=0
3957   $as_echo_n 0123456789 >"conftest.in"
3958   while :
3959   do
3960     cat "conftest.in" "conftest.in" >"conftest.tmp"
3961     mv "conftest.tmp" "conftest.in"
3962     cp "conftest.in" "conftest.nl"
3963     $as_echo 'GREP' >> "conftest.nl"
3964     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3965     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3966     as_fn_arith $ac_count + 1 && ac_count=$as_val
3967     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3968       # Best one so far, save it but keep looking for a better one
3969       ac_cv_path_GREP="$ac_path_GREP"
3970       ac_path_GREP_max=$ac_count
3971     fi
3972     # 10*(2^10) chars as input seems more than enough
3973     test $ac_count -gt 10 && break
3974   done
3975   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3976 esac
3977
3978       $ac_path_GREP_found && break 3
3979     done
3980   done
3981   done
3982 IFS=$as_save_IFS
3983   if test -z "$ac_cv_path_GREP"; then
3984     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3985   fi
3986 else
3987   ac_cv_path_GREP=$GREP
3988 fi
3989
3990 fi
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3992 $as_echo "$ac_cv_path_GREP" >&6; }
3993  GREP="$ac_cv_path_GREP"
3994
3995
3996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3997 $as_echo_n "checking for egrep... " >&6; }
3998 if ${ac_cv_path_EGREP+:} false; then :
3999   $as_echo_n "(cached) " >&6
4000 else
4001   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4002    then ac_cv_path_EGREP="$GREP -E"
4003    else
4004      if test -z "$EGREP"; then
4005   ac_path_EGREP_found=false
4006   # Loop through the user's path and test for each of PROGNAME-LIST
4007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4008 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4009 do
4010   IFS=$as_save_IFS
4011   test -z "$as_dir" && as_dir=.
4012     for ac_prog in egrep; do
4013     for ac_exec_ext in '' $ac_executable_extensions; do
4014       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4015       as_fn_executable_p "$ac_path_EGREP" || continue
4016 # Check for GNU ac_path_EGREP and select it if it is found.
4017   # Check for GNU $ac_path_EGREP
4018 case `"$ac_path_EGREP" --version 2>&1` in
4019 *GNU*)
4020   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4021 *)
4022   ac_count=0
4023   $as_echo_n 0123456789 >"conftest.in"
4024   while :
4025   do
4026     cat "conftest.in" "conftest.in" >"conftest.tmp"
4027     mv "conftest.tmp" "conftest.in"
4028     cp "conftest.in" "conftest.nl"
4029     $as_echo 'EGREP' >> "conftest.nl"
4030     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4031     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4032     as_fn_arith $ac_count + 1 && ac_count=$as_val
4033     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4034       # Best one so far, save it but keep looking for a better one
4035       ac_cv_path_EGREP="$ac_path_EGREP"
4036       ac_path_EGREP_max=$ac_count
4037     fi
4038     # 10*(2^10) chars as input seems more than enough
4039     test $ac_count -gt 10 && break
4040   done
4041   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4042 esac
4043
4044       $ac_path_EGREP_found && break 3
4045     done
4046   done
4047   done
4048 IFS=$as_save_IFS
4049   if test -z "$ac_cv_path_EGREP"; then
4050     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4051   fi
4052 else
4053   ac_cv_path_EGREP=$EGREP
4054 fi
4055
4056    fi
4057 fi
4058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4059 $as_echo "$ac_cv_path_EGREP" >&6; }
4060  EGREP="$ac_cv_path_EGREP"
4061
4062
4063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4064 $as_echo_n "checking for ANSI C header files... " >&6; }
4065 if ${ac_cv_header_stdc+:} false; then :
4066   $as_echo_n "(cached) " >&6
4067 else
4068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4069 /* end confdefs.h.  */
4070 #include <stdlib.h>
4071 #include <stdarg.h>
4072 #include <string.h>
4073 #include <float.h>
4074
4075 int
4076 main ()
4077 {
4078
4079   ;
4080   return 0;
4081 }
4082 _ACEOF
4083 if ac_fn_c_try_compile "$LINENO"; then :
4084   ac_cv_header_stdc=yes
4085 else
4086   ac_cv_header_stdc=no
4087 fi
4088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4089
4090 if test $ac_cv_header_stdc = yes; then
4091   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4092   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4093 /* end confdefs.h.  */
4094 #include <string.h>
4095
4096 _ACEOF
4097 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4098   $EGREP "memchr" >/dev/null 2>&1; then :
4099
4100 else
4101   ac_cv_header_stdc=no
4102 fi
4103 rm -f conftest*
4104
4105 fi
4106
4107 if test $ac_cv_header_stdc = yes; then
4108   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4110 /* end confdefs.h.  */
4111 #include <stdlib.h>
4112
4113 _ACEOF
4114 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4115   $EGREP "free" >/dev/null 2>&1; then :
4116
4117 else
4118   ac_cv_header_stdc=no
4119 fi
4120 rm -f conftest*
4121
4122 fi
4123
4124 if test $ac_cv_header_stdc = yes; then
4125   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4126   if test "$cross_compiling" = yes; then :
4127   :
4128 else
4129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4130 /* end confdefs.h.  */
4131 #include <ctype.h>
4132 #include <stdlib.h>
4133 #if ((' ' & 0x0FF) == 0x020)
4134 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4135 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4136 #else
4137 # define ISLOWER(c) \
4138                    (('a' <= (c) && (c) <= 'i') \
4139                      || ('j' <= (c) && (c) <= 'r') \
4140                      || ('s' <= (c) && (c) <= 'z'))
4141 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4142 #endif
4143
4144 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4145 int
4146 main ()
4147 {
4148   int i;
4149   for (i = 0; i < 256; i++)
4150     if (XOR (islower (i), ISLOWER (i))
4151         || toupper (i) != TOUPPER (i))
4152       return 2;
4153   return 0;
4154 }
4155 _ACEOF
4156 if ac_fn_c_try_run "$LINENO"; then :
4157
4158 else
4159   ac_cv_header_stdc=no
4160 fi
4161 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4162   conftest.$ac_objext conftest.beam conftest.$ac_ext
4163 fi
4164
4165 fi
4166 fi
4167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4168 $as_echo "$ac_cv_header_stdc" >&6; }
4169 if test $ac_cv_header_stdc = yes; then
4170
4171 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4172
4173 fi
4174
4175 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4176 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4177                   inttypes.h stdint.h unistd.h
4178 do :
4179   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4180 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4181 "
4182 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4183   cat >>confdefs.h <<_ACEOF
4184 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4185 _ACEOF
4186
4187 fi
4188
4189 done
4190
4191
4192
4193   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4194 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4195   MINIX=yes
4196 else
4197   MINIX=
4198 fi
4199
4200
4201   if test "$MINIX" = yes; then
4202
4203 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4204
4205
4206 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4207
4208
4209 $as_echo "#define _MINIX 1" >>confdefs.h
4210
4211   fi
4212
4213
4214   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4215 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4216 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4217   $as_echo_n "(cached) " >&6
4218 else
4219   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4220 /* end confdefs.h.  */
4221
4222 #         define __EXTENSIONS__ 1
4223           $ac_includes_default
4224 int
4225 main ()
4226 {
4227
4228   ;
4229   return 0;
4230 }
4231 _ACEOF
4232 if ac_fn_c_try_compile "$LINENO"; then :
4233   ac_cv_safe_to_define___extensions__=yes
4234 else
4235   ac_cv_safe_to_define___extensions__=no
4236 fi
4237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4238 fi
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4240 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4241   test $ac_cv_safe_to_define___extensions__ = yes &&
4242     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4243
4244   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4245
4246   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4247
4248   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4249
4250   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4251
4252
4253 # Check whether --enable-largefile was given.
4254 if test "${enable_largefile+set}" = set; then :
4255   enableval=$enable_largefile;
4256 fi
4257
4258 if test "$enable_largefile" != no; then
4259
4260   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4261 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4262 if ${ac_cv_sys_largefile_CC+:} false; then :
4263   $as_echo_n "(cached) " >&6
4264 else
4265   ac_cv_sys_largefile_CC=no
4266      if test "$GCC" != yes; then
4267        ac_save_CC=$CC
4268        while :; do
4269          # IRIX 6.2 and later do not support large files by default,
4270          # so use the C compiler's -n32 option if that helps.
4271          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4272 /* end confdefs.h.  */
4273 #include <sys/types.h>
4274  /* Check that off_t can represent 2**63 - 1 correctly.
4275     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4276     since some C++ compilers masquerading as C compilers
4277     incorrectly reject 9223372036854775807.  */
4278 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4279   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4280                        && LARGE_OFF_T % 2147483647 == 1)
4281                       ? 1 : -1];
4282 int
4283 main ()
4284 {
4285
4286   ;
4287   return 0;
4288 }
4289 _ACEOF
4290          if ac_fn_c_try_compile "$LINENO"; then :
4291   break
4292 fi
4293 rm -f core conftest.err conftest.$ac_objext
4294          CC="$CC -n32"
4295          if ac_fn_c_try_compile "$LINENO"; then :
4296   ac_cv_sys_largefile_CC=' -n32'; break
4297 fi
4298 rm -f core conftest.err conftest.$ac_objext
4299          break
4300        done
4301        CC=$ac_save_CC
4302        rm -f conftest.$ac_ext
4303     fi
4304 fi
4305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4306 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4307   if test "$ac_cv_sys_largefile_CC" != no; then
4308     CC=$CC$ac_cv_sys_largefile_CC
4309   fi
4310
4311   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4312 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4313 if ${ac_cv_sys_file_offset_bits+:} false; then :
4314   $as_echo_n "(cached) " >&6
4315 else
4316   while :; do
4317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4318 /* end confdefs.h.  */
4319 #include <sys/types.h>
4320  /* Check that off_t can represent 2**63 - 1 correctly.
4321     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4322     since some C++ compilers masquerading as C compilers
4323     incorrectly reject 9223372036854775807.  */
4324 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4325   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4326                        && LARGE_OFF_T % 2147483647 == 1)
4327                       ? 1 : -1];
4328 int
4329 main ()
4330 {
4331
4332   ;
4333   return 0;
4334 }
4335 _ACEOF
4336 if ac_fn_c_try_compile "$LINENO"; then :
4337   ac_cv_sys_file_offset_bits=no; break
4338 fi
4339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4340   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4341 /* end confdefs.h.  */
4342 #define _FILE_OFFSET_BITS 64
4343 #include <sys/types.h>
4344  /* Check that off_t can represent 2**63 - 1 correctly.
4345     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4346     since some C++ compilers masquerading as C compilers
4347     incorrectly reject 9223372036854775807.  */
4348 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4349   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4350                        && LARGE_OFF_T % 2147483647 == 1)
4351                       ? 1 : -1];
4352 int
4353 main ()
4354 {
4355
4356   ;
4357   return 0;
4358 }
4359 _ACEOF
4360 if ac_fn_c_try_compile "$LINENO"; then :
4361   ac_cv_sys_file_offset_bits=64; break
4362 fi
4363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4364   ac_cv_sys_file_offset_bits=unknown
4365   break
4366 done
4367 fi
4368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4369 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4370 case $ac_cv_sys_file_offset_bits in #(
4371   no | unknown) ;;
4372   *)
4373 cat >>confdefs.h <<_ACEOF
4374 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4375 _ACEOF
4376 ;;
4377 esac
4378 rm -rf conftest*
4379   if test $ac_cv_sys_file_offset_bits = unknown; then
4380     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4381 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4382 if ${ac_cv_sys_large_files+:} false; then :
4383   $as_echo_n "(cached) " >&6
4384 else
4385   while :; do
4386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4387 /* end confdefs.h.  */
4388 #include <sys/types.h>
4389  /* Check that off_t can represent 2**63 - 1 correctly.
4390     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4391     since some C++ compilers masquerading as C compilers
4392     incorrectly reject 9223372036854775807.  */
4393 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4394   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4395                        && LARGE_OFF_T % 2147483647 == 1)
4396                       ? 1 : -1];
4397 int
4398 main ()
4399 {
4400
4401   ;
4402   return 0;
4403 }
4404 _ACEOF
4405 if ac_fn_c_try_compile "$LINENO"; then :
4406   ac_cv_sys_large_files=no; break
4407 fi
4408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4409   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4410 /* end confdefs.h.  */
4411 #define _LARGE_FILES 1
4412 #include <sys/types.h>
4413  /* Check that off_t can represent 2**63 - 1 correctly.
4414     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4415     since some C++ compilers masquerading as C compilers
4416     incorrectly reject 9223372036854775807.  */
4417 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4418   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4419                        && LARGE_OFF_T % 2147483647 == 1)
4420                       ? 1 : -1];
4421 int
4422 main ()
4423 {
4424
4425   ;
4426   return 0;
4427 }
4428 _ACEOF
4429 if ac_fn_c_try_compile "$LINENO"; then :
4430   ac_cv_sys_large_files=1; break
4431 fi
4432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4433   ac_cv_sys_large_files=unknown
4434   break
4435 done
4436 fi
4437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4438 $as_echo "$ac_cv_sys_large_files" >&6; }
4439 case $ac_cv_sys_large_files in #(
4440   no | unknown) ;;
4441   *)
4442 cat >>confdefs.h <<_ACEOF
4443 #define _LARGE_FILES $ac_cv_sys_large_files
4444 _ACEOF
4445 ;;
4446 esac
4447 rm -rf conftest*
4448   fi
4449
4450
4451 fi
4452
4453 ac_aux_dir=
4454 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4455   if test -f "$ac_dir/install-sh"; then
4456     ac_aux_dir=$ac_dir
4457     ac_install_sh="$ac_aux_dir/install-sh -c"
4458     break
4459   elif test -f "$ac_dir/install.sh"; then
4460     ac_aux_dir=$ac_dir
4461     ac_install_sh="$ac_aux_dir/install.sh -c"
4462     break
4463   elif test -f "$ac_dir/shtool"; then
4464     ac_aux_dir=$ac_dir
4465     ac_install_sh="$ac_aux_dir/shtool install -c"
4466     break
4467   fi
4468 done
4469 if test -z "$ac_aux_dir"; then
4470   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4471 fi
4472
4473 # These three variables are undocumented and unsupported,
4474 # and are intended to be withdrawn in a future Autoconf release.
4475 # They can cause serious problems if a builder's source tree is in a directory
4476 # whose full name contains unusual characters.
4477 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4478 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4479 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4480
4481
4482 # Expand $ac_aux_dir to an absolute path.
4483 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4484
4485 if test x"${install_sh+set}" != xset; then
4486   case $am_aux_dir in
4487   *\ * | *\     *)
4488     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4489   *)
4490     install_sh="\${SHELL} $am_aux_dir/install-sh"
4491   esac
4492 fi
4493
4494 # Installed binaries are usually stripped using 'strip' when the user
4495 # run "make install-strip".  However 'strip' might not be the right
4496 # tool to use in cross-compilation environments, therefore Automake
4497 # will honor the 'STRIP' environment variable to overrule this program.
4498 if test "$cross_compiling" != no; then
4499   if test -n "$ac_tool_prefix"; then
4500   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4501 set dummy ${ac_tool_prefix}strip; ac_word=$2
4502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4503 $as_echo_n "checking for $ac_word... " >&6; }
4504 if ${ac_cv_prog_STRIP+:} false; then :
4505   $as_echo_n "(cached) " >&6
4506 else
4507   if test -n "$STRIP"; then
4508   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4509 else
4510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4511 for as_dir in $PATH
4512 do
4513   IFS=$as_save_IFS
4514   test -z "$as_dir" && as_dir=.
4515     for ac_exec_ext in '' $ac_executable_extensions; do
4516   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4517     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4519     break 2
4520   fi
4521 done
4522   done
4523 IFS=$as_save_IFS
4524
4525 fi
4526 fi
4527 STRIP=$ac_cv_prog_STRIP
4528 if test -n "$STRIP"; then
4529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4530 $as_echo "$STRIP" >&6; }
4531 else
4532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533 $as_echo "no" >&6; }
4534 fi
4535
4536
4537 fi
4538 if test -z "$ac_cv_prog_STRIP"; then
4539   ac_ct_STRIP=$STRIP
4540   # Extract the first word of "strip", so it can be a program name with args.
4541 set dummy strip; ac_word=$2
4542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4543 $as_echo_n "checking for $ac_word... " >&6; }
4544 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4545   $as_echo_n "(cached) " >&6
4546 else
4547   if test -n "$ac_ct_STRIP"; then
4548   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4549 else
4550 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4551 for as_dir in $PATH
4552 do
4553   IFS=$as_save_IFS
4554   test -z "$as_dir" && as_dir=.
4555     for ac_exec_ext in '' $ac_executable_extensions; do
4556   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4557     ac_cv_prog_ac_ct_STRIP="strip"
4558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4559     break 2
4560   fi
4561 done
4562   done
4563 IFS=$as_save_IFS
4564
4565 fi
4566 fi
4567 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4568 if test -n "$ac_ct_STRIP"; then
4569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4570 $as_echo "$ac_ct_STRIP" >&6; }
4571 else
4572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4573 $as_echo "no" >&6; }
4574 fi
4575
4576   if test "x$ac_ct_STRIP" = x; then
4577     STRIP=":"
4578   else
4579     case $cross_compiling:$ac_tool_warned in
4580 yes:)
4581 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4582 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4583 ac_tool_warned=yes ;;
4584 esac
4585     STRIP=$ac_ct_STRIP
4586   fi
4587 else
4588   STRIP="$ac_cv_prog_STRIP"
4589 fi
4590
4591 fi
4592 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4593
4594
4595 # Set build, build_cpu, build_vendor and build_os.
4596 # Make sure we can run config.sub.
4597 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4598   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4599
4600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4601 $as_echo_n "checking build system type... " >&6; }
4602 if ${ac_cv_build+:} false; then :
4603   $as_echo_n "(cached) " >&6
4604 else
4605   ac_build_alias=$build_alias
4606 test "x$ac_build_alias" = x &&
4607   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4608 test "x$ac_build_alias" = x &&
4609   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4610 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4611   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4612
4613 fi
4614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4615 $as_echo "$ac_cv_build" >&6; }
4616 case $ac_cv_build in
4617 *-*-*) ;;
4618 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4619 esac
4620 build=$ac_cv_build
4621 ac_save_IFS=$IFS; IFS='-'
4622 set x $ac_cv_build
4623 shift
4624 build_cpu=$1
4625 build_vendor=$2
4626 shift; shift
4627 # Remember, the first character of IFS is used to create $*,
4628 # except with old shells:
4629 build_os=$*
4630 IFS=$ac_save_IFS
4631 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4632
4633
4634
4635 # Set host, host_cpu, host_vendor, and host_os.
4636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4637 $as_echo_n "checking host system type... " >&6; }
4638 if ${ac_cv_host+:} false; then :
4639   $as_echo_n "(cached) " >&6
4640 else
4641   if test "x$host_alias" = x; then
4642   ac_cv_host=$ac_cv_build
4643 else
4644   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4645     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4646 fi
4647
4648 fi
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4650 $as_echo "$ac_cv_host" >&6; }
4651 case $ac_cv_host in
4652 *-*-*) ;;
4653 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4654 esac
4655 host=$ac_cv_host
4656 ac_save_IFS=$IFS; IFS='-'
4657 set x $ac_cv_host
4658 shift
4659 host_cpu=$1
4660 host_vendor=$2
4661 shift; shift
4662 # Remember, the first character of IFS is used to create $*,
4663 # except with old shells:
4664 host_os=$*
4665 IFS=$ac_save_IFS
4666 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4667
4668
4669
4670 # Set target, target_cpu, target_vendor, and target_os.
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4672 $as_echo_n "checking target system type... " >&6; }
4673 if ${ac_cv_target+:} false; then :
4674   $as_echo_n "(cached) " >&6
4675 else
4676   if test "x$target_alias" = x; then
4677   ac_cv_target=$ac_cv_host
4678 else
4679   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4680     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4681 fi
4682
4683 fi
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4685 $as_echo "$ac_cv_target" >&6; }
4686 case $ac_cv_target in
4687 *-*-*) ;;
4688 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4689 esac
4690 target=$ac_cv_target
4691 ac_save_IFS=$IFS; IFS='-'
4692 set x $ac_cv_target
4693 shift
4694 target_cpu=$1
4695 target_vendor=$2
4696 shift; shift
4697 # Remember, the first character of IFS is used to create $*,
4698 # except with old shells:
4699 target_os=$*
4700 IFS=$ac_save_IFS
4701 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4702
4703
4704 # The aliases save the names the user supplied, while $host etc.
4705 # will get canonicalized.
4706 test -n "$target_alias" &&
4707   test "$program_prefix$program_suffix$program_transform_name" = \
4708     NONENONEs,x,x, &&
4709   program_prefix=${target_alias}-
4710
4711 # Find a good install program.  We prefer a C program (faster),
4712 # so one script is as good as another.  But avoid the broken or
4713 # incompatible versions:
4714 # SysV /etc/install, /usr/sbin/install
4715 # SunOS /usr/etc/install
4716 # IRIX /sbin/install
4717 # AIX /bin/install
4718 # AmigaOS /C/install, which installs bootblocks on floppy discs
4719 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4720 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4721 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4722 # OS/2's system install, which has a completely different semantic
4723 # ./install, which can be erroneously created by make from ./install.sh.
4724 # Reject install programs that cannot install multiple files.
4725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4726 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4727 if test -z "$INSTALL"; then
4728 if ${ac_cv_path_install+:} false; then :
4729   $as_echo_n "(cached) " >&6
4730 else
4731   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732 for as_dir in $PATH
4733 do
4734   IFS=$as_save_IFS
4735   test -z "$as_dir" && as_dir=.
4736     # Account for people who put trailing slashes in PATH elements.
4737 case $as_dir/ in #((
4738   ./ | .// | /[cC]/* | \
4739   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4740   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4741   /usr/ucb/* ) ;;
4742   *)
4743     # OSF1 and SCO ODT 3.0 have their own names for install.
4744     # Don't use installbsd from OSF since it installs stuff as root
4745     # by default.
4746     for ac_prog in ginstall scoinst install; do
4747       for ac_exec_ext in '' $ac_executable_extensions; do
4748         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4749           if test $ac_prog = install &&
4750             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4751             # AIX install.  It has an incompatible calling convention.
4752             :
4753           elif test $ac_prog = install &&
4754             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4755             # program-specific install script used by HP pwplus--don't use.
4756             :
4757           else
4758             rm -rf conftest.one conftest.two conftest.dir
4759             echo one > conftest.one
4760             echo two > conftest.two
4761             mkdir conftest.dir
4762             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4763               test -s conftest.one && test -s conftest.two &&
4764               test -s conftest.dir/conftest.one &&
4765               test -s conftest.dir/conftest.two
4766             then
4767               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4768               break 3
4769             fi
4770           fi
4771         fi
4772       done
4773     done
4774     ;;
4775 esac
4776
4777   done
4778 IFS=$as_save_IFS
4779
4780 rm -rf conftest.one conftest.two conftest.dir
4781
4782 fi
4783   if test "${ac_cv_path_install+set}" = set; then
4784     INSTALL=$ac_cv_path_install
4785   else
4786     # As a last resort, use the slow shell script.  Don't cache a
4787     # value for INSTALL within a source directory, because that will
4788     # break other packages using the cache if that directory is
4789     # removed, or if the value is a relative name.
4790     INSTALL=$ac_install_sh
4791   fi
4792 fi
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4794 $as_echo "$INSTALL" >&6; }
4795
4796 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4797 # It thinks the first close brace ends the variable substitution.
4798 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4799
4800 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4801
4802 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4803
4804 if test -n "$ac_tool_prefix"; then
4805   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4806 set dummy ${ac_tool_prefix}ar; ac_word=$2
4807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4808 $as_echo_n "checking for $ac_word... " >&6; }
4809 if ${ac_cv_prog_AR+:} false; then :
4810   $as_echo_n "(cached) " >&6
4811 else
4812   if test -n "$AR"; then
4813   ac_cv_prog_AR="$AR" # Let the user override the test.
4814 else
4815 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4816 for as_dir in $PATH
4817 do
4818   IFS=$as_save_IFS
4819   test -z "$as_dir" && as_dir=.
4820     for ac_exec_ext in '' $ac_executable_extensions; do
4821   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4822     ac_cv_prog_AR="${ac_tool_prefix}ar"
4823     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4824     break 2
4825   fi
4826 done
4827   done
4828 IFS=$as_save_IFS
4829
4830 fi
4831 fi
4832 AR=$ac_cv_prog_AR
4833 if test -n "$AR"; then
4834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4835 $as_echo "$AR" >&6; }
4836 else
4837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4838 $as_echo "no" >&6; }
4839 fi
4840
4841
4842 fi
4843 if test -z "$ac_cv_prog_AR"; then
4844   ac_ct_AR=$AR
4845   # Extract the first word of "ar", so it can be a program name with args.
4846 set dummy ar; ac_word=$2
4847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4848 $as_echo_n "checking for $ac_word... " >&6; }
4849 if ${ac_cv_prog_ac_ct_AR+:} false; then :
4850   $as_echo_n "(cached) " >&6
4851 else
4852   if test -n "$ac_ct_AR"; then
4853   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4854 else
4855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4856 for as_dir in $PATH
4857 do
4858   IFS=$as_save_IFS
4859   test -z "$as_dir" && as_dir=.
4860     for ac_exec_ext in '' $ac_executable_extensions; do
4861   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4862     ac_cv_prog_ac_ct_AR="ar"
4863     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4864     break 2
4865   fi
4866 done
4867   done
4868 IFS=$as_save_IFS
4869
4870 fi
4871 fi
4872 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4873 if test -n "$ac_ct_AR"; then
4874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4875 $as_echo "$ac_ct_AR" >&6; }
4876 else
4877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4878 $as_echo "no" >&6; }
4879 fi
4880
4881   if test "x$ac_ct_AR" = x; then
4882     AR=""
4883   else
4884     case $cross_compiling:$ac_tool_warned in
4885 yes:)
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4887 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4888 ac_tool_warned=yes ;;
4889 esac
4890     AR=$ac_ct_AR
4891   fi
4892 else
4893   AR="$ac_cv_prog_AR"
4894 fi
4895
4896 if test -n "$ac_tool_prefix"; then
4897   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4898 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4900 $as_echo_n "checking for $ac_word... " >&6; }
4901 if ${ac_cv_prog_RANLIB+:} false; then :
4902   $as_echo_n "(cached) " >&6
4903 else
4904   if test -n "$RANLIB"; then
4905   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4906 else
4907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4908 for as_dir in $PATH
4909 do
4910   IFS=$as_save_IFS
4911   test -z "$as_dir" && as_dir=.
4912     for ac_exec_ext in '' $ac_executable_extensions; do
4913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4914     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4916     break 2
4917   fi
4918 done
4919   done
4920 IFS=$as_save_IFS
4921
4922 fi
4923 fi
4924 RANLIB=$ac_cv_prog_RANLIB
4925 if test -n "$RANLIB"; then
4926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4927 $as_echo "$RANLIB" >&6; }
4928 else
4929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4930 $as_echo "no" >&6; }
4931 fi
4932
4933
4934 fi
4935 if test -z "$ac_cv_prog_RANLIB"; then
4936   ac_ct_RANLIB=$RANLIB
4937   # Extract the first word of "ranlib", so it can be a program name with args.
4938 set dummy ranlib; ac_word=$2
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4940 $as_echo_n "checking for $ac_word... " >&6; }
4941 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4942   $as_echo_n "(cached) " >&6
4943 else
4944   if test -n "$ac_ct_RANLIB"; then
4945   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4946 else
4947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4948 for as_dir in $PATH
4949 do
4950   IFS=$as_save_IFS
4951   test -z "$as_dir" && as_dir=.
4952     for ac_exec_ext in '' $ac_executable_extensions; do
4953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4954     ac_cv_prog_ac_ct_RANLIB="ranlib"
4955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4956     break 2
4957   fi
4958 done
4959   done
4960 IFS=$as_save_IFS
4961
4962 fi
4963 fi
4964 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4965 if test -n "$ac_ct_RANLIB"; then
4966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4967 $as_echo "$ac_ct_RANLIB" >&6; }
4968 else
4969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4970 $as_echo "no" >&6; }
4971 fi
4972
4973   if test "x$ac_ct_RANLIB" = x; then
4974     RANLIB=":"
4975   else
4976     case $cross_compiling:$ac_tool_warned in
4977 yes:)
4978 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4979 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4980 ac_tool_warned=yes ;;
4981 esac
4982     RANLIB=$ac_ct_RANLIB
4983   fi
4984 else
4985   RANLIB="$ac_cv_prog_RANLIB"
4986 fi
4987
4988
4989 test "$program_prefix" != NONE &&
4990   program_transform_name="s&^&$program_prefix&;$program_transform_name"
4991 # Use a double $ so make ignores it.
4992 test "$program_suffix" != NONE &&
4993   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4994 # Double any \ or $.
4995 # By default was `s,x,x', remove it if useless.
4996 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4997 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4998
4999
5000 # We require a C++11 compiler.  Check if one is available, and if
5001 # necessary, set CXX_DIALECT to some -std=xxx switch.
5002
5003   ax_cxx_compile_alternatives="11 0x"    ax_cxx_compile_cxx11_required=true
5004   ac_ext=cpp
5005 ac_cpp='$CXXCPP $CPPFLAGS'
5006 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5007 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5008 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5009   CXX_DIALECT=""
5010   ac_success=no
5011   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5012 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5013 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5014   $as_echo_n "(cached) " >&6
5015 else
5016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5017 /* end confdefs.h.  */
5018
5019
5020 // If the compiler admits that it is not ready for C++11, why torture it?
5021 // Hopefully, this will speed up the test.
5022
5023 #ifndef __cplusplus
5024
5025 #error "This is not a C++ compiler"
5026
5027 #elif __cplusplus < 201103L
5028
5029 #error "This is not a C++11 compiler"
5030
5031 #else
5032
5033 namespace cxx11
5034 {
5035
5036   namespace test_static_assert
5037   {
5038
5039     template <typename T>
5040     struct check
5041     {
5042       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5043     };
5044
5045   }
5046
5047   namespace test_final_override
5048   {
5049
5050     struct Base
5051     {
5052       virtual void f() {}
5053     };
5054
5055     struct Derived : public Base
5056     {
5057       virtual void f() override {}
5058     };
5059
5060   }
5061
5062   namespace test_double_right_angle_brackets
5063   {
5064
5065     template < typename T >
5066     struct check {};
5067
5068     typedef check<void> single_type;
5069     typedef check<check<void>> double_type;
5070     typedef check<check<check<void>>> triple_type;
5071     typedef check<check<check<check<void>>>> quadruple_type;
5072
5073   }
5074
5075   namespace test_decltype
5076   {
5077
5078     int
5079     f()
5080     {
5081       int a = 1;
5082       decltype(a) b = 2;
5083       return a + b;
5084     }
5085
5086   }
5087
5088   namespace test_type_deduction
5089   {
5090
5091     template < typename T1, typename T2 >
5092     struct is_same
5093     {
5094       static const bool value = false;
5095     };
5096
5097     template < typename T >
5098     struct is_same<T, T>
5099     {
5100       static const bool value = true;
5101     };
5102
5103     template < typename T1, typename T2 >
5104     auto
5105     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5106     {
5107       return a1 + a2;
5108     }
5109
5110     int
5111     test(const int c, volatile int v)
5112     {
5113       static_assert(is_same<int, decltype(0)>::value == true, "");
5114       static_assert(is_same<int, decltype(c)>::value == false, "");
5115       static_assert(is_same<int, decltype(v)>::value == false, "");
5116       auto ac = c;
5117       auto av = v;
5118       auto sumi = ac + av + 'x';
5119       auto sumf = ac + av + 1.0;
5120       static_assert(is_same<int, decltype(ac)>::value == true, "");
5121       static_assert(is_same<int, decltype(av)>::value == true, "");
5122       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5123       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5124       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5125       return (sumf > 0.0) ? sumi : add(c, v);
5126     }
5127
5128   }
5129
5130   namespace test_noexcept
5131   {
5132
5133     int f() { return 0; }
5134     int g() noexcept { return 0; }
5135
5136     static_assert(noexcept(f()) == false, "");
5137     static_assert(noexcept(g()) == true, "");
5138
5139   }
5140
5141   namespace test_constexpr
5142   {
5143
5144     template < typename CharT >
5145     unsigned long constexpr
5146     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5147     {
5148       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5149     }
5150
5151     template < typename CharT >
5152     unsigned long constexpr
5153     strlen_c(const CharT *const s) noexcept
5154     {
5155       return strlen_c_r(s, 0UL);
5156     }
5157
5158     static_assert(strlen_c("") == 0UL, "");
5159     static_assert(strlen_c("1") == 1UL, "");
5160     static_assert(strlen_c("example") == 7UL, "");
5161     static_assert(strlen_c("another\0example") == 7UL, "");
5162
5163   }
5164
5165   namespace test_rvalue_references
5166   {
5167
5168     template < int N >
5169     struct answer
5170     {
5171       static constexpr int value = N;
5172     };
5173
5174     answer<1> f(int&)       { return answer<1>(); }
5175     answer<2> f(const int&) { return answer<2>(); }
5176     answer<3> f(int&&)      { return answer<3>(); }
5177
5178     void
5179     test()
5180     {
5181       int i = 0;
5182       const int c = 0;
5183       static_assert(decltype(f(i))::value == 1, "");
5184       static_assert(decltype(f(c))::value == 2, "");
5185       static_assert(decltype(f(0))::value == 3, "");
5186     }
5187
5188   }
5189
5190   namespace test_uniform_initialization
5191   {
5192
5193     struct test
5194     {
5195       static const int zero {};
5196       static const int one {1};
5197     };
5198
5199     static_assert(test::zero == 0, "");
5200     static_assert(test::one == 1, "");
5201
5202   }
5203
5204   namespace test_lambdas
5205   {
5206
5207     void
5208     test1()
5209     {
5210       auto lambda1 = [](){};
5211       auto lambda2 = lambda1;
5212       lambda1();
5213       lambda2();
5214     }
5215
5216     int
5217     test2()
5218     {
5219       auto a = [](int i, int j){ return i + j; }(1, 2);
5220       auto b = []() -> int { return '0'; }();
5221       auto c = [=](){ return a + b; }();
5222       auto d = [&](){ return c; }();
5223       auto e = [a, &b](int x) mutable {
5224         const auto identity = [](int y){ return y; };
5225         for (auto i = 0; i < a; ++i)
5226           a += b--;
5227         return x + identity(a + b);
5228       }(0);
5229       return a + b + c + d + e;
5230     }
5231
5232     int
5233     test3()
5234     {
5235       const auto nullary = [](){ return 0; };
5236       const auto unary = [](int x){ return x; };
5237       using nullary_t = decltype(nullary);
5238       using unary_t = decltype(unary);
5239       const auto higher1st = [](nullary_t f){ return f(); };
5240       const auto higher2nd = [unary](nullary_t f1){
5241         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5242       };
5243       return higher1st(nullary) + higher2nd(nullary)(unary);
5244     }
5245
5246   }
5247
5248   namespace test_variadic_templates
5249   {
5250
5251     template <int...>
5252     struct sum;
5253
5254     template <int N0, int... N1toN>
5255     struct sum<N0, N1toN...>
5256     {
5257       static constexpr auto value = N0 + sum<N1toN...>::value;
5258     };
5259
5260     template <>
5261     struct sum<>
5262     {
5263       static constexpr auto value = 0;
5264     };
5265
5266     static_assert(sum<>::value == 0, "");
5267     static_assert(sum<1>::value == 1, "");
5268     static_assert(sum<23>::value == 23, "");
5269     static_assert(sum<1, 2>::value == 3, "");
5270     static_assert(sum<5, 5, 11>::value == 21, "");
5271     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5272
5273   }
5274
5275   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5276   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5277   // because of this.
5278   namespace test_template_alias_sfinae
5279   {
5280
5281     struct foo {};
5282
5283     template<typename T>
5284     using member = typename T::member_type;
5285
5286     template<typename T>
5287     void func(...) {}
5288
5289     template<typename T>
5290     void func(member<T>*) {}
5291
5292     void test();
5293
5294     void test() { func<foo>(0); }
5295
5296   }
5297
5298 }  // namespace cxx11
5299
5300 #endif  // __cplusplus >= 201103L
5301
5302
5303
5304 _ACEOF
5305 if ac_fn_cxx_try_compile "$LINENO"; then :
5306   ax_cv_cxx_compile_cxx11=yes
5307 else
5308   ax_cv_cxx_compile_cxx11=no
5309 fi
5310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5311 fi
5312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5313 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5314   if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5315     ac_success=yes
5316   fi
5317
5318     if test x$ac_success = xno; then
5319     for alternative in ${ax_cxx_compile_alternatives}; do
5320       switch="-std=gnu++${alternative}"
5321       cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5322       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5323 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5324 if eval \${$cachevar+:} false; then :
5325   $as_echo_n "(cached) " >&6
5326 else
5327   ac_save_CXX="$CXX"
5328          CXX="$CXX $switch"
5329          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5330 /* end confdefs.h.  */
5331
5332
5333 // If the compiler admits that it is not ready for C++11, why torture it?
5334 // Hopefully, this will speed up the test.
5335
5336 #ifndef __cplusplus
5337
5338 #error "This is not a C++ compiler"
5339
5340 #elif __cplusplus < 201103L
5341
5342 #error "This is not a C++11 compiler"
5343
5344 #else
5345
5346 namespace cxx11
5347 {
5348
5349   namespace test_static_assert
5350   {
5351
5352     template <typename T>
5353     struct check
5354     {
5355       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5356     };
5357
5358   }
5359
5360   namespace test_final_override
5361   {
5362
5363     struct Base
5364     {
5365       virtual void f() {}
5366     };
5367
5368     struct Derived : public Base
5369     {
5370       virtual void f() override {}
5371     };
5372
5373   }
5374
5375   namespace test_double_right_angle_brackets
5376   {
5377
5378     template < typename T >
5379     struct check {};
5380
5381     typedef check<void> single_type;
5382     typedef check<check<void>> double_type;
5383     typedef check<check<check<void>>> triple_type;
5384     typedef check<check<check<check<void>>>> quadruple_type;
5385
5386   }
5387
5388   namespace test_decltype
5389   {
5390
5391     int
5392     f()
5393     {
5394       int a = 1;
5395       decltype(a) b = 2;
5396       return a + b;
5397     }
5398
5399   }
5400
5401   namespace test_type_deduction
5402   {
5403
5404     template < typename T1, typename T2 >
5405     struct is_same
5406     {
5407       static const bool value = false;
5408     };
5409
5410     template < typename T >
5411     struct is_same<T, T>
5412     {
5413       static const bool value = true;
5414     };
5415
5416     template < typename T1, typename T2 >
5417     auto
5418     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5419     {
5420       return a1 + a2;
5421     }
5422
5423     int
5424     test(const int c, volatile int v)
5425     {
5426       static_assert(is_same<int, decltype(0)>::value == true, "");
5427       static_assert(is_same<int, decltype(c)>::value == false, "");
5428       static_assert(is_same<int, decltype(v)>::value == false, "");
5429       auto ac = c;
5430       auto av = v;
5431       auto sumi = ac + av + 'x';
5432       auto sumf = ac + av + 1.0;
5433       static_assert(is_same<int, decltype(ac)>::value == true, "");
5434       static_assert(is_same<int, decltype(av)>::value == true, "");
5435       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5436       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5437       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5438       return (sumf > 0.0) ? sumi : add(c, v);
5439     }
5440
5441   }
5442
5443   namespace test_noexcept
5444   {
5445
5446     int f() { return 0; }
5447     int g() noexcept { return 0; }
5448
5449     static_assert(noexcept(f()) == false, "");
5450     static_assert(noexcept(g()) == true, "");
5451
5452   }
5453
5454   namespace test_constexpr
5455   {
5456
5457     template < typename CharT >
5458     unsigned long constexpr
5459     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5460     {
5461       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5462     }
5463
5464     template < typename CharT >
5465     unsigned long constexpr
5466     strlen_c(const CharT *const s) noexcept
5467     {
5468       return strlen_c_r(s, 0UL);
5469     }
5470
5471     static_assert(strlen_c("") == 0UL, "");
5472     static_assert(strlen_c("1") == 1UL, "");
5473     static_assert(strlen_c("example") == 7UL, "");
5474     static_assert(strlen_c("another\0example") == 7UL, "");
5475
5476   }
5477
5478   namespace test_rvalue_references
5479   {
5480
5481     template < int N >
5482     struct answer
5483     {
5484       static constexpr int value = N;
5485     };
5486
5487     answer<1> f(int&)       { return answer<1>(); }
5488     answer<2> f(const int&) { return answer<2>(); }
5489     answer<3> f(int&&)      { return answer<3>(); }
5490
5491     void
5492     test()
5493     {
5494       int i = 0;
5495       const int c = 0;
5496       static_assert(decltype(f(i))::value == 1, "");
5497       static_assert(decltype(f(c))::value == 2, "");
5498       static_assert(decltype(f(0))::value == 3, "");
5499     }
5500
5501   }
5502
5503   namespace test_uniform_initialization
5504   {
5505
5506     struct test
5507     {
5508       static const int zero {};
5509       static const int one {1};
5510     };
5511
5512     static_assert(test::zero == 0, "");
5513     static_assert(test::one == 1, "");
5514
5515   }
5516
5517   namespace test_lambdas
5518   {
5519
5520     void
5521     test1()
5522     {
5523       auto lambda1 = [](){};
5524       auto lambda2 = lambda1;
5525       lambda1();
5526       lambda2();
5527     }
5528
5529     int
5530     test2()
5531     {
5532       auto a = [](int i, int j){ return i + j; }(1, 2);
5533       auto b = []() -> int { return '0'; }();
5534       auto c = [=](){ return a + b; }();
5535       auto d = [&](){ return c; }();
5536       auto e = [a, &b](int x) mutable {
5537         const auto identity = [](int y){ return y; };
5538         for (auto i = 0; i < a; ++i)
5539           a += b--;
5540         return x + identity(a + b);
5541       }(0);
5542       return a + b + c + d + e;
5543     }
5544
5545     int
5546     test3()
5547     {
5548       const auto nullary = [](){ return 0; };
5549       const auto unary = [](int x){ return x; };
5550       using nullary_t = decltype(nullary);
5551       using unary_t = decltype(unary);
5552       const auto higher1st = [](nullary_t f){ return f(); };
5553       const auto higher2nd = [unary](nullary_t f1){
5554         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5555       };
5556       return higher1st(nullary) + higher2nd(nullary)(unary);
5557     }
5558
5559   }
5560
5561   namespace test_variadic_templates
5562   {
5563
5564     template <int...>
5565     struct sum;
5566
5567     template <int N0, int... N1toN>
5568     struct sum<N0, N1toN...>
5569     {
5570       static constexpr auto value = N0 + sum<N1toN...>::value;
5571     };
5572
5573     template <>
5574     struct sum<>
5575     {
5576       static constexpr auto value = 0;
5577     };
5578
5579     static_assert(sum<>::value == 0, "");
5580     static_assert(sum<1>::value == 1, "");
5581     static_assert(sum<23>::value == 23, "");
5582     static_assert(sum<1, 2>::value == 3, "");
5583     static_assert(sum<5, 5, 11>::value == 21, "");
5584     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5585
5586   }
5587
5588   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5589   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5590   // because of this.
5591   namespace test_template_alias_sfinae
5592   {
5593
5594     struct foo {};
5595
5596     template<typename T>
5597     using member = typename T::member_type;
5598
5599     template<typename T>
5600     void func(...) {}
5601
5602     template<typename T>
5603     void func(member<T>*) {}
5604
5605     void test();
5606
5607     void test() { func<foo>(0); }
5608
5609   }
5610
5611 }  // namespace cxx11
5612
5613 #endif  // __cplusplus >= 201103L
5614
5615
5616
5617 _ACEOF
5618 if ac_fn_cxx_try_compile "$LINENO"; then :
5619   eval $cachevar=yes
5620 else
5621   eval $cachevar=no
5622 fi
5623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5624          CXX="$ac_save_CXX"
5625 fi
5626 eval ac_res=\$$cachevar
5627                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5628 $as_echo "$ac_res" >&6; }
5629       if eval test x\$$cachevar = xyes; then
5630         CXX_DIALECT="$switch"
5631         CXX="$CXX $switch"
5632         if test -n "$CXXCPP" ; then
5633           CXXCPP="$CXXCPP $switch"
5634         fi
5635         ac_success=yes
5636         break
5637       fi
5638     done
5639   fi
5640
5641     if test x$ac_success = xno; then
5642                 for alternative in ${ax_cxx_compile_alternatives}; do
5643       for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5644         cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5645         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5646 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5647 if eval \${$cachevar+:} false; then :
5648   $as_echo_n "(cached) " >&6
5649 else
5650   ac_save_CXX="$CXX"
5651            CXX="$CXX $switch"
5652            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5653 /* end confdefs.h.  */
5654
5655
5656 // If the compiler admits that it is not ready for C++11, why torture it?
5657 // Hopefully, this will speed up the test.
5658
5659 #ifndef __cplusplus
5660
5661 #error "This is not a C++ compiler"
5662
5663 #elif __cplusplus < 201103L
5664
5665 #error "This is not a C++11 compiler"
5666
5667 #else
5668
5669 namespace cxx11
5670 {
5671
5672   namespace test_static_assert
5673   {
5674
5675     template <typename T>
5676     struct check
5677     {
5678       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5679     };
5680
5681   }
5682
5683   namespace test_final_override
5684   {
5685
5686     struct Base
5687     {
5688       virtual void f() {}
5689     };
5690
5691     struct Derived : public Base
5692     {
5693       virtual void f() override {}
5694     };
5695
5696   }
5697
5698   namespace test_double_right_angle_brackets
5699   {
5700
5701     template < typename T >
5702     struct check {};
5703
5704     typedef check<void> single_type;
5705     typedef check<check<void>> double_type;
5706     typedef check<check<check<void>>> triple_type;
5707     typedef check<check<check<check<void>>>> quadruple_type;
5708
5709   }
5710
5711   namespace test_decltype
5712   {
5713
5714     int
5715     f()
5716     {
5717       int a = 1;
5718       decltype(a) b = 2;
5719       return a + b;
5720     }
5721
5722   }
5723
5724   namespace test_type_deduction
5725   {
5726
5727     template < typename T1, typename T2 >
5728     struct is_same
5729     {
5730       static const bool value = false;
5731     };
5732
5733     template < typename T >
5734     struct is_same<T, T>
5735     {
5736       static const bool value = true;
5737     };
5738
5739     template < typename T1, typename T2 >
5740     auto
5741     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5742     {
5743       return a1 + a2;
5744     }
5745
5746     int
5747     test(const int c, volatile int v)
5748     {
5749       static_assert(is_same<int, decltype(0)>::value == true, "");
5750       static_assert(is_same<int, decltype(c)>::value == false, "");
5751       static_assert(is_same<int, decltype(v)>::value == false, "");
5752       auto ac = c;
5753       auto av = v;
5754       auto sumi = ac + av + 'x';
5755       auto sumf = ac + av + 1.0;
5756       static_assert(is_same<int, decltype(ac)>::value == true, "");
5757       static_assert(is_same<int, decltype(av)>::value == true, "");
5758       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5759       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5760       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5761       return (sumf > 0.0) ? sumi : add(c, v);
5762     }
5763
5764   }
5765
5766   namespace test_noexcept
5767   {
5768
5769     int f() { return 0; }
5770     int g() noexcept { return 0; }
5771
5772     static_assert(noexcept(f()) == false, "");
5773     static_assert(noexcept(g()) == true, "");
5774
5775   }
5776
5777   namespace test_constexpr
5778   {
5779
5780     template < typename CharT >
5781     unsigned long constexpr
5782     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5783     {
5784       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5785     }
5786
5787     template < typename CharT >
5788     unsigned long constexpr
5789     strlen_c(const CharT *const s) noexcept
5790     {
5791       return strlen_c_r(s, 0UL);
5792     }
5793
5794     static_assert(strlen_c("") == 0UL, "");
5795     static_assert(strlen_c("1") == 1UL, "");
5796     static_assert(strlen_c("example") == 7UL, "");
5797     static_assert(strlen_c("another\0example") == 7UL, "");
5798
5799   }
5800
5801   namespace test_rvalue_references
5802   {
5803
5804     template < int N >
5805     struct answer
5806     {
5807       static constexpr int value = N;
5808     };
5809
5810     answer<1> f(int&)       { return answer<1>(); }
5811     answer<2> f(const int&) { return answer<2>(); }
5812     answer<3> f(int&&)      { return answer<3>(); }
5813
5814     void
5815     test()
5816     {
5817       int i = 0;
5818       const int c = 0;
5819       static_assert(decltype(f(i))::value == 1, "");
5820       static_assert(decltype(f(c))::value == 2, "");
5821       static_assert(decltype(f(0))::value == 3, "");
5822     }
5823
5824   }
5825
5826   namespace test_uniform_initialization
5827   {
5828
5829     struct test
5830     {
5831       static const int zero {};
5832       static const int one {1};
5833     };
5834
5835     static_assert(test::zero == 0, "");
5836     static_assert(test::one == 1, "");
5837
5838   }
5839
5840   namespace test_lambdas
5841   {
5842
5843     void
5844     test1()
5845     {
5846       auto lambda1 = [](){};
5847       auto lambda2 = lambda1;
5848       lambda1();
5849       lambda2();
5850     }
5851
5852     int
5853     test2()
5854     {
5855       auto a = [](int i, int j){ return i + j; }(1, 2);
5856       auto b = []() -> int { return '0'; }();
5857       auto c = [=](){ return a + b; }();
5858       auto d = [&](){ return c; }();
5859       auto e = [a, &b](int x) mutable {
5860         const auto identity = [](int y){ return y; };
5861         for (auto i = 0; i < a; ++i)
5862           a += b--;
5863         return x + identity(a + b);
5864       }(0);
5865       return a + b + c + d + e;
5866     }
5867
5868     int
5869     test3()
5870     {
5871       const auto nullary = [](){ return 0; };
5872       const auto unary = [](int x){ return x; };
5873       using nullary_t = decltype(nullary);
5874       using unary_t = decltype(unary);
5875       const auto higher1st = [](nullary_t f){ return f(); };
5876       const auto higher2nd = [unary](nullary_t f1){
5877         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5878       };
5879       return higher1st(nullary) + higher2nd(nullary)(unary);
5880     }
5881
5882   }
5883
5884   namespace test_variadic_templates
5885   {
5886
5887     template <int...>
5888     struct sum;
5889
5890     template <int N0, int... N1toN>
5891     struct sum<N0, N1toN...>
5892     {
5893       static constexpr auto value = N0 + sum<N1toN...>::value;
5894     };
5895
5896     template <>
5897     struct sum<>
5898     {
5899       static constexpr auto value = 0;
5900     };
5901
5902     static_assert(sum<>::value == 0, "");
5903     static_assert(sum<1>::value == 1, "");
5904     static_assert(sum<23>::value == 23, "");
5905     static_assert(sum<1, 2>::value == 3, "");
5906     static_assert(sum<5, 5, 11>::value == 21, "");
5907     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5908
5909   }
5910
5911   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5912   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5913   // because of this.
5914   namespace test_template_alias_sfinae
5915   {
5916
5917     struct foo {};
5918
5919     template<typename T>
5920     using member = typename T::member_type;
5921
5922     template<typename T>
5923     void func(...) {}
5924
5925     template<typename T>
5926     void func(member<T>*) {}
5927
5928     void test();
5929
5930     void test() { func<foo>(0); }
5931
5932   }
5933
5934 }  // namespace cxx11
5935
5936 #endif  // __cplusplus >= 201103L
5937
5938
5939
5940 _ACEOF
5941 if ac_fn_cxx_try_compile "$LINENO"; then :
5942   eval $cachevar=yes
5943 else
5944   eval $cachevar=no
5945 fi
5946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5947            CXX="$ac_save_CXX"
5948 fi
5949 eval ac_res=\$$cachevar
5950                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5951 $as_echo "$ac_res" >&6; }
5952         if eval test x\$$cachevar = xyes; then
5953           CXX_DIALECT="$switch"
5954           CXX="$CXX $switch"
5955           if test -n "$CXXCPP" ; then
5956             CXXCPP="$CXXCPP $switch"
5957           fi
5958           ac_success=yes
5959           break
5960         fi
5961       done
5962       if test x$ac_success = xyes; then
5963         break
5964       fi
5965     done
5966   fi
5967   ac_ext=c
5968 ac_cpp='$CPP $CPPFLAGS'
5969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5972
5973   if test x$ax_cxx_compile_cxx11_required = xtrue; then
5974     if test x$ac_success = xno; then
5975       as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
5976     fi
5977   fi
5978   if test x$ac_success = xno; then
5979     HAVE_CXX11=0
5980     { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5981 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5982   else
5983     HAVE_CXX11=1
5984
5985 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
5986
5987   fi
5988
5989
5990
5991
5992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5993 $as_echo_n "checking for ANSI C header files... " >&6; }
5994 if ${ac_cv_header_stdc+:} false; then :
5995   $as_echo_n "(cached) " >&6
5996 else
5997   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5998 /* end confdefs.h.  */
5999 #include <stdlib.h>
6000 #include <stdarg.h>
6001 #include <string.h>
6002 #include <float.h>
6003
6004 int
6005 main ()
6006 {
6007
6008   ;
6009   return 0;
6010 }
6011 _ACEOF
6012 if ac_fn_c_try_compile "$LINENO"; then :
6013   ac_cv_header_stdc=yes
6014 else
6015   ac_cv_header_stdc=no
6016 fi
6017 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6018
6019 if test $ac_cv_header_stdc = yes; then
6020   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6021   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6022 /* end confdefs.h.  */
6023 #include <string.h>
6024
6025 _ACEOF
6026 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6027   $EGREP "memchr" >/dev/null 2>&1; then :
6028
6029 else
6030   ac_cv_header_stdc=no
6031 fi
6032 rm -f conftest*
6033
6034 fi
6035
6036 if test $ac_cv_header_stdc = yes; then
6037   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6038   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6039 /* end confdefs.h.  */
6040 #include <stdlib.h>
6041
6042 _ACEOF
6043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6044   $EGREP "free" >/dev/null 2>&1; then :
6045
6046 else
6047   ac_cv_header_stdc=no
6048 fi
6049 rm -f conftest*
6050
6051 fi
6052
6053 if test $ac_cv_header_stdc = yes; then
6054   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6055   if test "$cross_compiling" = yes; then :
6056   :
6057 else
6058   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6059 /* end confdefs.h.  */
6060 #include <ctype.h>
6061 #include <stdlib.h>
6062 #if ((' ' & 0x0FF) == 0x020)
6063 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6064 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6065 #else
6066 # define ISLOWER(c) \
6067                    (('a' <= (c) && (c) <= 'i') \
6068                      || ('j' <= (c) && (c) <= 'r') \
6069                      || ('s' <= (c) && (c) <= 'z'))
6070 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6071 #endif
6072
6073 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6074 int
6075 main ()
6076 {
6077   int i;
6078   for (i = 0; i < 256; i++)
6079     if (XOR (islower (i), ISLOWER (i))
6080         || toupper (i) != TOUPPER (i))
6081       return 2;
6082   return 0;
6083 }
6084 _ACEOF
6085 if ac_fn_c_try_run "$LINENO"; then :
6086
6087 else
6088   ac_cv_header_stdc=no
6089 fi
6090 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6091   conftest.$ac_objext conftest.beam conftest.$ac_ext
6092 fi
6093
6094 fi
6095 fi
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6097 $as_echo "$ac_cv_header_stdc" >&6; }
6098 if test $ac_cv_header_stdc = yes; then
6099
6100 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6101
6102 fi
6103
6104
6105 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6106 if test "x$ac_cv_type_size_t" = xyes; then :
6107
6108 else
6109
6110 cat >>confdefs.h <<_ACEOF
6111 #define size_t unsigned int
6112 _ACEOF
6113
6114 fi
6115
6116
6117
6118
6119   for ac_header in $ac_header_list
6120 do :
6121   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6122 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6123 "
6124 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6125   cat >>confdefs.h <<_ACEOF
6126 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6127 _ACEOF
6128
6129 fi
6130
6131 done
6132
6133
6134
6135
6136
6137
6138
6139 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6140 if test "x$ac_cv_type_pid_t" = xyes; then :
6141
6142 else
6143
6144 cat >>confdefs.h <<_ACEOF
6145 #define pid_t int
6146 _ACEOF
6147
6148 fi
6149
6150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6151 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6152 if ${ac_cv_path_SED+:} false; then :
6153   $as_echo_n "(cached) " >&6
6154 else
6155             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6156      for ac_i in 1 2 3 4 5 6 7; do
6157        ac_script="$ac_script$as_nl$ac_script"
6158      done
6159      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6160      { ac_script=; unset ac_script;}
6161      if test -z "$SED"; then
6162   ac_path_SED_found=false
6163   # Loop through the user's path and test for each of PROGNAME-LIST
6164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6165 for as_dir in $PATH
6166 do
6167   IFS=$as_save_IFS
6168   test -z "$as_dir" && as_dir=.
6169     for ac_prog in sed gsed; do
6170     for ac_exec_ext in '' $ac_executable_extensions; do
6171       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6172       as_fn_executable_p "$ac_path_SED" || continue
6173 # Check for GNU ac_path_SED and select it if it is found.
6174   # Check for GNU $ac_path_SED
6175 case `"$ac_path_SED" --version 2>&1` in
6176 *GNU*)
6177   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6178 *)
6179   ac_count=0
6180   $as_echo_n 0123456789 >"conftest.in"
6181   while :
6182   do
6183     cat "conftest.in" "conftest.in" >"conftest.tmp"
6184     mv "conftest.tmp" "conftest.in"
6185     cp "conftest.in" "conftest.nl"
6186     $as_echo '' >> "conftest.nl"
6187     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6188     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6189     as_fn_arith $ac_count + 1 && ac_count=$as_val
6190     if test $ac_count -gt ${ac_path_SED_max-0}; then
6191       # Best one so far, save it but keep looking for a better one
6192       ac_cv_path_SED="$ac_path_SED"
6193       ac_path_SED_max=$ac_count
6194     fi
6195     # 10*(2^10) chars as input seems more than enough
6196     test $ac_count -gt 10 && break
6197   done
6198   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6199 esac
6200
6201       $ac_path_SED_found && break 3
6202     done
6203   done
6204   done
6205 IFS=$as_save_IFS
6206   if test -z "$ac_cv_path_SED"; then
6207     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6208   fi
6209 else
6210   ac_cv_path_SED=$SED
6211 fi
6212
6213 fi
6214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6215 $as_echo "$ac_cv_path_SED" >&6; }
6216  SED="$ac_cv_path_SED"
6217   rm -f conftest.sed
6218
6219
6220       if test "X$prefix" = "XNONE"; then
6221     acl_final_prefix="$ac_default_prefix"
6222   else
6223     acl_final_prefix="$prefix"
6224   fi
6225   if test "X$exec_prefix" = "XNONE"; then
6226     acl_final_exec_prefix='${prefix}'
6227   else
6228     acl_final_exec_prefix="$exec_prefix"
6229   fi
6230   acl_save_prefix="$prefix"
6231   prefix="$acl_final_prefix"
6232   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
6233   prefix="$acl_save_prefix"
6234
6235
6236 # Check whether --with-gnu-ld was given.
6237 if test "${with_gnu_ld+set}" = set; then :
6238   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6239 else
6240   with_gnu_ld=no
6241 fi
6242
6243 # Prepare PATH_SEPARATOR.
6244 # The user is always right.
6245 if test "${PATH_SEPARATOR+set}" != set; then
6246   echo "#! /bin/sh" >conf$$.sh
6247   echo  "exit 0"   >>conf$$.sh
6248   chmod +x conf$$.sh
6249   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6250     PATH_SEPARATOR=';'
6251   else
6252     PATH_SEPARATOR=:
6253   fi
6254   rm -f conf$$.sh
6255 fi
6256 ac_prog=ld
6257 if test "$GCC" = yes; then
6258   # Check if gcc -print-prog-name=ld gives a path.
6259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6260 $as_echo_n "checking for ld used by GCC... " >&6; }
6261   case $host in
6262   *-*-mingw*)
6263     # gcc leaves a trailing carriage return which upsets mingw
6264     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6265   *)
6266     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6267   esac
6268   case $ac_prog in
6269     # Accept absolute paths.
6270     [\\/]* | [A-Za-z]:[\\/]*)
6271       re_direlt='/[^/][^/]*/\.\./'
6272       # Canonicalize the path of ld
6273       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6274       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6275         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6276       done
6277       test -z "$LD" && LD="$ac_prog"
6278       ;;
6279   "")
6280     # If it fails, then pretend we aren't using GCC.
6281     ac_prog=ld
6282     ;;
6283   *)
6284     # If it is relative, then search for the first ld in PATH.
6285     with_gnu_ld=unknown
6286     ;;
6287   esac
6288 elif test "$with_gnu_ld" = yes; then
6289   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6290 $as_echo_n "checking for GNU ld... " >&6; }
6291 else
6292   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6293 $as_echo_n "checking for non-GNU ld... " >&6; }
6294 fi
6295 if ${acl_cv_path_LD+:} false; then :
6296   $as_echo_n "(cached) " >&6
6297 else
6298   if test -z "$LD"; then
6299   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6300   for ac_dir in $PATH; do
6301     test -z "$ac_dir" && ac_dir=.
6302     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6303       acl_cv_path_LD="$ac_dir/$ac_prog"
6304       # Check to see if the program is GNU ld.  I'd rather use --version,
6305       # but apparently some GNU ld's only accept -v.
6306       # Break only if it was the GNU/non-GNU ld that we prefer.
6307       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then
6308         test "$with_gnu_ld" != no && break
6309       else
6310         test "$with_gnu_ld" != yes && break
6311       fi
6312     fi
6313   done
6314   IFS="$ac_save_ifs"
6315 else
6316   acl_cv_path_LD="$LD" # Let the user override the test with a path.
6317 fi
6318 fi
6319
6320 LD="$acl_cv_path_LD"
6321 if test -n "$LD"; then
6322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6323 $as_echo "$LD" >&6; }
6324 else
6325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6326 $as_echo "no" >&6; }
6327 fi
6328 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6330 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6331 if ${acl_cv_prog_gnu_ld+:} false; then :
6332   $as_echo_n "(cached) " >&6
6333 else
6334   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6335 if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then
6336   acl_cv_prog_gnu_ld=yes
6337 else
6338   acl_cv_prog_gnu_ld=no
6339 fi
6340 fi
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
6342 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
6343 with_gnu_ld=$acl_cv_prog_gnu_ld
6344
6345
6346
6347                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
6348 $as_echo_n "checking for shared library run path origin... " >&6; }
6349 if ${acl_cv_rpath+:} false; then :
6350   $as_echo_n "(cached) " >&6
6351 else
6352
6353     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
6354     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
6355     . ./conftest.sh
6356     rm -f ./conftest.sh
6357     acl_cv_rpath=done
6358
6359 fi
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
6361 $as_echo "$acl_cv_rpath" >&6; }
6362   wl="$acl_cv_wl"
6363   libext="$acl_cv_libext"
6364   shlibext="$acl_cv_shlibext"
6365   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
6366   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
6367   hardcode_direct="$acl_cv_hardcode_direct"
6368   hardcode_minus_L="$acl_cv_hardcode_minus_L"
6369     # Check whether --enable-rpath was given.
6370 if test "${enable_rpath+set}" = set; then :
6371   enableval=$enable_rpath; :
6372 else
6373   enable_rpath=yes
6374 fi
6375
6376
6377
6378   # Set the 'development' global.
6379   . $srcdir/../bfd/development.sh
6380
6381   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6382 $as_echo_n "checking for ANSI C header files... " >&6; }
6383 if ${ac_cv_header_stdc+:} false; then :
6384   $as_echo_n "(cached) " >&6
6385 else
6386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6387 /* end confdefs.h.  */
6388 #include <stdlib.h>
6389 #include <stdarg.h>
6390 #include <string.h>
6391 #include <float.h>
6392
6393 int
6394 main ()
6395 {
6396
6397   ;
6398   return 0;
6399 }
6400 _ACEOF
6401 if ac_fn_c_try_compile "$LINENO"; then :
6402   ac_cv_header_stdc=yes
6403 else
6404   ac_cv_header_stdc=no
6405 fi
6406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6407
6408 if test $ac_cv_header_stdc = yes; then
6409   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6410   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6411 /* end confdefs.h.  */
6412 #include <string.h>
6413
6414 _ACEOF
6415 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6416   $EGREP "memchr" >/dev/null 2>&1; then :
6417
6418 else
6419   ac_cv_header_stdc=no
6420 fi
6421 rm -f conftest*
6422
6423 fi
6424
6425 if test $ac_cv_header_stdc = yes; then
6426   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6428 /* end confdefs.h.  */
6429 #include <stdlib.h>
6430
6431 _ACEOF
6432 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6433   $EGREP "free" >/dev/null 2>&1; then :
6434
6435 else
6436   ac_cv_header_stdc=no
6437 fi
6438 rm -f conftest*
6439
6440 fi
6441
6442 if test $ac_cv_header_stdc = yes; then
6443   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6444   if test "$cross_compiling" = yes; then :
6445   :
6446 else
6447   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6448 /* end confdefs.h.  */
6449 #include <ctype.h>
6450 #include <stdlib.h>
6451 #if ((' ' & 0x0FF) == 0x020)
6452 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6453 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6454 #else
6455 # define ISLOWER(c) \
6456                    (('a' <= (c) && (c) <= 'i') \
6457                      || ('j' <= (c) && (c) <= 'r') \
6458                      || ('s' <= (c) && (c) <= 'z'))
6459 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6460 #endif
6461
6462 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6463 int
6464 main ()
6465 {
6466   int i;
6467   for (i = 0; i < 256; i++)
6468     if (XOR (islower (i), ISLOWER (i))
6469         || toupper (i) != TOUPPER (i))
6470       return 2;
6471   return 0;
6472 }
6473 _ACEOF
6474 if ac_fn_c_try_run "$LINENO"; then :
6475
6476 else
6477   ac_cv_header_stdc=no
6478 fi
6479 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6480   conftest.$ac_objext conftest.beam conftest.$ac_ext
6481 fi
6482
6483 fi
6484 fi
6485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6486 $as_echo "$ac_cv_header_stdc" >&6; }
6487 if test $ac_cv_header_stdc = yes; then
6488
6489 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6490
6491 fi
6492
6493   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6494 # for constant arguments.  Useless!
6495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6496 $as_echo_n "checking for working alloca.h... " >&6; }
6497 if ${ac_cv_working_alloca_h+:} false; then :
6498   $as_echo_n "(cached) " >&6
6499 else
6500   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6501 /* end confdefs.h.  */
6502 #include <alloca.h>
6503 int
6504 main ()
6505 {
6506 char *p = (char *) alloca (2 * sizeof (int));
6507                           if (p) return 0;
6508   ;
6509   return 0;
6510 }
6511 _ACEOF
6512 if ac_fn_c_try_link "$LINENO"; then :
6513   ac_cv_working_alloca_h=yes
6514 else
6515   ac_cv_working_alloca_h=no
6516 fi
6517 rm -f core conftest.err conftest.$ac_objext \
6518     conftest$ac_exeext conftest.$ac_ext
6519 fi
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6521 $as_echo "$ac_cv_working_alloca_h" >&6; }
6522 if test $ac_cv_working_alloca_h = yes; then
6523
6524 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6525
6526 fi
6527
6528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6529 $as_echo_n "checking for alloca... " >&6; }
6530 if ${ac_cv_func_alloca_works+:} false; then :
6531   $as_echo_n "(cached) " >&6
6532 else
6533   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6534 /* end confdefs.h.  */
6535 #ifdef __GNUC__
6536 # define alloca __builtin_alloca
6537 #else
6538 # ifdef _MSC_VER
6539 #  include <malloc.h>
6540 #  define alloca _alloca
6541 # else
6542 #  ifdef HAVE_ALLOCA_H
6543 #   include <alloca.h>
6544 #  else
6545 #   ifdef _AIX
6546  #pragma alloca
6547 #   else
6548 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6549 void *alloca (size_t);
6550 #    endif
6551 #   endif
6552 #  endif
6553 # endif
6554 #endif
6555
6556 int
6557 main ()
6558 {
6559 char *p = (char *) alloca (1);
6560                                     if (p) return 0;
6561   ;
6562   return 0;
6563 }
6564 _ACEOF
6565 if ac_fn_c_try_link "$LINENO"; then :
6566   ac_cv_func_alloca_works=yes
6567 else
6568   ac_cv_func_alloca_works=no
6569 fi
6570 rm -f core conftest.err conftest.$ac_objext \
6571     conftest$ac_exeext conftest.$ac_ext
6572 fi
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6574 $as_echo "$ac_cv_func_alloca_works" >&6; }
6575
6576 if test $ac_cv_func_alloca_works = yes; then
6577
6578 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6579
6580 else
6581   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6582 # that cause trouble.  Some versions do not even contain alloca or
6583 # contain a buggy version.  If you still want to use their alloca,
6584 # use ar to extract alloca.o from them instead of compiling alloca.c.
6585
6586 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
6587
6588 $as_echo "#define C_ALLOCA 1" >>confdefs.h
6589
6590
6591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6592 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
6593 if ${ac_cv_os_cray+:} false; then :
6594   $as_echo_n "(cached) " >&6
6595 else
6596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6597 /* end confdefs.h.  */
6598 #if defined CRAY && ! defined CRAY2
6599 webecray
6600 #else
6601 wenotbecray
6602 #endif
6603
6604 _ACEOF
6605 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6606   $EGREP "webecray" >/dev/null 2>&1; then :
6607   ac_cv_os_cray=yes
6608 else
6609   ac_cv_os_cray=no
6610 fi
6611 rm -f conftest*
6612
6613 fi
6614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6615 $as_echo "$ac_cv_os_cray" >&6; }
6616 if test $ac_cv_os_cray = yes; then
6617   for ac_func in _getb67 GETB67 getb67; do
6618     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6619 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6620 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6621
6622 cat >>confdefs.h <<_ACEOF
6623 #define CRAY_STACKSEG_END $ac_func
6624 _ACEOF
6625
6626     break
6627 fi
6628
6629   done
6630 fi
6631
6632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6633 $as_echo_n "checking stack direction for C alloca... " >&6; }
6634 if ${ac_cv_c_stack_direction+:} false; then :
6635   $as_echo_n "(cached) " >&6
6636 else
6637   if test "$cross_compiling" = yes; then :
6638   ac_cv_c_stack_direction=0
6639 else
6640   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6641 /* end confdefs.h.  */
6642 $ac_includes_default
6643 int
6644 find_stack_direction (int *addr, int depth)
6645 {
6646   int dir, dummy = 0;
6647   if (! addr)
6648     addr = &dummy;
6649   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6650   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6651   return dir + dummy;
6652 }
6653
6654 int
6655 main (int argc, char **argv)
6656 {
6657   return find_stack_direction (0, argc + !argv + 20) < 0;
6658 }
6659 _ACEOF
6660 if ac_fn_c_try_run "$LINENO"; then :
6661   ac_cv_c_stack_direction=1
6662 else
6663   ac_cv_c_stack_direction=-1
6664 fi
6665 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6666   conftest.$ac_objext conftest.beam conftest.$ac_ext
6667 fi
6668
6669 fi
6670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6671 $as_echo "$ac_cv_c_stack_direction" >&6; }
6672 cat >>confdefs.h <<_ACEOF
6673 #define STACK_DIRECTION $ac_cv_c_stack_direction
6674 _ACEOF
6675
6676
6677 fi
6678
6679
6680   WIN32APILIBS=
6681   case ${host} in
6682     *mingw32*)
6683
6684 $as_echo "#define USE_WIN32API 1" >>confdefs.h
6685
6686       WIN32APILIBS="-lws2_32"
6687       ;;
6688   esac
6689
6690
6691   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
6692 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
6693 if ${am_cv_langinfo_codeset+:} false; then :
6694   $as_echo_n "(cached) " >&6
6695 else
6696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6697 /* end confdefs.h.  */
6698 #include <langinfo.h>
6699 int
6700 main ()
6701 {
6702 char* cs = nl_langinfo(CODESET);
6703   ;
6704   return 0;
6705 }
6706 _ACEOF
6707 if ac_fn_c_try_link "$LINENO"; then :
6708   am_cv_langinfo_codeset=yes
6709 else
6710   am_cv_langinfo_codeset=no
6711 fi
6712 rm -f core conftest.err conftest.$ac_objext \
6713     conftest$ac_exeext conftest.$ac_ext
6714
6715 fi
6716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
6717 $as_echo "$am_cv_langinfo_codeset" >&6; }
6718   if test $am_cv_langinfo_codeset = yes; then
6719
6720 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
6721
6722   fi
6723
6724
6725   for ac_header in linux/perf_event.h locale.h memory.h signal.h                   sys/resource.h sys/socket.h             sys/un.h sys/wait.h             thread_db.h wait.h              termios.h               dlfcn.h                 linux/elf.h proc_service.h              poll.h sys/poll.h sys/select.h
6726 do :
6727   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6728 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6729 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6730   cat >>confdefs.h <<_ACEOF
6731 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6732 _ACEOF
6733
6734 fi
6735
6736 done
6737
6738
6739
6740 for ac_func in getpagesize
6741 do :
6742   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
6743 if test "x$ac_cv_func_getpagesize" = xyes; then :
6744   cat >>confdefs.h <<_ACEOF
6745 #define HAVE_GETPAGESIZE 1
6746 _ACEOF
6747
6748 fi
6749 done
6750
6751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
6752 $as_echo_n "checking for working mmap... " >&6; }
6753 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
6754   $as_echo_n "(cached) " >&6
6755 else
6756   if test "$cross_compiling" = yes; then :
6757   ac_cv_func_mmap_fixed_mapped=no
6758 else
6759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6760 /* end confdefs.h.  */
6761 $ac_includes_default
6762 /* malloc might have been renamed as rpl_malloc. */
6763 #undef malloc
6764
6765 /* Thanks to Mike Haertel and Jim Avera for this test.
6766    Here is a matrix of mmap possibilities:
6767         mmap private not fixed
6768         mmap private fixed at somewhere currently unmapped
6769         mmap private fixed at somewhere already mapped
6770         mmap shared not fixed
6771         mmap shared fixed at somewhere currently unmapped
6772         mmap shared fixed at somewhere already mapped
6773    For private mappings, we should verify that changes cannot be read()
6774    back from the file, nor mmap's back from the file at a different
6775    address.  (There have been systems where private was not correctly
6776    implemented like the infamous i386 svr4.0, and systems where the
6777    VM page cache was not coherent with the file system buffer cache
6778    like early versions of FreeBSD and possibly contemporary NetBSD.)
6779    For shared mappings, we should conversely verify that changes get
6780    propagated back to all the places they're supposed to be.
6781
6782    Grep wants private fixed already mapped.
6783    The main things grep needs to know about mmap are:
6784    * does it exist and is it safe to write into the mmap'd area
6785    * how to use it (BSD variants)  */
6786
6787 #include <fcntl.h>
6788 #include <sys/mman.h>
6789
6790 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
6791 char *malloc ();
6792 #endif
6793
6794 /* This mess was copied from the GNU getpagesize.h.  */
6795 #ifndef HAVE_GETPAGESIZE
6796 # ifdef _SC_PAGESIZE
6797 #  define getpagesize() sysconf(_SC_PAGESIZE)
6798 # else /* no _SC_PAGESIZE */
6799 #  ifdef HAVE_SYS_PARAM_H
6800 #   include <sys/param.h>
6801 #   ifdef EXEC_PAGESIZE
6802 #    define getpagesize() EXEC_PAGESIZE
6803 #   else /* no EXEC_PAGESIZE */
6804 #    ifdef NBPG
6805 #     define getpagesize() NBPG * CLSIZE
6806 #     ifndef CLSIZE
6807 #      define CLSIZE 1
6808 #     endif /* no CLSIZE */
6809 #    else /* no NBPG */
6810 #     ifdef NBPC
6811 #      define getpagesize() NBPC
6812 #     else /* no NBPC */
6813 #      ifdef PAGESIZE
6814 #       define getpagesize() PAGESIZE
6815 #      endif /* PAGESIZE */
6816 #     endif /* no NBPC */
6817 #    endif /* no NBPG */
6818 #   endif /* no EXEC_PAGESIZE */
6819 #  else /* no HAVE_SYS_PARAM_H */
6820 #   define getpagesize() 8192   /* punt totally */
6821 #  endif /* no HAVE_SYS_PARAM_H */
6822 # endif /* no _SC_PAGESIZE */
6823
6824 #endif /* no HAVE_GETPAGESIZE */
6825
6826 int
6827 main ()
6828 {
6829   char *data, *data2, *data3;
6830   const char *cdata2;
6831   int i, pagesize;
6832   int fd, fd2;
6833
6834   pagesize = getpagesize ();
6835
6836   /* First, make a file with some known garbage in it. */
6837   data = (char *) malloc (pagesize);
6838   if (!data)
6839     return 1;
6840   for (i = 0; i < pagesize; ++i)
6841     *(data + i) = rand ();
6842   umask (0);
6843   fd = creat ("conftest.mmap", 0600);
6844   if (fd < 0)
6845     return 2;
6846   if (write (fd, data, pagesize) != pagesize)
6847     return 3;
6848   close (fd);
6849
6850   /* Next, check that the tail of a page is zero-filled.  File must have
6851      non-zero length, otherwise we risk SIGBUS for entire page.  */
6852   fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
6853   if (fd2 < 0)
6854     return 4;
6855   cdata2 = "";
6856   if (write (fd2, cdata2, 1) != 1)
6857     return 5;
6858   data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
6859   if (data2 == MAP_FAILED)
6860     return 6;
6861   for (i = 0; i < pagesize; ++i)
6862     if (*(data2 + i))
6863       return 7;
6864   close (fd2);
6865   if (munmap (data2, pagesize))
6866     return 8;
6867
6868   /* Next, try to mmap the file at a fixed address which already has
6869      something else allocated at it.  If we can, also make sure that
6870      we see the same garbage.  */
6871   fd = open ("conftest.mmap", O_RDWR);
6872   if (fd < 0)
6873     return 9;
6874   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
6875                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
6876     return 10;
6877   for (i = 0; i < pagesize; ++i)
6878     if (*(data + i) != *(data2 + i))
6879       return 11;
6880
6881   /* Finally, make sure that changes to the mapped area do not
6882      percolate back to the file as seen by read().  (This is a bug on
6883      some variants of i386 svr4.0.)  */
6884   for (i = 0; i < pagesize; ++i)
6885     *(data2 + i) = *(data2 + i) + 1;
6886   data3 = (char *) malloc (pagesize);
6887   if (!data3)
6888     return 12;
6889   if (read (fd, data3, pagesize) != pagesize)
6890     return 13;
6891   for (i = 0; i < pagesize; ++i)
6892     if (*(data + i) != *(data3 + i))
6893       return 14;
6894   close (fd);
6895   return 0;
6896 }
6897 _ACEOF
6898 if ac_fn_c_try_run "$LINENO"; then :
6899   ac_cv_func_mmap_fixed_mapped=yes
6900 else
6901   ac_cv_func_mmap_fixed_mapped=no
6902 fi
6903 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6904   conftest.$ac_objext conftest.beam conftest.$ac_ext
6905 fi
6906
6907 fi
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
6909 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
6910 if test $ac_cv_func_mmap_fixed_mapped = yes; then
6911
6912 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
6913
6914 fi
6915 rm -f conftest.mmap conftest.txt
6916
6917   for ac_header in vfork.h
6918 do :
6919   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
6920 if test "x$ac_cv_header_vfork_h" = xyes; then :
6921   cat >>confdefs.h <<_ACEOF
6922 #define HAVE_VFORK_H 1
6923 _ACEOF
6924
6925 fi
6926
6927 done
6928
6929 for ac_func in fork vfork
6930 do :
6931   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6932 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6933 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6934   cat >>confdefs.h <<_ACEOF
6935 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6936 _ACEOF
6937
6938 fi
6939 done
6940
6941 if test "x$ac_cv_func_fork" = xyes; then
6942   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
6943 $as_echo_n "checking for working fork... " >&6; }
6944 if ${ac_cv_func_fork_works+:} false; then :
6945   $as_echo_n "(cached) " >&6
6946 else
6947   if test "$cross_compiling" = yes; then :
6948   ac_cv_func_fork_works=cross
6949 else
6950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6951 /* end confdefs.h.  */
6952 $ac_includes_default
6953 int
6954 main ()
6955 {
6956
6957           /* By Ruediger Kuhlmann. */
6958           return fork () < 0;
6959
6960   ;
6961   return 0;
6962 }
6963 _ACEOF
6964 if ac_fn_c_try_run "$LINENO"; then :
6965   ac_cv_func_fork_works=yes
6966 else
6967   ac_cv_func_fork_works=no
6968 fi
6969 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6970   conftest.$ac_objext conftest.beam conftest.$ac_ext
6971 fi
6972
6973 fi
6974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
6975 $as_echo "$ac_cv_func_fork_works" >&6; }
6976
6977 else
6978   ac_cv_func_fork_works=$ac_cv_func_fork
6979 fi
6980 if test "x$ac_cv_func_fork_works" = xcross; then
6981   case $host in
6982     *-*-amigaos* | *-*-msdosdjgpp*)
6983       # Override, as these systems have only a dummy fork() stub
6984       ac_cv_func_fork_works=no
6985       ;;
6986     *)
6987       ac_cv_func_fork_works=yes
6988       ;;
6989   esac
6990   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
6991 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
6992 fi
6993 ac_cv_func_vfork_works=$ac_cv_func_vfork
6994 if test "x$ac_cv_func_vfork" = xyes; then
6995   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
6996 $as_echo_n "checking for working vfork... " >&6; }
6997 if ${ac_cv_func_vfork_works+:} false; then :
6998   $as_echo_n "(cached) " >&6
6999 else
7000   if test "$cross_compiling" = yes; then :
7001   ac_cv_func_vfork_works=cross
7002 else
7003   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7004 /* end confdefs.h.  */
7005 /* Thanks to Paul Eggert for this test.  */
7006 $ac_includes_default
7007 #include <sys/wait.h>
7008 #ifdef HAVE_VFORK_H
7009 # include <vfork.h>
7010 #endif
7011 /* On some sparc systems, changes by the child to local and incoming
7012    argument registers are propagated back to the parent.  The compiler
7013    is told about this with #include <vfork.h>, but some compilers
7014    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
7015    static variable whose address is put into a register that is
7016    clobbered by the vfork.  */
7017 static void
7018 #ifdef __cplusplus
7019 sparc_address_test (int arg)
7020 # else
7021 sparc_address_test (arg) int arg;
7022 #endif
7023 {
7024   static pid_t child;
7025   if (!child) {
7026     child = vfork ();
7027     if (child < 0) {
7028       perror ("vfork");
7029       _exit(2);
7030     }
7031     if (!child) {
7032       arg = getpid();
7033       write(-1, "", 0);
7034       _exit (arg);
7035     }
7036   }
7037 }
7038
7039 int
7040 main ()
7041 {
7042   pid_t parent = getpid ();
7043   pid_t child;
7044
7045   sparc_address_test (0);
7046
7047   child = vfork ();
7048
7049   if (child == 0) {
7050     /* Here is another test for sparc vfork register problems.  This
7051        test uses lots of local variables, at least as many local
7052        variables as main has allocated so far including compiler
7053        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
7054        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
7055        reuse the register of parent for one of the local variables,
7056        since it will think that parent can't possibly be used any more
7057        in this routine.  Assigning to the local variable will thus
7058        munge parent in the parent process.  */
7059     pid_t
7060       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7061       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7062     /* Convince the compiler that p..p7 are live; otherwise, it might
7063        use the same hardware register for all 8 local variables.  */
7064     if (p != p1 || p != p2 || p != p3 || p != p4
7065         || p != p5 || p != p6 || p != p7)
7066       _exit(1);
7067
7068     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
7069        from child file descriptors.  If the child closes a descriptor
7070        before it execs or exits, this munges the parent's descriptor
7071        as well.  Test for this by closing stdout in the child.  */
7072     _exit(close(fileno(stdout)) != 0);
7073   } else {
7074     int status;
7075     struct stat st;
7076
7077     while (wait(&status) != child)
7078       ;
7079     return (
7080          /* Was there some problem with vforking?  */
7081          child < 0
7082
7083          /* Did the child fail?  (This shouldn't happen.)  */
7084          || status
7085
7086          /* Did the vfork/compiler bug occur?  */
7087          || parent != getpid()
7088
7089          /* Did the file descriptor bug occur?  */
7090          || fstat(fileno(stdout), &st) != 0
7091          );
7092   }
7093 }
7094 _ACEOF
7095 if ac_fn_c_try_run "$LINENO"; then :
7096   ac_cv_func_vfork_works=yes
7097 else
7098   ac_cv_func_vfork_works=no
7099 fi
7100 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7101   conftest.$ac_objext conftest.beam conftest.$ac_ext
7102 fi
7103
7104 fi
7105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
7106 $as_echo "$ac_cv_func_vfork_works" >&6; }
7107
7108 fi;
7109 if test "x$ac_cv_func_fork_works" = xcross; then
7110   ac_cv_func_vfork_works=$ac_cv_func_vfork
7111   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
7112 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
7113 fi
7114
7115 if test "x$ac_cv_func_vfork_works" = xyes; then
7116
7117 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
7118
7119 else
7120
7121 $as_echo "#define vfork fork" >>confdefs.h
7122
7123 fi
7124 if test "x$ac_cv_func_fork_works" = xyes; then
7125
7126 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
7127
7128 fi
7129
7130   for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
7131                   ptrace64 sbrk setns sigaltstack sigprocmask \
7132                   setpgid setpgrp getrusage getauxval sigtimedwait
7133 do :
7134   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7135 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7136 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7137   cat >>confdefs.h <<_ACEOF
7138 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7139 _ACEOF
7140
7141 fi
7142 done
7143
7144
7145   # This is needed for RHEL 5 and uclibc-ng < 1.0.39.
7146   # These did not define ADDR_NO_RANDOMIZE in sys/personality.h,
7147   # only in linux/personality.h.
7148   ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
7149 "
7150 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
7151   ac_have_decl=1
7152 else
7153   ac_have_decl=0
7154 fi
7155
7156 cat >>confdefs.h <<_ACEOF
7157 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
7158 _ACEOF
7159
7160
7161   ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
7162 if test "x$ac_cv_have_decl_strstr" = xyes; then :
7163   ac_have_decl=1
7164 else
7165   ac_have_decl=0
7166 fi
7167
7168 cat >>confdefs.h <<_ACEOF
7169 #define HAVE_DECL_STRSTR $ac_have_decl
7170 _ACEOF
7171
7172
7173   # ----------------------- #
7174   # Checks for structures.  #
7175   # ----------------------- #
7176
7177   ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
7178 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
7179
7180 cat >>confdefs.h <<_ACEOF
7181 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
7182 _ACEOF
7183
7184
7185 fi
7186 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
7187 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7188
7189 cat >>confdefs.h <<_ACEOF
7190 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7191 _ACEOF
7192
7193
7194 fi
7195
7196
7197   # On FreeBSD we need libutil for the kinfo_get* functions.  On
7198   # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7199   # Figure out which one to use.
7200   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
7201 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
7202 if ${ac_cv_search_kinfo_getfile+:} false; then :
7203   $as_echo_n "(cached) " >&6
7204 else
7205   ac_func_search_save_LIBS=$LIBS
7206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7207 /* end confdefs.h.  */
7208
7209 /* Override any GCC internal prototype to avoid an error.
7210    Use char because int might match the return type of a GCC
7211    builtin and then its argument prototype would still apply.  */
7212 #ifdef __cplusplus
7213 extern "C"
7214 #endif
7215 char kinfo_getfile ();
7216 int
7217 main ()
7218 {
7219 return kinfo_getfile ();
7220   ;
7221   return 0;
7222 }
7223 _ACEOF
7224 for ac_lib in '' util util-freebsd; do
7225   if test -z "$ac_lib"; then
7226     ac_res="none required"
7227   else
7228     ac_res=-l$ac_lib
7229     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7230   fi
7231   if ac_fn_c_try_link "$LINENO"; then :
7232   ac_cv_search_kinfo_getfile=$ac_res
7233 fi
7234 rm -f core conftest.err conftest.$ac_objext \
7235     conftest$ac_exeext
7236   if ${ac_cv_search_kinfo_getfile+:} false; then :
7237   break
7238 fi
7239 done
7240 if ${ac_cv_search_kinfo_getfile+:} false; then :
7241
7242 else
7243   ac_cv_search_kinfo_getfile=no
7244 fi
7245 rm conftest.$ac_ext
7246 LIBS=$ac_func_search_save_LIBS
7247 fi
7248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
7249 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
7250 ac_res=$ac_cv_search_kinfo_getfile
7251 if test "$ac_res" != no; then :
7252   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7253
7254 fi
7255
7256
7257   # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
7258   for ac_func in kinfo_getfile
7259 do :
7260   ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
7261 if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
7262   cat >>confdefs.h <<_ACEOF
7263 #define HAVE_KINFO_GETFILE 1
7264 _ACEOF
7265
7266 fi
7267 done
7268
7269
7270   # ----------------------- #
7271   # Check for threading.    #
7272   # ----------------------- #
7273
7274   # Check whether --enable-threading was given.
7275 if test "${enable_threading+set}" = set; then :
7276   enableval=$enable_threading; case "$enableval" in
7277     yes) want_threading=yes ;;
7278     no) want_threading=no ;;
7279     *) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;;
7280     esac
7281 else
7282   want_threading=yes
7283 fi
7284
7285
7286   # Check for std::thread.  This does not work on some platforms, like
7287   # mingw and DJGPP.
7288   ac_ext=cpp
7289 ac_cpp='$CXXCPP $CPPFLAGS'
7290 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7291 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7292 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7293
7294
7295
7296
7297
7298 ac_ext=c
7299 ac_cpp='$CPP $CPPFLAGS'
7300 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7301 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7302 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7303
7304 ax_pthread_ok=no
7305
7306 # We used to check for pthread.h first, but this fails if pthread.h
7307 # requires special compiler flags (e.g. on Tru64 or Sequent).
7308 # It gets checked for in the link test anyway.
7309
7310 # First of all, check if the user has set any of the PTHREAD_LIBS,
7311 # etcetera environment variables, and if threads linking works using
7312 # them:
7313 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
7314         ax_pthread_save_CC="$CC"
7315         ax_pthread_save_CFLAGS="$CFLAGS"
7316         ax_pthread_save_LIBS="$LIBS"
7317         if test "x$PTHREAD_CC" != "x"; then :
7318   CC="$PTHREAD_CC"
7319 fi
7320         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7321         LIBS="$PTHREAD_LIBS $LIBS"
7322         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
7323 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
7324         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7325 /* end confdefs.h.  */
7326
7327 /* Override any GCC internal prototype to avoid an error.
7328    Use char because int might match the return type of a GCC
7329    builtin and then its argument prototype would still apply.  */
7330 #ifdef __cplusplus
7331 extern "C"
7332 #endif
7333 char pthread_join ();
7334 int
7335 main ()
7336 {
7337 return pthread_join ();
7338   ;
7339   return 0;
7340 }
7341 _ACEOF
7342 if ac_fn_c_try_link "$LINENO"; then :
7343   ax_pthread_ok=yes
7344 fi
7345 rm -f core conftest.err conftest.$ac_objext \
7346     conftest$ac_exeext conftest.$ac_ext
7347         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7348 $as_echo "$ax_pthread_ok" >&6; }
7349         if test "x$ax_pthread_ok" = "xno"; then
7350                 PTHREAD_LIBS=""
7351                 PTHREAD_CFLAGS=""
7352         fi
7353         CC="$ax_pthread_save_CC"
7354         CFLAGS="$ax_pthread_save_CFLAGS"
7355         LIBS="$ax_pthread_save_LIBS"
7356 fi
7357
7358 # We must check for the threads library under a number of different
7359 # names; the ordering is very important because some systems
7360 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
7361 # libraries is broken (non-POSIX).
7362
7363 # Create a list of thread flags to try.  Items starting with a "-" are
7364 # C compiler flags, and other items are library names, except for "none"
7365 # which indicates that we try without any flags at all, and "pthread-config"
7366 # which is a program returning the flags for the Pth emulation library.
7367
7368 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
7369
7370 # The ordering *is* (sometimes) important.  Some notes on the
7371 # individual items follow:
7372
7373 # pthreads: AIX (must check this before -lpthread)
7374 # none: in case threads are in libc; should be tried before -Kthread and
7375 #       other compiler flags to prevent continual compiler warnings
7376 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
7377 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
7378 #           (Note: HP C rejects this with "bad form for `-t' option")
7379 # -pthreads: Solaris/gcc (Note: HP C also rejects)
7380 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
7381 #      doesn't hurt to check since this sometimes defines pthreads and
7382 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
7383 #      is present but should not be used directly; and before -mthreads,
7384 #      because the compiler interprets this as "-mt" + "-hreads")
7385 # -mthreads: Mingw32/gcc, Lynx/gcc
7386 # pthread: Linux, etcetera
7387 # --thread-safe: KAI C++
7388 # pthread-config: use pthread-config program (for GNU Pth library)
7389
7390 case $host_os in
7391
7392         freebsd*)
7393
7394         # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
7395         # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
7396
7397         ax_pthread_flags="-kthread lthread $ax_pthread_flags"
7398         ;;
7399
7400         hpux*)
7401
7402         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
7403         # multi-threading and also sets -lpthread."
7404
7405         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
7406         ;;
7407
7408         openedition*)
7409
7410         # IBM z/OS requires a feature-test macro to be defined in order to
7411         # enable POSIX threads at all, so give the user a hint if this is
7412         # not set. (We don't define these ourselves, as they can affect
7413         # other portions of the system API in unpredictable ways.)
7414
7415         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7416 /* end confdefs.h.  */
7417
7418 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
7419              AX_PTHREAD_ZOS_MISSING
7420 #            endif
7421
7422 _ACEOF
7423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7424   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
7425   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
7426 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
7427 fi
7428 rm -f conftest*
7429
7430         ;;
7431
7432         solaris*)
7433
7434         # On Solaris (at least, for some versions), libc contains stubbed
7435         # (non-functional) versions of the pthreads routines, so link-based
7436         # tests will erroneously succeed. (N.B.: The stubs are missing
7437         # pthread_cleanup_push, or rather a function called by this macro,
7438         # so we could check for that, but who knows whether they'll stub
7439         # that too in a future libc.)  So we'll check first for the
7440         # standard Solaris way of linking pthreads (-mt -lpthread).
7441
7442         ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
7443         ;;
7444 esac
7445
7446 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
7447
7448 if test "x$GCC" = "xyes"; then :
7449   ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
7450 fi
7451
7452 # The presence of a feature test macro requesting re-entrant function
7453 # definitions is, on some systems, a strong hint that pthreads support is
7454 # correctly enabled
7455
7456 case $host_os in
7457         darwin* | hpux* | linux* | osf* | solaris*)
7458         ax_pthread_check_macro="_REENTRANT"
7459         ;;
7460
7461         aix*)
7462         ax_pthread_check_macro="_THREAD_SAFE"
7463         ;;
7464
7465         *)
7466         ax_pthread_check_macro="--"
7467         ;;
7468 esac
7469 if test "x$ax_pthread_check_macro" = "x--"; then :
7470   ax_pthread_check_cond=0
7471 else
7472   ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
7473 fi
7474
7475 # Are we compiling with Clang?
7476
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
7478 $as_echo_n "checking whether $CC is Clang... " >&6; }
7479 if ${ax_cv_PTHREAD_CLANG+:} false; then :
7480   $as_echo_n "(cached) " >&6
7481 else
7482   ax_cv_PTHREAD_CLANG=no
7483      # Note that Autoconf sets GCC=yes for Clang as well as GCC
7484      if test "x$GCC" = "xyes"; then
7485         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7486 /* end confdefs.h.  */
7487 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
7488 #            if defined(__clang__) && defined(__llvm__)
7489              AX_PTHREAD_CC_IS_CLANG
7490 #            endif
7491
7492 _ACEOF
7493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7494   $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
7495   ax_cv_PTHREAD_CLANG=yes
7496 fi
7497 rm -f conftest*
7498
7499      fi
7500
7501 fi
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
7503 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
7504 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
7505
7506 ax_pthread_clang_warning=no
7507
7508 # Clang needs special handling, because older versions handle the -pthread
7509 # option in a rather... idiosyncratic way
7510
7511 if test "x$ax_pthread_clang" = "xyes"; then
7512
7513         # Clang takes -pthread; it has never supported any other flag
7514
7515         # (Note 1: This will need to be revisited if a system that Clang
7516         # supports has POSIX threads in a separate library.  This tends not
7517         # to be the way of modern systems, but it's conceivable.)
7518
7519         # (Note 2: On some systems, notably Darwin, -pthread is not needed
7520         # to get POSIX threads support; the API is always present and
7521         # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
7522         # -pthread does define _REENTRANT, and while the Darwin headers
7523         # ignore this macro, third-party headers might not.)
7524
7525         PTHREAD_CFLAGS="-pthread"
7526         PTHREAD_LIBS=
7527
7528         ax_pthread_ok=yes
7529
7530         # However, older versions of Clang make a point of warning the user
7531         # that, in an invocation where only linking and no compilation is
7532         # taking place, the -pthread option has no effect ("argument unused
7533         # during compilation").  They expect -pthread to be passed in only
7534         # when source code is being compiled.
7535         #
7536         # Problem is, this is at odds with the way Automake and most other
7537         # C build frameworks function, which is that the same flags used in
7538         # compilation (CFLAGS) are also used in linking.  Many systems
7539         # supported by AX_PTHREAD require exactly this for POSIX threads
7540         # support, and in fact it is often not straightforward to specify a
7541         # flag that is used only in the compilation phase and not in
7542         # linking.  Such a scenario is extremely rare in practice.
7543         #
7544         # Even though use of the -pthread flag in linking would only print
7545         # a warning, this can be a nuisance for well-run software projects
7546         # that build with -Werror.  So if the active version of Clang has
7547         # this misfeature, we search for an option to squash it.
7548
7549         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
7550 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
7551 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
7552   $as_echo_n "(cached) " >&6
7553 else
7554   ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
7555              # Create an alternate version of $ac_link that compiles and
7556              # links in two steps (.c -> .o, .o -> exe) instead of one
7557              # (.c -> exe), because the warning occurs only in the second
7558              # step
7559              ax_pthread_save_ac_link="$ac_link"
7560              ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
7561              ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
7562              ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
7563              ax_pthread_save_CFLAGS="$CFLAGS"
7564              for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
7565                 if test "x$ax_pthread_try" = "xunknown"; then :
7566   break
7567 fi
7568                 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
7569                 ac_link="$ax_pthread_save_ac_link"
7570                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7571 /* end confdefs.h.  */
7572 int main(void){return 0;}
7573 _ACEOF
7574 if ac_fn_c_try_link "$LINENO"; then :
7575   ac_link="$ax_pthread_2step_ac_link"
7576                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7577 /* end confdefs.h.  */
7578 int main(void){return 0;}
7579 _ACEOF
7580 if ac_fn_c_try_link "$LINENO"; then :
7581   break
7582 fi
7583 rm -f core conftest.err conftest.$ac_objext \
7584     conftest$ac_exeext conftest.$ac_ext
7585
7586 fi
7587 rm -f core conftest.err conftest.$ac_objext \
7588     conftest$ac_exeext conftest.$ac_ext
7589              done
7590              ac_link="$ax_pthread_save_ac_link"
7591              CFLAGS="$ax_pthread_save_CFLAGS"
7592              if test "x$ax_pthread_try" = "x"; then :
7593   ax_pthread_try=no
7594 fi
7595              ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
7596
7597 fi
7598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
7599 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
7600
7601         case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
7602                 no | unknown) ;;
7603                 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
7604         esac
7605
7606 fi # $ax_pthread_clang = yes
7607
7608 if test "x$ax_pthread_ok" = "xno"; then
7609 for ax_pthread_try_flag in $ax_pthread_flags; do
7610
7611         case $ax_pthread_try_flag in
7612                 none)
7613                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
7614 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
7615                 ;;
7616
7617                 -mt,pthread)
7618                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
7619 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
7620                 PTHREAD_CFLAGS="-mt"
7621                 PTHREAD_LIBS="-lpthread"
7622                 ;;
7623
7624                 -*)
7625                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
7626 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
7627                 PTHREAD_CFLAGS="$ax_pthread_try_flag"
7628                 ;;
7629
7630                 pthread-config)
7631                 # Extract the first word of "pthread-config", so it can be a program name with args.
7632 set dummy pthread-config; ac_word=$2
7633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7634 $as_echo_n "checking for $ac_word... " >&6; }
7635 if ${ac_cv_prog_ax_pthread_config+:} false; then :
7636   $as_echo_n "(cached) " >&6
7637 else
7638   if test -n "$ax_pthread_config"; then
7639   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
7640 else
7641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7642 for as_dir in $PATH
7643 do
7644   IFS=$as_save_IFS
7645   test -z "$as_dir" && as_dir=.
7646     for ac_exec_ext in '' $ac_executable_extensions; do
7647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7648     ac_cv_prog_ax_pthread_config="yes"
7649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7650     break 2
7651   fi
7652 done
7653   done
7654 IFS=$as_save_IFS
7655
7656   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
7657 fi
7658 fi
7659 ax_pthread_config=$ac_cv_prog_ax_pthread_config
7660 if test -n "$ax_pthread_config"; then
7661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
7662 $as_echo "$ax_pthread_config" >&6; }
7663 else
7664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7665 $as_echo "no" >&6; }
7666 fi
7667
7668
7669                 if test "x$ax_pthread_config" = "xno"; then :
7670   continue
7671 fi
7672                 PTHREAD_CFLAGS="`pthread-config --cflags`"
7673                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
7674                 ;;
7675
7676                 *)
7677                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
7678 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
7679                 PTHREAD_LIBS="-l$ax_pthread_try_flag"
7680                 ;;
7681         esac
7682
7683         ax_pthread_save_CFLAGS="$CFLAGS"
7684         ax_pthread_save_LIBS="$LIBS"
7685         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7686         LIBS="$PTHREAD_LIBS $LIBS"
7687
7688         # Check for various functions.  We must include pthread.h,
7689         # since some functions may be macros.  (On the Sequent, we
7690         # need a special flag -Kthread to make this header compile.)
7691         # We check for pthread_join because it is in -lpthread on IRIX
7692         # while pthread_create is in libc.  We check for pthread_attr_init
7693         # due to DEC craziness with -lpthreads.  We check for
7694         # pthread_cleanup_push because it is one of the few pthread
7695         # functions on Solaris that doesn't have a non-functional libc stub.
7696         # We try pthread_create on general principles.
7697
7698         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7699 /* end confdefs.h.  */
7700 #include <pthread.h>
7701 #                       if $ax_pthread_check_cond
7702 #                        error "$ax_pthread_check_macro must be defined"
7703 #                       endif
7704                         static void routine(void *a) { a = 0; }
7705                         static void *start_routine(void *a) { return a; }
7706 int
7707 main ()
7708 {
7709 pthread_t th; pthread_attr_t attr;
7710                         pthread_create(&th, 0, start_routine, 0);
7711                         pthread_join(th, 0);
7712                         pthread_attr_init(&attr);
7713                         pthread_cleanup_push(routine, 0);
7714                         pthread_cleanup_pop(0) /* ; */
7715   ;
7716   return 0;
7717 }
7718 _ACEOF
7719 if ac_fn_c_try_link "$LINENO"; then :
7720   ax_pthread_ok=yes
7721 fi
7722 rm -f core conftest.err conftest.$ac_objext \
7723     conftest$ac_exeext conftest.$ac_ext
7724
7725         CFLAGS="$ax_pthread_save_CFLAGS"
7726         LIBS="$ax_pthread_save_LIBS"
7727
7728         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7729 $as_echo "$ax_pthread_ok" >&6; }
7730         if test "x$ax_pthread_ok" = "xyes"; then :
7731   break
7732 fi
7733
7734         PTHREAD_LIBS=""
7735         PTHREAD_CFLAGS=""
7736 done
7737 fi
7738
7739 # Various other checks:
7740 if test "x$ax_pthread_ok" = "xyes"; then
7741         ax_pthread_save_CFLAGS="$CFLAGS"
7742         ax_pthread_save_LIBS="$LIBS"
7743         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7744         LIBS="$PTHREAD_LIBS $LIBS"
7745
7746         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
7747         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
7748 $as_echo_n "checking for joinable pthread attribute... " >&6; }
7749 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
7750   $as_echo_n "(cached) " >&6
7751 else
7752   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
7753              for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
7754                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7755 /* end confdefs.h.  */
7756 #include <pthread.h>
7757 int
7758 main ()
7759 {
7760 int attr = $ax_pthread_attr; return attr /* ; */
7761   ;
7762   return 0;
7763 }
7764 _ACEOF
7765 if ac_fn_c_try_link "$LINENO"; then :
7766   ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
7767 fi
7768 rm -f core conftest.err conftest.$ac_objext \
7769     conftest$ac_exeext conftest.$ac_ext
7770              done
7771
7772 fi
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
7774 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
7775         if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
7776                test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
7777                test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
7778
7779 cat >>confdefs.h <<_ACEOF
7780 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
7781 _ACEOF
7782
7783                ax_pthread_joinable_attr_defined=yes
7784
7785 fi
7786
7787         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
7788 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
7789 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
7790   $as_echo_n "(cached) " >&6
7791 else
7792   ax_cv_PTHREAD_SPECIAL_FLAGS=no
7793              case $host_os in
7794              solaris*)
7795              ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
7796              ;;
7797              esac
7798
7799 fi
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
7801 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
7802         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
7803                test "x$ax_pthread_special_flags_added" != "xyes"; then :
7804   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
7805                ax_pthread_special_flags_added=yes
7806 fi
7807
7808         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
7809 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
7810 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
7811   $as_echo_n "(cached) " >&6
7812 else
7813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7814 /* end confdefs.h.  */
7815 #include <pthread.h>
7816 int
7817 main ()
7818 {
7819 int i = PTHREAD_PRIO_INHERIT;
7820   ;
7821   return 0;
7822 }
7823 _ACEOF
7824 if ac_fn_c_try_link "$LINENO"; then :
7825   ax_cv_PTHREAD_PRIO_INHERIT=yes
7826 else
7827   ax_cv_PTHREAD_PRIO_INHERIT=no
7828 fi
7829 rm -f core conftest.err conftest.$ac_objext \
7830     conftest$ac_exeext conftest.$ac_ext
7831
7832 fi
7833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
7834 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
7835         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
7836                test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
7837
7838 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
7839
7840                ax_pthread_prio_inherit_defined=yes
7841
7842 fi
7843
7844         CFLAGS="$ax_pthread_save_CFLAGS"
7845         LIBS="$ax_pthread_save_LIBS"
7846
7847         # More AIX lossage: compile with *_r variant
7848         if test "x$GCC" != "xyes"; then
7849             case $host_os in
7850                 aix*)
7851                 case "x/$CC" in #(
7852   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
7853     #handle absolute path differently from PATH based program lookup
7854                      case "x$CC" in #(
7855   x/*) :
7856     if as_fn_executable_p ${CC}_r; then :
7857   PTHREAD_CC="${CC}_r"
7858 fi ;; #(
7859   *) :
7860     for ac_prog in ${CC}_r
7861 do
7862   # Extract the first word of "$ac_prog", so it can be a program name with args.
7863 set dummy $ac_prog; ac_word=$2
7864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7865 $as_echo_n "checking for $ac_word... " >&6; }
7866 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
7867   $as_echo_n "(cached) " >&6
7868 else
7869   if test -n "$PTHREAD_CC"; then
7870   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
7871 else
7872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7873 for as_dir in $PATH
7874 do
7875   IFS=$as_save_IFS
7876   test -z "$as_dir" && as_dir=.
7877     for ac_exec_ext in '' $ac_executable_extensions; do
7878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7879     ac_cv_prog_PTHREAD_CC="$ac_prog"
7880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7881     break 2
7882   fi
7883 done
7884   done
7885 IFS=$as_save_IFS
7886
7887 fi
7888 fi
7889 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
7890 if test -n "$PTHREAD_CC"; then
7891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
7892 $as_echo "$PTHREAD_CC" >&6; }
7893 else
7894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7895 $as_echo "no" >&6; }
7896 fi
7897
7898
7899   test -n "$PTHREAD_CC" && break
7900 done
7901 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
7902  ;;
7903 esac ;; #(
7904   *) :
7905      ;;
7906 esac
7907                 ;;
7908             esac
7909         fi
7910 fi
7911
7912 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
7913
7914
7915
7916
7917
7918 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
7919 if test "x$ax_pthread_ok" = "xyes"; then
7920         threads=yes
7921         :
7922 else
7923         ax_pthread_ok=no
7924         threads=no
7925 fi
7926 ac_ext=cpp
7927 ac_cpp='$CXXCPP $CPPFLAGS'
7928 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7929 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7930 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7931
7932
7933   save_LIBS="$LIBS"
7934   LIBS="$PTHREAD_LIBS $LIBS"
7935   save_CXXFLAGS="$CXXFLAGS"
7936   CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
7937   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
7938 $as_echo_n "checking for std::thread... " >&6; }
7939 if ${gdb_cv_cxx_std_thread+:} false; then :
7940   $as_echo_n "(cached) " >&6
7941 else
7942   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7943 /* end confdefs.h.  */
7944 #include <thread>
7945     void callback() { }
7946 int
7947 main ()
7948 {
7949 std::thread t(callback);
7950   ;
7951   return 0;
7952 }
7953 _ACEOF
7954 if ac_fn_cxx_try_compile "$LINENO"; then :
7955   gdb_cv_cxx_std_thread=yes
7956 else
7957   gdb_cv_cxx_std_thread=no
7958 fi
7959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7960 fi
7961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
7962 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
7963
7964   if test "$threads" = "yes"; then
7965     # This check must be here, while LIBS includes any necessary
7966     # threading library.
7967     for ac_func in pthread_sigmask pthread_setname_np
7968 do :
7969   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7970 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
7971 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7972   cat >>confdefs.h <<_ACEOF
7973 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7974 _ACEOF
7975
7976 fi
7977 done
7978
7979   fi
7980   LIBS="$save_LIBS"
7981   CXXFLAGS="$save_CXXFLAGS"
7982
7983   if test "$want_threading" = "yes"; then
7984     if test "$gdb_cv_cxx_std_thread" = "yes"; then
7985
7986 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
7987
7988     fi
7989   fi
7990   ac_ext=c
7991 ac_cpp='$CPP $CPPFLAGS'
7992 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7993 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7994 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7995
7996
7997       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
7998 $as_echo_n "checking for sigsetjmp... " >&6; }
7999 if ${gdb_cv_func_sigsetjmp+:} false; then :
8000   $as_echo_n "(cached) " >&6
8001 else
8002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8003 /* end confdefs.h.  */
8004 #include <setjmp.h>
8005 int
8006 main ()
8007 {
8008 sigjmp_buf env;
8009            while (! sigsetjmp (env, 1))
8010              siglongjmp (env, 1);
8011
8012   ;
8013   return 0;
8014 }
8015 _ACEOF
8016 if ac_fn_c_try_compile "$LINENO"; then :
8017   gdb_cv_func_sigsetjmp=yes
8018 else
8019   gdb_cv_func_sigsetjmp=no
8020
8021 fi
8022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8023
8024 fi
8025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
8026 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
8027   if test "$gdb_cv_func_sigsetjmp" = "yes"; then
8028
8029 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
8030
8031   fi
8032
8033
8034 # Check whether --with-intel_pt was given.
8035 if test "${with_intel_pt+set}" = set; then :
8036   withval=$with_intel_pt;
8037 else
8038   with_intel_pt=auto
8039 fi
8040
8041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
8042 $as_echo_n "checking whether to use intel pt... " >&6; }
8043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
8044 $as_echo "$with_intel_pt" >&6; }
8045
8046   if test "${with_intel_pt}" = no; then
8047     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
8048 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
8049     HAVE_LIBIPT=no
8050   else
8051     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8052 /* end confdefs.h.  */
8053
8054   #include <linux/perf_event.h>
8055   #ifndef PERF_ATTR_SIZE_VER5
8056   # error
8057   #endif
8058
8059 _ACEOF
8060 if ac_fn_c_try_cpp "$LINENO"; then :
8061   perf_event=yes
8062 else
8063   perf_event=no
8064 fi
8065 rm -f conftest.err conftest.i conftest.$ac_ext
8066     if test "$perf_event" != yes; then
8067       if test "$with_intel_pt" = yes; then
8068         as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
8069       else
8070         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
8071 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
8072       fi
8073     fi
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083     use_additional=yes
8084
8085   acl_save_prefix="$prefix"
8086   prefix="$acl_final_prefix"
8087   acl_save_exec_prefix="$exec_prefix"
8088   exec_prefix="$acl_final_exec_prefix"
8089
8090     eval additional_includedir=\"$includedir\"
8091     eval additional_libdir=\"$libdir\"
8092
8093   exec_prefix="$acl_save_exec_prefix"
8094   prefix="$acl_save_prefix"
8095
8096
8097 # Check whether --with-libipt-prefix was given.
8098 if test "${with_libipt_prefix+set}" = set; then :
8099   withval=$with_libipt_prefix;
8100     if test "X$withval" = "Xno"; then
8101       use_additional=no
8102     else
8103       if test "X$withval" = "X"; then
8104
8105   acl_save_prefix="$prefix"
8106   prefix="$acl_final_prefix"
8107   acl_save_exec_prefix="$exec_prefix"
8108   exec_prefix="$acl_final_exec_prefix"
8109
8110           eval additional_includedir=\"$includedir\"
8111           eval additional_libdir=\"$libdir\"
8112
8113   exec_prefix="$acl_save_exec_prefix"
8114   prefix="$acl_save_prefix"
8115
8116       else
8117         additional_includedir="$withval/include"
8118         additional_libdir="$withval/lib"
8119       fi
8120     fi
8121
8122 fi
8123
8124
8125 # Check whether --with-libipt-type was given.
8126 if test "${with_libipt_type+set}" = set; then :
8127   withval=$with_libipt_type;  with_libipt_type=$withval
8128 else
8129    with_libipt_type=auto
8130 fi
8131
8132   lib_type=`eval echo \$with_libipt_type`
8133
8134       LIBIPT=
8135   LTLIBIPT=
8136   INCIPT=
8137   rpathdirs=
8138   ltrpathdirs=
8139   names_already_handled=
8140   names_next_round='ipt '
8141   while test -n "$names_next_round"; do
8142     names_this_round="$names_next_round"
8143     names_next_round=
8144     for name in $names_this_round; do
8145       already_handled=
8146       for n in $names_already_handled; do
8147         if test "$n" = "$name"; then
8148           already_handled=yes
8149           break
8150         fi
8151       done
8152       if test -z "$already_handled"; then
8153         names_already_handled="$names_already_handled $name"
8154                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8155         eval value=\"\$HAVE_LIB$uppername\"
8156         if test -n "$value"; then
8157           if test "$value" = yes; then
8158             eval value=\"\$LIB$uppername\"
8159             test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
8160             eval value=\"\$LTLIB$uppername\"
8161             test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
8162           else
8163                                     :
8164           fi
8165         else
8166                               found_dir=
8167           found_la=
8168           found_so=
8169           found_a=
8170           if test $use_additional = yes; then
8171             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8172               found_dir="$additional_libdir"
8173               found_so="$additional_libdir/lib$name.$shlibext"
8174               if test -f "$additional_libdir/lib$name.la"; then
8175                 found_la="$additional_libdir/lib$name.la"
8176               fi
8177             elif test x$lib_type != xshared; then
8178               if test -f "$additional_libdir/lib$name.$libext"; then
8179                 found_dir="$additional_libdir"
8180                 found_a="$additional_libdir/lib$name.$libext"
8181                 if test -f "$additional_libdir/lib$name.la"; then
8182                   found_la="$additional_libdir/lib$name.la"
8183                 fi
8184               fi
8185             fi
8186           fi
8187           if test "X$found_dir" = "X"; then
8188             for x in $LDFLAGS $LTLIBIPT; do
8189
8190   acl_save_prefix="$prefix"
8191   prefix="$acl_final_prefix"
8192   acl_save_exec_prefix="$exec_prefix"
8193   exec_prefix="$acl_final_exec_prefix"
8194   eval x=\"$x\"
8195   exec_prefix="$acl_save_exec_prefix"
8196   prefix="$acl_save_prefix"
8197
8198               case "$x" in
8199                 -L*)
8200                   dir=`echo "X$x" | sed -e 's/^X-L//'`
8201                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8202                     found_dir="$dir"
8203                     found_so="$dir/lib$name.$shlibext"
8204                     if test -f "$dir/lib$name.la"; then
8205                       found_la="$dir/lib$name.la"
8206                     fi
8207                   elif test x$lib_type != xshared; then
8208                     if test -f "$dir/lib$name.$libext"; then
8209                       found_dir="$dir"
8210                       found_a="$dir/lib$name.$libext"
8211                       if test -f "$dir/lib$name.la"; then
8212                         found_la="$dir/lib$name.la"
8213                       fi
8214                     fi
8215                   fi
8216                   ;;
8217               esac
8218               if test "X$found_dir" != "X"; then
8219                 break
8220               fi
8221             done
8222           fi
8223           if test "X$found_dir" != "X"; then
8224                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
8225             if test "X$found_so" != "X"; then
8226                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8227                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8228               else
8229                                                                                 haveit=
8230                 for x in $ltrpathdirs; do
8231                   if test "X$x" = "X$found_dir"; then
8232                     haveit=yes
8233                     break
8234                   fi
8235                 done
8236                 if test -z "$haveit"; then
8237                   ltrpathdirs="$ltrpathdirs $found_dir"
8238                 fi
8239                                 if test "$hardcode_direct" = yes; then
8240                                                       LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8241                 else
8242                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8243                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8244                                                             haveit=
8245                     for x in $rpathdirs; do
8246                       if test "X$x" = "X$found_dir"; then
8247                         haveit=yes
8248                         break
8249                       fi
8250                     done
8251                     if test -z "$haveit"; then
8252                       rpathdirs="$rpathdirs $found_dir"
8253                     fi
8254                   else
8255                                                                                 haveit=
8256                     for x in $LDFLAGS $LIBIPT; do
8257
8258   acl_save_prefix="$prefix"
8259   prefix="$acl_final_prefix"
8260   acl_save_exec_prefix="$exec_prefix"
8261   exec_prefix="$acl_final_exec_prefix"
8262   eval x=\"$x\"
8263   exec_prefix="$acl_save_exec_prefix"
8264   prefix="$acl_save_prefix"
8265
8266                       if test "X$x" = "X-L$found_dir"; then
8267                         haveit=yes
8268                         break
8269                       fi
8270                     done
8271                     if test -z "$haveit"; then
8272                       LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
8273                     fi
8274                     if test "$hardcode_minus_L" != no; then
8275                                                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8276                     else
8277                                                                                                                                                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
8278                     fi
8279                   fi
8280                 fi
8281               fi
8282             else
8283               if test "X$found_a" != "X"; then
8284                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
8285               else
8286                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
8287               fi
8288             fi
8289                         additional_includedir=
8290             case "$found_dir" in
8291               */lib | */lib/)
8292                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8293                 additional_includedir="$basedir/include"
8294                 ;;
8295             esac
8296             if test "X$additional_includedir" != "X"; then
8297                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
8298                 haveit=
8299                 if test "X$additional_includedir" = "X/usr/local/include"; then
8300                   if test -n "$GCC"; then
8301                     case $host_os in
8302                       linux*) haveit=yes;;
8303                     esac
8304                   fi
8305                 fi
8306                 if test -z "$haveit"; then
8307                   for x in $CPPFLAGS $INCIPT; do
8308
8309   acl_save_prefix="$prefix"
8310   prefix="$acl_final_prefix"
8311   acl_save_exec_prefix="$exec_prefix"
8312   exec_prefix="$acl_final_exec_prefix"
8313   eval x=\"$x\"
8314   exec_prefix="$acl_save_exec_prefix"
8315   prefix="$acl_save_prefix"
8316
8317                     if test "X$x" = "X-I$additional_includedir"; then
8318                       haveit=yes
8319                       break
8320                     fi
8321                   done
8322                   if test -z "$haveit"; then
8323                     if test -d "$additional_includedir"; then
8324                                             INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
8325                     fi
8326                   fi
8327                 fi
8328               fi
8329             fi
8330                         if test -n "$found_la"; then
8331                                                         save_libdir="$libdir"
8332               case "$found_la" in
8333                 */* | *\\*) . "$found_la" ;;
8334                 *) . "./$found_la" ;;
8335               esac
8336               libdir="$save_libdir"
8337                             for dep in $dependency_libs; do
8338                 case "$dep" in
8339                   -L*)
8340                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8341                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
8342                       haveit=
8343                       if test "X$additional_libdir" = "X/usr/local/lib"; then
8344                         if test -n "$GCC"; then
8345                           case $host_os in
8346                             linux*) haveit=yes;;
8347                           esac
8348                         fi
8349                       fi
8350                       if test -z "$haveit"; then
8351                         haveit=
8352                         for x in $LDFLAGS $LIBIPT; do
8353
8354   acl_save_prefix="$prefix"
8355   prefix="$acl_final_prefix"
8356   acl_save_exec_prefix="$exec_prefix"
8357   exec_prefix="$acl_final_exec_prefix"
8358   eval x=\"$x\"
8359   exec_prefix="$acl_save_exec_prefix"
8360   prefix="$acl_save_prefix"
8361
8362                           if test "X$x" = "X-L$additional_libdir"; then
8363                             haveit=yes
8364                             break
8365                           fi
8366                         done
8367                         if test -z "$haveit"; then
8368                           if test -d "$additional_libdir"; then
8369                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
8370                           fi
8371                         fi
8372                         haveit=
8373                         for x in $LDFLAGS $LTLIBIPT; do
8374
8375   acl_save_prefix="$prefix"
8376   prefix="$acl_final_prefix"
8377   acl_save_exec_prefix="$exec_prefix"
8378   exec_prefix="$acl_final_exec_prefix"
8379   eval x=\"$x\"
8380   exec_prefix="$acl_save_exec_prefix"
8381   prefix="$acl_save_prefix"
8382
8383                           if test "X$x" = "X-L$additional_libdir"; then
8384                             haveit=yes
8385                             break
8386                           fi
8387                         done
8388                         if test -z "$haveit"; then
8389                           if test -d "$additional_libdir"; then
8390                                                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
8391                           fi
8392                         fi
8393                       fi
8394                     fi
8395                     ;;
8396                   -R*)
8397                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
8398                     if test "$enable_rpath" != no; then
8399                                                                   haveit=
8400                       for x in $rpathdirs; do
8401                         if test "X$x" = "X$dir"; then
8402                           haveit=yes
8403                           break
8404                         fi
8405                       done
8406                       if test -z "$haveit"; then
8407                         rpathdirs="$rpathdirs $dir"
8408                       fi
8409                                                                   haveit=
8410                       for x in $ltrpathdirs; do
8411                         if test "X$x" = "X$dir"; then
8412                           haveit=yes
8413                           break
8414                         fi
8415                       done
8416                       if test -z "$haveit"; then
8417                         ltrpathdirs="$ltrpathdirs $dir"
8418                       fi
8419                     fi
8420                     ;;
8421                   -l*)
8422                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8423                     ;;
8424                   *.la)
8425                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8426                     ;;
8427                   *)
8428                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
8429                     LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
8430                     ;;
8431                 esac
8432               done
8433             fi
8434           else
8435                                                             if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8436               LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
8437               LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
8438             else
8439               LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
8440               LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
8441             fi
8442           fi
8443         fi
8444       fi
8445     done
8446   done
8447   if test "X$rpathdirs" != "X"; then
8448     if test -n "$hardcode_libdir_separator"; then
8449                         alldirs=
8450       for found_dir in $rpathdirs; do
8451         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8452       done
8453             acl_save_libdir="$libdir"
8454       libdir="$alldirs"
8455       eval flag=\"$hardcode_libdir_flag_spec\"
8456       libdir="$acl_save_libdir"
8457       LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
8458     else
8459             for found_dir in $rpathdirs; do
8460         acl_save_libdir="$libdir"
8461         libdir="$found_dir"
8462         eval flag=\"$hardcode_libdir_flag_spec\"
8463         libdir="$acl_save_libdir"
8464         LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
8465       done
8466     fi
8467   fi
8468   if test "X$ltrpathdirs" != "X"; then
8469             for found_dir in $ltrpathdirs; do
8470       LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
8471     done
8472   fi
8473
8474
8475         ac_save_CPPFLAGS="$CPPFLAGS"
8476
8477   for element in $INCIPT; do
8478     haveit=
8479     for x in $CPPFLAGS; do
8480
8481   acl_save_prefix="$prefix"
8482   prefix="$acl_final_prefix"
8483   acl_save_exec_prefix="$exec_prefix"
8484   exec_prefix="$acl_final_exec_prefix"
8485   eval x=\"$x\"
8486   exec_prefix="$acl_save_exec_prefix"
8487   prefix="$acl_save_prefix"
8488
8489       if test "X$x" = "X$element"; then
8490         haveit=yes
8491         break
8492       fi
8493     done
8494     if test -z "$haveit"; then
8495       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8496     fi
8497   done
8498
8499
8500   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
8501 $as_echo_n "checking for libipt... " >&6; }
8502 if ${ac_cv_libipt+:} false; then :
8503   $as_echo_n "(cached) " >&6
8504 else
8505
8506     ac_save_LIBS="$LIBS"
8507     LIBS="$LIBS $LIBIPT"
8508     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8509 /* end confdefs.h.  */
8510 #include "intel-pt.h"
8511 int
8512 main ()
8513 {
8514 pt_insn_alloc_decoder (0);
8515   ;
8516   return 0;
8517 }
8518 _ACEOF
8519 if ac_fn_c_try_link "$LINENO"; then :
8520   ac_cv_libipt=yes
8521 else
8522   ac_cv_libipt=no
8523 fi
8524 rm -f core conftest.err conftest.$ac_objext \
8525     conftest$ac_exeext conftest.$ac_ext
8526     LIBS="$ac_save_LIBS"
8527
8528 fi
8529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
8530 $as_echo "$ac_cv_libipt" >&6; }
8531   if test "$ac_cv_libipt" = yes; then
8532     HAVE_LIBIPT=yes
8533
8534 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
8535
8536     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
8537 $as_echo_n "checking how to link with libipt... " >&6; }
8538     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
8539 $as_echo "$LIBIPT" >&6; }
8540   else
8541     HAVE_LIBIPT=no
8542             CPPFLAGS="$ac_save_CPPFLAGS"
8543     LIBIPT=
8544     LTLIBIPT=
8545   fi
8546
8547
8548
8549
8550
8551
8552     if test "$HAVE_LIBIPT" != yes; then
8553       if test "$with_intel_pt" = yes; then
8554         as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
8555       else
8556         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
8557 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
8558       fi
8559     else
8560       save_LIBS=$LIBS
8561       LIBS="$LIBS $LIBIPT"
8562       for ac_func in pt_insn_event
8563 do :
8564   ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
8565 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
8566   cat >>confdefs.h <<_ACEOF
8567 #define HAVE_PT_INSN_EVENT 1
8568 _ACEOF
8569
8570 fi
8571 done
8572
8573       ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
8574 "
8575 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
8576
8577 cat >>confdefs.h <<_ACEOF
8578 #define HAVE_STRUCT_PT_INSN_ENABLED 1
8579 _ACEOF
8580
8581
8582 fi
8583 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
8584 "
8585 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
8586
8587 cat >>confdefs.h <<_ACEOF
8588 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
8589 _ACEOF
8590
8591
8592 fi
8593
8594       LIBS=$save_LIBS
8595     fi
8596   fi
8597
8598   # Check if the compiler and runtime support printing long longs.
8599
8600   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
8601 $as_echo_n "checking for long long support in printf... " >&6; }
8602 if ${gdb_cv_printf_has_long_long+:} false; then :
8603   $as_echo_n "(cached) " >&6
8604 else
8605   if test "$cross_compiling" = yes; then :
8606   gdb_cv_printf_has_long_long=no
8607 else
8608   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8609 /* end confdefs.h.  */
8610 $ac_includes_default
8611 int
8612 main ()
8613 {
8614 char buf[32];
8615     long long l = 0;
8616     l = (l << 16) + 0x0123;
8617     l = (l << 16) + 0x4567;
8618     l = (l << 16) + 0x89ab;
8619     l = (l << 16) + 0xcdef;
8620     sprintf (buf, "0x%016llx", l);
8621     return (strcmp ("0x0123456789abcdef", buf));
8622   ;
8623   return 0;
8624 }
8625 _ACEOF
8626 if ac_fn_c_try_run "$LINENO"; then :
8627   gdb_cv_printf_has_long_long=yes
8628 else
8629   gdb_cv_printf_has_long_long=no
8630 fi
8631 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8632   conftest.$ac_objext conftest.beam conftest.$ac_ext
8633 fi
8634
8635 fi
8636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
8637 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
8638   if test "$gdb_cv_printf_has_long_long" = yes; then
8639
8640 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
8641
8642   fi
8643
8644
8645 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
8646
8647  for ac_header in sys/procfs.h
8648 do :
8649   ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
8650 if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
8651   cat >>confdefs.h <<_ACEOF
8652 #define HAVE_SYS_PROCFS_H 1
8653 _ACEOF
8654
8655 fi
8656
8657 done
8658
8659   if test "$ac_cv_header_sys_procfs_h" = yes; then
8660
8661  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
8662 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
8663  if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
8664   $as_echo_n "(cached) " >&6
8665 else
8666   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8667 /* end confdefs.h.  */
8668
8669 #define _SYSCALL32
8670 #include <sys/procfs.h>
8671 int
8672 main ()
8673 {
8674 gregset_t avar
8675   ;
8676   return 0;
8677 }
8678 _ACEOF
8679 if ac_fn_c_try_compile "$LINENO"; then :
8680   bfd_cv_have_sys_procfs_type_gregset_t=yes
8681 else
8682   bfd_cv_have_sys_procfs_type_gregset_t=no
8683
8684 fi
8685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8686 fi
8687
8688  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
8689
8690 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
8691
8692  fi
8693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
8694 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
8695
8696
8697  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
8698 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
8699  if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
8700   $as_echo_n "(cached) " >&6
8701 else
8702   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8703 /* end confdefs.h.  */
8704
8705 #define _SYSCALL32
8706 #include <sys/procfs.h>
8707 int
8708 main ()
8709 {
8710 fpregset_t avar
8711   ;
8712   return 0;
8713 }
8714 _ACEOF
8715 if ac_fn_c_try_compile "$LINENO"; then :
8716   bfd_cv_have_sys_procfs_type_fpregset_t=yes
8717 else
8718   bfd_cv_have_sys_procfs_type_fpregset_t=no
8719
8720 fi
8721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8722 fi
8723
8724  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8725
8726 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
8727
8728  fi
8729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
8730 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
8731
8732
8733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
8734 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
8735  if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
8736   $as_echo_n "(cached) " >&6
8737 else
8738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8739 /* end confdefs.h.  */
8740
8741 #define _SYSCALL32
8742 #include <sys/procfs.h>
8743 int
8744 main ()
8745 {
8746 prgregset_t avar
8747   ;
8748   return 0;
8749 }
8750 _ACEOF
8751 if ac_fn_c_try_compile "$LINENO"; then :
8752   bfd_cv_have_sys_procfs_type_prgregset_t=yes
8753 else
8754   bfd_cv_have_sys_procfs_type_prgregset_t=no
8755
8756 fi
8757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8758 fi
8759
8760  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8761
8762 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
8763
8764  fi
8765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
8766 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
8767
8768
8769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
8770 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
8771  if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
8772   $as_echo_n "(cached) " >&6
8773 else
8774   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8775 /* end confdefs.h.  */
8776
8777 #define _SYSCALL32
8778 #include <sys/procfs.h>
8779 int
8780 main ()
8781 {
8782 prfpregset_t avar
8783   ;
8784   return 0;
8785 }
8786 _ACEOF
8787 if ac_fn_c_try_compile "$LINENO"; then :
8788   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
8789 else
8790   bfd_cv_have_sys_procfs_type_prfpregset_t=no
8791
8792 fi
8793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8794 fi
8795
8796  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8797
8798 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
8799
8800  fi
8801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
8802 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
8803
8804
8805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
8806 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
8807  if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
8808   $as_echo_n "(cached) " >&6
8809 else
8810   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8811 /* end confdefs.h.  */
8812
8813 #define _SYSCALL32
8814 #include <sys/procfs.h>
8815 int
8816 main ()
8817 {
8818 prgregset32_t avar
8819   ;
8820   return 0;
8821 }
8822 _ACEOF
8823 if ac_fn_c_try_compile "$LINENO"; then :
8824   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
8825 else
8826   bfd_cv_have_sys_procfs_type_prgregset32_t=no
8827
8828 fi
8829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8830 fi
8831
8832  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8833
8834 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
8835
8836  fi
8837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
8838 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
8839
8840
8841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
8842 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
8843  if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
8844   $as_echo_n "(cached) " >&6
8845 else
8846   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8847 /* end confdefs.h.  */
8848
8849 #define _SYSCALL32
8850 #include <sys/procfs.h>
8851 int
8852 main ()
8853 {
8854 lwpid_t avar
8855   ;
8856   return 0;
8857 }
8858 _ACEOF
8859 if ac_fn_c_try_compile "$LINENO"; then :
8860   bfd_cv_have_sys_procfs_type_lwpid_t=yes
8861 else
8862   bfd_cv_have_sys_procfs_type_lwpid_t=no
8863
8864 fi
8865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8866 fi
8867
8868  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8869
8870 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
8871
8872  fi
8873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
8874 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
8875
8876
8877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
8878 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
8879  if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
8880   $as_echo_n "(cached) " >&6
8881 else
8882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8883 /* end confdefs.h.  */
8884
8885 #define _SYSCALL32
8886 #include <sys/procfs.h>
8887 int
8888 main ()
8889 {
8890 psaddr_t avar
8891   ;
8892   return 0;
8893 }
8894 _ACEOF
8895 if ac_fn_c_try_compile "$LINENO"; then :
8896   bfd_cv_have_sys_procfs_type_psaddr_t=yes
8897 else
8898   bfd_cv_have_sys_procfs_type_psaddr_t=no
8899
8900 fi
8901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8902 fi
8903
8904  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8905
8906 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
8907
8908  fi
8909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
8910 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
8911
8912
8913  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
8914 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
8915  if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
8916   $as_echo_n "(cached) " >&6
8917 else
8918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8919 /* end confdefs.h.  */
8920
8921 #define _SYSCALL32
8922 #include <sys/procfs.h>
8923 int
8924 main ()
8925 {
8926 elf_fpregset_t avar
8927   ;
8928   return 0;
8929 }
8930 _ACEOF
8931 if ac_fn_c_try_compile "$LINENO"; then :
8932   bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
8933 else
8934   bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
8935
8936 fi
8937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8938 fi
8939
8940  if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
8941
8942 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
8943
8944  fi
8945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
8946 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
8947
8948   fi
8949
8950 # This is set by GDB_AC_COMMON.
8951
8952
8953
8954 # Check whether we will enable the inclusion of unit tests when
8955 # compiling GDB.
8956 #
8957 # The default value of this option changes depending whether we're on
8958 # development mode (in which case it's "true") or not (in which case
8959 # it's "false").  The $development variable is set by the GDB_AC_COMMON
8960 # macro, which must therefore be used before GDB_AC_SELFTEST.
8961
8962 if test "x$development" != xtrue && test "x$development" != xfalse; then :
8963   as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
8964 fi
8965
8966 # Check whether --enable-unit-tests was given.
8967 if test "${enable_unit_tests+set}" = set; then :
8968   enableval=$enable_unit_tests; case "${enableval}" in
8969   yes)  enable_unittests=true  ;;
8970   no)   enable_unittests=false ;;
8971   *)    as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
8972 esac
8973 else
8974   enable_unittests=$development
8975 fi
8976
8977
8978 if $enable_unittests; then
8979
8980 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
8981
8982
8983 fi
8984
8985
8986  case ${build_alias} in
8987   "") build_noncanonical=${build} ;;
8988   *) build_noncanonical=${build_alias} ;;
8989 esac
8990
8991  case ${host_alias} in
8992   "") host_noncanonical=${build_noncanonical} ;;
8993   *) host_noncanonical=${host_alias} ;;
8994 esac
8995
8996  case ${target_alias} in
8997   "") target_noncanonical=${host_noncanonical} ;;
8998   *) target_noncanonical=${target_alias} ;;
8999 esac
9000
9001
9002
9003
9004
9005
9006 # Dependency checking.
9007 rm -rf .tst 2>/dev/null
9008 mkdir .tst 2>/dev/null
9009 if test -d .tst; then
9010   am__leading_dot=.
9011 else
9012   am__leading_dot=_
9013 fi
9014 rmdir .tst 2>/dev/null
9015
9016 DEPDIR="${am__leading_dot}deps"
9017
9018 ac_config_commands="$ac_config_commands depdir"
9019
9020
9021
9022 # If we haven't got the data from the intl directory,
9023 # assume NLS is disabled.
9024 USE_NLS=no
9025 LIBINTL=
9026 LIBINTL_DEP=
9027 INCINTL=
9028 XGETTEXT=
9029 GMSGFMT=
9030 POSUB=
9031
9032 if test -f  ../intl/config.intl; then
9033   .  ../intl/config.intl
9034 fi
9035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
9036 $as_echo_n "checking whether NLS is requested... " >&6; }
9037 if test x"$USE_NLS" != xyes; then
9038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9039 $as_echo "no" >&6; }
9040 else
9041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9042 $as_echo "yes" >&6; }
9043
9044 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
9045
9046
9047   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
9048 $as_echo_n "checking for catalogs to be installed... " >&6; }
9049   # Look for .po and .gmo files in the source directory.
9050   CATALOGS=
9051   XLINGUAS=
9052   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
9053     # If there aren't any .gmo files the shell will give us the
9054     # literal string "../path/to/srcdir/po/*.gmo" which has to be
9055     # weeded out.
9056     case "$cat" in *\**)
9057       continue;;
9058     esac
9059     # The quadruple backslash is collapsed to a double backslash
9060     # by the backticks, then collapsed again by the double quotes,
9061     # leaving us with one backslash in the sed expression (right
9062     # before the dot that mustn't act as a wildcard).
9063     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
9064     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
9065     # The user is allowed to set LINGUAS to a list of languages to
9066     # install catalogs for.  If it's empty that means "all of them."
9067     if test "x$LINGUAS" = x; then
9068       CATALOGS="$CATALOGS $cat"
9069       XLINGUAS="$XLINGUAS $lang"
9070     else
9071       case "$LINGUAS" in *$lang*)
9072         CATALOGS="$CATALOGS $cat"
9073         XLINGUAS="$XLINGUAS $lang"
9074         ;;
9075       esac
9076     fi
9077   done
9078   LINGUAS="$XLINGUAS"
9079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
9080 $as_echo "$LINGUAS" >&6; }
9081
9082
9083     DATADIRNAME=share
9084
9085   INSTOBJEXT=.mo
9086
9087   GENCAT=gencat
9088
9089   CATOBJEXT=.gmo
9090
9091 fi
9092
9093 # Create sub-directories for objects and dependencies.
9094 CONFIG_SRC_SUBDIR="arch gdbsupport nat target"
9095
9096
9097 ac_config_commands="$ac_config_commands gdbdepdir"
9098
9099
9100 depcc="$CC"   am_compiler_list=
9101
9102 am_depcomp=$ac_aux_dir/depcomp
9103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
9104 $as_echo_n "checking dependency style of $depcc... " >&6; }
9105 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
9106   $as_echo_n "(cached) " >&6
9107 else
9108   if test -f "$am_depcomp"; then
9109   # We make a subdir and do the tests there.  Otherwise we can end up
9110   # making bogus files that we don't know about and never remove.  For
9111   # instance it was reported that on HP-UX the gcc test will end up
9112   # making a dummy file named `D' -- because `-MD' means `put the output
9113   # in D'.
9114   mkdir conftest.dir
9115   # Copy depcomp to subdir because otherwise we won't find it if we're
9116   # using a relative directory.
9117   cp "$am_depcomp" conftest.dir
9118   cd conftest.dir
9119   # We will build objects and dependencies in a subdirectory because
9120   # it helps to detect inapplicable dependency modes.  For instance
9121   # both Tru64's cc and ICC support -MD to output dependencies as a
9122   # side effect of compilation, but ICC will put the dependencies in
9123   # the current directory while Tru64 will put them in the object
9124   # directory.
9125   mkdir sub
9126
9127   am_cv_CC_dependencies_compiler_type=none
9128   if test "$am_compiler_list" = ""; then
9129      am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
9130   fi
9131   for depmode in $am_compiler_list; do
9132     if test $depmode = none; then break; fi
9133
9134     $as_echo "$as_me:$LINENO: trying $depmode" >&5
9135     # Setup a source with many dependencies, because some compilers
9136     # like to wrap large dependency lists on column 80 (with \), and
9137     # we should not choose a depcomp mode which is confused by this.
9138     #
9139     # We need to recreate these files for each test, as the compiler may
9140     # overwrite some of them when testing with obscure command lines.
9141     # This happens at least with the AIX C compiler.
9142     : > sub/conftest.c
9143     for i in 1 2 3 4 5 6; do
9144       echo '#include "conftst'$i'.h"' >> sub/conftest.c
9145       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9146       # Solaris 8's {/usr,}/bin/sh.
9147       touch sub/conftst$i.h
9148     done
9149     echo "include sub/conftest.Po" > confmf
9150
9151     # We check with `-c' and `-o' for the sake of the "dashmstdout"
9152     # mode.  It turns out that the SunPro C++ compiler does not properly
9153     # handle `-M -o', and we need to detect this.
9154     depcmd="depmode=$depmode \
9155        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
9156        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9157        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
9158     echo "| $depcmd" | sed -e 's/  */ /g' >&5
9159     if env $depcmd > conftest.err 2>&1 &&
9160        grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
9161        grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
9162        ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
9163       # icc doesn't choke on unknown options, it will just issue warnings
9164       # or remarks (even with -Werror).  So we grep stderr for any message
9165       # that says an option was ignored or not supported.
9166       # When given -MP, icc 7.0 and 7.1 complain thusly:
9167       #   icc: Command line warning: ignoring option '-M'; no argument required
9168       # The diagnosis changed in icc 8.0:
9169       #   icc: Command line remark: option '-MP' not supported
9170       if (grep 'ignoring option' conftest.err ||
9171           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9172         am_cv_CC_dependencies_compiler_type=$depmode
9173         $as_echo "$as_me:$LINENO: success" >&5
9174         break
9175       fi
9176     fi
9177     $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
9178     sed -e 's/^/| /' < conftest.err >&5
9179   done
9180
9181   cd ..
9182   rm -rf conftest.dir
9183 else
9184   am_cv_CC_dependencies_compiler_type=none
9185 fi
9186
9187 fi
9188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
9189 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
9190 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
9191 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
9192 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
9193
9194 fi
9195
9196
9197 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
9198 do :
9199   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9200 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9201 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9202   cat >>confdefs.h <<_ACEOF
9203 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9204 _ACEOF
9205
9206 fi
9207
9208 done
9209
9210 for ac_header in vfork.h
9211 do :
9212   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9213 if test "x$ac_cv_header_vfork_h" = xyes; then :
9214   cat >>confdefs.h <<_ACEOF
9215 #define HAVE_VFORK_H 1
9216 _ACEOF
9217
9218 fi
9219
9220 done
9221
9222 for ac_func in fork vfork
9223 do :
9224   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9225 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9226 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9227   cat >>confdefs.h <<_ACEOF
9228 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9229 _ACEOF
9230
9231 fi
9232 done
9233
9234 if test "x$ac_cv_func_fork" = xyes; then
9235   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9236 $as_echo_n "checking for working fork... " >&6; }
9237 if ${ac_cv_func_fork_works+:} false; then :
9238   $as_echo_n "(cached) " >&6
9239 else
9240   if test "$cross_compiling" = yes; then :
9241   ac_cv_func_fork_works=cross
9242 else
9243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9244 /* end confdefs.h.  */
9245 $ac_includes_default
9246 int
9247 main ()
9248 {
9249
9250           /* By Ruediger Kuhlmann. */
9251           return fork () < 0;
9252
9253   ;
9254   return 0;
9255 }
9256 _ACEOF
9257 if ac_fn_c_try_run "$LINENO"; then :
9258   ac_cv_func_fork_works=yes
9259 else
9260   ac_cv_func_fork_works=no
9261 fi
9262 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9263   conftest.$ac_objext conftest.beam conftest.$ac_ext
9264 fi
9265
9266 fi
9267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
9268 $as_echo "$ac_cv_func_fork_works" >&6; }
9269
9270 else
9271   ac_cv_func_fork_works=$ac_cv_func_fork
9272 fi
9273 if test "x$ac_cv_func_fork_works" = xcross; then
9274   case $host in
9275     *-*-amigaos* | *-*-msdosdjgpp*)
9276       # Override, as these systems have only a dummy fork() stub
9277       ac_cv_func_fork_works=no
9278       ;;
9279     *)
9280       ac_cv_func_fork_works=yes
9281       ;;
9282   esac
9283   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
9284 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
9285 fi
9286 ac_cv_func_vfork_works=$ac_cv_func_vfork
9287 if test "x$ac_cv_func_vfork" = xyes; then
9288   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
9289 $as_echo_n "checking for working vfork... " >&6; }
9290 if ${ac_cv_func_vfork_works+:} false; then :
9291   $as_echo_n "(cached) " >&6
9292 else
9293   if test "$cross_compiling" = yes; then :
9294   ac_cv_func_vfork_works=cross
9295 else
9296   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9297 /* end confdefs.h.  */
9298 /* Thanks to Paul Eggert for this test.  */
9299 $ac_includes_default
9300 #include <sys/wait.h>
9301 #ifdef HAVE_VFORK_H
9302 # include <vfork.h>
9303 #endif
9304 /* On some sparc systems, changes by the child to local and incoming
9305    argument registers are propagated back to the parent.  The compiler
9306    is told about this with #include <vfork.h>, but some compilers
9307    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
9308    static variable whose address is put into a register that is
9309    clobbered by the vfork.  */
9310 static void
9311 #ifdef __cplusplus
9312 sparc_address_test (int arg)
9313 # else
9314 sparc_address_test (arg) int arg;
9315 #endif
9316 {
9317   static pid_t child;
9318   if (!child) {
9319     child = vfork ();
9320     if (child < 0) {
9321       perror ("vfork");
9322       _exit(2);
9323     }
9324     if (!child) {
9325       arg = getpid();
9326       write(-1, "", 0);
9327       _exit (arg);
9328     }
9329   }
9330 }
9331
9332 int
9333 main ()
9334 {
9335   pid_t parent = getpid ();
9336   pid_t child;
9337
9338   sparc_address_test (0);
9339
9340   child = vfork ();
9341
9342   if (child == 0) {
9343     /* Here is another test for sparc vfork register problems.  This
9344        test uses lots of local variables, at least as many local
9345        variables as main has allocated so far including compiler
9346        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
9347        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
9348        reuse the register of parent for one of the local variables,
9349        since it will think that parent can't possibly be used any more
9350        in this routine.  Assigning to the local variable will thus
9351        munge parent in the parent process.  */
9352     pid_t
9353       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9354       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9355     /* Convince the compiler that p..p7 are live; otherwise, it might
9356        use the same hardware register for all 8 local variables.  */
9357     if (p != p1 || p != p2 || p != p3 || p != p4
9358         || p != p5 || p != p6 || p != p7)
9359       _exit(1);
9360
9361     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
9362        from child file descriptors.  If the child closes a descriptor
9363        before it execs or exits, this munges the parent's descriptor
9364        as well.  Test for this by closing stdout in the child.  */
9365     _exit(close(fileno(stdout)) != 0);
9366   } else {
9367     int status;
9368     struct stat st;
9369
9370     while (wait(&status) != child)
9371       ;
9372     return (
9373          /* Was there some problem with vforking?  */
9374          child < 0
9375
9376          /* Did the child fail?  (This shouldn't happen.)  */
9377          || status
9378
9379          /* Did the vfork/compiler bug occur?  */
9380          || parent != getpid()
9381
9382          /* Did the file descriptor bug occur?  */
9383          || fstat(fileno(stdout), &st) != 0
9384          );
9385   }
9386 }
9387 _ACEOF
9388 if ac_fn_c_try_run "$LINENO"; then :
9389   ac_cv_func_vfork_works=yes
9390 else
9391   ac_cv_func_vfork_works=no
9392 fi
9393 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9394   conftest.$ac_objext conftest.beam conftest.$ac_ext
9395 fi
9396
9397 fi
9398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
9399 $as_echo "$ac_cv_func_vfork_works" >&6; }
9400
9401 fi;
9402 if test "x$ac_cv_func_fork_works" = xcross; then
9403   ac_cv_func_vfork_works=$ac_cv_func_vfork
9404   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
9405 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
9406 fi
9407
9408 if test "x$ac_cv_func_vfork_works" = xyes; then
9409
9410 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
9411
9412 else
9413
9414 $as_echo "#define vfork fork" >>confdefs.h
9415
9416 fi
9417 if test "x$ac_cv_func_fork_works" = xyes; then
9418
9419 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
9420
9421 fi
9422
9423 for ac_func in pread pwrite pread64
9424 do :
9425   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9426 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9427 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9428   cat >>confdefs.h <<_ACEOF
9429 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9430 _ACEOF
9431
9432 fi
9433 done
9434
9435
9436 # Check the return and argument types of ptrace.
9437
9438
9439 for ac_header in sys/ptrace.h ptrace.h
9440 do :
9441   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9442 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9443 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9444   cat >>confdefs.h <<_ACEOF
9445 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9446 _ACEOF
9447
9448 fi
9449
9450 done
9451
9452
9453 gdb_ptrace_headers='
9454 #include <sys/types.h>
9455 #if HAVE_SYS_PTRACE_H
9456 # include <sys/ptrace.h>
9457 #endif
9458 #if HAVE_UNISTD_H
9459 # include <unistd.h>
9460 #endif
9461 '
9462
9463 # Check return type.  Varargs (used on GNU/Linux) conflict with the
9464 # empty argument list, so check for that explicitly.
9465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
9466 $as_echo_n "checking return type of ptrace... " >&6; }
9467 if ${gdb_cv_func_ptrace_ret+:} false; then :
9468   $as_echo_n "(cached) " >&6
9469 else
9470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9471 /* end confdefs.h.  */
9472  $gdb_ptrace_headers
9473 int
9474 main ()
9475 {
9476 extern long ptrace (enum __ptrace_request, ...);
9477
9478   ;
9479   return 0;
9480 }
9481 _ACEOF
9482 if ac_fn_c_try_compile "$LINENO"; then :
9483   gdb_cv_func_ptrace_ret='long'
9484 else
9485   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9486 /* end confdefs.h.  */
9487 $gdb_ptrace_headers
9488 int
9489 main ()
9490 {
9491 extern int ptrace ();
9492
9493   ;
9494   return 0;
9495 }
9496 _ACEOF
9497 if ac_fn_c_try_compile "$LINENO"; then :
9498   gdb_cv_func_ptrace_ret='int'
9499 else
9500   gdb_cv_func_ptrace_ret='long'
9501
9502 fi
9503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9504
9505 fi
9506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9507
9508 fi
9509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
9510 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
9511
9512
9513 cat >>confdefs.h <<_ACEOF
9514 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
9515 _ACEOF
9516
9517
9518 # Check argument types.
9519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
9520 $as_echo_n "checking types of arguments for ptrace... " >&6; }
9521 if ${gdb_cv_func_ptrace_args+:} false; then :
9522   $as_echo_n "(cached) " >&6
9523 else
9524   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9525 /* end confdefs.h.  */
9526 $gdb_ptrace_headers
9527 int
9528 main ()
9529 {
9530 extern long ptrace (enum __ptrace_request, ...);
9531
9532   ;
9533   return 0;
9534 }
9535 _ACEOF
9536 if ac_fn_c_try_compile "$LINENO"; then :
9537   gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
9538 else
9539   for gdb_arg1 in 'int' 'long'; do
9540         for gdb_arg2 in 'pid_t' 'int' 'long'; do
9541           for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
9542             for gdb_arg4 in 'int' 'long' 'void *'; do
9543               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9544 /* end confdefs.h.  */
9545 $gdb_ptrace_headers
9546 int
9547 main ()
9548 {
9549 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
9550
9551   ;
9552   return 0;
9553 }
9554 _ACEOF
9555 if ac_fn_c_try_compile "$LINENO"; then :
9556   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
9557                  break 4;
9558
9559 fi
9560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9561
9562               for gdb_arg5 in 'int *' 'int' 'long'; do
9563                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9564 /* end confdefs.h.  */
9565 $gdb_ptrace_headers
9566 int
9567 main ()
9568 {
9569 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
9570
9571   ;
9572   return 0;
9573 }
9574 _ACEOF
9575 if ac_fn_c_try_compile "$LINENO"; then :
9576   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
9577                    break 5;
9578
9579 fi
9580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9581               done
9582             done
9583           done
9584         done
9585       done
9586       # Provide a safe default value.
9587       : ${gdb_cv_func_ptrace_args='int,int,long,long'}
9588
9589 fi
9590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9591
9592 fi
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
9594 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
9595
9596 ac_save_IFS=$IFS; IFS=','
9597 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
9598 IFS=$ac_save_IFS
9599 shift
9600
9601 cat >>confdefs.h <<_ACEOF
9602 #define PTRACE_TYPE_ARG1 $1
9603 _ACEOF
9604
9605
9606 cat >>confdefs.h <<_ACEOF
9607 #define PTRACE_TYPE_ARG3 $3
9608 _ACEOF
9609
9610
9611 cat >>confdefs.h <<_ACEOF
9612 #define PTRACE_TYPE_ARG4 $4
9613 _ACEOF
9614
9615 if test -n "$5"; then
9616
9617 cat >>confdefs.h <<_ACEOF
9618 #define PTRACE_TYPE_ARG5 $5
9619 _ACEOF
9620
9621 fi
9622
9623
9624 # Check for UST
9625 ustlibs=""
9626 ustinc=""
9627
9628
9629 # Check whether --with-ust was given.
9630 if test "${with_ust+set}" = set; then :
9631   withval=$with_ust;
9632 fi
9633
9634
9635 # Check whether --with-ust_include was given.
9636 if test "${with_ust_include+set}" = set; then :
9637   withval=$with_ust_include;
9638 fi
9639
9640
9641 # Check whether --with-ust_lib was given.
9642 if test "${with_ust_lib+set}" = set; then :
9643   withval=$with_ust_lib;
9644 fi
9645
9646
9647 case $with_ust in
9648   no)
9649     ustlibs=
9650     ustinc=
9651     ;;
9652   "" | yes)
9653     ustlibs=" -lust "
9654     ustinc=""
9655     ;;
9656   *)
9657     ustlibs="-L$with_ust/lib -lust"
9658     ustinc="-I$with_ust/include "
9659     ;;
9660 esac
9661 if test "x$with_ust_include" != x; then
9662   ustinc="-I$with_ust_include "
9663 fi
9664 if test "x$with_ust_lib" != x; then
9665   ustlibs="-L$with_ust_lib -lust"
9666 fi
9667
9668 if test "x$with_ust" != "xno"; then
9669   saved_CFLAGS="$CFLAGS"
9670   CFLAGS="$CFLAGS $ustinc"
9671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ust" >&5
9672 $as_echo_n "checking for ust... " >&6; }
9673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9674 /* end confdefs.h.  */
9675
9676 #define CONFIG_UST_GDB_INTEGRATION
9677 #include <ust/ust.h>
9678
9679 int
9680 main ()
9681 {
9682
9683
9684   ;
9685   return 0;
9686 }
9687 _ACEOF
9688 if ac_fn_c_try_compile "$LINENO"; then :
9689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9690 $as_echo "yes" >&6; };
9691
9692 $as_echo "#define HAVE_UST 1" >>confdefs.h
9693
9694 else
9695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9696 $as_echo "no" >&6; }
9697      ustlibs= ; ustinc=
9698
9699 fi
9700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9701   CFLAGS="$saved_CFLAGS"
9702 fi
9703
9704 # Flags needed for UST
9705
9706
9707
9708
9709
9710   { $as_echo "$as_me:${as_lineno-$LINENO}: checking the compiler type" >&5
9711 $as_echo_n "checking the compiler type... " >&6; }
9712 if ${gdb_cv_compiler_type+:} false; then :
9713   $as_echo_n "(cached) " >&6
9714 else
9715   gdb_cv_compiler_type=unknown
9716   if test "$gdb_cv_compiler_type" = unknown; then
9717      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9718 /* end confdefs.h.  */
9719
9720 int
9721 main ()
9722 {
9723
9724                           #if !defined __GNUC__ || defined __clang__
9725                           #error not gcc
9726                           #endif
9727
9728   ;
9729   return 0;
9730 }
9731 _ACEOF
9732 if ac_fn_c_try_compile "$LINENO"; then :
9733   gdb_cv_compiler_type=gcc
9734 fi
9735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9736   fi
9737
9738   if test "$gdb_cv_compiler_type" = unknown; then
9739      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9740 /* end confdefs.h.  */
9741
9742 int
9743 main ()
9744 {
9745
9746                           #ifndef __clang__
9747                           #error not clang
9748                           #endif
9749
9750   ;
9751   return 0;
9752 }
9753 _ACEOF
9754 if ac_fn_c_try_compile "$LINENO"; then :
9755   gdb_cv_compiler_type=clang
9756 fi
9757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9758   fi
9759
9760 fi
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_compiler_type" >&5
9762 $as_echo "$gdb_cv_compiler_type" >&6; }
9763
9764  GDB_COMPILER_TYPE="$gdb_cv_compiler_type"
9765
9766
9767 # Check whether --enable-werror was given.
9768 if test "${enable_werror+set}" = set; then :
9769   enableval=$enable_werror; case "${enableval}" in
9770      yes | y) ERROR_ON_WARNING="yes" ;;
9771      no | n)  ERROR_ON_WARNING="no" ;;
9772      *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
9773    esac
9774 fi
9775
9776
9777 # Enable -Werror by default when using gcc.  Turn it off for releases.
9778 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
9779     ERROR_ON_WARNING=yes
9780 fi
9781
9782 WERROR_CFLAGS=""
9783 if test "${ERROR_ON_WARNING}" = yes ; then
9784     WERROR_CFLAGS="-Werror"
9785 fi
9786
9787 # The options we'll try to enable.
9788 build_warnings="-Wall -Wpointer-arith \
9789 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
9790 -Wno-switch -Wno-char-subscripts \
9791 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
9792 -Wno-sign-compare -Wno-error=maybe-uninitialized \
9793 -Wno-mismatched-tags \
9794 -Wno-error=deprecated-register \
9795 -Wsuggest-override \
9796 -Wimplicit-fallthrough=3 \
9797 -Wduplicated-cond \
9798 -Wshadow=local \
9799 -Wdeprecated-copy \
9800 -Wdeprecated-copy-dtor \
9801 -Wredundant-move \
9802 -Wmissing-declarations \
9803 -Wstrict-null-sentinel \
9804 "
9805
9806 # The -Wmissing-prototypes flag will be accepted by GCC, but results
9807 # in a warning being printed about the flag not being valid for C++,
9808 # this is something to do with using ccache, and argument ordering.
9809 if test "$GDB_COMPILER_TYPE" != gcc; then
9810   build_warnings="$build_warnings -Wmissing-prototypes"
9811 fi
9812
9813 case "${host}" in
9814   *-*-mingw32*)
9815     # Enable -Wno-format by default when using gcc on mingw since many
9816     # GCC versions complain about %I64.
9817     build_warnings="$build_warnings -Wno-format" ;;
9818   *-*-solaris*)
9819     # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
9820     # doesn't understand.
9821     build_warnings="$build_warnings -Wno-unknown-pragmas"
9822     # Solaris 11 <unistd.h> marks vfork deprecated.
9823     build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
9824   *)
9825     # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
9826     # but there's a special case for this below.
9827     build_warnings="$build_warnings -Wformat-nonliteral" ;;
9828 esac
9829
9830 # Check whether --enable-build-warnings was given.
9831 if test "${enable_build_warnings+set}" = set; then :
9832   enableval=$enable_build_warnings; case "${enableval}" in
9833   yes)  ;;
9834   no)   build_warnings="-w";;
9835   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
9836         build_warnings="${build_warnings} ${t}";;
9837   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
9838         build_warnings="${t} ${build_warnings}";;
9839   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9840 esac
9841 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9842   echo "Setting compiler warning flags = $build_warnings" 6>&1
9843 fi
9844 fi
9845 # Check whether --enable-gdb-build-warnings was given.
9846 if test "${enable_gdb_build_warnings+set}" = set; then :
9847   enableval=$enable_gdb_build_warnings; case "${enableval}" in
9848   yes)  ;;
9849   no)   build_warnings="-w";;
9850   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
9851         build_warnings="${build_warnings} ${t}";;
9852   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
9853         build_warnings="${t} ${build_warnings}";;
9854   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9855 esac
9856 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9857   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9858 fi
9859 fi
9860
9861 # The set of warnings supported by a C++ compiler is not the same as
9862 # of the C compiler.
9863 ac_ext=cpp
9864 ac_cpp='$CXXCPP $CPPFLAGS'
9865 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9866 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9867 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9868
9869
9870 WARN_CFLAGS=""
9871 if test "x${build_warnings}" != x -a "x$GCC" = xyes
9872 then
9873     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
9874 $as_echo_n "checking compiler warning flags... " >&6; }
9875     # Separate out the -Werror flag as some files just cannot be
9876     # compiled with it enabled.
9877     for w in ${build_warnings}; do
9878         # GCC does not complain about -Wno-unknown-warning.  Invert
9879         # and test -Wunknown-warning instead.
9880         case $w in
9881         -Wno-*)
9882                 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
9883         -Wformat-nonliteral)
9884                 # gcc requires -Wformat before -Wformat-nonliteral
9885                 # will work, so stick them together.
9886                 w="-Wformat $w"
9887                 wtest="$w"
9888                 ;;
9889         *)
9890                 wtest=$w ;;
9891         esac
9892
9893         case $w in
9894         -Werr*) WERROR_CFLAGS=-Werror ;;
9895         *)
9896             # Check whether GCC accepts it.
9897             saved_CFLAGS="$CFLAGS"
9898             CFLAGS="$CFLAGS -Werror $wtest"
9899             saved_CXXFLAGS="$CXXFLAGS"
9900             CXXFLAGS="$CXXFLAGS -Werror $wtest"
9901             if test "x$w" = "x-Wunused-variable"; then
9902               # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
9903               # fixed in GCC 4.9.  This test is derived from the gdb
9904               # source code that triggered this bug in GCC.
9905               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9906 /* end confdefs.h.  */
9907 struct scoped_restore_base {};
9908                     struct scoped_restore_tmpl : public scoped_restore_base {
9909                       ~scoped_restore_tmpl() {}
9910                     };
9911 int
9912 main ()
9913 {
9914 const scoped_restore_base &b = scoped_restore_tmpl();
9915
9916   ;
9917   return 0;
9918 }
9919 _ACEOF
9920 if ac_fn_cxx_try_compile "$LINENO"; then :
9921   WARN_CFLAGS="${WARN_CFLAGS} $w"
9922 fi
9923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9924             else
9925               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9926 /* end confdefs.h.  */
9927
9928 int
9929 main ()
9930 {
9931
9932   ;
9933   return 0;
9934 }
9935 _ACEOF
9936 if ac_fn_cxx_try_compile "$LINENO"; then :
9937   WARN_CFLAGS="${WARN_CFLAGS} $w"
9938 fi
9939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9940             fi
9941             CFLAGS="$saved_CFLAGS"
9942             CXXFLAGS="$saved_CXXFLAGS"
9943         esac
9944     done
9945     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
9946 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
9947 fi
9948
9949
9950
9951 ac_ext=c
9952 ac_cpp='$CPP $CPPFLAGS'
9953 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9954 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9955 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9956
9957
9958
9959 old_LIBS="$LIBS"
9960 LIBS="$LIBS -ldl"
9961 for ac_func in dladdr
9962 do :
9963   ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
9964 if test "x$ac_cv_func_dladdr" = xyes; then :
9965   cat >>confdefs.h <<_ACEOF
9966 #define HAVE_DLADDR 1
9967 _ACEOF
9968
9969 fi
9970 done
9971
9972 LIBS="$old_LIBS"
9973
9974
9975   # Check for presence and size of long long.
9976   ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
9977 if test "x$ac_cv_type_long_long" = xyes; then :
9978
9979 cat >>confdefs.h <<_ACEOF
9980 #define HAVE_LONG_LONG 1
9981 _ACEOF
9982
9983 # The cast to long int works around a bug in the HP C Compiler
9984 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9985 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9986 # This bug is HP SR number 8606223364.
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9988 $as_echo_n "checking size of long long... " >&6; }
9989 if ${ac_cv_sizeof_long_long+:} false; then :
9990   $as_echo_n "(cached) " >&6
9991 else
9992   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
9993
9994 else
9995   if test "$ac_cv_type_long_long" = yes; then
9996      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9997 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9998 as_fn_error 77 "cannot compute sizeof (long long)
9999 See \`config.log' for more details" "$LINENO" 5; }
10000    else
10001      ac_cv_sizeof_long_long=0
10002    fi
10003 fi
10004
10005 fi
10006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10007 $as_echo "$ac_cv_sizeof_long_long" >&6; }
10008
10009
10010
10011 cat >>confdefs.h <<_ACEOF
10012 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10013 _ACEOF
10014
10015
10016 fi
10017
10018
10019   as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
10020 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
10021 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
10022   ac_have_decl=1
10023 else
10024   ac_have_decl=0
10025 fi
10026
10027 cat >>confdefs.h <<_ACEOF
10028 #define HAVE_DECL_BASENAME $ac_have_decl
10029 _ACEOF
10030 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
10031 if test "x$ac_cv_have_decl_ffs" = xyes; then :
10032   ac_have_decl=1
10033 else
10034   ac_have_decl=0
10035 fi
10036
10037 cat >>confdefs.h <<_ACEOF
10038 #define HAVE_DECL_FFS $ac_have_decl
10039 _ACEOF
10040 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
10041 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
10042   ac_have_decl=1
10043 else
10044   ac_have_decl=0
10045 fi
10046
10047 cat >>confdefs.h <<_ACEOF
10048 #define HAVE_DECL_ASPRINTF $ac_have_decl
10049 _ACEOF
10050 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10051 if test "x$ac_cv_have_decl_vasprintf" = 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_VASPRINTF $ac_have_decl
10059 _ACEOF
10060 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10061 if test "x$ac_cv_have_decl_snprintf" = 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_SNPRINTF $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   ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
10082 if test "x$ac_cv_have_decl_strtol" = xyes; then :
10083   ac_have_decl=1
10084 else
10085   ac_have_decl=0
10086 fi
10087
10088 cat >>confdefs.h <<_ACEOF
10089 #define HAVE_DECL_STRTOL $ac_have_decl
10090 _ACEOF
10091 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10092 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
10093   ac_have_decl=1
10094 else
10095   ac_have_decl=0
10096 fi
10097
10098 cat >>confdefs.h <<_ACEOF
10099 #define HAVE_DECL_STRTOUL $ac_have_decl
10100 _ACEOF
10101 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10102 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
10103   ac_have_decl=1
10104 else
10105   ac_have_decl=0
10106 fi
10107
10108 cat >>confdefs.h <<_ACEOF
10109 #define HAVE_DECL_STRTOLL $ac_have_decl
10110 _ACEOF
10111 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10112 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
10113   ac_have_decl=1
10114 else
10115   ac_have_decl=0
10116 fi
10117
10118 cat >>confdefs.h <<_ACEOF
10119 #define HAVE_DECL_STRTOULL $ac_have_decl
10120 _ACEOF
10121
10122   ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10123 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
10124   ac_have_decl=1
10125 else
10126   ac_have_decl=0
10127 fi
10128
10129 cat >>confdefs.h <<_ACEOF
10130 #define HAVE_DECL_STRVERSCMP $ac_have_decl
10131 _ACEOF
10132
10133
10134
10135 ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default"
10136 if test "x$ac_cv_have_decl_perror" = xyes; then :
10137   ac_have_decl=1
10138 else
10139   ac_have_decl=0
10140 fi
10141
10142 cat >>confdefs.h <<_ACEOF
10143 #define HAVE_DECL_PERROR $ac_have_decl
10144 _ACEOF
10145 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10146 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
10147   ac_have_decl=1
10148 else
10149   ac_have_decl=0
10150 fi
10151
10152 cat >>confdefs.h <<_ACEOF
10153 #define HAVE_DECL_VASPRINTF $ac_have_decl
10154 _ACEOF
10155 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10156 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
10157   ac_have_decl=1
10158 else
10159   ac_have_decl=0
10160 fi
10161
10162 cat >>confdefs.h <<_ACEOF
10163 #define HAVE_DECL_VSNPRINTF $ac_have_decl
10164 _ACEOF
10165
10166
10167 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
10168 #if HAVE_SYS_SOCKET_H
10169 # include <sys/socket.h>
10170 #elif HAVE_WS2TCPIP_H
10171 # include <ws2tcpip.h>
10172 #endif
10173
10174 "
10175 if test "x$ac_cv_type_socklen_t" = xyes; then :
10176
10177 cat >>confdefs.h <<_ACEOF
10178 #define HAVE_SOCKLEN_T 1
10179 _ACEOF
10180
10181
10182 fi
10183
10184
10185 case "${target}" in
10186   *-android*)
10187     # Starting with NDK version 9, <elf.h> actually includes definitions
10188     # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
10189     # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
10190     # leading to conflicts with the defintions from <linux/elf.h>.
10191     # This makes it impossible for us to include both <elf.h> and
10192     # <linux/elf.h>, which means that, in practice, we do not have
10193     # access to Elf32_auxv_t and Elf64_auxv_t on this platform.
10194     # Therefore, do not try to auto-detect availability, as it would
10195     # get it wrong on this platform.
10196     ;;
10197   *)
10198     ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
10199
10200 "
10201 if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then :
10202
10203 cat >>confdefs.h <<_ACEOF
10204 #define HAVE_ELF32_AUXV_T 1
10205 _ACEOF
10206
10207
10208 fi
10209 ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h>
10210
10211 "
10212 if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then :
10213
10214 cat >>confdefs.h <<_ACEOF
10215 #define HAVE_ELF64_AUXV_T 1
10216 _ACEOF
10217
10218
10219 fi
10220
10221 esac
10222
10223
10224
10225 # Check whether --with-pkgversion was given.
10226 if test "${with_pkgversion+set}" = set; then :
10227   withval=$with_pkgversion; case "$withval" in
10228       yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
10229       no)  PKGVERSION= ;;
10230       *)   PKGVERSION="($withval) " ;;
10231      esac
10232 else
10233   PKGVERSION="(GDB) "
10234
10235 fi
10236
10237
10238
10239
10240
10241 # Check whether --with-bugurl was given.
10242 if test "${with_bugurl+set}" = set; then :
10243   withval=$with_bugurl; case "$withval" in
10244       yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
10245       no)  BUGURL=
10246            ;;
10247       *)   BUGURL="$withval"
10248            ;;
10249      esac
10250 else
10251   BUGURL="http://www.gnu.org/software/gdb/bugs/"
10252
10253 fi
10254
10255   case ${BUGURL} in
10256   "")
10257     REPORT_BUGS_TO=
10258     REPORT_BUGS_TEXI=
10259     ;;
10260   *)
10261     REPORT_BUGS_TO="<$BUGURL>"
10262     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
10263     ;;
10264   esac;
10265
10266
10267
10268
10269 cat >>confdefs.h <<_ACEOF
10270 #define PKGVERSION "$PKGVERSION"
10271 _ACEOF
10272
10273
10274 cat >>confdefs.h <<_ACEOF
10275 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
10276 _ACEOF
10277
10278
10279 # Check for various supplementary target information (beyond the
10280 # triplet) which might affect the choices in configure.srv.
10281 case "${target}" in
10282   i[34567]86-*-linux*)
10283     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5
10284 $as_echo_n "checking if building for x86-64... " >&6; }
10285 if ${gdb_cv_i386_is_x86_64+:} false; then :
10286   $as_echo_n "(cached) " >&6
10287 else
10288   save_CPPFLAGS="$CPPFLAGS"
10289                     CPPFLAGS="$CPPFLAGS $CFLAGS"
10290                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10291 /* end confdefs.h.  */
10292
10293 #if __x86_64__
10294 got it
10295 #endif
10296
10297 _ACEOF
10298 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10299   $EGREP "got it" >/dev/null 2>&1; then :
10300   gdb_cv_i386_is_x86_64=yes
10301 else
10302   gdb_cv_i386_is_x86_64=no
10303 fi
10304 rm -f conftest*
10305
10306                     CPPFLAGS="$save_CPPFLAGS"
10307 fi
10308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
10309 $as_echo "$gdb_cv_i386_is_x86_64" >&6; }
10310     ;;
10311
10312   x86_64-*-linux*)
10313     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5
10314 $as_echo_n "checking if building for x32... " >&6; }
10315 if ${gdb_cv_x86_is_x32+:} false; then :
10316   $as_echo_n "(cached) " >&6
10317 else
10318   save_CPPFLAGS="$CPPFLAGS"
10319                     CPPFLAGS="$CPPFLAGS $CFLAGS"
10320                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10321 /* end confdefs.h.  */
10322
10323 #if __x86_64__ && __ILP32__
10324 got it
10325 #endif
10326
10327 _ACEOF
10328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10329   $EGREP "got it" >/dev/null 2>&1; then :
10330   gdb_cv_x86_is_x32=yes
10331 else
10332   gdb_cv_x86_is_x32=no
10333 fi
10334 rm -f conftest*
10335
10336                     CPPFLAGS="$save_CPPFLAGS"
10337 fi
10338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5
10339 $as_echo "$gdb_cv_x86_is_x32" >&6; }
10340     ;;
10341
10342   m68k-*-*)
10343     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5
10344 $as_echo_n "checking if building for Coldfire... " >&6; }
10345 if ${gdb_cv_m68k_is_coldfire+:} false; then :
10346   $as_echo_n "(cached) " >&6
10347 else
10348   save_CPPFLAGS="$CPPFLAGS"
10349                     CPPFLAGS="$CPPFLAGS $CFLAGS"
10350                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10351 /* end confdefs.h.  */
10352
10353 #ifdef __mcoldfire__
10354 got it
10355 #endif
10356
10357 _ACEOF
10358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10359   $EGREP "got it" >/dev/null 2>&1; then :
10360   gdb_cv_m68k_is_coldfire=yes
10361 else
10362   gdb_cv_m68k_is_coldfire=no
10363 fi
10364 rm -f conftest*
10365
10366                     CPPFLAGS="$save_CPPFLAGS"
10367 fi
10368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5
10369 $as_echo "$gdb_cv_m68k_is_coldfire" >&6; }
10370     ;;
10371 esac
10372
10373 . ${srcdir}/configure.srv
10374
10375 if test "${srv_mingwce}" = "yes"; then
10376   LIBS="$LIBS -lws2"
10377 elif test "${srv_mingw}" = "yes"; then
10378   # WIN32APILIBS is set by GDB_AC_COMMON.
10379   LIBS="$LIBS $WIN32APILIBS"
10380 fi
10381
10382 if test "${srv_linux_usrregs}" = "yes"; then
10383
10384 $as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h
10385
10386 fi
10387
10388 if test "${srv_linux_regsets}" = "yes"; then
10389
10390 $as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h
10391
10392
10393   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10394 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
10395   if ${gdbsrv_cv_have_ptrace_getregs+:} false; then :
10396   $as_echo_n "(cached) " >&6
10397 else
10398   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10399 /* end confdefs.h.  */
10400 #include <sys/ptrace.h>
10401 int
10402 main ()
10403 {
10404 PTRACE_GETREGS;
10405   ;
10406   return 0;
10407 }
10408 _ACEOF
10409 if ac_fn_c_try_compile "$LINENO"; then :
10410   gdbsrv_cv_have_ptrace_getregs=yes
10411 else
10412   gdbsrv_cv_have_ptrace_getregs=no
10413
10414 fi
10415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10416
10417 fi
10418
10419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
10420 $as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; }
10421   if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
10422
10423 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
10424
10425   fi
10426
10427   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10428 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
10429   if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then :
10430   $as_echo_n "(cached) " >&6
10431 else
10432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10433 /* end confdefs.h.  */
10434 #include <sys/ptrace.h>
10435 int
10436 main ()
10437 {
10438 PTRACE_GETFPXREGS;
10439   ;
10440   return 0;
10441 }
10442 _ACEOF
10443 if ac_fn_c_try_compile "$LINENO"; then :
10444   gdbsrv_cv_have_ptrace_getfpxregs=yes
10445 else
10446   gdbsrv_cv_have_ptrace_getfpxregs=no
10447
10448 fi
10449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10450
10451 fi
10452
10453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
10454 $as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; }
10455   if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
10456
10457 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
10458
10459   fi
10460 fi
10461
10462 if test "${srv_linux_btrace}" = "yes"; then
10463
10464 $as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h
10465
10466 fi
10467
10468 if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
10469   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
10470 $as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
10471    if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
10472   $as_echo_n "(cached) " >&6
10473 else
10474   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10475 /* end confdefs.h.  */
10476 #include <thread_db.h>
10477 int
10478 main ()
10479 {
10480 lwpid_t avar
10481   ;
10482   return 0;
10483 }
10484 _ACEOF
10485 if ac_fn_c_try_compile "$LINENO"; then :
10486   gdbserver_cv_have_thread_db_type_lwpid_t=yes
10487 else
10488   gdbserver_cv_have_thread_db_type_lwpid_t=no
10489
10490 fi
10491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10492
10493 fi
10494
10495    if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
10496
10497 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
10498
10499    fi
10500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
10501 $as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
10502
10503 fi
10504
10505 if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
10506   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
10507 $as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
10508    if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
10509   $as_echo_n "(cached) " >&6
10510 else
10511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10512 /* end confdefs.h.  */
10513 #include <thread_db.h>
10514 int
10515 main ()
10516 {
10517 psaddr_t avar
10518   ;
10519   return 0;
10520 }
10521 _ACEOF
10522 if ac_fn_c_try_compile "$LINENO"; then :
10523   gdbserver_cv_have_thread_db_type_psaddr_t=yes
10524 else
10525   gdbserver_cv_have_thread_db_type_psaddr_t=no
10526
10527 fi
10528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10529
10530 fi
10531
10532    if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
10533
10534 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
10535
10536    fi
10537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
10538 $as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
10539
10540 fi
10541
10542 old_LIBS="$LIBS"
10543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10544 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10545 if ${ac_cv_lib_dl_dlopen+:} false; then :
10546   $as_echo_n "(cached) " >&6
10547 else
10548   ac_check_lib_save_LIBS=$LIBS
10549 LIBS="-ldl  $LIBS"
10550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10551 /* end confdefs.h.  */
10552
10553 /* Override any GCC internal prototype to avoid an error.
10554    Use char because int might match the return type of a GCC
10555    builtin and then its argument prototype would still apply.  */
10556 #ifdef __cplusplus
10557 extern "C"
10558 #endif
10559 char dlopen ();
10560 int
10561 main ()
10562 {
10563 return dlopen ();
10564   ;
10565   return 0;
10566 }
10567 _ACEOF
10568 if ac_fn_c_try_link "$LINENO"; then :
10569   ac_cv_lib_dl_dlopen=yes
10570 else
10571   ac_cv_lib_dl_dlopen=no
10572 fi
10573 rm -f core conftest.err conftest.$ac_objext \
10574     conftest$ac_exeext conftest.$ac_ext
10575 LIBS=$ac_check_lib_save_LIBS
10576 fi
10577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10578 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10579 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10580   cat >>confdefs.h <<_ACEOF
10581 #define HAVE_LIBDL 1
10582 _ACEOF
10583
10584   LIBS="-ldl $LIBS"
10585
10586 fi
10587
10588 LIBS="$old_LIBS"
10589
10590 srv_thread_depfiles=
10591 srv_libs=
10592
10593 if test "$srv_linux_thread_db" = "yes"; then
10594   if test "$ac_cv_lib_dl_dlopen" = "yes"; then
10595     srv_libs="-ldl"
10596     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
10597 $as_echo_n "checking for the dynamic export flag... " >&6; }
10598     old_LDFLAGS="$LDFLAGS"
10599     # Older GNU ld supports --export-dynamic but --dynamic-list may not be
10600     # supported there.
10601     RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
10602     LDFLAGS="$LDFLAGS $RDYNAMIC"
10603     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10604 /* end confdefs.h.  */
10605
10606 int
10607 main ()
10608 {
10609
10610   ;
10611   return 0;
10612 }
10613 _ACEOF
10614 if ac_fn_c_try_link "$LINENO"; then :
10615   found="-Wl,--dynamic-list"
10616        RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
10617 else
10618   RDYNAMIC="-rdynamic"
10619        LDFLAGS="$old_LDFLAGS $RDYNAMIC"
10620        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10621 /* end confdefs.h.  */
10622
10623 int
10624 main ()
10625 {
10626
10627   ;
10628   return 0;
10629 }
10630 _ACEOF
10631 if ac_fn_c_try_link "$LINENO"; then :
10632   found="-rdynamic"
10633 else
10634   found="no"
10635           RDYNAMIC=""
10636
10637 fi
10638 rm -f core conftest.err conftest.$ac_objext \
10639     conftest$ac_exeext conftest.$ac_ext
10640
10641 fi
10642 rm -f core conftest.err conftest.$ac_objext \
10643     conftest$ac_exeext conftest.$ac_ext
10644
10645     LDFLAGS="$old_LDFLAGS"
10646     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
10647 $as_echo "$found" >&6; }
10648   else
10649     srv_libs="-lthread_db"
10650   fi
10651
10652   srv_thread_depfiles="thread-db.o proc-service.o"
10653
10654 $as_echo "#define USE_THREAD_DB 1" >>confdefs.h
10655
10656   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5
10657 $as_echo_n "checking for TD_VERSION... " >&6; }
10658 if ${gdbsrv_cv_have_td_version+:} false; then :
10659   $as_echo_n "(cached) " >&6
10660 else
10661   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10662 /* end confdefs.h.  */
10663 #include <thread_db.h>
10664 int
10665 main ()
10666 {
10667 TD_VERSION;
10668   ;
10669   return 0;
10670 }
10671 _ACEOF
10672 if ac_fn_c_try_compile "$LINENO"; then :
10673   gdbsrv_cv_have_td_version=yes
10674 else
10675   gdbsrv_cv_have_td_version=no
10676
10677 fi
10678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10679
10680 fi
10681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
10682 $as_echo "$gdbsrv_cv_have_td_version" >&6; }
10683   if test "$gdbsrv_cv_have_td_version" = yes; then
10684
10685 $as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h
10686
10687   fi
10688 fi
10689
10690
10691 # Check whether --with-libthread-db was given.
10692 if test "${with_libthread_db+set}" = set; then :
10693   withval=$with_libthread_db; srv_libthread_db_path="${withval}"
10694   srv_libs="$srv_libthread_db_path"
10695
10696 fi
10697
10698
10699 if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then
10700
10701 $as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h
10702
10703 fi
10704
10705 if test "$srv_xmlfiles" != ""; then
10706   srv_xmlbuiltin="xml-builtin.o"
10707
10708 $as_echo "#define USE_XML 1" >>confdefs.h
10709
10710
10711   tmp_xmlfiles=$srv_xmlfiles
10712   srv_xmlfiles=""
10713   for f in $tmp_xmlfiles; do
10714     srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f"
10715   done
10716 fi
10717
10718 GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
10719 GDBSERVER_LIBS="$srv_libs"
10720
10721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5
10722 $as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; }
10723 if ${gdbsrv_cv_have_sync_builtins+:} false; then :
10724   $as_echo_n "(cached) " >&6
10725 else
10726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10727 /* end confdefs.h.  */
10728
10729 int
10730 main ()
10731 {
10732 int foo, bar;
10733          bar = __sync_val_compare_and_swap(&foo, 0, 1);
10734
10735   ;
10736   return 0;
10737 }
10738 _ACEOF
10739 if ac_fn_c_try_link "$LINENO"; then :
10740   gdbsrv_cv_have_sync_builtins=yes
10741 else
10742   gdbsrv_cv_have_sync_builtins=no
10743
10744 fi
10745 rm -f core conftest.err conftest.$ac_objext \
10746     conftest$ac_exeext conftest.$ac_ext
10747
10748 fi
10749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
10750 $as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
10751 if test "$gdbsrv_cv_have_sync_builtins" = yes; then
10752
10753 $as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h
10754
10755 fi
10756
10757 saved_cflags="$CFLAGS"
10758 CFLAGS="$CFLAGS -fvisibility=hidden"
10759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10760 /* end confdefs.h.  */
10761
10762 int
10763 main ()
10764 {
10765
10766   ;
10767   return 0;
10768 }
10769 _ACEOF
10770 if ac_fn_c_try_compile "$LINENO"; then :
10771   gdbsrv_cv_have_visibility_hidden=yes
10772 else
10773   gdbsrv_cv_have_visibility_hidden=no
10774 fi
10775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10776 CFLAGS="$saved_cflags"
10777
10778 IPA_DEPFILES=""
10779 extra_libraries=""
10780
10781 # check whether to enable the inprocess agent
10782 if test "$ipa_obj" != "" \
10783    -a "$gdbsrv_cv_have_sync_builtins" = yes \
10784    -a "$gdbsrv_cv_have_visibility_hidden" = yes; then
10785    have_ipa=true
10786 else
10787    have_ipa=false
10788 fi
10789
10790 # Check whether --enable-inprocess-agent was given.
10791 if test "${enable_inprocess_agent+set}" = set; then :
10792   enableval=$enable_inprocess_agent; case "$enableval" in
10793   yes) want_ipa=true ;;
10794   no) want_ipa=false ;;
10795   *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;;
10796 esac
10797 else
10798   want_ipa=$have_ipa
10799 fi
10800
10801
10802 if $want_ipa ; then
10803    if $have_ipa ; then
10804      IPA_DEPFILES="$ipa_obj"
10805      extra_libraries="$extra_libraries libinproctrace.so"
10806    else
10807      as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5
10808    fi
10809 fi
10810
10811
10812
10813
10814
10815
10816
10817
10818 GNULIB=../gnulib/import
10819
10820 GNULIB_STDINT_H=
10821 if test x"$STDINT_H" != x; then
10822   GNULIB_STDINT_H=$GNULIB/$STDINT_H
10823 fi
10824
10825
10826 ac_config_files="$ac_config_files Makefile"
10827
10828
10829 cat >confcache <<\_ACEOF
10830 # This file is a shell script that caches the results of configure
10831 # tests run on this system so they can be shared between configure
10832 # scripts and configure runs, see configure's option --config-cache.
10833 # It is not useful on other systems.  If it contains results you don't
10834 # want to keep, you may remove or edit it.
10835 #
10836 # config.status only pays attention to the cache file if you give it
10837 # the --recheck option to rerun configure.
10838 #
10839 # `ac_cv_env_foo' variables (set or unset) will be overridden when
10840 # loading this file, other *unset* `ac_cv_foo' will be assigned the
10841 # following values.
10842
10843 _ACEOF
10844
10845 # The following way of writing the cache mishandles newlines in values,
10846 # but we know of no workaround that is simple, portable, and efficient.
10847 # So, we kill variables containing newlines.
10848 # Ultrix sh set writes to stderr and can't be redirected directly,
10849 # and sets the high bit in the cache file unless we assign to the vars.
10850 (
10851   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10852     eval ac_val=\$$ac_var
10853     case $ac_val in #(
10854     *${as_nl}*)
10855       case $ac_var in #(
10856       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
10857 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
10858       esac
10859       case $ac_var in #(
10860       _ | IFS | as_nl) ;; #(
10861       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
10862       *) { eval $ac_var=; unset $ac_var;} ;;
10863       esac ;;
10864     esac
10865   done
10866
10867   (set) 2>&1 |
10868     case $as_nl`(ac_space=' '; set) 2>&1` in #(
10869     *${as_nl}ac_space=\ *)
10870       # `set' does not quote correctly, so add quotes: double-quote
10871       # substitution turns \\\\ into \\, and sed turns \\ into \.
10872       sed -n \
10873         "s/'/'\\\\''/g;
10874           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10875       ;; #(
10876     *)
10877       # `set' quotes correctly as required by POSIX, so do not add quotes.
10878       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
10879       ;;
10880     esac |
10881     sort
10882 ) |
10883   sed '
10884      /^ac_cv_env_/b end
10885      t clear
10886      :clear
10887      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10888      t end
10889      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10890      :end' >>confcache
10891 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10892   if test -w "$cache_file"; then
10893     if test "x$cache_file" != "x/dev/null"; then
10894       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
10895 $as_echo "$as_me: updating cache $cache_file" >&6;}
10896       if test ! -f "$cache_file" || test -h "$cache_file"; then
10897         cat confcache >"$cache_file"
10898       else
10899         case $cache_file in #(
10900         */* | ?:*)
10901           mv -f confcache "$cache_file"$$ &&
10902           mv -f "$cache_file"$$ "$cache_file" ;; #(
10903         *)
10904           mv -f confcache "$cache_file" ;;
10905         esac
10906       fi
10907     fi
10908   else
10909     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
10910 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
10911   fi
10912 fi
10913 rm -f confcache
10914
10915 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10916 # Let make expand exec_prefix.
10917 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10918
10919 DEFS=-DHAVE_CONFIG_H
10920
10921 ac_libobjs=
10922 ac_ltlibobjs=
10923 U=
10924 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10925   # 1. Remove the extension, and $U if already installed.
10926   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10927   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
10928   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
10929   #    will be set to the directory where LIBOBJS objects are built.
10930   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10931   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
10932 done
10933 LIBOBJS=$ac_libobjs
10934
10935 LTLIBOBJS=$ac_ltlibobjs
10936
10937
10938 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
10939   as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
10940 Usually this means the macro was only invoked conditionally." "$LINENO" 5
10941 fi
10942
10943 : "${CONFIG_STATUS=./config.status}"
10944 ac_write_fail=0
10945 ac_clean_files_save=$ac_clean_files
10946 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
10948 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
10949 as_write_fail=0
10950 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
10951 #! $SHELL
10952 # Generated by $as_me.
10953 # Run this file to recreate the current configuration.
10954 # Compiler output produced by configure, useful for debugging
10955 # configure, is in config.log if it exists.
10956
10957 debug=false
10958 ac_cs_recheck=false
10959 ac_cs_silent=false
10960
10961 SHELL=\${CONFIG_SHELL-$SHELL}
10962 export SHELL
10963 _ASEOF
10964 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
10965 ## -------------------- ##
10966 ## M4sh Initialization. ##
10967 ## -------------------- ##
10968
10969 # Be more Bourne compatible
10970 DUALCASE=1; export DUALCASE # for MKS sh
10971 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
10972   emulate sh
10973   NULLCMD=:
10974   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
10975   # is contrary to our usage.  Disable this feature.
10976   alias -g '${1+"$@"}'='"$@"'
10977   setopt NO_GLOB_SUBST
10978 else
10979   case `(set -o) 2>/dev/null` in #(
10980   *posix*) :
10981     set -o posix ;; #(
10982   *) :
10983      ;;
10984 esac
10985 fi
10986
10987
10988 as_nl='
10989 '
10990 export as_nl
10991 # Printing a long string crashes Solaris 7 /usr/bin/printf.
10992 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
10993 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
10994 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
10995 # Prefer a ksh shell builtin over an external printf program on Solaris,
10996 # but without wasting forks for bash or zsh.
10997 if test -z "$BASH_VERSION$ZSH_VERSION" \
10998     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
10999   as_echo='print -r --'
11000   as_echo_n='print -rn --'
11001 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
11002   as_echo='printf %s\n'
11003   as_echo_n='printf %s'
11004 else
11005   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
11006     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
11007     as_echo_n='/usr/ucb/echo -n'
11008   else
11009     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
11010     as_echo_n_body='eval
11011       arg=$1;
11012       case $arg in #(
11013       *"$as_nl"*)
11014         expr "X$arg" : "X\\(.*\\)$as_nl";
11015         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
11016       esac;
11017       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
11018     '
11019     export as_echo_n_body
11020     as_echo_n='sh -c $as_echo_n_body as_echo'
11021   fi
11022   export as_echo_body
11023   as_echo='sh -c $as_echo_body as_echo'
11024 fi
11025
11026 # The user is always right.
11027 if test "${PATH_SEPARATOR+set}" != set; then
11028   PATH_SEPARATOR=:
11029   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
11030     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
11031       PATH_SEPARATOR=';'
11032   }
11033 fi
11034
11035
11036 # IFS
11037 # We need space, tab and new line, in precisely that order.  Quoting is
11038 # there to prevent editors from complaining about space-tab.
11039 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
11040 # splitting by setting IFS to empty value.)
11041 IFS=" ""        $as_nl"
11042
11043 # Find who we are.  Look in the path if we contain no directory separator.
11044 as_myself=
11045 case $0 in #((
11046   *[\\/]* ) as_myself=$0 ;;
11047   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11048 for as_dir in $PATH
11049 do
11050   IFS=$as_save_IFS
11051   test -z "$as_dir" && as_dir=.
11052     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
11053   done
11054 IFS=$as_save_IFS
11055
11056      ;;
11057 esac
11058 # We did not find ourselves, most probably we were run as `sh COMMAND'
11059 # in which case we are not to be found in the path.
11060 if test "x$as_myself" = x; then
11061   as_myself=$0
11062 fi
11063 if test ! -f "$as_myself"; then
11064   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11065   exit 1
11066 fi
11067
11068 # Unset variables that we do not need and which cause bugs (e.g. in
11069 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
11070 # suppresses any "Segmentation fault" message there.  '((' could
11071 # trigger a bug in pdksh 5.2.14.
11072 for as_var in BASH_ENV ENV MAIL MAILPATH
11073 do eval test x\${$as_var+set} = xset \
11074   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
11075 done
11076 PS1='$ '
11077 PS2='> '
11078 PS4='+ '
11079
11080 # NLS nuisances.
11081 LC_ALL=C
11082 export LC_ALL
11083 LANGUAGE=C
11084 export LANGUAGE
11085
11086 # CDPATH.
11087 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11088
11089
11090 # as_fn_error STATUS ERROR [LINENO LOG_FD]
11091 # ----------------------------------------
11092 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
11093 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
11094 # script with STATUS, using 1 if that was 0.
11095 as_fn_error ()
11096 {
11097   as_status=$1; test $as_status -eq 0 && as_status=1
11098   if test "$4"; then
11099     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
11100     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
11101   fi
11102   $as_echo "$as_me: error: $2" >&2
11103   as_fn_exit $as_status
11104 } # as_fn_error
11105
11106
11107 # as_fn_set_status STATUS
11108 # -----------------------
11109 # Set $? to STATUS, without forking.
11110 as_fn_set_status ()
11111 {
11112   return $1
11113 } # as_fn_set_status
11114
11115 # as_fn_exit STATUS
11116 # -----------------
11117 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
11118 as_fn_exit ()
11119 {
11120   set +e
11121   as_fn_set_status $1
11122   exit $1
11123 } # as_fn_exit
11124
11125 # as_fn_unset VAR
11126 # ---------------
11127 # Portably unset VAR.
11128 as_fn_unset ()
11129 {
11130   { eval $1=; unset $1;}
11131 }
11132 as_unset=as_fn_unset
11133 # as_fn_append VAR VALUE
11134 # ----------------------
11135 # Append the text in VALUE to the end of the definition contained in VAR. Take
11136 # advantage of any shell optimizations that allow amortized linear growth over
11137 # repeated appends, instead of the typical quadratic growth present in naive
11138 # implementations.
11139 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
11140   eval 'as_fn_append ()
11141   {
11142     eval $1+=\$2
11143   }'
11144 else
11145   as_fn_append ()
11146   {
11147     eval $1=\$$1\$2
11148   }
11149 fi # as_fn_append
11150
11151 # as_fn_arith ARG...
11152 # ------------------
11153 # Perform arithmetic evaluation on the ARGs, and store the result in the
11154 # global $as_val. Take advantage of shells that can avoid forks. The arguments
11155 # must be portable across $(()) and expr.
11156 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
11157   eval 'as_fn_arith ()
11158   {
11159     as_val=$(( $* ))
11160   }'
11161 else
11162   as_fn_arith ()
11163   {
11164     as_val=`expr "$@" || test $? -eq 1`
11165   }
11166 fi # as_fn_arith
11167
11168
11169 if expr a : '\(a\)' >/dev/null 2>&1 &&
11170    test "X`expr 00001 : '.*\(...\)'`" = X001; then
11171   as_expr=expr
11172 else
11173   as_expr=false
11174 fi
11175
11176 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
11177   as_basename=basename
11178 else
11179   as_basename=false
11180 fi
11181
11182 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11183   as_dirname=dirname
11184 else
11185   as_dirname=false
11186 fi
11187
11188 as_me=`$as_basename -- "$0" ||
11189 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11190          X"$0" : 'X\(//\)$' \| \
11191          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11192 $as_echo X/"$0" |
11193     sed '/^.*\/\([^/][^/]*\)\/*$/{
11194             s//\1/
11195             q
11196           }
11197           /^X\/\(\/\/\)$/{
11198             s//\1/
11199             q
11200           }
11201           /^X\/\(\/\).*/{
11202             s//\1/
11203             q
11204           }
11205           s/.*/./; q'`
11206
11207 # Avoid depending upon Character Ranges.
11208 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11209 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11210 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11211 as_cr_digits='0123456789'
11212 as_cr_alnum=$as_cr_Letters$as_cr_digits
11213
11214 ECHO_C= ECHO_N= ECHO_T=
11215 case `echo -n x` in #(((((
11216 -n*)
11217   case `echo 'xy\c'` in
11218   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
11219   xy)  ECHO_C='\c';;
11220   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
11221        ECHO_T=' ';;
11222   esac;;
11223 *)
11224   ECHO_N='-n';;
11225 esac
11226
11227 rm -f conf$$ conf$$.exe conf$$.file
11228 if test -d conf$$.dir; then
11229   rm -f conf$$.dir/conf$$.file
11230 else
11231   rm -f conf$$.dir
11232   mkdir conf$$.dir 2>/dev/null
11233 fi
11234 if (echo >conf$$.file) 2>/dev/null; then
11235   if ln -s conf$$.file conf$$ 2>/dev/null; then
11236     as_ln_s='ln -s'
11237     # ... but there are two gotchas:
11238     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11239     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11240     # In both cases, we have to default to `cp -pR'.
11241     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11242       as_ln_s='cp -pR'
11243   elif ln conf$$.file conf$$ 2>/dev/null; then
11244     as_ln_s=ln
11245   else
11246     as_ln_s='cp -pR'
11247   fi
11248 else
11249   as_ln_s='cp -pR'
11250 fi
11251 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11252 rmdir conf$$.dir 2>/dev/null
11253
11254
11255 # as_fn_mkdir_p
11256 # -------------
11257 # Create "$as_dir" as a directory, including parents if necessary.
11258 as_fn_mkdir_p ()
11259 {
11260
11261   case $as_dir in #(
11262   -*) as_dir=./$as_dir;;
11263   esac
11264   test -d "$as_dir" || eval $as_mkdir_p || {
11265     as_dirs=
11266     while :; do
11267       case $as_dir in #(
11268       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
11269       *) as_qdir=$as_dir;;
11270       esac
11271       as_dirs="'$as_qdir' $as_dirs"
11272       as_dir=`$as_dirname -- "$as_dir" ||
11273 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11274          X"$as_dir" : 'X\(//\)[^/]' \| \
11275          X"$as_dir" : 'X\(//\)$' \| \
11276          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11277 $as_echo X"$as_dir" |
11278     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11279             s//\1/
11280             q
11281           }
11282           /^X\(\/\/\)[^/].*/{
11283             s//\1/
11284             q
11285           }
11286           /^X\(\/\/\)$/{
11287             s//\1/
11288             q
11289           }
11290           /^X\(\/\).*/{
11291             s//\1/
11292             q
11293           }
11294           s/.*/./; q'`
11295       test -d "$as_dir" && break
11296     done
11297     test -z "$as_dirs" || eval "mkdir $as_dirs"
11298   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
11299
11300
11301 } # as_fn_mkdir_p
11302 if mkdir -p . 2>/dev/null; then
11303   as_mkdir_p='mkdir -p "$as_dir"'
11304 else
11305   test -d ./-p && rmdir ./-p
11306   as_mkdir_p=false
11307 fi
11308
11309
11310 # as_fn_executable_p FILE
11311 # -----------------------
11312 # Test if FILE is an executable regular file.
11313 as_fn_executable_p ()
11314 {
11315   test -f "$1" && test -x "$1"
11316 } # as_fn_executable_p
11317 as_test_x='test -x'
11318 as_executable_p=as_fn_executable_p
11319
11320 # Sed expression to map a string onto a valid CPP name.
11321 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11322
11323 # Sed expression to map a string onto a valid variable name.
11324 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11325
11326
11327 exec 6>&1
11328 ## ----------------------------------- ##
11329 ## Main body of $CONFIG_STATUS script. ##
11330 ## ----------------------------------- ##
11331 _ASEOF
11332 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
11333
11334 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11335 # Save the log message, to keep $0 and so on meaningful, and to
11336 # report actual input values of CONFIG_FILES etc. instead of their
11337 # values after options handling.
11338 ac_log="
11339 This file was extended by $as_me, which was
11340 generated by GNU Autoconf 2.69.  Invocation command line was
11341
11342   CONFIG_FILES    = $CONFIG_FILES
11343   CONFIG_HEADERS  = $CONFIG_HEADERS
11344   CONFIG_LINKS    = $CONFIG_LINKS
11345   CONFIG_COMMANDS = $CONFIG_COMMANDS
11346   $ $0 $@
11347
11348 on `(hostname || uname -n) 2>/dev/null | sed 1q`
11349 "
11350
11351 _ACEOF
11352
11353 case $ac_config_files in *"
11354 "*) set x $ac_config_files; shift; ac_config_files=$*;;
11355 esac
11356
11357 case $ac_config_headers in *"
11358 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
11359 esac
11360
11361
11362 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11363 # Files that config.status was made for.
11364 config_files="$ac_config_files"
11365 config_headers="$ac_config_headers"
11366 config_commands="$ac_config_commands"
11367
11368 _ACEOF
11369
11370 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11371 ac_cs_usage="\
11372 \`$as_me' instantiates files and other configuration actions
11373 from templates according to the current configuration.  Unless the files
11374 and actions are specified as TAGs, all are instantiated by default.
11375
11376 Usage: $0 [OPTION]... [TAG]...
11377
11378   -h, --help       print this help, then exit
11379   -V, --version    print version number and configuration settings, then exit
11380       --config     print configuration, then exit
11381   -q, --quiet, --silent
11382                    do not print progress messages
11383   -d, --debug      don't remove temporary files
11384       --recheck    update $as_me by reconfiguring in the same conditions
11385       --file=FILE[:TEMPLATE]
11386                    instantiate the configuration file FILE
11387       --header=FILE[:TEMPLATE]
11388                    instantiate the configuration header FILE
11389
11390 Configuration files:
11391 $config_files
11392
11393 Configuration headers:
11394 $config_headers
11395
11396 Configuration commands:
11397 $config_commands
11398
11399 Report bugs to the package provider."
11400
11401 _ACEOF
11402 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11403 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
11404 ac_cs_version="\\
11405 config.status
11406 configured by $0, generated by GNU Autoconf 2.69,
11407   with options \\"\$ac_cs_config\\"
11408
11409 Copyright (C) 2012 Free Software Foundation, Inc.
11410 This config.status script is free software; the Free Software Foundation
11411 gives unlimited permission to copy, distribute and modify it."
11412
11413 ac_pwd='$ac_pwd'
11414 srcdir='$srcdir'
11415 INSTALL='$INSTALL'
11416 test -n "\$AWK" || AWK=awk
11417 _ACEOF
11418
11419 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11420 # The default lists apply if the user does not specify any file.
11421 ac_need_defaults=:
11422 while test $# != 0
11423 do
11424   case $1 in
11425   --*=?*)
11426     ac_option=`expr "X$1" : 'X\([^=]*\)='`
11427     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
11428     ac_shift=:
11429     ;;
11430   --*=)
11431     ac_option=`expr "X$1" : 'X\([^=]*\)='`
11432     ac_optarg=
11433     ac_shift=:
11434     ;;
11435   *)
11436     ac_option=$1
11437     ac_optarg=$2
11438     ac_shift=shift
11439     ;;
11440   esac
11441
11442   case $ac_option in
11443   # Handling of the options.
11444   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11445     ac_cs_recheck=: ;;
11446   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11447     $as_echo "$ac_cs_version"; exit ;;
11448   --config | --confi | --conf | --con | --co | --c )
11449     $as_echo "$ac_cs_config"; exit ;;
11450   --debug | --debu | --deb | --de | --d | -d )
11451     debug=: ;;
11452   --file | --fil | --fi | --f )
11453     $ac_shift
11454     case $ac_optarg in
11455     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11456     '') as_fn_error $? "missing file argument" ;;
11457     esac
11458     as_fn_append CONFIG_FILES " '$ac_optarg'"
11459     ac_need_defaults=false;;
11460   --header | --heade | --head | --hea )
11461     $ac_shift
11462     case $ac_optarg in
11463     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11464     esac
11465     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
11466     ac_need_defaults=false;;
11467   --he | --h)
11468     # Conflict between --help and --header
11469     as_fn_error $? "ambiguous option: \`$1'
11470 Try \`$0 --help' for more information.";;
11471   --help | --hel | -h )
11472     $as_echo "$ac_cs_usage"; exit ;;
11473   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11474   | -silent | --silent | --silen | --sile | --sil | --si | --s)
11475     ac_cs_silent=: ;;
11476
11477   # This is an error.
11478   -*) as_fn_error $? "unrecognized option: \`$1'
11479 Try \`$0 --help' for more information." ;;
11480
11481   *) as_fn_append ac_config_targets " $1"
11482      ac_need_defaults=false ;;
11483
11484   esac
11485   shift
11486 done
11487
11488 ac_configure_extra_args=
11489
11490 if $ac_cs_silent; then
11491   exec 6>/dev/null
11492   ac_configure_extra_args="$ac_configure_extra_args --silent"
11493 fi
11494
11495 _ACEOF
11496 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11497 if \$ac_cs_recheck; then
11498   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11499   shift
11500   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
11501   CONFIG_SHELL='$SHELL'
11502   export CONFIG_SHELL
11503   exec "\$@"
11504 fi
11505
11506 _ACEOF
11507 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11508 exec 5>>config.log
11509 {
11510   echo
11511   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11512 ## Running $as_me. ##
11513 _ASBOX
11514   $as_echo "$ac_log"
11515 } >&5
11516
11517 _ACEOF
11518 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11519 #
11520 # INIT-COMMANDS
11521 #
11522 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
11523 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
11524
11525 _ACEOF
11526
11527 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11528
11529 # Handling of arguments.
11530 for ac_config_target in $ac_config_targets
11531 do
11532   case $ac_config_target in
11533     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
11534     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
11535     "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
11536     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11537
11538   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
11539   esac
11540 done
11541
11542
11543 # If the user did not use the arguments to specify the items to instantiate,
11544 # then the envvar interface is used.  Set only those that are not.
11545 # We use the long form for the default assignment because of an extremely
11546 # bizarre bug on SunOS 4.1.3.
11547 if $ac_need_defaults; then
11548   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11549   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11550   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11551 fi
11552
11553 # Have a temporary directory for convenience.  Make it in the build tree
11554 # simply because there is no reason against having it here, and in addition,
11555 # creating and moving files from /tmp can sometimes cause problems.
11556 # Hook for its removal unless debugging.
11557 # Note that there is a small window in which the directory will not be cleaned:
11558 # after its creation but before its name has been assigned to `$tmp'.
11559 $debug ||
11560 {
11561   tmp= ac_tmp=
11562   trap 'exit_status=$?
11563   : "${ac_tmp:=$tmp}"
11564   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
11565 ' 0
11566   trap 'as_fn_exit 1' 1 2 13 15
11567 }
11568 # Create a (secure) tmp directory for tmp files.
11569
11570 {
11571   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11572   test -d "$tmp"
11573 }  ||
11574 {
11575   tmp=./conf$$-$RANDOM
11576   (umask 077 && mkdir "$tmp")
11577 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
11578 ac_tmp=$tmp
11579
11580 # Set up the scripts for CONFIG_FILES section.
11581 # No need to generate them if there are no CONFIG_FILES.
11582 # This happens for instance with `./config.status config.h'.
11583 if test -n "$CONFIG_FILES"; then
11584
11585
11586 ac_cr=`echo X | tr X '\015'`
11587 # On cygwin, bash can eat \r inside `` if the user requested igncr.
11588 # But we know of no other shell where ac_cr would be empty at this
11589 # point, so we can use a bashism as a fallback.
11590 if test "x$ac_cr" = x; then
11591   eval ac_cr=\$\'\\r\'
11592 fi
11593 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
11594 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
11595   ac_cs_awk_cr='\\r'
11596 else
11597   ac_cs_awk_cr=$ac_cr
11598 fi
11599
11600 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
11601 _ACEOF
11602
11603
11604 {
11605   echo "cat >conf$$subs.awk <<_ACEOF" &&
11606   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
11607   echo "_ACEOF"
11608 } >conf$$subs.sh ||
11609   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11610 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
11611 ac_delim='%!_!# '
11612 for ac_last_try in false false false false false :; do
11613   . ./conf$$subs.sh ||
11614     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11615
11616   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
11617   if test $ac_delim_n = $ac_delim_num; then
11618     break
11619   elif $ac_last_try; then
11620     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11621   else
11622     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11623   fi
11624 done
11625 rm -f conf$$subs.sh
11626
11627 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11628 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
11629 _ACEOF
11630 sed -n '
11631 h
11632 s/^/S["/; s/!.*/"]=/
11633 p
11634 g
11635 s/^[^!]*!//
11636 :repl
11637 t repl
11638 s/'"$ac_delim"'$//
11639 t delim
11640 :nl
11641 h
11642 s/\(.\{148\}\)..*/\1/
11643 t more1
11644 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
11645 p
11646 n
11647 b repl
11648 :more1
11649 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11650 p
11651 g
11652 s/.\{148\}//
11653 t nl
11654 :delim
11655 h
11656 s/\(.\{148\}\)..*/\1/
11657 t more2
11658 s/["\\]/\\&/g; s/^/"/; s/$/"/
11659 p
11660 b
11661 :more2
11662 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11663 p
11664 g
11665 s/.\{148\}//
11666 t delim
11667 ' <conf$$subs.awk | sed '
11668 /^[^""]/{
11669   N
11670   s/\n//
11671 }
11672 ' >>$CONFIG_STATUS || ac_write_fail=1
11673 rm -f conf$$subs.awk
11674 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11675 _ACAWK
11676 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
11677   for (key in S) S_is_set[key] = 1
11678   FS = "\a"
11679
11680 }
11681 {
11682   line = $ 0
11683   nfields = split(line, field, "@")
11684   substed = 0
11685   len = length(field[1])
11686   for (i = 2; i < nfields; i++) {
11687     key = field[i]
11688     keylen = length(key)
11689     if (S_is_set[key]) {
11690       value = S[key]
11691       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
11692       len += length(value) + length(field[++i])
11693       substed = 1
11694     } else
11695       len += 1 + keylen
11696   }
11697
11698   print line
11699 }
11700
11701 _ACAWK
11702 _ACEOF
11703 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11704 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
11705   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
11706 else
11707   cat
11708 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
11709   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
11710 _ACEOF
11711
11712 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
11713 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
11714 # trailing colons and then remove the whole line if VPATH becomes empty
11715 # (actually we leave an empty line to preserve line numbers).
11716 if test "x$srcdir" = x.; then
11717   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
11718 h
11719 s///
11720 s/^/:/
11721 s/[      ]*$/:/
11722 s/:\$(srcdir):/:/g
11723 s/:\${srcdir}:/:/g
11724 s/:@srcdir@:/:/g
11725 s/^:*//
11726 s/:*$//
11727 x
11728 s/\(=[   ]*\).*/\1/
11729 G
11730 s/\n//
11731 s/^[^=]*=[       ]*$//
11732 }'
11733 fi
11734
11735 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11736 fi # test -n "$CONFIG_FILES"
11737
11738 # Set up the scripts for CONFIG_HEADERS section.
11739 # No need to generate them if there are no CONFIG_HEADERS.
11740 # This happens for instance with `./config.status Makefile'.
11741 if test -n "$CONFIG_HEADERS"; then
11742 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
11743 BEGIN {
11744 _ACEOF
11745
11746 # Transform confdefs.h into an awk script `defines.awk', embedded as
11747 # here-document in config.status, that substitutes the proper values into
11748 # config.h.in to produce config.h.
11749
11750 # Create a delimiter string that does not exist in confdefs.h, to ease
11751 # handling of long lines.
11752 ac_delim='%!_!# '
11753 for ac_last_try in false false :; do
11754   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
11755   if test -z "$ac_tt"; then
11756     break
11757   elif $ac_last_try; then
11758     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
11759   else
11760     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11761   fi
11762 done
11763
11764 # For the awk script, D is an array of macro values keyed by name,
11765 # likewise P contains macro parameters if any.  Preserve backslash
11766 # newline sequences.
11767
11768 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
11769 sed -n '
11770 s/.\{148\}/&'"$ac_delim"'/g
11771 t rset
11772 :rset
11773 s/^[     ]*#[    ]*define[       ][      ]*/ /
11774 t def
11775 d
11776 :def
11777 s/\\$//
11778 t bsnl
11779 s/["\\]/\\&/g
11780 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
11781 D["\1"]=" \3"/p
11782 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
11783 d
11784 :bsnl
11785 s/["\\]/\\&/g
11786 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
11787 D["\1"]=" \3\\\\\\n"\\/p
11788 t cont
11789 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
11790 t cont
11791 d
11792 :cont
11793 n
11794 s/.\{148\}/&'"$ac_delim"'/g
11795 t clear
11796 :clear
11797 s/\\$//
11798 t bsnlc
11799 s/["\\]/\\&/g; s/^/"/; s/$/"/p
11800 d
11801 :bsnlc
11802 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
11803 b cont
11804 ' <confdefs.h | sed '
11805 s/'"$ac_delim"'/"\\\
11806 "/g' >>$CONFIG_STATUS || ac_write_fail=1
11807
11808 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11809   for (key in D) D_is_set[key] = 1
11810   FS = "\a"
11811 }
11812 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
11813   line = \$ 0
11814   split(line, arg, " ")
11815   if (arg[1] == "#") {
11816     defundef = arg[2]
11817     mac1 = arg[3]
11818   } else {
11819     defundef = substr(arg[1], 2)
11820     mac1 = arg[2]
11821   }
11822   split(mac1, mac2, "(") #)
11823   macro = mac2[1]
11824   prefix = substr(line, 1, index(line, defundef) - 1)
11825   if (D_is_set[macro]) {
11826     # Preserve the white space surrounding the "#".
11827     print prefix "define", macro P[macro] D[macro]
11828     next
11829   } else {
11830     # Replace #undef with comments.  This is necessary, for example,
11831     # in the case of _POSIX_SOURCE, which is predefined and required
11832     # on some systems where configure will not decide to define it.
11833     if (defundef == "undef") {
11834       print "/*", prefix defundef, macro, "*/"
11835       next
11836     }
11837   }
11838 }
11839 { print }
11840 _ACAWK
11841 _ACEOF
11842 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11843   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
11844 fi # test -n "$CONFIG_HEADERS"
11845
11846
11847 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
11848 shift
11849 for ac_tag
11850 do
11851   case $ac_tag in
11852   :[FHLC]) ac_mode=$ac_tag; continue;;
11853   esac
11854   case $ac_mode$ac_tag in
11855   :[FHL]*:*);;
11856   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
11857   :[FH]-) ac_tag=-:-;;
11858   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11859   esac
11860   ac_save_IFS=$IFS
11861   IFS=:
11862   set x $ac_tag
11863   IFS=$ac_save_IFS
11864   shift
11865   ac_file=$1
11866   shift
11867
11868   case $ac_mode in
11869   :L) ac_source=$1;;
11870   :[FH])
11871     ac_file_inputs=
11872     for ac_f
11873     do
11874       case $ac_f in
11875       -) ac_f="$ac_tmp/stdin";;
11876       *) # Look for the file first in the build tree, then in the source tree
11877          # (if the path is not absolute).  The absolute path cannot be DOS-style,
11878          # because $ac_f cannot contain `:'.
11879          test -f "$ac_f" ||
11880            case $ac_f in
11881            [\\/$]*) false;;
11882            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11883            esac ||
11884            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
11885       esac
11886       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
11887       as_fn_append ac_file_inputs " '$ac_f'"
11888     done
11889
11890     # Let's still pretend it is `configure' which instantiates (i.e., don't
11891     # use $as_me), people would be surprised to read:
11892     #    /* config.h.  Generated by config.status.  */
11893     configure_input='Generated from '`
11894           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
11895         `' by configure.'
11896     if test x"$ac_file" != x-; then
11897       configure_input="$ac_file.  $configure_input"
11898       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
11899 $as_echo "$as_me: creating $ac_file" >&6;}
11900     fi
11901     # Neutralize special characters interpreted by sed in replacement strings.
11902     case $configure_input in #(
11903     *\&* | *\|* | *\\* )
11904        ac_sed_conf_input=`$as_echo "$configure_input" |
11905        sed 's/[\\\\&|]/\\\\&/g'`;; #(
11906     *) ac_sed_conf_input=$configure_input;;
11907     esac
11908
11909     case $ac_tag in
11910     *:-:* | *:-) cat >"$ac_tmp/stdin" \
11911       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
11912     esac
11913     ;;
11914   esac
11915
11916   ac_dir=`$as_dirname -- "$ac_file" ||
11917 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11918          X"$ac_file" : 'X\(//\)[^/]' \| \
11919          X"$ac_file" : 'X\(//\)$' \| \
11920          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11921 $as_echo X"$ac_file" |
11922     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11923             s//\1/
11924             q
11925           }
11926           /^X\(\/\/\)[^/].*/{
11927             s//\1/
11928             q
11929           }
11930           /^X\(\/\/\)$/{
11931             s//\1/
11932             q
11933           }
11934           /^X\(\/\).*/{
11935             s//\1/
11936             q
11937           }
11938           s/.*/./; q'`
11939   as_dir="$ac_dir"; as_fn_mkdir_p
11940   ac_builddir=.
11941
11942 case "$ac_dir" in
11943 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11944 *)
11945   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
11946   # A ".." for each directory in $ac_dir_suffix.
11947   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
11948   case $ac_top_builddir_sub in
11949   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11950   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11951   esac ;;
11952 esac
11953 ac_abs_top_builddir=$ac_pwd
11954 ac_abs_builddir=$ac_pwd$ac_dir_suffix
11955 # for backward compatibility:
11956 ac_top_builddir=$ac_top_build_prefix
11957
11958 case $srcdir in
11959   .)  # We are building in place.
11960     ac_srcdir=.
11961     ac_top_srcdir=$ac_top_builddir_sub
11962     ac_abs_top_srcdir=$ac_pwd ;;
11963   [\\/]* | ?:[\\/]* )  # Absolute name.
11964     ac_srcdir=$srcdir$ac_dir_suffix;
11965     ac_top_srcdir=$srcdir
11966     ac_abs_top_srcdir=$srcdir ;;
11967   *) # Relative name.
11968     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11969     ac_top_srcdir=$ac_top_build_prefix$srcdir
11970     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
11971 esac
11972 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
11973
11974
11975   case $ac_mode in
11976   :F)
11977   #
11978   # CONFIG_FILE
11979   #
11980
11981   case $INSTALL in
11982   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11983   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
11984   esac
11985 _ACEOF
11986
11987 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11988 # If the template does not know about datarootdir, expand it.
11989 # FIXME: This hack should be removed a few years after 2.60.
11990 ac_datarootdir_hack=; ac_datarootdir_seen=
11991 ac_sed_dataroot='
11992 /datarootdir/ {
11993   p
11994   q
11995 }
11996 /@datadir@/p
11997 /@docdir@/p
11998 /@infodir@/p
11999 /@localedir@/p
12000 /@mandir@/p'
12001 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
12002 *datarootdir*) ac_datarootdir_seen=yes;;
12003 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
12004   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
12005 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
12006 _ACEOF
12007 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12008   ac_datarootdir_hack='
12009   s&@datadir@&$datadir&g
12010   s&@docdir@&$docdir&g
12011   s&@infodir@&$infodir&g
12012   s&@localedir@&$localedir&g
12013   s&@mandir@&$mandir&g
12014   s&\\\${datarootdir}&$datarootdir&g' ;;
12015 esac
12016 _ACEOF
12017
12018 # Neutralize VPATH when `$srcdir' = `.'.
12019 # Shell code in configure.ac might set extrasub.
12020 # FIXME: do we really want to maintain this feature?
12021 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12022 ac_sed_extra="$ac_vpsub
12023 $extrasub
12024 _ACEOF
12025 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12026 :t
12027 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12028 s|@configure_input@|$ac_sed_conf_input|;t t
12029 s&@top_builddir@&$ac_top_builddir_sub&;t t
12030 s&@top_build_prefix@&$ac_top_build_prefix&;t t
12031 s&@srcdir@&$ac_srcdir&;t t
12032 s&@abs_srcdir@&$ac_abs_srcdir&;t t
12033 s&@top_srcdir@&$ac_top_srcdir&;t t
12034 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
12035 s&@builddir@&$ac_builddir&;t t
12036 s&@abs_builddir@&$ac_abs_builddir&;t t
12037 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
12038 s&@INSTALL@&$ac_INSTALL&;t t
12039 $ac_datarootdir_hack
12040 "
12041 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
12042   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12043
12044 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
12045   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
12046   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
12047       "$ac_tmp/out"`; test -z "$ac_out"; } &&
12048   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12049 which seems to be undefined.  Please make sure it is defined" >&5
12050 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12051 which seems to be undefined.  Please make sure it is defined" >&2;}
12052
12053   rm -f "$ac_tmp/stdin"
12054   case $ac_file in
12055   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
12056   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
12057   esac \
12058   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12059  ;;
12060   :H)
12061   #
12062   # CONFIG_HEADER
12063   #
12064   if test x"$ac_file" != x-; then
12065     {
12066       $as_echo "/* $configure_input  */" \
12067       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
12068     } >"$ac_tmp/config.h" \
12069       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12070     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
12071       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
12072 $as_echo "$as_me: $ac_file is unchanged" >&6;}
12073     else
12074       rm -f "$ac_file"
12075       mv "$ac_tmp/config.h" "$ac_file" \
12076         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12077     fi
12078   else
12079     $as_echo "/* $configure_input  */" \
12080       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
12081       || as_fn_error $? "could not create -" "$LINENO" 5
12082   fi
12083  ;;
12084
12085   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
12086 $as_echo "$as_me: executing $ac_file commands" >&6;}
12087  ;;
12088   esac
12089
12090
12091   case $ac_file$ac_mode in
12092     "config.h":H) echo > stamp-h ;;
12093     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
12094     "gdbdepdir":C)
12095   for subdir in ${CONFIG_SRC_SUBDIR}
12096   do
12097       $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
12098   done ;;
12099
12100   esac
12101 done # for ac_tag
12102
12103
12104 as_fn_exit 0
12105 _ACEOF
12106 ac_clean_files=$ac_clean_files_save
12107
12108 test $ac_write_fail = 0 ||
12109   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
12110
12111
12112 # configure is writing to config.log, and then calls config.status.
12113 # config.status does its own redirection, appending to config.log.
12114 # Unfortunately, on DOS this fails, as config.log is still kept open
12115 # by configure, so config.status won't be able to write to it; its
12116 # output is simply discarded.  So we exec the FD to /dev/null,
12117 # effectively closing config.log, so it can be properly (re)opened and
12118 # appended to by config.status.  When coming back to configure, we
12119 # need to make the FD available again.
12120 if test "$no_create" != yes; then
12121   ac_cs_success=:
12122   ac_config_status_args=
12123   test "$silent" = yes &&
12124     ac_config_status_args="$ac_config_status_args --quiet"
12125   exec 5>/dev/null
12126   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12127   exec 5>>config.log
12128   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12129   # would make configure fail if this is the last instruction.
12130   $ac_cs_success || as_fn_exit 1
12131 fi
12132 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
12133   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
12134 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
12135 fi
12136
This page took 0.686017 seconds and 4 git commands to generate.